dt-bindings: sram: qcom,imem: Narrow allowed reboot modes

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>
Link: https://patch.msgid.link/20260701105832.197036-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2026-07-01 12:58:33 +02:00 committed by Rob Herring (Arm)
parent 4dbfe54674
commit 0108f362e4

View File

@ -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: