raspberry-pi."4": update poe hat overlay to work with newer kernel

fixes #626

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes 2023-05-11 21:29:42 +02:00
parent 51559e691f
commit 1ffd9949ee
No known key found for this signature in database
GPG key ID: 074048E893713170
2 changed files with 144 additions and 126 deletions

View file

@ -16,7 +16,7 @@ in {
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
{ {
name = "rpi-poe-overlay"; name = "rpi-poe-overlay";
dtsText = '' dtsText = ''
@ -27,7 +27,7 @@ in {
/plugin/; /plugin/;
/ { / {
compatible = "brcm,bcm2711"; compatible = "brcm,bcm2835";
fragment@0 { fragment@0 {
target-path = "/"; target-path = "/";
@ -44,50 +44,59 @@ in {
fragment@1 { fragment@1 {
target = <&cpu_thermal>; target = <&cpu_thermal>;
__overlay__ { __overlay__ {
trips { polling-delay = <2000>; /* milliseconds */
trip0: trip0 {
temperature = <40000>;
hysteresis = <2000>;
type = "active";
};
trip1: trip1 {
temperature = <45000>;
hysteresis = <2000>;
type = "active";
};
trip2: trip2 {
temperature = <50000>;
hysteresis = <2000>;
type = "active";
};
trip3: trip3 {
temperature = <55000>;
hysteresis = <5000>;
type = "active";
};
};
cooling-maps {
map0 {
trip = <&trip0>;
cooling-device = <&fan 0 1>;
};
map1 {
trip = <&trip1>;
cooling-device = <&fan 1 2>;
};
map2 {
trip = <&trip2>;
cooling-device = <&fan 2 3>;
};
map3 {
trip = <&trip3>;
cooling-device = <&fan 3 4>;
};
};
}; };
}; };
fragment@2 { fragment@2 {
target = <&thermal_trips>;
__overlay__ {
trip0: trip0 {
temperature = <40000>;
hysteresis = <2000>;
type = "active";
};
trip1: trip1 {
temperature = <45000>;
hysteresis = <2000>;
type = "active";
};
trip2: trip2 {
temperature = <50000>;
hysteresis = <2000>;
type = "active";
};
trip3: trip3 {
temperature = <55000>;
hysteresis = <5000>;
type = "active";
};
};
};
fragment@3 {
target = <&cooling_maps>;
__overlay__ {
map0 {
trip = <&trip0>;
cooling-device = <&fan 0 1>;
};
map1 {
trip = <&trip1>;
cooling-device = <&fan 1 2>;
};
map2 {
trip = <&trip2>;
cooling-device = <&fan 2 3>;
};
map3 {
trip = <&trip3>;
cooling-device = <&fan 3 4>;
};
};
};
fragment@4 {
target-path = "/__overrides__"; target-path = "/__overrides__";
params: __overlay__ { params: __overlay__ {
poe_fan_temp0 = <&trip0>,"temperature:0"; poe_fan_temp0 = <&trip0>,"temperature:0";
@ -104,7 +113,7 @@ in {
}; };
}; };
fragment@3 { fragment@5 {
target = <&firmware>; target = <&firmware>;
__overlay__ { __overlay__ {
fwpwm: pwm { fwpwm: pwm {
@ -114,7 +123,7 @@ in {
}; };
}; };
fragment@4 { fragment@6 {
target = <&i2c0>; target = <&i2c0>;
i2c_bus: __overlay__ { i2c_bus: __overlay__ {
#address-cells = <1>; #address-cells = <1>;
@ -135,14 +144,14 @@ in {
}; };
}; };
fragment@5 { fragment@7 {
target = <&i2c0if>; target = <&i2c0if>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";
}; };
}; };
fragment@6 { fragment@8 {
target = <&i2c0mux>; target = <&i2c0mux>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";

View file

@ -17,8 +17,8 @@ in {
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# Combined equivalent to: # Combined equivalent to:
# * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
# * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts
{ {
name = "rpi-poe-plus-overlay"; name = "rpi-poe-plus-overlay";
dtsText = '' dtsText = ''
@ -29,7 +29,7 @@ in {
/plugin/; /plugin/;
/ { / {
compatible = "brcm,bcm2711"; compatible = "brcm,bcm2835";
fragment@0 { fragment@0 {
target-path = "/"; target-path = "/";
@ -46,50 +46,59 @@ in {
fragment@1 { fragment@1 {
target = <&cpu_thermal>; target = <&cpu_thermal>;
__overlay__ { __overlay__ {
trips { polling-delay = <2000>; /* milliseconds */
trip0: trip0 {
temperature = <40000>;
hysteresis = <2000>;
type = "active";
};
trip1: trip1 {
temperature = <45000>;
hysteresis = <2000>;
type = "active";
};
trip2: trip2 {
temperature = <50000>;
hysteresis = <2000>;
type = "active";
};
trip3: trip3 {
temperature = <55000>;
hysteresis = <5000>;
type = "active";
};
};
cooling-maps {
map0 {
trip = <&trip0>;
cooling-device = <&fan 0 1>;
};
map1 {
trip = <&trip1>;
cooling-device = <&fan 1 2>;
};
map2 {
trip = <&trip2>;
cooling-device = <&fan 2 3>;
};
map3 {
trip = <&trip3>;
cooling-device = <&fan 3 4>;
};
};
}; };
}; };
fragment@2 { fragment@2 {
target = <&thermal_trips>;
__overlay__ {
trip0: trip0 {
temperature = <40000>;
hysteresis = <2000>;
type = "active";
};
trip1: trip1 {
temperature = <45000>;
hysteresis = <2000>;
type = "active";
};
trip2: trip2 {
temperature = <50000>;
hysteresis = <2000>;
type = "active";
};
trip3: trip3 {
temperature = <55000>;
hysteresis = <5000>;
type = "active";
};
};
};
fragment@3 {
target = <&cooling_maps>;
__overlay__ {
map0 {
trip = <&trip0>;
cooling-device = <&fan 0 1>;
};
map1 {
trip = <&trip1>;
cooling-device = <&fan 1 2>;
};
map2 {
trip = <&trip2>;
cooling-device = <&fan 2 3>;
};
map3 {
trip = <&trip3>;
cooling-device = <&fan 3 4>;
};
};
};
fragment@4 {
target-path = "/__overrides__"; target-path = "/__overrides__";
params: __overlay__ { params: __overlay__ {
poe_fan_temp0 = <&trip0>,"temperature:0"; poe_fan_temp0 = <&trip0>,"temperature:0";
@ -106,7 +115,7 @@ in {
}; };
}; };
fragment@3 { fragment@5 {
target = <&firmware>; target = <&firmware>;
__overlay__ { __overlay__ {
fwpwm: pwm { fwpwm: pwm {
@ -116,7 +125,7 @@ in {
}; };
}; };
fragment@4 { fragment@6 {
target = <&i2c0>; target = <&i2c0>;
i2c_bus: __overlay__ { i2c_bus: __overlay__ {
#address-cells = <1>; #address-cells = <1>;
@ -137,14 +146,14 @@ in {
}; };
}; };
fragment@5 { fragment@7 {
target = <&i2c0if>; target = <&i2c0if>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";
}; };
}; };
fragment@6 { fragment@8 {
target = <&i2c0mux>; target = <&i2c0mux>;
__dormant__ { __dormant__ {
status = "okay"; status = "okay";
@ -172,48 +181,48 @@ in {
// Overlay for the Raspberry Pi PoE+ HAT. // Overlay for the Raspberry Pi PoE+ HAT.
/ { / {
compatible = "brcm,bcm2711"; compatible = "brcm,bcm2835";
fragment@10 { fragment@10 {
target-path = "/"; target-path = "/";
__overlay__ { __overlay__ {
rpi_poe_power_supply: rpi-poe-power-supply { rpi_poe_power_supply: rpi-poe-power-supply {
compatible = "raspberrypi,rpi-poe-power-supply"; compatible = "raspberrypi,rpi-poe-power-supply";
firmware = <&firmware>; firmware = <&firmware>;
status = "okay"; status = "okay";
}; };
};
}; };
fragment@11 { };
target = <&poe_mfd>; fragment@11 {
__overlay__ { target = <&poe_mfd>;
rpi-poe-power-supply@f2 { __overlay__ {
compatible = "raspberrypi,rpi-poe-power-supply"; rpi-poe-power-supply@f2 {
reg = <0xf2>; compatible = "raspberrypi,rpi-poe-power-supply";
status = "okay"; reg = <0xf2>;
}; status = "okay";
}; };
}; };
};
__overrides__ { __overrides__ {
i2c = <0>, "+5+6", i2c = <0>, "+5+6",
<&fwpwm>,"status=disabled", <&fwpwm>,"status=disabled",
<&rpi_poe_power_supply>,"status=disabled", <&rpi_poe_power_supply>,"status=disabled",
<&i2c_bus>,"status=okay", <&i2c_bus>,"status=okay",
<&poe_mfd>,"status=okay", <&poe_mfd>,"status=okay",
<&fan>,"pwms:0=",<&poe_mfd_pwm>; <&fan>,"pwms:0=",<&poe_mfd_pwm>;
}; };
}; };
&fan { &fan {
cooling-levels = <0 32 64 128 255>; cooling-levels = <0 32 64 128 255>;
}; };
&params { &params {
poe_fan_i2c = <&fwpwm>,"status=disabled", poe_fan_i2c = <&fwpwm>,"status=disabled",
<&rpi_poe_power_supply>,"status=disabled", <&rpi_poe_power_supply>,"status=disabled",
<&poe_mfd>,"status=okay", <&poe_mfd>,"status=okay",
<&fan>,"pwms:0=",<&poe_mfd_pwm>; <&fan>,"pwms:0=",<&poe_mfd_pwm>;
}; };
''; '';
} }