c4a68b4da6
AB8505 supports an "UART carkit mode" which makes UART accessible through the USB connector. Upon detection of the UART cable, this mode has to be manually enabled by: 1. Turning on the PHY in peripheral mode 2. Reconfiguring PHY/pins to route UART signals to USB pins At the moment, we do not handle the UART link statuses at all, which means that UART stops working as soon as phy-ab8500-usb is loaded (since we disable the PHY after initialization). Keeping UART working if the cable is inserted before turning on the device is quite simple: In this case, early boot firmware has already set up the necessary PHY/pin configuration. The presence of the UART cable is reported by a special value in the USB link status register. We can check for that value in ab8505_usb_link_status_update() and set the PHY back to peripheral mode to restore UART. (Note: This will result in some minor garbage since we still temporarily disable the PHY during initialization...) Fully implementing this feature is more complicated: For some reason, AB8505 does not update UART link status after bootup. Regular USB cables work fine, but the link status register does not change its state if an UART cable is inserted/removed. It seems likely that the hardware is not actually capable of detecting UART cables autonomously. In addition to the USB link status register, implementations in the vendor kernel also manually measure the ID resistance to detect additional cable types. For UART cables, the USB link status register might simply reflect the PHY configuration instead of the actual link status. Implementing that functionality requires significant additions, so for now just implement the simple case. This allows using UART when inserting the cable before turning on the device. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20191218203450.71037-1-stephan@gerhold.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
Documentation | ||
LICENSES | ||
arch | ||
block | ||
certs | ||
crypto | ||
drivers | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
README
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.