diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile index 43e02568b9e3..479e6b59c7d3 100644 --- a/arch/riscv/boot/dts/starfive/Makefile +++ b/arch/riscv/boot/dts/starfive/Makefile @@ -9,6 +9,7 @@ DTC_FLAGS_jh7110-evb := -@ dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb +subdir-y += vf2-overlay dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb \ jh7110-starfive-visionfive-2-ac108.dtb \ diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index afe5a67eb80e..10eab1f4ff41 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -15,7 +15,10 @@ ethernet0 = &gmac0; ethernet1 = &gmac1; i2c0 = &i2c0; + i2c1 = &i2c1; i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; i2c5 = &i2c5; i2c6 = &i2c6; mmc0 = &mmc0; @@ -23,6 +26,7 @@ pcie0 = &pcie0; pcie1 = &pcie1; serial0 = &uart0; + serial3 = &uart3; }; chosen { diff --git a/arch/riscv/boot/dts/starfive/vf2-overlay/Makefile b/arch/riscv/boot/dts/starfive/vf2-overlay/Makefile new file mode 100644 index 000000000000..69bd8e3bc56e --- /dev/null +++ b/arch/riscv/boot/dts/starfive/vf2-overlay/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_STARFIVE) += vf2-overlay-uart3-i2c.dtbo \ + vf2-overlay-can.dtbo diff --git a/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-can.dtso b/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-can.dtso new file mode 100644 index 000000000000..bbbdfcdf0f1a --- /dev/null +++ b/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-can.dtso @@ -0,0 +1,23 @@ +/dts-v1/; +/plugin/; +#include +#include "../jh7110-pinfunc.h" +/ { + compatible = "starfive,jh7110"; + + //can0 + fragment@0 { + target-path = "/soc/can@130d0000"; + __overlay__ { + status = "okay"; + }; + }; + + //can1 + fragment@1 { + target-path = "/soc/can@130e0000"; + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dtso b/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dtso new file mode 100644 index 000000000000..f51fc8f0a55f --- /dev/null +++ b/arch/riscv/boot/dts/starfive/vf2-overlay/vf2-overlay-uart3-i2c.dtso @@ -0,0 +1,75 @@ +/dts-v1/; +/plugin/; +#include +#include "../jh7110-pinfunc.h" +/ { + compatible = "starfive,jh7110"; + + //sysgpio + fragment@0 { + target-path = "/soc/pinctrl@13040000"; + __overlay__ { + dt_uart3_pins: dt-uart3-0 { + tx-pins { + pinmux = ; + bias-disable; + drive-strength = <12>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + + rx-pins { + pinmux = ; + bias-pull-up; + drive-strength = <2>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; + + dt_i2c1_pins: dt-i2c1-0 { + i2c-pins { + pinmux = , + ; + bias-pull-up; + input-enable; + input-schmitt-enable; + }; + }; + }; + }; + + //uart3 + fragment@1 { + target-path = "/soc/serial@12000000"; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&dt_uart3_pins>; + status = "okay"; + }; + }; + + //i2c1 + fragment@2 { + target-path = "/soc/i2c@10040000"; + __overlay__ { + clock-frequency = <100000>; + i2c-sda-hold-time-ns = <300>; + i2c-sda-falling-time-ns = <510>; + i2c-scl-falling-time-ns = <510>; + pinctrl-names = "default"; + pinctrl-0 = <&dt_i2c1_pins>; + status = "okay"; + }; + }; +};