Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Allwinner A20 overlay for serial port
[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
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
/*
* Overlay for the controle board
*/
/dts-v1/;
/plugin/;
/ {
compatible = "olimex,a20-olinuxino-lime2", "olimex,a20-olinuxino-lime2-emmc";
fragment@0 {
target = <&pio>;
__overlay__ {
i2c4_pins: i2c4-pins {
pins = "PI2", "PI3";
function = "i2c4";
};
uart2_pi_pins: uart2-pi-pins {
pins = "PI18", "PI19";
function = "uart2";
};
uart5_pi_pins: uart5-pi-pins {
pins = "PI10", "PI11";
function = "uart5";
};
};
};
fragment@1 {
target = <&i2c4>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&i2c4_pins>;
status = "okay";
};
};
fragment@2 {
target = <&uart2>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pi_pins>;
status = "okay";
};
};
fragment@3 {
target = <&uart5>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart5_pi_pins>;
status = "okay";
};
};
};
Home |
Main Index |
Thread Index |
Old Index