Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Allwinner SUN8I Thermal Controller Device Tree Bindings
0008 
0009 maintainers:
0010   - Vasily Khoruzhick <anarsoul@gmail.com>
0011   - Yangtao Li <tiny.windzz@gmail.com>
0012 
0013 properties:
0014   compatible:
0015     enum:
0016       - allwinner,sun8i-a83t-ths
0017       - allwinner,sun8i-h3-ths
0018       - allwinner,sun8i-r40-ths
0019       - allwinner,sun50i-a64-ths
0020       - allwinner,sun50i-a100-ths
0021       - allwinner,sun50i-h5-ths
0022       - allwinner,sun50i-h6-ths
0023 
0024   clocks:
0025     minItems: 1
0026     items:
0027       - description: Bus Clock
0028       - description: Module Clock
0029 
0030   clock-names:
0031     minItems: 1
0032     items:
0033       - const: bus
0034       - const: mod
0035 
0036   reg:
0037     maxItems: 1
0038 
0039   interrupts:
0040     maxItems: 1
0041 
0042   resets:
0043     maxItems: 1
0044 
0045   nvmem-cells:
0046     maxItems: 1
0047     description: Calibration data for thermal sensors
0048 
0049   nvmem-cell-names:
0050     const: calibration
0051 
0052   # See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for details
0053   "#thermal-sensor-cells":
0054     enum:
0055       - 0
0056       - 1
0057 
0058 allOf:
0059   - if:
0060       properties:
0061         compatible:
0062           contains:
0063             enum:
0064               - allwinner,sun50i-a100-ths
0065               - allwinner,sun50i-h6-ths
0066 
0067     then:
0068       properties:
0069         clocks:
0070           maxItems: 1
0071 
0072         clock-names:
0073           maxItems: 1
0074 
0075     else:
0076       properties:
0077         clocks:
0078           minItems: 2
0079 
0080         clock-names:
0081           minItems: 2
0082 
0083   - if:
0084       properties:
0085         compatible:
0086           contains:
0087             const: allwinner,sun8i-h3-ths
0088 
0089     then:
0090       properties:
0091         "#thermal-sensor-cells":
0092           const: 0
0093 
0094     else:
0095       properties:
0096         "#thermal-sensor-cells":
0097           const: 1
0098 
0099   - if:
0100       properties:
0101         compatible:
0102           contains:
0103             enum:
0104               - allwinner,sun8i-h3-ths
0105               - allwinner,sun8i-r40-ths
0106               - allwinner,sun50i-a64-ths
0107               - allwinner,sun50i-a100-ths
0108               - allwinner,sun50i-h5-ths
0109               - allwinner,sun50i-h6-ths
0110 
0111     then:
0112       required:
0113         - clocks
0114         - clock-names
0115         - resets
0116 
0117 required:
0118   - compatible
0119   - reg
0120   - interrupts
0121   - '#thermal-sensor-cells'
0122 
0123 additionalProperties: false
0124 
0125 examples:
0126   - |
0127     thermal-sensor@1f04000 {
0128          compatible = "allwinner,sun8i-a83t-ths";
0129          reg = <0x01f04000 0x100>;
0130          interrupts = <0 31 0>;
0131          nvmem-cells = <&ths_calibration>;
0132          nvmem-cell-names = "calibration";
0133          #thermal-sensor-cells = <1>;
0134     };
0135 
0136   - |
0137     thermal-sensor@1c25000 {
0138          compatible = "allwinner,sun8i-h3-ths";
0139          reg = <0x01c25000 0x400>;
0140          clocks = <&ccu 0>, <&ccu 1>;
0141          clock-names = "bus", "mod";
0142          resets = <&ccu 2>;
0143          interrupts = <0 31 0>;
0144          nvmem-cells = <&ths_calibration>;
0145          nvmem-cell-names = "calibration";
0146          #thermal-sensor-cells = <0>;
0147     };
0148 
0149   - |
0150     thermal-sensor@5070400 {
0151          compatible = "allwinner,sun50i-h6-ths";
0152          reg = <0x05070400 0x100>;
0153          clocks = <&ccu 0>;
0154          clock-names = "bus";
0155          resets = <&ccu 2>;
0156          interrupts = <0 15 0>;
0157          nvmem-cells = <&ths_calibration>;
0158          nvmem-cell-names = "calibration";
0159          #thermal-sensor-cells = <1>;
0160     };
0161 
0162 ...