aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0123-bcm270x_dt-Add-dwc2-and-dwc-otg-overlays.patch
blob: 96349dbd140a53861269dc2111f3f7ce8fc39c5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
From 48f5e9485618e81c4559429a07faafe854cd39c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
Date: Thu, 31 Dec 2015 16:44:58 +0100
Subject: [PATCH 123/156] bcm270x_dt: Add dwc2 and dwc-otg overlays

---
 arch/arm/boot/dts/overlays/Makefile            |  2 ++
 arch/arm/boot/dts/overlays/README              | 21 +++++++++++++++++++
 arch/arm/boot/dts/overlays/dwc-otg-overlay.dts | 20 ++++++++++++++++++
 arch/arm/boot/dts/overlays/dwc2-overlay.dts    | 29 ++++++++++++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 100644 arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
 create mode 100644 arch/arm/boot/dts/overlays/dwc2-overlay.dts

--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -15,6 +15,8 @@ endif
 dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
 dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb
 dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
+dtb-$(RPI_DT_OVERLAYS) += dwc2-overlay.dtb
+dtb-$(RPI_DT_OVERLAYS) += dwc-otg-overlay.dtb
 dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb
 dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb
 dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -198,6 +198,27 @@ Params: gpiopin                  GPIO co
                                  (default 4)
 
 
+Name:   dwc-otg
+Info:   Selects the dwc_otg USB controller driver which has fiq support. This
+        is the default on all except the Pi Zero which defaults to dwc2.
+Load:   dtoverlay=dwc-otg
+Params: <None>
+
+
+Name:   dwc2
+Info:   Selects the dwc2 USB controller driver
+Load:   dtoverlay=dwc2,<param>=<val>
+Params: dr_mode                  Dual role mode: "host", "peripheral" or "otg"
+
+        g-rx-fifo-size           Size of rx fifo size in gadget mode
+
+        g-np-tx-fifo-size        Size of non-periodic tx fifo size in gadget
+                                 mode
+
+        g-tx-fifo-size           Size of periodic tx fifo per endpoint
+                                 (except ep0) in gadget mode
+
+
 [ The ds1307-rtc overlay has been deleted. See i2c-rtc. ]
 
 
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
@@ -0,0 +1,20 @@
+/dts-v1/;
+/plugin/;
+
+/{
+	compatible = "brcm,bcm2708";
+
+	fragment@0 {
+		target = <&usb>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		__overlay__ {
+			compatible = "brcm,bcm2708-usb";
+			reg = <0x7e980000 0x10000>,
+			      <0x7e006000 0x1000>;
+			interrupts = <2 0>,
+				     <1 9>;
+			status = "okay";
+		};
+	};
+};
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts
@@ -0,0 +1,29 @@
+/dts-v1/;
+/plugin/;
+
+/{
+	compatible = "brcm,bcm2708";
+
+	fragment@0 {
+		target = <&usb>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		__overlay__ {
+			compatible = "brcm,bcm2835-usb";
+			reg = <0x7e980000 0x10000>;
+			interrupts = <1 9>;
+			dr_mode = "otg";
+			g-np-tx-fifo-size = <32>;
+			g-rx-fifo-size = <256>;
+			g-tx-fifo-size = <256 128 128 64 64 64 32>;
+			status = "okay";
+		};
+	};
+
+	__overrides__ {
+		dr_mode = <&usb>, "dr_mode";
+		g-np-tx-fifo-size = <&usb>,"g-np-tx-fifo-size:0";
+		g-rx-fifo-size = <&usb>,"g-rx-fifo-size:0";
+		g-tx-fifo-size = <&usb>,"g-tx-fifo-size:0";
+	};
+};