From cae4707f25105554f94ad5af1199c7c27edd75e1 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Wed, 1 May 2024 16:22:32 +0000 Subject: rockchip: rk3399-nanopi-4: Sync DT from v6.8 and update defconfig Sync rk3399-nanopi-4 related device tree from Linux kernel v6.8. Add DM_RESET=y to support reset signals. Add PCI=y, CMD_PCI=y and NVME_PCI=y to support PCIe and NVMe boot. Add AHCI=y, SCSI_AHCI=y, AHCI_PCI=y and SCSI=y to support M4 SATA HAT. Add ROCKCHIP_IODOMAIN=y to configure io-domain voltage. Add MMC_SDHCI_SDMA=y to use DMA transfer for eMMC. Add PHY_REALTEK=y and DM_ETH_PHY=y to support ethernet PHY. Add PHY_ROCKCHIP_INNO_USB2=y and PHY_ROCKCHIP_TYPEC=y to support USB PHY. Remove REGULATOR_PWM=y, boards does not use pwm-regulator compatible. Remove SPL_TINY_MEMSET=y to use full memset in SPL. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-nanopc-t4.dts | 2 +- arch/arm/dts/rk3399-nanopi-m4-2gb.dts | 55 +-------------------------------- arch/arm/dts/rk3399-nanopi-m4b.dts | 2 +- arch/arm/dts/rk3399-nanopi-r4s.dts | 4 +-- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 4 +++ arch/arm/dts/rk3399-nanopi4.dtsi | 7 +++-- 6 files changed, 13 insertions(+), 61 deletions(-) (limited to 'arch') diff --git a/arch/arm/dts/rk3399-nanopc-t4.dts b/arch/arm/dts/rk3399-nanopc-t4.dts index 452728b82e4..3bf8f959e42 100644 --- a/arch/arm/dts/rk3399-nanopc-t4.dts +++ b/arch/arm/dts/rk3399-nanopc-t4.dts @@ -39,7 +39,7 @@ keyup-threshold-microvolt = <1800000>; poll-interval = <100>; - recovery { + button-recovery { label = "Recovery"; linux,code = ; press-threshold-microvolt = <18000>; diff --git a/arch/arm/dts/rk3399-nanopi-m4-2gb.dts b/arch/arm/dts/rk3399-nanopi-m4-2gb.dts index 60358ab8c7d..e9cf71f224a 100644 --- a/arch/arm/dts/rk3399-nanopi-m4-2gb.dts +++ b/arch/arm/dts/rk3399-nanopi-m4-2gb.dts @@ -10,57 +10,4 @@ */ /dts-v1/; -#include "rk3399-nanopi4.dtsi" - -/ { - model = "FriendlyElec NanoPi M4"; - compatible = "friendlyarm,nanopi-m4", "rockchip,rk3399"; - - vdd_5v: vdd-5v { - compatible = "regulator-fixed"; - regulator-name = "vdd_5v"; - regulator-always-on; - regulator-boot-on; - }; - - vcc5v0_core: vcc5v0-core { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_core"; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vdd_5v>; - }; - - vcc5v0_usb1: vcc5v0-usb1 { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_usb1"; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vcc5v0_sys>; - }; - - vcc5v0_usb2: vcc5v0-usb2 { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_usb2"; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vcc5v0_sys>; - }; -}; - -&vcc3v3_sys { - vin-supply = <&vcc5v0_core>; -}; - -&u2phy0_host { - phy-supply = <&vcc5v0_usb1>; -}; - -&u2phy1_host { - phy-supply = <&vcc5v0_usb2>; -}; - -&vbus_typec { - regulator-always-on; - vin-supply = <&vdd_5v>; -}; +#include "rk3399-nanopi-m4.dts" diff --git a/arch/arm/dts/rk3399-nanopi-m4b.dts b/arch/arm/dts/rk3399-nanopi-m4b.dts index 72182c58cc4..65cb21837b0 100644 --- a/arch/arm/dts/rk3399-nanopi-m4b.dts +++ b/arch/arm/dts/rk3399-nanopi-m4b.dts @@ -19,7 +19,7 @@ keyup-threshold-microvolt = <1500000>; poll-interval = <100>; - recovery { + button-recovery { label = "Recovery"; linux,code = ; press-threshold-microvolt = <18000>; diff --git a/arch/arm/dts/rk3399-nanopi-r4s.dts b/arch/arm/dts/rk3399-nanopi-r4s.dts index cef4d18b599..fe5b5261001 100644 --- a/arch/arm/dts/rk3399-nanopi-r4s.dts +++ b/arch/arm/dts/rk3399-nanopi-r4s.dts @@ -46,9 +46,9 @@ gpio-keys { pinctrl-0 = <&reset_button_pin>; - /delete-node/ power; + /delete-node/ key-power; - reset { + key-reset { debounce-interval = <50>; gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; label = "reset"; diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi index e0d7a518dfc..75736124996 100644 --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi @@ -20,3 +20,7 @@ &vcc3v0_sd { bootph-pre-ram; }; + +&vcc_sdio { + regulator-init-microvolt = <3000000>; +}; diff --git a/arch/arm/dts/rk3399-nanopi4.dtsi b/arch/arm/dts/rk3399-nanopi4.dtsi index 8c0ff6c96e0..b7f1e47978a 100644 --- a/arch/arm/dts/rk3399-nanopi4.dtsi +++ b/arch/arm/dts/rk3399-nanopi4.dtsi @@ -18,6 +18,7 @@ / { aliases { + ethernet0 = &gmac; mmc0 = &sdio0; mmc1 = &sdmmc; mmc2 = &sdhci; @@ -111,7 +112,7 @@ pinctrl-names = "default"; pinctrl-0 = <&power_key>; - power { + key-power { debounce-interval = <100>; gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; label = "GPIO Key Power"; @@ -167,6 +168,7 @@ }; &emmc_phy { + rockchip,enable-strobe-pulldown; status = "okay"; }; @@ -267,7 +269,7 @@ interrupt-parent = <&gpio1>; interrupts = <21 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; - pinctrl-0 = <&pmic_int_l>; + pinctrl-0 = <&pmic_int_l>, <&ap_pwroff>, <&clk_32k>; rockchip,system-power-controller; wakeup-source; @@ -374,7 +376,6 @@ vcc_sdio: LDO_REG4 { regulator-always-on; regulator-boot-on; - regulator-init-microvolt = <3000000>; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc_sdio"; -- cgit v1.2.3