Skip to contentSkip to conversation

MMC pinmux configuration fixes

PATCH Superseded Judith Mendez 3 participants 10 messages Aug 5

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover MMC pinmux configuration fixes

This series fixes MMC pin input/output and pullup/pulldown settings across AM62x, AM62AX, and AM62LX boards.

All patches have been tested in a downstream vendor kernel.

Changes since v1:
- drop patches 4-8 since they will be send out in a separate series

Judith Mendez (4):
arm64: dts: ti: k3-am64: Enable IO expander interrupt
arm64: dts: ti: k3-am62a: Fix MMC0_CLK register address
arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT
arm64: dts: ti: k3-am62: Set MMC clock pins as OUTPUT

 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts         |  2 +-
 arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts |  2 +-
 arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts   |  6 +++---
 arch/arm64/boot/dts/ti/k3-am625-sk-common.dtsi   |  2 +-
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts          |  5 ++---
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi   |  2 +-
 arch/arm64/boot/dts/ti/k3-am642-evm.dts          | 15 ++++++++++++++-
 arch/arm64/boot/dts/ti/k3-am642-sk.dts           | 15 ++++++++++++++-
 8 files changed, 37 insertions(+), 12 deletions(-)
Signature · 1 line
2.54.0
#1 lore raw

PATCH v2 1/4 arm64: dts: ti: k3-am64: Enable IO expander interrupt

On AM64 EVM and SK boards, MMC1_SDWP is used for IO expander interrupt, remove from MMC1 pinmux node and setup as exp1 IO expander interrupt.

---
 arch/arm64/boot/dts/ti/k3-am642-evm.dts | 15 ++++++++++++++-
 arch/arm64/boot/dts/ti/k3-am642-sk.dts  | 15 ++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am642-evm.dts +14 -1
index bc4347cf71140..28fbaf134af4f 100644
@@ -8,6 +8,7 @@
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/net/ti-dp83867.h>
 #include "k3-am642.dtsi"
 
@@ -259,11 +260,17 @@ AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0) /* (L21) MMC1_DAT1 */
 			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0) /* (K19) MMC1_DAT2 */
 			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */
 			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
-			AM64X_IOPAD(0x029c, PIN_INPUT, 0) /* (C20) MMC1_SDWP */
 			AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* MMC1_CLKLB */
 		>;
 	};
 
+	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x029c, PIN_INPUT, 7) /* (C20) MMC1_SDWP.GPIO1_78 */
+		>;
+		bootph-all;
+	};
+
 	main_uart1_pins_default: main-uart1-default-pins {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x0248, PIN_INPUT, 0)		/* (D16) UART1_CTSn */
@@ -481,6 +488,12 @@ exp1: gpio@22 {
 		bootph-all;
 		compatible = "ti,tca6424";
 		reg = <0x22>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
+		interrupt-parent = <&main_gpio1>;
+		interrupts = <78 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
 		gpio-controller;
 		#gpio-cells = <2>;
 		gpio-line-names = "GPIO_eMMC_RSTn", "CAN_MUX_SEL",
arch/arm64/boot/dts/ti/k3-am642-sk.dts +14 -1
index d28a38c87f32a..aa87845d77598 100644
@@ -7,6 +7,7 @@
 
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/net/ti-dp83867.h>
 #include <dt-bindings/leds/common.h>
 #include "k3-am642.dtsi"
@@ -198,7 +199,6 @@ &main_pmx0 {
 	main_mmc1_pins_default: main-mmc1-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
-			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0) /* (C20) MMC1_SDWP */
 			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
 			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0) /* (J19) MMC1_CMD */
 			AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* (#N/A) MMC1_CLKLB */
@@ -210,6 +210,13 @@ AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */
 		>;
 	};
 
+	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x029c, PIN_INPUT, 7) /* (C20) MMC1_SDWP.GPIO1_78 */
+		>;
+		bootph-all;
+	};
+
 	main_uart0_pins_default: main-uart0-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
@@ -383,6 +390,12 @@ exp1: gpio@70 {
 		bootph-all;
 		compatible = "nxp,pca9538";
 		reg = <0x70>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
+		interrupt-parent = <&main_gpio1>;
+		interrupts = <78 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
 		gpio-controller;
 		#gpio-cells = <2>;
 		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
Signature · 1 line
2.54.0
#2 lore raw

Re: [PATCH v2 1/4] arm64: dts: ti: k3-am64: Enable IO expander interrupt

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Dropping the internal pull-up on the PCA9538 IO expander interrupt pin on the SK board may leave…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Dropping the internal pull-up on the PCA9538 IO expander interrupt pin on the SK board may leave the interrupt line floating. --

--- Patch [1]: [PATCH v2 1/4] arm64: dts: ti: k3-am64: Enable IO expander interrupt --- commit 9cfc964128ea9c7e025ee14807e51340a913a87a
Author: Judith Mendez <[email protected]>

arm64: dts: ti: k3-am64: Enable IO expander interrupt

This commit configures the MMC1_SDWP pin to function as the interrupt line for the IO expander on the AM64 EVM and SK boards. It moves the pin out of the MMC1 pinmux node and assigns it to the expander node, setting it up as an edge-falling interrupt.

Quoted 12 lines
arch/arm64/boot/dts/ti/k3-am642-sk.dts +0 -1
index d28a38c87f32a..aa87845d77598 100644
@@ -198,7 +199,6 @@ &main_pmx0 {
 	main_mmc1_pins_default: main-mmc1-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
-			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0) /* (C20) MMC1_SDWP */
 			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
 			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0) /* (J19) MMC1_CMD */
 			AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* (#N/A) MMC1_CLKLB */

[ ... ]

arch/arm64/boot/dts/ti/k3-am642-sk.dts AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */ · line 215

Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am642-sk.dts +3 -0
@@ -210,6 +210,13 @@ AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */
 		>;
 	};
 
+	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x029c, PIN_INPUT, 7) /* (C20) MMC1_SDWP.GPIO1_78 */

[Severity: Medium]
Does the AM64 SK board have an external pull-up for this IO expander interrupt line?

The original MMC1 configuration for this pin on the SK board used PIN_INPUT_PULLUP. Since the PCA9538 interrupt output is typically open-drain, configuring it as PIN_INPUT here drops the internal pull-up. If there is no external pull-up on the board, could this leave the line floating and trigger spurious edge-falling interrupt storms?

Quoted 3 lines
arch/arm64/boot/dts/ti/k3-am642-sk.dts +3 -0
+		>;
+		bootph-all;
+	};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH v2 2/4 arm64: dts: ti: k3-am62a: Fix MMC0_CLK register address

In reply to Judith Mendez

MMC0_CLKLB and MMC0_CLK have incorrectly swapped register addresses as per datasheet [0]. Set the correct MMC0_CLK address and drop the unneeded MMC0_CLKLB pin configuration.

[0] https://www.ti.com/lit/gpn/am62a7 Rev. E: Table 5-1. Pin Attributes

Fixes e041ec6e86e7 ("arm64: dts: ti: k3-am62a7-sk: Enable eMMC support")
---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +1 -2
index d3b3675e7a8fc..b04636cab71c7 100644
@@ -328,8 +328,7 @@ AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
 	main_mmc0_pins_default: main-mmc0-default-pins {
 		pinctrl-single,pins = <
 			AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
-			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLKLB */
-			AM62AX_IOPAD(0x21c, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
+			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
 			AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
 			AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
 			AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
Signature · 1 line
2.54.0
#4 lore raw

PATCH v2 3/4 arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT

In reply to Judith Mendez

MMC clock pins must be configured as OUTPUT-only per TRM [0] with receiver disabled (RXACTIVE bit = 0). Change MMC CLK pins from PIN_INPUT to PIN_OUTPUT to match documentation.

[0] https://www.ti.com/lit/pdf/spruj16 Rev. C: Table 12-257. MMCSDi I/O Signals

---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +2 -2
index b04636cab71c7..e63c5200a2370 100644
@@ -328,7 +328,7 @@ AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
 	main_mmc0_pins_default: main-mmc0-default-pins {
 		pinctrl-single,pins = <
 			AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
-			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
+			AM62AX_IOPAD(0x218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */
 			AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
 			AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
 			AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
@@ -344,7 +344,7 @@ AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
 	main_mmc1_pins_default: main-mmc1-default-pins {
 		pinctrl-single,pins = <
 			AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
-			AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
+			AM62AX_IOPAD(0x234, PIN_OUTPUT, 0) /* (B22) MMC1_CLK */
 			AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
 			AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
 			AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
Signature · 1 line
2.54.0
#5 lore raw

Re: [PATCH v2 3/4] arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [Medium] The commit updates MMC clock pins to OUTPUT to comply with the AM62A TRM requirement (RXACTIVE=0), but only applies the fix to the SK board, missing other AM62A-based boards (such as the PHYTEC boards) which still incorrectly configure the MMC clock pins as inputs. --

--- Patch [3]: [PATCH v2 3/4] arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT --- commit a6bfe2ecc4d051fbfd71859f6e530c852974e23c
Author: Judith Mendez <[email protected]>

arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT

This commit updates the MMC clock pins on the AM62A SK board to be configured as OUTPUT-only. This complies with the AM62A TRM requirement to have the receiver disabled (RXACTIVE = 0) for these pins.

arch/arm64/boot/dts/ti/k3-am62a7-sk.dts AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */ · line 327

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +1 -1
index 826fff38cfb77..9b120cd9b0c37 100644
@@ -324,7 +324,7 @@ AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
 	main_mmc0_pins_default: main-mmc0-default-pins {
 		pinctrl-single,pins = <
 			AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
-			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
+			AM62AX_IOPAD(0x218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */

[Severity: Medium]
This is a pre-existing issue, but while this commit fixes the SK board, other AM62A-based boards (such as the PHYTEC boards) still incorrectly configure the MMC clock pins as inputs.

For example, in arch/arm64/boot/dts/ti/k3-am62a-phycore-som.dtsi:
main_mmc0_pins_default():

    AM62AX_IOPAD(0x218, PIN_INPUT_PULLDOWN, 0) /* (AB7) MMC0_CLK */

And in arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi:
main_mmc1_pins_default():

    AM62X_IOPAD(0x234, PIN_INPUT_PULLDOWN, 0) /* (B22) MMC1_CLK */

This leaves the receiver enabled (RXACTIVE=1) in violation of the AM62A TRM.

Should these other boards also be updated to comply with the TRM?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Reviewed-by on v2 3/4
#6 lore raw

Re: [PATCH v2 3/4] arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT

In reply to Judith Mendez

Hey Judith,

Quoted 3 lines · Judith Mendez

MMC clock pins must be configured as OUTPUT-only per TRM [0] with receiver disabled (RXACTIVE bit = 0). Change MMC CLK pins from PIN_INPUT to PIN_OUTPUT to match documentation.

I think this patch and the next one should carry a fixes tag.

With that for the whole series,

Regards,
Moteen

Quoted 29 lines

[0] https://www.ti.com/lit/pdf/spruj16 Rev. C: Table 12-257. MMCSDi I/O Signals

---
  arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +2 -2
index b04636cab71c7..e63c5200a2370 100644
@@ -328,7 +328,7 @@ AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
  	main_mmc0_pins_default: main-mmc0-default-pins {
  		pinctrl-single,pins = <
  			AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
-			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
+			AM62AX_IOPAD(0x218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */
  			AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
  			AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
  			AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
@@ -344,7 +344,7 @@ AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
  	main_mmc1_pins_default: main-mmc1-default-pins {
  		pinctrl-single,pins = <
  			AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
-			AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
+			AM62AX_IOPAD(0x234, PIN_OUTPUT, 0) /* (B22) MMC1_CLK */
  			AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
  			AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
  			AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
#7 lore raw

Re: [PATCH v2 3/4] arm64: dts: ti: k3-am62a: Set MMC clock pins as OUTPUT

Hi all,

Quoted 8 lines · Moteen Shah

Hey Judith,

Quoted 3 lines · Judith Mendez

MMC clock pins must be configured as OUTPUT-only per TRM [0] with receiver disabled (RXACTIVE bit = 0). Change MMC CLK pins from PIN_INPUT to PIN_OUTPUT to match documentation.

I think this patch and the next one should carry a fixes tag.

Yea actually I did not send this series 100% correct, so I was going to send an comment to ignore this version. I will add your review tag for the next version though. Thanks!

Quoted 37 lines

With that for the whole series,

Regards,
Moteen

Quoted 31 lines

[0] https://www.ti.com/lit/pdf/spruj16 Rev. C: Table 12-257. MMCSDi I/ O Signals

---
  arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 4 ++--

  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +0 -0
index b04636cab71c7..e63c5200a2370 100644
@@ -328,7 +328,7 @@ AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) 

GPMC0_CSn3.I2C2_SDA */
      main_mmc0_pins_default: main-mmc0-default-pins { pinctrl-single,pins = <
              AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */ -            AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */ +            AM62AX_IOPAD(0x218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */ AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */ AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */ AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */

arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +0 -0
@@ -344,7 +344,7 @@ AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) 

MMC0_DAT7 */
      main_mmc1_pins_default: main-mmc1-default-pins { pinctrl-single,pins = <
              AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */ -            AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */ +            AM62AX_IOPAD(0x234, PIN_OUTPUT, 0) /* (B22) MMC1_CLK */ AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */ AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */ AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */

#8 lore raw

PATCH v2 4/4 arm64: dts: ti: k3-am62: Set MMC clock pins as OUTPUT

In reply to Judith Mendez

MMC clock pins must be configured as OUTPUT-only per TRM [0] with receiver disabled (RXACTIVE bit = 0). Change MMC CLK pins from PIN_INPUT to PIN_OUTPUT to match documentation.

[0] https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals

---
 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts         | 2 +-
 arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts | 2 +-
 arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts   | 6 +++---
 arch/arm64/boot/dts/ti/k3-am625-sk-common.dtsi   | 2 +-
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi   | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +1 -1
index dfd65c00f5b95..7fd508f4eddf1 100644
@@ -86,7 +86,7 @@ main_mmc0_pins_default: main-mmc0-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (V3) MMC0_CMD */
-			AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (Y1) MMC0_CLK */
+			AM62X_IOPAD(0x218, PIN_OUTPUT, 0) /* (Y1) MMC0_CLK */
 			AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (V2) MMC0_DAT0 */
 			AM62X_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (V1) MMC0_DAT1 */
 			AM62X_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (W2) MMC0_DAT2 */
arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts +1 -1
index 7a4cffc27bda3..1c691629d4ad0 100644
@@ -235,7 +235,7 @@ AM62X_IOPAD(0x0020, PIN_OUTPUT, 3) /* (J25) OSPI0_D5.UART6_TXD */
 	main_mmc1_pins_default: main-mmc1-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
-			AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
+			AM62X_IOPAD(0x234, PIN_OUTPUT, 0) /* (B22/A20) MMC1_CLK */
 			AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */
 			AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */
 			AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts +3 -3
index c468b9c5fc09a..898e4ca3fd87e 100644
@@ -323,7 +323,7 @@ emmc_pins_default: emmc-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x0220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
-			AM62X_IOPAD(0x0218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
+			AM62X_IOPAD(0x0218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */
 			AM62X_IOPAD(0x0214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
 			AM62X_IOPAD(0x0210, PIN_INPUT, 0) /* (AA1) MMC0_DAT1 */
 			AM62X_IOPAD(0x020c, PIN_INPUT, 0) /* (AA3) MMC0_DAT2 */
@@ -346,7 +346,7 @@ sd_pins_default: sd-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x023c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
-			AM62X_IOPAD(0x0234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
+			AM62X_IOPAD(0x0234, PIN_OUTPUT, 0) /* (B22) MMC1_CLK */
 			AM62X_IOPAD(0x0230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
 			AM62X_IOPAD(0x022c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
 			AM62X_IOPAD(0x0228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
@@ -358,7 +358,7 @@ AM62X_IOPAD(0x0240, PIN_INPUT, 7) /* (D17) MMC1_SDCD.GPIO1_48 */
 	wifi_pins_default: wifi-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x0120, PIN_INPUT, 0) /* (C24) MMC2_CMD */
-			AM62X_IOPAD(0x0118, PIN_INPUT, 0) /* (D25) MMC2_CLK */
+			AM62X_IOPAD(0x0118, PIN_OUTPUT, 0) /* (D25) MMC2_CLK */
 			AM62X_IOPAD(0x0114, PIN_INPUT, 0) /* (B24) MMC2_DAT0 */
 			AM62X_IOPAD(0x0110, PIN_INPUT, 0) /* (C25) MMC2_DAT1 */
 			AM62X_IOPAD(0x010c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */
arch/arm64/boot/dts/ti/k3-am625-sk-common.dtsi +1 -1
index 9c83626826453..085b067d96fbb 100644
@@ -98,7 +98,7 @@ main_mmc0_pins_default: main-mmc0-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
-			AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
+			AM62X_IOPAD(0x218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */
 			AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
 			AM62X_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
 			AM62X_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +1 -1
index ab9e58c2d225e..d2f41e2ed6239 100644
@@ -194,7 +194,7 @@ main_mmc1_pins_default: main-mmc1-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
-			AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
+			AM62X_IOPAD(0x234, PIN_OUTPUT, 0) /* (B22/A20) MMC1_CLK */
 			AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */
 			AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */
 			AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */
Signature · 1 line
2.54.0
#9 lore raw
In reply to Judith Mendez

Hi all,

Quoted 7 lines · Judith Mendez

This series fixes MMC pin input/output and pullup/pulldown settings across AM62x, AM62AX, and AM62LX boards.

All patches have been tested in a downstream vendor kernel.

Changes since v1:
- drop patches 4-8 since they will be send out in a separate series

Please ignore this version of the series. I am sending out v3 with fixes tags.

~ Judith