[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210118123244.13669-11-nsaenzjulienne@suse.de>
Date: Mon, 18 Jan 2021 13:32:43 +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>
Subject: [PATCH v7 10/11] DO NOT MERGE: ARM: dts: Add RPi's official PoE hat support
This is an example on how to enable the fan on top of RPi's official PoE
hat.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
---
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 54 +++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index 403bacf986eb..9ae44620c5b8 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -5,6 +5,7 @@
#include "bcm283x-rpi-usb-peripheral.dtsi"
#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
+#include <dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h>
/ {
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
@@ -68,6 +69,54 @@ sd_vcc_reg: sd_vcc_reg {
enable-active-high;
gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
};
+
+ fan: pwm-fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 50 150 255>;
+ #cooling-cells = <2>;
+ pwms = <&fwpwm RASPBERRYPI_FIRMWARE_PWM_POE 80000>;
+ };
+
+ thermal-zones {
+ cpu_thermal: cpu-thermal {
+ trips {
+ threshold: trip-point@0 {
+ temperature = <45000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ target: trip-point@1 {
+ temperature = <50000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ cpu_hot: cpu_hot@0 {
+ temperature = <55000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&threshold>;
+ cooling-device = <&fan 0 1>;
+ };
+
+ map1 {
+ trip = <&target>;
+ cooling-device = <&fan 1 2>;
+ };
+
+ map2 {
+ trip = <&cpu_hot>;
+ cooling-device = <&fan 2 3>;
+ };
+ };
+ };
+ };
};
&ddc0 {
@@ -103,6 +152,11 @@ reset: reset {
compatible = "raspberrypi,firmware-reset";
#reset-cells = <1>;
};
+
+ fwpwm: pwm {
+ compatible = "raspberrypi,firmware-poe-pwm";
+ #pwm-cells = <2>;
+ };
};
&gpio {
--
2.29.2
Powered by blists - more mailing lists