aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/usbotg.c
Commit message (Collapse)AuthorAgeFilesLines
* stm32: add STM32H723 supportbigtreetech2022-12-021-14/+24
| | | | | Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add USBOTG support to stm32h7adelyser2021-11-211-17/+36
| | | | | Signed-off-by: Aaron DeLyser <bluwolf@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Wait for setup complete to enable ep0 rx in usbotg.cArksine2020-05-031-4/+11
| | | | | | | | Endpoint 0 OUT needs to NAK everything until the core signals that the setup stage is complete. Signed-off-by: Eric Callahan <arksine.code@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Wait for setup complete notification in usbotg.cKevin O'Connor2020-05-031-6/+13
| | | | | | | | A setup packet is only valid after receiving the "setup complete" notification. Signed-off-by: Eric Callahan <arksine.code@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Move usb_request_bootloader() to chip specific codeKevin O'Connor2019-09-181-5/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Disable usb irqs in usbotg handlersKevin O'Connor2019-09-121-17/+56
| | | | | | | | It appears the usbotg controller can get confused if the usb irq handler runs while processing a usb request. Disable usb irqs during usb processing to avoid this. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Rework usbotg transmit interruptsKevin O'Connor2019-09-081-7/+10
| | | | | | | | Use the XFRC interrupt instead of TXFE. Don't mask/unmask the tx interrupts during runtime. This fixes some race conditions where a tx notification may have previously gotten lost. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Work around stm32f407 usbotg chip errataKevin O'Connor2019-08-311-3/+10
| | | | | | | It appears bogus entries can get placed on the rxqueue - detect and clear them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Configure and enable usbotg endpoint0 during setupKevin O'Connor2019-08-301-25/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Disable and flush usbotg bulk transmit pipe on usb_set_configure()Kevin O'Connor2019-08-301-19/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Perform usbotg endpoint init during usb_set_configure()Kevin O'Connor2019-08-301-26/+26
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Discard usbotg tx data until usb is readyKevin O'Connor2019-08-301-2/+2
| | | | | | If the usb interface is not ready, just discard messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: No need to clear the usbotg address on resetKevin O'Connor2019-08-301-4/+2
| | | | | | The controller automatically clears the address. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Enable usbotg bulk reads during endpoint configurationKevin O'Connor2019-08-301-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Update code to use armcm_boot mechanismKevin O'Connor2019-08-221-3/+3
| | | | | | | Replace the stm32 provided assembler with the src/generic/armcm_boot.c mechanism. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Move irq handler code above irq setupKevin O'Connor2019-08-221-42/+42
| | | | | | Only code movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify usbotg packet reading and writingKevin O'Connor2019-08-161-57/+54
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Initial support for USB On-The-Go (OTG) driver on stm32f4Kevin O'Connor2019-08-151-0/+401
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>