rockchip: rk3308: Sync device tree from linux v6.8

Sync device tree from linux v6.8 and rename the rockchip,rk3308-mac
compatible in gmac_rockchip driver to match upstream linux.

Also move rk3308-roc-cc gmac node to u-boot.dtsi to not break features
not enabled in upstream device tree.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
Jonas Karlman 2024-04-08 18:14:07 +00:00 committed by Kever Yang
parent 0ae7475f87
commit 6bc81a5dc9
8 changed files with 908 additions and 765 deletions

View File

@ -23,7 +23,7 @@
poll-interval = <100>;
keyup-threshold-microvolt = <1800000>;
func-key {
button-func {
linux,code = <KEY_FN>;
label = "function";
press-threshold-microvolt = <18000>;
@ -37,31 +37,31 @@
poll-interval = <100>;
keyup-threshold-microvolt = <1800000>;
esc-key {
button-esc {
linux,code = <KEY_MICMUTE>;
label = "micmute";
press-threshold-microvolt = <1130000>;
};
home-key {
button-home {
linux,code = <KEY_MODE>;
label = "mode";
press-threshold-microvolt = <901000>;
};
menu-key {
button-menu {
linux,code = <KEY_PLAY>;
label = "play";
press-threshold-microvolt = <624000>;
};
vol-down-key {
button-down {
linux,code = <KEY_VOLUMEDOWN>;
label = "volume down";
press-threshold-microvolt = <300000>;
};
vol-up-key {
button-up {
linux,code = <KEY_VOLUMEUP>;
label = "volume up";
press-threshold-microvolt = <18000>;
@ -75,34 +75,84 @@
pinctrl-names = "default";
pinctrl-0 = <&pwr_key>;
power {
key-power {
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
label = "GPIO Key Power";
wakeup-source;
debounce-interval = <100>;
wakeup-source;
};
};
vcc12v_dcin: vcc12v-dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
regulator-always-on;
regulator-boot-on;
};
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc12v_dcin>;
};
vccio_sdio: vcc_1v8: vcc-1v8 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc_io>;
};
vcc_ddr: vcc-ddr {
compatible = "regulator-fixed";
regulator-name = "vcc_ddr";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
};
vcc_io: vcc-io {
compatible = "regulator-fixed";
regulator-name = "vcc_io";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
};
vccio_flash: vccio-flash {
compatible = "regulator-fixed";
regulator-name = "vccio_flash";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc_io>;
};
vcc5v0_host: vcc5v0-host {
compatible = "regulator-fixed";
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&usb_drv>;
regulator-name = "vbus_host";
vin-supply = <&vcc5v0_sys>;
};
vdd_core: vdd-core {
compatible = "pwm-regulator";
pwms = <&pwm0 0 5000 1>;
@ -118,70 +168,20 @@
vdd_log: vdd-log {
compatible = "regulator-fixed";
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
};
vdd_1v0: vdd-1v0 {
compatible = "regulator-fixed";
regulator-name = "vdd_1v0";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
vin-supply = <&vcc5v0_sys>;
};
vccio_sdio: vcc_1v8: vcc-1v8 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_io>;
};
vcc_ddr: vcc-ddr {
compatible = "regulator-fixed";
regulator-name = "vcc_ddr";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
vin-supply = <&vcc5v0_sys>;
};
vcc_io: vcc-io {
compatible = "regulator-fixed";
regulator-name = "vcc_io";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc5v0_sys>;
};
vccio_flash: vccio-flash {
compatible = "regulator-fixed";
regulator-name = "vccio_flash";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_io>;
};
vcc5v0_host: vcc5v0-host {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_drv>;
regulator-name = "vbus_host";
vin-supply = <&vcc5v0_sys>;
};
};

View File

@ -4,6 +4,21 @@
*/
#include "rk3308-u-boot.dtsi"
/ {
aliases {
ethernet0 = &gmac;
};
};
&gmac {
assigned-clocks = <&cru SCLK_MAC>;
assigned-clock-parents = <&mac_clkin>;
clock_in_out = "input";
pinctrl-names = "default";
pinctrl-0 = <&rmiim1_pins &macm1_refclk>;
status = "okay";
};
&gpio4 {
bootph-pre-ram;
};
@ -20,3 +35,7 @@
&vcc_sd {
bootph-pre-ram;
};
&vdd_core {
regulator-init-microvolt = <1015000>;
};

View File

@ -9,11 +9,17 @@
/ {
model = "Firefly ROC-RK3308-CC board";
compatible = "firefly,roc-rk3308-cc", "rockchip,rk3308";
aliases {
mmc0 = &sdmmc;
mmc1 = &emmc;
};
chosen {
stdout-path = "serial2:1500000n8";
};
ir_rx {
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
@ -27,14 +33,15 @@
leds {
compatible = "gpio-leds";
power {
power_led: led-0 {
label = "firefly:red:power";
linux,default-trigger = "ir-power-click";
default-state = "on";
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
};
user {
user_led: led-1 {
label = "firefly:blue:user";
linux,default-trigger = "ir-user-click";
default-state = "off";
@ -45,10 +52,10 @@
typec_vcc5v: typec-vcc5v {
compatible = "regulator-fixed";
regulator-name = "typec_vcc5v";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
};
vcc5v0_sys: vcc5v0-sys {
@ -61,29 +68,6 @@
vin-supply = <&typec_vcc5v>;
};
vdd_core: vdd-core {
compatible = "pwm-regulator";
pwms = <&pwm0 0 5000 1>;
regulator-name = "vdd_core";
regulator-min-microvolt = <827000>;
regulator-max-microvolt = <1340000>;
regulator-init-microvolt = <1015000>;
regulator-always-on;
regulator-boot-on;
regulator-settling-time-up-us = <250>;
pwm-supply = <&vcc5v0_sys>;
};
vdd_log: vdd-log {
compatible = "regulator-fixed";
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
vin-supply = <&vcc5v0_sys>;
};
vcc_io: vcc-io {
compatible = "regulator-fixed";
regulator-name = "vcc_io";
@ -100,8 +84,8 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>;
states = <1800000 0x0
3300000 0x1>;
states = <1800000 0x0>,
<3300000 0x1>;
vin-supply = <&vcc5v0_sys>;
};
@ -113,9 +97,30 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
vim-supply = <&vcc_io>;
vin-supply = <&vcc_io>;
};
vdd_core: vdd-core {
compatible = "pwm-regulator";
pwms = <&pwm0 0 5000 1>;
regulator-name = "vdd_core";
regulator-min-microvolt = <827000>;
regulator-max-microvolt = <1340000>;
regulator-settling-time-up-us = <250>;
regulator-always-on;
regulator-boot-on;
pwm-supply = <&vcc5v0_sys>;
};
vdd_log: vdd-log {
compatible = "regulator-fixed";
regulator-name = "vdd_log";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
};
};
&cpu0 {
@ -123,12 +128,9 @@
};
&emmc {
bus-width = <8>;
cap-mmc-highspeed;
supports-emmc;
disable-wp;
mmc-hs200-1_8v;
non-removable;
num-slots = <1>;
status = "okay";
};
@ -143,15 +145,6 @@
};
};
&mac {
assigned-clocks = <&cru SCLK_MAC>;
assigned-clock-parents = <&mac_clkin>;
clock_in_out = "input";
pinctrl-names = "default";
pinctrl-0 = <&rmiim1_pins &macm1_refclk>;
status = "okay";
};
&pwm5 {
status = "okay";
pinctrl-names = "active";
@ -181,10 +174,8 @@
};
&sdmmc {
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
supports-sd;
card-detect-delay = <300>;
sd-uhs-sdr25;
sd-uhs-sdr50;

View File

@ -31,3 +31,7 @@
&uart0_xfer {
bootph-all;
};
&vdd_core {
regulator-init-microvolt = <1015000>;
};

View File

@ -1,12 +1,10 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
* Copyright (C) 2023 Akash Gajjar <gajjar04akash@gmail.com>
* Copyright (c) 2023 Jagan Teki <jagan@openedev.com>
* Copyright (c) 2019 Akash Gajjar <akash@openedev.com>
* Copyright (c) 2019 Jagan Teki <jagan@openedev.com>
*/
/dts-v1/;
#include <dt-bindings/input/input.h>
#include "rk3308.dtsi"
/ {
@ -14,7 +12,7 @@
compatible = "radxa,rockpis", "rockchip,rk3308";
aliases {
ethernet0 = &mac;
ethernet0 = &gmac;
mmc0 = &emmc;
mmc1 = &sdmmc;
};
@ -107,7 +105,6 @@
regulator-name = "vdd_core";
regulator-min-microvolt = <827000>;
regulator-max-microvolt = <1340000>;
regulator-init-microvolt = <1015000>;
regulator-settling-time-up-us = <250>;
regulator-always-on;
regulator-boot-on;
@ -137,7 +134,7 @@
status = "okay";
};
&mac {
&gmac {
clock_in_out = "output";
phy-supply = <&vcc_io>;
snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
@ -146,6 +143,68 @@
status = "okay";
};
&gpio0 {
gpio-line-names =
/* GPIO0_A0 - A7 */
"", "", "", "", "", "", "", "",
/* GPIO0_B0 - B7 */
"", "", "", "header1-pin3 [GPIO0_B3]",
"header1-pin5 [GPIO0_B4]", "", "",
"header1-pin11 [GPIO0_B7]",
/* GPIO0_C0 - C7 */
"header1-pin13 [GPIO0_C0]",
"header1-pin15 [GPIO0_C1]", "", "", "",
"", "", "",
/* GPIO0_D0 - D7 */
"", "", "", "", "", "", "", "";
};
&gpio1 {
gpio-line-names =
/* GPIO1_A0 - A7 */
"", "", "", "", "", "", "", "",
/* GPIO1_B0 - B7 */
"", "", "", "", "", "", "", "",
/* GPIO1_C0 - C7 */
"", "", "", "", "", "", "header1-pin21 [GPIO1_C6]",
"header1-pin19 [GPIO1_C7]",
/* GPIO1_D0 - D7 */
"header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]",
"", "", "", "", "", "";
};
&gpio2 {
gpio-line-names =
/* GPIO2_A0 - A7 */
"header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]",
"", "",
"header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]",
"header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]",
/* GPIO2_B0 - B7 */
"header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]",
"header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]",
"header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]",
"header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]",
/* GPIO2_C0 - C7 */
"header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "",
/* GPIO2_D0 - D7 */
"", "", "", "", "", "", "", "";
};
&gpio3 {
gpio-line-names =
/* GPIO3_A0 - A7 */
"", "", "", "", "", "", "", "",
/* GPIO3_B0 - B7 */
"", "", "header2-pin42 [GPIO3_B2]",
"header2-pin41 [GPIO3_B3]", "header2-pin40 [GPIO3_B4]",
"header2-pin39 [GPIO3_B5]", "", "",
/* GPIO3_C0 - C7 */
"", "", "", "", "", "", "", "",
/* GPIO3_D0 - D7 */
"", "", "", "", "", "", "", "";
};
&i2c1 {
status = "okay";
};
@ -209,6 +268,20 @@
status = "okay";
};
&u2phy {
status = "okay";
u2phy_host: host-port {
phy-supply = <&vcc5v0_otg>;
status = "okay";
};
u2phy_otg: otg-port {
phy-supply = <&vcc5v0_otg>;
status = "okay";
};
};
&uart0 {
status = "okay";
};
@ -223,6 +296,19 @@
};
};
&usb_host_ehci {
status = "okay";
};
&usb_host_ohci {
status = "okay";
};
&usb20_otg {
dr_mode = "peripheral";
status = "okay";
};
&wdt {
status = "okay";
};

View File

@ -15,6 +15,12 @@
u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
};
dmc: dmc@ff010000 {
compatible = "rockchip,rk3308-dmc";
reg = <0x0 0xff010000 0x0 0x10000>;
bootph-all;
};
otp: nvmem@ff210000 {
compatible = "rockchip,rk3308-otp";
reg = <0x0 0xff210000 0x0 0x4000>;
@ -41,10 +47,6 @@
bootph-all;
};
&dmc {
bootph-all;
};
&emmc {
bootph-pre-ram;
bootph-some-ram;
@ -135,3 +137,7 @@
bootph-pre-ram;
bootph-some-ram;
};
&xin24m {
bootph-all;
};

File diff suppressed because it is too large Load Diff

View File

@ -739,7 +739,7 @@ static const struct udevice_id rockchip_gmac_ids[] = {
.data = (ulong)&rk3228_gmac_ops },
{ .compatible = "rockchip,rk3288-gmac",
.data = (ulong)&rk3288_gmac_ops },
{ .compatible = "rockchip,rk3308-mac",
{ .compatible = "rockchip,rk3308-gmac",
.data = (ulong)&rk3308_gmac_ops },
{ .compatible = "rockchip,rk3328-gmac",
.data = (ulong)&rk3328_gmac_ops },