d1: add new target
[openwrt/staging/wigyori.git] / target / linux / d1 / patches-6.1 / 0079-dt-bindings-thermal-sun8i-Add-compatible-for-D1.patch
1 From 68c6f452bf42d6c5cbaf40537d8a17a7f3f5481e Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 6 Jun 2021 10:03:12 -0500
4 Subject: [PATCH 079/117] dt-bindings: thermal: sun8i: Add compatible for D1
5
6 D1 contains a thermal sensor similar to other Allwinner SoCs. Like the
7 H3 variant, it contains only one channel.
8
9 D1's thermal sensor gets a reference voltage from AVCC. This may always
10 have been the case; it is explicitly documented in the SoC user manuals
11 since at least H616. However, it was not as important on earlier SoCs,
12 because those reference designs foreced AVCC always-on by connecting it
13 to the PLL power supply.
14
15 Now, since D1 only uses AVCC for other optional peripherals, this supply
16 could be turned off at runtime, so it must be made explicit in the DTS.
17
18 Signed-off-by: Samuel Holland <samuel@sholland.org>
19 ---
20 .../thermal/allwinner,sun8i-a83t-ths.yaml | 21 ++++++++++++++++++-
21 1 file changed, 20 insertions(+), 1 deletion(-)
22
23 diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
24 index fbd4212285e2..ecdb6b903769 100644
25 --- a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
26 +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
27 @@ -16,6 +16,7 @@ properties:
28 - allwinner,sun8i-a83t-ths
29 - allwinner,sun8i-h3-ths
30 - allwinner,sun8i-r40-ths
31 + - allwinner,sun20i-d1-ths
32 - allwinner,sun50i-a64-ths
33 - allwinner,sun50i-a100-ths
34 - allwinner,sun50i-h5-ths
35 @@ -55,6 +56,10 @@ properties:
36 - 0
37 - 1
38
39 + vref-supply:
40 + description:
41 + Regulator for the analog reference voltage
42 +
43 allOf:
44 - if:
45 properties:
46 @@ -84,7 +89,9 @@ allOf:
47 properties:
48 compatible:
49 contains:
50 - const: allwinner,sun8i-h3-ths
51 + enum:
52 + - allwinner,sun8i-h3-ths
53 + - allwinner,sun20i-d1-ths
54
55 then:
56 properties:
57 @@ -103,6 +110,7 @@ allOf:
58 enum:
59 - allwinner,sun8i-h3-ths
60 - allwinner,sun8i-r40-ths
61 + - allwinner,sun20i-d1-ths
62 - allwinner,sun50i-a64-ths
63 - allwinner,sun50i-a100-ths
64 - allwinner,sun50i-h5-ths
65 @@ -114,6 +122,17 @@ allOf:
66 - clock-names
67 - resets
68
69 + - if:
70 + properties:
71 + compatible:
72 + contains:
73 + enum:
74 + - allwinner,sun20i-d1-ths
75 +
76 + then:
77 + required:
78 + - vref-supply
79 +
80 required:
81 - compatible
82 - reg
83 --
84 2.20.1
85