lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210816031621.240268-1-alyssa@rosenzweig.io>
Date:   Sun, 15 Aug 2021 23:16:15 -0400
From:   Alyssa Rosenzweig <alyssa@...enzweig.io>
To:     linux-pci@...r.kernel.org
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Rob Herring <robh+dt@...nel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Stan Skowronek <stan@...ellium.com>,
        Marc Zyngier <maz@...nel.org>,
        Mark Kettenis <kettenis@...nbsd.org>,
        Sven Peter <sven@...npeter.dev>,
        Hector Martin <marcan@...can.st>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/6] Add PCI driver for the Apple M1

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 pinctrl 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.

For the largest change since v1 of the series-- this now uses Mark
Kettenis's device tree bindings for PCIe. This series contains Mark's
patches (currently under discussion on the LKML) adding the device tree
nodes required for PCIe. I have made minor modifications to Mark's
original patches to get everything working under Linux:

* In the bindings themselves, I've increased the maximum number of
  interrupts to accommodate the full set.
* In the PCIe node, I've added the full set of interrupts.
* I've added the PCIe DART nodes (IOMMUs) and the corresponding
  iommu-map(-mask) properties already covered in the bindings.
* I've tweaked the sizes of the `reg` blocks. Otherwise I got a page
  fault early on.

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

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

This branch is based on linux-next and contains a GPIO (pinctrl) driver,
a clock gate driver, additional device tree nodes, and this series.  The
type-A ports and Ethernet should work out-of-the-box on that tree,
provided the kernel is booted through m1n1. This improves 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.

== Project Blurb ==

Asahi Linux is an open community project dedicated to developing and
maintaining mainline support for Apple Silicon on Linux. Feel free to
drop by #asahi and #asahi-dev on OFTC to chat with us, or check
our website for more information on the project:

== Changes ==

Changes for v2:
- Cherrypicked Mark's device tree bindings and switched to using them.
- Split up the PCI driver patch into 3.
- Large numbers of minor changes to the driver better match upstream
  quality standards (using more helper functions, etc.)

Alyssa Rosenzweig (3):
  PCI: apple: Add initial hardware bring-up
  PCI: apple: Set up reference clocks when probing
  PCI: apple: Add MSI handling

Mark Kettenis (3):
  dt-bindings: pci: Add DT bindings for apple,pcie
  arm64: apple: Add pinctrl nodes
  arm64: apple: Add PCIe node

 .../devicetree/bindings/pci/apple,pcie.yaml   | 166 +++++++
 MAINTAINERS                                   |   7 +
 arch/arm64/boot/dts/apple/t8103.dtsi          | 207 ++++++++
 drivers/pci/controller/Kconfig                |  12 +
 drivers/pci/controller/Makefile               |   1 +
 drivers/pci/controller/pcie-apple.c           | 448 ++++++++++++++++++
 6 files changed, 841 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/apple,pcie.yaml
 create mode 100644 drivers/pci/controller/pcie-apple.c

-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ