Skip to content

Commit 43adf49

Browse files
committed
Merge tag 'riscv-sophgo-dt-for-v6.15' of https://github.com/sophgo/linux into soc/dt
RISC-V Devicetrees for v6.15 Sophgo: Add pwm controller support for SG2042. Add pwm-fan & cooling maps for Milk-V Pioneer. Updated MAINTAINERS info for SOPHGO DEVICETREES and DRIVERS. Signed-off-by: Chen Wang <unicorn_wang@outlook.com> * tag 'riscv-sophgo-dt-for-v6.15' of https://github.com/sophgo/linux: riscv: sophgo: dts: add cooling maps for Milk-V Pioneer riscv: sophgo: dts: add pwm-fan for Milk-V Pioneer MAINTAINERS: update info for SOPHGO DEVICETREES and DRIVERS riscv: sophgo: dts: add pwm controller for SG2042 SoC Link: https://lore.kernel.org/r/PN0PR01MB10393CEC71B623E0A779E7393FEDF2@PN0PR01MB10393.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 5f3b286 + f047a92 commit 43adf49

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

MAINTAINERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22152,7 +22152,9 @@ F: include/linux/sony-laptop.h
2215222152

2215322153
SOPHGO DEVICETREES and DRIVERS
2215422154
M: Chen Wang <unicorn_wang@outlook.com>
22155-
M: Inochi Amaoto <inochiama@outlook.com>
22155+
M: Inochi Amaoto <inochiama@gmail.com>
22156+
L: sophgo@lists.linux.dev
22157+
W: https://github.com/sophgo/linux/wiki
2215622158
T: git https://github.com/sophgo/linux.git
2215722159
S: Maintained
2215822160
N: sophgo

arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@
7373
};
7474

7575
/ {
76+
pwmfan: pwm-fan {
77+
compatible = "pwm-fan";
78+
cooling-levels = <103 128 179 230 255>;
79+
pwms = <&pwm 0 40000 0>;
80+
#cooling-cells = <2>;
81+
};
82+
7683
thermal-zones {
7784
soc-thermal {
7885
polling-delay-passive = <1000>;
@@ -104,6 +111,28 @@
104111
type = "hot";
105112
};
106113
};
114+
115+
cooling-maps {
116+
map0 {
117+
trip = <&soc_active1>;
118+
cooling-device = <&pwmfan 0 1>;
119+
};
120+
121+
map1 {
122+
trip = <&soc_active2>;
123+
cooling-device = <&pwmfan 1 2>;
124+
};
125+
126+
map2 {
127+
trip = <&soc_active3>;
128+
cooling-device = <&pwmfan 2 3>;
129+
};
130+
131+
map3 {
132+
trip = <&soc_hot>;
133+
cooling-device = <&pwmfan 3 4>;
134+
};
135+
};
107136
};
108137

109138
board-thermal {
@@ -118,6 +147,13 @@
118147
type = "active";
119148
};
120149
};
150+
151+
cooling-maps {
152+
map4 {
153+
trip = <&board_active>;
154+
cooling-device = <&pwmfan 3 4>;
155+
};
156+
};
121157
};
122158
};
123159
};

arch/riscv/boot/dts/sophgo/sg2042.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@
165165
};
166166
};
167167

168+
pwm: pwm@703000c000 {
169+
compatible = "sophgo,sg2042-pwm";
170+
reg = <0x70 0x3000c000 0x0 0x20>;
171+
#pwm-cells = <3>;
172+
clocks = <&clkgen GATE_CLK_APB_PWM>;
173+
clock-names = "apb";
174+
resets = <&rstgen RST_PWM>;
175+
};
176+
168177
pllclk: clock-controller@70300100c0 {
169178
compatible = "sophgo,sg2042-pll";
170179
reg = <0x70 0x300100c0 0x0 0x40>;

0 commit comments

Comments
 (0)