Re: [PATCH v2 1/6] dt-bindings: hwmon: add Microchip LAN969x fan controller

From: Robert Marko

Date: Wed Nov 11 2026 - 07:36:39 EST


On Tue, Nov 10, 2026 at 3:54 PM Rob Herring <robh@xxxxxxxxxx> wrote:
>
> On Mon, Nov 09, 2026 at 02:35:05PM +0100, Robert Marko wrote:
> > The LAN969x fan controller has a PWM output and tachometer input in a
> > register block separate from the Sparx5-compatible temperature sensor.
> > Describe it with its own compatible and binding.
> >
> > The optional fan child specifies PWM period and polarity, tachometer
> > pulses per revolution, and thermal cooling levels.
> >
> > Signed-off-by: Robert Marko <robert.marko@xxxxxxxxxx>
> > ---
> > Changes in v2:
> > - Describe the fan controller in a separate binding and compatible.
> > - Keep the existing temperature-sensor binding unchanged.
> >
> > .../bindings/hwmon/microchip,lan9691-fan.yaml | 83 +++++++++++++++++++
> > 1 file changed, 83 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,lan9691-fan.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/hwmon/microchip,lan9691-fan.yaml b/Documentation/devicetree/bindings/hwmon/microchip,lan9691-fan.yaml
> > new file mode 100644
> > index 0000000000000..0b7d38a6d20ae
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/hwmon/microchip,lan9691-fan.yaml
> > @@ -0,0 +1,83 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/hwmon/microchip,lan9691-fan.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Microchip LAN969x Fan Controller
> > +
> > +maintainers:
> > + - Robert Marko <robert.marko@xxxxxxxxxx>
> > +
> > +description: |
>
> Don't need '|'

Hi Rob,

Got it, will drop in v3.

>
> > + LAN969x fan controller with a PWM output and tachometer input. The fan
> > + child's pwms property references this node to specify the PWM period and
> > + polarity.
> > +
> > +properties:
> > + compatible:
> > + const: microchip,lan9691-fan
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + items:
> > + - description: System reference clock
> > +
> > + '#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
>
> Drop. That's already the max in fan-common.yaml. minimum should be added
> there too as 0 would never make sense.

Ok, will add 1 as minimum in fan-common.yaml as a separate commit in v3.

>
> > + default: 2
> > +
> > + required:
> > + - pwms
> > +
> > + dependencies:
> > + '#cooling-cells':
> > + - cooling-levels
> > + cooling-levels:
> > + - '#cooling-cells'
>
> The dependencies should also go in fan-common.yaml. Perhaps
> cooling-levels without #cooling-cells might make sense sometimes?

I removed cooling-levels requiring #cooling-cells, as it can
technically work without it, its not ideal, but it works.

I am not sure if its feasible for fan-common.yaml though as we already
have schemas for EMC2305, and more importantly
DTS-es for freescale/imx95-tqma9596la-mba95xxca.dts and
rockchip/rk3568-radxa-cm3j-rpi-cm4.dts
that have #cooling-cells without cooling-levels.
EMC2305 driver even calculates cooling states without a levels table.

I would appreciate guidance on how to proceed with this.

Regards,
Robert

>
> Rob



--
Robert Marko
Staff Embedded Linux Engineer
Sartura d.d.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@xxxxxxxxxx
Web: www.sartura.hr