Skip to contentSkip to conversation

ARM: dts: rk3588-rock-5b-u-boot: add u-boot, dm-spl to pinctrl for sdmmc

PATCH Superseded Eugen Hristev 2 participants 6 messages Mar 17, 2023 – Apr 17, 2023 Arm (32-bit)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ARM: dts: rk3588-rock-5b-u-boot: add u-boot, dm-spl to pinctrl for sdmmc

To be able to initialize the pinctrl correctly at SPL level and read u-boot proper from SD-Card, the pinctrl must be initialized.

---
Changes in v2:
- add u-boot,dm-spl to pull up nodes, to also setup the pull control correctly. Also, in the loop that initializes multiple pins, only the first will be muxed as the loop will break when the pull up node is not found.

 arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 26 +++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +26 -0
index e1d240baf35d..a9d506ba6515 100644
@@ -124,6 +124,8 @@
 };
 
 &pinctrl {
+	u-boot,dm-spl;
+
 	usb {
 		vcc5v0_host_en: vcc5v0-host-en {
 			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -131,6 +133,30 @@
 	};
 };
 
+&pcfg_pull_up_drv_level_2 {
+	u-boot,dm-spl;
+};
+
+&pcfg_pull_up {
+	u-boot,dm-spl;
+};
+
+&sdmmc_bus4 {
+	u-boot,dm-spl;
+};
+
+&sdmmc_clk {
+	u-boot,dm-spl;
+};
+
+&sdmmc_cmd {
+	u-boot,dm-spl;
+};
+
+&sdmmc_det {
+	u-boot,dm-spl;
+};
+
 &usb_host0_ehci {
 	companion = <&usb_host0_ohci>;
 	phys = <&u2phy2_host>;
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 2/2 configs: rockchip: rock5b-rk3588: add pinctrl to SPL

Add pinctrl driver in SPL. Do not remove pinctrl properties for SPL dtb.

---
 configs/rock5b-rk3588_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configs/rock5b-rk3588_defconfig +2 -1
index 86acb6da4306..6ae57874c4d5 100644
@@ -48,7 +48,7 @@ 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_REGMAP=y
 CONFIG_SPL_SYSCON=y
 CONFIG_SPL_CLK=y
@@ -65,6 +65,7 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_SPL_PINCTRL=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_PWM_ROCKCHIP=y
Signature · 1 line
2.34.1
Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] configs: rockchip: rock5b-rk3588: add pinctrl to SPL

Quoted 3 lines · Eugen Hristev

Add pinctrl driver in SPL. Do not remove pinctrl properties for SPL dtb.

Thanks,
- Kever

Quoted 25 lines
---
  configs/rock5b-rk3588_defconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
configs/rock5b-rk3588_defconfig +2 -1
index 86acb6da4306..6ae57874c4d5 100644
@@ -48,7 +48,7 @@ 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_REGMAP=y
  CONFIG_SPL_SYSCON=y
  CONFIG_SPL_CLK=y
@@ -65,6 +65,7 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y
  CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_SPL_PINCTRL=y
  CONFIG_REGULATOR_PWM=y
  CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_PWM_ROCKCHIP=y
Reviewed-by on v2 1/2
#3 lore raw
In reply to Eugen Hristev
Quoted 4 lines · Eugen Hristev

To be able to initialize the pinctrl correctly at SPL level and read u-boot proper from SD-Card, the pinctrl must be initialized.

Thanks,
- Kever

Quoted 54 lines

---
Changes in v2:
- add u-boot,dm-spl to pull up nodes, to also setup the pull control correctly. Also, in the loop that initializes multiple pins, only the first will be muxed as the loop will break when the pull up node is not found.

  arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 26 +++++++++++++++++++++++++
  1 file changed, 26 insertions(+)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +26 -0
index e1d240baf35d..a9d506ba6515 100644
@@ -124,6 +124,8 @@
  };
 
  &pinctrl {
+	u-boot,dm-spl;
+
  	usb {
  		vcc5v0_host_en: vcc5v0-host-en {
  			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -131,6 +133,30 @@
  	};
  };
 
+&pcfg_pull_up_drv_level_2 {
+	u-boot,dm-spl;
+};
+
+&pcfg_pull_up {
+	u-boot,dm-spl;
+};
+
+&sdmmc_bus4 {
+	u-boot,dm-spl;
+};
+
+&sdmmc_clk {
+	u-boot,dm-spl;
+};
+
+&sdmmc_cmd {
+	u-boot,dm-spl;
+};
+
+&sdmmc_det {
+	u-boot,dm-spl;
+};
+
  &usb_host0_ehci {
  	companion = <&usb_host0_ohci>;
  	phys = <&u2phy2_host>;
#4 lore raw
Quoted 8 lines · Kever Yang
Quoted 4 lines · Eugen Hristev

To be able to initialize the pinctrl correctly at SPL level and read u-boot proper from SD-Card, the pinctrl must be initialized.

Hi Kever,

The properties must be changed to bootph, I will update and send a new version.

Eugen

Quoted 54 lines

Thanks,
- Kever

Quoted 52 lines

---
Changes in v2:
- add u-boot,dm-spl to pull up nodes, to also setup the pull control correctly. Also, in the loop that initializes multiple pins, only the first will be muxed as the loop will break when the pull up node is not found.

  arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 26 +++++++++++++++++++++++++

  1 file changed, 26 insertions(+)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +26 -0
index e1d240baf35d..a9d506ba6515 100644
@@ -124,6 +124,8 @@
   };
   &pinctrl {
+    u-boot,dm-spl;
+
       usb {
           vcc5v0_host_en: vcc5v0-host-en {
               rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -131,6 +133,30 @@
       };
   };
+&pcfg_pull_up_drv_level_2 {
+    u-boot,dm-spl;
+};
+
+&pcfg_pull_up {
+    u-boot,dm-spl;
+};
+
+&sdmmc_bus4 {
+    u-boot,dm-spl;
+};
+
+&sdmmc_clk {
+    u-boot,dm-spl;
+};
+
+&sdmmc_cmd {
+    u-boot,dm-spl;
+};
+
+&sdmmc_det {
+    u-boot,dm-spl;
+};
+
   &usb_host0_ehci {
       companion = <&usb_host0_ohci>;
       phys = <&u2phy2_host>;
#5 lore raw
Quoted 6 lines · Eugen Hristev
Quoted 5 lines · Kever Yang
Quoted 3 lines · Eugen Hristev

To be able to initialize the pinctrl correctly at SPL level and read u-boot proper from SD-Card, the pinctrl must be initialized.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Hi Kever,

The properties must be changed to bootph, I will update and send a new version.

Yes, the u-boot,dm-spl has migrate to bootph.

Thanks,

- Kever

Quoted 59 lines

Eugen

Quoted 55 lines

Thanks,
- Kever

Quoted 53 lines

---
Changes in v2:
- add u-boot,dm-spl to pull up nodes, to also setup the pull control correctly. Also, in the loop that initializes multiple pins, only the first will be muxed as the loop will break when the pull up node is not found.

  arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 26
+++++++++++++++++++++++++

  1 file changed, 26 insertions(+)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +26 -0
index e1d240baf35d..a9d506ba6515 100644
@@ -124,6 +124,8 @@
   };
   &pinctrl {
+    u-boot,dm-spl;
+
       usb {
           vcc5v0_host_en: vcc5v0-host-en {
               rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -131,6 +133,30 @@
       };
   };
+&pcfg_pull_up_drv_level_2 {
+    u-boot,dm-spl;
+};
+
+&pcfg_pull_up {
+    u-boot,dm-spl;
+};
+
+&sdmmc_bus4 {
+    u-boot,dm-spl;
+};
+
+&sdmmc_clk {
+    u-boot,dm-spl;
+};
+
+&sdmmc_cmd {
+    u-boot,dm-spl;
+};
+
+&sdmmc_det {
+    u-boot,dm-spl;
+};
+
   &usb_host0_ehci {
       companion = <&usb_host0_ohci>;
       phys = <&u2phy2_host>;