From 68c6f452bf42d6c5cbaf40537d8a17a7f3f5481e Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sun, 6 Jun 2021 10:03:12 -0500 Subject: [PATCH 079/117] dt-bindings: thermal: sun8i: Add compatible for D1 D1 contains a thermal sensor similar to other Allwinner SoCs. Like the H3 variant, it contains only one channel. D1's thermal sensor gets a reference voltage from AVCC. This may always have been the case; it is explicitly documented in the SoC user manuals since at least H616. However, it was not as important on earlier SoCs, because those reference designs foreced AVCC always-on by connecting it to the PLL power supply. Now, since D1 only uses AVCC for other optional peripherals, this supply could be turned off at runtime, so it must be made explicit in the DTS. Signed-off-by: Samuel Holland --- .../thermal/allwinner,sun8i-a83t-ths.yaml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) --- a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml @@ -16,6 +16,7 @@ properties: - allwinner,sun8i-a83t-ths - allwinner,sun8i-h3-ths - allwinner,sun8i-r40-ths + - allwinner,sun20i-d1-ths - allwinner,sun50i-a64-ths - allwinner,sun50i-a100-ths - allwinner,sun50i-h5-ths @@ -55,6 +56,10 @@ properties: - 0 - 1 + vref-supply: + description: + Regulator for the analog reference voltage + allOf: - if: properties: @@ -84,7 +89,9 @@ allOf: properties: compatible: contains: - const: allwinner,sun8i-h3-ths + enum: + - allwinner,sun8i-h3-ths + - allwinner,sun20i-d1-ths then: properties: @@ -103,6 +110,7 @@ allOf: enum: - allwinner,sun8i-h3-ths - allwinner,sun8i-r40-ths + - allwinner,sun20i-d1-ths - allwinner,sun50i-a64-ths - allwinner,sun50i-a100-ths - allwinner,sun50i-h5-ths @@ -114,6 +122,17 @@ allOf: - clock-names - resets + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun20i-d1-ths + + then: + required: + - vref-supply + required: - compatible - reg