0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-22 04:56:15 +00:00
openwrt/target/linux/bcm27xx/patches-6.6/950-1028-DTS-overlays-fix-Pi-5-midi-over-UART.patch
Álvaro Fernández Rojas 8c405cdccc bcm27xx: add 6.6 kernel patches
The patches were generated from the RPi repo with the following command:
git format-patch v6.6.34..rpi-6.1.y

Some patches needed rebasing and, as usual, the applied and reverted, wireless
drivers, Github workflows, READMEs and defconfigs patches were removed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-18 18:52:49 +02:00

140 lines
4.2 KiB
Diff

From 35f84e1791eaae8c8c0f4798a5cba3061277a672 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Wed, 17 Apr 2024 17:03:56 +0100
Subject: [PATCH 1028/1085] DTS: overlays: fix Pi 5 midi-over-UART
The UART source clock is 50MHz not 100MHz, so fix the fake-clock used to
munge the baudrate.
See https://forums.raspberrypi.com/viewtopic.php?p=2212755
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
arch/arm/boot/dts/overlays/midi-uart0-pi5-overlay.dts | 6 +++---
arch/arm/boot/dts/overlays/midi-uart1-pi5-overlay.dts | 6 +++---
arch/arm/boot/dts/overlays/midi-uart2-pi5-overlay.dts | 6 +++---
arch/arm/boot/dts/overlays/midi-uart3-pi5-overlay.dts | 6 +++---
arch/arm/boot/dts/overlays/midi-uart4-pi5-overlay.dts | 6 +++---
5 files changed, 15 insertions(+), 15 deletions(-)
--- a/arch/arm/boot/dts/overlays/midi-uart0-pi5-overlay.dts
+++ b/arch/arm/boot/dts/overlays/midi-uart0-pi5-overlay.dts
@@ -5,10 +5,10 @@
/*
* Fake a higher clock rate to get a larger divisor, and thereby a lower
- * baudrate. The real clock is 100MHz, which we scale so that requesting
+ * baudrate. The real clock is 50MHz, which we scale so that requesting
* 38.4kHz results in an actual 31.25kHz.
*
- * 100000000*38400/31250 = 122880000
+ * 50000000*38400/31250 = 61440000
*/
/{
@@ -21,7 +21,7 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "uart0_pclk";
- clock-frequency = <122880000>;
+ clock-frequency = <61440000>;
};
};
};
--- a/arch/arm/boot/dts/overlays/midi-uart1-pi5-overlay.dts
+++ b/arch/arm/boot/dts/overlays/midi-uart1-pi5-overlay.dts
@@ -5,10 +5,10 @@
/*
* Fake a higher clock rate to get a larger divisor, and thereby a lower
- * baudrate. The real clock is 100MHz, which we scale so that requesting
+ * baudrate. The real clock is 50MHz, which we scale so that requesting
* 38.4kHz results in an actual 31.25kHz.
*
- * 100000000*38400/31250 = 122880000
+ * 50000000*38400/31250 = 61440000
*/
/{
@@ -21,7 +21,7 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "uart1_pclk";
- clock-frequency = <122880000>;
+ clock-frequency = <61440000>;
};
};
};
--- a/arch/arm/boot/dts/overlays/midi-uart2-pi5-overlay.dts
+++ b/arch/arm/boot/dts/overlays/midi-uart2-pi5-overlay.dts
@@ -5,10 +5,10 @@
/*
* Fake a higher clock rate to get a larger divisor, and thereby a lower
- * baudrate. The real clock is 100MHz, which we scale so that requesting
+ * baudrate. The real clock is 50MHz, which we scale so that requesting
* 38.4kHz results in an actual 31.25kHz.
*
- * 100000000*38400/31250 = 122880000
+ * 50000000*38400/31250 = 61440000
*/
/{
@@ -21,7 +21,7 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "uart2_pclk";
- clock-frequency = <122880000>;
+ clock-frequency = <61440000>;
};
};
};
--- a/arch/arm/boot/dts/overlays/midi-uart3-pi5-overlay.dts
+++ b/arch/arm/boot/dts/overlays/midi-uart3-pi5-overlay.dts
@@ -5,10 +5,10 @@
/*
* Fake a higher clock rate to get a larger divisor, and thereby a lower
- * baudrate. The real clock is 100MHz, which we scale so that requesting
+ * baudrate. The real clock is 50MHz, which we scale so that requesting
* 38.4kHz results in an actual 31.25kHz.
*
- * 100000000*38400/31250 = 122880000
+ * 50000000*38400/31250 = 61440000
*/
/{
@@ -21,7 +21,7 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "uart3_pclk";
- clock-frequency = <122880000>;
+ clock-frequency = <61440000>;
};
};
};
--- a/arch/arm/boot/dts/overlays/midi-uart4-pi5-overlay.dts
+++ b/arch/arm/boot/dts/overlays/midi-uart4-pi5-overlay.dts
@@ -5,10 +5,10 @@
/*
* Fake a higher clock rate to get a larger divisor, and thereby a lower
- * baudrate. The real clock is 100MHz, which we scale so that requesting
+ * baudrate. The real clock is 50MHz, which we scale so that requesting
* 38.4kHz results in an actual 31.25kHz.
*
- * 100000000*38400/31250 = 122880000
+ * 50000000*38400/31250 = 61440000
*/
/{
@@ -21,7 +21,7 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "uart4_pclk";
- clock-frequency = <122880000>;
+ clock-frequency = <61440000>;
};
};
};