Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/thermal/sprd-thermal.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Spreadtrum thermal sensor controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Orson Zhai <orsonzhai@gmail.com> |
| 11 | - Baolin Wang <baolin.wang7@gmail.com> |
| 12 | - Chunyan Zhang <zhang.lyra@gmail.com> |
| 13 | |
| 14 | properties: |
| 15 | compatible: |
| 16 | const: sprd,ums512-thermal |
| 17 | |
| 18 | reg: |
| 19 | maxItems: 1 |
| 20 | |
| 21 | clocks: |
| 22 | maxItems: 1 |
| 23 | |
| 24 | clock-names: |
| 25 | items: |
| 26 | - const: enable |
| 27 | |
| 28 | nvmem-cells: |
| 29 | maxItems: 2 |
| 30 | description: |
| 31 | Reference to nvmem nodes for the calibration data. |
| 32 | |
| 33 | nvmem-cell-names: |
| 34 | items: |
| 35 | - const: thm_sign_cal |
| 36 | - const: thm_ratio_cal |
| 37 | |
| 38 | "#thermal-sensor-cells": |
| 39 | const: 1 |
| 40 | |
| 41 | "#address-cells": |
| 42 | const: 1 |
| 43 | |
| 44 | "#size-cells": |
| 45 | const: 0 |
| 46 | |
| 47 | patternProperties: |
| 48 | "^([a-z]*-)?sensor(-section)?@[0-9]+$": |
| 49 | type: object |
| 50 | description: |
| 51 | Represent one thermal sensor. |
| 52 | |
| 53 | properties: |
| 54 | reg: |
| 55 | description: Specify the sensor id. |
| 56 | maxItems: 1 |
| 57 | |
| 58 | nvmem-cells: |
| 59 | maxItems: 1 |
| 60 | description: |
| 61 | Reference to an nvmem node for the calibration data. |
| 62 | |
| 63 | nvmem-cell-names: |
| 64 | const: sen_delta_cal |
| 65 | |
| 66 | required: |
| 67 | - reg |
| 68 | - nvmem-cells |
| 69 | - nvmem-cell-names |
| 70 | |
| 71 | additionalProperties: false |
| 72 | |
| 73 | required: |
| 74 | - compatible |
| 75 | - reg |
| 76 | - clocks |
| 77 | - clock-names |
| 78 | - nvmem-cells |
| 79 | - nvmem-cell-names |
| 80 | - "#thermal-sensor-cells" |
| 81 | - "#address-cells" |
| 82 | - "#size-cells" |
| 83 | |
| 84 | additionalProperties: false |
| 85 | |
| 86 | examples: |
| 87 | - | |
| 88 | ap_thm0: thermal@32200000 { |
| 89 | compatible = "sprd,ums512-thermal"; |
| 90 | reg = <0x32200000 0x10000>; |
| 91 | clock-names = "enable"; |
| 92 | clocks = <&aonapb_gate 32>; |
| 93 | #thermal-sensor-cells = <1>; |
| 94 | nvmem-cells = <&thm0_sign>, <&thm0_ratio>; |
| 95 | nvmem-cell-names = "thm_sign_cal", "thm_ratio_cal"; |
| 96 | #address-cells = <1>; |
| 97 | #size-cells = <0>; |
| 98 | |
| 99 | prometheus-sensor@0 { |
| 100 | reg = <0>; |
| 101 | nvmem-cells = <&thm0_sen0>; |
| 102 | nvmem-cell-names = "sen_delta_cal"; |
| 103 | }; |
| 104 | |
| 105 | ank-sensor@1 { |
| 106 | reg = <1>; |
| 107 | nvmem-cells = <&thm0_sen1>; |
| 108 | nvmem-cell-names = "sen_delta_cal"; |
| 109 | }; |
| 110 | }; |
| 111 | ... |