[U-Boot,12/15] rockchip: board: puma-rk3399: update .its file to use new features

Message ID 1505330989-25602-13-git-send-email-philipp.tomsich@theobroma-systems.com
State Accepted
Delegated to: Philipp Tomsich
Headers show
Series
  • [U-Boot,01/15] image: add IH_OS_ARM_TRUSTED_FIRMWARE for ARM Trusted Firmware
Related show

Commit Message

Philipp Tomsich Sept. 13, 2017, 7:29 p.m.
This commit updates the .its file for the RK3399-Q7 to use the new
features and demonstrates how to use those:
 * it marks the ATF as the 'firmware'
 * it tracks the OS-type for U-Boot and ATF
 * it loads the PMU (M0) firmware to DRAM and records the location
   to /fit-images (where our ATF reads it from)

With the handoff of the next-stage FDT to ATF in place, we can now use
this to pass information about the load addresses and names of each
loadables to ATF: now we can load the M0 firmware into DRAM and avoid
overwriting parts of the SPL stage.  This is achieved by changing our
.its-file to use an available area of DRAM as the load-address.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---

 board/theobroma-systems/puma_rk3399/fit_spl_atf.its | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Comments

Simon Glass Sept. 17, 2017, 5:54 p.m. | #1
On 13 September 2017 at 13:29, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> This commit updates the .its file for the RK3399-Q7 to use the new
> features and demonstrates how to use those:
>  * it marks the ATF as the 'firmware'
>  * it tracks the OS-type for U-Boot and ATF
>  * it loads the PMU (M0) firmware to DRAM and records the location
>    to /fit-images (where our ATF reads it from)
>
> With the handoff of the next-stage FDT to ATF in place, we can now use
> this to pass information about the load addresses and names of each
> loadables to ATF: now we can load the M0 firmware into DRAM and avoid
> overwriting parts of the SPL stage.  This is achieved by changing our
> .its-file to use an available area of DRAM as the load-address.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
>  board/theobroma-systems/puma_rk3399/fit_spl_atf.its | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Philipp Tomsich Nov. 23, 2017, 2:51 p.m. | #2
> This commit updates the .its file for the RK3399-Q7 to use the new
> features and demonstrates how to use those:
>  * it marks the ATF as the 'firmware'
>  * it tracks the OS-type for U-Boot and ATF
>  * it loads the PMU (M0) firmware to DRAM and records the location
>    to /fit-images (where our ATF reads it from)
> 
> With the handoff of the next-stage FDT to ATF in place, we can now use
> this to pass information about the load addresses and names of each
> loadables to ATF: now we can load the M0 firmware into DRAM and avoid
> overwriting parts of the SPL stage.  This is achieved by changing our
> .its-file to use an available area of DRAM as the load-address.
> 
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  board/theobroma-systems/puma_rk3399/fit_spl_atf.its | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 

Applied to u-boot-rockchip, thanks!

Patch

diff --git a/board/theobroma-systems/puma_rk3399/fit_spl_atf.its b/board/theobroma-systems/puma_rk3399/fit_spl_atf.its
index 520f846..cb7d92f 100644
--- a/board/theobroma-systems/puma_rk3399/fit_spl_atf.its
+++ b/board/theobroma-systems/puma_rk3399/fit_spl_atf.its
@@ -17,6 +17,7 @@ 
 			description = "U-Boot (64-bit)";
 			data = /incbin/("../../../u-boot-nodtb.bin");
 			type = "standalone";
+			os = "U-Boot";
 			arch = "arm64";
 			compression = "none";
 			load = <0x00200000>;
@@ -26,16 +27,17 @@ 
 			data = /incbin/("../../../bl31-rk3399.bin");
 			type = "firmware";
 			arch = "arm64";
+			os = "arm-trusted-firmware";
 			compression = "none";
-			load = <0x00001000>;
-			entry = <0x00001000>;
+			load = <0x1000>;
+			entry = <0x1000>;
 		};
 		pmu {
 		        description = "Cortex-M0 firmware";
 			data = /incbin/("../../../rk3399m0.bin");
 			type = "pmu-firmware";
 			compression = "none";
-			load = <0xff8c0000>;
+			load = <0x180000>;
                 };
 		fdt {
 			description = "RK3399-Q7 (Puma) flat device-tree";
@@ -49,8 +51,8 @@ 
 		default = "conf";
 		conf {
 			description = "Theobroma Systems RK3399-Q7 (Puma) SoM";
-			firmware = "uboot";
-			loadables = "atf";
+			firmware = "atf";
+			loadables = "uboot", "pmu";
 			fdt = "fdt";
 		};
 	};