Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / rpi-poe-overlay.dts
1 /*
2  * Overlay for the Raspberry Pi POE HAT.
3  */
4 /dts-v1/;
5 /plugin/;
6
7 / {
8         compatible = "brcm,bcm2835";
9
10         fragment@0 {
11                 target-path = "/";
12                 __overlay__ {
13                         fan: pwm-fan {
14                                 compatible = "pwm-fan";
15                                 cooling-levels = <0 1 10 100 255>;
16                                 #cooling-cells = <2>;
17                                 pwms = <&fwpwm 0 80000>;
18                         };
19                 };
20         };
21
22         fragment@1 {
23                 target = <&cpu_thermal>;
24                 __overlay__ {
25                         trips {
26                                 trip0: trip0 {
27                                         temperature = <40000>;
28                                         hysteresis = <2000>;
29                                         type = "active";
30                                 };
31                                 trip1: trip1 {
32                                         temperature = <45000>;
33                                         hysteresis = <2000>;
34                                         type = "active";
35                                 };
36                                 trip2: trip2 {
37                                         temperature = <50000>;
38                                         hysteresis = <2000>;
39                                         type = "active";
40                                 };
41                                 trip3: trip3 {
42                                         temperature = <55000>;
43                                         hysteresis = <5000>;
44                                         type = "active";
45                                 };
46                         };
47                         cooling-maps {
48                                 map0 {
49                                         trip = <&trip0>;
50                                         cooling-device = <&fan 0 1>;
51                                 };
52                                 map1 {
53                                         trip = <&trip1>;
54                                         cooling-device = <&fan 1 2>;
55                                 };
56                                 map2 {
57                                         trip = <&trip2>;
58                                         cooling-device = <&fan 2 3>;
59                                 };
60                                 map3 {
61                                         trip = <&trip3>;
62                                         cooling-device = <&fan 3 4>;
63                                 };
64                         };
65                 };
66         };
67
68         fragment@2 {
69                 target-path = "/__overrides__";
70                 params: __overlay__ {
71                         poe_fan_temp0 =         <&trip0>,"temperature:0";
72                         poe_fan_temp0_hyst =    <&trip0>,"hysteresis:0";
73                         poe_fan_temp1 =         <&trip1>,"temperature:0";
74                         poe_fan_temp1_hyst =    <&trip1>,"hysteresis:0";
75                         poe_fan_temp2 =         <&trip2>,"temperature:0";
76                         poe_fan_temp2_hyst =    <&trip2>,"hysteresis:0";
77                         poe_fan_temp3 =         <&trip3>,"temperature:0";
78                         poe_fan_temp3_hyst =    <&trip3>,"hysteresis:0";
79                         poe_fan_i2c =           <&fwpwm>,"status=disabled",
80                                                 <&poe_mfd>,"status=okay",
81                                                 <&fan>,"pwms:0=",<&poe_mfd_pwm>;
82                 };
83         };
84
85         fragment@3 {
86                 target = <&firmware>;
87                 __overlay__ {
88                         fwpwm: pwm {
89                                 compatible = "raspberrypi,firmware-poe-pwm";
90                                 #pwm-cells = <2>;
91                         };
92                 };
93         };
94
95         fragment@4 {
96                 target = <&i2c0>;
97                 i2c_bus: __overlay__ {
98                         #address-cells = <1>;
99                         #size-cells = <0>;
100
101                         poe_mfd: poe@51 {
102                                 compatible = "raspberrypi,poe-core";
103                                 reg = <0x51>;
104                                 status = "disabled";
105
106                                 poe_mfd_pwm: poe_pwm@f0 {
107                                         compatible = "raspberrypi,poe-pwm";
108                                         reg = <0xf0>;
109                                         status = "okay";
110                                         #pwm-cells = <2>;
111                                 };
112                         };
113                 };
114         };
115
116         fragment@5 {
117                 target = <&i2c0if>;
118                 __dormant__ {
119                         status = "okay";
120                 };
121         };
122
123         fragment@6 {
124                 target = <&i2c0mux>;
125                 __dormant__ {
126                         status = "okay";
127                 };
128         };
129
130         __overrides__ {
131                 poe_fan_temp0 =         <&trip0>,"temperature:0";
132                 poe_fan_temp0_hyst =    <&trip0>,"hysteresis:0";
133                 poe_fan_temp1 =         <&trip1>,"temperature:0";
134                 poe_fan_temp1_hyst =    <&trip1>,"hysteresis:0";
135                 poe_fan_temp2 =         <&trip2>,"temperature:0";
136                 poe_fan_temp2_hyst =    <&trip2>,"hysteresis:0";
137                 poe_fan_temp3 =         <&trip3>,"temperature:0";
138                 poe_fan_temp3_hyst =    <&trip3>,"hysteresis:0";
139                 i2c =                   <0>, "+5+6",
140                                         <&fwpwm>,"status=disabled",
141                                         <&i2c_bus>,"status=okay",
142                                         <&poe_mfd>,"status=okay",
143                                         <&fan>,"pwms:0=",<&poe_mfd_pwm>;
144         };
145 };