Add optional temperature coefficient properties:
*) moortec,ts-coeff-g
*) moortec,ts-coeff-h
*) moortec,ts-coeff-cal5
*) moortec,ts-coeff-j
If defined they shall be used instead of defaults.
The coefficients were added to device tree on top of the series property
(which can be used to select between series 5 and series 6), because
coefficients can vary between product and product, and code defaults might
not be accurate enough.
Signed-off-by: Eliav Farber <[email protected]>
---
V4 -> V3:
- Add 'multipleOf: 1000' instead of plain text.
- Add minimum/maximum for some of the new properties.
V3 -> V2:
- Add "moortec" prefix to property name.
.../bindings/hwmon/moortec,mr75203.yaml | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
index df849517464e..d0d549749208 100644
--- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
+++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
@@ -100,6 +100,41 @@ properties:
default: 5
$ref: /schemas/types.yaml#/definitions/uint32
+ moortec,ts-coeff-g:
+ description:
+ G coefficient for temperature equation.
+ Default for series 5 = 60000
+ Default for series 6 = 57400
+ multipleOf: 1000
+ minimum: 1000
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ moortec,ts-coeff-h:
+ description:
+ H coefficient for temperature equation.
+ Default for series 5 = 200000
+ Default for series 6 = 249400
+ multipleOf: 1000
+ minimum: 1000
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ moortec,ts-coeff-cal5:
+ description:
+ cal5 coefficient for temperature equation.
+ Default for series 5 = 4094
+ Default for series 6 = 4096
+ minimum: 1
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ moortec,ts-coeff-j:
+ description:
+ J coefficient for temperature equation.
+ Default for series 5 = -100
+ Default for series 6 = 0
+ multipleOf: 1000
+ maximum: 0
+ $ref: /schemas/types.yaml#/definitions/int32
+
required:
- compatible
- reg
@@ -123,5 +158,7 @@ examples:
resets = <&rcu0 0x40 7>;
moortec,vm-active-channels = /bits/ 8 <0x10 0x05>;
moortec,vm-pre-scaler-x2 = /bits/ 8 <5 6 20>;
+ moortec,ts-coeff-g = <61400>;
+ moortec,ts-coeff-h = <253700>;
#thermal-sensor-cells = <1>;
};
--
2.37.1
On Thu, 08 Sep 2022 15:24:46 +0000, Eliav Farber wrote:
> Add optional temperature coefficient properties:
> *) moortec,ts-coeff-g
> *) moortec,ts-coeff-h
> *) moortec,ts-coeff-cal5
> *) moortec,ts-coeff-j
> If defined they shall be used instead of defaults.
>
> The coefficients were added to device tree on top of the series property
> (which can be used to select between series 5 and series 6), because
> coefficients can vary between product and product, and code defaults might
> not be accurate enough.
>
> Signed-off-by: Eliav Farber <[email protected]>
> ---
> V4 -> V3:
> - Add 'multipleOf: 1000' instead of plain text.
> - Add minimum/maximum for some of the new properties.
>
> V3 -> V2:
> - Add "moortec" prefix to property name.
>
> .../bindings/hwmon/moortec,mr75203.yaml | 37 +++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
Reviewed-by: Rob Herring <[email protected]>
On Thu, Sep 08, 2022 at 03:24:46PM +0000, Eliav Farber wrote:
> Add optional temperature coefficient properties:
> *) moortec,ts-coeff-g
> *) moortec,ts-coeff-h
> *) moortec,ts-coeff-cal5
> *) moortec,ts-coeff-j
> If defined they shall be used instead of defaults.
>
> The coefficients were added to device tree on top of the series property
> (which can be used to select between series 5 and series 6), because
> coefficients can vary between product and product, and code defaults might
> not be accurate enough.
>
> Signed-off-by: Eliav Farber <[email protected]>
> Reviewed-by: Rob Herring <[email protected]>
Applied to hwmon-next.
Thanks,
Guenter