Browse Source

platform: sync device tree with starfive linux "JH7110_VisionFive2_devel" branch

Signed-off-by: Yuin Yee Chew <yuinyee.chew@linux.starfivetech.com>
Yuin Yee Chew 11 months ago
parent
commit
36fd0b2d35

File diff suppressed because it is too large
+ 329 - 180
Platform/StarFive/JH7110SeriesPkg/JH7110Board/DeviceTree/jh7110.dtsi


+ 5 - 5
Platform/StarFive/JH7110SeriesPkg/JH7110Board/DeviceTree/starfive-jh7110.h

@@ -137,11 +137,11 @@
 #define	RSTN_U1_CAN_CTRL_APB		114
 #define	RSTN_U1_CAN_CTRL_CORE		115
 #define	RSTN_U1_CAN_CTRL_TIMER		116
-#define	RSTN_U0_SI5_TIMER_APB		117
-#define	RSTN_U0_SI5_TIMER_TIMER0	118
-#define	RSTN_U0_SI5_TIMER_TIMER1	119
-#define	RSTN_U0_SI5_TIMER_TIMER2	120
-#define	RSTN_U0_SI5_TIMER_TIMER3	121
+#define	RSTN_U0_TIMER_APB		117
+#define	RSTN_U0_TIMER_TIMER0		118
+#define	RSTN_U0_TIMER_TIMER1		119
+#define	RSTN_U0_TIMER_TIMER2		120
+#define	RSTN_U0_TIMER_TIMER3		121
 #define	RSTN_U0_INT_CTRL_APB		122
 #define	RSTN_U0_TEMP_SENSOR_APB		123
 #define	RSTN_U0_TEMP_SENSOR_TEMP	124

+ 166 - 106
Platform/StarFive/JH7110SeriesPkg/JH7110Board/DeviceTree/starfive_visionfive2.dts

@@ -4,144 +4,204 @@
  */
 
 /dts-v1/;
+#include "starfive_visionfive2.dtsi"
+#include "sf_hdmi.dtsi"
 
-#include "jh7110.dtsi"
 / {
-	#address-cells = <2>;
-	#size-cells = <2>;
 	model = "StarFive VisionFive V2";
-	compatible = "starfive,jh7110";
-
-	aliases {
-		spi0="/soc/spi@13010000";
-		gpio0="/soc/gpio@13040000";
-		ethernet0=&gmac0;
-		ethernet1=&gmac1;
-		mmc0=&sdio0;
-		mmc1=&sdio1;
-		i2c0 = &i2c5;
-	};
+	compatible = "starfive,visionfive-v2", "starfive,jh7110";
 
-	chosen {
-			stdout-path = "/soc/serial@10000000:115200";
+	gpio-restart {
+		compatible = "gpio-restart";
+		gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
+		priority = <160>;
 	};
 
+};
 
-	memory@80000000 {
-		device_type = "memory";
-		reg = <0x0 0x40000000 0x1 0x0>;
+&gpio {
+	uart0_pins: uart0-pins {
+		uart0-pins-tx {
+			starfive,pins = <PAD_GPIO5>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_UART0_SOUT>;
+			starfive,pin-gpio-doen = <OEN_LOW>;
+		};
+
+		uart0-pins-rx {
+			starfive,pins = <PAD_GPIO6>;
+			starfive,pinmux = <PAD_GPIO6_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | GPIO_PU(1))>;
+			starfive,pin-gpio-doen = <OEN_HIGH>;
+			starfive,pin-gpio-din =  <GPI_UART0_SIN>;
+		};
 	};
 
-	soc {
+	i2c2_pins: i2c2-pins {
+		i2c2-pins-scl {
+			starfive,pins = <PAD_GPIO3>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+			starfive,pin-gpio-dout = <GPO_LOW>;
+			starfive,pin-gpio-doen = <OEN_I2C2_IC_CLK_OE>;
+			starfive,pin-gpio-din =  <GPI_I2C2_IC_CLK_IN_A>;
+		};
+
+		i2c2-pins-sda {
+			starfive,pins = <PAD_GPIO2>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+			starfive,pin-gpio-dout = <GPO_LOW>;
+			starfive,pin-gpio-doen = <OEN_I2C2_IC_DATA_OE>;
+			starfive,pin-gpio-din =  <GPI_I2C2_IC_DATA_IN_A>;
+		};
 	};
-};
-
-&cpu0 {
-	status = "okay";
-};
-
-&clkgen {
-	clocks = <&osc>, <&gmac1_rmii_refin>,
-		<&stg_apb>, <&gmac0_rmii_refin>;
-	clock-names = "osc", "gmac1_rmii_refin",
-		"stg_apb", "gmac0_rmii_refin";
-};
 
-&sdio0 {
-	fifo-depth = <32>;
-	bus-width = <8>;
-	status = "okay";
-};
-
-&sdio1 {
-	fifo-depth = <32>;
-	bus-width = <4>;
-	status = "okay";
-};
+	mmc0_pins: mmc0-pins {
+		 mmc0-pins-rest {
+			starfive,pins = <PAD_GPIO62>;
+			starfive,pinmux = <PAD_GPIO62_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+			starfive,pin-gpio-dout = <GPO_SDIO0_RST_N>;
+			starfive,pin-gpio-doen = <OEN_LOW>;
+		};
+	};
 
-&gmac0 {
-	status = "okay";
-	#address-cells = <1>;
-	#size-cells = <0>;
-	phy0: ethernet-phy@0 {
-		rxc_dly_en = <1>;
-		tx_delay_sel_fe = <5>;
-		tx_delay_sel = <0xa>;
-		tx_inverted_10 = <0x1>;
-		tx_inverted_100 = <0x1>;
-		tx_inverted_1000 = <0x1>;
+	sdcard1_pins: sdcard1-pins {
+		sdcard1-pins0 {
+			starfive,pins = <PAD_GPIO10>;
+			starfive,pinmux = <PAD_GPIO10_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_SDIO1_CCLK_OUT>;
+			starfive,pin-gpio-doen = <OEN_LOW>;
+		};
+
+		sdcard1-pins1 {
+			starfive,pins = <PAD_GPIO9>;
+			starfive,pinmux = <PAD_GPIO9_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_SDIO1_CCMD_OUT>;
+			starfive,pin-gpio-doen = <OEN_SDIO1_CCMD_OUT_EN>;
+			starfive,pin-gpio-din =  <GPI_SDIO1_CCMD_IN>;
+		};
+
+		sdcard1-pins2 {
+			starfive,pins = <PAD_GPIO11>;
+			starfive,pinmux = <PAD_GPIO11_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_SDIO1_CDATA_OUT_0>;
+			starfive,pin-gpio-doen = <OEN_SDIO1_CDATA_OUT_EN_0>;
+			starfive,pin-gpio-din =  <GPI_SDIO1_CDATA_IN_0>;
+		};
+
+		sdcard1-pins3 {
+			starfive,pins = <PAD_GPIO12>;
+			starfive,pinmux = <PAD_GPIO12_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_SDIO1_CDATA_OUT_1>;
+			starfive,pin-gpio-doen = <OEN_SDIO1_CDATA_OUT_EN_1>;
+			starfive,pin-gpio-din =  <GPI_SDIO1_CDATA_IN_1>;
+		};
+
+		sdcard1-pins4 {
+			starfive,pins = <PAD_GPIO7>;
+			starfive,pinmux = <PAD_GPIO7_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_SDIO1_CDATA_OUT_2>;
+			starfive,pin-gpio-doen = <OEN_SDIO1_CDATA_OUT_EN_2>;
+			starfive,pin-gpio-din =  <GPI_SDIO1_CDATA_IN_2>;
+		};
+
+		sdcard1-pins5 {
+			starfive,pins = <PAD_GPIO8>;
+			starfive,pinmux = <PAD_GPIO8_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)) | GPIO_DS(3))>;
+			starfive,pin-gpio-dout = <GPO_SDIO1_CDATA_OUT_3>;
+			starfive,pin-gpio-doen = <OEN_SDIO1_CDATA_OUT_EN_3>;
+			starfive,pin-gpio-din =  <GPI_SDIO1_CDATA_IN_3>;
+		};
 	};
-};
 
-&gmac1 {
-	status = "okay";
-	#address-cells = <1>;
-	#size-cells = <0>;
-	phy1: ethernet-phy@1 {
-		tx_delay_sel_fe = <5>;
-		tx_delay_sel = <0>;
-		rxc_dly_en = <0>;
-		tx_inverted_10 = <0x1>;
-		tx_inverted_100 = <0x1>;
-		tx_inverted_1000 = <0x0>;
+	inno_hdmi_pins: inno_hdmi-pins {
+		inno_hdmi-scl {
+			starfive,pins = <PAD_GPIO0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+			starfive,pin-gpio-dout = <GPO_HDMI0_DDC_SCL_OUT>;
+			starfive,pin-gpio-doen = <OEN_HDMI0_DDC_SCL_OEN>;
+			starfive,pin-gpio-din =  <GPI_HDMI0_DDC_SCL_IN>;
+		};
+
+		inno_hdmi-sda {
+			starfive,pins = <PAD_GPIO1>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+			starfive,pin-gpio-dout = <GPO_HDMI0_DDC_SDA_OUT>;
+			starfive,pin-gpio-doen = <OEN_HDMI0_DDC_SDA_OEN>;
+			starfive,pin-gpio-din =  <GPI_HDMI0_DDC_SDA_IN>;
+		};
+		inno_hdmi-cec-pins {
+			starfive,pins = <PAD_GPIO14>;
+			//starfive,pinmux = <PAD_GPIO14_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1) | (GPIO_PU(1)))>;
+			starfive,pin-gpio-doen = <OEN_HDMI0_CEC_SDA_OEN>;
+			starfive,pin-gpio-dout = <GPO_HDMI0_CEC_SDA_OUT>;
+			starfive,pin-gpio-din =  <GPI_HDMI0_CEC_SDA_IN>;
+		};
+		inno_hdmi-hpd-pins {
+			starfive,pins = <PAD_GPIO15>;
+			//starfive,pinmux = <PAD_GPIO15_FUNC_SEL 0>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1))>;
+			starfive,pin-gpio-doen = <OEN_HIGH>;
+			starfive,pin-gpio-din =  <GPI_HDMI0_HPD>;
+		};
 	};
-};
 
-&gpio {
-	compatible = "starfive,jh7110-gpio";
-	gpio-controller;
+	mclk_ext_pins: mclk_ext_pins {
+		mclk_ext_pins {
+			starfive,pins = <PAD_GPIO4>;
+			starfive,pin-ioconfig = <IO(GPIO_IE(1))>;
+			starfive,pin-gpio-din = <GPI_CRG0_EXT_MCLK>;
+			starfive,pin-gpio-doen = <OEN_HIGH>;
+		};
+	};
 };
 
 &uart0 {
-	reg-offset = <0>;
-	current-speed = <115200>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins>;
 	status = "okay";
 };
 
-&i2c5 {
-	clock-frequency = <100000>;
-	i2c-sda-hold-time-ns = <300>;
-	i2c-sda-falling-time-ns = <3000>;
-	i2c-scl-falling-time-ns = <3000>;
-	auto_calc_scl_lhcnt;
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins>;
 	status = "okay";
-
-	eeprom@50 {
-		compatible = "atmel,24c04";
-		reg = <0x50>;
-		pagesize = <16>;
-	};
-
-	pmic: axp15060_reg@36 {
-               compatible = "stf,axp15060-regulator";
-               reg = <0x36>;
-	};
 };
 
-&gpioa {
-	status = "disabled";
-};
-
-&usbdrd30 {
+&sdio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins>;
 	status = "okay";
 };
 
-&usbdrd_cdns3 {
-	dr_mode = "host";
-};
-
-&timer {
-	status = "disabled";
+&sdio1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdcard1_pins>;
+	//cd-gpios = <&gpio 41 0>;
+	status = "okay";
 };
 
-&wdog {
-	status = "disabled";
+&hdmi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&inno_hdmi_pins>;
 };
 
-&clkvout {
-	status = "disabled";
+&i2stx_4ch0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mclk_ext_pins>;
+	status = "okay";
 };
 
-&pdm {
-	status = "disabled";
+&cpu1 {
+	cpu-supply = <&cpu_vdd>;
+	clocks = <&clkgen JH7110_CPU_CORE>;
+	clock-names = "cpu";
 };

Some files were not shown because too many files changed in this diff