Skip to contentSkip to conversation

ARM: da850: enable cpufreq in DT mode

PATCH Superseded Bartosz Golaszewski 4 participants 14 messages Mar 22, 2019 – Apr 8, 2019

Subsystems (4)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover ARM: da850: enable cpufreq in DT mode

From: Bartosz Golaszewski <[email protected]>

This series adds cpufreq-dt operating points for da850 boards supported with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also includes a fix for the da850-evm boardfile which checks an unset variable to determine the highest available frequency for cpufreq.

Last patch enables CPUFREQ_DT in davinci_all_defconfig.

v1 -> v2:
- use the VDCDC3_1.2V regulator as cpu-supply on da850-evm

Bartosz Golaszewski (2):
ARM: davinci: fix cpufreq registration on da850-evm
ARM: dts: da850-evm: enable cpufreq

David Lechner (2):
ARM: dts: da850: add cpu node and operating points to DT
ARM: davinci_all_defconfig: Enable CPUFREQ_DT

 arch/arm/boot/dts/da850-evm.dts         | 12 ++++++
 arch/arm/boot/dts/da850-lcdk.dts        | 31 ++++++++++++++
 arch/arm/boot/dts/da850-lego-ev3.dts    | 30 +++++++++++++
 arch/arm/boot/dts/da850.dtsi            | 56 +++++++++++++++++++++++++
 arch/arm/configs/davinci_all_defconfig  |  1 +
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----
 6 files changed, 131 insertions(+), 11 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/4 ARM: davinci: fix cpufreq registration on da850-evm

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

---
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
arch/arm/mach-davinci/board-da850-evm.c +1 -11
index 1fdc9283a8c5..58b2a485b527 100644
@@ -1155,17 +1155,7 @@ static struct edma_rsv_info *da850_edma_rsv[2] = {
 #ifdef CONFIG_CPU_FREQ
 static __init int da850_evm_init_cpufreq(void)
 {
-	switch (system_rev & 0xF) {
-	case 3:
-		da850_max_speed = 456000;
-		break;
-	case 2:
-		da850_max_speed = 408000;
-		break;
-	case 1:
-		da850_max_speed = 372000;
-		break;
-	}
+	da850_max_speed = 456000;
 
 	return da850_register_cpufreq("pll0_sysclk3");
 }
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

adam

Quoted 37 lines
---
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
arch/arm/mach-davinci/board-da850-evm.c +1 -12
index 1fdc9283a8c5..58b2a485b527 100644
@@ -1155,17 +1155,7 @@ static struct edma_rsv_info *da850_edma_rsv[2] = {
 #ifdef CONFIG_CPU_FREQ
 static __init int da850_evm_init_cpufreq(void)
 {
-       switch (system_rev & 0xF) {
-       case 3:
-               da850_max_speed = 456000;
-               break;
-       case 2:
-               da850_max_speed = 408000;
-               break;
-       case 1:
-               da850_max_speed = 372000;
-               break;
-       }
+       da850_max_speed = 456000;
 
        return da850_register_cpufreq("pll0_sysclk3");
 }
--

2.20.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Bart

Quoted 38 lines

adam

Quoted 37 lines
---
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
arch/arm/mach-davinci/board-da850-evm.c +1 -12
index 1fdc9283a8c5..58b2a485b527 100644
@@ -1155,17 +1155,7 @@ static struct edma_rsv_info *da850_edma_rsv[2] = {
 #ifdef CONFIG_CPU_FREQ
 static __init int da850_evm_init_cpufreq(void)
 {
-       switch (system_rev & 0xF) {
-       case 3:
-               da850_max_speed = 456000;
-               break;
-       case 2:
-               da850_max_speed = 408000;
-               break;
-       case 1:
-               da850_max_speed = 372000;
-               break;
-       }
+       da850_max_speed = 456000;
 
        return da850_register_cpufreq("pll0_sysclk3");
 }
--

2.20.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

Hi Bart,

Quoted 20 lines · Bartosz Golaszewski

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

Quoted 8 lines

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Can you check if the procedure in doc/README.davinci in U-Boot sources still works?

Environment Variables
=====================

The DA850 EVM allows the user to specify the maximum cpu clock allowed by the silicon, in Hz, via an environment variable "maxcpuclk".

The maximum clock rate allowed depends on the silicon populated on the EVM. Please make sure you understand the restrictions placed on this clock in the device specific datasheet before setting up this variable. This information is passed to the Linux kernel using the ATAG_REVISION atag.

If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK is used to obtain this information.

Thanks,
Sekhar

#5 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

śr., 27 mar 2019 o 12:14 Sekhar Nori <[email protected]> napisał(a):

Quoted 47 lines

Hi Bart,

Quoted 20 lines · Bartosz Golaszewski

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

Quoted 8 lines

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Can you check if the procedure in doc/README.davinci in U-Boot sources still works?

Environment Variables
=====================

The DA850 EVM allows the user to specify the maximum cpu clock allowed by the silicon, in Hz, via an environment variable "maxcpuclk".

The maximum clock rate allowed depends on the silicon populated on the EVM. Please make sure you understand the restrictions placed on this clock in the device specific datasheet before setting up this variable. This information is passed to the Linux kernel using the ATAG_REVISION atag.

Quoted 5 lines

If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK is used to obtain this information.

Thanks,
Sekhar

Hi Sekhar,

I built the current upstream u-boot and the get_board_rev() function for da850-evm doesn't seem to be called at all. For instance the lego-ev3 platform does this:

./lego/ev3/legoev3.c:108: board_rev = get_board_rev();

but in davinci this function seems to be unused and I don't see it called from any other core u-boot component. I don't see any commit that would mention this function but there are a lot of commits removing get_board_rev() for other boards in git log. Is it possible it stopped being used at some point?

Bart

#6 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

Quoted 61 lines · Bartosz Golaszewski

śr., 27 mar 2019 o 12:14 Sekhar Nori <[email protected]> napisał(a):

Quoted 47 lines

Hi Bart,

Quoted 20 lines · Bartosz Golaszewski

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

Quoted 8 lines

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Can you check if the procedure in doc/README.davinci in U-Boot sources still works?

Environment Variables
=====================

The DA850 EVM allows the user to specify the maximum cpu clock allowed by the silicon, in Hz, via an environment variable "maxcpuclk".

The maximum clock rate allowed depends on the silicon populated on the EVM. Please make sure you understand the restrictions placed on this clock in the device specific datasheet before setting up this variable. This information is passed to the Linux kernel using the ATAG_REVISION atag.

Quoted 5 lines

If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK is used to obtain this information.

Thanks,
Sekhar

Hi Sekhar,

I built the current upstream u-boot and the get_board_rev() function for da850-evm doesn't seem to be called at all. For instance the lego-ev3 platform does this:

Quoted 7 lines

./lego/ev3/legoev3.c:108: board_rev = get_board_rev();

but in davinci this function seems to be unused and I don't see it called from any other core u-boot component. I don't see any commit that would mention this function but there are a lot of commits removing get_board_rev() for other boards in git log. Is it possible it stopped being used at some point?

Look for setup_revision_tag in arch/arm/lib/bootm.c

The function appears to be called from there.

There is a __weak reference in the header file which I think allows people to remove them without breaking bootm.

adam

Quoted 2 lines

Bart

#7 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

śr., 3 kwi 2019 o 17:49 Adam Ford <[email protected]> napisał(a):

Quoted 71 lines · Bartosz Golaszewski
Quoted 61 lines

śr., 27 mar 2019 o 12:14 Sekhar Nori <[email protected]> napisał(a):

Quoted 47 lines

Hi Bart,

Quoted 20 lines · Bartosz Golaszewski

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

Quoted 8 lines

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Can you check if the procedure in doc/README.davinci in U-Boot sources still works?

Environment Variables
=====================

The DA850 EVM allows the user to specify the maximum cpu clock allowed by the silicon, in Hz, via an environment variable "maxcpuclk".

The maximum clock rate allowed depends on the silicon populated on the EVM. Please make sure you understand the restrictions placed on this clock in the device specific datasheet before setting up this variable. This information is passed to the Linux kernel using the ATAG_REVISION atag.

Quoted 5 lines

If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK is used to obtain this information.

Thanks,
Sekhar

Hi Sekhar,

I built the current upstream u-boot and the get_board_rev() function for da850-evm doesn't seem to be called at all. For instance the lego-ev3 platform does this:

Quoted 7 lines

./lego/ev3/legoev3.c:108: board_rev = get_board_rev();

but in davinci this function seems to be unused and I don't see it called from any other core u-boot component. I don't see any commit that would mention this function but there are a lot of commits removing get_board_rev() for other boards in git log. Is it possible it stopped being used at some point?

Quoted 10 lines

Look for setup_revision_tag in arch/arm/lib/bootm.c

The function appears to be called from there.

There is a __weak reference in the header file which I think allows people to remove them without breaking bootm.

adam

Quoted 2 lines

Bart

Thanks, now verified that this still works in board file mode for da850-evm. Now the questions is - what about DT mode? Should we only enable the lowest possible mode (300MHz) and leave it to the user to enable any higher frequencies?

Bart

#8 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

Quoted 82 lines · Bartosz Golaszewski

śr., 3 kwi 2019 o 17:49 Adam Ford <[email protected]> napisał(a):

Quoted 80 lines · Bartosz Golaszewski
Quoted 61 lines

śr., 27 mar 2019 o 12:14 Sekhar Nori <[email protected]> napisał(a):

Quoted 47 lines

Hi Bart,

Quoted 20 lines · Bartosz Golaszewski

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

Quoted 8 lines

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Can you check if the procedure in doc/README.davinci in U-Boot sources still works?

Environment Variables
=====================

The DA850 EVM allows the user to specify the maximum cpu clock allowed by the silicon, in Hz, via an environment variable "maxcpuclk".

The maximum clock rate allowed depends on the silicon populated on the EVM. Please make sure you understand the restrictions placed on this clock in the device specific datasheet before setting up this variable. This information is passed to the Linux kernel using the ATAG_REVISION atag.

Quoted 5 lines

If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK is used to obtain this information.

Thanks,
Sekhar

Hi Sekhar,

I built the current upstream u-boot and the get_board_rev() function for da850-evm doesn't seem to be called at all. For instance the lego-ev3 platform does this:

Quoted 7 lines

./lego/ev3/legoev3.c:108: board_rev = get_board_rev();

but in davinci this function seems to be unused and I don't see it called from any other core u-boot component. I don't see any commit that would mention this function but there are a lot of commits removing get_board_rev() for other boards in git log. Is it possible it stopped being used at some point?

Look for setup_revision_tag in arch/arm/lib/bootm.c

The function appears to be called from there.

There is a __weak reference in the header file which I think allows people to remove them without breaking bootm.

adam

Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line

Bart

Thanks, now verified that this still works in board file mode for da850-evm. Now the questions is - what about DT mode? Should we only enable the lowest possible mode (300MHz) and leave it to the user to enable any higher frequencies?

From everything that I can find in Logic PD's database, the standard

da850-evm kits and SOM's are 375MHz, so I think it's safe to run up to that speed. I would disable the speed options for 408 and 456, but leave them shown for anyone who may have purchased a custom version with the 456MHz variant which I can also see there are some. At least for the L138 and AM1808 SOM's, those customers who who they are, so making it obvious how to enable it would be a good thing.

Just my two cents.

adam

Quoted 2 lines

Bart

#9 lore raw

Re: [PATCH v2 1/4] ARM: davinci: fix cpufreq registration on da850-evm

Quoted 98 lines · Adam Ford
Quoted 80 lines · Bartosz Golaszewski

śr., 3 kwi 2019 o 17:49 Adam Ford <[email protected]> napisał(a):

Quoted 78 lines · Bartosz Golaszewski
Quoted 61 lines

śr., 27 mar 2019 o 12:14 Sekhar Nori <[email protected]> napisał(a):

Quoted 47 lines

Hi Bart,

Quoted 20 lines · Bartosz Golaszewski

wt., 26 mar 2019 o 15:00 Adam Ford <[email protected]> napisał(a):

Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines

From: Bartosz Golaszewski <[email protected]>

The system_rev variable is never set on davinci and is always 0, so we're using the default max operating point of 300MHz. The cvdd supply comes from the tps6507 pmic and the voltage can go all the way to 1.3V so the maximum supported rate should be 456MHz.

Quoted 5 lines

My understanding is that only certain revisions of the silicon can go
to 456MHz. The L138's Datasheet lists both a 456 and 375 version. I
cannot find a way to read a register to determine which version of the silicon is available. Maybe Sekhar can confirm.

Commit 28bd2c341120 ("davinci: am18x/da850/omap-l138 evm: add support for higher speed grades") mentions the following:

Quoted 8 lines

---
U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code.
---

Should the system_rev somehow reflect that revision? Any way I can check it?

Can you check if the procedure in doc/README.davinci in U-Boot sources still works?

Environment Variables
=====================

The DA850 EVM allows the user to specify the maximum cpu clock allowed by the silicon, in Hz, via an environment variable "maxcpuclk".

The maximum clock rate allowed depends on the silicon populated on the EVM. Please make sure you understand the restrictions placed on this clock in the device specific datasheet before setting up this variable. This information is passed to the Linux kernel using the ATAG_REVISION atag.

Quoted 5 lines

If "maxcpuclk" is not defined, the configuration CONFIG_DA850_EVM_MAX_CPU_CLK is used to obtain this information.

Thanks,
Sekhar

Hi Sekhar,

I built the current upstream u-boot and the get_board_rev() function for da850-evm doesn't seem to be called at all. For instance the lego-ev3 platform does this:

Quoted 7 lines

./lego/ev3/legoev3.c:108: board_rev = get_board_rev();

but in davinci this function seems to be unused and I don't see it called from any other core u-boot component. I don't see any commit that would mention this function but there are a lot of commits removing get_board_rev() for other boards in git log. Is it possible it stopped being used at some point?

Look for setup_revision_tag in arch/arm/lib/bootm.c

The function appears to be called from there.

There is a __weak reference in the header file which I think allows people to remove them without breaking bootm.

Quoted 8 lines
Quoted 3 lines

adam

Quoted 2 lines

Bart

Thanks, now verified that this still works in board file mode for da850-evm. Now the questions is - what about DT mode? Should we only enable the lowest possible mode (300MHz) and leave it to the user to enable any higher frequencies?

From everything that I can find in Logic PD's database, the standard da850-evm kits and SOM's are 375MHz, so I think it's safe to run up to that speed. I would disable the speed options for 408 and 456, but leave them shown for anyone who may have purchased a custom version with the 456MHz variant which I can also see there are some. At least for the L138 and AM1808 SOM's, those customers who who they are, so making it obvious how to enable it would be a good thing.

Quoted 1 line

Just my two cents.

Sounds good to me.

Thanks,
Sekhar

#10 lore raw

PATCH v2 2/4 ARM: dts: da850: add cpu node and operating points to DT

In reply to Bartosz Golaszewski

From: David Lechner <[email protected]>

This adds a cpu node and operating points to the common da850.dtsi file.

Additionally, a regulator is added to the LEGO EV3 board along with some board-specific CPU configuration.

Regulators need to be hooked up on other boards to get them working.

---
 arch/arm/boot/dts/da850-lcdk.dts     | 31 +++++++++++++++
 arch/arm/boot/dts/da850-lego-ev3.dts | 30 +++++++++++++++
 arch/arm/boot/dts/da850.dtsi         | 56 ++++++++++++++++++++++++++++
 3 files changed, 117 insertions(+)
arch/arm/boot/dts/da850-lcdk.dts +31 -0
index 26f453dc8370..f29ed9010812 100644
@@ -155,12 +155,43 @@
 			};
 		};
 	};
+
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1300000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &ref_clk {
 	clock-frequency = <24000000>;
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/* LCDK has a fixed CVDD of 1.3V, so only op points >= 300MHz are valid */
+
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+&opp_375 {
+	status = "okay";
+};
+
+&opp_456 {
+	status = "okay";
+};
+
 &pmx_core {
 	status = "okay";
 
arch/arm/boot/dts/da850-lego-ev3.dts +30 -0
index 66fcadf0ba91..553717f84483 100644
@@ -125,6 +125,15 @@
 		amp-supply = <&amp>;
 	};
 
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
 	/*
 	 * This is a 5V current limiting regulator that is shared by USB,
 	 * the sensor (input) ports, the motor (output) ports and the A/DC.
@@ -204,6 +213,27 @@
 	clock-frequency = <24000000>;
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/* since we have a fixed regulator, we can't run at these points */
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+/*
+ * The SoC is actually the 456MHz version, but because of the fixed regulator
+ * This is the fastest we can go.
+ */
+&opp_375 {
+	status = "okay";
+};
+
 &pmx_core {
 	status = "okay";
 
arch/arm/boot/dts/da850.dtsi +56 -0

62 lines not on this page · raw message

Signature · 1 line
2.20.1
#11 lore raw

PATCH v2 3/4 ARM: dts: da850-evm: enable cpufreq

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Enable cpufreq-dt support for da850-evm. The cvdd is supplied by the tps6507 pmic with configurable output voltage, so all operating points can be enabled.

---
 arch/arm/boot/dts/da850-evm.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/da850-evm.dts +12 -0
index f04bc3e15332..a0a1b3dccf37 100644
@@ -191,6 +191,18 @@
 	};
 };
 
+&cpu {
+	cpu-supply = <&vdcdc3_reg>;
+};
+
+&opp_375 {
+	status = "okay";
+};
+
+&opp_456 {
+	status = "okay";
+};
+
 &sata {
 	status = "okay";
 };
Signature · 1 line
2.20.1
#12 lore raw

Re: [PATCH v2 3/4] ARM: dts: da850-evm: enable cpufreq

Quoted 21 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Enable cpufreq-dt support for da850-evm. The cvdd is supplied by the tps6507 pmic with configurable output voltage, so all operating points can be enabled.

---
 arch/arm/boot/dts/da850-evm.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/da850-evm.dts +1 -0
index f04bc3e15332..a0a1b3dccf37 100644
@@ -191,6 +191,18 @@
        };
 };
 
+&cpu {

arch/arm/boot/dts/da850-evm.dts line 204

Quoted 10 lines
arch/arm/boot/dts/da850-evm.dts +10 -0
+       cpu-supply = <&vdcdc3_reg>;
+};
+
+&opp_375 {
+       status = "okay";
+};
+
+&opp_456 {
+       status = "okay";
+};

I pulled part number for the processor used in the da850evm that Logic PD produces, and it shows a imit of 375MHz. I cross-referenced the processor part number with the description from a distributor, and the part number also lists 375MHz, so I think we should leave 456 disabled.

adam

Quoted 12 lines
arch/arm/boot/dts/da850-evm.dts +1 -1
+
 &sata {
        status = "okay";
 };
--

2.20.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#13 lore raw

PATCH v2 4/4 ARM: davinci_all_defconfig: Enable CPUFREQ_DT

In reply to Bartosz Golaszewski

From: David Lechner <[email protected]>

This sets CONFIG_CPUFREQ_DT=m in davinci_all_defconfig. This is used for frequency scaling on device tree boards.

---
 arch/arm/configs/davinci_all_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/davinci_all_defconfig +1 -0
index 207962a656a2..c3502236132e 100644
@@ -45,6 +45,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
 CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPUFREQ_DT=m
 CONFIG_CPU_IDLE=y
 CONFIG_NET=y
 CONFIG_PACKET=y
Signature · 1 line
2.20.1