rockchip: improve rk3528/rk3568 support

This commit is contained in:
aiamadeus 2025-02-24 23:30:06 +08:00
parent 2dc0ff4f66
commit 324daf1e8e
10 changed files with 112 additions and 49 deletions

View File

@ -19,13 +19,6 @@
stdout-path = "serial0:1500000n8";
};
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&ir_int_pin>;
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
@ -181,12 +174,6 @@
};
&pinctrl {
ir {
ir_int_pin: ir-int-pin {
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
lan_led_en: lan-led-en {
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;

View File

@ -57,6 +57,10 @@
};
};
&pwm3 {
status = "okay";
};
&sdhci {
status = "disabled";
};

View File

@ -16,12 +16,19 @@
led-upgrade = &led_work;
};
i2c {
i2c-gpio {
compatible = "i2c-gpio";
scl-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
sda-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
};
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&ir_int_pin>;
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@ -63,6 +70,14 @@
};
};
&pinctrl {
ir {
ir_int_pin: ir-int-pin {
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
&usb_host0_xhci {
maximum-speed = "high-speed";
phys = <&usb2phy0_otg>;

View File

@ -16,6 +16,13 @@
led-upgrade = &led_work;
};
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&ir_int_pin>;
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@ -64,6 +71,12 @@
};
&pinctrl {
ir {
ir_int_pin: ir-int-pin {
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
pcie {
rtl8111_isolate: rtl8111-isolate {
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;

View File

@ -65,6 +65,8 @@
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
pinctrl-0 = <&wifi_reg_on>;
post-power-on-delay-ms = <100>;
power-off-delay-us = <5000000>;
reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
};
@ -327,7 +329,6 @@
mmc-pwrseq = <&sdio_pwrseq>;
pinctrl-names = "default";
pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
post-power-on-delay-ms = <50>;
non-removable;
sd-uhs-sdr104;
status = "okay";

View File

@ -53,6 +53,8 @@
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable_h>;
post-power-on-delay-ms = <100>;
power-off-delay-us = <5000000>;
reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
};
@ -226,12 +228,6 @@
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
bluetooth {
bt_enable_h: bt-enable-h {
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
};
&pwm1 {
@ -269,9 +265,8 @@
mmc-pwrseq = <&sdio_pwrseq>;
pinctrl-names = "default";
pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
post-power-on-delay-ms = <50>;
non-removable;
sd-uhs-sdr104;
sd-uhs-sdr50;
status = "okay";
sdio_wifi@1 {

View File

@ -128,7 +128,7 @@
vin-supply = <&vcc5v0_sys>;
};
rk809-sound {
sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "Analog RK809";
@ -141,13 +141,6 @@
sound-dai = <&rk809>;
};
};
pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 100 150 200 255>;
#cooling-cells = <2>;
pwms = <&pwm0 0 50000 0>;
};
};
&combphy0 {
@ -524,11 +517,6 @@
status = "okay";
};
&pwm0 {
pinctrl-names = "active";
status = "okay";
};
&rng {
status = "okay";
};

View File

@ -50,8 +50,6 @@
gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&sata_pwr_en>;
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-name = "vcc5v0_ahci";
@ -106,6 +104,7 @@
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
realtek,led-data = <0x6d60>;
};
};
@ -113,6 +112,7 @@
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
realtek,led-data = <0x6d60>;
};
};

View File

@ -13,13 +13,19 @@
ethernet0 = &gmac1;
};
fan: pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 100 150 200 255>;
#cooling-cells = <2>;
pwms = <&pwm0 0 50000 0>;
};
vcc5v0_ahci: vcc5v0-ahci {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&sata_pwr_en>;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-name = "vcc5v0_ahci";
@ -27,6 +33,56 @@
};
};
&cpu_thermal {
trips {
cpu_passive: cpu_passive {
temperature = <40000>;
hysteresis = <2000>;
type = "active";
};
cpu_active: cpu_active {
temperature = <50000>;
hysteresis = <2000>;
type = "active";
};
cpu_warm: cpu_warm {
temperature = <60000>;
hysteresis = <2000>;
type = "active";
};
cpu_hot: cpu_hot {
temperature = <70000>;
hysteresis = <2000>;
type = "active";
};
};
cooling-maps {
map1 {
trip = <&cpu_passive>;
cooling-device = <&fan 0 1>;
};
map2 {
trip = <&cpu_active>;
cooling-device = <&fan 1 2>;
};
map3 {
trip = <&cpu_warm>;
cooling-device = <&fan 2 3>;
};
map4 {
trip = <&cpu_hot>;
cooling-device = <&fan 3 4>;
};
};
};
&gmac1 {
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
@ -63,6 +119,10 @@
};
};
&pwm0 {
status = "okay";
};
&sata0 {
target-supply = <&vcc5v0_ahci>;
};

View File

@ -26,7 +26,7 @@ define Device/armsom_sige1
DEVICE_VENDOR := ArmSoM
DEVICE_MODEL := Sige1
DEVICE_DTS := rockchip/rk3528-armsom-sige1
UBOOT_DEVICE_NAME := evb-rk3528
UBOOT_DEVICE_NAME := generic-rk3528
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3528 | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := brcmfmac-firmware-43752-sdio kmod-brcmfmac kmod-r8125 wpad -urngd
endef
@ -285,7 +285,7 @@ define Device/hinlink_opc-h28k
DEVICE_VENDOR := HINLINK
DEVICE_MODEL := OPC-H28K
SOC := rk3528
UBOOT_DEVICE_NAME := evb-rk3528
UBOOT_DEVICE_NAME := generic-rk3528
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3528 | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-r8168 -urngd
endef
@ -295,9 +295,9 @@ define Device/hinlink_opc-h29k
DEVICE_VENDOR := HINLINK
DEVICE_MODEL := OPC-H29K
SOC := rk3528
UBOOT_DEVICE_NAME := evb-rk3528
UBOOT_DEVICE_NAME := generic-rk3528
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3528 | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-aic8800 kmod-fb-tft-st7789v wpad-openssl -urngd
DEVICE_PACKAGES := kmod-aic8800s kmod-fb-tft-st7789v wpad-openssl -urngd
endef
TARGET_DEVICES += hinlink_opc-h29k
@ -327,9 +327,9 @@ define Device/hinlink_opc-ht2
DEVICE_VENDOR := HINLINK
DEVICE_MODEL := OPC-HT2
SOC := rk3528
UBOOT_DEVICE_NAME := evb-rk3528
UBOOT_DEVICE_NAME := generic-rk3528
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3528 | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-aic8800 wpad-openssl -urngd
DEVICE_PACKAGES := kmod-aic8800s wpad-openssl -urngd
endef
TARGET_DEVICES += hinlink_opc-ht2
@ -377,7 +377,7 @@ define Device/radxa_e20c
DEVICE_VENDOR := Radxa
DEVICE_MODEL := E20C
DEVICE_DTS := rockchip/rk3528-radxa-e20c
UBOOT_DEVICE_NAME := evb-rk3528
UBOOT_DEVICE_NAME := radxa-e20c-rk3528
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3528 | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-r8168 -urngd
endef
@ -409,7 +409,7 @@ define Device/radxa_rock-3c
SOC := rk3566
UBOOT_DEVICE_NAME := rock-3c-rk3566
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-aic8800 wpad-openssl
DEVICE_PACKAGES := kmod-aic8800s wpad-openssl
endef
TARGET_DEVICES += radxa_rock-3c
@ -563,9 +563,9 @@ TARGET_DEVICES += xunlong_orangepi-r1-plus-lts
define Device/widora_mangopi-m28
DEVICE_VENDOR := Widora
SOC := rk3528
UBOOT_DEVICE_NAME := evb-rk3528
UBOOT_DEVICE_NAME := generic-rk3528
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3528 | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-aic8800 kmod-r8168 wpad-openssl -urngd
DEVICE_PACKAGES := kmod-aic8800s kmod-r8168 wpad-openssl -urngd
endef
define Device/widora_mangopi-m28c