* [PATCH] dt-bindings: sram: qcom,imem: Narrow allowed reboot modes
@ 2026-07-01 10:58 Krzysztof Kozlowski
2026-07-01 19:57 ` Rob Herring (Arm)
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-01 10:58 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
linux-arm-msm, devicetree, linux-kernel
Cc: Krzysztof Kozlowski
Only few Qualcomm IMEM devices actually provide interface for setting
reboot modes, but top-level schema allows "reboot-mode" child for
everyone. Narrow this to specific compatibles.
syscon-reboot-mode schema allows arbitrary "mode-.* properties but only
a subset actually makes sense and is valid. Provide negative look-ahead
pattern to disallow any modes not supported by the device, which
tightens the binding even more.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
.../devicetree/bindings/sram/qcom,imem.yaml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index c63026904061..eaa8ef367ff4 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -89,6 +89,26 @@ required:
- compatible
- reg
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,apq8064-imem
+ - qcom,msm8226-imem
+ - qcom,msm8974-imem
+ then:
+ properties:
+ reboot-mode:
+ patternProperties:
+ # Negative look-ahead to disallow unsupported modes. The '$' has to be
+ # part of lookahead group to work, instead of trailing outside of ().
+ "^mode-(?!(bootloader$|normal$|recovery$))": false
+ else:
+ properties:
+ reboot-mode: false
+
additionalProperties: false
examples:
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: sram: qcom,imem: Narrow allowed reboot modes
2026-07-01 10:58 [PATCH] dt-bindings: sram: qcom,imem: Narrow allowed reboot modes Krzysztof Kozlowski
@ 2026-07-01 19:57 ` Rob Herring (Arm)
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring (Arm) @ 2026-07-01 19:57 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Conor Dooley, Krzysztof Kozlowski, devicetree, linux-arm-msm,
linux-kernel, Bjorn Andersson
On Wed, 01 Jul 2026 12:58:33 +0200, Krzysztof Kozlowski wrote:
> Only few Qualcomm IMEM devices actually provide interface for setting
> reboot modes, but top-level schema allows "reboot-mode" child for
> everyone. Narrow this to specific compatibles.
>
> syscon-reboot-mode schema allows arbitrary "mode-.* properties but only
> a subset actually makes sense and is valid. Provide negative look-ahead
> pattern to disallow any modes not supported by the device, which
> tightens the binding even more.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> .../devicetree/bindings/sram/qcom,imem.yaml | 20 +++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-01 19:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-01 10:58 [PATCH] dt-bindings: sram: qcom,imem: Narrow allowed reboot modes Krzysztof Kozlowski
2026-07-01 19:57 ` Rob Herring (Arm)
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®