Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: tegra: nexus7: Enable USB OTG mode

Nexus 7 has OTG-cable microUSB port, enable OTG mode. USB peripheral
devices now can be connected to Nexus 7 using OTG adapter, switching
USB port into host mode.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Dmitry Osipenko and committed by
Thierry Reding
98473f28 b460ecc0

+23 -2
+23 -2
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi
··· 944 944 interrupts = <TEGRA_GPIO(V, 1) IRQ_TYPE_EDGE_BOTH>; 945 945 946 946 summit,enable-charge-control = <SMB3XX_CHG_ENABLE_PIN_ACTIVE_LOW>; 947 + summit,inok-polarity = <SMB3XX_SYSOK_INOK_ACTIVE_LOW>; 947 948 summit,enable-usb-charging; 948 949 949 950 monitored-battery = <&battery_cell>; 951 + 952 + usb_vbus: usb-vbus { 953 + regulator-name = "usb_vbus"; 954 + regulator-min-microvolt = <5000000>; 955 + regulator-max-microvolt = <5000000>; 956 + regulator-min-microamp = <750000>; 957 + regulator-max-microamp = <750000>; 958 + 959 + /* 960 + * SMB347 INOK input pin is connected to PMIC's 961 + * ACOK output, which is fixed to ACTIVE_LOW as 962 + * long as battery voltage is in a good range. 963 + * 964 + * Active INOK disables SMB347 output, so polarity 965 + * needs to be toggled when we want to get the 966 + * output. 967 + */ 968 + summit,needs-inok-toggle; 969 + }; 950 970 }; 951 971 }; 952 972 ··· 1039 1019 usb@7d000000 { 1040 1020 compatible = "nvidia,tegra30-udc"; 1041 1021 status = "okay"; 1042 - dr_mode = "peripheral"; 1022 + dr_mode = "otg"; 1023 + vbus-supply = <&usb_vbus>; 1043 1024 }; 1044 1025 1045 1026 usb-phy@7d000000 { 1046 1027 status = "okay"; 1047 - dr_mode = "peripheral"; 1028 + dr_mode = "otg"; 1048 1029 nvidia,hssync-start-delay = <0>; 1049 1030 nvidia,xcvr-lsfslew = <2>; 1050 1031 nvidia,xcvr-lsrslew = <2>;