Skip to content
Permalink
Browse files

Orange Pi PC USB-OTG support

  • Loading branch information
Ondrej Jirman
Ondrej Jirman committed Jun 27, 2016
1 parent d24d2ff commit dd906318a8800bdc289f9c6e73e29af3aa4980e3
Showing with 74 additions and 1 deletion.
  1. +38 −1 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
  2. +36 −0 arch/arm/boot/dts/sun8i-h3.dtsi
@@ -172,6 +172,10 @@
};
};

&ehci0 {
status = "okay";
};

&ehci1 {
status = "okay";
};
@@ -200,6 +204,10 @@
status = "okay";
};

&ohci0 {
status = "okay";
};

&ohci1 {
status = "okay";
};
@@ -219,6 +227,13 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};

usb0_id_detect_pin: usb0_id_detect_pin@0 {
allwinner,pins = "PG12";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};

&r_pio {
@@ -235,6 +250,19 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};

usb0_vbus_pin_opipc: usb0_vbus_pin@0 {
allwinner,pins = "PL2";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};

&reg_usb0_vbus {
pinctrl-0 = <&usb0_vbus_pin_opipc>;
gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
status = "okay";
};

&uart0 {
@@ -243,9 +271,18 @@
status = "okay";
};

&usb_otg {
dr_mode = "otg";
status = "okay";
};

&usbphy {
/* USB VBUS is always on */
/* USB VBUS is always on except for the OTG port */
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_detect_pin>;
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
usb0_vbus-supply = <&reg_usb0_vbus>;
};

&emac {
@@ -448,6 +448,42 @@
#phy-cells = <1>;
};

usb_otg: usb@01c19000 {
compatible = "allwinner,sun8i-a33-musb";
reg = <0x01c19000 0x0400>;
clocks = <&bus_gates 23>;
resets = <&ahb_rst 23>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mc";
phys = <&usbphy 0>;
phy-names = "usb";
extcon = <&usbphy 0>;
status = "disabled";
};

ehci0: usb@01c1a000 {
compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
reg = <0x01c1a000 0x100>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bus_gates 24>, <&bus_gates 28>;
resets = <&ahb_rst 24>, <&ahb_rst 28>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "disabled";
};

ohci0: usb@01c1a400 {
compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
reg = <0x01c1a400 0x100>;
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bus_gates 28>, <&bus_gates 24>,
<&usb_clk 16>;
resets = <&ahb_rst 28>, <&ahb_rst 24>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "disabled";
};

ehci1: usb@01c1b000 {
compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
reg = <0x01c1b000 0x100>;

0 comments on commit dd90631

Please sign in to comment.
You can’t perform that action at this time.