Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Allwinner A20 overlay for serial port
On Mon, Feb 03, 2025 at 07:48:20PM +0100, Manuel Bouyer wrote:
> [Resent, this didn't make it to the list - with the attachement inline
> this time]
>
> Hello
> I'm trying to configure 2 extra UARTs on a A20 board, using a DTS
> overlay (see attahced) The ports are configured at boot, but it seems
> that the GPIO mux is not: the GPIO seems to both remain in input state
> and I can't get chars in either directions.
> With SUNXI_GPIO_DEBUG, I can see the GPIOs for UART0 (the console)
> being configured but not for UART2 and UART5:
> sunxigpio0: PB22 cfg 22002200 -> 22002200
> sunxigpio0: PB23 cfg 22002200 -> 22002200
> com0 at simplebus1: DesignWare APB UART, 64-byte FIFO
> com0: console
> com0: interrupting on GIC irq 33
> com1 at simplebus1: DesignWare APB UART, 64-byte FIFO
> com1: interrupting on GIC irq 35
> com2 at simplebus1: DesignWare APB UART, 64-byte FIFO
> com2: interrupting on GIC irq 50
>
> (PB22 and PB23 are indeed what's configured in the dts for UART0).
> I couldn't find how sunxi_gpio_setfunc() ends up being called when
> a snps,dw-apb-uart device is found.
>
> The i2c4 device configured in the same overlay is working (confirmed with
> a device connected to the pins):
> sunxigpio0: PI02 cfg 00000000 -> 00000300
> sunxigpio0: PI03 cfg 00000300 -> 00003300
> sunxitwi2 at simplebus1: Marvell TWSI controller
> sunxitwi2: interrupting on GIC irq 121
> iic2 at sunxitwi2: I2C bus
>
> Any idea what could be missing here ?
>
> I used extra UARTs on A20 boards in the past but it was before EFI and
> overlays, and the device tree changed a bit since then
It turns out that I used the wrong options for building the overlay.
dtc -I dts -O dtb -o controle.dtbo controle.dts
doens't work, the overlay is only partially loaded
dtc -I dts -O dtb -p 1024 -b 0 -@ -o controle.dtbo controle.dts
does work.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index