xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pwm/pwm-sprd.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSpreadtrum PWM controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunSpreadtrum SoCs PWM controller provides 4 PWM channels.
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunRequired properties:
6*4882a593Smuzhiyun- compatible : Should be "sprd,ums512-pwm".
7*4882a593Smuzhiyun- reg: Physical base address and length of the controller's registers.
8*4882a593Smuzhiyun- clocks: The phandle and specifier referencing the controller's clocks.
9*4882a593Smuzhiyun- clock-names: Should contain following entries:
10*4882a593Smuzhiyun  "pwmn": used to derive the functional clock for PWM channel n (n range: 0 ~ 3).
11*4882a593Smuzhiyun  "enablen": for PWM channel n enable clock (n range: 0 ~ 3).
12*4882a593Smuzhiyun- #pwm-cells: Should be 2. See pwm.yaml in this directory for a description of
13*4882a593Smuzhiyun  the cells format.
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunOptional properties:
16*4882a593Smuzhiyun- assigned-clocks: Reference to the PWM clock entries.
17*4882a593Smuzhiyun- assigned-clock-parents: The phandle of the parent clock of PWM clock.
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunExample:
20*4882a593Smuzhiyun	pwms: pwm@32260000 {
21*4882a593Smuzhiyun		compatible = "sprd,ums512-pwm";
22*4882a593Smuzhiyun		reg = <0 0x32260000 0 0x10000>;
23*4882a593Smuzhiyun		clock-names = "pwm0", "enable0",
24*4882a593Smuzhiyun			"pwm1", "enable1",
25*4882a593Smuzhiyun			"pwm2", "enable2",
26*4882a593Smuzhiyun			"pwm3", "enable3";
27*4882a593Smuzhiyun		clocks = <&aon_clk CLK_PWM0>, <&aonapb_gate CLK_PWM0_EB>,
28*4882a593Smuzhiyun		       <&aon_clk CLK_PWM1>, <&aonapb_gate CLK_PWM1_EB>,
29*4882a593Smuzhiyun		       <&aon_clk CLK_PWM2>, <&aonapb_gate CLK_PWM2_EB>,
30*4882a593Smuzhiyun		       <&aon_clk CLK_PWM3>, <&aonapb_gate CLK_PWM3_EB>;
31*4882a593Smuzhiyun		assigned-clocks = <&aon_clk CLK_PWM0>,
32*4882a593Smuzhiyun			<&aon_clk CLK_PWM1>,
33*4882a593Smuzhiyun			<&aon_clk CLK_PWM2>,
34*4882a593Smuzhiyun			<&aon_clk CLK_PWM3>;
35*4882a593Smuzhiyun		assigned-clock-parents = <&ext_26m>,
36*4882a593Smuzhiyun			<&ext_26m>,
37*4882a593Smuzhiyun			<&ext_26m>,
38*4882a593Smuzhiyun			<&ext_26m>;
39*4882a593Smuzhiyun		#pwm-cells = <2>;
40*4882a593Smuzhiyun	};
41