starfive: add new target for StarFive JH7100/7110 SoC
[openwrt/staging/981213.git] / target / linux / starfive / patches-6.1 / 0109-dt-bindings-hwmon-Add-starfive-jh71x0-temp.patch
1 From a0f2b48b5433d2fbcf87e4edf52e5cc26d0c29c8 Mon Sep 17 00:00:00 2001
2 From: Emil Renner Berthing <kernel@esmil.dk>
3 Date: Tue, 21 Mar 2023 10:26:43 +0800
4 Subject: [PATCH 109/122] dt-bindings: hwmon: Add starfive,jh71x0-temp
5
6 Add bindings for the temperature sensor on the StarFive JH7100 and
7 JH7110 SoCs.
8
9 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
10 Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
11 Reviewed-by: Rob Herring <robh@kernel.org>
12 ---
13 .../bindings/hwmon/starfive,jh71x0-temp.yaml | 70 +++++++++++++++++++
14 1 file changed, 70 insertions(+)
15 create mode 100644 Documentation/devicetree/bindings/hwmon/starfive,jh71x0-temp.yaml
16
17 --- /dev/null
18 +++ b/Documentation/devicetree/bindings/hwmon/starfive,jh71x0-temp.yaml
19 @@ -0,0 +1,70 @@
20 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21 +%YAML 1.2
22 +---
23 +$id: http://devicetree.org/schemas/hwmon/starfive,jh71x0-temp.yaml#
24 +$schema: http://devicetree.org/meta-schemas/core.yaml#
25 +
26 +title: StarFive JH71x0 Temperature Sensor
27 +
28 +maintainers:
29 + - Emil Renner Berthing <kernel@esmil.dk>
30 +
31 +description: |
32 + StarFive Technology Co. JH71x0 embedded temperature sensor
33 +
34 +properties:
35 + compatible:
36 + enum:
37 + - starfive,jh7100-temp
38 + - starfive,jh7110-temp
39 +
40 + reg:
41 + maxItems: 1
42 +
43 + clocks:
44 + minItems: 2
45 + maxItems: 2
46 +
47 + clock-names:
48 + items:
49 + - const: "sense"
50 + - const: "bus"
51 +
52 + '#thermal-sensor-cells':
53 + const: 0
54 +
55 + resets:
56 + minItems: 2
57 + maxItems: 2
58 +
59 + reset-names:
60 + items:
61 + - const: "sense"
62 + - const: "bus"
63 +
64 +required:
65 + - compatible
66 + - reg
67 + - clocks
68 + - clock-names
69 + - resets
70 + - reset-names
71 +
72 +additionalProperties: false
73 +
74 +examples:
75 + - |
76 + #include <dt-bindings/clock/starfive-jh7100.h>
77 + #include <dt-bindings/reset/starfive-jh7100.h>
78 +
79 + temperature-sensor@124a0000 {
80 + compatible = "starfive,jh7100-temp";
81 + reg = <0x124a0000 0x10000>;
82 + clocks = <&clkgen JH7100_CLK_TEMP_SENSE>,
83 + <&clkgen JH7100_CLK_TEMP_APB>;
84 + clock-names = "sense", "bus";
85 + #thermal-sensor-cells = <0>;
86 + resets = <&rstgen JH7100_RSTN_TEMP_SENSE>,
87 + <&rstgen JH7100_RSTN_TEMP_APB>;
88 + reset-names = "sense", "bus";
89 + };