Re: [PATCH v6 2/3] arm64: dts: rockchip: Split out the common NanoPi RK3528 parts

From: Jonas Karlman

Date: Sat Sep 19 2026 - 05:39:14 EST


Hi,

On 9/14/2026 3:35 PM, 安容 via B4 Relay wrote:
> From: 安容 <HystericalDragons@xxxxxxxxx>
>
> The FriendlyElec NanoPi Zero2 and the NanoPi R28S share their power
> tree, storage, RGMII Ethernet, RTC, SYS LED and debug console. Move
> those parts into rk3528-nanopi.dtsi so the NanoPi R28S can reuse them,
> and leave only the board specific nodes in the NanoPi Zero2 devicetree.
>
> Suggested-by: Chukun Pan <amadeus@xxxxxxxxxx>
> Signed-off-by: 安容 <HystericalDragons@xxxxxxxxx>
> ---
> .../boot/dts/rockchip/rk3528-nanopi-zero2.dts | 291 +--------------------
> arch/arm64/boot/dts/rockchip/rk3528-nanopi.dtsi | 288 ++++++++++++++++++++
> 2 files changed, 297 insertions(+), 282 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts b/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts
> index 97d85124d2..8a7dbd539f 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts
> @@ -2,41 +2,13 @@
>
> /dts-v1/;
>
> -#include <dt-bindings/input/input.h>
> #include <dt-bindings/leds/common.h>

You can also drop this include, you are also adding this include to the
rk3528-nanopi.dtsi file.

> -#include <dt-bindings/pwm/pwm.h>
> -#include "rk3528.dtsi"
> +#include "rk3528-nanopi.dtsi"
>
> / {
> model = "FriendlyElec NanoPi Zero2";
> compatible = "friendlyarm,nanopi-zero2", "rockchip,rk3528";

[snip]

> +&leds {

This should also include a 'pinctrl-names = "default"', as we are
re-defining pinctrl-0 here.

> + pinctrl-0 = <&led1>, <&led_sys>;

The led1 label is defined/shared among the three boards, yet led-1 is
defined in each board DT. Maybe define a common led-1 or move the led1
label to board DT?

>
> + led-1 {
> + color = <LED_COLOR_ID_GREEN>;
> + default-state = "on";
> + function = LED_FUNCTION_STATUS;
> + gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "default-on";
> };
> };

[snip]

> diff --git a/arch/arm64/boot/dts/rockchip/rk3528-nanopi.dtsi b/arch/arm64/boot/dts/rockchip/rk3528-nanopi.dtsi
> new file mode 100644
> index 0000000000..f15493f825
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3528-nanopi.dtsi
> @@ -0,0 +1,288 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Common parts of the FriendlyElec RK3528 boards: NanoPi Zero2 and NanoPi R28S.

This comment does not really serve a purpose, this is already implied
from the filename. And if you want to keep it, please use something that
is more generic and does not need to change when R28S DT and NEO3 Plus
DT is added.

Common parts of the FriendlyElec NanoPi RK3528 series boards

> + */
> +
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pwm/pwm.h>
> +#include "rk3528.dtsi"

[snip]

> +&pinctrl {
> + ethernet {
> + gmac1_rstn_l: gmac1-rstn-l {
> + rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +
> + leds {
> + led1: led1 {
> + rockchip,pins = <4 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
> + };

As mentioned above, not sure why we cannot define a common led-1 here if
we also define the pin in the common dtsi.

Regards,
Jonas

> +
> + led_sys: led-sys {
> + rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +
> + rtc {
> + rtc_int_l: rtc-int-l {
> + rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
> + };
> + };
> +
> + sdmmc {
> + sdmmc_pwren_l: sdmmc-pwren-l {
> + rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
> + rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +};

[snip]