author: William Qiu <william.qiu@starfivetech.com> 2023-04-26 17:58:08 +0800
committer: William Qiu <william.qiu@starfivetech.com> 2023-04-26 18:04:33 +0800
commit: b0db80917506a003456182412be1025faf2c7662
parent: 9138c4fb858294cba9fc927e22f8f2513284ef97
Commit Summary:
Diffstat:
12 files changed, 129 insertions, 7 deletions
diff --git a/arch/riscv/boot/dts/starfive/evb-overlay/jh7110-evb-overlay-uart4-emmc.dts b/arch/riscv/boot/dts/starfive/evb-overlay/jh7110-evb-overlay-uart4-emmc.dts
index 1f62f5adf3bb..2091460ef06e 100644
--- a/arch/riscv/boot/dts/starfive/evb-overlay/jh7110-evb-overlay-uart4-emmc.dts
+++ b/arch/riscv/boot/dts/starfive/evb-overlay/jh7110-evb-overlay-uart4-emmc.dts
@@ -13,10 +13,60 @@
emmc0-pins-rest {
starfive,pins = <PAD_GPIO22>;
starfive,pinmux = <PAD_GPIO22_FUNC_SEL 0>;
- starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
starfive,pin-gpio-dout = <GPO_SDIO0_RST_N>;
starfive,pin-gpio-doen = <OEN_LOW>;
};
+
+ emmc0-pins-cLK {
+ starfive,pins = <PAD_SD0_CLK>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-cmd {
+ starfive,pins = <PAD_SD0_CMD>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data0 {
+ starfive,pins = <PAD_SD0_DATA0>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data1 {
+ starfive,pins = <PAD_SD0_DATA1>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data2 {
+ starfive,pins = <PAD_SD0_DATA2>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data3 {
+ starfive,pins = <PAD_SD0_DATA3>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data4 {
+ starfive,pins = <PAD_SD0_DATA4>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data5 {
+ starfive,pins = <PAD_SD0_DATA5>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data6 {
+ starfive,pins = <PAD_SD0_DATA6>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ emmc0-pins-data7 {
+ starfive,pins = <PAD_SD0_DATA7>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
};
dt_emmc1_pins: dt-emmc1-pins {
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-can-pdm-pwmdac.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-can-pdm-pwmdac.dts
index cf1865775ad2..68841c2d26d8 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-can-pdm-pwmdac.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-can-pdm-pwmdac.dts
@@ -16,6 +16,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-dvp-rgb2hdmi.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-dvp-rgb2hdmi.dts
index b4bf91049b21..51098db97b07 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-dvp-rgb2hdmi.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-dvp-rgb2hdmi.dts
@@ -14,6 +14,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-i2s-ac108.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-i2s-ac108.dts
index 043c8ca07834..3d896556261e 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-i2s-ac108.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-i2s-ac108.dts
@@ -15,6 +15,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-pcie-i2s-sd.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-pcie-i2s-sd.dts
index 2639a0fd6fd6..d7fe195460ba 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-pcie-i2s-sd.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-pcie-i2s-sd.dts
@@ -15,6 +15,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi b/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi
index eb53eea70b03..29cca5791520 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi
@@ -370,20 +370,100 @@
mmc0-pins-rest {
starfive,pins = <PAD_GPIO22>;
starfive,pinmux = <PAD_GPIO22_FUNC_SEL 0>;
- starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
starfive,pin-gpio-dout = <GPO_SDIO0_RST_N>;
starfive,pin-gpio-doen = <OEN_LOW>;
};
+
+ mmc0-pins-cLK {
+ starfive,pins = <PAD_SD0_CLK>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-cmd {
+ starfive,pins = <PAD_SD0_CMD>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data0 {
+ starfive,pins = <PAD_SD0_DATA0>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data1 {
+ starfive,pins = <PAD_SD0_DATA1>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data2 {
+ starfive,pins = <PAD_SD0_DATA2>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data3 {
+ starfive,pins = <PAD_SD0_DATA3>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data4 {
+ starfive,pins = <PAD_SD0_DATA4>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data5 {
+ starfive,pins = <PAD_SD0_DATA5>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data6 {
+ starfive,pins = <PAD_SD0_DATA6>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ mmc0-pins-data7 {
+ starfive,pins = <PAD_SD0_DATA7>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
};
sdcard0_pins: sdcard0-pins {
sdcard0-pins-rest {
starfive,pins = <PAD_GPIO24>;
starfive,pinmux = <PAD_GPIO24_FUNC_SEL 0>;
- starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
starfive,pin-gpio-dout = <GPO_SDIO0_RST_N>;
starfive,pin-gpio-doen = <OEN_LOW>;
};
+
+ sdcard0-pins-cLK {
+ starfive,pins = <PAD_SD0_CLK>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ sdcard0-pins-cmd {
+ starfive,pins = <PAD_SD0_CMD>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ sdcard0-pins-data0 {
+ starfive,pins = <PAD_SD0_DATA0>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ sdcard0-pins-data1 {
+ starfive,pins = <PAD_SD0_DATA1>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ sdcard0-pins-data2 {
+ starfive,pins = <PAD_SD0_DATA2>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
+
+ sdcard0-pins-data3 {
+ starfive,pins = <PAD_SD0_DATA3>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3) | GPIO_SLEW(1))>;
+ };
};
emmc1_pins: emmc1-pins {
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-spi-uart2.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-spi-uart2.dts
index 02185222f988..4aeb2eb3b24f 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-spi-uart2.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-spi-uart2.dts
@@ -14,8 +14,9 @@
/* default sd card */
&sdio0 {
- clock-frequency = <102400000>;
- max-frequency = <200000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
+ max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
broken-cd;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-uart1-rgb2hdmi.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-uart1-rgb2hdmi.dts
index b72135b6b4fe..f5be5ea46a63 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-uart1-rgb2hdmi.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-uart1-rgb2hdmi.dts
@@ -14,6 +14,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-uart4-emmc-spdif.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-uart4-emmc-spdif.dts
index e0e4e1addd42..d72bebf1dcc0 100755
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-uart4-emmc-spdif.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-uart4-emmc-spdif.dts
@@ -27,6 +27,8 @@
};
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <8>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-uart5-pwm-i2c-tdm.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-uart5-pwm-i2c-tdm.dts
index ce2161038c55..4ba622c459bf 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-uart5-pwm-i2c-tdm.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-uart5-pwm-i2c-tdm.dts
@@ -15,6 +15,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-usbdevice.dts b/arch/riscv/boot/dts/starfive/jh7110-evb-usbdevice.dts
index a591bec69c23..f9d67ae839d9 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-usbdevice.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-usbdevice.dts
@@ -14,8 +14,9 @@
/* default sd card */
&sdio0 {
- clock-frequency = <102400000>;
- max-frequency = <200000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
+ max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;
broken-cd;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb.dts b/arch/riscv/boot/dts/starfive/jh7110-evb.dts
index d6345d01964a..73db0ce7bafb 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb.dts
@@ -14,6 +14,8 @@
/* default sd card */
&sdio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdcard0_pins>;
max-frequency = <100000000>;
card-detect-delay = <300>;
bus-width = <4>;