Brooklyn/arch/arm/boot/dts/overlays/midi-uart3-overlay.dts
2021-08-22 21:10:56 +05:00

39 lines
997 B
Plaintext

/dts-v1/;
/plugin/;
#include <dt-bindings/clock/bcm2835.h>
/*
* Fake a higher clock rate to get a larger divisor, and thereby a lower
* baudrate. The real clock is 48MHz, which we scale so that requesting
* 38.4kHz results in an actual 31.25kHz.
*
* 48000000*38400/31250 = 58982400
*/
/{
compatible = "brcm,bcm2835";
fragment@0 {
target-path = "/";
__overlay__ {
midi_clk: midi_clk3 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "uart3_pclk";
clock-frequency = <58982400>;
};
};
};
fragment@1 {
target = <&uart3>;
__overlay__ {
clocks = <&midi_clk>,
<&clocks BCM2835_CLOCK_VPU>;
};
};
};