Skip to content

Commit 9d045b3

Browse files
committed
Overlays: Added support for rpi-power HAT
Added 2 overlays for the rpi-power HAT to operate in either TOP or BOTTOM mode. Modified makefile and readme accordingly Signed-off-by: Lucas Hoffmann <lucas.hoffmann@raspberrypi.com>
1 parent 523119e commit 9d045b3

File tree

4 files changed

+136
-0
lines changed

4 files changed

+136
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
247247
rpi-fw-uart.dtbo \
248248
rpi-poe.dtbo \
249249
rpi-poe-plus.dtbo \
250+
rpi-power-hat-b.dtbo \
251+
rpi-power-hat-t.dtbo \
250252
rpi-sense.dtbo \
251253
rpi-sense-v2.dtbo \
252254
rpi-tv.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,6 +4465,18 @@ Params: poe_fan_temp0 Temperature (in millicelcius) at which the fan
44654465
the firmware.
44664466

44674467

4468+
Name: rpi-power-hat-b
4469+
Info: Raspberry Pi Power HAT Bottom
4470+
Load: dtoverlay=rpi-power-hat-b
4471+
Params: <None>
4472+
4473+
4474+
Name: rpi-power-hat-t
4475+
Info: Raspberry Pi Power HAT Top
4476+
Load: dtoverlay=rpi-power-hat-t
4477+
Params: <None>
4478+
4479+
44684480
Name: rpi-proto
44694481
Info: This overlay has been renamed to proto-codec.
44704482
Load: <Deprecated>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/dts-v1/;
3+
/plugin/;
4+
5+
// Overlay for the Raspberry Pi Power Hat.
6+
// 1 of 2 overlays required for top/bottom interchangeability
7+
8+
/ {
9+
compatible = "brcm,bcm2835";
10+
11+
fragment@0 {
12+
target = <&i2c1>;
13+
__overlay__ {
14+
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
18+
power_control: fxl6408@43 {
19+
reg = <0x43>;
20+
compatible = "fcs,fxl6408";
21+
gpio-controller;
22+
#gpio-cells = <2>;
23+
gpio-line-names =
24+
"B1_PWR",
25+
"B2_PWR",
26+
"B3",
27+
"B4",
28+
"B5",
29+
"B6",
30+
"B7",
31+
"B8";
32+
};
33+
34+
pwr1_monitor: ina260@42 {
35+
reg = <0x42>;
36+
compatible = "ti,ina260";
37+
};
38+
39+
pwr2_monitor: ina260@4c {
40+
reg = <0x4c>;
41+
compatible = "ti,ina260";
42+
};
43+
};
44+
};
45+
46+
fragment@1 {
47+
target-path = "/";
48+
__overlay__ {
49+
rpi_power_hat_b: rpi-power-hat-b {
50+
compatible = "raspberrypi,rpi-power-hat-b";
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
// References to the I2C devices
55+
power-controller = <&power_control>;
56+
power1-monitor = <&pwr1_monitor>;
57+
power2-monitor = <&pwr2_monitor>;
58+
};
59+
};
60+
};
61+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/dts-v1/;
3+
/plugin/;
4+
5+
// Overlay for the Raspberry Pi Power Hat.
6+
// 2 of 2 overlays required for top/bottom interchangeability
7+
8+
/ {
9+
compatible = "brcm,bcm2835";
10+
11+
fragment@0 {
12+
target = <&i2c1>;
13+
__overlay__ {
14+
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
18+
power_control: fxl6408@44 {
19+
reg = <0x44>;
20+
compatible = "fcs,fxl6408";
21+
gpio-controller;
22+
#gpio-cells = <2>;
23+
gpio-line-names =
24+
"T1_PWR",
25+
"T2_PWR",
26+
"T3",
27+
"T4",
28+
"T5",
29+
"T6",
30+
"T7",
31+
"T8";
32+
};
33+
34+
pwr1_monitor: ina260@46 {
35+
reg = <0x46>;
36+
compatible = "ti,ina260";
37+
};
38+
39+
pwr2_monitor: ina260@4d {
40+
reg = <0x4d>;
41+
compatible = "ti,ina260";
42+
};
43+
};
44+
};
45+
46+
fragment@1 {
47+
target-path = "/";
48+
__overlay__ {
49+
rpi_power_hat_t: rpi-power-hat-t {
50+
compatible = "raspberrypi,rpi-power-hat-t";
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
// References to the I2C devices
55+
power-controller = <&power_control>;
56+
power1-monitor = <&pwr1_monitor>;
57+
power2-monitor = <&pwr2_monitor>;
58+
};
59+
};
60+
};
61+
};

0 commit comments

Comments
 (0)