Hi Jonas,

On 4/13/24 20:13, Jonas Karlman wrote:
After the commit aca95282c1b7 ("Makefile: Use the fdtgrep -u flag")
bootph props is propagating to parent nodes.

Update bootph props to ensure eMMC, SD-card and SPI flash is available
in SPL and U-Boot proper pre-reloc phase also remove unneeded bootph
props that automatically is propagated to parent nodes.

Also adjust pinctrl nodes to only be included in boot phases where they
are needed and add any missing pinctrl node needed in SPL.

Signed-off-by: Jonas Karlman <jo...@kwiboo.se>
---
v2: Add bootph-some-ram props and follow kernel sort order

Following bootph props have been applied:

CRU, GRF and UART nodes:
- bootph-all - needed at all or most stages

SD-card regulator related nodes:
- bootph-pre-ram (SPL) - regulator pinctrl may be needed to read FIT
   from SD-card on some boards

eMMC/SD-card/SPI flash related nodes:
- bootph-pre-ram (SPL)
- bootph-some-ram (U-Boot proper pre-reloc)
---
  .../arm/dts/rk3588-coolpi-cm5-evb-u-boot.dtsi |  8 +--
  arch/arm/dts/rk3588-generic.dts               |  1 +
  arch/arm/dts/rk3588-nanopc-t6-u-boot.dtsi     | 12 ++---
  .../dts/rk3588-orangepi-5-plus-u-boot.dtsi    |  7 ++-
  arch/arm/dts/rk3588-rock-5b-u-boot.dtsi       |  8 +--
  arch/arm/dts/rk3588-turing-rk1-u-boot.dtsi    |  6 ++-
  arch/arm/dts/rk3588s-coolpi-4b-u-boot.dtsi    |  8 +--
  arch/arm/dts/rk3588s-orangepi-5-u-boot.dtsi   |  9 ++--
  arch/arm/dts/rk3588s-u-boot.dtsi              | 50 ++++++++++++++-----
  configs/evb-rk3588_defconfig                  |  4 +-
  10 files changed, 71 insertions(+), 42 deletions(-)

diff --git a/arch/arm/dts/rk3588-coolpi-cm5-evb-u-boot.dtsi 
b/arch/arm/dts/rk3588-coolpi-cm5-evb-u-boot.dtsi
index ed15b14ea0ee..f0ef0164664e 100644
--- a/arch/arm/dts/rk3588-coolpi-cm5-evb-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-coolpi-cm5-evb-u-boot.dtsi
@@ -3,7 +3,8 @@
  #include "rk3588-u-boot.dtsi"
&fspim2_pins {
-       bootph-all;
+       bootph-pre-ram;
+       bootph-some-ram;
  };
&sdhci {
@@ -12,16 +13,15 @@
  };
&sfc {
-       bootph-pre-ram;
-       u-boot,spl-sfc-no-dma;
        pinctrl-names = "default";
        pinctrl-0 = <&fspim2_pins>;
        status = "okay";
flash@0 {
-               bootph-pre-ram;
                compatible = "jedec,spi-nor";
                reg = <0>;
+               bootph-pre-ram;
+               bootph-some-ram;
                spi-max-frequency = <24000000>;
                spi-rx-bus-width = <4>;
                spi-tx-bus-width = <1>;
diff --git a/arch/arm/dts/rk3588-generic.dts b/arch/arm/dts/rk3588-generic.dts
index e4721d97a87d..baafe7463f1b 100644
--- a/arch/arm/dts/rk3588-generic.dts
+++ b/arch/arm/dts/rk3588-generic.dts
@@ -40,5 +40,6 @@
  };
&uart2 {
+       pinctrl-0 = <&uart2m0_xfer>;

I think this should be its own patch.

[...]
diff --git a/configs/evb-rk3588_defconfig b/configs/evb-rk3588_defconfig
index 68ecbc54b807..610a8d740fbb 100644
--- a/configs/evb-rk3588_defconfig
+++ b/configs/evb-rk3588_defconfig
@@ -33,7 +33,8 @@ CONFIG_CMD_REGULATOR=y
  # CONFIG_SPL_DOS_PARTITION is not set
  CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_LIVE=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent 
assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks 
assigned-clock-rates assigned-clock-parents"
+CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_SPL_REGMAP=y
  CONFIG_SPL_SYSCON=y
  CONFIG_SPL_CLK=y
@@ -52,6 +53,7 @@ CONFIG_DWC_ETH_QOS_ROCKCHIP=y
  CONFIG_PHY_ROCKCHIP_INNO_USB2=y
  CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
  CONFIG_PHY_ROCKCHIP_USBDP=y
+CONFIG_SPL_PINCTRL=y

I have a feeling the changes to the defconfig aren't entirely related to this patch? Specifically, I think at least CONFIG_SPL_DM_SEQ_ALIAS isn't related?

Otherwise,

Reviewed-by: Quentin Schulz <quentin.sch...@theobroma-systems.com>

Thanks,
Quentin

Reply via email to