From 35f2f6a1c8fea2e5b94ae32152b94e480e2d0b9b Mon Sep 17 00:00:00 2001 From: Joshua-Riek Date: Fri, 15 Sep 2023 20:48:10 -0400 Subject: [PATCH 1/2] arm64: dts: rockchip: add GPIO nodes for NanoPi R6 and NanoPC T6 cherry picked from: https://github.com/friendlyarm/kernel-rockchip/commit/5549a0faea4e87d7cfb34880753f34b374d30999 --- .../boot/dts/rockchip/rk3588-nanopc-t6.dts | 58 +++++++++++++++++++ .../rockchip/rk3588s-nanopi-r6-common.dtsi | 24 +++++++- .../boot/dts/rockchip/rk3588s-nanopi-r6c.dts | 12 +++- 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index 82ef01deb4162..edc5e1e3ae70e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -721,3 +721,61 @@ clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll"; }; +&pwm5 { + pinctrl-0 = <&pwm5m1_pins>; + status = "okay"; +}; + +&pwm9 { + pinctrl-0 = <&pwm9m0_pins>; + status = "okay"; +}; + +&spi0 { + num-cs = <1>; + pinctrl-0 = <&spi0m2_cs0 &spi0m2_pins>; + status = "disabled"; + + spidev0: spidev@0 { + compatible = "rockchip,spidev"; + reg = <0>; + spi-max-frequency = <5000000>; + status = "disabled"; + }; +}; + +&spi4 { + num-cs = <1>; + pinctrl-0 = <&spi4m1_cs0 &spi4m1_pins>; + status = "disabled"; +}; + +&uart0 { + pinctrl-0 = <&uart0m0_xfer>; + status = "disabled"; +}; + +&uart3 { + pinctrl-0 = <&uart3m1_xfer>; + status = "disabled"; +}; + +&uart4 { + pinctrl-0 = <&uart4m2_xfer>; + status = "disabled"; +}; + +&uart6 { + pinctrl-0 = <&uart6m1_xfer>; + status = "okay"; +}; + +&uart7 { + pinctrl-0 = <&uart7m2_xfer>; + status = "disabled"; +}; + +&uart8 { + pinctrl-0 = <&uart8m1_xfer>; + status = "disabled"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi index 8c9f0a126b182..36a60d8836062 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi @@ -696,4 +696,26 @@ &display_subsystem { clocks = <&hdptxphy_hdmi_clk0>; clock-names = "hdmi0_phy_pll"; -}; \ No newline at end of file +}; + +&spi0 { + pinctrl-0 = <&spi0m2_cs0 &spi0m2_pins>; + status = "disabled"; + + spidev0: spidev@0 { + compatible = "rockchip,spidev"; + reg = <0>; + spi-max-frequency = <10000000>; + status = "disabled"; + }; +}; + +&uart4 { + pinctrl-0 = <&uart4m2_xfer>; + status = "disabled"; +}; + +&uart5 { + pinctrl-0 = <&uart5m1_xfer>; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts index eb4a3e0c5bb23..9bf3527e65dab 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts @@ -25,4 +25,14 @@ &pcie2x1l2 { /delete-node/ pcie@40; -}; \ No newline at end of file +}; + +&pwm0 { + pinctrl-0 = <&pwm0m2_pins>; + status = "okay"; +}; + +&pwm1 { + pinctrl-0 = <&pwm1m2_pins>; + status = "okay"; +}; From 81e8d29be156e646b91ae146f58a9f84819cd949 Mon Sep 17 00:00:00 2001 From: Joshua-Riek Date: Fri, 15 Sep 2023 20:56:18 -0400 Subject: [PATCH 2/2] arm64: dts: rockchip: use rockchip,hdmi driver for NanoPi R6 and NanoPC T6 --- .../arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 16 +++++----------- .../dts/rockchip/rk3588s-nanopi-r6-common.dtsi | 16 +++++----------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts index edc5e1e3ae70e..6e843c94f2548 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts @@ -109,17 +109,11 @@ hdmi1_sound: hdmi1-sound { status = "disabled"; - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,mclk-fs = <128>; - simple-audio-card,name = "rockchip-hdmi1"; - - simple-audio-card,cpu { - sound-dai = <&i2s6_8ch>; - }; - simple-audio-card,codec { - sound-dai = <&hdmi1>; - }; + compatible = "rockchip,hdmi"; + rockchip,mclk-fs = <128>; + rockchip,card-name = "rockchip-hdmi1"; + rockchip,cpu = <&i2s6_8ch>; + rockchip,codec = <&hdmi1>; }; hdmiin_sound: hdmiin-sound { diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi index 36a60d8836062..eca8ae30a17e3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6-common.dtsi @@ -31,17 +31,11 @@ hdmi0_sound: hdmi0-sound { status = "disabled"; - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,mclk-fs = <128>; - simple-audio-card,name = "rockchip-hdmi0"; - - simple-audio-card,cpu { - sound-dai = <&i2s5_8ch>; - }; - simple-audio-card,codec { - sound-dai = <&hdmi0>; - }; + compatible = "rockchip,hdmi"; + rockchip,mclk-fs = <128>; + rockchip,card-name = "rockchip-hdmi0"; + rockchip,cpu = <&i2s5_8ch>; + rockchip,codec = <&hdmi0>; }; vcc5v0_sys: vcc5v0-sys {