diff --git a/0001-Fix-BeagleAI-detection.patch b/0001-Fix-BeagleAI-detection.patch new file mode 100644 index 0000000..dfd96cc --- /dev/null +++ b/0001-Fix-BeagleAI-detection.patch @@ -0,0 +1,29 @@ +From 1849ef423238aeb1732eb3b8e67eb46bc21401c7 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Thu, 10 Sep 2020 14:24:12 +0100 +Subject: [PATCH] Fix BeagleAI detection + +Signed-off-by: Peter Robinson +--- + board/ti/am57xx/board.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c +index 7809875510..3232812a97 100644 +--- a/board/ti/am57xx/board.c ++++ b/board/ti/am57xx/board.c +@@ -527,8 +527,10 @@ void do_board_detect(void) + + rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS, + CONFIG_EEPROM_CHIP_ADDRESS); +- if (rc) ++ if (rc) { + printf("ti_i2c_eeprom_init failed %d\n", rc); ++ ti_i2c_eeprom_am_set("BBONE-AI", "A"); ++ } + + #ifdef CONFIG_SUPPORT_EMMC_BOOT + rc = board_bootmode_has_emmc(); +-- +2.26.2 + diff --git a/0001-arm-dts-allwinner-sync-from-linux-for-RGMII-RX-TX-de.patch b/0001-arm-dts-allwinner-sync-from-linux-for-RGMII-RX-TX-de.patch new file mode 100644 index 0000000..f0d3575 --- /dev/null +++ b/0001-arm-dts-allwinner-sync-from-linux-for-RGMII-RX-TX-de.patch @@ -0,0 +1,2977 @@ +From 4f26cacd28d71fd7d051b560f550863679a5f04b Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Wed, 10 Feb 2021 13:58:20 +0000 +Subject: [PATCH] arm: dts: allwinner: sync from linux for RGMII RX/TX delay + fixes + +Sync over a subset of the AllWinner dts changes from Linux 5.11 +for the RGMII RX/TX delay network fixes. + +This pulls other bits in needed to sync the whole files, the bits +are other minor fixes, or pieces of DT that don't affect U-Boot. + +Signed-off-by: Peter Robinson +--- + arch/arm/dts/axp81x.dtsi | 9 + + arch/arm/dts/sun50i-a64-bananapi-m64.dts | 10 +- + arch/arm/dts/sun50i-a64-orangepi-win.dts | 10 +- + arch/arm/dts/sun50i-a64-pine64-plus.dts | 2 +- + arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 10 +- + arch/arm/dts/sun50i-a64.dtsi | 34 +- + .../dts/sun50i-h5-bananapi-m2-plus-v1.2.dts | 1 + + .../arm/dts/sun50i-h5-libretech-all-h5-cc.dts | 2 +- + arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts | 2 +- + arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 23 +- + arch/arm/dts/sun50i-h5-orangepi-prime.dts | 2 +- + .../arm/dts/sun50i-h5-orangepi-zero-plus2.dts | 38 +++ + arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts | 14 +- + arch/arm/dts/sun7i-a20-bananapi.dts | 24 +- + arch/arm/dts/sun7i-a20-bananapro.dts | 14 +- + arch/arm/dts/sun7i-a20-cubieboard2.dts | 24 +- + arch/arm/dts/sun7i-a20-cubietruck.dts | 14 +- + arch/arm/dts/sun7i-a20-hummingbird.dts | 21 +- + arch/arm/dts/sun7i-a20-i12-tvbox.dts | 12 +- + arch/arm/dts/sun7i-a20-icnova-swac.dts | 15 +- + arch/arm/dts/sun7i-a20-itead-ibox.dts | 4 +- + arch/arm/dts/sun7i-a20-lamobo-r1.dts | 14 +- + arch/arm/dts/sun7i-a20-m3.dts | 12 +- + arch/arm/dts/sun7i-a20-olimex-som-evb.dts | 12 +- + arch/arm/dts/sun7i-a20-olimex-som204-evb.dts | 24 +- + arch/arm/dts/sun7i-a20-olinuxino-lime.dts | 30 +- + arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 44 +-- + arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 30 +- + arch/arm/dts/sun7i-a20-orangepi-mini.dts | 24 +- + arch/arm/dts/sun7i-a20-orangepi.dts | 24 +- + arch/arm/dts/sun7i-a20-pcduino3-nano.dts | 28 +- + arch/arm/dts/sun7i-a20-pcduino3.dts | 24 +- + arch/arm/dts/sun7i-a20-wexler-tab7200.dts | 12 +- + arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 24 +- + arch/arm/dts/sun7i-a20.dtsi | 218 +++++++++++- + arch/arm/dts/sun8i-a83t-bananapi-m3.dts | 53 ++- + arch/arm/dts/sun8i-a83t-cubietruck-plus.dts | 71 +++- + arch/arm/dts/sun8i-a83t.dtsi | 310 ++++++++++++++++-- + arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 5 - + arch/arm/dts/sun8i-h3-orangepi-plus2e.dts | 2 +- + arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts | 38 +++ + arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts | 12 +- + arch/arm/dts/sunxi-bananapi-m2-plus.dtsi | 2 +- + 43 files changed, 947 insertions(+), 351 deletions(-) + +diff --git a/arch/arm/dts/axp81x.dtsi b/arch/arm/dts/axp81x.dtsi +index 043c717dce..1dfeeceabf 100644 +--- a/arch/arm/dts/axp81x.dtsi ++++ b/arch/arm/dts/axp81x.dtsi +@@ -48,6 +48,11 @@ + interrupt-controller; + #interrupt-cells = <1>; + ++ ac_power_supply: ac-power-supply { ++ compatible = "x-powers,axp813-ac-power-supply"; ++ status = "disabled"; ++ }; ++ + axp_adc: adc { + compatible = "x-powers,axp813-adc"; + #io-channel-cells = <1>; +@@ -166,4 +171,8 @@ + status = "disabled"; + }; + }; ++ ++ usb_power_supply: usb-power-supply { ++ compatible = "x-powers,axp813-usb-power-supply"; ++ }; + }; +diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts +index 883f217efb..e5e840b9fb 100644 +--- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts ++++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts +@@ -105,7 +105,7 @@ + &emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_dc1sw>; + status = "okay"; +@@ -331,10 +331,10 @@ + "Microphone", "Microphone Jack", + "Microphone", "Onboard Microphone"; + simple-audio-card,routing = +- "Left DAC", "AIF1 Slot 0 Left", +- "Right DAC", "AIF1 Slot 0 Right", +- "AIF1 Slot 0 Left ADC", "Left ADC", +- "AIF1 Slot 0 Right ADC", "Right ADC", ++ "Left DAC", "DACL", ++ "Right DAC", "DACR", ++ "ADCL", "Left ADC", ++ "ADCR", "Right ADC", + "Headphone Jack", "HP", + "MIC2", "Microphone Jack", + "Onboard Microphone", "MBIAS", +diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts +index fde9c7a99b..70e31743f0 100644 +--- a/arch/arm/dts/sun50i-a64-orangepi-win.dts ++++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts +@@ -120,7 +120,7 @@ + &emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + status = "okay"; +@@ -330,10 +330,10 @@ + "Microphone", "Microphone Jack", + "Microphone", "Onboard Microphone"; + simple-audio-card,routing = +- "Left DAC", "AIF1 Slot 0 Left", +- "Right DAC", "AIF1 Slot 0 Right", +- "AIF1 Slot 0 Left ADC", "Left ADC", +- "AIF1 Slot 0 Right ADC", "Right ADC", ++ "Left DAC", "DACL", ++ "Right DAC", "DACR", ++ "ADCL", "Left ADC", ++ "ADCR", "Right ADC", + "Headphone Jack", "HP", + "MIC2", "Microphone Jack", + "Onboard Microphone", "MBIAS", +diff --git a/arch/arm/dts/sun50i-a64-pine64-plus.dts b/arch/arm/dts/sun50i-a64-pine64-plus.dts +index b26181cf90..b54099b654 100644 +--- a/arch/arm/dts/sun50i-a64-pine64-plus.dts ++++ b/arch/arm/dts/sun50i-a64-pine64-plus.dts +@@ -13,7 +13,7 @@ + &emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-txid"; + phy-handle = <&ext_rgmii_phy>; + status = "okay"; + }; +diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts +index 2f6ea9f3f6..d4069749d7 100644 +--- a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts ++++ b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts +@@ -79,7 +79,7 @@ + &emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_dc1sw>; + status = "okay"; +@@ -159,11 +159,11 @@ + simple-audio-card,widgets = "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = +- "Left DAC", "AIF1 Slot 0 Left", +- "Right DAC", "AIF1 Slot 0 Right", ++ "Left DAC", "DACL", ++ "Right DAC", "DACR", + "Headphone Jack", "HP", +- "AIF1 Slot 0 Left ADC", "Left ADC", +- "AIF1 Slot 0 Right ADC", "Right ADC", ++ "ADCL", "Left ADC", ++ "ADCR", "Right ADC", + "MIC2", "Microphone Jack"; + status = "okay"; + }; +diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi +index 8dfbcd1440..51cc30e84e 100644 +--- a/arch/arm/dts/sun50i-a64.dtsi ++++ b/arch/arm/dts/sun50i-a64.dtsi +@@ -51,7 +51,7 @@ + reg = <0>; + enable-method = "psci"; + next-level-cache = <&L2>; +- clocks = <&ccu 21>; ++ clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; + #cooling-cells = <2>; + }; +@@ -62,7 +62,7 @@ + reg = <1>; + enable-method = "psci"; + next-level-cache = <&L2>; +- clocks = <&ccu 21>; ++ clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; + #cooling-cells = <2>; + }; +@@ -73,7 +73,7 @@ + reg = <2>; + enable-method = "psci"; + next-level-cache = <&L2>; +- clocks = <&ccu 21>; ++ clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; + #cooling-cells = <2>; + }; +@@ -84,7 +84,7 @@ + reg = <3>; + enable-method = "psci"; + next-level-cache = <&L2>; +- clocks = <&ccu 21>; ++ clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; + #cooling-cells = <2>; + }; +@@ -139,10 +139,10 @@ + simple-audio-card,mclk-fs = <128>; + simple-audio-card,aux-devs = <&codec_analog>; + simple-audio-card,routing = +- "Left DAC", "AIF1 Slot 0 Left", +- "Right DAC", "AIF1 Slot 0 Right", +- "AIF1 Slot 0 Left ADC", "Left ADC", +- "AIF1 Slot 0 Right ADC", "Right ADC"; ++ "Left DAC", "DACL", ++ "Right DAC", "DACR", ++ "ADCL", "Left ADC", ++ "ADCR", "Right ADC"; + status = "disabled"; + + cpudai: simple-audio-card,cpu { +@@ -157,6 +157,7 @@ + timer { + compatible = "arm,armv8-timer"; + allwinner,erratum-unknown1; ++ arm,no-tick-in-suspend; + interrupts = , + ; ++ compatible = "allwinner,sun50i-a64-i2s", ++ "allwinner,sun8i-h3-i2s"; ++ reg = <0x01c22800 0x400>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; ++ clock-names = "apb", "mod"; ++ resets = <&ccu RST_BUS_I2S2>; ++ dma-names = "rx", "tx"; ++ dmas = <&dma 27>, <&dma 27>; ++ status = "disabled"; ++ }; ++ + dai: dai@1c22c00 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun50i-a64-codec-i2s"; +@@ -860,7 +875,8 @@ + + codec: codec@1c22e00 { + #sound-dai-cells = <0>; +- compatible = "allwinner,sun8i-a33-codec"; ++ compatible = "allwinner,sun50i-a64-codec", ++ "allwinner,sun8i-a33-codec"; + reg = <0x01c22e00 0x600>; + interrupts = ; + clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>; +diff --git a/arch/arm/dts/sun50i-h5-bananapi-m2-plus-v1.2.dts b/arch/arm/dts/sun50i-h5-bananapi-m2-plus-v1.2.dts +index 2e2b14c0ae..8857a37915 100644 +--- a/arch/arm/dts/sun50i-h5-bananapi-m2-plus-v1.2.dts ++++ b/arch/arm/dts/sun50i-h5-bananapi-m2-plus-v1.2.dts +@@ -3,6 +3,7 @@ + + /dts-v1/; + #include "sun50i-h5.dtsi" ++#include "sun50i-h5-cpu-opp.dtsi" + #include + + / { +diff --git a/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts b/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts +index df1b9263ad..6e30a564c8 100644 +--- a/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts ++++ b/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts +@@ -36,7 +36,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + /delete-property/ allwinner,leds-active-low; + status = "okay"; + }; +diff --git a/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts +index 4f9ba53ffa..9d93fe1536 100644 +--- a/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts ++++ b/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts +@@ -96,7 +96,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-h5-orangepi-pc2.dts b/arch/arm/dts/sun50i-h5-orangepi-pc2.dts +index 70b5f09984..8bf2db9dcb 100644 +--- a/arch/arm/dts/sun50i-h5-orangepi-pc2.dts ++++ b/arch/arm/dts/sun50i-h5-orangepi-pc2.dts +@@ -61,6 +61,7 @@ + label = "sw4"; + linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ wakeup-source; + }; + }; + +@@ -93,6 +94,10 @@ + status = "okay"; + }; + ++&cpu0 { ++ cpu-supply = <®_vdd_cpux>; ++}; ++ + &de { + status = "okay"; + }; +@@ -118,7 +123,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + status = "okay"; + }; + +@@ -168,6 +173,22 @@ + status = "okay"; + }; + ++&r_i2c { ++ status = "okay"; ++ ++ reg_vdd_cpux: regulator@65 { ++ compatible = "silergy,sy8106a"; ++ reg = <0x65>; ++ regulator-name = "vdd-cpux"; ++ silergy,fixed-microvolt = <1100000>; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-ramp-delay = <200>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ + &spi0 { + status = "okay"; + +diff --git a/arch/arm/dts/sun50i-h5-orangepi-prime.dts b/arch/arm/dts/sun50i-h5-orangepi-prime.dts +index cb44bfa598..33ab44072e 100644 +--- a/arch/arm/dts/sun50i-h5-orangepi-prime.dts ++++ b/arch/arm/dts/sun50i-h5-orangepi-prime.dts +@@ -124,7 +124,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts +index c95a685413..de19e68eb8 100644 +--- a/arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts ++++ b/arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts +@@ -30,6 +30,21 @@ + }; + }; + ++ leds { ++ compatible = "gpio-leds"; ++ ++ pwr { ++ label = "orangepi:green:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ status { ++ label = "orangepi:red:status"; ++ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; +@@ -48,6 +63,10 @@ + status = "okay"; + }; + ++&ehci0 { ++ status = "okay"; ++}; ++ + &hdmi { + status = "okay"; + }; +@@ -92,6 +111,10 @@ + status = "okay"; + }; + ++&ohci0 { ++ status = "okay"; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pa_pins>; +@@ -103,3 +126,18 @@ + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + status = "okay"; + }; ++ ++&usb_otg { ++ /* ++ * According to schematics CN1 MicroUSB port can be used to take ++ * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB ++ * port cannot provide power externally even if the board is powered ++ * via GPIO pins. It thus makes sense to force peripheral mode. ++ */ ++ dr_mode = "peripheral"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts +index e2bfe00588..8945dbb114 100644 +--- a/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts ++++ b/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts +@@ -129,14 +129,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; +- phy-mode = "rgmii"; ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-id"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -171,6 +167,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-bananapi.dts b/arch/arm/dts/sun7i-a20-bananapi.dts +index 81bc85d398..0b3d9ae756 100644 +--- a/arch/arm/dts/sun7i-a20-bananapi.dts ++++ b/arch/arm/dts/sun7i-a20-bananapi.dts +@@ -131,14 +131,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; +- phy-mode = "rgmii"; ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-id"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -171,6 +167,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -246,12 +248,6 @@ + "SPI-MISO", "SPI-CE1", "", + "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "", + "", "", "", "", "", "", "", ""; +- +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; + }; + + #include "axp209.dtsi" +@@ -329,9 +325,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-bananapro.dts b/arch/arm/dts/sun7i-a20-bananapro.dts +index 0176e9de01..5740f94427 100644 +--- a/arch/arm/dts/sun7i-a20-bananapro.dts ++++ b/arch/arm/dts/sun7i-a20-bananapro.dts +@@ -109,14 +109,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; +- phy-mode = "rgmii"; ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-id"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -143,6 +139,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-cubieboard2.dts b/arch/arm/dts/sun7i-a20-cubieboard2.dts +index 200685b0b1..b8203e4ef2 100644 +--- a/arch/arm/dts/sun7i-a20-cubieboard2.dts ++++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts +@@ -115,13 +115,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -161,6 +157,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &ohci0 { + status = "okay"; + }; +@@ -173,14 +175,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + ®_ahci_5v { + status = "okay"; + }; +@@ -236,9 +230,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +diff --git a/arch/arm/dts/sun7i-a20-cubietruck.dts b/arch/arm/dts/sun7i-a20-cubietruck.dts +index 99f531b8d2..9109ca0919 100644 +--- a/arch/arm/dts/sun7i-a20-cubietruck.dts ++++ b/arch/arm/dts/sun7i-a20-cubietruck.dts +@@ -150,13 +150,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; +- phy-mode = "rgmii"; ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-id"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -194,6 +190,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-hummingbird.dts b/arch/arm/dts/sun7i-a20-hummingbird.dts +index fd0153f656..3def2a3305 100644 +--- a/arch/arm/dts/sun7i-a20-hummingbird.dts ++++ b/arch/arm/dts/sun7i-a20-hummingbird.dts +@@ -100,19 +100,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_vdd>; +- /* phy reset config */ +- snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */ +- snps,reset-active-low; +- /* wait 1s after reset, otherwise fail to read phy id */ +- snps,reset-delays-us = <0 10000 1000000>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -146,6 +137,16 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */ ++ reset-assert-us = <10000>; ++ /* wait 1s after reset, otherwise fail to read phy id */ ++ reset-deassert-us = <1000000>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v0>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-i12-tvbox.dts b/arch/arm/dts/sun7i-a20-i12-tvbox.dts +index 5f1c4f573d..358ed5f1b1 100644 +--- a/arch/arm/dts/sun7i-a20-i12-tvbox.dts ++++ b/arch/arm/dts/sun7i-a20-i12-tvbox.dts +@@ -115,14 +115,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -145,6 +141,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-icnova-swac.dts b/arch/arm/dts/sun7i-a20-icnova-swac.dts +index 949494730a..413505f45a 100644 +--- a/arch/arm/dts/sun7i-a20-icnova-swac.dts ++++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts +@@ -49,7 +49,8 @@ + + / { + model = "ICnova-A20 SWAC"; +- compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20"; ++ compatible = "incircuit,icnova-a20-swac", "incircuit,icnova-a20", ++ "allwinner,sun7i-a20"; + + aliases { + serial0 = &uart0; +@@ -75,13 +76,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -98,6 +95,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-itead-ibox.dts b/arch/arm/dts/sun7i-a20-itead-ibox.dts +index b90a7607d0..946c272783 100644 +--- a/arch/arm/dts/sun7i-a20-itead-ibox.dts ++++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts +@@ -97,10 +97,12 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; ++}; + ++&gmac_mdio { + phy1: ethernet-phy@1 { + reg = <1>; + }; +diff --git a/arch/arm/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/dts/sun7i-a20-lamobo-r1.dts +index f91e1bee44..17fa8901fc 100644 +--- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts ++++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts +@@ -123,8 +123,6 @@ + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- /delete-property/#address-cells; +- /delete-property/#size-cells; + + fixed-link { + speed = <1000>; +@@ -229,14 +227,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + #include "axp209.dtsi" + + &ac_power_supply { +@@ -322,9 +312,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-m3.dts b/arch/arm/dts/sun7i-a20-m3.dts +index b8a1aaaf39..6bff9e731f 100644 +--- a/arch/arm/dts/sun7i-a20-m3.dts ++++ b/arch/arm/dts/sun7i-a20-m3.dts +@@ -82,13 +82,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -111,6 +107,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts +index f0e6a96e57..6f9c54b8e4 100644 +--- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts ++++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts +@@ -111,13 +111,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "rgmii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -202,6 +198,12 @@ + }; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts b/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts +index 823aabce04..230d62a6b8 100644 +--- a/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts ++++ b/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts +@@ -105,18 +105,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy3>; ++ phy-handle = <&phy3>; + phy-mode = "rgmii"; + phy-supply = <®_vcc3v3>; +- +- snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; +- snps,reset-active-low; +- snps,reset-delays-us = <0 10000 1000000>; + status = "okay"; +- +- phy3: ethernet-phy@3 { +- reg = <3>; +- }; + }; + + &hdmi { +@@ -161,6 +153,16 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy3: ethernet-phy@3 { ++ reg = <3>; ++ reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */ ++ reset-assert-us = <10000>; ++ /* wait 1s after reset, otherwise fail to read phy id */ ++ reset-deassert-us = <1000000>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -314,8 +316,8 @@ + }; + + &usbphy { +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ +- usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts +index 5e411194bf..2adbac8601 100644 +--- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts +@@ -106,13 +106,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -149,6 +145,12 @@ + }; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -174,18 +176,6 @@ + function = "gpio_out"; + drive-strength = <20>; + }; +- +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +- +- usb0_vbus_detect_pin: usb0-vbus-detect-pin { +- pins = "PH5"; +- function = "gpio_in"; +- bias-pull-down; +- }; + }; + + ®_ahci_5v { +@@ -217,10 +207,8 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ +- usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ ++ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */ + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts +index 4e1c590eb0..9ba62774e8 100644 +--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts +@@ -111,13 +111,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "rgmii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -154,6 +150,12 @@ + vref-supply = <®_vcc3v0>; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -174,23 +176,17 @@ + }; + + &pio { ++ vcc-pa-supply = <®_vcc3v3>; ++ vcc-pc-supply = <®_vcc3v3>; ++ vcc-pe-supply = <®_ldo3>; ++ vcc-pf-supply = <®_vcc3v3>; ++ vcc-pg-supply = <®_ldo4>; ++ + led_pins_olinuxinolime: led-pins { + pins = "PH2"; + function = "gpio_out"; + drive-strength = <20>; + }; +- +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +- +- usb0_vbus_detect_pin: usb0-vbus-detect-pin { +- pins = "PH5"; +- function = "gpio_in"; +- bias-pull-down; +- }; + }; + + ®_ahci_5v { +@@ -200,6 +196,14 @@ + + #include "axp209.dtsi" + ++&ac_power_supply { ++ status = "okay"; ++}; ++ ++&battery_power_supply { ++ status = "okay"; ++}; ++ + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +@@ -267,10 +271,8 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ +- usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ ++ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */ + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts +index 840ae1194a..359bd0d5b3 100644 +--- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts +@@ -118,13 +118,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>, <&gmac_txerr>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -215,6 +211,12 @@ + }; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -252,18 +254,6 @@ + function = "gpio_out"; + drive-strength = <20>; + }; +- +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +- +- usb0_vbus_detect_pin: usb0-vbus-detect-pin { +- pins = "PH5"; +- function = "gpio_in"; +- bias-pull-down; +- }; + }; + + #include "axp209.dtsi" +@@ -355,10 +345,8 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ +- usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ ++ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */ + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-orangepi-mini.dts b/arch/arm/dts/sun7i-a20-orangepi-mini.dts +index 15881081ca..2e328d2cef 100644 +--- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts ++++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts +@@ -120,14 +120,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -158,6 +154,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -176,14 +178,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +@@ -239,9 +233,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-orangepi.dts b/arch/arm/dts/sun7i-a20-orangepi.dts +index d64de2e73a..d75b2e2bab 100644 +--- a/arch/arm/dts/sun7i-a20-orangepi.dts ++++ b/arch/arm/dts/sun7i-a20-orangepi.dts +@@ -96,14 +96,10 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -124,6 +120,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -135,14 +137,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +@@ -198,9 +192,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts +index 538ea15fa3..bf38c66c18 100644 +--- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts ++++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts +@@ -1,5 +1,5 @@ + /* +- * Copyright 2015 Adam Sampson ++ * Copyright 2015-2020 Adam Sampson + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual +@@ -114,13 +114,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; +- phy-mode = "rgmii"; ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-id"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &hdmi { +@@ -149,6 +145,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -168,14 +170,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + ®_ahci_5v { + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ + status = "okay"; +@@ -226,9 +220,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb1_vbus>; + status = "okay"; +diff --git a/arch/arm/dts/sun7i-a20-pcduino3.dts b/arch/arm/dts/sun7i-a20-pcduino3.dts +index a72ed4318d..cc8271d777 100644 +--- a/arch/arm/dts/sun7i-a20-pcduino3.dts ++++ b/arch/arm/dts/sun7i-a20-pcduino3.dts +@@ -122,13 +122,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_mii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "mii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -149,6 +145,12 @@ + status = "okay"; + }; + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -168,14 +170,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + ®_ahci_5v { + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; + status = "okay"; +@@ -226,9 +220,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +diff --git a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts +index ffade253d1..6a66b0432d 100644 +--- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts ++++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts +@@ -156,14 +156,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + &pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pin>; +@@ -223,9 +215,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; +diff --git a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts +index c27e56091f..3bfae98f3c 100644 +--- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts ++++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts +@@ -81,13 +81,9 @@ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phy-mode = "rgmii"; + status = "okay"; +- +- phy1: ethernet-phy@1 { +- reg = <1>; +- }; + }; + + &i2c0 { +@@ -110,6 +106,12 @@ + + #include "axp209.dtsi" + ++&gmac_mdio { ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -145,14 +147,6 @@ + status = "okay"; + }; + +-&pio { +- usb0_id_detect_pin: usb0-id-detect-pin { +- pins = "PH4"; +- function = "gpio_in"; +- bias-pull-up; +- }; +-}; +- + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +@@ -206,9 +200,7 @@ + }; + + &usbphy { +- pinctrl-names = "default"; +- pinctrl-0 = <&usb0_id_detect_pin>; +- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; +diff --git a/arch/arm/dts/sun7i-a20.dtsi b/arch/arm/dts/sun7i-a20.dtsi +index 641a8fa6d4..6d6a37940d 100644 +--- a/arch/arm/dts/sun7i-a20.dtsi ++++ b/arch/arm/dts/sun7i-a20.dtsi +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + + / { + interrupt-parent = <&gic>; +@@ -180,7 +181,7 @@ + default-pool { + compatible = "shared-dma-pool"; + size = <0x6000000>; +- alloc-ranges = <0x4a000000 0x6000000>; ++ alloc-ranges = <0x40000000 0x10000000>; + reusable; + linux,cma-default; + }; +@@ -333,7 +334,7 @@ + #dma-cells = <2>; + }; + +- nfc: nand@1c03000 { ++ nfc: nand-controller@1c03000 { + compatible = "allwinner,sun4i-a10-nand"; + reg = <0x01c03000 0x1000>; + interrupts = ; +@@ -376,6 +377,16 @@ + num-cs = <1>; + }; + ++ csi0: csi@1c09000 { ++ compatible = "allwinner,sun7i-a20-csi0"; ++ reg = <0x01c09000 0x1000>; ++ interrupts = ; ++ clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>; ++ clock-names = "bus", "isp", "ram"; ++ resets = <&ccu RST_CSI0>; ++ status = "disabled"; ++ }; ++ + emac: ethernet@1c0b000 { + compatible = "allwinner,sun4i-a10-emac"; + reg = <0x01c0b000 0x1000>; +@@ -394,11 +405,12 @@ + }; + + tcon0: lcd-controller@1c0c000 { +- compatible = "allwinner,sun7i-a20-tcon"; ++ compatible = "allwinner,sun7i-a20-tcon0", ++ "allwinner,sun7i-a20-tcon"; + reg = <0x01c0c000 0x1000>; + interrupts = ; +- resets = <&ccu RST_TCON0>; +- reset-names = "lcd"; ++ resets = <&ccu RST_TCON0>, <&ccu RST_LVDS>; ++ reset-names = "lcd", "lvds"; + clocks = <&ccu CLK_AHB_LCD0>, + <&ccu CLK_TCON0_CH0>, + <&ccu CLK_TCON0_CH1>; +@@ -406,6 +418,7 @@ + "tcon-ch0", + "tcon-ch1"; + clock-output-names = "tcon0-pixel-clock"; ++ #clock-cells = <0>; + dmas = <&dma SUN4I_DMA_DEDICATED 14>; + + ports { +@@ -443,7 +456,8 @@ + }; + + tcon1: lcd-controller@1c0d000 { +- compatible = "allwinner,sun7i-a20-tcon"; ++ compatible = "allwinner,sun7i-a20-tcon1", ++ "allwinner,sun7i-a20-tcon"; + reg = <0x01c0d000 0x1000>; + interrupts = ; + resets = <&ccu RST_TCON1>; +@@ -455,6 +469,7 @@ + "tcon-ch0", + "tcon-ch1"; + clock-output-names = "tcon1-pixel-clock"; ++ #clock-cells = <0>; + dmas = <&dma SUN4I_DMA_DEDICATED 15>; + + ports { +@@ -586,13 +601,14 @@ + phy-names = "usb"; + extcon = <&usbphy 0>; + allwinner,sram = <&otg_sram 1>; ++ dr_mode = "otg"; + status = "disabled"; + }; + + usbphy: phy@1c13400 { + #phy-cells = <1>; + compatible = "allwinner,sun7i-a20-usb-phy"; +- reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>; ++ reg = <0x01c13400 0x10>, <0x01c14800 0x4>, <0x01c1c800 0x4>; + reg-names = "phy_ctrl", "pmu1", "pmu2"; + clocks = <&ccu CLK_USB_PHY>; + clock-names = "usb_phy"; +@@ -716,6 +732,17 @@ + status = "disabled"; + }; + ++ csi1: csi@1c1d000 { ++ compatible = "allwinner,sun7i-a20-csi1", ++ "allwinner,sun4i-a10-csi1"; ++ reg = <0x01c1d000 0x1000>; ++ interrupts = ; ++ clocks = <&ccu CLK_AHB_CSI1>, <&ccu CLK_DRAM_CSI1>; ++ clock-names = "bus", "ram"; ++ resets = <&ccu RST_CSI1>; ++ status = "disabled"; ++ }; ++ + spi3: spi@1c1f000 { + compatible = "allwinner,sun4i-a10-spi"; + reg = <0x01c1f000 0x1000>; +@@ -751,21 +778,70 @@ + #interrupt-cells = <3>; + #gpio-cells = <3>; + ++ /omit-if-no-ref/ ++ can_pa_pins: can-pa-pins { ++ pins = "PA16", "PA17"; ++ function = "can"; ++ }; ++ ++ /omit-if-no-ref/ + can_ph_pins: can-ph-pins { + pins = "PH20", "PH21"; + function = "can"; + }; + ++ /omit-if-no-ref/ + clk_out_a_pin: clk-out-a-pin { + pins = "PI12"; + function = "clk_out_a"; + }; + ++ /omit-if-no-ref/ + clk_out_b_pin: clk-out-b-pin { + pins = "PI13"; + function = "clk_out_b"; + }; + ++ /omit-if-no-ref/ ++ csi0_8bits_pins: csi-8bits-pins { ++ pins = "PE0", "PE2", "PE3", "PE4", "PE5", ++ "PE6", "PE7", "PE8", "PE9", "PE10", ++ "PE11"; ++ function = "csi0"; ++ }; ++ ++ /omit-if-no-ref/ ++ csi0_clk_pin: csi-clk-pin { ++ pins = "PE1"; ++ function = "csi0"; ++ }; ++ ++ /omit-if-no-ref/ ++ csi1_8bits_pg_pins: csi1-8bits-pg-pins { ++ pins = "PG0", "PG2", "PG3", "PG4", "PG5", ++ "PG6", "PG7", "PG8", "PG9", "PG10", ++ "PG11"; ++ function = "csi1"; ++ }; ++ ++ /omit-if-no-ref/ ++ csi1_24bits_ph_pins: csi1-24bits-ph-pins { ++ pins = "PH0", "PH1", "PH2", "PH3", "PH4", ++ "PH5", "PH6", "PH7", "PH8", "PH9", ++ "PH10", "PH11", "PH12", "PH13", "PH14", ++ "PH15", "PH16", "PH17", "PH18", "PH19", ++ "PH20", "PH21", "PH22", "PH23", "PH24", ++ "PH25", "PH26", "PH27"; ++ function = "csi1"; ++ }; ++ ++ /omit-if-no-ref/ ++ csi1_clk_pg_pin: csi1-clk-pg-pin { ++ pins = "PG1"; ++ function = "csi1"; ++ }; ++ ++ /omit-if-no-ref/ + emac_pa_pins: emac-pa-pins { + pins = "PA0", "PA1", "PA2", + "PA3", "PA4", "PA5", "PA6", +@@ -775,6 +851,17 @@ + function = "emac"; + }; + ++ /omit-if-no-ref/ ++ emac_ph_pins: emac-ph-pins { ++ pins = "PH8", "PH9", "PH10", "PH11", ++ "PH14", "PH15", "PH16", "PH17", ++ "PH18", "PH19", "PH20", "PH21", ++ "PH22", "PH23", "PH24", "PH25", ++ "PH26"; ++ function = "emac"; ++ }; ++ ++ /omit-if-no-ref/ + gmac_mii_pins: gmac-mii-pins { + pins = "PA0", "PA1", "PA2", + "PA3", "PA4", "PA5", "PA6", +@@ -784,6 +871,7 @@ + function = "gmac"; + }; + ++ /omit-if-no-ref/ + gmac_rgmii_pins: gmac-rgmii-pins { + pins = "PA0", "PA1", "PA2", + "PA3", "PA4", "PA5", "PA6", +@@ -798,46 +886,69 @@ + drive-strength = <40>; + }; + ++ /omit-if-no-ref/ + i2c0_pins: i2c0-pins { + pins = "PB0", "PB1"; + function = "i2c0"; + }; + ++ /omit-if-no-ref/ + i2c1_pins: i2c1-pins { + pins = "PB18", "PB19"; + function = "i2c1"; + }; + ++ /omit-if-no-ref/ + i2c2_pins: i2c2-pins { + pins = "PB20", "PB21"; + function = "i2c2"; + }; + ++ /omit-if-no-ref/ + i2c3_pins: i2c3-pins { + pins = "PI0", "PI1"; + function = "i2c3"; + }; + ++ /omit-if-no-ref/ + ir0_rx_pin: ir0-rx-pin { + pins = "PB4"; + function = "ir0"; + }; + ++ /omit-if-no-ref/ + ir0_tx_pin: ir0-tx-pin { + pins = "PB3"; + function = "ir0"; + }; + ++ /omit-if-no-ref/ + ir1_rx_pin: ir1-rx-pin { + pins = "PB23"; + function = "ir1"; + }; + ++ /omit-if-no-ref/ + ir1_tx_pin: ir1-tx-pin { + pins = "PB22"; + function = "ir1"; + }; + ++ /omit-if-no-ref/ ++ lcd_lvds0_pins: lcd-lvds0-pins { ++ pins = "PD0", "PD1", "PD2", "PD3", "PD4", ++ "PD5", "PD6", "PD7", "PD8", "PD9"; ++ function = "lvds0"; ++ }; ++ ++ /omit-if-no-ref/ ++ lcd_lvds1_pins: lcd-lvds1-pins { ++ pins = "PD10", "PD11", "PD12", "PD13", "PD14", ++ "PD15", "PD16", "PD17", "PD18", "PD19"; ++ function = "lvds1"; ++ }; ++ ++ /omit-if-no-ref/ + mmc0_pins: mmc0-pins { + pins = "PF0", "PF1", "PF2", + "PF3", "PF4", "PF5"; +@@ -846,6 +957,7 @@ + bias-pull-up; + }; + ++ /omit-if-no-ref/ + mmc2_pins: mmc2-pins { + pins = "PC6", "PC7", "PC8", + "PC9", "PC10", "PC11"; +@@ -854,6 +966,7 @@ + bias-pull-up; + }; + ++ /omit-if-no-ref/ + mmc3_pins: mmc3-pins { + pins = "PI4", "PI5", "PI6", + "PI7", "PI8", "PI9"; +@@ -862,127 +975,206 @@ + bias-pull-up; + }; + ++ /omit-if-no-ref/ + ps2_0_pins: ps2-0-pins { + pins = "PI20", "PI21"; + function = "ps2"; + }; + ++ /omit-if-no-ref/ + ps2_1_ph_pins: ps2-1-ph-pins { + pins = "PH12", "PH13"; + function = "ps2"; + }; + ++ /omit-if-no-ref/ + pwm0_pin: pwm0-pin { + pins = "PB2"; + function = "pwm"; + }; + ++ /omit-if-no-ref/ + pwm1_pin: pwm1-pin { + pins = "PI3"; + function = "pwm"; + }; + ++ /omit-if-no-ref/ + spdif_tx_pin: spdif-tx-pin { + pins = "PB13"; + function = "spdif"; + bias-pull-up; + }; + ++ /omit-if-no-ref/ + spi0_pi_pins: spi0-pi-pins { + pins = "PI11", "PI12", "PI13"; + function = "spi0"; + }; + ++ /omit-if-no-ref/ + spi0_cs0_pi_pin: spi0-cs0-pi-pin { + pins = "PI10"; + function = "spi0"; + }; + ++ /omit-if-no-ref/ + spi0_cs1_pi_pin: spi0-cs1-pi-pin { + pins = "PI14"; + function = "spi0"; + }; + ++ /omit-if-no-ref/ + spi1_pi_pins: spi1-pi-pins { + pins = "PI17", "PI18", "PI19"; + function = "spi1"; + }; + ++ /omit-if-no-ref/ + spi1_cs0_pi_pin: spi1-cs0-pi-pin { + pins = "PI16"; + function = "spi1"; + }; + ++ /omit-if-no-ref/ + spi2_pb_pins: spi2-pb-pins { + pins = "PB15", "PB16", "PB17"; + function = "spi2"; + }; + ++ /omit-if-no-ref/ + spi2_cs0_pb_pin: spi2-cs0-pb-pin { + pins = "PB14"; + function = "spi2"; + }; + ++ /omit-if-no-ref/ + spi2_pc_pins: spi2-pc-pins { + pins = "PC20", "PC21", "PC22"; + function = "spi2"; + }; + ++ /omit-if-no-ref/ + spi2_cs0_pc_pin: spi2-cs0-pc-pin { + pins = "PC19"; + function = "spi2"; + }; + ++ /omit-if-no-ref/ + uart0_pb_pins: uart0-pb-pins { + pins = "PB22", "PB23"; + function = "uart0"; + }; + ++ /omit-if-no-ref/ ++ uart0_pf_pins: uart0-pf-pins { ++ pins = "PF2", "PF4"; ++ function = "uart0"; ++ }; ++ ++ /omit-if-no-ref/ ++ uart1_pa_pins: uart1-pa-pins { ++ pins = "PA10", "PA11"; ++ function = "uart1"; ++ }; ++ ++ /omit-if-no-ref/ ++ uart1_cts_rts_pa_pins: uart1-cts-rts-pa-pins { ++ pins = "PA12", "PA13"; ++ function = "uart1"; ++ }; ++ ++ /omit-if-no-ref/ ++ uart2_pa_pins: uart2-pa-pins { ++ pins = "PA2", "PA3"; ++ function = "uart2"; ++ }; ++ ++ /omit-if-no-ref/ ++ uart2_cts_rts_pa_pins: uart2-cts-rts-pa-pins { ++ pins = "PA0", "PA1"; ++ function = "uart2"; ++ }; ++ ++ /omit-if-no-ref/ + uart2_pi_pins: uart2-pi-pins { + pins = "PI18", "PI19"; + function = "uart2"; + }; + ++ /omit-if-no-ref/ + uart2_cts_rts_pi_pins: uart2-cts-rts-pi-pins { + pins = "PI16", "PI17"; + function = "uart2"; + }; + ++ /omit-if-no-ref/ + uart3_pg_pins: uart3-pg-pins { + pins = "PG6", "PG7"; + function = "uart3"; + }; + ++ /omit-if-no-ref/ + uart3_cts_rts_pg_pins: uart3-cts-rts-pg-pins { + pins = "PG8", "PG9"; + function = "uart3"; + }; + ++ /omit-if-no-ref/ + uart3_ph_pins: uart3-ph-pins { + pins = "PH0", "PH1"; + function = "uart3"; + }; + ++ /omit-if-no-ref/ ++ uart3_cts_rts_ph_pins: uart3-cts-rts-ph-pins { ++ pins = "PH2", "PH3"; ++ function = "uart3"; ++ }; ++ ++ /omit-if-no-ref/ + uart4_pg_pins: uart4-pg-pins { + pins = "PG10", "PG11"; + function = "uart4"; + }; + ++ /omit-if-no-ref/ + uart4_ph_pins: uart4-ph-pins { + pins = "PH4", "PH5"; + function = "uart4"; + }; + ++ /omit-if-no-ref/ ++ uart5_ph_pins: uart5-ph-pins { ++ pins = "PH6", "PH7"; ++ function = "uart5"; ++ }; ++ ++ /omit-if-no-ref/ + uart5_pi_pins: uart5-pi-pins { + pins = "PI10", "PI11"; + function = "uart5"; + }; + ++ /omit-if-no-ref/ ++ uart6_pa_pins: uart6-pa-pins { ++ pins = "PA12", "PA13"; ++ function = "uart6"; ++ }; ++ ++ /omit-if-no-ref/ + uart6_pi_pins: uart6-pi-pins { + pins = "PI12", "PI13"; + function = "uart6"; + }; + ++ /omit-if-no-ref/ ++ uart7_pa_pins: uart7-pa-pins { ++ pins = "PA14", "PA15"; ++ function = "uart7"; ++ }; ++ ++ /omit-if-no-ref/ + uart7_pi_pins: uart7-pi-pins { + pins = "PI20", "PI21"; + function = "uart7"; +@@ -1004,6 +1196,8 @@ + wdt: watchdog@1c20c90 { + compatible = "allwinner,sun4i-a10-wdt"; + reg = <0x01c20c90 0x10>; ++ interrupts = ; ++ clocks = <&osc24M>; + }; + + rtc: rtc@1c20d00 { +@@ -1326,8 +1520,12 @@ + snps,fixed-burst; + snps,force_sf_dma_mode; + status = "disabled"; +- #address-cells = <1>; +- #size-cells = <0>; ++ ++ gmac_mdio: mdio { ++ compatible = "snps,dwmac-mdio"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; + }; + + hstimer@1c60000 { +@@ -1341,7 +1539,7 @@ + }; + + gic: interrupt-controller@1c81000 { +- compatible = "arm,gic-400", "arm,cortex-a7-gic", "arm,cortex-a15-gic"; ++ compatible = "arm,gic-400"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x2000>, + <0x01c84000 0x2000>, +diff --git a/arch/arm/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/dts/sun8i-a83t-bananapi-m3.dts +index eaff6fa401..431f70234d 100644 +--- a/arch/arm/dts/sun8i-a83t-bananapi-m3.dts ++++ b/arch/arm/dts/sun8i-a83t-bananapi-m3.dts +@@ -107,6 +107,14 @@ + }; + }; + ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ ++&cpu100 { ++ cpu-supply = <®_dcdc3>; ++}; ++ + &de { + status = "okay"; + }; +@@ -123,7 +131,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_sw>; + phy-handle = <&rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + allwinner,rx-delay-ps = <700>; + allwinner,tx-delay-ps = <700>; + status = "okay"; +@@ -183,6 +191,11 @@ + status = "okay"; + }; + ++&r_cir { ++ clock-frequency = <3000000>; ++ status = "okay"; ++}; ++ + &r_rsb { + status = "okay"; + +@@ -224,6 +237,14 @@ + + #include "axp81x.dtsi" + ++&ac_power_supply { ++ status = "okay"; ++}; ++ ++&battery_power_supply { ++ status = "okay"; ++}; ++ + ®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; +@@ -301,8 +322,8 @@ + + ®_dldo3 { + regulator-always-on; +- regulator-min-microvolt = <2500000>; +- regulator-max-microvolt = <2500000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pd"; + }; + +@@ -350,11 +371,37 @@ + status = "okay"; + }; + ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ clocks = <&ac100_rtc 1>; ++ clock-names = "lpo"; ++ vbat-supply = <®_dldo1>; ++ vddio-supply = <®_dldo1>; ++ device-wakeup-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ ++ shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ ++ }; ++}; ++ + &usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { + status = "okay"; + }; + + &usbphy { ++ usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_drivevbus>; + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; + }; +diff --git a/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts +index 5dba4fc310..d8326a5c68 100644 +--- a/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts ++++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts +@@ -60,6 +60,17 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -90,7 +101,7 @@ + initial-mode = <1>; /* initialize in HUB mode */ + disabled-ports = <1>; + intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ +- reset-gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */ ++ reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ + connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */ + refclk-frequency = <19200000>; + }; +@@ -145,6 +156,18 @@ + }; + }; + ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ ++&cpu100 { ++ cpu-supply = <®_dcdc3>; ++}; ++ ++&de { ++ status = "okay"; ++}; ++ + &ehci0 { + /* GL830 USB-to-SATA bridge here */ + status = "okay"; +@@ -160,10 +183,20 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_dldo4>; + phy-handle = <&rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; ++ status = "okay"; ++}; ++ ++&hdmi { + status = "okay"; + }; + ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &mdio { + rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; +@@ -239,6 +272,14 @@ + + #include "axp81x.dtsi" + ++&ac_power_supply { ++ status = "okay"; ++}; ++ ++&battery_power_supply { ++ status = "okay"; ++}; ++ + ®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; +@@ -386,11 +427,37 @@ + status = "okay"; + }; + ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm4330-bt"; ++ clocks = <&ac100_rtc 1>; ++ clock-names = "lpo"; ++ vbat-supply = <®_dcdc1>; ++ vddio-supply = <®_sw>; ++ device-wakeup-gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ ++ host-wakeup-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ ++ shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ ++ }; ++}; ++ + &usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { + status = "okay"; + }; + + &usbphy { ++ usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_drivevbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +diff --git a/arch/arm/dts/sun8i-a83t.dtsi b/arch/arm/dts/sun8i-a83t.dtsi +index 2be23d6009..c010b27fdb 100644 +--- a/arch/arm/dts/sun8i-a83t.dtsi ++++ b/arch/arm/dts/sun8i-a83t.dtsi +@@ -50,6 +50,7 @@ + #include + #include + #include ++#include + + / { + interrupt-parent = <&gic>; +@@ -61,79 +62,91 @@ + #size-cells = <0>; + + cpu0: cpu@0 { +- clocks = <&ccu CLK_C0CPUX>; +- clock-names = "cpu"; + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C0CPUX>; + operating-points-v2 = <&cpu0_opp_table>; + cci-control-port = <&cci_control0>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <0>; ++ #cooling-cells = <2>; + }; + +- cpu@1 { ++ cpu1: cpu@1 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C0CPUX>; + operating-points-v2 = <&cpu0_opp_table>; + cci-control-port = <&cci_control0>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <1>; ++ #cooling-cells = <2>; + }; + +- cpu@2 { ++ cpu2: cpu@2 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C0CPUX>; + operating-points-v2 = <&cpu0_opp_table>; + cci-control-port = <&cci_control0>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <2>; ++ #cooling-cells = <2>; + }; + +- cpu@3 { ++ cpu3: cpu@3 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C0CPUX>; + operating-points-v2 = <&cpu0_opp_table>; + cci-control-port = <&cci_control0>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <3>; ++ #cooling-cells = <2>; + }; + + cpu100: cpu@100 { +- clocks = <&ccu CLK_C1CPUX>; +- clock-names = "cpu"; + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C1CPUX>; + operating-points-v2 = <&cpu1_opp_table>; + cci-control-port = <&cci_control1>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <0x100>; ++ #cooling-cells = <2>; + }; + +- cpu@101 { ++ cpu101: cpu@101 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C1CPUX>; + operating-points-v2 = <&cpu1_opp_table>; + cci-control-port = <&cci_control1>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <0x101>; ++ #cooling-cells = <2>; + }; + +- cpu@102 { ++ cpu102: cpu@102 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C1CPUX>; + operating-points-v2 = <&cpu1_opp_table>; + cci-control-port = <&cci_control1>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <0x102>; ++ #cooling-cells = <2>; + }; + +- cpu@103 { ++ cpu103: cpu@103 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; ++ clocks = <&ccu CLK_C1CPUX>; + operating-points-v2 = <&cpu1_opp_table>; + cci-control-port = <&cci_control1>; + enable-method = "allwinner,sun8i-a83t-smp"; + reg = <0x103>; ++ #cooling-cells = <2>; + }; + }; + +@@ -187,11 +200,6 @@ + status = "disabled"; + }; + +- memory { +- reg = <0x40000000 0x80000000>; +- device_type = "memory"; +- }; +- + cpu0_opp_table: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; +@@ -306,16 +314,27 @@ + + display_clocks: clock@1000000 { + compatible = "allwinner,sun8i-a83t-de2-clk"; +- reg = <0x01000000 0x100000>; +- clocks = <&ccu CLK_PLL_DE>, +- <&ccu CLK_BUS_DE>; +- clock-names = "mod", +- "bus"; ++ reg = <0x01000000 0x10000>; ++ clocks = <&ccu CLK_BUS_DE>, ++ <&ccu CLK_PLL_DE>; ++ clock-names = "bus", ++ "mod"; + resets = <&ccu RST_BUS_DE>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + ++ rotate: rotate@1020000 { ++ compatible = "allwinner,sun8i-a83t-de2-rotate"; ++ reg = <0x1020000 0x10000>; ++ interrupts = ; ++ clocks = <&display_clocks CLK_BUS_ROT>, ++ <&display_clocks CLK_ROT>; ++ clock-names = "bus", ++ "mod"; ++ resets = <&display_clocks RST_ROT>; ++ }; ++ + mixer0: mixer@1100000 { + compatible = "allwinner,sun8i-a83t-de2-mixer-0"; + reg = <0x01100000 0x100000>; +@@ -338,6 +357,11 @@ + reg = <0>; + remote-endpoint = <&tcon0_in_mixer0>; + }; ++ ++ mixer0_out_tcon1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&tcon1_in_mixer0>; ++ }; + }; + }; + }; +@@ -356,9 +380,17 @@ + #size-cells = <0>; + + mixer1_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; + reg = <1>; + +- mixer1_out_tcon1: endpoint { ++ mixer1_out_tcon0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&tcon0_in_mixer1>; ++ }; ++ ++ mixer1_out_tcon1: endpoint@1 { ++ reg = <1>; + remote-endpoint = <&tcon1_in_mixer1>; + }; + }; +@@ -425,6 +457,7 @@ + clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; + clock-names = "ahb", "tcon-ch0"; + clock-output-names = "tcon-pixel-clock"; ++ #clock-cells = <0>; + resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>; + reset-names = "lcd", "lvds"; + +@@ -441,11 +474,14 @@ + reg = <0>; + remote-endpoint = <&mixer0_out_tcon0>; + }; ++ ++ tcon0_in_mixer1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&mixer1_out_tcon0>; ++ }; + }; + + tcon0_out: port@1 { +- #address-cells = <1>; +- #size-cells = <0>; + reg = <1>; + }; + }; +@@ -465,9 +501,17 @@ + #size-cells = <0>; + + tcon1_in: port@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; + reg = <0>; + +- tcon1_in_mixer1: endpoint { ++ tcon1_in_mixer0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&mixer0_out_tcon1>; ++ }; ++ ++ tcon1_in_mixer1: endpoint@1 { ++ reg = <1>; + remote-endpoint = <&mixer1_out_tcon1>; + }; + }; +@@ -549,6 +593,31 @@ + sid: eeprom@1c14000 { + compatible = "allwinner,sun8i-a83t-sid"; + reg = <0x1c14000 0x400>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ ths_calibration: thermal-sensor-calibration@34 { ++ reg = <0x34 8>; ++ }; ++ }; ++ ++ crypto: crypto@1c15000 { ++ compatible = "allwinner,sun8i-a83t-crypto"; ++ reg = <0x01c15000 0x1000>; ++ interrupts = ; ++ resets = <&ccu RST_BUS_SS>; ++ clocks = <&ccu CLK_BUS_SS>, <&ccu CLK_SS>; ++ clock-names = "bus", "mod"; ++ }; ++ ++ msgbox: mailbox@1c17000 { ++ compatible = "allwinner,sun8i-a83t-msgbox", ++ "allwinner,sun6i-a31-msgbox"; ++ reg = <0x01c17000 0x1000>; ++ clocks = <&ccu CLK_BUS_MSGBOX>; ++ resets = <&ccu RST_BUS_MSGBOX>; ++ interrupts = ; ++ #mbox-cells = <1>; + }; + + usb_otg: usb@1c19000 { +@@ -562,6 +631,7 @@ + phys = <&usbphy 0>; + phy-names = "usb"; + extcon = <&usbphy 0>; ++ dr_mode = "otg"; + status = "disabled"; + }; + +@@ -649,6 +719,20 @@ + #interrupt-cells = <3>; + #gpio-cells = <3>; + ++ /omit-if-no-ref/ ++ csi_8bit_parallel_pins: csi-8bit-parallel-pins { ++ pins = "PE0", "PE2", "PE3", "PE6", "PE7", ++ "PE8", "PE9", "PE10", "PE11", ++ "PE12", "PE13"; ++ function = "csi"; ++ }; ++ ++ /omit-if-no-ref/ ++ csi_mclk_pin: csi-mclk-pin { ++ pins = "PE1"; ++ function = "csi"; ++ }; ++ + emac_rgmii_pins: emac-rgmii-pins { + pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", + "PD11", "PD12", "PD13", "PD14", "PD18", +@@ -676,6 +760,12 @@ + function = "i2c1"; + }; + ++ /omit-if-no-ref/ ++ i2c2_pe_pins: i2c2-pe-pins { ++ pins = "PE14", "PE15"; ++ function = "i2c2"; ++ }; ++ + i2c2_ph_pins: i2c2-ph-pins { + pins = "PH4", "PH5"; + function = "i2c2"; +@@ -747,10 +837,16 @@ + pins = "PG8", "PG9"; + function = "uart1"; + }; ++ ++ /omit-if-no-ref/ ++ uart2_pb_pins: uart2-pb-pins { ++ pins = "PB0", "PB1"; ++ function = "uart2"; ++ }; + }; + + timer@1c20c00 { +- compatible = "allwinner,sun4i-a10-timer"; ++ compatible = "allwinner,sun8i-a23-timer"; + reg = <0x01c20c00 0xa0>; + interrupts = , + ; +@@ -852,6 +948,39 @@ + status = "disabled"; + }; + ++ uart2: serial@1c28800 { ++ compatible = "snps,dw-apb-uart"; ++ reg = <0x01c28800 0x400>; ++ interrupts = ; ++ reg-shift = <2>; ++ reg-io-width = <4>; ++ clocks = <&ccu CLK_BUS_UART2>; ++ resets = <&ccu RST_BUS_UART2>; ++ status = "disabled"; ++ }; ++ ++ uart3: serial@1c28c00 { ++ compatible = "snps,dw-apb-uart"; ++ reg = <0x01c28c00 0x400>; ++ interrupts = ; ++ reg-shift = <2>; ++ reg-io-width = <4>; ++ clocks = <&ccu CLK_BUS_UART3>; ++ resets = <&ccu RST_BUS_UART3>; ++ status = "disabled"; ++ }; ++ ++ uart4: serial@1c29000 { ++ compatible = "snps,dw-apb-uart"; ++ reg = <0x01c29000 0x400>; ++ interrupts = ; ++ reg-shift = <2>; ++ reg-io-width = <4>; ++ clocks = <&ccu CLK_BUS_UART4>; ++ resets = <&ccu RST_BUS_UART4>; ++ status = "disabled"; ++ }; ++ + i2c0: i2c@1c2ac00 { + compatible = "allwinner,sun8i-a83t-i2c", + "allwinner,sun6i-a31-i2c"; +@@ -898,12 +1027,10 @@ + reg = <0x01c30000 0x104>; + interrupts = ; + interrupt-names = "macirq"; +- resets = <&ccu 13>; +- reset-names = "stmmaceth"; +- clocks = <&ccu 27>; ++ clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; +- #address-cells = <1>; +- #size-cells = <0>; ++ resets = <&ccu RST_BUS_EMAC>; ++ reset-names = "stmmaceth"; + status = "disabled"; + + mdio: mdio { +@@ -914,7 +1041,7 @@ + }; + + gic: interrupt-controller@1c81000 { +- compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; ++ compatible = "arm,gic-400"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x2000>, + <0x01c84000 0x2000>, +@@ -924,6 +1051,21 @@ + interrupts = ; + }; + ++ csi: camera@1cb0000 { ++ compatible = "allwinner,sun8i-a83t-csi"; ++ reg = <0x01cb0000 0x1000>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_CSI>, ++ <&ccu CLK_CSI_SCLK>, ++ <&ccu CLK_DRAM_CSI>; ++ clock-names = "bus", "mod", "ram"; ++ resets = <&ccu RST_BUS_CSI>; ++ status = "disabled"; ++ ++ csi_in: port { ++ }; ++ }; ++ + hdmi: hdmi@1ee0000 { + compatible = "allwinner,sun8i-a83t-dw-hdmi"; + reg = <0x01ee0000 0x10000>; +@@ -935,7 +1077,7 @@ + resets = <&ccu RST_BUS_HDMI1>; + reset-names = "ctrl"; + phys = <&hdmi_phy>; +- phy-names = "hdmi-phy"; ++ phy-names = "phy"; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pins>; + status = "disabled"; +@@ -981,7 +1123,7 @@ + compatible = "allwinner,sun8i-a83t-r-ccu"; + reg = <0x01f01400 0x400>; + clocks = <&osc24M>, <&osc16Md512>, <&osc16M>, +- <&ccu 6>; ++ <&ccu CLK_PLL_PERIPH>; + clock-names = "hosc", "losc", "iosc", "pll-periph"; + #clock-cells = <1>; + #reset-cells = <1>; +@@ -992,6 +1134,26 @@ + reg = <0x1f01c00 0x400>; + }; + ++ r_cir: ir@1f02000 { ++ compatible = "allwinner,sun8i-a83t-ir", ++ "allwinner,sun6i-a31-ir"; ++ clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>; ++ clock-names = "apb", "ir"; ++ resets = <&r_ccu RST_APB0_IR>; ++ interrupts = ; ++ reg = <0x01f02000 0x400>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_cir_pin>; ++ status = "disabled"; ++ }; ++ ++ r_lradc: lradc@1f03c00 { ++ compatible = "allwinner,sun8i-a83t-r-lradc"; ++ reg = <0x01f03c00 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ + r_pio: pinctrl@1f02c00 { + compatible = "allwinner,sun8i-a83t-r-pinctrl"; + reg = <0x01f02c00 0x400>; +@@ -1004,6 +1166,11 @@ + interrupt-controller; + #interrupt-cells = <3>; + ++ r_cir_pin: r-cir-pin { ++ pins = "PL12"; ++ function = "s_cir_rx"; ++ }; ++ + r_rsb_pins: r-rsb-pins { + pins = "PL0", "PL1"; + function = "s_rsb"; +@@ -1026,5 +1193,82 @@ + #address-cells = <1>; + #size-cells = <0>; + }; ++ ++ ths: thermal-sensor@1f04000 { ++ compatible = "allwinner,sun8i-a83t-ths"; ++ reg = <0x01f04000 0x100>; ++ interrupts = ; ++ nvmem-cells = <&ths_calibration>; ++ nvmem-cell-names = "calibration"; ++ #thermal-sensor-cells = <1>; ++ }; ++ }; ++ ++ thermal-zones { ++ cpu0_thermal: cpu0-thermal { ++ polling-delay-passive = <0>; ++ polling-delay = <0>; ++ thermal-sensors = <&ths 0>; ++ ++ trips { ++ cpu0_hot: cpu-hot { ++ temperature = <80000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ cpu0_very_hot: cpu-very-hot { ++ temperature = <100000>; ++ hysteresis = <0>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ cpu-hot-limit { ++ trip = <&cpu0_hot>; ++ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; ++ }; ++ }; ++ }; ++ ++ cpu1_thermal: cpu1-thermal { ++ polling-delay-passive = <0>; ++ polling-delay = <0>; ++ thermal-sensors = <&ths 1>; ++ ++ trips { ++ cpu1_hot: cpu-hot { ++ temperature = <80000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ cpu1_very_hot: cpu-very-hot { ++ temperature = <100000>; ++ hysteresis = <0>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ cpu-hot-limit { ++ trip = <&cpu1_hot>; ++ cooling-device = <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, ++ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; ++ }; ++ }; ++ }; ++ ++ gpu_thermal: gpu-thermal { ++ polling-delay-passive = <0>; ++ polling-delay = <0>; ++ thermal-sensors = <&ths 2>; ++ }; + }; + }; +diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts +index 71fb732089..babf4cf1b2 100644 +--- a/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts +@@ -53,11 +53,6 @@ + }; + }; + +-&emac { +- /* LEDs changed to active high on the plus */ +- /delete-property/ allwinner,leds-active-low; +-}; +- + &mmc1 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +diff --git a/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts +index 6dbf7b2e0c..b6ca45d18e 100644 +--- a/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts +@@ -67,7 +67,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts +index b8f46e2802..251bbab7d7 100644 +--- a/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts +@@ -70,6 +70,21 @@ + }; + }; + ++ leds { ++ compatible = "gpio-leds"; ++ ++ pwr { ++ label = "orangepi:green:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ status { ++ label = "orangepi:red:status"; ++ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; +@@ -88,6 +103,10 @@ + status = "okay"; + }; + ++&ehci0 { ++ status = "okay"; ++}; ++ + &hdmi { + status = "okay"; + }; +@@ -132,8 +151,27 @@ + status = "okay"; + }; + ++&ohci0 { ++ status = "okay"; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pa_pins>; + status = "okay"; + }; ++ ++&usb_otg { ++ /* ++ * According to schematics CN1 MicroUSB port can be used to take ++ * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB ++ * port cannot provide power externally even if the board is powered ++ * via GPIO pins. It thus makes sense to force peripheral mode. ++ */ ++ dr_mode = "peripheral"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts +index 15c22b06fc..47954551f5 100644 +--- a/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts ++++ b/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts +@@ -120,7 +120,7 @@ + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; + phy-handle = <&phy1>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + phy-supply = <®_dc1sw>; + status = "okay"; + }; +@@ -198,16 +198,16 @@ + }; + + ®_dc1sw { +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; + regulator-name = "vcc-gmac-phy"; + }; + + ®_dcdc1 { + regulator-always-on; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; +- regulator-name = "vcc-3v0"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; + }; + + ®_dcdc2 { +diff --git a/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi +index 39263e74fb..8e5cb3b3fd 100644 +--- a/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi ++++ b/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi +@@ -126,7 +126,7 @@ + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + + status = "okay"; + }; +-- +2.29.2 + diff --git a/AllWinner-PineTab.patch b/AllWinner-PineTab.patch new file mode 100644 index 0000000..04b6896 --- /dev/null +++ b/AllWinner-PineTab.patch @@ -0,0 +1,45 @@ +From 6bf15552c2b6becb48ce7732120e0ddb2078cb1a Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 14 Apr 2020 09:53:07 +0100 +Subject: [PATCH 9/9] initial pinetab support + +Signed-off-by: Peter Robinson +--- + configs/pinetab_defconfig | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + create mode 100644 configs/pinetab_defconfig + +diff --git a/configs/pinetab_defconfig b/configs/pinetab_defconfig +new file mode 100644 +index 0000000000..5b9620f3e5 +--- /dev/null ++++ b/configs/pinetab_defconfig +@@ -0,0 +1,26 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_SPL=y ++CONFIG_MACH_SUN50I=y ++CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y ++CONFIG_DRAM_CLK=552 ++CONFIG_DRAM_ZQ=3881949 ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 ++CONFIG_R_I2C_ENABLE=y ++CONFIG_SPL_SPI_SUNXI=y ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++CONFIG_USE_PREBOOT=y ++# CONFIG_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinetab" ++CONFIG_OF_LIST="sun50i-a64-pinetab" ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_SUNXI=y ++CONFIG_LED=y ++CONFIG_LED_GPIO=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_OHCI_HCD=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y +-- +2.26.0 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/IOMUX-Fix-buffer-overflow-in-iomux_replace_device.patch b/IOMUX-Fix-buffer-overflow-in-iomux_replace_device.patch new file mode 100644 index 0000000..d2c55f6 --- /dev/null +++ b/IOMUX-Fix-buffer-overflow-in-iomux_replace_device.patch @@ -0,0 +1,152 @@ +From patchwork Sun Apr 25 23:08:03 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Yuichiro Goto +X-Patchwork-Id: 1470141 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +Authentication-Results: ozlabs.org; + dkim=pass (2048-bit key; + unprotected) header.d=k-tech-co-jp.20150623.gappssmtp.com + header.i=@k-tech-co-jp.20150623.gappssmtp.com header.a=rsa-sha256 + header.s=20150623 header.b=aG2evrkI; + dkim-atps=neutral +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4FT3cr5pLLz9sV5 + for ; Mon, 26 Apr 2021 09:09:16 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id DAAE481FCD; + Mon, 26 Apr 2021 01:09:09 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=k-tech.co.jp +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=k-tech-co-jp.20150623.gappssmtp.com + header.i=@k-tech-co-jp.20150623.gappssmtp.com header.b="aG2evrkI"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 1971382057; Mon, 26 Apr 2021 01:09:06 +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,DKIM_SIGNED, + DKIM_VALID,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 +Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com + [IPv6:2607:f8b0:4864:20::42a]) + (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 E883680EC1 + for ; Mon, 26 Apr 2021 01:09:00 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=k-tech.co.jp +Authentication-Results: phobos.denx.de; + spf=none smtp.mailfrom=goto@k-tech.co.jp +Received: by mail-pf1-x42a.google.com with SMTP id h11so6707950pfn.0 + for ; Sun, 25 Apr 2021 16:09:00 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=k-tech-co-jp.20150623.gappssmtp.com; s=20150623; + h=from:to:cc:subject:date:message-id; + bh=ToYmsqKBzr3zTVvJdRjIX1oCqkuII+g2LxuLKTcyCm4=; + b=aG2evrkIlEWR+2+O4uf7Z5Z5dADCoHUqUfa4wv2uGZq16LXSZXAfr96QVEaI+Ysrq9 + S1Wd+94g29kp+qnFc4wLcMUomaZnm0eH+oliBgyqOH/LAB8n7c8avUhcTMJA60McRjeb + lMsHOX4LwDCbN9Nem+kDEPLIGsYIlg4bQczceWdlw5oHTMNRrj3uqSx1S52Y2xVo9Tl2 + fGiB75T4OGHlO+4ZfXl6Ky1Q6j8eRAp0ysfO9ZY/SjDd8dFowmDn8nCU3Bmy4boJaiK9 + uBxgI8S7h0uSltG+o8KcszPN/fpi2H8oBFuia8kJ1X/mrQ9AK4+n9jA4m5XlsXuyJYon + NSNA== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20161025; + h=x-gm-message-state:from:to:cc:subject:date:message-id; + bh=ToYmsqKBzr3zTVvJdRjIX1oCqkuII+g2LxuLKTcyCm4=; + b=idcco1cmfR9jg46QoNPi2i5Xp7KywMSugg82Gr+a6q2d+z8Y0bAWm69vVvCv27OuBe + EqSikfaPx616hVlE2JSRYhiQjTAkRivx+HbZTOo88Ud3nFuZSye7IzWVgTJQfYeMwk2t + ur3IC3wNHP8ZJZd7/ncR5bQtEH1dnQnntzZ/ObcQ2qYD7tE8i3XirP+t6bEXgfve6l3z + h8uhRhUdonx3My77SfoguPZ7agogNuJwKDxEOv2AiQC+sgi6hMSoCM5I/CTY5XBXWBcG + DsVq6CFis7XI0q4vT+fJnobTZcY+apdx6CQgbTHscvNNANNVQTcW4AmZtdMU00Py7rwl + +dlw== +X-Gm-Message-State: AOAM530gSI6IYWTUQZeEHkOvsFu+rBGyB3fBUHY4LPk43shM1KC4uXnK + KlhhaOqM5unov+ya4+knemWrDiRXPLvgHgVJ +X-Google-Smtp-Source: + ABdhPJz3Z6j4z6TV4bjvrr75pCyOMhSLC37qICUXTZOgOyojVAW7AH0TT24BTcUVdx8V5n2RwnQzBA== +X-Received: by 2002:a62:8c8c:0:b029:253:31e:55cb with SMTP id + m134-20020a628c8c0000b0290253031e55cbmr14541132pfd.27.1619392138942; + Sun, 25 Apr 2021 16:08:58 -0700 (PDT) +Received: from lubuntu1804.flets-east.jp (p1086-maru1shinjuku.tokyo.ocn.ne.jp. + [61.208.220.86]) + by smtp.gmail.com with ESMTPSA id i63sm9669769pfg.112.2021.04.25.16.08.57 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Sun, 25 Apr 2021 16:08:58 -0700 (PDT) +From: Yuichiro Goto +To: u-boot@lists.denx.de +Cc: Yuichiro Goto , Peter Robinson , + Andy Shevchenko , + Nicolas Saenz Julienne +Subject: [PATCH v3] IOMUX: Fix buffer overflow in iomux_replace_device() +Date: Mon, 26 Apr 2021 08:08:03 +0900 +Message-Id: <20210425230803.3055-1-goto@k-tech.co.jp> +X-Mailer: git-send-email 2.17.1 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +Use of strcat() against an uninitialized buffer would lead +to buffer overflow. This patch fixes it. + +Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") +Signed-off-by: Yuichiro Goto +Cc: Peter Robinson +Cc: Andy Shevchenko +Cc: Nicolas Saenz Julienne +Reviewed-by: Andy Shevchenko +--- + +Changes for v3: +- Add a Fixes tag in commit message +- Refactor the patch per suggestion from Andy Shevchenko + +Changes for v2: +- Add "IOMUX" in title + + common/iomux.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/common/iomux.c b/common/iomux.c +index b9088aa3b5..c428f7110a 100644 +--- a/common/iomux.c ++++ b/common/iomux.c +@@ -158,8 +158,12 @@ int iomux_replace_device(const int console, const char *old, const char *new) + return -ENOMEM; + } + +- strcat(tmp, ","); +- strcat(tmp, name); ++ if (arg) { ++ strcat(tmp, ","); ++ strcat(tmp, name); ++ } ++ else ++ strcpy(tmp, name); + + arg = tmp; + size = strlen(tmp) + 1; 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/USB-PD-TCPM-improvements.patch b/USB-PD-TCPM-improvements.patch deleted file mode 100644 index f84e6f3..0000000 --- a/USB-PD-TCPM-improvements.patch +++ /dev/null @@ -1,717 +0,0 @@ -From patchwork Wed Feb 26 18:44:44 2025 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Sebastian Reichel -X-Patchwork-Id: 2052544 -X-Patchwork-Delegate: marek.vasut@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=collabora.com header.i=@collabora.com - header.a=rsa-sha256 header.s=mail header.b=IthL1Z+m; - dkim-atps=neutral -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 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33M03Hhjz1yCp - for ; Thu, 27 Feb 2025 05:45:32 +1100 (AEDT) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id BFF7680FF0; - Wed, 26 Feb 2025 19:45:16 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com - header.b="IthL1Z+m"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 7614F810F9; Wed, 26 Feb 2025 19:45:13 +0100 (CET) -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,RCVD_IN_DNSWL_BLOCKED, - SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from bali.collaboradmins.com (bali.collaboradmins.com - [IPv6:2a01:4f8:201:9162::2]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 2173180FDE - for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sebastian.reichel@collabora.com -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; - s=mail; t=1740595507; - bh=Fnp6a8opSCXiH5NJdu5uivbBBZF3pe1CXyluh8+n8/c=; - h=From:To:Cc:Subject:Date:In-Reply-To:References:From; - b=IthL1Z+mDeIRy9MWEa0lGyJWuHk/Pu+yUpLly7RG6NIpC0lCgla3ssiy2x+8/G+bz - DWjrKUMxgWtqfjfffRiKEJZ6Z2sAXJ1ePvDmMtbGoolWSrzsV2+cWh0byYrEBuVBe9 - Vp0ye7gJ4Wt610s4QHa4xoYcm7h9KGmE3IEjb+XYFv1HMJIOoACl04BwkLctza1KBr - XlIqC+snvRP/yQxa2+6RYGXgQD5JnJxCM1orXVIJxyyJxTzb3XgNir60Gb4HI9724H - LDZy0Hq7NQ1zF0h1yVUOklDotw17isbNoI4K3JCExR+r7GsdESsGY6cwAbZY71iWlf - OsSSrV6TZtAMg== -Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de - [91.249.76.32]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature RSA-PSS (4096 bits)) - (No client certificate requested) (Authenticated sender: sre) - by bali.collaboradmins.com (Postfix) with ESMTPSA id A18CC17E0881; - Wed, 26 Feb 2025 19:45:07 +0100 (CET) -Received: by jupiter.universe (Postfix, from userid 1000) - id 32E35480034; Wed, 26 Feb 2025 19:45:07 +0100 (CET) -From: Sebastian Reichel -To: Marek Vasut , u-boot@lists.denx.de, - Jonas Karlman , Soeren Moch -Cc: Tim Harvey , - Philipp Tomsich , - Anand Moon , Maxim Kiselev , - Sebastian Reichel -Subject: [PATCH v2 1/4] usb: tcpm: improve handling of some power-supplies -Date: Wed, 26 Feb 2025 19:44:44 +0100 -Message-ID: <20250226184506.64114-2-sebastian.reichel@collabora.com> -X-Mailer: git-send-email 2.47.2 -In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> -References: <20250226184506.64114-1-sebastian.reichel@collabora.com> -MIME-Version: 1.0 -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 - -When the Rock 5B is booted with the current TCPM with its power supplied -by a "Cambrionix PDSync-C4" port it reaches the power-supply ready state. -Once that has happened the hub starts sending GetSinkCap messages, but -U-Boot already stopped processing PD messages. After retrying a bunch of -times the hub instead sends soft resets. Since U-Boot will also not -react to them, the USB hub will follow-up with a hard reset and that -cuts off the supply voltage. - -Since the state machine is already prepared to handle GetSinkCap -messages, try to avoid this by handling incoming messages for another -50ms after reaching the ready state. - -Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") -Signed-off-by: Sebastian Reichel ---- - drivers/usb/tcpm/tcpm.c | 31 ++++++++++++++++++++++++++----- - 1 file changed, 26 insertions(+), 5 deletions(-) - -diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c -index 0aee57cb2f4a..b754b4dcd0b5 100644 ---- a/drivers/usb/tcpm/tcpm.c -+++ b/drivers/usb/tcpm/tcpm.c -@@ -2229,6 +2229,17 @@ static int tcpm_port_init(struct udevice *dev) - return 0; - } - -+static inline void tcpm_poll_one_event(struct udevice *dev) -+{ -+ const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev); -+ struct tcpm_port *port = dev_get_uclass_plat(dev); -+ -+ drvops->poll_event(dev); -+ port->poll_event_cnt++; -+ udelay(500); -+ tcpm_check_and_run_delayed_work(dev); -+} -+ - static void tcpm_poll_event(struct udevice *dev) - { - const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev); -@@ -2242,15 +2253,25 @@ static void tcpm_poll_event(struct udevice *dev) - (port->state == SNK_READY || port->state == SRC_READY)) - break; - -- drvops->poll_event(dev); -- port->poll_event_cnt++; -- udelay(500); -- tcpm_check_and_run_delayed_work(dev); -+ tcpm_poll_one_event(dev); - } - -- if (port->state != SNK_READY && port->state != SRC_READY) -+ /* -+ * Some power-supplies send GetSinkCap shortly after they are ready. -+ * If they do not receive a response after a few retries they will issue -+ * a soft-reset followed by a hard reset, which kills the board power. -+ * Let's poll for 50ms after reaching the ready state to check if the -+ * power-supply wants something from us. -+ */ -+ if (port->state == SNK_READY) { -+ port->poll_event_cnt = 0; -+ -+ while (port->poll_event_cnt < 100) -+ tcpm_poll_one_event(dev); -+ } else { - dev_warn(dev, "TCPM: exit in state %s\n", - tcpm_states[port->state]); -+ } - - /* - * At this time, call the callback function of the respective pd chip - -From patchwork Wed Feb 26 18:44:45 2025 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Sebastian Reichel -X-Patchwork-Id: 2052546 -X-Patchwork-Delegate: marek.vasut@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=collabora.com header.i=@collabora.com - header.a=rsa-sha256 header.s=mail header.b=hgX6o5vZ; - dkim-atps=neutral -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 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33MJ5sFGz1yCp - for ; Thu, 27 Feb 2025 05:45:48 +1100 (AEDT) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 69A29811C5; - Wed, 26 Feb 2025 19:45:17 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com - header.b="hgX6o5vZ"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 832B180FB9; Wed, 26 Feb 2025 19:45:14 +0100 (CET) -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,RCVD_IN_DNSWL_BLOCKED, - RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, - SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from bali.collaboradmins.com (bali.collaboradmins.com - [148.251.105.195]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 2178380FF0 - for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sebastian.reichel@collabora.com -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; - s=mail; t=1740595507; - bh=H/gQCZCWVmLNRIaBLvWsE35SaDMWvta2+rTkymkHQJE=; - h=From:To:Cc:Subject:Date:In-Reply-To:References:From; - b=hgX6o5vZwM72CR2hgo76tgo2eE00qHM7oNja381ACl8gIUUVioy8RTeqXtum89tBf - aIwKm/oNQNvGxy92pX5/1Jg/MwYZKS8jDukz6ZgsLKu22rJXf58FFoV095AcEkUMB2 - lrO4KJgFW/x1FK8GmSVSXXH+iUYJLkzsfZKgHKoQYHZcVXJRgFjHR5ytGKsA/fq4el - 7Wrx3lmLNjL7fYlDF5AyY+Wl6hqzjDq58nFedXHv8TEHx6fzfB0IBzOL/F8bGqVcyy - lal7bjJvMPoA9zfgIC77R1neWktg5FSro75YciSRSj9lmMNCmESnSPCgsZ4wBW0V6f - ppD77gOtjDfLQ== -Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de - [91.249.76.32]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature RSA-PSS (4096 bits)) - (No client certificate requested) (Authenticated sender: sre) - by bali.collaboradmins.com (Postfix) with ESMTPSA id 9725D17E087F; - Wed, 26 Feb 2025 19:45:07 +0100 (CET) -Received: by jupiter.universe (Postfix, from userid 1000) - id 34511480037; Wed, 26 Feb 2025 19:45:07 +0100 (CET) -From: Sebastian Reichel -To: Marek Vasut , u-boot@lists.denx.de, - Jonas Karlman , Soeren Moch -Cc: Tim Harvey , - Philipp Tomsich , - Anand Moon , Maxim Kiselev , - Sebastian Reichel -Subject: [PATCH v2 2/4] usb: tcpm: avoid resets for missing source capability - messages -Date: Wed, 26 Feb 2025 19:44:45 +0100 -Message-ID: <20250226184506.64114-3-sebastian.reichel@collabora.com> -X-Mailer: git-send-email 2.47.2 -In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> -References: <20250226184506.64114-1-sebastian.reichel@collabora.com> -MIME-Version: 1.0 -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 - -The current TCPM code implements source capability message handling -according to the USB-PD specification. Unfortunately some USB PD -sources do not properly follow the specification and do not send -source capability messages after a soft reset when they already -negotiated a specific contract before. The currently implemented way -(and what is described in the specificiation) to resolve this problem -is triggering a hard reset. - -But a hard reset is fatal on batteryless platforms powered via USB-C PD, -since that removes VBUS for some time. Since this is triggered at boot -time, the system may get stuck in a boot loop. - -For example I noticed the following behaviour on a Radxa Rock 5B -combined with an affected power-supply: - -1. The system is booted up with current code -2. A reboot is requested -3. U-Boot TCPM / fusb302 driver sends soft reset and waits for the - source capability message -4. No new source capability message is send by the power-supply - after the soft reset -5. U-Boot sends a hard reset -6. The board resets, but the fusb302 registers are not reset. This - is because of a hardware glitch. The serial pins are high when - no data is exchanged. Apparently the RK3588 has protection diodes, - which leak some voltage into the power-domain. The Rock 5B serial - pins and the fusb302 are using the same 3.3V power domain and the - leaked voltage is enough to keep the fusb302 registers alive. -7. After the hard reset the power-supply sends another source capability - message, which is auto-acked by fusb302 (because the register state - is kept) even though the U-Boot driver has not yet probed. Once the - U-Boot driver probes it sends another soft reset and waits for a new - source capability message, which never arrives. - -Fortunately the affected power-supplies (I have two setups showing this -behaviour) support sending a source capability message when explicitly -being asked. Thus an easy workaround to handle this is deviating from -the USB-PD specification and sending a Get_Source_Cap message and -waiting some time longer before doing the hard reset. - -Note, that I recently added the same workaround to the Linux kernel -with a slightly different rationale (since it needs to take over from -U-Boot). - -Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") -Signed-off-by: Sebastian Reichel ---- - drivers/usb/tcpm/tcpm-internal.h | 1 + - drivers/usb/tcpm/tcpm.c | 32 +++++++++++++++++++++++++++++--- - 2 files changed, 30 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/tcpm/tcpm-internal.h b/drivers/usb/tcpm/tcpm-internal.h -index 561442090027..4861f4d13866 100644 ---- a/drivers/usb/tcpm/tcpm-internal.h -+++ b/drivers/usb/tcpm/tcpm-internal.h -@@ -30,6 +30,7 @@ - S(SNK_DISCOVERY_DEBOUNCE), \ - S(SNK_DISCOVERY_DEBOUNCE_DONE), \ - S(SNK_WAIT_CAPABILITIES), \ -+ S(SNK_WAIT_CAPABILITIES_TIMEOUT), \ - S(SNK_NEGOTIATE_CAPABILITIES), \ - S(SNK_TRANSITION_SINK), \ - S(SNK_TRANSITION_SINK_VBUS), \ -diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c -index b754b4dcd0b5..786d92fa4c6f 100644 ---- a/drivers/usb/tcpm/tcpm.c -+++ b/drivers/usb/tcpm/tcpm.c -@@ -1424,7 +1424,8 @@ static inline enum tcpm_state hard_reset_state(struct tcpm_port *port) - return ERROR_RECOVERY; - if (port->pwr_role == TYPEC_SOURCE) - return SRC_UNATTACHED; -- if (port->state == SNK_WAIT_CAPABILITIES) -+ if (port->state == SNK_WAIT_CAPABILITIES || -+ port->state == SNK_WAIT_CAPABILITIES_TIMEOUT) - return SNK_READY; - return SNK_UNATTACHED; - } -@@ -1650,10 +1651,35 @@ static void run_state_machine(struct udevice *dev) - tcpm_set_state(dev, SOFT_RESET_SEND, - PD_T_SINK_WAIT_CAP); - } else { -- tcpm_set_state(dev, hard_reset_state(port), -- PD_T_SINK_WAIT_CAP); -+ if (!port->self_powered) -+ tcpm_set_state(dev, SNK_WAIT_CAPABILITIES_TIMEOUT, -+ PD_T_SINK_WAIT_CAP); -+ else -+ tcpm_set_state(dev, hard_reset_state(port), -+ PD_T_SINK_WAIT_CAP); - } - break; -+ case SNK_WAIT_CAPABILITIES_TIMEOUT: -+ /* -+ * There are some USB PD sources in the field, which do not -+ * properly implement the specification and fail to start -+ * sending Source Capability messages after a soft reset. The -+ * specification suggests to do a hard reset when no Source -+ * capability message is received within PD_T_SINK_WAIT_CAP, -+ * but that might effectively kil the machine's power source. -+ * -+ * This slightly diverges from the specification and tries to -+ * recover from this by explicitly asking for the capabilities -+ * using the Get_Source_Cap control message before falling back -+ * to a hard reset. The control message should also be supported -+ * and handled by all USB PD source and dual role devices -+ * according to the specification. -+ */ -+ if (tcpm_pd_send_control(dev, PD_CTRL_GET_SOURCE_CAP)) -+ tcpm_set_state_cond(dev, hard_reset_state(port), 0); -+ else -+ tcpm_set_state(dev, hard_reset_state(port), PD_T_SINK_WAIT_CAP); -+ break; - case SNK_NEGOTIATE_CAPABILITIES: - port->pd_capable = true; - port->hard_reset_count = 0; - -From patchwork Wed Feb 26 18:44:46 2025 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Sebastian Reichel -X-Patchwork-Id: 2052545 -X-Patchwork-Delegate: marek.vasut@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=collabora.com header.i=@collabora.com - header.a=rsa-sha256 header.s=mail header.b=BxTv7Lfo; - 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) server-digest SHA384) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33M971h7z1yCp - for ; Thu, 27 Feb 2025 05:45:41 +1100 (AEDT) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 1B09C8118B; - Wed, 26 Feb 2025 19:45:17 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com - header.b="BxTv7Lfo"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 4399E810F9; Wed, 26 Feb 2025 19:45:14 +0100 (CET) -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,RCVD_IN_DNSWL_BLOCKED, - SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from bali.collaboradmins.com (bali.collaboradmins.com - [IPv6:2a01:4f8:201:9162::2]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 2163F80FB9 - for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sebastian.reichel@collabora.com -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; - s=mail; t=1740595507; - bh=7OaDpd2idE5ETWAiOZte0kuOU6ZYitEVWkDgDmqaQU8=; - h=From:To:Cc:Subject:Date:In-Reply-To:References:From; - b=BxTv7LfoAae43YSXPquVPmmwStgQirXCxaSBD0fo554R5O/si/Iif5L+zXXJocATJ - z7+I7ZKbknkTeVyzoRDCXvXIVz2bFdTRWQN4Z2iwJbVI1covAv/Gn4wIE2Q6hbNKbU - qV5AKg7gvrKkbztbo7N9bHNjkrlAbd8B4Ew3SR8FM46DMAOwNzVsoX3rLMcPtlWzHj - 4OBKCx22H/4ASIWjMbYoDE09DyQ+CPOf8JcX8OPwFcH9j6vW6cEWvyjiAyDj6LnwOq - KD+ZYVIkWhkIzAkE2NHB2IpA4xlxW8i18BJzNBD8N1eBx/HCgb0camb4KanY1Hta/d - 4ipLyuFaCkMog== -Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de - [91.249.76.32]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest - SHA256) - (No client certificate requested) (Authenticated sender: sre) - by bali.collaboradmins.com (Postfix) with ESMTPSA id 816AA17E0861; - Wed, 26 Feb 2025 19:45:07 +0100 (CET) -Received: by jupiter.universe (Postfix, from userid 1000) - id 361F2480038; Wed, 26 Feb 2025 19:45:07 +0100 (CET) -From: Sebastian Reichel -To: Marek Vasut , u-boot@lists.denx.de, - Jonas Karlman , Soeren Moch -Cc: Tim Harvey , - Philipp Tomsich , - Anand Moon , Maxim Kiselev , - Sebastian Reichel -Subject: [PATCH v2 3/4] usb: tcpm: print error on hard reset -Date: Wed, 26 Feb 2025 19:44:46 +0100 -Message-ID: <20250226184506.64114-4-sebastian.reichel@collabora.com> -X-Mailer: git-send-email 2.47.2 -In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> -References: <20250226184506.64114-1-sebastian.reichel@collabora.com> -MIME-Version: 1.0 -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 - -A USB-PD hard reset involves removing the voltage from VBUS for some -time. So basically it has the same effect as removing the USB-C plug -for a short moment. If the machine is powered from the USB-C port and -does not have a fallback supply (e.g. a battery), this will result in -a full machine reset due to power loss. - -Ideally we want to avoid triggering a hard reset on these boards. A -non-working USB-C port is probably better than unplanned reboots. But -boards with a backup supply should do the hard reset to get everything -working again. - -In theory it would be enough to check the self_powered property, but -it seems the property might not be configured consistently enough in -system firmwares. - -USB-PD hard resets should happen rarely in general, so let's at least -print an error message before the potential board reset happens. This -is also useful, since it immediately gives away which device triggered -the hard reset. - -Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") -Signed-off-by: Sebastian Reichel ---- - drivers/usb/tcpm/tcpm.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c -index 786d92fa4c6f..909fe2ef4fcb 100644 ---- a/drivers/usb/tcpm/tcpm.c -+++ b/drivers/usb/tcpm/tcpm.c -@@ -1711,6 +1711,8 @@ static void run_state_machine(struct udevice *dev) - - /* Hard_Reset states */ - case HARD_RESET_SEND: -+ if (!port->self_powered && port->port_type == TYPEC_PORT_SNK) -+ dev_err(dev, "Initiating hard-reset, which might result in machine power-loss.\n"); - tcpm_pd_transmit(dev, TCPC_TX_HARD_RESET, NULL); - tcpm_set_state(dev, HARD_RESET_START, 0); - port->wait_dr_swap_message = false; - -From patchwork Wed Feb 26 18:44:47 2025 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Sebastian Reichel -X-Patchwork-Id: 2052542 -X-Patchwork-Delegate: marek.vasut@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=collabora.com header.i=@collabora.com - header.a=rsa-sha256 header.s=mail header.b=K4mNmlOy; - dkim-atps=neutral -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 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33Lk40FPz1yCp - for ; Thu, 27 Feb 2025 05:45:18 +1100 (AEDT) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id DAFC780FF2; - Wed, 26 Feb 2025 19:45:12 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.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=collabora.com header.i=@collabora.com - header.b="K4mNmlOy"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id 56A22810F9; Wed, 26 Feb 2025 19:45:11 +0100 (CET) -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,RCVD_IN_DNSWL_BLOCKED, - SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from bali.collaboradmins.com (bali.collaboradmins.com - [IPv6:2a01:4f8:201:9162::2]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 217E080FF2 - for ; Wed, 26 Feb 2025 19:45:08 +0100 (CET) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=collabora.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=sebastian.reichel@collabora.com -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; - s=mail; t=1740595507; - bh=FeXZr6pfjIqGXvnsLHDigD702EmgVNH91IWVsD16udQ=; - h=From:To:Cc:Subject:Date:In-Reply-To:References:From; - b=K4mNmlOycXzLuJnNeDxyXLVCeZWNr//ycRqDt3ld9634ThDvJ0+y49X3z2nYW+fei - HCqH2AoFiXj7khjiFpwCA4xOlYaTrF9yb0M9ApRxJ8vGuslNIK2k9osj8IJMoWmY8S - fEez4H6Wso4VamCnXKCze2G5np5mhola5QxSnIJ2CXdFP9TM1x54P+XyeJMX6IZK0X - lpZ0R8mACHGgXnkBASRMbo0CnLfSVrUgA83A0FHT7UgxfW8399wHol/FBakg5WS8nt - 47154TDW4ikoGF4dHBeD0KemJSR7I4F+nnUVQfgg8sXZKVm4yilBT+yx3WWBVCjQDl - 3igqfexnaUKnA== -Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de - [91.249.76.32]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest - SHA256) - (No client certificate requested) (Authenticated sender: sre) - by bali.collaboradmins.com (Postfix) with ESMTPSA id 7FBB317E065A; - Wed, 26 Feb 2025 19:45:07 +0100 (CET) -Received: by jupiter.universe (Postfix, from userid 1000) - id 37B6A480039; Wed, 26 Feb 2025 19:45:07 +0100 (CET) -From: Sebastian Reichel -To: Marek Vasut , u-boot@lists.denx.de, - Jonas Karlman , Soeren Moch -Cc: Tim Harvey , - Philipp Tomsich , - Anand Moon , Maxim Kiselev , - Sebastian Reichel -Subject: [PATCH v2 4/4] usb: tcpm: improve data role mismatch error recovery -Date: Wed, 26 Feb 2025 19:44:47 +0100 -Message-ID: <20250226184506.64114-5-sebastian.reichel@collabora.com> -X-Mailer: git-send-email 2.47.2 -In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com> -References: <20250226184506.64114-1-sebastian.reichel@collabora.com> -MIME-Version: 1.0 -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 - -On Radxa ROCK 5B I managed to get U-Boot into an endless loop of -printing - -fusb302 usb-typec@22: TCPM: data role mismatch, initiating error recovery - -messages by changing the data role in Linux and then rebooting the -system. This is happening because the external device (A cheap USB-C hub -powered through a USB-C PD power-supply) kept its state and the error -recovery path for non self-powered devices is not enough to change it. - -Avoid this by swapping our own data role when the error recovery stage -is reached for a port, which is not self-powered. Right now data support -is limited anyways and once proper support is added we can use the data -role swap request to get the desired data direction after the initial -negotiation completed. - -Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework") -Signed-off-by: Sebastian Reichel ---- - drivers/usb/tcpm/tcpm.c | 30 +++++++++++++++++++++++++++--- - 1 file changed, 27 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c -index 909fe2ef4fcb..12d66d470f9a 100644 ---- a/drivers/usb/tcpm/tcpm.c -+++ b/drivers/usb/tcpm/tcpm.c -@@ -833,6 +833,28 @@ static void tcpm_pd_ctrl_request(struct udevice *dev, - } - } - -+static void tcpm_recover_data_role_mismatch(struct udevice *dev) -+{ -+ struct tcpm_port *port = dev_get_uclass_plat(dev); -+ -+ dev_err(dev, "TCPM: data role mismatch, initiating error recovery\n"); -+ if (port->self_powered) { -+ tcpm_set_state(dev, ERROR_RECOVERY, 0); -+ return; -+ } -+ -+ /* -+ * The error recovery will not help for devices, which are not -+ * self-powered because the error recovery avoids killing the board -+ * power. Since this can happen early on sending -+ * a DR_SWAP request is not sensible. Instead let's change our own -+ * data role. It can be swapped back once USB-PD reached the ready -+ * state. -+ */ -+ tcpm_set_roles(dev, true, port->pwr_role, -+ port->data_role == TYPEC_HOST ? TYPEC_DEVICE : TYPEC_HOST); -+} -+ - static void tcpm_pd_rx_handler(struct udevice *dev, - const struct pd_message *msg) - { -@@ -867,9 +889,11 @@ static void tcpm_pd_rx_handler(struct udevice *dev, - remote_is_host = !!(le16_to_cpu(msg->header) & PD_HEADER_DATA_ROLE); - local_is_host = port->data_role == TYPEC_HOST; - if (remote_is_host == local_is_host) { -- dev_err(dev, "TCPM: data role mismatch, initiating error recovery\n"); -- tcpm_set_state(dev, ERROR_RECOVERY, 0); -- } else { -+ tcpm_recover_data_role_mismatch(dev); -+ local_is_host = port->data_role == TYPEC_HOST; -+ } -+ -+ if (remote_is_host != local_is_host) { - if (cnt) - tcpm_pd_data_request(dev, msg); - else diff --git a/aarch64-boards b/aarch64-boards index 366d0c8..15abee1 100644 --- a/aarch64-boards +++ b/aarch64-boards @@ -1,23 +1,16 @@ a64-olinuxino -a64-olinuxino-emmc amarula_a64_relic -anbernic_rg35xx_h700 -apple_m1 bananapi_m2_plus_h5 bananapi_m64 beelink_gs1 dragonboard410c dragonboard820c -eaidk-610-rk3399 -emlid_neutis_n5_devboard -evb-px5 evb-rk3328 evb-rk3399 ficus-rk3399 firefly-rk3399 geekbox hikey -hmibsc khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 @@ -25,7 +18,6 @@ khadas-vim khadas-vim2 khadas-vim3 khadas-vim3l -leez-rk3399 libretech-ac libretech_all_h3_cc_h5 libretech_all_h3_it_h5 @@ -37,70 +29,51 @@ nanopc-t4-rk3399 nanopi_a64 nanopi-k2 nanopi-m4-2gb-rk3399 -nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi_neo2 nanopi-neo4-rk3399 nanopi_neo_plus2 -nanopi_r1s_h5 -nanopi-r2c-plus-rk3328 -nanopi-r2c-rk3328 -nanopi-r2s-plus-rk3328 nanopi-r2s-rk3328 -nanopi-r4s-rk3399 -oceanic_5205_5inmfd odroid-c2 orangepi_3 orangepi_lite2 orangepi_one_plus orangepi_pc2 orangepi_prime -orangepi-r1-plus-lts-rk3328 -orangepi-r1-plus-rk3328 orangepi-rk3399 orangepi_win orangepi_zero2 -orangepi_zero2w -orangepi_zero3 orangepi_zero_plus orangepi_zero_plus2 p212 p2371-2180 p2771-0000-500 +p3450-0000 pine64-lts pine64_plus pinebook pinebook-pro-rk3399 pine_h64 pinephone -pinephone-pro-rk3399 pinetab poplar puma-rk3399 -qcm6490 -qcom -qcom_qcs8300 -qcom_qcs9100 -qemu_arm64 -qemu_arm64_lwip roc-cc-rk3328 -rock-4c-plus-rk3399 -rock-4se-rk3399 rock64-rk3328 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-e-rk3328 -rock-pi-e-v3-rk3328 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399 +rpi_3 +rpi_4 rpi_arm64 sopine_baseboard tanix_tx6 teres_i -transpeed-8k618-t turris_mox vexpress_aemv8a_juno -x96_mate +xilinx_zynqmp_virt diff --git a/aarch64-chromebooks b/aarch64-chromebooks new file mode 100644 index 0000000..e69de29 diff --git a/arm-boards b/arm-boards new file mode 100644 index 0000000..63ab288 --- /dev/null +++ b/arm-boards @@ -0,0 +1,140 @@ +A10-OLinuXino-Lime +A10s-OLinuXino-M +A13-OLinuXino +A13-OLinuXinoM +A20-Olimex-SOM-EVB +A20-OLinuXino-Lime +A20-OLinuXino-Lime2 +A20-OLinuXino_MICRO +am335x_evm +am57xx_evm +Ampe_A76 +apalis_imx6 +arndale +Auxtek-T003 +Auxtek-T004 +ba10_tv_box +Bananapi +bananapi_m1_plus +bananapi_m2_berry +Bananapi_m2m +bananapi_m2_plus_h3 +Bananapi_M2_Ultra +bananapi_m2_zero +Bananapro +chiliboard +CHIP +Chuwi_V7_CW0825 +clearfog +cm_fx6 +Colombus +colorfly_e708_q1 +CSQ_CS908 +Cubieboard +Cubieboard2 +Cubieboard4 +Cubietruck +Cubietruck_plus +db-mv784mp-gp +difrnce_dit4350 +dserve_dsrv9703c +evb-rk3229 +firefly-rk3288 +helios4 +Hummingbird_A31 +Hyundai_A7HD +i12-tvbox +icnova-a20-swac +inet1 +iNet_3F +iNet_3W +inet86dz +iNet_86VS +inet97fv2 +inet98v_rev2 +inet9f_rev03 +inet_q972 +Itead_Ibox_A20 +jesurun_q5 +jetson-tk1 +Lamobo_R1 +libretech_all_h3_cc_h2_plus +Linksprite_pcDuino +Linksprite_pcDuino3 +Linksprite_pcDuino3_Nano +liteboard +marsboard +Marsboard_A10 +Mele_A1000 +Mele_A1000G_quad +Mele_I7 +Mele_M3 +Mele_M5 +Mele_M9 +Mini-X +mk802 +mk802_a10s +mk802ii +MK808C +MSI_Primo73 +MSI_Primo81 +mx6cuboxi +nanopi_m1 +nanopi_m1_plus +nanopi_neo +novena +odroid +odroid-xu3 +omap3_beagle +omap4_panda +omap5_uevm +Orangepi +orangepi_2 +orangepi_lite +Orangepi_mini +orangepi_one +orangepi_pc +orangepi_pc_plus +orangepi_plus +orangepi_plus2e +orangepi_r1 +orangepi_zero +origen +paz00 +pinecube +polaroid_mid2809pxe04 +pov_protab2_ips9 +q8_a13_tablet +q8_a23_tablet_800x480 +q8_a33_tablet_1024x600 +q8_a33_tablet_800x480 +qemu_arm +r7-tv-dongle +riotboard +rock +rock2 +rock-pi-n8-rk3288 +rpi_2 +rpi_3_32b +rpi_4_32b +Sinlinx_SinA31s +Sinovoip_BPI_M2 +Sinovoip_BPI_M3 +stih410-b2260 +stm32mp15_basic +sunxi_Gemei_G9 +tbs_a711 +tinker-rk3288 +tinker-s-rk3288 +trimslice +turris_omnia +udoo +udoo_neo +usbarmory +UTOO_P66 +wandboard +warp7 +Wexler_TAB7200 +Wits_Pro_A20_DKT +xilinx_zynq_virt +Yones_Toptech_BS1078_V2 diff --git a/arm-chromebooks b/arm-chromebooks new file mode 100644 index 0000000..899c823 --- /dev/null +++ b/arm-chromebooks @@ -0,0 +1,8 @@ +chromebit_mickey_defconfig +chromebook_jerry_defconfig +chromebook_minnie_defconfig +nyan-big_defconfig +peach-pi_defconfig +peach-pit_defconfig +snow_defconfig +spring_defconfig diff --git a/disable-VBE-by-default.patch b/disable-VBE-by-default.patch deleted file mode 100644 index 1f1b710..0000000 --- a/disable-VBE-by-default.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d9e3a49bc2a29922da5bddd95772279f6edba802 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Fri, 18 Aug 2023 13:28:05 +0100 -Subject: [PATCH] disable VBE by default - -The VBE protocol needs explicit device support and as -such isn't particularly useful by itself without that, -it also adds size and the potential of an attack vector -so devices that wish to use this protocol should -explicitly opt in to it like all other large features -in U-Boot. - -Signed-off-by: Peter Robinson ---- - boot/Kconfig | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/boot/Kconfig b/boot/Kconfig -index 30eb5b328d7..e8c3fbcb11d 100644 ---- a/boot/Kconfig -+++ b/boot/Kconfig -@@ -635,7 +635,6 @@ config BOOTMETH_QFW - config BOOTMETH_VBE - bool "Bootdev support for Verified Boot for Embedded" - depends on FIT -- default y - select BOOTMETH_GLOBAL - select EVENT - help --- -2.49.0 - diff --git a/dragonboard-fixes.patch b/dragonboard-fixes.patch new file mode 100644 index 0000000..c49ea50 --- /dev/null +++ b/dragonboard-fixes.patch @@ -0,0 +1,115 @@ +From 8b0274a733cd1ce39ad9ad18e1bd8efdd02a40b7 Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Wed, 21 Jun 2017 14:21:15 -0400 +Subject: [PATCH 1/3] WIP: fix usb + +--- + common/usb_storage.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common/usb_storage.c b/common/usb_storage.c +index d92ebb6eb19..9df3c3daaf4 100644 +--- a/common/usb_storage.c ++++ b/common/usb_storage.c +@@ -1016,7 +1016,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss) + + static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss) + { +- int retries = 10; ++ int retries = 20; + + do { + memset(&srb->cmd[0], 0, 12); +@@ -1039,7 +1039,7 @@ static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss) + if ((srb->sense_buf[2] == 0x02) && + (srb->sense_buf[12] == 0x3a)) + return -1; +- mdelay(100); ++ mdelay(250); + } while (retries--); + + return -1; +-- +2.19.1 + +From 7bf41d74ca9d58bc2243b7688f8987c1d373ea56 Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Mon, 3 Jul 2017 08:34:37 -0400 +Subject: [PATCH 2/3] HACK: disable emmc + +Hitting some timeout which makes boot take much longer. And +uefi/boot/rootfs partitions will be on sd-card or usb disk, etc, +so we can just ignore emmc. +--- + arch/arm/dts/dragonboard410c.dts | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts +index fa348bc621e..bfe7f15d5ed 100644 +--- a/arch/arm/dts/dragonboard410c.dts ++++ b/arch/arm/dts/dragonboard410c.dts +@@ -106,6 +106,7 @@ + #phy-cells = <0>; + }; + ++/* + sdhci@07824000 { + compatible = "qcom,sdhci-msm-v4"; + reg = <0x7824900 0x11c 0x7824000 0x800>; +@@ -115,6 +116,7 @@ + clock = <&clkc 0>; + clock-frequency = <100000000>; + }; ++*/ + + sdhci@07864000 { + compatible = "qcom,sdhci-msm-v4"; +-- +2.19.1 + +From 871fe802cf3ab593b9332c4f36ab2b3f179d51ae Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 4 Sep 2018 12:21:59 +0100 +Subject: [PATCH 3/3] add options for dm410c config + +--- + configs/dragonboard410c_defconfig | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig +index a55abaf8df5..4ece0cafbe4 100644 +--- a/configs/dragonboard410c_defconfig ++++ b/configs/dragonboard410c_defconfig +@@ -7,6 +7,8 @@ CONFIG_NR_DRAM_BANKS=1 + # CONFIG_ANDROID_BOOT_IMAGE is not set + CONFIG_FIT=y + CONFIG_OF_BOARD_SETUP=y ++CONFIG_FAT_WRITE=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y + CONFIG_MISC_INIT_R=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +@@ -41,6 +43,13 @@ CONFIG_DM_PMIC=y + CONFIG_PMIC_PM8916=y + CONFIG_MSM_SERIAL=y + CONFIG_SPMI_MSM=y ++CONFIG_DM_ETH=y ++CONFIG_DM_KEYBOARD=y ++CONFIG_DM_VIDEO=y ++# CONFG_VIDEO_BPP8 is not set ++CONFIG_NO_FB_CLEAR=y ++CONFIG_VIDEO_SIMPLE=y ++CONFIG_USB_KEYBOARD=y + CONFIG_USB=y + CONFIG_DM_USB=y + CONFIG_USB_EHCI_HCD=y +@@ -57,5 +66,6 @@ CONFIG_USB_HOST_ETHER=y + CONFIG_USB_ETHER_ASIX=y + CONFIG_USB_ETHER_ASIX88179=y + CONFIG_USB_ETHER_MCS7830=y ++CONFIG_USB_ETHER_RTL8152=y + CONFIG_USB_ETHER_SMSC95XX=y + CONFIG_OF_LIBFDT_OVERLAY=y +-- +2.19.1 + diff --git a/efi_loader-loosen-buffer-parameter-check-in-efi_file_read_int.patch b/efi_loader-loosen-buffer-parameter-check-in-efi_file_read_int.patch new file mode 100644 index 0000000..b221ddd --- /dev/null +++ b/efi_loader-loosen-buffer-parameter-check-in-efi_file_read_int.patch @@ -0,0 +1,211 @@ +From patchwork Wed Apr 28 13:54:01 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +X-Patchwork-Submitter: "Peng Fan (OSS)" +X-Patchwork-Id: 1471143 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +Authentication-Results: ozlabs.org; + dkim=pass (1024-bit key; + unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com + header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com + header.b=Y9LhgRit; + dkim-atps=neutral +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4FVfRz6xNvz9sW6 + for ; Wed, 28 Apr 2021 23:22:07 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 0143180EC0; + Wed, 28 Apr 2021 15:22:01 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=oss.nxp.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Authentication-Results: phobos.denx.de; + dkim=pass (1024-bit key; + unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com + header.b="Y9LhgRit"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 11DCC80EC0; Wed, 28 Apr 2021 15:22:00 +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=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS + autolearn=no autolearn_force=no version=3.4.2 +Received: from EUR05-VI1-obe.outbound.protection.outlook.com + (mail-vi1eur05on20614.outbound.protection.outlook.com + [IPv6:2a01:111:f400:7d00::614]) + (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 BF2AE82BB2 + for ; Wed, 28 Apr 2021 15:21:56 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=oss.nxp.com +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=peng.fan@oss.nxp.com +ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; + b=Ykl/b+bOscXPccjkBLrnNZ64DLu+6jcykHxXg6zp1iRDn9PjYn5sAB9UzpDwBH/KBFvrw3JDaJE3H5KE1MYt/qTuXtPsUxfuHlok2cGYHW9QtYf5hVHXeWQ2CEuFUsTXn0wkc/UWBAqubidQx/AHfKQCT2TtJgSzsiaS+s0Q4xEfkByM49AF5KbOQ9dfEBqQgcpjjCPO5870sdVmZGUbHH2Alvo3NxlPP1gWLM0yVNN33b5BUxMiBgkiycAt1eN1V5lqmhkzB2i8LrKv8X+8P9n41oowUuqt0Qaai6eYOhg+bhNaZbrEUdcI47KRm5hpg1pk0sYYw+IeXo4P9EmhGg== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; + s=arcselector9901; + h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; + bh=Jvu1xYFUKJO/uJlsI76lQFrPlpRTiU+rjukLralExi8=; + b=fZLxEM4upa8xSPDRUr7ha1FAI2UY44OO4z3vEc15uhQcMMwddhIvqbEAMyJ9CfOjnAN3K8FzmE8uZAb5U7qqT9NqOlK0sVsPLb6rXRAIlj2lDUoPPwQ0LAzKA1A8ADxTEGJZhcy+s60JQ2mmPMgg8wf7ybi3YOHnV972Ai8EJT0dCJeEMbWJ2CjRtWZqpLyDujovr8w82q2vXpFPXMp/krwklqtTdlGxgKP9ZMU+2n0SGvqBTcXts/cE+XxraFrOTth/rdLrqKtKXGjbGGN9bW0cNJWzmYMFBwR8oU27Ygr0FZ7GFqW7pGdPaGkfjsbkqvS+8P9/4qBo208dUryMZg== +ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass + smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; + dkim=pass header.d=oss.nxp.com; arc=none +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; + s=selector2-NXP1-onmicrosoft-com; + h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; + bh=Jvu1xYFUKJO/uJlsI76lQFrPlpRTiU+rjukLralExi8=; + b=Y9LhgRit5KPyFtT5AVfHzHnlc9O6Ssk9T3mI7BThr15G7JYL8xyLUH1Yx3UmVl57Rvgz1z8yMTCtLyhHB3Xbw82ysiOO8JpHAM1U20AXO2mAew0td3xOPWJ7aDBS2NBdGmkM4PG9WfYlpl8TzsMDJNfjpNWiID6ykA2/FGS3Krg= +Authentication-Results: gmx.de; dkim=none (message not signed) + header.d=none;gmx.de; dmarc=none action=none header.from=oss.nxp.com; +Received: from AM5PR0402MB2756.eurprd04.prod.outlook.com + (2603:10a6:203:99::22) by AM6PR0402MB3525.eurprd04.prod.outlook.com + (2603:10a6:209:4::14) with Microsoft SMTP Server (version=TLS1_2, + cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25; Wed, 28 Apr + 2021 13:21:55 +0000 +Received: from AM5PR0402MB2756.eurprd04.prod.outlook.com + ([fe80::b158:2ae5:f2d1:7142]) by AM5PR0402MB2756.eurprd04.prod.outlook.com + ([fe80::b158:2ae5:f2d1:7142%9]) with mapi id 15.20.4065.027; Wed, 28 Apr 2021 + 13:21:55 +0000 +From: "Peng Fan (OSS)" +To: xypron.glpk@gmx.de, + agraf@csgraf.de +Cc: u-boot@lists.denx.de, pbrobinson@redhat.com, grant.likely@arm.com, + Peng Fan , + =?utf-8?q?Stefan_S=C3=B8rensen?= , + Peter Robinson +Subject: [PATCH V2] efi_loader: loosen buffer parameter check in + efi_file_read_int +Date: Wed, 28 Apr 2021 21:54:01 +0800 +Message-Id: <20210428135401.22365-1-peng.fan@oss.nxp.com> +X-Mailer: git-send-email 2.30.0 +X-Originating-IP: [119.31.174.71] +X-ClientProxiedBy: HK2PR0302CA0020.apcprd03.prod.outlook.com + (2603:1096:202::30) To AM5PR0402MB2756.eurprd04.prod.outlook.com + (2603:10a6:203:99::22) +MIME-Version: 1.0 +X-MS-Exchange-MessageSentRepresentingType: 1 +Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by + HK2PR0302CA0020.apcprd03.prod.outlook.com (2603:1096:202::30) with Microsoft + SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id + 15.20.4087.16 via Frontend Transport; Wed, 28 Apr 2021 13:21:52 +0000 +X-MS-PublicTrafficType: Email +X-MS-Office365-Filtering-Correlation-Id: d16d4712-33ca-4f2f-49cf-08d90a489784 +X-MS-TrafficTypeDiagnostic: AM6PR0402MB3525: +X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True +X-MS-Exchange-Transport-Forked: True +X-Microsoft-Antispam-PRVS: + +X-MS-Oob-TLC-OOBClassifiers: OLM:1091; +X-MS-Exchange-SenderADCheck: 1 +X-Microsoft-Antispam: BCL:0; +X-Microsoft-Antispam-Message-Info: + R8IIzR87BJ9qITheAW0/6SscIznIBDQntrQKYiITRtr3RZNBHPGuiexfqYuAABypLYa20Kpjk8qwFtkVl5Wv9zswD2NHqy5w+BU9PNQDIw5/spSSuSNZKUBD9L1rsFxNX+pluafaP2yEzJ09OmA1rGVbLC8uc0VtwPFvuyXoPYvMI8nbxEuX8eVVs8oz6i8qTLMzAKJS7PgYVwBQQjkqPEAwfnkSibtgFyy2rBjeD18PGmRSKqwkNWkO7w3bBkj/7Zor9h/8j8w07q+Iq/ZU1Mlbm8USlj2VCmhqkJddRE7/Jj0NMfQLQJ3zZABeONnYzgAUfyXXQb4sxuuM+nqRwyW/oASjsumXU4sApadRppYdLqA2uxrvM7HduDA16u1YIOc7exaHsHSuZm3p0jnKSbUkDWki3YwYZYKuOSAhwVnxIFzdFO331d/JoJnvCPulh43Bf2ndcJ+Fi6UK/BPtUCHjzSvXm5SWO2YlsNW6EAQf/teSOpYzo6jQT3QLS5InHcfHTUBcF7z7679ht2IGrNZZc2gq/Z5eCppzp33pHTx+R+wqWt+vDU8+iho2jR4+UoTTC2VanZ8dprckWpPXxgtPq6ZbkmFKjdql5ZZWwMfKu/0DaKI+T0Qcrgo5BUNETfCuDu48gBkMrs+ewk5JWR4u9Dwgq605ea1ydic2+X7SoTc/ZQ1mnr+P5IBaTsdJxE4rLVKGAo5HZcS7X6t2b9RSQz2CTskNOlg9t+2XE0zvDc19T8CF6rTS8DkG4yQa +X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; + IPV:NLI; SFV:NSPM; H:AM5PR0402MB2756.eurprd04.prod.outlook.com; PTR:; + CAT:NONE; + SFS:(4636009)(136003)(39860400002)(376002)(366004)(396003)(346002)(38100700002)(38350700002)(478600001)(5660300002)(6506007)(6666004)(66574015)(26005)(6486002)(86362001)(956004)(66476007)(2906002)(16526019)(83380400001)(6512007)(1076003)(8676002)(966005)(54906003)(186003)(52116002)(66556008)(66946007)(4326008)(316002)(2616005)(8936002); + DIR:OUT; SFP:1101; +X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?mYfVlOJMJVsoKYMLc92rFnaCTR+XLQ?= + =?utf-8?q?NE9Fknv0C/Xkfupn634/z0PDINPn1vwI7UBh2GXDundoV+tDpV3/J9Ao+ZaklGBv/?= + =?utf-8?q?35YvbogOLThhUOpbrxM2+PmyMASh2BwZQm4j3DtGuxerW2benG82zAGjtAJ70va+R?= + =?utf-8?q?fdHJfMOIDL+Oxkvqa8F1tiAWyVebMmTb9LvZQdnkJtClzsGEsN7JuXzN5zAG9JnDk?= + =?utf-8?q?ptt4s0xR8Tngwj+0ktYv/WIYfWbyVRKt2cGY+IbfGzOgHeeR/6msyKEXY6EKxdrGp?= + =?utf-8?q?ddqp/uOGuH2BlhbQtqWthQJBCUI+HaR7mZgiEJctgT+rWAgDrZMTtvzQT/2TTs+4L?= + =?utf-8?q?Pqu1h8tKSW3diXo+rqN1splk5PQ0rbM9pPZECBGS/9KWkqZOCtKtGQWbDf1N4t/tX?= + =?utf-8?q?jJ+JS/eOy0dBvhEmZ6tbCB5HpkLj/GbwlXsIm6aJbCXmd7hGzt+B9avRbm6uYmrHx?= + =?utf-8?q?xMBLr/kYUvivhGCUqFEuApHEUlG6yVU6rFPTtzXtE9aYWlsF+IFI0YAUfgmi5X3c4?= + =?utf-8?q?fvpdyhxyz0g5S58VT2SXLiBxvhwRX/5stsFvKurZjoTi5m7GkFJlzD3JpY5tikAgx?= + =?utf-8?q?S48dfUkcZRBLJKtpJln7kGQ4yCyuxkJfyN+4VDmIEUQgWmSGwo0Z77B/A1lYejj+p?= + =?utf-8?q?oC8BhkvFUTynlVzcft9BNfW3rQaTOoNFmU3wiIqRxDzWZfkL3tZroLTZJnDN6KOrK?= + =?utf-8?q?2xERgFeiItx0xafXIOmUEnPoWUY1jtqv7qdVGy2HyJ6Us3tI8KNIL/Ezl9Cl9Wm8F?= + =?utf-8?q?Rh/qZG13p7g11rt+6Bue1jxVckObYlnLPUzuAa2ZzqB1gZjXKKXDgS9eSsr+1aDjv?= + =?utf-8?q?0MZCYmHZIBgmkKI0oNiqOWuzYI3T3ofJ2RT1TKthFErEJu0dZAZH1O2YxGlEpXKzH?= + =?utf-8?q?eahQ8Zr/xhS85QykeKLXr+XKvURNH/yiY4KETT/kTq5BXPjIDIHtKaa3UnE8DTaew?= + =?utf-8?q?aqy7YoDaolXatDKpuLa9E9CwRbrN2D38XwteMWDd5zCLvLZ+g7+pUjtqyoHs5lXbv?= + =?utf-8?q?Tqb2DmK8tr3nMHzx5370ZV+bfbKvyqEECHE+AyXyb94GtEQaYgatdcI61SuVO82ZW?= + =?utf-8?q?imQgBtq9BAdYABcHPMBpe4BuiQZRO2VdwtaUrLAZc4xyFTPnrnqM0ajr5/9bMQ4Qd?= + =?utf-8?q?Ar+eZL4d88AuBRbax/JmKGSxLCxUVyAjXtrcEnoibNf1yLZlcgAp8kEaK1mMOh2B7?= + =?utf-8?q?UflHobGwDKQKgP5I34mBssnm96TCDU6t+rHhProt6OgOKQPoQ5gmKvQx5CBsVuTA0?= + =?utf-8?q?3gJ4gCfW4myFky?= +X-OriginatorOrg: oss.nxp.com +X-MS-Exchange-CrossTenant-Network-Message-Id: + d16d4712-33ca-4f2f-49cf-08d90a489784 +X-MS-Exchange-CrossTenant-AuthSource: + AM5PR0402MB2756.eurprd04.prod.outlook.com +X-MS-Exchange-CrossTenant-AuthAs: Internal +X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2021 13:21:54.9886 (UTC) +X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted +X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 +X-MS-Exchange-CrossTenant-MailboxType: HOSTED +X-MS-Exchange-CrossTenant-UserPrincipalName: + kJtC/i3wLmUtXCoTbf/Jg1qhdz4MvWusai7Piwigv6OEGOknbKvDpIUrRwJMUXhNsSApid+ni8lC5sO+x5y30w== +X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3525 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +From: Peng Fan + +This is same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1733817, +but that fix was wrongly partial reverted. + +When reading a directory, EFI_BUFFER_TOO_SMALL should be returned when +the supplied buffer is too small, so a use-case is to call +EFI_FILE_PROTOCOL.Read() with *buffer_size=0 and buffer=NULL to +obtain the needed size before doing the actual read. + +So remove the check only for directory reading, file reading already +do the check by itself. + +Fixes: db12f518edb0("efi_loader: implement non-blocking file services") +Cc: Heinrich Schuchardt +Cc: Stefan Sørensen +Tested-by: Peter Robinson +Signed-off-by: Peng Fan +--- + +V2: + Update commit log Per Heinrich's comments. + Add T-b tag + + lib/efi_loader/efi_file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c +index 204105e25a..6b3f5962be 100644 +--- a/lib/efi_loader/efi_file.c ++++ b/lib/efi_loader/efi_file.c +@@ -554,7 +554,7 @@ static efi_status_t efi_file_read_int(struct efi_file_handle *this, + efi_status_t ret = EFI_SUCCESS; + u64 bs; + +- if (!this || !buffer_size || !buffer) ++ if (!this || !buffer_size) + return EFI_INVALID_PARAMETER; + + bs = *buffer_size; diff --git a/enable-bootmenu-by-default.patch b/enable-bootmenu-by-default.patch deleted file mode 100644 index 1ecd514..0000000 --- a/enable-bootmenu-by-default.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a956480a6d52ae90ef4a46275c2ee29a4074de36 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Fri, 18 Aug 2023 23:10:42 +0100 -Subject: [PATCH] enable bootmenu by default - -We want the boot menu on all Fedora devices as it makes -it a whole lot more user friendly. - -Signed-off-by: Peter Robinson ---- - boot/Kconfig | 2 ++ - cmd/Kconfig | 1 + - 2 files changed, 3 insertions(+) - -diff --git a/boot/Kconfig b/boot/Kconfig -index 467b09e2350..ad67b1f65a6 100644 ---- a/boot/Kconfig -+++ b/boot/Kconfig -@@ -1281,6 +1281,7 @@ config BOOTDELAY - - config AUTOBOOT_KEYED - bool "Stop autobooting via specific input key / string" -+ default y - help - This option enables stopping (aborting) of the automatic - boot feature only by issuing a specific input key or -@@ -1433,6 +1434,7 @@ config AUTOBOOT_MENUKEY - - config AUTOBOOT_MENU_SHOW - bool "Show a menu on boot" -+ default y - depends on CMD_BOOTMENU - help - This enables the boot menu, controlled by environment variables -diff --git a/cmd/Kconfig b/cmd/Kconfig -index 43ca10f69cc..3d39f2914cc 100644 ---- a/cmd/Kconfig -+++ b/cmd/Kconfig -@@ -413,6 +413,7 @@ source lib/efi_selftest/Kconfig - - config CMD_BOOTMENU - bool "bootmenu" -+ default y - select MENU - select CHARSET - help --- -2.41.0 - 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/phy-rockchip-inno-usb2-fix-hang-when-multiple-controllers-exit.patch b/phy-rockchip-inno-usb2-fix-hang-when-multiple-controllers-exit.patch new file mode 100644 index 0000000..81f1cdb --- /dev/null +++ b/phy-rockchip-inno-usb2-fix-hang-when-multiple-controllers-exit.patch @@ -0,0 +1,233 @@ +From patchwork Tue Apr 6 15:10:59 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Icenowy Zheng +X-Patchwork-Id: 1462876 +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +Authentication-Results: ozlabs.org; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com + header.a=rsa-sha256 header.s=default header.b=unszVtqT; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=aosc.io header.i=@aosc.io header.a=rsa-sha256 + header.s=default header.b=mWwYCh9A; + dkim-atps=neutral +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 RSA-PSS (4096 bits) server-digest + SHA256) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4FF9wc3GdNz9sW1 + for ; Wed, 7 Apr 2021 01:11:42 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id C1F9C8040A; + Tue, 6 Apr 2021 17:11:32 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=aosc.io +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Authentication-Results: phobos.denx.de; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com + header.b="unszVtqT"; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=aosc.io header.i=@aosc.io header.b="mWwYCh9A"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id E4F22805B4; Tue, 6 Apr 2021 17:11:30 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham + autolearn_force=no version=3.4.2 +Received: from relay3.mymailcheap.com (relay3.mymailcheap.com + [217.182.66.161]) + (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 2FC4A8039D + for ; Tue, 6 Apr 2021 17:11:27 +0200 (CEST) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=aosc.io +Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=icenowy@aosc.io +Received: from filter2.mymailcheap.com (filter2.mymailcheap.com + [91.134.140.82]) + by relay3.mymailcheap.com (Postfix) with ESMTPS id A6AC13ECDF; + Tue, 6 Apr 2021 17:11:26 +0200 (CEST) +Received: from localhost (localhost [127.0.0.1]) + by filter2.mymailcheap.com (Postfix) with ESMTP id 88D512A915; + Tue, 6 Apr 2021 17:11:26 +0200 (CEST) +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; + s=default; t=1617721886; + bh=qb5gt5o7M9qjdJd67A3WHGZp/76w4s4FS6+u1VuEh/o=; + h=From:To:Cc:Subject:Date:From; + b=unszVtqTnO9MGZVbgLH5H0cMo3VfQ+g5377blmOUcrtzMSqNbDD5SM25MUhlTUKiB + hTFq4L53gszBYfRPfh7Z5XgNVERULL5Zx0+WnVjZ7kUIp/wS3IQqxe81ChoFEsLTr8 + 22UB9NN3OSVkuN/jRAzX+lKpugVGBHwOCjZBZukQ= +Received: from filter2.mymailcheap.com ([127.0.0.1]) + by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id V9lVOgo6gApH; Tue, 6 Apr 2021 17:11:25 +0200 (CEST) +Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by filter2.mymailcheap.com (Postfix) with ESMTPS; + Tue, 6 Apr 2021 17:11:25 +0200 (CEST) +Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) + by mail20.mymailcheap.com (Postfix) with ESMTP id C9EA3400B6; + Tue, 6 Apr 2021 15:11:24 +0000 (UTC) +Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; + unprotected) header.d=aosc.io header.i=@aosc.io header.b="mWwYCh9A"; + dkim-atps=neutral +AI-Spam-Status: Not processed +Received: from ice-e5v2.lan (unknown [59.41.163.135]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest + SHA256) (No client certificate requested) + by mail20.mymailcheap.com (Postfix) with ESMTPSA id 251F840C16; + Tue, 6 Apr 2021 15:11:10 +0000 (UTC) +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; + t=1617721874; bh=qb5gt5o7M9qjdJd67A3WHGZp/76w4s4FS6+u1VuEh/o=; + h=From:To:Cc:Subject:Date:From; + b=mWwYCh9AM8eRWm9hiEqirytotj/G/C1p9r2fd0zUxPhS0UQH+kw6L3RWZnsfmXAYq + HmYFiM3ktIfwevqQw89tOi8c2ktb49iYOyHXkfi8hTZl1dNsJDS94uyzBiHYY+U7x5 + P0aTRRaL5C8ua2c1GedoPx06nrARO/KMEFy39rxI= +From: Icenowy Zheng +To: Simon Glass , Kever Yang , + Frank Wang , + Jagan Teki +Cc: u-boot@lists.denx.de, + Icenowy Zheng +Subject: [PATCH] phy: rockchip: inno-usb2: fix hang when multiple controllers + exit +Date: Tue, 6 Apr 2021 23:10:59 +0800 +Message-Id: <20210406151059.1187379-1-icenowy@aosc.io> +X-Mailer: git-send-email 2.30.2 +MIME-Version: 1.0 +X-Rspamd-Server: mail20.mymailcheap.com +X-Spamd-Result: default: False [4.90 / 20.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; + ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default]; + RECEIVED_SPAMHAUS_PBL(0.00)[59.41.163.135:received]; + FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; + R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; + MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io]; + BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all]; + RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83]; + DKIM_TRACE(0.00)[aosc.io:+]; MID_CONTAINS_FROM(1.00)[]; + RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; + MIME_TRACE(0.00)[0:+]; + ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; + RCVD_COUNT_TWO(0.00)[2]; + HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] +X-Rspamd-Queue-Id: C9EA3400B6 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +The OHCI and EHCI controllers are both bound to the same PHY. They will +both do init and power_on operations when the controller is brought up +and both do power_off and exit when the controller is stopped. However, +the PHY uclass of U-Boot is not as sane as we thought -- they won't +maintain a status mark for PHYs, and thus the functions of the PHYs +could be called for multiple times. Calling init/power_on for multiple +times have no severe problems, however calling power_off/exit for +multiple times have a problem -- the first exit call will stop the PHY +clock, and power_off/exit calls after it still trying to write to PHY +registers. The write operation to PHY registers will fail because clock +is already stopped. + +Adapt the count mechanism from phy-sun4i-usb to both init/exit and +power_on/power_off functions to phy-rockchip-inno-usb2 to fix this +problem. With this stopping USB controllers (manually or before booting +a kernel) will work. + +Signed-off-by: Icenowy Zheng +Fixes: ac97a9ece14e ("phy: rockchip: Add Rockchip USB2PHY driver") +--- + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 21 +++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +index 62b8ba3a4a..be9cc99d90 100644 +--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c ++++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +@@ -62,6 +62,8 @@ struct rockchip_usb2phy { + void *reg_base; + struct clk phyclk; + const struct rockchip_usb2phy_cfg *phy_cfg; ++ int init_count; ++ int power_on_count; + }; + + static inline int property_enable(void *reg_base, +@@ -92,6 +94,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy) + struct rockchip_usb2phy *priv = dev_get_priv(parent); + const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy); + ++ priv->power_on_count++; ++ if (priv->power_on_count != 1) ++ return 0; ++ + property_enable(priv->reg_base, &port_cfg->phy_sus, false); + + /* waiting for the utmi_clk to become stable */ +@@ -106,6 +112,10 @@ static int rockchip_usb2phy_power_off(struct phy *phy) + struct rockchip_usb2phy *priv = dev_get_priv(parent); + const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy); + ++ priv->power_on_count--; ++ if (priv->power_on_count != 0) ++ return 0; ++ + property_enable(priv->reg_base, &port_cfg->phy_sus, true); + + return 0; +@@ -118,6 +128,10 @@ static int rockchip_usb2phy_init(struct phy *phy) + const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy); + int ret; + ++ priv->init_count++; ++ if (priv->init_count != 1) ++ return 0; ++ + ret = clk_enable(&priv->phyclk); + if (ret) { + dev_err(phy->dev, "failed to enable phyclk (ret=%d)\n", ret); +@@ -140,6 +154,10 @@ static int rockchip_usb2phy_exit(struct phy *phy) + struct udevice *parent = dev_get_parent(phy->dev); + struct rockchip_usb2phy *priv = dev_get_priv(parent); + ++ priv->init_count--; ++ if (priv->init_count != 0) ++ return 0; ++ + clk_disable(&priv->phyclk); + + return 0; +@@ -212,6 +230,9 @@ static int rockchip_usb2phy_probe(struct udevice *dev) + return ret; + } + ++ priv->power_on_count = 0; ++ priv->init_count = 0; ++ + return 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/riscv64-boards b/riscv64-boards deleted file mode 100644 index f96e775..0000000 --- a/riscv64-boards +++ /dev/null @@ -1,4 +0,0 @@ -qemu-riscv64_spl -sifive_unleashed -sifive_unmatched -starfive_visionfive2 diff --git a/rk3399-Pinebook-pro-EDP-support.patch b/rk3399-Pinebook-pro-EDP-support.patch new file mode 100644 index 0000000..43a52ad --- /dev/null +++ b/rk3399-Pinebook-pro-EDP-support.patch @@ -0,0 +1,1257 @@ +From patchwork Fri Mar 5 10:27:46 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447757 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPKq3YGqz9sRR + for ; Fri, 5 Mar 2021 21:36:31 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 18DC78269D; + Fri, 5 Mar 2021 11:35:59 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 4DDC182036; Fri, 5 Mar 2021 11:35:50 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org + [IPv6:2001:bc8:3430:1000::c0f:fee]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id D4F2882036 + for ; Fri, 5 Mar 2021 11:35:43 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id 123CD18069A; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.004041703@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:46 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 1/9] rockchip: video: vop: Use endpoint compatible string + to find VOP mode +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +The current code is using an hard coded enum and the of node reg value of +endpoint to find out if the endpoint is mipi/hdmi/lvds/edp/dp. The order +is different between rk3288, rk3399 vop little, rk3399 vop big. + +A possible solution would be to make sure that the rk3288.dtsi and +rk3399.dtsi files have "expected" reg value or an other solution is +to find the kind of endpoint by comparing the endpoint compatible value. + +This patch is implementing the more flexible second solution. + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/arch/arm/include/asm/arch-rockchip/vop_rk3288.h +=================================================================== +--- u-boot.orig/arch/arm/include/asm/arch-rockchip/vop_rk3288.h ++++ u-boot/arch/arm/include/asm/arch-rockchip/vop_rk3288.h +@@ -85,26 +85,13 @@ enum { + LB_RGB_1280X8 = 0x5 + }; + +-#if defined(CONFIG_ROCKCHIP_RK3399) + enum vop_modes { + VOP_MODE_EDP = 0, + VOP_MODE_MIPI, + VOP_MODE_HDMI, +- VOP_MODE_MIPI1, +- VOP_MODE_DP, +- VOP_MODE_NONE, +-}; +-#else +-enum vop_modes { +- VOP_MODE_EDP = 0, +- VOP_MODE_HDMI, + VOP_MODE_LVDS, +- VOP_MODE_MIPI, +- VOP_MODE_NONE, +- VOP_MODE_AUTO_DETECT, +- VOP_MODE_UNKNOWN, ++ VOP_MODE_DP, + }; +-#endif + + /* VOP_VERSION_INFO */ + #define M_FPGA_VERSION (0xffff << 16) +Index: u-boot/drivers/video/rockchip/rk_vop.c +=================================================================== +--- u-boot.orig/drivers/video/rockchip/rk_vop.c ++++ u-boot/drivers/video/rockchip/rk_vop.c +@@ -236,12 +236,11 @@ static int rk_display_init(struct udevic + struct clk clk; + enum video_log2_bpp l2bpp; + ofnode remote; ++ const char *compat; + + debug("%s(%s, %lu, %s)\n", __func__, + dev_read_name(dev), fbbase, ofnode_get_name(ep_node)); + +- vop_id = ofnode_read_s32_default(ep_node, "reg", -1); +- debug("vop_id=%d\n", vop_id); + ret = ofnode_read_u32(ep_node, "remote-endpoint", &remote_phandle); + if (ret) + return ret; +@@ -283,6 +282,28 @@ static int rk_display_init(struct udevic + if (disp) + break; + }; ++ compat = ofnode_get_property(remote, "compatible", NULL); ++ if (!compat) { ++ debug("%s(%s): Failed to find compatible property\n", ++ __func__, dev_read_name(dev)); ++ return -EINVAL; ++ } ++ if (strstr(compat, "edp")) { ++ vop_id = VOP_MODE_EDP; ++ } else if (strstr(compat, "mipi")) { ++ vop_id = VOP_MODE_MIPI; ++ } else if (strstr(compat, "hdmi")) { ++ vop_id = VOP_MODE_HDMI; ++ } else if (strstr(compat, "cdn-dp")) { ++ vop_id = VOP_MODE_DP; ++ } else if (strstr(compat, "lvds")) { ++ vop_id = VOP_MODE_LVDS; ++ } else { ++ debug("%s(%s): Failed to find vop mode for %s\n", ++ __func__, dev_read_name(dev), compat); ++ return -EINVAL; ++ } ++ debug("vop_id=%d\n", vop_id); + + disp_uc_plat = dev_get_uclass_plat(disp); + debug("Found device '%s', disp_uc_priv=%p\n", disp->name, disp_uc_plat); + +From patchwork Fri Mar 5 10:27:47 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447760 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPLV0lZ1z9sRR + for ; Fri, 5 Mar 2021 21:37:06 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id D622682774; + Fri, 5 Mar 2021 11:36:10 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 CF09E8206F; Fri, 5 Mar 2021 11:35:51 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org + [IPv6:2001:bc8:3430:1000::c0f:fee]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 02E608204B + for ; Fri, 5 Mar 2021 11:35:43 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id 2D11018084F; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.057540339@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:47 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 2/9] rockchip: video: edp: Add rk3399 support +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +According to linux commit "drm/rockchip: analogix_dp: add rk3399 eDP +support" (82872e42bb1501dd9e60ca430f4bae45a469aa64), rk3288 and rk3399 +eDP IPs are nearly the same, the difference is in the grf register +(SOC_CON6 versus SOC_CON20). So, change the code to use the right +register on each IP. + +The clocks don't seem to be the same, the eDP clock is not at index 1 +on rk3399, so don't try changing the clock at index 1 to rate 0 on +rk3399. + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/drivers/video/rockchip/rk_edp.c +=================================================================== +--- u-boot.orig/drivers/video/rockchip/rk_edp.c ++++ u-boot/drivers/video/rockchip/rk_edp.c +@@ -17,11 +17,10 @@ + #include + #include + #include ++#include + #include + #include +-#include +-#include +-#include ++#include + + #define MAX_CR_LOOP 5 + #define MAX_EQ_LOOP 5 +@@ -37,18 +36,42 @@ static const char * const pre_emph_names + #define DP_VOLTAGE_MAX DP_TRAIN_VOLTAGE_SWING_1200 + #define DP_PRE_EMPHASIS_MAX DP_TRAIN_PRE_EMPHASIS_9_5 + ++#define RK3288_GRF_SOC_CON6 0x025c ++#define RK3288_GRF_SOC_CON12 0x0274 ++#define RK3399_GRF_SOC_CON20 0x6250 ++#define RK3399_GRF_SOC_CON25 0x6264 ++ ++enum rockchip_dp_types { ++ RK3288_DP = 0, ++ RK3399_EDP ++}; ++ ++struct rockchip_dp_data { ++ unsigned long reg_vop_big_little; ++ unsigned long reg_vop_big_little_sel; ++ unsigned long reg_ref_clk_sel; ++ unsigned long ref_clk_sel_bit; ++ enum rockchip_dp_types chip_type; ++}; ++ + struct rk_edp_priv { + struct rk3288_edp *regs; +- struct rk3288_grf *grf; ++ void *grf; + struct udevice *panel; + struct link_train link_train; + u8 train_set[4]; + }; + +-static void rk_edp_init_refclk(struct rk3288_edp *regs) ++static void rk_edp_init_refclk(struct rk3288_edp *regs, enum rockchip_dp_types chip_type) + { + writel(SEL_24M, ®s->analog_ctl_2); +- writel(REF_CLK_24M, ®s->pll_reg_1); ++ u32 reg; ++ ++ reg = REF_CLK_24M; ++ if (chip_type == RK3288_DP) ++ reg ^= REF_CLK_MASK; ++ writel(reg, ®s->pll_reg_1); ++ + + writel(LDO_OUTPUT_V_SEL_145 | KVCO_DEFALUT | CHG_PUMP_CUR_SEL_5US | + V2L_CUR_SEL_1MA, ®s->pll_reg_2); +@@ -1029,6 +1052,8 @@ static int rk_edp_probe(struct udevice * + struct display_plat *uc_plat = dev_get_uclass_plat(dev); + struct rk_edp_priv *priv = dev_get_priv(dev); + struct rk3288_edp *regs = priv->regs; ++ struct rockchip_dp_data *edp_data = (struct rockchip_dp_data *)dev_get_driver_data(dev); ++ + struct clk clk; + int ret; + +@@ -1043,16 +1068,17 @@ static int rk_edp_probe(struct udevice * + int vop_id = uc_plat->source_id; + debug("%s, uc_plat=%p, vop_id=%u\n", __func__, uc_plat, vop_id); + +- ret = clk_get_by_index(dev, 1, &clk); +- if (ret >= 0) { +- ret = clk_set_rate(&clk, 0); +- clk_free(&clk); +- } +- if (ret) { +- debug("%s: Failed to set EDP clock: ret=%d\n", __func__, ret); +- return ret; ++ if (edp_data->chip_type == RK3288_DP) { ++ ret = clk_get_by_index(dev, 1, &clk); ++ if (ret >= 0) { ++ ret = clk_set_rate(&clk, 0); ++ clk_free(&clk); ++ } ++ if (ret) { ++ debug("%s: Failed to set EDP clock: ret=%d\n", __func__, ret); ++ return ret; ++ } + } +- + ret = clk_get_by_index(uc_plat->src_dev, 0, &clk); + if (ret >= 0) { + ret = clk_set_rate(&clk, 192000000); +@@ -1065,15 +1091,17 @@ static int rk_edp_probe(struct udevice * + } + + /* grf_edp_ref_clk_sel: from internal 24MHz or 27MHz clock */ +- rk_setreg(&priv->grf->soc_con12, 1 << 4); ++ rk_setreg(priv->grf + edp_data->reg_ref_clk_sel, ++ edp_data->ref_clk_sel_bit); + + /* select epd signal from vop0 or vop1 */ +- rk_clrsetreg(&priv->grf->soc_con6, (1 << 5), +- (vop_id == 1) ? (1 << 5) : (0 << 5)); ++ rk_clrsetreg(priv->grf + edp_data->reg_vop_big_little, ++ edp_data->reg_vop_big_little_sel, ++ (vop_id == 1) ? edp_data->reg_vop_big_little_sel : 0); + + rockchip_edp_wait_hpd(priv); + +- rk_edp_init_refclk(regs); ++ rk_edp_init_refclk(regs, edp_data->chip_type); + rk_edp_init_interrupt(regs); + rk_edp_enable_sw_function(regs); + ret = rk_edp_init_analog_func(regs); +@@ -1089,8 +1117,25 @@ static const struct dm_display_ops dp_ro + .enable = rk_edp_enable, + }; + ++static const struct rockchip_dp_data rk3399_edp = { ++ .reg_vop_big_little = RK3399_GRF_SOC_CON20, ++ .reg_vop_big_little_sel = BIT(5), ++ .reg_ref_clk_sel = RK3399_GRF_SOC_CON25, ++ .ref_clk_sel_bit = BIT(11), ++ .chip_type = RK3399_EDP, ++}; ++ ++static const struct rockchip_dp_data rk3288_dp = { ++ .reg_vop_big_little = RK3288_GRF_SOC_CON6, ++ .reg_vop_big_little_sel = BIT(5), ++ .reg_ref_clk_sel = RK3288_GRF_SOC_CON12, ++ .ref_clk_sel_bit = BIT(4), ++ .chip_type = RK3288_DP, ++}; ++ + static const struct udevice_id rockchip_dp_ids[] = { +- { .compatible = "rockchip,rk3288-edp" }, ++ { .compatible = "rockchip,rk3288-edp", .data = (ulong)&rk3288_dp }, ++ { .compatible = "rockchip,rk3399-edp", .data = (ulong)&rk3399_edp }, + { } + }; + +Index: u-boot/arch/arm/include/asm/arch-rockchip/edp_rk3288.h +=================================================================== +--- u-boot.orig/arch/arm/include/asm/arch-rockchip/edp_rk3288.h ++++ u-boot/arch/arm/include/asm/arch-rockchip/edp_rk3288.h +@@ -232,8 +232,9 @@ check_member(rk3288_edp, pll_reg_5, 0xa0 + #define PD_CH0 (0x1 << 0) + + /* pll_reg_1 */ +-#define REF_CLK_24M (0x1 << 1) +-#define REF_CLK_27M (0x0 << 1) ++#define REF_CLK_24M (0x1 << 0) ++#define REF_CLK_27M (0x0 << 0) ++#define REF_CLK_MASK (0x1 << 0) + + /* line_map */ + #define LANE3_MAP_LOGIC_LANE_0 (0x0 << 6) + +From patchwork Fri Mar 5 10:27:48 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447758 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 server-signature RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPL32w8Bz9sRR + for ; Fri, 5 Mar 2021 21:36:43 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 44C1D82082; + Fri, 5 Mar 2021 11:36:04 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 5F86A8204C; Fri, 5 Mar 2021 11:35:51 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org + [IPv6:2001:bc8:3430:1000::c0f:fee]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 1AEBD825C6 + for ; Fri, 5 Mar 2021 11:35:44 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id 3E0CC180475; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.112947687@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:48 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 3/9] Rockchip: video: edp: Change interrupt polarity + configuration +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +The linux code is setting polarity configuration to 3 but +uboot code is setting it to 1. Change the configuration to match the +linux configuration + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/arch/arm/include/asm/arch-rockchip/edp_rk3288.h +=================================================================== +--- u-boot.orig/arch/arm/include/asm/arch-rockchip/edp_rk3288.h ++++ u-boot/arch/arm/include/asm/arch-rockchip/edp_rk3288.h +@@ -297,7 +297,9 @@ check_member(rk3288_edp, pll_reg_5, 0xa0 + + /* int_ctl */ + #define SOFT_INT_CTRL (0x1 << 2) +-#define INT_POL (0x1 << 0) ++#define INT_POL1 (0x1 << 1) ++#define INT_POL0 (0x1 << 0) ++#define INT_POL (INT_POL0 | INT_POL1) + + /* sys_ctl_1 */ + #define DET_STA (0x1 << 2) + +From patchwork Fri Mar 5 10:27:49 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447759 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 server-signature RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPLH1GRYz9sRR + for ; Fri, 5 Mar 2021 21:36:55 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 96D31826F3; + Fri, 5 Mar 2021 11:36:07 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 1A41B82036; Fri, 5 Mar 2021 11:35:51 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org [51.15.165.164]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 09C178204C + for ; Fri, 5 Mar 2021 11:35:44 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id 61DE01808B6; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.175518624@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:49 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 4/9] Rockchip: video: vop: Reserve efi fb memory +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +When booting with EFI and graphics, the memory used for framebuffer +has to be reserved, otherwise it may leads to kernel memory +overwrite. + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/drivers/video/rockchip/rk_vop.c +=================================================================== +--- u-boot.orig/drivers/video/rockchip/rk_vop.c ++++ u-boot/drivers/video/rockchip/rk_vop.c +@@ -21,6 +21,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -395,6 +397,11 @@ int rk_vop_probe(struct udevice *dev) + if (!(gd->flags & GD_FLG_RELOC)) + return 0; + ++#if defined(CONFIG_EFI_LOADER) ++ debug("Adding to EFI map %d @ %lx\n", plat->size, plat->base); ++ efi_add_memory_map(plat->base, plat->size, EFI_RESERVED_MEMORY_TYPE); ++#endif ++ + priv->regs = (struct rk3288_vop *)dev_read_addr(dev); + + /* + +From patchwork Fri Mar 5 10:27:50 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447756 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPKd3f7rz9sRR + for ; Fri, 5 Mar 2021 21:36:21 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 470D882070; + Fri, 5 Mar 2021 11:35:56 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 5AAD48204A; Fri, 5 Mar 2021 11:35:49 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org [51.15.165.164]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id DCB148204A + for ; Fri, 5 Mar 2021 11:35:43 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id 71166180A1E; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.228214963@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:50 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 5/9] rockchip: Pinebook Pro: Enable edp +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +- uboot rockchip edp code is looking for a rockchip,panel property + for the edp dts node, so add it. + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +=================================================================== +--- u-boot.orig/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi ++++ u-boot/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +@@ -16,6 +16,10 @@ + }; + }; + ++&edp { ++ rockchip,panel = <&edp_panel>; ++}; ++ + &i2c0 { + u-boot,dm-pre-reloc; + }; + +From patchwork Fri Mar 5 10:27:51 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447754 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 RSA-PSS (4096 bits) server-digest + SHA256) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPKR1d2Fz9sRR + for ; Fri, 5 Mar 2021 21:36:11 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 12B478204C; + Fri, 5 Mar 2021 11:35:53 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 447228206F; Fri, 5 Mar 2021 11:35:47 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org [51.15.165.164]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id B778881C7C + for ; Fri, 5 Mar 2021 11:35:43 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id C0DB4180A22; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.290295328@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:51 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 6/9] rockchip: pwm: Fix default polarity +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +In the code, the default polarity is set to positive/positive, +which is neither normal polarity or inverted polarity. It's +only the hardware default. This leads to booting linux with +wrong polarity setting. + +Update the code to use PWM_DUTY_POSTIVE | PWM_INACTIVE_NEGATIVE +by default instead. + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/drivers/pwm/rk_pwm.c +=================================================================== +--- u-boot.orig/drivers/pwm/rk_pwm.c ++++ u-boot/drivers/pwm/rk_pwm.c +@@ -147,7 +147,7 @@ static int rk_pwm_probe(struct udevice * + priv->data = (struct rockchip_pwm_data *)dev_get_driver_data(dev); + + if (priv->data->supports_polarity) +- priv->conf_polarity = PWM_DUTY_POSTIVE | PWM_INACTIVE_POSTIVE; ++ priv->conf_polarity = PWM_DUTY_POSTIVE | PWM_INACTIVE_NEGATIVE; + + return 0; + } + +From patchwork Fri Mar 5 10:27:52 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447761 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPLk2Jx9z9sRR + for ; Fri, 5 Mar 2021 21:37:18 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 95200827A5; + Fri, 5 Mar 2021 11:36:13 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 948DB8204A; Fri, 5 Mar 2021 11:35:53 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org [51.15.165.164]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 353198204D + for ; Fri, 5 Mar 2021 11:35:44 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id E7A2D180ACE; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.342131644@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:52 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 7/9] rockchip: video: vop: Fix format of fbbase in debug + string +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +The debug string printing the device name, framebuffer address and of node +is using %lu as format for the framebuffer address, which is not so nice. +Change it to %lx. + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/drivers/video/rockchip/rk_vop.c +=================================================================== +--- u-boot.orig/drivers/video/rockchip/rk_vop.c ++++ u-boot/drivers/video/rockchip/rk_vop.c +@@ -240,7 +240,7 @@ static int rk_display_init(struct udevic + ofnode remote; + const char *compat; + +- debug("%s(%s, %lu, %s)\n", __func__, ++ debug("%s(%s, 0x%lx, %s)\n", __func__, + dev_read_name(dev), fbbase, ofnode_get_name(ep_node)); + + ret = ofnode_read_u32(ep_node, "remote-endpoint", &remote_phandle); + +From patchwork Fri Mar 5 10:27:53 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447762 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPLx35qQz9sRR + for ; Fri, 5 Mar 2021 21:37:29 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id CA1E082785; + Fri, 5 Mar 2021 11:36:16 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 67A538204A; Fri, 5 Mar 2021 11:35:54 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org [51.15.165.164]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 4B7598236C + for ; Fri, 5 Mar 2021 11:35:44 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id F37E5180A23; Fri, 5 Mar 2021 11:35:41 +0100 (CET) +Message-ID: <20210305103307.395781510@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:53 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 8/9] rockchip: video: edp: Add missing reset support +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +In order to ensure that the eDP registers are in correct state, +add missing support for the eDP reset lines found in the device-tree. + + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/drivers/video/rockchip/rk_edp.c +=================================================================== +--- u-boot.orig/drivers/video/rockchip/rk_edp.c ++++ u-boot/drivers/video/rockchip/rk_edp.c +@@ -8,11 +8,13 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -1053,6 +1055,7 @@ static int rk_edp_probe(struct udevice * + struct rk_edp_priv *priv = dev_get_priv(dev); + struct rk3288_edp *regs = priv->regs; + struct rockchip_dp_data *edp_data = (struct rockchip_dp_data *)dev_get_driver_data(dev); ++ struct reset_ctl dp_rst; + + struct clk clk; + int ret; +@@ -1065,6 +1068,25 @@ static int rk_edp_probe(struct udevice * + return ret; + } + ++ ret = reset_get_by_name(dev, "dp", &dp_rst); ++ if (ret) { ++ dev_err(dev, "failed to get dp reset (ret=%d)\n", ret); ++ return ret; ++ } ++ ++ ret = reset_assert(&dp_rst); ++ if (ret) { ++ dev_err(dev, "failed to assert dp reset (ret=%d)\n", ret); ++ return ret; ++ } ++ udelay(20); ++ ++ ret = reset_deassert(&dp_rst); ++ if (ret) { ++ dev_err(dev, "failed to deassert dp reset (ret=%d)\n", ret); ++ return ret; ++ } ++ + int vop_id = uc_plat->source_id; + debug("%s, uc_plat=%p, vop_id=%u\n", __func__, uc_plat, vop_id); + + +From patchwork Fri Mar 5 10:27:54 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: "Arnaud Patard (Rtp)" +X-Patchwork-Id: 1447763 +X-Patchwork-Delegate: agust@denx.de +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +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 server-signature RSA-PSS (4096 bits)) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DsPM76BCrz9sRR + for ; Fri, 5 Mar 2021 21:37:39 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 67BC2827B1; + Fri, 5 Mar 2021 11:36:20 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=fail (p=none dis=none) header.from=rtp-net.org +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 DF2998206F; Fri, 5 Mar 2021 11:35:55 +0100 (CET) +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,SPF_HELO_NONE + autolearn=ham autolearn_force=no version=3.4.2 +Received: from lechat.rtp-net.org (lechat.rtp-net.org [51.15.165.164]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id 4C91882070 + for ; Fri, 5 Mar 2021 11:35:44 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=pass (p=none dis=none) header.from=rtp-net.org +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=arnaud.patard@rtp-net.org +Received: by lechat.rtp-net.org (Postfix, from userid 1000) + id 329B7180B08; Fri, 5 Mar 2021 11:35:42 +0100 (CET) +Message-ID: <20210305103307.447309277@rtp-net.org> +User-Agent: quilt/0.66 +Date: Fri, 05 Mar 2021 11:27:54 +0100 +From: Arnaud Patard (Rtp) +To: u-boot@lists.denx.de +Cc: Kever Yang , + Anatolij Gustschin , + Philipp Tomsich , + Peter Robinson , + Samuel Dionne-Riel , + Alper Nebi Yasak , + Arnaud Patard +Subject: [patch v4 9/9] rockchip: video: vop: Add reset support +References: <20210305102745.078091129@rtp-net.org> +MIME-Version: 1.0 +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +In order to ensure that the VOP registers are in correct state, +add missing support for the VOP reset lines found in the device-tree + +Signed-off-by: Arnaud Patard +Tested-by: Peter Robinson + +Index: u-boot/drivers/video/rockchip/rk_vop.c +=================================================================== +--- u-boot.orig/drivers/video/rockchip/rk_vop.c ++++ u-boot/drivers/video/rockchip/rk_vop.c +@@ -8,9 +8,11 @@ + #include + #include + #include ++#include + #include + #include + #include ++#include + #include + #include + #include +@@ -37,14 +39,16 @@ enum vop_pol { + DCLK_INVERT = 3 + }; + +-static void rkvop_enable(struct rk3288_vop *regs, ulong fbbase, ++static void rkvop_enable(struct udevice *dev, struct rk3288_vop *regs, ulong fbbase, + int fb_bits_per_pixel, +- const struct display_timing *edid) ++ const struct display_timing *edid, ++ struct reset_ctl *dclk_rst) + { + u32 lb_mode; + u32 rgb_mode; + u32 hactive = edid->hactive.typ; + u32 vactive = edid->vactive.typ; ++ int ret; + + writel(V_ACT_WIDTH(hactive - 1) | V_ACT_HEIGHT(vactive - 1), + ®s->win0_act_info); +@@ -92,6 +96,18 @@ static void rkvop_enable(struct rk3288_v + + writel(fbbase, ®s->win0_yrgb_mst); + writel(0x01, ®s->reg_cfg_done); /* enable reg config */ ++ ++ ret = reset_assert(dclk_rst); ++ if (ret) { ++ dev_warn(dev, "failed to assert dclk reset (ret=%d)\n", ret); ++ return; ++ } ++ udelay(20); ++ ++ ret = reset_deassert(dclk_rst); ++ if (ret) ++ dev_warn(dev, "failed to deassert dclk reset (ret=%d)\n", ret); ++ + } + + static void rkvop_set_pin_polarity(struct udevice *dev, +@@ -239,6 +255,7 @@ static int rk_display_init(struct udevic + enum video_log2_bpp l2bpp; + ofnode remote; + const char *compat; ++ struct reset_ctl dclk_rst; + + debug("%s(%s, 0x%lx, %s)\n", __func__, + dev_read_name(dev), fbbase, ofnode_get_name(ep_node)); +@@ -355,7 +372,14 @@ static int rk_display_init(struct udevic + } + + rkvop_mode_set(dev, &timing, vop_id); +- rkvop_enable(regs, fbbase, 1 << l2bpp, &timing); ++ ++ ret = reset_get_by_name(dev, "dclk", &dclk_rst); ++ if (ret) { ++ dev_err(dev, "failed to get dclk reset (ret=%d)\n", ret); ++ return ret; ++ } ++ ++ rkvop_enable(dev, regs, fbbase, 1 << l2bpp, &timing, &dclk_rst); + + ret = display_enable(disp, 1 << l2bpp, &timing); + if (ret) +@@ -392,11 +416,31 @@ int rk_vop_probe(struct udevice *dev) + struct rk_vop_priv *priv = dev_get_priv(dev); + int ret = 0; + ofnode port, node; ++ struct reset_ctl ahb_rst; + + /* Before relocation we don't need to do anything */ + if (!(gd->flags & GD_FLG_RELOC)) + return 0; + ++ ret = reset_get_by_name(dev, "ahb", &ahb_rst); ++ if (ret) { ++ dev_err(dev, "failed to get ahb reset (ret=%d)\n", ret); ++ return ret; ++ } ++ ++ ret = reset_assert(&ahb_rst); ++ if (ret) { ++ dev_err(dev, "failed to assert ahb reset (ret=%d)\n", ret); ++ return ret; ++ } ++ udelay(20); ++ ++ ret = reset_deassert(&ahb_rst); ++ if (ret) { ++ dev_err(dev, "failed to deassert ahb reset (ret=%d)\n", ret); ++ return ret; ++ } ++ + #if defined(CONFIG_EFI_LOADER) + debug("Adding to EFI map %d @ %lx\n", plat->size, plat->base); + efi_add_memory_map(plat->base, plat->size, EFI_RESERVED_MEMORY_TYPE); diff --git a/rockchip-Enable-preboot-start-for-pci-usb.patch b/rockchip-Enable-preboot-start-for-pci-usb.patch deleted file mode 100644 index 30aad4d..0000000 --- a/rockchip-Enable-preboot-start-for-pci-usb.patch +++ /dev/null @@ -1,860 +0,0 @@ -From a6909a16b4cc301f1007d9e75d02abb6d06a1ea7 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 28 May 2026 21:29:29 +0100 -Subject: [PATCH] rockchip: Enable preboot start for pci/usb - -Enable the preboot so nvme works OOTB - -Signed-off-by: Peter Robinson ---- - configs/anbernic-rgxx3-rk3566_defconfig | 2 ++ - configs/bpi-r2-pro-rk3568_defconfig | 2 ++ - configs/cm3588-nas-rk3588_defconfig | 2 ++ - configs/coolpi-4b-rk3588s_defconfig | 2 ++ - configs/coolpi-cm5-evb-rk3588_defconfig | 2 ++ - configs/evb-rk3568_defconfig | 2 ++ - configs/evb-rk3588_defconfig | 2 ++ - configs/firefly-rk3399_defconfig | 2 ++ - configs/generic-rk3568_defconfig | 2 ++ - configs/generic-rk3588_defconfig | 2 ++ - configs/jaguar-rk3588_defconfig | 2 ++ - configs/lubancat-2-rk3568_defconfig | 2 ++ - configs/nanopc-t4-rk3399_defconfig | 2 ++ - configs/nanopc-t6-rk3588_defconfig | 2 ++ - configs/nanopi-r5c-rk3568_defconfig | 2 ++ - configs/nanopi-r5s-rk3568_defconfig | 2 ++ - configs/nanopi-r6c-rk3588s_defconfig | 2 ++ - configs/nanopi-r6s-rk3588s_defconfig | 2 ++ - configs/neu6a-io-rk3588_defconfig | 2 ++ - 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/quartzpro64-rk3588_defconfig | 2 ++ - configs/radxa-cm3-io-rk3566_defconfig | 2 ++ - configs/radxa-e25-rk3568_defconfig | 2 ++ - configs/radxa-zero-3-rk3566_defconfig | 2 ++ - configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ - configs/rock-3a-rk3568_defconfig | 2 ++ - configs/rock-3b-rk3568_defconfig | 2 ++ - configs/rock-3c-rk3566_defconfig | 2 ++ - 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 ++ - configs/rock5a-rk3588s_defconfig | 2 ++ - configs/rock5b-rk3588_defconfig | 2 ++ - configs/rock960-rk3399_defconfig | 2 ++ - configs/rockpro64-rk3399_defconfig | 2 ++ - configs/sige7-rk3588_defconfig | 2 ++ - configs/soquartz-blade-rk3566_defconfig | 2 ++ - configs/soquartz-cm4-rk3566_defconfig | 2 ++ - configs/soquartz-model-a-rk3566_defconfig | 2 ++ - configs/tiger-rk3588_defconfig | 2 ++ - configs/toybrick-rk3588_defconfig | 2 ++ - configs/turing-rk1-rk3588_defconfig | 2 ++ - 60 files changed, 121 insertions(+) - -diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig -index 854de8b00a4..cd91f18ba80 100644 ---- a/configs/anbernic-rgxx3-rk3566_defconfig -+++ b/configs/anbernic-rgxx3-rk3566_defconfig -@@ -12,6 +12,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - # CONFIG_EFI_LOADER is not set - 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 ---- a/configs/bpi-r2-pro-rk3568_defconfig -+++ b/configs/bpi-r2-pro-rk3568_defconfig -@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/cm3588-nas-rk3588_defconfig b/configs/cm3588-nas-rk3588_defconfig -index 5b5ef8d5ac1..53147d115dd 100644 ---- a/configs/cm3588-nas-rk3588_defconfig -+++ b/configs/cm3588-nas-rk3588_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/coolpi-4b-rk3588s_defconfig b/configs/coolpi-4b-rk3588s_defconfig -index e6772622403..75e0b373ce9 100644 ---- a/configs/coolpi-4b-rk3588s_defconfig -+++ b/configs/coolpi-4b-rk3588s_defconfig -@@ -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_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 ---- a/configs/coolpi-cm5-evb-rk3588_defconfig -+++ b/configs/coolpi-cm5-evb-rk3588_defconfig -@@ -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_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 ---- a/configs/evb-rk3568_defconfig -+++ b/configs/evb-rk3568_defconfig -@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/evb-rk3588_defconfig b/configs/evb-rk3588_defconfig -index c7f6256a626..cfa73c660e7 100644 ---- a/configs/evb-rk3588_defconfig -+++ b/configs/evb-rk3588_defconfig -@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig -index 83b9de5feb9..2ba8f5029c3 100644 ---- a/configs/firefly-rk3399_defconfig -+++ b/configs/firefly-rk3399_defconfig -@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 - 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_DEFAULT_FDT_FILE="rockchip/rk3399-firefly.dtb" - 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 ---- a/configs/generic-rk3568_defconfig -+++ b/configs/generic-rk3568_defconfig -@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_SPL_SPI_FLASH_SUPPORT=y - CONFIG_SPL_SPI=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/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig -index ac450e6d757..b5424ac9f16 100644 ---- a/configs/generic-rk3588_defconfig -+++ b/configs/generic-rk3588_defconfig -@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/jaguar-rk3588_defconfig b/configs/jaguar-rk3588_defconfig -index ed3883b4f9c..47dbd834f30 100644 ---- a/configs/jaguar-rk3588_defconfig -+++ b/configs/jaguar-rk3588_defconfig -@@ -16,6 +16,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/lubancat-2-rk3568_defconfig b/configs/lubancat-2-rk3568_defconfig -index 7548bf60b06..2fb8a432503 100644 ---- a/configs/lubancat-2-rk3568_defconfig -+++ b/configs/lubancat-2-rk3568_defconfig -@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_EFI_VAR_BUF_SIZE=16384 - 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 ---- a/configs/nanopc-t4-rk3399_defconfig -+++ b/configs/nanopc-t4-rk3399_defconfig -@@ -15,6 +15,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 - 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_DEFAULT_FDT_FILE="rockchip/rk3399-nanopc-t4.dtb" - 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 ---- a/configs/nanopc-t6-rk3588_defconfig -+++ b/configs/nanopc-t6-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/nanopi-r5c-rk3568_defconfig b/configs/nanopi-r5c-rk3568_defconfig -index e75a24dadc8..159ef033932 100644 ---- a/configs/nanopi-r5c-rk3568_defconfig -+++ b/configs/nanopi-r5c-rk3568_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="usb start;" - 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 ---- a/configs/nanopi-r5s-rk3568_defconfig -+++ b/configs/nanopi-r5s-rk3568_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="usb start;" - 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 ---- a/configs/nanopi-r6c-rk3588s_defconfig -+++ b/configs/nanopi-r6c-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/nanopi-r6s-rk3588s_defconfig b/configs/nanopi-r6s-rk3588s_defconfig -index 743dfca441b..903ec56ad6f 100644 ---- a/configs/nanopi-r6s-rk3588s_defconfig -+++ b/configs/nanopi-r6s-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/neu6a-io-rk3588_defconfig b/configs/neu6a-io-rk3588_defconfig -index 19f129e96f0..08ed699b01d 100644 ---- a/configs/neu6a-io-rk3588_defconfig -+++ b/configs/neu6a-io-rk3588_defconfig -@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/neu6b-io-rk3588_defconfig b/configs/neu6b-io-rk3588_defconfig -index 2cf5aeccf51..8cafd779a1c 100644 ---- a/configs/neu6b-io-rk3588_defconfig -+++ b/configs/neu6b-io-rk3588_defconfig -@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/nova-rk3588s_defconfig b/configs/nova-rk3588s_defconfig -index f7d7492ff46..5abb6ebbe18 100644 ---- a/configs/nova-rk3588s_defconfig -+++ b/configs/nova-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/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig -index b00985b0405..19d7af53c7f 100644 ---- a/configs/odroid-m1-rk3568_defconfig -+++ b/configs/odroid-m1-rk3568_defconfig -@@ -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_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 ---- a/configs/orangepi-3b-rk3566_defconfig -+++ b/configs/orangepi-3b-rk3566_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-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 ---- a/configs/orangepi-5-plus-rk3588_defconfig -+++ b/configs/orangepi-5-plus-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-rk3588s_defconfig b/configs/orangepi-5-rk3588s_defconfig -index e0eba389289..33fe68add7b 100644 ---- a/configs/orangepi-5-rk3588s_defconfig -+++ b/configs/orangepi-5-rk3588s_defconfig -@@ -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_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 ---- a/configs/pinebook-pro-rk3399_defconfig -+++ b/configs/pinebook-pro-rk3399_defconfig -@@ -22,6 +22,7 @@ CONFIG_PCI=y - CONFIG_DEBUG_UART=y - CONFIG_BOOTDELAY=3 - CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb" - 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 ---- a/configs/pinetab2-rk3566_defconfig -+++ b/configs/pinetab2-rk3566_defconfig -@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_SPL_SPI_FLASH_SUPPORT=y - CONFIG_SPL_SPI=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/powkiddy-x55-rk3566_defconfig b/configs/powkiddy-x55-rk3566_defconfig -index 37a359c91a9..70bc5ab6402 100644 ---- a/configs/powkiddy-x55-rk3566_defconfig -+++ b/configs/powkiddy-x55-rk3566_defconfig -@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/quartz64-a-rk3566_defconfig b/configs/quartz64-a-rk3566_defconfig -index 780fd581f0a..7938b5c0d1b 100644 ---- a/configs/quartz64-a-rk3566_defconfig -+++ b/configs/quartz64-a-rk3566_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/quartz64-b-rk3566_defconfig b/configs/quartz64-b-rk3566_defconfig -index 4d92a67cd73..fe8a168373d 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 - 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/quartzpro64-rk3588_defconfig b/configs/quartzpro64-rk3588_defconfig -index 0ad74e8bbef..b9cbddfae77 100644 ---- a/configs/quartzpro64-rk3588_defconfig -+++ b/configs/quartzpro64-rk3588_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/radxa-cm3-io-rk3566_defconfig b/configs/radxa-cm3-io-rk3566_defconfig -index 875f0b76fa5..2523dccd6a3 100644 ---- a/configs/radxa-cm3-io-rk3566_defconfig -+++ b/configs/radxa-cm3-io-rk3566_defconfig -@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/radxa-e25-rk3568_defconfig b/configs/radxa-e25-rk3568_defconfig -index 779d540e22d..7e003e74520 100644 ---- a/configs/radxa-e25-rk3568_defconfig -+++ b/configs/radxa-e25-rk3568_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/radxa-zero-3-rk3566_defconfig b/configs/radxa-zero-3-rk3566_defconfig -index f5cf09a5e4a..7db7e3fcd3d 100644 ---- a/configs/radxa-zero-3-rk3566_defconfig -+++ b/configs/radxa-zero-3-rk3566_defconfig -@@ -11,6 +11,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFE660000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig -index 8b4d8c1b0aa..54baa07aeae 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 - CONFIG_SPL_SPI=y - CONFIG_PCI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - # CONFIG_ANDROID_BOOT_IMAGE is not set - 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 ---- a/configs/rock-3a-rk3568_defconfig -+++ b/configs/rock-3a-rk3568_defconfig -@@ -16,6 +16,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/rock-3b-rk3568_defconfig b/configs/rock-3b-rk3568_defconfig -index c3bf48b9e34..0cfa8eba168 100644 ---- a/configs/rock-3b-rk3568_defconfig -+++ b/configs/rock-3b-rk3568_defconfig -@@ -16,6 +16,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/rock-3c-rk3566_defconfig b/configs/rock-3c-rk3566_defconfig -index 417aa33a663..61d0e1b8c6a 100644 ---- a/configs/rock-3c-rk3566_defconfig -+++ b/configs/rock-3c-rk3566_defconfig -@@ -16,6 +16,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/rock-4c-plus-rk3399_defconfig b/configs/rock-4c-plus-rk3399_defconfig -index 0f6bdfdfb06..f31cb061a83 100644 ---- a/configs/rock-4c-plus-rk3399_defconfig -+++ b/configs/rock-4c-plus-rk3399_defconfig -@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 - CONFIG_SPL_SPI_FLASH_SUPPORT=y - CONFIG_SPL_SPI=y - CONFIG_DEBUG_UART=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="pci enum; usb start; nvme scan;" - CONFIG_EFI_CAPSULE_ON_DISK=y - 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 ---- a/configs/rock-4se-rk3399_defconfig -+++ b/configs/rock-4se-rk3399_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_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 ---- a/configs/rock-5-itx-rk3588_defconfig -+++ b/configs/rock-5-itx-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/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 ---- a/configs/rock-pi-4-rk3399_defconfig -+++ b/configs/rock-pi-4-rk3399_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_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 ---- a/configs/rock-pi-4c-rk3399_defconfig -+++ b/configs/rock-pi-4c-rk3399_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_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 ---- a/configs/rock-pi-n10-rk3399pro_defconfig -+++ b/configs/rock-pi-n10-rk3399pro_defconfig -@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 - 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_ANDROID_BOOT_IMAGE is not set - 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 ---- a/configs/rock5a-rk3588s_defconfig -+++ b/configs/rock5a-rk3588s_defconfig -@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/rock5b-rk3588_defconfig b/configs/rock5b-rk3588_defconfig -index da5fb3a2c30..053346fc035 100644 ---- a/configs/rock5b-rk3588_defconfig -+++ b/configs/rock5b-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/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig -index db121f03ae6..e55f1b6a034 100644 ---- a/configs/rock960-rk3399_defconfig -+++ b/configs/rock960-rk3399_defconfig -@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 - 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_DEFAULT_FDT_FILE="rockchip/rk3399-rock960.dtb" - 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 ---- a/configs/rockpro64-rk3399_defconfig -+++ b/configs/rockpro64-rk3399_defconfig -@@ -20,6 +20,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_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb" - 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 ---- a/configs/sige7-rk3588_defconfig -+++ b/configs/sige7-rk3588_defconfig -@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 - 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/soquartz-blade-rk3566_defconfig b/configs/soquartz-blade-rk3566_defconfig -index 7de159a8881..4137f0459b5 100644 ---- a/configs/soquartz-blade-rk3566_defconfig -+++ b/configs/soquartz-blade-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/soquartz-cm4-rk3566_defconfig b/configs/soquartz-cm4-rk3566_defconfig -index 4455ee5b5aa..ad63ba0204f 100644 ---- a/configs/soquartz-cm4-rk3566_defconfig -+++ b/configs/soquartz-cm4-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/soquartz-model-a-rk3566_defconfig b/configs/soquartz-model-a-rk3566_defconfig -index abdab514496..9e01345bdaa 100644 ---- a/configs/soquartz-model-a-rk3566_defconfig -+++ b/configs/soquartz-model-a-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/tiger-rk3588_defconfig b/configs/tiger-rk3588_defconfig -index 105e8e10e0b..bcc2ae302a5 100644 ---- a/configs/tiger-rk3588_defconfig -+++ b/configs/tiger-rk3588_defconfig -@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 - # CONFIG_DEBUG_UART_BOARD_INIT is not set - 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/toybrick-rk3588_defconfig b/configs/toybrick-rk3588_defconfig -index 14b231ae3e2..7af393731cd 100644 ---- a/configs/toybrick-rk3588_defconfig -+++ b/configs/toybrick-rk3588_defconfig -@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 - CONFIG_DEBUG_UART_BASE=0xFEB50000 - CONFIG_DEBUG_UART_CLOCK=24000000 - 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/turing-rk1-rk3588_defconfig b/configs/turing-rk1-rk3588_defconfig -index 0b3efec23e6..515db2a2b0c 100644 ---- a/configs/turing-rk1-rk3588_defconfig -+++ b/configs/turing-rk1-rk3588_defconfig -@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEBC0000 - 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 --- -2.54.0 - diff --git a/rockchip-fix-mmc-numbering.patch b/rockchip-fix-mmc-numbering.patch new file mode 100644 index 0000000..b8569be --- /dev/null +++ b/rockchip-fix-mmc-numbering.patch @@ -0,0 +1,57 @@ +From 76162abd0252cc431abb19421436f34dd9703abe Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Mon, 19 Apr 2021 00:09:11 +0100 +Subject: [PATCH] arm: rockchip: fix mmc numbering + +Signed-off-by: Peter Robinson +--- + arch/arm/dts/rk3328.dtsi | 3 +++ + arch/arm/dts/rk3368.dtsi | 3 +++ + arch/arm/dts/rk3399.dtsi | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/arch/arm/dts/rk3328.dtsi b/arch/arm/dts/rk3328.dtsi +index 945387e579..77a556d06f 100644 +--- a/arch/arm/dts/rk3328.dtsi ++++ b/arch/arm/dts/rk3328.dtsi +@@ -27,6 +27,9 @@ + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; ++ mmc0 = &sdmmc; ++ mmc1 = &sdio; ++ mmc2 = &emmc; + ethernet0 = &gmac2io; + ethernet1 = &gmac2phy; + }; +diff --git a/arch/arm/dts/rk3368.dtsi b/arch/arm/dts/rk3368.dtsi +index b4f4f6139d..55b5f6b2a7 100644 +--- a/arch/arm/dts/rk3368.dtsi ++++ b/arch/arm/dts/rk3368.dtsi +@@ -62,6 +62,9 @@ + i2c3 = &i2c3; + i2c4 = &i2c4; + i2c5 = &i2c5; ++ mmc0 = &sdmmc; ++ mmc1 = &sdio0; ++ mmc2 = &emmc; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; +diff --git a/arch/arm/dts/rk3399.dtsi b/arch/arm/dts/rk3399.dtsi +index 74f2c3d490..5997c29bc8 100644 +--- a/arch/arm/dts/rk3399.dtsi ++++ b/arch/arm/dts/rk3399.dtsi +@@ -29,6 +29,9 @@ + i2c6 = &i2c6; + i2c7 = &i2c7; + i2c8 = &i2c8; ++ mmc0 = &sdmmc; ++ mmc1 = &sdio0; ++ mmc2 = &sdhci; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; +-- +2.31.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-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch b/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch new file mode 100644 index 0000000..c156e4d --- /dev/null +++ b/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch @@ -0,0 +1,96 @@ +From f10f94831450671a77f61fe413b4a57459963860 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Mon, 10 Aug 2020 22:20:29 +0100 +Subject: [PATCH] rpi: Use firmware provided device tree + +Signed-off-by: Peter Robinson +--- + configs/rpi_0_w_defconfig | 2 +- + configs/rpi_2_defconfig | 2 +- + configs/rpi_3_32b_defconfig | 2 +- + configs/rpi_3_b_plus_defconfig | 2 +- + configs/rpi_3_defconfig | 2 +- + configs/rpi_defconfig | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig +index bba5e12b12..0241f4c6d3 100644 +--- a/configs/rpi_0_w_defconfig ++++ b/configs/rpi_0_w_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig +index 1c2bbb29ce..9573e475f4 100644 +--- a/configs/rpi_2_defconfig ++++ b/configs/rpi_2_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig +index b8a3d17f43..252df994e6 100644 +--- a/configs/rpi_3_32b_defconfig ++++ b/configs/rpi_3_32b_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig +index 4c361438fa..3b2996a2f9 100644 +--- a/configs/rpi_3_b_plus_defconfig ++++ b/configs/rpi_3_b_plus_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig +index 9b281a4f15..1e9ee6122e 100644 +--- a/configs/rpi_3_defconfig ++++ b/configs/rpi_3_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig +index b5ad53c37b..223fc03275 100644 +--- a/configs/rpi_defconfig ++++ b/configs/rpi_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +-- +2.26.2 + 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/sources b/sources index 08618e7..0be2497 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (u-boot-v2026.10-rc3.tar.bz2) = e993f5d78a1ac0eb11f00e3730ff23eb880e206036f78c3eb74852b846a23d59111b4b07f4ced2c88c61a8c1627036c3cc32717c0efcf819376c5cd0a34183d2 +SHA512 (u-boot-2021.04.tar.bz2) = c24835a520bfd528032614576ca552e55e6de129372e72e22e80e0d45dc5c1c75aa4aad80e856d5bbd7146ec092cac52a6f352253cf3fdf9fe536f5e87782803 diff --git a/sunxi-support-asymmetric-dual-rank-DRAM-on-A64.patch b/sunxi-support-asymmetric-dual-rank-DRAM-on-A64.patch new file mode 100644 index 0000000..c2b6946 --- /dev/null +++ b/sunxi-support-asymmetric-dual-rank-DRAM-on-A64.patch @@ -0,0 +1,337 @@ +From patchwork Thu Feb 25 16:13:24 2021 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Icenowy Zheng +X-Patchwork-Id: 1444507 +X-Patchwork-Delegate: andre.przywara@arm.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@bilbo.ozlabs.org +Authentication-Results: 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=) +Authentication-Results: ozlabs.org; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com + header.a=rsa-sha256 header.s=default header.b=cioDKJo2; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=aosc.io header.i=@aosc.io header.a=rsa-sha256 + header.s=default header.b=HIUK4Nk2; + dkim-atps=neutral +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 RSA-PSS (4096 bits) server-digest + SHA256) + (No client certificate requested) + by ozlabs.org (Postfix) with ESMTPS id 4DmdCS3h1Hz9rx6 + for ; Fri, 26 Feb 2021 03:14:28 +1100 (AEDT) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 110BD81B51; + Thu, 25 Feb 2021 17:14:23 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=aosc.io +Authentication-Results: phobos.denx.de; + spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de +Authentication-Results: phobos.denx.de; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com + header.b="cioDKJo2"; + dkim=fail reason="signature verification failed" (1024-bit key; + unprotected) header.d=aosc.io header.i=@aosc.io header.b="HIUK4Nk2"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id B889280598; Thu, 25 Feb 2021 17:14:13 +0100 (CET) +X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de +X-Spam-Level: +X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, + DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham + autolearn_force=no version=3.4.2 +Received: from relay4.mymailcheap.com (relay4.mymailcheap.com + [137.74.199.117]) + (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by phobos.denx.de (Postfix) with ESMTPS id C7F5580598 + for ; Thu, 25 Feb 2021 17:14:09 +0100 (CET) +Authentication-Results: phobos.denx.de; + dmarc=none (p=none dis=none) header.from=aosc.io +Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=icenowy@aosc.io +Received: from filter1.mymailcheap.com (filter1.mymailcheap.com + [149.56.130.247]) + by relay4.mymailcheap.com (Postfix) with ESMTPS id 6FC363F1CF; + Thu, 25 Feb 2021 17:14:09 +0100 (CET) +Received: from localhost (localhost [127.0.0.1]) + by filter1.mymailcheap.com (Postfix) with ESMTP id A57402A383; + Thu, 25 Feb 2021 11:14:08 -0500 (EST) +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; + s=default; t=1614269648; + bh=p5Qg+eI0X+uHI/vb/v+Q5hqIyhUcxanqxa0s3F6kzsk=; + h=From:To:Cc:Subject:Date:In-Reply-To:References:From; + b=cioDKJo2JP5QKxiGm4JTh3EgF9+TQ/ar45VDuTK90pKSZQrjTbxwSxU6+g/Qf11YS + Tl8xBob9LtGr3IqRPR6NvT1E5ZMyjJY5TA/5NTeRVDtgbfihgr9y79uX6wx8j0PwGI + HmhrdMUcAi1i6Nf8P8i7864A0P2g+73GGSbFTnxw= +Received: from filter1.mymailcheap.com ([127.0.0.1]) + by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ZupYgX5wP4Vd; Thu, 25 Feb 2021 11:14:07 -0500 (EST) +Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) + (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by filter1.mymailcheap.com (Postfix) with ESMTPS; + Thu, 25 Feb 2021 11:14:07 -0500 (EST) +Received: from [148.251.23.173] (ml.mymailcheap.com [148.251.23.173]) + by mail20.mymailcheap.com (Postfix) with ESMTP id 623DD41AAC; + Thu, 25 Feb 2021 16:14:06 +0000 (UTC) +Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; + unprotected) header.d=aosc.io header.i=@aosc.io header.b="HIUK4Nk2"; + dkim-atps=neutral +AI-Spam-Status: Not processed +Received: from ice-e5v2.lan (unknown [59.41.161.221]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest + SHA256) (No client certificate requested) + by mail20.mymailcheap.com (Postfix) with ESMTPSA id 373A94085F; + Thu, 25 Feb 2021 16:13:48 +0000 (UTC) +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; + t=1614269631; bh=p5Qg+eI0X+uHI/vb/v+Q5hqIyhUcxanqxa0s3F6kzsk=; + h=From:To:Cc:Subject:Date:In-Reply-To:References:From; + b=HIUK4Nk2y/BejXaMIQECyQ7r0JiiRWWbURK29vtVJOxbvSa5uDI5eMKRpJPD1FM0C + FcHWJD/H2cXjFNbCk9Ogmfwhcw2wgyXx0AranW4WXH8qg4g8uzYrAqN9nKGhbmDZ3n + ds22TcdBpaiuxNCOmVjRPJvWBZhWtTxLREQv27fw= +From: Icenowy Zheng +To: Jagan Teki , + Andre Przywara +Cc: u-boot@lists.denx.de, linux-sunxi@googlegroups.com, + Icenowy Zheng +Subject: [PATCH 1/2] sunxi: support asymmetric dual rank DRAM on A64/R40 +Date: Fri, 26 Feb 2021 00:13:24 +0800 +Message-Id: <20210225161325.94019-2-icenowy@aosc.io> +X-Mailer: git-send-email 2.30.0 +In-Reply-To: <20210225161325.94019-1-icenowy@aosc.io> +References: <20210225161325.94019-1-icenowy@aosc.io> +MIME-Version: 1.0 +X-Rspamd-Server: mail20.mymailcheap.com +X-Spamd-Result: default: False [4.90 / 20.00]; ARC_NA(0.00)[]; + RCVD_VIA_SMTP_AUTH(0.00)[]; + R_DKIM_ALLOW(0.00)[aosc.io:s=default]; + RECEIVED_SPAMHAUS_PBL(0.00)[59.41.161.221:received]; + FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; + R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; + MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io]; + BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; + RCPT_COUNT_FIVE(0.00)[5]; ML_SERVERS(-3.10)[148.251.23.173]; + DKIM_TRACE(0.00)[aosc.io:+]; MID_CONTAINS_FROM(1.00)[]; + RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; + MIME_TRACE(0.00)[0:+]; + ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; + RCVD_COUNT_TWO(0.00)[2]; + HFILTER_HELO_BAREIP(3.00)[148.251.23.173,1] +X-Rspamd-Queue-Id: 623DD41AAC +X-BeenThere: u-boot@lists.denx.de +X-Mailman-Version: 2.1.34 +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.102.4 at phobos.denx.de +X-Virus-Status: Clean + +Previously we have known that R40 has a configuration register for its +rank 1, which allows different configuration than rank 0. Reverse +engineering of newest libdram of A64 from Allwinner shows that A64 has +this register too. It's bit 0 (which enables dual rank in rank 0 +configuration register) means a dedicated rank size setup is used for +rank 1. + +Now, Pine64 scheduled to use a 3GiB LPDDR3 DRAM chip (which has 2GiB +rank 0 and 1GiB rank 1) on PinePhone, that makes asymmetric dual rank +DRAM support necessary. + +Add this support. The code could support both A64 and R40, but because +dual rank detection is broken on R40 now, we cannot really use it on R40 +currently. + +Signed-off-by: Icenowy Zheng +--- + .../include/asm/arch-sunxi/dram_sunxi_dw.h | 11 ++- + arch/arm/mach-sunxi/dram_sunxi_dw.c | 94 +++++++++++++++---- + 2 files changed, 82 insertions(+), 23 deletions(-) + +diff --git a/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h b/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h +index a5a7ebde44..e843c14202 100644 +--- a/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h ++++ b/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h +@@ -215,12 +215,17 @@ struct sunxi_mctl_ctl_reg { + #define NR_OF_BYTE_LANES (32 / BITS_PER_BYTE) + /* The eight data lines (DQn) plus DM, DQS and DQSN */ + #define LINES_PER_BYTE_LANE (BITS_PER_BYTE + 3) +-struct dram_para { ++ ++struct rank_para { + u16 page_size; +- u8 bus_full_width; +- u8 dual_rank; + u8 row_bits; + u8 bank_bits; ++}; ++ ++struct dram_para { ++ u8 dual_rank; ++ u8 bus_full_width; ++ struct rank_para ranks[2]; + const u8 dx_read_delays[NR_OF_BYTE_LANES][LINES_PER_BYTE_LANE]; + const u8 dx_write_delays[NR_OF_BYTE_LANES][LINES_PER_BYTE_LANE]; + const u8 ac_delays[31]; +diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c +index d0600011ff..2b9d631d49 100644 +--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c ++++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c +@@ -399,11 +399,19 @@ static void mctl_set_cr(uint16_t socid, struct dram_para *para) + #else + #error Unsupported DRAM type! + #endif +- (para->bank_bits == 3 ? MCTL_CR_EIGHT_BANKS : MCTL_CR_FOUR_BANKS) | ++ (para->ranks[0].bank_bits == 3 ? MCTL_CR_EIGHT_BANKS : MCTL_CR_FOUR_BANKS) | + MCTL_CR_BUS_FULL_WIDTH(para->bus_full_width) | + (para->dual_rank ? MCTL_CR_DUAL_RANK : MCTL_CR_SINGLE_RANK) | +- MCTL_CR_PAGE_SIZE(para->page_size) | +- MCTL_CR_ROW_BITS(para->row_bits), &mctl_com->cr); ++ MCTL_CR_PAGE_SIZE(para->ranks[0].page_size) | ++ MCTL_CR_ROW_BITS(para->ranks[0].row_bits), &mctl_com->cr); ++ ++ if (para->dual_rank && (socid == SOCID_A64 || socid == SOCID_R40)) { ++ writel((para->ranks[1].bank_bits == 3 ? MCTL_CR_EIGHT_BANKS : MCTL_CR_FOUR_BANKS) | ++ MCTL_CR_BUS_FULL_WIDTH(para->bus_full_width) | ++ MCTL_CR_DUAL_RANK | ++ MCTL_CR_PAGE_SIZE(para->ranks[1].page_size) | ++ MCTL_CR_ROW_BITS(para->ranks[1].row_bits), &mctl_com->cr_r1); ++ } + + if (socid == SOCID_R40) { + if (para->dual_rank) +@@ -646,35 +654,63 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para) + return 0; + } + +-static void mctl_auto_detect_dram_size(uint16_t socid, struct dram_para *para) ++/* ++ * Test if memory at offset offset matches memory at a certain base ++ */ ++static bool mctl_mem_matches_base(u32 offset, ulong base) ++{ ++ /* Try to write different values to RAM at two addresses */ ++ writel(0, base); ++ writel(0xaa55aa55, base + offset); ++ dsb(); ++ /* Check if the same value is actually observed when reading back */ ++ return readl(base) == ++ readl(base + offset); ++} ++ ++static void mctl_auto_detect_dram_size_rank(uint16_t socid, struct dram_para *para, ulong base, struct rank_para *rank) + { + /* detect row address bits */ +- para->page_size = 512; +- para->row_bits = 16; +- para->bank_bits = 2; ++ rank->page_size = 512; ++ rank->row_bits = 16; ++ rank->bank_bits = 2; + mctl_set_cr(socid, para); + +- for (para->row_bits = 11; para->row_bits < 16; para->row_bits++) +- if (mctl_mem_matches((1 << (para->row_bits + para->bank_bits)) * para->page_size)) ++ for (rank->row_bits = 11; rank->row_bits < 16; rank->row_bits++) ++ if (mctl_mem_matches_base((1 << (rank->row_bits + rank->bank_bits)) * rank->page_size, base)) + break; + + /* detect bank address bits */ +- para->bank_bits = 3; ++ rank->bank_bits = 3; + mctl_set_cr(socid, para); + +- for (para->bank_bits = 2; para->bank_bits < 3; para->bank_bits++) +- if (mctl_mem_matches((1 << para->bank_bits) * para->page_size)) ++ for (rank->bank_bits = 2; rank->bank_bits < 3; rank->bank_bits++) ++ if (mctl_mem_matches_base((1 << rank->bank_bits) * rank->page_size, base)) + break; + + /* detect page size */ +- para->page_size = 8192; ++ rank->page_size = 8192; + mctl_set_cr(socid, para); + +- for (para->page_size = 512; para->page_size < 8192; para->page_size *= 2) +- if (mctl_mem_matches(para->page_size)) ++ for (rank->page_size = 512; rank->page_size < 8192; rank->page_size *= 2) ++ if (mctl_mem_matches_base(rank->page_size, base)) + break; + } + ++static unsigned long mctl_calc_rank_size(struct rank_para *rank) ++{ ++ return (1UL << (rank->row_bits + rank->bank_bits)) * rank->page_size; ++} ++ ++static void mctl_auto_detect_dram_size(uint16_t socid, struct dram_para *para) ++{ ++ mctl_auto_detect_dram_size_rank(socid, para, (ulong)CONFIG_SYS_SDRAM_BASE, ¶->ranks[0]); ++ ++ if ((socid == SOCID_A64 || socid == SOCID_R40) && para->dual_rank) { ++ mctl_auto_detect_dram_size_rank(socid, para, (ulong)CONFIG_SYS_SDRAM_BASE + mctl_calc_rank_size(¶->ranks[0]), ¶->ranks[1]); ++ } ++} ++ + /* + * The actual values used here are taken from Allwinner provided boot0 + * binaries, though they are probably board specific, so would likely benefit +@@ -769,12 +805,23 @@ unsigned long sunxi_dram_init(void) + struct sunxi_mctl_ctl_reg * const mctl_ctl = + (struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE; + ++ unsigned long size; ++ + struct dram_para para = { + .dual_rank = 1, + .bus_full_width = 1, +- .row_bits = 15, +- .bank_bits = 3, +- .page_size = 4096, ++ .ranks = { ++ { ++ .row_bits = 15, ++ .bank_bits = 3, ++ .page_size = 4096, ++ }, ++ { ++ .row_bits = 15, ++ .bank_bits = 3, ++ .page_size = 4096, ++ } ++ }, + + #if defined(CONFIG_MACH_SUN8I_H3) + .dx_read_delays = SUN8I_H3_DX_READ_DELAYS, +@@ -846,6 +893,13 @@ unsigned long sunxi_dram_init(void) + mctl_auto_detect_dram_size(socid, ¶); + mctl_set_cr(socid, ¶); + +- return (1UL << (para.row_bits + para.bank_bits)) * para.page_size * +- (para.dual_rank ? 2 : 1); ++ size = mctl_calc_rank_size(¶.ranks[0]); ++ if (socid == SOCID_A64 || socid == SOCID_R40) { ++ if (para.dual_rank) ++ size += mctl_calc_rank_size(¶.ranks[1]); ++ } else if (para.dual_rank) { ++ size *= 2; ++ } ++ ++ return size; + } diff --git a/uboot-tools.spec b/uboot-tools.spec index 056cc94..3176c3a 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,90 +1,67 @@ -%global candidate rc3 -%if 0%{?rhel} -%bcond_with toolsonly -%else -%bcond_without toolsonly -%endif - -# Set it to "opensbi" (stable) or "opensbi-unstable" (unstable, git) -%global opensbi opensbi +#global candidate rc1 Name: uboot-tools -Version: 2026.10 -Release: 0.3%{?candidate:.%{candidate}}%{?dist} -Epoch: 1 +Version: 2021.04 +Release: 3%{?candidate:.%{candidate}}%{?dist} 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 -Source1: aarch64-boards -Source2: riscv64-boards -Source3: x86_64-boards +License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ +URL: http://www.denx.de/wiki/U-Boot -# Fedora patches to enable/disable features -Patch1: disable-VBE-by-default.patch -Patch2: enable-bootmenu-by-default.patch -# This is now legacy, most devices use bootflow, we keep this for the laggards -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 -# 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 +Source0: ftp://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 +Source1: arm-boards +Source2: arm-chromebooks +Source3: aarch64-boards +Source4: aarch64-chromebooks -# Device improvments -# USB-PD improvements -Patch10: USB-PD-TCPM-improvements.patch +# Fedoraisms patches +# Needed to find DT on boot partition that's not the first partition +Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch +# https://lists.denx.de/pipermail/u-boot/2021-April/448260.html +Patch2: efi_loader-loosen-buffer-parameter-check-in-efi_file_read_int.patch +# RPi - uses RPI firmware device tree for HAT support +Patch3: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch + +# Revert an upstream regression +Patch9: IOMUX-Fix-buffer-overflow-in-iomux_replace_device.patch +# Board fixes and enablement +# AllWinner improvements +Patch10: AllWinner-PineTab.patch +# TI fixes +Patch11: 0001-Fix-BeagleAI-detection.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 +Patch12: rk3399-Pinebook-pro-EDP-support.patch +Patch13: phy-rockchip-inno-usb2-fix-hang-when-multiple-controllers-exit.patch +Patch14: rockchip-fix-mmc-numbering.patch +# Fixes for Allwinner network issues +Patch15: 0001-arm-dts-allwinner-sync-from-linux-for-RGMII-RX-TX-de.patch +Patch16: sunxi-support-asymmetric-dual-rank-DRAM-on-A64.patch BuildRequires: bc -BuildRequires: bison BuildRequires: dtc -BuildRequires: flex -BuildRequires: gcc -BuildRequires: gnutls-devel -BuildRequires: libuuid-devel BuildRequires: make -BuildRequires: ncurses-devel -%if 0%{?fedora} > 44 -BuildRequires: openssl3-devel -BuildRequires: openssl3-devel-engine +# Requirements for building on el7 +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-build +BuildRequires: devtoolset-7-binutils +BuildRequires: devtoolset-7-gcc +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-libfdt %else -BuildRequires: openssl-devel -BuildRequires: openssl-devel-engine -%endif -BuildRequires: perl-interpreter +BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-libfdt -BuildRequires: SDL2-devel +%endif +BuildRequires: flex bison +BuildRequires: openssl-devel +BuildRequires: SDL-devel BuildRequires: swig -%if %{with toolsonly} +%ifarch %{arm} aarch64 +BuildRequires: vboot-utils +%endif %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 @@ -92,7 +69,6 @@ Requires: dtc 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 Summary: U-Boot firmware images for aarch64 boards @@ -102,101 +78,83 @@ BuildArch: noarch U-Boot firmware binaries for aarch64 boards %endif -%ifarch riscv64 -%package -n uboot-images-riscv64 -Summary: U-Boot firmware images for riscv64 boards +%ifarch %{arm} +%package -n uboot-images-armv7 +Summary: U-Boot firmware images for armv7 boards BuildArch: noarch -%description -n uboot-images-riscv64 -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 +%description -n uboot-images-armv7 +U-Boot firmware binaries for armv7 boards %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 %SOURCE3 %SOURCE4 . %build mkdir builds +%if 0%{?rhel} == 7 +#Enabling DTS for .el7 +%{?enable_devtoolset7:%{enable_devtoolset7}} +%endif + %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 +%ifarch aarch64 %{arm} for board in $(cat %{_arch}-boards) do echo "Building board: $board" 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) + sun50i=(a64-olinuxino amarula_a64_relic bananapi_m2_plus_h5 bananapi_m64 libretech_all_h3_cc_h5 nanopi_a64 nanopi_neo2 nanopi_neo_plus2 orangepi_pc2 orangepi_prime orangepi_win orangepi_zero_plus orangepi_zero_plus2 pine64-lts pine64_plus pinebook 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)/ + cp /usr/share/arm-trusted-firmware/sun50i_a64/* 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) + sun50h6=(beelink_gs1 orangepi_3 orangepi_lite2 orangepi_one_plus orangepi_zero2 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)/ + cp /usr/share/arm-trusted-firmware/sun50i_h6/* 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) + rk3328=(evb-rk3328 nanopi-r2s-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328) if [[ " ${rk3328[*]} " == *" $board "* ]]; then echo "Board: $board using rk3328" - cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31 + cp /usr/share/arm-trusted-firmware/rk3328/* builds/$(echo $board)/ 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) + rk3399=(evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 orangepi-rk3399 pinebook-pro-rk3399 puma-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)/ + %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/ + # build spi images for rockchip boards with SPI flash + rkspi=(evb-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 nanopc-t4-rk3399 pinebook-pro-rk3399 rockpro64-rk3399) + if [[ " ${rkspi[*]} " == *" $board "* ]]; then + echo "Board: $board with SPI flash" + builds/$(echo $board)/tools/mkimage -n rk3399 -T rkspi -d builds/$(echo $board)/tpl/u-boot-tpl.bin:builds/$(echo $board)/spl/u-boot-spl.bin builds/$(echo $board)/idbloader.spi + fi + # build spi, and uart images for mvebu boards + mvebu=(clearfog helios4 turris_omnia) + if [[ " ${mvebu[*]} " == *" $board "* ]]; then + for target in spi uart + do + echo "Board: $board Target: $target" + sed -i -e '/CONFIG_MVEBU_SPL_BOOT_DEVICE_/d' configs/$(echo $board)_defconfig + echo CONFIG_MVEBU_SPL_BOOT_DEVICE_${target^^}=y >> configs/$(echo $board)_defconfig + make $(echo $board)_defconfig O=builds/$(echo $board-$target)/ + %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board-$target)/ + done + fi done -%endif %endif %install @@ -204,370 +162,262 @@ 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 + mkdir -p %{buildroot}%{_datadir}/uboot/$(echo $board)/ + for file in u-boot.bin u-boot.dtb u-boot.img u-boot-dtb.img u-boot.itb u-boot-sunxi-with-spl.bin u-boot-rockchip.bin idbloader.img idbloader.spi spl/boot.bin spl/sunxi-spl.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 - -# 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) + install -p -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/ fi done done %endif -%ifarch x86_64 +%ifarch %{arm} for board in $(ls builds) do - for file in u-boot.rom + mkdir -p %{buildroot}%{_datadir}/uboot/$(echo $board)/ + for file in MLO SPL spl/arndale-spl.bin spl/origen-spl.bin spl/*spl.bin u-boot.bin u-boot.dtb u-boot-dtb-tegra.bin u-boot.img u-boot.imx u-boot-spl.kwb u-boot-rockchip.bin u-boot-sunxi-with-spl.bin 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) + install -p -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/ fi done done %endif # Bit of a hack to remove binaries we don't use as they're large +%ifarch aarch64 %{arm} 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}.* + if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/MLO ]; then + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin + fi + if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/SPL ]; then + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin + fi + if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.imx ]; then + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin + fi + if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-spl.kwb ]; then + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.* + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-spl.bin + fi + if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/idbloader.img ]; then + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin + rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.img 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 +for tool in bmp_logo dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc img2srec mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder ubsha1 xway-swap-bytes kwboot 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 0644 doc/mkimage.1 %{buildroot}%{_mandir}/man1 install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir} ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv ) +# Copy some useful docs over +mkdir -p builds/docs +cp -p board/hisilicon/hikey/README builds/docs/README.hikey +cp -p board/Marvell/db-88f6820-gp/README builds/docs/README.mvebu-db-88f6820 +cp -p board/rockchip/evb_rk3399/README builds/docs/README.evb_rk3399 +cp -p board/solidrun/clearfog/README builds/docs/README.clearfog +cp -p board/solidrun/mx6cuboxi/README builds/docs/README.mx6cuboxi +cp -p board/sunxi/README.sunxi64 builds/docs/README.sunxi64 +cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand +cp -p board/ti/am335x/README builds/docs/README.am335x +cp -p board/ti/omap5_uevm/README builds/docs/README.omap5_uevm +cp -p board/udoo/README builds/docs/README.udoo +cp -p board/wandboard/README builds/docs/README.wandboard +cp -p board/warp/README builds/docs/README.warp +cp -p board/warp7/README builds/docs/README.warp7 + %files -%license Licenses/* -%doc README doc/develop/distro.rst doc/README.gpt -%doc doc/develop/uefi doc/usage doc/arch/arm64.rst +%doc README doc/README.kwbimage doc/README.distro doc/README.gpt +%doc doc/README.odroid doc/README.rockchip doc/uefi doc/uImage.FIT doc/arch/arm64.rst +%doc doc/README.chromium builds/docs/* +%doc doc/board/amlogic/ doc/board/rockchip/ %{_bindir}/* -%{_mandir}/man1/dumpimage.1* -%{_mandir}/man1/kwboot.1* -%{_mandir}/man1/mkeficapsule.1* %{_mandir}/man1/mkimage.1* +%dir %{_datadir}/uboot/ -%if %{with toolsonly} %ifarch aarch64 %files -n uboot-images-armv8 -%license Licenses/* -%dir %{_datadir}/uboot/ %{_datadir}/uboot/* %endif -%ifarch riscv64 -%files -n uboot-images-riscv64 -%license Licenses/* -%dir %{_datadir}/uboot/ +%ifarch %{arm} +%files -n uboot-images-armv7 %{_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 Apr 28 2021 Peter Robinson - 2021.04-3 +- Upstream fix for console regression (rhbz 1946278) +- Fix for fallback.efi crash (rhbz 1733817) -* Wed Aug 12 2026 Peter Robinson - 1:2026.10-0.2.rc2 -- Update to 2026.10 RC2 +* Wed Apr 21 2021 Peter Robinson - 2021.04-2 +- Revert keyboard console regression change (rhbz 1946278) -* Thu Jul 30 2026 Peter Robinson - 1:2026.10-0.1.rc1 -- Update to 2026.10 RC1 -- Update source URL +* Sun Apr 18 2021 Peter Robinson - 2021.04-1 +- Update to 2021.04 GA +- Fix DTB load check (rhbz 1946278) +- Build Rockchip SPI support as idbloader.spi +- Fixes for Rockchip devices +- Build Turris Omnia for MMC/SPI/UART -* Fri Jul 17 2026 Fedora Release Engineering - 1:2026.07-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild +* Wed Mar 17 2021 Peter Robinson - 2021.04-0.6.rc4 +- Update to 2021.04 RC4 +- Move to upstream fix for SMP on RPi3B and RPi3B+ -* Tue Jul 07 2026 Peter Robinson - 1:2026.07-1 -- Update to 2026.07 GA +* Sat Mar 13 2021 Peter Robinson - 2021.04-0.5.rc3 +- Fix for SMP on RPi3B and RPi3B+ +- Initial support for Pinephone 3Gb edition -* Tue Jun 23 2026 Peter Robinson - 1:2026.07-0.4.rc5 -- Update to 2026.07 RC5 +* Mon Mar 08 2021 Peter Robinson - 2021.04-0.4.rc3 +- Update to 2021.04 RC3 -* Mon Jun 08 2026 Peter Robinson - 1:2026.07-0.3.rc4 -- Update to 2026.07 RC4 +* Tue Feb 16 2021 Peter Robinson - 2021.04-0.3.rc2 +- Update to 2021.04 RC2 -* 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 +* Mon Feb 15 2021 Dennis Gilmore +- build spi and uart images in addition to mmc for helios4 and clearfog -* Fri May 01 2026 Peter Robinson - 1:2026.07-0.1.rc1 -- Update to 2026.07 RC1 +* Wed Feb 10 2021 Peter Robinson - 2021.04-0.2.rc1 +- Fixes for network issues on some Allwinner devices -* 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 +* Mon Feb 01 2021 Peter Robinson - 2021.04-0.1.rc1 +- Update to 2021.04 RC1 +- Add new upstream devices -* Tue Apr 07 2026 Peter Robinson - 1:2026.04-1 -- Update to 2026.04 GA +* Wed Jan 27 2021 Fedora Release Engineering - 2021.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild -* Sun Mar 29 2026 Peter Robinson - 1:2026.04-0.9.rc5 -- Enable NVME booting on RPi5 +* Mon Jan 11 2021 Peter Robinson - 2021.01-1 +- Update to 2021.01 GA +- Updates for Raspberry Pi 4 Series of devices -* Tue Mar 24 2026 Peter Robinson - 1:2026.04-0.8.rc5 -- Update to 2026.04 RC5 +* Tue Jan 5 2021 Peter Robinson - 2021.01-0.5.rc5 +- Update to 2021.01 RC5 -* Sat Mar 14 2026 Peter Robinson - 1:2026.04-0.7.rc4 -- Raspberry Pi fixes +* Sun Dec 27 2020 Peter Robinson - 2021.01-0.4.rc4 +- Update to 2021.01 RC4 +- Latest RPi-400/CM4 support patch -* Tue Mar 10 2026 Peter Robinson - 1:2026.04-0.6.rc4 -- Update to 2026.04 RC4 +* Tue Dec 15 2020 Peter Robinson - 2021.01-0.3.rc3 +- Update to 2021.01 RC3 +- Latest RPi-400/CM4 support patch +- Re-enable previously disabled device support -* Fri Feb 27 2026 Peter Robinson - 1:2026.04-0.5.rc3 -- Update to 2026.04 RC3 +* Mon Dec 14 2020 Javier Martinez Canillas - 2021.01-0.2.rc2 +- Fix a "scan_dev_for_efi" not defined error -* Tue Feb 17 2026 Peter Robinson - 1:2026.04-0.4.rc2 -- Add initial bcm2712d0 identification +* Sun Nov 22 2020 Peter Robinson - 2021.01-0.1.rc2 +- Update to 2021.01 RC2 +- Latest Pinebook Pro display patches +- Initial RPi-400 support patch +- Update Fedora specific patches -* Mon Feb 09 2026 Peter Robinson - 1:2026.04-0.3.rc2 -- Update to 2026.04 RC2 +* Sun Nov 8 2020 Peter Robinson - 2020.10-3 +- Fix SPI on Rockchip devices +- Latest Pinebook Pro display patches +- Fix Keyboard and USB-A ports on Pinebook Pro -* Tue Jan 27 2026 Peter Robinson - 1:2026.04-0.2.rc1 -- Update to 2026.04 RC1 +* Wed Oct 28 2020 Peter Robinson - 2020.10-2 +- Fix kernel installs for non EBBR systems +- Fix for wired networks on some Allwinner devices -* Mon Jan 19 2026 Javier Martinez Canillas - 1:2026.01-3 -- Add a uboot-images-x86_64 subpackage +* Tue Oct 06 2020 Peter Robinson - 2020.10-1 +- Update to 2020.10 -* Sat Jan 17 2026 Fedora Release Engineering - 1:2026.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild +* Sun Sep 27 2020 Peter Robinson - 2020.10-0.6.rc5 +- Initial support for display output on Pinebook Pro -* Tue Jan 06 2026 Peter Robinson - 1:2026.01-1 -- Update to 2026.01 GA +* Tue Sep 22 2020 Peter Robinson - 2020.10-0.5.rc5 +- Update to 2020.10 RC5 -* Mon Dec 29 2025 Peter Robinson - 1:2026.01-0.4.rc5 -- Update to 2026.01 RC5 +* Wed Sep 09 2020 Peter Robinson - 2020.10-0.4.rc4 +- Update to 2020.10 RC4 -* Mon Dec 08 2025 Peter Robinson - 1:2026.01-0.3.rc4 -- Update to 2026.01 RC4 +* Wed Aug 19 2020 Peter Robinson - 2020.10-0.3.rc2 +- Enable a number of new Rockchip devices -* Fri Nov 28 2025 Peter Robinson - 1:2026.01-0.2.rc3 -- Updates for RPi +* Mon Aug 10 2020 Peter Robinson - 2020.10-0.2.rc2 +- Update to 2020.10 RC2 -* Mon Nov 24 2025 Peter Robinson - 1:2026.01-0.1.rc3 -- Update to 2026.01 RC3 +* Tue Jul 28 2020 Peter Robinson - 2020.10-0.1.rc1 +- 2020.10 RC1 -* Thu Oct 16 2025 Peter Robinson - 1:2025.10-2 -- Drop residual Rockchip firmware (saves ~150Mb) +* Tue Jul 14 2020 Tom Stellard - 2020.07-2 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro -* 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 +* Mon Jul 06 2020 Peter Robinson - 2020.07-1 +- 2020.07 GA -* Fri Sep 26 2025 Peter Robinson - 1:2025.10-0.7.rc5 -- Update to 2025.10 RC5 +* Tue Jun 23 2020 Peter Robinson - 2020.07-0.5.rc5 +- 2020.07 RC5 -* Mon Sep 08 2025 Peter Robinson - 1:2025.10-0.6.rc4 -- Update to 2025.10 RC4 +* Thu Jun 18 2020 Peter Robinson - 2020.07-0.4.rc4 +- Update various patches to latest upstream -* Sun Sep 07 2025 Peter Robinson - 1:2025.10-0.5.rc3 -- Boot fixes for some Raspberry Pi variants +* Wed Jun 10 2020 Peter Robinson - 2020.07-0.3.rc4 +- 2020.07 RC4 +- Minor updates and other fixes -* Wed Aug 27 2025 Peter Robinson - 1:2025.10-0.4.rc3 -- Fix booting on some Allwinner devices +* Tue May 12 2020 Peter Robinson - 2020.07-0.2.rc2 +- 2020.07 RC2 +- Minor device updates -* Mon Aug 25 2025 Peter Robinson - 1:2025.10-0.3.rc3 -- Update to 2025.10 RC3 +* Wed Apr 29 2020 Peter Robinson - 2020.07-0.1.rc1 +- 2020.07 RC1 -* Tue Aug 19 2025 Peter Robinson - 1:2025.10-0.2.rc2 -- Fix and re-enable Jetson Nano +* Tue Apr 21 2020 Peter Robinson - 2020.04-4 +- Initial support for USB on Rasperry Pi 4 -* Mon Aug 18 2025 Peter Robinson - 1:2025.10-0.1.rc2 -- Update to 2025.10 RC2 +* Tue Apr 21 2020 Peter Robinson - 2020.04-3 +- Ship u-boot-rockchip.bin for SPI flash -* Fri Jul 25 2025 Fedora Release Engineering - 1:2025.07-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild +* Mon Apr 20 2020 Peter Robinson - 2020.04-2 +- Fix ATF for new aarch64 devices +- Fix Wandboard board detection (rhbz 1825247) +- Fix mSD card on RockPro64 +- Enable (inital) Pinebook Pro -* Thu Jul 10 2025 Peter Robinson - 1:2025.07-2 -- Update patch for rebase issue +* Tue Apr 14 2020 Peter Robinson - 2020.04-1 +- 2020.04 -* Wed Jul 09 2025 Peter Robinson - 1:2025.07-1 -- Update to 2025.07 GA +* Tue Apr 7 2020 Peter Robinson 2020.04-0.7-rc5 +- 2020.04 RC5 -* 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 +* Tue Mar 31 2020 Peter Robinson 2020.04-0.6-rc4 +- 2020.04 RC4 +- Updates for NVIDIA Jetson platforms +- Support RNG for random seed for KASLR on some Rockchip devices -* Thu Jun 26 2025 Javier Martinez Canillas - 1:2025.07-0.4.rc4 -- Add EFI_PARTITION_INFO_PROTOCOL support +* Thu Mar 26 2020 Peter Robinson 2020.04-0.5-rc3 +- Fix ext4 alignment issue seen on some NXP i.MX devices -* Sun Jun 15 2025 Peter Robinson - 1:2025.07-0.3.rc4 -- Update to 2025.07 RC4 +* Wed Feb 26 2020 Peter Robinson 2020.04-0.4-rc3 +- 2020.04 RC3 -* Tue May 13 2025 Peter Robinson - 1:2025.07-0.2.rc2 -- Update to 2025.07 RC2 +* Thu Feb 13 2020 Peter Robinson 2020.04-0.3-rc2 +- 2020.04 RC2 -* Thu May 01 2025 Peter Robinson - 1:2025.07-0.1.rc1 -- Update to 2025.07 RC1 +* Sun Feb 2 2020 Peter Robinson 2020.04-0.2-rc1 +- Update genet NIC driver -* Sun Apr 20 2025 Peter Robinson - 1:2025.04-2 -- Fix for RPi5 serial console +* Wed Jan 29 2020 Peter Robinson 2020.04-0.1-rc1 +- 2020.04 RC1 -* Tue Apr 08 2025 Peter Robinson - 1:2025.04-1 -- Update to 2025.04 GA - -* Tue Mar 25 2025 Peter Robinson - 1:2025.04-0.7.rc5 -- Update to 2025.04 RC5 - -* Wed Mar 12 2025 Peter Robinson - 1:2025.04-0.6.rc4 -- Update to 2025.04 RC4 - -* Wed Feb 26 2025 Peter Robinson - 1:2025.04-0.5.rc3 -- Update to 2025.04 RC3 - -* Tue Feb 18 2025 David Abdurachmanov - 1:2025.04-0.4.rc2 -- Add support for riscv64 - -* Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.3.rc2 -- Update to 2025.05 RC2 - -* Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.2.rc1 -- Update to 2025.05 RC1 - -* Tue Jan 28 2025 Peter Robinson - 1:2025.01-3 -- Add new fdt_add_pubkey tool - -* Sun Jan 19 2025 Fedora Release Engineering - 1:2025.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Tue Jan 07 2025 Peter Robinson - 1:2025.01-1 -- Update to 2025.01 GA - -* Mon Jan 06 2025 Peter Robinson - 1:2025.01-0.2.rc6 -- Rebuild for TF-A 2.12 - -* Tue Dec 31 2024 Peter Robinson - 1:2025.01-0.1.rc6 -- Update to 2025.01 RC6 - -* Fri Oct 11 2024 Peter Robinson - 1:2024.10-1 -- Update to 2024.10 GA -- Fix passing RPi firmware CMA setting to kernel DT -- Update Geekbox - -* Thu Oct 03 2024 Peter Robinson - 1:2024.10-0.8.rc6 -- Pass CMA FW setting through to kernel DT for Raspberry Pi - -* Tue Oct 01 2024 Peter Robinson - 1:2024.10-0.7.rc6 -- Update to 2024.10 RC6 - -* Mon Sep 16 2024 Peter Robinson - 1:2024.10-0.6.rc5 -- Update to 2024.10 RC5 - -* Fri Sep 6 2024 Peter Robinson - 1:2024.10-0.5.rc4 -- Add missing licenses directory - -* Tue Sep 03 2024 Peter Robinson - 1:2024.10-0.4.rc4 -- Update to 2024.10 RC4 - -* Mon Sep 02 2024 Peter Robinson - 1:2024.10-0.3.rc3 -- Fix Allwinner firmware chainloading (rhbz#2309138) -- Fix ATF firmware selection on a number of devices -- Support Allwinner SCP firmware (fixes suspend/resume) - -* Tue Aug 27 2024 Peter Robinson - 1:2024.10-0.2.rc3 -- Update to 2024.10 RC3 -- Enable initial QCM6490 SoC support - -* Thu Aug 15 2024 Peter Robinson - 1:2024.10-0.1.rc2 -- Update to 2024.10 RC2 - -* Tue Jul 23 2024 Peter Robinson - 1:2024.07-1 -- Update to 2024.07 - -* Sat Jul 20 2024 Fedora Release Engineering - 1:2024.07-0.3.rc4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jun 18 2024 Peter Robinson - 1:2024.07-0.2.rc4 -- Update to 2024.07 RC4 - -* Sat May 25 2024 Peter Robinson - 1:2024.07-0.1.rc3 -- Update to 2024.07 RC3 - -* Wed Apr 03 2024 Peter Robinson - 1:2024.04-1 -- Update to 2024.04 GA -- Rockchip rk3328 USB fixes - -* Wed Mar 27 2024 Peter Robinson - 1:2024.04-0.8.rc5 -- Update to 2024.04 RC5 - -* Thu Mar 21 2024 Peter Robinson - 1:2024.04-0.7.rc4 -- Updated patch for DTB loading - -* Fri Mar 15 2024 Peter Robinson - 1:2024.04-0.6.rc4 -- Updated fix for FDT load - -* Wed Mar 13 2024 Peter Robinson - 1:2024.04-0.5.rc4 -- Fixes for Rockchip rk3399 autoboot - -* Tue Mar 12 2024 Peter Robinson - 1:2024.04-0.4.rc4 -- Update to 2024.04 RC4 -- Initial fix for loading DT off /boot (rhbz 2247873) - -* Thu Feb 29 2024 Peter Robinson - 1:2024.04-0.3.rc3 -- Update to 2024.04 RC3 -- Enable a number of new upstream devices -- Upstream now builds Rockchip SPI artifacts -- Various cleanups -- Fix ESP partition detection to enable EFI vars - -* Wed Feb 14 2024 Peter Robinson - 1:2024.04-0.2.rc2 -- Update to 2024.04 RC2 - -* Sat Jan 27 2024 Fedora Release Engineering - 1:2024.01-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 08 2024 Peter Robinson - 1:2024.01-1 -- Update to 2024.01 +* Tue Jan 7 2020 Peter Robinson 2020.01-1 +- 2020.01 diff --git a/uefi-Add-all-options-for-EFI-System-Partitions.patch b/uefi-Add-all-options-for-EFI-System-Partitions.patch deleted file mode 100644 index 3bf1ec8..0000000 --- a/uefi-Add-all-options-for-EFI-System-Partitions.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 86782e882e9542f5f402e00cd87efb36ad0552d3 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sat, 2 Mar 2024 11:17:42 +0000 -Subject: [PATCH v4] disk: dos: Add all options for EFI System Partitions - -The EFI spec states that the ESP can be any of FAT12/16/32 but for -compatibility doesn't necssarily require the partition to be the -EFI partition table ID of 0xef. A number of arm devices will not -find their firmware on a FAT partition with an ID of 0xef so also -allow the original FAT12/16/32 partition IDs as they are also -permissable for an ESP. - -Signed-off-by: Peter Robinson ---- - -v2: -- Add 0x0c option -- Make hex constants consistent -- Move from if to switch statement -v3: -- Fix switch brain fart -v4: -- Drop boot_ind out of switch - - disk/part_dos.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/disk/part_dos.c b/disk/part_dos.c -index 567ead7511d..a35181dff4f 100644 ---- a/disk/part_dos.c -+++ b/disk/part_dos.c -@@ -40,10 +40,21 @@ static int get_bootable(dos_partition_t *p) - { - int ret = 0; - -- if (p->sys_ind == 0xef) -+ switch (p->sys_ind) { -+ case 0x01: -+ case 0x06: -+ case 0x0b: -+ case 0x0c: -+ case 0xef: - ret |= PART_EFI_SYSTEM_PARTITION; -+ break; -+ default: -+ break; -+ } -+ - if (p->boot_ind == 0x80) - ret |= PART_BOOTABLE; -+ - return ret; - } - --- -2.44.0 - diff --git a/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch b/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch index 5954848..c28fdb0 100644 --- a/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch +++ b/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch @@ -1,6 +1,6 @@ -From 4306c538d4a00dd1aa46c55c3c4005c2b0bf7cd5 Mon Sep 17 00:00:00 2001 +From fd3434c754b3b8dddb345352a2434b6b8445343a Mon Sep 17 00:00:00 2001 From: Peter Robinson -Date: Thu, 24 Nov 2022 12:57:55 +0000 +Date: Sun, 18 Apr 2021 14:05:45 +0100 Subject: [PATCH] distro: load FDT from any partition on boot device In the EFI_LOADER boot path, we were only checking the FAT partition @@ -22,14 +22,14 @@ knows) and SoC/board specific ${fdtfile} (which grub does not know). Signed-off-by: Rob Clark Signed-off-by: Peter Robinson --- - include/config_distro_bootcmd.h | 37 +++++++++++++++++++++------------ - 1 file changed, 24 insertions(+), 13 deletions(-) + include/config_distro_bootcmd.h | 35 ++++++++++++++++++++++----------- + 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h -index fcb319a20ae..e71004fad9c 100644 +index 2627c2a6a5..eadd1080b3 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h -@@ -155,28 +155,39 @@ +@@ -148,26 +148,37 @@ "fi\0" \ \ "load_efi_dtb=" \ @@ -44,13 +44,11 @@ index fcb319a20ae..e71004fad9c 100644 + "scan_dev_for_dtb=" \ "setenv efi_fdtfile ${fdtfile}; " \ BOOTENV_EFI_SET_FDTFILE_FALLBACK \ - BOOTENV_RUN_EXTENSION_INIT \ - "for prefix in ${efi_dtb_prefixes}; do " \ - "if test -e ${devtype} " \ - "${devnum}:${distro_bootpart} " \ - "${prefix}${efi_fdtfile}; then " \ - "run load_efi_dtb; " \ -- BOOTENV_RUN_EXTENSION_APPLY \ - "fi;" \ - "done;" \ - "run boot_efi_bootmgr;" \ @@ -67,7 +65,6 @@ index fcb319a20ae..e71004fad9c 100644 + "${devnum}:${dtb_devp} " \ + "${prefix}${efi_fdtfile};"\ + "run load_efi_dtb; " \ -+ BOOTENV_RUN_EXTENSION_APPLY \ + "fi;" \ + "done; " \ + "done; " \ @@ -83,5 +80,5 @@ index fcb319a20ae..e71004fad9c 100644 "fi; " \ "setenv efi_fdtfile\0" -- -2.38.1 +2.31.1 diff --git a/uefi-enable-SetVariableRT-with-volotile-storage.patch b/uefi-enable-SetVariableRT-with-volotile-storage.patch deleted file mode 100644 index ee9bcf4..0000000 --- a/uefi-enable-SetVariableRT-with-volotile-storage.patch +++ /dev/null @@ -1,33 +0,0 @@ -From fd736dd720b29fa69a4bb87492f3f94dc6076996 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 25 Mar 2025 17:13:44 +0000 -Subject: [PATCH] efi: enable SetVariableRT with volotile storage - -Signed-off-by: Peter Robinson ---- - lib/efi_loader/Kconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig -index d4f6b56afaa..3e522131b01 100644 ---- a/lib/efi_loader/Kconfig -+++ b/lib/efi_loader/Kconfig -@@ -108,6 +108,7 @@ choice - config EFI_VARIABLE_FILE_STORE - bool "Store non-volatile UEFI variables as file" - depends on FAT_WRITE -+ default y - help - Select this option if you want non-volatile UEFI variables to be - stored as file /ubootefi.var on the EFI system partition. -@@ -115,6 +116,7 @@ config EFI_VARIABLE_FILE_STORE - config EFI_RT_VOLATILE_STORE - bool "Allow variable runtime services in volatile storage (e.g RAM)" - depends on EFI_VARIABLE_FILE_STORE -+ default y - help - When EFI variables are stored on file we don't allow SetVariableRT, - since the OS doesn't know how to write that file. At the same time --- -2.49.0 - 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 deleted file mode 100644 index ac58bad..0000000 --- a/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 56a985cec8592a8de88e7f254df82f5d444a5ecc Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 28 May 2026 22:08:07 +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 -in the /dtb or /dtb/current directories, and Fedora extended this -to look not just on the boot partition but all the partitions on -that disk. - -The new ways of booting, both bootstd and bootefi bootmgr processes -don't properly look for those options. This provides a function -to search for the DTB on disk so that if the other DT mechanisms -don't work this will look for one on disk to provide a working DT -so that devices will continue to work as they did previously. - -Signed-off-by: Peter Robinson ---- - cmd/bootmenu.c | 5 ++ - include/efi_loader.h | 2 + - lib/efi_loader/efi_helper.c | 106 +++++++++++++++++++++++++++++++++++- - 3 files changed, 112 insertions(+), 1 deletion(-) - -diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c -index 528afd221d0..a10ea35a687 100644 ---- a/cmd/bootmenu.c -+++ b/cmd/bootmenu.c -@@ -502,6 +502,11 @@ static void handle_uefi_bootnext(void) - u16 bootnext; - efi_status_t ret; - efi_uintn_t size; -+ const char *fdt_opt; -+ -+ /* Find the DTB on disk */ -+ log_debug("We will load the DTB\n"); -+ fdt_opt = find_fdt_location(); - - /* Initialize EFI drivers */ - ret = efi_init_obj_list(); -diff --git a/include/efi_loader.h b/include/efi_loader.h -index 3a4d502631c..b11f8a2cb42 100644 ---- a/include/efi_loader.h -+++ b/include/efi_loader.h -@@ -574,6 +574,8 @@ struct efi_register_notify_event { - struct list_head handles; - }; - -+/* Find the FDT on any partition */ -+char *find_fdt_location(void); - /* called at pre-initialization */ - 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 ---- a/lib/efi_loader/efi_helper.c -+++ b/lib/efi_loader/efi_helper.c -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -98,6 +99,99 @@ int efi_get_pxe_arch(void) - return -EINVAL; - } - -+/* We need to pass a blk device in and return a location, or a loaded DT */ -+char *find_fdt_location(void) -+{ -+ const char *fdt_filename; -+ /* FIXME: dynamic size */ -+ char fdt_fullpath[60]; -+ const char *prefix; -+ struct udevice *blk; -+ /* FIXME: Fedora really only cares about first 2*/ -+ int MAX_PART = 8; -+ int part; -+ struct disk_partition info; -+ int fdtext; -+ int ret; -+ int retfdt; -+ int retload; -+ loff_t fdtsize; -+ ulong pbraddr; -+ loff_t len_read; -+ -+ /* step one logic: we have the DT name we're hunting for */ -+ fdt_filename = env_get("fdtfile"); -+ if (fdt_filename) { -+ log_debug("FFL: We're looking for the DTB now!: %s\n", fdt_filename); -+ -+ /* probe all block disks to search for fdt */ -+ uclass_foreach_dev_probe(UCLASS_BLK, blk) { -+ log_debug("FFL: dev name: %s\n", blk->name); -+ struct blk_desc *desc; -+ desc = dev_get_uclass_plat(blk); -+ /* we should get a partition count here for looping */ -+ /* For loop for each partition */ -+ /* Need to also deal with zero part whole disk - part_get_info_whole_disk */ -+ for (part = 1; part <= MAX_PART; part++) { -+ log_debug("FFL: part num: %d\n", part); -+ ret = part_get_info(desc, part, &info); -+ /* if we have partition check it for DT */ -+ if (ret < 0) { -+ log_debug("FFL: no partition\n"); -+ } else { -+ log_debug("FFL: we have a partition\n"); -+ /* we should have a case/for prefix in =/ /dtb/ /dtb/current/ */ -+ /* but for now we hard code if for Fedora */ -+ prefix = "/dtb"; -+ snprintf(fdt_fullpath, sizeof(fdt_fullpath), "%s/%s", prefix, fdt_filename); -+ log_debug("FFL: full name: %s\n", fdt_fullpath); -+ /* search for DT on partition and either find and exit or continue */ -+ if (fs_set_blk_dev_with_part(desc, part) == 0){ -+ log_debug("FFL: set block part pass\n"); -+ fdtext = fs_exists(fdt_fullpath); -+ if (fdtext) { -+ /* we have a fdt!*/ -+ if (fs_set_blk_dev_with_part(desc, part) == 0){ -+ retfdt = fs_size(fdt_fullpath, &fdtsize); -+ if (retfdt == 0) { -+ log_debug("FFL: we have found a DT on disk, size %lld\n", fdtsize); -+ /* Get the main fdt and map it */ -+ const char *fdt_pbr; -+ fdt_pbr = env_get("fdt_addr_r"); -+ pbraddr = hextoul(fdt_pbr, NULL); -+ log_debug("FFL: fdr addr: %s\n", fdt_pbr); -+ if (fs_set_blk_dev_with_part(desc, part) == 0){ -+ retload = fs_read(fdt_fullpath, pbraddr, 0, fdtsize, &len_read); -+ if (retload == 0) { -+ log_debug("FFL: we have a loaded DT, size %lld we can return\n", fdtsize); -+ log_info("Found DTB: %s\n", fdt_filename); -+ return fdt_pbr; -+ } else { -+ log_debug("FFL: DT load failed\n"); -+ } -+ } -+ } else { -+ log_debug("FFL: we DON'T have a DT with size\n"); -+ } -+ } -+ } else { -+ /* we don't have a fdt!*/ -+ log_debug("FFL: we DON'T have a DT\n"); -+ } -+ } else { -+ log_debug("FFL: set block part FAIL\n"); -+ } -+ } -+ } -+ } -+ } else { -+ log_debug("FFL: fdt_filename not defined!!\n"); -+ } -+ -+ /* We didn't find a FDT */ -+ return NULL; -+} -+ - /** - * efi_create_current_boot_var() - Return Boot#### name were #### is replaced by - * the value of BootCurrent -@@ -558,11 +652,21 @@ efi_status_t efi_install_fdt(void *fdt) - const char *fdt_opt; - uintptr_t fdt_addr; - -+ /* Check if there is device tree loaded from disk */ -+ fdt_opt = find_fdt_location(); -+ if (fdt_opt) -+ log_info("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"); -+ } - /* Use our own device tree as fallback */ - if (!fdt_opt) { - fdt_opt = env_get("fdtcontroladdr"); -+ log_info("Using DT from U-Boot\n"); - if (!fdt_opt) { - log_err("need device tree\n"); - return EFI_NOT_FOUND; --- -2.54.0 - diff --git a/usb-kbd-fixes.patch b/usb-kbd-fixes.patch new file mode 100644 index 0000000..fb6a0e0 --- /dev/null +++ b/usb-kbd-fixes.patch @@ -0,0 +1,115 @@ +From a49845f198af088c4e5e0019edbf519344d78c97 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 4 Dec 2018 15:29:14 +0000 +Subject: [PATCH] usb kbd fixes + +Signed-off-by: Peter Robinson +--- + common/usb_kbd.c | 66 +++++++++++++++++++++++++++++++++++------------ + include/console.h | 2 -- + 2 files changed, 50 insertions(+), 18 deletions(-) + +diff --git a/common/usb_kbd.c b/common/usb_kbd.c +index 020f0d4117f..47674ce4458 100644 +--- a/common/usb_kbd.c ++++ b/common/usb_kbd.c +@@ -518,25 +518,59 @@ static int probe_usb_keyboard(struct usb_device *dev) + return error; + + stdinname = env_get("stdin"); +-#if CONFIG_IS_ENABLED(CONSOLE_MUX) +- error = iomux_doenv(stdin, stdinname); +- if (error) +- return error; +-#else +- /* Check if this is the standard input device. */ +- if (strcmp(stdinname, DEVNAME)) +- return 1; ++ if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { ++ char *devname = DEVNAME; ++ char *newstdin = NULL; ++ /* ++ * stdin might not be set yet.. either way, with console- ++ * mux the sensible thing to do is add ourselves to the ++ * list of stdio devices: ++ */ ++ if (stdinname && !strstr(stdinname, DEVNAME)) { ++ newstdin = malloc(strlen(stdinname) + ++ strlen(","DEVNAME) + 1); ++ sprintf(newstdin, "%s,"DEVNAME, stdinname); ++ stdinname = newstdin; ++ } else if (!stdinname) { ++ stdinname = devname; ++ } ++ error = iomux_doenv(stdin, stdinname); ++ free(newstdin); ++ if (error) ++ goto unregister_stdio; ++ } else { ++ /* Check if this is the standard input device. */ ++ if (strcmp(stdinname, DEVNAME)) { ++ error = -1; ++ goto unregister_stdio; ++ } + +- /* Reassign the console */ +- if (overwrite_console()) +- return 1; ++ /* Reassign the console */ ++ if (overwrite_console()) { ++ error = -1; ++ goto unregister_stdio; ++ } + +- error = console_assign(stdin, DEVNAME); +- if (error) +- return error; +-#endif ++ error = console_assign(stdin, DEVNAME); ++ if (error) ++ goto unregister_stdio; ++ } ++ ++ return 0; + ++unregister_stdio: ++ /* ++ * If probe fails, the device will be removed.. leaving dangling ++ * pointers if the stdio device is not unregistered. If u-boot ++ * is built without stdio_deregister(), just pretend to succeed ++ * in order to avoid dangling pointers. ++ */ ++#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) ++ stdio_deregister(DEVNAME, 1); ++ return error; ++#else + return 0; ++#endif + } + + #if !CONFIG_IS_ENABLED(DM_USB) +@@ -642,7 +676,7 @@ static int usb_kbd_remove(struct udevice *dev) + + return 0; + err: +- printf("%s: warning, ret=%d", __func__, ret); ++ printf("%s: warning, ret=%d\n", __func__, ret); + return ret; + } + +diff --git a/include/console.h b/include/console.h +index e935c601f12..6382ec8e0d6 100644 +--- a/include/console.h ++++ b/include/console.h +@@ -56,8 +56,6 @@ int console_announce_r(void); + /* + * CONSOLE multiplexing. + */ +-#ifdef CONFIG_CONSOLE_MUX + #include +-#endif + + #endif +-- +2.19.2 + 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