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