Skip to contentSkip to conversation

Fix MMC properties on Sitara devices

PATCH Superseded Judith Mendez 3 participants 16 messages Feb 7, 2024 – Feb 12, 2024

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Fix MMC properties on Sitara devices

This patch series aims to add or fix MMC properties:
OTAPDLY/ITAPDLY.

The DLL properties ti,trm-icp and ti,driver-strength-ohm should also be updated since only AM64x and AM62p devices have a DLL to enable, so remove these properties when not applicable.

Also add support for eMMC on AM62ax platform.

This series was tested on:
- AM62a SK
- AM62x SK
- AM62p SK
- AM64x GP EVM
- AM64x SK EVM

Judith Mendez (7):
arm64: dts: ti: k3-am62a-main: Add sdhci2 instance
arm64: dts: ti: k3-am64-main: Fix ITAP/OTAP values for MMC
arm64: dts: ti: k3-am62p: Add ITAP/OTAP values for MMC
arm64: dts: ti: k3-am6*: Remove DLL properties for soft PHYs
arm64: dts: ti: k3-am6*: Fix ti,clkbuf-sel property in MMC nodes
arm64: dts: ti: k3-am6*: Fix bus-width property in MMC nodes
arm64: dts: ti: k3-am6*: Fix bootph-all property in MMC node

Nitin Yadav (2):
arm64: dts: ti: k3-am62a-main: Add sdhci0 instance
arm64: dts: ti: k3-am62a7-sk: Enable eMMC support

 arch/arm64/boot/dts/ti/k3-am62-main.dtsi      | 12 +++--
 .../arm64/boot/dts/ti/k3-am625-beagleplay.dts |  4 --
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi     | 45 ++++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts       | 27 ++++++++++-
 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi     | 44 ++++++++++++++++--
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts       |  5 +--
 .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi |  2 -
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi      | 15 +++++--
 arch/arm64/boot/dts/ti/k3-am642-evm.dts       |  4 +-
 arch/arm64/boot/dts/ti/k3-am642-sk.dts        |  2 -
 10 files changed, 130 insertions(+), 30 deletions(-)

base-commit: 1e6bbc5185bcd113c8d2f7aa0a02f588a6bdbe5d

Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/9 arm64: dts: ti: k3-am62a-main: Add sdhci0 instance

From: Nitin Yadav <[email protected]>

Add sdhci0 DT node in k3-am62a-main for eMMC support. Add otap/itap values according to the datasheet[0], refer to Table 7-79.

[0] https://www.ti.com/lit/ds/symlink/am62a3.pdf

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +18 -0
index 972971159a62..ce5f278235a4 100644
@@ -536,6 +536,24 @@ main_gpio1: gpio@601000 {
 		status = "disabled";
 	};
 
+	sdhci0: mmc@fa10000 {
+		compatible = "ti,am62-sdhci";
+		reg = <0x00 0xfa10000 0x00 0x260>, <0x00 0xfa18000 0x00 0x134>;
+		interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
+		clock-names = "clk_ahb", "clk_xin";
+		assigned-clocks = <&k3_clks 57 6>;
+		assigned-clock-parents = <&k3_clks 57 8>;
+		bus-width = <8>;
+		mmc-hs200-1_8v;
+		ti,clkbuf-sel = <0x7>;
+		ti,otap-del-sel-legacy = <0x0>;
+		ti,otap-del-sel-mmc-hs = <0x0>;
+		ti,otap-del-sel-hs200 = <0x6>;
+		status = "disabled";
+	};
+
 	sdhci1: mmc@fa00000 {
 		compatible = "ti,am62-sdhci";
 		reg = <0x00 0xfa00000 0x00 0x260>, <0x00 0xfa08000 0x00 0x134>;
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/9 arm64: dts: ti: k3-am62a-main: Add sdhci2 instance

In reply to Judith Mendez

Add sdhci2 DT node in k3-am62a-main for mmc2. Add otap/itap values according to the datasheet[0], Refer to Table 7-97.

[0] https://www.ti.com/lit/ds/symlink/am62a3.pdf

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +24 -0
index ce5f278235a4..6806288ec227 100644
@@ -579,6 +579,30 @@ sdhci1: mmc@fa00000 {
 		status = "disabled";
 	};
 
+	sdhci2: mmc@fa20000 {
+		compatible = "ti,am62-sdhci";
+		reg = <0x00 0xfa20000 0x00 0x260>, <0x00 0xfa28000 0x00 0x134>;
+		interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
+		clock-names = "clk_ahb", "clk_xin";
+		bus-width = <4>;
+		ti,clkbuf-sel = <0x7>;
+		ti,otap-del-sel-legacy = <0x0>;
+		ti,otap-del-sel-sd-hs = <0x0>;
+		ti,otap-del-sel-sdr12 = <0xf>;
+		ti,otap-del-sel-sdr25 = <0xf>;
+		ti,otap-del-sel-sdr50 = <0xc>;
+		ti,otap-del-sel-sdr104 = <0x6>;
+		ti,otap-del-sel-ddr50 = <0x9>;
+		ti,itap-del-sel-legacy = <0x0>;
+		ti,itap-del-sel-sd-hs = <0x0>;
+		ti,itap-del-sel-sdr12 = <0x0>;
+		ti,itap-del-sel-sdr25 = <0x0>;
+		no-1-8-v;
+		status = "disabled";
+	};
+
 	usbss0: dwc3-usb@f900000 {
 		compatible = "ti,am62-usb";
 		reg = <0x00 0x0f900000 0x00 0x800>;
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/9 arm64: dts: ti: k3-am62a7-sk: Enable eMMC support

In reply to Judith Mendez

From: Nitin Yadav <[email protected]>

Add support for 32GB eMMC card on AM62A7 SK. Includes adding mmc0 pins settings. Add mmc0 alias for sdhci0 in k3-am62a7-sk.dts.

---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 26 +++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +26 -0
index f5ae91bf1bdb..c99b2e90f76d 100644
@@ -20,6 +20,7 @@ aliases {
 		serial0 = &wkup_uart0;
 		serial2 = &main_uart0;
 		serial3 = &main_uart1;
+		mmc0 = &sdhci0;
 		mmc1 = &sdhci1;
 	};
 
@@ -263,6 +264,22 @@ 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(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 */
+			AM62AX_IOPAD(0x208, PIN_INPUT_PULLUP, 0) /* (Y4) MMC0_DAT3 */
+			AM62AX_IOPAD(0x204, PIN_INPUT_PULLUP, 0) /* (AB2) MMC0_DAT4 */
+			AM62AX_IOPAD(0x200, PIN_INPUT_PULLUP, 0) /* (AC1) MMC0_DAT5 */
+			AM62AX_IOPAD(0x1fc, PIN_INPUT_PULLUP, 0) /* (AD2) MMC0_DAT6 */
+			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 */
@@ -550,6 +567,15 @@ &main_i2c2 {
 	clock-frequency = <400000>;
 };
 
+&sdhci0 {
+	/* eMMC */
+	status = "okay";
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_mmc0_pins_default>;
+	disable-wp;
+};
+
 &sdhci1 {
 	/* SD/MMC */
 	status = "okay";
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/9 arm64: dts: ti: k3-am64-main: Fix ITAP/OTAP values for MMC

In reply to Judith Mendez

Update MMC0/MMC1 OTAP/ITAP values according to the datasheet [0], refer to Table 7-68 for MMC0 and Table 7-77 for MMC1.

[0] https://www.ti.com/lit/ds/symlink/am6442.pdf

Fixes 8abae9389bdb ("arm64: dts: ti: Add support for AM642 SoC")
---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +8 -1
index ddd382a0d735..9bfa0a969bfc 100644
@@ -633,6 +633,9 @@ sdhci0: mmc@fa10000 {
 		ti,otap-del-sel-mmc-hs = <0x0>;
 		ti,otap-del-sel-ddr52 = <0x6>;
 		ti,otap-del-sel-hs200 = <0x7>;
+		ti,itap-del-sel-legacy = <0x10>;
+		ti,itap-del-sel-mmc-hs = <0xa>;
+		ti,itap-del-sel-ddr52 = <0x3>;
 		status = "disabled";
 	};
 
@@ -645,12 +648,16 @@ sdhci1: mmc@fa00000 {
 		clock-names = "clk_ahb", "clk_xin";
 		ti,trm-icp = <0x2>;
 		ti,otap-del-sel-legacy = <0x0>;
-		ti,otap-del-sel-sd-hs = <0xf>;
+		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
 		ti,otap-del-sel-sdr25 = <0xf>;
 		ti,otap-del-sel-sdr50 = <0xc>;
 		ti,otap-del-sel-sdr104 = <0x6>;
 		ti,otap-del-sel-ddr50 = <0x9>;
+		ti,itap-del-sel-legacy = <0x0>;
+		ti,itap-del-sel-sd-hs = <0x0>;
+		ti,itap-del-sel-sdr12 = <0x0>;
+		ti,itap-del-sel-sdr25 = <0x0>;
 		ti,clkbuf-sel = <0x7>;
 		status = "disabled";
 	};
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/9 arm64: dts: ti: k3-am62p: Add ITAP/OTAP values for MMC

In reply to Judith Mendez

Add OTAP/ITAP values to enable HS400 timing for MMC0 and SDR104 timing for MMC1/MMC2. Remove no-1-8-v property to enable the highest speed mode possible.

Update MMC OTAP/ITAP values according to the datasheet [0], refer to Table 7-79 for MMC0 and Table 7-97 for MMC1/MMC2.

[0] https://www.ti.com/lit/ds/symlink/am62p.pdf

---
 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 44 +++++++++++++++++++++--
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts   |  1 -
 2 files changed, 41 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi +41 -3
index ef1c982a90d8..e43530beb79f 100644
@@ -534,7 +534,21 @@ sdhci0: mmc@fa10000 {
 		clock-names = "clk_ahb", "clk_xin";
 		assigned-clocks = <&k3_clks 57 2>;
 		assigned-clock-parents = <&k3_clks 57 4>;
-		ti,otap-del-sel-legacy = <0x0>;
+		bus-width = <8>;
+		mmc-ddr-1_8v;
+		mmc-hs200-1_8v;
+		mmc-hs400-1_8v;
+		ti,clkbuf-sel = <0x7>;
+		ti,strobe-sel = <0x77>;
+		ti,trm-icp = <0x8>;
+		ti,otap-del-sel-legacy = <0x1>;
+		ti,otap-del-sel-mmc-hs = <0x1>;
+		ti,otap-del-sel-ddr52 = <0x6>;
+		ti,otap-del-sel-hs200 = <0x8>;
+		ti,otap-del-sel-hs400 = <0x5>;
+		ti,itap-del-sel-legacy = <0x10>;
+		ti,itap-del-sel-mmc-hs = <0xa>;
+		ti,itap-del-sel-ddr52 = <0x3>;
 		status = "disabled";
 	};
 
@@ -545,7 +559,19 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
-		ti,otap-del-sel-legacy = <0x8>;
+		bus-width = <4>;
+		ti,clkbuf-sel = <0x7>;
+		ti,otap-del-sel-legacy = <0x0>;
+		ti,otap-del-sel-sd-hs = <0x0>;
+		ti,otap-del-sel-sdr12 = <0xf>;
+		ti,otap-del-sel-sdr25 = <0xf>;
+		ti,otap-del-sel-sdr50 = <0xc>;
+		ti,otap-del-sel-ddr50 = <0x9>;
+		ti,otap-del-sel-sdr104 = <0x6>;
+		ti,itap-del-sel-legacy = <0x0>;
+		ti,itap-del-sel-sd-hs = <0x0>;
+		ti,itap-del-sel-sdr12 = <0x0>;
+		ti,itap-del-sel-sdr25 = <0x0>;
 		status = "disabled";
 	};
 
@@ -556,7 +582,19 @@ sdhci2: mmc@fa20000 {
 		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
 		clock-names = "clk_ahb", "clk_xin";
-		ti,otap-del-sel-legacy = <0x8>;
+		bus-width = <4>;
+		ti,clkbuf-sel = <0x7>;
+		ti,otap-del-sel-legacy = <0x0>;
+		ti,otap-del-sel-sd-hs = <0x0>;
+		ti,otap-del-sel-sdr12 = <0xf>;
+		ti,otap-del-sel-sdr25 = <0xf>;
+		ti,otap-del-sel-sdr50 = <0xc>;
+		ti,otap-del-sel-ddr50 = <0x9>;
+		ti,otap-del-sel-sdr104 = <0x6>;
+		ti,itap-del-sel-legacy = <0x0>;
+		ti,itap-del-sel-sd-hs = <0x0>;
+		ti,itap-del-sel-sdr12 = <0x0>;
+		ti,itap-del-sel-sdr25 = <0x0>;
 		status = "disabled";
 	};
 
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +0 -1
index 95a0146279b1..8c73587b0b62 100644
@@ -424,7 +424,6 @@ &sdhci1 {
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	ti,driver-strength-ohm = <50>;
 	disable-wp;
-	no-1-8-v;
 	bootph-all;
 };
 
Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/9 arm64: dts: ti: k3-am6*: Remove DLL properties for soft PHYs

In reply to Judith Mendez

Remove DLL properties which are not applicable for soft PHYs since these PHYs do not have a DLL to enable.

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi       | 3 ---
 arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 3 ---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi      | 1 -
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts        | 1 -
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts        | 1 -
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 2 --
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi       | 1 -
 arch/arm64/boot/dts/ti/k3-am642-evm.dts        | 1 -
 arch/arm64/boot/dts/ti/k3-am642-sk.dts         | 1 -
 9 files changed, 14 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +0 -3
index fe0cc4a9a501..79ed5cbbbda1 100644
@@ -561,7 +561,6 @@ sdhci0: mmc@fa10000 {
 		assigned-clock-parents = <&k3_clks 57 8>;
 		mmc-ddr-1_8v;
 		mmc-hs200-1_8v;
-		ti,trm-icp = <0x2>;
 		bus-width = <8>;
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
@@ -580,7 +579,6 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
-		ti,trm-icp = <0x2>;
 		ti,otap-del-sel-legacy = <0x8>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0x0>;
@@ -604,7 +602,6 @@ sdhci2: mmc@fa20000 {
 		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
 		clock-names = "clk_ahb", "clk_xin";
-		ti,trm-icp = <0x2>;
 		ti,otap-del-sel-legacy = <0x8>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0x0>;
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts +0 -3
index 3b4246ce49de..bb6a5837bcb3 100644
@@ -819,7 +819,6 @@ &sdhci0 {
 	bootph-all;
 	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 	status = "okay";
 };
@@ -832,7 +831,6 @@ &sdhci1 {
 
 	vmmc-supply = <&vdd_3v3_sd>;
 	vqmmc-supply = <&vdd_sd_dv>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 	cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>;
 	cd-debounce-delay-ms = <100>;
@@ -849,7 +847,6 @@ &sdhci2 {
 	ti,fails-without-test-cd;
 	cap-power-off-card;
 	keep-power-in-suspend;
-	ti,driver-strength-ohm = <50>;
 	assigned-clocks = <&k3_clks 157 158>;
 	assigned-clock-parents = <&k3_clks 157 160>;
 	#address-cells = <1>;
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +0 -1
index 6806288ec227..f283777d54b4 100644
@@ -561,7 +561,6 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
-		ti,trm-icp = <0x2>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +0 -1
index c99b2e90f76d..f241637a5642 100644
@@ -582,7 +582,6 @@ &sdhci1 {
 	vmmc-supply = <&vdd_mmc1>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc1_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 };
 
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +0 -1
index 8c73587b0b62..5c9b73726ebd 100644
@@ -422,7 +422,6 @@ &sdhci1 {
 	vqmmc-supply = <&vddshv_sdio>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc1_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 	bootph-all;
 };
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0 -2
index 6dd496cd459a..3c45782ab2b7 100644
@@ -411,7 +411,6 @@ &sdhci0 {
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc0_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 };
 
@@ -421,7 +420,6 @@ &sdhci1 {
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc1_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 };
 
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +0 -1
index 9bfa0a969bfc..a29847735c6e 100644
@@ -646,7 +646,6 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 3>, <&k3_clks 58 4>;
 		clock-names = "clk_ahb", "clk_xin";
-		ti,trm-icp = <0x2>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
arch/arm64/boot/dts/ti/k3-am642-evm.dts +0 -1
index 5c546ae76d3e..f308076d608a 100644
@@ -508,7 +508,6 @@ &sdhci1 {
 	pinctrl-names = "default";
 	bus-width = <4>;
 	pinctrl-0 = <&main_mmc1_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 };
 
arch/arm64/boot/dts/ti/k3-am642-sk.dts +0 -1
index cce04e188ff6..b286eaa02ada 100644
@@ -471,7 +471,6 @@ &sdhci1 {
 	pinctrl-names = "default";
 	bus-width = <4>;
 	pinctrl-0 = <&main_mmc1_pins_default>;
-	ti,driver-strength-ohm = <50>;
 	disable-wp;
 };
 
Signature · 1 line
2.43.0
#7 lore raw

Re: [PATCH v1 6/9] arm64: dts: ti: k3-am6*: Remove DLL properties for soft PHYs

Quoted 4 lines · Judith Mendez

Remove DLL properties which are not applicable for soft PHYs since these PHYs do not have a DLL to enable.

Quoted 11 lines
---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi       | 3 ---
 arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 3 ---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi      | 1 -
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts        | 1 -
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts        | 1 -
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 2 --
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi       | 1 -
 arch/arm64/boot/dts/ti/k3-am642-evm.dts        | 1 -
 arch/arm64/boot/dts/ti/k3-am642-sk.dts         | 1 -
 9 files changed, 14 deletions(-)

you missed k3-am62-verdin-dev.dtsi and more ?

$ ack --dts -g k3-am6[24] | ack -x -l ti,driver-strength-ohm
arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts
arch/arm64/boot/dts/ti/k3-am625-phyboard-lyra-rdk.dts
arch/arm64/boot/dts/ti/k3-am62-verdin-wifi.dtsi
arch/arm64/boot/dts/ti/k3-am642-tqma64xxl.dtsi
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
arch/arm64/boot/dts/ti/k3-am642-evm.dts
arch/arm64/boot/dts/ti/k3-am642-sk.dts
arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts
arch/arm64/boot/dts/ti/k3-am62-phycore-som.dtsi
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi

Francesco

#8 lore raw

Re: [PATCH v1 6/9] arm64: dts: ti: k3-am6*: Remove DLL properties for soft PHYs

Hi Francesco,

Quoted 17 lines · Francesco Dolcini
Quoted 4 lines · Judith Mendez

Remove DLL properties which are not applicable for soft PHYs since these PHYs do not have a DLL to enable.

Quoted 11 lines
---
  arch/arm64/boot/dts/ti/k3-am62-main.dtsi       | 3 ---
  arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 3 ---
  arch/arm64/boot/dts/ti/k3-am62a-main.dtsi      | 1 -
  arch/arm64/boot/dts/ti/k3-am62a7-sk.dts        | 1 -
  arch/arm64/boot/dts/ti/k3-am62p5-sk.dts        | 1 -
  arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 2 --
  arch/arm64/boot/dts/ti/k3-am64-main.dtsi       | 1 -
  arch/arm64/boot/dts/ti/k3-am642-evm.dts        | 1 -
  arch/arm64/boot/dts/ti/k3-am642-sk.dts         | 1 -
  9 files changed, 14 deletions(-)
Quoted 1 line

you missed k3-am62-verdin-dev.dtsi and more ?

ok, will include in v2.

Quoted 19 lines
$ ack --dts -g k3-am6[24] | ack -x -l ti,driver-strength-ohm
arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts
arch/arm64/boot/dts/ti/k3-am625-phyboard-lyra-rdk.dts
arch/arm64/boot/dts/ti/k3-am62-verdin-wifi.dtsi
arch/arm64/boot/dts/ti/k3-am642-tqma64xxl.dtsi
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
arch/arm64/boot/dts/ti/k3-am642-evm.dts
arch/arm64/boot/dts/ti/k3-am642-sk.dts
arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts
arch/arm64/boot/dts/ti/k3-am62-phycore-som.dtsi
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi
Quoted 2 lines

Francesco

~ Judith

#9 lore raw

PATCH 7/9 arm64: dts: ti: k3-am6*: Fix ti,clkbuf-sel property in MMC nodes

In reply to Judith Mendez

Move ti,clkbuf-sel property above the OTAP/ITAP delay values. While there is no error with where it is currently at, it is easier to read the MMC node if ti,clkbuf-sel is located above the OTAP/ITAP delay values consistently across MMC nodes.

Add missing ti,clkbuf-sel for MMC0 in k3-am64-main.

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi  | 4 ++--
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 2 +-
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi  | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +2 -2
index 79ed5cbbbda1..410b390ce5d5 100644
@@ -579,6 +579,7 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
+		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x8>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0x0>;
@@ -590,7 +591,6 @@ sdhci1: mmc@fa00000 {
 		ti,itap-del-sel-sd-hs = <0x1>;
 		ti,itap-del-sel-sdr12 = <0xa>;
 		ti,itap-del-sel-sdr25 = <0x1>;
-		ti,clkbuf-sel = <0x7>;
 		bus-width = <4>;
 		status = "disabled";
 	};
@@ -602,6 +602,7 @@ sdhci2: mmc@fa20000 {
 		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
 		clock-names = "clk_ahb", "clk_xin";
+		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x8>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0x0>;
@@ -613,7 +614,6 @@ sdhci2: mmc@fa20000 {
 		ti,itap-del-sel-sd-hs = <0xa>;
 		ti,itap-del-sel-sdr12 = <0xa>;
 		ti,itap-del-sel-sdr25 = <0x1>;
-		ti,clkbuf-sel = <0x7>;
 		status = "disabled";
 	};
 
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +1 -1
index f283777d54b4..ddb76cd66f88 100644
@@ -561,6 +561,7 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
+		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
@@ -572,7 +573,6 @@ sdhci1: mmc@fa00000 {
 		ti,itap-del-sel-sd-hs = <0x0>;
 		ti,itap-del-sel-sdr12 = <0x0>;
 		ti,itap-del-sel-sdr25 = <0x0>;
-		ti,clkbuf-sel = <0x7>;
 		bus-width = <4>;
 		no-1-8-v;
 		status = "disabled";
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +2 -1
index a29847735c6e..bea05be7cb48 100644
@@ -628,6 +628,7 @@ sdhci0: mmc@fa10000 {
 		clock-names = "clk_ahb", "clk_xin";
 		mmc-ddr-1_8v;
 		mmc-hs200-1_8v;
+		ti,clkbuf-sel = <0x7>;
 		ti,trm-icp = <0x2>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-mmc-hs = <0x0>;
@@ -646,6 +647,7 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 3>, <&k3_clks 58 4>;
 		clock-names = "clk_ahb", "clk_xin";
+		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
@@ -657,7 +659,6 @@ sdhci1: mmc@fa00000 {
 		ti,itap-del-sel-sd-hs = <0x0>;
 		ti,itap-del-sel-sdr12 = <0x0>;
 		ti,itap-del-sel-sdr25 = <0x0>;
-		ti,clkbuf-sel = <0x7>;
 		status = "disabled";
 	};
 
Signature · 1 line
2.43.0
#10 lore raw

PATCH 8/9 arm64: dts: ti: k3-am6*: Fix bus-width property in MMC nodes

In reply to Judith Mendez

Move bus-width property to *main.dtsi, above the OTAP/ITAP delay values. While there is no error with where it is currently at, it is easier to read the MMC node if the bus-width property is located above the OTAP/ITAP delay values consistently across MMC nodes.

Add missing bus-width for MMC2 in k3-am62-main.

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi       | 5 +++--
 arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 1 -
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi      | 2 +-
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi       | 2 ++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts        | 2 --
 arch/arm64/boot/dts/ti/k3-am642-sk.dts         | 1 -
 6 files changed, 6 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +3 -2
index 410b390ce5d5..55420eb1c620 100644
@@ -559,9 +559,9 @@ sdhci0: mmc@fa10000 {
 		clock-names = "clk_ahb", "clk_xin";
 		assigned-clocks = <&k3_clks 57 6>;
 		assigned-clock-parents = <&k3_clks 57 8>;
+		bus-width = <8>;
 		mmc-ddr-1_8v;
 		mmc-hs200-1_8v;
-		bus-width = <8>;
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-mmc-hs = <0x0>;
@@ -579,6 +579,7 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
+		bus-width = <4>;
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x8>;
 		ti,otap-del-sel-sd-hs = <0x0>;
@@ -591,7 +592,6 @@ sdhci1: mmc@fa00000 {
 		ti,itap-del-sel-sd-hs = <0x1>;
 		ti,itap-del-sel-sdr12 = <0xa>;
 		ti,itap-del-sel-sdr25 = <0x1>;
-		bus-width = <4>;
 		status = "disabled";
 	};
 
@@ -602,6 +602,7 @@ sdhci2: mmc@fa20000 {
 		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
 		clock-names = "clk_ahb", "clk_xin";
+		bus-width = <4>;
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x8>;
 		ti,otap-del-sel-sd-hs = <0x0>;
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts +0 -1
index bb6a5837bcb3..a34e0df2ab86 100644
@@ -842,7 +842,6 @@ &sdhci2 {
 	vmmc-supply = <&wlan_en>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&wifi_pins_default>, <&wifi_32k_clk>;
-	bus-width = <4>;
 	non-removable;
 	ti,fails-without-test-cd;
 	cap-power-off-card;
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +1 -1
index ddb76cd66f88..253c1857eedf 100644
@@ -561,6 +561,7 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
 		clock-names = "clk_ahb", "clk_xin";
+		bus-width = <4>;
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-sd-hs = <0x0>;
@@ -573,7 +574,6 @@ sdhci1: mmc@fa00000 {
 		ti,itap-del-sel-sd-hs = <0x0>;
 		ti,itap-del-sel-sdr12 = <0x0>;
 		ti,itap-del-sel-sdr25 = <0x0>;
-		bus-width = <4>;
 		no-1-8-v;
 		status = "disabled";
 	};
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +2 -0
index bea05be7cb48..bc9c9ff993e6 100644
@@ -626,6 +626,7 @@ sdhci0: mmc@fa10000 {
 		power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 57 0>, <&k3_clks 57 1>;
 		clock-names = "clk_ahb", "clk_xin";
+		bus-width = <8>;
 		mmc-ddr-1_8v;
 		mmc-hs200-1_8v;
 		ti,clkbuf-sel = <0x7>;
@@ -647,6 +648,7 @@ sdhci1: mmc@fa00000 {
 		power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 58 3>, <&k3_clks 58 4>;
 		clock-names = "clk_ahb", "clk_xin";
+		bus-width = <4>;
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-sd-hs = <0x0>;
arch/arm64/boot/dts/ti/k3-am642-evm.dts +0 -2
index f308076d608a..83f2b00726b5 100644
@@ -494,7 +494,6 @@ eeprom@0 {
 /* eMMC */
 &sdhci0 {
 	status = "okay";
-	bus-width = <8>;
 	non-removable;
 	ti,driver-strength-ohm = <50>;
 	disable-wp;
@@ -506,7 +505,6 @@ &sdhci1 {
 	status = "okay";
 	vmmc-supply = <&vdd_mmc1>;
 	pinctrl-names = "default";
-	bus-width = <4>;
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	disable-wp;
 };
arch/arm64/boot/dts/ti/k3-am642-sk.dts +0 -1
index b286eaa02ada..67cd41bf806e 100644
@@ -469,7 +469,6 @@ &sdhci1 {
 	status = "okay";
 	vmmc-supply = <&vdd_mmc1>;
 	pinctrl-names = "default";
-	bus-width = <4>;
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	disable-wp;
 };
Signature · 1 line
2.43.0
#11 lore raw

PATCH 9/9 arm64: dts: ti: k3-am6*: Fix bootph-all property in MMC node

In reply to Judith Mendez

Add missing bootph-all property for AM62p MMC0 and AM64x MMC0 nodes.

Move the location of bootph-all property in MMC1 for k3-am62p5-sk to match Sitara board files.

---
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 3 ++-
 arch/arm64/boot/dts/ti/k3-am642-evm.dts | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +2 -1
index 5c9b73726ebd..17c6c2fc0e09 100644
@@ -410,6 +410,7 @@ &main_i2c2 {
 };
 
 &sdhci0 {
+	bootph-all;
 	status = "okay";
 	ti,driver-strength-ohm = <50>;
 	disable-wp;
@@ -417,13 +418,13 @@ &sdhci0 {
 
 &sdhci1 {
 	/* SD/MMC */
+	bootph-all;
 	status = "okay";
 	vmmc-supply = <&vdd_mmc1>;
 	vqmmc-supply = <&vddshv_sdio>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	disable-wp;
-	bootph-all;
 };
 
 &cpsw3g {
arch/arm64/boot/dts/ti/k3-am642-evm.dts +1 -0
index 83f2b00726b5..84619782e52d 100644
@@ -493,6 +493,7 @@ eeprom@0 {
 
 /* eMMC */
 &sdhci0 {
+	bootph-all;
 	status = "okay";
 	non-removable;
 	ti,driver-strength-ohm = <50>;
Signature · 1 line
2.43.0
maintainer
#12 lore raw

Re: [PATCH v1 9/9] arm64: dts: ti: k3-am6*: Fix bootph-all property in MMC node

arch/arm64/boot/dts/ti/k3-am62p5-sk.dts &sdhci0 { · line 426

Quoted 10 lines · Judith Mendez

&sdhci1 {

arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +1 -1
 	/* SD/MMC */
+	bootph-all;
 	status = "okay";
 	vmmc-supply = <&vdd_mmc1>;
 	vqmmc-supply = <&vddshv_sdio>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	disable-wp;
-	bootph-all;

NAK! Read [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n117

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#13 lore raw

Re: [PATCH v1 9/9] arm64: dts: ti: k3-am6*: Fix bootph-all property in MMC node

Hi Nishanth,

Quoted 15 lines · Nishanth Menon

arch/arm64/boot/dts/ti/k3-am62p5-sk.dts &sdhci0 { · line 426

Quoted 10 lines · Judith Mendez
  &sdhci1 {
  	/* SD/MMC */
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +1 -1
+	bootph-all;
  	status = "okay";
  	vmmc-supply = <&vdd_mmc1>;
  	vqmmc-supply = <&vddshv_sdio>;
  	pinctrl-names = "default";
  	pinctrl-0 = <&main_mmc1_pins_default>;
  	disable-wp;
-	bootph-all;

NAK! Read [1]

Quoted 2 lines

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n117

No worries, I can remove this change.

~ Judith

#14 lore raw
In reply to Judith Mendez

Hello Judith and TI folks,

Quoted 7 lines · Judith Mendez

This patch series aims to add or fix MMC properties:
OTAPDLY/ITAPDLY.

The DLL properties ti,trm-icp and ti,driver-strength-ohm should also be updated since only AM64x and AM62p devices have a DLL to enable, so remove these properties when not applicable.

Do you have any reference regarding this change? TI reference manual or anything like that?

No change needed in sdhci_am654.c? It seems that drv_strength is written to some register unconditionally, is it ok to do so?

Do this change implies that there is no way to configure the drive strength on such SoCs and MMC/SD trace impedance must be the nominal 50ohm?

Thanks,
Francesco

#15 lore raw

Hi Francesco,

Quoted 6 lines · Francesco Dolcini

Hello Judith and TI folks,

Quoted 3 lines · Judith Mendez

This patch series aims to add or fix MMC properties:
OTAPDLY/ITAPDLY.

Quoted 7 lines
Quoted 4 lines

The DLL properties ti,trm-icp and ti,driver-strength-ohm should also be updated since only AM64x and AM62p devices have a DLL to enable, so remove these properties when not applicable.

Do you have any reference regarding this change? TI reference manual or anything like that?

I believe there is no specific documentation that states outright that these device tree properties are not applicable for devices like AM62x.

There are a few hints in the device datasheet and TRM, if the MMC PHY has a DLL to enable, DLL properties should show in both docs.

Also, you can read the MMC bindings doc description:
https://github.com/torvalds/linux/blob/master/Documentation/devicetree
/bindings/mmc/sdhci-am654.yaml#L179

Quoted 3 lines

No change needed in sdhci_am654.c? It seems that drv_strength is written to some register unconditionally, is it ok to do so?

Actually, we only write this value to the register if there is a DLL to enable. If we have this property in device tree for devices like AM62x and AM62ax, this property is ignored in the driver. So I am removing this property from device tree as part of the effort to clean up MMC nodes in device tree.

Quoted 4 lines

Do this change implies that there is no way to configure the drive strength on such SoCs and MMC/SD trace impedance must be the nominal 50ohm?

We do not support changing drive strength for these devices. My understanding is that the drive strength should default to about 40 ohms, which should be good enough for any eMMC operating mode.

~ Judith

Quoted 4 lines

Thanks,
Francesco