mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/5] power: reset: syscon-reboot-mode: Add support for Rockchip RK3576 reboot modes
@ 2026-09-29 10:28 Alexey Charkov
  2026-09-29 10:28 ` [PATCH v2 1/5] dt-bindings: soc: rockchip: add boot ROM download boot mode Alexey Charkov
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Alexey Charkov @ 2026-09-29 10:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel
  Cc: Alexey Charkov, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, linux-pm, Shawn Lin

Rockchip RK3576 supports reboots with a specified boot device priority
mode, allowing one to override the board-defined strapping config and the
OTP programmed priority setting.

Supporting it requires several changes though:
- The boot mode request needs to be forwarded via TF-A to the boot ROM
  (upstream since TF-A commit 2a97ba20e901 ("feat(rk3576): forward any
  boot ROM boot mode request on reset"))
- Some power supplies need to be kept active across the reboot to prevent
  early boot code from running into a synchronous abort
- The magic values for each of the supported boot modes need to be defined
  for the OS to use

This series enables the above with the RK3576 EVB1 board as the example
user. Other boards will likely need a close to identical change to make
use of this functionality, but need testing.

Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
Changes in v2:
- Fixed a leak of the dynamically allocated syscon_rbm->supplies (Sashiko)
- Uninitialized access to supplies[].supply (Sashiko) is fixed separately in:
  https://lore.kernel.org/all/20260929-regulator-get-all-v1-1-e887c66a47f1@flipper.net/
- Link to v1: https://patch.msgid.link/20260928-b4-rk3576-reboot-mode-v1-0-65486b03bd41@flipper.net

To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Heiko Stuebner <heiko@sntech.de>
To: Sebastian Reichel <sre@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org

---
Alexey Charkov (5):
      dt-bindings: soc: rockchip: add boot ROM download boot mode
      dt-bindings: power: reset: syscon-reboot-mode: allow supplies
      power: reset: syscon-reboot-mode: enable supplies for the next stage
      arm64: dts: rockchip: add reboot-mode node to RK3576
      arm64: dts: rockchip: name the reboot mode supplies on RK3576 EVB1

 .../bindings/power/reset/syscon-reboot-mode.yaml   |  8 +++++
 arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts   | 16 +++++++++
 arch/arm64/boot/dts/rockchip/rk3576.dtsi           | 36 +++++++++++++++++++
 drivers/power/reset/syscon-reboot-mode.c           | 41 ++++++++++++++++++++++
 include/dt-bindings/soc/rockchip,boot-mode.h       |  2 ++
 5 files changed, 103 insertions(+)
---
base-commit: 6375e61c01e93e35ee7acd336a689ac1fae4b509
change-id: 20260928-b4-rk3576-reboot-mode-d3804e39df04

Best regards,
--  
Alexey Charkov <alchark@flipper.net>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-09-30 13:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 10:28 [PATCH v2 0/5] power: reset: syscon-reboot-mode: Add support for Rockchip RK3576 reboot modes Alexey Charkov
2026-09-29 10:28 ` [PATCH v2 1/5] dt-bindings: soc: rockchip: add boot ROM download boot mode Alexey Charkov
2026-09-30 11:45   ` Krzysztof Kozlowski
2026-09-30 13:56     ` Alexey Charkov
2026-09-29 10:28 ` [PATCH v2 2/5] dt-bindings: power: reset: syscon-reboot-mode: allow supplies Alexey Charkov
2026-09-30 11:47   ` Krzysztof Kozlowski
2026-09-30 11:50     ` Krzysztof Kozlowski
2026-09-30 11:58       ` Alexey Charkov
2026-09-29 10:28 ` [PATCH v2 3/5] power: reset: syscon-reboot-mode: enable supplies for the next stage Alexey Charkov
2026-09-29 10:28 ` [PATCH v2 4/5] arm64: dts: rockchip: add reboot-mode node to RK3576 Alexey Charkov
2026-09-29 10:28 ` [PATCH v2 5/5] arm64: dts: rockchip: name the reboot mode supplies on RK3576 EVB1 Alexey Charkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®