summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2026-07-01 12:57:33 +0200
committerKrzysztof Kozlowski <krzk@kernel.org>2026-07-09 15:17:42 +0200
commite131ca83dabc8bfb8c1d455d02bf2d7a7bc1198a (patch)
tree53985197c15ad99bf6a7d05b8a9782103131ea96
parent3527091de0feb27e437bce175048b54be835221b (diff)
downloadlinux-e131ca83dabc8bfb8c1d455d02bf2d7a7bc1198a.tar.gz
linux-e131ca83dabc8bfb8c1d455d02bf2d7a7bc1198a.zip
dt-bindings: samsung: exynos-pmu: Narrow allowed reboot modes
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. Most of Android-based Exynos devices share the bootloader or its parts, thus reboot modes are most likely the same, however only a few upstream DTS define them, so add restrictions only for these. Google GS101 has on the other hand quite different bootloader with many known reboot modes. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260701105731.196618-4-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
index d124f3ae9fbd..5bd39876e3b3 100644
--- a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
+++ b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
@@ -181,8 +181,29 @@ allOf:
compatible:
contains:
enum:
+ - samsung,exynos7-pmu
+ 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$|download$|fastboot$|recovery$))": false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- google,gs101-pmu
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$|charge$|dm-verity-device-corrupted$|fastboot$|reboot-ab-update$|recovery$)|rescue$|shutdown-thermal$|shutdown-thermal-battery$)": false
+
required:
- google,pmu-intr-gen-syscon
else: