[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210312122454.24480-10-nsaenzjulienne@suse.de>
Date: Fri, 12 Mar 2021 13:24:52 +0100
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: u.kleine-koenig@...gutronix.de
Cc: f.fainelli@...il.com, linux-kernel@...r.kernel.org,
linux-pwm@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
wahrenst@....net, linux-input@...r.kernel.org,
dmitry.torokhov@...il.com, gregkh@...uxfoundation.org,
devel@...verdev.osuosl.org, p.zabel@...gutronix.de,
linux-gpio@...r.kernel.org, linus.walleij@...aro.org,
linux-clk@...r.kernel.org, sboyd@...nel.org,
linux-rpi-kernel@...ts.infradead.org, bgolaszewski@...libre.com,
andy.shevchenko@...il.com,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Rob Herring <robh@...nel.org>
Subject: [PATCH v8 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus
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@...e.de>
Reviewed-by: Rob Herring <robh@...nel.org>
---
Changes since v4:
- Rename compatible string to be more explicit with the bus' limitations
Changes since v3:
- Fix example
Changes since v1:
- Update bindings to use 2 #pwm-cells
.../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 20 +++++++++++++++++++
.../pwm/raspberrypi,firmware-poe-pwm.h | 13 ++++++++++++
2 files changed, 33 insertions(+)
create mode 100644 include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
index a2c63c8b1d10..e3664eab0f6a 100644
--- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
@@ -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
index 000000000000..27c5ce68847b
--- /dev/null
+++ b/include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2020 Nicolas Saenz Julienne
+ * Author: Nicolas Saenz Julienne <nsaenzjulienne@...e.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
--
2.30.1
Powered by blists - more mailing lists