Skip to content

Commit 5e598b9

Browse files
littleqypConchuOD
authored andcommitted
riscv: dts: starfive: jh7100: Add PWM node and pins configuration
Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 1 board. Signed-off-by: William Qiu <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent 2529085 commit 5e598b9

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

arch/riscv/boot/dts/starfive/jh7100-common.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@
115115
};
116116
};
117117

118+
pwm_pins: pwm-0 {
119+
pwm-pins {
120+
pinmux = <GPIOMUX(7,
121+
GPO_PWM_PAD_OUT_BIT0,
122+
GPO_PWM_PAD_OE_N_BIT0,
123+
GPI_NONE)>,
124+
<GPIOMUX(5,
125+
GPO_PWM_PAD_OUT_BIT1,
126+
GPO_PWM_PAD_OE_N_BIT1,
127+
GPI_NONE)>;
128+
bias-disable;
129+
drive-strength = <35>;
130+
input-disable;
131+
input-schmitt-disable;
132+
slew-rate = <0>;
133+
};
134+
};
135+
118136
sdio0_pins: sdio0-0 {
119137
clk-pins {
120138
pinmux = <GPIOMUX(54, GPO_SDIO0_PAD_CCLK_OUT,
@@ -257,6 +275,12 @@
257275
clock-frequency = <27000000>;
258276
};
259277

278+
&pwm {
279+
pinctrl-names = "default";
280+
pinctrl-0 = <&pwm_pins>;
281+
status = "okay";
282+
};
283+
260284
&sdio0 {
261285
broken-cd;
262286
bus-width = <4>;

arch/riscv/boot/dts/starfive/jh7100.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,15 @@
320320
<&rstgen JH7100_RSTN_WDT>;
321321
};
322322

323+
pwm: pwm@12490000 {
324+
compatible = "starfive,jh7100-pwm", "opencores,pwm-v1";
325+
reg = <0x0 0x12490000 0x0 0x10000>;
326+
clocks = <&clkgen JH7100_CLK_PWM_APB>;
327+
resets = <&rstgen JH7100_RSTN_PWM_APB>;
328+
#pwm-cells = <3>;
329+
status = "disabled";
330+
};
331+
323332
sfctemp: temperature-sensor@124a0000 {
324333
compatible = "starfive,jh7100-temp";
325334
reg = <0x0 0x124a0000 0x0 0x10000>;

0 commit comments

Comments
 (0)