|
| 1 | +/dts-v1/; |
| 2 | +/plugin/; |
| 3 | + |
| 4 | +#include <dt-bindings/gpio/gpio.h> |
| 5 | +#include <dt-bindings/pinctrl/rockchip.h> |
| 6 | +#include <dt-bindings/pwm/pwm.h> |
| 7 | +#include <dt-bindings/thermal/thermal.h> |
| 8 | + |
| 9 | +/ { |
| 10 | + metadata { |
| 11 | + title = "Enable support for DeskPi Mini Cube"; |
| 12 | + category = "misc"; |
| 13 | + compatible = "radxa,cm5-rpi-cm4-io"; |
| 14 | + description = "Enable support for DeskPi Mini Cube. |
| 15 | +Due to hardware limitations, HDMI above the USB Type-C will not work."; |
| 16 | + exclusive = "GPIO0_B5"; |
| 17 | + package = "rsetup-config-thermal-governor-step-wise"; |
| 18 | + }; |
| 19 | +}; |
| 20 | + |
| 21 | +&{/} { |
| 22 | + deskpi_minicube_fan_pwm: deskpi-minicube-fan-pwm { |
| 23 | + compatible = "pwm-gpio"; |
| 24 | + #pwm-cells = <3>; |
| 25 | + // Outdated, retained for compatibility with kernel 5.10 |
| 26 | + pwm-gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; |
| 27 | + gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; |
| 28 | + }; |
| 29 | + |
| 30 | + deskpi_minicube_fan: deskpi-minicube-fan { |
| 31 | + compatible = "pwm-fan"; |
| 32 | + #cooling-cells = <2>; |
| 33 | + cooling-min-state = <0>; |
| 34 | + cooling-max-state = <4>; |
| 35 | + cooling-levels = <32 64 96 128 192 255>; |
| 36 | + pwms = <&deskpi_minicube_fan_pwm 0 40000 0>; |
| 37 | + }; |
| 38 | +}; |
| 39 | + |
| 40 | +&soc_thermal { |
| 41 | + polling-delay = <1000>; |
| 42 | + polling-delay-passive = <2000>; |
| 43 | + |
| 44 | + trips { |
| 45 | + trip0: trip-point@0 { |
| 46 | + temperature = <55000>; |
| 47 | + hysteresis = <2000>; |
| 48 | + type = "active"; |
| 49 | + }; |
| 50 | + |
| 51 | + trip1: trip-point@1 { |
| 52 | + temperature = <60000>; |
| 53 | + hysteresis = <2000>; |
| 54 | + type = "active"; |
| 55 | + }; |
| 56 | + |
| 57 | + trip2: trip-point@2 { |
| 58 | + temperature = <65000>; |
| 59 | + hysteresis = <2000>; |
| 60 | + type = "active"; |
| 61 | + }; |
| 62 | + |
| 63 | + trip3: trip-point@3 { |
| 64 | + temperature = <70000>; |
| 65 | + hysteresis = <2000>; |
| 66 | + type = "active"; |
| 67 | + }; |
| 68 | + }; |
| 69 | + |
| 70 | + cooling-maps { |
| 71 | + map4 { |
| 72 | + trip = <&trip0>; |
| 73 | + cooling-device = <&deskpi_minicube_fan 0 1>; |
| 74 | + contribution = <1024>; |
| 75 | + }; |
| 76 | + |
| 77 | + map5 { |
| 78 | + trip = <&trip1>; |
| 79 | + cooling-device = <&deskpi_minicube_fan 1 2>; |
| 80 | + contribution = <1024>; |
| 81 | + }; |
| 82 | + |
| 83 | + map6 { |
| 84 | + trip = <&trip2>; |
| 85 | + cooling-device = <&deskpi_minicube_fan 2 3>; |
| 86 | + contribution = <1024>; |
| 87 | + }; |
| 88 | + |
| 89 | + map7 { |
| 90 | + trip = <&trip3>; |
| 91 | + cooling-device = <&deskpi_minicube_fan 3 4>; |
| 92 | + contribution = <1024>; |
| 93 | + }; |
| 94 | + |
| 95 | + map8 { |
| 96 | + trip = <&threshold>; |
| 97 | + cooling-device = <&deskpi_minicube_fan 4 5>; |
| 98 | + contribution = <1024>; |
| 99 | + }; |
| 100 | + |
| 101 | + map9 { |
| 102 | + trip = <&target>; |
| 103 | + cooling-device = <&deskpi_minicube_fan 5 6>; |
| 104 | + contribution = <1024>; |
| 105 | + }; |
| 106 | + }; |
| 107 | +}; |
| 108 | + |
| 109 | +&threshold { |
| 110 | + type = "active"; |
| 111 | +}; |
| 112 | + |
| 113 | +&target { |
| 114 | + type = "active"; |
| 115 | +}; |
0 commit comments