linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add PCI driver for the Apple M1
@ 2021-08-15  4:25 Alyssa Rosenzweig
  2021-08-15  4:25 ` [RFC PATCH 1/2] dt-bindings: PCI: Add Apple PCI controller Alyssa Rosenzweig
  2021-08-15  4:25 ` [RFC PATCH 2/2] PCI: apple: Add driver for the Apple M1 Alyssa Rosenzweig
  0 siblings, 2 replies; 25+ messages in thread
From: Alyssa Rosenzweig @ 2021-08-15  4:25 UTC (permalink / raw)
  To: linux-pci
  Cc: Bjorn Helgaas, Rob Herring, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Alyssa Rosenzweig, Stan Skowronek,
	Marc Zyngier, Mark Kettenis, Sven Peter, Hector Martin,
	devicetree, linux-kernel

This adds a PCIe driver for the internal bus on the Apple M1 (and
presumably other Apple system-on-chips). It's based on the work of Marc
Zyngier, Mark Kettenis, and Stan Skowronek (Corellium). In conjunction
with a proper device tree and a GPIO driver, this enables the USB type-A
ports and the Ethernet port. It also paves the way for Wi-Fi and
Bluetooth, but that requires further work. The device tree patch is not
included here, as it depends on the GPIO driver which is still
work-in-progress. Nevertheless, I feel comfortable submitting "PCI: apple:
Add driver for the Apple M1".

I expect review feedback will be concentrated on the device tree
bindings. These bindings are a mish-mash of what's in the Marc's initial
driver, Corellium driver, and Mark's U-Boot downstream. They differ from
Maz's bindings by including nodes necessary for hardware bring-up, but
are simplified from Corellium's bindings by omitting tunables which are
handled by the Asahi Linux bootloader (m1n1). I am new to device tree
and expect "dt-bindings: PCI: Add Apple PCI controller" to need changes.
This was my first time working with YAML bindings; please be gentle :-)

I've collected the patches required to test this branch on this branch:

	https://github.com/mu-one/linux/commits/pcie

This branch is based on linux-next and contains a GPIO (pinctrl) driver,
this series, and updates to the M1 (T8103) device tree. The type-A ports
and Ethernet should work out-of-the-box on that tree, provided the
kernel is booted through m1n1. This is a noticeable improvement on Maz's
initial PCIe driver, which required U-Boot to function.

I've started using Linux on M1 as my workstation for Panfrost
development, so this should have 40 hours of testing by this time next
week.

Alyssa Rosenzweig (2):
  dt-bindings: PCI: Add Apple PCI controller
  PCI: apple: Add driver for the Apple M1

 .../devicetree/bindings/pci/apple,pcie.yaml   | 153 ++++++
 MAINTAINERS                                   |   7 +
 drivers/pci/controller/Kconfig                |  13 +
 drivers/pci/controller/Makefile               |   1 +
 drivers/pci/controller/pcie-apple.c           | 466 ++++++++++++++++++
 5 files changed, 640 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/apple,pcie.yaml
 create mode 100644 drivers/pci/controller/pcie-apple.c

-- 
2.30.2


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

end of thread, other threads:[~2021-08-22 18:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-15  4:25 [RFC PATCH 0/2] Add PCI driver for the Apple M1 Alyssa Rosenzweig
2021-08-15  4:25 ` [RFC PATCH 1/2] dt-bindings: PCI: Add Apple PCI controller Alyssa Rosenzweig
2021-08-15  7:09   ` Marc Zyngier
     [not found]     ` <1566004903.6140692.1629015053757@ox-webmail.xs4all.nl>
2021-08-15  9:12       ` Marc Zyngier
2021-08-16  1:34     ` Alyssa Rosenzweig
2021-08-22 18:03       ` Mark Kettenis
2021-08-15  4:25 ` [RFC PATCH 2/2] PCI: apple: Add driver for the Apple M1 Alyssa Rosenzweig
2021-08-15  7:42   ` Marc Zyngier
2021-08-15  9:19     ` Marc Zyngier
2021-08-16  1:45       ` Alyssa Rosenzweig
2021-08-15 12:33     ` Sven Peter
2021-08-15 16:49       ` Marc Zyngier
2021-08-16  6:37         ` Sven Peter
2021-08-18 11:43       ` Hector Martin
2021-08-18 14:22         ` Mark Kettenis
2021-08-16  1:31     ` Alyssa Rosenzweig
2021-08-16 21:56       ` Marc Zyngier
2021-08-17  7:34         ` Arnd Bergmann
2021-08-17  8:12           ` Marc Zyngier
2021-08-17  7:35         ` Sven Peter
2021-08-15  7:43   ` Sven Peter
2021-08-15 21:40     ` Alyssa Rosenzweig
2021-08-15 20:57   ` Rob Herring
2021-08-15 21:33     ` Alyssa Rosenzweig
     [not found]   ` <CAHp75VeKeGgUgALLztA3Q3jizF2=OkSzU9bzaPmTHO9Pad=QOQ@mail.gmail.com>
2021-08-16  3:20     ` 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).