diff --git a/0001-Rebase-to-upstream-6.15.5-rockchip-DTs.patch b/0001-Rebase-to-upstream-6.15.5-rockchip-DTs.patch new file mode 100644 index 0000000..ecb69d5 --- /dev/null +++ b/0001-Rebase-to-upstream-6.15.5-rockchip-DTs.patch @@ -0,0 +1,3467 @@ +From c0f3a6ff6c7a7cfe857b4cda1b6f3615e25842d8 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 20 Jun 2025 13:29:43 +0100 +Subject: [PATCH] Rebase to upstream 6.15.5 rockchip DTs + +Signed-off-by: Peter Robinson +--- + .../arm64/rockchip/px30-engicam-common.dtsi | 3 +- + .../arm64/rockchip/px30-engicam-ctouch2.dtsi | 2 +- + .../px30-engicam-px30-core-edimm2.2.dts | 2 +- + .../arm64/rockchip/px30-ringneck-haikou.dts | 2 + + .../src/arm64/rockchip/px30-ringneck.dtsi | 4 - + .../src/arm64/rockchip/rk3308-roc-cc.dts | 2 +- + .../src/arm64/rockchip/rk3318-a95x-z2.dts | 4 +- + .../src/arm64/rockchip/rk3328-rock-pi-e.dts | 8 + + .../src/arm64/rockchip/rk3399-nanopi4.dtsi | 2 +- + .../src/arm64/rockchip/rk3399-puma-haikou.dts | 34 ++- + .../src/arm64/rockchip/rk3399-puma.dtsi | 58 +++-- + .../src/arm64/rockchip/rk3399-roc-pc-plus.dts | 2 +- + .../src/arm64/rockchip/rk3399-rock-pi-4.dtsi | 2 +- + dts/upstream/src/arm64/rockchip/rk3528.dtsi | 3 +- + .../rockchip/rk3566-bigtreetech-cb2.dtsi | 2 +- + .../src/arm64/rockchip/rk3566-pinenote.dtsi | 2 + + .../src/arm64/rockchip/rk3566-quartz64-a.dts | 8 +- + .../src/arm64/rockchip/rk3566-quartz64-b.dts | 8 +- + .../src/arm64/rockchip/rk3566-rock-3c.dts | 1 + + .../src/arm64/rockchip/rk3568-nanopi-r5s.dtsi | 5 +- + .../src/arm64/rockchip/rk3568-qnap-ts433.dts | 2 + + .../src/arm64/rockchip/rk3568-rock-3a.dts | 14 -- + .../src/arm64/rockchip/rk356x-base.dtsi | 44 ++-- + .../arm64/rockchip/rk3576-armsom-sige5.dts | 52 +++- + .../src/arm64/rockchip/rk3576-evb1-v10.dts | 47 ++++ + dts/upstream/src/arm64/rockchip/rk3576.dtsi | 192 ++++++++++++++- + .../src/arm64/rockchip/rk3588-armsom-lm7.dtsi | 4 + + .../arm64/rockchip/rk3588-armsom-sige7.dts | 75 ++++++ + .../src/arm64/rockchip/rk3588-base.dtsi | 117 +++++++-- + .../arm64/rockchip/rk3588-coolpi-cm5-evb.dts | 2 +- + .../rockchip/rk3588-coolpi-cm5-genbook.dts | 2 +- + .../src/arm64/rockchip/rk3588-coolpi-cm5.dtsi | 4 + + .../rockchip/rk3588-edgeble-neu6a-common.dtsi | 4 + + .../rockchip/rk3588-edgeble-neu6a-io.dtsi | 47 ++++ + .../src/arm64/rockchip/rk3588-evb1-v10.dts | 50 +++- + .../src/arm64/rockchip/rk3588-extra.dtsi | 186 +++++++++++++++ + .../src/arm64/rockchip/rk3588-fet3588-c.dtsi | 4 + + .../rockchip/rk3588-firefly-core-3588j.dtsi | 4 + + .../rockchip/rk3588-firefly-itx-3588j.dts | 2 +- + .../rk3588-friendlyelec-cm3588-nas.dts | 2 +- + .../rockchip/rk3588-friendlyelec-cm3588.dtsi | 8 + + .../src/arm64/rockchip/rk3588-h96-max-v58.dts | 30 ++- + .../src/arm64/rockchip/rk3588-jaguar.dts | 224 +++++++++++++++++- + .../src/arm64/rockchip/rk3588-nanopc-t6.dtsi | 6 +- + .../src/arm64/rockchip/rk3588-ok3588-c.dts | 4 + + .../rockchip/rk3588-orangepi-5-compact.dtsi | 11 +- + .../arm64/rockchip/rk3588-orangepi-5-max.dts | 67 +++++- + .../arm64/rockchip/rk3588-orangepi-5-plus.dts | 56 ++++- + .../src/arm64/rockchip/rk3588-orangepi-5.dtsi | 6 +- + .../src/arm64/rockchip/rk3588-quartzpro64.dts | 6 +- + .../src/arm64/rockchip/rk3588-rock-5-itx.dts | 53 +++++ + .../src/arm64/rockchip/rk3588-rock-5b.dts | 83 ++++++- + .../arm64/rockchip/rk3588-tiger-haikou.dts | 4 +- + .../src/arm64/rockchip/rk3588-tiger.dtsi | 5 +- + .../src/arm64/rockchip/rk3588-toybrick-x0.dts | 4 + + .../src/arm64/rockchip/rk3588-turing-rk1.dtsi | 6 + + dts/upstream/src/arm64/rockchip/rk3588j.dtsi | 53 ++--- + .../src/arm64/rockchip/rk3588s-coolpi-4b.dts | 31 ++- + .../src/arm64/rockchip/rk3588s-evb1-v10.dts | 6 +- + .../arm64/rockchip/rk3588s-gameforce-ace.dts | 6 +- + .../rockchip/rk3588s-indiedroid-nova.dts | 8 +- + .../arm64/rockchip/rk3588s-khadas-edge2.dts | 4 + + .../src/arm64/rockchip/rk3588s-nanopi-r6.dtsi | 6 +- + .../src/arm64/rockchip/rk3588s-odroid-m2.dts | 6 +- + .../arm64/rockchip/rk3588s-orangepi-5.dtsi | 16 +- + .../src/arm64/rockchip/rk3588s-rock-5a.dts | 6 +- + .../src/arm64/rockchip/rk3588s-rock-5c.dts | 42 +++- + 67 files changed, 1569 insertions(+), 196 deletions(-) + +diff --git a/dts/upstream/src/arm64/rockchip/px30-engicam-common.dtsi b/dts/upstream/src/arm64/rockchip/px30-engicam-common.dtsi +index 1edfd643b25..a334ef0629d 100644 +--- a/dts/upstream/src/arm64/rockchip/px30-engicam-common.dtsi ++++ b/dts/upstream/src/arm64/rockchip/px30-engicam-common.dtsi +@@ -31,7 +31,7 @@ + }; + + vcc3v3_btreg: vcc3v3-btreg { +- compatible = "regulator-gpio"; ++ compatible = "regulator-fixed"; + enable-active-high; + pinctrl-names = "default"; + pinctrl-0 = <&bt_enable_h>; +@@ -39,7 +39,6 @@ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; +- states = <3300000 0x0>; + }; + + vcc3v3_rf_aux_mod: regulator-vcc3v3-rf-aux-mod { +diff --git a/dts/upstream/src/arm64/rockchip/px30-engicam-ctouch2.dtsi b/dts/upstream/src/arm64/rockchip/px30-engicam-ctouch2.dtsi +index 80db778c968..b60e68faa83 100644 +--- a/dts/upstream/src/arm64/rockchip/px30-engicam-ctouch2.dtsi ++++ b/dts/upstream/src/arm64/rockchip/px30-engicam-ctouch2.dtsi +@@ -26,5 +26,5 @@ + }; + + &vcc3v3_btreg { +- enable-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; ++ gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; + }; +diff --git a/dts/upstream/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts b/dts/upstream/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts +index 165d09ccb94..5886b802c52 100644 +--- a/dts/upstream/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts ++++ b/dts/upstream/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts +@@ -39,5 +39,5 @@ + }; + + &vcc3v3_btreg { +- enable-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; ++ gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; + }; +diff --git a/dts/upstream/src/arm64/rockchip/px30-ringneck-haikou.dts b/dts/upstream/src/arm64/rockchip/px30-ringneck-haikou.dts +index 1a59e8b1dc4..91cf4cd3fae 100644 +--- a/dts/upstream/src/arm64/rockchip/px30-ringneck-haikou.dts ++++ b/dts/upstream/src/arm64/rockchip/px30-ringneck-haikou.dts +@@ -154,6 +154,8 @@ + }; + + &i2c3 { ++ status = "okay"; ++ + eeprom@50 { + reg = <0x50>; + compatible = "atmel,24c01"; +diff --git a/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi b/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi +index e80412abec0..142244d5270 100644 +--- a/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi ++++ b/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi +@@ -325,10 +325,6 @@ + }; + }; + +-&i2c3 { +- status = "okay"; +-}; +- + &i2s0_8ch { + rockchip,trcm-sync-tx-only; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3308-roc-cc.dts b/dts/upstream/src/arm64/rockchip/rk3308-roc-cc.dts +index 629121de5a1..5e718194899 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3308-roc-cc.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3308-roc-cc.dts +@@ -147,7 +147,7 @@ + + &pwm5 { + status = "okay"; +- pinctrl-names = "active"; ++ pinctrl-names = "default"; + pinctrl-0 = <&pwm5_pin_pull_down>; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3318-a95x-z2.dts b/dts/upstream/src/arm64/rockchip/rk3318-a95x-z2.dts +index a94114fb7cc..96c27fc5005 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3318-a95x-z2.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3318-a95x-z2.dts +@@ -274,13 +274,13 @@ + + &pwm0 { + pinctrl-0 = <&pwm0_pin_pull_up>; +- pinctrl-names = "active"; ++ pinctrl-names = "default"; + status = "okay"; + }; + + &pwm1 { + pinctrl-0 = <&pwm1_pin_pull_up>; +- pinctrl-names = "active"; ++ pinctrl-names = "default"; + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3328-rock-pi-e.dts b/dts/upstream/src/arm64/rockchip/rk3328-rock-pi-e.dts +index 6310b58de77..a4bdd87d072 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3328-rock-pi-e.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3328-rock-pi-e.dts +@@ -428,10 +428,18 @@ + status = "okay"; + }; + ++&u2phy_otg { ++ status = "okay"; ++}; ++ + &uart2 { + status = "okay"; + }; + ++&usb20_otg { ++ status = "okay"; ++}; ++ + &usbdrd3 { + dr_mode = "host"; + status = "okay"; +diff --git a/dts/upstream/src/arm64/rockchip/rk3399-nanopi4.dtsi b/dts/upstream/src/arm64/rockchip/rk3399-nanopi4.dtsi +index b169be06d4d..c8eb5481f43 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3399-nanopi4.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3399-nanopi4.dtsi +@@ -603,7 +603,7 @@ + }; + + &pwm2 { +- pinctrl-names = "active"; ++ pinctrl-names = "default"; + pinctrl-0 = <&pwm2_pin_pull_down>; + status = "okay"; + }; +diff --git a/dts/upstream/src/arm64/rockchip/rk3399-puma-haikou.dts b/dts/upstream/src/arm64/rockchip/rk3399-puma-haikou.dts +index 947bbd62a6b..70979079923 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3399-puma-haikou.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3399-puma-haikou.dts +@@ -149,8 +149,15 @@ + }; + }; + ++&gmac { ++ status = "okay"; ++}; ++ + &hdmi { +- ddc-i2c-bus = <&i2c3>; ++ status = "okay"; ++}; ++ ++&hdmi_sound { + status = "okay"; + }; + +@@ -186,9 +193,22 @@ + }; + }; + +-&i2c6 { ++&i2c7 { ++ eeprom@50 { ++ reg = <0x50>; ++ compatible = "atmel,24c01"; ++ pagesize = <8>; ++ size = <128>; ++ vcc-supply = <&vcc3v3_baseboard>; ++ }; ++}; ++ ++&i2s0 { ++ status = "okay"; ++}; ++ ++&i2s2 { + status = "okay"; +- clock-frequency = <400000>; + }; + + &pcie_phy { +@@ -292,14 +312,6 @@ + status = "okay"; + }; + +-&usb_host0_ehci { +- status = "okay"; +-}; +- +-&usb_host0_ohci { +- status = "okay"; +-}; +- + &vopb { + status = "okay"; + }; +diff --git a/dts/upstream/src/arm64/rockchip/rk3399-puma.dtsi b/dts/upstream/src/arm64/rockchip/rk3399-puma.dtsi +index 995b30a7aae..587e89d7fc5 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3399-puma.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3399-puma.dtsi +@@ -60,16 +60,6 @@ + vin-supply = <&vcc5v0_sys>; + }; + +- vcc5v0_host: regulator-vcc5v0-host { +- compatible = "regulator-fixed"; +- gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>; +- pinctrl-names = "default"; +- pinctrl-0 = <&vcc5v0_host_en>; +- regulator-name = "vcc5v0_host"; +- regulator-always-on; +- vin-supply = <&vcc5v0_sys>; +- }; +- + vcc5v0_sys: regulator-vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; +@@ -183,7 +173,6 @@ + snps,reset-delays-us = <0 10000 50000>; + tx_delay = <0x10>; + rx_delay = <0x23>; +- status = "okay"; + }; + + &gpu { +@@ -389,6 +378,14 @@ + }; + }; + ++&hdmi { ++ ddc-i2c-bus = <&i2c3>; ++}; ++ ++&i2c6 { ++ clock-frequency = <400000>; ++}; ++ + &i2c7 { + status = "okay"; + clock-frequency = <400000>; +@@ -439,7 +436,6 @@ + pinctrl-1 = <&i2s0_2ch_bus_bclk_off>; + rockchip,playback-channels = <2>; + rockchip,capture-channels = <2>; +- status = "okay"; + }; + + /* +@@ -521,10 +517,10 @@ + }; + }; + +- usb2 { +- vcc5v0_host_en: vcc5v0-host-en { ++ usb { ++ cy3304_reset: cy3304-reset { + rockchip,pins = +- <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; ++ <4 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>; + }; + }; + +@@ -589,11 +585,6 @@ + u2phy1_otg: otg-port { + status = "okay"; + }; +- +- u2phy1_host: host-port { +- phy-supply = <&vcc5v0_host>; +- status = "okay"; +- }; + }; + + &usbdrd3_1 { +@@ -603,12 +594,27 @@ + &usbdrd_dwc3_1 { + status = "okay"; + dr_mode = "host"; +-}; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cy3304_reset>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hub_2_0: hub@1 { ++ compatible = "usb4b4,6502", "usb4b4,6506"; ++ reg = <1>; ++ peer-hub = <&hub_3_0>; ++ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; ++ vdd-supply = <&vcc1v2_phy>; ++ vdd2-supply = <&vcc3v3_sys>; + +-&usb_host1_ehci { +- status = "okay"; +-}; ++ }; + +-&usb_host1_ohci { +- status = "okay"; ++ hub_3_0: hub@2 { ++ compatible = "usb4b4,6500", "usb4b4,6504"; ++ reg = <2>; ++ peer-hub = <&hub_2_0>; ++ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; ++ vdd-supply = <&vcc1v2_phy>; ++ vdd2-supply = <&vcc3v3_sys>; ++ }; + }; +diff --git a/dts/upstream/src/arm64/rockchip/rk3399-roc-pc-plus.dts b/dts/upstream/src/arm64/rockchip/rk3399-roc-pc-plus.dts +index e2e9279fa26..8e3858cf988 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3399-roc-pc-plus.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3399-roc-pc-plus.dts +@@ -112,7 +112,7 @@ + + &i2c1 { + es8388: es8388@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + clocks = <&cru SCLK_I2S_8CH_OUT>; + #sound-dai-cells = <0>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3399-rock-pi-4.dtsi b/dts/upstream/src/arm64/rockchip/rk3399-rock-pi-4.dtsi +index 541dca12bf1..046dbe32901 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3399-rock-pi-4.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3399-rock-pi-4.dtsi +@@ -43,7 +43,7 @@ + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; +- clock-names = "lpo"; ++ clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3528.dtsi b/dts/upstream/src/arm64/rockchip/rk3528.dtsi +index 26c3559d6a6..7f1ffd6003f 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3528.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3528.dtsi +@@ -404,9 +404,10 @@ + + uart3: serial@ffa08000 { + compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; ++ reg = <0x0 0xffa08000 0x0 0x100>; + clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>; + clock-names = "baudclk", "apb_pclk"; +- reg = <0x0 0xffa08000 0x0 0x100>; ++ interrupts = ; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; +diff --git a/dts/upstream/src/arm64/rockchip/rk3566-bigtreetech-cb2.dtsi b/dts/upstream/src/arm64/rockchip/rk3566-bigtreetech-cb2.dtsi +index a4835147176..e7ba477e75f 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3566-bigtreetech-cb2.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3566-bigtreetech-cb2.dtsi +@@ -775,7 +775,7 @@ + rockchip,default-sample-phase = <90>; + status = "okay"; + +- sdio-wifi@1 { ++ wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + interrupt-parent = <&gpio2>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3566-pinenote.dtsi b/dts/upstream/src/arm64/rockchip/rk3566-pinenote.dtsi +index 2d3ae154482..3613661417b 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3566-pinenote.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3566-pinenote.dtsi +@@ -9,6 +9,8 @@ + #include "rk3566.dtsi" + + / { ++ chassis-type = "tablet"; ++ + aliases { + mmc0 = &sdhci; + }; +diff --git a/dts/upstream/src/arm64/rockchip/rk3566-quartz64-a.dts b/dts/upstream/src/arm64/rockchip/rk3566-quartz64-a.dts +index 98e75df8b15..3c127c5c260 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3566-quartz64-a.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3566-quartz64-a.dts +@@ -265,8 +265,12 @@ + }; + + &gmac1 { +- assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>; +- assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>; ++ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, ++ <&cru SCLK_GMAC1_RGMII_SPEED>, ++ <&cru SCLK_GMAC1>; ++ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, ++ <&cru SCLK_GMAC1>, ++ <&gmac1_clkin>; + clock_in_out = "input"; + phy-supply = <&vcc_3v3>; + phy-mode = "rgmii"; +diff --git a/dts/upstream/src/arm64/rockchip/rk3566-quartz64-b.dts b/dts/upstream/src/arm64/rockchip/rk3566-quartz64-b.dts +index 24928a12944..5707321a114 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3566-quartz64-b.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3566-quartz64-b.dts +@@ -173,8 +173,12 @@ + }; + + &gmac1 { +- assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>; +- assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>; ++ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, ++ <&cru SCLK_GMAC1_RGMII_SPEED>, ++ <&cru SCLK_GMAC1>; ++ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, ++ <&cru SCLK_GMAC1>, ++ <&gmac1_clkin>; + clock_in_out = "input"; + phy-mode = "rgmii"; + phy-supply = <&vcc_3v3>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3566-rock-3c.dts b/dts/upstream/src/arm64/rockchip/rk3566-rock-3c.dts +index 53e71528e4c..6224d72813e 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3566-rock-3c.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3566-rock-3c.dts +@@ -636,6 +636,7 @@ + spi-max-frequency = <104000000>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <1>; ++ vcc-supply = <&vcc_1v8>; + }; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3568-nanopi-r5s.dtsi b/dts/upstream/src/arm64/rockchip/rk3568-nanopi-r5s.dtsi +index 00c479aa187..a28b4af10d1 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3568-nanopi-r5s.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3568-nanopi-r5s.dtsi +@@ -486,9 +486,12 @@ + &sdhci { + bus-width = <8>; + max-frequency = <200000000>; ++ mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; +- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>; ++ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; ++ vmmc-supply = <&vcc_3v3>; ++ vqmmc-supply = <&vcc_1v8>; + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts +index 7bd32d230ad..b80d628c426 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3568-qnap-ts433.dts +@@ -619,6 +619,8 @@ + bus-width = <8>; + max-frequency = <200000000>; + non-removable; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3568-rock-3a.dts b/dts/upstream/src/arm64/rockchip/rk3568-rock-3a.dts +index ac79140a9ec..44cfdfeed66 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3568-rock-3a.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3568-rock-3a.dts +@@ -778,20 +778,6 @@ + pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>; + uart-has-rtscts; + status = "okay"; +- +- bluetooth { +- compatible = "brcm,bcm43438-bt"; +- clocks = <&rk809 1>; +- clock-names = "lpo"; +- device-wakeup-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; +- host-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; +- shutdown-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; +- pinctrl-names = "default"; +- pinctrl-0 = <&bt_host_wake &bt_wake &bt_enable>; +- vbat-supply = <&vcc3v3_sys>; +- vddio-supply = <&vcc_1v8>; +- /* vddio comes from regulator on module, use IO bank voltage instead */ +- }; + }; + + &uart2 { +diff --git a/dts/upstream/src/arm64/rockchip/rk356x-base.dtsi b/dts/upstream/src/arm64/rockchip/rk356x-base.dtsi +index e5539062911..fd2214b6fad 100644 +--- a/dts/upstream/src/arm64/rockchip/rk356x-base.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk356x-base.dtsi +@@ -174,6 +174,18 @@ + method = "smc"; + }; + ++ reserved-memory { ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ scmi_shmem: shmem@10f000 { ++ compatible = "arm,scmi-shmem"; ++ reg = <0x0 0x0010f000 0x0 0x100>; ++ no-map; ++ }; ++ }; ++ + timer { + compatible = "arm,armv8-timer"; + interrupts = , +@@ -199,19 +211,6 @@ + #clock-cells = <0>; + }; + +- sram@10f000 { +- compatible = "mmio-sram"; +- reg = <0x0 0x0010f000 0x0 0x100>; +- #address-cells = <1>; +- #size-cells = <1>; +- ranges = <0 0x0 0x0010f000 0x100>; +- +- scmi_shmem: sram@0 { +- compatible = "arm,scmi-shmem"; +- reg = <0x0 0x100>; +- }; +- }; +- + sata1: sata@fc400000 { + compatible = "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci"; + reg = <0 0xfc400000 0 0x1000>; +@@ -284,6 +283,18 @@ + mbi-alias = <0x0 0xfd410000>; + mbi-ranges = <296 24>; + msi-controller; ++ ranges; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ dma-noncoherent; ++ ++ its: msi-controller@fd440000 { ++ compatible = "arm,gic-v3-its"; ++ reg = <0x0 0xfd440000 0 0x20000>; ++ dma-noncoherent; ++ msi-controller; ++ #msi-cells = <1>; ++ }; + }; + + usb_host0_ehci: usb@fd800000 { +@@ -957,7 +968,7 @@ + num-ib-windows = <6>; + num-ob-windows = <2>; + max-link-speed = <2>; +- msi-map = <0x0 &gic 0x0 0x1000>; ++ msi-map = <0x0 &its 0x0 0x1000>; + num-lanes = <1>; + phys = <&combphy2 PHY_TYPE_PCIE>; + phy-names = "pcie-phy"; +@@ -1032,6 +1043,11 @@ + status = "disabled"; + }; + ++ /* ++ * Testing showed that the HWRNG found in RK3566 produces unacceptably ++ * low quality of random data, so the HWRNG isn't enabled for all RK356x ++ * SoC variants despite its presence. ++ */ + rng: rng@fe388000 { + compatible = "rockchip,rk3568-rng"; + reg = <0x0 0xfe388000 0x0 0x4000>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3576-armsom-sige5.dts b/dts/upstream/src/arm64/rockchip/rk3576-armsom-sige5.dts +index 7c7331936a7..314067ba6f3 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3576-armsom-sige5.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3576-armsom-sige5.dts +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include + #include "rk3576.dtsi" + +@@ -26,6 +27,17 @@ + stdout-path = "serial0:1500000n8"; + }; + ++ hdmi-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds: leds { + compatible = "gpio-leds"; + +@@ -182,8 +194,7 @@ + ð0m0_tx_bus2 + ð0m0_rx_bus2 + ð0m0_rgmii_clk +- ð0m0_rgmii_bus +- ðm0_clk0_25m_out>; ++ ð0m0_rgmii_bus>; + + phy-handle = <&rgmii_phy0>; + status = "okay"; +@@ -214,6 +225,26 @@ + status = "okay"; + }; + ++&hdmi { ++ status = "okay"; ++}; ++ ++&hdmi_in { ++ hdmi_in_vp0: endpoint { ++ remote-endpoint = <&vp0_out_hdmi>; ++ }; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&hdptxphy { ++ status = "okay"; ++}; ++ + &i2c1 { + status = "okay"; + +@@ -579,7 +610,7 @@ + reg = <0x51>; + clock-output-names = "hym8563"; + interrupt-parent = <&gpio0>; +- interrupts = ; ++ interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&hym8563_int>; + wakeup-source; +@@ -656,3 +687,18 @@ + pinctrl-0 = <&uart0m0_xfer>; + status = "okay"; + }; ++ ++&vop { ++ status = "okay"; ++}; ++ ++&vop_mmu { ++ status = "okay"; ++}; ++ ++&vp0 { ++ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { ++ reg = ; ++ remote-endpoint = <&hdmi_in_vp0>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3576-evb1-v10.dts b/dts/upstream/src/arm64/rockchip/rk3576-evb1-v10.dts +index 782ca000a64..e368691fd28 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3576-evb1-v10.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3576-evb1-v10.dts +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include "rk3576.dtsi" + + / { +@@ -57,6 +58,17 @@ + }; + }; + ++ hdmi-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds: leds { + compatible = "gpio-leds"; + +@@ -270,6 +282,26 @@ + status = "okay"; + }; + ++&hdmi { ++ status = "okay"; ++}; ++ ++&hdmi_in { ++ hdmi_in_vp0: endpoint { ++ remote-endpoint = <&vp0_out_hdmi>; ++ }; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&hdptxphy { ++ status = "okay"; ++}; ++ + &i2c1 { + status = "okay"; + +@@ -729,3 +761,18 @@ + dr_mode = "host"; + status = "okay"; + }; ++ ++&vop { ++ status = "okay"; ++}; ++ ++&vop_mmu { ++ status = "okay"; ++}; ++ ++&vp0 { ++ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { ++ reg = ; ++ remote-endpoint = <&hdmi_in_vp0>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3576.dtsi b/dts/upstream/src/arm64/rockchip/rk3576.dtsi +index 29b47799849..3824242f8ae 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3576.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3576.dtsi +@@ -111,7 +111,7 @@ + reg = <0x0>; + enable-method = "psci"; + capacity-dmips-mhz = <485>; +- clocks = <&scmi_clk ARMCLK_L>; ++ clocks = <&scmi_clk SCMI_ARMCLK_L>; + operating-points-v2 = <&cluster0_opp_table>; + #cooling-cells = <2>; + dynamic-power-coefficient = <120>; +@@ -124,7 +124,7 @@ + reg = <0x1>; + enable-method = "psci"; + capacity-dmips-mhz = <485>; +- clocks = <&scmi_clk ARMCLK_L>; ++ clocks = <&scmi_clk SCMI_ARMCLK_L>; + operating-points-v2 = <&cluster0_opp_table>; + cpu-idle-states = <&CPU_SLEEP>; + }; +@@ -135,7 +135,7 @@ + reg = <0x2>; + enable-method = "psci"; + capacity-dmips-mhz = <485>; +- clocks = <&scmi_clk ARMCLK_L>; ++ clocks = <&scmi_clk SCMI_ARMCLK_L>; + operating-points-v2 = <&cluster0_opp_table>; + cpu-idle-states = <&CPU_SLEEP>; + }; +@@ -146,7 +146,7 @@ + reg = <0x3>; + enable-method = "psci"; + capacity-dmips-mhz = <485>; +- clocks = <&scmi_clk ARMCLK_L>; ++ clocks = <&scmi_clk SCMI_ARMCLK_L>; + operating-points-v2 = <&cluster0_opp_table>; + cpu-idle-states = <&CPU_SLEEP>; + }; +@@ -157,7 +157,7 @@ + reg = <0x100>; + enable-method = "psci"; + capacity-dmips-mhz = <1024>; +- clocks = <&scmi_clk ARMCLK_B>; ++ clocks = <&scmi_clk SCMI_ARMCLK_B>; + operating-points-v2 = <&cluster1_opp_table>; + #cooling-cells = <2>; + dynamic-power-coefficient = <320>; +@@ -170,7 +170,7 @@ + reg = <0x101>; + enable-method = "psci"; + capacity-dmips-mhz = <1024>; +- clocks = <&scmi_clk ARMCLK_B>; ++ clocks = <&scmi_clk SCMI_ARMCLK_B>; + operating-points-v2 = <&cluster1_opp_table>; + cpu-idle-states = <&CPU_SLEEP>; + }; +@@ -181,7 +181,7 @@ + reg = <0x102>; + enable-method = "psci"; + capacity-dmips-mhz = <1024>; +- clocks = <&scmi_clk ARMCLK_B>; ++ clocks = <&scmi_clk SCMI_ARMCLK_B>; + operating-points-v2 = <&cluster1_opp_table>; + cpu-idle-states = <&CPU_SLEEP>; + }; +@@ -192,7 +192,7 @@ + reg = <0x103>; + enable-method = "psci"; + capacity-dmips-mhz = <1024>; +- clocks = <&scmi_clk ARMCLK_B>; ++ clocks = <&scmi_clk SCMI_ARMCLK_B>; + operating-points-v2 = <&cluster1_opp_table>; + cpu-idle-states = <&CPU_SLEEP>; + }; +@@ -393,6 +393,11 @@ + }; + }; + ++ display_subsystem: display-subsystem { ++ compatible = "rockchip,display-subsystem"; ++ ports = <&vop_out>; ++ }; ++ + firmware { + scmi: scmi { + compatible = "arm,scmi-smc"; +@@ -620,6 +625,11 @@ + }; + }; + ++ hdptxphy_grf: syscon@26032000 { ++ compatible = "rockchip,rk3576-hdptxphy-grf", "syscon"; ++ reg = <0x0 0x26032000 0x0 0x100>; ++ }; ++ + vo1_grf: syscon@26036000 { + compatible = "rockchip,rk3576-vo1-grf", "syscon"; + reg = <0x0 0x26036000 0x0 0x100>; +@@ -922,7 +932,7 @@ + gpu: gpu@27800000 { + compatible = "rockchip,rk3576-mali", "arm,mali-bifrost"; + reg = <0x0 0x27800000 0x0 0x200000>; +- assigned-clocks = <&scmi_clk CLK_GPU>; ++ assigned-clocks = <&scmi_clk SCMI_CLK_GPU>; + assigned-clock-rates = <198000000>; + clocks = <&cru CLK_GPU>; + clock-names = "core"; +@@ -937,6 +947,109 @@ + status = "disabled"; + }; + ++ vop: vop@27d00000 { ++ compatible = "rockchip,rk3576-vop"; ++ reg = <0x0 0x27d00000 0x0 0x3000>, <0x0 0x27d05000 0x0 0x1000>; ++ reg-names = "vop", "gamma-lut"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-names = "sys", ++ "vp0", ++ "vp1", ++ "vp2"; ++ clocks = <&cru ACLK_VOP>, ++ <&cru HCLK_VOP>, ++ <&cru DCLK_VP0>, ++ <&cru DCLK_VP1>, ++ <&cru DCLK_VP2>; ++ clock-names = "aclk", ++ "hclk", ++ "dclk_vp0", ++ "dclk_vp1", ++ "dclk_vp2"; ++ iommus = <&vop_mmu>; ++ power-domains = <&power RK3576_PD_VOP>; ++ rockchip,grf = <&sys_grf>; ++ rockchip,pmu = <&pmu>; ++ status = "disabled"; ++ ++ vop_out: ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vp0: port@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ ++ vp1: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ ++ vp2: port@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ }; ++ }; ++ }; ++ ++ vop_mmu: iommu@27d07e00 { ++ compatible = "rockchip,rk3576-iommu", "rockchip,rk3568-iommu"; ++ reg = <0x0 0x27d07e00 0x0 0x100>, <0x0 0x27d07f00 0x0 0x100>; ++ interrupts = ; ++ clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>; ++ clock-names = "aclk", "iface"; ++ #iommu-cells = <0>; ++ power-domains = <&power RK3576_PD_VOP>; ++ status = "disabled"; ++ }; ++ ++ hdmi: hdmi@27da0000 { ++ compatible = "rockchip,rk3576-dw-hdmi-qp"; ++ reg = <0x0 0x27da0000 0x0 0x20000>; ++ clocks = <&cru PCLK_HDMITX0>, ++ <&cru CLK_HDMITX0_EARC>, ++ <&cru CLK_HDMITX0_REF>, ++ <&cru MCLK_SAI6_8CH>, ++ <&cru CLK_HDMITXHDP>, ++ <&cru HCLK_VO0_ROOT>; ++ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1"; ++ interrupts = , ++ , ++ , ++ , ++ ; ++ interrupt-names = "avp", "cec", "earc", "main", "hpd"; ++ phys = <&hdptxphy>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&hdmi_txm0_pins &hdmi_tx_scl &hdmi_tx_sda>; ++ power-domains = <&power RK3576_PD_VO0>; ++ resets = <&cru SRST_HDMITX0_REF>, <&cru SRST_HDMITXHDP>; ++ reset-names = "ref", "hdp"; ++ rockchip,grf = <&ioc_grf>; ++ rockchip,vo-grf = <&vo0_grf>; ++ status = "disabled"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hdmi_in: port@0 { ++ reg = <0>; ++ }; ++ ++ hdmi_out: port@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++ + qos_hdcp1: qos@27f02000 { + compatible = "rockchip,rk3576-qos", "syscon"; + reg = <0x0 0x27f02000 0x0 0x20>; +@@ -1221,6 +1334,42 @@ + }; + }; + ++ ufshc: ufshc@2a2d0000 { ++ compatible = "rockchip,rk3576-ufshc"; ++ reg = <0x0 0x2a2d0000 0x0 0x10000>, ++ <0x0 0x2b040000 0x0 0x10000>, ++ <0x0 0x2601f000 0x0 0x1000>, ++ <0x0 0x2603c000 0x0 0x1000>, ++ <0x0 0x2a2e0000 0x0 0x10000>; ++ reg-names = "hci", "mphy", "hci_grf", "mphy_grf", "hci_apb"; ++ clocks = <&cru ACLK_UFS_SYS>, <&cru PCLK_USB_ROOT>, <&cru PCLK_MPHY>, ++ <&cru CLK_REF_UFS_CLKOUT>; ++ clock-names = "core", "pclk", "pclk_mphy", "ref_out"; ++ assigned-clocks = <&cru CLK_REF_OSC_MPHY>; ++ assigned-clock-parents = <&cru CLK_REF_MPHY_26M>; ++ interrupts = ; ++ power-domains = <&power RK3576_PD_USB>; ++ pinctrl-0 = <&ufs_refclk>; ++ pinctrl-names = "default"; ++ resets = <&cru SRST_A_UFS_BIU>, <&cru SRST_A_UFS_SYS>, ++ <&cru SRST_A_UFS>, <&cru SRST_P_UFS_GRF>; ++ reset-names = "biu", "sys", "ufs", "grf"; ++ reset-gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>; ++ status = "disabled"; ++ }; ++ ++ sfc1: spi@2a300000 { ++ compatible = "rockchip,sfc"; ++ reg = <0x0 0x2a300000 0x0 0x4000>; ++ interrupts = ; ++ clocks = <&cru SCLK_FSPI1_X2>, <&cru HCLK_FSPI1>; ++ clock-names = "clk_sfc", "hclk_sfc"; ++ power-domains = <&power RK3576_PD_SDGMAC>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + sdmmc: mmc@2a310000 { + compatible = "rockchip,rk3576-dw-mshc"; + reg = <0x0 0x2a310000 0x0 0x4000>; +@@ -1260,6 +1409,18 @@ + status = "disabled"; + }; + ++ sfc0: spi@2a340000 { ++ compatible = "rockchip,sfc"; ++ reg = <0x0 0x2a340000 0x0 0x4000>; ++ interrupts = ; ++ clocks = <&cru SCLK_FSPI_X2>, <&cru HCLK_FSPI>; ++ clock-names = "clk_sfc", "hclk_sfc"; ++ power-domains = <&power RK3576_PD_NVM>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + otp: otp@2a580000 { + compatible = "rockchip,rk3576-otp"; + reg = <0x0 0x2a580000 0x0 0x400>; +@@ -1795,6 +1956,19 @@ + status = "disabled"; + }; + ++ hdptxphy: hdmiphy@2b000000 { ++ compatible = "rockchip,rk3576-hdptx-phy", "rockchip,rk3588-hdptx-phy"; ++ reg = <0x0 0x2b000000 0x0 0x2000>; ++ clocks = <&cru CLK_PHY_REF_SRC>, <&cru PCLK_HDPTX_APB>; ++ clock-names = "ref", "apb"; ++ resets = <&cru SRST_P_HDPTX_APB>, <&cru SRST_HDPTX_INIT>, ++ <&cru SRST_HDPTX_CMN>, <&cru SRST_HDPTX_LANE>; ++ reset-names = "apb", "init", "cmn", "lane"; ++ rockchip,grf = <&hdptxphy_grf>; ++ #phy-cells = <0>; ++ status = "disabled"; ++ }; ++ + sram: sram@3ff88000 { + compatible = "mmio-sram"; + reg = <0x0 0x3ff88000 0x0 0x78000>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-armsom-lm7.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-armsom-lm7.dtsi +index a3138d2d384..e44125e9a8f 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-armsom-lm7.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-armsom-lm7.dtsi +@@ -114,6 +114,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &saradc { + vref-supply = <&avcc_1v8_s0>; + status = "okay"; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-armsom-sige7.dts b/dts/upstream/src/arm64/rockchip/rk3588-armsom-sige7.dts +index 08f09053a06..ae9274365be 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-armsom-sige7.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-armsom-sige7.dts +@@ -4,6 +4,7 @@ + + #include + #include ++#include + #include "rk3588.dtsi" + + / { +@@ -33,6 +34,17 @@ + "Headphone", "Headphones"; + }; + ++ hdmi0-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi0_con_in: endpoint { ++ remote-endpoint = <&hdmi0_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; +@@ -164,6 +176,30 @@ + status = "okay"; + }; + ++&hdmi0 { ++ status = "okay"; ++}; ++ ++&hdmi0_in { ++ hdmi0_in_vp0: endpoint { ++ remote-endpoint = <&vp0_out_hdmi0>; ++ }; ++}; ++ ++&hdmi0_out { ++ hdmi0_out_con: endpoint { ++ remote-endpoint = <&hdmi0_con_in>; ++ }; ++}; ++ ++&hdmi0_sound { ++ status = "okay"; ++}; ++ ++&hdptxphy0 { ++ status = "okay"; ++}; ++ + &i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0m2_xfer>; +@@ -258,6 +294,10 @@ + }; + }; + ++&i2s5_8ch { ++ status = "okay"; ++}; ++ + /* phy1 - right ethernet port */ + &pcie2x1l0 { + reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; +@@ -268,6 +308,22 @@ + &pcie2x1l1 { + reset-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; + status = "okay"; ++ ++ pcie@0,0 { ++ reg = <0x300000 0 0 0 0>; ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ranges; ++ device_type = "pci"; ++ bus-range = <0x30 0x3f>; ++ ++ wifi: wifi@0,0 { ++ compatible = "pci14e4,449d"; ++ reg = <0x310000 0 0 0 0>; ++ clocks = <&hym8563>; ++ clock-names = "lpo"; ++ }; ++ }; + }; + + /* phy0 - left ethernet port */ +@@ -286,6 +342,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + hym8563_int: hym8563-int { +@@ -723,3 +783,18 @@ + dr_mode = "host"; + status = "okay"; + }; ++ ++&vop_mmu { ++ status = "okay"; ++}; ++ ++&vop { ++ status = "okay"; ++}; ++ ++&vp0 { ++ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { ++ reg = ; ++ remote-endpoint = <&hdmi0_in_vp0>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-base.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-base.dtsi +index 2623afa7963..c52af310c70 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-base.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-base.dtsi +@@ -358,11 +358,6 @@ + }; + + firmware { +- optee: optee { +- compatible = "linaro,optee-tz"; +- method = "smc"; +- }; +- + scmi: scmi { + compatible = "arm,scmi-smc"; + arm,smc-id = <0x82000010>; +@@ -382,6 +377,22 @@ + }; + }; + ++ hdmi0_sound: hdmi0-sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,mclk-fs = <128>; ++ simple-audio-card,name = "hdmi0"; ++ status = "disabled"; ++ ++ simple-audio-card,codec { ++ sound-dai = <&hdmi0>; ++ }; ++ ++ simple-audio-card,cpu { ++ sound-dai = <&i2s5_8ch>; ++ }; ++ }; ++ + pmu-a55 { + compatible = "arm,cortex-a55-pmu"; + interrupts = ; +@@ -428,16 +439,15 @@ + #clock-cells = <0>; + }; + +- pmu_sram: sram@10f000 { +- compatible = "mmio-sram"; +- reg = <0x0 0x0010f000 0x0 0x100>; +- ranges = <0 0x0 0x0010f000 0x100>; +- #address-cells = <1>; +- #size-cells = <1>; ++ reserved-memory { ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; + +- scmi_shmem: sram@0 { ++ scmi_shmem: shmem@10f000 { + compatible = "arm,scmi-shmem"; +- reg = <0x0 0x100>; ++ reg = <0x0 0x0010f000 0x0 0x100>; ++ no-map; + }; + }; + +@@ -864,7 +874,7 @@ + }; + }; + /* These power domains are grouped by VD_GPU */ +- power-domain@RK3588_PD_GPU { ++ pd_gpu: power-domain@RK3588_PD_GPU { + reg = ; + clocks = <&cru CLK_GPU>, + <&cru CLK_GPU_COREGROUP>, +@@ -1261,14 +1271,16 @@ + <&cru DCLK_VOP1>, + <&cru DCLK_VOP2>, + <&cru DCLK_VOP3>, +- <&cru PCLK_VOP_ROOT>; ++ <&cru PCLK_VOP_ROOT>, ++ <&hdptxphy0>; + clock-names = "aclk", + "hclk", + "dclk_vp0", + "dclk_vp1", + "dclk_vp2", + "dclk_vp3", +- "pclk_vop"; ++ "pclk_vop", ++ "pll_hdmiphy0"; + iommus = <&vop_mmu>; + power-domains = <&power RK3588_PD_VOP>; + rockchip,grf = <&sys_grf>; +@@ -1318,6 +1330,21 @@ + status = "disabled"; + }; + ++ spdif_tx2: spdif-tx@fddb0000 { ++ compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; ++ reg = <0x0 0xfddb0000 0x0 0x1000>; ++ assigned-clock-parents = <&cru PLL_AUPLL>; ++ assigned-clocks = <&cru CLK_SPDIF2_DP0_SRC>; ++ clock-names = "mclk", "hclk"; ++ clocks = <&cru MCLK_SPDIF2>, <&cru HCLK_SPDIF2_DP0>; ++ dma-names = "tx"; ++ dmas = <&dmac1 6>; ++ interrupts = ; ++ power-domains = <&power RK3588_PD_VO0>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ }; ++ + i2s4_8ch: i2s@fddc0000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x0 0xfddc0000 0x0 0x1000>; +@@ -1335,6 +1362,21 @@ + status = "disabled"; + }; + ++ spdif_tx3: spdif-tx@fdde0000 { ++ compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; ++ reg = <0x0 0xfdde0000 0x0 0x1000>; ++ assigned-clock-parents = <&cru PLL_AUPLL>; ++ assigned-clocks = <&cru CLK_SPDIF3_SRC>; ++ clock-names = "mclk", "hclk"; ++ clocks = <&cru MCLK_SPDIF3>, <&cru HCLK_SPDIF3>; ++ dma-names = "tx"; ++ dmas = <&dmac1 7>; ++ interrupts = ; ++ power-domains = <&power RK3588_PD_VO1>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ }; ++ + i2s5_8ch: i2s@fddf0000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x0 0xfddf0000 0x0 0x1000>; +@@ -1385,7 +1427,7 @@ + , + ; + interrupt-names = "avp", "cec", "earc", "main", "hpd"; +- phys = <&hdptxphy_hdmi0>; ++ phys = <&hdptxphy0>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmim0_tx0_cec &hdmim0_tx0_hpd + &hdmim0_tx0_scl &hdmim0_tx0_sda>; +@@ -1394,6 +1436,7 @@ + reset-names = "ref", "hdp"; + rockchip,grf = <&sys_grf>; + rockchip,vo-grf = <&vo1_grf>; ++ #sound-dai-cells = <0>; + status = "disabled"; + + ports { +@@ -2024,12 +2067,47 @@ + status = "disabled"; + }; + ++ spdif_tx0: spdif-tx@fe4e0000 { ++ compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; ++ reg = <0x0 0xfe4e0000 0x0 0x1000>; ++ assigned-clock-parents = <&cru PLL_AUPLL>; ++ assigned-clocks = <&cru CLK_SPDIF0_SRC>; ++ clock-names = "mclk", "hclk"; ++ clocks = <&cru MCLK_SPDIF0>, <&cru HCLK_SPDIF0>; ++ dma-names = "tx"; ++ dmas = <&dmac0 5>; ++ interrupts = ; ++ pinctrl-0 = <&spdif0m0_tx>; ++ pinctrl-names = "default"; ++ power-domains = <&power RK3588_PD_AUDIO>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spdif_tx1: spdif-tx@fe4f0000 { ++ compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; ++ reg = <0x0 0xfe4f0000 0x0 0x1000>; ++ assigned-clock-parents = <&cru PLL_AUPLL>; ++ assigned-clocks = <&cru CLK_SPDIF1_SRC>; ++ clock-names = "mclk", "hclk"; ++ clocks = <&cru MCLK_SPDIF1>, <&cru HCLK_SPDIF1>; ++ dma-names = "tx"; ++ dmas = <&dmac1 5>; ++ interrupts = ; ++ pinctrl-0 = <&spdif1m0_tx>; ++ pinctrl-names = "default"; ++ power-domains = <&power RK3588_PD_AUDIO>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ }; ++ + gic: interrupt-controller@fe600000 { + compatible = "arm,gic-v3"; + reg = <0x0 0xfe600000 0 0x10000>, /* GICD */ + <0x0 0xfe680000 0 0x100000>; /* GICR */ + interrupts = ; + interrupt-controller; ++ dma-noncoherent; + mbi-alias = <0x0 0xfe610000>; + mbi-ranges = <424 56>; + msi-controller; +@@ -2041,6 +2119,7 @@ + its0: msi-controller@fe640000 { + compatible = "arm,gic-v3-its"; + reg = <0x0 0xfe640000 0x0 0x20000>; ++ dma-noncoherent; + msi-controller; + #msi-cells = <1>; + }; +@@ -2048,6 +2127,7 @@ + its1: msi-controller@fe660000 { + compatible = "arm,gic-v3-its"; + reg = <0x0 0xfe660000 0x0 0x20000>; ++ dma-noncoherent; + msi-controller; + #msi-cells = <1>; + }; +@@ -2815,11 +2895,12 @@ + #dma-cells = <1>; + }; + +- hdptxphy_hdmi0: phy@fed60000 { ++ hdptxphy0: phy@fed60000 { + compatible = "rockchip,rk3588-hdptx-phy"; + reg = <0x0 0xfed60000 0x0 0x2000>; + clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX0>; + clock-names = "ref", "apb"; ++ #clock-cells = <0>; + #phy-cells = <0>; + resets = <&cru SRST_HDPTX0>, <&cru SRST_P_HDPTX0>, + <&cru SRST_HDPTX0_INIT>, <&cru SRST_HDPTX0_CMN>, +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts b/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts +index 9d525c8ff72..9eda6972266 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts +@@ -129,7 +129,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-genbook.dts b/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-genbook.dts +index bc6b43a7715..6dc10da5215 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-genbook.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5-genbook.dts +@@ -166,7 +166,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi +index 71ed680621b..cc37f082ade 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi +@@ -277,6 +277,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + hym8563_int: hym8563-int { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-common.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-common.dtsi +index 5e72d0eff0e..8a783dc64c0 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-common.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-common.dtsi +@@ -126,6 +126,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + leds { + led_user_en: led_user_en { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dtsi +index 7125790bbed..08920344a4b 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dtsi +@@ -4,12 +4,24 @@ + */ + + #include ++#include + + / { + chosen { + stdout-path = "serial2:1500000n8"; + }; + ++ hdmi1-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con_in: endpoint { ++ remote-endpoint = <&hdmi1_out_con>; ++ }; ++ }; ++ }; ++ + /* Unnamed gated oscillator: 100MHz,3.3V,3225 */ + pcie30_port0_refclk: pcie30_port1_refclk: pcie-oscillator { + compatible = "gated-fixed-clock"; +@@ -81,6 +93,26 @@ + status = "okay"; + }; + ++&hdmi1 { ++ status = "okay"; ++}; ++ ++&hdmi1_in { ++ hdmi1_in_vp0: endpoint { ++ remote-endpoint = <&vp0_out_hdmi1>; ++ }; ++}; ++ ++&hdmi1_out { ++ hdmi1_out_con: endpoint { ++ remote-endpoint = <&hdmi1_con_in>; ++ }; ++}; ++ ++&hdptxphy1 { ++ status = "okay"; ++}; ++ + &i2c6 { + status = "okay"; + +@@ -275,3 +307,18 @@ + &usb_host2_xhci { + status = "okay"; + }; ++ ++&vop_mmu { ++ status = "okay"; ++}; ++ ++&vop { ++ status = "okay"; ++}; ++ ++&vp0 { ++ vp0_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { ++ reg = ; ++ remote-endpoint = <&hdmi1_in_vp0>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-evb1-v10.dts b/dts/upstream/src/arm64/rockchip/rk3588-evb1-v10.dts +index ba49f0bbaac..8e912da299a 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-evb1-v10.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-evb1-v10.dts +@@ -132,6 +132,17 @@ + }; + }; + ++ hdmi1-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con_in: endpoint { ++ remote-endpoint = <&hdmi1_out_con>; ++ }; ++ }; ++ }; ++ + pcie20_avdd0v85: regulator-pcie20-avdd0v85 { + compatible = "regulator-fixed"; + regulator-name = "pcie20_avdd0v85"; +@@ -364,7 +375,27 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdmi1 { ++ status = "okay"; ++}; ++ ++&hdmi1_in { ++ hdmi1_in_vp1: endpoint { ++ remote-endpoint = <&vp1_out_hdmi1>; ++ }; ++}; ++ ++&hdmi1_out { ++ hdmi1_out_con: endpoint { ++ remote-endpoint = <&hdmi1_con_in>; ++ }; ++}; ++ ++&hdptxphy0 { ++ status = "okay"; ++}; ++ ++&hdptxphy1 { + status = "okay"; + }; + +@@ -441,7 +472,7 @@ + status = "okay"; + + es8388: audio-codec@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + clocks = <&cru I2S0_8CH_MCLKOUT>; + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; +@@ -519,6 +550,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + audio { + hp_detect: headphone-detect { +@@ -1371,11 +1406,11 @@ + status = "okay"; + }; + +-&vop_mmu { ++&vop { + status = "okay"; + }; + +-&vop { ++&vop_mmu { + status = "okay"; + }; + +@@ -1385,3 +1420,10 @@ + remote-endpoint = <&hdmi0_in_vp0>; + }; + }; ++ ++&vp1 { ++ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { ++ reg = ; ++ remote-endpoint = <&hdmi1_in_vp1>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-extra.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-extra.dtsi +index 840b638af1c..099edb3fd0f 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-extra.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-extra.dtsi +@@ -7,6 +7,46 @@ + #include "rk3588-extra-pinctrl.dtsi" + + / { ++ hdmi1_sound: hdmi1-sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,mclk-fs = <128>; ++ simple-audio-card,name = "hdmi1"; ++ status = "disabled"; ++ ++ simple-audio-card,codec { ++ sound-dai = <&hdmi1>; ++ }; ++ ++ simple-audio-card,cpu { ++ sound-dai = <&i2s6_8ch>; ++ }; ++ }; ++ ++ reserved-memory { ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ /* ++ * The 4k HDMI capture controller works only with 32bit ++ * phys addresses and doesn't support IOMMU. HDMI RX CMA ++ * must be reserved below 4GB. ++ * The size of 160MB was determined as follows: ++ * (3840 * 2160 pixels) * (4 bytes/pixel) * (2 frames/buffer) / 10^6 = 66MB ++ * To ensure sufficient support for practical use-cases, ++ * we doubled the 66MB value. ++ */ ++ hdmi_receiver_cma: hdmi-receiver-cma { ++ compatible = "shared-dma-pool"; ++ alloc-ranges = <0x0 0x0 0x0 0xffffffff>; ++ size = <0x0 (160 * 0x100000)>; /* 160MiB */ ++ alignment = <0x0 0x40000>; /* 64K */ ++ no-map; ++ status = "disabled"; ++ }; ++ }; ++ + usb_host1_xhci: usb@fc400000 { + compatible = "rockchip,rk3588-dwc3", "snps,dwc3"; + reg = <0x0 0xfc400000 0x0 0x400000>; +@@ -67,6 +107,26 @@ + }; + }; + ++ hdptxphy1_grf: syscon@fd5e4000 { ++ compatible = "rockchip,rk3588-hdptxphy-grf", "syscon"; ++ reg = <0x0 0xfd5e4000 0x0 0x100>; ++ }; ++ ++ spdif_tx5: spdif-tx@fddb8000 { ++ compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; ++ reg = <0x0 0xfddb8000 0x0 0x1000>; ++ assigned-clock-parents = <&cru PLL_AUPLL>; ++ assigned-clocks = <&cru CLK_SPDIF5_DP1_SRC>; ++ clock-names = "mclk", "hclk"; ++ clocks = <&cru MCLK_SPDIF5>, <&cru HCLK_SPDIF5_DP1>; ++ dma-names = "tx"; ++ dmas = <&dmac1 22>; ++ interrupts = ; ++ power-domains = <&power RK3588_PD_VO0>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ }; ++ + i2s8_8ch: i2s@fddc8000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x0 0xfddc8000 0x0 0x1000>; +@@ -84,6 +144,21 @@ + status = "disabled"; + }; + ++ spdif_tx4: spdif-tx@fdde8000 { ++ compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; ++ reg = <0x0 0xfdde8000 0x0 0x1000>; ++ assigned-clock-parents = <&cru PLL_AUPLL>; ++ assigned-clocks = <&cru CLK_SPDIF4_SRC>; ++ clock-names = "mclk", "hclk"; ++ clocks = <&cru MCLK_SPDIF4>, <&cru HCLK_SPDIF4>; ++ dma-names = "tx"; ++ dmas = <&dmac1 8>; ++ interrupts = ; ++ power-domains = <&power RK3588_PD_VO1>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ }; ++ + i2s6_8ch: i2s@fddf4000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x0 0xfddf4000 0x0 0x1000>; +@@ -135,6 +210,79 @@ + status = "disabled"; + }; + ++ hdmi1: hdmi@fdea0000 { ++ compatible = "rockchip,rk3588-dw-hdmi-qp"; ++ reg = <0x0 0xfdea0000 0x0 0x20000>; ++ clocks = <&cru PCLK_HDMITX1>, ++ <&cru CLK_HDMITX1_EARC>, ++ <&cru CLK_HDMITX1_REF>, ++ <&cru MCLK_I2S6_8CH_TX>, ++ <&cru CLK_HDMIHDP1>, ++ <&cru HCLK_VO1>; ++ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1"; ++ interrupts = , ++ , ++ , ++ , ++ ; ++ interrupt-names = "avp", "cec", "earc", "main", "hpd"; ++ phys = <&hdptxphy1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&hdmim2_tx1_cec &hdmim0_tx1_hpd ++ &hdmim1_tx1_scl &hdmim1_tx1_sda>; ++ power-domains = <&power RK3588_PD_VO1>; ++ resets = <&cru SRST_HDMITX1_REF>, <&cru SRST_HDMIHDP1>; ++ reset-names = "ref", "hdp"; ++ rockchip,grf = <&sys_grf>; ++ rockchip,vo-grf = <&vo1_grf>; ++ #sound-dai-cells = <0>; ++ status = "disabled"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hdmi1_in: port@0 { ++ reg = <0>; ++ }; ++ ++ hdmi1_out: port@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ hdmi_receiver: hdmi_receiver@fdee0000 { ++ compatible = "rockchip,rk3588-hdmirx-ctrler", "snps,dw-hdmi-rx"; ++ reg = <0x0 0xfdee0000 0x0 0x6000>; ++ interrupts = , ++ , ++ ; ++ interrupt-names = "cec", "hdmi", "dma"; ++ clocks = <&cru ACLK_HDMIRX>, ++ <&cru CLK_HDMIRX_AUD>, ++ <&cru CLK_CR_PARA>, ++ <&cru PCLK_HDMIRX>, ++ <&cru CLK_HDMIRX_REF>, ++ <&cru PCLK_S_HDMIRX>, ++ <&cru HCLK_VO1>; ++ clock-names = "aclk", ++ "audio", ++ "cr_para", ++ "pclk", ++ "ref", ++ "hclk_s_hdmirx", ++ "hclk_vo1"; ++ memory-region = <&hdmi_receiver_cma>; ++ power-domains = <&power RK3588_PD_VO1>; ++ resets = <&cru SRST_A_HDMIRX>, <&cru SRST_P_HDMIRX>, ++ <&cru SRST_HDMIRX_REF>, <&cru SRST_A_HDMIRX_BIU>; ++ reset-names = "axi", "apb", "ref", "biu"; ++ rockchip,grf = <&sys_grf>; ++ rockchip,vo1-grf = <&vo1_grf>; ++ status = "disabled"; ++ }; ++ + pcie3x4: pcie@fe150000 { + compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie"; + #address-cells = <3>; +@@ -398,6 +546,23 @@ + }; + }; + ++ hdptxphy1: phy@fed70000 { ++ compatible = "rockchip,rk3588-hdptx-phy"; ++ reg = <0x0 0xfed70000 0x0 0x2000>; ++ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX1>; ++ clock-names = "ref", "apb"; ++ #clock-cells = <0>; ++ #phy-cells = <0>; ++ resets = <&cru SRST_HDPTX1>, <&cru SRST_P_HDPTX1>, ++ <&cru SRST_HDPTX1_INIT>, <&cru SRST_HDPTX1_CMN>, ++ <&cru SRST_HDPTX1_LANE>, <&cru SRST_HDPTX1_ROPLL>, ++ <&cru SRST_HDPTX1_LCPLL>; ++ reset-names = "phy", "apb", "init", "cmn", "lane", "ropll", ++ "lcpll"; ++ rockchip,grf = <&hdptxphy1_grf>; ++ status = "disabled"; ++ }; ++ + usbdp_phy1: phy@fed90000 { + compatible = "rockchip,rk3588-usbdp-phy"; + reg = <0x0 0xfed90000 0x0 0x10000>; +@@ -449,3 +614,24 @@ + status = "disabled"; + }; + }; ++ ++&vop { ++ clocks = <&cru ACLK_VOP>, ++ <&cru HCLK_VOP>, ++ <&cru DCLK_VOP0>, ++ <&cru DCLK_VOP1>, ++ <&cru DCLK_VOP2>, ++ <&cru DCLK_VOP3>, ++ <&cru PCLK_VOP_ROOT>, ++ <&hdptxphy0>, ++ <&hdptxphy1>; ++ clock-names = "aclk", ++ "hclk", ++ "dclk_vp0", ++ "dclk_vp1", ++ "dclk_vp2", ++ "dclk_vp3", ++ "pclk_vop", ++ "pll_hdmiphy0", ++ "pll_hdmiphy1"; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-fet3588-c.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-fet3588-c.dtsi +index 39005131738..4331cdc70f9 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-fet3588-c.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-fet3588-c.dtsi +@@ -205,6 +205,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + leds { + led_rgb_b: led-rgb-b { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-firefly-core-3588j.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-firefly-core-3588j.dtsi +index 42c523b553c..80e16ea4154 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-firefly-core-3588j.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-firefly-core-3588j.dtsi +@@ -108,6 +108,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &sdhci { + bus-width = <8>; + no-sdio; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-firefly-itx-3588j.dts b/dts/upstream/src/arm64/rockchip/rk3588-firefly-itx-3588j.dts +index 2be5251d3e3..e086114c763 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-firefly-itx-3588j.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-firefly-itx-3588j.dts +@@ -337,7 +337,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588-nas.dts b/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588-nas.dts +index b3a04ca370b..8171fbfd819 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588-nas.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588-nas.dts +@@ -335,7 +335,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588.dtsi +index e3a9598b99f..af431fdcbea 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-friendlyelec-cm3588.dtsi +@@ -222,6 +222,10 @@ + compatible = "realtek,rt5616"; + reg = <0x1b>; + #sound-dai-cells = <0>; ++ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; ++ assigned-clock-rates = <12288000>; ++ clocks = <&cru I2S0_8CH_MCLKOUT>; ++ clock-names = "mclk"; + }; + }; + +@@ -256,6 +260,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + gpio-leds { + led_sys_pin: led-sys-pin { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-h96-max-v58.dts b/dts/upstream/src/arm64/rockchip/rk3588-h96-max-v58.dts +index 4791b77f357..73d8ce4fde2 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-h96-max-v58.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-h96-max-v58.dts +@@ -140,6 +140,24 @@ + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; ++ ++ spdif_dit: spdif-dit { ++ compatible = "linux,spdif-dit"; ++ #sound-dai-cells = <0>; ++ }; ++ ++ spdif_sound: spdif-sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,name = "SPDIF"; ++ ++ simple-audio-card,cpu { ++ sound-dai = <&spdif_tx0>; ++ }; ++ ++ simple-audio-card,codec { ++ sound-dai = <&spdif_dit>; ++ }; ++ }; + }; + + &combphy0_ps { +@@ -207,7 +225,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -316,6 +334,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + hym8563_int: hym8563-int { +@@ -400,6 +422,12 @@ + status = "okay"; + }; + ++&spdif_tx0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spdif0m1_tx>; ++ status = "okay"; ++}; ++ + &spi2 { + assigned-clocks = <&cru CLK_SPI2>; + assigned-clock-rates = <200000000>; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts b/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts +index 7f457ab7801..9fceea6c139 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts +@@ -303,7 +303,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -333,6 +333,56 @@ + }; + }; + ++ typec-portc@22 { ++ compatible = "fcs,fusb302"; ++ reg = <0x22>; ++ interrupt-parent = <&gpio4>; ++ interrupts = ; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cc_int1>; ++ vbus-supply = <&vcc_5v0_usb_c1>; ++ ++ connector { ++ compatible = "usb-c-connector"; ++ data-role = "dual"; ++ label = "USBC-1 P11"; ++ power-role = "source"; ++ self-powered; ++ source-pdos = ++ ; ++ vbus-supply = <&vcc_5v0_usb_c1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ ++ usbc0_hs: endpoint { ++ remote-endpoint = <&usb_host0_xhci_drd_sw>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ ++ usbc0_ss: endpoint { ++ remote-endpoint = <&usbdp_phy0_typec_ss>; ++ }; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ ++ usbc0_sbu: endpoint { ++ remote-endpoint = <&usbdp_phy0_typec_sbu>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ + vdd_npu_s0: regulator@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; +@@ -394,6 +444,56 @@ + pinctrl-0 = <&i2c8m2_xfer>; + status = "okay"; + ++ typec-portc@22 { ++ compatible = "fcs,fusb302"; ++ reg = <0x22>; ++ interrupt-parent = <&gpio4>; ++ interrupts = ; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cc_int2>; ++ vbus-supply = <&vcc_5v0_usb_c2>; ++ ++ connector { ++ compatible = "usb-c-connector"; ++ data-role = "dual"; ++ label = "USBC-2 P12"; ++ power-role = "source"; ++ self-powered; ++ source-pdos = ++ ; ++ vbus-supply = <&vcc_5v0_usb_c2>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ ++ usbc1_hs: endpoint { ++ remote-endpoint = <&usb_host1_xhci_drd_sw>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ ++ usbc1_ss: endpoint { ++ remote-endpoint = <&usbdp_phy1_typec_ss>; ++ }; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ ++ usbc1_sbu: endpoint { ++ remote-endpoint = <&usbdp_phy1_typec_sbu>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ + vdd_cpu_big0_s0: regulator@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; +@@ -451,6 +551,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + emmc { + emmc_reset: emmc-reset { +@@ -483,6 +587,26 @@ + rockchip,pins = <0 RK_PC7 12 &pcfg_pull_none>; + }; + }; ++ ++ usb3 { ++ cc_int1: cc-int1 { ++ rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ cc_int2: cc-int2 { ++ rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ typec0_sbu_dc_pins: typec0-sbu-dc-pins { ++ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>, ++ <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_down>; ++ }; ++ ++ typec1_sbu_dc_pins: typec1-sbu-dc-pins { ++ rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>, ++ <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>; ++ }; ++ }; + }; + + &saradc { +@@ -850,6 +974,24 @@ + status = "okay"; + }; + ++/* USB-C P11 connector */ ++&u2phy0 { ++ status = "okay"; ++}; ++ ++&u2phy0_otg { ++ status = "okay"; ++}; ++ ++/* USB-C P12 connector */ ++&u2phy1 { ++ status = "okay"; ++}; ++ ++&u2phy1_otg { ++ status = "okay"; ++}; ++ + &u2phy2 { + status = "okay"; + }; +@@ -892,6 +1034,56 @@ + status = "okay"; + }; + ++/* Type-C on P11 */ ++&usbdp_phy0 { ++ orientation-switch; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&typec0_sbu_dc_pins>; ++ sbu1-dc-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; /* Q7_USB_C0_SBU1_DC */ ++ sbu2-dc-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; /* Q7_USB_C0_SBU2_DC */ ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ usbdp_phy0_typec_ss: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&usbc0_ss>; ++ }; ++ ++ usbdp_phy0_typec_sbu: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&usbc0_sbu>; ++ }; ++ }; ++}; ++ ++/* Type-C on P12 */ ++&usbdp_phy1 { ++ orientation-switch; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&typec1_sbu_dc_pins>; ++ sbu1-dc-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; /* Q7_USB_C1_SBU1_DC */ ++ sbu2-dc-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; /* Q7_USB_C1_SBU2_DC */ ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ usbdp_phy1_typec_ss: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&usbc1_ss>; ++ }; ++ ++ usbdp_phy1_typec_sbu: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&usbc1_sbu>; ++ }; ++ }; ++}; ++ + /* host0 on P10 USB-A */ + &usb_host0_ehci { + status = "okay"; +@@ -902,6 +1094,36 @@ + status = "okay"; + }; + ++/* host0 on P11 USB-C */ ++&usb_host0_xhci { ++ usb-role-switch; ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ usb_host0_xhci_drd_sw: endpoint { ++ remote-endpoint = <&usbc0_hs>; ++ }; ++ }; ++}; ++ ++/* host1 on P12 USB-C */ ++&usb_host1_xhci { ++ usb-role-switch; ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ usb_host1_xhci_drd_sw: endpoint { ++ remote-endpoint = <&usbc1_hs>; ++ }; ++ }; ++}; ++ + /* host1 on M.2 E-key */ + &usb_host1_ehci { + status = "okay"; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-nanopc-t6.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-nanopc-t6.dtsi +index cb350727d11..bbe500cc924 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-nanopc-t6.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-nanopc-t6.dtsi +@@ -360,7 +360,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -565,6 +565,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + gpio-leds { + sys_led_pin: sys-led-pin { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-ok3588-c.dts b/dts/upstream/src/arm64/rockchip/rk3588-ok3588-c.dts +index 1c0851b45eb..fbe1d5c06d9 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-ok3588-c.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-ok3588-c.dts +@@ -312,6 +312,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + pcie2 { + pcie2_0_rst: pcie2-0-rst { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-compact.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-compact.dtsi +index 87090cb9802..f748c6f760d 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-compact.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-compact.dtsi +@@ -7,9 +7,6 @@ + #include "rk3588-orangepi-5.dtsi" + + / { +- model = "Xunlong Orange Pi 5 Max"; +- compatible = "xunlong,orangepi-5-max", "rockchip,rk3588"; +- + vcc5v0_usb30_otg: vcc5v0-usb30-otg-regulator { + compatible = "regulator-fixed"; + enable-active-high; +@@ -62,18 +59,12 @@ + + &led_blue_pwm { + /* PWM_LED1 */ +- pwms = <&pwm4 0 25000 0>; + status = "okay"; + }; + +-&led_green_pwm { +- /* PWM_LED2 */ +- pwms = <&pwm5 0 25000 0>; +-}; +- + /* phy2 */ + &pcie2x1l1 { +- reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; ++ reset-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie_eth>; + status = "okay"; + }; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-max.dts b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-max.dts +index ce44549babf..8b1d35760c3 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-max.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-max.dts +@@ -21,6 +21,17 @@ + }; + }; + }; ++ ++ hdmi1-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con_in: endpoint { ++ remote-endpoint = <&hdmi1_out_con>; ++ }; ++ }; ++ }; + }; + + &hdmi0 { +@@ -39,10 +50,57 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdmi0_sound { ++ status = "okay"; ++}; ++ ++&hdmi1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd ++ &hdmim1_tx1_scl &hdmim1_tx1_sda>; ++ status = "okay"; ++}; ++ ++&hdmi1_in { ++ hdmi1_in_vp1: endpoint { ++ remote-endpoint = <&vp1_out_hdmi1>; ++ }; ++}; ++ ++&hdmi1_out { ++ hdmi1_out_con: endpoint { ++ remote-endpoint = <&hdmi1_con_in>; ++ }; ++}; ++ ++&hdmi1_sound { + status = "okay"; + }; + ++&hdptxphy0 { ++ status = "okay"; ++}; ++ ++&hdptxphy1 { ++ status = "okay"; ++}; ++ ++&i2s5_8ch { ++ status = "okay"; ++}; ++ ++&i2s6_8ch { ++ status = "okay"; ++}; ++ ++&led_blue_pwm { ++ pwms = <&pwm4 0 25000 0>; ++}; ++ ++&led_green_pwm { ++ pwms = <&pwm5 0 25000 0>; ++}; ++ + &pinctrl { + + usb { +@@ -58,3 +116,10 @@ + remote-endpoint = <&hdmi0_in_vp0>; + }; + }; ++ ++&vp1 { ++ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { ++ reg = ; ++ remote-endpoint = <&hdmi1_in_vp1>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-plus.dts b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-plus.dts +index 255e33c5dbd..121e4d1c3fa 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-plus.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5-plus.dts +@@ -26,6 +26,17 @@ + }; + }; + ++ hdmi1-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con_in: endpoint { ++ remote-endpoint = <&hdmi1_out_con>; ++ }; ++ }; ++ }; ++ + ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>; +@@ -113,6 +124,10 @@ + status = "okay"; + }; + ++&hdmi0_sound { ++ status = "okay"; ++}; ++ + &hdmi0_in { + hdmi0_in_vp0: endpoint { + remote-endpoint = <&vp0_out_hdmi0>; +@@ -125,7 +140,31 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdmi1 { ++ status = "okay"; ++}; ++ ++&hdmi1_in { ++ hdmi1_in_vp1: endpoint { ++ remote-endpoint = <&vp1_out_hdmi1>; ++ }; ++}; ++ ++&hdmi1_out { ++ hdmi1_out_con: endpoint { ++ remote-endpoint = <&hdmi1_con_in>; ++ }; ++}; ++ ++&hdmi1_sound { ++ status = "okay"; ++}; ++ ++&hdptxphy0 { ++ status = "okay"; ++}; ++ ++&hdptxphy1 { + status = "okay"; + }; + +@@ -189,6 +228,14 @@ + }; + }; + ++&i2s5_8ch { ++ status = "okay"; ++}; ++ ++&i2s6_8ch { ++ status = "okay"; ++}; ++ + &led_blue_gpio { + gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; + status = "okay"; +@@ -342,3 +389,10 @@ + remote-endpoint = <&hdmi0_in_vp0>; + }; + }; ++ ++&vp1 { ++ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { ++ reg = ; ++ remote-endpoint = <&hdmi1_in_vp1>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5.dtsi +index a98e804a094..91d56c34a1e 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-orangepi-5.dtsi +@@ -276,7 +276,7 @@ + + /* PLDO2 vcca 1.8V, BUCK8 gated by PLDO2 being enabled */ + es8388: audio-codec@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + clocks = <&cru I2S0_8CH_MCLKOUT>; + AVDD-supply = <&vcc_3v3_s0>; +@@ -348,6 +348,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &saradc { + vref-supply = <&vcc_1v8_s0>; + status = "okay"; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-quartzpro64.dts b/dts/upstream/src/arm64/rockchip/rk3588-quartzpro64.dts +index 088cfade6f6..78aaa6635b5 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-quartzpro64.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-quartzpro64.dts +@@ -311,7 +311,7 @@ + status = "okay"; + + es8388: audio-codec@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; + assigned-clock-rates = <12288000>; +@@ -347,6 +347,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + hym8563_int: hym8563-int { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-rock-5-itx.dts b/dts/upstream/src/arm64/rockchip/rk3588-rock-5-itx.dts +index 2a059020946..7de17117df7 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-rock-5-itx.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-rock-5-itx.dts +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include "dt-bindings/usb/pd.h" + #include "rk3588.dtsi" + +@@ -72,6 +73,17 @@ + }; + }; + ++ hdmi1-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con_in: endpoint { ++ remote-endpoint = <&hdmi1_out_con>; ++ }; ++ }; ++ }; ++ + /* Unnamed gated oscillator: 100MHz,3.3V,3225 */ + pcie30_port0_refclk: pcie30_port1_refclk: pcie-oscillator { + compatible = "gated-fixed-clock"; +@@ -261,6 +273,28 @@ + status = "okay"; + }; + ++&hdmi1 { ++ pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd ++ &hdmim1_tx1_scl &hdmim1_tx1_sda>; ++ status = "okay"; ++}; ++ ++&hdmi1_in { ++ hdmi1_in_vp1: endpoint { ++ remote-endpoint = <&vp1_out_hdmi1>; ++ }; ++}; ++ ++&hdmi1_out { ++ hdmi1_out_con: endpoint { ++ remote-endpoint = <&hdmi1_con_in>; ++ }; ++}; ++ ++&hdptxphy1 { ++ status = "okay"; ++}; ++ + &i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0m2_xfer>; +@@ -564,6 +598,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + rtc_int: rtc-int { +@@ -1208,3 +1246,18 @@ + rockchip,dp-lane-mux = <2 3>; + status = "okay"; + }; ++ ++&vop { ++ status = "okay"; ++}; ++ ++&vop_mmu { ++ status = "okay"; ++}; ++ ++&vp1 { ++ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { ++ reg = ; ++ remote-endpoint = <&hdmi1_in_vp1>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-rock-5b.dts b/dts/upstream/src/arm64/rockchip/rk3588-rock-5b.dts +index d597112f1d5..d22068475c5 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-rock-5b.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-rock-5b.dts +@@ -49,6 +49,17 @@ + }; + }; + ++ hdmi1-con { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con_in: endpoint { ++ remote-endpoint = <&hdmi1_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; +@@ -220,7 +231,48 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdmi0_sound { ++ status = "okay"; ++}; ++ ++&hdmi1 { ++ pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd ++ &hdmim1_tx1_scl &hdmim1_tx1_sda>; ++ status = "okay"; ++}; ++ ++&hdmi1_in { ++ hdmi1_in_vp1: endpoint { ++ remote-endpoint = <&vp1_out_hdmi1>; ++ }; ++}; ++ ++&hdmi1_out { ++ hdmi1_out_con: endpoint { ++ remote-endpoint = <&hdmi1_con_in>; ++ }; ++}; ++ ++&hdmi1_sound { ++ status = "okay"; ++}; ++ ++&hdmi_receiver_cma { ++ status = "okay"; ++}; ++ ++&hdmi_receiver { ++ hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; ++ pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>; ++ pinctrl-names = "default"; ++ status = "okay"; ++}; ++ ++&hdptxphy0 { ++ status = "okay"; ++}; ++ ++&hdptxphy1 { + status = "okay"; + }; + +@@ -318,6 +370,14 @@ + }; + }; + ++&i2s5_8ch { ++ status = "okay"; ++}; ++ ++&i2s6_8ch { ++ status = "okay"; ++}; ++ + &package_thermal { + polling-delay = <1000>; + +@@ -376,7 +436,17 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { ++ hdmirx { ++ hdmirx_hpd: hdmirx-5v-detection { ++ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ + hym8563 { + hym8563_int: hym8563-int { + rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; +@@ -891,11 +961,11 @@ + status = "okay"; + }; + +-&vop_mmu { ++&vop { + status = "okay"; + }; + +-&vop { ++&vop_mmu { + status = "okay"; + }; + +@@ -905,3 +975,10 @@ + remote-endpoint = <&hdmi0_in_vp0>; + }; + }; ++ ++&vp1 { ++ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 { ++ reg = ; ++ remote-endpoint = <&hdmi1_in_vp1>; ++ }; ++}; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-tiger-haikou.dts b/dts/upstream/src/arm64/rockchip/rk3588-tiger-haikou.dts +index 3187b4918a3..a3d8ff64783 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-tiger-haikou.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-tiger-haikou.dts +@@ -189,7 +189,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -310,8 +310,10 @@ + status = "okay"; + }; + ++/* DB9 RS232/RS485 when SW2 in "UART1" mode */ + &uart5 { + rts-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; ++ status = "okay"; + }; + + &usbdp_phy0 { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-tiger.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-tiger.dtsi +index e8fa449517c..c4933a08dd1 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-tiger.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-tiger.dtsi +@@ -173,7 +173,6 @@ + + &i2c2 { + pinctrl-0 = <&i2c2m3_xfer>; +- status = "okay"; + }; + + &i2c2m3_xfer { +@@ -336,6 +335,10 @@ + reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + emmc { + emmc_reset: emmc-reset { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-toybrick-x0.dts b/dts/upstream/src/arm64/rockchip/rk3588-toybrick-x0.dts +index 3cbee5b9747..5a428e00ab9 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-toybrick-x0.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588-toybrick-x0.dts +@@ -289,6 +289,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + rtl8211f { + rtl8211f_rst: rtl8211f-rst { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588-turing-rk1.dtsi b/dts/upstream/src/arm64/rockchip/rk3588-turing-rk1.dtsi +index 6bc46734cc1..60ad272982a 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588-turing-rk1.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588-turing-rk1.dtsi +@@ -214,6 +214,8 @@ + }; + + &package_thermal { ++ polling-delay = <1000>; ++ + trips { + package_active1: trip-active1 { + temperature = <45000>; +@@ -287,6 +289,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + fan { + fan_int: fan-int { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588j.dtsi b/dts/upstream/src/arm64/rockchip/rk3588j.dtsi +index bce72bac450..3045cb3bd68 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588j.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588j.dtsi +@@ -11,20 +11,15 @@ + compatible = "operating-points-v2"; + opp-shared; + +- opp-1416000000 { +- opp-hz = /bits/ 64 <1416000000>; ++ opp-1200000000 { ++ opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <750000 750000 950000>; + clock-latency-ns = <40000>; + opp-suspend; + }; +- opp-1608000000 { +- opp-hz = /bits/ 64 <1608000000>; +- opp-microvolt = <887500 887500 950000>; +- clock-latency-ns = <40000>; +- }; +- opp-1704000000 { +- opp-hz = /bits/ 64 <1704000000>; +- opp-microvolt = <937500 937500 950000>; ++ opp-1296000000 { ++ opp-hz = /bits/ 64 <1296000000>; ++ opp-microvolt = <775000 775000 950000>; + clock-latency-ns = <40000>; + }; + }; +@@ -33,9 +28,14 @@ + compatible = "operating-points-v2"; + opp-shared; + ++ opp-1200000000{ ++ opp-hz = /bits/ 64 <1200000000>; ++ opp-microvolt = <750000 750000 950000>; ++ clock-latency-ns = <40000>; ++ }; + opp-1416000000 { + opp-hz = /bits/ 64 <1416000000>; +- opp-microvolt = <750000 750000 950000>; ++ opp-microvolt = <762500 762500 950000>; + clock-latency-ns = <40000>; + }; + opp-1608000000 { +@@ -43,25 +43,20 @@ + opp-microvolt = <787500 787500 950000>; + clock-latency-ns = <40000>; + }; +- opp-1800000000 { +- opp-hz = /bits/ 64 <1800000000>; +- opp-microvolt = <875000 875000 950000>; +- clock-latency-ns = <40000>; +- }; +- opp-2016000000 { +- opp-hz = /bits/ 64 <2016000000>; +- opp-microvolt = <950000 950000 950000>; +- clock-latency-ns = <40000>; +- }; + }; + + cluster2_opp_table: opp-table-cluster2 { + compatible = "operating-points-v2"; + opp-shared; + ++ opp-1200000000{ ++ opp-hz = /bits/ 64 <1200000000>; ++ opp-microvolt = <750000 750000 950000>; ++ clock-latency-ns = <40000>; ++ }; + opp-1416000000 { + opp-hz = /bits/ 64 <1416000000>; +- opp-microvolt = <750000 750000 950000>; ++ opp-microvolt = <762500 762500 950000>; + clock-latency-ns = <40000>; + }; + opp-1608000000 { +@@ -69,16 +64,6 @@ + opp-microvolt = <787500 787500 950000>; + clock-latency-ns = <40000>; + }; +- opp-1800000000 { +- opp-hz = /bits/ 64 <1800000000>; +- opp-microvolt = <875000 875000 950000>; +- clock-latency-ns = <40000>; +- }; +- opp-2016000000 { +- opp-hz = /bits/ 64 <2016000000>; +- opp-microvolt = <950000 950000 950000>; +- clock-latency-ns = <40000>; +- }; + }; + + gpu_opp_table: opp-table { +@@ -104,10 +89,6 @@ + opp-hz = /bits/ 64 <700000000>; + opp-microvolt = <750000 750000 850000>; + }; +- opp-850000000 { +- opp-hz = /bits/ 64 <800000000>; +- opp-microvolt = <787500 787500 850000>; +- }; + }; + }; + +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-coolpi-4b.dts b/dts/upstream/src/arm64/rockchip/rk3588s-coolpi-4b.dts +index 9c394f733bb..8b717c4017a 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-coolpi-4b.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-coolpi-4b.dts +@@ -236,7 +236,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -361,6 +361,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + hym8563_int: hym8563-int { +@@ -429,7 +433,7 @@ + }; + + &pwm13 { +- pinctrl-names = "active"; ++ pinctrl-names = "default"; + pinctrl-0 = <&pwm13m2_pins>; + status = "okay"; + }; +@@ -803,6 +807,14 @@ + status = "okay"; + }; + ++&u2phy0 { ++ status = "okay"; ++}; ++ ++&u2phy0_otg { ++ status = "okay"; ++}; ++ + &u2phy2 { + status = "okay"; + }; +@@ -832,6 +844,16 @@ + pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>; + }; + ++&usbdp_phy0 { ++ /* ++ * USBDP PHY0 is wired to a USB3 Type-A OTG connector. Additionally ++ * the differential pairs 0+1 and the aux channel are wired to a ++ * mini DP connector. ++ */ ++ rockchip,dp-lane-mux = <0 1>; ++ status = "okay"; ++}; ++ + &usb_host0_ehci { + status = "okay"; + }; +@@ -840,6 +862,11 @@ + status = "okay"; + }; + ++&usb_host0_xhci { ++ extcon = <&u2phy0>; ++ status = "okay"; ++}; ++ + &usb_host1_ehci { + status = "okay"; + }; +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-evb1-v10.dts b/dts/upstream/src/arm64/rockchip/rk3588s-evb1-v10.dts +index bc4077575be..9f4aca9c2e3 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-evb1-v10.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-evb1-v10.dts +@@ -242,7 +242,7 @@ + status = "okay"; + + es8388: audio-codec@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + clocks = <&cru I2S0_8CH_MCLKOUT>; + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; +@@ -340,6 +340,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + audio { + hp_detect: headphone-detect { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-gameforce-ace.dts b/dts/upstream/src/arm64/rockchip/rk3588s-gameforce-ace.dts +index 812bba0aef1..873a2bd6a6d 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-gameforce-ace.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-gameforce-ace.dts +@@ -611,7 +611,7 @@ + status = "okay"; + + es8388: audio-codec@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + assigned-clock-rates = <12288000>; + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; +@@ -675,6 +675,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + audio-amplifier { + headphone_amplifier_en: headphone-amplifier-en { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-indiedroid-nova.dts b/dts/upstream/src/arm64/rockchip/rk3588s-indiedroid-nova.dts +index 4a3aa80f222..4189a88ecf4 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-indiedroid-nova.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-indiedroid-nova.dts +@@ -278,7 +278,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -412,7 +412,7 @@ + status = "okay"; + + es8388: audio-codec@11 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x11>; + assigned-clock-rates = <12288000>; + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; +@@ -455,6 +455,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + bluetooth-pins { + bt_reset: bt-reset { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-khadas-edge2.dts b/dts/upstream/src/arm64/rockchip/rk3588s-khadas-edge2.dts +index ac48e7fd392..88a5e822ed1 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-khadas-edge2.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-khadas-edge2.dts +@@ -233,6 +233,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + vdd_sd { + vdd_sd_en: vdd-sd-en { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-nanopi-r6.dtsi b/dts/upstream/src/arm64/rockchip/rk3588s-nanopi-r6.dtsi +index d2eddea1840..fbf062ec3bf 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-nanopi-r6.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-nanopi-r6.dtsi +@@ -251,7 +251,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -359,6 +359,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + gpio-key { + key1_pin: key1-pin { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-odroid-m2.dts b/dts/upstream/src/arm64/rockchip/rk3588s-odroid-m2.dts +index 8f034c6d494..a72063c5514 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-odroid-m2.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-odroid-m2.dts +@@ -264,7 +264,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -433,6 +433,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + lcd { + lcd_pwren: lcd-pwren { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-orangepi-5.dtsi b/dts/upstream/src/arm64/rockchip/rk3588s-orangepi-5.dtsi +index d86aeacca23..4fedc50cce8 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-orangepi-5.dtsi ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-orangepi-5.dtsi +@@ -197,7 +197,11 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdmi0_sound { ++ status = "okay"; ++}; ++ ++&hdptxphy0 { + status = "okay"; + }; + +@@ -268,7 +272,7 @@ + status = "okay"; + + es8388: audio-codec@10 { +- compatible = "everest,es8388"; ++ compatible = "everest,es8388", "everest,es8328"; + reg = <0x10>; + clocks = <&cru I2S1_8CH_MCLKOUT>; + AVDD-supply = <&vcc_3v3_s0>; +@@ -355,6 +359,10 @@ + status = "okay"; + }; + ++&i2s5_8ch { ++ status = "okay"; ++}; ++ + &mdio1 { + rgmii_phy1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; +@@ -365,6 +373,10 @@ + }; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + hym8563 { + hym8563_int: hym8563-int { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-rock-5a.dts b/dts/upstream/src/arm64/rockchip/rk3588s-rock-5a.dts +index 70a43432bdc..f894742b1eb 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-rock-5a.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-rock-5a.dts +@@ -334,7 +334,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -359,6 +359,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + leds { + io_led: io-led { +diff --git a/dts/upstream/src/arm64/rockchip/rk3588s-rock-5c.dts b/dts/upstream/src/arm64/rockchip/rk3588s-rock-5c.dts +index 9b14d5383cd..dd7317bab61 100644 +--- a/dts/upstream/src/arm64/rockchip/rk3588s-rock-5c.dts ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-rock-5c.dts +@@ -68,10 +68,10 @@ + }; + }; + +- fan { ++ fan: fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; +- cooling-levels = <0 64 128 192 255>; ++ cooling-levels = <0 24 44 64 128 192 255>; + fan-supply = <&vcc_5v0>; + pwms = <&pwm3 0 10000 0>; + }; +@@ -278,7 +278,7 @@ + }; + }; + +-&hdptxphy_hdmi0 { ++&hdptxphy0 { + status = "okay"; + }; + +@@ -417,6 +417,36 @@ + }; + }; + ++&package_thermal { ++ polling-delay = <1000>; ++ ++ trips { ++ package_fan0: package-fan0 { ++ temperature = <55000>; ++ hysteresis = <2000>; ++ type = "active"; ++ }; ++ ++ package_fan1: package-fan1 { ++ temperature = <65000>; ++ hysteresis = <2000>; ++ type = "active"; ++ }; ++ }; ++ ++ cooling-maps { ++ map0 { ++ trip = <&package_fan0>; ++ cooling-device = <&fan THERMAL_NO_LIMIT 1>; ++ }; ++ ++ map1 { ++ trip = <&package_fan1>; ++ cooling-device = <&fan 2 THERMAL_NO_LIMIT>; ++ }; ++ }; ++}; ++ + &pcie2x1l2 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie20x1_2_perstn_m0>; +@@ -425,6 +455,10 @@ + status = "okay"; + }; + ++&pd_gpu { ++ domain-supply = <&vdd_gpu_s0>; ++}; ++ + &pinctrl { + leds { + led_pins: led-pins { +@@ -843,6 +877,8 @@ + }; + + &tsadc { ++ rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ ++ rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ + status = "okay"; + }; + +-- +2.49.0 + diff --git a/Add-video-damage-tracking.patch b/Add-video-damage-tracking.patch new file mode 100644 index 0000000..72475de --- /dev/null +++ b/Add-video-damage-tracking.patch @@ -0,0 +1,2382 @@ +From a05aeec18576ddce60c2fbd797245b5eeaddee25 Mon Sep 17 00:00:00 2001 +From: Alper Nebi Yasak +Date: Mon, 21 Aug 2023 16:50:58 +0300 +Subject: [PATCH 01/13] video: test: Split copy frame buffer check into a + function + +While checking frame buffer contents, the video tests also check if the +copy frame buffer contents match the main frame buffer. To test if only +the modified regions are updated after a sync, we will need to create +situations where the two are mismatched. Split this check into another +function that we can skip calling, since we won't want it to error on +those mismatched cases. + +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + test/dm/video.c | 69 +++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 58 insertions(+), 11 deletions(-) + +diff --git a/test/dm/video.c b/test/dm/video.c +index e347c1403fd..01fa9e1b241 100644 +--- a/test/dm/video.c ++++ b/test/dm/video.c +@@ -54,9 +54,6 @@ DM_TEST(dm_test_video_base, UTF_SCAN_PDATA | UTF_SCAN_FDT); + * size of the compressed data. This provides a pretty good level of + * certainty and the resulting tests need only check a single value. + * +- * If the copy framebuffer is enabled, this compares it to the main framebuffer +- * too. +- * + * @uts: Test state + * @dev: Video device + * Return: compressed size of the frame buffer, or -ve on error +@@ -65,7 +62,6 @@ static int compress_frame_buffer(struct unit_test_state *uts, + struct udevice *dev) + { + struct video_priv *priv = dev_get_uclass_priv(dev); +- struct video_priv *uc_priv = dev_get_uclass_priv(dev); + uint destlen; + void *dest; + int ret; +@@ -81,16 +77,34 @@ static int compress_frame_buffer(struct unit_test_state *uts, + if (ret) + return ret; + +- /* Check here that the copy frame buffer is working correctly */ +- if (IS_ENABLED(CONFIG_VIDEO_COPY)) { +- ut_assertf(!memcmp(uc_priv->fb, uc_priv->copy_fb, +- uc_priv->fb_size), +- "Copy framebuffer does not match fb"); +- } +- + return destlen; + } + ++/** ++ * check_copy_frame_buffer() - Compare main frame buffer to copy ++ * ++ * If the copy frame buffer is enabled, this compares it to the main ++ * frame buffer. Normally they should have the same contents after a ++ * sync. ++ * ++ * @uts: Test state ++ * @dev: Video device ++ * Return: 0, or -ve on error ++ */ ++static int check_copy_frame_buffer(struct unit_test_state *uts, ++ struct udevice *dev) ++{ ++ struct video_priv *priv = dev_get_uclass_priv(dev); ++ ++ if (!IS_ENABLED(CONFIG_VIDEO_COPY)) ++ return 0; ++ ++ ut_assertf(!memcmp(priv->fb, priv->copy_fb, priv->fb_size), ++ "Copy framebuffer does not match fb"); ++ ++ return 0; ++} ++ + /* + * Call this function at any point to halt and show the current display. Be + * sure to run the test with the -l flag. +@@ -154,24 +168,30 @@ static int dm_test_video_text(struct unit_test_state *uts) + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "8x16", 0)); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_putc_xy(con, 0, 0, 'a'); + ut_asserteq(79, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_putc_xy(con, 0, 0, ' '); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); + ut_asserteq(273, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_set_row(con, 0, WHITE); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); + ut_asserteq(273, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -190,24 +210,30 @@ static int dm_test_video_text_12x22(struct unit_test_state *uts) + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "12x22", 0)); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_putc_xy(con, 0, 0, 'a'); + ut_asserteq(89, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_putc_xy(con, 0, 0, ' '); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); + ut_asserteq(363, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_set_row(con, 0, WHITE); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); + ut_asserteq(363, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -225,6 +251,7 @@ static int dm_test_video_chars(struct unit_test_state *uts) + ut_assertok(vidconsole_select_font(con, "8x16", 0)); + vidconsole_put_string(con, test_string); + ut_asserteq(466, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -246,19 +273,23 @@ static int dm_test_video_ansi(struct unit_test_state *uts) + video_clear(con->parent); + video_sync(con->parent, false); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* test clear escape sequence: [2J */ + vidconsole_put_string(con, "A\tB\tC"ANSI_ESC"[2J"); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* test set-cursor: [%d;%df */ + vidconsole_put_string(con, "abc"ANSI_ESC"[2;2fab"ANSI_ESC"[4;4fcd"); + ut_asserteq(143, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* test colors (30-37 fg color, 40-47 bg color) */ + vidconsole_put_string(con, ANSI_ESC"[30;41mfoo"); /* black on red */ + vidconsole_put_string(con, ANSI_ESC"[33;44mbar"); /* yellow on blue */ + ut_asserteq(272, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -291,11 +322,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "8x16", 0)); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* Check display wrap */ + for (i = 0; i < 120; i++) + vidconsole_put_char(con, 'A' + i % 50); + ut_asserteq(wrap_size, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* Check display scrolling */ + for (i = 0; i < SCROLL_LINES; i++) { +@@ -303,11 +336,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, + vidconsole_put_char(con, '\n'); + } + ut_asserteq(scroll_size, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* If we scroll enough, the screen becomes blank again */ + for (i = 0; i < SCROLL_LINES; i++) + vidconsole_put_char(con, '\n'); + ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -382,6 +417,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); + ut_asserteq(1368, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -401,6 +437,7 @@ static int dm_test_video_bmp8(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); + ut_asserteq(1247, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -424,6 +461,7 @@ static int dm_test_video_bmp16(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); + ut_asserteq(3700, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -447,6 +485,7 @@ static int dm_test_video_bmp24(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); + ut_asserteq(3656, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -470,6 +509,7 @@ static int dm_test_video_bmp24_32(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); + ut_asserteq(6827, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -488,6 +528,7 @@ static int dm_test_video_bmp32(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); + ut_asserteq(2024, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -504,6 +545,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); + ut_asserteq(1368, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -523,6 +565,7 @@ static int dm_test_video_comp_bmp32(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); + ut_asserteq(2024, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -542,6 +585,7 @@ static int dm_test_video_comp_bmp8(struct unit_test_state *uts) + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); + ut_asserteq(1247, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -557,6 +601,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts) + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_put_string(con, test_string); + ut_asserteq(12174, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -578,6 +623,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts) + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_put_string(con, test_string); + ut_asserteq(34287, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +@@ -599,6 +645,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts) + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_put_string(con, test_string); + ut_asserteq(29471, compress_frame_buffer(uts, dev)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; + } +-- +2.48.1 + +From 37f92f0ac721bc300659d166d8a19f6b18b2bbcb Mon Sep 17 00:00:00 2001 +From: Alper Nebi Yasak +Date: Mon, 21 Aug 2023 16:50:59 +0300 +Subject: [PATCH 02/13] video: test: Support checking copy frame buffer + contents + +The video tests have a helper function to generate a pseudo-digest of +frame buffer contents, but it only does so for the main one. There is +another check that the copy frame buffer is the same as that. But +neither is enough to test if only the modified regions are copied to the +copy frame buffer, since we will want the two to be different in very +specific ways. + +Add a boolean argument to the existing helper function to indicate which +frame buffer we want to inspect, and update the existing callers. + +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + test/dm/video.c | 76 ++++++++++++++++++++++++++----------------------- + 1 file changed, 41 insertions(+), 35 deletions(-) + +diff --git a/test/dm/video.c b/test/dm/video.c +index 01fa9e1b241..edb1b4ede8c 100644 +--- a/test/dm/video.c ++++ b/test/dm/video.c +@@ -56,22 +56,28 @@ DM_TEST(dm_test_video_base, UTF_SCAN_PDATA | UTF_SCAN_FDT); + * + * @uts: Test state + * @dev: Video device ++ * @use_copy: Use copy frame buffer if available + * Return: compressed size of the frame buffer, or -ve on error + */ + static int compress_frame_buffer(struct unit_test_state *uts, +- struct udevice *dev) ++ struct udevice *dev, ++ bool use_copy) + { + struct video_priv *priv = dev_get_uclass_priv(dev); + uint destlen; + void *dest; + int ret; + ++ if (!IS_ENABLED(CONFIG_VIDEO_COPY)) ++ use_copy = false; ++ + destlen = priv->fb_size; + dest = malloc(priv->fb_size); + if (!dest) + return -ENOMEM; + ret = BZ2_bzBuffToBuffCompress(dest, &destlen, +- priv->fb, priv->fb_size, ++ use_copy ? priv->copy_fb : priv->fb, ++ priv->fb_size, + 3, 0, 0); + free(dest); + if (ret) +@@ -167,30 +173,30 @@ static int dm_test_video_text(struct unit_test_state *uts) + ut_assertok(video_get_nologo(uts, &dev)); + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "8x16", 0)); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_putc_xy(con, 0, 0, 'a'); +- ut_asserteq(79, compress_frame_buffer(uts, dev)); ++ ut_asserteq(79, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_putc_xy(con, 0, 0, ' '); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); +- ut_asserteq(273, compress_frame_buffer(uts, dev)); ++ ut_asserteq(273, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_set_row(con, 0, WHITE); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); +- ut_asserteq(273, compress_frame_buffer(uts, dev)); ++ ut_asserteq(273, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -209,30 +215,30 @@ static int dm_test_video_text_12x22(struct unit_test_state *uts) + ut_assertok(video_get_nologo(uts, &dev)); + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "12x22", 0)); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_putc_xy(con, 0, 0, 'a'); +- ut_asserteq(89, compress_frame_buffer(uts, dev)); ++ ut_asserteq(89, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_putc_xy(con, 0, 0, ' '); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); +- ut_asserteq(363, compress_frame_buffer(uts, dev)); ++ ut_asserteq(363, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + vidconsole_set_row(con, 0, WHITE); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + for (i = 0; i < 20; i++) + vidconsole_putc_xy(con, VID_TO_POS(i * 8), 0, ' ' + i); +- ut_asserteq(363, compress_frame_buffer(uts, dev)); ++ ut_asserteq(363, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -250,7 +256,7 @@ static int dm_test_video_chars(struct unit_test_state *uts) + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "8x16", 0)); + vidconsole_put_string(con, test_string); +- ut_asserteq(466, compress_frame_buffer(uts, dev)); ++ ut_asserteq(466, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -272,23 +278,23 @@ static int dm_test_video_ansi(struct unit_test_state *uts) + /* reference clear: */ + video_clear(con->parent); + video_sync(con->parent, false); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* test clear escape sequence: [2J */ + vidconsole_put_string(con, "A\tB\tC"ANSI_ESC"[2J"); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* test set-cursor: [%d;%df */ + vidconsole_put_string(con, "abc"ANSI_ESC"[2;2fab"ANSI_ESC"[4;4fcd"); +- ut_asserteq(143, compress_frame_buffer(uts, dev)); ++ ut_asserteq(143, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* test colors (30-37 fg color, 40-47 bg color) */ + vidconsole_put_string(con, ANSI_ESC"[30;41mfoo"); /* black on red */ + vidconsole_put_string(con, ANSI_ESC"[33;44mbar"); /* yellow on blue */ +- ut_asserteq(272, compress_frame_buffer(uts, dev)); ++ ut_asserteq(272, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -321,13 +327,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, + ut_assertok(video_get_nologo(uts, &dev)); + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + ut_assertok(vidconsole_select_font(con, "8x16", 0)); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* Check display wrap */ + for (i = 0; i < 120; i++) + vidconsole_put_char(con, 'A' + i % 50); +- ut_asserteq(wrap_size, compress_frame_buffer(uts, dev)); ++ ut_asserteq(wrap_size, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* Check display scrolling */ +@@ -335,13 +341,13 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot, + vidconsole_put_char(con, 'A' + i % 50); + vidconsole_put_char(con, '\n'); + } +- ut_asserteq(scroll_size, compress_frame_buffer(uts, dev)); ++ ut_asserteq(scroll_size, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + /* If we scroll enough, the screen becomes blank again */ + for (i = 0; i < SCROLL_LINES; i++) + vidconsole_put_char(con, '\n'); +- ut_asserteq(46, compress_frame_buffer(uts, dev)); ++ ut_asserteq(46, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -416,7 +422,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts) + ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); +- ut_asserteq(1368, compress_frame_buffer(uts, dev)); ++ ut_asserteq(1368, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -436,7 +442,7 @@ static int dm_test_video_bmp8(struct unit_test_state *uts) + ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); +- ut_asserteq(1247, compress_frame_buffer(uts, dev)); ++ ut_asserteq(1247, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -460,7 +466,7 @@ static int dm_test_video_bmp16(struct unit_test_state *uts) + &src_len)); + + ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); +- ut_asserteq(3700, compress_frame_buffer(uts, dev)); ++ ut_asserteq(3700, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -484,7 +490,7 @@ static int dm_test_video_bmp24(struct unit_test_state *uts) + &src_len)); + + ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); +- ut_asserteq(3656, compress_frame_buffer(uts, dev)); ++ ut_asserteq(3656, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -508,7 +514,7 @@ static int dm_test_video_bmp24_32(struct unit_test_state *uts) + &src_len)); + + ut_assertok(video_bmp_display(dev, dst, 0, 0, false)); +- ut_asserteq(6827, compress_frame_buffer(uts, dev)); ++ ut_asserteq(6827, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -527,7 +533,7 @@ static int dm_test_video_bmp32(struct unit_test_state *uts) + ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); +- ut_asserteq(2024, compress_frame_buffer(uts, dev)); ++ ut_asserteq(2024, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -544,7 +550,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts) + ut_assertok(read_file(uts, "tools/logos/denx-comp.bmp", &addr)); + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); +- ut_asserteq(1368, compress_frame_buffer(uts, dev)); ++ ut_asserteq(1368, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -564,7 +570,7 @@ static int dm_test_video_comp_bmp32(struct unit_test_state *uts) + ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); +- ut_asserteq(2024, compress_frame_buffer(uts, dev)); ++ ut_asserteq(2024, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -584,7 +590,7 @@ static int dm_test_video_comp_bmp8(struct unit_test_state *uts) + ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); + + ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); +- ut_asserteq(1247, compress_frame_buffer(uts, dev)); ++ ut_asserteq(1247, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -600,7 +606,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts) + ut_assertok(video_get_nologo(uts, &dev)); + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_put_string(con, test_string); +- ut_asserteq(12174, compress_frame_buffer(uts, dev)); ++ ut_asserteq(12174, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -622,7 +628,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts) + ut_assertok(video_get_nologo(uts, &dev)); + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_put_string(con, test_string); +- ut_asserteq(34287, compress_frame_buffer(uts, dev)); ++ ut_asserteq(34287, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +@@ -644,7 +650,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts) + ut_assertok(video_get_nologo(uts, &dev)); + ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); + vidconsole_put_string(con, test_string); +- ut_asserteq(29471, compress_frame_buffer(uts, dev)); ++ ut_asserteq(29471, compress_frame_buffer(uts, dev, false)); + ut_assertok(check_copy_frame_buffer(uts, dev)); + + return 0; +-- +2.48.1 + +From eb739214f97a59e2d902b965f9990eab9b243658 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 18 Feb 2025 21:42:26 +0000 +Subject: [PATCH 03/13] video: test: Test partial updates of hardware frame + buffer + +With VIDEO_COPY enabled, only the modified parts of the frame buffer are +intended to be copied to the hardware. Add a test that checks this, by +overwriting contents we prepared without telling the video uclass and +then checking if the overwritten contents have been redrawn on the next +sync. + +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +Signed-off-by: Peter Robinson +--- + test/dm/video.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 54 insertions(+) + +diff --git a/test/dm/video.c b/test/dm/video.c +index edb1b4ede8c..d520938d1b2 100644 +--- a/test/dm/video.c ++++ b/test/dm/video.c +@@ -656,3 +656,57 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts) + return 0; + } + DM_TEST(dm_test_video_truetype_bs, UTF_SCAN_PDATA | UTF_SCAN_FDT); ++ ++/* Test partial rendering onto hardware frame buffer */ ++static int dm_test_video_copy(struct unit_test_state *uts) ++{ ++ struct sandbox_sdl_plat *plat; ++ struct video_uc_plat *uc_plat; ++ struct udevice *dev, *con; ++ struct video_priv *priv; ++ const char *test_string = "\n\tCriticism may not be agreeable, but it is necessary.\t"; ++ ulong addr; ++ ++ if (!IS_ENABLED(CONFIG_VIDEO_COPY)) ++ return -EAGAIN; ++ ++ ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev)); ++ ut_assertnonnull(dev); ++ uc_plat = dev_get_uclass_plat(dev); ++ uc_plat->hide_logo = true; ++ plat = dev_get_plat(dev); ++ plat->font_size = 32; ++ ut_assert(!device_active(dev)); ++ ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev)); ++ ut_assertnonnull(dev); ++ priv = dev_get_uclass_priv(dev); ++ ++ ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr)); ++ ut_assertok(video_bmp_display(dev, addr, 0, 0, false)); ++ ++ ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); ++ vidconsole_put_string(con, "\n\n\n\n\n"); ++ vidconsole_put_string(con, test_string); ++ vidconsole_put_string(con, test_string); ++ ++ ut_asserteq(6678, compress_frame_buffer(uts, dev, false)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); ++ ++ /* ++ * Secretly clear the hardware frame buffer, but in a different ++ * color (black) to see which parts will be overwritten. ++ */ ++ memset(priv->copy_fb, 0, priv->fb_size); ++ ++ /* ++ * We should have the full content on the main buffer, but only ++ * the new content should have been copied to the copy buffer. ++ */ ++ vidconsole_put_string(con, test_string); ++ vidconsole_put_string(con, test_string); ++ ut_asserteq(7589, compress_frame_buffer(uts, dev, false)); ++ ut_asserteq(5278, compress_frame_buffer(uts, dev, true)); ++ ++ return 0; ++} ++DM_TEST(dm_test_video_copy, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); +-- +2.48.1 + +From 60e428bb54f2f7ee922f53ec3d3e0976a37bd47d Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 18 Feb 2025 21:51:29 +0000 +Subject: [PATCH 04/13] dm: video: Add damage tracking API + +We are going to introduce image damage tracking to fasten up screen +refresh on large displays. This patch adds damage tracking for up to +one rectangle of the screen which is typically enough to hold blt or +text print updates. Callers into this API and a reduced dcache flush +code path will follow in later patches. + +Signed-off-by: Alexander Graf +Reported-by: Da Xue +[Alper: Use xstart/yend, document new fields, return void from + video_damage(), declare priv, drop headers, use IS_ENABLED()] +Co-developed-by: Alper Nebi Yasak +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +Signed-off-by: Peter Robinson +--- + drivers/video/Kconfig | 13 +++++++++++++ + drivers/video/video-uclass.c | 37 ++++++++++++++++++++++++++++++++++++ + include/video.h | 32 +++++++++++++++++++++++++++++-- + 3 files changed, 80 insertions(+), 2 deletions(-) + +diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig +index 3c3cebaacd0..5d67067891b 100644 +--- a/drivers/video/Kconfig ++++ b/drivers/video/Kconfig +@@ -98,6 +98,19 @@ config VIDEO_COPY + To use this, your video driver must set @copy_base in + struct video_uc_plat. + ++config VIDEO_DAMAGE ++ bool "Enable damage tracking of frame buffer regions" ++ help ++ On some machines (most ARM), the display frame buffer resides in ++ RAM. To make the display controller pick up screen updates, we ++ have to flush frame buffer contents from CPU caches into RAM which ++ can be a slow operation. ++ ++ This feature adds damage tracking to collect information about regions ++ that received updates. When we want to sync, we then only flush ++ regions of the frame buffer that were modified before, speeding up ++ screen refreshes significantly. ++ + config BACKLIGHT_PWM + bool "Generic PWM based Backlight Driver" + depends on BACKLIGHT && DM_PWM +diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c +index ff4f2199585..ad20af760b8 100644 +--- a/drivers/video/video-uclass.c ++++ b/drivers/video/video-uclass.c +@@ -367,6 +367,35 @@ void video_set_default_colors(struct udevice *dev, bool invert) + priv->colour_bg = video_index_to_colour(priv, back); + } + ++/* Notify about changes in the frame buffer */ ++void video_damage(struct udevice *vid, int x, int y, int width, int height) ++{ ++ struct video_priv *priv = dev_get_uclass_priv(vid); ++ int xend = x + width; ++ int yend = y + height; ++ ++ if (!IS_ENABLED(CONFIG_VIDEO_DAMAGE)) ++ return; ++ ++ if (x > priv->xsize) ++ return; ++ ++ if (y > priv->ysize) ++ return; ++ ++ if (xend > priv->xsize) ++ xend = priv->xsize; ++ ++ if (yend > priv->ysize) ++ yend = priv->ysize; ++ ++ /* Span a rectangle across all old and new damage */ ++ priv->damage.xstart = min(x, priv->damage.xstart); ++ priv->damage.ystart = min(y, priv->damage.ystart); ++ priv->damage.xend = max(xend, priv->damage.xend); ++ priv->damage.yend = max(yend, priv->damage.yend); ++} ++ + /* Flush video activity to the caches */ + int video_sync(struct udevice *vid, bool force) + { +@@ -398,8 +427,16 @@ int video_sync(struct udevice *vid, bool force) + #elif defined(CONFIG_VIDEO_SANDBOX_SDL) + sandbox_sdl_sync(priv->fb); + #endif ++ + priv->last_sync = get_timer(0); + ++ if (IS_ENABLED(CONFIG_VIDEO_DAMAGE)) { ++ priv->damage.xstart = priv->xsize; ++ priv->damage.ystart = priv->ysize; ++ priv->damage.xend = 0; ++ priv->damage.yend = 0; ++ } ++ + return 0; + } + +diff --git a/include/video.h b/include/video.h +index a1f7fd7e839..92aa5da4ff3 100644 +--- a/include/video.h ++++ b/include/video.h +@@ -85,6 +85,11 @@ enum video_format { + * @fb_size: Frame buffer size + * @copy_fb: Copy of the frame buffer to keep up to date; see struct + * video_uc_plat ++ * @damage: A bounding box of framebuffer regions updated since last sync ++ * @damage.xstart: X start position in pixels from the left ++ * @damage.ystart: Y start position in pixels from the top ++ * @damage.xend: X end position in pixels from the left ++ * @damage.xend: Y end position in pixels from the top + * @line_length: Length of each frame buffer line, in bytes. This can be + * set by the driver, but if not, the uclass will set it after + * probing +@@ -113,6 +118,12 @@ struct video_priv { + void *fb; + int fb_size; + void *copy_fb; ++ struct { ++ int xstart; ++ int ystart; ++ int xend; ++ int yend; ++ } damage; + int line_length; + u32 colour_fg; + u32 colour_bg; +@@ -259,8 +270,9 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, + * @return: 0 on success, error code otherwise + * + * Some frame buffers are cached or have a secondary frame buffer. This +- * function syncs these up so that the current contents of the U-Boot frame +- * buffer are displayed to the user. ++ * function syncs the damaged parts of them up so that the current contents ++ * of the U-Boot frame buffer are displayed to the user. It clears the damage ++ * buffer. + */ + int video_sync(struct udevice *vid, bool force); + +@@ -380,6 +392,22 @@ static inline int video_sync_copy_all(struct udevice *dev) + + #endif + ++/** ++ * video_damage() - Notify the video subsystem about screen updates. ++ * ++ * @vid: Device to sync ++ * @x: Upper left X coordinate of the damaged rectangle ++ * @y: Upper left Y coordinate of the damaged rectangle ++ * @width: Width of the damaged rectangle ++ * @height: Height of the damaged rectangle ++ * ++ * Some frame buffers are cached or have a secondary frame buffer. This ++ * function notifies the video subsystem about rectangles that were updated ++ * within the frame buffer. They may only get written to the screen on the ++ * next call to video_sync(). ++ */ ++void video_damage(struct udevice *vid, int x, int y, int width, int height); ++ + /** + * video_is_active() - Test if one video device it active + * +-- +2.48.1 + +From 8c180ab43a35b355a4f1612d813ec2e655bc7b37 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 21 Aug 2023 16:51:02 +0300 +Subject: [PATCH 05/13] dm: video: Add damage notification on display fills + +Let's report the video damage when we fill parts of the screen. This +way we can later lazily flush only relevant regions to hardware. + +Signed-off-by: Alexander Graf +Reported-by: Da Xue +[Alper: Call video_damage() in video_fill_part(), edit commit message] +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + drivers/video/video-uclass.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c +index ad20af760b8..43b714085a7 100644 +--- a/drivers/video/video-uclass.c ++++ b/drivers/video/video-uclass.c +@@ -214,6 +214,8 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, + if (ret) + return ret; + ++ video_damage(dev, xstart, ystart, xend - xstart, yend - ystart); ++ + return 0; + } + +@@ -262,6 +264,8 @@ int video_fill(struct udevice *dev, u32 colour) + if (ret) + return ret; + ++ video_damage(dev, 0, 0, priv->xsize, priv->ysize); ++ + return video_sync(dev, false); + } + +-- +2.48.1 + +From 8047ae54ddde0b5ac6aa7503710e7c3d9c56bc67 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 21 Aug 2023 16:51:03 +0300 +Subject: [PATCH 06/13] vidconsole: Add damage notifications to all vidconsole + drivers + +Now that we have a damage tracking API, let's populate damage done by +vidconsole drivers. We try to declare as little memory as damaged as +possible. + +Signed-off-by: Alexander Graf +Reported-by: Da Xue +[Alper: Rebase for met->baseline, fontdata->height/width, make rotated + console_putc_xy() damages pass tests, edit patch message] +Co-developed-by: Alper Nebi Yasak +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + drivers/video/console_normal.c | 18 +++++++++++ + drivers/video/console_rotate.c | 54 ++++++++++++++++++++++++++++++++ + drivers/video/console_truetype.c | 21 +++++++++++++ + drivers/video/video-uclass.c | 1 + + 4 files changed, 94 insertions(+) + +diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c +index 6f4194a1814..51ac8cc78e9 100644 +--- a/drivers/video/console_normal.c ++++ b/drivers/video/console_normal.c +@@ -39,6 +39,12 @@ static int console_set_row(struct udevice *dev, uint row, int clr) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ 0, ++ fontdata->height * row, ++ vid_priv->xsize, ++ fontdata->height); ++ + return 0; + } + +@@ -60,6 +66,12 @@ static int console_move_rows(struct udevice *dev, uint rowdst, + if (ret) + return ret; + ++ video_damage(dev->parent, ++ 0, ++ fontdata->height * rowdst, ++ vid_priv->xsize, ++ fontdata->height * count); ++ + return 0; + } + +@@ -91,6 +103,12 @@ static int console_putc_xy(struct udevice *dev, uint x_frac, uint y, int cp) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ x, ++ y, ++ fontdata->width, ++ fontdata->height); ++ + ret = vidconsole_sync_copy(dev, start, line); + if (ret) + return ret; +diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c +index a3f8c6352f8..f11dc3a0b07 100644 +--- a/drivers/video/console_rotate.c ++++ b/drivers/video/console_rotate.c +@@ -36,6 +36,12 @@ static int console_set_row_1(struct udevice *dev, uint row, int clr) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ vid_priv->xsize - ((row + 1) * fontdata->height), ++ 0, ++ fontdata->height, ++ vid_priv->ysize); ++ + return 0; + } + +@@ -64,6 +70,12 @@ static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc, + dst += vid_priv->line_length; + } + ++ video_damage(dev->parent, ++ vid_priv->xsize - ((rowdst + count) * fontdata->height), ++ 0, ++ count * fontdata->height, ++ vid_priv->ysize); ++ + return 0; + } + +@@ -97,6 +109,12 @@ static int console_putc_xy_1(struct udevice *dev, uint x_frac, uint y, int cp) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ vid_priv->xsize - y - fontdata->height, ++ linenum - 1, ++ fontdata->height, ++ fontdata->width); ++ + return VID_TO_POS(fontdata->width); + } + +@@ -121,6 +139,12 @@ static int console_set_row_2(struct udevice *dev, uint row, int clr) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ 0, ++ vid_priv->ysize - (row + 1) * fontdata->height, ++ vid_priv->xsize, ++ fontdata->height); ++ + return 0; + } + +@@ -142,6 +166,12 @@ static int console_move_rows_2(struct udevice *dev, uint rowdst, uint rowsrc, + vidconsole_memmove(dev, dst, src, + fontdata->height * vid_priv->line_length * count); + ++ video_damage(dev->parent, ++ 0, ++ vid_priv->ysize - (rowdst + count) * fontdata->height, ++ vid_priv->xsize, ++ count * fontdata->height); ++ + return 0; + } + +@@ -175,6 +205,12 @@ static int console_putc_xy_2(struct udevice *dev, uint x_frac, uint y, int cp) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ x - fontdata->width + 1, ++ linenum - fontdata->height + 1, ++ fontdata->width, ++ fontdata->height); ++ + return VID_TO_POS(fontdata->width); + } + +@@ -199,6 +235,12 @@ static int console_set_row_3(struct udevice *dev, uint row, int clr) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ row * fontdata->height, ++ 0, ++ fontdata->height, ++ vid_priv->ysize); ++ + return 0; + } + +@@ -225,6 +267,12 @@ static int console_move_rows_3(struct udevice *dev, uint rowdst, uint rowsrc, + dst += vid_priv->line_length; + } + ++ video_damage(dev->parent, ++ rowdst * fontdata->height, ++ 0, ++ count * fontdata->height, ++ vid_priv->ysize); ++ + return 0; + } + +@@ -257,6 +305,12 @@ static int console_putc_xy_3(struct udevice *dev, uint x_frac, uint y, int cp) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ y, ++ linenum - fontdata->width + 1, ++ fontdata->height, ++ fontdata->width); ++ + return VID_TO_POS(fontdata->width); + } + +diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c +index 17a29817664..073ddcfb695 100644 +--- a/drivers/video/console_truetype.c ++++ b/drivers/video/console_truetype.c +@@ -190,6 +190,7 @@ struct console_tt_store { + static int console_truetype_set_row(struct udevice *dev, uint row, int clr) + { + struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent); ++ struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev); + struct console_tt_priv *priv = dev_get_priv(dev); + struct console_tt_metrics *met = priv->cur_met; + void *end, *line; +@@ -233,6 +234,12 @@ static int console_truetype_set_row(struct udevice *dev, uint row, int clr) + if (ret) + return ret; + ++ video_damage(dev->parent, ++ 0, ++ vc_priv->y_charsize * row, ++ vid_priv->xsize, ++ vc_priv->y_charsize); ++ + return 0; + } + +@@ -240,6 +247,7 @@ static int console_truetype_move_rows(struct udevice *dev, uint rowdst, + uint rowsrc, uint count) + { + struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent); ++ struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev); + struct console_tt_priv *priv = dev_get_priv(dev); + struct console_tt_metrics *met = priv->cur_met; + void *dst; +@@ -258,6 +266,12 @@ static int console_truetype_move_rows(struct udevice *dev, uint rowdst, + for (i = 0; i < priv->pos_ptr; i++) + priv->pos[i].ypos -= diff; + ++ video_damage(dev->parent, ++ 0, ++ vc_priv->y_charsize * rowdst, ++ vid_priv->xsize, ++ vc_priv->y_charsize * count); ++ + return 0; + } + +@@ -418,6 +432,13 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, + + line += vid_priv->line_length; + } ++ ++ video_damage(dev->parent, ++ VID_TO_PIXEL(x) + xoff, ++ y + met->baseline + yoff, ++ width, ++ height); ++ + ret = vidconsole_sync_copy(dev, start, line); + if (ret) + return ret; +diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c +index 43b714085a7..d175ed61ac8 100644 +--- a/drivers/video/video-uclass.c ++++ b/drivers/video/video-uclass.c +@@ -210,6 +210,7 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, + } + line += priv->line_length; + } ++ + ret = video_sync_copy(dev, start, line); + if (ret) + return ret; +-- +2.48.1 + +From f701195fca932fda3b08ddfe6317fb2ca01f0fcf Mon Sep 17 00:00:00 2001 +From: Alper Nebi Yasak +Date: Mon, 21 Aug 2023 16:51:04 +0300 +Subject: [PATCH 07/13] video: test: Test video damage tracking via vidconsole + +With VIDEO_DAMAGE, the video uclass tracks updated regions of the frame +buffer in order to avoid unnecessary work during a video sync. Enable +the config in sandbox and add a test for it, by printing strings at a +few locations and checking the tracked region. + +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + configs/sandbox_defconfig | 1 + + test/dm/video.c | 56 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 57 insertions(+) + +diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig +index 7b35ad8a88f..d9e5ac6af48 100644 +--- a/configs/sandbox_defconfig ++++ b/configs/sandbox_defconfig +@@ -328,6 +328,7 @@ CONFIG_USB_ETH_CDC=y + CONFIG_VIDEO=y + CONFIG_VIDEO_FONT_SUN12X22=y + CONFIG_VIDEO_COPY=y ++CONFIG_VIDEO_DAMAGE=y + CONFIG_CONSOLE_ROTATION=y + CONFIG_CONSOLE_TRUETYPE=y + CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y +diff --git a/test/dm/video.c b/test/dm/video.c +index d520938d1b2..9da00be5479 100644 +--- a/test/dm/video.c ++++ b/test/dm/video.c +@@ -710,3 +710,59 @@ static int dm_test_video_copy(struct unit_test_state *uts) + return 0; + } + DM_TEST(dm_test_video_copy, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); ++ ++/* Test video damage tracking */ ++static int dm_test_video_damage(struct unit_test_state *uts) ++{ ++ struct sandbox_sdl_plat *plat; ++ struct udevice *dev, *con; ++ struct video_priv *priv; ++ const char *test_string_1 = "Criticism may not be agreeable, "; ++ const char *test_string_2 = "but it is necessary."; ++ const char *test_string_3 = "It fulfils the same function as pain in the human body."; ++ ++ if (!IS_ENABLED(CONFIG_VIDEO_DAMAGE)) ++ return -EAGAIN; ++ ++ ut_assertok(uclass_find_device(UCLASS_VIDEO, 0, &dev)); ++ ut_assert(!device_active(dev)); ++ plat = dev_get_plat(dev); ++ plat->font_size = 32; ++ ++ ut_assertok(video_get_nologo(uts, &dev)); ++ ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con)); ++ priv = dev_get_uclass_priv(dev); ++ ++ vidconsole_position_cursor(con, 14, 10); ++ vidconsole_put_string(con, test_string_2); ++ ut_asserteq(449, priv->damage.xstart); ++ ut_asserteq(325, priv->damage.ystart); ++ ut_asserteq(661, priv->damage.xend); ++ ut_asserteq(350, priv->damage.yend); ++ ++ vidconsole_position_cursor(con, 7, 5); ++ vidconsole_put_string(con, test_string_1); ++ ut_asserteq(225, priv->damage.xstart); ++ ut_asserteq(164, priv->damage.ystart); ++ ut_asserteq(661, priv->damage.xend); ++ ut_asserteq(350, priv->damage.yend); ++ ++ vidconsole_position_cursor(con, 21, 15); ++ vidconsole_put_string(con, test_string_3); ++ ut_asserteq(225, priv->damage.xstart); ++ ut_asserteq(164, priv->damage.ystart); ++ ut_asserteq(1280, priv->damage.xend); ++ ut_asserteq(510, priv->damage.yend); ++ ++ video_sync(dev, false); ++ ut_asserteq(priv->xsize, priv->damage.xstart); ++ ut_asserteq(priv->ysize, priv->damage.ystart); ++ ut_asserteq(0, priv->damage.xend); ++ ut_asserteq(0, priv->damage.yend); ++ ++ ut_asserteq(7339, compress_frame_buffer(uts, dev, false)); ++ ut_assertok(check_copy_frame_buffer(uts, dev)); ++ ++ return 0; ++} ++DM_TEST(dm_test_video_damage, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); +-- +2.48.1 + +From 88bc7e2c640a504bbd7de27b28a3ad2b05d43163 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 21 Aug 2023 16:51:05 +0300 +Subject: [PATCH 08/13] video: Add damage notification on bmp display + +Let's report the video damage when we draw a bitmap on the screen. This +way we can later lazily flush only relevant regions to hardware. + +Signed-off-by: Alexander Graf +Reported-by: Da Xue +Reviewed-by: Simon Glass +Signed-off-by: Alper Nebi Yasak +--- + drivers/video/video_bmp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c +index ad512d99a1b..78de9560792 100644 +--- a/drivers/video/video_bmp.c ++++ b/drivers/video/video_bmp.c +@@ -459,6 +459,8 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, + break; + }; + ++ video_damage(dev, x, y, width, height); ++ + /* Find the position of the top left of the image in the framebuffer */ + fb = (uchar *)(priv->fb + y * priv->line_length + x * bpix / 8); + ret = video_sync_copy(dev, start, fb); +-- +2.48.1 + +From a3680479d62d38637fc26750756a8cddac380aaf Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 21 Aug 2023 16:51:06 +0300 +Subject: [PATCH 09/13] efi_loader: GOP: Add damage notification on BLT + +Now that we have a damage tracking API, let's populate damage done by +UEFI payloads when they BLT data onto the screen. + +Signed-off-by: Alexander Graf +Reported-by: Da Xue +Reviewed-by: Heinrich Schuchardt +[Alper: Add struct comment for new member] +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + lib/efi_loader/efi_gop.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c +index 4593975be5a..3abb47d610e 100644 +--- a/lib/efi_loader/efi_gop.c ++++ b/lib/efi_loader/efi_gop.c +@@ -26,6 +26,7 @@ static const efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; + * @ops: graphical output protocol interface + * @info: graphical output mode information + * @mode: graphical output mode ++ * @vdev: backing video device + * @bpix: bits per pixel + * @fb: frame buffer + */ +@@ -34,6 +35,7 @@ struct efi_gop_obj { + struct efi_gop ops; + struct efi_gop_mode_info info; + struct efi_gop_mode mode; ++ struct udevice *vdev; + /* Fields we only have access to during init */ + u32 bpix; + void *fb; +@@ -122,6 +124,7 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, + u32 *fb32 = gopobj->fb; + u16 *fb16 = gopobj->fb; + struct efi_gop_pixel *buffer = __builtin_assume_aligned(bufferp, 4); ++ bool blt_to_video = (operation != EFI_BLT_VIDEO_TO_BLT_BUFFER); + + if (delta) { + /* Check for 4 byte alignment */ +@@ -245,6 +248,9 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, + dlineoff += dwidth; + } + ++ if (blt_to_video) ++ video_damage(gopobj->vdev, dx, dy, width, height); ++ + return EFI_SUCCESS; + } + +@@ -551,6 +557,7 @@ efi_status_t efi_gop_register(void) + gopobj->info.pixels_per_scanline = col; + gopobj->bpix = bpix; + gopobj->fb = map_sysmem(fb_base, fb_size); ++ gopobj->vdev = vdev; + + return EFI_SUCCESS; + } +-- +2.48.1 + +From cbbd24764c84943078d07728e3c0f4b55268b0dc Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 18 Feb 2025 21:53:28 +0000 +Subject: [PATCH 10/13] video: Only dcache flush damaged lines + +Now that we have a damage area tells us which parts of the frame buffer +actually need updating, let's only dcache flush those on video_sync() +calls. With this optimization in place, frame buffer updates - especially +on large screen such as 4k displays - speed up significantly. + +Signed-off-by: Alexander Graf +Reported-by: Da Xue +[Alper: Use damage.xstart/yend, IS_ENABLED()] +Co-developed-by: Alper Nebi Yasak +Signed-off-by: Alper Nebi Yasak +Signed-off-by: Peter Robinson +--- + drivers/video/video-uclass.c | 41 +++++++++++++++++++++++++++++++----- + 1 file changed, 36 insertions(+), 5 deletions(-) + +diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c +index d175ed61ac8..6452ff5039e 100644 +--- a/drivers/video/video-uclass.c ++++ b/drivers/video/video-uclass.c +@@ -401,6 +401,41 @@ void video_damage(struct udevice *vid, int x, int y, int width, int height) + priv->damage.yend = max(yend, priv->damage.yend); + } + ++#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) ++static void video_flush_dcache(struct udevice *vid) ++{ ++ struct video_priv *priv = dev_get_uclass_priv(vid); ++ ++ if (!priv->flush_dcache) ++ return; ++ ++ if (!IS_ENABLED(CONFIG_VIDEO_DAMAGE)) { ++ flush_dcache_range((ulong)priv->fb, ++ ALIGN((ulong)priv->fb + priv->fb_size, ++ CONFIG_SYS_CACHELINE_SIZE)); ++ ++ return; ++ } ++ ++ if (priv->damage.xend && priv->damage.yend) { ++ int lstart = priv->damage.xstart * VNBYTES(priv->bpix); ++ int lend = priv->damage.xend * VNBYTES(priv->bpix); ++ int y; ++ ++ for (y = priv->damage.ystart; y < priv->damage.yend; y++) { ++ ulong fb = (ulong)priv->fb; ++ ulong start = fb + (y * priv->line_length) + lstart; ++ ulong end = start + lend - lstart; ++ ++ start = ALIGN_DOWN(start, CONFIG_SYS_CACHELINE_SIZE); ++ end = ALIGN(end, CONFIG_SYS_CACHELINE_SIZE); ++ ++ flush_dcache_range(start, end); ++ } ++ } ++} ++#endif ++ + /* Flush video activity to the caches */ + int video_sync(struct udevice *vid, bool force) + { +@@ -424,11 +459,7 @@ int video_sync(struct udevice *vid, bool force) + * out whether it exists? For now, ARM is safe. + */ + #if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +- if (priv->flush_dcache) { +- flush_dcache_range((ulong)priv->fb, +- ALIGN((ulong)priv->fb + priv->fb_size, +- CONFIG_SYS_CACHELINE_SIZE)); +- } ++ video_flush_dcache(vid); + #elif defined(CONFIG_VIDEO_SANDBOX_SDL) + sandbox_sdl_sync(priv->fb); + #endif +-- +2.48.1 + +From d0c47756db0fbd0c50d4cbc377a35af7133493f3 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sat, 25 May 2024 12:18:41 +0100 +Subject: [PATCH 11/13] video: Use VIDEO_DAMAGE for VIDEO_COPY + +CONFIG_VIDEO_COPY implemented a range-based copying mechanism: If we +print a single character, it will always copy the full range of bytes +from the top left corner of the character to the lower right onto the +uncached frame buffer. This includes pretty much the full line contents +of the printed character. + +Since we now have proper damage tracking, let's make use of that to reduce +the amount of data we need to copy. With this patch applied, we will only +copy the tiny rectangle surrounding characters when we print them, +speeding up the video console. + +After this, changes to the main frame buffer are not immediately copied +to the copy frame buffer, but postponed until the next video device +sync. So issue an explicit sync before inspecting the copy frame buffer +contents for the video tests. + +Signed-off-by: Alexander Graf +[Alper: Rebase for fontdata->height/w, fill_part(), fix memmove(dev), + drop from defconfig, use damage.xstart/yend, use IS_ENABLED(), + call video_sync() before copy_fb check, update video_copy test] +Co-developed-by: Alper Nebi Yasak +Signed-off-by: Alper Nebi Yasak +Signed-off-by: Peter Robinson +--- + configs/sandbox_defconfig | 1 - + drivers/video/Kconfig | 5 ++ + drivers/video/console_normal.c | 13 +---- + drivers/video/console_rotate.c | 44 +++----------- + drivers/video/console_truetype.c | 16 +---- + drivers/video/vidconsole-uclass.c | 16 ----- + drivers/video/video-uclass.c | 97 ++++++++----------------------- + drivers/video/video_bmp.c | 7 --- + include/video.h | 37 ------------ + include/video_console.h | 52 ----------------- + test/dm/video.c | 3 +- + 11 files changed, 43 insertions(+), 248 deletions(-) + +diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig +index d9e5ac6af48..7b35ad8a88f 100644 +--- a/configs/sandbox_defconfig ++++ b/configs/sandbox_defconfig +@@ -328,7 +328,6 @@ CONFIG_USB_ETH_CDC=y + CONFIG_VIDEO=y + CONFIG_VIDEO_FONT_SUN12X22=y + CONFIG_VIDEO_COPY=y +-CONFIG_VIDEO_DAMAGE=y + CONFIG_CONSOLE_ROTATION=y + CONFIG_CONSOLE_TRUETYPE=y + CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y +diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig +index 5d67067891b..964174b01ac 100644 +--- a/drivers/video/Kconfig ++++ b/drivers/video/Kconfig +@@ -89,11 +89,14 @@ config VIDEO_PCI_DEFAULT_FB_SIZE + + config VIDEO_COPY + bool "Enable copying the frame buffer to a hardware copy" ++ select VIDEO_DAMAGE + help + On some machines (e.g. x86), reading from the frame buffer is very + slow because it is uncached. To improve performance, this feature + allows the frame buffer to be kept in cached memory (allocated by + U-Boot) and then copied to the hardware frame-buffer as needed. ++ It uses the VIDEO_DAMAGE feature to keep track of regions to copy ++ and will only copy actually touched regions. + + To use this, your video driver must set @copy_base in + struct video_uc_plat. +@@ -111,6 +114,8 @@ config VIDEO_DAMAGE + regions of the frame buffer that were modified before, speeding up + screen refreshes significantly. + ++ It is also used by VIDEO_COPY to identify which regions changed. ++ + config BACKLIGHT_PWM + bool "Generic PWM based Backlight Driver" + depends on BACKLIGHT && DM_PWM +diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c +index 51ac8cc78e9..07db613ac53 100644 +--- a/drivers/video/console_normal.c ++++ b/drivers/video/console_normal.c +@@ -35,10 +35,6 @@ static int console_set_row(struct udevice *dev, uint row, int clr) + fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); + end = dst; + +- ret = vidconsole_sync_copy(dev, line, end); +- if (ret) +- return ret; +- + video_damage(dev->parent, + 0, + fontdata->height * row, +@@ -57,14 +53,11 @@ static int console_move_rows(struct udevice *dev, uint rowdst, + void *dst; + void *src; + int size; +- int ret; + + dst = vid_priv->fb + rowdst * fontdata->height * vid_priv->line_length; + src = vid_priv->fb + rowsrc * fontdata->height * vid_priv->line_length; + size = fontdata->height * vid_priv->line_length * count; +- ret = vidconsole_memmove(dev, dst, src, size); +- if (ret) +- return ret; ++ memmove(dst, src, size); + + video_damage(dev->parent, + 0, +@@ -109,10 +102,6 @@ static int console_putc_xy(struct udevice *dev, uint x_frac, uint y, int cp) + fontdata->width, + fontdata->height); + +- ret = vidconsole_sync_copy(dev, start, line); +- if (ret) +- return ret; +- + return VID_TO_POS(fontdata->width); + } + +diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c +index f11dc3a0b07..886b25dcfaf 100644 +--- a/drivers/video/console_rotate.c ++++ b/drivers/video/console_rotate.c +@@ -21,7 +21,6 @@ static int console_set_row_1(struct udevice *dev, uint row, int clr) + int pbytes = VNBYTES(vid_priv->bpix); + void *start, *dst, *line; + int i, j; +- int ret; + + start = vid_priv->fb + vid_priv->line_length - + (row + 1) * fontdata->height * pbytes; +@@ -32,9 +31,6 @@ static int console_set_row_1(struct udevice *dev, uint row, int clr) + fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); + line += vid_priv->line_length; + } +- ret = vidconsole_sync_copy(dev, start, line); +- if (ret) +- return ret; + + video_damage(dev->parent, + vid_priv->xsize - ((row + 1) * fontdata->height), +@@ -54,7 +50,7 @@ static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc, + int pbytes = VNBYTES(vid_priv->bpix); + void *dst; + void *src; +- int j, ret; ++ int j; + + dst = vid_priv->fb + vid_priv->line_length - + (rowdst + count) * fontdata->height * pbytes; +@@ -62,10 +58,7 @@ static int console_move_rows_1(struct udevice *dev, uint rowdst, uint rowsrc, + (rowsrc + count) * fontdata->height * pbytes; + + for (j = 0; j < vid_priv->ysize; j++) { +- ret = vidconsole_memmove(dev, dst, src, +- fontdata->height * pbytes * count); +- if (ret) +- return ret; ++ memmove(dst, src, fontdata->height * pbytes * count); + src += vid_priv->line_length; + dst += vid_priv->line_length; + } +@@ -105,10 +98,6 @@ static int console_putc_xy_1(struct udevice *dev, uint x_frac, uint y, int cp) + return ret; + + /* We draw backwards from 'start, so account for the first line */ +- ret = vidconsole_sync_copy(dev, start - vid_priv->line_length, line); +- if (ret) +- return ret; +- + video_damage(dev->parent, + vid_priv->xsize - y - fontdata->height, + linenum - 1, +@@ -125,7 +114,7 @@ static int console_set_row_2(struct udevice *dev, uint row, int clr) + struct video_fontdata *fontdata = priv->fontdata; + void *start, *line, *dst, *end; + int pixels = fontdata->height * vid_priv->xsize; +- int i, ret; ++ int i; + int pbytes = VNBYTES(vid_priv->bpix); + + start = vid_priv->fb + vid_priv->ysize * vid_priv->line_length - +@@ -135,9 +124,6 @@ static int console_set_row_2(struct udevice *dev, uint row, int clr) + for (i = 0; i < pixels; i++) + fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); + end = dst; +- ret = vidconsole_sync_copy(dev, start, end); +- if (ret) +- return ret; + + video_damage(dev->parent, + 0, +@@ -163,8 +149,7 @@ static int console_move_rows_2(struct udevice *dev, uint rowdst, uint rowsrc, + vid_priv->line_length; + src = end - (rowsrc + count) * fontdata->height * + vid_priv->line_length; +- vidconsole_memmove(dev, dst, src, +- fontdata->height * vid_priv->line_length * count); ++ memmove(dst, src, fontdata->height * vid_priv->line_length * count); + + video_damage(dev->parent, + 0, +@@ -200,11 +185,6 @@ static int console_putc_xy_2(struct udevice *dev, uint x_frac, uint y, int cp) + if (ret) + return ret; + +- /* Add 4 bytes to allow for the first pixel writen */ +- ret = vidconsole_sync_copy(dev, start + 4, line); +- if (ret) +- return ret; +- + video_damage(dev->parent, + x - fontdata->width + 1, + linenum - fontdata->height + 1, +@@ -221,7 +201,7 @@ static int console_set_row_3(struct udevice *dev, uint row, int clr) + struct video_fontdata *fontdata = priv->fontdata; + int pbytes = VNBYTES(vid_priv->bpix); + void *start, *dst, *line; +- int i, j, ret; ++ int i, j; + + start = vid_priv->fb + row * fontdata->height * pbytes; + line = start; +@@ -231,9 +211,6 @@ static int console_set_row_3(struct udevice *dev, uint row, int clr) + fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); + line += vid_priv->line_length; + } +- ret = vidconsole_sync_copy(dev, start, line); +- if (ret) +- return ret; + + video_damage(dev->parent, + row * fontdata->height, +@@ -253,16 +230,13 @@ static int console_move_rows_3(struct udevice *dev, uint rowdst, uint rowsrc, + int pbytes = VNBYTES(vid_priv->bpix); + void *dst; + void *src; +- int j, ret; ++ int j; + + dst = vid_priv->fb + rowdst * fontdata->height * pbytes; + src = vid_priv->fb + rowsrc * fontdata->height * pbytes; + + for (j = 0; j < vid_priv->ysize; j++) { +- ret = vidconsole_memmove(dev, dst, src, +- fontdata->height * pbytes * count); +- if (ret) +- return ret; ++ memmove(dst, src, fontdata->height * pbytes * count); + src += vid_priv->line_length; + dst += vid_priv->line_length; + } +@@ -298,10 +272,6 @@ static int console_putc_xy_3(struct udevice *dev, uint x_frac, uint y, int cp) + line = start; + + ret = fill_char_horizontally(pfont, &line, vid_priv, fontdata, NORMAL_DIRECTION); +- if (ret) +- return ret; +- /* Add a line to allow for the first pixels writen */ +- ret = vidconsole_sync_copy(dev, start + vid_priv->line_length, line); + if (ret) + return ret; + +diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c +index 073ddcfb695..0dfd7914dc1 100644 +--- a/drivers/video/console_truetype.c ++++ b/drivers/video/console_truetype.c +@@ -194,7 +194,6 @@ static int console_truetype_set_row(struct udevice *dev, uint row, int clr) + struct console_tt_priv *priv = dev_get_priv(dev); + struct console_tt_metrics *met = priv->cur_met; + void *end, *line; +- int ret; + + line = vid_priv->fb + row * met->font_size * vid_priv->line_length; + end = line + met->font_size * vid_priv->line_length; +@@ -230,9 +229,6 @@ static int console_truetype_set_row(struct udevice *dev, uint row, int clr) + default: + return -ENOSYS; + } +- ret = vidconsole_sync_copy(dev, line, end); +- if (ret) +- return ret; + + video_damage(dev->parent, + 0, +@@ -252,14 +248,11 @@ static int console_truetype_move_rows(struct udevice *dev, uint rowdst, + struct console_tt_metrics *met = priv->cur_met; + void *dst; + void *src; +- int i, diff, ret; ++ int i, diff; + + dst = vid_priv->fb + rowdst * met->font_size * vid_priv->line_length; + src = vid_priv->fb + rowsrc * met->font_size * vid_priv->line_length; +- ret = vidconsole_memmove(dev, dst, src, met->font_size * +- vid_priv->line_length * count); +- if (ret) +- return ret; ++ memmove(dst, src, met->font_size * vid_priv->line_length * count); + + /* Scroll up our position history */ + diff = (rowsrc - rowdst) * met->font_size; +@@ -292,7 +285,7 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, + u8 *bits, *data; + int advance; + void *start, *end, *line; +- int row, ret; ++ int row; + + /* First get some basic metrics about this character */ + stbtt_GetCodepointHMetrics(font, cp, &advance, &lsb); +@@ -439,9 +432,6 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, + width, + height); + +- ret = vidconsole_sync_copy(dev, start, line); +- if (ret) +- return ret; + free(data); + + return width_frac; +diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c +index ebe96bf0c2f..a1dfd35b7b8 100644 +--- a/drivers/video/vidconsole-uclass.c ++++ b/drivers/video/vidconsole-uclass.c +@@ -761,22 +761,6 @@ UCLASS_DRIVER(vidconsole) = { + .per_device_auto = sizeof(struct vidconsole_priv), + }; + +-#ifdef CONFIG_VIDEO_COPY +-int vidconsole_sync_copy(struct udevice *dev, void *from, void *to) +-{ +- struct udevice *vid = dev_get_parent(dev); +- +- return video_sync_copy(vid, from, to); +-} +- +-int vidconsole_memmove(struct udevice *dev, void *dst, const void *src, +- int size) +-{ +- memmove(dst, src, size); +- return vidconsole_sync_copy(dev, dst, dst + size); +-} +-#endif +- + int vidconsole_clear_and_reset(struct udevice *dev) + { + int ret; +diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c +index 6452ff5039e..a828e67341b 100644 +--- a/drivers/video/video-uclass.c ++++ b/drivers/video/video-uclass.c +@@ -171,7 +171,7 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, + struct video_priv *priv = dev_get_uclass_priv(dev); + void *start, *line; + int pixels = xend - xstart; +- int row, i, ret; ++ int row, i; + + start = priv->fb + ystart * priv->line_length; + start += xstart * VNBYTES(priv->bpix); +@@ -211,10 +211,6 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, + line += priv->line_length; + } + +- ret = video_sync_copy(dev, start, line); +- if (ret) +- return ret; +- + video_damage(dev, xstart, ystart, xend - xstart, yend - ystart); + + return 0; +@@ -236,7 +232,6 @@ int video_reserve_from_bloblist(struct video_handoff *ho) + int video_fill(struct udevice *dev, u32 colour) + { + struct video_priv *priv = dev_get_uclass_priv(dev); +- int ret; + + switch (priv->bpix) { + case VIDEO_BPP16: +@@ -261,9 +256,6 @@ int video_fill(struct udevice *dev, u32 colour) + memset(priv->fb, colour, priv->fb_size); + break; + } +- ret = video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size); +- if (ret) +- return ret; + + video_damage(dev, 0, 0, priv->xsize, priv->ysize); + +@@ -436,6 +428,27 @@ static void video_flush_dcache(struct udevice *vid) + } + #endif + ++static void video_flush_copy(struct udevice *vid) ++{ ++ struct video_priv *priv = dev_get_uclass_priv(vid); ++ ++ if (!priv->copy_fb) ++ return; ++ ++ if (priv->damage.xend && priv->damage.yend) { ++ int lstart = priv->damage.xstart * VNBYTES(priv->bpix); ++ int lend = priv->damage.xend * VNBYTES(priv->bpix); ++ int y; ++ ++ for (y = priv->damage.ystart; y < priv->damage.yend; y++) { ++ ulong offset = (y * priv->line_length) + lstart; ++ ulong len = lend - lstart; ++ ++ memcpy(priv->copy_fb + offset, priv->fb + offset, len); ++ } ++ } ++} ++ + /* Flush video activity to the caches */ + int video_sync(struct udevice *vid, bool force) + { +@@ -443,6 +456,9 @@ int video_sync(struct udevice *vid, bool force) + struct video_ops *ops = video_get_ops(vid); + int ret; + ++ if (IS_ENABLED(CONFIG_VIDEO_COPY)) ++ video_flush_copy(vid); ++ + if (ops && ops->video_sync) { + ret = ops->video_sync(vid); + if (ret) +@@ -524,69 +540,6 @@ int video_get_ysize(struct udevice *dev) + return priv->ysize; + } + +-#ifdef CONFIG_VIDEO_COPY +-int video_sync_copy(struct udevice *dev, void *from, void *to) +-{ +- struct video_priv *priv = dev_get_uclass_priv(dev); +- +- if (priv->copy_fb) { +- long offset, size; +- +- /* Find the offset of the first byte to copy */ +- if ((ulong)to > (ulong)from) { +- size = to - from; +- offset = from - priv->fb; +- } else { +- size = from - to; +- offset = to - priv->fb; +- } +- +- /* +- * Allow a bit of leeway for valid requests somewhere near the +- * frame buffer +- */ +- if (offset < -priv->fb_size || offset > 2 * priv->fb_size) { +-#ifdef DEBUG +- char str[120]; +- +- snprintf(str, sizeof(str), +- "[** FAULT sync_copy fb=%p, from=%p, to=%p, offset=%lx]", +- priv->fb, from, to, offset); +- console_puts_select_stderr(true, str); +-#endif +- return -EFAULT; +- } +- +- /* +- * Silently crop the memcpy. This allows callers to avoid doing +- * this themselves. It is common for the end pointer to go a +- * few lines after the end of the frame buffer, since most of +- * the update algorithms terminate a line after their last write +- */ +- if (offset + size > priv->fb_size) { +- size = priv->fb_size - offset; +- } else if (offset < 0) { +- size += offset; +- offset = 0; +- } +- +- memcpy(priv->copy_fb + offset, priv->fb + offset, size); +- } +- +- return 0; +-} +- +-int video_sync_copy_all(struct udevice *dev) +-{ +- struct video_priv *priv = dev_get_uclass_priv(dev); +- +- video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size); +- +- return 0; +-} +- +-#endif +- + #define SPLASH_DECL(_name) \ + extern u8 __splash_ ## _name ## _begin[]; \ + extern u8 __splash_ ## _name ## _end[] +diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c +index 78de9560792..1f267d45812 100644 +--- a/drivers/video/video_bmp.c ++++ b/drivers/video/video_bmp.c +@@ -267,7 +267,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, + enum video_format eformat; + struct bmp_color_table_entry *palette; + int hdr_size; +- int ret; + + if (!bmp || !(bmp->header.signature[0] == 'B' && + bmp->header.signature[1] == 'M')) { +@@ -461,11 +460,5 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, + + video_damage(dev, x, y, width, height); + +- /* Find the position of the top left of the image in the framebuffer */ +- fb = (uchar *)(priv->fb + y * priv->line_length + x * bpix / 8); +- ret = video_sync_copy(dev, start, fb); +- if (ret) +- return log_ret(ret); +- + return video_sync(dev, false); + } +diff --git a/include/video.h b/include/video.h +index 92aa5da4ff3..26327473738 100644 +--- a/include/video.h ++++ b/include/video.h +@@ -355,43 +355,6 @@ void video_set_default_colors(struct udevice *dev, bool invert); + */ + int video_default_font_height(struct udevice *dev); + +-#ifdef CONFIG_VIDEO_COPY +-/** +- * vidconsole_sync_copy() - Sync back to the copy framebuffer +- * +- * This ensures that the copy framebuffer has the same data as the framebuffer +- * for a particular region. It should be called after the framebuffer is updated +- * +- * @from and @to can be in either order. The region between them is synced. +- * +- * @dev: Vidconsole device being updated +- * @from: Start/end address within the framebuffer (->fb) +- * @to: Other address within the frame buffer +- * Return: 0 if OK, -EFAULT if the start address is before the start of the +- * frame buffer start +- */ +-int video_sync_copy(struct udevice *dev, void *from, void *to); +- +-/** +- * video_sync_copy_all() - Sync the entire framebuffer to the copy +- * +- * @dev: Vidconsole device being updated +- * Return: 0 (always) +- */ +-int video_sync_copy_all(struct udevice *dev); +-#else +-static inline int video_sync_copy(struct udevice *dev, void *from, void *to) +-{ +- return 0; +-} +- +-static inline int video_sync_copy_all(struct udevice *dev) +-{ +- return 0; +-} +- +-#endif +- + /** + * video_damage() - Notify the video subsystem about screen updates. + * +diff --git a/include/video_console.h b/include/video_console.h +index 723d2315606..13197fa4518 100644 +--- a/include/video_console.h ++++ b/include/video_console.h +@@ -537,56 +537,4 @@ void vidconsole_list_fonts(struct udevice *dev); + */ + int vidconsole_get_font_size(struct udevice *dev, const char **name, uint *sizep); + +-#ifdef CONFIG_VIDEO_COPY +-/** +- * vidconsole_sync_copy() - Sync back to the copy framebuffer +- * +- * This ensures that the copy framebuffer has the same data as the framebuffer +- * for a particular region. It should be called after the framebuffer is updated +- * +- * @from and @to can be in either order. The region between them is synced. +- * +- * @dev: Vidconsole device being updated +- * @from: Start/end address within the framebuffer (->fb) +- * @to: Other address within the frame buffer +- * Return: 0 if OK, -EFAULT if the start address is before the start of the +- * frame buffer start +- */ +-int vidconsole_sync_copy(struct udevice *dev, void *from, void *to); +- +-/** +- * vidconsole_memmove() - Perform a memmove() within the frame buffer +- * +- * This handles a memmove(), e.g. for scrolling. It also updates the copy +- * framebuffer. +- * +- * @dev: Vidconsole device being updated +- * @dst: Destination address within the framebuffer (->fb) +- * @src: Source address within the framebuffer (->fb) +- * @size: Number of bytes to transfer +- * Return: 0 if OK, -EFAULT if the start address is before the start of the +- * frame buffer start +- */ +-int vidconsole_memmove(struct udevice *dev, void *dst, const void *src, +- int size); +-#else +- +-#include +- +-static inline int vidconsole_sync_copy(struct udevice *dev, void *from, +- void *to) +-{ +- return 0; +-} +- +-static inline int vidconsole_memmove(struct udevice *dev, void *dst, +- const void *src, int size) +-{ +- memmove(dst, src, size); +- +- return 0; +-} +- +-#endif +- + #endif +diff --git a/test/dm/video.c b/test/dm/video.c +index 9da00be5479..eda1195d3b9 100644 +--- a/test/dm/video.c ++++ b/test/dm/video.c +@@ -105,6 +105,7 @@ static int check_copy_frame_buffer(struct unit_test_state *uts, + if (!IS_ENABLED(CONFIG_VIDEO_COPY)) + return 0; + ++ video_sync(dev, false); + ut_assertf(!memcmp(priv->fb, priv->copy_fb, priv->fb_size), + "Copy framebuffer does not match fb"); + +@@ -705,7 +706,7 @@ static int dm_test_video_copy(struct unit_test_state *uts) + vidconsole_put_string(con, test_string); + vidconsole_put_string(con, test_string); + ut_asserteq(7589, compress_frame_buffer(uts, dev, false)); +- ut_asserteq(5278, compress_frame_buffer(uts, dev, true)); ++ ut_asserteq(4127, compress_frame_buffer(uts, dev, true)); + + return 0; + } +-- +2.48.1 + +From 3fb044255ec50a026195586ced9e53499d701254 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 18 Feb 2025 21:57:38 +0000 +Subject: [PATCH 12/13] video: Always compile cache flushing code + +The dcache flushing code path was conditional on ARM && !DCACHE config +options. However, dcaches exist on other platforms as well and may need +clearing if their driver requires it. + +Simplify the compile logic and always enable the dcache flush logic in +the video core. That way, drivers can always rely on it to call the arch +specific callbacks. + +This will increase code size for non-ARM platforms with CONFIG_VIDEO=y +slightly. + +Reported-by: Heinrich Schuchardt +Signed-off-by: Alexander Graf +Reviewed-by: Simon Glass +Signed-off-by: Alper Nebi Yasak +Signed-off-by: Peter Robinson +--- + drivers/video/video-uclass.c | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c +index a828e67341b..c566931a050 100644 +--- a/drivers/video/video-uclass.c ++++ b/drivers/video/video-uclass.c +@@ -393,11 +393,13 @@ void video_damage(struct udevice *vid, int x, int y, int width, int height) + priv->damage.yend = max(yend, priv->damage.yend); + } + +-#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) + static void video_flush_dcache(struct udevice *vid) + { + struct video_priv *priv = dev_get_uclass_priv(vid); + ++ if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) ++ return; ++ + if (!priv->flush_dcache) + return; + +@@ -426,7 +428,6 @@ static void video_flush_dcache(struct udevice *vid) + } + } + } +-#endif + + static void video_flush_copy(struct udevice *vid) + { +@@ -469,14 +470,9 @@ int video_sync(struct udevice *vid, bool force) + get_timer(priv->last_sync) < CONFIG_VIDEO_SYNC_MS) + return 0; + +- /* +- * flush_dcache_range() is declared in common.h but it seems that some +- * architectures do not actually implement it. Is there a way to find +- * out whether it exists? For now, ARM is safe. +- */ +-#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) + video_flush_dcache(vid); +-#elif defined(CONFIG_VIDEO_SANDBOX_SDL) ++ ++#if defined(CONFIG_VIDEO_SANDBOX_SDL) + sandbox_sdl_sync(priv->fb); + #endif + +-- +2.48.1 + +From 7d1ef5a8dafc5e95d5db753010f53880f49e979e Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 21 Aug 2023 16:51:10 +0300 +Subject: [PATCH 13/13] video: Enable VIDEO_DAMAGE for drivers that need it + +Some drivers call video_set_flush_dcache() to indicate that they want to +have the dcache flushed for the frame buffer. These drivers benefit from +our new video damage control, because we can reduce the amount of memory +that gets flushed significantly. + +This patch enables video damage control for all device drivers that call +video_set_flush_dcache() to make sure they benefit from it. + +Signed-off-by: Alexander Graf +[Alper: Add to VIDEO_TIDSS, imply instead of select] +Co-developed-by: Alper Nebi Yasak +Signed-off-by: Alper Nebi Yasak +Reviewed-by: Simon Glass +--- + arch/arm/mach-sunxi/Kconfig | 1 + + drivers/video/Kconfig | 8 ++++++++ + drivers/video/exynos/Kconfig | 1 + + drivers/video/imx/Kconfig | 1 + + drivers/video/meson/Kconfig | 1 + + drivers/video/rockchip/Kconfig | 1 + + drivers/video/stm32/Kconfig | 1 + + drivers/video/tegra20/Kconfig | 1 + + drivers/video/tidss/Kconfig | 1 + + 9 files changed, 16 insertions(+) + +diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig +index ba1b1541437..bb1ea961704 100644 +--- a/arch/arm/mach-sunxi/Kconfig ++++ b/arch/arm/mach-sunxi/Kconfig +@@ -882,6 +882,7 @@ config VIDEO_SUNXI + depends on !SUNXI_GEN_NCAT2 + select VIDEO + select DISPLAY ++ imply VIDEO_DAMAGE + imply VIDEO_DT_SIMPLEFB + default y + ---help--- +diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig +index 964174b01ac..6e1577ae687 100644 +--- a/drivers/video/Kconfig ++++ b/drivers/video/Kconfig +@@ -534,6 +534,7 @@ config VIDEO_LCD_ANX9804 + + config ATMEL_LCD + bool "Atmel LCD panel support" ++ imply VIDEO_DAMAGE + depends on ARCH_AT91 + + config ATMEL_LCD_BGR555 +@@ -543,6 +544,7 @@ config ATMEL_LCD_BGR555 + + config VIDEO_BCM2835 + bool "Display support for BCM2835" ++ imply VIDEO_DAMAGE + help + The graphics processor already sets up the display so this driver + simply checks the resolution and then sets up the frame buffer with +@@ -715,6 +717,7 @@ source "drivers/video/meson/Kconfig" + + config VIDEO_MVEBU + bool "Armada XP LCD controller" ++ imply VIDEO_DAMAGE + ---help--- + Support for the LCD controller integrated in the Marvell + Armada XP SoC. +@@ -749,6 +752,7 @@ config NXP_TDA19988 + + config ATMEL_HLCD + bool "Enable ATMEL video support using HLCDC" ++ imply VIDEO_DAMAGE + help + HLCDC supports video output to an attached LCD panel. + +@@ -825,6 +829,7 @@ source "drivers/video/tidss/Kconfig" + + config VIDEO_TEGRA124 + bool "Enable video support on Tegra124" ++ imply VIDEO_DAMAGE + help + Tegra124 supports many video output options including eDP and + HDMI. At present only eDP is supported by U-Boot. This option +@@ -839,6 +844,7 @@ source "drivers/video/imx/Kconfig" + + config VIDEO_MXS + bool "Enable video support on i.MX28/i.MX6UL/i.MX7 SoCs" ++ imply VIDEO_DAMAGE + help + Enable framebuffer driver for i.MX28/i.MX6UL/i.MX7 processors + +@@ -901,6 +907,7 @@ config VIDEO_DW_MIPI_DSI + + config VIDEO_SIMPLE + bool "Simple display driver for preconfigured display" ++ imply VIDEO_DAMAGE + help + Enables a simple generic display driver which utilizes the + simple-framebuffer devicetree bindings. +@@ -919,6 +926,7 @@ config VIDEO_DT_SIMPLEFB + + config VIDEO_MCDE_SIMPLE + bool "Simple driver for ST-Ericsson MCDE with preconfigured display" ++ imply VIDEO_DAMAGE + help + Enables a simple display driver for ST-Ericsson MCDE + (Multichannel Display Engine), which reads the configuration from +diff --git a/drivers/video/exynos/Kconfig b/drivers/video/exynos/Kconfig +index 599d19d5ecc..a2cf752aac0 100644 +--- a/drivers/video/exynos/Kconfig ++++ b/drivers/video/exynos/Kconfig +@@ -12,6 +12,7 @@ config EXYNOS_DP + + config EXYNOS_FB + bool "Exynos FIMD support" ++ imply VIDEO_DAMAGE + + config EXYNOS_MIPI_DSIM + bool "Exynos MIPI DSI support" +diff --git a/drivers/video/imx/Kconfig b/drivers/video/imx/Kconfig +index 34e8b640595..5db3e5c0499 100644 +--- a/drivers/video/imx/Kconfig ++++ b/drivers/video/imx/Kconfig +@@ -2,6 +2,7 @@ + config VIDEO_IPUV3 + bool "i.MX IPUv3 Core video support" + depends on VIDEO && (MX5 || MX6) ++ imply VIDEO_DAMAGE + help + This enables framebuffer driver for i.MX processors working + on the IPUv3(Image Processing Unit) internal graphic processor. +diff --git a/drivers/video/meson/Kconfig b/drivers/video/meson/Kconfig +index 3c2d72d019b..fcf486ca0a3 100644 +--- a/drivers/video/meson/Kconfig ++++ b/drivers/video/meson/Kconfig +@@ -8,5 +8,6 @@ config VIDEO_MESON + bool "Enable Amlogic Meson video support" + depends on VIDEO + select DISPLAY ++ imply VIDEO_DAMAGE + help + Enable Amlogic Meson Video Processing Unit video support. +diff --git a/drivers/video/rockchip/Kconfig b/drivers/video/rockchip/Kconfig +index 01804dcb1cc..0f4550a29e3 100644 +--- a/drivers/video/rockchip/Kconfig ++++ b/drivers/video/rockchip/Kconfig +@@ -11,6 +11,7 @@ + menuconfig VIDEO_ROCKCHIP + bool "Enable Rockchip Video Support" + depends on VIDEO ++ imply VIDEO_DAMAGE + help + Rockchip SoCs provide video output capabilities for High-Definition + Multimedia Interface (HDMI), Low-voltage Differential Signalling +diff --git a/drivers/video/stm32/Kconfig b/drivers/video/stm32/Kconfig +index 48066063e4c..c354c402c28 100644 +--- a/drivers/video/stm32/Kconfig ++++ b/drivers/video/stm32/Kconfig +@@ -8,6 +8,7 @@ + menuconfig VIDEO_STM32 + bool "Enable STM32 video support" + depends on VIDEO ++ imply VIDEO_DAMAGE + help + STM32 supports many video output options including RGB and + DSI. This option enables these supports which can be used on +diff --git a/drivers/video/tegra20/Kconfig b/drivers/video/tegra20/Kconfig +index f5c4843e119..2232b0b3ff5 100644 +--- a/drivers/video/tegra20/Kconfig ++++ b/drivers/video/tegra20/Kconfig +@@ -1,6 +1,7 @@ + config VIDEO_TEGRA20 + bool "Enable Display Controller support on Tegra20 and Tegra 30" + depends on OF_CONTROL ++ imply VIDEO_DAMAGE + help + T20/T30 support video output to an attached LCD panel as well as + other options such as HDMI. Only the LCD is supported in U-Boot. +diff --git a/drivers/video/tidss/Kconfig b/drivers/video/tidss/Kconfig +index 95086f3a5d6..3291b3ceb8d 100644 +--- a/drivers/video/tidss/Kconfig ++++ b/drivers/video/tidss/Kconfig +@@ -11,6 +11,7 @@ + menuconfig VIDEO_TIDSS + bool "Enable TIDSS video support" + depends on VIDEO ++ imply VIDEO_DAMAGE + help + TIDSS supports video output options LVDS and + DPI . This option enables these supports which can be used on +-- +2.48.1 + diff --git a/Allwinner-fix-booting-on-a-number-of-devices.patch b/Allwinner-fix-booting-on-a-number-of-devices.patch deleted file mode 100644 index 2b08e13..0000000 --- a/Allwinner-fix-booting-on-a-number-of-devices.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b8ea3cebde98866b7cbb4e8f9bb6dfdee529a549 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 27 Aug 2025 00:23:28 +0100 -Subject: [PATCH] Allwinner: fix booting on a number of devices - -Revert "sunxi: enable MMU_PGPROT proper page table protection" - -This reverts commit 16cfccda4dbf0b53473b8212897f5c63bfbeb6e1. ---- - arch/arm/Kconfig | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 40368abc297..b8be270e4d7 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -1207,7 +1207,6 @@ config ARCH_SUNXI - select DM_SPI_FLASH if SPI && MTD - select DM_KEYBOARD - select DM_SERIAL -- select MMU_PGPROT if ARM64 - select OF_BOARD_SETUP - select OF_CONTROL - select PINCTRL --- -2.51.0 - diff --git a/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch b/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch deleted file mode 100644 index a52ce84..0000000 --- a/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch +++ /dev/null @@ -1,405 +0,0 @@ -From patchwork Mon Jul 6 17:21:47 2026 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Torsten Duwe -X-Patchwork-Id: 2265604 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB431Qwzz1xqc - for ; Tue, 07 Jul 2026 03:21:55 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 179C084942; - Mon, 6 Jul 2026 19:21:52 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=fail (p=none dis=none) header.from=lst.de -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de -Received: by phobos.denx.de (Postfix, from userid 109) - id 82ADE8490A; Mon, 6 Jul 2026 19:21:51 +0200 (CEST) -X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de -X-Spam-Level: -X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, - RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham - autolearn_force=no version=3.4.2 -Received: from verein.lst.de (verein.lst.de [213.95.11.211]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 9F24C846B4 - for ; Mon, 6 Jul 2026 19:21:49 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=fail (p=none dis=none) header.from=lst.de -Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de -Received: by verein.lst.de (Postfix, from userid 2005) - id C934268B05; Mon, 6 Jul 2026 19:21:47 +0200 (CEST) -In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de> -References: <20260706172028.C148E68BEB@verein.lst.de> -Subject: [PATCH v2 1/4] core: Skip parent device nodes without a DT reference - when looking for dma-ranges -To: Neil Armstrong , - Andrew Goodbody , Bin Meng , - Simon Glass -Cc: Tom Rini , Matthias Brugger , - Peter Robinson , - Mattijs Korpershoek , - Marek Vasut , - Heiko Schocher , Svyatoslav Ryhel , - "Lucien.Jheng" , Rasmus Villemoes , - Martin Schwan , - "Markus Schneider-Pargmann (TI.com)" , - Prashant Kamble , - Denis Mukhin , Sughosh Ganu , - u-boot@lists.denx.de -Message-Id: <20260706172147.C934268B05@verein.lst.de> -Date: Mon, 6 Jul 2026 19:21:47 +0200 (CEST) -From: duwe@lst.de (Torsten Duwe) -X-BeenThere: u-boot@lists.denx.de -X-Mailman-Version: 2.1.39 -Precedence: list -List-Id: U-Boot discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: u-boot-bounces@lists.denx.de -Sender: "U-Boot" -X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Torsten Duwe - -If a device node got created dynamically, there is no guarantee that the -parent node has an associated device tree node which could specify dma -constraints. Especially PCI(e) enumeration adds intermediate "bus nodes", -also dynamically. - -Try harder to find the correct configuration by walking up the tree until -a DT association is found. - -Suggested-by: Neil Armstrong -Signed-off-by: Torsten Duwe -Reviewed-by: Peter Robinson -Tested-by: Peter Robinson ---- - drivers/core/device.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/drivers/core/device.c b/drivers/core/device.c -index d365204ba11..b6d00cf4714 100644 ---- a/drivers/core/device.c -+++ b/drivers/core/device.c -@@ -459,7 +459,19 @@ static int device_get_dma_constraints(struct udevice *dev) - u64 size = 0; - int ret; - -- if (!CONFIG_IS_ENABLED(DM_DMA) || !parent || !dev_has_ofnode(parent)) -+ if (!CONFIG_IS_ENABLED(DM_DMA) || !parent) -+ return 0; -+ -+ /* Look for the first node in the parent chain */ -+ while (parent) { -+ if (dev_has_ofnode(parent)) -+ break; -+ -+ parent = dev_get_parent(parent); -+ } -+ -+ /* No parents have a node, bail out */ -+ if (!parent) - return 0; - - /* - -From patchwork Mon Jul 6 17:21:50 2026 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Torsten Duwe -X-Patchwork-Id: 2265605 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de - [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange x25519) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB481pfXz1xqc - for ; Tue, 07 Jul 2026 03:22:00 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 9A59684994; - Mon, 6 Jul 2026 19:21:55 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=fail (p=none dis=none) header.from=lst.de -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de -Received: by phobos.denx.de (Postfix, from userid 109) - id EB7D384979; Mon, 6 Jul 2026 19:21:53 +0200 (CEST) -X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de -X-Spam-Level: -X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, - RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham - autolearn_force=no version=3.4.2 -Received: from verein.lst.de (verein.lst.de [213.95.11.211]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id EE61C846B4 - for ; Mon, 6 Jul 2026 19:21:51 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=fail (p=none dis=none) header.from=lst.de -Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de -Received: by verein.lst.de (Postfix, from userid 2005) - id 464E868BEB; Mon, 6 Jul 2026 19:21:50 +0200 (CEST) -In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de> -References: <20260706172028.C148E68BEB@verein.lst.de> -Subject: [PATCH v2 2/4] test: Add a unit test in phys_to_bus for dynamically - created device nodes -To: Neil Armstrong , - Andrew Goodbody , Bin Meng , - Simon Glass -Cc: Tom Rini , Matthias Brugger , - Peter Robinson , - Mattijs Korpershoek , - Marek Vasut , - Heiko Schocher , Svyatoslav Ryhel , - "Lucien.Jheng" , Rasmus Villemoes , - Martin Schwan , - "Markus Schneider-Pargmann (TI.com)" , - Prashant Kamble , - Denis Mukhin , Sughosh Ganu , - u-boot@lists.denx.de -Message-Id: <20260706172150.464E868BEB@verein.lst.de> -Date: Mon, 6 Jul 2026 19:21:50 +0200 (CEST) -From: duwe@lst.de (Torsten Duwe) -X-BeenThere: u-boot@lists.denx.de -X-Mailman-Version: 2.1.39 -Precedence: list -List-Id: U-Boot discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: u-boot-bounces@lists.denx.de -Sender: "U-Boot" -X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Torsten Duwe - -In order to test whether device_get_dma_constraints() is now able to skip -device nodes without a DT association, temporarily remove those on 2 newly- -created nodes. - -Signed-off-by: Torsten Duwe ---- - -This test indeed makes a different whether the previous change is -applied or not, but *only* reliably for the non-flat-tree case (!?). -On the flat tree, it always fails after (reverse) applying it. - -Either the previous patch is incomplete, or, more likely, the test -assumptions here are not all valid. Suggestions welcome (especially -how to create device nodes from a device tree without a reference to -their origin ;-) - ---- - arch/sandbox/dts/test.dts | 9 +++++++++ - test/dm/phys2bus.c | 25 ++++++++++++++++++++++++- - 2 files changed, 33 insertions(+), 1 deletion(-) - -diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts -index 0887de4333b..1d92e85c739 100644 ---- a/arch/sandbox/dts/test.dts -+++ b/arch/sandbox/dts/test.dts -@@ -656,6 +656,15 @@ - subnode@0 { - compatible = "denx,u-boot-fdt-test"; - }; -+ bus@7 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "denx,u-boot-test-bus"; -+ -+ subnode@8 { -+ compatible = "denx,u-boot-fdt-test"; -+ }; -+ }; - }; - - mmio-bus@1 { -diff --git a/test/dm/phys2bus.c b/test/dm/phys2bus.c -index 67f33904943..858ed5410e2 100644 ---- a/test/dm/phys2bus.c -+++ b/test/dm/phys2bus.c -@@ -15,7 +15,8 @@ - - static int dm_test_phys_to_bus(struct unit_test_state *uts) - { -- struct udevice *dev; -+ struct udevice *dev, *pdev; -+ ofnode psave, nsave; - ofnode node; - - node = ofnode_path("/mmio-bus@0"); -@@ -31,6 +32,29 @@ static int dm_test_phys_to_bus(struct unit_test_state *uts) - ut_asserteq_addr((void*)0x1003ffffULL, (void*)dev_phys_to_bus(dev, 0x3ffff)); - ut_asserteq_addr((void*)0x3ffffULL, (void*)(ulong)dev_bus_to_phys(dev, 0x1003ffff)); - -+#if CONFIG_IS_ENABLED(OF_REAL) -+ /* dma-ranges are on the grandparent bus node, -+ * OF nodes neither here nor at parent -+ */ -+ node = ofnode_path("/mmio-bus@0/bus@7"); -+ ut_assert(ofnode_valid(node)); -+ ut_assertok(uclass_get_device_by_ofnode(UCLASS_TEST_BUS, node, &pdev)); -+ -+ /* pretend the devices were discovered dynamically and have no OF node */ -+ psave = pdev->node_; -+ pdev->node_.np = NULL; -+ node = ofnode_path("/mmio-bus@0/bus@7/subnode@8"); -+ ut_assert(ofnode_valid(node)); -+ nsave = dev->node_; -+ dev->node_.np = NULL; -+ ut_assertok(uclass_get_device_by_ofnode(UCLASS_TEST_FDT, node, &dev)); -+ -+ ut_asserteq_addr((void *)0x1003ffffULL, (void *)dev_phys_to_bus(dev, 0x3ffff)); -+ ut_asserteq_addr((void *)0x3ffffULL, (void *)(ulong)dev_bus_to_phys(dev, 0x1003ffff)); -+ -+ pdev->node_ = psave; -+ dev->node_ = nsave; -+#endif - return 0; - } - DM_TEST(dm_test_phys_to_bus, UTF_SCAN_PDATA | UTF_SCAN_FDT); - -From patchwork Mon Jul 6 17:21:54 2026 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Torsten Duwe -X-Patchwork-Id: 2265607 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) -Received: from phobos.denx.de (phobos.denx.de - [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange x25519) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB4R378Lz1xqc - for ; Tue, 07 Jul 2026 03:22:15 +1000 (AEST) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 3FDAE8490A; - Mon, 6 Jul 2026 19:21:59 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=fail (p=none dis=none) header.from=lst.de -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de -Received: by phobos.denx.de (Postfix, from userid 109) - id 17F418490A; Mon, 6 Jul 2026 19:21:58 +0200 (CEST) -X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de -X-Spam-Level: -X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, - RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham - autolearn_force=no version=3.4.2 -Received: from verein.lst.de (verein.lst.de [213.95.11.211]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 1D593849A4 - for ; Mon, 6 Jul 2026 19:21:56 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=fail (p=none dis=none) header.from=lst.de -Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de -Received: by verein.lst.de (Postfix, from userid 2005) - id B506B68CFE; Mon, 6 Jul 2026 19:21:54 +0200 (CEST) -In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de> -References: <20260706172028.C148E68BEB@verein.lst.de> -Subject: [PATCH v2 4/4] configs: enable NVMe -To: Neil Armstrong , - Andrew Goodbody , Bin Meng , - Simon Glass -Cc: Tom Rini , Matthias Brugger , - Peter Robinson , - Mattijs Korpershoek , - Marek Vasut , - Heiko Schocher , Svyatoslav Ryhel , - "Lucien.Jheng" , Rasmus Villemoes , - Martin Schwan , - "Markus Schneider-Pargmann (TI.com)" , - Prashant Kamble , - Denis Mukhin , Sughosh Ganu , - u-boot@lists.denx.de -Message-Id: <20260706172154.B506B68CFE@verein.lst.de> -Date: Mon, 6 Jul 2026 19:21:54 +0200 (CEST) -From: duwe@lst.de (Torsten Duwe) -X-BeenThere: u-boot@lists.denx.de -X-Mailman-Version: 2.1.39 -Precedence: list -List-Id: U-Boot discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: u-boot-bounces@lists.denx.de -Sender: "U-Boot" -X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de -X-Virus-Status: Clean - -From: Torsten Duwe - -Enable NVMe in the Raspberry Pi 64-Bit default config and scan for devices. - -Signed-off-by: Torsten Duwe -Reviewed-by: Peter Robinson -Tested-by: Peter Robinson ---- - configs/rpi_arm64_defconfig | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig -index cdcf05ea6db..fb0fdce1d7f 100644 ---- a/configs/rpi_arm64_defconfig -+++ b/configs/rpi_arm64_defconfig -@@ -16,7 +16,7 @@ CONFIG_BOOTSTD_DEFAULTS=y - CONFIG_OF_BOARD_SETUP=y - CONFIG_FDT_SIMPLEFB=y - CONFIG_USE_PREBOOT=y --CONFIG_PREBOOT="pci enum; usb start;" -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_SYS_PBSIZE=1049 - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -@@ -44,6 +44,7 @@ CONFIG_MMC_SDHCI_SDMA=y - CONFIG_MMC_SDHCI_BCM2835=y - CONFIG_MMC_SDHCI_BCMSTB=y - CONFIG_BCMGENET=y -+CONFIG_NVME_PCI=y - CONFIG_PCI_BRCMSTB=y - CONFIG_PINCTRL=y - # CONFIG_PINCTRL_GENERIC is not set diff --git a/JetsonTX2-Fix-upstream-device-tree-naming.patch b/JetsonTX2-Fix-upstream-device-tree-naming.patch deleted file mode 100644 index 14242ce..0000000 --- a/JetsonTX2-Fix-upstream-device-tree-naming.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4ee5ba36570d94ce27e4023f15b8b3a6b8b9daf9 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 13 Oct 2025 21:41:13 +0100 -Subject: [PATCH] config: JetsonTX2: Fix upstream device tree naming - -The upstream naming for the Jetson TX2 is p2771-0000 so fix -the device tree name so the firmware will find the right -name on disk. - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/Makefile | 2 +- - .../{tegra186-p2771-0000-500.dts => tegra186-p2771-0000.dts} | 0 - configs/p2771-0000-500_defconfig | 2 +- - 3 files changed, 2 insertions(+), 2 deletions(-) - rename arch/arm/dts/{tegra186-p2771-0000-500.dts => tegra186-p2771-0000.dts} (100%) - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 7c8cf3a5a1d..86a7b4fda35 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -134,7 +134,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \ - tegra124-venice2.dtb \ - tegra124-xiaomi-mocha.dtb \ - tegra186-p2771-0000-000.dtb \ -- tegra186-p2771-0000-500.dtb \ -+ tegra186-p2771-0000.dtb \ - tegra210-p2371-0000.dtb \ - tegra210-p2371-2180.dtb \ - tegra210-p2571.dtb \ -diff --git a/arch/arm/dts/tegra186-p2771-0000-500.dts b/arch/arm/dts/tegra186-p2771-0000.dts -similarity index 100% -rename from arch/arm/dts/tegra186-p2771-0000-500.dts -rename to arch/arm/dts/tegra186-p2771-0000.dts -diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig -index 42043277e2d..e1e5c47ddfa 100644 ---- a/configs/p2771-0000-500_defconfig -+++ b/configs/p2771-0000-500_defconfig -@@ -7,7 +7,7 @@ CONFIG_TEXT_BASE=0x80080000 - CONFIG_NR_DRAM_BANKS=1026 - CONFIG_ENV_SIZE=0x2000 - CONFIG_ENV_OFFSET=0xFFFFE000 --CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500" -+CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000" - CONFIG_SYS_BOOTM_LEN=0x800000 - CONFIG_SYS_LOAD_ADDR=0x80080000 - CONFIG_TEGRA186=y --- -2.51.0 - diff --git a/aarch64-boards b/aarch64-boards index 366d0c8..bb4c9fd 100644 --- a/aarch64-boards +++ b/aarch64-boards @@ -67,6 +67,7 @@ orangepi_zero_plus2 p212 p2371-2180 p2771-0000-500 +p3450-0000 pine64-lts pine64_plus pinebook @@ -78,9 +79,8 @@ pinetab poplar puma-rk3399 qcm6490 +qcs9100 qcom -qcom_qcs8300 -qcom_qcs9100 qemu_arm64 qemu_arm64_lwip roc-cc-rk3328 diff --git a/p3450-fix-board.patch b/p3450-fix-board.patch deleted file mode 100644 index 74475d5..0000000 --- a/p3450-fix-board.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c9b65320d64a60cde74c4c1f9cb4a05198a456c2 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 10 Sep 2025 13:27:52 +0100 -Subject: [PATCH] further size reductions - ---- - configs/p3450-0000_defconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig -index 2ebcf8b83fc..a5e717a02ed 100644 ---- a/configs/p3450-0000_defconfig -+++ b/configs/p3450-0000_defconfig -@@ -27,6 +27,8 @@ CONFIG_CONSOLE_MUX=y - CONFIG_SYS_STDIO_DEREGISTER=y - CONFIG_SYS_PROMPT="Tegra210 (P3450-0000) # " - # CONFIG_BOOTM_PLAN9 is not set -+# CONFIG_SYS_DTC_PAD_BYTES is not set -+# CONFIG_LEGACY_IMAGE_FORMAT is not set - # CONFIG_BOOTM_RTEMS is not set - # CONFIG_BOOTM_VXWORKS is not set - # CONFIG_CMD_ELF is not set --- -2.51.0 - diff --git a/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch b/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch deleted file mode 100644 index d6612ee..0000000 --- a/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 72fd4fdb54721a31d2b4e9f95fdd3b3e398bb2c0 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 12 Apr 2026 01:14:12 +0100 -Subject: [PATCH] board/raspberrypi: Add quirk for RPi5 2Gb rev 1.0 - -All 2Gb Raspberry Pi 5s use the BCM2712D0 silicon, but -the early boards were still rev 1.0 so we need a quirk -to ensure the correct device tree is used. - -Signed-off-by: Peter Robinson ---- - board/raspberrypi/rpi/rpi.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c -index b0a1484c0fa..ff9cab6521b 100644 ---- a/board/raspberrypi/rpi/rpi.c -+++ b/board/raspberrypi/rpi/rpi.c -@@ -371,6 +371,10 @@ static void set_fdtfile(void) - const char *fdtfile; - int rev = revision & 0x0f; - -+ /* 2GB Pi 5B board rev 1.0 always has BCM2712D0 silicon */ -+ if (revision == 0xb04170) -+ rev = 1; -+ - if (env_get("fdtfile")) - return; - --- -2.53.0 - diff --git a/rk3566-boards b/rk3566-boards new file mode 100644 index 0000000..0ed9397 --- /dev/null +++ b/rk3566-boards @@ -0,0 +1,14 @@ +anbernic-rgxx3-rk3566 +nanopi-r3s-rk3566 +odroid-m1s-rk3566 +orangepi-3b-rk3566 +pinetab2-rk3566 +powkiddy-x55-rk3566 +quartz64-a-rk3566 +quartz64-b-rk3566 +radxa-cm3-io-rk3566 +radxa-zero-3-rk3566 +rock-3c-rk3566 +soquartz-blade-rk3566 +soquartz-cm4-rk3566 +soquartz-model-a-rk3566 diff --git a/rk3566_ddr_1056MHz_v1.23.bin b/rk3566_ddr_1056MHz_v1.23.bin new file mode 100644 index 0000000..4da822e Binary files /dev/null and b/rk3566_ddr_1056MHz_v1.23.bin differ diff --git a/rk3568-boards b/rk3568-boards new file mode 100644 index 0000000..cedd01b --- /dev/null +++ b/rk3568-boards @@ -0,0 +1,11 @@ +bpi-r2-pro-rk3568 +evb-rk3568 +generic-rk3568 +lubancat-2-rk3568 +nanopi-r5c-rk3568 +nanopi-r5s-rk3568 +odroid-m1-rk3568 +qnap-ts433-rk3568 +radxa-e25-rk3568 +rock-3a-rk3568 +rock-3b-rk3568 diff --git a/rk3568_ddr_1056MHz_v1.23.bin b/rk3568_ddr_1056MHz_v1.23.bin new file mode 100644 index 0000000..4da822e Binary files /dev/null and b/rk3568_ddr_1056MHz_v1.23.bin differ diff --git a/rk3588-boards b/rk3588-boards new file mode 100644 index 0000000..3c2fd7b --- /dev/null +++ b/rk3588-boards @@ -0,0 +1,27 @@ +cm3588-nas-rk3588 +coolpi-4b-rk3588s +coolpi-cm5-evb-rk3588 +coolpi-cm5-genbook-rk3588 +evb-rk3588 +generic-rk3588 +jaguar-rk3588 +khadas-edge2-rk3588s +nanopc-t6-rk3588 +nanopi-r6c-rk3588s +nanopi-r6s-rk3588s +neu6a-io-rk3588 +neu6b-io-rk3588 +nova-rk3588s +odroid-m2-rk3588s +orangepi-5-max-rk3588 +orangepi-5-plus-rk3588 +orangepi-5-rk3588s +quartzpro64-rk3588 +rock5a-rk3588s +rock5b-rk3588 +rock-5c-rk3588s +rock-5-itx-rk3588 +sige7-rk3588 +tiger-rk3588 +toybrick-rk3588 +turing-rk1-rk3588 diff --git a/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin b/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin new file mode 100644 index 0000000..0697ebd Binary files /dev/null and b/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin differ diff --git a/rockchip-Enable-preboot-start-for-pci-usb.patch b/rockchip-Enable-preboot-start-for-pci-usb.patch index 30aad4d..177b44c 100644 --- a/rockchip-Enable-preboot-start-for-pci-usb.patch +++ b/rockchip-Enable-preboot-start-for-pci-usb.patch @@ -1,6 +1,6 @@ -From a6909a16b4cc301f1007d9e75d02abb6d06a1ea7 Mon Sep 17 00:00:00 2001 +From 020f67a37342b091c74dab93a133253401d4d899 Mon Sep 17 00:00:00 2001 From: Peter Robinson -Date: Thu, 28 May 2026 21:29:29 +0100 +Date: Tue, 31 Dec 2024 14:15:41 +0000 Subject: [PATCH] rockchip: Enable preboot start for pci/usb Enable the preboot so nvme works OOTB @@ -29,18 +29,14 @@ Signed-off-by: Peter Robinson configs/neu6b-io-rk3588_defconfig | 2 ++ configs/nova-rk3588s_defconfig | 2 ++ configs/odroid-m1-rk3568_defconfig | 2 ++ - configs/odroid-m1s-rk3566_defconfig | 2 ++ - configs/odroid-m2-rk3588s_defconfig | 2 ++ configs/orangepi-3b-rk3566_defconfig | 2 ++ - configs/orangepi-5-max-rk3588_defconfig | 2 ++ configs/orangepi-5-plus-rk3588_defconfig | 2 ++ configs/orangepi-5-rk3588s_defconfig | 2 ++ - configs/orangepi-5-ultra-rk3588_defconfig | 2 ++ configs/pinebook-pro-rk3399_defconfig | 1 + configs/pinetab2-rk3566_defconfig | 2 ++ configs/powkiddy-x55-rk3566_defconfig | 2 ++ configs/quartz64-a-rk3566_defconfig | 2 ++ - configs/quartz64-b-rk3566_defconfig | 4 ++++ + configs/quartz64-b-rk3566_defconfig | 2 ++ configs/quartzpro64-rk3588_defconfig | 2 ++ configs/radxa-cm3-io-rk3566_defconfig | 2 ++ configs/radxa-e25-rk3568_defconfig | 2 ++ @@ -52,7 +48,6 @@ Signed-off-by: Peter Robinson configs/rock-4c-plus-rk3399_defconfig | 2 ++ configs/rock-4se-rk3399_defconfig | 2 ++ configs/rock-5-itx-rk3588_defconfig | 2 ++ - configs/rock-5c-rk3588s_defconfig | 2 ++ configs/rock-pi-4-rk3399_defconfig | 2 ++ configs/rock-pi-4c-rk3399_defconfig | 2 ++ configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ @@ -67,10 +62,10 @@ Signed-off-by: Peter Robinson configs/tiger-rk3588_defconfig | 2 ++ configs/toybrick-rk3588_defconfig | 2 ++ configs/turing-rk1-rk3588_defconfig | 2 ++ - 60 files changed, 121 insertions(+) + 55 files changed, 109 insertions(+) diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig -index 854de8b00a4..cd91f18ba80 100644 +index 14c97b4c5bf..de92e1b4141 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig @@ -12,6 +12,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -83,7 +78,7 @@ index 854de8b00a4..cd91f18ba80 100644 CONFIG_FIT=y CONFIG_FIT_VERBOSE=y diff --git a/configs/bpi-r2-pro-rk3568_defconfig b/configs/bpi-r2-pro-rk3568_defconfig -index c5199a39448..603e07f2456 100644 +index d84ea2f955f..de777817c37 100644 --- a/configs/bpi-r2-pro-rk3568_defconfig +++ b/configs/bpi-r2-pro-rk3568_defconfig @@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -92,11 +87,11 @@ index c5199a39448..603e07f2456 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/cm3588-nas-rk3588_defconfig b/configs/cm3588-nas-rk3588_defconfig -index 5b5ef8d5ac1..53147d115dd 100644 +index fd0a32d6d79..e561be511d4 100644 --- a/configs/cm3588-nas-rk3588_defconfig +++ b/configs/cm3588-nas-rk3588_defconfig @@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 @@ -109,7 +104,7 @@ index 5b5ef8d5ac1..53147d115dd 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/coolpi-4b-rk3588s_defconfig b/configs/coolpi-4b-rk3588s_defconfig -index e6772622403..75e0b373ce9 100644 +index ea985b81670..96d7cffb075 100644 --- a/configs/coolpi-4b-rk3588s_defconfig +++ b/configs/coolpi-4b-rk3588s_defconfig @@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -118,11 +113,11 @@ index e6772622403..75e0b373ce9 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/coolpi-cm5-evb-rk3588_defconfig b/configs/coolpi-cm5-evb-rk3588_defconfig -index 4326e116849..a005e4441d3 100644 +index 58ffe7baf5f..5eadc091242 100644 --- a/configs/coolpi-cm5-evb-rk3588_defconfig +++ b/configs/coolpi-cm5-evb-rk3588_defconfig @@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -131,11 +126,11 @@ index 4326e116849..a005e4441d3 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/evb-rk3568_defconfig b/configs/evb-rk3568_defconfig -index 4a5a7454e10..7ec199a08af 100644 +index a068bc6846c..8c94f7b21bc 100644 --- a/configs/evb-rk3568_defconfig +++ b/configs/evb-rk3568_defconfig @@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -148,7 +143,7 @@ index 4a5a7454e10..7ec199a08af 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/evb-rk3588_defconfig b/configs/evb-rk3588_defconfig -index c7f6256a626..cfa73c660e7 100644 +index 3d4d2747145..051015fd811 100644 --- a/configs/evb-rk3588_defconfig +++ b/configs/evb-rk3588_defconfig @@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -161,7 +156,7 @@ index c7f6256a626..cfa73c660e7 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig -index 83b9de5feb9..2ba8f5029c3 100644 +index 3871627318b..b96aadc78eb 100644 --- a/configs/firefly-rk3399_defconfig +++ b/configs/firefly-rk3399_defconfig @@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -174,7 +169,7 @@ index 83b9de5feb9..2ba8f5029c3 100644 CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 diff --git a/configs/generic-rk3568_defconfig b/configs/generic-rk3568_defconfig -index a33c3af9255..20966793568 100644 +index f79f0e84400..ba5339a004f 100644 --- a/configs/generic-rk3568_defconfig +++ b/configs/generic-rk3568_defconfig @@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 @@ -187,7 +182,7 @@ index a33c3af9255..20966793568 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig -index ac450e6d757..b5424ac9f16 100644 +index 51e31dce3a9..1c767caa06a 100644 --- a/configs/generic-rk3588_defconfig +++ b/configs/generic-rk3588_defconfig @@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -200,7 +195,7 @@ index ac450e6d757..b5424ac9f16 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/jaguar-rk3588_defconfig b/configs/jaguar-rk3588_defconfig -index ed3883b4f9c..47dbd834f30 100644 +index 6e853991d1d..a5a56a33d09 100644 --- a/configs/jaguar-rk3588_defconfig +++ b/configs/jaguar-rk3588_defconfig @@ -16,6 +16,8 @@ CONFIG_DEBUG_UART_BASE=0xfeb50000 @@ -213,7 +208,7 @@ index ed3883b4f9c..47dbd834f30 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/lubancat-2-rk3568_defconfig b/configs/lubancat-2-rk3568_defconfig -index 7548bf60b06..2fb8a432503 100644 +index 46cc3c03fff..8915d5bfba9 100644 --- a/configs/lubancat-2-rk3568_defconfig +++ b/configs/lubancat-2-rk3568_defconfig @@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -226,10 +221,10 @@ index 7548bf60b06..2fb8a432503 100644 CONFIG_FIT=y CONFIG_FIT_VERBOSE=y diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig -index f8ae436a1ee..7aa8e1a8d42 100644 +index 26c12c51078..33f7e838c2c 100644 --- a/configs/nanopc-t4-rk3399_defconfig +++ b/configs/nanopc-t4-rk3399_defconfig -@@ -15,6 +15,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 +@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_PCI=y CONFIG_DEBUG_UART=y @@ -239,7 +234,7 @@ index f8ae436a1ee..7aa8e1a8d42 100644 CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 diff --git a/configs/nanopc-t6-rk3588_defconfig b/configs/nanopc-t6-rk3588_defconfig -index ba9a5adece7..eaf7fa5a0fc 100644 +index 772b7df1555..ba6cf48308c 100644 --- a/configs/nanopc-t6-rk3588_defconfig +++ b/configs/nanopc-t6-rk3588_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -252,7 +247,7 @@ index ba9a5adece7..eaf7fa5a0fc 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/nanopi-r5c-rk3568_defconfig b/configs/nanopi-r5c-rk3568_defconfig -index e75a24dadc8..159ef033932 100644 +index 4a43b17ccb1..91c95b491d5 100644 --- a/configs/nanopi-r5c-rk3568_defconfig +++ b/configs/nanopi-r5c-rk3568_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 @@ -260,12 +255,12 @@ index e75a24dadc8..159ef033932 100644 CONFIG_PCI=y CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="usb start;" ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/nanopi-r5s-rk3568_defconfig b/configs/nanopi-r5s-rk3568_defconfig -index c971f376b38..60b5e8fa014 100644 +index a60d229fbbf..355d8114a9b 100644 --- a/configs/nanopi-r5s-rk3568_defconfig +++ b/configs/nanopi-r5s-rk3568_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 @@ -273,12 +268,12 @@ index c971f376b38..60b5e8fa014 100644 CONFIG_PCI=y CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="usb start;" ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/nanopi-r6c-rk3588s_defconfig b/configs/nanopi-r6c-rk3588s_defconfig -index 861e3234d29..bb6e2082e3b 100644 +index c4de5518a72..92697c536d9 100644 --- a/configs/nanopi-r6c-rk3588s_defconfig +++ b/configs/nanopi-r6c-rk3588s_defconfig @@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 @@ -291,7 +286,7 @@ index 861e3234d29..bb6e2082e3b 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/nanopi-r6s-rk3588s_defconfig b/configs/nanopi-r6s-rk3588s_defconfig -index 743dfca441b..903ec56ad6f 100644 +index 2726729b9ac..63a3690db8e 100644 --- a/configs/nanopi-r6s-rk3588s_defconfig +++ b/configs/nanopi-r6s-rk3588s_defconfig @@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 @@ -304,7 +299,7 @@ index 743dfca441b..903ec56ad6f 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/neu6a-io-rk3588_defconfig b/configs/neu6a-io-rk3588_defconfig -index 19f129e96f0..08ed699b01d 100644 +index 291e0d26d42..e385aba7bc4 100644 --- a/configs/neu6a-io-rk3588_defconfig +++ b/configs/neu6a-io-rk3588_defconfig @@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -317,7 +312,7 @@ index 19f129e96f0..08ed699b01d 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/neu6b-io-rk3588_defconfig b/configs/neu6b-io-rk3588_defconfig -index 2cf5aeccf51..8cafd779a1c 100644 +index 4e22852f23c..79f4e66cb9b 100644 --- a/configs/neu6b-io-rk3588_defconfig +++ b/configs/neu6b-io-rk3588_defconfig @@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -330,7 +325,7 @@ index 2cf5aeccf51..8cafd779a1c 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/nova-rk3588s_defconfig b/configs/nova-rk3588s_defconfig -index f7d7492ff46..5abb6ebbe18 100644 +index fb30dfd1db8..e99898355e1 100644 --- a/configs/nova-rk3588s_defconfig +++ b/configs/nova-rk3588s_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 @@ -343,7 +338,7 @@ index f7d7492ff46..5abb6ebbe18 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig -index b00985b0405..19d7af53c7f 100644 +index a8e8a8781e1..a3ea2e592b9 100644 --- a/configs/odroid-m1-rk3568_defconfig +++ b/configs/odroid-m1-rk3568_defconfig @@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -352,37 +347,11 @@ index b00985b0405..19d7af53c7f 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y -diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig -index d59882a2a59..20f6dc3c26e 100644 ---- a/configs/odroid-m1s-rk3566_defconfig -+++ b/configs/odroid-m1s-rk3566_defconfig -@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_PCI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_FIT=y - CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y -diff --git a/configs/odroid-m2-rk3588s_defconfig b/configs/odroid-m2-rk3588s_defconfig -index e71e61ddb0b..561c2b28b7a 100644 ---- a/configs/odroid-m2-rk3588s_defconfig -+++ b/configs/odroid-m2-rk3588s_defconfig -@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_PCI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_FIT=y - CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/orangepi-3b-rk3566_defconfig b/configs/orangepi-3b-rk3566_defconfig -index 1cd78789fa1..dcf182231da 100644 +index 2181c9caf58..fee0c719f25 100644 --- a/configs/orangepi-3b-rk3566_defconfig +++ b/configs/orangepi-3b-rk3566_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -391,24 +360,11 @@ index 1cd78789fa1..dcf182231da 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y -diff --git a/configs/orangepi-5-max-rk3588_defconfig b/configs/orangepi-5-max-rk3588_defconfig -index 0861df962cf..744aad89c4a 100644 ---- a/configs/orangepi-5-max-rk3588_defconfig -+++ b/configs/orangepi-5-max-rk3588_defconfig -@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y - CONFIG_SPL_SPI=y - CONFIG_PCI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_FIT=y - CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/orangepi-5-plus-rk3588_defconfig b/configs/orangepi-5-plus-rk3588_defconfig -index 52523f87aec..e3bb4e43da9 100644 +index 9050fceda45..2e1fe2c6dc5 100644 --- a/configs/orangepi-5-plus-rk3588_defconfig +++ b/configs/orangepi-5-plus-rk3588_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -417,11 +373,11 @@ index 52523f87aec..e3bb4e43da9 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/orangepi-5-rk3588s_defconfig b/configs/orangepi-5-rk3588s_defconfig -index e0eba389289..33fe68add7b 100644 +index 6e2ff7d338a..7ec7d13e1f9 100644 --- a/configs/orangepi-5-rk3588s_defconfig +++ b/configs/orangepi-5-rk3588s_defconfig @@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -430,24 +386,11 @@ index e0eba389289..33fe68add7b 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y -diff --git a/configs/orangepi-5-ultra-rk3588_defconfig b/configs/orangepi-5-ultra-rk3588_defconfig -index fb7f4432983..62419609695 100644 ---- a/configs/orangepi-5-ultra-rk3588_defconfig -+++ b/configs/orangepi-5-ultra-rk3588_defconfig -@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y - CONFIG_SPL_SPI=y - CONFIG_PCI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_FIT=y - CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig -index cbf95b4692f..9e4d1b1061d 100644 +index dfa927ccb17..acc2a0a9fcd 100644 --- a/configs/pinebook-pro-rk3399_defconfig +++ b/configs/pinebook-pro-rk3399_defconfig @@ -22,6 +22,7 @@ CONFIG_PCI=y @@ -459,7 +402,7 @@ index cbf95b4692f..9e4d1b1061d 100644 CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 diff --git a/configs/pinetab2-rk3566_defconfig b/configs/pinetab2-rk3566_defconfig -index f284dadb99d..d87849f0a45 100644 +index 45e63b42d19..3ef0ddbbe31 100644 --- a/configs/pinetab2-rk3566_defconfig +++ b/configs/pinetab2-rk3566_defconfig @@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 @@ -472,7 +415,7 @@ index f284dadb99d..d87849f0a45 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/powkiddy-x55-rk3566_defconfig b/configs/powkiddy-x55-rk3566_defconfig -index 37a359c91a9..70bc5ab6402 100644 +index 85280839889..f93a463087b 100644 --- a/configs/powkiddy-x55-rk3566_defconfig +++ b/configs/powkiddy-x55-rk3566_defconfig @@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -485,7 +428,7 @@ index 37a359c91a9..70bc5ab6402 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/quartz64-a-rk3566_defconfig b/configs/quartz64-a-rk3566_defconfig -index 780fd581f0a..7938b5c0d1b 100644 +index fe3fa37611a..60b1f8f1784 100644 --- a/configs/quartz64-a-rk3566_defconfig +++ b/configs/quartz64-a-rk3566_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -494,31 +437,24 @@ index 780fd581f0a..7938b5c0d1b 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/quartz64-b-rk3566_defconfig b/configs/quartz64-b-rk3566_defconfig -index 4d92a67cd73..fe8a168373d 100644 +index 929736f76af..c3155d9b835 100644 --- a/configs/quartz64-b-rk3566_defconfig +++ b/configs/quartz64-b-rk3566_defconfig -@@ -1,4 +1,6 @@ - CONFIG_ARM=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_SKIP_LOWLEVEL_INIT=y - CONFIG_COUNTER_FREQUENCY=24000000 - CONFIG_ARCH_ROCKCHIP=y -@@ -17,6 +19,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_PCI=y CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/quartzpro64-rk3588_defconfig b/configs/quartzpro64-rk3588_defconfig -index 0ad74e8bbef..b9cbddfae77 100644 +index ade7be27e92..263d21bee8b 100644 --- a/configs/quartzpro64-rk3588_defconfig +++ b/configs/quartzpro64-rk3588_defconfig @@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 @@ -527,11 +463,11 @@ index 0ad74e8bbef..b9cbddfae77 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/radxa-cm3-io-rk3566_defconfig b/configs/radxa-cm3-io-rk3566_defconfig -index 875f0b76fa5..2523dccd6a3 100644 +index 2655fdc3170..c1a27f6e310 100644 --- a/configs/radxa-cm3-io-rk3566_defconfig +++ b/configs/radxa-cm3-io-rk3566_defconfig @@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -544,7 +480,7 @@ index 875f0b76fa5..2523dccd6a3 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/radxa-e25-rk3568_defconfig b/configs/radxa-e25-rk3568_defconfig -index 779d540e22d..7e003e74520 100644 +index 4df594ddc01..3830d27b264 100644 --- a/configs/radxa-e25-rk3568_defconfig +++ b/configs/radxa-e25-rk3568_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 @@ -553,11 +489,11 @@ index 779d540e22d..7e003e74520 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/radxa-zero-3-rk3566_defconfig b/configs/radxa-zero-3-rk3566_defconfig -index f5cf09a5e4a..7db7e3fcd3d 100644 +index 5989b07ad79..1b571ec3847 100644 --- a/configs/radxa-zero-3-rk3566_defconfig +++ b/configs/radxa-zero-3-rk3566_defconfig @@ -11,6 +11,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -570,7 +506,7 @@ index f5cf09a5e4a..7db7e3fcd3d 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig -index 8b4d8c1b0aa..54baa07aeae 100644 +index 3ab5fd69c62..ba254d8f6c0 100644 --- a/configs/roc-pc-mezzanine-rk3399_defconfig +++ b/configs/roc-pc-mezzanine-rk3399_defconfig @@ -21,6 +21,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -583,7 +519,7 @@ index 8b4d8c1b0aa..54baa07aeae 100644 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc-mezzanine.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig -index e753185610f..19d303e7f70 100644 +index 733ce631457..3387796a0c5 100644 --- a/configs/rock-3a-rk3568_defconfig +++ b/configs/rock-3a-rk3568_defconfig @@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -592,11 +528,11 @@ index e753185610f..19d303e7f70 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/rock-3b-rk3568_defconfig b/configs/rock-3b-rk3568_defconfig -index c3bf48b9e34..0cfa8eba168 100644 +index 2023feb36c2..84c6aab6b33 100644 --- a/configs/rock-3b-rk3568_defconfig +++ b/configs/rock-3b-rk3568_defconfig @@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -605,11 +541,11 @@ index c3bf48b9e34..0cfa8eba168 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/rock-3c-rk3566_defconfig b/configs/rock-3c-rk3566_defconfig -index 417aa33a663..61d0e1b8c6a 100644 +index 2528c7c639c..0a0010b1268 100644 --- a/configs/rock-3c-rk3566_defconfig +++ b/configs/rock-3c-rk3566_defconfig @@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -618,11 +554,11 @@ index 417aa33a663..61d0e1b8c6a 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/rock-4c-plus-rk3399_defconfig b/configs/rock-4c-plus-rk3399_defconfig -index 0f6bdfdfb06..f31cb061a83 100644 +index 0c73a212ea1..2ae2eff39e2 100644 --- a/configs/rock-4c-plus-rk3399_defconfig +++ b/configs/rock-4c-plus-rk3399_defconfig @@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 @@ -635,7 +571,7 @@ index 0f6bdfdfb06..f31cb061a83 100644 CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y # CONFIG_ANDROID_BOOT_IMAGE is not set diff --git a/configs/rock-4se-rk3399_defconfig b/configs/rock-4se-rk3399_defconfig -index 7f22aede912..caf8e02bece 100644 +index 3ae19692155..12621b8a41b 100644 --- a/configs/rock-4se-rk3399_defconfig +++ b/configs/rock-4se-rk3399_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -644,11 +580,11 @@ index 7f22aede912..caf8e02bece 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y - # CONFIG_ANDROID_BOOT_IMAGE is not set diff --git a/configs/rock-5-itx-rk3588_defconfig b/configs/rock-5-itx-rk3588_defconfig -index cb014de4188..e26a126533c 100644 +index d0dd1c20ece..b3a778907c8 100644 --- a/configs/rock-5-itx-rk3588_defconfig +++ b/configs/rock-5-itx-rk3588_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -657,24 +593,11 @@ index cb014de4188..e26a126533c 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y -diff --git a/configs/rock-5c-rk3588s_defconfig b/configs/rock-5c-rk3588s_defconfig -index 3d044a81498..27234c250d1 100644 ---- a/configs/rock-5c-rk3588s_defconfig -+++ b/configs/rock-5c-rk3588s_defconfig -@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_PCI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_FIT=y - CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig -index e5c9072c27f..35852c017da 100644 +index f3a5c2c45f3..d95576e804a 100644 --- a/configs/rock-pi-4-rk3399_defconfig +++ b/configs/rock-pi-4-rk3399_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -683,11 +606,11 @@ index e5c9072c27f..35852c017da 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y - # CONFIG_ANDROID_BOOT_IMAGE is not set diff --git a/configs/rock-pi-4c-rk3399_defconfig b/configs/rock-pi-4c-rk3399_defconfig -index 4be7b0f8130..eeee446a5bd 100644 +index 9bda50c8c77..d26eb3dcb44 100644 --- a/configs/rock-pi-4c-rk3399_defconfig +++ b/configs/rock-pi-4c-rk3399_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -696,11 +619,11 @@ index 4be7b0f8130..eeee446a5bd 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y - # CONFIG_ANDROID_BOOT_IMAGE is not set diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig -index 602a723ea7d..3dcc2932ae3 100644 +index a9c6d8a907a..1cde3859eef 100644 --- a/configs/rock-pi-n10-rk3399pro_defconfig +++ b/configs/rock-pi-n10-rk3399pro_defconfig @@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -713,7 +636,7 @@ index 602a723ea7d..3dcc2932ae3 100644 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399pro-rock-pi-n10.dtb" # CONFIG_CONSOLE_MUX is not set diff --git a/configs/rock5a-rk3588s_defconfig b/configs/rock5a-rk3588s_defconfig -index 24b2eef35f2..c5830054921 100644 +index 9618d590009..9608f7e7e4c 100644 --- a/configs/rock5a-rk3588s_defconfig +++ b/configs/rock5a-rk3588s_defconfig @@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -726,7 +649,7 @@ index 24b2eef35f2..c5830054921 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/rock5b-rk3588_defconfig b/configs/rock5b-rk3588_defconfig -index da5fb3a2c30..053346fc035 100644 +index 47ee2109f8e..e1c6961a3ab 100644 --- a/configs/rock5b-rk3588_defconfig +++ b/configs/rock5b-rk3588_defconfig @@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -735,11 +658,11 @@ index da5fb3a2c30..053346fc035 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig -index db121f03ae6..e55f1b6a034 100644 +index aebfa73459c..8b60ad3bf00 100644 --- a/configs/rock960-rk3399_defconfig +++ b/configs/rock960-rk3399_defconfig @@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -752,7 +675,7 @@ index db121f03ae6..e55f1b6a034 100644 CONFIG_SYS_PBSIZE=1052 CONFIG_DISPLAY_BOARDINFO_LATE=y diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig -index 1d2bff35fc0..ea8e90b9f6a 100644 +index 08b7e2784e9..d80e120c66f 100644 --- a/configs/rockpro64-rk3399_defconfig +++ b/configs/rockpro64-rk3399_defconfig @@ -20,6 +20,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -765,7 +688,7 @@ index 1d2bff35fc0..ea8e90b9f6a 100644 CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 diff --git a/configs/sige7-rk3588_defconfig b/configs/sige7-rk3588_defconfig -index 00b9759715b..1b837bd554c 100644 +index 8b033e22b84..978df10442c 100644 --- a/configs/sige7-rk3588_defconfig +++ b/configs/sige7-rk3588_defconfig @@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 @@ -774,11 +697,11 @@ index 00b9759715b..1b837bd554c 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/soquartz-blade-rk3566_defconfig b/configs/soquartz-blade-rk3566_defconfig -index 7de159a8881..4137f0459b5 100644 +index a1a51b2c657..4083f217c0b 100644 --- a/configs/soquartz-blade-rk3566_defconfig +++ b/configs/soquartz-blade-rk3566_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 @@ -787,11 +710,11 @@ index 7de159a8881..4137f0459b5 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/soquartz-cm4-rk3566_defconfig b/configs/soquartz-cm4-rk3566_defconfig -index 4455ee5b5aa..ad63ba0204f 100644 +index a8bca0eaccc..c3dd48d9dc1 100644 --- a/configs/soquartz-cm4-rk3566_defconfig +++ b/configs/soquartz-cm4-rk3566_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 @@ -800,11 +723,11 @@ index 4455ee5b5aa..ad63ba0204f 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/soquartz-model-a-rk3566_defconfig b/configs/soquartz-model-a-rk3566_defconfig -index abdab514496..9e01345bdaa 100644 +index f080d2e36d2..f6f2f67b0a6 100644 --- a/configs/soquartz-model-a-rk3566_defconfig +++ b/configs/soquartz-model-a-rk3566_defconfig @@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 @@ -813,11 +736,11 @@ index abdab514496..9e01345bdaa 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/tiger-rk3588_defconfig b/configs/tiger-rk3588_defconfig -index 105e8e10e0b..bcc2ae302a5 100644 +index f962ac416f3..1fc7301f6ae 100644 --- a/configs/tiger-rk3588_defconfig +++ b/configs/tiger-rk3588_defconfig @@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 @@ -830,7 +753,7 @@ index 105e8e10e0b..bcc2ae302a5 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/toybrick-rk3588_defconfig b/configs/toybrick-rk3588_defconfig -index 14b231ae3e2..7af393731cd 100644 +index 5e70341c987..fd7e842f9e5 100644 --- a/configs/toybrick-rk3588_defconfig +++ b/configs/toybrick-rk3588_defconfig @@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 @@ -843,7 +766,7 @@ index 14b231ae3e2..7af393731cd 100644 CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y diff --git a/configs/turing-rk1-rk3588_defconfig b/configs/turing-rk1-rk3588_defconfig -index 0b3efec23e6..515db2a2b0c 100644 +index 0eddf15833c..1a9aacc7b5d 100644 --- a/configs/turing-rk1-rk3588_defconfig +++ b/configs/turing-rk1-rk3588_defconfig @@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEBC0000 @@ -852,9 +775,9 @@ index 0b3efec23e6..515db2a2b0c 100644 CONFIG_DEBUG_UART=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y - CONFIG_SPL_FIT_SIGNATURE=y -- -2.54.0 +2.47.1 diff --git a/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch b/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch deleted file mode 100644 index bef5a9e..0000000 --- a/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch +++ /dev/null @@ -1,39 +0,0 @@ -From aef38432fbc93621b434836b95b10c28aa880e84 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 9 Dec 2025 20:51:06 +0000 -Subject: [PATCH 1/2] rockchip: rk3568-nanopi-r5: Drop duplicated/extra sdhci - -The pinctrl settings are now upstream, with the upstream -voltage supplies, and the HS200 mode is confirmed to work -fine but the HS400 mode had reported issues so let's just -consume what the upstream DT has now as it's all known good. - -Reported-by: Dusty Mabe -Tested-by: Dusty Mabe -Signed-off-by: Peter Robinson ---- - arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi -index 64c43374c04..7e24be1a5e7 100644 ---- a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi -+++ b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi -@@ -12,14 +12,6 @@ - /delete-property/ vpcie3v3-supply; - }; - --&sdhci { -- cap-mmc-highspeed; -- mmc-hs200-1_8v; -- mmc-hs400-1_8v; -- mmc-hs400-enhanced-strobe; -- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; --}; -- - &vcc5v0_usb_host { - /delete-property/ regulator-always-on; - /delete-property/ regulator-boot-on; --- -2.52.0 - diff --git a/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch b/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch deleted file mode 100644 index c67e4af..0000000 --- a/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 29efc0396809384cf37bfcfb01c62e63216fa998 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 9 Dec 2025 21:13:46 +0000 -Subject: [PATCH 2/2] rockchip: rk356x: Stop overriding sdhci/mmc aliases - -Upstream device tree has rules where the aliases are board -specific settings, no SoC settings. Looking at upstream -rk356x boards there's a lot of variation in the setting of -mmc0/mmc1 based on the device so we should not be overriding -this here and now we sync to upstream we should just consume -those settings, to do otherwise confuses users. - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/rk356x-u-boot.dtsi | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/arch/arm/dts/rk356x-u-boot.dtsi b/arch/arm/dts/rk356x-u-boot.dtsi -index 738b9673d35..f25c7970208 100644 ---- a/arch/arm/dts/rk356x-u-boot.dtsi -+++ b/arch/arm/dts/rk356x-u-boot.dtsi -@@ -7,8 +7,6 @@ - - / { - aliases { -- mmc0 = &sdhci; -- mmc1 = &sdmmc0; - spi4 = &sfc; - }; - --- -2.52.0 - diff --git a/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch b/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch deleted file mode 100644 index 6d54fa7..0000000 --- a/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch +++ /dev/null @@ -1,256 +0,0 @@ -From patchwork Tue Aug 4 13:39:15 2026 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Gregor Herburger -X-Patchwork-Id: 2280865 -X-Patchwork-Delegate: pbrobinson@gmail.com -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=fail reason="signature verification failed" (2048-bit key; - unprotected) header.d=lists.u-boot-project.org - header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default - header.b=DFFhfbAr; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org - (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; - envelope-from=u-boot-bounces@lists.u-boot-project.org; - receiver=patchwork.ozlabs.org) -Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4hDvm8025rz1xqD - for ; Tue, 04 Aug 2026 23:39:35 +1000 (AEST) -Received: from localhost (localhost [127.0.0.1]) - by smtp3.osuosl.org (Postfix) with ESMTP id 2536960600; - Tue, 4 Aug 2026 13:39:34 +0000 (UTC) -X-Virus-Scanned: amavis at osuosl.org -Received: from smtp3.osuosl.org ([127.0.0.1]) - by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP - id T9Kb3BtsvOX4; Tue, 4 Aug 2026 13:39:33 +0000 (UTC) -X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; - helo=lists1.osuosl.org; - envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= -DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4350560615 -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=lists.u-boot-project.org ; s=default; t=1785850773; - bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=; - h=From:Date:Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive: - List-Post:List-Help:List-Subscribe:From; - b=DFFhfbArDuHrxJEuZryw3QEVVVcavwAril7tcxulQVs6jkVOCAjh7GEuhkq8EyLIq - suopR14b5dkKpVbbSr23u2v9jRgpynJQ5WBq6kIJSqjmZt58tZeMbaX76PRHjOs8+s - QHatP0Vxf1ny0BOpVlZLZ/LlAsQhypNhW6/qjH0X9OLeNq0IFjSZ5faD3z463b62m0 - yMuPrAXa/kuPPInxGG6HsCPkRzFH3x9hM15r7ipSbXODTRXaVBSVScp03eAeo6zw/d - nll/wcjCEe/78XX5o1Tsug951g7H8meDRnGQHJZtvbEmHdDB1wkTXYdFI2EGwnDxsz - W3dcHoUveJgqQ== -Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) - by smtp3.osuosl.org (Postfix) with ESMTP id 4350560615; - Tue, 4 Aug 2026 13:39:33 +0000 (UTC) -X-Original-To: u-boot@lists.u-boot-project.org -Delivered-To: u-boot@lists.u-boot-project.org -Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) - by lists1.osuosl.org (Postfix) with ESMTP id 3009E2BF - for ; Tue, 4 Aug 2026 13:39:31 +0000 (UTC) -Received: from localhost (localhost [127.0.0.1]) - by smtp1.osuosl.org (Postfix) with ESMTP id 222DC8086C - for ; Tue, 4 Aug 2026 13:39:31 +0000 (UTC) -X-Virus-Scanned: amavis at osuosl.org -Received: from smtp1.osuosl.org ([127.0.0.1]) - by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP - id W5OoNRat257d for ; - Tue, 4 Aug 2026 13:39:30 +0000 (UTC) -X-Greylist: delayed 94239 seconds by postgrey-1.37 at util1.osuosl.org; - Tue, 04 Aug 2026 13:39:29 UTC -DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1B0B580827 -DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1B0B580827 -Received-SPF: Pass (mailfrom) identity=mailfrom; - client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; - envelope-from=gregor.herburger@linutronix.de; receiver= -Received: from galois.linutronix.de (Galois.linutronix.de - [IPv6:2a0a:51c0:0:12e:550::1]) - by smtp1.osuosl.org (Postfix) with ESMTPS id 1B0B580827 - for ; Tue, 4 Aug 2026 13:39:29 +0000 (UTC) -From: Gregor Herburger -Date: Tue, 04 Aug 2026 15:39:15 +0200 -Subject: [PATCH v3] rpi: copy /chosen/bootloader partition and set - boot_partition -MIME-Version: 1.0 -Message-Id: <20260804-tryboot2-v3-1-b0bc282a923b@linutronix.de> -X-B4-Tracking: v=1; b=H4sIAILrcWoC/22OywrCMBBFf0WyNpKHbYor/0O6SNOJjWgiSRpaS - v/dpCKCyKwO3HvmLiiANxDQabcgD8kE42wGvt8hNUh7BWz6zIgRVpOGcBz93DkXGW5UxRjlooZ - Kohx/etBm2lSX9s1h7G6gYumXhPbugePgQX6VgjQfJU4U5+OSHiVIpQU9340do3fWTIceimIwI - To/b3MTK6/+LEssezhRRFDNAGj142nXdX0BG/Mh6/kAAAA= -X-Change-ID: 20260803-tryboot2-8c5221376e5a -To: u-boot@lists.u-boot-project.org -Cc: Matthias Brugger , - Peter Robinson , Tom Rini , - =?utf-8?q?Filip_Kokosi=C5=84ski?= , - Ilias Apalodimas , - Gregor Herburger -X-Developer-Signature: v=1; a=ed25519-sha256; t=1785850764; l=3191; - i=gregor.herburger@linutronix.de; s=20260226; h=from:subject:message-id; - bh=4mVT/kFDHBnjUUlqljWBZ+t7aLa+t+gE+t/hUJ4uc5g=; - b=TBKoGScdkXGUfpGLvpVtYHkg4LDoOR/8M/do2dqU2QlR+9Z9YFNN6x88pDC7UIDeXrJS+Hpeg - e3YsfK6fOcoBgXOuzz3Aabmmn9//OQN7WG6Vz15rSxX0uVZ96TFcvf5 -X-Developer-Key: i=gregor.herburger@linutronix.de; a=ed25519; - pk=u72Lv7+/lS5CC1hmSrb17lv/6CK7HBh4Lvz77PHA5LM= -X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=linutronix.de; s=2020; t=1785850765; - h=from:from:reply-to:subject:subject:date:date:message-id:message-id: - to:to:cc:cc:mime-version:mime-version:content-type:content-type: - content-transfer-encoding:content-transfer-encoding; - bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=; - b=plU5oAFojHvTlDhOGINsdXnnc0AnS9OY0C4LB9dSy9uyrPKBBpLWGWj3xmNoX87lLZlhO9 - z0H+R5gqw5NfxbTVYFHqZnW+pW4xJQFW9fMYSU8/k2RRg9JEqP+NrZ8Y720ujlycxn05vP - sF7cD+TEsxvyBhnbRyq82obvpdQIYj0D6T3UkHyz0U4G+5k8dVhhv/mqGaSfY8xW4cCl5G - gIE2QIsuzB4g4pQoW70DrLd7cyqqDM0iDrrXFZL2a7DlnYgbe1ULVXMl05UMMQGfBkHmog - pt8e+zvO4AVA3G8CKcUQhhWOZm7uycUpdrNuyPKg9K7JB6MEd9dHbucVa+v8Yg== -X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; - d=linutronix.de; s=2020e; t=1785850765; - h=from:from:reply-to:subject:subject:date:date:message-id:message-id: - to:to:cc:cc:mime-version:mime-version:content-type:content-type: - content-transfer-encoding:content-transfer-encoding; - bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=; - b=NAMrZHs0ETYIMiwBHLvCoR3NOcg/kwkAxVRq6Q/pdhfkQJjxtHU3mZFV520QjbE1yeix0S - nJyAqHgyKVlRiZCw== -X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; - dmarc=pass (p=none dis=none) - header.from=linutronix.de -X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; - dkim=pass (2048-bit key, unprotected) header.d=linutronix.de - header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=plU5oAFo; - dkim=pass header.d=linutronix.de header.i=@linutronix.de - header.a=ed25519-sha256 header.s=2020e header.b=NAMrZHs0 -X-BeenThere: u-boot@lists.u-boot-project.org -X-Mailman-Version: 2.1.30 -Precedence: list -List-Id: U-Boot discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: u-boot-bounces@lists.u-boot-project.org -Sender: "U-Boot" - -The Raspberry Pi has the "tryboot" feature where it can boot from a -different partition enabling failsafe A/B updates. After boot the -firmware sets 'partition' property in /chosen/bootloader. - -Copy the /chosen/bootloader node to the device tree. - -Set the env variable boot_partition accordingly to allow boards to -create a bootcmd based on the boot partition. - -Reviewed-by: Matthias Brugger -Signed-off-by: Gregor Herburger ---- -Changes in v3: -- Copy the complete '/chosen/bootloader' node instead of only the - partition property -- Link to v2: https://patch.msgid.link/20260803-tryboot2-v2-1-30c071f2ee15@linutronix.de - -Changes in v2: -- update Reviewed-by tag ---- - board/raspberrypi/rpi/rpi.c | 51 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 51 insertions(+) - - ---- -base-commit: baa64b2f892890f00a377eac4a3e685472bb56b5 -change-id: 20260803-tryboot2-8c5221376e5a - -Best regards, --- -Gregor Herburger - -diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c -index 1da5df92351c..ba8a2c1ba4cf 100644 ---- a/board/raspberrypi/rpi/rpi.c -+++ b/board/raspberrypi/rpi/rpi.c -@@ -480,6 +480,20 @@ static void set_serial_number(void) - env_set("serial#", serial_string); - } - -+static void set_boot_partition_fdt(void) -+{ -+ void *fdtp = (void *)gd->fdt_blob; -+ u32 partition; -+ -+ partition = fdt_getprop_u32_default(fdtp, "/chosen/bootloader", "partition", 1); -+ if (!partition) { -+ printf("Failed to the get partition property.\n"); -+ return; -+ } -+ -+ env_set_ulong("boot_partition", partition); -+} -+ - int misc_init_r(void) - { - set_fdt_addr(); -@@ -489,6 +503,7 @@ int misc_init_r(void) - set_board_info(); - #endif - set_serial_number(); -+ set_boot_partition_fdt(); - - return 0; - } -@@ -579,6 +594,39 @@ int board_fdt_blob_setup(void **fdtp) - return 0; - } - -+int copy_node_all_properties(void *dst, void *src, const char *path, const char *node) -+{ -+ int src_parent, dst_parent; -+ int src_node, dst_node; -+ int prop; -+ int len; -+ -+ src_parent = fdt_path_offset(src, path); -+ dst_parent = fdt_path_offset(dst, path); -+ if (src_parent < 0 || dst_parent < 0) -+ return -1; -+ -+ src_node = fdt_subnode_offset(src, src_parent, node); -+ if (src_node < 0) -+ return -1; -+ -+ dst_node = fdt_find_or_add_subnode(dst, dst_parent, node); -+ if (dst_node < 0) -+ return -1; -+ -+ fdt_for_each_property_offset(prop, src, src_node) { -+ const char *name; -+ const void *value = fdt_getprop_by_offset(src, prop, &name, &len); -+ -+ if (!value || !name) -+ continue; -+ -+ fdt_setprop(dst, dst_node, name, value, len); -+ } -+ -+ return 0; -+} -+ - int copy_property(void *dst, void *src, char *path, char *property) - { - int dst_offset, src_offset; -@@ -641,6 +689,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) - - /* copy uart clk as provided by the firmware */ - copy_property(fdt, fw_fdt, "/clocks/clk-uart", "clock-frequency"); -+ -+ /* Copy the bootloader node */ -+ copy_node_all_properties(fdt, fw_fdt, "/chosen", "bootloader"); - } - - int ft_board_setup(void *blob, struct bd_info *bd) diff --git a/rpi-fixes.patch b/rpi-fixes.patch new file mode 100644 index 0000000..352261b --- /dev/null +++ b/rpi-fixes.patch @@ -0,0 +1,156 @@ +From 27e0160320c13168ab5d703c5ec4bec87a6d2700 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 29 Dec 2024 14:46:05 +0000 +Subject: [PATCH 1/4] rpi: Add identifiers for the new RPi 5 series + +The Raspberry Pi foundation have released the Raspberry +Pi 500, CM5 an CM5 lite devices so add the assoicated +revision identifers so we can detect them. + +Signed-off-by: Peter Robinson +Acked-by: Matthias Brugger +--- + board/raspberrypi/rpi/rpi.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index aa39afa338a..4d546892842 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -193,6 +193,21 @@ static const struct rpi_model rpi_models_new_scheme[] = { + DTB_DIR "bcm2712-rpi-5-b.dtb", + true, + }, ++ [0x18] = { ++ "Compute Module 5", ++ DTB_DIR "bcm2712-rpi-cm5-cm5io.dtb", ++ true, ++ }, ++ [0x19] = { ++ "500", ++ DTB_DIR "bcm2712-rpi-500.dtb", ++ true, ++ }, ++ [0x1A] = { ++ "Compute Module 5 Lite", ++ DTB_DIR "bcm2712-rpi-cm5l-cm5io.dtb", ++ true, ++ }, + }; + + static const struct rpi_model rpi_models_old_scheme[] = { +-- +2.48.1 + +From 2d75c46be99c15fa186436c149b87ee97e0b8f44 Mon Sep 17 00:00:00 2001 +From: Martin Stolpe +Date: Wed, 23 Oct 2024 15:09:20 +0200 +Subject: [PATCH 2/4] rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is + set + +The functions fdt_simplefb_add_node and fdt_simplefb_enable_and_mem_rsv +are only available if CONFIG_FDT_SIMPLEFB is enabled. + +Signed-off-by: Martin Stolpe +Acked-by: Matthias Brugger +Signed-off-by: Peter Robinson +--- + board/raspberrypi/rpi/rpi.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 4d546892842..fe6153b388b 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -604,11 +604,13 @@ int ft_board_setup(void *blob, struct bd_info *bd) + + update_fdt_from_fw(blob, (void *)fw_dtb_pointer); + +- node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer"); +- if (node < 0) +- fdt_simplefb_add_node(blob); +- else +- fdt_simplefb_enable_and_mem_rsv(blob); ++ if (CONFIG_IS_ENABLED(FDT_SIMPLEFB)) { ++ node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer"); ++ if (node < 0) ++ fdt_simplefb_add_node(blob); ++ else ++ fdt_simplefb_enable_and_mem_rsv(blob); ++ } + + #ifdef CONFIG_EFI_LOADER + /* Reserve the spin table */ +-- +2.48.1 + +From fc7a3110184a3ca4c227675b20d3a4887210e36c Mon Sep 17 00:00:00 2001 +From: Fiona Klute +Date: Wed, 12 Feb 2025 12:39:01 +0100 +Subject: [PATCH 3/4] Raspberry Pi: Keep warnings from firmware in DT, if any + +The /chosen/user-warnings property is created by the RPi firmware if +there are warnings to report, keep it to make debugging easier. + +For example, if the firmware config.txt contains +"dtoverlay=error-example" and that example references an undefined +symbol "&nosuchdev" the warning can be read after boot: + +$ cat /proc/device-tree/chosen/user-warnings +dterror: can't find symbol 'nosuchdev' +Failed to resolve overlay 'error-example' + +Signed-off-by: Fiona Klute +Reviewed-by: Matthias Brugger +Signed-off-by: Peter Robinson +--- + board/raspberrypi/rpi/rpi.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index fe6153b388b..43efb0dbc1d 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -594,6 +594,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) + /* kernel address randomisation seed as provided by the firmware */ + copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed"); + ++ /* warnings from the firmware (if any) */ ++ copy_property(fdt, fw_fdt, "/chosen", "user-warnings"); ++ + /* address of the PHY device as provided by the firmware */ + copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); + } +-- +2.48.1 + +From e042d7593a0b7544259fd2d22240e78d18912746 Mon Sep 17 00:00:00 2001 +From: Fiona Klute +Date: Wed, 12 Feb 2025 12:39:02 +0100 +Subject: [PATCH 4/4] Raspberry Pi: Copy Bluetooth device address in DT + +The firmware sets local-bd-address, copy it when loading a new DT. + +Signed-off-by: Fiona Klute +Signed-off-by: Peter Robinson +--- + board/raspberrypi/rpi/rpi.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 43efb0dbc1d..70d3c35499b 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -599,6 +599,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) + + /* address of the PHY device as provided by the firmware */ + copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); ++ ++ /* Bluetooth device address as provided by the firmware */ ++ copy_property(fdt, fw_fdt, "/soc/serial@7e201000/bluetooth", "local-bd-address"); + } + + int ft_board_setup(void *blob, struct bd_info *bd) +-- +2.48.1 + diff --git a/rpi-uart-clock-when-loading-kernel-with-non-boot-DT.patch b/rpi-uart-clock-when-loading-kernel-with-non-boot-DT.patch new file mode 100644 index 0000000..ade9652 --- /dev/null +++ b/rpi-uart-clock-when-loading-kernel-with-non-boot-DT.patch @@ -0,0 +1,161 @@ +From patchwork Tue Apr 15 08:30:14 2025 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Bruno Leite +X-Patchwork-Id: 2072903 +X-Patchwork-Delegate: pbrobinson@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Authentication-Results: legolas.ozlabs.org; + dkim=pass (2048-bit key; + unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 + header.s=20230601 header.b=NLOXFHyi; + dkim-atps=neutral +Authentication-Results: legolas.ozlabs.org; + spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de + (client-ip=85.214.62.61; helo=phobos.denx.de; + envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) +Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature ECDSA (secp384r1)) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZcPCY0L1rz1yHt + for ; Tue, 15 Apr 2025 22:50:49 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 308EB82AFB; + Tue, 15 Apr 2025 14:50:29 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=gmail.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Authentication-Results: phobos.denx.de; + dkim=pass (2048-bit key; + unprotected) header.d=gmail.com header.i=@gmail.com header.b="NLOXFHyi"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 349F98056A; Tue, 15 Apr 2025 10:30:28 +0200 (CEST) +X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de +X-Spam-Level: +X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, + RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham + autolearn_force=no version=3.4.2 +Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com + [IPv6:2a00:1450:4864:20::22b]) + (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 3962A82047 + for ; Tue, 15 Apr 2025 10:30:26 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=gmail.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=brunosampaioleite@gmail.com +Received: by mail-lj1-x22b.google.com with SMTP id + 38308e7fff4ca-30bfc8faef9so49423241fa.1 + for ; Tue, 15 Apr 2025 01:30:26 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1744705825; x=1745310625; darn=lists.denx.de; + h=content-transfer-encoding:mime-version:references:in-reply-to + :message-id:date:subject:cc:to:from:from:to:cc:subject:date + :message-id:reply-to; + bh=G/bK1K44Dr1qFbZickUlvWkto/6r+BtRySFxyVDIYKY=; + b=NLOXFHyi7dXqHhrg8fkx5lISJ9rd6xXpixrCEDfKShdvqjvn2vMkVHivrB/UmT5q/m + Rcn0ad8zpPX+B1FfTwwkq4froYJpiBB3hfDhWs7VhphrtvcoOdo1odSLFDY+94ycwMrH + SByxwk76lvnn/WPl/K20jk3AacL4eitsWe6coH11QAw1Ff7ub3lukIMOHwph9KvyBBCO + rDC59cJIVrN7JGycd5bVjEbPQL20S8ElhQFxzpA/Oay5mRcuWOz9kPtXDepqVY3OTeRD + xVYZBQmbfdH+ddX0djm3HK4NeFgarV9FrclE37evniLeATkMGoB6vWwtfQHQzGnZi9XM + 1yZQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1744705825; x=1745310625; + h=content-transfer-encoding:mime-version:references:in-reply-to + :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc + :subject:date:message-id:reply-to; + bh=G/bK1K44Dr1qFbZickUlvWkto/6r+BtRySFxyVDIYKY=; + b=aJrgDOltnMKa4/yUhPGvvzqv8fUsRjhtiQXqF20Ymo2bHr0kbVeb5jFe/TzFShZYoD + bmirjua4chjbqAuDu0hPub/QpZdCyKrlFKWI/+yp82mTlCakauWD+2ouH+uTR3LgV9/T + p2etUHhRr/1cdNUumKjbHK5ePRPZ1fj4kTq3Tr7PFfE2F1HctVcGt+5Eg0eGdDxB/CNY + fzT82UD+QbEtpyLp3b1DL5m2kvMNPjVtsUMnaldTfwrA3UicBAXnx5/aNwK8mi3ZbF1p + zd+QdEDjuLtdboBfffvanhpOnx7DFBWHxiQYy3nIx9kGV9apFJZZw6g2w46mIHxJ9qpK + vs4A== +X-Gm-Message-State: AOJu0YwFtor9kanZ4bPXgxW0Caq1SXAjjr1eoMtteqd6a/rCRGtBSoCz + 2nTZsmUy7rN+RuLT0b0YkYdB4Nap8ZheIEJjBpYYy86I0HBvDOCEorH+8zHIOu0Q2A== +X-Gm-Gg: ASbGncuvhE42LjbCtWsarbjkyrOyVA/mrkKOUPBAgzW/qnUKh7MwX9QNl5kSLSTzn2x + NVqmx7hNTBoFrwXVi4qN6/9oQbYDvg5w3q4qaRjK1FSsBvwHor7Qrqso4bleSYBBbp89rvTNKGN + cQxKrjEuhwK1IGGp5Si31mh/uHdkNoNlXvJGgUhNC5jjedj0tGwWLzKuau775LircGiFhFkXlmg + vvKDSS9iaFj9jLuUnbu7i3HGC98ZSaO1UWogeOvncthddQXzEPMwtiiR4+HzAFh27h9pihboSgQ + bf41IZ0AmlDUKSrxJRPRtfUlOJ1TRA5TMFL2vAPYxty+pgqFrriC8oOsemfm5DvdxQNjoM2NG7/ + ZxkxfMxEZ +X-Google-Smtp-Source: + AGHT+IHMd8cQWJx/NJpA+NT/8JfqwmGZg8ekGgpeyeFGMd3DfCJ5kuQYxSAip7G9Y3zA2jvJMPH6xw== +X-Received: by 2002:a2e:b8c4:0:b0:309:1fee:378d with SMTP id + 38308e7fff4ca-31049a1cf35mr46597761fa.19.1744705825108; + Tue, 15 Apr 2025 01:30:25 -0700 (PDT) +Received: from brule-Precision-3590.prevas.se ([81.216.59.226]) + by smtp.gmail.com with ESMTPSA id + 38308e7fff4ca-30f464cc0a2sm19679971fa.31.2025.04.15.01.30.23 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Tue, 15 Apr 2025 01:30:24 -0700 (PDT) +From: Bruno Leite +To: u-boot@lists.denx.de +Cc: pbrobinson@gmail.com, Matthias Brugger , + clast@prevas.dk, ravi@prevas.dk, Bruno Leite , + Fiona Klute , Francois Berder , + Ilias Apalodimas , + Martin Stolpe , + Patrice Chotard , + Rasmus Villemoes , + Simon Glass , Tom Rini +Subject: [PATCH 1/1] rpi: copy over uart clock-frequency in DT +Date: Tue, 15 Apr 2025 10:30:14 +0200 +Message-ID: <20250415083017.3523317-2-brunosampaioleite@gmail.com> +X-Mailer: git-send-email 2.45.2 +In-Reply-To: <20250415083017.3523317-1-brunosampaioleite@gmail.com> +References: <20250415083017.3523317-1-brunosampaioleite@gmail.com> +MIME-Version: 1.0 +X-Mailman-Approved-At: Tue, 15 Apr 2025 14:50:26 +0200 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.39 +Precedence: list +List-Id: U-Boot discussion +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Bruno Leite + +rpi5 firmware sets uart_clk clock-frequency in +the firmware and patches it to the DT, copy it +over when loading a new DT. + +Signed-off-by: Bruno Leite +Reviewed-by: Peter Robinson +Tested-by: Peter Robinson +--- + + board/raspberrypi/rpi/rpi.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 70d3c35499b..5c84c324c71 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -602,6 +602,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) + + /* Bluetooth device address as provided by the firmware */ + copy_property(fdt, fw_fdt, "/soc/serial@7e201000/bluetooth", "local-bd-address"); ++ ++ /* copy uart clk as provided by the firmware */ ++ copy_property(fdt, fw_fdt, "/clocks/clk-uart", "clock-frequency"); + } + + int ft_board_setup(void *blob, struct bd_info *bd) diff --git a/sources b/sources index 08618e7..7b3d380 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (u-boot-v2026.10-rc3.tar.bz2) = e993f5d78a1ac0eb11f00e3730ff23eb880e206036f78c3eb74852b846a23d59111b4b07f4ced2c88c61a8c1627036c3cc32717c0efcf819376c5cd0a34183d2 +SHA512 (u-boot-2025.07-rc4.tar.bz2) = 5d72c3848c440b585644aed7664b6e85adaf623a96d6fa5389e85f9c3e5046a3dae94cf2d076e6654a6175e1d11d2f9612de301b70c6537ee85d4cfd9955c010 diff --git a/uboot-tools.spec b/uboot-tools.spec index 056cc94..2b87e82 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,26 +1,35 @@ -%global candidate rc3 +%global candidate rc4 %if 0%{?rhel} %bcond_with toolsonly %else %bcond_without toolsonly %endif +%global debug_package %{nil} + # Set it to "opensbi" (stable) or "opensbi-unstable" (unstable, git) %global opensbi opensbi Name: uboot-tools -Version: 2026.10 +Version: 2025.07 Release: 0.3%{?candidate:.%{candidate}}%{?dist} Epoch: 1 Summary: U-Boot utilities # Automatically converted from old format: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ - review is highly recommended. License: GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LGPL-2.1-or-later AND LGPL-2.0-or-later -URL: https://u-boot-project.org/ -ExcludeArch: s390x -Source0: https://git.u-boot-project.org/u-boot/u-boot/-/archive/v%{version}%{?candidate:-%{candidate}}/u-boot-v%{version}%{?candidate:-%{candidate}}.tar.bz2 +URL: http://www.denx.de/wiki/U-Boot + +Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 Source1: aarch64-boards Source2: riscv64-boards -Source3: x86_64-boards + +Source10: rk3588-boards +Source11: rk3568-boards +Source12: rk3566-boards + +Source20: rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin +Source21: rk3568_ddr_1056MHz_v1.23.bin +Source22: rk3566_ddr_1056MHz_v1.23.bin # Fedora patches to enable/disable features Patch1: disable-VBE-by-default.patch @@ -30,28 +39,21 @@ Patch3: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch # Identify VFAT partitions as ESP, allows EFI setvar on our images Patch4: uefi-Add-all-options-for-EFI-System-Partitions.patch # New function to find fdt for loading from disk -Patch5: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch +Patch6: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch # Enable UEFI SetVariable for devices without backed storage -Patch6: uefi-enable-SetVariableRT-with-volotile-storage.patch -# Enable UEFI HTTPS boot for all Fedora firmware -Patch7: uefi-enable-https-boot-by-default.patch +Patch7: uefi-enable-SetVariableRT-with-volotile-storage.patch +# Should be upstream but it's taking time +#Patch8: Add-video-damage-tracking.patch # Device improvments -# USB-PD improvements -Patch10: USB-PD-TCPM-improvements.patch # Rockchips improvements -Patch11: rockchip-Enable-preboot-start-for-pci-usb.patch -Patch13: rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch -# Jetson fixes -Patch14: p3450-fix-board.patch -Patch15: JetsonTX2-Fix-upstream-device-tree-naming.patch -# Fix AllWinner -Patch16: Allwinner-fix-booting-on-a-number-of-devices.patch -# RPi -Patch20: Fix-NVMe-not-only-on-Raspberry-Pi-5.patch -Patch21: raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch -Patch22: rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch +Patch10: rockchip-Enable-preboot-start-for-pci-usb.patch +# USB-PD improvements +Patch11: USB-PD-TCPM-improvements.patch +# Rockchip DT rebase for fixes +Patch12: 0001-Rebase-to-upstream-6.15.5-rockchip-DTs.patch +ExclusiveArch: aarch64 BuildRequires: bc BuildRequires: bison BuildRequires: dtc @@ -60,47 +62,31 @@ BuildRequires: gcc BuildRequires: gnutls-devel BuildRequires: libuuid-devel BuildRequires: make -BuildRequires: ncurses-devel -%if 0%{?fedora} > 44 -BuildRequires: openssl3-devel -BuildRequires: openssl3-devel-engine -%else -BuildRequires: openssl-devel BuildRequires: openssl-devel-engine -%endif BuildRequires: perl-interpreter BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-libfdt -BuildRequires: SDL2-devel BuildRequires: swig -%if %{with toolsonly} -%ifarch aarch64 BuildRequires: arm-trusted-firmware-armv8 -BuildRequires: optee-os-firmware-armv8 -BuildRequires: crust-firmware BuildRequires: python3-pyelftools BuildRequires: xxd -%endif %ifarch riscv64 BuildRequires: %{opensbi} %endif -%endif Requires: dtc +BuildRequires: uboot-tools %description This package contains a few U-Boot utilities - mkimage for creating boot images and fw_printenv/fw_setenv for manipulating the boot environment variables. -%if %{with toolsonly} -%ifarch aarch64 -%package -n uboot-images-armv8 +%package -n uboot-images-copr Summary: U-Boot firmware images for aarch64 boards BuildArch: noarch -%description -n uboot-images-armv8 +%description -n uboot-images-copr U-Boot firmware binaries for aarch64 boards -%endif %ifarch riscv64 %package -n uboot-images-riscv64 @@ -111,104 +97,62 @@ BuildArch: noarch U-Boot firmware binaries for riscv64 boards %endif -%ifarch x86_64 -%package -n uboot-images-x86_64 -Summary: U-Boot firmware images for x86_64 boards -BuildArch: noarch - -%description -n uboot-images-x86_64 -U-Boot firmware binaries for x86_64 boards -%endif -%endif - %prep -%autosetup -p1 -n u-boot-v%{version}%{?candidate:-%{candidate}} +%autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}} -cp %SOURCE1 %SOURCE2 %SOURCE3 . +cp %SOURCE1 %SOURCE2 . + +cp %SOURCE10 . +cp %SOURCE11 . +cp %SOURCE12 . + +cp %SOURCE20 . +cp %SOURCE21 . +cp %SOURCE22 . %build mkdir builds -%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-only_defconfig O=builds/ -%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/ - -%if %{with toolsonly} -# OpenSBI firmware is distributed in U-Boot SPL images -%ifarch riscv64 -export OPENSBI=%{_datadir}/%{opensbi}/generic/firmware/fw_dynamic.bin -%endif - -%ifarch aarch64 riscv64 x86_64 -for board in $(cat %{_arch}-boards) +for board in $(cat rk3588-boards) do - echo "Building board: $board" + echo "Board: $board using rk3588" mkdir builds/$(echo $board)/ - - # ATF selection, needs improving, suggestions of ATF SoC to Board matrix welcome - sun50i=(a64-olinuxino a64-olinuxino-emmc amarula_a64_relic bananapi_m64 nanopi_a64 oceanic_5205_5inmfd orangepi_win pine64-lts pine64_plus pine64_plus pinebook pinephone pinephone pinetab sopine_baseboard teres_i) - if [[ " ${sun50i[*]} " == *" $board "* ]]; then - echo "Board: $board using sun50i_a64" - cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31 - cp /usr/share/crust-firmware/a64/scp.bin builds/$(echo $board)/ - fi - sun50h5=(bananapi_m2_plus_h5 emlid_neutis_n5_devboard libretech_all_h3_cc_h5 libretech_all_h3_it_h5 libretech_all_h5_cc_h5 nanopi_neo2 nanopi_neo_plus2 nanopi_r1s_h5 orangepi_pc2 orangepi_prime orangepi_zero_plus2 orangepi_zero_plus) - if [[ " ${sun50h5[*]} " == *" $board "* ]]; then - echo "Board: $board using sun50i_h6" - cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31 - cp /usr/share/crust-firmware/h5/scp.bin builds/$(echo $board)/ - fi - sun50h6=(beelink_gs1 emlid_neutis_n5_devboard orangepi_3 orangepi_lite2 orangepi_one_plus pine_h64 tanix_tx6) - if [[ " ${sun50h6[*]} " == *" $board "* ]]; then - echo "Board: $board using sun50i_h6" - cp /usr/share/arm-trusted-firmware/sun50i_h6/bl31.bin builds/$(echo $board)/atf-bl31 - cp /usr/share/crust-firmware/h6/scp.bin builds/$(echo $board)/ - fi - sun50i_h616=(anbernic_rg35xx_h700 orangepi_zero2 orangepi_zero2w orangepi_zero3 transpeed-8k618-t x96_mate) - if [[ " ${sun50i_h616[*]} " == *" $board "* ]]; then - echo "Board: $board using sun50i_h616" - cp /usr/share/arm-trusted-firmware/sun50i_h616/bl31.bin builds/$(echo $board)/atf-bl31 - fi - rk3328=(evb-rk3328 generic-rk3328 nanopi-r2c-plus-rk3328 nanopi-r2c-rk3328 nanopi-r2s-rk3328 nanopi-r2s-plus-rk3328 orangepi-r1-plus-lts-rk3328 orangepi-r1-plus-rk3328 roc-cc-rk3328 rock64-rk3328 rock-pi-e-rk3328 rock-pi-e-v3-rk3328) - if [[ " ${rk3328[*]} " == *" $board "* ]]; then - echo "Board: $board using rk3328" - cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31 - fi - rk3368=(evb-px5 geekbox) - if [[ " ${rk3368[*]} " == *" $board "* ]]; then - echo "Board: $board using rk3368" - cp /usr/share/arm-trusted-firmware/rk3368/bl31.elf builds/$(echo $board)/atf-bl31 - fi - rk3399=(eaidk-610-rk3399 evb-rk3399 ficus-rk3399 firefly-rk3399 generic-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399) - if [[ " ${rk3399[*]} " == *" $board "* ]]; then - echo "Board: $board using rk3399" - cp /usr/share/arm-trusted-firmware/rk3399/* builds/$(echo $board)/ - cp builds/$(echo $board)/bl31.elf builds/$(echo $board)/atf-bl31 - fi - zynqmp=(xilinx_zynqmp_kria xilinx_zynqmp_virt) - if [[ " ${zynqmp[*]} " == *" $board "* ]]; then - echo "Board: $board using zynqmp" - cp /usr/share/arm-trusted-firmware/zynqmp/bl31.bin builds/$(echo $board)/atf-bl31 - fi - # End ATF - make $(echo $board)_defconfig O=builds/$(echo $board)/ - BL31=builds/$(echo $board)/atf-bl31 %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ + BL31=/usr/share/arm-trusted-firmware/rk3588/bl31.elf \ + ROCKCHIP_TPL=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin \ + %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ +done + +for board in $(cat rk3568-boards) +do + echo "Board: $board using rk3568" + mkdir builds/$(echo $board)/ + make $(echo $board)_defconfig O=builds/$(echo $board)/ + + BL31=/usr/share/arm-trusted-firmware/rk3568/bl31.elf \ + ROCKCHIP_TPL=rk3568_ddr_1056MHz_v1.23.bin \ + %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ +done + +for board in $(cat rk3566-boards) +do + echo "Board: $board using rk3566" + mkdir builds/$(echo $board)/ + make $(echo $board)_defconfig O=builds/$(echo $board)/ + + BL31=/usr/share/arm-trusted-firmware/rk3568/bl31.elf \ + ROCKCHIP_TPL=rk3566_ddr_1056MHz_v1.23.bin \ + %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ done -%endif -%endif %install -mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_datadir}/uboot/ -%if %{with toolsonly} -%ifarch aarch64 for board in $(ls builds) do - for file in u-boot.bin u-boot.img u-boot-dtb.img u-boot-sunxi-with-spl.bin u-boot-rockchip-spi.bin u-boot-rockchip.bin + for file in u-boot-rockchip-spi.bin u-boot-rockchip.bin do if [ -f builds/$(echo $board)/$(echo $file) ]; then install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) @@ -216,234 +160,12 @@ do done done -# Just for xilinx_zynqmp -for board in "xilinx_zynqmp_kria xilinx_zynqmp_virt" -do - for file in u-boot.itb spl/boot.bin - do - if [ -f builds/$(echo $board)/$(echo $file) ]; then - install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) - fi - done -done - -# For Apple M-series we also need the nodtb variant -install -pD -m 0644 builds/apple_m1/u-boot-nodtb.bin %{buildroot}%{_datadir}/uboot/apple_m1/u-boot-nodtb.bin -%endif - -%ifarch riscv64 -for board in $(ls builds) -do - for file in u-boot.itb spl/u-boot-spl.bin spl/u-boot-spl.bin.normal.out - do - if [ -f builds/$(echo $board)/$(echo $file) ]; then - install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) - fi - done -done -%endif - -%ifarch x86_64 -for board in $(ls builds) -do - for file in u-boot.rom - do - if [ -f builds/$(echo $board)/$(echo $file) ]; then - install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file) - fi - done -done -%endif - -# Bit of a hack to remove binaries we don't use as they're large -for board in $(ls builds) -do - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.dtb - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.* - fi - if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-rockchip.bin ]; then - rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.* - fi -done -%endif - -for tool in dumpimage env/fw_printenv fdt_add_pubkey fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder -do -install -p -m 0755 builds/tools/$tool %{buildroot}%{_bindir} -done -for tool in dumpimage kwboot mkeficapsule mkimage -do -install -p -m 0644 doc/$tool.1 %{buildroot}%{_mandir}/man1 -done - -install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir} -( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv ) - -%files -%license Licenses/* -%doc README doc/develop/distro.rst doc/README.gpt -%doc doc/develop/uefi doc/usage doc/arch/arm64.rst -%{_bindir}/* -%{_mandir}/man1/dumpimage.1* -%{_mandir}/man1/kwboot.1* -%{_mandir}/man1/mkeficapsule.1* -%{_mandir}/man1/mkimage.1* - -%if %{with toolsonly} -%ifarch aarch64 -%files -n uboot-images-armv8 +%files -n uboot-images-copr %license Licenses/* %dir %{_datadir}/uboot/ %{_datadir}/uboot/* -%endif - -%ifarch riscv64 -%files -n uboot-images-riscv64 -%license Licenses/* -%dir %{_datadir}/uboot/ -%{_datadir}/uboot/* -%endif - -%ifarch x86_64 -%files -n uboot-images-x86_64 -%license Licenses/* -%dir %{_datadir}/uboot/ -%{_datadir}/uboot/* -%endif -%endif %changelog -* Thu Aug 27 2026 Peter Robinson - 1:2026.10-0.3.rc3 -- Update to 2026.10 RC3 - -* Wed Aug 12 2026 Peter Robinson - 1:2026.10-0.2.rc2 -- Update to 2026.10 RC2 - -* Thu Jul 30 2026 Peter Robinson - 1:2026.10-0.1.rc1 -- Update to 2026.10 RC1 -- Update source URL - -* Fri Jul 17 2026 Fedora Release Engineering - 1:2026.07-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Tue Jul 07 2026 Peter Robinson - 1:2026.07-1 -- Update to 2026.07 GA - -* Tue Jun 23 2026 Peter Robinson - 1:2026.07-0.4.rc5 -- Update to 2026.07 RC5 - -* Mon Jun 08 2026 Peter Robinson - 1:2026.07-0.3.rc4 -- Update to 2026.07 RC4 - -* Fri May 29 2026 Peter Robinson - 1:2026.07-0.2.rc3 -- Update to 2026.07 RC3 -- Update U-Boot Project URL -- Update RPi PCIe patches -- Various RPi fixes - -* Fri May 01 2026 Peter Robinson - 1:2026.07-0.1.rc1 -- Update to 2026.07 RC1 - -* Sat Apr 11 2026 Peter Robinson - 1:2026.04-2 -- Fix PCIe/USB on Raspberry Pi 4 (rhbz#2448365) -- Fix detection of some revisions of RPi5 - -* Tue Apr 07 2026 Peter Robinson - 1:2026.04-1 -- Update to 2026.04 GA - -* Sun Mar 29 2026 Peter Robinson - 1:2026.04-0.9.rc5 -- Enable NVME booting on RPi5 - -* Tue Mar 24 2026 Peter Robinson - 1:2026.04-0.8.rc5 -- Update to 2026.04 RC5 - -* Sat Mar 14 2026 Peter Robinson - 1:2026.04-0.7.rc4 -- Raspberry Pi fixes - -* Tue Mar 10 2026 Peter Robinson - 1:2026.04-0.6.rc4 -- Update to 2026.04 RC4 - -* Fri Feb 27 2026 Peter Robinson - 1:2026.04-0.5.rc3 -- Update to 2026.04 RC3 - -* Tue Feb 17 2026 Peter Robinson - 1:2026.04-0.4.rc2 -- Add initial bcm2712d0 identification - -* Mon Feb 09 2026 Peter Robinson - 1:2026.04-0.3.rc2 -- Update to 2026.04 RC2 - -* Tue Jan 27 2026 Peter Robinson - 1:2026.04-0.2.rc1 -- Update to 2026.04 RC1 - -* Mon Jan 19 2026 Javier Martinez Canillas - 1:2026.01-3 -- Add a uboot-images-x86_64 subpackage - -* Sat Jan 17 2026 Fedora Release Engineering - 1:2026.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Tue Jan 06 2026 Peter Robinson - 1:2026.01-1 -- Update to 2026.01 GA - -* Mon Dec 29 2025 Peter Robinson - 1:2026.01-0.4.rc5 -- Update to 2026.01 RC5 - -* Mon Dec 08 2025 Peter Robinson - 1:2026.01-0.3.rc4 -- Update to 2026.01 RC4 - -* Fri Nov 28 2025 Peter Robinson - 1:2026.01-0.2.rc3 -- Updates for RPi - -* Mon Nov 24 2025 Peter Robinson - 1:2026.01-0.1.rc3 -- Update to 2026.01 RC3 - -* Thu Oct 16 2025 Peter Robinson - 1:2025.10-2 -- Drop residual Rockchip firmware (saves ~150Mb) - -* Mon Oct 13 2025 Peter Robinson - 1:2025.10-1 -- Update to 2025.10 GA (rhbz#2401964) -- Fix booting when using FW device-tree (rhbz#2402498) -- Fix for some variants of Raspberry Pi -- Fixes for Jetson device booting - -* Fri Sep 26 2025 Peter Robinson - 1:2025.10-0.7.rc5 -- Update to 2025.10 RC5 - -* Mon Sep 08 2025 Peter Robinson - 1:2025.10-0.6.rc4 -- Update to 2025.10 RC4 - -* Sun Sep 07 2025 Peter Robinson - 1:2025.10-0.5.rc3 -- Boot fixes for some Raspberry Pi variants - -* Wed Aug 27 2025 Peter Robinson - 1:2025.10-0.4.rc3 -- Fix booting on some Allwinner devices - -* Mon Aug 25 2025 Peter Robinson - 1:2025.10-0.3.rc3 -- Update to 2025.10 RC3 - -* Tue Aug 19 2025 Peter Robinson - 1:2025.10-0.2.rc2 -- Fix and re-enable Jetson Nano - -* Mon Aug 18 2025 Peter Robinson - 1:2025.10-0.1.rc2 -- Update to 2025.10 RC2 - -* Fri Jul 25 2025 Fedora Release Engineering - 1:2025.07-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jul 10 2025 Peter Robinson - 1:2025.07-2 -- Update patch for rebase issue - -* Wed Jul 09 2025 Peter Robinson - 1:2025.07-1 -- Update to 2025.07 GA - -* Fri Jun 27 2025 Peter Robinson - 1:2025.07-0.5.rc5 -- Update to 2025.07 RC5 -- Enable LWIP stack by default -- Enable HTTP(s) boot support - -* Thu Jun 26 2025 Javier Martinez Canillas - 1:2025.07-0.4.rc4 -- Add EFI_PARTITION_INFO_PROTOCOL support - * Sun Jun 15 2025 Peter Robinson - 1:2025.07-0.3.rc4 - Update to 2025.07 RC4 diff --git a/uefi-enable-https-boot-by-default.patch b/uefi-enable-https-boot-by-default.patch deleted file mode 100644 index dc0a683..0000000 --- a/uefi-enable-https-boot-by-default.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 7eabab2fda12b7a4417e5c7f29a507dfa9e7fffd Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 3 May 2026 09:24:34 +0100 -Subject: [PATCH] enable https boot by default - -Signed-off-by: Peter Robinson ---- - cmd/Kconfig | 1 + - lib/efi_loader/Kconfig | 1 + - lib/mbedtls/Kconfig | 3 ++- - net/Kconfig | 3 ++- - 4 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/cmd/Kconfig b/cmd/Kconfig -index c71c6824a19..8ff14adffe1 100644 ---- a/cmd/Kconfig -+++ b/cmd/Kconfig -@@ -2289,6 +2289,7 @@ config CMD_WGET - - config WGET_HTTPS - bool "wget https" -+ default y - depends on CMD_WGET - depends on PROT_TCP_LWIP - depends on MBEDTLS_LIB -diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig -index 4cb13ae7c8a..20733429962 100644 ---- a/lib/efi_loader/Kconfig -+++ b/lib/efi_loader/Kconfig -@@ -609,6 +609,7 @@ config EFI_BOOTMGR - - config EFI_HTTP_BOOT - bool "EFI HTTP Boot support" -+ default y - depends on NET - depends on CMDLINE - select CMD_NET -diff --git a/lib/mbedtls/Kconfig b/lib/mbedtls/Kconfig -index 789721ee6cd..7a241c2bc26 100644 ---- a/lib/mbedtls/Kconfig -+++ b/lib/mbedtls/Kconfig -@@ -2,7 +2,7 @@ - - choice - prompt "Crypto libraries (U-Boot Proper)" -- default LEGACY_HASHING_AND_CRYPTO -+ default MBEDTLS_LIB - help - Select crypto libraries. - LEGACY_HASHING_AND_CRYPTO for legacy crypto libraries, -@@ -15,6 +15,7 @@ config LEGACY_HASHING_AND_CRYPTO - - config MBEDTLS_LIB - bool "MbedTLS libraries" -+ default y - select MBEDTLS_LIB_X509 - endchoice - -diff --git a/net/Kconfig b/net/Kconfig -index e712a0dd2ac..3158d37dff7 100644 ---- a/net/Kconfig -+++ b/net/Kconfig -@@ -16,7 +16,7 @@ if NET - - choice - prompt "Networking stack" -- default NET_LEGACY -+ default NET_LWIP - - config NET_LEGACY - bool "Legacy U-Boot networking stack" -@@ -27,6 +27,7 @@ config NET_LEGACY - - config NET_LWIP - bool "Use lwIP for networking stack" -+ default y - select NETDEVICES - help - Include networking support based on the lwIP (lightweight IP) --- -2.54.0 - diff --git a/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch b/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch index ac58bad..739bfa4 100644 --- a/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch +++ b/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch @@ -1,6 +1,6 @@ -From 56a985cec8592a8de88e7f254df82f5d444a5ecc Mon Sep 17 00:00:00 2001 +From 750754448f9c196888352b636269c2455dcd2ecf Mon Sep 17 00:00:00 2001 From: Peter Robinson -Date: Thu, 28 May 2026 22:08:07 +0100 +Date: Mon, 16 Jun 2025 11:41:16 +0100 Subject: [PATCH] initial find_fdt_location for finding the DT on disk The old distro boot looked for a DT on the first boot partition @@ -16,16 +16,29 @@ so that devices will continue to work as they did previously. Signed-off-by: Peter Robinson --- + cmd/bootefi.c | 1 + cmd/bootmenu.c | 5 ++ include/efi_loader.h | 2 + - lib/efi_loader/efi_helper.c | 106 +++++++++++++++++++++++++++++++++++- - 3 files changed, 112 insertions(+), 1 deletion(-) + lib/efi_loader/efi_helper.c | 104 ++++++++++++++++++++++++++++++++++++ + 4 files changed, 112 insertions(+) +diff --git a/cmd/bootefi.c b/cmd/bootefi.c +index 8e8752127ed..347f5573bf0 100644 +--- a/cmd/bootefi.c ++++ b/cmd/bootefi.c +@@ -147,6 +147,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc, + if (argc > 2) { + uintptr_t fdt_addr; + ++ /* Do we need to run find_fdt_location here?*/ + fdt_addr = hextoul(argv[2], NULL); + fdt = map_sysmem(fdt_addr, 0); + } else { diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c -index 528afd221d0..a10ea35a687 100644 +index a5c979079f4..8b3cb54f324 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c -@@ -502,6 +502,11 @@ static void handle_uefi_bootnext(void) +@@ -467,6 +467,11 @@ static void handle_uefi_bootnext(void) u16 bootnext; efi_status_t ret; efi_uintn_t size; @@ -38,10 +51,10 @@ index 528afd221d0..a10ea35a687 100644 /* Initialize EFI drivers */ ret = efi_init_obj_list(); diff --git a/include/efi_loader.h b/include/efi_loader.h -index 3a4d502631c..b11f8a2cb42 100644 +index b3beda5de7b..5d00141f76f 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h -@@ -574,6 +574,8 @@ struct efi_register_notify_event { +@@ -572,6 +572,8 @@ struct efi_register_notify_event { struct list_head handles; }; @@ -51,7 +64,7 @@ index 3a4d502631c..b11f8a2cb42 100644 int efi_init_early(void); /* Initialize efi execution environment */ diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c -index 44b806aadc4..61e982091b9 100644 +index 44b806aadc4..3340c710171 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -15,6 +15,7 @@ @@ -169,22 +182,21 @@ index 44b806aadc4..61e982091b9 100644 + /* Check if there is device tree loaded from disk */ + fdt_opt = find_fdt_location(); + if (fdt_opt) -+ log_info("Found DTB on disk\n"); -+ ++ log_debug("Found DTB on disk\n"); /* Check if there is a hardware device tree */ -- fdt_opt = env_get("fdt_addr"); + if (!fdt_opt) { + fdt_opt = env_get("fdt_addr"); + if (fdt_opt) + log_info("Found DTB: Prior firmware\n"); + } + fdt_opt = env_get("fdt_addr"); /* Use our own device tree as fallback */ if (!fdt_opt) { fdt_opt = env_get("fdtcontroladdr"); -+ log_info("Using DT from U-Boot\n"); ++ log_debug("Using DT from U-Boot\n"); if (!fdt_opt) { log_err("need device tree\n"); return EFI_NOT_FOUND; -- -2.54.0 +2.49.0 diff --git a/x86_64-boards b/x86_64-boards deleted file mode 100644 index dec8df3..0000000 --- a/x86_64-boards +++ /dev/null @@ -1 +0,0 @@ -qemu-x86_64