Store a reboot mode in one of the RTC's general purpose registers. This value can be used by U-Boot or another bootlader, for example to enter FEL or fastboot mode.
Signed-off-by: Samuel Holland <[email protected]> --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 5dfa9b5e7ee3..9891ee996794 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -155,6 +155,17 @@ psci { method = "smc"; }; + reboot-mode { + compatible = "nvmem-reboot-mode"; + nvmem-cells = <&reboot_mode>; + nvmem-cell-names = "reboot-mode"; + + mode-normal = <0x0>; + mode-bootloader = <0xfa57b007>; + mode-fel = <0xe1fe1fe1>; + mode-ums = <0x05704a6e>; + }; + scpi_protocol: scpi { compatible = "arm,scpi"; mboxes = <&msgbox 2>, <&msgbox 3>; @@ -1283,6 +1294,12 @@ rtc: rtc@1f00000 { clock-output-names = "osc32k", "osc32k-out", "iosc"; clocks = <&osc32k>; #clock-cells = <1>; + #address-cells = <1>; + #size-cells = <1>; + + reboot_mode: reboot-mode@0 { + reg = <0x0 0x4>; + }; }; r_intc: interrupt-controller@1f00c00 { -- 2.26.2 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210119055204.55070-3-samuel%40sholland.org.
