Re: [PATCH v2 2/2] rockchip: rk3568: Add support for FriendlyARM NanoPi R5C
Hi, On 2023-05-29 06:59, Tianling Shen wrote: > 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 > > The device tree is taken from kernel v6.4-rc1. > > Signed-off-by: Tianling Shen > --- > > Changes in v2: add dtb to Makefile > > --- > arch/arm/dts/Makefile | 1 + > arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi | 3 + > arch/arm/dts/rk3568-nanopi-r5c.dts | 112 + > board/rockchip/evb_rk3568/MAINTAINERS | 7 ++ > configs/nanopi-r5c-rk3568_defconfig| 90 + > 5 files changed, 213 insertions(+) > create mode 100644 arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi > create mode 100644 arch/arm/dts/rk3568-nanopi-r5c.dts > create mode 100644 configs/nanopi-r5c-rk3568_defconfig > [snip] Recommend similar changes to defconfig as for r5s. Regards, Jonas
Re: [PATCH v2 2/2] rockchip: rk3568: Add support for FriendlyARM NanoPi R5C
On 2023/5/29 12:59, Tianling Shen wrote: 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 The device tree is taken from kernel v6.4-rc1. Signed-off-by: Tianling Shen Reviewed-by: Kever Yang Thanks, - Kever --- Changes in v2: add dtb to Makefile --- arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi | 3 + arch/arm/dts/rk3568-nanopi-r5c.dts | 112 + board/rockchip/evb_rk3568/MAINTAINERS | 7 ++ configs/nanopi-r5c-rk3568_defconfig| 90 + 5 files changed, 213 insertions(+) create mode 100644 arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi create mode 100644 arch/arm/dts/rk3568-nanopi-r5c.dts create mode 100644 configs/nanopi-r5c-rk3568_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index e2eda3ffcb..507bfb512a 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -169,6 +169,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ rk3566-anbernic-rgxx3.dtb \ rk3566-radxa-cm3-io.dtb \ rk3568-evb.dtb \ + rk3568-nanopi-r5c.dtb \ rk3568-nanopi-r5s.dtb \ rk3568-rock-3a.dtb diff --git a/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi b/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi new file mode 100644 index 00..fe5bc6af47 --- /dev/null +++ b/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rk3568-nanopi-r5s-u-boot.dtsi" diff --git a/arch/arm/dts/rk3568-nanopi-r5c.dts b/arch/arm/dts/rk3568-nanopi-r5c.dts new file mode 100644 index 00..f70ca9f047 --- /dev/null +++ b/arch/arm/dts/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 + */ + +/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 = <_button_pin>; + + button-reset { + debounce-interval = <50>; + gpios = < RK_PB7 GPIO_ACTIVE_LOW>; + label = "reset"; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <_led_pin>, <_led_pin>, <_led_pin>, <_led_pin>; + + led-lan { + color = ; + function = LED_FUNCTION_LAN; + gpios = < RK_PA3 GPIO_ACTIVE_HIGH>; + }; + + power_led: led-power { + color = ; + function = LED_FUNCTION_POWER; + linux,default-trigger = "heartbeat"; + gpios = < RK_PA2 GPIO_ACTIVE_HIGH>; + }; + + led-wan { + color = ; + function = LED_FUNCTION_WAN; + gpios = < RK_PA4 GPIO_ACTIVE_HIGH>; + }; + + led-wlan { + color = ; + function = LED_FUNCTION_WLAN; + gpios = < RK_PA5 GPIO_ACTIVE_HIGH>; + }; + }; +}; + + { + pinctrl-names = "default"; + pinctrl-0 = <_reset_pin>; + reset-gpios = < RK_PC1 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + + { + num-lanes = <1>; + reset-gpios = < RK_PA0 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <_pcie>; + status = "okay"; +}; + + { + num-lanes = <1>; + reset-gpios = < RK_PB6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <_pcie>; + status = "okay"; +}; + + { + gpio-leds { + lan_led_pin: lan-led-pin { + rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO _pull_none>; + }; + + power_led_pin: power-led-pin { + rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO _pull_none>; + }; + + wan_led_pin: wan-led-pin { + rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO _pull_none>; + }; + + wlan_led_pin: wlan-led-pin { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO _pull_none>; + }; + }; + + pcie { + pcie20_reset_pin: pcie20-reset-pin { + rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO _pull_up>; + }; + }; + + rockchip-key { +
[PATCH v2 2/2] rockchip: rk3568: Add support for 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 The device tree is taken from kernel v6.4-rc1. Signed-off-by: Tianling Shen --- Changes in v2: add dtb to Makefile --- arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi | 3 + arch/arm/dts/rk3568-nanopi-r5c.dts | 112 + board/rockchip/evb_rk3568/MAINTAINERS | 7 ++ configs/nanopi-r5c-rk3568_defconfig| 90 + 5 files changed, 213 insertions(+) create mode 100644 arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi create mode 100644 arch/arm/dts/rk3568-nanopi-r5c.dts create mode 100644 configs/nanopi-r5c-rk3568_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index e2eda3ffcb..507bfb512a 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -169,6 +169,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ rk3566-anbernic-rgxx3.dtb \ rk3566-radxa-cm3-io.dtb \ rk3568-evb.dtb \ + rk3568-nanopi-r5c.dtb \ rk3568-nanopi-r5s.dtb \ rk3568-rock-3a.dtb diff --git a/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi b/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi new file mode 100644 index 00..fe5bc6af47 --- /dev/null +++ b/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rk3568-nanopi-r5s-u-boot.dtsi" diff --git a/arch/arm/dts/rk3568-nanopi-r5c.dts b/arch/arm/dts/rk3568-nanopi-r5c.dts new file mode 100644 index 00..f70ca9f047 --- /dev/null +++ b/arch/arm/dts/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 + */ + +/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 = <_button_pin>; + + button-reset { + debounce-interval = <50>; + gpios = < RK_PB7 GPIO_ACTIVE_LOW>; + label = "reset"; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <_led_pin>, <_led_pin>, <_led_pin>, <_led_pin>; + + led-lan { + color = ; + function = LED_FUNCTION_LAN; + gpios = < RK_PA3 GPIO_ACTIVE_HIGH>; + }; + + power_led: led-power { + color = ; + function = LED_FUNCTION_POWER; + linux,default-trigger = "heartbeat"; + gpios = < RK_PA2 GPIO_ACTIVE_HIGH>; + }; + + led-wan { + color = ; + function = LED_FUNCTION_WAN; + gpios = < RK_PA4 GPIO_ACTIVE_HIGH>; + }; + + led-wlan { + color = ; + function = LED_FUNCTION_WLAN; + gpios = < RK_PA5 GPIO_ACTIVE_HIGH>; + }; + }; +}; + + { + pinctrl-names = "default"; + pinctrl-0 = <_reset_pin>; + reset-gpios = < RK_PC1 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + + { + num-lanes = <1>; + reset-gpios = < RK_PA0 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <_pcie>; + status = "okay"; +}; + + { + num-lanes = <1>; + reset-gpios = < RK_PB6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <_pcie>; + status = "okay"; +}; + + { + gpio-leds { + lan_led_pin: lan-led-pin { + rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO _pull_none>; + }; + + power_led_pin: power-led-pin { + rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO _pull_none>; + }; + + wan_led_pin: wan-led-pin { + rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO _pull_none>; + }; + + wlan_led_pin: wlan-led-pin { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO _pull_none>; + }; + }; + + pcie { + pcie20_reset_pin: pcie20-reset-pin { + rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO _pull_up>; + }; + }; + + rockchip-key { + reset_button_pin: reset-button-pin { + rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO