sunxi: add support for FriendlyARM NanoPi R1S H5
Specification:
CPU: Allwinner H5, Quad-core Cortex-A53
DDR3 RAM: 512MB
Network: 10/100/1000M Ethernet x 2
USB Host: Type-A x 1
MicroSD Slot x 1
MicroUSB: for power input
Debug Serial Port: 3Pin pin-header
LED: WAN, LAN, SYS
KEY: Reset
Power Supply: DC 5V/2A
Installation:
Write the image to SD Card with dd.
Note:
1. OpenWrt currently does not support LED_FUNCTION, change back to the
previous practice (Consistent with NanoPi R1).
2. Since the upstream commit https://github.com/torvalds/linux/bbc4d71
("net: phy: realtek: fix rtl8211e rx/tx delay config"), we need to
change the phy-mode from rgmii to rgmii-id.
So set phy-mode for 5.4 and 5.10 respectively.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
This commit is contained in:
committed by
Hauke Mehrtens
parent
e43eb16efe
commit
fde68cb809
@@ -7,7 +7,8 @@ boardname="${board##*,}"
|
||||
board_config_update
|
||||
|
||||
case $board in
|
||||
friendlyarm,nanopi-r1)
|
||||
friendlyarm,nanopi-r1|\
|
||||
friendlyarm,nanopi-r1s-h5)
|
||||
ucidef_set_led_netdev "wan" "WAN" "nanopi:green:wan" "eth0"
|
||||
ucidef_set_led_netdev "lan" "LAN" "nanopi:green:lan" "eth1"
|
||||
;;
|
||||
|
||||
@@ -3,27 +3,54 @@
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
sunxi_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
friendlyarm,nanopi-r1|\
|
||||
friendlyarm,nanopi-r1s-h5)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
lamobo,lamobo-r1)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
||||
;;
|
||||
olimex,a20-olinuxino-micro)
|
||||
ucidef_set_interface_lan "wlan0"
|
||||
;;
|
||||
xunlong,orangepi-r1)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
sunxi_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
local lan_mac=""
|
||||
local wan_mac=""
|
||||
local label_mac=""
|
||||
|
||||
case "$board" in
|
||||
friendlyarm,nanopi-r1s-h5)
|
||||
lan_mac=$(get_mac_binary "/sys/bus/i2c/devices/0-0051/eeprom" 0xfa)
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
||||
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
||||
}
|
||||
|
||||
board_config_update
|
||||
|
||||
case $(board_name) in
|
||||
friendlyarm,nanopi-r1)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
lamobo,lamobo-r1)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
||||
;;
|
||||
olimex,a20-olinuxino-micro)
|
||||
ucidef_set_interface_lan "wlan0"
|
||||
;;
|
||||
xunlong,orangepi-r1)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
esac
|
||||
|
||||
board=$(board_name)
|
||||
sunxi_setup_interfaces $board
|
||||
sunxi_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user