[PATCH 1/6] dt-bindings: hwmon: sparx5: add LAN969x fan controller
Conor Dooley
conor at kernel.org
Tue Oct 13 09:38:08 PDT 2026
On Tue, Oct 13, 2026 at 05:30:29PM +0100, Conor Dooley wrote:
> On Tue, Oct 13, 2026 at 02:56:25PM +0200, Robert Marko wrote:
> > LAN969x integrates a PWM fan controller with a tachometer input in
> > addition to the Sparx5-compatible temperature sensor. Add a LAN969x
> > hardware-monitor compatible and describe the second register region.
> >
> > Describe the fan as a child node using a two-cell PWM specifier for the
> > period and standard polarity flags. The child also carries the optional
> > tachometer pulses-per-revolution and thermal cooling properties.
> >
> > Keep the existing microchip,lan9691-temp compatible for device tree ABI
> > compatibility.
> >
> > Signed-off-by: Robert Marko <robert.marko at sartura.hr>
> > ---
> > .../bindings/hwmon/microchip,sparx5-temp.yaml | 90 ++++++++++++++++++-
> > 1 file changed, 87 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml b/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml
> > index 611fcadb1e771..e91c2a3ccd3c9 100644
> > --- a/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml
> > +++ b/Documentation/devicetree/bindings/hwmon/microchip,sparx5-temp.yaml
> > @@ -4,13 +4,15 @@
> > $id: http://devicetree.org/schemas/hwmon/microchip,sparx5-temp.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: Microchip Sparx5 Temperature Monitor
> > +title: Microchip Sparx5 Hardware Monitor
> >
> > maintainers:
> > - Lars Povlsen <lars.povlsen at microchip.com>
> >
> > description: |
> > - Microchip Sparx5 embedded temperature monitor
> > + Microchip Sparx5 temperature monitor with a fan controller on LAN969x.
> > + The fan child's pwms property references this node to specify the
> > + PWM period and polarity.
> >
> > properties:
> > compatible:
> > @@ -18,11 +20,19 @@ properties:
> > - const: microchip,sparx5-temp
> > - items:
> > - enum:
> > + - microchip,lan9691-hwmon
> > - microchip,lan9691-temp
> > - const: microchip,sparx5-temp
> >
> > reg:
> > - maxItems: 1
> > + minItems: 1
> > + maxItems: 2
> > +
> > + reg-names:
> > + minItems: 1
> > + items:
> > + - const: temp
> > + - const: fan
> >
> > clocks:
> > items:
> > @@ -31,11 +41,67 @@ properties:
> > '#thermal-sensor-cells':
> > const: 0
> >
> > + '#pwm-cells':
> > + const: 2
> > + description: |
> > + Number of cells in a PWM specifier.
> > + - cell 0: PWM period in nanoseconds
> > + - cell 1: PWM polarity: 0 or PWM_POLARITY_INVERTED
> > +
> > + fan:
> > + $ref: fan-common.yaml#
> > + unevaluatedProperties: false
> > +
> > + properties:
> > + cooling-levels:
> > + description:
> > + PWM duty-cycle values corresponding to thermal cooling states.
> > + items:
> > + maximum: 255
> > +
> > + pulses-per-revolution:
> > + minimum: 1
> > + maximum: 4
> > + default: 2
> > +
> > + required:
> > + - pwms
> > +
> > + dependencies:
> > + '#cooling-cells':
> > + - cooling-levels
> > + cooling-levels:
> > + - '#cooling-cells'
> > +
> > required:
> > - compatible
> > - reg
> > - clocks
> >
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: microchip,lan9691-hwmon
> > + then:
> > + properties:
> > + reg:
> > + minItems: 2
> > + reg-names:
> > + minItems: 2
> > + required:
> > + - '#pwm-cells'
> > + - reg-names
> > + else:
> > + properties:
> > + '#pwm-cells': false
> > + fan: false
> > + reg:
> > + maxItems: 1
> > + reg-names:
> > + maxItems: 1
> > +
> > additionalProperties: false
> >
> > examples:
> > @@ -46,3 +112,21 @@ examples:
> > #thermal-sensor-cells = <0>;
> > clocks = <&sys_clk>;
> > };
> > +
> > + - |
> > + #include <dt-bindings/pwm/pwm.h>
> > +
> > + hwmon: hwmon at e2020100 {
> > + compatible = "microchip,lan9691-hwmon", "microchip,sparx5-temp";
> > + reg = <0xe2020100 0xc>, <0xe2010348 0xc>;
>
> Are these actually the same device? These are somewhat disparate
> register regions - and the second is at a very odd offset.
>
Hmm, doubly suspect since there's already a lan9691-temp compatible...
> Thanks,
> Conor.
>
> > + reg-names = "temp", "fan";
> > + #pwm-cells = <2>;
> > + #thermal-sensor-cells = <0>;
> > + clocks = <&sys_clk>;
> > +
> > + fan {
> > + pwms = <&hwmon 40000 PWM_POLARITY_INVERTED>;
> > + cooling-levels = <0 128 192 255>;
> > + #cooling-cells = <2>;
> > + };
> > + };
> > --
> > 2.56.0
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261013/b152eb40/attachment.sig>
More information about the linux-arm-kernel
mailing list