• 周六. 5月 3rd, 2025

rockchip — pwm dts 配置

3月 10, 2020

关键词:rockchip; pwm; 

rockchip — pwm dts 配置

1、必须设置的属性值:

- compatible: 这里可以设置成 "rockchip,rk-pwm"
- reg: 设置寄存器的物理基地址,以及寄存器的空间大小;
- #pwm-cells: 这里设置成2;
- pinctrl-names: pwm连接的物理pin,名字默认是default;
- pinctrl-0: 配置pwm使用的pin脚;
- clocks: pwm使用的时钟;
- clock-names: pwm时钟名称;
- status: 该节点的状态,打开为okay,关闭为disabled;

2、应用实例:

pwm1: pwm@53fb4000 {
	#pwm-cells = <2>;
	compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
	reg = <0x53fb4000 0x4000>;
	interrupts = <61>;
};
pwm0: pwm@ff680000 {
	compatible = "rockchip,rk-pwm";
	reg = <0xff680000 0x10>;
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_pin>;
	clocks = <&clk_gates11 11>;
	clock-names = "pclk_pwm";
	status = "disabled";
};