Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / i2c-fan-overlay.dts
1 // Definitions for I2C based sensors using the Industrial IO or HWMON interface.
2 /dts-v1/;
3 /plugin/;
4
5 #include <dt-bindings/thermal/thermal.h>
6
7 / {
8         compatible = "brcm,bcm2835";
9
10         fragment@0 {
11                 target = <&i2cbus>;
12                 __dormant__ {
13                         #address-cells = <1>;
14                         #size-cells = <0>;
15                         status = "okay";
16
17                         emc2301: emc2301@2f {
18                                 compatible = "microchip,emc2301";
19                                 reg = <0x2f>;
20                                 status = "okay";
21                                 #cooling-cells = <0x02>;
22                         };
23                 };
24         };
25
26         frag100: fragment@100 {
27                 target = <&i2c_arm>;
28                 i2cbus: __overlay__ {
29                         status = "okay";
30                 };
31         };
32
33         fragment@101 {
34                 target = <&i2c0if>;
35                 __dormant__ {
36                         status = "okay";
37                 };
38         };
39
40         fragment@102 {
41                 target = <&i2c0mux>;
42                 __dormant__ {
43                         status = "okay";
44                 };
45         };
46
47         fragment@103 {
48                 target = <&cpu_thermal>;
49                 polling-delay = <2000>; /* milliseconds */
50                 __overlay__ {
51                         trips {
52                                 fanmid0: fanmid0 {
53                                         temperature = <50000>;
54                                         hysteresis = <2000>;
55                                         type = "active";
56                                 };
57                                 fanmax0: fanmax0 {
58                                         temperature = <75000>;
59                                         hysteresis = <2000>;
60                                         type = "active";
61                                 };
62                         };
63                         cooling-maps {
64                                 map0: map0 {
65                                         trip = <&fanmid0>;
66                                         cooling-device = <&emc2301 2 6>;
67                                 };
68                                 map1: map1 {
69                                         trip = <&fanmax0>;
70                                         cooling-device = <&emc2301 7 THERMAL_NO_LIMIT>;
71                                 };
72                         };
73                 };
74         };
75
76         __overrides__ {
77                 i2c0 =          <&frag100>,"target:0=",<&i2c0>;
78                 i2c_csi_dsi =   <&frag100>,"target:0=",<&i2c_csi_dsi>,
79                                 <0>,"+101+102";
80                 i2c3 = <&frag100>, "target?=0",
81                        <&frag100>, "target-path=i2c3";
82                 i2c4 = <&frag100>, "target?=0",
83                        <&frag100>, "target-path=i2c4";
84                 i2c5 = <&frag100>, "target?=0",
85                        <&frag100>, "target-path=i2c5";
86                 i2c6 = <&frag100>, "target?=0",
87                        <&frag100>, "target-path=i2c6";
88                 addr =          <&emc2301>,"reg:0";
89                 minpwm =        <&emc2301>,"emc2305,pwm-min;0";
90                 maxpwm =        <&emc2301>,"emc2305,pwm-max;0";
91                 midtemp =       <&fanmid0>,"temperature:0";
92                 midtemp_hyst =  <&fanmid0>,"hysteresis:0";
93                 maxtemp =       <&fanmax0>,"temperature:0";
94                 maxtemp_hyst =  <&fanmax0>,"hysteresis:0";
95
96                 emc2301 =       <0>,"+0",
97                                 <&map0>,"cooling-device:0=",<&emc2301>,
98                                 <&map1>,"cooling-device:0=",<&emc2301>;
99         };
100 };