--- /dev/null
+From 05620031408ac6cfc6d5c048431827e49aa0ade1 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl@gmail.com>
+Date: Sat, 18 Mar 2023 16:37:43 +0800
+Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R5C
+
+FriendlyARM NanoPi R5C is an open-sourced mini IoT gateway device.
+
+Specification:
+- Rockchip RK3568
+- 1/4GB LPDDR4X RAM
+- 8/32GB eMMC
+- SD card slot
+- M.2 Connector
+- 2x USB 3.0 Port
+- 2x 2500 Base-T (PCIe, r8125)
+- HDMI 2.0
+- MIPI DSI/CSI
+- USB Type C 5V
+
+Signed-off-by: Tianling Shen <cnsztl@gmail.com>
+Link: https://lore.kernel.org/r/20230318083745.6181-4-cnsztl@gmail.com
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile | 1 +
+ .../boot/dts/rockchip/rk3568-nanopi-r5c.dts | 112 ++++++++++++++++++
+ 2 files changed, 113 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -74,5 +74,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+@@ -0,0 +1,112 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/*
++ * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
++ * (http://www.friendlyelec.com)
++ *
++ * Copyright (c) 2023 Tianling Shen <cnsztl@gmail.com>
++ */
++
++/dts-v1/;
++#include "rk3568-nanopi-r5s.dtsi"
++
++/ {
++ model = "FriendlyElec NanoPi R5C";
++ compatible = "friendlyarm,nanopi-r5c", "rockchip,rk3568";
++
++ gpio-keys {
++ compatible = "gpio-keys";
++ pinctrl-names = "default";
++ pinctrl-0 = <&reset_button_pin>;
++
++ button-reset {
++ debounce-interval = <50>;
++ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
++ label = "reset";
++ linux,code = <KEY_RESTART>;
++ };
++ };
++
++ gpio-leds {
++ compatible = "gpio-leds";
++ pinctrl-names = "default";
++ pinctrl-0 = <&lan_led_pin>, <&power_led_pin>, <&wan_led_pin>, <&wlan_led_pin>;
++
++ led-lan {
++ color = <LED_COLOR_ID_GREEN>;
++ function = LED_FUNCTION_LAN;
++ gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
++ };
++
++ power_led: led-power {
++ color = <LED_COLOR_ID_RED>;
++ function = LED_FUNCTION_POWER;
++ linux,default-trigger = "heartbeat";
++ gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
++ };
++
++ led-wan {
++ color = <LED_COLOR_ID_GREEN>;
++ function = LED_FUNCTION_WAN;
++ gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
++ };
++
++ led-wlan {
++ color = <LED_COLOR_ID_GREEN>;
++ function = LED_FUNCTION_WLAN;
++ gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
++ };
++ };
++};
++
++&pcie2x1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pcie20_reset_pin>;
++ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
++ status = "okay";
++};
++
++&pcie3x1 {
++ num-lanes = <1>;
++ reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
++ vpcie3v3-supply = <&vcc3v3_pcie>;
++ status = "okay";
++};
++
++&pcie3x2 {
++ num-lanes = <1>;
++ reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
++ vpcie3v3-supply = <&vcc3v3_pcie>;
++ status = "okay";
++};
++
++&pinctrl {
++ gpio-leds {
++ lan_led_pin: lan-led-pin {
++ rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ power_led_pin: power-led-pin {
++ rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ wan_led_pin: wan-led-pin {
++ rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ wlan_led_pin: wlan-led-pin {
++ rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++ };
++
++ pcie {
++ pcie20_reset_pin: pcie20-reset-pin {
++ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++ };
++
++ rockchip-key {
++ reset_button_pin: reset-button-pin {
++ rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++ };
++};
--- /dev/null
+From 5325593377f07de31f7e473a9677a28a04c891f3 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl@gmail.com>
+Date: Thu, 11 May 2023 00:18:50 +0800
+Subject: [PATCH] arm64: dts: rockchip: fix button reset pin for nanopi r5c
+
+The reset pin was wrongly assigned due to a copy/paste error,
+fix it to match actual gpio pin.
+
+While at it, remove a blank line from nanopi r5s dts.
+
+Fixes: 05620031408a ("arm64: dts: rockchip: Add FriendlyARM NanoPi R5C")
+Signed-off-by: Tianling Shen <cnsztl@gmail.com>
+Link: https://lore.kernel.org/r/20230510161850.4866-1-cnsztl@gmail.com
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts | 2 +-
+ arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+@@ -106,7 +106,7 @@
+
+ rockchip-key {
+ reset_button_pin: reset-button-pin {
+- rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
++ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+ };
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+@@ -134,4 +134,3 @@
+ };
+ };
+ };
+-
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+@@ -32,27 +32,22 @@
+ pinctrl-0 = <&lan_led_pin>, <&power_led_pin>, <&wan_led_pin>, <&wlan_led_pin>;
+
+ led-lan {
+- color = <LED_COLOR_ID_GREEN>;
+- function = LED_FUNCTION_LAN;
++ label = "green:lan";
+ gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_led: led-power {
+- color = <LED_COLOR_ID_RED>;
+- function = LED_FUNCTION_POWER;
+- linux,default-trigger = "heartbeat";
++ label = "red:power";
+ gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-wan {
+- color = <LED_COLOR_ID_GREEN>;
+- function = LED_FUNCTION_WAN;
++ label = "green:wan";
+ gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-wlan {
+- color = <LED_COLOR_ID_GREEN>;
+- function = LED_FUNCTION_WLAN;
++ label = "green:wlan";
+ gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
+ };
+ };
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
@@ -23,29 +23,22 @@