phy: rockchip-usb: add handler for usb-uart functionality
authorHeiko Stuebner <heiko@sntech.de>
Mon, 22 Feb 2016 11:55:01 +0000 (12:55 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Tue, 1 Mar 2016 11:43:50 +0000 (17:13 +0530)
commit605df8af33a7b206611a7bda01384b2b46d80e17
tree33987d6c34543b6e573df11e98c3f0f69ace5392
parent12df9c50568a08db0b38fb70f088b80ec2793191
phy: rockchip-usb: add handler for usb-uart functionality

Most newer Rockchip SoCs provide the possibility to use a usb-phy
as passthrough for the debug uart (uart2), making it possible to
for example get console output without needing to open the device.

This patch adds an early_initcall to enable this functionality
conditionally via the commandline and also disables the corresponding
usb controller in the devicetree.

Currently only data for the rk3288 is provided, but at least the
rk3188 and arm64 rk3368 also provide this functionality and will be
enabled later.

On a spliced usb cable the signals are tx on white wire(D+) and
rx on green wire(D-).

The one caveat is that currently the reconfiguration of the phy
happens as early_initcall, as the code depends on the unflattened
devicetree being available. Everything is fine if only a regular
console is active as the console-replay will happen after the
reconfiguation. But with earlycon active output up to smp-init
currently will get lost.

The phy is an optional property for the connected dwc2 controller,
so we still provide the phy device but fail all phy-ops with -EBUSY
to make sure the dwc2 does not try to transmit anything on the
repurposed phy.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Documentation/kernel-parameters.txt
drivers/phy/phy-rockchip-usb.c
This page took 0.027426 seconds and 5 git commands to generate.