Skip to contentSkip to conversation

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

PATCH Applied Francesco Dolcini 4 participants 11 messages Aug 13 – Sep 4

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

PATCH 1/1 arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT

From: Francesco Dolcini <[email protected]>

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.

Link https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals [0]
Fixes 316b80246b16 ("arm64: dts: ti: add verdin am62")
---
 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +3 -3
index e97b2b047d10..895b1b7dcac7 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
 	pinctrl_sdhci0: main-mmc0-default-pins {
 		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 */
@@ -589,7 +589,7 @@ AM62X_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
 	pinctrl_sdhci1: main-mmc1-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x23c, PIN_INPUT,        0) /* (A21) MMC1_CMD  */ /* SODIMM 74 */
-			AM62X_IOPAD(0x234, PIN_INPUT,        0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
+			AM62X_IOPAD(0x234, PIN_OUTPUT,       0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
 			AM62X_IOPAD(0x230, PIN_INPUT,        0) /* (A22) MMC1_DAT0 */ /* SODIMM 80 */
 			AM62X_IOPAD(0x22c, PIN_INPUT,        0) /* (B21) MMC1_DAT1 */ /* SODIMM 82 */
 			AM62X_IOPAD(0x228, PIN_INPUT,        0) /* (C21) MMC1_DAT2 */ /* SODIMM 70 */
@@ -601,7 +601,7 @@ AM62X_IOPAD(0x224, PIN_INPUT,        0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */
 	pinctrl_sdhci2: main-mmc2-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD   */ /* WiFi_SDIO_CMD   */
-			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
+			AM62X_IOPAD(0x118, PIN_OUTPUT,0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
 			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0  */ /* WiFi_SDIO_DATA0 */
 			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1  */ /* WiFi_SDIO_DATA1 */
 			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2  */ /* WiFi_SDIO_DATA2 */
Signature · 1 line
2.47.3
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver (RXACTIVE=0), which breaks the internal…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver (RXACTIVE=0), which breaks the internal clock loopback required by the MMC controller for read operations. --

--- Patch [1]: [PATCH v1] arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT --- commit b7e315f9edd8f485234748a2f8e267539b5b0f30
Author: Francesco Dolcini <[email protected]>

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

This commit changes the MMC clock pins for the K3 AM62x Verdin module from PIN_INPUT to PIN_OUTPUT to match the TRM documentation, effectively disabling the receiver (RXACTIVE = 0).

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

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM · line 576

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
 	pinctrl_sdhci0: main-mmc0-default-pins {
 		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  */

[Severity: High]
Does configuring this pin as PIN_OUTPUT disable the receiver (RXACTIVE=0) and break the internal clock loopback?

TI MMC controllers generally rely on this internal clock loopback path to synchronize incoming data for read operations. While the TRM documents the logical direction of the signal to the external card, disabling the input receiver might lead to eMMC read failures and timeouts.

Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +0 -0
 			AM62X_IOPAD(0x214, PIN_INPUT,        0) /* (AA2) MMC0_DAT0 */
 			AM62X_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */

[ ... ]

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */ · line 592

Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
@@ -589,7 +589,7 @@ AM62X_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
 	pinctrl_sdhci1: main-mmc1-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x23c, PIN_INPUT,        0) /* (A21) MMC1_CMD  */ /* SODIMM 74 */
-			AM62X_IOPAD(0x234, PIN_INPUT,        0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
+			AM62X_IOPAD(0x234, PIN_OUTPUT,       0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */

[Severity: High]
Could this change similarly break the SD card read loopback?

Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +0 -0
 			AM62X_IOPAD(0x230, PIN_INPUT,        0) /* (A22) MMC1_DAT0 */ /* SODIMM 80 */
 			AM62X_IOPAD(0x22c, PIN_INPUT,        0) /* (B21) MMC1_DAT1 */ /* SODIMM 82 */

[ ... ]

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */ · line 604

Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
@@ -601,7 +601,7 @@ AM62X_IOPAD(0x224, PIN_INPUT,        0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */
 	pinctrl_sdhci2: main-mmc2-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD   */ /* WiFi_SDIO_CMD   */
-			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
+			AM62X_IOPAD(0x118, PIN_OUTPUT,0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */

[Severity: High]
Will setting MMC2_CLK to PIN_OUTPUT clear the RXACTIVE bit and prevent the WiFi SDIO from properly reading data?

Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +0 -0
 			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0  */ /* WiFi_SDIO_DATA0 */
 			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1  */ /* WiFi_SDIO_DATA1 */
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw

+Judith

Quoted 31 lines · On Thu, Aug 13, 2026 at 11:24:58AM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver (RXACTIVE=0), which breaks the internal clock loopback required by the MMC controller for read operations. --

--- Patch [1]: [PATCH v1] arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT --- commit b7e315f9edd8f485234748a2f8e267539b5b0f30
Author: Francesco Dolcini <[email protected]>

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

This commit changes the MMC clock pins for the K3 AM62x Verdin module from PIN_INPUT to PIN_OUTPUT to match the TRM documentation, effectively disabling the receiver (RXACTIVE = 0).

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

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM · line 576

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
 	pinctrl_sdhci0: main-mmc0-default-pins {
 		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  */

[Severity: High]
Does configuring this pin as PIN_OUTPUT disable the receiver (RXACTIVE=0) and break the internal clock loopback?

Quoted 4 lines

TI MMC controllers generally rely on this internal clock loopback path to synchronize incoming data for read operations. While the TRM documents the logical direction of the signal to the external card, disabling the input receiver might lead to eMMC read failures and timeouts.

Judith: is sashiko right on this?

Thanks,
Francesco

#3 lore raw

Hi Francesco,

Quoted 34 lines · Francesco Dolcini

+Judith

Quoted 31 lines · On Thu, Aug 13, 2026 at 11:24:58AM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver (RXACTIVE=0), which breaks the internal clock loopback required by the MMC controller for read operations. --

--- Patch [1]: [PATCH v1] arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT --- commit b7e315f9edd8f485234748a2f8e267539b5b0f30
Author: Francesco Dolcini <[email protected]>

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

This commit changes the MMC clock pins for the K3 AM62x Verdin module from PIN_INPUT to PIN_OUTPUT to match the TRM documentation, effectively disabling the receiver (RXACTIVE = 0).

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

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM · line 576

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
  	pinctrl_sdhci0: main-mmc0-default-pins {
  		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  */

[Severity: High]
Does configuring this pin as PIN_OUTPUT disable the receiver (RXACTIVE=0) and break the internal clock loopback?

Quoted 6 lines
Quoted 4 lines

TI MMC controllers generally rely on this internal clock loopback path to synchronize incoming data for read operations. While the TRM documents the logical direction of the signal to the external card, disabling the input receiver might lead to eMMC read failures and timeouts.

Judith: is sashiko right on this?

Changing to PIN_OUTPUT should not break anything for you on AM62x based board. By default the input buffer for CLK pin is not used, CLKLB input buffer is used instead. CLKLB input is already configured for you by default, you should not be modifying CLKLB for MMC0 nor MMC1.

This logic does not apply for MMC2.

In any case, you should test once. If by any chance something does break, you modified the default in emmcsd_io_clklb_sel CTRL MMR register.

~ Judith

#4 lore raw
Quoted 42 lines · Judith

Hi Francesco,

Quoted 39 lines · Francesco Dolcini

+Judith

Quoted 35 lines · On Thu, Aug 13, 2026 at 11:24:58AM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver (RXACTIVE=0), which breaks the internal clock loopback required by the MMC controller for read operations. --

--- Patch [1]: [PATCH v1] arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT --- commit b7e315f9edd8f485234748a2f8e267539b5b0f30
Author: Francesco Dolcini <[email protected]>

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

This commit changes the MMC clock pins for the K3 AM62x Verdin module from PIN_INPUT to PIN_OUTPUT to match the TRM documentation, effectively disabling the receiver (RXACTIVE = 0).

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

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM · line 576

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
  	pinctrl_sdhci0: main-mmc0-default-pins {
  		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  */

[Severity: High]
Does configuring this pin as PIN_OUTPUT disable the receiver (RXACTIVE=0) and break the internal clock loopback?

TI MMC controllers generally rely on this internal clock loopback path to synchronize incoming data for read operations. While the TRM documents the logical direction of the signal to the external card, disabling the input receiver might lead to eMMC read failures and timeouts.

Quoted 7 lines
Quoted 1 line

Judith: is sashiko right on this?

Changing to PIN_OUTPUT should not break anything for you on AM62x based board. By default the input buffer for CLK pin is not used, CLKLB input buffer is used instead. CLKLB input is already configured for you by default, you should not be modifying CLKLB for MMC0 nor MMC1.

This logic does not apply for MMC2.

What do you mean? that MMC2_CLK should stay as input?

#5 lore raw
Quoted 44 lines · Francesco Dolcini
Quoted 43 lines · Judith

Hi Francesco,

Quoted 40 lines · Francesco Dolcini

+Judith

Quoted 31 lines · On Thu, Aug 13, 2026 at 11:24:58AM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver (RXACTIVE=0), which breaks the internal clock loopback required by the MMC controller for read operations. --

--- Patch [1]: [PATCH v1] arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT --- commit b7e315f9edd8f485234748a2f8e267539b5b0f30
Author: Francesco Dolcini <[email protected]>

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

This commit changes the MMC clock pins for the K3 AM62x Verdin module from PIN_INPUT to PIN_OUTPUT to match the TRM documentation, effectively disabling the receiver (RXACTIVE = 0).

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

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM · line 576

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +1 -1
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
   	pinctrl_sdhci0: main-mmc0-default-pins {
   		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  */

[Severity: High]
Does configuring this pin as PIN_OUTPUT disable the receiver (RXACTIVE=0) and break the internal clock loopback?

Quoted 4 lines

TI MMC controllers generally rely on this internal clock loopback path to synchronize incoming data for read operations. While the TRM documents the logical direction of the signal to the external card, disabling the input receiver might lead to eMMC read failures and timeouts.

Judith: is sashiko right on this?

Quoted 8 lines
Quoted 6 lines

Changing to PIN_OUTPUT should not break anything for you on AM62x based board. By default the input buffer for CLK pin is not used, CLKLB input buffer is used instead. CLKLB input is already configured for you by default, you should not be modifying CLKLB for MMC0 nor MMC1.

This logic does not apply for MMC2.

What do you mean? that MMC2_CLK should stay as input?

Well, there is a reason MMC2 CLKLB pin is defined in pinmux nodes on TI
boards (: By default, MMC2 CLKLB is disabled after reset unlike MMC0 and
MMC1. If we do not enable it in software -> PIN_INPUT, then the MMCSD loopback clock input would not work and your MMC2 would not work.

~ Judith

#6 lore raw

Francesco,

Quoted 57 lines · Judith
Quoted 54 lines · Francesco Dolcini
Quoted 53 lines · Judith

Hi Francesco,

Quoted 39 lines · Francesco Dolcini

+Judith

Quoted 36 lines · On Thu, Aug 13, 2026 at 11:24:58AM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting MMC clock pins to PIN_OUTPUT disables the receiver
(RXACTIVE=0), which breaks the internal clock loopback required by the MMC controller for read operations.

Signature · 12 lines
--- Patch [1]: [PATCH v1] arm64: dts: ti: k3-am62-verdin: Set MMC 
clock pins as OUTPUT ---
commit b7e315f9edd8f485234748a2f8e267539b5b0f30
Author: Francesco Dolcini <[email protected]>

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

This commit changes the MMC clock pins for the K3 AM62x Verdin module
from PIN_INPUT to PIN_OUTPUT to match the TRM documentation, effectively
disabling the receiver (RXACTIVE = 0).

Link: https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals [0]
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +0 -0
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) 
Quoted 8 lines

MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
       pinctrl_sdhci0: main-mmc0-default-pins { 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  */

[Severity: High]
Does configuring this pin as PIN_OUTPUT disable the receiver (RXACTIVE=0) and break the internal clock loopback?

Quoted 6 lines
Quoted 4 lines

TI MMC controllers generally rely on this internal clock loopback path to synchronize incoming data for read operations. While the TRM documents the logical direction of the signal to the external card, disabling the input receiver might lead to eMMC read failures and timeouts.

Judith: is sashiko right on this?

Changing to PIN_OUTPUT should not break anything for you on AM62x based board. By default the input buffer for CLK pin is not used, CLKLB input buffer is used instead. CLKLB input is already configured for you by default, you should not be modifying CLKLB for MMC0 nor MMC1.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

This logic does not apply for MMC2.

What do you mean? that MMC2_CLK should stay as input?

Well, there is a reason MMC2 CLKLB pin is defined in pinmux nodes on TI boards (: By default, MMC2 CLKLB is disabled after reset unlike MMC0 and

Meant to say MMC2 CLKLB input buffer is disabled after reset by default, as in, RX_ACTIVE=0.

Quoted 4 lines

MMC1. If we do not enable it in software -> PIN_INPUT, then the MMCSD loopback clock input would not work and your MMC2 would not work.

~ Judith

Reviewed-by on v1 1/1
#7 lore raw
In reply to Francesco Dolcini

Hi Francesco,

Quoted 10 lines · Francesco Dolcini

From: Francesco Dolcini <[email protected]>

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.

Link https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals [0]
Fixes 316b80246b16 ("arm64: dts: ti: add verdin am62")

Assuming defaults are set.

Quoted 35 lines
---
  arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +3 -3
index e97b2b047d10..895b1b7dcac7 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
  	pinctrl_sdhci0: main-mmc0-default-pins {
  		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 */
@@ -589,7 +589,7 @@ AM62X_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
  	pinctrl_sdhci1: main-mmc1-default-pins {
  		pinctrl-single,pins = <
  			AM62X_IOPAD(0x23c, PIN_INPUT,        0) /* (A21) MMC1_CMD  */ /* SODIMM 74 */
-			AM62X_IOPAD(0x234, PIN_INPUT,        0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
+			AM62X_IOPAD(0x234, PIN_OUTPUT,       0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
  			AM62X_IOPAD(0x230, PIN_INPUT,        0) /* (A22) MMC1_DAT0 */ /* SODIMM 80 */
  			AM62X_IOPAD(0x22c, PIN_INPUT,        0) /* (B21) MMC1_DAT1 */ /* SODIMM 82 */
  			AM62X_IOPAD(0x228, PIN_INPUT,        0) /* (C21) MMC1_DAT2 */ /* SODIMM 70 */
@@ -601,7 +601,7 @@ AM62X_IOPAD(0x224, PIN_INPUT,        0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */
  	pinctrl_sdhci2: main-mmc2-default-pins {
  		pinctrl-single,pins = <
  			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD   */ /* WiFi_SDIO_CMD   */
-			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
+			AM62X_IOPAD(0x118, PIN_OUTPUT,0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
  			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0  */ /* WiFi_SDIO_DATA0 */
  			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1  */ /* WiFi_SDIO_DATA1 */
  			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2  */ /* WiFi_SDIO_DATA2 */
#8 lore raw
Quoted 9 lines · Judith

Hi Francesco,

Quoted 6 lines · Francesco Dolcini

From: Francesco Dolcini <[email protected]>

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.

Quoted 6 lines
Quoted 4 lines
Link https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals [0]
Fixes 316b80246b16 ("arm64: dts: ti: add verdin am62")

Assuming defaults are set.

We have

AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */

is this what you are referring to here and in the other discussion thread?

Francesco

#9 lore raw

Hi Francesco,

Quoted 15 lines · Francesco Dolcini
Quoted 14 lines · Judith

Hi Francesco,

Quoted 10 lines · Francesco Dolcini

From: Francesco Dolcini <[email protected]>

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.

Link https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals [0]
Fixes 316b80246b16 ("arm64: dts: ti: add verdin am62")
Quoted 8 lines
Quoted 1 line

Assuming defaults are set.

We have

   AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */

is this what you are referring to here and in the other discussion thread?

Yes, without this defined, MMC2 would not work normally. You have it defined so you should not have any problems.

~ Judith

maintainer Applied
#10 lore raw
In reply to Francesco Dolcini

Hi Francesco Dolcini,

Quoted 3 lines · Francesco Dolcini

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 have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/1] arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT

      commit: 0ddd661c19ec1465e1f2c204fa9b2488acfabf4b

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git

Signature · 4 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource