usb: dfu: am335x: allow dfu in fullspeed mode only
v2 cover usb: dfu: am335x: allow dfu in fullspeed mode only
This patchserie allows fullspeed for DFU, and configures the siemens boards to use fullspeed only.
- changes for v2:
- get rid of config option CONFIG_DFU_FULLSPEED as Bin Liu suggested.
Heiko Schocher (2):
usb: dfu: add fullspeed support for DFU
arm: am335x: siemens board use in DFU mode fullspeed only
drivers/usb/gadget/f_dfu.c | 3 +++ include/configs/siemens-am33x-common.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1
PATCH v2 1/2 usb: dfu: add fullspeed support for DFU
DFU now can use also fullspeed.
---
- changes for v2:
- get rid of config option CONFIG_DFU_FULLSPEED as Bin Liu suggested.
--- drivers/usb/gadget/f_dfu.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/gadget/f_dfu.c +3 -0
@@ -238,6 +238,7 @@ static inline void to_dfu_mode(struct f_dfu *f_dfu) { f_dfu->usb_function.strings = dfu_strings; f_dfu->usb_function.hs_descriptors = f_dfu->function; + f_dfu->usb_function.descriptors = f_dfu->function; f_dfu->dfu_state = DFU_STATE_dfuIDLE; }
@@ -245,6 +246,7 @@ static inline void to_runtime_mode(struct f_dfu *f_dfu) { f_dfu->usb_function.strings =NULL ; f_dfu->usb_function.hs_descriptors = dfu_runtime_descs; + f_dfu->usb_function.descriptors = dfu_runtime_descs; }static int handle_upload (struct usb_request *req,u16 len)
@@ -809,6 +811,7 @@ static int dfu_bind_config(struct usb_configuration *c)return -ENOMEM ; f_dfu->usb_function.name ="dfu" ; f_dfu->usb_function.hs_descriptors = dfu_runtime_descs; + f_dfu->usb_function.descriptors = dfu_runtime_descs; f_dfu->usb_function.bind = dfu_bind; f_dfu->usb_function.unbind = dfu_unbind; f_dfu->usb_function.set_alt = dfu_set_alt;
Signature · 1 line
1.8.3.1
PATCH v2 1/2 usb: dfu: add fullspeed support for DFU
Heiko,
Quoted 7 lines · Heiko Schocher
DFU now can use also fullspeed.
Signed-off-by Heiko Schocher <[email protected]>Cc Tom Rini <[email protected]>Cc Lukasz Majewski <[email protected]>Cc Marek Vasut <[email protected]>Cc Liu Bin <[email protected]>
My first name is Bin.
Other than that, feel free to add
Reviewed by: Bin Liu <[email protected]>
Regards,
-Bin.
Quoted 40 lines
Cc Lukas Stockmann <[email protected]>---
- changes for v2:
- get rid of config optionCONFIG_DFU_FULLSPEEDas Bin Liu suggested.--- drivers/usb/gadget/f_dfu.c | 3 +++ 1 file changed, 3 insertions(+)drivers/usb/gadget/f_dfu.c +3
-0@@ -238,6 +238,7 @@ static inline void to_dfu_mode(struct f_dfu *f_dfu) { f_dfu->usb_function.strings = dfu_strings; f_dfu->usb_function.hs_descriptors = f_dfu->function; + f_dfu->usb_function.descriptors = f_dfu->function; f_dfu->dfu_state = DFU_STATE_dfuIDLE; }@@ -245,6 +246,7 @@ static inline void to_runtime_mode(struct f_dfu *f_dfu) { f_dfu->usb_function.strings =NULL ; f_dfu->usb_function.hs_descriptors = dfu_runtime_descs; + f_dfu->usb_function.descriptors = dfu_runtime_descs; }static int handle_upload (struct usb_request *req,u16 len)@@ -809,6 +811,7 @@ static int dfu_bind_config(struct usb_configuration *c)return -ENOMEM ; f_dfu->usb_function.name ="dfu" ; f_dfu->usb_function.hs_descriptors = dfu_runtime_descs; + f_dfu->usb_function.descriptors = dfu_runtime_descs; f_dfu->usb_function.bind = dfu_bind; f_dfu->usb_function.unbind = dfu_unbind; f_dfu->usb_function.set_alt = dfu_set_alt;
PATCH v2 1/2 usb: dfu: add fullspeed support for DFU
In reply to Heiko SchocherHi Heiko,
Quoted 39 lines
DFU now can use also fullspeed.
Signed-off-by Heiko Schocher <[email protected]>Cc Tom Rini <[email protected]>Cc Lukasz Majewski <[email protected]>Cc Marek Vasut <[email protected]>Cc Liu Bin <[email protected]>Cc Lukas Stockmann <[email protected]>---
- changes for v2:
- get rid of config optionCONFIG_DFU_FULLSPEEDas Bin Liu suggested.--- drivers/usb/gadget/f_dfu.c | 3 +++ 1 file changed, 3 insertions(+)drivers/usb/gadget/f_dfu.c +2
-0@@ -238,6 +238,7 @@ static inline void to_dfu_mode(struct f_dfu *f_dfu) { f_dfu->usb_function.strings = dfu_strings; f_dfu->usb_function.hs_descriptors = f_dfu->function; + f_dfu->usb_function.descriptors = f_dfu->function; f_dfu->dfu_state = DFU_STATE_dfuIDLE; }@@ -245,6 +246,7 @@ static inline void to_runtime_mode(struct f_dfu *f_dfu) { f_dfu->usb_function.strings =NULL ; f_dfu->usb_function.hs_descriptors = dfu_runtime_descs; + f_dfu->usb_function.descriptors = dfu_runtime_descs; }static int handle_upload (struct usb_request *req,u16 len)
drivers/usb/gadget/f_dfu.c static int dfu_bind_config(struct · line 817
Quoted 7 lines
drivers/usb/gadget/f_dfu.c +1
-0@@ -809,6 +811,7 @@ static int dfu_bind_config(struct usb_configuration *c) return -ENOMEM; f_dfu->usb_function.name ="dfu" ; f_dfu->usb_function.hs_descriptors = dfu_runtime_descs; + f_dfu->usb_function.descriptors = dfu_runtime_descs; f_dfu->usb_function.bind = dfu_bind; f_dfu->usb_function.unbind = dfu_unbind; f_dfu->usb_function.set_alt = dfu_set_alt;
Test HW: Exynos 4412 - Trats2
This patch seems to not introduce any regressions, so
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH v2 1/2 usb: dfu: add fullspeed support for DFU
In reply to Heiko SchocherHi Heiko,
Quoted 1 line
DFU now can use also fullspeed.
Applied to u-boot-dfu
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH v2 2/2 arm: am335x: siemens board use in DFU mode fullspeed only
In reply to Heiko SchocherSiemens boards are now using DFU in fullspeed only. For this CONFIG_USB_GADGET_DUALSPEED is undefined.
---
On the siemens board this is needed because of a protection circuit. The device is 24V AC powered, if someone uses a non galvanically isolated transformer and misswires it, it could burn down the USB host. That's why we have a protection on the USB side which limits the speed to 12Mbit/sec.
- changes for v2:
- get rid of config option CONFIG_DFU_FULLSPEED as Bin Liu suggested.
--- include/configs/siemens-am33x-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/siemens-am33x-common.h +1 -1
@@ -233,7 +233,7 @@#define CONFIG_MUSB_GADGET #define CONFIG_MUSB_PIO_ONLY #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT -#define CONFIG_USB_GADGET_DUALSPEED +#undef CONFIG_USB_GADGET_DUALSPEED#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_MUSB_HOST
Signature · 1 line
1.8.3.1
PATCH v2 2/2 arm: am335x: siemens board use in DFU mode fullspeed only
Hi Heiko,
Quoted 2 lines
Siemens boards are now using DFU in fullspeed only. For this
CONFIG_USB_GADGET_DUALSPEEDis undefined.
Applied to u-boot-dfu
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group