ARM: dts: gemini: Enable DNS313 FOTG210 as periph
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 23 Jan 2023 07:39:16 +0000 (08:39 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 25 Jan 2023 07:49:32 +0000 (08:49 +0100)
Add the GPIO-based VBUS phy, and enable the FOTG210
USB1 block for use as peripheral.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230123073916.2350839-2-linus.walleij@linaro.org
arch/arm/boot/dts/gemini-dlink-dns-313.dts
arch/arm/boot/dts/gemini.dtsi

index fbbea139defc9e73c779d50e3b99c43d5393b8c7..138c47e1ac1b1dee69caba7009adb486b8339715 100644 (file)
                #cooling-cells = <2>;
        };
 
+       /*
+        * This is the type B USB connector on the device,
+        * a GPIO-controlled USB VBUS detect
+        */
+       usb1_phy: phy {
+               compatible = "gpio-usb-b-connector", "usb-b-connector";
+               #phy-cells = <0>;
+               vbus-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+       };
 
        /* Global Mixed-Mode Technology G751 mounted on GPIO I2C */
        i2c {
                ide@63000000 {
                        status = "okay";
                };
+
+               usb@69000000 {
+                       status = "okay";
+                       dr_mode = "peripheral";
+                       usb-phy = <&usb1_phy>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&usb_default_pins>;
+               };
        };
 };
index 966b193c05adb3598bcbd3a22161f6d0a1fe2a85..befe322bd7de9f63033dd265a6c0870657d3e9dd 100644 (file)
                         */
                        pinctrl-names = "default";
                        pinctrl-0 = <&usb_default_pins>;
+                       /* Default to host mode */
+                       dr_mode = "host";
                        syscon = <&syscon>;
                        status = "disabled";
                };