ARM: da850: enable cpufreq in DT mode
Subsystems (2)
v3 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).
Last patch enables CPUFREQ_DT in davinci_all_defconfig.
v1 -> v2:
- use the VDCDC3_1.2V regulator as cpu-supply on da850-evm
v2 -> v3:
- drop patch 1, as the revision tag is in fact correctly passed to the kernel by u-boot
- only enable the 375 operating point for da850-evm as this is the standard frequency for this board
Bartosz Golaszewski (1):
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 | 13 ++++++ 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 + 5 files changed, 131 insertions(+)
Signature · 1 line
2.21.0
PATCH v3 1/3 ARM: dts: da850: add cpu node and operating points to DT
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
@@ -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
@@ -125,6 +125,15 @@ amp-supply = <&>; }; + 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.21.0
PATCH v3 2/3 ARM: dts: da850-evm: enable cpufreq
In reply to Bartosz GolaszewskiFrom: 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/boot/dts/da850-evm.dts +13 -0
@@ -191,6 +191,19 @@ }; }; +&cpu { + cpu-supply = <&vdcdc3_reg>; +}; + +/* + * The standard da850-evm kits and SOM's are 375MHz so enable this operating + * point by default. Higher frequencies must be enabled for custom boards with + * other variants of the SoC. + */ +&opp_375 { + status = "okay"; +}; + &sata { status = "okay"; };
Signature · 1 line
2.21.0
PATCH v3 3/3 ARM: davinci_all_defconfig: Enable CPUFREQ_DT
In reply to Bartosz GolaszewskiFrom: 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
@@ -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.21.0
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Bartosz GolaszewskiQuoted 9 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
I still have the same comments that I made on v1. It would be nice to also mention the LCDK board in the commit message since it is included in this patch.
Also, the 415MHz operating point is something I just made up for testing and I'm not sure that it is actually useful in general. It could be omitted from this patch.
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
pon., 8 kwi 2019 o 15:47 David Lechner <[email protected]> napisał(a):
Quoted 9 lines · Bartosz Golaszewski
Quoted 7 lines
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.Additionally, a regulator is added to the LEGO EV3 board along with some board-specific CPU configuration.
Quoted 7 lines
Quoted 2 lines
Regulators need to be hooked up on other boards to get them working.
I still have the same comments that I made on v1. It would be nice to also mention the LCDK board in the commit message since it is included in this patch.
My bad, I forgot it.
Quoted 4 lines
Also, the 415MHz operating point is something I just made up for testing and I'm not sure that it is actually useful in general. It could be omitted from this patch.
The board file has the 408 opp, I guess this is in line with other operating points defined by you which have slightly higher frequencies than those in the da850.c. Let's see what Sekhar thinks.
Bart
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
Quoted 25 lines · Bartosz Golaszewski
pon., 8 kwi 2019 o 15:47 David Lechner <[email protected]> napisał(a):
Quoted 9 lines · Bartosz Golaszewski
Quoted 7 lines
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.Additionally, a regulator is added to the LEGO EV3 board along with some board-specific CPU configuration.
Quoted 7 lines
Quoted 2 lines
Regulators need to be hooked up on other boards to get them working.
I still have the same comments that I made on v1. It would be nice to also mention the LCDK board in the commit message since it is included in this patch.
My bad, I forgot it.
Quoted 4 lines
Also, the 415MHz operating point is something I just made up for testing and I'm not sure that it is actually useful in general. It could be omitted from this patch.
Quoted 6 lines
The board file has the 408 opp, I guess this is in line with other operating points defined by you which have slightly higher frequencies than those in the
da850.c. Let's see what Sekhar thinks.Bart
My bad this time. I guess I put more thought into it that I remembered. :-)
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Bartosz GolaszewskiHi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>
I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
No problems with adding OPPs to da850.dtsi, but which of those are enabled on any board should be after some thorough testing and analysis.
Because of that, I think its also better to split da850.dtsi from board specific changes in this patch.
Quoted 31 lines
arch/arm/boot/dts/da850.dtsi +31
-0+ opp_table: opp-table { + compatible = "operating-points-v2"; + + opp_100: opp100-100000000 { + opp-hz = /bits/ 64 <100000000>; + opp-microvolt = <1000000 950000 1050000>; + }; + + opp_200: opp110-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <1100000 1050000 1160000>; + }; + + opp_300: opp120-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <1200000 1140000 1320000>; + }; + + /* + * Original silicon was 300MHz max, so higher frequencies + * need to be enabled on a per-board basis if the chip is + * capable. + */ + + opp_375: opp120-375000000 { + status = "disabled"; + opp-hz = /bits/ 64 <375000000>; + opp-microvolt = <1200000 1140000 1320000>; + }; + + opp_415: opp130-415000000 {
arch/arm/boot/dts/da850.dtsi line 76
Quoted 10 lines
arch/arm/boot/dts/da850.dtsi +10
-0+ status = "disabled"; + opp-hz = /bits/ 64 <415000000>; + opp-microvolt = <1300000 1250000 1350000>; + }; + + opp_456: opp130-456000000 { + status = "disabled"; + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <1300000 1250000 1350000>; + };
Here, lets stick to OPPs defined in OMAP-L138 data manual (irrespective of what existing board code has). Page 93 of
http://www.ti.com/lit/ds/symlink/omap-l138.pdf
Thanks,
Sekhar
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 13 lines
Hi Bartosz,
Quoted 9 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Quoted 8 lines
Quoted 2 lines
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Quoted 6 lines
No problems with adding OPPs to
da850.dtsi, but which of those are enabled on any board should be after some thorough testing and analysis.Because of that, I think its also better to split
da850.dtsifrom board specific changes in this patch.
Sure, I'll split it.
Quoted 37 lines
Quoted 37 lines
arch/arm/boot/dts/da850.dtsi +37
-0+ opp_table: opp-table { + compatible = "operating-points-v2"; + + opp_100: opp100-100000000 { + opp-hz = /bits/ 64 <100000000>; + opp-microvolt = <1000000 950000 1050000>; + }; + + opp_200: opp110-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <1100000 1050000 1160000>; + }; + + opp_300: opp120-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <1200000 1140000 1320000>; + }; + + /* + * Original silicon was 300MHz max, so higher frequencies + * need to be enabled on a per-board basis if the chip is + * capable. + */ + + opp_375: opp120-375000000 { + status = "disabled"; + opp-hz = /bits/ 64 <375000000>; + opp-microvolt = <1200000 1140000 1320000>; + }; + + opp_415: opp130-415000000 { + status = "disabled"; + opp-hz = /bits/ 64 <415000000>; + opp-microvolt = <1300000 1250000 1350000>; + }; + + opp_456: opp130-456000000 {
Quoted 9 lines
arch/arm/boot/dts/da850.dtsi line 76
Quoted 4 lines
arch/arm/boot/dts/da850.dtsi +4
-0+ status = "disabled"; + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <1300000 1250000 1350000>; + };Here, lets stick to OPPs defined in OMAP-L138 data manual (irrespective of what existing board code has). Page 93 of
http://www.ti.com/lit/ds/symlink/omap-l138.pdf
Will do in the next version.
Bart
Quoted 2 lines
Thanks,
Sekhar
Re: [PATCH v3 2/3] ARM: dts: da850-evm: enable cpufreq
In reply to Bartosz GolaszewskiQuoted 7 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.
Signed-off-by Bartosz Golaszewski <[email protected]>
Adam, can you please ack? Looks good to me.
Thanks,
Sekhar
Quoted 31 lines
--- arch/arm/boot/dts/da850-evm.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm/boot/dts/da850-evm.dts +13
-0@@ -191,6 +191,19 @@ }; }; +&cpu { + cpu-supply = <&vdcdc3_reg>; +}; + +/* + * The standard da850-evm kits and SOM's are 375MHz so enable this operating + * point by default. Higher frequencies must be enabled for custom boards with + * other variants of the SoC. + */ +&opp_375 { + status = "okay"; +}; + &sata { status = "okay"; };Signature · 1 line
2.21.0
Re: [PATCH v3 2/3] ARM: dts: da850-evm: enable cpufreq
pt., 12 kwi 2019 o 15:06 Sekhar Nori <[email protected]> napisał(a):
Quoted 12 lines · Bartosz Golaszewski
Quoted 7 lines
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.
Signed-off-by Bartosz Golaszewski <[email protected]>Adam, can you please ack? Looks good to me.
Actually I just noticed the commit message is no longer in line with the changeset. I'll fix it in v4 shortly.
Bart
Quoted 26 lines
Thanks,
SekharQuoted 23 lines
--- arch/arm/boot/dts/da850-evm.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm/boot/dts/da850-evm.dts +11
-0@@ -191,6 +191,19 @@ }; }; +&cpu { + cpu-supply = <&vdcdc3_reg>; +}; + +/* + * The standard da850-evm kits and SOM's are 375MHz so enable this operating + * point by default. Higher frequencies must be enabled for custom boards with + * other variants of the SoC. + */ +&opp_375 { + status = "okay";
Quoted 9 lines
Quoted 8 lines
arch/arm/boot/dts/da850-evm.dts +2
-1+}; + &sata { status = "okay"; }; --2.21.0
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Bartosz GolaszewskiQuoted 23 lines · Bartosz Golaszewski
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 13 lines
Hi Bartosz,
Quoted 9 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Quoted 8 lines
Quoted 2 lines
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Thanks,
Sekhar
Re: [PATCH v3 2/3] ARM: dts: da850-evm: enable cpufreq
In reply to Sekhar NoriQuoted 11 lines · Sekhar Nori
Quoted 7 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.
Signed-off-by Bartosz Golaszewski <[email protected]>Adam, can you please ack? Looks good to me.
Sekhar,
Based on what I read in the thread about the LCDK, I want to do some tests on the da850-evm before put my name on it. I like what I see in general, so I am excited to this this here.
Bartosz - which kernel branch should I use as a starting point to apply these?
adam
Quoted 36 lines
Thanks,
SekharQuoted 31 lines
--- arch/arm/boot/dts/da850-evm.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm/boot/dts/da850-evm.dts +13
-1@@ -191,6 +191,19 @@ }; }; +&cpu { + cpu-supply = <&vdcdc3_reg>; +}; + +/* + * The standard da850-evm kits and SOM's are 375MHz so enable this operating + * point by default. Higher frequencies must be enabled for custom boards with + * other variants of the SoC. + */ +&opp_375 { + status = "okay"; +}; + &sata { status = "okay"; }; --2.21.0
Re: [PATCH v3 2/3] ARM: dts: da850-evm: enable cpufreq
pt., 12 kwi 2019 o 15:59 Adam Ford <[email protected]> napisał(a):
Quoted 12 lines · Sekhar Nori
Quoted 10 lines · Bartosz Golaszewski
Quoted 7 lines
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.
Signed-off-by Bartosz Golaszewski <[email protected]>
Quoted 9 lines
Quoted 1 line
Adam, can you please ack? Looks good to me.
Sekhar,
Based on what I read in the thread about the LCDK, I want to do some tests on the da850-evm before put my name on it. I like what I see in general, so I am excited to this this here.Bartosz - which kernel branch should I use as a starting point to apply these?
Upstream v5.1-rc4.
Bartosz
Quoted 37 lines
adam
Quoted 36 lines
Thanks,
SekharQuoted 31 lines
--- arch/arm/boot/dts/da850-evm.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm/boot/dts/da850-evm.dts +13
-1@@ -191,6 +191,19 @@ }; }; +&cpu { + cpu-supply = <&vdcdc3_reg>; +}; + +/* + * The standard da850-evm kits and SOM's are 375MHz so enable this operating + * point by default. Higher frequencies must be enabled for custom boards with + * other variants of the SoC. + */ +&opp_375 { + status = "okay"; +}; + &sata { status = "okay"; }; --2.21.0
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Sekhar Noript., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Bart
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
Quoted 41 lines · Bartosz Golaszewski
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
How do you feel about keeping all OPPs disabled by default in da850.dtsi and enabling only the ones that make sense for a board in <board>.dts?
Empty OPP table is illegal, so this does mean that every board must enable at least one OPP.
Thanks,
Sekhar
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
pon., 15 kwi 2019 o 12:21 Sekhar Nori <[email protected]> napisał(a):
Quoted 51 lines · Bartosz Golaszewski
Quoted 41 lines
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Quoted 9 lines
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
How do you feel about keeping all OPPs disabled by default in
da850.dtsiand enabling only the ones that make sense for a board in <board>.dts?Empty OPP table is illegal, so this does mean that every board must enable at least one OPP.
I guess in that case we'd need to make 300 MHz the default for da850-evm, but on da850-lcdk I'd go for 456 MHz (due to the regulator being fixed anyway).
Bart
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
Quoted 59 lines · Bartosz Golaszewski
pon., 15 kwi 2019 o 12:21 Sekhar Nori <[email protected]> napisał(a):
Quoted 57 lines · Bartosz Golaszewski
Quoted 41 lines
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
How do you feel about keeping all OPPs disabled by default in
da850.dtsiand enabling only the ones that make sense for a board in <board>.dts?
Quoted 7 lines
Quoted 3 lines
Empty OPP table is illegal, so this does mean that every board must enable at least one OPP.
I guess in that case we'd need to make 300 MHz the default for da850-evm, but on da850-lcdk I'd go for 456 MHz (due to the regulator being fixed anyway).
Based on what I've seen of your V4 patch, I think it's fine to let the da850-evm run at 375. I am not sure why it would need to be default to 300.
I agree that the cpu-supply is correctly referencing vdcdc3_reg, and it's currently setup to handle .95 to 1.35V, which I think is OK based on what I've seen and the OPP's look right from what I can tell.
adam
Quoted 2 lines
Bart
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Sekhar Noripon., 15 kwi 2019 o 12:21 Sekhar Nori <[email protected]> napisał(a):
Quoted 48 lines · Bartosz Golaszewski
Quoted 41 lines
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Quoted 6 lines
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
I've been trying different things, like suspending the device before the transition, resetting the controller or playing with the clock during transitions but it always results in the same kind of error:
ohci-da8xx 1e25000.usb: frame counter not updating; disabled ohci-da8xx 1e25000.usb: HC died; cleaning up
usb 1-1: USB disconnect, device number 2
If you have any idea - let me know, otherwise I'll give up.
If we agree on the direction of these patches, then I can go with a single enabled OPP for lcdk (456 MHz) and all OPPs up to 375 MHz enabled for da850-evm.
David - do you want to keep the lego board as is?
Bart
Quoted 8 lines
How do you feel about keeping all OPPs disabled by default in
da850.dtsiand enabling only the ones that make sense for a board in <board>.dts?Empty OPP table is illegal, so this does mean that every board must enable at least one OPP.
Thanks,
Sekhar
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
Quoted 65 lines · Bartosz Golaszewski
pon., 15 kwi 2019 o 12:21 Sekhar Nori <[email protected]> napisał(a):
Quoted 48 lines · Bartosz Golaszewski
Quoted 41 lines
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Quoted 6 lines
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
I've been trying different things, like suspending the device before the transition, resetting the controller or playing with the clock during transitions but it always results in the same kind of error:
ohci-da8xx 1e25000.usb: frame counter not updating; disabled ohci-da8xx 1e25000.usb: HC died; cleaning up
usb 1-1: USB disconnect, device number 2
Quoted 5 lines
If you have any idea - let me know, otherwise I'll give up.
If we agree on the direction of these patches, then I can go with a single enabled OPP for lcdk (456 MHz) and all OPPs up to 375 MHz enabled for da850-evm.
One last questions, and this probably directed at Sekhar, but what happens if you modify the OPP for the boards with fixed regulators to enable all the frequencies but with the only available voltage. Is there harm is running the processor at a higher voltage than necessary? I did some quick experiments on a different ARM board and I saw some changes in power consumption. I would think some power savings might be better than none, but I don't know if it causes damage.
adam
Quoted 13 lines
David - do you want to keep the lego board as is?
Bart
Quoted 8 lines
How do you feel about keeping all OPPs disabled by default in
da850.dtsiand enabling only the ones that make sense for a board in <board>.dts?Empty OPP table is illegal, so this does mean that every board must enable at least one OPP.
Thanks,
Sekhar
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Bartosz GolaszewskiQuoted 64 lines · Bartosz Golaszewski
pon., 15 kwi 2019 o 12:21 Sekhar Nori <[email protected]> napisał(a):
Quoted 48 lines · Bartosz Golaszewski
Quoted 41 lines
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Quoted 6 lines
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
I've been trying different things, like suspending the device before the transition, resetting the controller or playing with the clock during transitions but it always results in the same kind of error:
ohci-da8xx 1e25000.usb: frame counter not updating; disabled ohci-da8xx 1e25000.usb: HC died; cleaning up
usb 1-1: USB disconnect, device number 2
Quoted 7 lines
If you have any idea - let me know, otherwise I'll give up.
If we agree on the direction of these patches, then I can go with a single enabled OPP for lcdk (456 MHz) and all OPPs up to 375 MHz enabled for da850-evm.
David - do you want to keep the lego board as is?
Yes, I think so. Even if we can't use CPU frequency throttling because of the USB issue, I think it would still be nice if we could use this to increase the frequency once during early boot so that we can run faster than what the bootloader set.
I've actually been running one of my EV3 bricks at 456MHz for almost a year now without noticing any problems. (This is of course out of spec since we only have 1.2V so I'm not saying we should add that operating point to the mainline kernel.)
Quoted 11 lines
Bart
Quoted 8 lines
How do you feel about keeping all OPPs disabled by default in
da850.dtsiand enabling only the ones that make sense for a board in <board>.dts?Empty OPP table is illegal, so this does mean that every board must enable at least one OPP.
Thanks,
Sekhar
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Adam FordQuoted 72 lines · Adam Ford
Quoted 65 lines · Bartosz Golaszewski
pon., 15 kwi 2019 o 12:21 Sekhar Nori <[email protected]> napisał(a):
Quoted 48 lines · Bartosz Golaszewski
Quoted 41 lines
pt., 12 kwi 2019 o 15:53 Sekhar Nori <[email protected]> napisał(a):
Quoted 25 lines · Bartosz Golaszewski
Quoted 23 lines
pt., 12 kwi 2019 o 13:26 Sekhar Nori <[email protected]> napisał(a):
Quoted 21 lines
Hi Bartosz,
Quoted 11 lines · Bartosz Golaszewski
From: David Lechner <[email protected]>
This adds a cpu node and operating points to the common
da850.dtsifile.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.
Signed-off-by David Lechner <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>I remember you mentioning about some problems using OCHI and cpufreq together. Are those resolved now? CPU PLL on DA850 can affect other peripheral clock frequencies too. So enabling it should really be a per-board decision.
Quoted 7 lines
Quoted 3 lines
The problems are still there. I've never been able to find the culprit, but it also occurs on TI BSP in the same way (a couple cpufreq transitions will make the controller unresponsive).
Is that on LCDK as well? As I recall cpufreq was never enabled on LCDK in TI BSP.
Yes, I just verified that the bug occurs on LCDK with patches from this series.
Quoted 4 lines
If the OHCI problem is present on LCDK, then there is a user visible regression on mainline after this patch. Lets enable cpufreq in LCDK only if all working peripherals keep working afterwards.
Quoted 4 lines
The OHCI driver doesn't register any cpufreq transition notifier callbacks. I can't really find anything in the datasheet, but I'm wondering if we shouldn't do something similar to what the driver for davinci i2c controller does. I'll try a couple things tomorrow.
Quoted 6 lines
Even if OHCI issue is fixed, with a fixed regulator like on LCDK, I am not sure the benefits of just frequency scaling will be justifiable enough.
Fixing the OHCI issue may help in other boards like da850-evm use it though. So that will be a good thing.
I've been trying different things, like suspending the device before the transition, resetting the controller or playing with the clock during transitions but it always results in the same kind of error:
ohci-da8xx 1e25000.usb: frame counter not updating; disabled ohci-da8xx 1e25000.usb: HC died; cleaning up
usb 1-1: USB disconnect, device number 2Quoted 5 lines
If you have any idea - let me know, otherwise I'll give up.
If we agree on the direction of these patches, then I can go with a single enabled OPP for lcdk (456 MHz) and all OPPs up to 375 MHz enabled for da850-evm.
Quoted 7 lines
One last questions, and this probably directed at Sekhar, but what happens if you modify the OPP for the boards with fixed regulators to enable all the frequencies but with the only available voltage. Is there harm is running the processor at a higher voltage than necessary? I did some quick experiments on a different ARM board and I saw some changes in power consumption. I would think some power savings might be better than none, but I don't know if it causes> damage.
The OMAP-L138 datasheet mentions two versions of devices in core voltage specification:
Variable (1.2V-1.0V) for 375 MHz version
Variable (1.3V-1.0V) for 456 MHz version
If you have 375 MHz version of device, I do not think you should run at 1.3V. I don't know what "damage" it will cause or how long it takes for any of it to be visible.
Keeping that aside, I doubt there will be a lot of power-saving benefit without voltage scaling. Even if you see a slightly lower power number when you reduce frequency, there is also work to be done for the scaling operation itself.
Thanks,
Sekhar
Re: [PATCH v3 1/3] ARM: dts: da850: add cpu node and operating points to DT
In reply to Bartosz GolaszewskiQuoted 3 lines · Bartosz Golaszewski
If we agree on the direction of these patches, then I can go with a single enabled OPP for lcdk (456 MHz) and all OPPs up to 375 MHz enabled for da850-evm.
Sounds good to me.
Thanks,
Sekhar