1 From 7d4346817f31105ed07dd4e3e9fd2294c85a5fee Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 19 Jan 2022 17:29:13 +0000
4 Subject: [PATCH] dtoverlays: Add option for PoE HAT to use Linux I2C
7 Adds parameter "i2c" to use the PoE HAT I2C MFD driver to instantiate
8 the PoE HAT drivers, instead of being off the firmware.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 arch/arm/boot/dts/overlays/README | 4 ++
13 .../arm/boot/dts/overlays/rpi-poe-overlay.dts | 62 +++++++++++++++----
14 .../dts/overlays/rpi-poe-plus-overlay.dts | 15 +++++
15 3 files changed, 69 insertions(+), 12 deletions(-)
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -2858,6 +2858,8 @@ Params: poe_fan_temp0 Temperat
20 speeds up (default 55000)
21 poe_fan_temp3_hyst Temperature delta (in millicelcius) at which
22 the fan slows down (default 5000)
23 + i2c Control the fan via Linux I2C drivers instead of
28 @@ -2879,6 +2881,8 @@ Params: poe_fan_temp0 Temperat
29 speeds up (default 55000)
30 poe_fan_temp3_hyst Temperature delta (in millicelcius) at which
31 the fan slows down (default 5000)
32 + i2c Control the fan via Linux I2C drivers instead of
37 --- a/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
38 +++ b/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
40 compatible = "brcm,bcm2835";
43 - target = <&firmware>;
46 - compatible = "raspberrypi,firmware-poe-pwm";
62 target = <&cpu_thermal>;
71 target-path = "/__overrides__";
73 poe_fan_temp0 = <&trip0>,"temperature:0";
79 + target = <&firmware>;
82 + compatible = "raspberrypi,firmware-poe-pwm";
91 + #address-cells = <1>;
96 + compatible = "raspberrypi,poe-core";
100 + poe_mfd_pwm: poe_pwm@f0 {
101 + compatible = "raspberrypi,poe-pwm";
111 + target = <&i2c0if>;
118 + target = <&i2c0mux>;
125 poe_fan_temp0 = <&trip0>,"temperature:0";
126 poe_fan_temp0_hyst = <&trip0>,"hysteresis:0";
128 poe_fan_temp2_hyst = <&trip2>,"hysteresis:0";
129 poe_fan_temp3 = <&trip3>,"temperature:0";
130 poe_fan_temp3_hyst = <&trip3>,"hysteresis:0";
131 + i2c = <0>, "-3+4+5+6",
132 + <&fan>,"pwms:0=",<&poe_mfd_pwm>;
135 --- a/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts
136 +++ b/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts
142 + target = <&poe_mfd>;
144 + rpi-poe-power-supply@f2 {
145 + compatible = "raspberrypi,rpi-poe-power-supply";
153 + i2c = <0>, "-3+4+5+6-10+11",
154 + <&fan>,"pwms:0=",<&poe_mfd_pwm>;