linux/drivers/usb/typec
Luca Weiss cf07c55f99 usb: typec: fsa4480: Add support to swap SBU orientation
On some hardware designs the AUX+/- lanes are connected reversed to
SBU1/2 compared to the expected design by FSA4480.

Made more complicated, the otherwise compatible Orient-Chip OCP96011
expects the lanes to be connected reversed compared to FSA4480.

* FSA4480 block diagram shows AUX+ connected to SBU2 and AUX- to SBU1.
* OCP96011 block diagram shows AUX+ connected to SBU1 and AUX- to SBU2.

So if OCP96011 is used as drop-in for FSA4480 then the orientation
handling in the driver needs to be reversed to match the expectation of
the OCP96011 hardware.

Support parsing the data-lanes parameter in the endpoint node to swap
this in the driver.

The parse_data_lanes_mapping function is mostly taken from nb7vpq904m.c.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20231020-fsa4480-swap-v2-2-9a7f9bb59873@fairphone.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-27 12:54:29 +02:00
..
altmodes Merge 6.6-rc6 into usb-next 2023-10-16 17:36:12 +02:00
mux usb: typec: fsa4480: Add support to swap SBU orientation 2023-10-27 12:54:29 +02:00
tcpm usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm() 2023-10-27 12:53:09 +02:00
tipd USB: typec: tps6598x: Add status trace for tps25750 2023-10-10 09:02:07 +02:00
ucsi Merge 6.6-rc6 into usb-next 2023-10-16 17:36:12 +02:00
anx7411.c usb: typec: drop check because i2c_unregister_device() is NULL safe 2023-10-02 13:56:37 +02:00
bus.c usb: typec: bus: verify partner exists in typec_altmode_attention 2023-08-22 14:44:28 +02:00
bus.h USB: mark all struct bus_type as const 2023-03-23 13:22:00 +01:00
class.c usb: typec: Link enumerated USB devices with Type-C partner 2023-10-16 20:02:36 +02:00
class.h usb: typec: Link enumerated USB devices with Type-C partner 2023-10-16 20:02:36 +02:00
hd3ss3220.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
Kconfig usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
Makefile usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
mux.c usb: typec: mux: Remove alt mode parameters from the API 2023-05-29 15:17:52 +01:00
mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
pd.c usb: pd: Exposing the Peak Current value of Fixed Supplies to user space 2023-10-02 16:38:29 +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 usb: typec: Link enumerated USB devices with Type-C partner 2023-10-16 20:02:36 +02:00
retimer.c drivers: remove struct module * setting from struct class 2023-03-17 15:16:27 +01:00
retimer.h usb: typec: Make bus switch code retimer-aware 2023-01-17 17:29:00 +01:00
rt1719.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
stusb160x.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
wusb3801.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00