OMAP: Add DT bindings to specify when devices should not be idled or reset
Subsystems (6)
v2 cover OMAP: Add DT bindings to specify when devices should not be idled or reset
Changes in v2:
* Patches are split in such a way that DT and hwmod changes are kept in seperate patches so they can be pulled in by Benoit and Paul seperately.
* Binding names are slightly updated to address the concern from Tony and Benoit [1]
* Added a patch [5/5] to prevent GPIO reset on AM335x EVM-SK board, which was also the original motivation of this series since the board fails to boot from mainline despite support for AM335x and a am335x-evmsk.dts file existing in mainline for quite a while.
We have devices like co-processors, SoC internal busses, memory controllers etc which should not be idled or reset. In some cases erratas around IP blocks prevent them from either being idled or reset. Have a way to pass this information from Device tree, and get rid of similar information that exists as part of the omap_hwmod data files for various DT only OMAP SoCs.
Boot tested on OMAP4 panda es, AM335x EVM and AM335x EVM-SK
[1] http://www.mail-archive.com/linux-omap at vger.kernel.org/msg94349.html
Rajendra Nayak (5):
ARM: OMAP2+: hwmod: cleanup HWMOD_INIT_NO_RESET usage
ARM: dts: omap: Add new bindings for OMAP
ARM: OMAP2+: hwmod: Extract no-idle and no-reset info from DT
ARM: OMAP2+: hwmod: Cleanup usage of HWMOD_INIT_NO_RESET and
HWMOD_INIT_NO_IDLE
ARM: dts: AM335x-evmsk: Do not reset gpio0
.../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++ arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ arch/arm/mach-omap2/omap_hwmod.c | 23 ++++++++++++++------ arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 22 +++++++++---------- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 ++--- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 4 +--- 9 files changed, 43 insertions(+), 26 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/5 ARM: OMAP2+: hwmod: cleanup HWMOD_INIT_NO_RESET usage
For modules/IPs/hwmods which do not have -1- sys->class->reset()
and
-2- hardreset lines
and
-3- No way to do an ocp reset (no sysc control) the flag 'HWMOD_INIT_NO_RESET' is not much useful.
Cleanup all such instances across various hwmod data files.
--- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 18 +++++++++--------- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 +++--- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +9 -9
@@ -52,7 +52,7 @@ static struct omap_hwmod am33xx_emif_hwmod = { .name = "emif", .class = &am33xx_emif_hwmod_class, .clkdm_name = "l3_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_ddr_m2_div2_ck", .prcm = { .omap4 = {
@@ -74,7 +74,7 @@ static struct omap_hwmod am33xx_l3_main_hwmod = { .name = "l3_main", .class = &am33xx_l3_hwmod_class, .clkdm_name = "l3_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "l3_gclk", .prcm = { .omap4 = {
@@ -96,7 +96,7 @@ static struct omap_hwmod am33xx_l3_instr_hwmod = { .name = "l3_instr", .class = &am33xx_l3_hwmod_class, .clkdm_name = "l3_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "l3_gclk", .prcm = { .omap4 = {
@@ -119,7 +119,7 @@ static struct omap_hwmod am33xx_l4_ls_hwmod = { .name = "l4_ls", .class = &am33xx_l4_hwmod_class, .clkdm_name = "l4ls_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "l4ls_gclk", .prcm = { .omap4 = {
@@ -134,7 +134,7 @@ static struct omap_hwmod am33xx_l4_hs_hwmod = { .name = "l4_hs", .class = &am33xx_l4_hwmod_class, .clkdm_name = "l4hs_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "l4hs_gclk", .prcm = { .omap4 = {
@@ -150,7 +150,7 @@ static struct omap_hwmod am33xx_l4_wkup_hwmod = { .name = "l4_wkup", .class = &am33xx_l4_hwmod_class, .clkdm_name = "l4_wkup_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .prcm = { .omap4 = { .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
@@ -170,7 +170,7 @@ static struct omap_hwmod am33xx_mpu_hwmod = { .name = "mpu", .class = &am33xx_mpu_hwmod_class, .clkdm_name = "mpu_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_mpu_m2_ck", .prcm = { .omap4 = {
@@ -450,7 +450,7 @@ static struct omap_hwmod am33xx_ocmcram_hwmod = { .name = "ocmcram", .class = &am33xx_ocmcram_hwmod_class, .clkdm_name = "l3_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "l3_gclk", .prcm = { .omap4 = {
@@ -532,7 +532,7 @@ static struct omap_hwmod am33xx_control_hwmod = { .name = "control", .class = &am33xx_control_hwmod_class, .clkdm_name = "l4_wkup_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_core_m4_div2_ck", .prcm = { .omap4 = {
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +3 -3
@@ -914,7 +914,7 @@ static struct omap_hwmod omap44xx_emif1_hwmod = { .name = "emif1", .class = &omap44xx_emif_hwmod_class, .clkdm_name = "l3_emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "ddrphy_ck", .prcm = { .omap4 = {
@@ -930,7 +930,7 @@ static struct omap_hwmod omap44xx_emif2_hwmod = { .name = "emif2", .class = &omap44xx_emif_hwmod_class, .clkdm_name = "l3_emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "ddrphy_ck", .prcm = { .omap4 = {
@@ -2193,7 +2193,7 @@ static struct omap_hwmod omap44xx_mpu_hwmod = { .name = "mpu", .class = &omap44xx_mpu_hwmod_class, .clkdm_name = "mpuss_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_mpu_m2_ck", .prcm = { .omap4 = {
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +3 -3
@@ -352,7 +352,7 @@ static struct omap_hwmod omap54xx_emif1_hwmod = { .name = "emif1", .class = &omap54xx_emif_hwmod_class, .clkdm_name = "emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_core_h11x2_ck", .prcm = { .omap4 = {
@@ -368,7 +368,7 @@ static struct omap_hwmod omap54xx_emif2_hwmod = { .name = "emif2", .class = &omap54xx_emif_hwmod_class, .clkdm_name = "emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_core_h11x2_ck", .prcm = { .omap4 = {
@@ -1135,7 +1135,7 @@ static struct omap_hwmod omap54xx_mpu_hwmod = { .name = "mpu", .class = &omap54xx_mpu_hwmod_class, .clkdm_name = "mpu_clkdm", - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_mpu_m2_ck", .prcm = { .omap4 = {
Signature · 1 line
1.7.9.5
Paul Walmsley
maintainerPATCH v2 1/5 ARM: OMAP2+: hwmod: cleanup HWMOD_INIT_NO_RESET usage
Quoted 11 lines · Rajendra Nayak
For modules/IPs/hwmods which do not have -1-
sys->class->reset()
and
-2- hardreset lines
and
-3- No way to do an ocp reset (no sysc control) the flag 'HWMOD_INIT_NO_RESET' is not much useful.Cleanup all such instances across various hwmod data files.
Signed-off-by Rajendra Nayak <[email protected]>
Thanks, queued.
- Paul
PATCH v2 2/5 ARM: dts: omap: Add new bindings for OMAP
In reply to Rajendra NayakOn OMAP we have co-processor IPs, memory controllers, GPIOs which control regulators and power switches to PMIC, and SoC internal Bus IPs, some or most of which should either not be reset or idled or both at init. (In some cases there are erratas which prevent an IP from being reset)
Have a way to pass this information from DT.
Update the am33xx/omap4 and omap5 dtsi files with the new bindings for modules which either should not be idled. reset or both. A later patch would cleanup the same information that exists today as part of the hwmod data files.
--- .../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/omap/omap.txt +2 -1
@@ -21,7 +21,8 @@ Required properties: Optional properties: - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module during suspend. - +- ti,no-reset-on-init: When present, the module should not be reset at init +- ti,no-idle-on-init: When present, the module should not be idled at init Example:
arch/arm/boot/dts/am33xx.dtsi +2 -0
@@ -607,6 +607,7 @@ reg = <0x44d00000 0x4000 /* M3 UMEM */ 0x44d80000 0x2000>; /* M3 DMEM */ ti,hwmods = "wkup_m3"; + ti,no-reset-on-init; }; elm: elm at 48080000 {
@@ -637,6 +638,7 @@ gpmc: gpmc at 50000000 { compatible = "ti,am3352-gpmc"; ti,hwmods = "gpmc"; + ti,no-idle-on-init; reg = <0x50000000 0x2000>; interrupts = <100>; gpmc,num-cs = <7>;
arch/arm/boot/dts/omap4.dtsi +3 -0
@@ -214,6 +214,7 @@ gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; + ti,no-idle-on-init; }; uart1: serial at 4806a000 {
@@ -492,6 +493,7 @@ reg = <0x4c000000 0x100>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;
@@ -503,6 +505,7 @@ reg = <0x4d000000 0x100>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;
arch/arm/boot/dts/omap5.dtsi +2 -0
@@ -607,6 +607,7 @@ emif1: emif at 0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
@@ -618,6 +619,7 @@ emif2: emif at 0x4d000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
1.7.9.5
PATCH v2 2/5 ARM: dts: omap: Add new bindings for OMAP
Hi Rajendra,
Quoted 7 lines · Rajendra Nayak
On OMAP we have co-processor IPs, memory controllers, GPIOs which control regulators and power switches to PMIC, and SoC internal Bus IPs, some or most of which should either not be reset or idled or both at init. (In some cases there are erratas which prevent an IP from being reset)
Have a way to pass this information from DT.
Did you get some acked-by from the DT maintainers? Every new bindings must be carefully reviewed now.
Regards,
Benoit
Quoted 98 lines
Update the am33xx/omap4 and omap5 dtsi files with the new bindings for modules which either should not be idled. reset or both. A later patch would cleanup the same information that exists today as part of the hwmod data files.
Signed-off-by Rajendra Nayak <[email protected]>--- .../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/omap/omap.txt +2
-1@@ -21,7 +21,8 @@ Required properties: Optional properties: - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module during suspend. - +- ti,no-reset-on-init: When present, the module should not be reset at init +- ti,no-idle-on-init: When present, the module should not be idled at init Example:arch/arm/boot/dts/am33xx.dtsi +2
-0@@ -607,6 +607,7 @@ reg = <0x44d00000 0x4000 /* M3 UMEM */ 0x44d80000 0x2000>; /* M3 DMEM */ ti,hwmods = "wkup_m3"; + ti,no-reset-on-init; }; elm: elm at 48080000 {@@ -637,6 +638,7 @@ gpmc: gpmc at 50000000 { compatible = "ti,am3352-gpmc"; ti,hwmods = "gpmc"; + ti,no-idle-on-init; reg = <0x50000000 0x2000>; interrupts = <100>; gpmc,num-cs = <7>;arch/arm/boot/dts/omap4.dtsi +3
-0@@ -214,6 +214,7 @@ gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; + ti,no-idle-on-init; }; uart1: serial at 4806a000 {@@ -492,6 +493,7 @@ reg = <0x4c000000 0x100>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;@@ -503,6 +505,7 @@ reg = <0x4d000000 0x100>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;arch/arm/boot/dts/omap5.dtsi +2
-0@@ -607,6 +607,7 @@ emif1: emif at 0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;@@ -618,6 +619,7 @@ emif2: emif at 0x4d000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
PATCH v2 2/5 ARM: dts: omap: Add new bindings for OMAP
Quoted 11 lines · Benoit Cousson
Hi Rajendra,
Quoted 7 lines · Rajendra Nayak
On OMAP we have co-processor IPs, memory controllers, GPIOs which control regulators and power switches to PMIC, and SoC internal Bus IPs, some or most of which should either not be reset or idled or both at init. (In some cases there are erratas which prevent an IP from being reset)
Have a way to pass this information from DT.
Quoted 2 lines
Did you get some acked-by from the DT maintainers? Every new bindings must be carefully reviewed now.
Nope, I haven't. The patches are on the list for a couple of months now.
Quoted 103 lines
Regards,
BenoitQuoted 98 lines
Update the am33xx/omap4 and omap5 dtsi files with the new bindings for modules which either should not be idled. reset or both. A later patch would cleanup the same information that exists today as part of the hwmod data files.
Signed-off-by Rajendra Nayak <[email protected]>--- .../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/omap/omap.txt +2
-1@@ -21,7 +21,8 @@ Required properties: Optional properties: - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module during suspend. - +- ti,no-reset-on-init: When present, the module should not be reset at init +- ti,no-idle-on-init: When present, the module should not be idled at init Example:arch/arm/boot/dts/am33xx.dtsi +2
-0@@ -607,6 +607,7 @@ reg = <0x44d00000 0x4000 /* M3 UMEM */ 0x44d80000 0x2000>; /* M3 DMEM */ ti,hwmods = "wkup_m3"; + ti,no-reset-on-init; }; elm: elm at 48080000 {@@ -637,6 +638,7 @@ gpmc: gpmc at 50000000 { compatible = "ti,am3352-gpmc"; ti,hwmods = "gpmc"; + ti,no-idle-on-init; reg = <0x50000000 0x2000>; interrupts = <100>; gpmc,num-cs = <7>;arch/arm/boot/dts/omap4.dtsi +3
-0@@ -214,6 +214,7 @@ gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; + ti,no-idle-on-init; }; uart1: serial at 4806a000 {@@ -492,6 +493,7 @@ reg = <0x4c000000 0x100>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;@@ -503,6 +505,7 @@ reg = <0x4d000000 0x100>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;arch/arm/boot/dts/omap5.dtsi +2
-0@@ -607,6 +607,7 @@ emif1: emif at 0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;@@ -618,6 +619,7 @@ emif2: emif at 0x4d000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
PATCH v2 2/5 ARM: dts: omap: Add new bindings for OMAP
+ A couple of DT maintainers
Quoted 12 lines · Rajendra Nayak
Quoted 11 lines · Benoit Cousson
Hi Rajendra,
Quoted 7 lines · Rajendra Nayak
On OMAP we have co-processor IPs, memory controllers, GPIOs which control regulators and power switches to PMIC, and SoC internal Bus IPs, some or most of which should either not be reset or idled or both at init. (In some cases there are erratas which prevent an IP from being reset)
Have a way to pass this information from DT.
Quoted 5 lines
Quoted 2 lines
Did you get some acked-by from the DT maintainers? Every new bindings must be carefully reviewed now.
Nope, I haven't. The patches are on the list for a couple of months now.
Let's see if Mark and Rob are OK with that.
Thanks,
Benoit
Quoted 105 lines
Quoted 104 lines
Regards,
BenoitQuoted 98 lines
Update the am33xx/omap4 and omap5 dtsi files with the new bindings for modules which either should not be idled. reset or both. A later patch would cleanup the same information that exists today as part of the hwmod data files.
Signed-off-by Rajendra Nayak <[email protected]>--- .../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/omap/omap.txt +2
-1@@ -21,7 +21,8 @@ Required properties: Optional properties: - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module during suspend. - +- ti,no-reset-on-init: When present, the module should not be reset at init +- ti,no-idle-on-init: When present, the module should not be idled at init Example:arch/arm/boot/dts/am33xx.dtsi +2
-0@@ -607,6 +607,7 @@ reg = <0x44d00000 0x4000 /* M3 UMEM */ 0x44d80000 0x2000>; /* M3 DMEM */ ti,hwmods = "wkup_m3"; + ti,no-reset-on-init; }; elm: elm at 48080000 {@@ -637,6 +638,7 @@ gpmc: gpmc at 50000000 { compatible = "ti,am3352-gpmc"; ti,hwmods = "gpmc"; + ti,no-idle-on-init; reg = <0x50000000 0x2000>; interrupts = <100>; gpmc,num-cs = <7>;arch/arm/boot/dts/omap4.dtsi +3
-0@@ -214,6 +214,7 @@ gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; + ti,no-idle-on-init; }; uart1: serial at 4806a000 {@@ -492,6 +493,7 @@ reg = <0x4c000000 0x100>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;@@ -503,6 +505,7 @@ reg = <0x4d000000 0x100>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;arch/arm/boot/dts/omap5.dtsi +2
-0@@ -607,6 +607,7 @@ emif1: emif at 0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;@@ -618,6 +619,7 @@ emif2: emif at 0x4d000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
PATCH v2 2/5 ARM: dts: omap: Add new bindings for OMAP
Hi Rajendra,
Quoted 15 lines · Benoit Cousson
+ A couple of DT maintainers
Quoted 12 lines · Rajendra Nayak
Quoted 11 lines · Benoit Cousson
Hi Rajendra,
Quoted 7 lines · Rajendra Nayak
On OMAP we have co-processor IPs, memory controllers, GPIOs which control regulators and power switches to PMIC, and SoC internal Bus IPs, some or most of which should either not be reset or idled or both at init. (In some cases there are erratas which prevent an IP from being reset)
Have a way to pass this information from DT.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Did you get some acked-by from the DT maintainers? Every new bindings must be carefully reviewed now.
Nope, I haven't. The patches are on the list for a couple of months now.
Let's see if Mark and Rob are OK with that.
OK, I've just applied it after a small change in the subject:
ARM: dts: omap: Add reset/idle on init bindings for OMAP
Is that OK for you?
Thanks,
Benoit
Quoted 117 lines
Thanks,
BenoitQuoted 112 lines
Quoted 111 lines
Regards,
BenoitQuoted 105 lines
Update the am33xx/omap4 and omap5 dtsi files with the new bindings for modules which either should not be idled. reset or both. A later patch would cleanup the same information that exists today as part of the hwmod data files.
Signed-off-by Rajendra Nayak <[email protected]>--- .../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/omap/omap.txt +0
-0@@ -21,7 +21,8 @@ Required properties: Optional properties: - ti,no_idle_on_suspend: When present, it prevents the PM to idlethe module
during suspend.
-
+- ti,no-reset-on-init: When present, the module should not be reset at init
+- ti,no-idle-on-init: When present, the module should not be idled at initExample:
arch/arm/boot/dts/am33xx.dtsi +2
-0@@ -607,6 +607,7 @@ reg = <0x44d00000 0x4000 /* M3 UMEM */ 0x44d80000 0x2000>; /* M3 DMEM */ ti,hwmods = "wkup_m3"; + ti,no-reset-on-init; }; elm: elm at 48080000 {@@ -637,6 +638,7 @@ gpmc: gpmc at 50000000 { compatible = "ti,am3352-gpmc"; ti,hwmods = "gpmc"; + ti,no-idle-on-init; reg = <0x50000000 0x2000>; interrupts = <100>; gpmc,num-cs = <7>;arch/arm/boot/dts/omap4.dtsi +3
-0@@ -214,6 +214,7 @@ gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; + ti,no-idle-on-init; }; uart1: serial at 4806a000 {@@ -492,6 +493,7 @@ reg = <0x4c000000 0x100>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;@@ -503,6 +505,7 @@ reg = <0x4d000000 0x100>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;arch/arm/boot/dts/omap5.dtsi +2
-0@@ -607,6 +607,7 @@ emif1: emif at 0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;@@ -618,6 +619,7 @@ emif2: emif at 0x4d000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
Signature · 4 lines
Beno?t Cousson BayLibre Embedded Linux Technology Lab www.baylibre.com
PATCH v2 2/5 ARM: dts: omap: Add new bindings for OMAP
Quoted 24 lines · Benoit Cousson
Hi Rajendra,
Quoted 21 lines · Benoit Cousson
+ A couple of DT maintainers
Quoted 17 lines · Rajendra Nayak
Quoted 11 lines · Benoit Cousson
Hi Rajendra,
Quoted 7 lines · Rajendra Nayak
On OMAP we have co-processor IPs, memory controllers, GPIOs which control regulators and power switches to PMIC, and SoC internal Bus IPs, some or most of which should either not be reset or idled or both at init. (In some cases there are erratas which prevent an IP from being reset)
Have a way to pass this information from DT.Quoted 2 lines
Did you get some acked-by from the DT maintainers? Every new bindings must be carefully reviewed now.
Nope, I haven't. The patches are on the list for a couple of months now.
Quoted 7 lines
Quoted 1 line
Let's see if Mark and Rob are OK with that.
OK, I've just applied it after a small change in the subject:
ARM: dts: omap: Add reset/idle on init bindings for OMAP
Is that OK for you?
Yes, sounds good. Thanks Benoit.
Quoted 123 lines
Thanks,
BenoitQuoted 117 lines
Thanks,
BenoitQuoted 112 lines
Quoted 111 lines
Regards,
BenoitQuoted 105 lines
Update the am33xx/omap4 and omap5 dtsi files with the new bindings for modules which either should not be idled. reset or both. A later patch would cleanup the same information that exists today as part of the hwmod data files.
Signed-off-by Rajendra Nayak <[email protected]>--- .../devicetree/bindings/arm/omap/omap.txt | 3 ++- arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/omap4.dtsi | 3 +++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/omap/omap.txt +0
-0@@ -21,7 +21,8 @@ Required properties: Optional properties: - ti,no_idle_on_suspend: When present, it prevents the PM to idlethe module
during suspend.
-
+- ti,no-reset-on-init: When present, the module should not be reset at init
+- ti,no-idle-on-init: When present, the module should not be idled at initExample:
arch/arm/boot/dts/am33xx.dtsi +2
-0@@ -607,6 +607,7 @@ reg = <0x44d00000 0x4000 /* M3 UMEM */ 0x44d80000 0x2000>; /* M3 DMEM */ ti,hwmods = "wkup_m3"; + ti,no-reset-on-init; }; elm: elm at 48080000 {@@ -637,6 +638,7 @@ gpmc: gpmc at 50000000 { compatible = "ti,am3352-gpmc"; ti,hwmods = "gpmc"; + ti,no-idle-on-init; reg = <0x50000000 0x2000>; interrupts = <100>; gpmc,num-cs = <7>;arch/arm/boot/dts/omap4.dtsi +3
-0@@ -214,6 +214,7 @@ gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; + ti,no-idle-on-init; }; uart1: serial at 4806a000 {@@ -492,6 +493,7 @@ reg = <0x4c000000 0x100>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;@@ -503,6 +505,7 @@ reg = <0x4d000000 0x100>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <1>; hw-caps-read-idle-ctrl; hw-caps-ll-interface;arch/arm/boot/dts/omap5.dtsi +2
-0@@ -607,6 +607,7 @@ emif1: emif at 0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;@@ -618,6 +619,7 @@ emif2: emif at 0x4d000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif2"; + ti,no-idle-on-init; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
PATCH v2 3/5 ARM: OMAP2+: hwmod: Extract no-idle and no-reset info from DT
In reply to Rajendra NayakNow that we have DT bindings to specify which devices should not be reset and idled during init, make hwmod extract the information (and store them in internal flags) from Device tree.
--- arch/arm/mach-omap2/omap_hwmod.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +16 -7
@@ -2363,11 +2363,11 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np,* are part of the device's address space can be ioremapped properly. * No return value. */ -static void __init _init_mpu_rt_base (struct omap_hwmod *oh,void *data) +static void __init _init_mpu_rt_base (struct omap_hwmod *oh,void *data, +struct device_node *np) {struct omap_hwmod_addr_space *mem;void __iomem *va_start =NULL ; -struct device_node *np;if (!oh)return ;
@@ -2383,12 +2383,10 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) oh->name);/* Extract the IO space from device tree blob */ -if (!of_have_populated_dt ()) +if (!np)return ; - np =of_dev_hwmod_lookup (of_find_node_by_name (NULL ,"ocp" ), oh); -if (np) - va_start =of_iomap (np, oh->mpu_rt_idx); + va_start =of_iomap (np, oh->mpu_rt_idx); }else { va_start =ioremap (mem->pa_start, mem->pa_end - mem->pa_start); }
@@ -2420,12 +2418,16 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)static int __init _init (struct omap_hwmod *oh,void *data) {int r; +struct device_node *np =NULL ;if (oh->_state != _HWMOD_STATE_REGISTERED)return 0 ; +if (of_have_populated_dt ()) + np =of_dev_hwmod_lookup (of_find_node_by_name (NULL ,"ocp" ), oh); +if (oh->class->sysc) -_init_mpu_rt_base (oh,NULL ); +_init_mpu_rt_base (oh,NULL , np); r =_init_clocks (oh,NULL );if (r <0 ) {
@@ -2433,6 +2435,13 @@ static int __init _init(struct omap_hwmod *oh, void *data)return -EINVAL ; } +if (np) { +if (of_find_property (np,"ti,no-reset-on-init" ,NULL )) + oh->flags |=HWMOD_INIT_NO_RESET ; +if (of_find_property (np,"ti,no-idle-on-init" ,NULL )) + oh->flags |=HWMOD_INIT_NO_IDLE ; + } + oh->_state = _HWMOD_STATE_INITIALIZED;return 0 ;
Signature · 1 line
1.7.9.5
Paul Walmsley
maintainerPATCH v2 3/5 ARM: OMAP2+: hwmod: Extract no-idle and no-reset info from DT
Quoted 5 lines · Rajendra Nayak
Now that we have DT bindings to specify which devices should not be reset and idled during init, make hwmod extract the information (and store them in internal flags) from Device tree.
Signed-off-by Rajendra Nayak <[email protected]>
Thanks, queued.
- Paul
PATCH v2 4/5 ARM: OMAP2+: hwmod: Cleanup usage of HWMOD_INIT_NO_RESET and HWMOD_INIT_NO_IDLE
In reply to Rajendra NayakWith DT bindings to specify which devices should not be idled and reset at init being in place, and the corresponding dtsi files for am33xx/omap4 and omap5 updated using those bindings, we can now clean up hwmod internal flags for HWMOD_INIT_NO_RESET and HWMOD_INIT_NO_IDLE which were infact used to specify the exact same information.
For GPMC, the HWMOD_INIT_NO_RESET flag seems to be added in hwmod not due to any errata around the GPMC IP, but rather because any timings set by the bootloader are not being correctly programmed by the kernel. This seems like something that needs to be fixed as part of GPMC driver in the kernel, and hence the flag is left as is in hwmod, which can be removed once the driver does what its expected to.
--- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 4 ++-- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 4 +--- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +2 -2
@@ -198,7 +198,7 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = { .class = &am33xx_wkup_m3_hwmod_class, .clkdm_name = "l4_wkup_aon_clkdm", /* Keep hardreset asserted */ - .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST, + .flags = HWMOD_NO_IDLEST, .main_clk = "dpll_core_m4_div2_ck", .prcm = { .omap4 = {
@@ -932,7 +932,7 @@ static struct omap_hwmod am33xx_gpmc_hwmod = { .name = "gpmc", .class = &am33xx_gpmc_hwmod_class, .clkdm_name = "l3s_clkdm", - .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .flags = HWMOD_INIT_NO_RESET, .main_clk = "l3s_gclk", .prcm = { .omap4 = {
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +1 -3
@@ -914,7 +914,6 @@ static struct omap_hwmod omap44xx_emif1_hwmod = { .name = "emif1", .class = &omap44xx_emif_hwmod_class, .clkdm_name = "l3_emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE, .main_clk = "ddrphy_ck", .prcm = { .omap4 = {
@@ -930,7 +929,6 @@ static struct omap_hwmod omap44xx_emif2_hwmod = { .name = "emif2", .class = &omap44xx_emif_hwmod_class, .clkdm_name = "l3_emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE, .main_clk = "ddrphy_ck", .prcm = { .omap4 = {
@@ -1184,7 +1182,7 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {* the kernel from the board file or DT data. * HWMOD_INIT_NO_RESET should be removed ASAP. */ - .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, + .flags = HWMOD_INIT_NO_RESET, .prcm = { .omap4 = { .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +0 -2
@@ -352,7 +352,6 @@ static struct omap_hwmod omap54xx_emif1_hwmod = { .name = "emif1", .class = &omap54xx_emif_hwmod_class, .clkdm_name = "emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_core_h11x2_ck", .prcm = { .omap4 = {
@@ -368,7 +367,6 @@ static struct omap_hwmod omap54xx_emif2_hwmod = { .name = "emif2", .class = &omap54xx_emif_hwmod_class, .clkdm_name = "emif_clkdm", - .flags = HWMOD_INIT_NO_IDLE, .main_clk = "dpll_core_h11x2_ck", .prcm = { .omap4 = {
Signature · 1 line
1.7.9.5
PATCH v2 5/5 ARM: dts: AM335x-evmsk: Do not reset gpio0
In reply to Rajendra NayakDo not reset GPIO0 at boot-up because GPIO0 is used on AM335x EVM-SK to control VTT regulators on DDR3.
Without this EVM-SK boards fail to boot-up because of DDR3 corruption.
--- arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/am335x-evmsk.dts +4 -0
@@ -419,3 +419,7 @@ phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii-txid"; }; + +&gpio0 { + ti,no-reset-on-init; +};
Signature · 1 line
1.7.9.5
PATCH 1/1 ARM: dts: omap4-panda-es: Do not reset gpio1
In reply to Rajendra NayakDo not reset GPIO1 at boot-up because GPIO 7 in GPIO1 block is used on OMAP4460 PandaBoard-ES to select voltage register in TPS62361 which supplies VDD_MPU.
Without this, OMAP4460 PandaBoard-ES boards fail to boot-up because MPU voltage switches over to VSET0 voltage value (boot voltage) which is not sufficient to operate the device at OPP100.
---
As explained here: http://marc.info/?l=u-boot&m=133066647800872&w=2
GPIO1 reset causes PandaBoard-ES to stop functioning. This depends on Patch series from Rajendra:
http://marc.info/?l=linux-doc&m=138131355520116&w=2
Applies on Benoit's for_13/dts branch:
https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts
Tested on PandaBoard-ES without the u-boot uenv hack
arch/arm/boot/dts/omap4-panda-es.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/omap4-panda-es.dts +4 -0
@@ -62,3 +62,7 @@ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; }; }; + +&gpio1 { + ti,no-reset-on-init; +};
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerRe: [PATCH] ARM: dts: omap4-panda-es: Do not reset gpio1
Quoted 7 lines · Nishanth Menon
Do not reset GPIO1 at boot-up because GPIO 7 in GPIO1 block is used on OMAP4460 PandaBoard-ES to select voltage register in TPS62361 which supplies
VDD_MPU.Without this, OMAP4460 PandaBoard-ES boards fail to boot-up because MPU voltage switches over to VSET0 voltage value (boot voltage) which is not sufficient to operate the device at OPP100.
Is this needs as a fix for the -rc series?
Tony
Quoted 35 lines
Signed-off-by Nishanth Menon <[email protected]>---
As explained here: http://marc.info/?l=u-boot&m=133066647800872&w=2GPIO1 reset causes PandaBoard-ES to stop functioning. This depends on Patch series from Rajendra:
http://marc.info/?l=linux-doc&m=138131355520116&w=2
Applies on Benoit's for_13/dts branch:
https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dtsTested on PandaBoard-ES without the u-boot uenv hack
arch/arm/boot/dts/omap4-panda-es.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/omap4-panda-es.dts +4
-0@@ -62,3 +62,7 @@ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; }; }; + +&gpio1 { + ti,no-reset-on-init; +};Signature · 7 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ARM: dts: omap4-panda-es: Do not reset gpio1
Quoted 10 lines · Tony Lindgren
Quoted 7 lines · Nishanth Menon
Do not reset GPIO1 at boot-up because GPIO 7 in GPIO1 block is used on OMAP4460 PandaBoard-ES to select voltage register in TPS62361 which supplies
VDD_MPU.Without this, OMAP4460 PandaBoard-ES boards fail to boot-up because MPU voltage switches over to VSET0 voltage value (boot voltage) which is not sufficient to operate the device at OPP100.
Is this needs as a fix for the -rc series?
Nope, this is not a regression recently introduced, has been in since day one of Panda-ES support. Further, we still have decision pending on the dependent series from Rajendra[1] - will be good to see it go in along with AM335x-EVM.
[1] http://marc.info/?t=138131368300005&r=1&w=2
Signature · 2 lines
Regards, Nishanth Menon
Re: [PATCH] ARM: dts: omap4-panda-es: Do not reset gpio1
In reply to Nishanth MenonHi Nishanth,
Quoted 9 lines · Nishanth Menon
Do not reset GPIO1 at boot-up because GPIO 7 in GPIO1 block is used on OMAP4460 PandaBoard-ES to select voltage register in TPS62361 which supplies
VDD_MPU.Without this, OMAP4460 PandaBoard-ES boards fail to boot-up because MPU voltage switches over to VSET0 voltage value (boot voltage) which is not sufficient to operate the device at OPP100.
Signed-off-by Nishanth Menon <[email protected]>
Quoted 8 lines
---
As explained here: http://marc.info/?l=u-boot&m=133066647800872&w=2GPIO1 reset causes PandaBoard-ES to stop functioning. This depends on Patch series from Rajendra:
http://marc.info/?l=linux-doc&m=138131355520116&w=2
Applies on Benoit's for_13/dts branch:
https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts
I've just applied it after Rajendra's series.
Thanks,
Benoit
Quoted 19 lines
Tested on PandaBoard-ES without the u-boot uenv hack
arch/arm/boot/dts/omap4-panda-es.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/omap4-panda-es.dts +4
-0@@ -62,3 +62,7 @@ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; }; }; + +&gpio1 { + ti,no-reset-on-init; +};
Signature · 4 lines
Beno?t Cousson BayLibre Embedded Linux Technology Lab www.baylibre.com