]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dt-bindings: pwm: Add binding for RPi firmware PWM bus
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Mon, 18 Jan 2021 12:32:42 +0000 (13:32 +0100)
committerNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Mon, 22 Mar 2021 16:59:52 +0000 (17:59 +0100)
The PWM bus controlling the fan in RPi's official PoE hat can only be
controlled by the board's co-processor.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h [new file with mode: 0644]

index a2c63c8b1d10bfea6bff9e3dd4d1bcb1c7e2e7e5..e3664eab0f6a9b87a7729175f38ce04a55eae876 100644 (file)
@@ -64,6 +64,21 @@ properties:
       - compatible
       - "#reset-cells"
 
+  pwm:
+    type: object
+
+    properties:
+      compatible:
+        const: raspberrypi,firmware-poe-pwm
+
+      "#pwm-cells":
+        # See pwm.yaml in this directory for a description of the cells format.
+        const: 2
+
+    required:
+      - compatible
+      - "#pwm-cells"
+
     additionalProperties: false
 
 required:
@@ -87,5 +102,10 @@ examples:
             compatible = "raspberrypi,firmware-reset";
             #reset-cells = <1>;
         };
+
+        pwm: pwm {
+            compatible = "raspberrypi,firmware-poe-pwm";
+            #pwm-cells = <2>;
+        };
     };
 ...
diff --git a/include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h b/include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h
new file mode 100644 (file)
index 0000000..27c5ce6
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2020 Nicolas Saenz Julienne
+ * Author: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+ */
+
+#ifndef _DT_BINDINGS_RASPBERRYPI_FIRMWARE_PWM_H
+#define _DT_BINDINGS_RASPBERRYPI_FIRMWARE_PWM_H
+
+#define RASPBERRYPI_FIRMWARE_PWM_POE           0
+#define RASPBERRYPI_FIRMWARE_PWM_NUM           1
+
+#endif