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

ARM: dts: sun5i: hsg-h702: Enable USB OTG controller

This tablet has proper USB OTG support, using 3 GPIO pins for
ID and VBUS detection, and also VBUS control.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

authored by

Chen-Yu Tsai and committed by
Maxime Ripard
36d16154 d747af01

+38
+38
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
··· 130 130 status = "okay"; 131 131 }; 132 132 133 + &otg_sram { 134 + status = "okay"; 135 + }; 136 + 133 137 &pio { 134 138 mmc0_cd_pin_h702: mmc0_cd_pin@0 { 135 139 allwinner,pins = "PG0"; 136 140 allwinner,function = "gpio_in"; 137 141 allwinner,drive = <SUN4I_PINCTRL_10_MA>; 138 142 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 143 + }; 144 + 145 + usb0_id_detect_pin: usb0_id_detect_pin@0 { 146 + allwinner,pins = "PG2"; 147 + allwinner,function = "gpio_in"; 148 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 149 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 150 + }; 151 + 152 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 153 + allwinner,pins = "PG1"; 154 + allwinner,function = "gpio_in"; 155 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 156 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 139 157 }; 140 158 }; 141 159 ··· 190 172 regulator-name = "vcc-wifi"; 191 173 }; 192 174 175 + &reg_usb0_vbus { 176 + pinctrl-0 = <&usb0_vbus_pin_a>; 177 + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 178 + status = "okay"; 179 + }; 180 + 193 181 &uart1 { 194 182 pinctrl-names = "default"; 195 183 pinctrl-0 = <&uart1_pins_b>; 196 184 status = "okay"; 197 185 }; 198 186 187 + &usb_otg { 188 + dr_mode = "otg"; 189 + status = "okay"; 190 + }; 191 + 192 + &usb0_vbus_pin_a { 193 + allwinner,pins = "PG12"; 194 + }; 195 + 199 196 &usbphy { 197 + pinctrl-names = "default"; 198 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 199 + usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 200 + usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 201 + usb0_vbus-supply = <&reg_usb0_vbus>; 200 202 usb1_vbus-supply = <&reg_ldo3>; 201 203 status = "okay"; 202 204 };