usb: max3420: add the gadget driver
PATCH 1/1 usb: max3420: add the gadget driver
From: Jassi Brar <[email protected]>
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
--- drivers/usb/gadget/Kconfig | 6 + drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/gadget_chips.h | 8 + drivers/usb/gadget/max3420_udc.c | 876 ++++++++++++++++++++++++++++++ 4 files changed, 891 insertions(+) create mode 100644 drivers/usb/gadget/max3420_udc.c
drivers/usb/gadget/Kconfig +6 -0
@@ -105,6 +105,12 @@ config CI_UDC Say Y here to enable device controller functionality of the ChipIdea driver. +config USB_GADGET_MAX3420 + bool "MAX3420 USB Over SPI" + depends on DM_SPI + help + MAX3420, from MAXIM, implements USB-over-SPI Full-Speed device controller. + config USB_GADGET_VBUS_DRAW int "Maximum VBUS Power usage (2-500 mA)" range 2 500
drivers/usb/gadget/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o +obj-$(CONFIG_USB_GADGET_MAX3420) += max3420_udc.o obj-$(CONFIG_CI_UDC) += ci_udc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
drivers/usb/gadget/gadget_chips.h +8 -0
@@ -155,6 +155,12 @@#define gadget_is_cdns3 (g) 0#endif +#ifdef CONFIG_USB_GADGET_MAX3420 +#define gadget_is_max3420 (g) (!strcmp("max3420-udc", (g)->name)) +#else +#define gadget_is_max3420 (g) 0 +#endif +/** * usb_gadget_controller_number - support bcdDevice id convention * @gadget: the controller being driven
@@ -216,5 +222,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)return 0x23 ; else if (gadget_is_cdns3(gadget)) return 0x24; + else if (gadget_is_max3420(gadget)) + return 0x25;return -ENOENT ; }
drivers/usb/gadget/max3420_udc.c new file +875 -0
875 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 1/1 usb: max3420: add the gadget driver
Quoted 7 lines · On Sun, Mar 29, 2020 at 7:47 PM <[email protected]> wrote:
From: Jassi Brar <[email protected]>
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
A polite reminder please
Thanks.
PATCH 1/1 usb: max3420: add the gadget driver
Am April 11, 2020 11:47:06 PM UTC schrieb Jassi Brar <[email protected]>:
Quoted 9 lines · On Sun, Mar 29, 2020 at 7:47 PM <[email protected]> wrote:
Quoted 7 lines
From: Jassi Brar <[email protected]>
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
A polite reminder please
We have scripts/get_maintainer.pl to identify to whom patches should be addressed. The USB maintainer is Marek.
Quoted 2 lines
Thanks.
PATCH 1/1 usb: max3420: add the gadget driver
Quoted 5 lines · Heinrich Schuchardt
Am April 11, 2020 11:47:06 PM UTC schrieb Jassi Brar <[email protected]>:
Quoted 4 lines · On Sun, Mar 29, 2020 at 7:47 PM <[email protected]> wrote:
Quoted 3 lines
From: Jassi Brar <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
A polite reminder please
We have
scripts/get_maintainer.plto identify to whom patches should be addressed. The USB maintainer is Marek.
USB gadget maintainer is Lukasz, so CC him.
PATCH 1/1 usb: max3420: add the gadget driver
Quoted 11 lines · Marek Vasut
Quoted 9 lines · Heinrich Schuchardt
Am April 11, 2020 11:47:06 PM UTC schrieb Jassi Brar <[email protected]>:
Quoted 8 lines · On Sun, Mar 29, 2020 at 7:47 PM <[email protected]> wrote:
Quoted 7 lines
From: Jassi Brar <[email protected]>
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
A polite reminder please
We have
scripts/get_maintainer.plto identify to whom patches should be addressed. The USB maintainer is Marek.USB gadget maintainer is Lukasz, so CC him.
He is already. Infact only he was CCed originally, but after two weeks that started to seem like too short a cc list :) Maybe the patchset needs to bake a little more still. I will wait.
Cheers!
PATCH 1/1 usb: max3420: add the gadget driver
Hi Marek, Hi Lukasz,
Quoted 15 lines · Jassi Brar
Quoted 13 lines · Marek Vasut
Quoted 11 lines · Heinrich Schuchardt
Am April 11, 2020 11:47:06 PM UTC schrieb Jassi Brar <[email protected]>:
Quoted 9 lines · On Sun, Mar 29, 2020 at 7:47 PM <[email protected]> wrote:
Quoted 7 lines
From: Jassi Brar <[email protected]>
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
A polite reminder please
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
We have
scripts/get_maintainer.plto identify to whom patches should be addressed. The USB maintainer is Marek.USB gadget maintainer is Lukasz, so CC him.
He is already. Infact only he was CCed originally, but after two weeks that started to seem like too short a cc list :) Maybe the patchset needs to bake a little more still. I will wait.
Ping ... if you want anything changed, I'll be happy to do it.
thanks.
PATCH 1/1 usb: max3420: add the gadget driver
Quoted 1 line · Jassi Brar
Hi Marek, Hi Lukasz,
Hi,
Quoted 18 lines · Jassi Brar
Quoted 17 lines · Marek Vasut
Quoted 15 lines · Heinrich Schuchardt
Quoted 12 lines
Am April 11, 2020 11:47:06 PM UTC schrieb Jassi Brar <[email protected]>:
Quoted 9 lines · On Sun, Mar 29, 2020 at 7:47 PM <[email protected]> wrote:
Quoted 7 lines
From: Jassi Brar <[email protected]>
MAX3420 implements FullSpeed USB Device over SPI. Another version MAX3421, also implements USB Host mode. This driver should be good for the device mode of max3421 as well.
A polite reminder please
We have
scripts/get_maintainer.plto identify to whom patches should be addressed. The USB maintainer is Marek.
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
USB gadget maintainer is Lukasz, so CC him.
He is already. Infact only he was CCed originally, but after two weeks that started to seem like too short a cc list :) Maybe the patchset needs to bake a little more still. I will wait.
Ping ... if you want anything changed, I'll be happy to do it.
I managed to talk to Lukasz yesterday, he said he is busy until Monday. So please give it one more week.