* [PATCH 1/4] ARM: dts: bcm283x: Add dtsi for OTG mode
2017-05-21 16:44 ` Stefan Wahren
@ 2017-05-21 16:44 ` Stefan Wahren
-1 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-05-21 16:44 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Eric Anholt
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
The Raspberry Pi Zero also supports OTG mode. So provide a dtsi file
to configure the USB interface accordingly. The fifo sizes are optimized
for device endpoint 6 and 7 with the maximum of 768.
Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
diff --git a/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi b/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
new file mode 100644
index 0000000..e7d217c
--- /dev/null
+++ b/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
@@ -0,0 +1,10 @@
+&usb {
+ dr_mode = "otg";
+ g-rx-fifo-size = <256>;
+ g-np-tx-fifo-size = <32>;
+ /*
+ * According to dwc2 the sum of all device EP
+ * fifo sizes shouldn't exceed 3776 bytes.
+ */
+ g-tx-fifo-size = <256 256 512 512 512 768 768>;
+};
--
2.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/4] ARM: dts: bcm283x: Add dtsi for OTG mode
@ 2017-05-21 16:44 ` Stefan Wahren
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-05-21 16:44 UTC (permalink / raw)
To: linux-arm-kernel
The Raspberry Pi Zero also supports OTG mode. So provide a dtsi file
to configure the USB interface accordingly. The fifo sizes are optimized
for device endpoint 6 and 7 with the maximum of 768.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
diff --git a/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi b/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
new file mode 100644
index 0000000..e7d217c
--- /dev/null
+++ b/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
@@ -0,0 +1,10 @@
+&usb {
+ dr_mode = "otg";
+ g-rx-fifo-size = <256>;
+ g-np-tx-fifo-size = <32>;
+ /*
+ * According to dwc2 the sum of all device EP
+ * fifo sizes shouldn't exceed 3776 bytes.
+ */
+ g-tx-fifo-size = <256 256 512 512 512 768 768>;
+};
--
2.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/4] ARM: dts: bcm283x: Add generic USB PHY
2017-05-21 16:44 ` Stefan Wahren
@ 2017-05-21 16:44 ` Stefan Wahren
-1 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-05-21 16:44 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Eric Anholt
Cc: Florian Fainelli, Phil Elwell, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren
In order to use dwc2 in OTG or gadget mode the USB PHY should be
specified. Since there is no bcm283x USB PHY driver use the generic
one.
Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/bcm283x.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 86a5db5..9a05cde 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -589,6 +589,8 @@
#size-cells = <0>;
clocks = <&clk_usb>;
clock-names = "otg";
+ phys = <&usbphy>;
+ phy-names = "usb2-phy";
};
v3d: v3d@7ec00000 {
@@ -624,4 +626,8 @@
clock-frequency = <480000000>;
};
};
+
+ usbphy: phy {
+ compatible = "usb-nop-xceiv";
+ };
};
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/4] ARM: dts: bcm283x: Add generic USB PHY
@ 2017-05-21 16:44 ` Stefan Wahren
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-05-21 16:44 UTC (permalink / raw)
To: linux-arm-kernel
In order to use dwc2 in OTG or gadget mode the USB PHY should be
specified. Since there is no bcm283x USB PHY driver use the generic
one.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/boot/dts/bcm283x.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 86a5db5..9a05cde 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -589,6 +589,8 @@
#size-cells = <0>;
clocks = <&clk_usb>;
clock-names = "otg";
+ phys = <&usbphy>;
+ phy-names = "usb2-phy";
};
v3d: v3d at 7ec00000 {
@@ -624,4 +626,8 @@
clock-frequency = <480000000>;
};
};
+
+ usbphy: phy {
+ compatible = "usb-nop-xceiv";
+ };
};
--
2.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/4] ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
2017-05-21 16:44 ` Stefan Wahren
@ 2017-05-21 16:44 ` Stefan Wahren
-1 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-05-21 16:44 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Eric Anholt
Cc: Florian Fainelli, Phil Elwell, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren
In order to use the serial and ethernet USB gadget support on
Raspberry Zero, we also need to enable the PHY driver, kernel module
and OTG support.
Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
arch/arm/configs/bcm2835_defconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index 3ba8cd3..3ee9d78 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -24,6 +24,8 @@ CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_JUMP_LABEL=y
CONFIG_CC_STACKPROTECTOR_REGULAR=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
CONFIG_ARCH_MULTI_V6=y
CONFIG_ARCH_BCM=y
CONFIG_ARCH_BCM2835=y
@@ -86,8 +88,14 @@ CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_BCM2835_SOC_I2S=y
CONFIG_USB=y
+CONFIG_USB_OTG=y
CONFIG_USB_STORAGE=y
CONFIG_USB_DWC2=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_EEM=y
+CONFIG_USB_G_SERIAL=m
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/4] ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
@ 2017-05-21 16:44 ` Stefan Wahren
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-05-21 16:44 UTC (permalink / raw)
To: linux-arm-kernel
In order to use the serial and ethernet USB gadget support on
Raspberry Zero, we also need to enable the PHY driver, kernel module
and OTG support.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/configs/bcm2835_defconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index 3ba8cd3..3ee9d78 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -24,6 +24,8 @@ CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_JUMP_LABEL=y
CONFIG_CC_STACKPROTECTOR_REGULAR=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
CONFIG_ARCH_MULTI_V6=y
CONFIG_ARCH_BCM=y
CONFIG_ARCH_BCM2835=y
@@ -86,8 +88,14 @@ CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_BCM2835_SOC_I2S=y
CONFIG_USB=y
+CONFIG_USB_OTG=y
CONFIG_USB_STORAGE=y
CONFIG_USB_DWC2=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_EEM=y
+CONFIG_USB_G_SERIAL=m
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
--
2.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] ARM: dts: bcm2835-rpi-zero: Enable OTG mode
2017-05-21 16:44 ` Stefan Wahren
@ 2017-06-01 8:38 ` Stefan Wahren
-1 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-06-01 8:38 UTC (permalink / raw)
To: Eric Anholt, Rob Herring, Mark Rutland
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
> Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> hat am 21. Mai 2017 um 18:44 geschrieben:
>
>
> This patch series enable OTG mode for Raspberry Pi Zero because dwc2 driver
> has been fixed now.
>
> Patch 1 adds a new dtsi file to setup OTG mode (could also be used for boards
> like RPi Zero W or the Compute Module). The second patch adds the USB PHY and
> was part of Raspberry Pi Zero support patch series before split up [1].
> The enabling of OTG mode of RPi Zero is done by patch number 3. The last patch
> updates the BCM2835 defconfig.
>
> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-July/004153.html
>
> Stefan Wahren (4):
> ARM: dts: bcm283x: Add dtsi for OTG mode
> ARM: dts: bcm283x: Add generic USB PHY
> ARM: dts: bcm2835-rpi-zero: Enable OTG mode
> ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
>
No comments to this patch series?
Regards
Stefan
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/4] ARM: dts: bcm2835-rpi-zero: Enable OTG mode
@ 2017-06-01 8:38 ` Stefan Wahren
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-06-01 8:38 UTC (permalink / raw)
To: linux-arm-kernel
> Stefan Wahren <stefan.wahren@i2se.com> hat am 21. Mai 2017 um 18:44 geschrieben:
>
>
> This patch series enable OTG mode for Raspberry Pi Zero because dwc2 driver
> has been fixed now.
>
> Patch 1 adds a new dtsi file to setup OTG mode (could also be used for boards
> like RPi Zero W or the Compute Module). The second patch adds the USB PHY and
> was part of Raspberry Pi Zero support patch series before split up [1].
> The enabling of OTG mode of RPi Zero is done by patch number 3. The last patch
> updates the BCM2835 defconfig.
>
> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-July/004153.html
>
> Stefan Wahren (4):
> ARM: dts: bcm283x: Add dtsi for OTG mode
> ARM: dts: bcm283x: Add generic USB PHY
> ARM: dts: bcm2835-rpi-zero: Enable OTG mode
> ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
>
No comments to this patch series?
Regards
Stefan
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <542130487.90500.1496306283902-7tX72C7vayboQLBSYMtkGA@public.gmane.org>]
* Re: [PATCH 0/4] ARM: dts: bcm2835-rpi-zero: Enable OTG mode
2017-06-01 8:38 ` Stefan Wahren
@ 2017-06-09 7:05 ` Stefan Wahren
-1 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-06-09 7:05 UTC (permalink / raw)
To: Eric Anholt, Rob Herring, Mark Rutland
Cc: Phil Elwell, Florian Fainelli,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
Am 01.06.2017 um 10:38 schrieb Stefan Wahren:
>> Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> hat am 21. Mai 2017 um 18:44 geschrieben:
>>
>>
>> This patch series enable OTG mode for Raspberry Pi Zero because dwc2 driver
>> has been fixed now.
>>
>> Patch 1 adds a new dtsi file to setup OTG mode (could also be used for boards
>> like RPi Zero W or the Compute Module). The second patch adds the USB PHY and
>> was part of Raspberry Pi Zero support patch series before split up [1].
>> The enabling of OTG mode of RPi Zero is done by patch number 3. The last patch
>> updates the BCM2835 defconfig.
>>
>> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-July/004153.html
>>
>> Stefan Wahren (4):
>> ARM: dts: bcm283x: Add dtsi for OTG mode
>> ARM: dts: bcm283x: Add generic USB PHY
>> ARM: dts: bcm2835-rpi-zero: Enable OTG mode
>> ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
>>
> No comments to this patch series?
>
> Regards
> Stefan
@Eric
Should i merge them?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/4] ARM: dts: bcm2835-rpi-zero: Enable OTG mode
@ 2017-06-09 7:05 ` Stefan Wahren
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Wahren @ 2017-06-09 7:05 UTC (permalink / raw)
To: linux-arm-kernel
Am 01.06.2017 um 10:38 schrieb Stefan Wahren:
>> Stefan Wahren <stefan.wahren@i2se.com> hat am 21. Mai 2017 um 18:44 geschrieben:
>>
>>
>> This patch series enable OTG mode for Raspberry Pi Zero because dwc2 driver
>> has been fixed now.
>>
>> Patch 1 adds a new dtsi file to setup OTG mode (could also be used for boards
>> like RPi Zero W or the Compute Module). The second patch adds the USB PHY and
>> was part of Raspberry Pi Zero support patch series before split up [1].
>> The enabling of OTG mode of RPi Zero is done by patch number 3. The last patch
>> updates the BCM2835 defconfig.
>>
>> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-July/004153.html
>>
>> Stefan Wahren (4):
>> ARM: dts: bcm283x: Add dtsi for OTG mode
>> ARM: dts: bcm283x: Add generic USB PHY
>> ARM: dts: bcm2835-rpi-zero: Enable OTG mode
>> ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
>>
> No comments to this patch series?
>
> Regards
> Stefan
@Eric
Should i merge them?
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <6a45fcd8-0d88-bc17-6432-d38fe771dc80-eS4NqCHxEME@public.gmane.org>]
* Re: [PATCH 0/4] ARM: dts: bcm2835-rpi-zero: Enable OTG mode
2017-06-09 7:05 ` Stefan Wahren
@ 2017-06-12 23:10 ` Eric Anholt
-1 siblings, 0 replies; 16+ messages in thread
From: Eric Anholt @ 2017-06-12 23:10 UTC (permalink / raw)
To: Stefan Wahren, Rob Herring, Mark Rutland
Cc: Phil Elwell, Florian Fainelli,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> writes:
> Am 01.06.2017 um 10:38 schrieb Stefan Wahren:
>>> Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> hat am 21. Mai 2017 um 18:44 geschrieben:
>>>
>>>
>>> This patch series enable OTG mode for Raspberry Pi Zero because dwc2 driver
>>> has been fixed now.
>>>
>>> Patch 1 adds a new dtsi file to setup OTG mode (could also be used for boards
>>> like RPi Zero W or the Compute Module). The second patch adds the USB PHY and
>>> was part of Raspberry Pi Zero support patch series before split up [1].
>>> The enabling of OTG mode of RPi Zero is done by patch number 3. The last patch
>>> updates the BCM2835 defconfig.
>>>
>>> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-July/004153.html
>>>
>>> Stefan Wahren (4):
>>> ARM: dts: bcm283x: Add dtsi for OTG mode
>>> ARM: dts: bcm283x: Add generic USB PHY
>>> ARM: dts: bcm2835-rpi-zero: Enable OTG mode
>>> ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
>>>
>> No comments to this patch series?
>>
>> Regards
>> Stefan
>
> @Eric
>
> Should i merge them?
I would have rebased my local branch on them, but I've merged them now.
Waiting for -next testing to come back, then I've got PR text ready to
send out.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/4] ARM: dts: bcm2835-rpi-zero: Enable OTG mode
@ 2017-06-12 23:10 ` Eric Anholt
0 siblings, 0 replies; 16+ messages in thread
From: Eric Anholt @ 2017-06-12 23:10 UTC (permalink / raw)
To: linux-arm-kernel
Stefan Wahren <stefan.wahren@i2se.com> writes:
> Am 01.06.2017 um 10:38 schrieb Stefan Wahren:
>>> Stefan Wahren <stefan.wahren@i2se.com> hat am 21. Mai 2017 um 18:44 geschrieben:
>>>
>>>
>>> This patch series enable OTG mode for Raspberry Pi Zero because dwc2 driver
>>> has been fixed now.
>>>
>>> Patch 1 adds a new dtsi file to setup OTG mode (could also be used for boards
>>> like RPi Zero W or the Compute Module). The second patch adds the USB PHY and
>>> was part of Raspberry Pi Zero support patch series before split up [1].
>>> The enabling of OTG mode of RPi Zero is done by patch number 3. The last patch
>>> updates the BCM2835 defconfig.
>>>
>>> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-July/004153.html
>>>
>>> Stefan Wahren (4):
>>> ARM: dts: bcm283x: Add dtsi for OTG mode
>>> ARM: dts: bcm283x: Add generic USB PHY
>>> ARM: dts: bcm2835-rpi-zero: Enable OTG mode
>>> ARM: bcm2835_defconfig: Enable serial & ethernet USB gadget support
>>>
>> No comments to this patch series?
>>
>> Regards
>> Stefan
>
> @Eric
>
> Should i merge them?
I would have rebased my local branch on them, but I've merged them now.
Waiting for -next testing to come back, then I've got PR text ready to
send out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170612/8c103534/attachment.sig>
^ permalink raw reply [flat|nested] 16+ messages in thread