mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/6] dt-bindings: hwmon: add Microchip LAN969x fan controller
@ 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
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Robert Marko @ 2026-11-09 13:35 UTC (permalink / raw)
  To: linux, robh, krzk+dt, conor+dt, corbet, skhan, rdunlap,
	Steen.Hegelund, daniel.machon, UNGLinuxDriver, nicolas.ferre,
	claudiu.beznea, linux-hwmon, devicetree, linux-kernel, linux-doc,
	linux-arm-kernel
  Cc: luka.perkov, Robert Marko

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.

 .../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>;
+        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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-09 19:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 13:35 [PATCH v2 1/6] dt-bindings: hwmon: add Microchip LAN969x fan controller 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 ` [PATCH v2 1/6] dt-bindings: hwmon: add Microchip LAN969x " Conor Dooley

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®