Re: [PATCH 29/31] rockchip: rk3399-rockpro64: Sync device tree from linux v6.8
On 2024/4/1 04:28, Jonas Karlman wrote: Sync rk3399-rockpro64 device tree from linux v6.8. Add SF_DEFAULT_SPEED=1000 and SPI_FLASH_SFDP_SUPPORT=y to improve support for booting from SPI flash. Remove USE_PREBOOT=y to speed up booting, standard boot will init USB after faster boot media has been evaluated. Add CMD_POWEROFF=y to support poweroff using cmdline and power on using the pwr button on the board. Add PHY_REALTEK=y and DM_ETH_PHY=y to support ethernet PHY. Remove SPL_TINY_MEMSET=y to use full memset in SPL. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang Thanks, - Kever --- arch/arm/dts/rk3399-rockpro64.dtsi | 98 -- configs/rockpro64-rk3399_defconfig | 7 ++- 2 files changed, 97 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/rk3399-rockpro64.dtsi b/arch/arm/dts/rk3399-rockpro64.dtsi index 6bff8db7d33e..f30b82a10ca3 100644 --- a/arch/arm/dts/rk3399-rockpro64.dtsi +++ b/arch/arm/dts/rk3399-rockpro64.dtsi @@ -11,6 +11,7 @@ / { aliases { + ethernet0 = mmc0 = mmc1 = mmc2 = @@ -20,6 +21,15 @@ stdout-path = "serial2:150n8"; }; + /* enable for panel backlight support */ + backlight: backlight { + compatible = "pwm-backlight"; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <5>; + pwms = < 0 100 0>; + status = "disabled"; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <12500>; @@ -33,7 +43,7 @@ pinctrl-names = "default"; pinctrl-0 = <>; - power { + key-power { debounce-interval = <100>; gpios = < RK_PA5 GPIO_ACTIVE_LOW>; label = "GPIO Key Power"; @@ -69,6 +79,7 @@ fan: pwm-fan { compatible = "pwm-fan"; + cooling-levels = <0 100 150 200 255>; #cooling-cells = <2>; fan-supply = <_dcin>; pwms = < 0 5 0>; @@ -106,6 +117,14 @@ }; }; + avdd: avdd-regulator { + compatible = "regulator-fixed"; + regulator-name = "avdd"; + regulator-min-microvolt = <1100>; + regulator-max-microvolt = <1100>; + vin-supply = <_s0>; + }; + vcc12v_dcin: vcc12v-dcin { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -212,12 +231,12 @@ vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = < 0 25000 1>; + pwm-supply = <_sys>; regulator-name = "vdd_log"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <80>; regulator-max-microvolt = <170>; - vin-supply = <_sys>; }; }; @@ -245,6 +264,34 @@ cpu-supply = <_cpu_b>; }; +_thermal { + trips { + cpu_warm: cpu_warm { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_hot: cpu_hot { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <_warm>; + cooling-device = < THERMAL_NO_LIMIT 1>; + }; + + map3 { + trip = <_hot>; + cooling-device = < 2 THERMAL_NO_LIMIT>; + }; + }; +}; + _phy { status = "okay"; }; @@ -371,8 +418,6 @@ vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; - regulator-always-on; - regulator-boot-on; regulator-min-microvolt = <300>; regulator-max-microvolt = <300>; regulator-state-mem { @@ -461,8 +506,6 @@ vcc3v3_s0: SWITCH_REG2 { regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; regulator-state-mem { regulator-off-in-suspend; }; @@ -536,6 +579,19 @@ vbus-supply = <_typec>; status = "okay"; }; + + /* enable for pine64 touch screen support */ + touch: touchscreen@5d { + compatible =
Re: [PATCH 29/31] rockchip: rk3399-rockpro64: Sync device tree from linux v6.8
On 2024-03-31 22:28, Jonas Karlman wrote: Sync rk3399-rockpro64 device tree from linux v6.8. Add SF_DEFAULT_SPEED=1000 and SPI_FLASH_SFDP_SUPPORT=y to improve support for booting from SPI flash. Remove USE_PREBOOT=y to speed up booting, standard boot will init USB after faster boot media has been evaluated. Add CMD_POWEROFF=y to support poweroff using cmdline and power on using the pwr button on the board. Add PHY_REALTEK=y and DM_ETH_PHY=y to support ethernet PHY. Remove SPL_TINY_MEMSET=y to use full memset in SPL. Signed-off-by: Jonas Karlman Looking good to me. Thank you for all these nice cleanups! Reviewed-by: Dragan Simic --- arch/arm/dts/rk3399-rockpro64.dtsi | 98 -- configs/rockpro64-rk3399_defconfig | 7 ++- 2 files changed, 97 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/rk3399-rockpro64.dtsi b/arch/arm/dts/rk3399-rockpro64.dtsi index 6bff8db7d33e..f30b82a10ca3 100644 --- a/arch/arm/dts/rk3399-rockpro64.dtsi +++ b/arch/arm/dts/rk3399-rockpro64.dtsi @@ -11,6 +11,7 @@ / { aliases { + ethernet0 = mmc0 = mmc1 = mmc2 = @@ -20,6 +21,15 @@ stdout-path = "serial2:150n8"; }; + /* enable for panel backlight support */ + backlight: backlight { + compatible = "pwm-backlight"; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <5>; + pwms = < 0 100 0>; + status = "disabled"; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <12500>; @@ -33,7 +43,7 @@ pinctrl-names = "default"; pinctrl-0 = <>; - power { + key-power { debounce-interval = <100>; gpios = < RK_PA5 GPIO_ACTIVE_LOW>; label = "GPIO Key Power"; @@ -69,6 +79,7 @@ fan: pwm-fan { compatible = "pwm-fan"; + cooling-levels = <0 100 150 200 255>; #cooling-cells = <2>; fan-supply = <_dcin>; pwms = < 0 5 0>; @@ -106,6 +117,14 @@ }; }; + avdd: avdd-regulator { + compatible = "regulator-fixed"; + regulator-name = "avdd"; + regulator-min-microvolt = <1100>; + regulator-max-microvolt = <1100>; + vin-supply = <_s0>; + }; + vcc12v_dcin: vcc12v-dcin { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -212,12 +231,12 @@ vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = < 0 25000 1>; + pwm-supply = <_sys>; regulator-name = "vdd_log"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <80>; regulator-max-microvolt = <170>; - vin-supply = <_sys>; }; }; @@ -245,6 +264,34 @@ cpu-supply = <_cpu_b>; }; +_thermal { + trips { + cpu_warm: cpu_warm { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_hot: cpu_hot { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <_warm>; + cooling-device = < THERMAL_NO_LIMIT 1>; + }; + + map3 { + trip = <_hot>; + cooling-device = < 2 THERMAL_NO_LIMIT>; + }; + }; +}; + _phy { status = "okay"; }; @@ -371,8 +418,6 @@ vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; - regulator-always-on; - regulator-boot-on; regulator-min-microvolt = <300>; regulator-max-microvolt = <300>; regulator-state-mem { @@ -461,8 +506,6 @@ vcc3v3_s0: SWITCH_REG2 { regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; regulator-state-mem { regulator-off-in-suspend; }; @@ -536,6 +579,19 @@ vbus-supply = <_typec>; status = "okay"; }; + + /* enable for pine64 touch screen
[PATCH 29/31] rockchip: rk3399-rockpro64: Sync device tree from linux v6.8
Sync rk3399-rockpro64 device tree from linux v6.8. Add SF_DEFAULT_SPEED=1000 and SPI_FLASH_SFDP_SUPPORT=y to improve support for booting from SPI flash. Remove USE_PREBOOT=y to speed up booting, standard boot will init USB after faster boot media has been evaluated. Add CMD_POWEROFF=y to support poweroff using cmdline and power on using the pwr button on the board. Add PHY_REALTEK=y and DM_ETH_PHY=y to support ethernet PHY. Remove SPL_TINY_MEMSET=y to use full memset in SPL. Signed-off-by: Jonas Karlman --- arch/arm/dts/rk3399-rockpro64.dtsi | 98 -- configs/rockpro64-rk3399_defconfig | 7 ++- 2 files changed, 97 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/rk3399-rockpro64.dtsi b/arch/arm/dts/rk3399-rockpro64.dtsi index 6bff8db7d33e..f30b82a10ca3 100644 --- a/arch/arm/dts/rk3399-rockpro64.dtsi +++ b/arch/arm/dts/rk3399-rockpro64.dtsi @@ -11,6 +11,7 @@ / { aliases { + ethernet0 = mmc0 = mmc1 = mmc2 = @@ -20,6 +21,15 @@ stdout-path = "serial2:150n8"; }; + /* enable for panel backlight support */ + backlight: backlight { + compatible = "pwm-backlight"; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <5>; + pwms = < 0 100 0>; + status = "disabled"; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <12500>; @@ -33,7 +43,7 @@ pinctrl-names = "default"; pinctrl-0 = <>; - power { + key-power { debounce-interval = <100>; gpios = < RK_PA5 GPIO_ACTIVE_LOW>; label = "GPIO Key Power"; @@ -69,6 +79,7 @@ fan: pwm-fan { compatible = "pwm-fan"; + cooling-levels = <0 100 150 200 255>; #cooling-cells = <2>; fan-supply = <_dcin>; pwms = < 0 5 0>; @@ -106,6 +117,14 @@ }; }; + avdd: avdd-regulator { + compatible = "regulator-fixed"; + regulator-name = "avdd"; + regulator-min-microvolt = <1100>; + regulator-max-microvolt = <1100>; + vin-supply = <_s0>; + }; + vcc12v_dcin: vcc12v-dcin { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -212,12 +231,12 @@ vdd_log: vdd-log { compatible = "pwm-regulator"; pwms = < 0 25000 1>; + pwm-supply = <_sys>; regulator-name = "vdd_log"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <80>; regulator-max-microvolt = <170>; - vin-supply = <_sys>; }; }; @@ -245,6 +264,34 @@ cpu-supply = <_cpu_b>; }; +_thermal { + trips { + cpu_warm: cpu_warm { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_hot: cpu_hot { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <_warm>; + cooling-device = < THERMAL_NO_LIMIT 1>; + }; + + map3 { + trip = <_hot>; + cooling-device = < 2 THERMAL_NO_LIMIT>; + }; + }; +}; + _phy { status = "okay"; }; @@ -371,8 +418,6 @@ vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; - regulator-always-on; - regulator-boot-on; regulator-min-microvolt = <300>; regulator-max-microvolt = <300>; regulator-state-mem { @@ -461,8 +506,6 @@ vcc3v3_s0: SWITCH_REG2 { regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; regulator-state-mem { regulator-off-in-suspend; }; @@ -536,6 +579,19 @@ vbus-supply = <_typec>; status = "okay"; }; + + /* enable for pine64 touch screen support */ + touch: touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; +