git: 135c402505bc - main - ccu_h6: Add the bus gates of UART1, UART2 and UART3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Nov 2026 06:48:02 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=135c402505bcae5a2504f64deb0ceef75b342280
commit 135c402505bcae5a2504f64deb0ceef75b342280
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-18 06:23:22 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-18 06:47:35 +0000
ccu_h6: Add the bus gates of UART1, UART2 and UART3
The firmware only leaves the gate of UART0 on. The UARTs of the H6 are
snps,dw-apb-uart and uart_snps enables the bus clock of the device, but
the clock does not exist, so the gate of the other UARTs stays off. With
a device tree where one of them is enabled (the Bluetooth UART of the
Pine H64 model B), uart_bus_probe() accesses the registers of a gated
UART and the boot hangs.
Add the gates of UART1 to UART3. The one of UART0 is left out for now,
with it uart_snps gets the clock rate and detects a 256 bytes FIFO, and
the input of the console is delayed.
Tested on: Pine H64 (model B device tree, UART1)
---
sys/dev/clk/allwinner/ccu_h6.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys/dev/clk/allwinner/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c
index a9f1e638b0c8..982cbbe96de2 100644
--- a/sys/dev/clk/allwinner/ccu_h6.c
+++ b/sys/dev/clk/allwinner/ccu_h6.c
@@ -284,14 +284,14 @@ static struct aw_ccung_gate h6_ccu_gates[] = {
/*
* UART_BGR_REG
- * The gates are not enabled, the firmware leaves the UART0 one on.
- * With them uart_snps gets the clock rate and detects a 256 bytes
- * FIFO, and the input of the console is delayed.
+ * The gate of UART0 is not enabled, the firmware leaves it on. With it
+ * uart_snps gets the clock rate and detects a 256 bytes FIFO, and the
+ * input of the console is delayed.
*/
/* CCU_GATE(CLK_BUS_UART0, "bus-uart0", "apb2", 0x90c, 0) */
- /* CCU_GATE(CLK_BUS_UART1, "bus-uart1", "apb2", 0x90c, 1) */
- /* CCU_GATE(CLK_BUS_UART2, "bus-uart2", "apb2", 0x90c, 2) */
- /* CCU_GATE(CLK_BUS_UART3, "bus-uart3", "apb2", 0x90c, 3) */
+ CCU_GATE(CLK_BUS_UART1, "bus-uart1", "apb2", 0x90c, 1)
+ CCU_GATE(CLK_BUS_UART2, "bus-uart2", "apb2", 0x90c, 2)
+ CCU_GATE(CLK_BUS_UART3, "bus-uart3", "apb2", 0x90c, 3)
/* TWI_BGR_REG */
CCU_GATE(CLK_BUS_I2C0, "bus-i2c0", "apb2", 0x91c, 0)