acrn-kernel/drivers/usb/typec
Fabrice Gasnier 2d945194cc usb: typec: ucsi: stm32g0: add bootloader support
STM32G0 comes with STM32 bootloader in its system memory. Add support
for some I2C bootloader commands as described in application notes
AN2606 and AN4221, to enable STM32G0 UCSI firmware update.

Upon probing, the driver needs to know the STM32G0 state:
- In bootloader mode, STM32 G0 answers at i2c addr 0x51.
- In running mode, STM32 G0 firmware may answer at two address.
  - The main address specified in DT is used for UCSI.
  - 0x51 addr can be re-used for FW controls like getting software version
    or jump to booloader request.

So probe using the main firmware i2c address first, before attempting
bootloader address (e.g. check for blank, erased or previously aborted
firmware update).

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20220713120842.560902-4-fabrice.gasnier@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-27 14:39:11 +02:00
..
altmodes
mux
tcpm usb/typec/tcpm: fix repeated words in comments 2022-07-27 14:34:23 +02:00
tipd
ucsi usb: typec: ucsi: stm32g0: add bootloader support 2022-07-27 14:39:11 +02:00
Kconfig usb: typec: anx7411: Add Analogix PD ANX7411 support 2022-07-14 16:10:57 +02:00
Makefile usb: typec: Add support for retimers 2022-07-14 16:24:05 +02:00
anx7411.c usb: typec: anx7411: fix passing zero to 'PTR_ERR' 2022-07-27 14:28:07 +02:00
bus.c
bus.h
class.c Merge 5.19-rc7 into usb-next 2022-07-18 22:41:42 +02:00
class.h usb: typec: Add retimer handle to port 2022-07-14 16:24:05 +02:00
hd3ss3220.c
mux.c usb: typec: mux: Allow muxes to specify mode-switch 2022-06-21 16:37:56 +02:00
mux.h
pd.c usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
port-mapper.c
qcom-pmic-typec.c
retimer.c usb: typec: retimer: Add missing id check in match callback 2022-07-27 14:37:26 +02:00
retimer.h usb: typec: Add support for retimers 2022-07-14 16:24:05 +02:00
rt1719.c
stusb160x.c
wusb3801.c