Skip to content

Commit c406c98

Browse files
authored
Merge pull request #421 from ndoo/deskpi-mini-cube
feat: Add support for DeskPi Mini Cube for Radxa CM5 (radxa,cm5-rpi-cm4-io)
2 parents 88c4fc2 + 5019588 commit c406c98

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

arch/arm64/boot/dts/rockchip/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ dtb-$(CONFIG_CPU_RK3588) += \
566566
radxa-cm5-io-raspi-7inch-touchscreen.dtbo \
567567
radxa-cm5-io-rpi-camera-v1p3.dtbo \
568568
radxa-cm5-io-rpi-camera-v2.dtbo \
569+
radxa-cm5-rpi-cm4-io-deskpi-mini-cube.dtbo \
569570
radxa-cm5-rpi-cm4-io-rpi-camera-v1_3-cam0.dtbo \
570571
radxa-cm5-rpi-cm4-io-rpi-camera-v1_3-cam1.dtbo \
571572
radxa-cm5-rpi-cm4-io-rpi-camera-v2-cam0.dtbo \
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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

Comments
 (0)