dt-bindings: hwmon: convert lm87 and max6650 to dtschema
Subsystems (2)
cover dt-bindings: hwmon: convert lm87 and max6650 to dtschema
This series converts the existing lm87.txt and max6650.txt bindings to dtschema. Both are direct conversions with no additional properties.
There has been an attempt to convert the bindings of the lm87 before [1], but the author (added to recipients) has confirmed that no further versions will be submitted, and no acknowledgment is desired.
---
Javier Carrasco (2):
dt-bindings: hwmon: lm87: convert to dtschema
dt-bindings: hwmon: max6650: convert to dtschema
Documentation/devicetree/bindings/hwmon/lm87.txt | 30 ---------- .../devicetree/bindings/hwmon/max6650.txt | 28 --------- .../devicetree/bindings/hwmon/maxim,max6650.yaml | 68 +++++++++++++++++++++ .../devicetree/bindings/hwmon/ti,lm87.yaml | 69 ++++++++++++++++++++++ 4 files changed, 137 insertions(+), 58 deletions(-)
---
base-commit: a4145ce1e7bc247fd6f2846e8699473448717b37
change-id: 20240320-hwmon_yaml-4d738e3b2c82
Best regards,
Signature · 1 line
Javier Carrasco <[email protected]>
PATCH 1/2 dt-bindings: hwmon: lm87: convert to dtschema
Convert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
--- Documentation/devicetree/bindings/hwmon/lm87.txt | 30 ---------- .../devicetree/bindings/hwmon/ti,lm87.yaml | 69 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 30 deletions(-)
Documentation/devicetree/bindings/hwmon/lm87.txt deleted +0 -30
@@ -1,30 +0,0 @@ -*LM87 hwmon sensor. - -Required properties: -- compatible: Should be - "ti,lm87" - -- reg: I2C address - -optional properties: -- has-temp3: This configures pins 18 and 19 to be used as a second - remote temperature sensing channel. By default the pins - are configured as voltage input pins in0 and in5. - -- has-in6: When set, pin 5 is configured to be used as voltage input - in6. Otherwise the pin is set as FAN1 input. - -- has-in7: When set, pin 6 is configured to be used as voltage input - in7. Otherwise the pin is set as FAN2 input. - -- vcc-supply: a Phandle for the regulator supplying power, can be - configured to measure 5.0V power supply. Default is 3.3V. - -Example: - -lm87@2e { - compatible = "ti,lm87"; - reg = <0x2e>; - has-temp3; - vcc-supply = <®_5v0>; -};
Documentation/devicetree/bindings/hwmon/ti,lm87.yaml new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
2.40.1
Re: [PATCH 1/2] dt-bindings: hwmon: lm87: convert to dtschema
Quoted 5 lines · Javier Carrasco
Convert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
Signed-off-by Javier Carrasco <[email protected]>
Thanks,
Conor.
Re: [PATCH 1/2] dt-bindings: hwmon: lm87: convert to dtschema
In reply to Javier CarrascoQuoted 6 lines · Javier Carrasco
Convert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
Signed-off-by Javier Carrasco <[email protected]>Reviewed-by Conor Dooley <[email protected]>
Applied to hwmon-next.
Please note that I'll push the branch after the commit window closed.
Thanks,
Guenter
PATCH 2/2 dt-bindings: hwmon: max6650: convert to dtschema
In reply to Javier CarrascoConvert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
--- .../devicetree/bindings/hwmon/max6650.txt | 28 --------- .../devicetree/bindings/hwmon/maxim,max6650.yaml | 68 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 28 deletions(-)
Documentation/devicetree/bindings/hwmon/max6650.txt deleted +0 -28
@@ -1,28 +0,0 @@ -Bindings for MAX6651 and MAX6650 I2C fan controllers - -Reference: -[1] https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf - -Required properties: -- compatible : One of "maxim,max6650" or "maxim,max6651" -- reg : I2C address, one of 0x1b, 0x1f, 0x4b, 0x48. - -Optional properties, default is to retain the chip's current setting: -- maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or - 12000000 uV. -- maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values - allow more fine-grained control of slower fans. - Valid: 1, 2, 4, 8, 16. -- maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the - driver selects closed-loop mode and the requested speed. - This ensures the fan is already running before userspace - takes over. - -Example: - fan-max6650: max6650@1b { - reg = <0x1b>; - compatible = "maxim,max6650"; - maxim,fan-microvolt = <12000000>; - maxim,fan-prescale = <4>; - maxim,fan-target-rpm = <1200>; - };
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
2.40.1
Rob Herring
maintainerRe: [PATCH 2/2] dt-bindings: hwmon: max6650: convert to dtschema
Quoted 3 lines · Javier Carrasco
Convert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
Why the indentation?
Quoted 69 lines
Signed-off-by Javier Carrasco <[email protected]>--- .../devicetree/bindings/hwmon/max6650.txt | 28 --------- .../devicetree/bindings/hwmon/maxim,max6650.yaml | 68 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 28 deletions(-)Documentation/devicetree/bindings/hwmon/max6650.txt deleted +0
-28@@ -1,28 +0,0 @@ -Bindings for MAX6651 and MAX6650 I2C fan controllers - -Reference: -[1] https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf - -Required properties: -- compatible : One of "maxim,max6650" or "maxim,max6651" -- reg : I2C address, one of 0x1b, 0x1f, 0x4b, 0x48. - -Optional properties, default is to retain the chip's current setting: -- maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or - 12000000 uV. -- maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values - allow more fine-grained control of slower fans. - Valid: 1, 2, 4, 8, 16. -- maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the - driver selects closed-loop mode and the requested speed. - This ensures the fan is already running before userspace - takes over. - -Example: - fan-max6650: max6650@1b { - reg = <0x1b>; - compatible = "maxim,max6650"; - maxim,fan-microvolt = <12000000>; - maxim,fan-prescale = <4>; - maxim,fan-target-rpm = <1200>; - };Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +22
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/maxim,max6650.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX6650 and MAX6651 I2C Fan Controllers + +maintainers: + - Javier Carrasco <[email protected]> + +description: | + The MAX6650 and MAX6651 regulate and monitor the speed + of 5VDC/12VDC burshless fans with built-in tachometers. + + Datasheets: + https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf + +properties: + compatible: + enum:
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml line 32
Quoted 10 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +10
-0+ - maxim,max6650 + - maxim,max6651 + + reg: + maxItems: 1 + + maxim,fan-microvolt: + description: + The supply voltage of the fan, either 5000000 uV or + 12000000 uV.
Looks like constraints. Please add them.
Quoted 5 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +5
-0+ + maxim,fan-prescale: + description: + Pre-scaling value, as per datasheet. Lower values + allow more fine-grained control of slower fans.
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml line 47
Quoted 10 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +10
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 4, 8, 16] + + maxim,fan-target-rpm: + description: + Initial requested fan rotation speed. If specified, the + driver selects closed-loop mode and the requested speed. + This ensures the fan is already running before userspace + takes over. + $ref: /schemas/types.yaml#/definitions/uint32
Constraints? I'm sure no fan RPM is higher than 10000 and probably much less than that.
Rob
Guenter Roeck
maintainerRe: [PATCH 2/2] dt-bindings: hwmon: max6650: convert to dtschema
Quoted 99 lines · Rob Herring
Quoted 3 lines · Javier Carrasco
Convert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
Why the indentation?
Quoted 69 lines
Signed-off-by Javier Carrasco <[email protected]>--- .../devicetree/bindings/hwmon/max6650.txt | 28 --------- .../devicetree/bindings/hwmon/maxim,max6650.yaml | 68 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 28 deletions(-)Documentation/devicetree/bindings/hwmon/max6650.txt deleted +0
-28@@ -1,28 +0,0 @@ -Bindings for MAX6651 and MAX6650 I2C fan controllers - -Reference: -[1] https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf - -Required properties: -- compatible : One of "maxim,max6650" or "maxim,max6651" -- reg : I2C address, one of 0x1b, 0x1f, 0x4b, 0x48. - -Optional properties, default is to retain the chip's current setting: -- maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or - 12000000 uV. -- maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values - allow more fine-grained control of slower fans. - Valid: 1, 2, 4, 8, 16. -- maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the - driver selects closed-loop mode and the requested speed. - This ensures the fan is already running before userspace - takes over. - -Example: - fan-max6650: max6650@1b { - reg = <0x1b>; - compatible = "maxim,max6650"; - maxim,fan-microvolt = <12000000>; - maxim,fan-prescale = <4>; - maxim,fan-target-rpm = <1200>; - };Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +22
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/maxim,max6650.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX6650 and MAX6651 I2C Fan Controllers + +maintainers: + - Javier Carrasco <[email protected]> + +description: | + The MAX6650 and MAX6651 regulate and monitor the speed + of 5VDC/12VDC burshless fans with built-in tachometers. + + Datasheets: + https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf + +properties: + compatible: + enum:Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml line 32
Quoted 10 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +10
-0+ - maxim,max6650 + - maxim,max6651 + + reg: + maxItems: 1 + + maxim,fan-microvolt: + description: + The supply voltage of the fan, either 5000000 uV or + 12000000 uV.Looks like constraints. Please add them.
Quoted 10 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +10
-0+ + maxim,fan-prescale: + description: + Pre-scaling value, as per datasheet. Lower values + allow more fine-grained control of slower fans. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 4, 8, 16] + + maxim,fan-target-rpm: + description:
Quoted 9 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml line 47
Quoted 5 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +5
-0+ Initial requested fan rotation speed. If specified, the + driver selects closed-loop mode and the requested speed. + This ensures the fan is already running before userspace + takes over. + $ref: /schemas/types.yaml#/definitions/uint32Constraints? I'm sure no fan RPM is higher than 10000 and probably much less than that.
There are industrial fans with much higher rpm. mouser.com lists one with more than 60,000 rpm, but I am sure I have seen some with more than 100k rpm.
Guenter
Re: [PATCH 2/2] dt-bindings: hwmon: max6650: convert to dtschema
In reply to Rob HerringQuoted 7 lines · Rob Herring
Quoted 3 lines · Javier Carrasco
Convert existing bindings to dtschema to support validation.
This is a straightforward conversion with no new properties.
Why the indentation?
Will be fixed for v2
Quoted 73 lines
Quoted 73 lines
Signed-off-by Javier Carrasco <[email protected]>--- .../devicetree/bindings/hwmon/max6650.txt | 28 --------- .../devicetree/bindings/hwmon/maxim,max6650.yaml | 68 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 28 deletions(-)Documentation/devicetree/bindings/hwmon/max6650.txt deleted +0
-28@@ -1,28 +0,0 @@ -Bindings for MAX6651 and MAX6650 I2C fan controllers - -Reference: -[1] https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf - -Required properties: -- compatible : One of "maxim,max6650" or "maxim,max6651" -- reg : I2C address, one of 0x1b, 0x1f, 0x4b, 0x48. - -Optional properties, default is to retain the chip's current setting: -- maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or - 12000000 uV. -- maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values - allow more fine-grained control of slower fans. - Valid: 1, 2, 4, 8, 16. -- maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the - driver selects closed-loop mode and the requested speed. - This ensures the fan is already running before userspace - takes over. - -Example: - fan-max6650: max6650@1b { - reg = <0x1b>; - compatible = "maxim,max6650"; - maxim,fan-microvolt = <12000000>; - maxim,fan-prescale = <4>; - maxim,fan-target-rpm = <1200>; - };Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +26
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/maxim,max6650.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX6650 and MAX6651 I2C Fan Controllers + +maintainers: + - Javier Carrasco <[email protected]> + +description: | + The MAX6650 and MAX6651 regulate and monitor the speed + of 5VDC/12VDC burshless fans with built-in tachometers. + + Datasheets: + https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf + +properties: + compatible: + enum: + - maxim,max6650 + - maxim,max6651 + + reg:
Quoted 9 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml line 32
Quoted 6 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +6
-0+ maxItems: 1 + + maxim,fan-microvolt: + description: + The supply voltage of the fan, either 5000000 uV or + 12000000 uV.Looks like constraints. Please add them.
Will add enum: [5000000, 12000000]
Quoted 19 lines
Quoted 5 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +5
-0+ + maxim,fan-prescale: + description: + Pre-scaling value, as per datasheet. Lower values + allow more fine-grained control of slower fans.Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml line 47
Quoted 10 lines
Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml new file +10
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 4, 8, 16] + + maxim,fan-target-rpm: + description: + Initial requested fan rotation speed. If specified, the + driver selects closed-loop mode and the requested speed. + This ensures the fan is already running before userspace + takes over. + $ref: /schemas/types.yaml#/definitions/uint32Constraints? I'm sure no fan RPM is higher than 10000 and probably much less than that.
Quoted 1 line
Rob
According to the datasheet (page 9, table 3. Fan Speed), the highest fan speed that can be achieved is 30000 RPM (which does not mean that fans actually reach that speed). I could use that as the maximum value, though.
Thanks for the review and best regards,
Javier Carrasco