Skip to content

Commit c8c4353

Browse files
AaronDotdlezcano
authored andcommitted
dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition
The temperature output register of the Loongson-2K2000 is defined in the chip configuration domain, which is different from the Loongson-2K1000, so it can't be fallbacked. We need to use two groups of registers to describe it: the first group is the high and low temperature threshold setting register; the second group is the temperature output register. It is true that this fix will cause ABI corruption, but it is necessary otherwise the Loongson-2K2000 temperature sensor will not work properly. Fixes: 72684d9 ("thermal: dt-bindings: add loongson-2 thermal") Cc: Yinbo Zhu <zhuyinbo@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/5198999d679f1a1c3457385acb9fadfc85da1f1e.1713837379.git.zhoubinbin@loongson.cn
1 parent 25c7d84 commit c8c4353

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ properties:
1818
oneOf:
1919
- enum:
2020
- loongson,ls2k1000-thermal
21+
- loongson,ls2k2000-thermal
2122
- items:
2223
- enum:
2324
- loongson,ls2k0500-thermal
24-
- loongson,ls2k2000-thermal
2525
- const: loongson,ls2k1000-thermal
2626

2727
reg:
28-
maxItems: 1
28+
minItems: 1
29+
maxItems: 2
2930

3031
interrupts:
3132
maxItems: 1
@@ -39,6 +40,24 @@ required:
3940
- interrupts
4041
- '#thermal-sensor-cells'
4142

43+
if:
44+
properties:
45+
compatible:
46+
contains:
47+
enum:
48+
- loongson,ls2k2000-thermal
49+
50+
then:
51+
properties:
52+
reg:
53+
minItems: 2
54+
maxItems: 2
55+
56+
else:
57+
properties:
58+
reg:
59+
maxItems: 1
60+
4261
unevaluatedProperties: false
4362

4463
examples:

0 commit comments

Comments
 (0)