ti,tmp421.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/hwmon/ti,tmp421.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: TMP42x/TMP44x temperature sensor
  7. maintainers:
  8. - Guenter Roeck <linux@roeck-us.net>
  9. description: |
  10. ±1°C Remote and Local temperature sensor
  11. https://www.ti.com/lit/ds/symlink/tmp422.pdf
  12. properties:
  13. compatible:
  14. enum:
  15. - ti,tmp421
  16. - ti,tmp422
  17. - ti,tmp423
  18. - ti,tmp441
  19. - ti,tmp442
  20. reg:
  21. maxItems: 1
  22. '#address-cells':
  23. const: 1
  24. '#size-cells':
  25. const: 0
  26. required:
  27. - compatible
  28. - reg
  29. additionalProperties: false
  30. patternProperties:
  31. "^channel@([0-3])$":
  32. type: object
  33. description: |
  34. Represents channels of the device and their specific configuration.
  35. properties:
  36. reg:
  37. description: |
  38. The channel number. 0 is local channel, 1-3 are remote channels
  39. items:
  40. minimum: 0
  41. maximum: 3
  42. label:
  43. description: |
  44. A descriptive name for this channel, like "ambient" or "psu".
  45. ti,n-factor:
  46. description: |
  47. The value (two's complement) to be programmed in the channel specific N correction register.
  48. For remote channels only.
  49. $ref: /schemas/types.yaml#/definitions/int32
  50. minimum: -128
  51. maximum: 127
  52. required:
  53. - reg
  54. additionalProperties: false
  55. examples:
  56. - |
  57. i2c {
  58. #address-cells = <1>;
  59. #size-cells = <0>;
  60. sensor@4c {
  61. compatible = "ti,tmp422";
  62. reg = <0x4c>;
  63. };
  64. };
  65. - |
  66. i2c {
  67. #address-cells = <1>;
  68. #size-cells = <0>;
  69. sensor@4c {
  70. compatible = "ti,tmp422";
  71. reg = <0x4c>;
  72. #address-cells = <1>;
  73. #size-cells = <0>;
  74. channel@0 {
  75. reg = <0x0>;
  76. ti,n-factor = <0x1>;
  77. label = "local";
  78. };
  79. channel@1 {
  80. reg = <0x1>;
  81. ti,n-factor = <0x0>;
  82. label = "somelabel";
  83. };
  84. channel@2 {
  85. reg = <0x2>;
  86. status = "disabled";
  87. };
  88. };
  89. };