Skip to content

Commit

Permalink
riscv: dts: thead: lpi4a: enable pwm fan
Browse files Browse the repository at this point in the history
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
  • Loading branch information
xhackerustc authored and RevySR committed Oct 1, 2023
1 parent da846a9 commit 465ebce
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,58 @@
stdout-path = "serial0:115200n8";
};

fan: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
pwms = <&pwm 1 10000000 0>;
cooling-levels = <0 66 196 255>;
};

thermal-zones {
cpu-thermal {
polling-delay = <1000>;
polling-delay-passive = <1000>;
thermal-sensors = <&pvt 0>;

trips {
trip_active0: active-0 {
temperature = <39000>;
hysteresis = <5000>;
type = "active";
};

trip_active1: active-1 {
temperature = <50000>;
hysteresis = <5000>;
type = "active";
};

trip_active2: active-2 {
temperature = <60000>;
hysteresis = <5000>;
type = "active";
};
};

cooling-maps {
map-active-0 {
cooling-device = <&fan 1 1>;
trip = <&trip_active0>;
};

map-active-1 {
cooling-device = <&fan 2 2>;
trip = <&trip_active1>;
};

map-active-2 {
cooling-device = <&fan 3 3>;
trip = <&trip_active2>;
};
};
};
};

hub_5v: regulator-hub_5v {
compatible = "regulator-fixed";
regulator-name = "HUB_5V";
Expand Down

0 comments on commit 465ebce

Please sign in to comment.