All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-07-26 18:53 ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

This patch series is only a draft and not intended to be merged. Patches 1 and 2
aren't bcm2835 specific and should be helpful for other platforms. 
The patches 2 - 4 are required for otg / gadget mode. The last patch
based on the work of Lubomir Rintel [1] and Noralf Trønnes [2].

Changes since V1:
- rebase to current linux-next
- add patches 1 - 4 for otg/gadget support
- add patch 5 with model compatible
- use polarity define for ACT LED

[1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
[2] - https://github.com/raspberrypi/linux/pull/1239/

Stefan Wahren (6):
  usb: dwc2: core: Avoid nonsense error in gadget mode
  usb: dwc2: Add DT properties to specify fifo size in host/otg mode
  ARM: dts: bcm283x: Add missing usb clock
  ARM: dts: bcm283x: Add generic USB PHY
  DT: bindings: bcm: Add Raspberry Pi Zero
  ARM: dts: bcm2835: Add Raspberry Pi Zero

 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |    4 ++
 Documentation/devicetree/bindings/usb/dwc2.txt     |    3 ++
 arch/arm/boot/dts/Makefile                         |    3 +-
 arch/arm/boot/dts/bcm2835-rpi-zero.dts             |   57 ++++++++++++++++++++
 arch/arm/boot/dts/bcm283x.dtsi                     |   15 ++++++
 drivers/usb/dwc2/core.c                            |   35 +++++++++---
 6 files changed, 108 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-07-26 18:53 ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series is only a draft and not intended to be merged. Patches 1 and 2
aren't bcm2835 specific and should be helpful for other platforms. 
The patches 2 - 4 are required for otg / gadget mode. The last patch
based on the work of Lubomir Rintel [1] and Noralf Tr?nnes [2].

Changes since V1:
- rebase to current linux-next
- add patches 1 - 4 for otg/gadget support
- add patch 5 with model compatible
- use polarity define for ACT LED

[1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
[2] - https://github.com/raspberrypi/linux/pull/1239/

Stefan Wahren (6):
  usb: dwc2: core: Avoid nonsense error in gadget mode
  usb: dwc2: Add DT properties to specify fifo size in host/otg mode
  ARM: dts: bcm283x: Add missing usb clock
  ARM: dts: bcm283x: Add generic USB PHY
  DT: bindings: bcm: Add Raspberry Pi Zero
  ARM: dts: bcm2835: Add Raspberry Pi Zero

 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |    4 ++
 Documentation/devicetree/bindings/usb/dwc2.txt     |    3 ++
 arch/arm/boot/dts/Makefile                         |    3 +-
 arch/arm/boot/dts/bcm2835-rpi-zero.dts             |   57 ++++++++++++++++++++
 arch/arm/boot/dts/bcm283x.dtsi                     |   15 ++++++
 drivers/usb/dwc2/core.c                            |   35 +++++++++---
 6 files changed, 108 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-07-26 18:53     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

In gadget mode On bcm2835 platform the host tx fifo size could be zero.
So add zero to range and avoid such nonsense errors:

dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
 drivers/usb/dwc2/core.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 4135a5f..5645528 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -819,7 +819,10 @@ void dwc2_set_param_host_nperio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
 {
 	int valid = 1;
 
-	if (val < 16 || val > hsotg->hw_params.host_nperio_tx_fifo_size)
+	if (val && (val < 16))
+		valid = 0;
+
+	if (val > hsotg->hw_params.host_nperio_tx_fifo_size)
 		valid = 0;
 
 	if (!valid) {
@@ -839,7 +842,10 @@ void dwc2_set_param_host_perio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
 {
 	int valid = 1;
 
-	if (val < 16 || val > hsotg->hw_params.host_perio_tx_fifo_size)
+	if (val && (val < 16))
+		valid = 0;
+
+	if (val > hsotg->hw_params.host_perio_tx_fifo_size)
 		valid = 0;
 
 	if (!valid) {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
@ 2016-07-26 18:53     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

In gadget mode On bcm2835 platform the host tx fifo size could be zero.
So add zero to range and avoid such nonsense errors:

dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/usb/dwc2/core.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 4135a5f..5645528 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -819,7 +819,10 @@ void dwc2_set_param_host_nperio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
 {
 	int valid = 1;
 
-	if (val < 16 || val > hsotg->hw_params.host_nperio_tx_fifo_size)
+	if (val && (val < 16))
+		valid = 0;
+
+	if (val > hsotg->hw_params.host_nperio_tx_fifo_size)
 		valid = 0;
 
 	if (!valid) {
@@ -839,7 +842,10 @@ void dwc2_set_param_host_perio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
 {
 	int valid = 1;
 
-	if (val < 16 || val > hsotg->hw_params.host_perio_tx_fifo_size)
+	if (val && (val < 16))
+		valid = 0;
+
+	if (val > hsotg->hw_params.host_perio_tx_fifo_size)
 		valid = 0;
 
 	if (!valid) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-07-26 18:53     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

Currently the fifo sizes for host/otg mode are defined per platform
and doesn't take the mode into account. So we will get errors
like this:

dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32

So add DT properties for these mode specific fifo sizes in order
to define them in the devicetree and avoid these errors.

Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
 Documentation/devicetree/bindings/usb/dwc2.txt |    3 +++
 drivers/usb/dwc2/core.c                        |   25 ++++++++++++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index 20a68bf..298bac1 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -27,6 +27,9 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
 - 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.
+- h-rx-fifo-size: size of rx fifo size in host / otg mode.
+- h-np-tx-fifo-size: size of non-periodic tx fifo size in host / otg mode.
+- h-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in host / otg mode.
 
 Example:
 
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 5645528..5dffc6e 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -47,6 +47,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/of.h>
 #include <linux/slab.h>
 #include <linux/usb.h>
 
@@ -1289,6 +1290,9 @@ static void dwc2_set_param_hibernation(struct dwc2_hsotg *hsotg,
 void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
 			 const struct dwc2_core_params *params)
 {
+	struct device_node *np = hsotg->dev->of_node;
+	u32 val = 0;
+
 	dev_dbg(hsotg->dev, "%s()\n", __func__);
 
 	dwc2_set_param_otg_cap(hsotg, params->otg_cap);
@@ -1299,12 +1303,6 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
 			params->host_support_fs_ls_low_power);
 	dwc2_set_param_enable_dynamic_fifo(hsotg,
 			params->enable_dynamic_fifo);
-	dwc2_set_param_host_rx_fifo_size(hsotg,
-			params->host_rx_fifo_size);
-	dwc2_set_param_host_nperio_tx_fifo_size(hsotg,
-			params->host_nperio_tx_fifo_size);
-	dwc2_set_param_host_perio_tx_fifo_size(hsotg,
-			params->host_perio_tx_fifo_size);
 	dwc2_set_param_max_transfer_size(hsotg,
 			params->max_transfer_size);
 	dwc2_set_param_max_packet_count(hsotg,
@@ -1329,6 +1327,21 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
 	dwc2_set_param_uframe_sched(hsotg, params->uframe_sched);
 	dwc2_set_param_external_id_pin_ctl(hsotg, params->external_id_pin_ctl);
 	dwc2_set_param_hibernation(hsotg, params->hibernation);
+
+	if (!IS_ENABLED(CONFIG_OF) ||
+	    of_property_read_u32(np, "h-rx-fifo-size", &val))
+		val = params->host_rx_fifo_size;
+	dwc2_set_param_host_rx_fifo_size(hsotg, val);
+
+	if (!IS_ENABLED(CONFIG_OF) ||
+	    of_property_read_u32(np, "h-np-tx-fifo-size", &val))
+		val = params->host_nperio_tx_fifo_size;
+	dwc2_set_param_host_nperio_tx_fifo_size(hsotg, val);
+
+	if (!IS_ENABLED(CONFIG_OF) ||
+	    of_property_read_u32(np, "h-tx-fifo-size", &val))
+		val = params->host_perio_tx_fifo_size;
+	dwc2_set_param_host_perio_tx_fifo_size(hsotg, val);
 }
 
 /*
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode
@ 2016-07-26 18:53     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

Currently the fifo sizes for host/otg mode are defined per platform
and doesn't take the mode into account. So we will get errors
like this:

dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32

So add DT properties for these mode specific fifo sizes in order
to define them in the devicetree and avoid these errors.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 Documentation/devicetree/bindings/usb/dwc2.txt |    3 +++
 drivers/usb/dwc2/core.c                        |   25 ++++++++++++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index 20a68bf..298bac1 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -27,6 +27,9 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
 - 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.
+- h-rx-fifo-size: size of rx fifo size in host / otg mode.
+- h-np-tx-fifo-size: size of non-periodic tx fifo size in host / otg mode.
+- h-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in host / otg mode.
 
 Example:
 
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 5645528..5dffc6e 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -47,6 +47,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/of.h>
 #include <linux/slab.h>
 #include <linux/usb.h>
 
@@ -1289,6 +1290,9 @@ static void dwc2_set_param_hibernation(struct dwc2_hsotg *hsotg,
 void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
 			 const struct dwc2_core_params *params)
 {
+	struct device_node *np = hsotg->dev->of_node;
+	u32 val = 0;
+
 	dev_dbg(hsotg->dev, "%s()\n", __func__);
 
 	dwc2_set_param_otg_cap(hsotg, params->otg_cap);
@@ -1299,12 +1303,6 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
 			params->host_support_fs_ls_low_power);
 	dwc2_set_param_enable_dynamic_fifo(hsotg,
 			params->enable_dynamic_fifo);
-	dwc2_set_param_host_rx_fifo_size(hsotg,
-			params->host_rx_fifo_size);
-	dwc2_set_param_host_nperio_tx_fifo_size(hsotg,
-			params->host_nperio_tx_fifo_size);
-	dwc2_set_param_host_perio_tx_fifo_size(hsotg,
-			params->host_perio_tx_fifo_size);
 	dwc2_set_param_max_transfer_size(hsotg,
 			params->max_transfer_size);
 	dwc2_set_param_max_packet_count(hsotg,
@@ -1329,6 +1327,21 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
 	dwc2_set_param_uframe_sched(hsotg, params->uframe_sched);
 	dwc2_set_param_external_id_pin_ctl(hsotg, params->external_id_pin_ctl);
 	dwc2_set_param_hibernation(hsotg, params->hibernation);
+
+	if (!IS_ENABLED(CONFIG_OF) ||
+	    of_property_read_u32(np, "h-rx-fifo-size", &val))
+		val = params->host_rx_fifo_size;
+	dwc2_set_param_host_rx_fifo_size(hsotg, val);
+
+	if (!IS_ENABLED(CONFIG_OF) ||
+	    of_property_read_u32(np, "h-np-tx-fifo-size", &val))
+		val = params->host_nperio_tx_fifo_size;
+	dwc2_set_param_host_nperio_tx_fifo_size(hsotg, val);
+
+	if (!IS_ENABLED(CONFIG_OF) ||
+	    of_property_read_u32(np, "h-tx-fifo-size", &val))
+		val = params->host_perio_tx_fifo_size;
+	dwc2_set_param_host_perio_tx_fifo_size(hsotg, val);
 }
 
 /*
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 3/6] ARM: dts: bcm283x: Add missing usb clock
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-07-26 18:53     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

According to the DWC2 binding an appropriate clock is required.
This clock isn't handled by bcm2835 clock driver, so add a fixed
clock to the bcm283x DT.

Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
 arch/arm/boot/dts/bcm283x.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index b982522..5472800 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -289,6 +289,8 @@
 			interrupts = <1 9>;
 			#address-cells = <1>;
 			#size-cells = <0>;
+			clocks = <&clk_usb>;
+			clock-names = "otg";
 		};
 
 		v3d: v3d@7ec00000 {
@@ -316,5 +318,12 @@
 			clock-frequency = <19200000>;
 		};
 
+		clk_usb: clock@4 {
+			compatible = "fixed-clock";
+			reg = <4>;
+			#clock-cells = <0>;
+			clock-output-names = "otg";
+			clock-frequency = <480000000>;
+		};
 	};
 };
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 3/6] ARM: dts: bcm283x: Add missing usb clock
@ 2016-07-26 18:53     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

According to the DWC2 binding an appropriate clock is required.
This clock isn't handled by bcm2835 clock driver, so add a fixed
clock to the bcm283x DT.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm283x.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index b982522..5472800 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -289,6 +289,8 @@
 			interrupts = <1 9>;
 			#address-cells = <1>;
 			#size-cells = <0>;
+			clocks = <&clk_usb>;
+			clock-names = "otg";
 		};
 
 		v3d: v3d at 7ec00000 {
@@ -316,5 +318,12 @@
 			clock-frequency = <19200000>;
 		};
 
+		clk_usb: clock at 4 {
+			compatible = "fixed-clock";
+			reg = <4>;
+			#clock-cells = <0>;
+			clock-output-names = "otg";
+			clock-frequency = <480000000>;
+		};
 	};
 };
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 4/6] ARM: dts: bcm283x: Add generic USB PHY
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-07-26 18:53     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

In order to use DWC2 in otg or gadget mode the USB PHY must 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>
---
 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 5472800..cb492ce 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -291,6 +291,8 @@
 			#size-cells = <0>;
 			clocks = <&clk_usb>;
 			clock-names = "otg";
+			phys = <&usbphy>;
+			phy-names = "usb2-phy";
 		};
 
 		v3d: v3d@7ec00000 {
@@ -302,6 +304,10 @@
 		vc4: gpu {
 			compatible = "brcm,bcm2835-vc4";
 		};
+
+		usbphy: phy {
+			compatible = "usb-nop-xceiv";
+		};
 	};
 
 	clocks {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 4/6] ARM: dts: bcm283x: Add generic USB PHY
@ 2016-07-26 18:53     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

In order to use DWC2 in otg or gadget mode the USB PHY must be
specified. Since there is no bcm283x USB PHY driver use the generic
one.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.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 5472800..cb492ce 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -291,6 +291,8 @@
 			#size-cells = <0>;
 			clocks = <&clk_usb>;
 			clock-names = "otg";
+			phys = <&usbphy>;
+			phy-names = "usb2-phy";
 		};
 
 		v3d: v3d at 7ec00000 {
@@ -302,6 +304,10 @@
 		vc4: gpu {
 			compatible = "brcm,bcm2835-vc4";
 		};
+
+		usbphy: phy {
+			compatible = "usb-nop-xceiv";
+		};
 	};
 
 	clocks {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 5/6] DT: bindings: bcm: Add Raspberry Pi Zero
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-07-26 18:53     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index 6ffe087..9c97de2 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -38,6 +38,10 @@ Raspberry Pi Compute Module
 Required root node properties:
 compatible = "raspberrypi,compute-module", "brcm,bcm2835";
 
+Raspberry Pi Zero
+Required root node properties:
+compatible = "raspberrypi,model-zero", "brcm,bcm2835";
+
 Generic BCM2835 board
 Required root node properties:
 compatible = "brcm,bcm2835";
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 5/6] DT: bindings: bcm: Add Raspberry Pi Zero
@ 2016-07-26 18:53     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index 6ffe087..9c97de2 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -38,6 +38,10 @@ Raspberry Pi Compute Module
 Required root node properties:
 compatible = "raspberrypi,compute-module", "brcm,bcm2835";
 
+Raspberry Pi Zero
+Required root node properties:
+compatible = "raspberrypi,model-zero", "brcm,bcm2835";
+
 Generic BCM2835 board
 Required root node properties:
 compatible = "brcm,bcm2835";
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-07-26 18:53     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stefan Wahren

The Raspberry Pi Zero is a minified version of model A+. It's
notable there is no PWR LED and the ACT LED is inverted.

Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
 arch/arm/boot/dts/Makefile             |    3 +-
 arch/arm/boot/dts/bcm2835-rpi-zero.dts |   57 ++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e38e7c9..cafa3b1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -69,7 +69,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b-rev2.dtb \
 	bcm2835-rpi-b-plus.dtb \
 	bcm2835-rpi-a-plus.dtb \
-	bcm2836-rpi-2-b.dtb
+	bcm2836-rpi-2-b.dtb \
+	bcm2835-rpi-zero.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
new file mode 100644
index 0000000..12bc82d
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -0,0 +1,57 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-zero", "brcm,bcm2835";
+	model = "Raspberry Pi Zero";
+
+	leds {
+		act {
+			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+
+&usb {
+	dr_mode = "host";
+	h-rx-fifo-size = <774>;
+	h-np-tx-fifo-size = <256>;
+	h-tx-fifo-size = <512>;
+/*
+ * Settings for otg
+ *
+	dr_mode = "otg";
+	h-rx-fifo-size = <774>;
+	h-np-tx-fifo-size = <32>;
+	h-tx-fifo-size = <0>;
+	g-np-tx-fifo-size = <16>;
+	g-rx-fifo-size = <256>;
+	g-tx-fifo-size = <256 128 128 64 64 64 32>;
+ *
+ * Settings for peripheral
+ *
+	dr_mode = "peripheral";
+	h-rx-fifo-size = <774>;
+	h-np-tx-fifo-size = <0>;
+	h-tx-fifo-size = <0>;
+	g-np-tx-fifo-size = <16>;
+	g-rx-fifo-size = <256>;
+	g-tx-fifo-size = <256 128 128 64 64 64 32>;
+ */
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
+
+	/* I2S interface */
+	i2s_alt0: i2s_alt0 {
+		brcm,pins = <18 19 20 21>;
+		brcm,function = <BCM2835_FSEL_ALT0>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-07-26 18:53     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-07-26 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

The Raspberry Pi Zero is a minified version of model A+. It's
notable there is no PWR LED and the ACT LED is inverted.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/Makefile             |    3 +-
 arch/arm/boot/dts/bcm2835-rpi-zero.dts |   57 ++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e38e7c9..cafa3b1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -69,7 +69,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b-rev2.dtb \
 	bcm2835-rpi-b-plus.dtb \
 	bcm2835-rpi-a-plus.dtb \
-	bcm2836-rpi-2-b.dtb
+	bcm2836-rpi-2-b.dtb \
+	bcm2835-rpi-zero.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
new file mode 100644
index 0000000..12bc82d
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -0,0 +1,57 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-zero", "brcm,bcm2835";
+	model = "Raspberry Pi Zero";
+
+	leds {
+		act {
+			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+
+&usb {
+	dr_mode = "host";
+	h-rx-fifo-size = <774>;
+	h-np-tx-fifo-size = <256>;
+	h-tx-fifo-size = <512>;
+/*
+ * Settings for otg
+ *
+	dr_mode = "otg";
+	h-rx-fifo-size = <774>;
+	h-np-tx-fifo-size = <32>;
+	h-tx-fifo-size = <0>;
+	g-np-tx-fifo-size = <16>;
+	g-rx-fifo-size = <256>;
+	g-tx-fifo-size = <256 128 128 64 64 64 32>;
+ *
+ * Settings for peripheral
+ *
+	dr_mode = "peripheral";
+	h-rx-fifo-size = <774>;
+	h-np-tx-fifo-size = <0>;
+	h-tx-fifo-size = <0>;
+	g-np-tx-fifo-size = <16>;
+	g-rx-fifo-size = <256>;
+	g-tx-fifo-size = <256 128 128 64 64 64 32>;
+ */
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
+
+	/* I2S interface */
+	i2s_alt0: i2s_alt0 {
+		brcm,pins = <18 19 20 21>;
+		brcm,function = <BCM2835_FSEL_ALT0>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode
  2016-07-26 18:53     ` Stefan Wahren
@ 2016-07-29 21:12         ` Rob Herring
  -1 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2016-07-29 21:12 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Mark Rutland, Eric Anholt, John Youn, Stephen Warren,
	Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, Jul 26, 2016 at 06:53:29PM +0000, Stefan Wahren wrote:
> Currently the fifo sizes for host/otg mode are defined per platform
> and doesn't take the mode into account. So we will get errors
> like this:
> 
> dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32
> 
> So add DT properties for these mode specific fifo sizes in order
> to define them in the devicetree and avoid these errors.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt |    3 +++

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

>  drivers/usb/dwc2/core.c                        |   25 ++++++++++++++++++------
>  2 files changed, 22 insertions(+), 6 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode
@ 2016-07-29 21:12         ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2016-07-29 21:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 26, 2016 at 06:53:29PM +0000, Stefan Wahren wrote:
> Currently the fifo sizes for host/otg mode are defined per platform
> and doesn't take the mode into account. So we will get errors
> like this:
> 
> dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32
> 
> So add DT properties for these mode specific fifo sizes in order
> to define them in the devicetree and avoid these errors.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt |    3 +++

Acked-by: Rob Herring <robh@kernel.org>

>  drivers/usb/dwc2/core.c                        |   25 ++++++++++++++++++------
>  2 files changed, 22 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 5/6] DT: bindings: bcm: Add Raspberry Pi Zero
  2016-07-26 18:53     ` Stefan Wahren
@ 2016-07-29 21:13         ` Rob Herring
  -1 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2016-07-29 21:13 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Mark Rutland, Eric Anholt, John Youn, Stephen Warren,
	Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, Jul 26, 2016 at 06:53:32PM +0000, Stefan Wahren wrote:
> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> ---
>  .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |    4 ++++
>  1 file changed, 4 insertions(+)

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
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] 60+ messages in thread

* [PATCH V2 RFC 5/6] DT: bindings: bcm: Add Raspberry Pi Zero
@ 2016-07-29 21:13         ` Rob Herring
  0 siblings, 0 replies; 60+ messages in thread
From: Rob Herring @ 2016-07-29 21:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 26, 2016 at 06:53:32PM +0000, Stefan Wahren wrote:
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |    4 ++++
>  1 file changed, 4 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-07-26 18:53     ` Stefan Wahren
@ 2016-08-02 17:19         ` Stephen Warren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stephen Warren @ 2016-08-02 17:19 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, Mark Rutland, Eric Anholt, John Youn, Felipe Balbi,
	Greg Kroah-Hartman, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 07/26/2016 12:53 PM, Stefan Wahren wrote:
> The Raspberry Pi Zero is a minified version of model A+. It's
> notable there is no PWR LED and the ACT LED is inverted.

Patches 3-6,
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts

The following comment format is a bit strange, but I'm not sure there's 
anything objectively better...

> +&usb {
> +	dr_mode = "host";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <256>;
> +	h-tx-fifo-size = <512>;
> +/*
> + * Settings for otg
> + *
> +	dr_mode = "otg";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <32>;
> +	h-tx-fifo-size = <0>;
> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + *
> + * Settings for peripheral
> + *
> +	dr_mode = "peripheral";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <0>;
> +	h-tx-fifo-size = <0>;
> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + */
> +};

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-02 17:19         ` Stephen Warren
  0 siblings, 0 replies; 60+ messages in thread
From: Stephen Warren @ 2016-08-02 17:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/26/2016 12:53 PM, Stefan Wahren wrote:
> The Raspberry Pi Zero is a minified version of model A+. It's
> notable there is no PWR LED and the ACT LED is inverted.

Patches 3-6,
Acked-by: Stephen Warren <swarren@nvidia.com>

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts

The following comment format is a bit strange, but I'm not sure there's 
anything objectively better...

> +&usb {
> +	dr_mode = "host";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <256>;
> +	h-tx-fifo-size = <512>;
> +/*
> + * Settings for otg
> + *
> +	dr_mode = "otg";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <32>;
> +	h-tx-fifo-size = <0>;
> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + *
> + * Settings for peripheral
> + *
> +	dr_mode = "peripheral";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <0>;
> +	h-tx-fifo-size = <0>;
> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + */
> +};

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-02 17:19         ` Stephen Warren
@ 2016-08-02 19:29           ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-02 19:29 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Mark Rutland, Felipe Balbi, devicetree, John Youn,
	Greg Kroah-Hartman, linux-usb, Eric Anholt, Rob Herring,
	linux-rpi-kernel, linux-arm-kernel

Hi Stephen,

> Stephen Warren <swarren@wwwdotorg.org> hat am 2. August 2016 um 19:19
> geschrieben:
> 
> 
> On 07/26/2016 12:53 PM, Stefan Wahren wrote:
> > The Raspberry Pi Zero is a minified version of model A+. It's
> > notable there is no PWR LED and the ACT LED is inverted.
> 
> Patches 3-6,
> Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> > diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> > b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> 
> The following comment format is a bit strange, but I'm not sure there's 
> anything objectively better...

the idea behind that was to provide valid values for every dr_mode with minimum
effort. I see 2 alternative solutions:
  a) add different dr_mode examples to the dwc2 => doesn't work for all
platforms
  b) add comments to drivers/usb/dwc2/platform.c => harder to find

At the end the solution here is already obsolete. This patch series doesn't
contain an update for the bcm2835_defconfig which should set the following:

CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_GADGET=y

After enabling these options another issue is revealed. Currently the dr_mode
for all the other bcm283x boards isn't defined, which means "otg" instead of
intended "host". But the dwc2 driver ignores this as long as CONFIG_USB_GADGET
is not defined. So we need to define the dr_mode for all bcm283x boards. In
order to avoid such massive copy & paste, we better define 3 dtsi files for each
dr_mode.  The only catch about this solution is the modes "otg" and "peripheral"
wouldn't be referenced.

I'll wait for John's feedback before sending a new version.

Stefan

> 
> > +&usb {
> > +	dr_mode = "host";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <256>;
> > +	h-tx-fifo-size = <512>;
> > +/*
> > + * Settings for otg
> > + *
> > +	dr_mode = "otg";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <32>;
> > +	h-tx-fifo-size = <0>;
> > +	g-np-tx-fifo-size = <16>;
> > +	g-rx-fifo-size = <256>;
> > +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> > + *
> > + * Settings for peripheral
> > + *
> > +	dr_mode = "peripheral";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <0>;
> > +	h-tx-fifo-size = <0>;
> > +	g-np-tx-fifo-size = <16>;
> > +	g-rx-fifo-size = <256>;
> > +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> > + */
> > +};
>

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-02 19:29           ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-02 19:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stephen,

> Stephen Warren <swarren@wwwdotorg.org> hat am 2. August 2016 um 19:19
> geschrieben:
> 
> 
> On 07/26/2016 12:53 PM, Stefan Wahren wrote:
> > The Raspberry Pi Zero is a minified version of model A+. It's
> > notable there is no PWR LED and the ACT LED is inverted.
> 
> Patches 3-6,
> Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> > diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> > b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> 
> The following comment format is a bit strange, but I'm not sure there's 
> anything objectively better...

the idea behind that was to provide valid values for every dr_mode with minimum
effort. I see 2 alternative solutions:
  a) add different dr_mode examples to the dwc2 => doesn't work for all
platforms
  b) add comments to drivers/usb/dwc2/platform.c => harder to find

At the end the solution here is already obsolete. This patch series doesn't
contain an update for the bcm2835_defconfig which should set the following:

CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_GADGET=y

After enabling these options another issue is revealed. Currently the dr_mode
for all the other bcm283x boards isn't defined, which means "otg" instead of
intended "host". But the dwc2 driver ignores this as long as CONFIG_USB_GADGET
is not defined. So we need to define the dr_mode for all bcm283x boards. In
order to avoid such massive copy & paste, we better define 3 dtsi files for each
dr_mode.  The only catch about this solution is the modes "otg" and "peripheral"
wouldn't be referenced.

I'll wait for John's feedback before sending a new version.

Stefan

> 
> > +&usb {
> > +	dr_mode = "host";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <256>;
> > +	h-tx-fifo-size = <512>;
> > +/*
> > + * Settings for otg
> > + *
> > +	dr_mode = "otg";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <32>;
> > +	h-tx-fifo-size = <0>;
> > +	g-np-tx-fifo-size = <16>;
> > +	g-rx-fifo-size = <256>;
> > +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> > + *
> > + * Settings for peripheral
> > + *
> > +	dr_mode = "peripheral";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <0>;
> > +	h-tx-fifo-size = <0>;
> > +	g-np-tx-fifo-size = <16>;
> > +	g-rx-fifo-size = <256>;
> > +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> > + */
> > +};
>

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-02 19:29           ` Stefan Wahren
@ 2016-08-02 20:56               ` Stephen Warren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stephen Warren @ 2016-08-02 20:56 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Mark Rutland, Felipe Balbi, devicetree-u79uwXL29TY76Z2rM5mHXA,
	John Youn, Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Eric Anholt, Rob Herring,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 08/02/2016 01:29 PM, Stefan Wahren wrote:
> Hi Stephen,
>
>> Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> hat am 2. August 2016 um 19:19
>> geschrieben:
>>
>>
>> On 07/26/2016 12:53 PM, Stefan Wahren wrote:
>>> The Raspberry Pi Zero is a minified version of model A+. It's
>>> notable there is no PWR LED and the ACT LED is inverted.
>>
>> Patches 3-6,
>> Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>
>>> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
>>> b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
>>
>> The following comment format is a bit strange, but I'm not sure there's
>> anything objectively better...
>
> the idea behind that was to provide valid values for every dr_mode with minimum
> effort. I see 2 alternative solutions:
>   a) add different dr_mode examples to the dwc2 => doesn't work for all
> platforms
>   b) add comments to drivers/usb/dwc2/platform.c => harder to find
>
> At the end the solution here is already obsolete. This patch series doesn't
> contain an update for the bcm2835_defconfig which should set the following:
>
> CONFIG_NOP_USB_XCEIV=y
> CONFIG_USB_GADGET=y
>
> After enabling these options another issue is revealed. Currently the dr_mode
> for all the other bcm283x boards isn't defined, which means "otg" instead of
> intended "host". But the dwc2 driver ignores this as long as CONFIG_USB_GADGET
> is not defined. So we need to define the dr_mode for all bcm283x boards.

Do note that the existing DTs must work with any new kernel update; 
that's part of DT being an ABI. So, there should be no need to update 
any of the existing DTs. Rather, the driver must cope with missing 
properties and operate as best it can. Perhaps that means that even if 
dr_mode is unspecified and hence defaults to otg, then if properties 
that are mandatory for OTG to operate are missing, the driver falls back 
to host mode. I think that'd be completely backwards-compatible?

 > In
> order to avoid such massive copy & paste, we better define 3 dtsi files for each
> dr_mode.

3 DT files, with an appropriate one of those included in each RPi DT, 
sounds reasonable.

> The only catch about this solution is the modes "otg" and "peripheral"
> wouldn't be referenced.

That's probably OK; in this patch the properties for those modes are in 
a comment too, so essentially unreferenced. Perhaps on RPi platforms 
where a choice is possible (Zero, A), there could be a comment next to 
the include of the "host" or "otg" version that states the user might 
want to edit the DT and include the other version instead. Then, those 
files would be somewhat referenced.
--
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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-02 20:56               ` Stephen Warren
  0 siblings, 0 replies; 60+ messages in thread
From: Stephen Warren @ 2016-08-02 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/02/2016 01:29 PM, Stefan Wahren wrote:
> Hi Stephen,
>
>> Stephen Warren <swarren@wwwdotorg.org> hat am 2. August 2016 um 19:19
>> geschrieben:
>>
>>
>> On 07/26/2016 12:53 PM, Stefan Wahren wrote:
>>> The Raspberry Pi Zero is a minified version of model A+. It's
>>> notable there is no PWR LED and the ACT LED is inverted.
>>
>> Patches 3-6,
>> Acked-by: Stephen Warren <swarren@nvidia.com>
>>
>>> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
>>> b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
>>
>> The following comment format is a bit strange, but I'm not sure there's
>> anything objectively better...
>
> the idea behind that was to provide valid values for every dr_mode with minimum
> effort. I see 2 alternative solutions:
>   a) add different dr_mode examples to the dwc2 => doesn't work for all
> platforms
>   b) add comments to drivers/usb/dwc2/platform.c => harder to find
>
> At the end the solution here is already obsolete. This patch series doesn't
> contain an update for the bcm2835_defconfig which should set the following:
>
> CONFIG_NOP_USB_XCEIV=y
> CONFIG_USB_GADGET=y
>
> After enabling these options another issue is revealed. Currently the dr_mode
> for all the other bcm283x boards isn't defined, which means "otg" instead of
> intended "host". But the dwc2 driver ignores this as long as CONFIG_USB_GADGET
> is not defined. So we need to define the dr_mode for all bcm283x boards.

Do note that the existing DTs must work with any new kernel update; 
that's part of DT being an ABI. So, there should be no need to update 
any of the existing DTs. Rather, the driver must cope with missing 
properties and operate as best it can. Perhaps that means that even if 
dr_mode is unspecified and hence defaults to otg, then if properties 
that are mandatory for OTG to operate are missing, the driver falls back 
to host mode. I think that'd be completely backwards-compatible?

 > In
> order to avoid such massive copy & paste, we better define 3 dtsi files for each
> dr_mode.

3 DT files, with an appropriate one of those included in each RPi DT, 
sounds reasonable.

> The only catch about this solution is the modes "otg" and "peripheral"
> wouldn't be referenced.

That's probably OK; in this patch the properties for those modes are in 
a comment too, so essentially unreferenced. Perhaps on RPi platforms 
where a choice is possible (Zero, A), there could be a comment next to 
the include of the "host" or "otg" version that states the user might 
want to edit the DT and include the other version instead. Then, those 
files would be somewhat referenced.

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
  2016-07-26 18:53     ` Stefan Wahren
@ 2016-08-16  1:30       ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16  1:30 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Felipe Balbi, Stephen Warren, devicetree, Greg Kroah-Hartman,
	linux-usb, linux-rpi-kernel, linux-arm-kernel

On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> In gadget mode On bcm2835 platform the host tx fifo size could be zero.
> So add zero to range and avoid such nonsense errors:
> 
> dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

Hi Stefan,

Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?

If these values can be 0, I think the patch is ok. But I'm not sure
about that. I can check with some hardware engineers to see under what
conditions this is possible.

Regards,
John


> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/usb/dwc2/core.c |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index 4135a5f..5645528 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -819,7 +819,10 @@ void dwc2_set_param_host_nperio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
>  {
>  	int valid = 1;
>  
> -	if (val < 16 || val > hsotg->hw_params.host_nperio_tx_fifo_size)
> +	if (val && (val < 16))
> +		valid = 0;
> +
> +	if (val > hsotg->hw_params.host_nperio_tx_fifo_size)
>  		valid = 0;
>  
>  	if (!valid) {
> @@ -839,7 +842,10 @@ void dwc2_set_param_host_perio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
>  {
>  	int valid = 1;
>  
> -	if (val < 16 || val > hsotg->hw_params.host_perio_tx_fifo_size)
> +	if (val && (val < 16))
> +		valid = 0;
> +
> +	if (val > hsotg->hw_params.host_perio_tx_fifo_size)
>  		valid = 0;
>  
>  	if (!valid) {
> 

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
@ 2016-08-16  1:30       ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16  1:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> In gadget mode On bcm2835 platform the host tx fifo size could be zero.
> So add zero to range and avoid such nonsense errors:
> 
> dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

Hi Stefan,

Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?

If these values can be 0, I think the patch is ok. But I'm not sure
about that. I can check with some hardware engineers to see under what
conditions this is possible.

Regards,
John


> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/usb/dwc2/core.c |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index 4135a5f..5645528 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -819,7 +819,10 @@ void dwc2_set_param_host_nperio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
>  {
>  	int valid = 1;
>  
> -	if (val < 16 || val > hsotg->hw_params.host_nperio_tx_fifo_size)
> +	if (val && (val < 16))
> +		valid = 0;
> +
> +	if (val > hsotg->hw_params.host_nperio_tx_fifo_size)
>  		valid = 0;
>  
>  	if (!valid) {
> @@ -839,7 +842,10 @@ void dwc2_set_param_host_perio_tx_fifo_size(struct dwc2_hsotg *hsotg, int val)
>  {
>  	int valid = 1;
>  
> -	if (val < 16 || val > hsotg->hw_params.host_perio_tx_fifo_size)
> +	if (val && (val < 16))
> +		valid = 0;
> +
> +	if (val > hsotg->hw_params.host_perio_tx_fifo_size)
>  		valid = 0;
>  
>  	if (!valid) {
> 

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
  2016-08-16  1:30       ` John Youn
@ 2016-08-16 16:22         ` Eric Anholt
  -1 siblings, 0 replies; 60+ messages in thread
From: Eric Anholt @ 2016-08-16 16:22 UTC (permalink / raw)
  To: John Youn, Stefan Wahren, Rob Herring, Mark Rutland
  Cc: Felipe Balbi, Stephen Warren, devicetree, Greg Kroah-Hartman,
	linux-usb, linux-rpi-kernel, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 837 bytes --]

John Youn <John.Youn@synopsys.com> writes:

> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
>> In gadget mode On bcm2835 platform the host tx fifo size could be zero.
>> So add zero to range and avoid such nonsense errors:
>> 
>> dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
>> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
>> dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
>> dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
>
> Hi Stefan,
>
> Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?
>
> If these values can be 0, I think the patch is ok. But I'm not sure
> about that. I can check with some hardware engineers to see under what
> conditions this is possible.

FWIW, I don't see the firmware software doing any conditional setting of
these registers.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
@ 2016-08-16 16:22         ` Eric Anholt
  0 siblings, 0 replies; 60+ messages in thread
From: Eric Anholt @ 2016-08-16 16:22 UTC (permalink / raw)
  To: linux-arm-kernel

John Youn <John.Youn@synopsys.com> writes:

> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
>> In gadget mode On bcm2835 platform the host tx fifo size could be zero.
>> So add zero to range and avoid such nonsense errors:
>> 
>> dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
>> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
>> dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
>> dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
>
> Hi Stefan,
>
> Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?
>
> If these values can be 0, I think the patch is ok. But I'm not sure
> about that. I can check with some hardware engineers to see under what
> conditions this is possible.

FWIW, I don't see the firmware software doing any conditional setting of
these registers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160816/1c385e8e/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
  2016-08-16  1:30       ` John Youn
@ 2016-08-16 16:44         ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-16 16:44 UTC (permalink / raw)
  To: John Youn, Eric Anholt, Rob Herring, Mark Rutland
  Cc: Felipe Balbi, Stephen Warren, Greg Kroah-Hartman, linux-usb,
	devicetree, linux-rpi-kernel, linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 03:30
> geschrieben:
> 
> 
> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> > In gadget mode On bcm2835 platform the host tx fifo size could be zero.
> > So add zero to range and avoid such nonsense errors:
> > 
> > dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
> > dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> > dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
> > dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
> 
> Hi Stefan,
> 
> Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?
> 
> If these values can be 0, I think the patch is ok. But I'm not sure
> about that. I can check with some hardware engineers to see under what
> conditions this is possible.

i'm not sure that i can answer your question correctly. Let me send you some
logs and i hope these answer your question.

Since the Raspberry Pi Zero with bcm2835 could handle all three dr_mode set in
DT ( otg, host, peripherial ), i made 3 logs before this patch is applied:

Raspberry Pi Zero
dr_mode = "host"

Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
armv6l GNU/Linux

[    2.300866] dwc2_lowlevel_hw_init()
[    2.317961] dwc2 20980000.usb: dwc2: cannot get otg clock
[    2.327328] dwc2_lowlevel_hw_enable()
[    2.334868] dwc2_get_dr_mode()
[    2.341742] dwc2 20980000.usb: Forcing mode to host
[    2.459227] dwc2_get_hwparams()
[    2.466013] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.466028] dwc2 20980000.usb: hwcfg1=00000000
[    2.466040] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.466051] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.466061] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.466071] dwc2 20980000.usb: grxfsiz=00001000
[    2.466083] dwc2 20980000.usb: gnptxfsiz=01001000
[    2.466093] dwc2 20980000.usb: hptxfsiz=02002000
[    2.466106] dwc2 20980000.usb: Detected values from hardware:
[    2.466116] dwc2 20980000.usb:   op_mode=0
[    2.466126] dwc2 20980000.usb:   arch=2
[    2.466136] dwc2 20980000.usb:   dma_desc_enable=0
[    2.466146] dwc2 20980000.usb:   power_optimized=0
[    2.466156] dwc2 20980000.usb:   i2c_enable=0
[    2.466165] dwc2 20980000.usb:   hs_phy_type=1
[    2.466175] dwc2 20980000.usb:   fs_phy_type=1
[    2.466185] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.466194] dwc2 20980000.usb:   num_dev_ep=7
[    2.466204] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.466213] dwc2 20980000.usb:   host_channels=8
[    2.466223] dwc2 20980000.usb:   max_transfer_size=524287
[    2.466233] dwc2 20980000.usb:   max_packet_count=1023
[    2.466243] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.466253] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.466263] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.466273] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.466283] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.466293] dwc2 20980000.usb:   total_fifo_size=4080
[    2.466303] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.466314] dwc2 20980000.usb:   host_nperio_tx_fifo_size=256
[    2.466324] dwc2 20980000.usb:   host_perio_tx_fifo_size=512
[    2.466332] dwc2 20980000.usb:
[    2.466342] dwc2 20980000.usb: dwc2_set_parameters()
[    2.466356] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.466384] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.466395] dwc2 20980000.usb: Setting hibernation to 0
[    2.466399] dwc2_force_dr_mode()
[    2.473127] dwc2 20980000.usb: Forcing mode to host
[    2.589175] dwc2_hcd_init()
[    2.595685] dwc2 20980000.usb: DWC OTG Controller
[    2.604051] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.614688] dwc2 20980000.usb: irq 33, io mem 0x00000000
--------------------------------------------------------------------------------

Raspberry Pi Zero
dr_mode = "otg"

Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
armv6l GNU/Linux

[    2.310924] dwc2_lowlevel_hw_init()
[    2.328029] dwc2 20980000.usb: dwc2: cannot get otg clock
[    2.337385] dwc2_lowlevel_hw_enable()
[    2.344917] dwc2_get_dr_mode()
[    2.469263] dwc2_get_hwparams()
[    2.476042] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.476059] dwc2 20980000.usb: hwcfg1=00000000
[    2.476072] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.476082] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.476093] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.476104] dwc2 20980000.usb: grxfsiz=00001000
[    2.476115] dwc2 20980000.usb: Forcing mode to host
[    2.519251] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.519267] dwc2 20980000.usb: hptxfsiz=00000000
[    2.569237] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.569255] dwc2 20980000.usb: Detected values from hardware:
[    2.569266] dwc2 20980000.usb:   op_mode=0
[    2.569276] dwc2 20980000.usb:   arch=2
[    2.569286] dwc2 20980000.usb:   dma_desc_enable=0
[    2.569296] dwc2 20980000.usb:   power_optimized=0
[    2.569306] dwc2 20980000.usb:   i2c_enable=0
[    2.569315] dwc2 20980000.usb:   hs_phy_type=1
[    2.569325] dwc2 20980000.usb:   fs_phy_type=1
[    2.569335] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.569345] dwc2 20980000.usb:   num_dev_ep=7
[    2.569354] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.569364] dwc2 20980000.usb:   host_channels=8
[    2.569375] dwc2 20980000.usb:   max_transfer_size=524287
[    2.569386] dwc2 20980000.usb:   max_packet_count=1023
[    2.569397] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.569407] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.569417] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.569427] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.569437] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.569447] dwc2 20980000.usb:   total_fifo_size=4080
[    2.569458] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.569468] dwc2 20980000.usb:   host_nperio_tx_fifo_size=32
[    2.569478] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
[    2.569487] dwc2 20980000.usb:
[    2.569497] dwc2 20980000.usb: dwc2_set_parameters()
[    2.569511] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.569535] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.569547] dwc2 20980000.usb: Setting hibernation to 0
[    2.569573] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.585354] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
[    2.585361] dwc2_force_dr_mode()
[    2.709215] dwc2_gadget_init()
[    2.715815] dwc2 20980000.usb: NonPeriodic TXFIFO size: 16
[    2.724903] dwc2 20980000.usb: RXFIFO size: 256
[    2.733024] dwc2 20980000.usb: Periodic TXFIFO 0 size: 0
[    2.741929] dwc2 20980000.usb: Periodic TXFIFO 1 size: 256
[    2.750902] dwc2 20980000.usb: Periodic TXFIFO 2 size: 128
[    2.759776] dwc2 20980000.usb: Periodic TXFIFO 3 size: 128
[    2.768438] dwc2 20980000.usb: Periodic TXFIFO 4 size: 64
[    2.776888] dwc2 20980000.usb: Periodic TXFIFO 5 size: 64
[    2.785266] dwc2 20980000.usb: Periodic TXFIFO 6 size: 64
[    2.793496] dwc2 20980000.usb: Periodic TXFIFO 7 size: 32
[    2.801570] dwc2 20980000.usb: Periodic TXFIFO 8 size: 0
[    2.809443] dwc2 20980000.usb: Periodic TXFIFO 9 size: 0
[    2.817055] dwc2 20980000.usb: Periodic TXFIFO10 size: 0
[    2.824633] dwc2 20980000.usb: Periodic TXFIFO11 size: 0
[    2.832100] dwc2 20980000.usb: Periodic TXFIFO12 size: 0
[    2.839457] dwc2 20980000.usb: Periodic TXFIFO13 size: 0
[    2.846659] dwc2 20980000.usb: Periodic TXFIFO14 size: 0
[    2.853852] dwc2 20980000.usb: Periodic TXFIFO15 size: 0
[    2.861043] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.887000] dwc2 20980000.usb: bound driver zero
[    2.893565] dwc2_hcd_init()
[    2.898407] dwc2 20980000.usb: DWC OTG Controller
[    2.905079] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.914160] dwc2 20980000.usb: irq 33, io mem 0x00000000
------------------------------------------------------------------------------

Raspberry Pi Zero
dr_mode = "peripheral"

Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
armv6l GNU/Linux

[    2.310942] dwc2_lowlevel_hw_init()
[    2.328044] dwc2 20980000.usb: dwc2: cannot get otg clock
[    2.337405] dwc2_lowlevel_hw_enable()
[    2.344937] dwc2_get_dr_mode()
[    2.351820] dwc2 20980000.usb: Forcing mode to device
[    2.469267] dwc2_get_hwparams()
[    2.476052] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.476067] dwc2 20980000.usb: hwcfg1=00000000
[    2.476078] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.476089] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.476100] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.476110] dwc2 20980000.usb: grxfsiz=00001000
[    2.476123] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.476135] dwc2 20980000.usb: Detected values from hardware:
[    2.476146] dwc2 20980000.usb:   op_mode=0
[    2.476156] dwc2 20980000.usb:   arch=2
[    2.476166] dwc2 20980000.usb:   dma_desc_enable=0
[    2.476176] dwc2 20980000.usb:   power_optimized=0
[    2.476186] dwc2 20980000.usb:   i2c_enable=0
[    2.476196] dwc2 20980000.usb:   hs_phy_type=1
[    2.476206] dwc2 20980000.usb:   fs_phy_type=1
[    2.476216] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.476225] dwc2 20980000.usb:   num_dev_ep=7
[    2.476235] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.476245] dwc2 20980000.usb:   host_channels=8
[    2.476256] dwc2 20980000.usb:   max_transfer_size=524287
[    2.476266] dwc2 20980000.usb:   max_packet_count=1023
[    2.476277] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.476288] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.476297] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.476308] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.476318] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.476328] dwc2 20980000.usb:   total_fifo_size=4080
[    2.476338] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.476349] dwc2 20980000.usb:   host_nperio_tx_fifo_size=0
[    2.476359] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
[    2.476368] dwc2 20980000.usb:
[    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
[    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.476429] dwc2 20980000.usb: Setting hibernation to 0
[    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
configuration.
[    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
[    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size. Check
HW configuration.
[    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
[    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
[    2.524252] dwc2_force_dr_mode()
[    2.531473] dwc2 20980000.usb: Forcing mode to device
[    2.649220] dwc2_gadget_init()
[    2.656183] dwc2 20980000.usb: NonPeriodic TXFIFO size: 16
[    2.665634] dwc2 20980000.usb: RXFIFO size: 256
[    2.674009] dwc2 20980000.usb: Periodic TXFIFO 0 size: 0
[    2.683076] dwc2 20980000.usb: Periodic TXFIFO 1 size: 256
[    2.692256] dwc2 20980000.usb: Periodic TXFIFO 2 size: 128
[    2.701280] dwc2 20980000.usb: Periodic TXFIFO 3 size: 128
[    2.710152] dwc2 20980000.usb: Periodic TXFIFO 4 size: 64
[    2.718734] dwc2 20980000.usb: Periodic TXFIFO 5 size: 64
[    2.727175] dwc2 20980000.usb: Periodic TXFIFO 6 size: 64
[    2.735545] dwc2 20980000.usb: Periodic TXFIFO 7 size: 32
[    2.743812] dwc2 20980000.usb: Periodic TXFIFO 8 size: 0
[    2.751878] dwc2 20980000.usb: Periodic TXFIFO 9 size: 0
[    2.759850] dwc2 20980000.usb: Periodic TXFIFO10 size: 0
[    2.767724] dwc2 20980000.usb: Periodic TXFIFO11 size: 0
[    2.775557] dwc2 20980000.usb: Periodic TXFIFO12 size: 0
[    2.783321] dwc2 20980000.usb: Periodic TXFIFO13 size: 0
[    2.791008] dwc2 20980000.usb: Periodic TXFIFO14 size: 0
[    2.798604] dwc2 20980000.usb: Periodic TXFIFO15 size: 0
[    2.806106] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.832686] dwc2 20980000.usb: bound driver zero

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
@ 2016-08-16 16:44         ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-16 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 03:30
> geschrieben:
> 
> 
> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> > In gadget mode On bcm2835 platform the host tx fifo size could be zero.
> > So add zero to range and avoid such nonsense errors:
> > 
> > dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
> > dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> > dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
> > dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
> 
> Hi Stefan,
> 
> Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?
> 
> If these values can be 0, I think the patch is ok. But I'm not sure
> about that. I can check with some hardware engineers to see under what
> conditions this is possible.

i'm not sure that i can answer your question correctly. Let me send you some
logs and i hope these answer your question.

Since the Raspberry Pi Zero with bcm2835 could handle all three dr_mode set in
DT ( otg, host, peripherial ), i made 3 logs before this patch is applied:

Raspberry Pi Zero
dr_mode = "host"

Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
armv6l GNU/Linux

[    2.300866] dwc2_lowlevel_hw_init()
[    2.317961] dwc2 20980000.usb: dwc2: cannot get otg clock
[    2.327328] dwc2_lowlevel_hw_enable()
[    2.334868] dwc2_get_dr_mode()
[    2.341742] dwc2 20980000.usb: Forcing mode to host
[    2.459227] dwc2_get_hwparams()
[    2.466013] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.466028] dwc2 20980000.usb: hwcfg1=00000000
[    2.466040] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.466051] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.466061] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.466071] dwc2 20980000.usb: grxfsiz=00001000
[    2.466083] dwc2 20980000.usb: gnptxfsiz=01001000
[    2.466093] dwc2 20980000.usb: hptxfsiz=02002000
[    2.466106] dwc2 20980000.usb: Detected values from hardware:
[    2.466116] dwc2 20980000.usb:   op_mode=0
[    2.466126] dwc2 20980000.usb:   arch=2
[    2.466136] dwc2 20980000.usb:   dma_desc_enable=0
[    2.466146] dwc2 20980000.usb:   power_optimized=0
[    2.466156] dwc2 20980000.usb:   i2c_enable=0
[    2.466165] dwc2 20980000.usb:   hs_phy_type=1
[    2.466175] dwc2 20980000.usb:   fs_phy_type=1
[    2.466185] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.466194] dwc2 20980000.usb:   num_dev_ep=7
[    2.466204] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.466213] dwc2 20980000.usb:   host_channels=8
[    2.466223] dwc2 20980000.usb:   max_transfer_size=524287
[    2.466233] dwc2 20980000.usb:   max_packet_count=1023
[    2.466243] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.466253] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.466263] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.466273] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.466283] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.466293] dwc2 20980000.usb:   total_fifo_size=4080
[    2.466303] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.466314] dwc2 20980000.usb:   host_nperio_tx_fifo_size=256
[    2.466324] dwc2 20980000.usb:   host_perio_tx_fifo_size=512
[    2.466332] dwc2 20980000.usb:
[    2.466342] dwc2 20980000.usb: dwc2_set_parameters()
[    2.466356] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.466384] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.466395] dwc2 20980000.usb: Setting hibernation to 0
[    2.466399] dwc2_force_dr_mode()
[    2.473127] dwc2 20980000.usb: Forcing mode to host
[    2.589175] dwc2_hcd_init()
[    2.595685] dwc2 20980000.usb: DWC OTG Controller
[    2.604051] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.614688] dwc2 20980000.usb: irq 33, io mem 0x00000000
--------------------------------------------------------------------------------

Raspberry Pi Zero
dr_mode = "otg"

Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
armv6l GNU/Linux

[    2.310924] dwc2_lowlevel_hw_init()
[    2.328029] dwc2 20980000.usb: dwc2: cannot get otg clock
[    2.337385] dwc2_lowlevel_hw_enable()
[    2.344917] dwc2_get_dr_mode()
[    2.469263] dwc2_get_hwparams()
[    2.476042] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.476059] dwc2 20980000.usb: hwcfg1=00000000
[    2.476072] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.476082] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.476093] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.476104] dwc2 20980000.usb: grxfsiz=00001000
[    2.476115] dwc2 20980000.usb: Forcing mode to host
[    2.519251] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.519267] dwc2 20980000.usb: hptxfsiz=00000000
[    2.569237] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.569255] dwc2 20980000.usb: Detected values from hardware:
[    2.569266] dwc2 20980000.usb:   op_mode=0
[    2.569276] dwc2 20980000.usb:   arch=2
[    2.569286] dwc2 20980000.usb:   dma_desc_enable=0
[    2.569296] dwc2 20980000.usb:   power_optimized=0
[    2.569306] dwc2 20980000.usb:   i2c_enable=0
[    2.569315] dwc2 20980000.usb:   hs_phy_type=1
[    2.569325] dwc2 20980000.usb:   fs_phy_type=1
[    2.569335] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.569345] dwc2 20980000.usb:   num_dev_ep=7
[    2.569354] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.569364] dwc2 20980000.usb:   host_channels=8
[    2.569375] dwc2 20980000.usb:   max_transfer_size=524287
[    2.569386] dwc2 20980000.usb:   max_packet_count=1023
[    2.569397] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.569407] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.569417] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.569427] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.569437] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.569447] dwc2 20980000.usb:   total_fifo_size=4080
[    2.569458] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.569468] dwc2 20980000.usb:   host_nperio_tx_fifo_size=32
[    2.569478] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
[    2.569487] dwc2 20980000.usb:
[    2.569497] dwc2 20980000.usb: dwc2_set_parameters()
[    2.569511] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.569535] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.569547] dwc2 20980000.usb: Setting hibernation to 0
[    2.569573] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.585354] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
[    2.585361] dwc2_force_dr_mode()
[    2.709215] dwc2_gadget_init()
[    2.715815] dwc2 20980000.usb: NonPeriodic TXFIFO size: 16
[    2.724903] dwc2 20980000.usb: RXFIFO size: 256
[    2.733024] dwc2 20980000.usb: Periodic TXFIFO 0 size: 0
[    2.741929] dwc2 20980000.usb: Periodic TXFIFO 1 size: 256
[    2.750902] dwc2 20980000.usb: Periodic TXFIFO 2 size: 128
[    2.759776] dwc2 20980000.usb: Periodic TXFIFO 3 size: 128
[    2.768438] dwc2 20980000.usb: Periodic TXFIFO 4 size: 64
[    2.776888] dwc2 20980000.usb: Periodic TXFIFO 5 size: 64
[    2.785266] dwc2 20980000.usb: Periodic TXFIFO 6 size: 64
[    2.793496] dwc2 20980000.usb: Periodic TXFIFO 7 size: 32
[    2.801570] dwc2 20980000.usb: Periodic TXFIFO 8 size: 0
[    2.809443] dwc2 20980000.usb: Periodic TXFIFO 9 size: 0
[    2.817055] dwc2 20980000.usb: Periodic TXFIFO10 size: 0
[    2.824633] dwc2 20980000.usb: Periodic TXFIFO11 size: 0
[    2.832100] dwc2 20980000.usb: Periodic TXFIFO12 size: 0
[    2.839457] dwc2 20980000.usb: Periodic TXFIFO13 size: 0
[    2.846659] dwc2 20980000.usb: Periodic TXFIFO14 size: 0
[    2.853852] dwc2 20980000.usb: Periodic TXFIFO15 size: 0
[    2.861043] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.887000] dwc2 20980000.usb: bound driver zero
[    2.893565] dwc2_hcd_init()
[    2.898407] dwc2 20980000.usb: DWC OTG Controller
[    2.905079] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.914160] dwc2 20980000.usb: irq 33, io mem 0x00000000
------------------------------------------------------------------------------

Raspberry Pi Zero
dr_mode = "peripheral"

Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
armv6l GNU/Linux

[    2.310942] dwc2_lowlevel_hw_init()
[    2.328044] dwc2 20980000.usb: dwc2: cannot get otg clock
[    2.337405] dwc2_lowlevel_hw_enable()
[    2.344937] dwc2_get_dr_mode()
[    2.351820] dwc2 20980000.usb: Forcing mode to device
[    2.469267] dwc2_get_hwparams()
[    2.476052] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.476067] dwc2 20980000.usb: hwcfg1=00000000
[    2.476078] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.476089] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.476100] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.476110] dwc2 20980000.usb: grxfsiz=00001000
[    2.476123] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.476135] dwc2 20980000.usb: Detected values from hardware:
[    2.476146] dwc2 20980000.usb:   op_mode=0
[    2.476156] dwc2 20980000.usb:   arch=2
[    2.476166] dwc2 20980000.usb:   dma_desc_enable=0
[    2.476176] dwc2 20980000.usb:   power_optimized=0
[    2.476186] dwc2 20980000.usb:   i2c_enable=0
[    2.476196] dwc2 20980000.usb:   hs_phy_type=1
[    2.476206] dwc2 20980000.usb:   fs_phy_type=1
[    2.476216] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.476225] dwc2 20980000.usb:   num_dev_ep=7
[    2.476235] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.476245] dwc2 20980000.usb:   host_channels=8
[    2.476256] dwc2 20980000.usb:   max_transfer_size=524287
[    2.476266] dwc2 20980000.usb:   max_packet_count=1023
[    2.476277] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.476288] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.476297] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.476308] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.476318] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.476328] dwc2 20980000.usb:   total_fifo_size=4080
[    2.476338] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.476349] dwc2 20980000.usb:   host_nperio_tx_fifo_size=0
[    2.476359] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
[    2.476368] dwc2 20980000.usb:
[    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
[    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.476429] dwc2 20980000.usb: Setting hibernation to 0
[    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
configuration.
[    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
[    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size. Check
HW configuration.
[    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
[    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
[    2.524252] dwc2_force_dr_mode()
[    2.531473] dwc2 20980000.usb: Forcing mode to device
[    2.649220] dwc2_gadget_init()
[    2.656183] dwc2 20980000.usb: NonPeriodic TXFIFO size: 16
[    2.665634] dwc2 20980000.usb: RXFIFO size: 256
[    2.674009] dwc2 20980000.usb: Periodic TXFIFO 0 size: 0
[    2.683076] dwc2 20980000.usb: Periodic TXFIFO 1 size: 256
[    2.692256] dwc2 20980000.usb: Periodic TXFIFO 2 size: 128
[    2.701280] dwc2 20980000.usb: Periodic TXFIFO 3 size: 128
[    2.710152] dwc2 20980000.usb: Periodic TXFIFO 4 size: 64
[    2.718734] dwc2 20980000.usb: Periodic TXFIFO 5 size: 64
[    2.727175] dwc2 20980000.usb: Periodic TXFIFO 6 size: 64
[    2.735545] dwc2 20980000.usb: Periodic TXFIFO 7 size: 32
[    2.743812] dwc2 20980000.usb: Periodic TXFIFO 8 size: 0
[    2.751878] dwc2 20980000.usb: Periodic TXFIFO 9 size: 0
[    2.759850] dwc2 20980000.usb: Periodic TXFIFO10 size: 0
[    2.767724] dwc2 20980000.usb: Periodic TXFIFO11 size: 0
[    2.775557] dwc2 20980000.usb: Periodic TXFIFO12 size: 0
[    2.783321] dwc2 20980000.usb: Periodic TXFIFO13 size: 0
[    2.791008] dwc2 20980000.usb: Periodic TXFIFO14 size: 0
[    2.798604] dwc2 20980000.usb: Periodic TXFIFO15 size: 0
[    2.806106] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.832686] dwc2 20980000.usb: bound driver zero

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
  2016-08-16 16:44         ` Stefan Wahren
@ 2016-08-16 19:20             ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16 19:20 UTC (permalink / raw)
  To: Stefan Wahren, John Youn, Eric Anholt, Rob Herring, Mark Rutland
  Cc: Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Stephen Warren,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Felipe Balbi,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 8/16/2016 9:44 AM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 16. August 2016 um 03:30
>> geschrieben:
>>
>>
>> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
>>> In gadget mode On bcm2835 platform the host tx fifo size could be zero.
>>> So add zero to range and avoid such nonsense errors:
>>>
>>> dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
>>> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
>>> dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
>>> dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
>>
>> Hi Stefan,
>>
>> Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?
>>
>> If these values can be 0, I think the patch is ok. But I'm not sure
>> about that. I can check with some hardware engineers to see under what
>> conditions this is possible.
> 
> i'm not sure that i can answer your question correctly. Let me send you some
> logs and i hope these answer your question.
> 
> Since the Raspberry Pi Zero with bcm2835 could handle all three dr_mode set in
> DT ( otg, host, peripherial ), i made 3 logs before this patch is applied:
> 

...

> 
> Raspberry Pi Zero
> dr_mode = "peripheral"
> 
> Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
> armv6l GNU/Linux
> 
> [    2.310942] dwc2_lowlevel_hw_init()
> [    2.328044] dwc2 20980000.usb: dwc2: cannot get otg clock
> [    2.337405] dwc2_lowlevel_hw_enable()
> [    2.344937] dwc2_get_dr_mode()
> [    2.351820] dwc2 20980000.usb: Forcing mode to device
> [    2.469267] dwc2_get_hwparams()
> [    2.476052] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
> [    2.476067] dwc2 20980000.usb: hwcfg1=00000000
> [    2.476078] dwc2 20980000.usb: hwcfg2=228ddd50
> [    2.476089] dwc2 20980000.usb: hwcfg3=0ff000e8
> [    2.476100] dwc2 20980000.usb: hwcfg4=1ff00020
> [    2.476110] dwc2 20980000.usb: grxfsiz=00001000
> [    2.476123] dwc2 20980000.usb: gnptxfsiz=00201000
> [    2.476135] dwc2 20980000.usb: Detected values from hardware:
> [    2.476146] dwc2 20980000.usb:   op_mode=0
> [    2.476156] dwc2 20980000.usb:   arch=2
> [    2.476166] dwc2 20980000.usb:   dma_desc_enable=0
> [    2.476176] dwc2 20980000.usb:   power_optimized=0
> [    2.476186] dwc2 20980000.usb:   i2c_enable=0
> [    2.476196] dwc2 20980000.usb:   hs_phy_type=1
> [    2.476206] dwc2 20980000.usb:   fs_phy_type=1
> [    2.476216] dwc2 20980000.usb:   utmi_phy_data_width=0
> [    2.476225] dwc2 20980000.usb:   num_dev_ep=7
> [    2.476235] dwc2 20980000.usb:   num_dev_perio_in_ep=0
> [    2.476245] dwc2 20980000.usb:   host_channels=8
> [    2.476256] dwc2 20980000.usb:   max_transfer_size=524287
> [    2.476266] dwc2 20980000.usb:   max_packet_count=1023
> [    2.476277] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
> [    2.476288] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
> [    2.476297] dwc2 20980000.usb:   dev_token_q_depth=0x8
> [    2.476308] dwc2 20980000.usb:   enable_dynamic_fifo=1
> [    2.476318] dwc2 20980000.usb:   en_multiple_tx_fifo=1
> [    2.476328] dwc2 20980000.usb:   total_fifo_size=4080
> [    2.476338] dwc2 20980000.usb:   host_rx_fifo_size=4096
> [    2.476349] dwc2 20980000.usb:   host_nperio_tx_fifo_size=0
> [    2.476359] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
> [    2.476368] dwc2 20980000.usb:
> [    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
> [    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
> [    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
> [    2.476429] dwc2 20980000.usb: Setting hibernation to 0
> [    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
> configuration.
> [    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
> [    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size. Check
> HW configuration.
> [    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> [    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
> HW configuration.
> [    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

Thanks for the logs.

It looks like if dr_mode == peripheral, dwc2 doesn't populate the
following host-only values from the reset values of the registers.

* hw_params->host_nperio_tx_fifo_size
* hw_params->host_perio_tx_fifo_size

Thus when it goes to set the core_params based on the hw_params you
get the error. As peripheral-only, they are never used so it's fine.

To get rid of the error we can skip setting the host-only parameters
if dr_mode == peripheral.

John
--
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] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
@ 2016-08-16 19:20             ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16 19:20 UTC (permalink / raw)
  To: linux-arm-kernel

On 8/16/2016 9:44 AM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 03:30
>> geschrieben:
>>
>>
>> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
>>> In gadget mode On bcm2835 platform the host tx fifo size could be zero.
>>> So add zero to range and avoid such nonsense errors:
>>>
>>> dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
>>> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
>>> dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
>>> dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
>>
>> Hi Stefan,
>>
>> Are those the power on reset values of GNPTXFSIZ and HPTXFSIZ?
>>
>> If these values can be 0, I think the patch is ok. But I'm not sure
>> about that. I can check with some hardware engineers to see under what
>> conditions this is possible.
> 
> i'm not sure that i can answer your question correctly. Let me send you some
> logs and i hope these answer your question.
> 
> Since the Raspberry Pi Zero with bcm2835 could handle all three dr_mode set in
> DT ( otg, host, peripherial ), i made 3 logs before this patch is applied:
> 

...

> 
> Raspberry Pi Zero
> dr_mode = "peripheral"
> 
> Linux raspberrypi 4.7.0-rc7-next-20160719+ #3 Thu Jul 21 17:12:23 UTC 2016
> armv6l GNU/Linux
> 
> [    2.310942] dwc2_lowlevel_hw_init()
> [    2.328044] dwc2 20980000.usb: dwc2: cannot get otg clock
> [    2.337405] dwc2_lowlevel_hw_enable()
> [    2.344937] dwc2_get_dr_mode()
> [    2.351820] dwc2 20980000.usb: Forcing mode to device
> [    2.469267] dwc2_get_hwparams()
> [    2.476052] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
> [    2.476067] dwc2 20980000.usb: hwcfg1=00000000
> [    2.476078] dwc2 20980000.usb: hwcfg2=228ddd50
> [    2.476089] dwc2 20980000.usb: hwcfg3=0ff000e8
> [    2.476100] dwc2 20980000.usb: hwcfg4=1ff00020
> [    2.476110] dwc2 20980000.usb: grxfsiz=00001000
> [    2.476123] dwc2 20980000.usb: gnptxfsiz=00201000
> [    2.476135] dwc2 20980000.usb: Detected values from hardware:
> [    2.476146] dwc2 20980000.usb:   op_mode=0
> [    2.476156] dwc2 20980000.usb:   arch=2
> [    2.476166] dwc2 20980000.usb:   dma_desc_enable=0
> [    2.476176] dwc2 20980000.usb:   power_optimized=0
> [    2.476186] dwc2 20980000.usb:   i2c_enable=0
> [    2.476196] dwc2 20980000.usb:   hs_phy_type=1
> [    2.476206] dwc2 20980000.usb:   fs_phy_type=1
> [    2.476216] dwc2 20980000.usb:   utmi_phy_data_width=0
> [    2.476225] dwc2 20980000.usb:   num_dev_ep=7
> [    2.476235] dwc2 20980000.usb:   num_dev_perio_in_ep=0
> [    2.476245] dwc2 20980000.usb:   host_channels=8
> [    2.476256] dwc2 20980000.usb:   max_transfer_size=524287
> [    2.476266] dwc2 20980000.usb:   max_packet_count=1023
> [    2.476277] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
> [    2.476288] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
> [    2.476297] dwc2 20980000.usb:   dev_token_q_depth=0x8
> [    2.476308] dwc2 20980000.usb:   enable_dynamic_fifo=1
> [    2.476318] dwc2 20980000.usb:   en_multiple_tx_fifo=1
> [    2.476328] dwc2 20980000.usb:   total_fifo_size=4080
> [    2.476338] dwc2 20980000.usb:   host_rx_fifo_size=4096
> [    2.476349] dwc2 20980000.usb:   host_nperio_tx_fifo_size=0
> [    2.476359] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
> [    2.476368] dwc2 20980000.usb:
> [    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
> [    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
> [    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
> [    2.476429] dwc2 20980000.usb: Setting hibernation to 0
> [    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
> configuration.
> [    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
> [    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size. Check
> HW configuration.
> [    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> [    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
> HW configuration.
> [    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

Thanks for the logs.

It looks like if dr_mode == peripheral, dwc2 doesn't populate the
following host-only values from the reset values of the registers.

* hw_params->host_nperio_tx_fifo_size
* hw_params->host_perio_tx_fifo_size

Thus when it goes to set the core_params based on the hw_params you
get the error. As peripheral-only, they are never used so it's fine.

To get rid of the error we can skip setting the host-only parameters
if dr_mode == peripheral.

John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-07-26 18:53     ` Stefan Wahren
@ 2016-08-16 19:30         ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16 19:30 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Stephen Warren, Felipe Balbi, Greg Kroah-Hartman,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> The Raspberry Pi Zero is a minified version of model A+. It's
> notable there is no PWR LED and the ACT LED is inverted.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> ---
>  arch/arm/boot/dts/Makefile             |    3 +-
>  arch/arm/boot/dts/bcm2835-rpi-zero.dts |   57 ++++++++++++++++++++++++++++++++
>  2 files changed, 59 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e38e7c9..cafa3b1 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -69,7 +69,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
>  	bcm2835-rpi-b-rev2.dtb \
>  	bcm2835-rpi-b-plus.dtb \
>  	bcm2835-rpi-a-plus.dtb \
> -	bcm2836-rpi-2-b.dtb
> +	bcm2836-rpi-2-b.dtb \
> +	bcm2835-rpi-zero.dtb
>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>  	bcm4708-asus-rt-ac56u.dtb \
>  	bcm4708-asus-rt-ac68u.dtb \
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> new file mode 100644
> index 0000000..12bc82d
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> @@ -0,0 +1,57 @@
> +/dts-v1/;
> +#include "bcm2835.dtsi"
> +#include "bcm2835-rpi.dtsi"
> +
> +/ {
> +	compatible = "raspberrypi,model-zero", "brcm,bcm2835";
> +	model = "Raspberry Pi Zero";
> +
> +	leds {
> +		act {
> +			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +};
> +
> +
> +&usb {
> +	dr_mode = "host";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <256>;
> +	h-tx-fifo-size = <512>;

It seems like these last two are the same as the default values
reported in the registers. So they should already be set that way
without needing to specify them. If not, there may be some problem in
the driver.

> +/*
> + * Settings for otg
> + *
> +	dr_mode = "otg";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <32>;
> +	h-tx-fifo-size = <0>;

This seems odd. It should be non-zero for use when operating as host.

> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + *
> + * Settings for peripheral
> + *
> +	dr_mode = "peripheral";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <0>;
> +	h-tx-fifo-size = <0>;

You should be able to omit the host params if dr_mode == peripheral.

> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + */
> +};

Regards,
John
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-16 19:30         ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16 19:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> The Raspberry Pi Zero is a minified version of model A+. It's
> notable there is no PWR LED and the ACT LED is inverted.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  arch/arm/boot/dts/Makefile             |    3 +-
>  arch/arm/boot/dts/bcm2835-rpi-zero.dts |   57 ++++++++++++++++++++++++++++++++
>  2 files changed, 59 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e38e7c9..cafa3b1 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -69,7 +69,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
>  	bcm2835-rpi-b-rev2.dtb \
>  	bcm2835-rpi-b-plus.dtb \
>  	bcm2835-rpi-a-plus.dtb \
> -	bcm2836-rpi-2-b.dtb
> +	bcm2836-rpi-2-b.dtb \
> +	bcm2835-rpi-zero.dtb
>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>  	bcm4708-asus-rt-ac56u.dtb \
>  	bcm4708-asus-rt-ac68u.dtb \
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> new file mode 100644
> index 0000000..12bc82d
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
> @@ -0,0 +1,57 @@
> +/dts-v1/;
> +#include "bcm2835.dtsi"
> +#include "bcm2835-rpi.dtsi"
> +
> +/ {
> +	compatible = "raspberrypi,model-zero", "brcm,bcm2835";
> +	model = "Raspberry Pi Zero";
> +
> +	leds {
> +		act {
> +			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +};
> +
> +
> +&usb {
> +	dr_mode = "host";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <256>;
> +	h-tx-fifo-size = <512>;

It seems like these last two are the same as the default values
reported in the registers. So they should already be set that way
without needing to specify them. If not, there may be some problem in
the driver.

> +/*
> + * Settings for otg
> + *
> +	dr_mode = "otg";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <32>;
> +	h-tx-fifo-size = <0>;

This seems odd. It should be non-zero for use when operating as host.

> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + *
> + * Settings for peripheral
> + *
> +	dr_mode = "peripheral";
> +	h-rx-fifo-size = <774>;
> +	h-np-tx-fifo-size = <0>;
> +	h-tx-fifo-size = <0>;

You should be able to omit the host params if dr_mode == peripheral.

> +	g-np-tx-fifo-size = <16>;
> +	g-rx-fifo-size = <256>;
> +	g-tx-fifo-size = <256 128 128 64 64 64 32>;
> + */
> +};

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-16 19:30         ` John Youn
@ 2016-08-16 19:58             ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-16 19:58 UTC (permalink / raw)
  To: John Youn, Eric Anholt
  Cc: Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Stephen Warren,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	Felipe Balbi, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring

Hi John,

> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 16. August 2016 um 21:30
> geschrieben:
> 
> 
> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> ...
> > +/*
> > + * Settings for otg
> > + *
> > +	dr_mode = "otg";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <32>;
> > +	h-tx-fifo-size = <0>;
> 
> This seems odd. It should be non-zero for use when operating as host.
> 

like in host mode i took the default values in otg mode for the last two here
(please refer to the logs). The BCM2835 datasheet isn't very helpful.

Do you have any suggestions for valid values or how to get them?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-16 19:58             ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-16 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 21:30
> geschrieben:
> 
> 
> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> ...
> > +/*
> > + * Settings for otg
> > + *
> > +	dr_mode = "otg";
> > +	h-rx-fifo-size = <774>;
> > +	h-np-tx-fifo-size = <32>;
> > +	h-tx-fifo-size = <0>;
> 
> This seems odd. It should be non-zero for use when operating as host.
> 

like in host mode i took the default values in otg mode for the last two here
(please refer to the logs). The BCM2835 datasheet isn't very helpful.

Do you have any suggestions for valid values or how to get them?

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
  2016-08-16 19:20             ` John Youn
@ 2016-08-16 20:09                 ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-16 20:09 UTC (permalink / raw)
  To: John Youn, Eric Anholt
  Cc: Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Stephen Warren, Rob Herring,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Felipe Balbi,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi John,

> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 16. August 2016 um 21:20
> geschrieben:
> 
> 
> On 8/16/2016 9:44 AM, Stefan Wahren wrote:
> > Hi John,
> > 
> >> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 16. August 2016 um 03:30
> ...
> > [    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
> > [    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
> > [    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
> > [    2.476429] dwc2 20980000.usb: Setting hibernation to 0
> > [    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
> > configuration.
> > [    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
> > [    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
> > Check
> > HW configuration.
> > [    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> > [    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
> > Check
> > HW configuration.
> > [    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
> 
> Thanks for the logs.
> 
> It looks like if dr_mode == peripheral, dwc2 doesn't populate the
> following host-only values from the reset values of the registers.
> 
> * hw_params->host_nperio_tx_fifo_size
> * hw_params->host_perio_tx_fifo_size
> 
> Thus when it goes to set the core_params based on the hw_params you
> get the error. As peripheral-only, they are never used so it's fine.
> 
> To get rid of the error we can skip setting the host-only parameters
> if dr_mode == peripheral.

sorry the subject is imprecise. According to the logs if dr_mode == otg we also
get

[    2.569573] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.585354] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

You already said in 6/6 that's faulty, but i only want to point it out.

Stefan
--
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] 60+ messages in thread

* [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode
@ 2016-08-16 20:09                 ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-16 20:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 21:20
> geschrieben:
> 
> 
> On 8/16/2016 9:44 AM, Stefan Wahren wrote:
> > Hi John,
> > 
> >> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 03:30
> ...
> > [    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
> > [    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
> > [    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
> > [    2.476429] dwc2 20980000.usb: Setting hibernation to 0
> > [    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
> > configuration.
> > [    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
> > [    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
> > Check
> > HW configuration.
> > [    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
> > [    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
> > Check
> > HW configuration.
> > [    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
> 
> Thanks for the logs.
> 
> It looks like if dr_mode == peripheral, dwc2 doesn't populate the
> following host-only values from the reset values of the registers.
> 
> * hw_params->host_nperio_tx_fifo_size
> * hw_params->host_perio_tx_fifo_size
> 
> Thus when it goes to set the core_params based on the hw_params you
> get the error. As peripheral-only, they are never used so it's fine.
> 
> To get rid of the error we can skip setting the host-only parameters
> if dr_mode == peripheral.

sorry the subject is imprecise. According to the logs if dr_mode == otg we also
get

[    2.569573] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.585354] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

You already said in 6/6 that's faulty, but i only want to point it out.

Stefan

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-16 19:58             ` Stefan Wahren
@ 2016-08-16 22:07                 ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16 22:07 UTC (permalink / raw)
  To: Stefan Wahren, John Youn, Eric Anholt
  Cc: Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Stephen Warren,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	Felipe Balbi, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring

On 8/16/2016 12:58 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 16. August 2016 um 21:30
>> geschrieben:
>>
>>
>> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
>> ...
>>> +/*
>>> + * Settings for otg
>>> + *
>>> +	dr_mode = "otg";
>>> +	h-rx-fifo-size = <774>;
>>> +	h-np-tx-fifo-size = <32>;
>>> +	h-tx-fifo-size = <0>;
>>
>> This seems odd. It should be non-zero for use when operating as host.
>>
> 
> like in host mode i took the default values in otg mode for the last two here
> (please refer to the logs). The BCM2835 datasheet isn't very helpful.
> 
> Do you have any suggestions for valid values or how to get them?
> 

The same values used in host-only mode should work.

It seems that the reset values for host-mode aren't being read
correctly with dr_mode == otg. I suspect this is the core reset and
force-mode delay problem.

Can you try with this patch series to see if you get the proper
values?

http://marc.info/?l=linux-kernel&m=145921907525708

This series fixes known issues, but it also breaks at least one
platform and I haven't had time to look at it properly yet.

Regards,
John
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-16 22:07                 ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-16 22:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 8/16/2016 12:58 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 16. August 2016 um 21:30
>> geschrieben:
>>
>>
>> On 7/26/2016 11:54 AM, Stefan Wahren wrote:
>> ...
>>> +/*
>>> + * Settings for otg
>>> + *
>>> +	dr_mode = "otg";
>>> +	h-rx-fifo-size = <774>;
>>> +	h-np-tx-fifo-size = <32>;
>>> +	h-tx-fifo-size = <0>;
>>
>> This seems odd. It should be non-zero for use when operating as host.
>>
> 
> like in host mode i took the default values in otg mode for the last two here
> (please refer to the logs). The BCM2835 datasheet isn't very helpful.
> 
> Do you have any suggestions for valid values or how to get them?
> 

The same values used in host-only mode should work.

It seems that the reset values for host-mode aren't being read
correctly with dr_mode == otg. I suspect this is the core reset and
force-mode delay problem.

Can you try with this patch series to see if you get the proper
values?

http://marc.info/?l=linux-kernel&m=145921907525708

This series fixes known issues, but it also breaks at least one
platform and I haven't had time to look at it properly yet.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-16 22:07                 ` John Youn
@ 2016-08-17 19:11                     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-17 19:11 UTC (permalink / raw)
  To: John Youn, Eric Anholt
  Cc: Greg Kroah-Hartman, Rob Herring,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Mark Rutland,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Felipe Balbi,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi,

> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 17. August 2016 um 00:07
> geschrieben:
> 
> 
> On 8/16/2016 12:58 PM, Stefan Wahren wrote:
> > Hi John,
> > ...
> > 
> > like in host mode i took the default values in otg mode for the last two
> > here
> > (please refer to the logs). The BCM2835 datasheet isn't very helpful.
> > 
> > Do you have any suggestions for valid values or how to get them?
> > 
> 
> The same values used in host-only mode should work.
> 
> It seems that the reset values for host-mode aren't being read
> correctly with dr_mode == otg. I suspect this is the core reset and
> force-mode delay problem.
> 
> Can you try with this patch series to see if you get the proper
> values?
> 
> http://marc.info/?l=linux-kernel&m=145921907525708
> 
> This series fixes known issues, but it also breaks at least one
> platform and I haven't had time to look at it properly yet.

thanks. Yes, that seems to fix host fifo sizes for bcm2835. Here the log after
applying patch 2 - 4 and removing all DT FIFO parameters (patch 1 has already
been merged):

Linux raspberrypi 4.7.0-rc7-next-20160719+ #23 Wed Aug 17 18:15:24 UTC 2016
armv6l

[    2.290723] dwc2_lowlevel_hw_init()
[    2.298123] dwc2_lowlevel_hw_enable()
[    2.305451] dwc2_get_dr_mode()
[    2.365040] dwc2_get_hwparams()
[    2.371785] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.371801] dwc2 20980000.usb: hwcfg1=00000000
[    2.371813] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.371823] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.371833] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.371843] dwc2 20980000.usb: grxfsiz=00001000
[    2.371853] dwc2 20980000.usb: Forcing mode to host
[    2.371869] dwc2 20980000.usb: gnptxfsiz=01001000
[    2.371880] dwc2 20980000.usb: hptxfsiz=02002000
[    2.371890] dwc2 20980000.usb: Forcing mode to device
[    2.423450] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.423468] dwc2 20980000.usb: Detected values from hardware:
[    2.423480] dwc2 20980000.usb:   op_mode=0
[    2.423490] dwc2 20980000.usb:   arch=2
[    2.423500] dwc2 20980000.usb:   dma_desc_enable=0
[    2.423511] dwc2 20980000.usb:   power_optimized=0
[    2.423520] dwc2 20980000.usb:   i2c_enable=0
[    2.423530] dwc2 20980000.usb:   hs_phy_type=1
[    2.423540] dwc2 20980000.usb:   fs_phy_type=1
[    2.423550] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.423559] dwc2 20980000.usb:   num_dev_ep=7
[    2.423570] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.423579] dwc2 20980000.usb:   host_channels=8
[    2.423590] dwc2 20980000.usb:   max_transfer_size=524287
[    2.423601] dwc2 20980000.usb:   max_packet_count=1023
[    2.423611] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.423621] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.423631] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.423641] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.423651] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.423661] dwc2 20980000.usb:   total_fifo_size=4080
[    2.423671] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.423681] dwc2 20980000.usb:   host_nperio_tx_fifo_size=256
[    2.423691] dwc2 20980000.usb:   host_perio_tx_fifo_size=512
[    2.423699] dwc2 20980000.usb:
[    2.423709] dwc2 20980000.usb: dwc2_set_parameters()
[    2.423723] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.423748] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.423760] dwc2 20980000.usb: Setting hibernation to 0
[    2.423777] dwc2_force_dr_mode()
[    2.430509] dwc2 20980000.usb: Clearing force mode bits
[    2.499028] dwc2_gadget_init()
[    2.505422] dwc2 20980000.usb: Specified GNPTXFDEP=1024 > 32
[    2.514502] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.542143] dwc2 20980000.usb: bound driver zero
[    2.550164] dwc2_hcd_init()
[    2.556602] dwc2 20980000.usb: DWC OTG Controller
[    2.564878] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.575467] dwc2 20980000.usb: irq 33, io mem 0x00000000

# cat /sys/kernel/debug/20980000.usb/fifo
Non-periodic FIFOs:
RXFIFO: Size 4096
NPTXFIFO: Size 32, Start 0x00200000

Periodic TXFIFOs:
        DPTXFIFO 1: Size 512, Start 0x00001020
        DPTXFIFO 2: Size 512, Start 0x00001220
        DPTXFIFO 3: Size 512, Start 0x00001420
        DPTXFIFO 4: Size 512, Start 0x00001620
        DPTXFIFO 5: Size 512, Start 0x00001820
        DPTXFIFO 6: Size 768, Start 0x00001a20
        DPTXFIFO 7: Size 768, Start 0x00001d20
--
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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-17 19:11                     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-17 19:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 00:07
> geschrieben:
> 
> 
> On 8/16/2016 12:58 PM, Stefan Wahren wrote:
> > Hi John,
> > ...
> > 
> > like in host mode i took the default values in otg mode for the last two
> > here
> > (please refer to the logs). The BCM2835 datasheet isn't very helpful.
> > 
> > Do you have any suggestions for valid values or how to get them?
> > 
> 
> The same values used in host-only mode should work.
> 
> It seems that the reset values for host-mode aren't being read
> correctly with dr_mode == otg. I suspect this is the core reset and
> force-mode delay problem.
> 
> Can you try with this patch series to see if you get the proper
> values?
> 
> http://marc.info/?l=linux-kernel&m=145921907525708
> 
> This series fixes known issues, but it also breaks at least one
> platform and I haven't had time to look at it properly yet.

thanks. Yes, that seems to fix host fifo sizes for bcm2835. Here the log after
applying patch 2 - 4 and removing all DT FIFO parameters (patch 1 has already
been merged):

Linux raspberrypi 4.7.0-rc7-next-20160719+ #23 Wed Aug 17 18:15:24 UTC 2016
armv6l

[    2.290723] dwc2_lowlevel_hw_init()
[    2.298123] dwc2_lowlevel_hw_enable()
[    2.305451] dwc2_get_dr_mode()
[    2.365040] dwc2_get_hwparams()
[    2.371785] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.371801] dwc2 20980000.usb: hwcfg1=00000000
[    2.371813] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.371823] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.371833] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.371843] dwc2 20980000.usb: grxfsiz=00001000
[    2.371853] dwc2 20980000.usb: Forcing mode to host
[    2.371869] dwc2 20980000.usb: gnptxfsiz=01001000
[    2.371880] dwc2 20980000.usb: hptxfsiz=02002000
[    2.371890] dwc2 20980000.usb: Forcing mode to device
[    2.423450] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.423468] dwc2 20980000.usb: Detected values from hardware:
[    2.423480] dwc2 20980000.usb:   op_mode=0
[    2.423490] dwc2 20980000.usb:   arch=2
[    2.423500] dwc2 20980000.usb:   dma_desc_enable=0
[    2.423511] dwc2 20980000.usb:   power_optimized=0
[    2.423520] dwc2 20980000.usb:   i2c_enable=0
[    2.423530] dwc2 20980000.usb:   hs_phy_type=1
[    2.423540] dwc2 20980000.usb:   fs_phy_type=1
[    2.423550] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.423559] dwc2 20980000.usb:   num_dev_ep=7
[    2.423570] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.423579] dwc2 20980000.usb:   host_channels=8
[    2.423590] dwc2 20980000.usb:   max_transfer_size=524287
[    2.423601] dwc2 20980000.usb:   max_packet_count=1023
[    2.423611] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.423621] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.423631] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.423641] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.423651] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.423661] dwc2 20980000.usb:   total_fifo_size=4080
[    2.423671] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.423681] dwc2 20980000.usb:   host_nperio_tx_fifo_size=256
[    2.423691] dwc2 20980000.usb:   host_perio_tx_fifo_size=512
[    2.423699] dwc2 20980000.usb:
[    2.423709] dwc2 20980000.usb: dwc2_set_parameters()
[    2.423723] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.423748] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.423760] dwc2 20980000.usb: Setting hibernation to 0
[    2.423777] dwc2_force_dr_mode()
[    2.430509] dwc2 20980000.usb: Clearing force mode bits
[    2.499028] dwc2_gadget_init()
[    2.505422] dwc2 20980000.usb: Specified GNPTXFDEP=1024 > 32
[    2.514502] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.542143] dwc2 20980000.usb: bound driver zero
[    2.550164] dwc2_hcd_init()
[    2.556602] dwc2 20980000.usb: DWC OTG Controller
[    2.564878] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.575467] dwc2 20980000.usb: irq 33, io mem 0x00000000

# cat /sys/kernel/debug/20980000.usb/fifo
Non-periodic FIFOs:
RXFIFO: Size 4096
NPTXFIFO: Size 32, Start 0x00200000

Periodic TXFIFOs:
        DPTXFIFO 1: Size 512, Start 0x00001020
        DPTXFIFO 2: Size 512, Start 0x00001220
        DPTXFIFO 3: Size 512, Start 0x00001420
        DPTXFIFO 4: Size 512, Start 0x00001620
        DPTXFIFO 5: Size 512, Start 0x00001820
        DPTXFIFO 6: Size 768, Start 0x00001a20
        DPTXFIFO 7: Size 768, Start 0x00001d20

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-17 19:11                     ` Stefan Wahren
@ 2016-08-17 21:21                         ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-17 21:21 UTC (permalink / raw)
  To: Stefan Wahren, John Youn, Eric Anholt
  Cc: Greg Kroah-Hartman, Rob Herring,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Mark Rutland,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Felipe Balbi,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 8/17/2016 12:11 PM, Stefan Wahren wrote:
> Hi,
> 
>> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 17. August 2016 um 00:07
>> geschrieben:
>>
>>
>> On 8/16/2016 12:58 PM, Stefan Wahren wrote:
>>> Hi John,
>>> ...
>>>
>>> like in host mode i took the default values in otg mode for the last two
>>> here
>>> (please refer to the logs). The BCM2835 datasheet isn't very helpful.
>>>
>>> Do you have any suggestions for valid values or how to get them?
>>>
>>
>> The same values used in host-only mode should work.
>>
>> It seems that the reset values for host-mode aren't being read
>> correctly with dr_mode == otg. I suspect this is the core reset and
>> force-mode delay problem.
>>
>> Can you try with this patch series to see if you get the proper
>> values?
>>
>> http://marc.info/?l=linux-kernel&m=145921907525708
>>
>> This series fixes known issues, but it also breaks at least one
>> platform and I haven't had time to look at it properly yet.
> 
> thanks. Yes, that seems to fix host fifo sizes for bcm2835. Here the log after
> applying patch 2 - 4 and removing all DT FIFO parameters (patch 1 has already
> been merged):
> 
> Linux raspberrypi 4.7.0-rc7-next-20160719+ #23 Wed Aug 17 18:15:24 UTC 2016
> armv6l
> 
> [    2.290723] dwc2_lowlevel_hw_init()
> [    2.298123] dwc2_lowlevel_hw_enable()
> [    2.305451] dwc2_get_dr_mode()
> [    2.365040] dwc2_get_hwparams()
> [    2.371785] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
> [    2.371801] dwc2 20980000.usb: hwcfg1=00000000
> [    2.371813] dwc2 20980000.usb: hwcfg2=228ddd50
> [    2.371823] dwc2 20980000.usb: hwcfg3=0ff000e8
> [    2.371833] dwc2 20980000.usb: hwcfg4=1ff00020
> [    2.371843] dwc2 20980000.usb: grxfsiz=00001000
> [    2.371853] dwc2 20980000.usb: Forcing mode to host
> [    2.371869] dwc2 20980000.usb: gnptxfsiz=01001000
> [    2.371880] dwc2 20980000.usb: hptxfsiz=02002000
> [    2.371890] dwc2 20980000.usb: Forcing mode to device
> [    2.423450] dwc2 20980000.usb: gnptxfsiz=00201000
> [    2.423468] dwc2 20980000.usb: Detected values from hardware:
> [    2.423480] dwc2 20980000.usb:   op_mode=0
> [    2.423490] dwc2 20980000.usb:   arch=2
> [    2.423500] dwc2 20980000.usb:   dma_desc_enable=0
> [    2.423511] dwc2 20980000.usb:   power_optimized=0
> [    2.423520] dwc2 20980000.usb:   i2c_enable=0
> [    2.423530] dwc2 20980000.usb:   hs_phy_type=1
> [    2.423540] dwc2 20980000.usb:   fs_phy_type=1
> [    2.423550] dwc2 20980000.usb:   utmi_phy_data_width=0
> [    2.423559] dwc2 20980000.usb:   num_dev_ep=7
> [    2.423570] dwc2 20980000.usb:   num_dev_perio_in_ep=0
> [    2.423579] dwc2 20980000.usb:   host_channels=8
> [    2.423590] dwc2 20980000.usb:   max_transfer_size=524287
> [    2.423601] dwc2 20980000.usb:   max_packet_count=1023
> [    2.423611] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
> [    2.423621] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
> [    2.423631] dwc2 20980000.usb:   dev_token_q_depth=0x8
> [    2.423641] dwc2 20980000.usb:   enable_dynamic_fifo=1
> [    2.423651] dwc2 20980000.usb:   en_multiple_tx_fifo=1
> [    2.423661] dwc2 20980000.usb:   total_fifo_size=4080
> [    2.423671] dwc2 20980000.usb:   host_rx_fifo_size=4096
> [    2.423681] dwc2 20980000.usb:   host_nperio_tx_fifo_size=256
> [    2.423691] dwc2 20980000.usb:   host_perio_tx_fifo_size=512
> [    2.423699] dwc2 20980000.usb:
> [    2.423709] dwc2 20980000.usb: dwc2_set_parameters()
> [    2.423723] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
> [    2.423748] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
> [    2.423760] dwc2 20980000.usb: Setting hibernation to 0
> [    2.423777] dwc2_force_dr_mode()
> [    2.430509] dwc2 20980000.usb: Clearing force mode bits
> [    2.499028] dwc2_gadget_init()
> [    2.505422] dwc2 20980000.usb: Specified GNPTXFDEP=1024 > 32
> [    2.514502] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
> [    2.542143] dwc2 20980000.usb: bound driver zero
> [    2.550164] dwc2_hcd_init()
> [    2.556602] dwc2 20980000.usb: DWC OTG Controller
> [    2.564878] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
> [    2.575467] dwc2 20980000.usb: irq 33, io mem 0x00000000
> 

Ok, yeah, that seems better.

Can you check if applying just patch 2 and 3 solves the issue? If so I
think we can send those upstream.

Regards,
John
--
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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-17 21:21                         ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-17 21:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 8/17/2016 12:11 PM, Stefan Wahren wrote:
> Hi,
> 
>> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 00:07
>> geschrieben:
>>
>>
>> On 8/16/2016 12:58 PM, Stefan Wahren wrote:
>>> Hi John,
>>> ...
>>>
>>> like in host mode i took the default values in otg mode for the last two
>>> here
>>> (please refer to the logs). The BCM2835 datasheet isn't very helpful.
>>>
>>> Do you have any suggestions for valid values or how to get them?
>>>
>>
>> The same values used in host-only mode should work.
>>
>> It seems that the reset values for host-mode aren't being read
>> correctly with dr_mode == otg. I suspect this is the core reset and
>> force-mode delay problem.
>>
>> Can you try with this patch series to see if you get the proper
>> values?
>>
>> http://marc.info/?l=linux-kernel&m=145921907525708
>>
>> This series fixes known issues, but it also breaks at least one
>> platform and I haven't had time to look at it properly yet.
> 
> thanks. Yes, that seems to fix host fifo sizes for bcm2835. Here the log after
> applying patch 2 - 4 and removing all DT FIFO parameters (patch 1 has already
> been merged):
> 
> Linux raspberrypi 4.7.0-rc7-next-20160719+ #23 Wed Aug 17 18:15:24 UTC 2016
> armv6l
> 
> [    2.290723] dwc2_lowlevel_hw_init()
> [    2.298123] dwc2_lowlevel_hw_enable()
> [    2.305451] dwc2_get_dr_mode()
> [    2.365040] dwc2_get_hwparams()
> [    2.371785] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
> [    2.371801] dwc2 20980000.usb: hwcfg1=00000000
> [    2.371813] dwc2 20980000.usb: hwcfg2=228ddd50
> [    2.371823] dwc2 20980000.usb: hwcfg3=0ff000e8
> [    2.371833] dwc2 20980000.usb: hwcfg4=1ff00020
> [    2.371843] dwc2 20980000.usb: grxfsiz=00001000
> [    2.371853] dwc2 20980000.usb: Forcing mode to host
> [    2.371869] dwc2 20980000.usb: gnptxfsiz=01001000
> [    2.371880] dwc2 20980000.usb: hptxfsiz=02002000
> [    2.371890] dwc2 20980000.usb: Forcing mode to device
> [    2.423450] dwc2 20980000.usb: gnptxfsiz=00201000
> [    2.423468] dwc2 20980000.usb: Detected values from hardware:
> [    2.423480] dwc2 20980000.usb:   op_mode=0
> [    2.423490] dwc2 20980000.usb:   arch=2
> [    2.423500] dwc2 20980000.usb:   dma_desc_enable=0
> [    2.423511] dwc2 20980000.usb:   power_optimized=0
> [    2.423520] dwc2 20980000.usb:   i2c_enable=0
> [    2.423530] dwc2 20980000.usb:   hs_phy_type=1
> [    2.423540] dwc2 20980000.usb:   fs_phy_type=1
> [    2.423550] dwc2 20980000.usb:   utmi_phy_data_width=0
> [    2.423559] dwc2 20980000.usb:   num_dev_ep=7
> [    2.423570] dwc2 20980000.usb:   num_dev_perio_in_ep=0
> [    2.423579] dwc2 20980000.usb:   host_channels=8
> [    2.423590] dwc2 20980000.usb:   max_transfer_size=524287
> [    2.423601] dwc2 20980000.usb:   max_packet_count=1023
> [    2.423611] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
> [    2.423621] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
> [    2.423631] dwc2 20980000.usb:   dev_token_q_depth=0x8
> [    2.423641] dwc2 20980000.usb:   enable_dynamic_fifo=1
> [    2.423651] dwc2 20980000.usb:   en_multiple_tx_fifo=1
> [    2.423661] dwc2 20980000.usb:   total_fifo_size=4080
> [    2.423671] dwc2 20980000.usb:   host_rx_fifo_size=4096
> [    2.423681] dwc2 20980000.usb:   host_nperio_tx_fifo_size=256
> [    2.423691] dwc2 20980000.usb:   host_perio_tx_fifo_size=512
> [    2.423699] dwc2 20980000.usb:
> [    2.423709] dwc2 20980000.usb: dwc2_set_parameters()
> [    2.423723] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
> [    2.423748] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
> [    2.423760] dwc2 20980000.usb: Setting hibernation to 0
> [    2.423777] dwc2_force_dr_mode()
> [    2.430509] dwc2 20980000.usb: Clearing force mode bits
> [    2.499028] dwc2_gadget_init()
> [    2.505422] dwc2 20980000.usb: Specified GNPTXFDEP=1024 > 32
> [    2.514502] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
> [    2.542143] dwc2 20980000.usb: bound driver zero
> [    2.550164] dwc2_hcd_init()
> [    2.556602] dwc2 20980000.usb: DWC OTG Controller
> [    2.564878] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
> [    2.575467] dwc2 20980000.usb: irq 33, io mem 0x00000000
> 

Ok, yeah, that seems better.

Can you check if applying just patch 2 and 3 solves the issue? If so I
think we can send those upstream.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-17 21:21                         ` John Youn
@ 2016-08-17 22:17                             ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-17 22:17 UTC (permalink / raw)
  To: John Youn, Eric Anholt
  Cc: Greg Kroah-Hartman, Rob Herring,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Mark Rutland,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Felipe Balbi,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi John,

> John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> hat am 17. August 2016 um 23:21
> geschrieben:
> 
> 
> ...
> Ok, yeah, that seems better.
> 
> Can you check if applying just patch 2 and 3 solves the issue? If so I
> think we can send those upstream.

unfortunately not:

[    2.280719] dwc2_lowlevel_hw_init()
[    2.288028] dwc2_set_all_params()
[    2.295162] dwc2_lowlevel_hw_enable()
[    2.302439] dwc2_get_dr_mode()
[    2.309043] dwc2_core_reset_and_force_dr_mode()
[    2.489040] dwc2_get_hwparams()
[    2.495629] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.495645] dwc2 20980000.usb: hwcfg1=00000000
[    2.495657] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.495668] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.495680] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.495691] dwc2 20980000.usb: grxfsiz=00001000
[    2.495701] dwc2 20980000.usb: Forcing mode to host
[    2.539076] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.539090] dwc2 20980000.usb: hptxfsiz=00000000
[    2.589054] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.589071] dwc2 20980000.usb: Detected values from hardware:
[    2.589082] dwc2 20980000.usb:   op_mode=0
[    2.589093] dwc2 20980000.usb:   arch=2
[    2.589104] dwc2 20980000.usb:   dma_desc_enable=0
[    2.589115] dwc2 20980000.usb:   power_optimized=0
[    2.589125] dwc2 20980000.usb:   i2c_enable=0
[    2.589134] dwc2 20980000.usb:   hs_phy_type=1
[    2.589144] dwc2 20980000.usb:   fs_phy_type=1
[    2.589154] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.589164] dwc2 20980000.usb:   num_dev_ep=7
[    2.589174] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.589183] dwc2 20980000.usb:   host_channels=8
[    2.589195] dwc2 20980000.usb:   max_transfer_size=524287
[    2.589206] dwc2 20980000.usb:   max_packet_count=1023
[    2.589216] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.589226] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.589236] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.589247] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.589257] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.589267] dwc2 20980000.usb:   total_fifo_size=4080
[    2.589277] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.589287] dwc2 20980000.usb:   host_nperio_tx_fifo_size=32
[    2.589299] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
[    2.589307] dwc2 20980000.usb:
[    2.589312] dwc2_set_parameters()
[    2.595921] dwc2 20980000.usb: dwc2_set_parameters()
[    2.595940] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.595968] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.595980] dwc2 20980000.usb: Setting hibernation to 0
[    2.596003] dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
Check HW configuration.
[    2.611528] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32
[    2.611552] dwc2 20980000.usb: 512 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.627250] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
[    2.627256] dwc2_force_dr_mode()
[    2.749035] dwc2_gadget_init()
[    2.755610] dwc2 20980000.usb: Specified GNPTXFDEP=1024 > 32
[    2.764876] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.792911] dwc2 20980000.usb: bound driver zero
[    2.801042] dwc2_hcd_init()
[    2.807485] dwc2 20980000.usb: DWC OTG Controller
[    2.815716] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.826265] dwc2 20980000.usb: irq 33, io mem 0x00000000

Regards
Stefan

> 
> Regards,
> John
--
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] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-17 22:17                             ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-17 22:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
> geschrieben:
> 
> 
> ...
> Ok, yeah, that seems better.
> 
> Can you check if applying just patch 2 and 3 solves the issue? If so I
> think we can send those upstream.

unfortunately not:

[    2.280719] dwc2_lowlevel_hw_init()
[    2.288028] dwc2_set_all_params()
[    2.295162] dwc2_lowlevel_hw_enable()
[    2.302439] dwc2_get_dr_mode()
[    2.309043] dwc2_core_reset_and_force_dr_mode()
[    2.489040] dwc2_get_hwparams()
[    2.495629] dwc2 20980000.usb: Core Release: 2.80a (snpsid=4f54280a)
[    2.495645] dwc2 20980000.usb: hwcfg1=00000000
[    2.495657] dwc2 20980000.usb: hwcfg2=228ddd50
[    2.495668] dwc2 20980000.usb: hwcfg3=0ff000e8
[    2.495680] dwc2 20980000.usb: hwcfg4=1ff00020
[    2.495691] dwc2 20980000.usb: grxfsiz=00001000
[    2.495701] dwc2 20980000.usb: Forcing mode to host
[    2.539076] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.539090] dwc2 20980000.usb: hptxfsiz=00000000
[    2.589054] dwc2 20980000.usb: gnptxfsiz=00201000
[    2.589071] dwc2 20980000.usb: Detected values from hardware:
[    2.589082] dwc2 20980000.usb:   op_mode=0
[    2.589093] dwc2 20980000.usb:   arch=2
[    2.589104] dwc2 20980000.usb:   dma_desc_enable=0
[    2.589115] dwc2 20980000.usb:   power_optimized=0
[    2.589125] dwc2 20980000.usb:   i2c_enable=0
[    2.589134] dwc2 20980000.usb:   hs_phy_type=1
[    2.589144] dwc2 20980000.usb:   fs_phy_type=1
[    2.589154] dwc2 20980000.usb:   utmi_phy_data_width=0
[    2.589164] dwc2 20980000.usb:   num_dev_ep=7
[    2.589174] dwc2 20980000.usb:   num_dev_perio_in_ep=0
[    2.589183] dwc2 20980000.usb:   host_channels=8
[    2.589195] dwc2 20980000.usb:   max_transfer_size=524287
[    2.589206] dwc2 20980000.usb:   max_packet_count=1023
[    2.589216] dwc2 20980000.usb:   nperio_tx_q_depth=0x4
[    2.589226] dwc2 20980000.usb:   host_perio_tx_q_depth=0x4
[    2.589236] dwc2 20980000.usb:   dev_token_q_depth=0x8
[    2.589247] dwc2 20980000.usb:   enable_dynamic_fifo=1
[    2.589257] dwc2 20980000.usb:   en_multiple_tx_fifo=1
[    2.589267] dwc2 20980000.usb:   total_fifo_size=4080
[    2.589277] dwc2 20980000.usb:   host_rx_fifo_size=4096
[    2.589287] dwc2 20980000.usb:   host_nperio_tx_fifo_size=32
[    2.589299] dwc2 20980000.usb:   host_perio_tx_fifo_size=0
[    2.589307] dwc2 20980000.usb:
[    2.589312] dwc2_set_parameters()
[    2.595921] dwc2 20980000.usb: dwc2_set_parameters()
[    2.595940] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.595968] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.595980] dwc2 20980000.usb: Setting hibernation to 0
[    2.596003] dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
Check HW configuration.
[    2.611528] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32
[    2.611552] dwc2 20980000.usb: 512 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.627250] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
[    2.627256] dwc2_force_dr_mode()
[    2.749035] dwc2_gadget_init()
[    2.755610] dwc2 20980000.usb: Specified GNPTXFDEP=1024 > 32
[    2.764876] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    2.792911] dwc2 20980000.usb: bound driver zero
[    2.801042] dwc2_hcd_init()
[    2.807485] dwc2 20980000.usb: DWC OTG Controller
[    2.815716] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    2.826265] dwc2 20980000.usb: irq 33, io mem 0x00000000

Regards
Stefan

> 
> Regards,
> John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-17 22:17                             ` Stefan Wahren
@ 2016-08-18 18:03                               ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-18 18:03 UTC (permalink / raw)
  To: Stefan Wahren, John Youn, Eric Anholt
  Cc: Mark Rutland, Felipe Balbi, Stephen Warren, Greg Kroah-Hartman,
	linux-usb, devicetree, Rob Herring, linux-rpi-kernel,
	linux-arm-kernel

On 8/17/2016 3:17 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
>> geschrieben:
>>
>>
>> ...
>> Ok, yeah, that seems better.
>>
>> Can you check if applying just patch 2 and 3 solves the issue? If so I
>> think we can send those upstream.
> 
> unfortunately not:

Ok. I'll see if I can come up with a more conservative version of
patch 4 until I can look at it properly. I'll try to get to this
sometime next week but I may not be able to get to it until later.

In the meantime, specifying the fifo sizes as you've done can serve as
a workaround.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-18 18:03                               ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-18 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On 8/17/2016 3:17 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
>> geschrieben:
>>
>>
>> ...
>> Ok, yeah, that seems better.
>>
>> Can you check if applying just patch 2 and 3 solves the issue? If so I
>> think we can send those upstream.
> 
> unfortunately not:

Ok. I'll see if I can come up with a more conservative version of
patch 4 until I can look at it properly. I'll try to get to this
sometime next week but I may not be able to get to it until later.

In the meantime, specifying the fifo sizes as you've done can serve as
a workaround.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode
  2016-07-26 18:53     ` Stefan Wahren
@ 2016-08-18 18:12       ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-18 18:12 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Mark Rutland, Eric Anholt, John Youn
  Cc: Felipe Balbi, Stephen Warren, devicetree, Greg Kroah-Hartman,
	linux-usb, linux-rpi-kernel, linux-arm-kernel

On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> Currently the fifo sizes for host/otg mode are defined per platform
> and doesn't take the mode into account. So we will get errors
> like this:
> 
> dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32
> 
> So add DT properties for these mode specific fifo sizes in order
> to define them in the devicetree and avoid these errors.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt |    3 +++
>  drivers/usb/dwc2/core.c                        |   25 ++++++++++++++++++------
>  2 files changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
> index 20a68bf..298bac1 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
> @@ -27,6 +27,9 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
>  - 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.
> +- h-rx-fifo-size: size of rx fifo size in host / otg mode.
> +- h-np-tx-fifo-size: size of non-periodic tx fifo size in host / otg mode.
> +- h-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in host / otg mode.
>  
>  Example:
>  
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index 5645528..5dffc6e 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -47,6 +47,7 @@
>  #include <linux/dma-mapping.h>
>  #include <linux/delay.h>
>  #include <linux/io.h>
> +#include <linux/of.h>
>  #include <linux/slab.h>
>  #include <linux/usb.h>
>  
> @@ -1289,6 +1290,9 @@ static void dwc2_set_param_hibernation(struct dwc2_hsotg *hsotg,
>  void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
>  			 const struct dwc2_core_params *params)
>  {
> +	struct device_node *np = hsotg->dev->of_node;
> +	u32 val = 0;
> +
>  	dev_dbg(hsotg->dev, "%s()\n", __func__);
>  
>  	dwc2_set_param_otg_cap(hsotg, params->otg_cap);
> @@ -1299,12 +1303,6 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
>  			params->host_support_fs_ls_low_power);
>  	dwc2_set_param_enable_dynamic_fifo(hsotg,
>  			params->enable_dynamic_fifo);
> -	dwc2_set_param_host_rx_fifo_size(hsotg,
> -			params->host_rx_fifo_size);
> -	dwc2_set_param_host_nperio_tx_fifo_size(hsotg,
> -			params->host_nperio_tx_fifo_size);
> -	dwc2_set_param_host_perio_tx_fifo_size(hsotg,
> -			params->host_perio_tx_fifo_size);
>  	dwc2_set_param_max_transfer_size(hsotg,
>  			params->max_transfer_size);
>  	dwc2_set_param_max_packet_count(hsotg,
> @@ -1329,6 +1327,21 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
>  	dwc2_set_param_uframe_sched(hsotg, params->uframe_sched);
>  	dwc2_set_param_external_id_pin_ctl(hsotg, params->external_id_pin_ctl);
>  	dwc2_set_param_hibernation(hsotg, params->hibernation);
> +
> +	if (!IS_ENABLED(CONFIG_OF) ||
> +	    of_property_read_u32(np, "h-rx-fifo-size", &val))
> +		val = params->host_rx_fifo_size;
> +	dwc2_set_param_host_rx_fifo_size(hsotg, val);
> +
> +	if (!IS_ENABLED(CONFIG_OF) ||
> +	    of_property_read_u32(np, "h-np-tx-fifo-size", &val))
> +		val = params->host_nperio_tx_fifo_size;
> +	dwc2_set_param_host_nperio_tx_fifo_size(hsotg, val);
> +
> +	if (!IS_ENABLED(CONFIG_OF) ||
> +	    of_property_read_u32(np, "h-tx-fifo-size", &val))
> +		val = params->host_perio_tx_fifo_size;
> +	dwc2_set_param_host_perio_tx_fifo_size(hsotg, val);
>  }
>  
>  /*
> 

You should be able to use "device_property_read" as in the dwc3
driver. I know gadget.c currently uses of_property_read but we have
already made this change internally. This will allow us to set these
for PCI based devices, and also you won't need the CONFIG_OF check.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode
@ 2016-08-18 18:12       ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-18 18:12 UTC (permalink / raw)
  To: linux-arm-kernel

On 7/26/2016 11:54 AM, Stefan Wahren wrote:
> Currently the fifo sizes for host/otg mode are defined per platform
> and doesn't take the mode into account. So we will get errors
> like this:
> 
> dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size.
> dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 32
> 
> So add DT properties for these mode specific fifo sizes in order
> to define them in the devicetree and avoid these errors.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt |    3 +++
>  drivers/usb/dwc2/core.c                        |   25 ++++++++++++++++++------
>  2 files changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
> index 20a68bf..298bac1 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
> @@ -27,6 +27,9 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
>  - 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.
> +- h-rx-fifo-size: size of rx fifo size in host / otg mode.
> +- h-np-tx-fifo-size: size of non-periodic tx fifo size in host / otg mode.
> +- h-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in host / otg mode.
>  
>  Example:
>  
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index 5645528..5dffc6e 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -47,6 +47,7 @@
>  #include <linux/dma-mapping.h>
>  #include <linux/delay.h>
>  #include <linux/io.h>
> +#include <linux/of.h>
>  #include <linux/slab.h>
>  #include <linux/usb.h>
>  
> @@ -1289,6 +1290,9 @@ static void dwc2_set_param_hibernation(struct dwc2_hsotg *hsotg,
>  void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
>  			 const struct dwc2_core_params *params)
>  {
> +	struct device_node *np = hsotg->dev->of_node;
> +	u32 val = 0;
> +
>  	dev_dbg(hsotg->dev, "%s()\n", __func__);
>  
>  	dwc2_set_param_otg_cap(hsotg, params->otg_cap);
> @@ -1299,12 +1303,6 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
>  			params->host_support_fs_ls_low_power);
>  	dwc2_set_param_enable_dynamic_fifo(hsotg,
>  			params->enable_dynamic_fifo);
> -	dwc2_set_param_host_rx_fifo_size(hsotg,
> -			params->host_rx_fifo_size);
> -	dwc2_set_param_host_nperio_tx_fifo_size(hsotg,
> -			params->host_nperio_tx_fifo_size);
> -	dwc2_set_param_host_perio_tx_fifo_size(hsotg,
> -			params->host_perio_tx_fifo_size);
>  	dwc2_set_param_max_transfer_size(hsotg,
>  			params->max_transfer_size);
>  	dwc2_set_param_max_packet_count(hsotg,
> @@ -1329,6 +1327,21 @@ void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
>  	dwc2_set_param_uframe_sched(hsotg, params->uframe_sched);
>  	dwc2_set_param_external_id_pin_ctl(hsotg, params->external_id_pin_ctl);
>  	dwc2_set_param_hibernation(hsotg, params->hibernation);
> +
> +	if (!IS_ENABLED(CONFIG_OF) ||
> +	    of_property_read_u32(np, "h-rx-fifo-size", &val))
> +		val = params->host_rx_fifo_size;
> +	dwc2_set_param_host_rx_fifo_size(hsotg, val);
> +
> +	if (!IS_ENABLED(CONFIG_OF) ||
> +	    of_property_read_u32(np, "h-np-tx-fifo-size", &val))
> +		val = params->host_nperio_tx_fifo_size;
> +	dwc2_set_param_host_nperio_tx_fifo_size(hsotg, val);
> +
> +	if (!IS_ENABLED(CONFIG_OF) ||
> +	    of_property_read_u32(np, "h-tx-fifo-size", &val))
> +		val = params->host_perio_tx_fifo_size;
> +	dwc2_set_param_host_perio_tx_fifo_size(hsotg, val);
>  }
>  
>  /*
> 

You should be able to use "device_property_read" as in the dwc3
driver. I know gadget.c currently uses of_property_read but we have
already made this change internally. This will allow us to set these
for PCI based devices, and also you won't need the CONFIG_OF check.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-07-26 18:53 ` Stefan Wahren
@ 2016-08-18 18:14   ` Eric Anholt
  -1 siblings, 0 replies; 60+ messages in thread
From: Eric Anholt @ 2016-08-18 18:14 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, John Youn
  Cc: Stefan Wahren, Felipe Balbi, Stephen Warren, devicetree,
	Greg Kroah-Hartman, linux-usb, linux-rpi-kernel,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1209 bytes --]

Stefan Wahren <stefan.wahren@i2se.com> writes:

> This patch series is only a draft and not intended to be merged. Patches 1 and 2
> aren't bcm2835 specific and should be helpful for other platforms. 
> The patches 2 - 4 are required for otg / gadget mode. The last patch
> based on the work of Lubomir Rintel [1] and Noralf Trønnes [2].
>
> Changes since V1:
> - rebase to current linux-next
> - add patches 1 - 4 for otg/gadget support
> - add patch 5 with model compatible
> - use polarity define for ACT LED
>
> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
> [2] - https://github.com/raspberrypi/linux/pull/1239/
>
> Stefan Wahren (6):
>   usb: dwc2: core: Avoid nonsense error in gadget mode
>   usb: dwc2: Add DT properties to specify fifo size in host/otg mode
>   ARM: dts: bcm283x: Add missing usb clock
>   ARM: dts: bcm283x: Add generic USB PHY
>   DT: bindings: bcm: Add Raspberry Pi Zero
>   ARM: dts: bcm2835: Add Raspberry Pi Zero

Where are we at on these?  I've been holding off waiting for the USB
bits to get settled.  I can grab the bindings patch, but is there
anything else we could merge while you're working on USB?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-18 18:14   ` Eric Anholt
  0 siblings, 0 replies; 60+ messages in thread
From: Eric Anholt @ 2016-08-18 18:14 UTC (permalink / raw)
  To: linux-arm-kernel

Stefan Wahren <stefan.wahren@i2se.com> writes:

> This patch series is only a draft and not intended to be merged. Patches 1 and 2
> aren't bcm2835 specific and should be helpful for other platforms. 
> The patches 2 - 4 are required for otg / gadget mode. The last patch
> based on the work of Lubomir Rintel [1] and Noralf Tr?nnes [2].
>
> Changes since V1:
> - rebase to current linux-next
> - add patches 1 - 4 for otg/gadget support
> - add patch 5 with model compatible
> - use polarity define for ACT LED
>
> [1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
> [2] - https://github.com/raspberrypi/linux/pull/1239/
>
> Stefan Wahren (6):
>   usb: dwc2: core: Avoid nonsense error in gadget mode
>   usb: dwc2: Add DT properties to specify fifo size in host/otg mode
>   ARM: dts: bcm283x: Add missing usb clock
>   ARM: dts: bcm283x: Add generic USB PHY
>   DT: bindings: bcm: Add Raspberry Pi Zero
>   ARM: dts: bcm2835: Add Raspberry Pi Zero

Where are we at on these?  I've been holding off waiting for the USB
bits to get settled.  I can grab the bindings patch, but is there
anything else we could merge while you're working on USB?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160818/2b308119/attachment.sig>

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-18 18:14   ` Eric Anholt
@ 2016-08-18 18:57     ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-18 18:57 UTC (permalink / raw)
  To: Eric Anholt
  Cc: Mark Rutland, Felipe Balbi, Stephen Warren, John Youn,
	Greg Kroah-Hartman, linux-usb, devicetree, Rob Herring,
	linux-rpi-kernel, linux-arm-kernel

Hi Eric,

> Eric Anholt <eric@anholt.net> hat am 18. August 2016 um 20:14 geschrieben:
> 
> 
> Stefan Wahren <stefan.wahren@i2se.com> writes:
> 
> > This patch series is only a draft and not intended to be merged. Patches 1
> > and 2
> > aren't bcm2835 specific and should be helpful for other platforms. 
> > The patches 2 - 4 are required for otg / gadget mode. The last patch
> > based on the work of Lubomir Rintel [1] and Noralf Trønnes [2].
> >
> > Changes since V1:
> > - rebase to current linux-next
> > - add patches 1 - 4 for otg/gadget support
> > - add patch 5 with model compatible
> > - use polarity define for ACT LED
> >
> > [1] -
> > http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
> > [2] - https://github.com/raspberrypi/linux/pull/1239/
> >
> > Stefan Wahren (6):
> >   usb: dwc2: core: Avoid nonsense error in gadget mode
> >   usb: dwc2: Add DT properties to specify fifo size in host/otg mode
> >   ARM: dts: bcm283x: Add missing usb clock
> >   ARM: dts: bcm283x: Add generic USB PHY
> >   DT: bindings: bcm: Add Raspberry Pi Zero
> >   ARM: dts: bcm2835: Add Raspberry Pi Zero
> 
> Where are we at on these?  

I would like to split the series:
part 1: Raspberry Pi Zero support (only USB host mode support)
part 2: OTG / Peripheral support for BCM2835 (hope that i reach the point)

> I've been holding off waiting for the USB
> bits to get settled.  I can grab the bindings patch, but is there
> anything else we could merge while you're working on USB?

Maybe i missed something, but i didn't received any ACK from you about this
series.

In case everything is okay, you could also merge patch 3 since it's relevant to
bcm283x and not RPi Zero specific.

Stefan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-18 18:57     ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-18 18:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Eric,

> Eric Anholt <eric@anholt.net> hat am 18. August 2016 um 20:14 geschrieben:
> 
> 
> Stefan Wahren <stefan.wahren@i2se.com> writes:
> 
> > This patch series is only a draft and not intended to be merged. Patches 1
> > and 2
> > aren't bcm2835 specific and should be helpful for other platforms. 
> > The patches 2 - 4 are required for otg / gadget mode. The last patch
> > based on the work of Lubomir Rintel [1] and Noralf Tr?nnes [2].
> >
> > Changes since V1:
> > - rebase to current linux-next
> > - add patches 1 - 4 for otg/gadget support
> > - add patch 5 with model compatible
> > - use polarity define for ACT LED
> >
> > [1] -
> > http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
> > [2] - https://github.com/raspberrypi/linux/pull/1239/
> >
> > Stefan Wahren (6):
> >   usb: dwc2: core: Avoid nonsense error in gadget mode
> >   usb: dwc2: Add DT properties to specify fifo size in host/otg mode
> >   ARM: dts: bcm283x: Add missing usb clock
> >   ARM: dts: bcm283x: Add generic USB PHY
> >   DT: bindings: bcm: Add Raspberry Pi Zero
> >   ARM: dts: bcm2835: Add Raspberry Pi Zero
> 
> Where are we at on these?  

I would like to split the series:
part 1: Raspberry Pi Zero support (only USB host mode support)
part 2: OTG / Peripheral support for BCM2835 (hope that i reach the point)

> I've been holding off waiting for the USB
> bits to get settled.  I can grab the bindings patch, but is there
> anything else we could merge while you're working on USB?

Maybe i missed something, but i didn't received any ACK from you about this
series.

In case everything is okay, you could also merge patch 3 since it's relevant to
bcm283x and not RPi Zero specific.

Stefan

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-18 18:03                               ` John Youn
@ 2016-08-18 19:04                                 ` Stefan Wahren
  -1 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-18 19:04 UTC (permalink / raw)
  To: John Youn, Eric Anholt
  Cc: Mark Rutland, Felipe Balbi, Stephen Warren, Greg Kroah-Hartman,
	linux-usb, devicetree, Rob Herring, linux-rpi-kernel,
	linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 18. August 2016 um 20:03
> geschrieben:
> 
> 
> On 8/17/2016 3:17 PM, Stefan Wahren wrote:
> > Hi John,
> > 
> >> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
> >> geschrieben:
> >>
> >>
> >> ...
> >> Ok, yeah, that seems better.
> >>
> >> Can you check if applying just patch 2 and 3 solves the issue? If so I
> >> think we can send those upstream.
> > 
> > unfortunately not:
> 
> Ok. I'll see if I can come up with a more conservative version of
> patch 4 until I can look at it properly. I'll try to get to this
> sometime next week but I may not be able to get to it until later.

Great

> 
> In the meantime, specifying the fifo sizes as you've done can serve as
> a workaround.

Beside of this workaround, do you see any benefit of patch 2/6 from my series?

I don't want to introduce DT properties which are only useful for workarounds?

Thanks
Stefan

> 
> Regards,
> John
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-18 19:04                                 ` Stefan Wahren
  0 siblings, 0 replies; 60+ messages in thread
From: Stefan Wahren @ 2016-08-18 19:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi John,

> John Youn <John.Youn@synopsys.com> hat am 18. August 2016 um 20:03
> geschrieben:
> 
> 
> On 8/17/2016 3:17 PM, Stefan Wahren wrote:
> > Hi John,
> > 
> >> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
> >> geschrieben:
> >>
> >>
> >> ...
> >> Ok, yeah, that seems better.
> >>
> >> Can you check if applying just patch 2 and 3 solves the issue? If so I
> >> think we can send those upstream.
> > 
> > unfortunately not:
> 
> Ok. I'll see if I can come up with a more conservative version of
> patch 4 until I can look at it properly. I'll try to get to this
> sometime next week but I may not be able to get to it until later.

Great

> 
> In the meantime, specifying the fifo sizes as you've done can serve as
> a workaround.

Beside of this workaround, do you see any benefit of patch 2/6 from my series?

I don't want to introduce DT properties which are only useful for workarounds?

Thanks
Stefan

> 
> Regards,
> John
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-18 19:04                                 ` Stefan Wahren
@ 2016-08-18 19:34                                   ` John Youn
  -1 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-18 19:34 UTC (permalink / raw)
  To: Stefan Wahren, John Youn, Eric Anholt
  Cc: Mark Rutland, Felipe Balbi, Stephen Warren, Greg Kroah-Hartman,
	linux-usb, devicetree, Rob Herring, linux-rpi-kernel,
	linux-arm-kernel

On 8/18/2016 12:04 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 18. August 2016 um 20:03
>> geschrieben:
>>
>>
>> On 8/17/2016 3:17 PM, Stefan Wahren wrote:
>>> Hi John,
>>>
>>>> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
>>>> geschrieben:
>>>>
>>>>
>>>> ...
>>>> Ok, yeah, that seems better.
>>>>
>>>> Can you check if applying just patch 2 and 3 solves the issue? If so I
>>>> think we can send those upstream.
>>>
>>> unfortunately not:
>>
>> Ok. I'll see if I can come up with a more conservative version of
>> patch 4 until I can look at it properly. I'll try to get to this
>> sometime next week but I may not be able to get to it until later.
> 
> Great
> 
>>
>> In the meantime, specifying the fifo sizes as you've done can serve as
>> a workaround.
> 
> Beside of this workaround, do you see any benefit of patch 2/6 from my series?
> 
> I don't want to introduce DT properties which are only useful for workarounds?

Does everything work fine if you don't set any parameters, and use my
patches from before? If so, and if you're willing to wait for the fix
to those patches then I don't see a need for it.

They would be useful beyond a workaround, if only for our internal
test platform, but we don't need it right away.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 6/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-18 19:34                                   ` John Youn
  0 siblings, 0 replies; 60+ messages in thread
From: John Youn @ 2016-08-18 19:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 8/18/2016 12:04 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 18. August 2016 um 20:03
>> geschrieben:
>>
>>
>> On 8/17/2016 3:17 PM, Stefan Wahren wrote:
>>> Hi John,
>>>
>>>> John Youn <John.Youn@synopsys.com> hat am 17. August 2016 um 23:21
>>>> geschrieben:
>>>>
>>>>
>>>> ...
>>>> Ok, yeah, that seems better.
>>>>
>>>> Can you check if applying just patch 2 and 3 solves the issue? If so I
>>>> think we can send those upstream.
>>>
>>> unfortunately not:
>>
>> Ok. I'll see if I can come up with a more conservative version of
>> patch 4 until I can look at it properly. I'll try to get to this
>> sometime next week but I may not be able to get to it until later.
> 
> Great
> 
>>
>> In the meantime, specifying the fifo sizes as you've done can serve as
>> a workaround.
> 
> Beside of this workaround, do you see any benefit of patch 2/6 from my series?
> 
> I don't want to introduce DT properties which are only useful for workarounds?

Does everything work fine if you don't set any parameters, and use my
patches from before? If so, and if you're willing to wait for the fix
to those patches then I don't see a need for it.

They would be useful beyond a workaround, if only for our internal
test platform, but we don't need it right away.

Regards,
John

^ permalink raw reply	[flat|nested] 60+ messages in thread

* Re: [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
  2016-08-18 18:57     ` Stefan Wahren
@ 2016-08-19  0:37       ` Eric Anholt
  -1 siblings, 0 replies; 60+ messages in thread
From: Eric Anholt @ 2016-08-19  0:37 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Mark Rutland, Felipe Balbi, Stephen Warren, John Youn,
	Greg Kroah-Hartman, linux-usb, devicetree, Rob Herring,
	linux-rpi-kernel, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1998 bytes --]

Stefan Wahren <stefan.wahren@i2se.com> writes:

> Hi Eric,
>
>> Eric Anholt <eric@anholt.net> hat am 18. August 2016 um 20:14 geschrieben:
>> 
>> 
>> Stefan Wahren <stefan.wahren@i2se.com> writes:
>> 
>> > This patch series is only a draft and not intended to be merged. Patches 1
>> > and 2
>> > aren't bcm2835 specific and should be helpful for other platforms. 
>> > The patches 2 - 4 are required for otg / gadget mode. The last patch
>> > based on the work of Lubomir Rintel [1] and Noralf Trønnes [2].
>> >
>> > Changes since V1:
>> > - rebase to current linux-next
>> > - add patches 1 - 4 for otg/gadget support
>> > - add patch 5 with model compatible
>> > - use polarity define for ACT LED
>> >
>> > [1] -
>> > http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
>> > [2] - https://github.com/raspberrypi/linux/pull/1239/
>> >
>> > Stefan Wahren (6):
>> >   usb: dwc2: core: Avoid nonsense error in gadget mode
>> >   usb: dwc2: Add DT properties to specify fifo size in host/otg mode
>> >   ARM: dts: bcm283x: Add missing usb clock
>> >   ARM: dts: bcm283x: Add generic USB PHY
>> >   DT: bindings: bcm: Add Raspberry Pi Zero
>> >   ARM: dts: bcm2835: Add Raspberry Pi Zero
>> 
>> Where are we at on these?  
>
> I would like to split the series:
> part 1: Raspberry Pi Zero support (only USB host mode support)
> part 2: OTG / Peripheral support for BCM2835 (hope that i reach the point)

That sounds great.

>> I've been holding off waiting for the USB
>> bits to get settled.  I can grab the bindings patch, but is there
>> anything else we could merge while you're working on USB?
>
> Maybe i missed something, but i didn't received any ACK from you about this
> series.
>
> In case everything is okay, you could also merge patch 3 since it's relevant to
> bcm283x and not RPi Zero specific.

Didn't miss anything.  I hadn't acked yet since it looked like there
were open questions for the USB folks.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 60+ messages in thread

* [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero
@ 2016-08-19  0:37       ` Eric Anholt
  0 siblings, 0 replies; 60+ messages in thread
From: Eric Anholt @ 2016-08-19  0:37 UTC (permalink / raw)
  To: linux-arm-kernel

Stefan Wahren <stefan.wahren@i2se.com> writes:

> Hi Eric,
>
>> Eric Anholt <eric@anholt.net> hat am 18. August 2016 um 20:14 geschrieben:
>> 
>> 
>> Stefan Wahren <stefan.wahren@i2se.com> writes:
>> 
>> > This patch series is only a draft and not intended to be merged. Patches 1
>> > and 2
>> > aren't bcm2835 specific and should be helpful for other platforms. 
>> > The patches 2 - 4 are required for otg / gadget mode. The last patch
>> > based on the work of Lubomir Rintel [1] and Noralf Tr?nnes [2].
>> >
>> > Changes since V1:
>> > - rebase to current linux-next
>> > - add patches 1 - 4 for otg/gadget support
>> > - add patch 5 with model compatible
>> > - use polarity define for ACT LED
>> >
>> > [1] -
>> > http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
>> > [2] - https://github.com/raspberrypi/linux/pull/1239/
>> >
>> > Stefan Wahren (6):
>> >   usb: dwc2: core: Avoid nonsense error in gadget mode
>> >   usb: dwc2: Add DT properties to specify fifo size in host/otg mode
>> >   ARM: dts: bcm283x: Add missing usb clock
>> >   ARM: dts: bcm283x: Add generic USB PHY
>> >   DT: bindings: bcm: Add Raspberry Pi Zero
>> >   ARM: dts: bcm2835: Add Raspberry Pi Zero
>> 
>> Where are we at on these?  
>
> I would like to split the series:
> part 1: Raspberry Pi Zero support (only USB host mode support)
> part 2: OTG / Peripheral support for BCM2835 (hope that i reach the point)

That sounds great.

>> I've been holding off waiting for the USB
>> bits to get settled.  I can grab the bindings patch, but is there
>> anything else we could merge while you're working on USB?
>
> Maybe i missed something, but i didn't received any ACK from you about this
> series.
>
> In case everything is okay, you could also merge patch 3 since it's relevant to
> bcm283x and not RPi Zero specific.

Didn't miss anything.  I hadn't acked yet since it looked like there
were open questions for the USB folks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160818/72d6d925/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2016-08-19  0:37 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 18:53 [PATCH V2 RFC 0/6] ARM: dts: bcm2835: Add Raspberry Pi Zero Stefan Wahren
2016-07-26 18:53 ` Stefan Wahren
     [not found] ` <1469559213-16160-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-07-26 18:53   ` [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode Stefan Wahren
2016-07-26 18:53     ` Stefan Wahren
2016-08-16  1:30     ` John Youn
2016-08-16  1:30       ` John Youn
2016-08-16 16:22       ` Eric Anholt
2016-08-16 16:22         ` Eric Anholt
2016-08-16 16:44       ` Stefan Wahren
2016-08-16 16:44         ` Stefan Wahren
     [not found]         ` <2008594325.331112.5842a41f-9d6d-4b55-baac-1529d6cae164.open-xchange-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
2016-08-16 19:20           ` John Youn
2016-08-16 19:20             ` John Youn
     [not found]             ` <69b9522a-ca23-cc32-ec90-8d59f63e4e03-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-08-16 20:09               ` Stefan Wahren
2016-08-16 20:09                 ` Stefan Wahren
2016-07-26 18:53   ` [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode Stefan Wahren
2016-07-26 18:53     ` Stefan Wahren
     [not found]     ` <1469559213-16160-3-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-07-29 21:12       ` Rob Herring
2016-07-29 21:12         ` Rob Herring
2016-08-18 18:12     ` John Youn
2016-08-18 18:12       ` John Youn
2016-07-26 18:53   ` [PATCH V2 RFC 3/6] ARM: dts: bcm283x: Add missing usb clock Stefan Wahren
2016-07-26 18:53     ` Stefan Wahren
2016-07-26 18:53   ` [PATCH V2 RFC 4/6] ARM: dts: bcm283x: Add generic USB PHY Stefan Wahren
2016-07-26 18:53     ` Stefan Wahren
2016-07-26 18:53   ` [PATCH V2 RFC 5/6] DT: bindings: bcm: Add Raspberry Pi Zero Stefan Wahren
2016-07-26 18:53     ` Stefan Wahren
     [not found]     ` <1469559213-16160-6-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-07-29 21:13       ` Rob Herring
2016-07-29 21:13         ` Rob Herring
2016-07-26 18:53   ` [PATCH V2 RFC 6/6] ARM: dts: bcm2835: " Stefan Wahren
2016-07-26 18:53     ` Stefan Wahren
     [not found]     ` <1469559213-16160-7-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-08-02 17:19       ` Stephen Warren
2016-08-02 17:19         ` Stephen Warren
2016-08-02 19:29         ` Stefan Wahren
2016-08-02 19:29           ` Stefan Wahren
     [not found]           ` <1427745143.15570.152fe5dd-527b-4ad6-b2fd-e4b0af6bc2a9.open-xchange-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
2016-08-02 20:56             ` Stephen Warren
2016-08-02 20:56               ` Stephen Warren
2016-08-16 19:30       ` John Youn
2016-08-16 19:30         ` John Youn
     [not found]         ` <722dafcb-2f67-88c7-69df-d442c56c058f-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-08-16 19:58           ` Stefan Wahren
2016-08-16 19:58             ` Stefan Wahren
     [not found]             ` <263309088.290419.51598113-17aa-4db0-9dc0-6e58e3fafe07.open-xchange-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
2016-08-16 22:07               ` John Youn
2016-08-16 22:07                 ` John Youn
     [not found]                 ` <ac20c0e9-0cab-7e3f-4abf-75223538a816-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-08-17 19:11                   ` Stefan Wahren
2016-08-17 19:11                     ` Stefan Wahren
     [not found]                     ` <1270178266.398560.152fe5dd-527b-4ad6-b2fd-e4b0af6bc2a9.open-xchange-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
2016-08-17 21:21                       ` John Youn
2016-08-17 21:21                         ` John Youn
     [not found]                         ` <badc3aa5-29ac-9b8c-2531-564c44b60030-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-08-17 22:17                           ` Stefan Wahren
2016-08-17 22:17                             ` Stefan Wahren
2016-08-18 18:03                             ` John Youn
2016-08-18 18:03                               ` John Youn
2016-08-18 19:04                               ` Stefan Wahren
2016-08-18 19:04                                 ` Stefan Wahren
2016-08-18 19:34                                 ` John Youn
2016-08-18 19:34                                   ` John Youn
2016-08-18 18:14 ` [PATCH V2 RFC 0/6] " Eric Anholt
2016-08-18 18:14   ` Eric Anholt
2016-08-18 18:57   ` Stefan Wahren
2016-08-18 18:57     ` Stefan Wahren
2016-08-19  0:37     ` Eric Anholt
2016-08-19  0:37       ` Eric Anholt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.