mbox series

[0/2] usb: typec: tipd: Fixes for Apple M1 (CD321X) support

Message ID 20211117151450.207168-1-marcan@marcan.st (mailing list archive)
Headers show
Series usb: typec: tipd: Fixes for Apple M1 (CD321X) support | expand

Message

Hector Martin Nov. 17, 2021, 3:14 p.m. UTC
Hi folks,

These two fixes make tipd work properly on Apple M1 devices, in
particular in the case where the bootloader hasn't initialized
the controllers yet.

We normally do it in m1n1 (so the machine can charge and so bootloaders
get working USB without needing this driver), but that was causing this
codepath to never get properly exercised, so we never caught it. I
noticed on the new machines with 3+1 ports, since m1n1 was only
initializing 2 and the other 2 were failing to initialize.

Hector Martin (2):
  usb: typec: tipd: Fix typo in cd321x_switch_power_state
  usb: typec: tipd: Fix initialization sequence for cd321x

 drivers/usb/typec/tipd/core.c | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

Comments

Sven Peter Nov. 17, 2021, 6:19 p.m. UTC | #1
On Wed, Nov 17, 2021, at 16:14, Hector Martin wrote:
> Hi folks,
>
> These two fixes make tipd work properly on Apple M1 devices, in
> particular in the case where the bootloader hasn't initialized
> the controllers yet.
>
> We normally do it in m1n1 (so the machine can charge and so bootloaders
> get working USB without needing this driver), but that was causing this
> codepath to never get properly exercised, so we never caught it. I

My boot process usually is iBoot -> m1n1 on nvme -> m1n1 chainloaded over usb.
I thought I exercised this path by turning off the init in m1n1. I didn't take
into account that this would only affect the one loaded over usb and that
the one on nvme would still intitialize everything.
Thanks for fixing this!

With the Fixes tags feel free to add

Reviewed-by: Sven Peter <sven@svenpeter.dev>

to both patches.

Sven