summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJianlong Huang <jianlong.huang@starfivetech.com>2022-11-23 06:38:18 +0300
committerJianlong Huang <jianlong.huang@starfivetech.com>2022-11-23 06:38:24 +0300
commit68dc79062721456f05815278dd428c2355ebd132 (patch)
tree327f4937f88b0b0501c4e767895f258879c7f0af /arch
parentee772d8aea46ebd0501a1acf3650da4bb68a897b (diff)
downloadu-boot-68dc79062721456f05815278dd428c2355ebd132.tar.xz
dts:starfive:Add pinctrl config
Add pinctrl config about usb/sdio0 Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/dts/jh7110.dtsi4
-rw-r--r--arch/riscv/dts/starfive_evb.dts62
2 files changed, 59 insertions, 7 deletions
diff --git a/arch/riscv/dts/jh7110.dtsi b/arch/riscv/dts/jh7110.dtsi
index 6ab4f48107..0188f89780 100644
--- a/arch/riscv/dts/jh7110.dtsi
+++ b/arch/riscv/dts/jh7110.dtsi
@@ -505,7 +505,7 @@
};
gpio: gpio@13040000 {
- compatible = "starfive_jh7110-sys-pinctrl";
+ compatible = "starfive,jh7110-sys-pinctrl";
reg = <0x0 0x13040000 0x0 0x10000>;
reg-names = "control";
interrupts = <91>;
@@ -516,7 +516,7 @@
};
gpioa: gpio@17020000 {
- compatible = "starfive_jh7110-aon-pinctrl";
+ compatible = "starfive,jh7110-aon-pinctrl";
reg = <0x0 0x17020000 0x0 0x10000>;
reg-names = "control";
interrupts = <90>;
diff --git a/arch/riscv/dts/starfive_evb.dts b/arch/riscv/dts/starfive_evb.dts
index 24dc4d9a6e..1a7b48e684 100644
--- a/arch/riscv/dts/starfive_evb.dts
+++ b/arch/riscv/dts/starfive_evb.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "jh7110.dtsi"
+#include <dt-bindings/pinctrl/pinctrl-starfive-jh7110.h>
/ {
#address-cells = <2>;
#size-cells = <2>;
@@ -46,14 +47,68 @@
"stg_apb", "gmac0_rmii_refin";
};
+&gpio {
+ status = "okay";
+
+ usb_pins: usb-pins {
+ drive-vbus-pin {
+ pinmux = <GPIOMUX(33, GPOUT_SYS_USB_DRIVE_VBUS,
+ GPOEN_ENABLE, GPI_NONE)>;
+ bias-pull-up;
+ drive-strength = <2>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+
+ overcurrent-pin {
+ pinmux = <GPIOMUX(34, GPOUT_LOW,
+ GPOEN_DISABLE, GPI_SYS_USB_OVERCURRENT)>;
+ bias-pull-up;
+ drive-strength = <2>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+
+ mmc0_pins: mmc0-pins {
+ mmc0-pins-rest {
+ pinmux = <GPIOMUX(22, GPOUT_SYS_SDIO0_RST,
+ GPOEN_ENABLE, GPI_NONE)>;
+ bias-pull-up;
+ drive-strength = <12>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+
+ mmc1_pins: mmc1-pins {
+ mmc1-pins-rest {
+ pinmux = <GPIOMUX(24, GPOUT_SYS_SDIO1_RST,
+ GPOEN_ENABLE, GPI_NONE)>;
+ bias-pull-up;
+ drive-strength = <12>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+};
+
&sdio0 {
fifo-depth = <32>;
bus-width = <4>;
status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>;
};
&sdio1 {
status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
};
&gmac0 {
@@ -81,11 +136,6 @@
};
};
-&gpio {
- compatible = "starfive,jh7110-gpio";
- gpio-controller;
-};
-
&uart0 {
reg-offset = <0>;
current-speed = <115200>;
@@ -102,6 +152,8 @@
&usbdrd_cdns3 {
dr_mode = "host";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins>;
};
&timer {