Skip to contentSkip to conversation

ARM: dra7: Enable Errata i877

PATCH New Lokesh Vutla 4 participants 8 messages Mar 3, 2016 – Mar 8, 2016

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ARM: dra7: Enable Errata i877

This series enables Errata i877 for all DRA7 platforms. The public errata documentation can be found here[1].

[1] http://www.ti.com/lit/er/sprz429h/sprz429h.pdf

Lokesh Vutla (1):
ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Mugunthan V N (1):
ARM: dts: dra7: do not gate cpsw clock due to errata i877

 Documentation/devicetree/bindings/arm/omap/omap.txt |  1 +
 arch/arm/boot/dts/dra7.dtsi                         | 10 ++++++++++
 arch/arm/mach-omap2/omap_hwmod.c                    |  9 ++++++++-
 arch/arm/mach-omap2/omap_hwmod.h                    |  3 +++
 4 files changed, 22 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/2 ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Introduce a dt property, ti,no-idle, that prevents an IP to idle at any point. This is to handle Errata i877, which tells that GMAC clocks cannot be disabled.

---
 Documentation/devicetree/bindings/arm/omap/omap.txt | 1 +
 arch/arm/mach-omap2/omap_hwmod.c                    | 9 ++++++++-
 arch/arm/mach-omap2/omap_hwmod.h                    | 3 +++
 3 files changed, 12 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/omap/omap.txt +1 -0
index 739bc48..21e71a5 100644
@@ -23,6 +23,7 @@ Optional properties:
   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
+- ti,no-idle: When present, the module is never allowed to idle.
 
 Example:
 
arch/arm/mach-omap2/omap_hwmod.c +8 -1
index e9f65fe..b6d62e4 100644
@@ -2200,6 +2200,11 @@ static int _enable(struct omap_hwmod *oh)
  */
 static int _idle(struct omap_hwmod *oh)
 {
+	if (oh->flags & HWMOD_NO_IDLE) {
+		oh->_int_flags |= _HWMOD_SKIP_ENABLE;
+		return 0;
+	}
+
 	pr_debug("omap_hwmod: %s: idling\n", oh->name);
 
 	if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -2504,6 +2509,8 @@ static int __init _init(struct omap_hwmod *oh, void *data)
 			oh->flags |= HWMOD_INIT_NO_RESET;
 		if (of_find_property(np, "ti,no-idle-on-init", NULL))
 			oh->flags |= HWMOD_INIT_NO_IDLE;
+		if (of_find_property(np, "ti,no-idle", NULL))
+			oh->flags |= HWMOD_NO_IDLE;
 	}
 
 	oh->_state = _HWMOD_STATE_INITIALIZED;
@@ -2630,7 +2637,7 @@ static void __init _setup_postsetup(struct omap_hwmod *oh)
 	 * XXX HWMOD_INIT_NO_IDLE does not belong in hwmod data -
 	 * it should be set by the core code as a runtime flag during startup
 	 */
-	if ((oh->flags & HWMOD_INIT_NO_IDLE) &&
+	if ((oh->flags & (HWMOD_INIT_NO_IDLE | HWMOD_NO_IDLE)) &&
 	    (postsetup_state == _HWMOD_STATE_IDLE)) {
 		oh->_int_flags |= _HWMOD_SKIP_ENABLE;
 		postsetup_state = _HWMOD_STATE_ENABLED;
arch/arm/mach-omap2/omap_hwmod.h +3 -0
index 76bce11..7c7a311 100644
@@ -525,6 +525,8 @@ struct omap_hwmod_omap4_prcm {
  *     or idled.
  * HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to
  *     operate and they need to be handled at the same time as the main_clk.
+ * HWMOD_NO_IDLE: Do not idle the hwmod at all. Useful to handle certain
+ *     IPs like CPSW on DRA7, where clocks to this module cannot be disabled.
  */
 #define HWMOD_SWSUP_SIDLE			(1 << 0)
 #define HWMOD_SWSUP_MSTANDBY			(1 << 1)
@@ -541,6 +543,7 @@ struct omap_hwmod_omap4_prcm {
 #define HWMOD_SWSUP_SIDLE_ACT			(1 << 12)
 #define HWMOD_RECONFIG_IO_CHAIN			(1 << 13)
 #define HWMOD_OPT_CLKS_NEEDED			(1 << 14)
+#define HWMOD_NO_IDLE				(1 << 15)
 
 /*
  * omap_hwmod._int_flags definitions
Signature · 1 line
2.1.4
maintainer
#2 lore raw

PATCH 1/2 ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Quoted 11 lines · Lokesh Vutla

Introduce a dt property, ti,no-idle, that prevents an IP to idle at any point. This is to handle Errata i877, which tells that GMAC clocks cannot be disabled.

---
 Documentation/devicetree/bindings/arm/omap/omap.txt | 1 +
Quoted 3 lines
 arch/arm/mach-omap2/omap_hwmod.c                    | 9 ++++++++-
 arch/arm/mach-omap2/omap_hwmod.h                    | 3 +++
 3 files changed, 12 insertions(+), 1 deletion(-)
#3 lore raw

PATCH 2/2 ARM: dts: dra7: do not gate cpsw clock due to errata i877

In reply to Lokesh Vutla

From: Mugunthan V N <[email protected]>

Errata id: i877

Description:
------------
The RGMII 1000 Mbps Transmit timing is based on the output clock (rgmiin_txc) being driven relative to the rising edge of an internal clock and the output control/data (rgmiin_txctl/txd) being driven relative to the falling edge of an internal clock source. If the internal clock source is allowed to be static low (i.e., disabled) for an extended period of time then when the clock is actually enabled the timing delta between the rising edge and falling edge can change over the lifetime of the device. This can result in the device switching characteristics degrading over time, and eventually failing to meet the Data Manual Delay Time/Skew specs.
To maintain RGMII 1000 Mbps IO Timings, SW should minimize the duration that the Ethernet internal clock source is disabled. Note that the device reset state for the Ethernet clock is "disabled". Other RGMII modes (10 Mbps, 100Mbps) are not affected

Workaround:
-----------
If the SoC Ethernet interface(s) are used in RGMII mode at 1000 Mbps, SW should minimize the time the Ethernet internal clock source is disabled to a maximum of 200 hours in a device life cycle. This is done by enabling the clock as early as possible in IPL (QNX) or SPL/u-boot (Linux/Android) by setting the register CM_GMAC_CLKSTCTRL[1:0]CLKTRCTRL = 0x2:SW_WKUP.

So, do not allow to gate the cpsw clocks using ti,no-idle property in cpsw node assuming 1000 Mbps is being used all the time. If someone does not need 1000 Mbps and wants to gate clocks to cpsw, this property needs to be deleted in their respective board files.

---
 arch/arm/boot/dts/dra7.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/dra7.dtsi +10 -0
index 6a4572a..340b657 100644
@@ -1466,6 +1466,16 @@
 			       0x48485200 0x2E00>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+
+			/*
+			 * Do not allow gating of cpsw clock as workaround
+			 * for errata i877. Keeping internal clock disabled
+			 * causes the device switching characteristics
+			 * to degrade over time and eventually fail to meet
+			 * the data manual delay time/skew specs.
+			 */
+			ti,no-idle;
+
 			/*
 			 * rx_thresh_pend
 			 * rx_pend
Signature · 1 line
2.1.4
maintainer
#4 lore raw

cover ARM: dra7: Enable Errata i877

In reply to Lokesh Vutla
Quoted 10 lines · Lokesh Vutla

This series enables Errata i877 for all DRA7 platforms. The public errata documentation can be found here[1].

[1] http://www.ti.com/lit/er/sprz429h/sprz429h.pdf

Lokesh Vutla (1):
ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Mugunthan V N (1):
ARM: dts: dra7: do not gate cpsw clock due to errata i877

I've sent these for merging immediately.

Have you sent patches for U-boot yet?

- Paul

#5 lore raw

cover ARM: dra7: Enable Errata i877

Quoted 10 lines · Paul Walmsley
Quoted 8 lines · Lokesh Vutla

This series enables Errata i877 for all DRA7 platforms. The public errata documentation can be found here[1].

[1] http://www.ti.com/lit/er/sprz429h/sprz429h.pdf

Lokesh Vutla (1):
ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Quoted 6 lines
Quoted 2 lines

Mugunthan V N (1):
ARM: dts: dra7: do not gate cpsw clock due to errata i877

I've sent these for merging immediately.

Have you sent patches for U-boot yet?

Yes, It is already merged into u-boot.
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f986d9720836433ded29f06c8f5aed462bd20924;hp=65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06

Thanks and regards,
Lokesh

Quoted 4 lines

- Paul

maintainer
#6 lore raw

cover ARM: dra7: Enable Errata i877

Quoted 11 lines · Lokesh Vutla
Quoted 10 lines · Paul Walmsley
Quoted 8 lines · Lokesh Vutla

This series enables Errata i877 for all DRA7 platforms. The public errata documentation can be found here[1].

[1] http://www.ti.com/lit/er/sprz429h/sprz429h.pdf

Lokesh Vutla (1):
ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Mugunthan V N (1):
ARM: dts: dra7: do not gate cpsw clock due to errata i877

I've sent these for merging immediately.

Have you sent patches for U-boot yet?

Yes, It is already merged into u-boot.
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f986d9720836433ded29f06c8f5aed462bd20924;hp=65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06

I may be misreading this patch, but all it seems to do is add clock control for GMAC. It doesn't seem to force the clock to stay on. What am I missing?

- Paul

#7 lore raw

cover ARM: dra7: Enable Errata i877

Quoted 18 lines · Paul Walmsley
Quoted 16 lines · Lokesh Vutla
Quoted 15 lines · Paul Walmsley
Quoted 10 lines · Lokesh Vutla

This series enables Errata i877 for all DRA7 platforms. The public errata documentation can be found here[1].

[1] http://www.ti.com/lit/er/sprz429h/sprz429h.pdf

Lokesh Vutla (1):
ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Mugunthan V N (1):
ARM: dts: dra7: do not gate cpsw clock due to errata i877

I've sent these for merging immediately.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Have you sent patches for U-boot yet?

Yes, It is already merged into u-boot.
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f986d9720836433ded29f06c8f5aed462bd20924;hp=65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06

I may be misreading this patch, but all it seems to do is add clock control for GMAC. It doesn't seem to force the clock to stay on. What am I missing?

So, this is an array containing clock controls which are needed very early. This array will be passed to clock framework to enable all the clocks. Just adding it to the array is sufficient.

Thanks and regards,
Lokesh

Quoted 4 lines

- Paul