linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] Apple M1 SoC platform bring-up
@ 2021-02-04 20:39 Hector Martin
  2021-02-04 20:39 ` [PATCH 01/18] dt-bindings: vendor-prefixes: add AAPL prefix Hector Martin
                   ` (19 more replies)
  0 siblings, 20 replies; 118+ messages in thread
From: Hector Martin @ 2021-02-04 20:39 UTC (permalink / raw)
  To: Hector Martin, soc
  Cc: devicetree, Arnd Bergmann, Marc Zyngier, linux-kernel, robh+dt,
	Olof Johansson, linux-arm-kernel

This series brings up initial support for the Apple M1 SoC, used in the
2020 Mac Mini, MacBook Pro, and MacBook Air models.

The following features are supported in this initial port:

- UART (samsung-style) with earlycon support
- Interrupts, including affinity and IPIs (Apple Interrupt Controller)
- SMP (through standard spin-table support)
- simplefb-based framebuffer
- Devicetree for the Mac Mini (should work for the others too at this
  stage)

The primary pain points of this port are:

- Apple SoCs require FIQs, as the timers and "fast" IPIs are hardwired
  to the FIQ interrupt line. This patchset introduces FIQ support through
  the alternatives mechanism, so as to not affect other platforms,
  implemented as simply merging IRQs and FIQs. The AIC driver takes care
  of discriminating and routing IRQs to the right users.

- These SoCs blackhole nGnRE writes to internal MMIO ranges, and require
  nGnRnE. There is no obvious right solution to solve this. I do not
  expect the two patches for that in this series to be merged as-is, but
  the commit messages describe the problem and potential solutions. I
  hope we can have a discussion and converge on the right approach to
  solve this problem in the sanest way.

These machines officially support booting unsigned/user-provided
XNU-like kernels, with a very different boot protocol and devicetree
format. We are developing an initial bootloader, m1n1 [1], to take care
of as many hardware peculiarities as possible and present a standard
Linux arm64 boot protocol and device tree. In the future, I expect that
production setups will add U-Boot and perhaps GRUB into the boot chain,
to make the boot process similar to other ARM64 platforms.

The machines expose their debug UART over USB Type C, triggered with
vendor-specific USB-PD commands. Currently, the easiest way to get a
serial console on these machines is to use a second M1 box and a simple
USB C cable [2]. You can also build a DIY interface using an Arduino, a
FUSB302 chip or board, and a 1.2V UART-TTL adapter [3]. In the coming
weeks we will be designing an open hardware project to provide
serial/debug connectivity to these machines (and, hopefully, also
support other UART-over-Type C setups from other vendors). Please
contact me privately if you are interested in getting an early prototype
version of one of these devices.

A quickstart guide to booting Linux kernels on these machines is
available at [4], and we are documenting the hardware at [5].

[1] https://github.com/AsahiLinux/m1n1/
[2] https://github.com/AsahiLinux/macvdmtool/
[3] https://github.com/AsahiLinux/vdmtool/
[4] https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart
[5] https://github.com/AsahiLinux/docs/wiki

== 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 on freenode to chat with us, or check our website for
more information on the project:

https://asahilinux.org/


Hector Martin (18):
  dt-bindings: vendor-prefixes: add AAPL prefix
  dt-bindings: arm: cpus: Add AAPL,firestorm & icestorm compatibles
  dt-bindings: arm: AAPL: Add bindings for Apple ARM platforms
  arm64: Kconfig: Introduce CONFIG_ARCH_APPLE
  tty: serial: samsung_tty: add support for Apple UARTs
  dt-bindings: serial: samsung: Add AAPL,s5l-uart compatible
  tty: serial: samsung_tty: enable for ARCH_APPLE
  arm64: cpufeature: Add a feature for FIQ support
  arm64: cputype: Add CPU types for the Apple M1 big/little cores
  arm64: Introduce FIQ support
  arm64: Kconfig: Require FIQ support for ARCH_APPLE
  arm64: setup: Use nGnRnE IO mappings for fixmap on Apple platforms
  arm64: ioremap: use nGnRnE mappings on platforms that require it
  dt-bindings: interrupt-controller: Add DT bindings for apple-aic
  irqchip/apple-aic: Add support for the Apple Interrupt Controller
  irqchip/apple-aic: Add SMP / IPI support
  dt-bindings: display: add AAPL,simple-framebuffer
  arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

 .../devicetree/bindings/arm/AAPL.yaml         |  36 ++
 .../devicetree/bindings/arm/cpus.yaml         |   2 +
 .../bindings/display/simple-framebuffer.yaml  |   5 +
 .../interrupt-controller/AAPL,aic.yaml        |  88 +++
 .../bindings/serial/samsung_uart.yaml         |   4 +-
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 MAINTAINERS                                   |  14 +
 arch/arm64/Kconfig                            |  10 +
 arch/arm64/Kconfig.platforms                  |   8 +
 arch/arm64/boot/dts/Makefile                  |   1 +
 arch/arm64/boot/dts/apple/Makefile            |   2 +
 arch/arm64/boot/dts/apple/apple-j274.dts      | 143 +++++
 arch/arm64/include/asm/assembler.h            |   4 +
 arch/arm64/include/asm/cpucaps.h              |   3 +-
 arch/arm64/include/asm/cpufeature.h           |   6 +
 arch/arm64/include/asm/cputype.h              |   6 +
 arch/arm64/include/asm/daifflags.h            |   7 +
 arch/arm64/include/asm/fixmap.h               |  10 +-
 arch/arm64/include/asm/io.h                   |   9 +-
 arch/arm64/include/asm/irqflags.h             |  17 +-
 arch/arm64/kernel/cpufeature.c                |  32 ++
 arch/arm64/kernel/entry.S                     |  27 +-
 arch/arm64/kernel/setup.c                     |  12 +
 drivers/irqchip/Kconfig                       |  10 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-apple-aic.c               | 501 ++++++++++++++++++
 drivers/tty/serial/Kconfig                    |   2 +-
 drivers/tty/serial/samsung_tty.c              | 297 +++++++++--
 .../interrupt-controller/apple-aic.h          |  14 +
 include/linux/serial_s3c.h                    |  16 +
 include/uapi/linux/serial_core.h              |   3 +
 31 files changed, 1243 insertions(+), 49 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/AAPL.yaml
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/AAPL,aic.yaml
 create mode 100644 arch/arm64/boot/dts/apple/Makefile
 create mode 100644 arch/arm64/boot/dts/apple/apple-j274.dts
 create mode 100644 drivers/irqchip/irq-apple-aic.c
 create mode 100644 include/dt-bindings/interrupt-controller/apple-aic.h

--
2.30.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-02-10 13:44 UTC | newest]

Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 20:39 [PATCH 00/18] Apple M1 SoC platform bring-up Hector Martin
2021-02-04 20:39 ` [PATCH 01/18] dt-bindings: vendor-prefixes: add AAPL prefix Hector Martin
2021-02-08 10:27   ` Krzysztof Kozlowski
2021-02-08 17:32     ` Rob Herring
2021-02-08 18:12       ` Krzysztof Kozlowski
2021-02-08 19:59         ` Arnd Bergmann
2021-02-08 23:17         ` Hector Martin
2021-02-04 20:39 ` [PATCH 02/18] dt-bindings: arm: cpus: Add AAPL, firestorm & icestorm compatibles Hector Martin
2021-02-04 20:39 ` [PATCH 03/18] dt-bindings: arm: AAPL: Add bindings for Apple ARM platforms Hector Martin
2021-02-04 20:39 ` [PATCH 04/18] arm64: Kconfig: Introduce CONFIG_ARCH_APPLE Hector Martin
2021-02-06 13:17   ` Marc Zyngier
2021-02-07  8:05     ` Hector Martin 'marcan'
2021-02-04 20:39 ` [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs Hector Martin
2021-02-04 23:55   ` kernel test robot
2021-02-05  9:44     ` Hector Martin 'marcan'
2021-02-05  2:19   ` kernel test robot
2021-02-06 13:15   ` Marc Zyngier
2021-02-07  9:12     ` Hector Martin 'marcan'
2021-02-07  9:26       ` Hector Martin 'marcan'
2021-02-08  9:36         ` Krzysztof Kozlowski
2021-02-08 16:14           ` Hector Martin
2021-02-08 10:34       ` Marc Zyngier
2021-02-08 16:18         ` Hector Martin
2021-02-08 16:46           ` Greg Kroah-Hartman
2021-02-08 23:22             ` Hector Martin
2021-02-08 10:54   ` Krzysztof Kozlowski
2021-02-08 16:10     ` Hector Martin
2021-02-08 18:37       ` Krzysztof Kozlowski
2021-02-08 23:23         ` Hector Martin
2021-02-04 20:39 ` [PATCH 06/18] dt-bindings: serial: samsung: Add AAPL, s5l-uart compatible Hector Martin
2021-02-04 20:39 ` [PATCH 07/18] tty: serial: samsung_tty: enable for ARCH_APPLE Hector Martin
2021-02-04 21:16   ` Arnd Bergmann
2021-02-04 21:27     ` Hector Martin 'marcan'
2021-02-04 20:39 ` [PATCH 08/18] arm64: cpufeature: Add a feature for FIQ support Hector Martin
2021-02-06 13:58   ` Marc Zyngier
2021-02-07  8:28     ` Hector Martin 'marcan'
2021-02-08 11:29       ` Marc Zyngier
2021-02-08 15:51         ` Hector Martin
2021-02-04 20:39 ` [PATCH 09/18] arm64: cputype: Add CPU types for the Apple M1 big/little cores Hector Martin
2021-02-04 20:39 ` [PATCH 10/18] arm64: Introduce FIQ support Hector Martin
2021-02-06 15:37   ` Marc Zyngier
2021-02-06 16:22     ` Arnd Bergmann
2021-02-07  8:36       ` Hector Martin 'marcan'
2021-02-07 12:25         ` Arnd Bergmann
2021-02-07 15:38           ` Hector Martin 'marcan'
2021-02-07 18:49             ` Arnd Bergmann
2021-02-08 23:34               ` Hector Martin
2021-02-07  8:47     ` Hector Martin 'marcan'
2021-02-08 11:30       ` Marc Zyngier
2021-02-04 20:39 ` [PATCH 11/18] arm64: Kconfig: Require FIQ support for ARCH_APPLE Hector Martin
2021-02-06 15:46   ` Marc Zyngier
2021-02-07  9:23     ` Hector Martin 'marcan'
2021-02-08 12:05       ` Marc Zyngier
2021-02-08 15:48         ` Hector Martin
2021-02-04 20:39 ` [PATCH 12/18] arm64: setup: Use nGnRnE IO mappings for fixmap on Apple platforms Hector Martin
2021-02-04 22:25   ` Arnd Bergmann
2021-02-04 20:39 ` [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it Hector Martin
2021-02-04 22:21   ` Arnd Bergmann
2021-02-08 22:57   ` Arnd Bergmann
2021-02-08 23:20     ` Mark Kettenis
2021-02-09  0:25       ` Hector Martin
2021-02-09  9:15         ` Arnd Bergmann
2021-02-09  9:58           ` Mark Kettenis
2021-02-09 11:22           ` Hector Martin
2021-02-09  9:35       ` Arnd Bergmann
2021-02-10 12:24     ` Hector Martin
2021-02-10 13:40       ` Mark Kettenis
2021-02-04 20:39 ` [PATCH 14/18] dt-bindings: interrupt-controller: Add DT bindings for apple-aic Hector Martin
2021-02-09 23:07   ` Rob Herring
2021-02-04 20:39 ` [PATCH 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller Hector Martin
2021-02-04 21:37   ` Arnd Bergmann
2021-02-04 22:04     ` Hector Martin 'marcan'
2021-02-04 23:04       ` Arnd Bergmann
2021-02-05  7:41         ` Hector Martin 'marcan'
2021-02-05 10:33           ` Arnd Bergmann
2021-02-05  2:27   ` kernel test robot
2021-02-05  9:45     ` Hector Martin 'marcan'
2021-02-08  9:25   ` Marc Zyngier
2021-02-08 10:29     ` Arnd Bergmann
2021-02-08 11:13       ` Hector Martin 'marcan'
2021-02-08 11:21         ` Arnd Bergmann
2021-02-08 11:36       ` Marc Zyngier
2021-02-08 12:17         ` Arnd Bergmann
2021-02-08 15:31         ` Hector Martin
2021-02-09  6:20     ` Hector Martin
2021-02-04 20:39 ` [PATCH 16/18] irqchip/apple-aic: Add SMP / IPI support Hector Martin
2021-02-04 20:39 ` [PATCH 17/18] dt-bindings: display: add AAPL,simple-framebuffer Hector Martin
2021-02-04 20:39 ` [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree Hector Martin
2021-02-04 21:29   ` Arnd Bergmann
2021-02-04 21:44     ` Hector Martin 'marcan'
2021-02-04 23:08       ` Arnd Bergmann
2021-02-05  7:11         ` Hector Martin 'marcan'
2021-02-05 12:43           ` Arnd Bergmann
2021-02-08 11:04   ` Krzysztof Kozlowski
2021-02-08 11:56     ` Hector Martin 'marcan'
2021-02-08 12:13       ` Krzysztof Kozlowski
2021-02-08 12:40         ` Arnd Bergmann
2021-02-08 14:12           ` Hector Martin
2021-02-08 17:58             ` Rob Herring
2021-02-09  0:32               ` Hector Martin
2021-02-08 19:14       ` Rob Herring
2021-02-09  0:49         ` Hector Martin
2021-02-09  2:05           ` Rob Herring
2021-02-10 10:19       ` Tony Lindgren
2021-02-10 11:07         ` Hector Martin
2021-02-10 11:34           ` Tony Lindgren
2021-02-10 11:43             ` Hector Martin
2021-02-10 12:24               ` Daniel Palmer
2021-02-10 12:54                 ` Tony Lindgren
2021-02-10 12:56                 ` Hector Martin
2021-02-10 12:55             ` Krzysztof Kozlowski
2021-02-10 13:19               ` Tony Lindgren
2021-02-10 13:25                 ` Krzysztof Kozlowski
2021-02-08 12:27   ` Marc Zyngier
2021-02-08 14:53     ` Hector Martin
2021-02-08 15:36       ` Marc Zyngier
2021-02-04 22:43 ` [PATCH 00/18] Apple M1 SoC platform bring-up Arnd Bergmann
2021-02-05 11:35 ` Hector Martin 'marcan'

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