Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/hwmon/national,lm90.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: LM90 series thermometer
0008 
0009 maintainers:
0010   - Jean Delvare <jdelvare@suse.com>
0011   - Guenter Roeck <linux@roeck-us.net>
0012 
0013 properties:
0014   compatible:
0015     enum:
0016       - adi,adm1032
0017       - adi,adt7461
0018       - adi,adt7461a
0019       - adi,adt7481
0020       - dallas,max6646
0021       - dallas,max6647
0022       - dallas,max6649
0023       - dallas,max6657
0024       - dallas,max6658
0025       - dallas,max6659
0026       - dallas,max6680
0027       - dallas,max6681
0028       - dallas,max6695
0029       - dallas,max6696
0030       - gmt,g781
0031       - national,lm86
0032       - national,lm89
0033       - national,lm90
0034       - national,lm99
0035       - nxp,sa56004
0036       - onnn,nct1008
0037       - ti,tmp451
0038       - ti,tmp461
0039       - winbond,w83l771
0040 
0041 
0042   interrupts:
0043     items:
0044       - description: |
0045           Single interrupt specifier which describes the LM90 "-ALERT" pin
0046           output.
0047 
0048   reg:
0049     maxItems: 1
0050 
0051   "#thermal-sensor-cells":
0052     const: 1
0053 
0054   '#address-cells':
0055     const: 1
0056 
0057   '#size-cells':
0058     const: 0
0059 
0060   vcc-supply:
0061     description: phandle to the regulator that provides the +VCC supply
0062 
0063   ti,extended-range-enable:
0064     description: Set to enable extended range temperature.
0065     type: boolean
0066 
0067 required:
0068   - compatible
0069   - reg
0070 
0071 patternProperties:
0072   "^channel@([0-2])$":
0073     type: object
0074     description: Represents channels of the device and their specific configuration.
0075 
0076     properties:
0077       reg:
0078         description: The channel number. 0 is local channel, 1-2 are remote channels.
0079         items:
0080           minimum: 0
0081           maximum: 2
0082 
0083       label:
0084         description: A descriptive name for this channel, like "ambient" or "psu".
0085 
0086       temperature-offset-millicelsius:
0087         description: Temperature offset to be added to or subtracted from remote temperature measurements.
0088 
0089     required:
0090       - reg
0091 
0092     additionalProperties: false
0093 
0094 allOf:
0095   - if:
0096       not:
0097         properties:
0098           compatible:
0099             contains:
0100               enum:
0101                 - adi,adt7461
0102                 - adi,adt7461a
0103                 - adi,adt7481
0104                 - ti,tmp451
0105                 - ti,tmp461
0106     then:
0107       properties:
0108         ti,extended-range-enable: false
0109 
0110   - if:
0111       properties:
0112         compatible:
0113           contains:
0114             enum:
0115               - dallas,max6646
0116               - dallas,max6647
0117               - dallas,max6649
0118               - dallas,max6657
0119               - dallas,max6658
0120               - dallas,max6659
0121               - dallas,max6695
0122               - dallas,max6696
0123     then:
0124       patternProperties:
0125         "^channel@([0-2])$":
0126           properties:
0127             temperature-offset-millicelsius: false
0128 
0129   - if:
0130       properties:
0131         compatible:
0132           contains:
0133             enum:
0134               - adi,adt7461
0135               - adi,adt7461a
0136               - adi,adt7481
0137               - onnn,nct1008
0138     then:
0139       patternProperties:
0140         "^channel@([0-2])$":
0141           properties:
0142             temperature-offset-millicelsius:
0143               maximum: 127750
0144 
0145   - if:
0146       properties:
0147         compatible:
0148           contains:
0149             enum:
0150               - adi,adm1032
0151               - dallas,max6680
0152               - dallas,max6681
0153               - gmt,g781
0154               - national,lm86
0155               - national,lm89
0156               - national,lm90
0157               - national,lm99
0158               - nxp,sa56004
0159               - winbond,w83l771
0160     then:
0161       patternProperties:
0162         "^channel@([0-2])$":
0163           properties:
0164             temperature-offset-millicelsius:
0165               maximum: 127875
0166 
0167   - if:
0168       properties:
0169         compatible:
0170           contains:
0171             enum:
0172               - ti,tmp451
0173               - ti,tmp461
0174     then:
0175       patternProperties:
0176         "^channel@([0-2])$":
0177           properties:
0178             temperature-offset-millicelsius:
0179               maximum: 127937
0180 
0181 additionalProperties: false
0182 
0183 examples:
0184   - |
0185     #include <dt-bindings/interrupt-controller/irq.h>
0186 
0187     i2c {
0188         #address-cells = <1>;
0189         #size-cells = <0>;
0190 
0191         sensor@4c {
0192             compatible = "onnn,nct1008";
0193             reg = <0x4c>;
0194             vcc-supply = <&palmas_ldo6_reg>;
0195             interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
0196             #thermal-sensor-cells = <1>;
0197         };
0198     };
0199   - |
0200     i2c {
0201       #address-cells = <1>;
0202       #size-cells = <0>;
0203 
0204       sensor@4c {
0205         compatible = "adi,adt7481";
0206         reg = <0x4c>;
0207         #address-cells = <1>;
0208         #size-cells = <0>;
0209 
0210         channel@0 {
0211           reg = <0x0>;
0212           label = "local";
0213         };
0214 
0215         channel@1 {
0216           reg = <0x1>;
0217           label = "front";
0218           temperature-offset-millicelsius = <4000>;
0219         };
0220 
0221         channel@2 {
0222           reg = <0x2>;
0223           label = "back";
0224           temperature-offset-millicelsius = <750>;
0225         };
0226       };
0227     };