Using Mini UART on RPI CM

Stefan Wahren stefan.wahren at i2se.com
Thu Oct 1 03:12:16 PDT 2015


Am 01.10.2015 um 08:59 schrieb Martin Sperl:
>> On 30.09.2015, at 22:18, Eric Anholt <eric at anholt.net> wrote:
>>> Did i miss something in my board dts file to enable the aux uart clock?
>> That branch looks like it needs the submitted version of "Add a driver
>> for the auxiliary peripheral clock gates" instead, which I think would
>> fix this problem.
>>
>> https://github.com/anholt/linux/commit/c57cca7e0e96781ba3b9a0d0ab1069c0c20e0677
> That is my guess as well - and yes, that patch requires the clock-patch
> of Eric to be installed - I wish it was there already!

Thank you very much, now the driver probing works and the clocks seems
also okay.

Unfortunately any access to /dev/ttyS0 leads to a system freeze:

NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [bash:2610]

Looks like a irq issue.

Here the relevant dmesg:

[    0.738246] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.746799] of_serial 20215040.uart: clk or clock-frequency not defined
...
[    2.751262] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 81,
base_baud = 0) is a PL011 rev2
[    3.431447] console [ttyAMA0] enabled
[    3.449268] 20215040.uart: ttyS0 at MMIO 0x20215040 (irq = 53,
base_baud = 15612499) is a 16550

Here the relevant config:

CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_IRQ_DOMAIN=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=1
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
CONFIG_SERIAL_OF_PLATFORM=y

Here is the pinmuxing for UART1:

    uart1_pins: uart1_pins {
        brcm,pins = <32 33>;
        brcm,function = <BCM2835_FSEL_ALT5>;
        brcm,pull = <0 2>;
    };

But irq 53 doesn't appear under /proc/interrupts.

Any ideas?



More information about the linux-rpi-kernel mailing list