From: Conor Dooley <conor@kernel.org>
To: Robert Marko <robert.marko@sartura.hr>
Cc: linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org,
rdunlap@infradead.org, Steen.Hegelund@microchip.com,
daniel.machon@microchip.com, UNGLinuxDriver@microchip.com,
nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, luka.perkov@sartura.hr
Subject: Re: [PATCH v2 1/6] dt-bindings: hwmon: add Microchip LAN969x fan controller
Date: Mon, 9 Nov 2026 19:14:22 +0000 [thread overview]
Message-ID: <20261109-mulch-mountain-118fd114a797@spud> (raw)
In-Reply-To: <20261109133609.810876-1-robert.marko@sartura.hr>
[-- Attachment #1: Type: text/plain, Size: 4403 bytes --]
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@sartura.hr>
> ---
> Changes in v2:
> - Describe the fan controller in a separate binding and compatible.
> - Keep the existing temperature-sensor binding unchanged.
So, I think that this device has been modelled incorrectly from the
outset. "devcpu_gcb" should probably be a syscon/simplemfd, as least
going off of what I see in
https://microchip-ung.github.io/lan969x-automotive_reginfo/reginfo_LAN969x-Automotive.html?select=devcpu_gcb
and the fact that we see silly offsets in the dts:
reset: reset-controller@e201000c {
reg = <0xe201000c 0x4>;
};
gpio: pinctrl@e20100d4 {
reg = <0xe20100d4 0xd4>,
<0xe2010370 0xa8>;
};
mdio0: mdio@e20101a8 {
reg = <0xe20101a8 0x24>;
};
mdio1: mdio@e20101cc {
reg = <0xe20101cc 0x24>;
};
sgpio: gpio@e2010230 {
reg = <0xe2010230 0x118>;
};
That ship has sailed I think though, so I'm not going to ask you to
rework this whole device.
>
> .../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@sartura.hr>
> +
> +description: |
> + 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
> + default: 2
> +
> + required:
> + - pwms
> +
> + dependencies:
> + '#cooling-cells':
> + - cooling-levels
> + cooling-levels:
> + - '#cooling-cells'
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - '#pwm-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/pwm/pwm.h>
> +
> + fanctrl: fan-controller@e2010348 {
> + compatible = "microchip,lan9691-fan";
> + reg = <0xe2010348 0xc>;
btw, how do I translate the addresses you have here to those in
https://microchip-ung.github.io/lan969x-automotive_reginfo/reginfo_LAN969x-Automotive.html?select=devcpu_gcb,fan_ctrl
? Or are you looking at a register map in a different form?
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
Cheers,
Conor.
> + clocks = <&sys_clk>;
> + #pwm-cells = <2>;
> +
> + fan {
> + pwms = <&fanctrl 40000 PWM_POLARITY_INVERTED>;
> + cooling-levels = <0 128 192 255>;
> + #cooling-cells = <2>;
> + };
> + };
> --
> 2.56.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-11-09 19:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 13:35 Robert Marko
2026-11-09 13:35 ` [PATCH v2 2/6] hwmon: sparx5: separate temperature reading from sensor dispatch Robert Marko
2026-11-09 13:35 ` [PATCH v2 3/6] hwmon: sparx5: add LAN969x fan monitoring support Robert Marko
2026-11-09 13:35 ` [PATCH v2 4/6] hwmon: sparx5: add LAN969x PWM support Robert Marko
2026-11-09 13:35 ` [PATCH v2 5/6] hwmon: sparx5: register LAN969x fan as a cooling device Robert Marko
2026-11-09 13:35 ` [PATCH v2 6/6] arm64: dts: microchip: lan969x: add fan controller Robert Marko
2026-11-09 19:14 ` Conor Dooley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261109-mulch-mountain-118fd114a797@spud \
--to=conor@kernel.org \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=daniel.machon@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luka.perkov@sartura.hr \
--cc=nicolas.ferre@microchip.com \
--cc=rdunlap@infradead.org \
--cc=robert.marko@sartura.hr \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®