Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Moortec Semiconductor MR75203 PVT Controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Rahul Tanwar <rtanwar@maxlinear.com> |
| 11 | |
| 12 | description: | |
| 13 | A Moortec PVT (Process, Voltage, Temperature) monitoring logic design can |
| 14 | include many different units. |
| 15 | Such a design will usually consists of several Moortec's embedded analog IPs, |
| 16 | and a single Moortec controller (mr75203) to configure and control the IPs. |
| 17 | |
| 18 | Some of the Moortec's analog hard IPs that can be used in a design: |
| 19 | *) Temperature Sensor (TS) - used to monitor core temperature (e.g. mr74137). |
| 20 | *) Voltage Monitor (VM) - used to monitor voltage levels (e.g. mr74138). |
| 21 | *) Process Detector (PD) - used to assess silicon speed (e.g. mr74139). |
| 22 | *) Delay Chain - ring oscillator connected to the PD, used to measure IO |
| 23 | based transistors (e.g. mr76008 ring oscillator at 1.1V, mr76007 ring |
| 24 | oscillator at 1.8V). |
| 25 | *) Pre Scaler - provides divide-by-X scaling of input voltage, which can then |
| 26 | be presented for VM for measurement within its range (e.g. mr76006 - |
| 27 | divide by 2 pre-scaler). |
| 28 | |
| 29 | TS, VM & PD also include a digital interface, which consists of configuration |
| 30 | inputs and measurement outputs. |
| 31 | |
| 32 | Some of the units have number of series, each series can have slightly |
| 33 | different characteristics. |
| 34 | |
| 35 | The mr75203 binding describes configuration for the controller unit, but also |
| 36 | for some of the analog IPs. |
| 37 | |
| 38 | properties: |
| 39 | compatible: |
| 40 | const: moortec,mr75203 |
| 41 | |
| 42 | reg: |
| 43 | items: |
| 44 | - description: PVT common registers |
| 45 | - description: PVT temperature sensor registers |
| 46 | - description: PVT process detector registers |
| 47 | - description: PVT voltage monitor registers |
| 48 | |
| 49 | reg-names: |
| 50 | items: |
| 51 | - const: common |
| 52 | - const: ts |
| 53 | - const: pd |
| 54 | - const: vm |
| 55 | |
| 56 | intel,vm-map: |
| 57 | description: |
| 58 | PVT controller has 5 VM (voltage monitor) sensors. |
| 59 | vm-map defines CPU core to VM instance mapping. A |
| 60 | value of 0xff means that VM sensor is unused. |
| 61 | $ref: /schemas/types.yaml#/definitions/uint8-array |
| 62 | maxItems: 5 |
| 63 | |
| 64 | clocks: |
| 65 | maxItems: 1 |
| 66 | |
| 67 | resets: |
| 68 | maxItems: 1 |
| 69 | |
| 70 | "#thermal-sensor-cells": |
| 71 | const: 1 |
| 72 | |
| 73 | moortec,vm-active-channels: |
| 74 | description: |
| 75 | Defines the number of channels per VM that are actually used and are |
| 76 | connected to some input source. |
| 77 | Maximum number of items - number of VMs. |
| 78 | Maximum value of each item - number of channels. |
| 79 | Minimum value of each item - 0 (which means entire VM sensor is not used). |
| 80 | $ref: /schemas/types.yaml#/definitions/uint8-array |
| 81 | |
| 82 | moortec,vm-pre-scaler-x2: |
| 83 | description: |
| 84 | Defines the channels that use a mr76006 pre-scaler to divide the input |
| 85 | source by 2. |
| 86 | The pre-scaler is used for input sources that exceed the VM input range. |
| 87 | The driver uses this information to present to the user with the actual |
| 88 | value of the voltage source. |
| 89 | For channels that are not listed, no pre-scaler is assumed. |
| 90 | Maximum number of items - total number of channels in all VMs. |
| 91 | Each channel should not appear more than once. |
| 92 | $ref: /schemas/types.yaml#/definitions/uint8-array |
| 93 | |
| 94 | moortec,ts-series: |
| 95 | description: |
| 96 | Definition of the temperature equation and coefficients that shall be |
| 97 | used to convert the digital output to value in milli-Celsius. |
| 98 | minimum: 5 |
| 99 | maximum: 6 |
| 100 | default: 5 |
| 101 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 102 | |
| 103 | moortec,ts-coeff-g: |
| 104 | description: |
| 105 | G coefficient for temperature equation. |
| 106 | Default for series 5 = 60000 |
| 107 | Default for series 6 = 57400 |
| 108 | multipleOf: 100 |
| 109 | minimum: 1000 |
| 110 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 111 | |
| 112 | moortec,ts-coeff-h: |
| 113 | description: |
| 114 | H coefficient for temperature equation. |
| 115 | Default for series 5 = 200000 |
| 116 | Default for series 6 = 249400 |
| 117 | multipleOf: 100 |
| 118 | minimum: 1000 |
| 119 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 120 | |
| 121 | moortec,ts-coeff-cal5: |
| 122 | description: |
| 123 | cal5 coefficient for temperature equation. |
| 124 | Default for series 5 = 4094 |
| 125 | Default for series 6 = 4096 |
| 126 | minimum: 1 |
| 127 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 128 | |
| 129 | moortec,ts-coeff-j: |
| 130 | description: |
| 131 | J coefficient for temperature equation. |
| 132 | Default for series 5 = -100 |
| 133 | Default for series 6 = 0 |
| 134 | multipleOf: 100 |
| 135 | maximum: 0 |
| 136 | $ref: /schemas/types.yaml#/definitions/int32 |
| 137 | |
| 138 | required: |
| 139 | - compatible |
| 140 | - reg |
| 141 | - reg-names |
| 142 | - clocks |
| 143 | - "#thermal-sensor-cells" |
| 144 | |
| 145 | additionalProperties: false |
| 146 | |
| 147 | examples: |
| 148 | - | |
| 149 | pvt: pvt@e0680000 { |
| 150 | compatible = "moortec,mr75203"; |
| 151 | reg = <0xe0680000 0x80>, |
| 152 | <0xe0680080 0x180>, |
| 153 | <0xe0680200 0x200>, |
| 154 | <0xe0680400 0xc00>; |
| 155 | reg-names = "common", "ts", "pd", "vm"; |
| 156 | intel,vm-map = [03 01 04 ff ff]; |
| 157 | clocks = <&osc0>; |
| 158 | resets = <&rcu0 0x40 7>; |
| 159 | moortec,vm-active-channels = /bits/ 8 <0x10 0x05>; |
| 160 | moortec,vm-pre-scaler-x2 = /bits/ 8 <5 6 20>; |
| 161 | moortec,ts-coeff-g = <61400>; |
| 162 | moortec,ts-coeff-h = <253700>; |
| 163 | #thermal-sensor-cells = <1>; |
| 164 | }; |