Skip to content

Commit 0c85556

Browse files
committed
Merge tag 'arm-apple-m1-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM Apple M1 platform support from Arnd Bergmann: "The Apple M1 is the processor used it all current generation Apple Macintosh computers. Support for this platform so far is rudimentary, but it boots and can use framebuffer and serial console over a special USB cable. Support for several essential on-chip devices (USB, PCIe, IOMMU, NVMe) is work in progress but was not ready in time. A very detailed description of what works is in the commit message of commit 1bb2fd3 ("Merge tag 'm1-soc-bringup-v5' [..]") and on the AsahiLinux wiki" Link: https://lore.kernel.org/linux-arm-kernel/bdb18e9f-fcd7-1e31-2224-19c0e5090706@marcan.st/ * tag 'arm-apple-m1-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: asm-generic/io.h: Unbork ioremap_np() declaration arm64: apple: Add initial Apple Mac mini (M1, 2020) devicetree dt-bindings: display: Add apple,simple-framebuffer arm64: Kconfig: Introduce CONFIG_ARCH_APPLE irqchip/apple-aic: Add support for the Apple Interrupt Controller dt-bindings: interrupt-controller: Add DT bindings for apple-aic arm64: Move ICH_ sysreg bits from arm-gic-v3.h to sysreg.h of/address: Add infrastructure to declare MMIO as non-posted asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np arm64: Implement ioremap_np() to map MMIO as nGnRnE docs: driver-api: device-io: Document ioremap() variants & access funcs docs: driver-api: device-io: Document I/O access functions asm-generic/io.h: Add a non-posted variant of ioremap() arm64: arch_timer: Implement support for interrupt-names dt-bindings: timer: arm,arch_timer: Add interrupt-names support arm64: cputype: Add CPU implementor & types for the Apple M1 cores dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles dt-bindings: arm: apple: Add bindings for Apple ARM platforms dt-bindings: vendor-prefixes: Add apple prefix
2 parents 6b0fbc5 + ea96292 commit 0c85556

File tree

33 files changed

+1815
-80
lines changed

33 files changed

+1815
-80
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/arm/apple.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Apple ARM Machine Device Tree Bindings
8+
9+
maintainers:
10+
- Hector Martin <marcan@marcan.st>
11+
12+
description: |
13+
ARM platforms using SoCs designed by Apple Inc., branded "Apple Silicon".
14+
15+
This currently includes devices based on the "M1" SoC, starting with the
16+
three Mac models released in late 2020:
17+
18+
- Mac mini (M1, 2020)
19+
- MacBook Pro (13-inch, M1, 2020)
20+
- MacBook Air (M1, 2020)
21+
22+
The compatible property should follow this format:
23+
24+
compatible = "apple,<targettype>", "apple,<socid>", "apple,arm-platform";
25+
26+
<targettype> represents the board/device and comes from the `target-type`
27+
property of the root node of the Apple Device Tree, lowercased. It can be
28+
queried on macOS using the following command:
29+
30+
$ ioreg -d2 -l | grep target-type
31+
32+
<socid> is the lowercased SoC ID. Apple uses at least *five* different
33+
names for their SoCs:
34+
35+
- Marketing name ("M1")
36+
- Internal name ("H13G")
37+
- Codename ("Tonga")
38+
- SoC ID ("T8103")
39+
- Package/IC part number ("APL1102")
40+
41+
Devicetrees should use the lowercased SoC ID, to avoid confusion if
42+
multiple SoCs share the same marketing name. This can be obtained from
43+
the `compatible` property of the arm-io node of the Apple Device Tree,
44+
which can be queried as follows on macOS:
45+
46+
$ ioreg -n arm-io | grep compatible
47+
48+
properties:
49+
$nodename:
50+
const: "/"
51+
compatible:
52+
oneOf:
53+
- description: Apple M1 SoC based platforms
54+
items:
55+
- enum:
56+
- apple,j274 # Mac mini (M1, 2020)
57+
- apple,j293 # MacBook Pro (13-inch, M1, 2020)
58+
- apple,j313 # MacBook Air (M1, 2020)
59+
- const: apple,t8103
60+
- const: apple,arm-platform
61+
62+
additionalProperties: true
63+
64+
...

Documentation/devicetree/bindings/arm/cpus.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ properties:
8585
8686
compatible:
8787
enum:
88+
- apple,icestorm
89+
- apple,firestorm
8890
- arm,arm710t
8991
- arm,arm720t
9092
- arm,arm740t

Documentation/devicetree/bindings/display/simple-framebuffer.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ properties:
5454
compatible:
5555
items:
5656
- enum:
57+
- apple,simple-framebuffer
5758
- allwinner,simple-framebuffer
5859
- amlogic,simple-framebuffer
5960
- const: simple-framebuffer
@@ -84,9 +85,13 @@ properties:
8485
Format of the framebuffer:
8586
* `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r
8687
* `r5g6b5` - 16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b
88+
* `x2r10g10b10` - 32-bit pixels, d[29:20]=r, d[19:10]=g, d[9:0]=b
89+
* `x8r8g8b8` - 32-bit pixels, d[23:16]=r, d[15:8]=g, d[7:0]=b
8790
enum:
8891
- a8b8g8r8
8992
- r5g6b5
93+
- x2r10g10b10
94+
- x8r8g8b8
9095

9196
display:
9297
$ref: /schemas/types.yaml#/definitions/phandle
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/apple,aic.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Apple Interrupt Controller
8+
9+
maintainers:
10+
- Hector Martin <marcan@marcan.st>
11+
12+
description: |
13+
The Apple Interrupt Controller is a simple interrupt controller present on
14+
Apple ARM SoC platforms, including various iPhone and iPad devices and the
15+
"Apple Silicon" Macs.
16+
17+
It provides the following features:
18+
19+
- Level-triggered hardware IRQs wired to SoC blocks
20+
- Single mask bit per IRQ
21+
- Per-IRQ affinity setting
22+
- Automatic masking on event delivery (auto-ack)
23+
- Software triggering (ORed with hw line)
24+
- 2 per-CPU IPIs (meant as "self" and "other", but they are interchangeable
25+
if not symmetric)
26+
- Automatic prioritization (single event/ack register per CPU, lower IRQs =
27+
higher priority)
28+
- Automatic masking on ack
29+
- Default "this CPU" register view and explicit per-CPU views
30+
31+
This device also represents the FIQ interrupt sources on platforms using AIC,
32+
which do not go through a discrete interrupt controller.
33+
34+
allOf:
35+
- $ref: /schemas/interrupt-controller.yaml#
36+
37+
properties:
38+
compatible:
39+
items:
40+
- const: apple,t8103-aic
41+
- const: apple,aic
42+
43+
interrupt-controller: true
44+
45+
'#interrupt-cells':
46+
const: 3
47+
description: |
48+
The 1st cell contains the interrupt type:
49+
- 0: Hardware IRQ
50+
- 1: FIQ
51+
52+
The 2nd cell contains the interrupt number.
53+
- HW IRQs: interrupt number
54+
- FIQs:
55+
- 0: physical HV timer
56+
- 1: virtual HV timer
57+
- 2: physical guest timer
58+
- 3: virtual guest timer
59+
60+
The 3rd cell contains the interrupt flags. This is normally
61+
IRQ_TYPE_LEVEL_HIGH (4).
62+
63+
reg:
64+
description: |
65+
Specifies base physical address and size of the AIC registers.
66+
maxItems: 1
67+
68+
required:
69+
- compatible
70+
- '#interrupt-cells'
71+
- interrupt-controller
72+
- reg
73+
74+
additionalProperties: false
75+
76+
examples:
77+
- |
78+
soc {
79+
#address-cells = <2>;
80+
#size-cells = <2>;
81+
82+
aic: interrupt-controller@23b100000 {
83+
compatible = "apple,t8103-aic", "apple,aic";
84+
#interrupt-cells = <3>;
85+
interrupt-controller;
86+
reg = <0x2 0x3b100000 0x0 0x8000>;
87+
};
88+
};

Documentation/devicetree/bindings/timer/arm,arch_timer.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,30 @@ properties:
3434
- arm,armv8-timer
3535

3636
interrupts:
37+
minItems: 1
38+
maxItems: 5
3739
items:
3840
- description: secure timer irq
3941
- description: non-secure timer irq
4042
- description: virtual timer irq
4143
- description: hypervisor timer irq
44+
- description: hypervisor virtual timer irq
45+
46+
interrupt-names:
47+
oneOf:
48+
- minItems: 2
49+
items:
50+
- const: phys
51+
- const: virt
52+
- const: hyp-phys
53+
- const: hyp-virt
54+
- minItems: 3
55+
items:
56+
- const: sec-phys
57+
- const: phys
58+
- const: virt
59+
- const: hyp-phys
60+
- const: hyp-virt
4261

4362
clock-frequency:
4463
description: The frequency of the main counter, in Hz. Should be present

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ patternProperties:
103103
description: Anvo-Systems Dresden GmbH
104104
"^apm,.*":
105105
description: Applied Micro Circuits Corporation (APM)
106+
"^apple,.*":
107+
description: Apple Inc.
106108
"^aptina,.*":
107109
description: Aptina Imaging
108110
"^arasan,.*":

0 commit comments

Comments
 (0)