diff mbox series

[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 Accepted
Delegated to: Philipp Tomsich
Headers show
Series [U-Boot,01/15] image: add IH_OS_ARM_TRUSTED_FIRMWARE for ARM Trusted Firmware | expand

Commit Message

Philipp Tomsich Sept. 13, 2017, 7:29 p.m. UTC
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. UTC | #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
Philipp Tomsich Nov. 7, 2017, 9:40 a.m. UTC | #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.
Philipp Tomsich Nov. 23, 2017, 2:51 p.m. UTC | #3
> 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(+)
> 

Applied to u-boot-rockchip, thanks!
Philipp Tomsich Nov. 23, 2017, 3:52 p.m. UTC | #4
> On 23 Nov 2017, at 15:51, 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(+)
>> 
> 
> Applied to u-boot-rockchip, thanks!

Given that this one causes a spurious DTC warning (due to the property
ending in “-gpio”), I am dropping it from u-boot-rockchip.

Once we have updated our ATF to the final naming scheme, I’ll submit a
separate patch.
diff mbox series

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 {