ARM: dts: bcm2835: Add Raspberry Pi Zero
Subsystems (6)
v2 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
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
Signature · 1 line
1.7.9.5
RFC PATCH v2 1/6 usb: dwc2: core: Avoid nonsense error in gadget mode
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
--- drivers/usb/dwc2/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/usb/dwc2/core.c +8 -2
@@ -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) {
Signature · 1 line
1.7.9.5
RFC PATCH v2 1/6 usb: dwc2: core: Avoid nonsense error in gadget mode
Quoted 7 lines · 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: Settinghost_nperio_tx_fifo_sizeto 0 dwc2 20980000.usb: 0 invalid forhost_perio_tx_fifo_size. dwc2 20980000.usb: Settinghost_perio_tx_fifo_sizeto 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
Quoted 35 lines
Signed-off-by Stefan Wahren <[email protected]>--- drivers/usb/dwc2/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/usb/dwc2/core.c +8
-2@@ -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) {
RFC PATCH v2 1/6 usb: dwc2: core: Avoid nonsense error in gadget mode
Quoted 9 lines · John Youn
Quoted 7 lines · 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: Settinghost_nperio_tx_fifo_sizeto 0 dwc2 20980000.usb: 0 invalid forhost_perio_tx_fifo_size. dwc2 20980000.usb: Settinghost_perio_tx_fifo_sizeto 0
Quoted 7 lines
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>
RFC PATCH v2 1/6 usb: dwc2: core: Avoid nonsense error in gadget mode
In reply to John YounHi John,
Quoted 13 lines
John Youn <[email protected]> hat am 16. August 2016 um 03:30 geschrieben:
Quoted 7 lines · 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: Settinghost_nperio_tx_fifo_sizeto 0 dwc2 20980000.usb: 0 invalid forhost_perio_tx_fifo_size. dwc2 20980000.usb: Settinghost_perio_tx_fifo_sizeto 0
Quoted 7 lines
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 Zerodr_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 Zerodr_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 Zerodr_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
RFC PATCH v2 1/6 usb: dwc2: core: Avoid nonsense error in gadget mode
Quoted 29 lines · Stefan Wahren
Hi John,
Quoted 13 lines
John Youn <[email protected]> hat am 16. August 2016 um 03:30 geschrieben:
Quoted 7 lines · 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: Settinghost_nperio_tx_fifo_sizeto 0 dwc2 20980000.usb: 0 invalid forhost_perio_tx_fifo_size. dwc2 20980000.usb: Settinghost_perio_tx_fifo_sizeto 0Quoted 7 lines
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_modeset in DT ( otg, host, peripherial ), i made 3 logs before this patch is applied:
...
Quoted 49 lines
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
Quoted 8 lines
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
RFC PATCH v2 1/6 usb: dwc2: core: Avoid nonsense error in gadget mode
Hi John,
Quoted 30 lines
John Youn <[email protected]> hat am 16. August 2016 um 21:20 geschrieben:
Quoted 3 lines · Stefan Wahren
Hi John,
Quoted 1 line
John Youn <[email protected]> hat am 16. August 2016 um 03:30
...
Quoted 7 lines
[ 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 4096Quoted 8 lines
[ 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 0Thanks 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.
Quoted 8 lines
*
hw_params->host_nperio_tx_fifo_size
*hw_params->host_perio_tx_fifo_sizeThus when it goes to set the
core_paramsbased on thehw_paramsyou 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
RFC PATCH v2 2/6 usb: dwc2: Add DT properties to specify fifo size in host/otg mode
In reply to Stefan WahrenCurrently 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.
--- Documentation/devicetree/bindings/usb/dwc2.txt | 3 +++ drivers/usb/dwc2/core.c | 25 ++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/usb/dwc2.txt +3 -0
@@ -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:
drivers/usb/dwc2/core.c +19 -6
@@ -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); }/*
Signature · 1 line
1.7.9.5
Rob Herring
maintainerRFC PATCH v2 2/6 usb: dwc2: Add DT properties to specify fifo size in host/otg mode
Quoted 7 lines · 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: Settinghost_nperio_tx_fifo_sizeto 32
Quoted 6 lines
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 <[email protected]>--- Documentation/devicetree/bindings/usb/dwc2.txt | 3 +++
Quoted 2 lines
drivers/usb/dwc2/core.c | 25 ++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-)
RFC PATCH v2 2/6 usb: dwc2: Add DT properties to specify fifo size in host/otg mode
In reply to Stefan WahrenQuoted 78 lines · 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: Settinghost_nperio_tx_fifo_sizeto 32So 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 <[email protected]>--- Documentation/devicetree/bindings/usb/dwc2.txt | 3 +++ drivers/usb/dwc2/core.c | 25 ++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-)Documentation/devicetree/bindings/usb/dwc2.txt +3
-0@@ -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:drivers/usb/dwc2/core.c +12
-6@@ -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))
drivers/usb/dwc2/core.c void dwc2_set_parameters(struct dwc2_hsotg *hsotg, · line 1347
Quoted 10 lines
drivers/usb/dwc2/core.c +7
-0+ 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
RFC PATCH v2 3/6 ARM: dts: bcm283x: Add missing usb clock
In reply to Stefan WahrenAccording 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.
--- arch/arm/boot/dts/bcm283x.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/bcm283x.dtsi +9 -0
@@ -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>; + }; }; };
Signature · 1 line
1.7.9.5
RFC PATCH v2 4/6 ARM: dts: bcm283x: Add generic USB PHY
In reply to Stefan WahrenIn 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.
--- arch/arm/boot/dts/bcm283x.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/bcm283x.dtsi +6 -0
@@ -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 {
Signature · 1 line
1.7.9.5
RFC PATCH v2 5/6 DT: bindings: bcm: Add Raspberry Pi Zero
In reply to Stefan Wahren--- .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt +4 -0
@@ -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";
Signature · 1 line
1.7.9.5
Rob Herring
maintainerRFC PATCH v2 5/6 DT: bindings: bcm: Add Raspberry Pi Zero
Quoted 4 lines · Stefan Wahren
Signed-off-by Stefan Wahren <[email protected]>--- .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++ 1 file changed, 4 insertions(+)
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
In reply to Stefan WahrenThe Raspberry Pi Zero is a minified version of model A+. It's notable there is no PWR LED and the ACT LED is inverted.
--- 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
arch/arm/boot/dts/Makefile +2 -1
@@ -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 \
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
1.7.9.5
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 2 lines · 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.
Patches 3-6,
arch/arm/boot/dts/bcm2835-rpi-zero.dts
Quoted 1 line
arch/arm/boot/dts/bcm2835-rpi-zero.dts +0
-0
The following comment format is a bit strange, but I'm not sure there's anything objectively better...
Quoted 27 lines
+&usb {
arch/arm/boot/dts/bcm2835-rpi-zero.dts +26
-0+ 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>; + */ +};
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Hi Stephen,
Quoted 8 lines
Stephen Warren <[email protected]> hat am 2. August 2016 um 19:19 geschrieben:
Quoted 2 lines · 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.
Quoted 8 lines
Patches 3-6,
Acked-by Stephen Warren <[email protected]>arch/arm/boot/dts/bcm2835-rpi-zero.dts
Quoted 2 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts +0
-0The 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=yCONFIG_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
Quoted 29 lines
Quoted 28 lines
+&usb {
arch/arm/boot/dts/bcm2835-rpi-zero.dts +26
-0+ 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>; + */ +};
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 28 lines · Stefan Wahren
Hi Stephen,
Quoted 8 lines
Stephen Warren <[email protected]> hat am 2. August 2016 um 19:19 geschrieben:
Quoted 2 lines · 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.
Quoted 8 lines
Patches 3-6,
Acked-by Stephen Warren <[email protected]>arch/arm/boot/dts/bcm2835-rpi-zero.dts
Quoted 2 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts +0
-0The 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_modewith minimum effort. I see 2 alternative solutions:
a) add differentdr_modeexamples to the dwc2 => doesn't work for all
platforms
b) add comments todrivers/usb/dwc2/platform.c=> harder to findAt the end the solution here is already obsolete. This patch series doesn't contain an update for the
bcm2835_defconfigwhich should set the following:
Quoted 7 lines
CONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yAfter enabling these options another issue is revealed. Currently the
dr_modefor all the other bcm283x boards isn't defined, which means "otg" instead of intended "host". But the dwc2 driver ignores this as long asCONFIG_USB_GADGETis not defined. So we need to define thedr_modefor 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?
Quoted 3 lines
In
order to avoid such massive copy & paste, we better define 3 dtsi files for eachdr_mode.
3 DT files, with an appropriate one of those included in each RPi DT, sounds reasonable.
Quoted 2 lines
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.
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
In reply to Stefan WahrenQuoted 41 lines · 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 <[email protected]>--- 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.dtsarch/arm/boot/dts/Makefile +2
-1@@ -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 \arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +11
-0@@ -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>;
arch/arm/boot/dts/bcm2835-rpi-zero.dts line 21
Quoted 10 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +10
-0+ }; + }; +}; + + +&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.
arch/arm/boot/dts/bcm2835-rpi-zero.dts line 28
Quoted 7 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +7
-0+/* + * 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.
arch/arm/boot/dts/bcm2835-rpi-zero.dts line 38
Quoted 10 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +10
-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>;
You should be able to omit the host params if dr_mode == peripheral.
arch/arm/boot/dts/bcm2835-rpi-zero.dts line 43
Quoted 5 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +5
-0+ g-np-tx-fifo-size = <16>; + g-rx-fifo-size = <256>; + g-tx-fifo-size = <256 128 128 64 64 64 32>; + */ +};
Regards,
John
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Hi John,
Quoted 6 lines
John Youn <[email protected]> hat am 16. August 2016 um 21:30 geschrieben:
On 7/26/2016 11:54 AM, Stefan Wahren wrote:
...
Quoted 10 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts line 28
Quoted 7 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +7
-0+/* + * 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?
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 19 lines · Stefan Wahren
Hi John,
Quoted 6 lines
John Youn <[email protected]> hat am 16. August 2016 um 21:30 geschrieben:
On 7/26/2016 11:54 AM, Stefan Wahren wrote:
...Quoted 10 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts line 28
Quoted 7 lines
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +7
-0+/* + * 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.
Quoted 5 lines
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
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Hi,
Quoted 21 lines
John Youn <[email protected]> hat am 17. August 2016 um 00:07 geschrieben:
Quoted 9 lines · Stefan Wahren
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.
Quoted 7 lines
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 0x00001d20RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 83 lines · Stefan Wahren
Hi,
Quoted 21 lines
John Youn <[email protected]> hat am 17. August 2016 um 00:07 geschrieben:
Quoted 9 lines · Stefan Wahren
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.Quoted 7 lines
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
Quoted 9 lines
[ 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
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Hi John,
Quoted 9 lines
John Youn <[email protected]> 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
Quoted 3 lines
Regards,
John
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 6 lines · Stefan Wahren
Hi John,
Quoted 4 lines
John Youn <[email protected]> hat am 17. August 2016 um 23:21 geschrieben:
Quoted 7 lines
Quoted 5 lines
...
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
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Hi John,
Quoted 14 lines
John Youn <[email protected]> hat am 18. August 2016 um 20:03 geschrieben:
Quoted 9 lines · Stefan Wahren
Hi John,
Quoted 7 lines
John Youn <[email protected]> hat am 17. August 2016 um 23:21 geschrieben:
...
Ok, yeah, that seems better.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
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
Quoted 3 lines
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
Quoted 8 lines
Regards,
John_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
RFC PATCH v2 6/6 ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 28 lines · Stefan Wahren
Hi John,
Quoted 14 lines
John Youn <[email protected]> hat am 18. August 2016 um 20:03 geschrieben:
Quoted 9 lines · Stefan Wahren
Hi John,
Quoted 7 lines
John Youn <[email protected]> hat am 17. August 2016 um 23:21 geschrieben:
...
Ok, yeah, that seems better.Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
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
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
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
v2 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
In reply to Stefan WahrenQuoted 14 lines · 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/
Quoted 7 lines
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>
v2 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
Hi Eric,
Quoted 29 lines
Eric Anholt <[email protected]> hat am 18. August 2016 um 20:14 geschrieben:
Quoted 16 lines · 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/Quoted 7 lines
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
Quoted 1 line
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)
Quoted 3 lines
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
v2 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
Quoted 31 lines · Stefan Wahren
Hi Eric,
Quoted 29 lines
Eric Anholt <[email protected]> hat am 18. August 2016 um 20:14 geschrieben:
Quoted 23 lines · 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
Quoted 5 lines
Quoted 1 line
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.
Quoted 9 lines
Quoted 3 lines
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>