Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / pwm-overlay.dts
1 /dts-v1/;
2 /plugin/;
3
4 /*
5 Legal pin,function combinations for each channel:
6   PWM0: 12,4(Alt0) 18,2(Alt5) 40,4(Alt0)            52,5(Alt1)
7   PWM1: 13,4(Alt0) 19,2(Alt5) 41,4(Alt0) 45,4(Alt0) 53,5(Alt1)
8
9 N.B.:
10   1) Pin 18 is the only one available on all platforms, and
11      it is the one used by the I2S audio interface.
12      Pins 12 and 13 might be better choices on an A+, B+ or Pi2.
13   2) The onboard analogue audio output uses both PWM channels.
14   3) So be careful mixing audio and PWM.
15 */
16
17 / {
18         compatible = "brcm,bcm2835";
19
20         fragment@0 {
21                 target = <&gpio>;
22                 __overlay__ {
23                         pwm_pins: pwm_pins {
24                                 brcm,pins = <18>;
25                                 brcm,function = <2>; /* Alt5 */
26                         };
27                 };
28         };
29
30         fragment@1 {
31                 target = <&pwm>;
32                 frag1: __overlay__ {
33                         pinctrl-names = "default";
34                         pinctrl-0 = <&pwm_pins>;
35                         assigned-clock-rates = <100000000>;
36                         status = "okay";
37                 };
38         };
39
40         __overrides__ {
41                 pin   = <&pwm_pins>,"brcm,pins:0";
42                 func  = <&pwm_pins>,"brcm,function:0";
43                 clock = <&frag1>,"assigned-clock-rates:0";
44         };
45 };