[U-Boot,10/15] rockchip: dts: rk3399-puma: add /config/arm-trusted-firmware, reset-gpio property

Message ID 1505330989-25602-11-git-send-email-philipp.tomsich@theobroma-systems.com
State New
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

Dr. Philipp Tomsich Sept. 13, 2017, 7:29 p.m.
With the ATF capable of accessing the FDT passed to the next stage,
we can specify configuration items for the ATF in the /config path.

This adds the arm-trusted-firmware,reset-gpio that conveys the number
of the GPIO used to reset the board (used, when a reboot is requested
from ATF via PSCI).

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

 arch/arm/dts/rk3399-puma.dtsi | 1 +
 1 file changed, 1 insertion(+)

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:
> With the ATF capable of accessing the FDT passed to the next stage,
> we can specify configuration items for the ATF in the /config path.
>
> This adds the arm-trusted-firmware,reset-gpio that conveys the number
> of the GPIO used to reset the board (used, when a reboot is requested
> from ATF via PSCI).
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
>  arch/arm/dts/rk3399-puma.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/dts/rk3399-puma.dtsi b/arch/arm/dts/rk3399-puma.dtsi
> index d33c710..70d551b 100644
> --- a/arch/arm/dts/rk3399-puma.dtsi
> +++ b/arch/arm/dts/rk3399-puma.dtsi
> @@ -16,6 +16,7 @@
>                 u-boot,mmc-env-offset = <0x4000>;      /* @  16KB */
>                 u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
>                 u-boot,boot-led = "module_led";
> +               arm-trusted-firmware,reset-gpio = <38>;
>         };
>
>         chosen {
> --
> 2.1.4
>

How about putting this in an atf {} subnode?

That reminds me that these things should be documented in
doc/device-tree-bindings/config.txt
Dr. Philipp Tomsich Nov. 7, 2017, 9:40 a.m. | #2
> On 17 Sep 2017, at 19:54, Simon Glass <sjg@chromium.org> wrote:
> 
> On 13 September 2017 at 13:29, Philipp Tomsich
> <philipp.tomsich@theobroma-systems.com> wrote:
>> With the ATF capable of accessing the FDT passed to the next stage,
>> we can specify configuration items for the ATF in the /config path.
>> 
>> This adds the arm-trusted-firmware,reset-gpio that conveys the number
>> of the GPIO used to reset the board (used, when a reboot is requested
>> from ATF via PSCI).
>> 
>> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>> ---
>> 
>> arch/arm/dts/rk3399-puma.dtsi | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/arch/arm/dts/rk3399-puma.dtsi b/arch/arm/dts/rk3399-puma.dtsi
>> index d33c710..70d551b 100644
>> --- a/arch/arm/dts/rk3399-puma.dtsi
>> +++ b/arch/arm/dts/rk3399-puma.dtsi
>> @@ -16,6 +16,7 @@
>>                u-boot,mmc-env-offset = <0x4000>;      /* @  16KB */
>>                u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
>>                u-boot,boot-led = "module_led";
>> +               arm-trusted-firmware,reset-gpio = <38>;
>>        };
>> 
>>        chosen {
>> --
>> 2.1.4
>> 
> 
> How about putting this in an atf {} subnode?
> 
> That reminds me that these things should be documented in
> doc/device-tree-bindings/config.txt


This is in fact a good idea (as this allows to prefix the the reset-gpio with a 
board-specific prefix):
	config {
		arm-trusted-firmware {
			rk3399,reset-gpio = ...
		}
	}

However, as we already have an ATF version floating around customers that
uses this, I will merge it as-is and submit a follow-up series that updates it to
the new model (together with proper documentation), so this is documented
in the git history.

Regards,
Philipp.

Patch

diff --git a/arch/arm/dts/rk3399-puma.dtsi b/arch/arm/dts/rk3399-puma.dtsi
index d33c710..70d551b 100644
--- a/arch/arm/dts/rk3399-puma.dtsi
+++ b/arch/arm/dts/rk3399-puma.dtsi
@@ -16,6 +16,7 @@ 
 		u-boot,mmc-env-offset = <0x4000>;      /* @  16KB */
 		u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
 		u-boot,boot-led = "module_led";
+		arm-trusted-firmware,reset-gpio = <38>;
 	};
 
 	chosen {