mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
rockchip: add NanoPi R2C support
This board is a fork of NanoPi R2S, with the native NIC changed. Hardware -------- RockChip RK3328 ARM64 (4 cores) 1GB DDR4 RAM 2x 1000 Base-T 3 LEDs (LAN / WAN / SYS) 1 Button (Reset) Micro-SD slot USB 2.0 Port Installation ------------ Uncompress the OpenWrt sysupgrade and write it to a micro SD card using dd. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
b9b3fd0df0
commit
9e0e1f4685
@ -9,6 +9,7 @@ boardname="${board##*,}"
|
||||
board_config_update
|
||||
|
||||
case $board in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
xunlong,orangepi-r1-plus)
|
||||
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
|
||||
|
@ -8,6 +8,7 @@ rockchip_setup_interfaces()
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
xunlong,orangepi-r1-plus)
|
||||
@ -34,6 +35,7 @@ rockchip_setup_macs()
|
||||
local label_mac=""
|
||||
|
||||
case "$board" in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s)
|
||||
wan_mac=$(nanopi_r2s_generate_mac)
|
||||
lan_mac=$(macaddr_add "$wan_mac" +1)
|
||||
|
@ -2,6 +2,16 @@
|
||||
#
|
||||
# Copyright (C) 2020 Tobias Maedel
|
||||
|
||||
define Device/friendlyarm_nanopi-r2c
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R2C
|
||||
SOC := rk3328
|
||||
UBOOT_DEVICE_NAME := nanopi-r2c-rk3328
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-bin | gzip | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2c
|
||||
|
||||
define Device/friendlyarm_nanopi-r2s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R2S
|
||||
|
@ -0,0 +1,60 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
|
||||
@@ -0,0 +1,47 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * Copyright (c) 2021 Tianling Shen <cnsztl@immortalwrt.org>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "rk3328-nanopi-r2s.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R2C";
|
||||
+ compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328";
|
||||
+};
|
||||
+
|
||||
+&gmac2io {
|
||||
+ phy-handle = <&yt8521s>;
|
||||
+
|
||||
+ mdio {
|
||||
+ /delete-node/ ethernet-phy@1;
|
||||
+
|
||||
+ yt8521s: ethernet-phy@3 {
|
||||
+ compatible = "ethernet-phy-id0000.011a",
|
||||
+ "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <3>;
|
||||
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <50000>;
|
||||
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&lan_led {
|
||||
+ label = "nanopi-r2c:green:lan";
|
||||
+};
|
||||
+
|
||||
+&sys_led {
|
||||
+ label = "nanopi-r2c:red:sys";
|
||||
+};
|
||||
+
|
||||
+&wan_led {
|
||||
+ label = "nanopi-r2c:green:wan";
|
||||
+};
|
Loading…
x
Reference in New Issue
Block a user