linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT PATCH 0/9] usb: typec: tipd: Add Apple M1 support
@ 2021-09-18 12:09 Sven Peter
  2021-09-18 12:09 ` [RFT PATCH 1/9] dt-bindings: usb: tps6598x: Add Apple CD321x compatible Sven Peter
                   ` (9 more replies)
  0 siblings, 10 replies; 31+ messages in thread
From: Sven Peter @ 2021-09-18 12:09 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: Sven Peter, Greg Kroah-Hartman, Guido Günther,
	Bryan O'Donoghue, linux-usb, linux-kernel, Hector Martin,
	Mohamed Mediouni, Stan Skowronek, Mark Kettenis, Alexander Graf,
	Alyssa Rosenzweig

Hi,

This series adds initial support for the Apple CD3217/3218 chip which is also
known as Apple ACE1/2. These chips are used on Apple M1 machines.
They are based on the TI TPS6598x chips with a few differences:

	- The interrupt numbers have been changed
	- The secondary i2c bus and its interrupt controller are connected to the
	  system management controller and must not be disturbed
	- The chip comes up in a low power state and must be booted using the
	  "SPSS" (System Power State Switch maybe) command which is not
	  documented in the TI manual
	- The interrupt mask must be set up explicitely

The first patches prepare for adding support and introduce almost no
functional changes to the driver. Only the interrupt mask is set up for
those as well since I think that makes sense either way.
Then the last patches enable the different behavior required for the Apple
chip selected by a new compatible in the device tree.

I'm only able to test this on my M1 and would appreciate if someone could
confirm this does not break the regular TPS chips. I'm also interested to
see if the normal chips also support the "SPSS" command.

Testing this on the M1 additionaly requires a pinctrl/gpio and a i2c driver
which are not ready to be submitted upstream yet. I've collected the current
work-in-progress state in a branch at [1] though if anyone wants to give
those a try.


Best,


Sven


[1] https://github.com/AsahiLinux/linux/tree/sven/i2c-tipd-WIP

Sven Peter (9):
  dt-bindings: usb: tps6598x: Add Apple CD321x compatible
  usb: typec: tipd: Prepare supporting different variants
  usb: typec: tipd: Allow irq controller selection
  usb: typec: tipd: Add short-circuit for no irqs
  usb: typec: tipd: Allow to configure irq bits
  usb: typec: tipd: Setup IntMask explicitly
  usb: typec: tipd: Add support for apple,cd321x
  usb: typec: tipd: Switch power state to S0 for Apple variant
  usb: typec: tipd: Remove FIXME about testing with I2C_FUNC_I2C

 .../devicetree/bindings/usb/ti,tps6598x.yaml  |   4 +
 drivers/usb/typec/tipd/core.c                 | 140 ++++++++++++++++--
 drivers/usb/typec/tipd/tps6598x.h             |  12 ++
 drivers/usb/typec/tipd/trace.h                |  27 ++++
 4 files changed, 168 insertions(+), 15 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-09-22 20:38 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 12:09 [RFT PATCH 0/9] usb: typec: tipd: Add Apple M1 support Sven Peter
2021-09-18 12:09 ` [RFT PATCH 1/9] dt-bindings: usb: tps6598x: Add Apple CD321x compatible Sven Peter
2021-09-19 11:25   ` Alyssa Rosenzweig
2021-09-22 20:38   ` Rob Herring
2021-09-18 12:09 ` [RFT PATCH 2/9] usb: typec: tipd: Prepare supporting different variants Sven Peter
2021-09-19 11:27   ` Alyssa Rosenzweig
2021-09-21 13:10   ` Heikki Krogerus
2021-09-22 14:55     ` Sven Peter
2021-09-18 12:09 ` [RFT PATCH 3/9] usb: typec: tipd: Allow irq controller selection Sven Peter
2021-09-19 11:28   ` Alyssa Rosenzweig
2021-09-21 13:21   ` Heikki Krogerus
2021-09-22 14:56     ` Sven Peter
2021-09-18 12:09 ` [RFT PATCH 4/9] usb: typec: tipd: Add short-circuit for no irqs Sven Peter
2021-09-21 13:23   ` Heikki Krogerus
2021-09-18 12:09 ` [RFT PATCH 5/9] usb: typec: tipd: Allow to configure irq bits Sven Peter
2021-09-21 13:34   ` Heikki Krogerus
2021-09-22 14:58     ` Sven Peter
2021-09-18 12:09 ` [RFT PATCH 6/9] usb: typec: tipd: Setup IntMask explicitly Sven Peter
2021-09-19 11:31   ` Alyssa Rosenzweig
2021-09-21 13:40   ` Heikki Krogerus
2021-09-22 14:58     ` Sven Peter
2021-09-18 12:09 ` [RFT PATCH 7/9] usb: typec: tipd: Add support for apple,cd321x Sven Peter
2021-09-19 11:32   ` Alyssa Rosenzweig
2021-09-18 12:09 ` [RFT PATCH 8/9] usb: typec: tipd: Switch power state to S0 for Apple variant Sven Peter
2021-09-19 11:33   ` Alyssa Rosenzweig
2021-09-21 13:46   ` Heikki Krogerus
2021-09-22 15:00     ` Sven Peter
2021-09-18 12:09 ` [RFT PATCH 9/9] usb: typec: tipd: Remove FIXME about testing with I2C_FUNC_I2C Sven Peter
2021-09-19 11:33   ` Alyssa Rosenzweig
2021-09-21 13:41   ` Heikki Krogerus
2021-09-19 11:35 ` [RFT PATCH 0/9] usb: typec: tipd: Add Apple M1 support Alyssa Rosenzweig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).