gemini: Add kernel v6.1 patches
[openwrt/openwrt.git] / target / linux / gemini / patches-6.1 / 0029-ARM-dts-gemini-Enable-DNS313-FOTG210-as-periph.patch
1 From 296184694ae7a4e388603c95499e98d30b21cc09 Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Mon, 23 Jan 2023 08:39:16 +0100
4 Subject: [PATCH 29/29] ARM: dts: gemini: Enable DNS313 FOTG210 as periph
5
6 Add the GPIO-based VBUS phy, and enable the FOTG210
7 USB1 block for use as peripheral.
8
9 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 Link: https://lore.kernel.org/r/20230123073916.2350839-2-linus.walleij@linaro.org
11 ---
12 --- a/arch/arm/boot/dts/gemini-dlink-dns-313.dts
13 +++ b/arch/arm/boot/dts/gemini-dlink-dns-313.dts
14 @@ -80,6 +80,15 @@
15 #cooling-cells = <2>;
16 };
17
18 + /*
19 + * This is the type B USB connector on the device,
20 + * a GPIO-controlled USB VBUS detect
21 + */
22 + usb1_phy: phy {
23 + compatible = "gpio-usb-b-connector", "usb-b-connector";
24 + #phy-cells = <0>;
25 + vbus-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
26 + };
27
28 /* Global Mixed-Mode Technology G751 mounted on GPIO I2C */
29 i2c {
30 @@ -302,5 +311,13 @@
31 ide@63000000 {
32 status = "okay";
33 };
34 +
35 + usb@69000000 {
36 + status = "okay";
37 + dr_mode = "peripheral";
38 + usb-phy = <&usb1_phy>;
39 + pinctrl-names = "default";
40 + pinctrl-0 = <&usb_default_pins>;
41 + };
42 };
43 };
44 --- a/arch/arm/boot/dts/gemini.dtsi
45 +++ b/arch/arm/boot/dts/gemini.dtsi
46 @@ -455,6 +455,8 @@
47 */
48 pinctrl-names = "default";
49 pinctrl-0 = <&usb_default_pins>;
50 + /* Default to host mode */
51 + dr_mode = "host";
52 syscon = <&syscon>;
53 status = "disabled";
54 };