Skip to contentSkip to conversation

arm64: dts: rk3399-nanopi4: Add u-boot,spl-boot-order

PATCH In review Jagan Teki 4 participants 6 messages May 24, 2020 – May 25, 2020 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/3 arm64: dts: rk3399-nanopi4: Add u-boot,spl-boot-order

Add u-boot,spl-boot-order as sdhci and sdmmc for booting from eMMC and SD card.

---
 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +6 -0
index a126bbaf08..a9d10592d5 100644
@@ -5,6 +5,12 @@
 
 #include "rk3399-u-boot.dtsi"
 
+/{
+	chosen {
+		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
+	};
+};
+
 &sdmmc {
 	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
 };
Signature · 1 line
2.25.1

A message that is not in the archive (sent off-list or not yet received): 20200524173213.201123-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org

author
#2 lore raw

PATCH 2/3 nanopc-t4: Enable USB Gadget

Enable DWC3 core, gadget for nanopc-t4 board.

This would help to use fastboot by default.

---
 configs/nanopc-t4-rk3399_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/nanopc-t4-rk3399_defconfig +3 -0
index 3bb5b498f2..40fb797c49 100644
@@ -50,7 +50,10 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_DWC3=y
+CONFIG_ROCKCHIP_USB2_PHY=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_USB_GADGET=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_ASIX88179=y
Signature · 1 line
2.25.1

A message that is not in the archive (sent off-list or not yet received): 20200524173213.201123-2-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org

Reviewed-by
#4 lore raw

Re: [PATCH 2/3] nanopc-t4: Enable USB Gadget

Quoted 5 lines · Jagan Teki

Enable DWC3 core, gadget for nanopc-t4 board.

This would help to use fastboot by default.

Thanks,
- Kever

Quoted 9 lines
---
  configs/nanopc-t4-rk3399_defconfig | 3 +++
  1 file changed, 3 insertions(+)
configs/nanopc-t4-rk3399_defconfig +0 -0
index 3bb5b498f2..40fb797c49 100644

configs/nanopc-t4-rk3399_defconfig CONFIG_USB_XHCI_HCD=y · line 59

Quoted 10 lines
configs/nanopc-t4-rk3399_defconfig +3 -0
@@ -50,7 +50,10 @@ CONFIG_USB_XHCI_HCD=y
  CONFIG_USB_XHCI_DWC3=y
  CONFIG_USB_EHCI_HCD=y
  CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_DWC3=y
+CONFIG_ROCKCHIP_USB2_PHY=y
  CONFIG_USB_KEYBOARD=y
+CONFIG_USB_GADGET=y
  CONFIG_USB_HOST_ETHER=y
  CONFIG_USB_ETHER_ASIX=y
  CONFIG_USB_ETHER_ASIX88179=y

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#5 lore raw

PATCH 3/3 doc: rockchip: Document eMMC program steps

In reply to Jagan Teki

Document eMMC partition creation and program steps for rockchip platforms.

---
 doc/board/rockchip/rockchip.rst | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
doc/board/rockchip/rockchip.rst +30 -2
index cd9c8d6dc4..1faa675aa8 100644
@@ -117,14 +117,42 @@ To write an image that boots from an SD card (assumed to be /dev/sda)::
         sudo dd if=u-boot-rockchip.bin of=/dev/sda seek=64
         sync
 
+eMMC
+^^^^
+
+eMMC flash would probe on mmc0 in most of the rockchip platforms.
+
+Create GPT partition layout as defined in configurations::
+
+        mmc dev 0
+        gpt write mmc 0 $partitions
+
+Connect the USB-OTG cable between host and target device.
+
+Launch fastboot at target::
+
+        fastboot 0
+
+Upon successful gadget connection,host show the USB device like::
+
+        lsusb
+        Bus 001 Device 020: ID 2207:330c Fuzhou Rockchip Electronics Company RK3399 in Mask ROM mode
+
+Program the flash::
+
+        sudo fastboot -i 0x2207 flash loader1 idbloader.img
+        sudo fastboot -i 0x2207 flash loader2 u-boot.itb
+
+Note: for rockchip 32-bit platforms the U-Boot proper image
+is u-boot-dtb.img
+
 TODO
 ----
 
 - Add rockchip idbloader image building
 - Add rockchip TPL image building
 - Document SPI flash boot
-- Describe steps for eMMC flashing
 - Add missing SoC's with it boards list
 
 .. Jagan Teki <[email protected]>
-.. Fri Jan 10 00:08:40 IST 2020
+.. Sunday 24 May 2020 10:08:41 PM IST
Signature · 1 line
2.25.1
Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] doc: rockchip: Document eMMC program steps

Quoted 4 lines · Jagan Teki

Document eMMC partition creation and program steps for rockchip platforms.

Thanks,
- Kever

Quoted 53 lines
---
  doc/board/rockchip/rockchip.rst | 32 ++++++++++++++++++++++++++++++--
  1 file changed, 30 insertions(+), 2 deletions(-)
doc/board/rockchip/rockchip.rst +30 -2
index cd9c8d6dc4..1faa675aa8 100644
@@ -117,14 +117,42 @@ To write an image that boots from an SD card (assumed to be /dev/sda)::
          sudo dd if=u-boot-rockchip.bin of=/dev/sda seek=64
          sync
 
+eMMC
+^^^^
+
+eMMC flash would probe on mmc0 in most of the rockchip platforms.
+
+Create GPT partition layout as defined in configurations::
+
+        mmc dev 0
+        gpt write mmc 0 $partitions
+
+Connect the USB-OTG cable between host and target device.
+
+Launch fastboot at target::
+
+        fastboot 0
+
+Upon successful gadget connection,host show the USB device like::
+
+        lsusb
+        Bus 001 Device 020: ID 2207:330c Fuzhou Rockchip Electronics Company RK3399 in Mask ROM mode
+
+Program the flash::
+
+        sudo fastboot -i 0x2207 flash loader1 idbloader.img
+        sudo fastboot -i 0x2207 flash loader2 u-boot.itb
+
+Note: for rockchip 32-bit platforms the U-Boot proper image
+is u-boot-dtb.img
+
  TODO
  ----
 
  - Add rockchip idbloader image building
  - Add rockchip TPL image building
  - Document SPI flash boot
-- Describe steps for eMMC flashing
  - Add missing SoC's with it boards list
 
  .. Jagan Teki <[email protected]>
-.. Fri Jan 10 00:08:40 IST 2020
+.. Sunday 24 May 2020 10:08:41 PM IST
Reviewed-by on v1 1/3
#7 lore raw

Re: [PATCH 1/3] arm64: dts: rk3399-nanopi4: Add u-boot, spl-boot-order

In reply to Jagan Teki
Quoted 4 lines · Jagan Teki

Add u-boot,spl-boot-order as sdhci and sdmmc for booting from eMMC and SD card.

Thanks,
- Kever

Quoted 21 lines
---
  arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 6 ++++++
  1 file changed, 6 insertions(+)
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +6 -0
index a126bbaf08..a9d10592d5 100644
@@ -5,6 +5,12 @@
 
  #include "rk3399-u-boot.dtsi"
 
+/{
+	chosen {
+		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
+	};
+};
+
  &sdmmc {
  	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
  };