Skip to contentSkip to conversation

RK3399: Add support for Ficus board

PATCH Superseded Ezequiel Garcia 4 participants 22 messages Jul 16, 2018 – Jul 27, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover RK3399: Add support for Ficus board

Add support for a new RK3399-based board. The RK3399 Ficus board is an Enterprise Edition board manufactured by Vamrs Ltd., based on the Rockchip RK3399 SoC.

While here, we extend the evb_rk3399/README document with instructions for SD/MMC boot.

The devicetree file for this board has been already merged in Linux maintainer's tree:

https://kernel.googlesource.com/pub/scm/linux/kernel/git/mmind/linux-rockchip/+/v4.19-armsoc/dts64/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts

Ezequiel Garcia (2):
ARM: add RK3399 Ficus board
rockchip: rk3399: Add more instructions to the README

Randy Li (1):
arm: dts: rockchip: add some common pin-settings to rk3399

 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
 arch/arm/dts/rk3399.dtsi         |  55 ++-
 board/rockchip/evb_rk3399/README |  57 +++-
 configs/ficus-rk3399_defconfig   |  71 ++++
 5 files changed, 740 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm/dts/rk3399-ficus.dts
 create mode 100644 configs/ficus-rk3399_defconfig
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/3 arm: dts: rockchip: add some common pin-settings to rk3399

From: Randy Li <[email protected]>

Those pins would be used by many boards.

---
 arch/arm/dts/rk3399.dtsi | 55 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 6 deletions(-)
arch/arm/dts/rk3399.dtsi +49 -6
index 83c257b1228b..8349451b03dc 100644
@@ -1602,19 +1602,49 @@
 			drive-strength = <12>;
 		};
 
+		pcfg_pull_none_13ma: pcfg-pull-none-13ma {
+			bias-disable;
+			drive-strength = <13>;
+		};
+
+		pcfg_pull_none_18ma: pcfg-pull-none-18ma {
+			bias-disable;
+			drive-strength = <18>;
+		};
+
+		pcfg_pull_none_20ma: pcfg-pull-none-20ma {
+			bias-disable;
+			drive-strength = <20>;
+		};
+
+		pcfg_pull_up_2ma: pcfg-pull-up-2ma {
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
 		pcfg_pull_up_8ma: pcfg-pull-up-8ma {
 			bias-pull-up;
 			drive-strength = <8>;
 		};
 
+		pcfg_pull_up_18ma: pcfg-pull-up-18ma {
+			bias-pull-up;
+			drive-strength = <18>;
+		};
+
+		pcfg_pull_up_20ma: pcfg-pull-up-20ma {
+			bias-pull-up;
+			drive-strength = <20>;
+		};
+
 		pcfg_pull_down_4ma: pcfg-pull-down-4ma {
 			bias-pull-down;
 			drive-strength = <4>;
 		};
 
-		pcfg_pull_up_2ma: pcfg-pull-up-2ma {
-			bias-pull-up;
-			drive-strength = <2>;
+		pcfg_pull_down_8ma: pcfg-pull-down-8ma {
+			bias-pull-down;
+			drive-strength = <8>;
 		};
 
 		pcfg_pull_down_12ma: pcfg-pull-down-12ma {
@@ -1622,9 +1652,22 @@
 			drive-strength = <12>;
 		};
 
-		pcfg_pull_none_13ma: pcfg-pull-none-13ma {
-			bias-disable;
-			drive-strength = <13>;
+		pcfg_pull_down_18ma: pcfg-pull-down-18ma {
+			bias-pull-down;
+			drive-strength = <18>;
+		};
+
+		pcfg_pull_down_20ma: pcfg-pull-down-20ma {
+			bias-pull-down;
+			drive-strength = <20>;
+		};
+
+		pcfg_output_high: pcfg-output-high {
+			output-high;
+		};
+
+		pcfg_output_low: pcfg-output-low {
+			output-low;
 		};
 
 		clock {
Signature · 1 line
2.18.0
#2 lore raw

PATCH 1/3 arm: dts: rockchip: add some common pin-settings to rk3399

Quoted 10 lines · Ezequiel Garcia

From: Randy Li <[email protected]>

Those pins would be used by many boards.

---
 arch/arm/dts/rk3399.dtsi | 55 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 6 deletions(-)
#3 lore raw

PATCH 1/3 arm: dts: rockchip: add some common pin-settings to rk3399

In reply to Ezequiel Garcia
Quoted 3 lines · Ezequiel Garcia

From: Randy Li <[email protected]>

Those pins would be used by many boards.

The Rockchip pinctrl driver in U-Boot does not (yet) read the DTS for pin configuration information.

Is this a sync of the Linux DTS (which seems unlikely, as I'd expect more changes) or why are we doing this as part of this series?

Quoted 93 lines

---
arch/arm/dts/rk3399.dtsi | 55 +++++++++++++++++++++++++++++++++++-----

1 file changed, 49 insertions(+), 6 deletions(-)
arch/arm/dts/rk3399.dtsi +49 -6
index 83c257b1228b..8349451b03dc 100644
@@ -1602,19 +1602,49 @@
 			drive-strength = <12>;
 		};
 
+		pcfg_pull_none_13ma: pcfg-pull-none-13ma {
+			bias-disable;
+			drive-strength = <13>;
+		};
+
+		pcfg_pull_none_18ma: pcfg-pull-none-18ma {
+			bias-disable;
+			drive-strength = <18>;
+		};
+
+		pcfg_pull_none_20ma: pcfg-pull-none-20ma {
+			bias-disable;
+			drive-strength = <20>;
+		};
+
+		pcfg_pull_up_2ma: pcfg-pull-up-2ma {
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
 		pcfg_pull_up_8ma: pcfg-pull-up-8ma {
 			bias-pull-up;
 			drive-strength = <8>;
 		};
 
+		pcfg_pull_up_18ma: pcfg-pull-up-18ma {
+			bias-pull-up;
+			drive-strength = <18>;
+		};
+
+		pcfg_pull_up_20ma: pcfg-pull-up-20ma {
+			bias-pull-up;
+			drive-strength = <20>;
+		};
+
 		pcfg_pull_down_4ma: pcfg-pull-down-4ma {
 			bias-pull-down;
 			drive-strength = <4>;
 		};
 
-		pcfg_pull_up_2ma: pcfg-pull-up-2ma {
-			bias-pull-up;
-			drive-strength = <2>;
+		pcfg_pull_down_8ma: pcfg-pull-down-8ma {
+			bias-pull-down;
+			drive-strength = <8>;
 		};
 
 		pcfg_pull_down_12ma: pcfg-pull-down-12ma {
@@ -1622,9 +1652,22 @@
 			drive-strength = <12>;
 		};
 
-		pcfg_pull_none_13ma: pcfg-pull-none-13ma {
-			bias-disable;
-			drive-strength = <13>;
+		pcfg_pull_down_18ma: pcfg-pull-down-18ma {
+			bias-pull-down;
+			drive-strength = <18>;
+		};
+
+		pcfg_pull_down_20ma: pcfg-pull-down-20ma {
+			bias-pull-down;
+			drive-strength = <20>;
+		};
+
+		pcfg_output_high: pcfg-output-high {
+			output-high;
+		};
+
+		pcfg_output_low: pcfg-output-low {
+			output-low;
 		};
 
 		clock {
#4 lore raw

PATCH 1/3 arm: dts: rockchip: add some common pin-settings to rk3399

Quoted 5 lines · Philipp Tomsich
Quoted 2 lines · Ezequiel Garcia

From: Randy Li <[email protected]>

Quoted 8 lines
Quoted 1 line

Those pins would be used by many boards.

The Rockchip pinctrl driver in U-Boot does not (yet) read the DTS for pin configuration information.

Is this a sync of the Linux DTS (which seems unlikely, as I'd expect more changes) or why are we doing this as part of this series?

As a matter of fact, it is a sync. It is literally this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.19-armsoc/dts64&id=b41023282d07b61a53e2c9b9508912b1e7ce7b4f

It's just needed so that at least the ficus.dts file compiles.

Thanks,
Eze

#5 lore raw

PATCH 1/3 arm: dts: rockchip: add some common pin-settings to rk3399

Quoted 18 lines · Ezequiel Garcia
Quoted 5 lines · Philipp Tomsich
Quoted 2 lines · Ezequiel Garcia

From: Randy Li <[email protected]>

Quoted 8 lines
Quoted 1 line

Those pins would be used by many boards.

The Rockchip pinctrl driver in U-Boot does not (yet) read the DTS for pin configuration information.

Is this a sync of the Linux DTS (which seems unlikely, as I'd expect more changes) or why are we doing this as part of this series?

Quoted 8 lines

As a matter of fact, it is a sync. It is literally this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.19-armsoc/dts64&id=b41023282d07b61a53e2c9b9508912b1e7ce7b4f

It's just needed so that at least the ficus.dts file compiles.

Thanks,
Eze

#6 lore raw

PATCH 1/3 arm: dts: rockchip: add some common pin-settings to rk3399

In reply to Ezequiel Garcia
Quoted 4 lines

From: Randy Li <[email protected]>

Those pins would be used by many boards.

Quoted 9 lines
---
 arch/arm/dts/rk3399.dtsi | 55 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 6 deletions(-)
#7 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

In reply to Ezequiel Garcia

This commit adds support for RK3399 Ficus board,
aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

---
 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
 board/rockchip/evb_rk3399/README |   2 +
 configs/ficus-rk3399_defconfig   |  71 ++++
 4 files changed, 638 insertions(+)
 create mode 100644 arch/arm/dts/rk3399-ficus.dts
 create mode 100644 configs/ficus-rk3399_defconfig
arch/arm/dts/Makefile +1 -0
index 946023093df6..fbce68d9a2eb 100644
@@ -47,6 +47,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3368-geekbox.dtb \
 	rk3368-px5-evb.dtb \
 	rk3399-evb.dtb \
+	rk3399-ficus.dtb \
 	rk3399-firefly.dtb \
 	rk3399-puma-ddr1333.dtb \
 	rk3399-puma-ddr1600.dtb \
arch/arm/dts/rk3399-ficus.dts new file +564 -0

564 lines not on this page · raw message

board/rockchip/evb_rk3399/README +2 -0
index ada8ca7f3c15..0b4c6d19ad39 100644
@@ -57,6 +57,8 @@ Compile the U-Boot
   > make evb-rk3399_defconfig
   for firefly-rk3399, use below instead:
   > make firefly-rk3399_defconfig
+  for ficus-rk3399, use below instead:
+  > make ficus-rk3399_defconfig
   > make
   > make u-boot.itb
 
configs/ficus-rk3399_defconfig new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
2.18.0
#8 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

Quoted 9 lines · Ezequiel Garcia

This commit adds support for RK3399 Ficus board,
aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 8 lines
---
 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
 board/rockchip/evb_rk3399/README |   2 +
 configs/ficus-rk3399_defconfig   |  71 ++++
 4 files changed, 638 insertions(+)
 create mode 100644 arch/arm/dts/rk3399-ficus.dts
 create mode 100644 configs/ficus-rk3399_defconfig
#9 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

In reply to Ezequiel Garcia
Quoted 10 lines

This commit adds support for RK3399 Ficus board,
aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 9 lines
---
 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
 board/rockchip/evb_rk3399/README |   2 +
 configs/ficus-rk3399_defconfig   |  71 ++++
 4 files changed, 638 insertions(+)
 create mode 100644 arch/arm/dts/rk3399-ficus.dts
 create mode 100644 configs/ficus-rk3399_defconfig
#10 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

In reply to Ezequiel Garcia
Quoted 11 lines

This commit adds support for RK3399 Ficus board, aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 9 lines
---
 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
 board/rockchip/evb_rk3399/README |   2 +
 configs/ficus-rk3399_defconfig   |  71 ++++
 4 files changed, 638 insertions(+)
 create mode 100644 arch/arm/dts/rk3399-ficus.dts
 create mode 100644 configs/ficus-rk3399_defconfig
#11 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

Ezequiel,

This series breaks the build (see https://travis-ci.org/ptomsich/u-boot-rockchip/builds/406351695).
Did you test with Travis prior to submitting?

When you revise, I’d also prefer a ‘rockchip:’ and a ‘board:’ tag over the ARM tag …

Thanks,
Philipp.

Quoted 28 lines · Philipp Tomsich
Quoted 12 lines

This commit adds support for RK3399 Ficus board, aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 9 lines

---

arch/arm/dts/Makefile            |   1 +
arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
board/rockchip/evb_rk3399/README |   2 +
configs/ficus-rk3399_defconfig   |  71 ++++
4 files changed, 638 insertions(+)

create mode 100644 arch/arm/dts/rk3399-ficus.dts create mode 100644 configs/ficus-rk3399_defconfig

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#12 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

Quoted 5 lines · Dr. Philipp Tomsich

Ezequiel,

This series breaks the build (see https://travis-ci.org/ptomsich/u-boot-rockchip/builds/406351695).
Did you test with Travis prior to submitting?

No, I haven't. It's quite odd, as the README patch just adds some documentation. I am having a hard time figuring out how could it break the build, and I do not see any logs in the travis-ci link either.

Any ideas?

Quoted 2 lines

When you revise, I’d also prefer a ‘rockchip:’ and a ‘board:’ tag over the ARM tag …

OK, I will.

Quoted 34 lines

Thanks,
Philipp.

Quoted 28 lines · Philipp Tomsich
Quoted 12 lines

This commit adds support for RK3399 Ficus board, aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 9 lines

---

arch/arm/dts/Makefile            |   1 +
arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
board/rockchip/evb_rk3399/README |   2 +
configs/ficus-rk3399_defconfig   |  71 ++++
4 files changed, 638 insertions(+)

create mode 100644 arch/arm/dts/rk3399-ficus.dts create mode 100644 configs/ficus-rk3399_defconfig

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#13 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

Ezequiel,

Quoted 10 lines · Ezequiel Garcia
Quoted 5 lines · Dr. Philipp Tomsich

Ezequiel,

This series breaks the build (see https://travis-ci.org/ptomsich/u-boot-rockchip/builds/406351695).
Did you test with Travis prior to submitting?

No, I haven't. It's quite odd, as the README patch just adds some documentation.

I responded to this mail, as there’s no cover letter. It’s the series breaking the build, not the README change.

Quoted 2 lines

I am having a hard time figuring out how could it break the build, and I do not see any logs in the travis-ci link either.

Does the direct link to the line with the error work for you:

	https://travis-ci.org/ptomsich/u-boot-rockchip/jobs/406351815#L1330

If not, I’ll have to copy this into a mail manually...

Quoted 43 lines

Any ideas?

Quoted 2 lines

When you revise, I’d also prefer a ‘rockchip:’ and a ‘board:’ tag over the ARM tag …

OK, I will.

Quoted 34 lines

Thanks,
Philipp.

Quoted 28 lines · Philipp Tomsich
Quoted 12 lines

This commit adds support for RK3399 Ficus board, aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 9 lines

---

arch/arm/dts/Makefile            |   1 +
arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
board/rockchip/evb_rk3399/README |   2 +
configs/ficus-rk3399_defconfig   |  71 ++++
4 files changed, 638 insertions(+)

create mode 100644 arch/arm/dts/rk3399-ficus.dts create mode 100644 configs/ficus-rk3399_defconfig

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#14 lore raw

PATCH 2/3 ARM: add RK3399 Ficus board

Quoted 16 lines · Dr. Philipp Tomsich

Ezequiel,

Quoted 10 lines · Ezequiel Garcia
Quoted 5 lines · Dr. Philipp Tomsich

Ezequiel,

This series breaks the build (see https://travis-ci.org/ptomsich/u-boot-rockchip/builds/406351695).
Did you test with Travis prior to submitting?

No, I haven't. It's quite odd, as the README patch just adds some documentation.

I responded to this mail, as there’s no cover letter. It’s the series breaking the build, not the README change.

Quoted 8 lines
Quoted 2 lines

I am having a hard time figuring out how could it break the build, and I do not see any logs in the travis-ci link either.

Does the direct link to the line with the error work for you:

        https://travis-ci.org/ptomsich/u-boot-rockchip/jobs/406351815#L1330

If not, I’ll have to copy this into a mail manually...

Right, I see it now. Thanks!

+drivers/usb/phy/rockchip_usb2_phy.c: In function 'property_enable':
+arch/arm/include/asm/io.h:49:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
+ #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
+ ^
+arch/arm/include/asm/io.h:117:48: note: in expansion of macro '__arch_putl'
+ #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
+ ^~~~~~~~~~~
+drivers/usb/phy/rockchip_usb2_phy.c:61:2: note: in expansion of macro 'writel'
+ writel(val, pdata->regs_phy + reg->offset);
+ ^~~~~~

So, it seems that since the defconfig is enabling this USB PHY driver, it's causing
the failure.

I'll see if I can fix this issue and send a patch, but it seems totally orthogonal to the Ficus
patchset.

Quoted 48 lines
Quoted 43 lines

Any ideas?

Quoted 2 lines

When you revise, I’d also prefer a ‘rockchip:’ and a ‘board:’ tag over the ARM tag …

OK, I will.

Quoted 34 lines

Thanks,
Philipp.

Quoted 28 lines · Philipp Tomsich
Quoted 12 lines

This commit adds support for RK3399 Ficus board, aka ROCK960 Enterprise Edition.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Quoted 9 lines

---

arch/arm/dts/Makefile            |   1 +
arch/arm/dts/rk3399-ficus.dts    | 564 +++++++++++++++++++++++++++++++
board/rockchip/evb_rk3399/README |   2 +
configs/ficus-rk3399_defconfig   |  71 ++++
4 files changed, 638 insertions(+)

create mode 100644 arch/arm/dts/rk3399-ficus.dts create mode 100644 configs/ficus-rk3399_defconfig

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Signature · 2 lines
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
#15 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

In reply to Ezequiel Garcia

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

---
 board/rockchip/evb_rk3399/README | 55 ++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)
board/rockchip/evb_rk3399/README +53 -2
index 0b4c6d19ad39..3775d3ff447f 100644
@@ -1,3 +1,21 @@
+Contents
+========
+
+1. Introduction
+2. Get the Source and prebuild binary
+3. Compile the ATF
+4. Compile the U-Boot
+5. Compile the rkdeveloptool
+6. Package the image
+   6.1. Package the image for U-Boot SPL(option 1)
+   6.2. Package the image for Rockchip miniloader(option 2)
+7. Bootloader storage options
+8. Flash the image to eMMC
+   8.1. Flash the image with U-Boot SPL(option 1)
+   8.2. Flash the image with Rockchip miniloader(option 2)
+9. Create a bootable SD/MMC
+10. And that is it
+
 Introduction
 ============
 
@@ -97,6 +115,12 @@ Package the image for Rockchip miniloader(option 2)
 
   Get trust.img and uboot.img in this step.
 
+Bootloader storage options
+==========================
+
+There are a few different storage options for the bootloader.
+This document explores two of these: eMMC and removable SD/MMC.
+
 Flash the image to eMMC
 =======================
 
@@ -117,6 +141,33 @@ Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
   > rkdeveloptool wl 0x6000 u-boot/trust.img
   > rkdeveloptool rd
 
+Create a bootable SD/MMC
+========================
+
+The idbspl.img contains the first stage, and the u-boot.img the second stage.
+As explained in the Rockchip partition table reference [2], the first stage
+(aka loader1) start sector is 64, and the second stage start sector is 16384.
+
+Each sector is 512 bytes, which means the first stage offset is 32 KiB,
+and the second stage offset is 8 MiB.
+
+Note: the second stage location is actually not as per the spec,
+but defined by the SPL. Mainline SPL defines an 8 MiB offset for the second
+stage.
+
+Assuming the SD card is exposed by device /dev/mmcblk0, the commands
+to write the two stages are:
+
+  > dd if=idbspl.img of=/dev/mmcblk0 bs=1k seek=32
+  > dd if=u-boot.itb of=/dev/mmcblk0 bs=1k seek=8192
+
+Setting up the kernel and rootfs is beyond the scope of this document.
+
+And that is it
+==============
+
 You should be able to get U-Boot log in console/UART2(baurdrate 1500000)
-For more detail, please reference to:
-http://opensource.rock-chips.com/wiki_Boot_option
+For more detail, please reference [2].
+
+[1] http://opensource.rock-chips.com/wiki_Partitions
+[2] http://opensource.rock-chips.com/wiki_Boot_option
Signature · 1 line
2.18.0
#16 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

Quoted 7 lines · Ezequiel Garcia

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

---
 board/rockchip/evb_rk3399/README | 55 ++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

Hmm, we should convert all of rockchip to use binman I think.

- Simon

#17 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

Quoted 4 lines · Simon Glass
Quoted 3 lines · Ezequiel Garcia

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

Quoted 9 lines
Quoted 4 lines
---
 board/rockchip/evb_rk3399/README | 55 ++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

Hmm, we should convert all of rockchip to use binman I think.

Yeah, that would be sweet.

#18 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

In reply to Ezequiel Garcia
Quoted 2 lines · Ezequiel Garcia

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

Are any of these instructions Ficus-specific? We have our own README for our own boards, as these have different instructions from the EVB boards.

Just wondering, as I'd have expected this to come in as part of the ficus board-directory...

Quoted 2 lines
Quoted 80 lines

---
board/rockchip/evb_rk3399/README | 55 ++++++++++++++++++++++++++++++--

1 file changed, 53 insertions(+), 2 deletions(-)
board/rockchip/evb_rk3399/README +18 -0
index 0b4c6d19ad39..3775d3ff447f 100644
@@ -1,3 +1,21 @@
+Contents
+========
+
+1. Introduction
+2. Get the Source and prebuild binary
+3. Compile the ATF
+4. Compile the U-Boot
+5. Compile the rkdeveloptool
+6. Package the image
+   6.1. Package the image for U-Boot SPL(option 1)
+   6.2. Package the image for Rockchip miniloader(option 2)
+7. Bootloader storage options
+8. Flash the image to eMMC
+   8.1. Flash the image with U-Boot SPL(option 1)
+   8.2. Flash the image with Rockchip miniloader(option 2)
+9. Create a bootable SD/MMC
+10. And that is it
+

Introduction
============

board/rockchip/evb_rk3399/README +6 -0
@@ -97,6 +115,12 @@ Package the image for Rockchip miniloader(option 2)
 
  Get trust.img and uboot.img in this step.
 
+Bootloader storage options
+==========================
+
+There are a few different storage options for the bootloader.
+This document explores two of these: eMMC and removable SD/MMC.
+

Flash the image to eMMC
=======================

board/rockchip/evb_rk3399/README +29 -2
@@ -117,6 +141,33 @@ Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
  > rkdeveloptool wl 0x6000 u-boot/trust.img
  > rkdeveloptool rd
 
+Create a bootable SD/MMC
+========================
+
+The idbspl.img contains the first stage, and the u-boot.img the second stage.
+As explained in the Rockchip partition table reference [2], the first stage
+(aka loader1) start sector is 64, and the second stage start sector is 16384.
+
+Each sector is 512 bytes, which means the first stage offset is 32 KiB,
+and the second stage offset is 8 MiB.
+
+Note: the second stage location is actually not as per the spec,
+but defined by the SPL. Mainline SPL defines an 8 MiB offset for the second
+stage.
+
+Assuming the SD card is exposed by device /dev/mmcblk0, the commands
+to write the two stages are:
+
+  > dd if=idbspl.img of=/dev/mmcblk0 bs=1k seek=32
+  > dd if=u-boot.itb of=/dev/mmcblk0 bs=1k seek=8192
+
+Setting up the kernel and rootfs is beyond the scope of this document.
+
+And that is it
+==============
+
 You should be able to get U-Boot log in console/UART2(baurdrate 1500000)
-For more detail, please reference to:
-http://opensource.rock-chips.com/wiki_Boot_option
+For more detail, please reference [2].
+
+[1] http://opensource.rock-chips.com/wiki_Partitions
+[2] http://opensource.rock-chips.com/wiki_Boot_option
#19 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

Quoted 9 lines · Philipp Tomsich
Quoted 2 lines · Ezequiel Garcia

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

Are any of these instructions Ficus-specific? We have our own README for our own boards, as these have different instructions from the EVB boards.

Nope, it applies to any rk3399 board. And the rest of the file as well, as long as the board has eMMC.

Quoted 3 lines

Just wondering, as I'd have expected this to come in as part of the ficus board-directory...

Yeah, but all the instructions on this file applied to the Ficus (and to many others) so I decided to just extend it for now.

If it needs moving to some generic doc, I think we can do that as a follow up patch.

Quoted 5 lines
Quoted 2 lines

Thanks for the review!
Eze

#20 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

Thanks for the clarification, I’ll take this as-is.

Quoted 33 lines · Ezequiel Garcia
Quoted 9 lines · Philipp Tomsich
Quoted 2 lines · Ezequiel Garcia

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

Are any of these instructions Ficus-specific? We have our own README for our own boards, as these have different instructions from the EVB boards.

Nope, it applies to any rk3399 board. And the rest of the file as well, as long as the board has eMMC.

Quoted 3 lines

Just wondering, as I'd have expected this to come in as part of the ficus board-directory...

Yeah, but all the instructions on this file applied to the Ficus (and to many others) so I decided to just extend it for now.

If it needs moving to some generic doc, I think we can do that as a follow up patch.

Quoted 5 lines
Quoted 2 lines

Thanks for the review!
Eze

#21 lore raw

PATCH 3/3 rockchip: rk3399: Add more instructions to the README

In reply to Ezequiel Garcia
Quoted 10 lines

This commit adds a content section and also instructions on how to create a bootable SD/MMC device for RK3399 boards.

---
 board/rockchip/evb_rk3399/README | 55 ++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)