2024-02-07 22:56:25

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v1 0/9] 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
--
2.43.0



2024-02-07 22:56:26

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v1 8/9] arm64: dts: ti: k3-am6*: Fix bus-width property in MMC nodes

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.

Signed-off-by: Judith Mendez <[email protected]>
---
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(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index 410b390ce5d5..55420eb1c620 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
index bb6a5837bcb3..a34e0df2ab86 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
@@ -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;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index ddb76cd66f88..253c1857eedf 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -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";
};
diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index bea05be7cb48..bc9c9ff993e6 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index f308076d608a..83f2b00726b5 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -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;
};
diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
index b286eaa02ada..67cd41bf806e 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -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;
};
--
2.43.0


2024-02-07 22:57:05

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v1 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

Signed-off-by: Nitin Yadav <[email protected]>
Signed-off-by: Judith Mendez <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index 972971159a62..ce5f278235a4 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -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>;
--
2.43.0


2024-02-07 22:57:06

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v1 4/9] arm64: dts: ti: k3-am64-main: Fix ITAP/OTAP values for MMC

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")
Signed-off-by: Judith Mendez <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index ddd382a0d735..9bfa0a969bfc 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -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";
};
--
2.43.0


2024-02-07 22:57:19

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v1 3/9] arm64: dts: ti: k3-am62a7-sk: Enable eMMC support

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.

Signed-off-by: Nitin Yadav <[email protected]>
Signed-off-by: Judith Mendez <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index f5ae91bf1bdb..c99b2e90f76d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -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";
--
2.43.0


2024-02-07 22:57:27

by Judith Mendez

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

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

Signed-off-by: Judith Mendez <[email protected]>
---
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(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index fe0cc4a9a501..79ed5cbbbda1 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
index 3b4246ce49de..bb6a5837bcb3 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index 6806288ec227..f283777d54b4 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index c99b2e90f76d..f241637a5642 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -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;
};

diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
index 8c73587b0b62..5c9b73726ebd 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
@@ -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;
};
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
index 6dd496cd459a..3c45782ab2b7 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
@@ -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;
};

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index 9bfa0a969bfc..a29847735c6e 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index 5c546ae76d3e..f308076d608a 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -508,7 +508,6 @@ &sdhci1 {
pinctrl-names = "default";
bus-width = <4>;
pinctrl-0 = <&main_mmc1_pins_default>;
- ti,driver-strength-ohm = <50>;
disable-wp;
};

diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
index cce04e188ff6..b286eaa02ada 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -471,7 +471,6 @@ &sdhci1 {
pinctrl-names = "default";
bus-width = <4>;
pinctrl-0 = <&main_mmc1_pins_default>;
- ti,driver-strength-ohm = <50>;
disable-wp;
};

--
2.43.0


2024-02-07 22:57:30

by Judith Mendez

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

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.

Signed-off-by: Judith Mendez <[email protected]>
---
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(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
index 5c9b73726ebd..17c6c2fc0e09 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
@@ -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 {
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index 83f2b00726b5..84619782e52d 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -493,6 +493,7 @@ eeprom@0 {

/* eMMC */
&sdhci0 {
+ bootph-all;
status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
--
2.43.0


2024-02-09 18:00:22

by Nishanth Menon

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

On 16:55-20240207, Judith Mendez wrote:
> &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;

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

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2024-02-09 18:05:35

by Francesco Dolcini

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

On Wed, Feb 07, 2024 at 04:55:23PM -0600, Judith Mendez wrote:
> Remove DLL properties which are not applicable for soft PHYs
> since these PHYs do not have a DLL to enable.
>
> Signed-off-by: Judith Mendez <[email protected]>
> ---
> 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


2024-02-09 22:27:48

by Judith Mendez

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

Hi Nishanth,

On 2/9/24 11:27 AM, Nishanth Menon wrote:
> On 16:55-20240207, Judith Mendez wrote:
>> &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;
>
> 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
>

No worries, I can remove this change.

~ Judith

2024-02-09 22:52:20

by Judith Mendez

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

Hi Francesco,

On 2/9/24 12:05 PM, Francesco Dolcini wrote:
> On Wed, Feb 07, 2024 at 04:55:23PM -0600, Judith Mendez wrote:
>> Remove DLL properties which are not applicable for soft PHYs
>> since these PHYs do not have a DLL to enable.
>>
>> Signed-off-by: Judith Mendez <[email protected]>
>> ---
>> 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 ?

ok, will include in v2.

>
> $ 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
>

~ Judith

2024-02-11 15:45:22

by Francesco Dolcini

[permalink] [raw]
Subject: Re: [PATCH v1 0/9] Fix MMC properties on Sitara devices

Hello Judith and TI folks,

On Wed, Feb 07, 2024 at 04:55:17PM -0600, Judith Mendez wrote:
> 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


2024-02-12 17:36:28

by Judith Mendez

[permalink] [raw]
Subject: Re: [PATCH v1 0/9] Fix MMC properties on Sitara devices

Hi Francesco,

On 2/11/24 9:44 AM, Francesco Dolcini wrote:
> Hello Judith and TI folks,
>
> On Wed, Feb 07, 2024 at 04:55:17PM -0600, Judith Mendez wrote:
>> 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?

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

>
> 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.

>
> 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

>
> Thanks,
> Francesco
>