OMAP3: convert opp-v1 to opp-v2 and read speed binned / 720MHz grade bits
Subsystems (2)
cover OMAP3: convert opp-v1 to opp-v2 and read speed binned / 720MHz grade bits
This patch set converts the opp tables to opp-v2 format and extends the ti-cpufreq to support omap3.
It adds 720 MHz (omap34xx) and 1 GHz (omap36xx) OPPs but tells the ti-cpufreq driver to disable them if the speed binned / 720MHz grade eFuse bits indicate that the chip is not rated for that speed.
It has been tested (for chip variant detection, not reliability of high speed OPPs) on:
* BeagleBoard C2 (omap3430 600MHz)
* BeagleBoard XM B (dm3730 800MHz)
* GTA04A4 (dm3730 800MHz)
* GTA04A5 (dm3730 1GHz)
H. Nikolaus Schaller (5):
cpufreq: ti-cpufreq: add support for omap34xx and omap36xx
ARM: dts: add support for opp-v2 for omap34xx and omap36xx
ARM: dts: omap3-evm-37xx: fix compatible from omap3630 to omap36xx
ARM: dts: omap3-n950-n9: remove opp-v1 table
ARM: dts: omap3-beagle: make explicitly compatible to ti,omap34xx
arch/arm/boot/dts/omap3-beagle.dts | 2 +- arch/arm/boot/dts/omap3-evm-37xx.dts | 2 +- arch/arm/boot/dts/omap3-n950-n9.dtsi | 7 --- arch/arm/boot/dts/omap34xx.dtsi | 59 ++++++++++++++++--- arch/arm/boot/dts/omap36xx.dtsi | 47 ++++++++++++--- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- drivers/cpufreq/ti-cpufreq.c | 86 +++++++++++++++++++++++++++- 7 files changed, 176 insertions(+), 29 deletions(-)
Signature · 1 line
2.19.1
RFC 1/5 cpufreq: ti-cpufreq: add support for omap34xx and omap36xx
This adds code and tables to read the silicon revision and eFuse (speed binned / 720 MHz grade) bits for selecting opp-v2 table entries.
Since these bits are not always part of the syscon register range (like for am3, am4, dra7), we add code to directly read the register values using ioremap() if syscon access fails.
--- drivers/cpufreq/ti-cpufreq.c | 86 +++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-)
drivers/cpufreq/ti-cpufreq.c +84 -2
@@ -31,6 +31,11 @@#define DRA7_EFUSE_OD_MPU_OPP BIT(1)#define DRA7_EFUSE_HIGH_MPU_OPP BIT(2) +#define OMAP3_CONTROL_DEVICE_STATUS 0x4800244C +#define OMAP3_CONTROL_IDCODE 0x4830A204 +#define OMAP34xx_ProdID_SKUID 0x4830A20C +#define OMAP3_SYSCON_BASE (0x48000000 + 0x2000 + 0x270) +#define VERSION_COUNT 2struct ti_cpufreq_data ;
@@ -84,6 +89,13 @@ static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data,return calculated_efuse; } +static unsigned long omap3_efuse_xlate (struct ti_cpufreq_data *opp_data, +unsigned long efuse) +{ +/* OPP enable bit ("Speed Binned") */ +return BIT (efuse); +} +static struct ti_cpufreq_soc_data am3x_soc_data = { .efuse_xlate = amx3_efuse_xlate, .efuse_fallback =AM33XX_800M_ARM_MPU_MAX_FREQ ,
@@ -111,6 +123,56 @@ static struct ti_cpufreq_soc_data dra7_soc_data = { .multi_regulator = true, }; +/* +* OMAP35x TRM (SPRUF98K): +* CONTROL_IDCODE (0x4830 A204) describes Silicon revisions. +* Control OMAP Status Register 15:0 (Address 0x4800 244C) +* to separate between omap3503, omap3515, omap3525, omap3530 +* and feature presence. +* There are encodings for versions limited to 400/266MHz +* but we ignore. +* Not clear if this also holds for omap34xx. +* some eFuse values e.g. CONTROL_FUSE_OPP1_VDD1 +* are stored in the SYSCON register range +* Register 0x4830A20C [ProdID.SKUID] [0:3] +* 0x0 for normal 600/430MHz device. +* 0x8 for 720/520MHz device. +* Not clear what omap34xx value is. +*/ + +static struct ti_cpufreq_soc_data omap34xx_soc_data = { + .efuse_xlate = omap3_efuse_xlate, + .efuse_offset = OMAP34xx_ProdID_SKUID -OMAP3_SYSCON_BASE , + .efuse_shift =3 , + .efuse_mask =BIT (3 ), + .rev_offset =OMAP3_CONTROL_IDCODE -OMAP3_SYSCON_BASE , + .multi_regulator = false, +}; + +/* +* AM/DM37x TRM (SPRUGN4M) +* CONTROL_IDCODE (0x4830 A204) describes Silicon revisions. +* Control Device Status Register 15:0 (Address 0x4800 244C) +* to separate between am3703, am3715, dm3725, dm3730 +* and feature presence. +* Speed Binned = Bit 9 +* 0 800/600 MHz +* 1 1000/800 MHz +* some eFuse values e.g. CONTROL_FUSE_OPP 1G_VDD1 +* are stored in the SYSCON register range. +* There is no 0x4830A20C [ProdID.SKUID] register (exists but +* seems to always read as 0). +*/ + +static struct ti_cpufreq_soc_data omap36xx_soc_data = { + .efuse_xlate = omap3_efuse_xlate, + .efuse_offset =OMAP3_CONTROL_DEVICE_STATUS -OMAP3_SYSCON_BASE , + .efuse_shift =9 , + .efuse_mask =BIT (9 ), + .rev_offset =OMAP3_CONTROL_IDCODE -OMAP3_SYSCON_BASE , + .multi_regulator = false, +}; +/** * ti_cpufreq_get_efuse() - Parse and return efuse value present on SoC * @opp_data: pointer to ti_cpufreq_data context
@@ -127,7 +189,15 @@ static int ti_cpufreq_get_efuse(struct ti_cpufreq_data *opp_data, ret =regmap_read (opp_data->syscon, opp_data->soc_data->efuse_offset, &efuse); -if (ret) { +if (ret == -EIO ) { +/* not a syscon register! */ +void __iomem *regs =ioremap (OMAP3_SYSCON_BASE + + opp_data->soc_data->efuse_offset,4 ); + + efuse =readl (regs); +iounmap (regs); + } +else if (ret) {dev_err (dev,"Failed to read the efuse value from syscon: %d\n" , ret);
@@ -158,7 +228,15 @@ static int ti_cpufreq_get_rev(struct ti_cpufreq_data *opp_data, ret =regmap_read (opp_data->syscon, opp_data->soc_data->rev_offset, &revision); -if (ret) { +if (ret == -EIO ) { +/* not a syscon register! */ +void __iomem *regs =ioremap (OMAP3_SYSCON_BASE + + opp_data->soc_data->rev_offset,4 ); + + revision =readl (regs); +iounmap (regs); + } +else if (ret) {dev_err (dev,"Failed to read the revision number from syscon: %d\n" , ret);
@@ -190,6 +268,10 @@ static const struct of_device_id ti_cpufreq_of_match[] = { { .compatible = "ti,am33xx", .data = &am3x_soc_data, }, { .compatible = "ti,am43", .data = &am4x_soc_data, }, { .compatible = "ti,dra7", .data = &dra7_soc_data }, + { .compatible = "ti,omap3430", .data = &omap34xx_soc_data, }, + { .compatible = "ti,omap34xx", .data = &omap34xx_soc_data, }, + { .compatible = "ti,omap3630", .data = &omap36xx_soc_data, }, + { .compatible = "ti,omap36xx", .data = &omap36xx_soc_data, }, {}, };
Signature · 1 line
2.19.1
RFC 2/5 ARM: dts: add support for opp-v2 for omap34xx and omap36xx
In reply to H. Nikolaus SchallerIn addition, move omap3 from whitelist to blacklist in cpufreq-dt-platdev in the same patch, because doing either first breaks operation and may make trouble in bisect.
--- arch/arm/boot/dts/omap34xx.dtsi | 59 +++++++++++++++++++++++----- arch/arm/boot/dts/omap36xx.dtsi | 47 ++++++++++++++++++---- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 3 files changed, 90 insertions(+), 18 deletions(-)
arch/arm/boot/dts/omap34xx.dtsi +50 -9
@@ -16,19 +16,60 @@ / { cpus { cpu: cpu@0 { - /* OMAP343x/OMAP35xx variants OPP1-5 */ - operating-points = < - /* kHz uV */ - 125000 975000 - 250000 1075000 - 500000 1200000 - 550000 1270000 - 600000 1350000 - >; + /* OMAP343x/OMAP35xx variants OPP1-6 */ + operating-points-v2 = <&cpu0_opp_table>; + clock-latency = <300000>; /* From legacy driver */ }; }; + /* see Documentation/devicetree/bindings/opp/opp.txt */ + cpu0_opp_table: opp-table { + compatible = "operating-points-v2-ti-cpu"; + syscon = <&scm_conf>; + + opp1-125000000 { + opp-hz = /bits/ 64 <125000000>; + // we currently only select the max voltage from table Table 3-3 of the omap3530 Data sheet (SPRS507F) + // <target min max> could also be single <target> + opp-microvolt = <975000 975000 975000>; + // first value is silicon revision, second one 720MHz Device Identification + opp-supported-hw = <0xffffffff 3>; + }; + + opp2-250000000 { + opp-hz = /bits/ 64 <250000000>; + opp-microvolt = <1075000 1075000 1075000>; + opp-supported-hw = <0xffffffff 3>; + opp-suspend; + }; + + opp3-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <1200000 1200000 1200000>; + opp-supported-hw = <0xffffffff 3>; + }; + + opp4-550000000 { + opp-hz = /bits/ 64 <550000000>; + opp-microvolt = <1270000 1270000 1270000>; + opp-supported-hw = <0xffffffff 3>; + }; + + opp5-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <1350000 1350000 1350000>; + opp-supported-hw = <0xffffffff 3>; + }; + + opp6-720000000 { + opp-hz = /bits/ 64 <720000000>; + opp-microvolt = <1350000 1350000 1350000>; + /* only high-speed grade omap3530 devices */ + opp-supported-hw = <0xffffffff 2>; + }; + }; + ocp@68000000 { omap3_pmx_core2: pinmux@480025d8 { compatible = "ti,omap3-padconf", "pinctrl-single";
arch/arm/boot/dts/omap36xx.dtsi +39 -8
54 lines not on this page · raw message
drivers/cpufreq/cpufreq-dt-platdev.c +1 -1
@@ -86,7 +86,6 @@ static const struct of_device_id whitelist[] __initconst = { { .compatible = "st-ericsson,u9540", }, { .compatible = "ti,omap2", }, - { .compatible = "ti,omap3", }, { .compatible = "ti,omap4", }, { .compatible = "ti,omap5", },
@@ -132,6 +131,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "ti,am33xx", }, { .compatible = "ti,am43", }, { .compatible = "ti,dra7", }, + { .compatible = "ti,omap3", }, { } };
Signature · 1 line
2.19.1
Viresh Kumar
maintainerRe: [RFC 2/5] ARM: dts: add support for opp-v2 for omap34xx and omap36xx
arch/arm/boot/dts/omap34xx.dtsi line 37
Quoted 8 lines · H. Nikolaus Schaller
arch/arm/boot/dts/omap34xx.dtsi +7
-0+ opp1-125000000 { + opp-hz = /bits/ 64 <125000000>; + // we currently only select the max voltage from table Table 3-3 of the omap3530 Data sheet (SPRS507F) + // <target min max> could also be single <target> + opp-microvolt = <975000 975000 975000>; + // first value is silicon revision, second one 720MHz Device Identification + opp-supported-hw = <0xffffffff 3>;
I don't see the driver changes using this field, am I missing something ?
Signature · 1 line
viresh
Viresh Kumar
maintainerRe: [RFC 2/5] ARM: dts: add support for opp-v2 for omap34xx and omap36xx
Quoted 8 lines · Viresh Kumar
Quoted 6 lines · H. Nikolaus Schaller
arch/arm/boot/dts/omap34xx.dtsi +6
-0+ opp1-125000000 { + opp-hz = /bits/ 64 <125000000>; + // we currently only select the max voltage from table Table 3-3 of the omap3530 Data sheet (SPRS507F) + // <target min max> could also be single <target> + opp-microvolt = <975000 975000 975000>; + // first value is silicon revision, second one 720MHz Device Identification
Quoted 4 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ opp-supported-hw = <0xffffffff 3>;I don't see the driver changes using this field, am I missing something ?
The driver already had them it seems. Hmm..
Signature · 1 line
viresh
Re: [RFC 2/5] ARM: dts: add support for opp-v2 for omap34xx and omap36xx
In reply to Viresh KumarQuoted 11 lines
Am 03.09.2019 um 04:38 schrieb Viresh Kumar <[email protected]>:
Quoted 6 lines · H. Nikolaus Schaller
arch/arm/boot/dts/omap34xx.dtsi +6
-0+ opp1-125000000 { + opp-hz = /bits/ 64 <125000000>; + // we currently only select the max voltage from table Table 3-3 of the omap3530 Data sheet (SPRS507F) + // <target min max> could also be single <target> + opp-microvolt = <975000 975000 975000>; + // first value is silicon revision, second one 720MHz Device Identification
Quoted 4 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ opp-supported-hw = <0xffffffff 3>;I don't see the driver changes using this field, am I missing something ?
This is parsed by _opp_is_supported() which is called indirectly by ti_cpufreq_probe().
BR,
Nikolaus
RFC 3/5 ARM: dts: omap3-evm-37xx: fix compatible from omap3630 to omap36xx
In reply to H. Nikolaus SchallerAll other boards use compatible = "omap36xx".
--- arch/arm/boot/dts/omap3-evm-37xx.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-evm-37xx.dts +1 -1
@@ -10,7 +10,7 @@ / { model = "TI OMAP37XX EVM (TMDSEVM3730)"; - compatible = "ti,omap3-evm-37xx", "ti,omap3630", "ti,omap3"; + compatible = "ti,omap3-evm-37xx", "ti,omap36xx", "ti,omap3"; }; &omap3_pmx_core2 {
Signature · 1 line
2.19.1
RFC 4/5 ARM: dts: omap3-n950-n9: remove opp-v1 table
In reply to H. Nikolaus SchallerWith opp-v2 in omap36xx.dtsi and ti-cpufreq driver the 1GHz capability is automatically detected.
--- arch/arm/boot/dts/omap3-n950-n9.dtsi | 7 ------- 1 file changed, 7 deletions(-)
arch/arm/boot/dts/omap3-n950-n9.dtsi +0 -7
@@ -11,13 +11,6 @@ cpus { cpu@0 { cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500 - 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };
Signature · 1 line
2.19.1
Viresh Kumar
maintainerRe: [RFC 4/5] ARM: dts: omap3-n950-n9: remove opp-v1 table
Quoted 15 lines · H. Nikolaus Schaller
With opp-v2 in
omap36xx.dtsiand ti-cpufreq driver the 1GHz capability is automatically detected.Signed-off-by H. Nikolaus Schaller <[email protected]>--- arch/arm/boot/dts/omap3-n950-n9.dtsi | 7 ------- 1 file changed, 7 deletions(-)arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-0@@ -11,13 +11,6 @@ cpus { cpu@0 {
arch/arm/boot/dts/omap3-n950-n9.dtsi line 15
Quoted 10 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-7cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500 - 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };
This should be merged with 2/5 ?
Signature · 1 line
viresh
Re: [RFC 4/5] ARM: dts: omap3-n950-n9: remove opp-v1 table
Quoted 23 lines
Am 03.09.2019 um 04:36 schrieb Viresh Kumar <[email protected]>:
Quoted 19 lines · H. Nikolaus Schaller
With opp-v2 in
omap36xx.dtsiand ti-cpufreq driver the 1GHz capability is automatically detected.Signed-off-by H. Nikolaus Schaller <[email protected]>---
arch/arm/boot/dts/omap3-n950-n9.dtsi| 7 -------1 file changed, 7 deletions(-)arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-3@@ -11,13 +11,6 @@ cpus { cpu@0 { cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500
Quoted 8 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi line 15
Quoted 6 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-4- 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };This should be merged with 2/5 ?
Well, it bloats 2/5.
What I hope (I can't test) is that this opp-v1 table is ignored if an opp-v2 table exists. So that it can be removed by a separate follow-up patch.
BR,
Nikolaus
Viresh Kumar
maintainerRe: [RFC 4/5] ARM: dts: omap3-n950-n9: remove opp-v1 table
Quoted 32 lines · H. Nikolaus Schaller
Quoted 23 lines
Am 03.09.2019 um 04:36 schrieb Viresh Kumar <[email protected]>:
Quoted 19 lines · H. Nikolaus Schaller
With opp-v2 in
omap36xx.dtsiand ti-cpufreq driver the 1GHz capability is automatically detected.Signed-off-by H. Nikolaus Schaller <[email protected]>---
arch/arm/boot/dts/omap3-n950-n9.dtsi| 7 -------1 file changed, 7 deletions(-)arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-3@@ -11,13 +11,6 @@ cpus { cpu@0 { cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500Quoted 8 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi line 15
Quoted 6 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-4- 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };This should be merged with 2/5 ?
Quoted 1 line
Well, it bloats 2/5.
It is logically the right place to do this as that's where we are adding opp-v2.
Quoted 3 lines
What I hope (I can't test) is that this opp-v1 table is ignored if an opp-v2 table exists. So that it can be removed by a separate follow-up patch.
It should work as that's what we are doing in OPP core, but I still feel this better get merged with 2/5.
Signature · 1 line
viresh
Re: [RFC 4/5] ARM: dts: omap3-n950-n9: remove opp-v1 table
Quoted 36 lines
Am 03.09.2019 um 08:14 schrieb Viresh Kumar <[email protected]>:
Quoted 32 lines · H. Nikolaus Schaller
Quoted 31 lines
Am 03.09.2019 um 04:36 schrieb Viresh Kumar <[email protected]>:
Quoted 15 lines · H. Nikolaus Schaller
With opp-v2 in
omap36xx.dtsiand ti-cpufreq driver the 1GHz capability is automatically detected.Signed-off-by H. Nikolaus Schaller <[email protected]>---
arch/arm/boot/dts/omap3-n950-n9.dtsi| 7 -------1 file changed, 7 deletions(-)arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-0@@ -11,13 +11,6 @@ cpus { cpu@0 {arch/arm/boot/dts/omap3-n950-n9.dtsi line 15
Quoted 10 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-7cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500 - 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };This should be merged with 2/5 ?
Quoted 4 lines
Quoted 1 line
Well, it bloats 2/5.
It is logically the right place to do this as that's where we are adding opp-v2.
Well, sometimes the philosophy of patches is to add something new first and remove the old in a second separate patch if the system can live with both. This makes it easier to digest single patches (because they are smaller) and might also better pinpoint an issue by bisect.
Quoted 7 lines
Quoted 4 lines
What I hope (I can't test) is that this opp-v1 table is ignored if an opp-v2 table exists. So that it can be removed by a separate follow-up patch.
It should work as that's what we are doing in OPP core, but I still feel this better get merged with 2/5.
Ok, I see. Noted for RFCv2.
There will also be a big batch of changes for the compatible record (omap3530->omap35xx, add omap34xx where needed) of ca. 10 board definition DTS files. Should this then also become part of the new 2/5?
BR and thanks,
Nikolaus
Viresh Kumar
maintainerRe: [RFC 4/5] ARM: dts: omap3-n950-n9: remove opp-v1 table
Quoted 38 lines · H. Nikolaus Schaller
Quoted 38 lines
Am 03.09.2019 um 08:14 schrieb Viresh Kumar <[email protected]>:
Quoted 33 lines · H. Nikolaus Schaller
Quoted 23 lines
Am 03.09.2019 um 04:36 schrieb Viresh Kumar <[email protected]>:
Quoted 19 lines · H. Nikolaus Schaller
With opp-v2 in
omap36xx.dtsiand ti-cpufreq driver the 1GHz capability is automatically detected.Signed-off-by H. Nikolaus Schaller <[email protected]>---
arch/arm/boot/dts/omap3-n950-n9.dtsi| 7 -------1 file changed, 7 deletions(-)arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-3@@ -11,13 +11,6 @@ cpus { cpu@0 { cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500Quoted 8 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi line 15
Quoted 6 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-4- 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };This should be merged with 2/5 ?
Well, it bloats 2/5.
Quoted 8 lines
Quoted 2 lines
It is logically the right place to do this as that's where we are adding opp-v2.
Well, sometimes the philosophy of patches is to add something new first and remove the old in a second separate patch if the system can live with both. This makes it easier to digest single patches (because they are smaller) and might also better pinpoint an issue by bisect.
Right, but you already removed some of the opp-v1 stuff in patch 2/5. Why leave this one out ?
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
What I hope (I can't test) is that this opp-v1 table is ignored if an opp-v2 table exists. So that it can be removed by a separate follow-up patch.
Quoted 8 lines
Quoted 2 lines
It should work as that's what we are doing in OPP core, but I still feel this better get merged with 2/5.
Ok, I see. Noted for RFCv2.
There will also be a big batch of changes for the compatible record (
omap3530->omap35xx, add omap34xx where needed) of ca. 10 board definition DTS files. Should this then also become part of the new 2/5?
Compatible thing should be separate patch anyway, I was just talking about replacing opp-v1 with v2.
Signature · 1 line
viresh
Re: [RFC 4/5] ARM: dts: omap3-n950-n9: remove opp-v1 table
Quoted 62 lines
Am 03.09.2019 um 08:28 schrieb Viresh Kumar <[email protected]>:
Quoted 38 lines · H. Nikolaus Schaller
Quoted 38 lines
Am 03.09.2019 um 08:14 schrieb Viresh Kumar <[email protected]>:
Quoted 33 lines · H. Nikolaus Schaller
Quoted 23 lines
Am 03.09.2019 um 04:36 schrieb Viresh Kumar <[email protected]>:
Quoted 19 lines · H. Nikolaus Schaller
With opp-v2 in
omap36xx.dtsiand ti-cpufreq driver the 1GHz capability is automatically detected.Signed-off-by H. Nikolaus Schaller <[email protected]>---
arch/arm/boot/dts/omap3-n950-n9.dtsi| 7 -------1 file changed, 7 deletions(-)arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-3@@ -11,13 +11,6 @@ cpus { cpu@0 { cpu0-supply = <&vcc>; - operating-points = < - /* kHz uV */ - 300000 1012500Quoted 8 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi line 15
Quoted 6 lines
arch/arm/boot/dts/omap3-n950-n9.dtsi +0
-4- 600000 1200000 - 800000 1325000 - 1000000 1375000 - >; }; };This should be merged with 2/5 ?
Well, it bloats 2/5.
Quoted 8 lines
Quoted 2 lines
It is logically the right place to do this as that's where we are adding opp-v2.
Well, sometimes the philosophy of patches is to add something new first and remove the old in a second separate patch if the system can live with both. This makes it easier to digest single patches (because they are smaller) and might also better pinpoint an issue by bisect.
Right, but you already removed some of the opp-v1 stuff in patch 2/5. Why leave this one out ?
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
What I hope (I can't test) is that this opp-v1 table is ignored if an opp-v2 table exists. So that it can be removed by a separate follow-up patch.
It should work as that's what we are doing in OPP core, but I still feel this better get merged with 2/5.
Quoted 8 lines
Quoted 5 lines
Ok, I see. Noted for RFCv2.
There will also be a big batch of changes for the compatible record (
omap3530->omap35xx, add omap34xx where needed) of ca. 10 board definition DTS files. Should this then also become part of the new 2/5?Compatible thing should be separate patch anyway, I was just talking about replacing opp-v1 with v2.
Ok, understood.
BR and thanks,
Nikolaus
RFC 5/5 ARM: dts: omap3-beagle: make explicitly compatible to ti,omap34xx
In reply to H. Nikolaus SchallerMatching the ti-cpufreq driver needs to specify explicitly if a board uses an omap34xx or omap36xx chip.
--- arch/arm/boot/dts/omap3-beagle.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-beagle.dts +1 -1
@@ -8,7 +8,7 @@ / { model = "TI OMAP3 BeagleBoard"; - compatible = "ti,omap3-beagle", "ti,omap3"; + compatible = "ti,omap3-beagle", "ti,omap34xx", "ti,omap3"; cpus { cpu@0 {
Signature · 1 line
2.19.1
Re: [RFC 5/5] ARM: dts: omap3-beagle: make explicitly compatible to ti,omap34xx
Quoted 13 lines · H. Nikolaus Schaller
Matching the ti-cpufreq driver needs to specify explicitly if a board uses an omap34xx or omap36xx chip.
Signed-off-by H. Nikolaus Schaller <[email protected]>--- arch/arm/boot/dts/omap3-beagle.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/omap3-beagle.dts +0
-0
arch/arm/boot/dts/omap3-beagle.dts line 14
Quoted 8 lines
arch/arm/boot/dts/omap3-beagle.dts +1
-1@@ -8,7 +8,7 @@ / { model = "TI OMAP3 BeagleBoard"; - compatible = "ti,omap3-beagle", "ti,omap3"; + compatible = "ti,omap3-beagle", "ti,omap34xx", "ti,omap3"; cpus { cpu@0 {
For a clean-up patch, we should just use the following compatibles in general for omap3:
ti,omap3 omap3
ti,omap34 omap34xx and omap35xx
ti,omap36 omap36xx and dm37xx
ti,am35 am35xx
So we should just leave out the "xx" part. But we still need parse also the legacy binding with "xx" in drivers.
Regards,
Tony
Re: [RFC 5/5] ARM: dts: omap3-beagle: make explicitly compatible to ti,omap34xx
Hi Tony,
Quoted 28 lines
Am 03.09.2019 um 15:40 schrieb Tony Lindgren <[email protected]>:
Quoted 13 lines · H. Nikolaus Schaller
Matching the ti-cpufreq driver needs to specify explicitly if a board uses an omap34xx or omap36xx chip.
Signed-off-by H. Nikolaus Schaller <[email protected]>---
arch/arm/boot/dts/omap3-beagle.dts| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/omap3-beagle.dts +0
-0arch/arm/boot/dts/omap3-beagle.dts line 14
Quoted 8 lines
arch/arm/boot/dts/omap3-beagle.dts +1
-1@@ -8,7 +8,7 @@ / { model = "TI OMAP3 BeagleBoard"; - compatible = "ti,omap3-beagle", "ti,omap3"; + compatible = "ti,omap3-beagle", "ti,omap34xx", "ti,omap3"; cpus { cpu@0 {For a clean-up patch, we should just use the following compatibles in general for omap3:
Quoted 7 lines
ti,omap3 omap3
ti,omap34 omap34xx and omap35xx
ti,omap36 omap36xx and dm37xx
ti,am35 am35xxSo we should just leave out the "xx" part. But we still need parse also the legacy binding with "xx" in drivers.
Yes, getting rid of the xx in the device trees would be nice.
But I have looked through the kernel tree and that makes more problems than it solves...
There is code that explicitly checks for "ti,omap36xx" in drivers/clk/ti/dpll.c
Maybe that should be replaced by a check for a "ti,dpll5" property which is only defined in omap36xx.dtsi to make the code depend on a feature rather than SoC family string. Although such a change may break other things or we have to keep even more legacy code around.
And there is a binding document omap.txt that does not describe it the way you propose. IMHO that should be changed first.
Next is that omap.txt explicitly says that ti,omap3 defauls to OMAP3430. And OMAP3430 should be specified as compatible = "ti,omap3430", "ti,omap3" while OMAP3630 should have compatible = "ti,omap36xx", "ti,omap3". AM3517 is compatible = "ti,am3517", "ti,omap3" which seems to ignore the AM3505 (maybe there was never a board using it).
So this clean up is much more than what we need for moving from opp-v1 to opp-v2 and it should therefore be addressed separately.
Therefore I'd prefer if we can keep all these problems isolated into a separate set of patches. And because of this I have prepared an RFC-V2 which only adds the "ti,omap3430" to those boards which do not yet have it (in accordance to existing omap.txt).
AM3517 does not seem to have any opp table and therefore I also exclude it at the moment.
BR and thanks,
Nikolaus