Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/thermal/sprd-thermal.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Spreadtrum thermal sensor controller bindings
0008 
0009 maintainers:
0010   - Orson Zhai <orsonzhai@gmail.com>
0011   - Baolin Wang <baolin.wang7@gmail.com>
0012   - Chunyan Zhang <zhang.lyra@gmail.com>
0013 
0014 properties:
0015   compatible:
0016     const: sprd,ums512-thermal
0017 
0018   reg:
0019     maxItems: 1
0020 
0021   clocks:
0022     maxItems: 1
0023 
0024   clock-names:
0025     items:
0026       - const: enable
0027 
0028   nvmem-cells:
0029     maxItems: 2
0030     description:
0031       Reference to nvmem nodes for the calibration data.
0032 
0033   nvmem-cell-names:
0034     items:
0035       - const: thm_sign_cal
0036       - const: thm_ratio_cal
0037 
0038   "#thermal-sensor-cells":
0039     const: 1
0040 
0041   "#address-cells":
0042     const: 1
0043 
0044   "#size-cells":
0045     const: 0
0046 
0047 patternProperties:
0048   "^([a-z]*-)?sensor(-section)?@[0-9]+$":
0049     type: object
0050     description:
0051       Represent one thermal sensor.
0052 
0053     properties:
0054       reg:
0055         description: Specify the sensor id.
0056         maxItems: 1
0057 
0058       nvmem-cells:
0059         maxItems: 1
0060         description:
0061           Reference to an nvmem node for the calibration data.
0062 
0063       nvmem-cell-names:
0064         const: sen_delta_cal
0065 
0066     required:
0067       - reg
0068       - nvmem-cells
0069       - nvmem-cell-names
0070 
0071     additionalProperties: false
0072 
0073 required:
0074   - compatible
0075   - reg
0076   - clocks
0077   - clock-names
0078   - nvmem-cells
0079   - nvmem-cell-names
0080   - "#thermal-sensor-cells"
0081   - "#address-cells"
0082   - "#size-cells"
0083 
0084 additionalProperties: false
0085 
0086 examples:
0087   - |
0088         ap_thm0: thermal@32200000 {
0089                 compatible = "sprd,ums512-thermal";
0090                 reg = <0x32200000 0x10000>;
0091                 clock-names = "enable";
0092                 clocks = <&aonapb_gate 32>;
0093                 #thermal-sensor-cells = <1>;
0094                 nvmem-cells = <&thm0_sign>, <&thm0_ratio>;
0095                 nvmem-cell-names = "thm_sign_cal", "thm_ratio_cal";
0096                 #address-cells = <1>;
0097                 #size-cells = <0>;
0098 
0099                 prometheus-sensor@0 {
0100                         reg = <0>;
0101                         nvmem-cells = <&thm0_sen0>;
0102                         nvmem-cell-names = "sen_delta_cal";
0103                 };
0104 
0105                 ank-sensor@1 {
0106                         reg = <1>;
0107                         nvmem-cells = <&thm0_sen1>;
0108                         nvmem-cell-names = "sen_delta_cal";
0109                 };
0110         };
0111 ...