Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / midi-uart1-overlay.dts
1 /dts-v1/;
2 /plugin/;
3
4 #include <dt-bindings/clock/bcm2835-aux.h>
5
6 /*
7  * Fake a higher clock rate to get a larger divisor, and thereby a lower
8  * baudrate. The real clock is 48MHz, which we scale so that requesting
9  * 38.4kHz results in an actual 31.25kHz.
10  *
11  *   48000000*38400/31250 = 58982400
12  */
13
14 /{
15         compatible = "brcm,bcm2835";
16
17         fragment@0 {
18                 target-path = "/clocks";
19                 __overlay__ {
20                         midi_clk: clock@5 {
21                                 compatible = "fixed-factor-clock";
22                                 #clock-cells = <0>;
23                                 clocks = <&aux BCM2835_AUX_CLOCK_UART>;
24                                 clock-mult = <38400>;
25                                 clock-div  = <31250>;
26                         };
27                 };
28         };
29
30         fragment@1 {
31                 target = <&uart1>;
32                 __overlay__ {
33                         clocks = <&midi_clk>;
34                 };
35         };
36
37         fragment@2 {
38                 target = <&aux>;
39                 __overlay__ {
40                         clock-output-names = "aux_uart", "aux_spi1", "aux_spi2";
41                 };
42         };
43 };