2020-07-10 19:03:23

by Faiz Abbas

[permalink] [raw]
Subject: [PATCH 0/2] Add support for SD card on on AM65x-evm

The following patches add support for SD card node in am654x-evm

Because of fundamental interface issues (see patch 2 for details),
SD card was never enabled for silicon revision 1.0

These issues have been fixed with SR2.0 but boards with SR1.0 are
recommended to disable this node

These patches depend on kernel patches for supporting silicon revision
2.0 posted here:
https://patchwork.kernel.org/project/linux-mmc/list/?series=305565

The dependencies have been picked up and are in linux-next

Faiz Abbas (2):
arm64: dts: ti: k3-am65-main: Add support for sdhci1
arm64: dts: ti: k3-am654-base-board: Add support for SD card

arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 24 +++++++++++++++++++
.../arm64/boot/dts/ti/k3-am654-base-board.dts | 24 +++++++++++++++++++
2 files changed, 48 insertions(+)

--
2.17.1


2020-07-10 19:07:01

by Faiz Abbas

[permalink] [raw]
Subject: [PATCH 1/2] arm64: dts: ti: k3-am65-main: Add support for sdhci1

Add support for the 2nd SDHCI controller on TI's AM654x SoCs.
Although it supports upto SDR104 (100 MBps @ 200 MHz) speed mode,
only enable support upto High Speed (25 MBps @ 50 MHz) for now.

Signed-off-by: Faiz Abbas <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 3a4effee8fba..dfb429bed56d 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -259,6 +259,30 @@
dma-coherent;
};

+ sdhci1: sdhci@4fa0000 {
+ compatible = "ti,am654-sdhci-5.1";
+ reg = <0x0 0x4fa0000 0x0 0x260>, <0x0 0x4fb0000 0x0 0x134>;
+ power-domains = <&k3_pds 48 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 48 0>, <&k3_clks 48 1>;
+ clock-names = "clk_ahb", "clk_xin";
+ interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+ ti,otap-del-sel-legacy = <0x0>;
+ ti,otap-del-sel-mmc-hs = <0x0>;
+ ti,otap-del-sel-sd-hs = <0x0>;
+ ti,otap-del-sel-sdr12 = <0x0>;
+ ti,otap-del-sel-sdr25 = <0x0>;
+ ti,otap-del-sel-sdr50 = <0x8>;
+ ti,otap-del-sel-sdr104 = <0x7>;
+ ti,otap-del-sel-ddr50 = <0x4>;
+ ti,otap-del-sel-ddr52 = <0x4>;
+ ti,otap-del-sel-hs200 = <0x7>;
+ ti,clkbuf-sel = <0x7>;
+ ti,otap-del-sel = <0x2>;
+ ti,trm-icp = <0x8>;
+ dma-coherent;
+ no-1-8-v;
+ };
+
scm_conf: scm_conf@100000 {
compatible = "syscon", "simple-mfd";
reg = <0 0x00100000 0 0x1c000>;
--
2.17.1

2020-07-10 19:07:59

by Faiz Abbas

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: ti: k3-am654-base-board: Add support for SD card

With silicon revision 2.0, add support for SD card on the am65x-evm.
Boards with silicon revision 1.0 are susceptible to interface issues
because of erratas i2025 and i2026[1] and are recommended to disable
this node.

[1] Am654x Silicon Revision 1.0 errata: https://www.ti.com/lit/pdf/sprz452

Signed-off-by: Faiz Abbas <[email protected]>
---
.../arm64/boot/dts/ti/k3-am654-base-board.dts | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
index 9fc7898a6a3b..84aeb4761ac0 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
@@ -167,6 +167,19 @@
>;
};

+ main_mmc1_pins_default: main_mmc1_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x02d4, PIN_INPUT_PULLDOWN, 0) /* (C27) MMC1_CLK */
+ AM65X_IOPAD(0x02d8, PIN_INPUT_PULLUP, 0) /* (C28) MMC1_CMD */
+ AM65X_IOPAD(0x02d0, PIN_INPUT_PULLUP, 0) /* (D28) MMC1_DAT0 */
+ AM65X_IOPAD(0x02cc, PIN_INPUT_PULLUP, 0) /* (E27) MMC1_DAT1 */
+ AM65X_IOPAD(0x02c8, PIN_INPUT_PULLUP, 0) /* (D26) MMC1_DAT2 */
+ AM65X_IOPAD(0x02c4, PIN_INPUT_PULLUP, 0) /* (D27) MMC1_DAT3 */
+ AM65X_IOPAD(0x02dc, PIN_INPUT_PULLUP, 0) /* (B24) MMC1_SDCD */
+ AM65X_IOPAD(0x02e0, PIN_INPUT, 0) /* (C24) MMC1_SDWP */
+ >;
+ };
+
usb1_pins_default: usb1_pins_default {
pinctrl-single,pins = <
AM65X_IOPAD(0x02c0, PIN_OUTPUT, 0) /* (AC8) USB1_DRVVBUS */
@@ -299,6 +312,17 @@
ti,driver-strength-ohm = <50>;
disable-wp;
};
+/*
+ * Because of erratas i2025 and i2026 for silicon revision 1.0, the
+ * SD card interface might fail. Boards with sr1.0 are recommended to
+ * disable sdhci1
+ */
+&sdhci1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc1_pins_default>;
+ ti,driver-strength-ohm = <50>;
+ disable-wp;
+};

&dwc3_1 {
status = "okay";
--
2.17.1

2020-07-17 07:24:31

by Tero Kristo

[permalink] [raw]
Subject: Re: [PATCH 0/2] Add support for SD card on on AM65x-evm

On 10/07/2020 22:02, Faiz Abbas wrote:
> The following patches add support for SD card node in am654x-evm
>
> Because of fundamental interface issues (see patch 2 for details),
> SD card was never enabled for silicon revision 1.0
>
> These issues have been fixed with SR2.0 but boards with SR1.0 are
> recommended to disable this node
>
> These patches depend on kernel patches for supporting silicon revision
> 2.0 posted here:
> https://patchwork.kernel.org/project/linux-mmc/list/?series=305565
>
> The dependencies have been picked up and are in linux-next

Queued up for 5.9, thanks.

-Tero

>
> Faiz Abbas (2):
> arm64: dts: ti: k3-am65-main: Add support for sdhci1
> arm64: dts: ti: k3-am654-base-board: Add support for SD card
>
> arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 24 +++++++++++++++++++
> .../arm64/boot/dts/ti/k3-am654-base-board.dts | 24 +++++++++++++++++++
> 2 files changed, 48 insertions(+)
>

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki