Using Mini UART on RPI CM
info at lategoodbye.de
Wed Sep 30 11:13:46 PDT 2015
i want to use both UARTs on a Raspberry Pi Compute Module. Yes, i know
you still working on the driver, but i hope you can help me with an issue.
I took this branch  from your repository and add "ns16550" to the
compatible string of the uart1 node in bcm2835.dtsi
Unfortunately i got an error during boot:
[ 0.738732] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 0.746685] of_serial 20215040.uart: clk or clock-frequency not defined
[ 3.448517] of_serial: probe of 20215040.uart failed with error -22
I narrowed down the problem to this sequence in of_platform_serial_setup():
info->clk = devm_clk_get(&ofdev->dev, NULL);
ret = clk_prepare_enable(info->clk);
clk = clk_get_rate(info->clk);
Finally the value of clk is zero, which leads to the error code 22
(EINVAL). In the bcm2835.dtsi file there are two clocks defined for uart1:
clocks = <&aux_clocks BCM2835_AUX_CLOCK_UART>, <&clocks
After swapping both clocks in dtsi the problem disappears. But i think
this is not the right way to fix this issue.
Did i miss something in my board dts file to enable the aux uart clock?
More information about the linux-rpi-kernel