rockchip: rk3328: add support for FriendlyARM NanoPi NEO3
Subsystems (2)
PATCH v2 1/1 rockchip: rk3328: add support for FriendlyARM NanoPi NEO3
This patch adds support for FriendlyARM NanoPi NEO3
Soc: RockChip RK3328 RAM: 1GB/2GB DDR4 LAN: 10/100/1000M Ethernet with unique MAC USB Host: 1x USB3.0 Type A and 2x USB2.0 on 2.54mm pin header MicroSD: x 1 for system boot and storage LED: Power LED x 1, System LED x 1 Key: User Button x 1 Fan: 2 Pin JST ZH 1.5mm Connector for 5V Fan GPIO: 26 pin-header, include I2C, UART, SPI, I2S, GPIO Power: 5V/1A, via Type-C or GPIO
---
This is another shot at previous work submitted by Marty Jones
<[email protected]> (https://lore.kernel.org/linux-arm-kernel/[email protected]/),
which is now a year old.
v2: Following up on Robin Murphy's comments, the NEO3 DTS is now standalone and no longer includes the nanopi R2S one. The lan_led and wan_len nodes have been removed, and the sys_led node has been renamed to stat_led in accordance with the board schematics.
arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-nanopi-neo3.dts | 396 ++++++++++++++++++ 2 files changed, 397 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-neo3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +396 -0
396 lines not on this page · raw message
Signature · 7 lines
2.34.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi,
Quoted 18 lines · Julian Pidancet
This patch adds support for FriendlyARM NanoPi NEO3
Soc: RockChip RK3328 RAM: 1GB/2GB DDR4 LAN: 10/100/1000M Ethernet with unique MAC USB Host: 1x USB3.0 Type A and 2x USB2.0 on 2.54mm pin header MicroSD: x 1 for system boot and storage LED: Power LED x 1, System LED x 1 Key: User Button x 1 Fan: 2 Pin JST ZH 1.5mm Connector for 5V Fan GPIO: 26 pin-header, include I2C, UART, SPI, I2S, GPIO Power: 5V/1A, via Type-C or GPIOSigned-off-by Julian Pidancet <[email protected]>
arch/arm64/boot/dts/rockchip/Makefile dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb · line 13
Quoted 4 lines
arch/arm64/boot/dts/rockchip/Makefile +1
-0@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-neo3.dtb
Alphabetical order; neo3 goes before r2s.
Quoted 9 lines
arch/arm64/boot/dts/rockchip/Makefile +0
-0dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtbarch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +0
-0
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts line 10
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +10
-0@@ -0,0 +1,396 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 David Bauer <[email protected]> + * Copyright (c) 2022 Julian Pidancet <[email protected]> + */ + +/dts-v1/; + +#include <dt-bindings/input/input.h> +#include <dt-bindings/gpio/gpio.h>
Alphabetical order? So this goes before ../input.
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts line 21
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +11
-0+#include "rk3328.dtsi" + +/ { + model = "FriendlyElec NanoPi NEO3"; + compatible = "friendlyarm,nanopi-neo3", "rockchip,rk3328"; + + aliases { + led-boot = &stat_led; + led-failsafe = &stat_led; + led-running = &stat_led; + led-upgrade = &stat_led;
I'm pretty sure all these led-* aliases are OpenWRT extensions and probably shouldn't be included in upstream device trees.
Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +1
-0+ };
...
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +8
-0+ leds { + compatible = "gpio-leds"; + pinctrl-0 = <&stat_led_pin>; + pinctrl-names = "default"; + + stat_led: led-0 { + gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; + label = "nanopi-neo4:green:stat";
This property is deprecated in favor of "color" and "function". For function, maybe LED_FUNCTION_STATUS? See Documentation/devicetree/bindings/leds/common.yaml.
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +2
-0+ }; + };
...
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts line 394
Quoted 9 lines
+&usbdrd_dwc3 {
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +8
-0+ dr_mode = "host"; + status = "okay"; + + usb-eth@2 { + compatible = "realtek,rtl8153"; + reg = <2>; + + realtek,led-data = <0x87>;
This compatible and property are all downstream OpenWRT; they don't exist upstream. So you should drop them if you're trying to get this DTS merged upstream.
You might also be able to head off some similar issues by running through the schema checks. See:
Documentation/devicetree/writing-schema.rst
and
make dtbs_check
Brian
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts new file +2
-0+ }; +};
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip