mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
rockchip: add support for FastRhino R66S/R68S
For R68S, flash in as follows: dd if=openwrt-rockchip-armv8-fastrhino_r68s-ext4-sysupgrade.img of=/dev/mmcblk0
This commit is contained in:
parent
6aaf68d8f5
commit
b477a0b702
@ -171,10 +171,23 @@ define U-Boot/rock-3a-rk3568
|
|||||||
DDR:=rk3568_ddr_1560MHz_v1.13.bin
|
DDR:=rk3568_ddr_1560MHz_v1.13.bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define U-Boot/r66s-rk3568
|
||||||
|
BUILD_SUBTARGET:=armv8
|
||||||
|
NAME:=R66S/R68S
|
||||||
|
BUILD_DEVICES:= \
|
||||||
|
fastrhino_r66s \
|
||||||
|
fastrhino_r68s
|
||||||
|
DEPENDS:=+PACKAGE_u-boot-r66s-rk3568:arm-trusted-firmware-rk3568
|
||||||
|
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||||
|
ATF:=rk3568_bl31_v1.28.elf
|
||||||
|
DDR:=rk3568_ddr_1560MHz_v1.13.bin
|
||||||
|
endef
|
||||||
|
|
||||||
UBOOT_TARGETS := \
|
UBOOT_TARGETS := \
|
||||||
mrkaio-m68s-rk3568 \
|
mrkaio-m68s-rk3568 \
|
||||||
opc-h68k-rk3568 \
|
opc-h68k-rk3568 \
|
||||||
rock-3a-rk3568 \
|
rock-3a-rk3568 \
|
||||||
|
r66s-rk3568 \
|
||||||
guangmiao-g4c-rk3399 \
|
guangmiao-g4c-rk3399 \
|
||||||
nanopi-r4s-rk3399 \
|
nanopi-r4s-rk3399 \
|
||||||
nanopi-r4se-rk3399 \
|
nanopi-r4se-rk3399 \
|
||||||
|
@ -0,0 +1,140 @@
|
|||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||||
|
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||||
|
rk3568-bpi-r2-pro.dtb \
|
||||||
|
rk3568-evb.dtb \
|
||||||
|
+ rk3568-r66s.dtb \
|
||||||
|
rk3568-opc-h68k.dtb \
|
||||||
|
rk3568-mrkaio-m68s.dtb \
|
||||||
|
rk3568-nanopi-r5s.dtb \
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/rk3568-r66s-u-boot.dtsi
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
+
|
||||||
|
+#include "rk3568-u-boot.dtsi"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = &uart2;
|
||||||
|
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&sdmmc0 {
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ u-boot,spl-fifo-mode;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart2 {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+ clock-frequency = <24000000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/rk3568-r66s.dts
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
+#include "rk3568-evb.dts"
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/r66s-rk3568_defconfig
|
||||||
|
@@ -0,0 +1,98 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||||
|
+CONFIG_ARCH_ROCKCHIP=y
|
||||||
|
+CONFIG_SYS_TEXT_BASE=0x00a00000
|
||||||
|
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||||
|
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||||
|
+CONFIG_NR_DRAM_BANKS=2
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="rk3568-r66s"
|
||||||
|
+CONFIG_ROCKCHIP_RK3568=y
|
||||||
|
+CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
||||||
|
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||||
|
+CONFIG_SPL_MMC=y
|
||||||
|
+CONFIG_SPL_SERIAL=y
|
||||||
|
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||||
|
+CONFIG_TARGET_EVB_RK3568=y
|
||||||
|
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||||
|
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
|
+CONFIG_DEBUG_UART=y
|
||||||
|
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||||
|
+CONFIG_API=y
|
||||||
|
+CONFIG_FIT=y
|
||||||
|
+CONFIG_FIT_VERBOSE=y
|
||||||
|
+CONFIG_SPL_LOAD_FIT=y
|
||||||
|
+CONFIG_OF_SYSTEM_SETUP=y
|
||||||
|
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-r66s.dtb"
|
||||||
|
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||||
|
+CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=2
|
||||||
|
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||||
|
+CONFIG_SPL_STACK_R=y
|
||||||
|
+CONFIG_SPL_SEPARATE_BSS=y
|
||||||
|
+CONFIG_SPL_ATF=y
|
||||||
|
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=y
|
||||||
|
+CONFIG_CMD_BIND=y
|
||||||
|
+CONFIG_CMD_CLK=y
|
||||||
|
+CONFIG_CMD_GPIO=y
|
||||||
|
+CONFIG_CMD_GPT=y
|
||||||
|
+CONFIG_CMD_I2C=y
|
||||||
|
+CONFIG_CMD_MMC=y
|
||||||
|
+CONFIG_CMD_USB=y
|
||||||
|
+# CONFIG_CMD_SETEXPR is not set
|
||||||
|
+CONFIG_CMD_PMIC=y
|
||||||
|
+CONFIG_CMD_REGULATOR=y
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+CONFIG_SPL_OF_CONTROL=y
|
||||||
|
+CONFIG_OF_LIVE=y
|
||||||
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||||
|
+CONFIG_SPL_DM_WARN=y
|
||||||
|
+CONFIG_SPL_REGMAP=y
|
||||||
|
+CONFIG_SPL_SYSCON=y
|
||||||
|
+CONFIG_SPL_CLK=y
|
||||||
|
+CONFIG_ROCKCHIP_GPIO=y
|
||||||
|
+CONFIG_ROCKCHIP_GPIO_V2=y
|
||||||
|
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||||
|
+CONFIG_MISC=y
|
||||||
|
+CONFIG_MMC_HS200_SUPPORT=y
|
||||||
|
+CONFIG_SPL_MMC_HS200_SUPPORT=y
|
||||||
|
+CONFIG_MMC_DW=y
|
||||||
|
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||||
|
+CONFIG_MMC_SDHCI=y
|
||||||
|
+CONFIG_MMC_SDHCI_SDMA=y
|
||||||
|
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||||
|
+CONFIG_DM_ETH=y
|
||||||
|
+CONFIG_ETH_DESIGNWARE=y
|
||||||
|
+CONFIG_GMAC_ROCKCHIP=y
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_DM_PMIC=y
|
||||||
|
+CONFIG_PMIC_RK8XX=y
|
||||||
|
+CONFIG_SPL_PMIC_RK8XX=y
|
||||||
|
+CONFIG_REGULATOR_PWM=y
|
||||||
|
+CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_DM_REGULATOR_GPIO=y
|
||||||
|
+CONFIG_REGULATOR_RK8XX=y
|
||||||
|
+CONFIG_PWM_ROCKCHIP=y
|
||||||
|
+CONFIG_SPL_RAM=y
|
||||||
|
+CONFIG_DM_RESET=y
|
||||||
|
+CONFIG_BAUDRATE=1500000
|
||||||
|
+CONFIG_DEBUG_UART_SHIFT=2
|
||||||
|
+CONFIG_SYSRESET=y
|
||||||
|
+CONFIG_SYSRESET_PSCI=y
|
||||||
|
+CONFIG_USB=y
|
||||||
|
+CONFIG_USB_XHCI_HCD=y
|
||||||
|
+CONFIG_USB_XHCI_DWC3=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_USB_EHCI_GENERIC=y
|
||||||
|
+CONFIG_USB_OHCI_HCD=y
|
||||||
|
+CONFIG_USB_OHCI_GENERIC=y
|
||||||
|
+CONFIG_USB_DWC3=y
|
||||||
|
+CONFIG_USB_DWC3_GENERIC=y
|
||||||
|
+CONFIG_ROCKCHIP_USB2_PHY=y
|
||||||
|
+CONFIG_USB_KEYBOARD=y
|
||||||
|
+CONFIG_USB_HOST_ETHER=y
|
||||||
|
+CONFIG_USB_ETHER_LAN75XX=y
|
||||||
|
+CONFIG_USB_ETHER_LAN78XX=y
|
||||||
|
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
|
+CONFIG_ERRNO_STR=y
|
@ -21,6 +21,12 @@ rockchip_setup_interfaces()
|
|||||||
hinlink,opc-h68k)
|
hinlink,opc-h68k)
|
||||||
ucidef_set_interfaces_lan_wan 'eth1 eth2 eth3' 'eth0'
|
ucidef_set_interfaces_lan_wan 'eth1 eth2 eth3' 'eth0'
|
||||||
;;
|
;;
|
||||||
|
fastrhino,r66s)
|
||||||
|
ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
|
||||||
|
;;
|
||||||
|
fastrhino,r68s)
|
||||||
|
ucidef_set_interfaces_lan_wan 'eth0 eth2 eth3' 'eth1'
|
||||||
|
;;
|
||||||
friendlyarm,nanopi-r5s)
|
friendlyarm,nanopi-r5s)
|
||||||
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
|
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
|
||||||
;;
|
;;
|
||||||
@ -47,6 +53,8 @@ rockchip_setup_macs()
|
|||||||
case "$board" in
|
case "$board" in
|
||||||
ezpro,mrkaio-m68s|\
|
ezpro,mrkaio-m68s|\
|
||||||
hinlink,opc-h68k|\
|
hinlink,opc-h68k|\
|
||||||
|
fastrhino,r66s|\
|
||||||
|
fastrhino,r68s|\
|
||||||
friendlyarm,nanopi-r2c|\
|
friendlyarm,nanopi-r2c|\
|
||||||
friendlyarm,nanopi-r2s|\
|
friendlyarm,nanopi-r2s|\
|
||||||
friendlyarm,nanopi-r5s|\
|
friendlyarm,nanopi-r5s|\
|
||||||
|
@ -0,0 +1,500 @@
|
|||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
// Copyright (c) 2022 AmadeusGhost <amadeus@jmu.edu.cn>
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/pinctrl/rockchip.h>
|
||||||
|
#include "rk3568.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_work;
|
||||||
|
led-failsafe = &led_work;
|
||||||
|
led-running = &led_work;
|
||||||
|
led-upgrade = &led_work;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = "serial2:1500000n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc12v_dcin: vcc12v-dcin {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
regulator-name = "vcc12v_dcin";
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc3v3_sys: vcc3v3-sys {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
regulator-name = "vcc3v3_sys";
|
||||||
|
vin-supply = <&vcc12v_dcin>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc5v0_sys: vcc5v0-sys {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-name = "vcc5v0_sys";
|
||||||
|
vin-supply = <&vcc12v_dcin>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc5v0_usb: vcc5v0-usb {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-name = "vcc5v0_usb";
|
||||||
|
vin-supply = <&vcc12v_dcin>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc5v0_usb_otg: vcc5v0-usb-otg {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
enable-active-high;
|
||||||
|
gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&vcc5v0_usb_otg_en>;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-name = "vcc5v0_usb_otg";
|
||||||
|
vin-supply = <&vcc5v0_usb>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc3v3_pcie: vcc3v3-pcie {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
regulator-name = "vcc3v3_pcie";
|
||||||
|
vin-supply = <&vcc12v_dcin>;
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&reset_button_pin>;
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <50>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&led_work_en>;
|
||||||
|
|
||||||
|
led_work: led-0 {
|
||||||
|
label = "blue:work-led";
|
||||||
|
gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "heartbeat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&combphy0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&combphy1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&combphy2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&cpu0 {
|
||||||
|
cpu-supply = <&vdd_cpu>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&cpu1 {
|
||||||
|
cpu-supply = <&vdd_cpu>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&cpu2 {
|
||||||
|
cpu-supply = <&vdd_cpu>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&cpu3 {
|
||||||
|
cpu-supply = <&vdd_cpu>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
vdd_cpu: regulator@1c {
|
||||||
|
compatible = "tcs,tcs4525";
|
||||||
|
reg = <0x1c>;
|
||||||
|
fcs,suspend-voltage-selector = <1>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <712500>;
|
||||||
|
regulator-max-microvolt = <1390000>;
|
||||||
|
regulator-name = "vdd_cpu";
|
||||||
|
regulator-ramp-delay = <2300>;
|
||||||
|
vin-supply = <&vcc5v0_sys>;
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
rk809: pmic@20 {
|
||||||
|
compatible = "rockchip,rk809";
|
||||||
|
reg = <0x20>;
|
||||||
|
interrupt-parent = <&gpio0>;
|
||||||
|
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
#clock-cells = <1>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pmic_int>;
|
||||||
|
rockchip,system-power-controller;
|
||||||
|
wakeup-source;
|
||||||
|
|
||||||
|
vcc1-supply = <&vcc3v3_sys>;
|
||||||
|
vcc2-supply = <&vcc3v3_sys>;
|
||||||
|
vcc3-supply = <&vcc3v3_sys>;
|
||||||
|
vcc4-supply = <&vcc3v3_sys>;
|
||||||
|
vcc5-supply = <&vcc3v3_sys>;
|
||||||
|
vcc6-supply = <&vcc3v3_sys>;
|
||||||
|
vcc7-supply = <&vcc3v3_sys>;
|
||||||
|
vcc8-supply = <&vcc3v3_sys>;
|
||||||
|
vcc9-supply = <&vcc3v3_sys>;
|
||||||
|
|
||||||
|
regulators {
|
||||||
|
vdd_logic: DCDC_REG1 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-init-microvolt = <900000>;
|
||||||
|
regulator-initial-mode = <0x2>;
|
||||||
|
regulator-min-microvolt = <500000>;
|
||||||
|
regulator-max-microvolt = <1350000>;
|
||||||
|
regulator-name = "vdd_logic";
|
||||||
|
regulator-ramp-delay = <6001>;
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vdd_gpu: DCDC_REG2 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-init-microvolt = <900000>;
|
||||||
|
regulator-initial-mode = <0x2>;
|
||||||
|
regulator-min-microvolt = <500000>;
|
||||||
|
regulator-max-microvolt = <1350000>;
|
||||||
|
regulator-name = "vdd_gpu";
|
||||||
|
regulator-ramp-delay = <6001>;
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_ddr: DCDC_REG3 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-initial-mode = <0x2>;
|
||||||
|
regulator-name = "vcc_ddr";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-on-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vdd_npu: DCDC_REG4 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-init-microvolt = <900000>;
|
||||||
|
regulator-initial-mode = <0x2>;
|
||||||
|
regulator-min-microvolt = <500000>;
|
||||||
|
regulator-max-microvolt = <1350000>;
|
||||||
|
regulator-name = "vdd_npu";
|
||||||
|
regulator-ramp-delay = <6001>;
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_1v8: DCDC_REG5 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-name = "vcc_1v8";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vdda0v9_image: LDO_REG1 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <950000>;
|
||||||
|
regulator-max-microvolt = <950000>;
|
||||||
|
regulator-name = "vdda0v9_image";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vdda_0v9: LDO_REG2 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <900000>;
|
||||||
|
regulator-max-microvolt = <900000>;
|
||||||
|
regulator-name = "vdda_0v9";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vdda0v9_pmu: LDO_REG3 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <900000>;
|
||||||
|
regulator-max-microvolt = <900000>;
|
||||||
|
regulator-name = "vdda0v9_pmu";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-on-in-suspend;
|
||||||
|
regulator-suspend-microvolt = <900000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vccio_acodec: LDO_REG4 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
regulator-name = "vccio_acodec";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vccio_sd: LDO_REG5 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
regulator-name = "vccio_sd";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc3v3_pmu: LDO_REG6 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
regulator-name = "vcc3v3_pmu";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-on-in-suspend;
|
||||||
|
regulator-suspend-microvolt = <3300000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcca_1v8: LDO_REG7 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-name = "vcca_1v8";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcca1v8_pmu: LDO_REG8 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-name = "vcca1v8_pmu";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-on-in-suspend;
|
||||||
|
regulator-suspend-microvolt = <1800000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcca1v8_image: LDO_REG9 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <950000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-init-microvolt = <950000>;
|
||||||
|
regulator-name = "vcca1v8_image";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-on-in-suspend;
|
||||||
|
regulator-suspend-microvolt = <950000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_3v3: SWITCH_REG1 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-name = "vcc_3v3";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc3v3_sd: SWITCH_REG2 {
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-name = "vcc3v3_sd";
|
||||||
|
|
||||||
|
regulator-state-mem {
|
||||||
|
regulator-off-in-suspend;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie30phy {
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie3x1 {
|
||||||
|
num-lanes = <1>;
|
||||||
|
reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||||
|
vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pcie@10 {
|
||||||
|
reg = <0x00100000 0 0 0 0>;
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
|
||||||
|
rtl8125_1: pcie-eth@10,0 {
|
||||||
|
compatible = "pci10ec,8125";
|
||||||
|
reg = <0x000000 0 0 0 0>;
|
||||||
|
|
||||||
|
realtek,led-data = <0x4078>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie3x2 {
|
||||||
|
num-lanes = <1>;
|
||||||
|
rockchip,init-delay-ms = <100>;
|
||||||
|
reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||||
|
vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pcie@20 {
|
||||||
|
reg = <0x00200000 0 0 0 0>;
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
|
||||||
|
rtl8125_2: pcie-eth@20,0 {
|
||||||
|
compatible = "pci10ec,8125";
|
||||||
|
reg = <0x000000 0 0 0 0>;
|
||||||
|
|
||||||
|
realtek,led-data = <0x4078>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
leds {
|
||||||
|
led_work_en: led_work_en {
|
||||||
|
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pmic {
|
||||||
|
pmic_int: pmic_int {
|
||||||
|
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
rockchip-key {
|
||||||
|
reset_button_pin: reset-button-pin {
|
||||||
|
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
usb {
|
||||||
|
vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
|
||||||
|
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pmu_io_domains {
|
||||||
|
pmuio1-supply = <&vcc3v3_pmu>;
|
||||||
|
pmuio2-supply = <&vcc3v3_pmu>;
|
||||||
|
vccio1-supply = <&vccio_acodec>;
|
||||||
|
vccio3-supply = <&vccio_sd>;
|
||||||
|
vccio4-supply = <&vcc_1v8>;
|
||||||
|
vccio5-supply = <&vcc_3v3>;
|
||||||
|
vccio6-supply = <&vcc_1v8>;
|
||||||
|
vccio7-supply = <&vcc_3v3>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&saradc {
|
||||||
|
vref-supply = <&vcca_1v8>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&tsadc {
|
||||||
|
rockchip,hw-tshut-mode = <1>;
|
||||||
|
rockchip,hw-tshut-polarity = <0>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_host0_xhci {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_host1_xhci {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2phy0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2phy0_host {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2phy0_otg {
|
||||||
|
phy-supply = <&vcc5v0_usb_otg>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
@ -0,0 +1,26 @@
|
|||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "rk3568-fastrhino.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "FastRhino R66S";
|
||||||
|
compatible = "fastrhino,r66s", "rockchip,rk3568";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
mmc0 = &sdmmc0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&sdmmc0 {
|
||||||
|
bus-width = <4>;
|
||||||
|
cap-sd-highspeed;
|
||||||
|
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||||
|
disable-wp;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||||
|
vmmc-supply = <&vcc3v3_sd>;
|
||||||
|
vqmmc-supply = <&vccio_sd>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
@ -0,0 +1,83 @@
|
|||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "rk3568-fastrhino.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "FastRhino R68S";
|
||||||
|
compatible = "fastrhino,r68s", "rockchip,rk3568";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
ethernet0 = &gmac0;
|
||||||
|
ethernet1 = &gmac1;
|
||||||
|
mmc0 = &sdhci;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&gmac0 {
|
||||||
|
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||||
|
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
|
||||||
|
assigned-clock-rates = <0>, <125000000>;
|
||||||
|
clock_in_out = "output";
|
||||||
|
phy-mode = "rgmii-id";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&gmac0_miim
|
||||||
|
&gmac0_tx_bus2
|
||||||
|
&gmac0_rx_bus2
|
||||||
|
&gmac0_rgmii_clk
|
||||||
|
&gmac0_rgmii_bus>;
|
||||||
|
snps,reset-gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||||
|
snps,reset-active-low;
|
||||||
|
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||||
|
snps,reset-delays-us = <0 20000 100000>;
|
||||||
|
tx_delay = <0x3c>;
|
||||||
|
rx_delay = <0x2f>;
|
||||||
|
phy-handle = <&rgmii_phy0>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gmac1 {
|
||||||
|
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||||
|
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
|
||||||
|
assigned-clock-rates = <0>, <125000000>;
|
||||||
|
clock_in_out = "output";
|
||||||
|
phy-mode = "rgmii-id";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&gmac1m1_miim
|
||||||
|
&gmac1m1_tx_bus2
|
||||||
|
&gmac1m1_rx_bus2
|
||||||
|
&gmac1m1_rgmii_clk
|
||||||
|
&gmac1m1_rgmii_bus>;
|
||||||
|
snps,reset-gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>;
|
||||||
|
snps,reset-active-low;
|
||||||
|
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||||
|
snps,reset-delays-us = <0 20000 100000>;
|
||||||
|
tx_delay = <0x4f>;
|
||||||
|
rx_delay = <0x26>;
|
||||||
|
phy-handle = <&rgmii_phy1>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio0 {
|
||||||
|
rgmii_phy0: ethernet-phy@0 {
|
||||||
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
reg = <0x0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio1 {
|
||||||
|
rgmii_phy1: ethernet-phy@0 {
|
||||||
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
reg = <0x0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&sdhci {
|
||||||
|
bus-width = <8>;
|
||||||
|
max-frequency = <200000000>;
|
||||||
|
non-removable;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
@ -22,6 +22,26 @@ define Device/hinlink_opc-h68k
|
|||||||
endef
|
endef
|
||||||
#TARGET_DEVICES += hinlink_opc-h68k
|
#TARGET_DEVICES += hinlink_opc-h68k
|
||||||
|
|
||||||
|
define Device/fastrhino_common
|
||||||
|
DEVICE_VENDOR := FastRhino
|
||||||
|
SOC := rk3568
|
||||||
|
UBOOT_DEVICE_NAME := r66s-rk3568
|
||||||
|
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
|
||||||
|
DEVICE_PACKAGES := kmod-r8125
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Device/fastrhino_r66s
|
||||||
|
$(call Device/fastrhino_common)
|
||||||
|
DEVICE_MODEL := R66S
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += fastrhino_r66s
|
||||||
|
|
||||||
|
define Device/fastrhino_r68s
|
||||||
|
$(call Device/fastrhino_common)
|
||||||
|
DEVICE_MODEL := R68S
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += fastrhino_r68s
|
||||||
|
|
||||||
define Device/friendlyarm_nanopi-neo3
|
define Device/friendlyarm_nanopi-neo3
|
||||||
DEVICE_VENDOR := FriendlyARM
|
DEVICE_VENDOR := FriendlyARM
|
||||||
DEVICE_MODEL := NanoPi NEO3
|
DEVICE_MODEL := NanoPi NEO3
|
||||||
|
Loading…
Reference in New Issue
Block a user