ARM: shmobile: Lager USB0 cable detection workaround
authorMagnus Damm <damm@opensource.se>
Wed, 29 Jan 2014 23:10:29 +0000 (08:10 +0900)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:13:52 +0000 (11:13 +0100)
commit2db8b2f1ebc18ba70367b59d3e46f0afac96c369
treed98f028d70fb362552988763dccb739116921970
parent23184153ed6333ed6f70542449d01fa9e86dac87
ARM: shmobile: Lager USB0 cable detection workaround

Add Lager board code to check the PWEN GPIO signal and refuse to
allow probe of the USBHS driver in case of DIP misconfiguration.

For correct operation Lager DIP switches SW5 and SW6 shall be
configured in 2-3 position to enable USB Function support.

If the DIP switch is configured incorrectly then the user can
simply adjust the hardware and either reboot or use the bind interface
to try to probe again:

# echo renesas_usbhs > /sys/bus/platform/drivers/renesas_usbhs/bind

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 36be7686caa05334ca8d52df157b373a41d8d9f1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/board-lager.c