target/rk3568: add support for FriendlyElec NanoPi R5S LTS and C1
NanoPi R5S LTS NanoPi R5S C1
This commit is contained in:
parent
d09a28477b
commit
c01131962a
|
@ -0,0 +1,72 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2023 FriendlyElec Computer Tech. Co., Ltd.
|
||||
* (http://www.friendlyelec.com)
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "rk3568-nanopi-r5s.dts"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R5S C1";
|
||||
compatible = "friendlyelec,nanopi-r5s-c1", "rockchip,rk3568";
|
||||
|
||||
m2-wlan-radio {
|
||||
compatible = "rfkill-gpio";
|
||||
type = "wlan";
|
||||
shutdown-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&mach {
|
||||
hwrev = <7>;
|
||||
model = "NanoPi R5S C1";
|
||||
};
|
||||
|
||||
/delete-node/ &r8125_2;
|
||||
|
||||
&pcie3x1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&m2_w_disable_pin>;
|
||||
reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pcie3x2 {
|
||||
max-link-speed = <3>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
m2-pins {
|
||||
m2_w_disable_pin: m2-w-disable-pin {
|
||||
rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_output_high>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
|
||||
spi_oled091: oled091@0 {
|
||||
status = "okay";
|
||||
compatible = "solomon,ssd1306";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000000>;
|
||||
dc-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_LOW>;
|
||||
width = <128>;
|
||||
height = <32>;
|
||||
buswidth = <8>;
|
||||
fps = <30>;
|
||||
rotate = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart5 {
|
||||
pinctrl-0 = <&uart5m1_xfer>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&uart7 {
|
||||
pinctrl-0 = <&uart7m1_xfer>;
|
||||
status = "disabled";
|
||||
};
|
|
@ -0,0 +1,52 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2023 FriendlyElec Computer Tech. Co., Ltd.
|
||||
* (http://www.friendlyelec.com)
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "rk3568-nanopi-r5s.dts"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R5S LTS";
|
||||
compatible = "friendlyelec,nanopi-r5s", "rockchip,rk3568";
|
||||
};
|
||||
|
||||
&mach {
|
||||
hwrev = <5>;
|
||||
model = "NanoPi R5S LTS";
|
||||
};
|
||||
|
||||
&pcie3x2 {
|
||||
max-link-speed = <3>;
|
||||
};
|
||||
|
||||
&pwm7 {
|
||||
compatible = "rockchip,remotectl-pwm";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm7_pins>;
|
||||
remote_pwm_id = <7>;
|
||||
handle_cpu_id = <1>;
|
||||
remote_support_psci = <0>;
|
||||
status = "okay";
|
||||
|
||||
ir_key1 {
|
||||
rockchip,usercode = <0xc43b>;
|
||||
rockchip,key_table =
|
||||
<0xff KEY_POWER>,
|
||||
<0xef KEY_LEFT>,
|
||||
<0xed KEY_RIGHT>,
|
||||
<0xf2 KEY_UP>,
|
||||
<0xea KEY_DOWN>,
|
||||
<0xee KEY_ENTER>,
|
||||
<0xe9 KEY_MUTE>,
|
||||
<0xf1 KEY_VOLUMEDOWN>,
|
||||
<0xf3 KEY_VOLUMEUP>,
|
||||
<0xae KEY_MENU>,
|
||||
<0xeb KEY_LEFTMETA>,
|
||||
<0xaf KEY_BACK>,
|
||||
<0xf7 KEY_MODE>,
|
||||
<0xe5 KEY_SYSRQ>,
|
||||
<0xf5 KEY_ESC>;
|
||||
};
|
||||
};
|
|
@ -1,4 +1,6 @@
|
|||
# friendlyelec rk3568 combined image, board detected by ADC
|
||||
# https://github.com/friendlyarm/uboot-rockchip/blob/nanopi5-v2017.09/board/rockchip/nanopi5/hwrev.c
|
||||
# R5S < 151 < R5C < 343 < R5S LTS < 478 < R5S C1
|
||||
|
||||
env delete hwrev
|
||||
env delete adc_value
|
||||
|
@ -8,7 +10,13 @@ env delete adc_value
|
|||
adc single saradc@fe720000 1 adc_value
|
||||
|
||||
if test -n "$adc_value"; then
|
||||
if test "$adc_value" -ge 151; then
|
||||
if test "$adc_value" -ge 478; then
|
||||
echo board rev07
|
||||
setenv hwrev 11
|
||||
elif test "$adc_value" -ge 343; then
|
||||
echo board rev05
|
||||
setenv hwrev 10
|
||||
elif test "$adc_value" -ge 151; then
|
||||
echo board rev02
|
||||
setenv hwrev 1
|
||||
fi
|
||||
|
|
|
@ -141,8 +141,8 @@ $(call Device/rk3568)
|
|||
$(call Device/rk3568_combined_friendlyelec)
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R5S/R5C combined
|
||||
SUPPORTED_DEVICES += friendlyelec,nanopi-r5s friendlyarm,nanopi-r5s friendlyelec,nanopi-r5c
|
||||
DEVICE_DTS := rk3568-nanopi-r5s rk3568-nanopi-r5c
|
||||
SUPPORTED_DEVICES += friendlyelec,nanopi-r5s friendlyarm,nanopi-r5s friendlyelec,nanopi-r5c friendlyelec,nanopi-r5s-c1
|
||||
DEVICE_DTS := rk3568-nanopi-r5s rk3568-nanopi-r5c rk3568-nanopi-r5s-lts rk3568-nanopi-r5s-c1
|
||||
DEVICE_PACKAGES := kmod-r8125 kmod-nvme kmod-scsi-core kmod-hwmon-pwmfan kmod-thermal
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r5s
|
||||
|
|
|
@ -12,7 +12,7 @@ case $board in
|
|||
firefly,rk3568-roc-pc)
|
||||
ucidef_set_led_timer "health" "health" "firefly:yellow:user" "200" "800"
|
||||
;;
|
||||
friendlyelec,nanopi-r5s)
|
||||
friendlyelec,nanopi-r5s|friendlyelec,nanopi-r5s-c1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth1"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth2"
|
||||
|
|
|
@ -26,7 +26,7 @@ rockchip_setup_interfaces()
|
|||
ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
|
||||
;;
|
||||
hinlink,opc-h69k|\
|
||||
friendlyelec,nanopi-r5s)
|
||||
friendlyelec,nanopi-r5s|friendlyelec,nanopi-r5s-c1)
|
||||
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
|
||||
;;
|
||||
lyt,t68m|\
|
||||
|
@ -81,6 +81,7 @@ rockchip_setup_macs()
|
|||
easepi,ars4|\
|
||||
firefly,rk3568-roc-pc|\
|
||||
friendlyelec,nanopi-r5s|\
|
||||
friendlyelec,nanopi-r5s-c1|\
|
||||
friendlyelec,nanopi-r5c|\
|
||||
friendlyelec,nanopi-r6s|\
|
||||
friendlyelec,nanopi-r6c|\
|
||||
|
|
|
@ -104,7 +104,7 @@ board_fixup_iface_name() {
|
|||
rename_iface wan eth1
|
||||
fi
|
||||
;;
|
||||
friendlyelec,nanopi-r5s)
|
||||
friendlyelec,nanopi-r5s|friendlyelec,nanopi-r5s-c1)
|
||||
device="$(get_iface_device eth2)"
|
||||
# r5s lan1 is under pcie2x1
|
||||
if [[ "$device" = "0000:01:00.0" ]]; then
|
||||
|
@ -171,7 +171,7 @@ board_set_iface_smp_affinity() {
|
|||
set_iface_cpumask 4 eth1
|
||||
;;
|
||||
hinlink,opc-h69k|\
|
||||
friendlyelec,nanopi-r5s)
|
||||
friendlyelec,nanopi-r5s|friendlyelec,nanopi-r5s-c1)
|
||||
set_iface_cpumask 2 eth0
|
||||
if ethtool -i eth1 | grep -Fq 'driver: r8169'; then
|
||||
set_iface_cpumask 4 "eth1"
|
||||
|
|
|
@ -51,6 +51,7 @@ preinit_otg() {
|
|||
# default host mode, nothing to do
|
||||
;;
|
||||
friendlyelec,nanopi-r5s|\
|
||||
friendlyelec,nanopi-r5s-c1|\
|
||||
friendlyelec,nanopi-r5c)
|
||||
# auto switch role
|
||||
;;
|
||||
|
|
|
@ -12,6 +12,7 @@ export_ota_url() {
|
|||
export -n OTA_URL_BASE="https://fw0.koolcenter.com/iStoreOS/r6xs"
|
||||
;;
|
||||
friendlyelec,nanopi-r5c|\
|
||||
friendlyelec,nanopi-r5s-c1|\
|
||||
friendlyelec,nanopi-r5s)
|
||||
export -n OTA_URL_BASE="https://fw0.koolcenter.com/iStoreOS/r5s"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue