Skip to contentSkip to conversation

pinctrl: dt-bindings: Fix amx3 SLEWCTRL_FAST binding

PATCH New Dave Gerlach 2 participants 5 messages Feb 28, 2015 – Mar 6, 2015

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

cover pinctrl: dt-bindings: Fix amx3 SLEWCTRL_FAST binding

Currently both am33xx and am43xx have the macro for SLEWCTRL_FAST in pinctrl dt-bindings reversed so that selecting the macro actually sets SLEWCTRL_SLOW in the pad control registers. These patches correct the bindings but leave the pinctrl states that use the binding *UNMODIFIED*. Previously i2c and mdio on am33xx and i2c, mdio, and uart on am43xx had been using this macro and selecting SLEWCTRL_FAST while actually programming SLEWCTRL_SLOW in the pad config registers.

Because the intended selection was SLEWCTRL_FAST the macros are unchanged. I tested on am335x-gp-evm and am437x-gp-evm with no difference in functionality seen.

Regards,
Dave

Dave Gerlach (2):
pinctrl: am33xx: dt-bindings: fix SLEWCTRL_FAST binding
pinctrl: am43xx: dt-bindings: fix SLEWCTRL_FAST binding

 include/dt-bindings/pinctrl/am33xx.h | 3 ++-
 include/dt-bindings/pinctrl/am43xx.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.3.0
#1 lore raw

PATCH 1/2 pinctrl: am33xx: dt-bindings: fix SLEWCTRL_FAST binding

According to AM335x TRM, Document spruh73l, Revised February 2015, Section 9.2.2 Pad Control Registers, setting bit 6 of the pad control registers actually sets the SLEWCTRL value to slow rather than fast as the current macro indicates. Introduce a new macro, SLEWCTRL_SLOW, that sets the bit, and modify SLEWCTRL_FAST to 0 but keep it for completeness.

Current users of the macro (i2c and mdio) are left unmodified as SLEWCTRL_FAST was the macro used and actual desired state. Tested on am335x-gp-evm with no difference in software performance seen.

---
 include/dt-bindings/pinctrl/am33xx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/dt-bindings/pinctrl/am33xx.h +2 -1
index 2fbc804..226f772 100644
@@ -13,7 +13,8 @@
 
 #define PULL_DISABLE		(1 << 3)
 #define INPUT_EN		(1 << 5)
-#define SLEWCTRL_FAST		(1 << 6)
+#define SLEWCTRL_SLOW		(1 << 6)
+#define SLEWCTRL_FAST		0
 
 /* update macro depending on INPUT_EN and PULL_ENA */
 #undef PIN_OUTPUT
Signature · 1 line
2.3.0
#2 lore raw

PATCH 2/2 pinctrl: am43xx: dt-bindings: fix SLEWCTRL_FAST binding

In reply to Dave Gerlach

According to AM437x TRM, Document SPRUHL7B, Revised December 2014, Section 7.2.1 Pad Control Registers, setting bit 19 of the pad control registers actually sets the SLEWCTRL value to slow rather than fast as the current macro indicates. Introduce a new macro, SLEWCTRL_SLOW, that sets the bit, and modify SLEWCTRL_FAST to 0 but keep it for completeness.

Current users of the macro (i2c, mdio, and uart) are left unmodified as SLEWCTRL_FAST was the macro used and actual desired state. Tested on am437x-gp-evm with no difference in software performance seen.

---
 include/dt-bindings/pinctrl/am43xx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/dt-bindings/pinctrl/am43xx.h +2 -1
index 9c2e4f8..5f4d0189 100644
@@ -18,7 +18,8 @@
 #define PULL_DISABLE		(1 << 16)
 #define PULL_UP			(1 << 17)
 #define INPUT_EN		(1 << 18)
-#define SLEWCTRL_FAST		(1 << 19)
+#define SLEWCTRL_SLOW		(1 << 19)
+#define SLEWCTRL_FAST		0
 #define DS0_PULL_UP_DOWN_EN	(1 << 27)
 
 #define PIN_OUTPUT		(PULL_DISABLE)
Signature · 1 line
2.3.0
#3 lore raw

cover pinctrl: dt-bindings: Fix amx3 SLEWCTRL_FAST binding

In reply to Dave Gerlach
Quoted 11 lines · Dave Gerlach

Currently both am33xx and am43xx have the macro for SLEWCTRL_FAST in pinctrl dt-bindings reversed so that selecting the macro actually sets SLEWCTRL_SLOW in the pad control registers. These patches correct the bindings but leave the pinctrl states that use the binding *UNMODIFIED*. Previously i2c and mdio on am33xx and i2c, mdio, and uart on am43xx had been using this macro and selecting SLEWCTRL_FAST while actually programming SLEWCTRL_SLOW in the pad config registers.

Because the intended selection was SLEWCTRL_FAST the macros are unchanged. I tested on am335x-gp-evm and am437x-gp-evm with no difference in functionality seen.

Applying both into omap-for-v4.0/fixes thanks.

Tony

#4 lore raw

cover pinctrl: dt-bindings: Fix amx3 SLEWCTRL_FAST binding

Quoted 9 lines · Tony Lindgren
Quoted 8 lines · Dave Gerlach

Currently both am33xx and am43xx have the macro for SLEWCTRL_FAST in pinctrl dt-bindings reversed so that selecting the macro actually sets SLEWCTRL_SLOW in the pad control registers. These patches correct the bindings but leave the pinctrl states that use the binding *UNMODIFIED*. Previously i2c and mdio on am33xx and i2c, mdio, and uart on am43xx had been using this macro and selecting SLEWCTRL_FAST while actually programming SLEWCTRL_SLOW in the pad config registers.

Quoted 5 lines
Quoted 3 lines

Because the intended selection was SLEWCTRL_FAST the macros are unchanged. I tested on am335x-gp-evm and am437x-gp-evm with no difference in functionality seen.

Applying both into omap-for-v4.0/fixes thanks.

Thanks!

Regards,
Dave

Quoted 3 lines

Tony