xref: /freebsd/sys/contrib/device-tree/Bindings/clock/pwm-clock.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotBinding for an external clock signal driven by a PWM pin.
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThis binding uses the common clock binding[1] and the common PWM binding[2].
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel Vadot[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
6*c66ec88fSEmmanuel Vadot[2] Documentation/devicetree/bindings/pwm/pwm.txt
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel VadotRequired properties:
9*c66ec88fSEmmanuel Vadot- compatible : shall be "pwm-clock".
10*c66ec88fSEmmanuel Vadot- #clock-cells : from common clock binding; shall be set to 0.
11*c66ec88fSEmmanuel Vadot- pwms : from common PWM binding; this determines the clock frequency
12*c66ec88fSEmmanuel Vadot  via the period given in the PWM specifier.
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotOptional properties:
15*c66ec88fSEmmanuel Vadot- clock-output-names : From common clock binding.
16*c66ec88fSEmmanuel Vadot- clock-frequency : Exact output frequency, in case the PWM period
17*c66ec88fSEmmanuel Vadot  is not exact but was rounded to nanoseconds.
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel VadotExample:
20*c66ec88fSEmmanuel Vadot	clock {
21*c66ec88fSEmmanuel Vadot		compatible = "pwm-clock";
22*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
23*c66ec88fSEmmanuel Vadot		clock-frequency = <25000000>;
24*c66ec88fSEmmanuel Vadot		clock-output-names = "mipi_mclk";
25*c66ec88fSEmmanuel Vadot		pwms = <&pwm2 0 40>; /* 1 / 40 ns = 25 MHz */
26*c66ec88fSEmmanuel Vadot	};
27