Message ID | 20230202-asahi-t8112-dt-v2-0-22926a283d92@jannau.net |
---|---|
Headers | show |
Series | Device trees for Apple M2 (t8112) based devices | expand |
Hi, On Tue, Feb 14, 2023, at 12:03, Janne Grunau wrote: > From: Hector Martin <marcan@marcan.st> > > This adds device trees for the following devices: > - Macbook Air (M2, 2022) > - Macbook Pro 13" (M2, 2022) > - Mac mini (M2, 2023) > > Signed-off-by: Hector Martin <marcan@marcan.st> > Co-developed-by: Janne Grunau <j@jannau.net> > Signed-off-by: Janne Grunau <j@jannau.net> > --- > arch/arm64/boot/dts/apple/Makefile | 3 + > arch/arm64/boot/dts/apple/t8112-j413.dts | 63 ++ > arch/arm64/boot/dts/apple/t8112-j473.dts | 54 ++ > arch/arm64/boot/dts/apple/t8112-j493.dts | 52 ++ > arch/arm64/boot/dts/apple/t8112-jxxx.dtsi | 81 ++ > arch/arm64/boot/dts/apple/t8112-pmgr.dtsi | 1141 +++++++++++++++++++++++++++++ > arch/arm64/boot/dts/apple/t8112.dtsi | 912 +++++++++++++++++++++++ > 7 files changed, 2306 insertions(+) > > diff --git a/arch/arm64/boot/dts/apple/Makefile > b/arch/arm64/boot/dts/apple/Makefile > index 5a7506ff5ea3..aec5e29cdfb7 100644 > --- a/arch/arm64/boot/dts/apple/Makefile > +++ b/arch/arm64/boot/dts/apple/Makefile > @@ -10,3 +10,6 @@ dtb-$(CONFIG_ARCH_APPLE) += t6000-j316s.dtb > dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb > dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb > dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb > diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts > b/arch/arm64/boot/dts/apple/t8112-j413.dts > new file mode 100644 > index 000000000000..9e758edeaa82 > --- /dev/null > +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts > @@ -0,0 +1,63 @@ > +// SPDX-License-Identifier: GPL-2.0+ OR MIT > +/* > + * Apple MacBook Air (M2, 2022) > + * > + * target-type: J413 > + * > + * Copyright The Asahi Linux Contributors > + */ > + > +/dts-v1/; > + > +#include "t8112.dtsi" > +#include "t8112-jxxx.dtsi" > + > +/ { > + compatible = "apple,j413", "apple,t8112", "apple,arm-platform"; > + model = "Apple MacBook Air (13-inch, M2, 2022)"; > + > + aliases { > + bluetooth0 = &bluetooth0; > + wifi0 = &wifi0; > + }; > +}; > + > +/* > + * Force the bus number assignments so that we can declare some of the > + * on-board devices and properties that are populated by the bootloader > + * (such as MAC addresses). > + */ > +&port00 { > + bus-range = <1 1>; > + wifi0: wifi@0,0 { > + compatible = "pci14e4,4433"; I'm not sure how these pci compatibles are usually handled. Do they have to be added to the dt-bindings Documentation as well or is it fine to just have them here since they're not really used to match anything? Otherwise this looks good to me, Reviewed-by: Sven Peter <sven@svenpeter.dev> Best, Sven
On 2023-02-19 13:36:22 +0100, Sven Peter wrote: > Hi, > > > On Tue, Feb 14, 2023, at 12:03, Janne Grunau wrote: > > From: Hector Martin <marcan@marcan.st> > > > > This adds device trees for the following devices: > > - Macbook Air (M2, 2022) > > - Macbook Pro 13" (M2, 2022) > > - Mac mini (M2, 2023) > > > > Signed-off-by: Hector Martin <marcan@marcan.st> > > Co-developed-by: Janne Grunau <j@jannau.net> > > Signed-off-by: Janne Grunau <j@jannau.net> > > --- > > arch/arm64/boot/dts/apple/Makefile | 3 + > > arch/arm64/boot/dts/apple/t8112-j413.dts | 63 ++ > > arch/arm64/boot/dts/apple/t8112-j473.dts | 54 ++ > > arch/arm64/boot/dts/apple/t8112-j493.dts | 52 ++ > > arch/arm64/boot/dts/apple/t8112-jxxx.dtsi | 81 ++ > > arch/arm64/boot/dts/apple/t8112-pmgr.dtsi | 1141 +++++++++++++++++++++++++++++ > > arch/arm64/boot/dts/apple/t8112.dtsi | 912 +++++++++++++++++++++++ > > 7 files changed, 2306 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/apple/Makefile > > b/arch/arm64/boot/dts/apple/Makefile > > index 5a7506ff5ea3..aec5e29cdfb7 100644 > > --- a/arch/arm64/boot/dts/apple/Makefile > > +++ b/arch/arm64/boot/dts/apple/Makefile > > @@ -10,3 +10,6 @@ dtb-$(CONFIG_ARCH_APPLE) += t6000-j316s.dtb > > dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb > > dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb > > dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb > > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb > > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb > > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb > > diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts > > b/arch/arm64/boot/dts/apple/t8112-j413.dts > > new file mode 100644 > > index 000000000000..9e758edeaa82 > > --- /dev/null > > +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts > > @@ -0,0 +1,63 @@ > > +// SPDX-License-Identifier: GPL-2.0+ OR MIT > > +/* > > + * Apple MacBook Air (M2, 2022) > > + * > > + * target-type: J413 > > + * > > + * Copyright The Asahi Linux Contributors > > + */ > > + > > +/dts-v1/; > > + > > +#include "t8112.dtsi" > > +#include "t8112-jxxx.dtsi" > > + > > +/ { > > + compatible = "apple,j413", "apple,t8112", "apple,arm-platform"; > > + model = "Apple MacBook Air (13-inch, M2, 2022)"; > > + > > + aliases { > > + bluetooth0 = &bluetooth0; > > + wifi0 = &wifi0; > > + }; > > +}; > > + > > +/* > > + * Force the bus number assignments so that we can declare some of the > > + * on-board devices and properties that are populated by the bootloader > > + * (such as MAC addresses). > > + */ > > +&port00 { > > + bus-range = <1 1>; > > + wifi0: wifi@0,0 { > > + compatible = "pci14e4,4433"; > > I'm not sure how these pci compatibles are usually handled. Do they have to > be added to the dt-bindings Documentation as well or is it fine to just have them > here since they're not really used to match anything? I suppose they have to be added (at least for dtb validation) but "pci14e4,4433" is already in net/wireless/brcm,bcm4329-fmac.yaml. Added via e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips"). Janne
On Sun, Feb 19, 2023, at 14:22, Janne Grunau wrote: > On 2023-02-19 13:36:22 +0100, Sven Peter wrote: >> Hi, >> >> >> On Tue, Feb 14, 2023, at 12:03, Janne Grunau wrote: >> > From: Hector Martin <marcan@marcan.st> >> > >> > This adds device trees for the following devices: >> > - Macbook Air (M2, 2022) >> > - Macbook Pro 13" (M2, 2022) >> > - Mac mini (M2, 2023) >> > >> > Signed-off-by: Hector Martin <marcan@marcan.st> >> > Co-developed-by: Janne Grunau <j@jannau.net> >> > Signed-off-by: Janne Grunau <j@jannau.net> >> > --- >> > arch/arm64/boot/dts/apple/Makefile | 3 + >> > arch/arm64/boot/dts/apple/t8112-j413.dts | 63 ++ >> > arch/arm64/boot/dts/apple/t8112-j473.dts | 54 ++ >> > arch/arm64/boot/dts/apple/t8112-j493.dts | 52 ++ >> > arch/arm64/boot/dts/apple/t8112-jxxx.dtsi | 81 ++ >> > arch/arm64/boot/dts/apple/t8112-pmgr.dtsi | 1141 +++++++++++++++++++++++++++++ >> > arch/arm64/boot/dts/apple/t8112.dtsi | 912 +++++++++++++++++++++++ >> > 7 files changed, 2306 insertions(+) >> > >> > diff --git a/arch/arm64/boot/dts/apple/Makefile >> > b/arch/arm64/boot/dts/apple/Makefile >> > index 5a7506ff5ea3..aec5e29cdfb7 100644 >> > --- a/arch/arm64/boot/dts/apple/Makefile >> > +++ b/arch/arm64/boot/dts/apple/Makefile >> > @@ -10,3 +10,6 @@ dtb-$(CONFIG_ARCH_APPLE) += t6000-j316s.dtb >> > dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb >> > dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb >> > dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb >> > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb >> > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb >> > +dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb >> > diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts >> > b/arch/arm64/boot/dts/apple/t8112-j413.dts >> > new file mode 100644 >> > index 000000000000..9e758edeaa82 >> > --- /dev/null >> > +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts >> > @@ -0,0 +1,63 @@ >> > +// SPDX-License-Identifier: GPL-2.0+ OR MIT >> > +/* >> > + * Apple MacBook Air (M2, 2022) >> > + * >> > + * target-type: J413 >> > + * >> > + * Copyright The Asahi Linux Contributors >> > + */ >> > + >> > +/dts-v1/; >> > + >> > +#include "t8112.dtsi" >> > +#include "t8112-jxxx.dtsi" >> > + >> > +/ { >> > + compatible = "apple,j413", "apple,t8112", "apple,arm-platform"; >> > + model = "Apple MacBook Air (13-inch, M2, 2022)"; >> > + >> > + aliases { >> > + bluetooth0 = &bluetooth0; >> > + wifi0 = &wifi0; >> > + }; >> > +}; >> > + >> > +/* >> > + * Force the bus number assignments so that we can declare some of the >> > + * on-board devices and properties that are populated by the bootloader >> > + * (such as MAC addresses). >> > + */ >> > +&port00 { >> > + bus-range = <1 1>; >> > + wifi0: wifi@0,0 { >> > + compatible = "pci14e4,4433"; >> >> I'm not sure how these pci compatibles are usually handled. Do they have to >> be added to the dt-bindings Documentation as well or is it fine to just have them >> here since they're not really used to match anything? > > I suppose they have to be added (at least for dtb validation) but > "pci14e4,4433" is already in net/wireless/brcm,bcm4329-fmac.yaml. Added > via e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties > & chips"). Oh, true, I somehow missed that. Best, Sven
This series contains dt-bindings updates and device trees for Apple silicon devices based on the M2 SoC (t8112). Device tree validation depends on the dart-t8110 bindings queued in the iommu tree for 6.3 [1], PMU updates [2] and support for "local-mac-address" for brcm,bcm4329-fmac based devices [3]. The latter fixes validation errors for the existing M1 and M1 Pro/Max/Ultra device trees. The device trees are tested with the downstream Asahi Linux kernel and on top of v6.2-rc5. The hardware is of limited use with the upstream kernel. The notebooks miss keyboard/trackpad drivers and usb support. The Mac mini does not yet have a boot framebuffer and lacks usb support as well. 1: https://lore.kernel.org/linux-iommu/20230113105029.26654-1-marcan@marcan.st/ 2: https://lore.kernel.org/linux-devicetree/20230214-apple_m2_pmu-v1-1-9c9213ab9b63@jannau.net/ 3: https://lore.kernel.org/linux-devicetree/20230203-dt-bindings-network-class-v2-2-499686795073@jannau.net/ The dt-binding changes in this series are documentation only. All drivers are compatible with the HW on the M2 SoC and are probed based on generic compatibles. The t8112 specific compatibles are added to address t8112 specific quirks in the case they become required. Signed-off-by: Janne Grunau <j@jannau.net> --- Changes in v2: - collect acked/reviewed-by: tags - disable unused PCIe ports instead of deleting them - fixes based on review feedback for "apple,aic2" and "apple,sart" - dropped "arm-pmu: Add PMU compatible strings for Apple M2 cores" (submitted separately) - Link to v1: https://lore.kernel.org/r/20230202-asahi-t8112-dt-v1-0-cb5442d1c229@jannau.net --- Hector Martin (2): dt-bindings: power: apple,pmgr-pwrstate: Add t8112 compatible arm64: dts: apple: t8112: Initial t8112 (M2) device trees Janne Grunau (14): dt-bindings: arm: apple: apple,pmgr: Add t8112-pmgr compatible dt-bindings: watchdog: apple,wdt: Add t8112-wdt compatible dt-bindings: arm: cpus: Add apple,avalanche & blizzard compatibles dt-bindings: interrupt-controller: apple,aic2: Add apple,t8112-aic compatible dt-bindings: iommu: apple,sart: Add apple,t8112-sart compatible string dt-bindings: mailbox: apple,mailbox: Add t8112 compatibles dt-bindings: nvme: apple: Add apple,t8112-nvme-ans2 compatible string dt-bindings: pci: apple,pcie: Add t8112 support dt-bindings: pinctrl: apple,pinctrl: Add apple,t8112-pinctrl compatible dt-bindings: i2c: apple,i2c: Add apple,t8112-i2c compatible dt-bindings: clock: apple,nco: Add t8112-nco compatible dt-bindings: sound: apple,mca: Add t8112-mca compatible dt-bindings: dma: apple,admac: Add t8112-admac compatible dt-bindings: arm: apple: Add t8112 j413/j473/j493 compatibles Documentation/devicetree/bindings/arm/apple.yaml | 15 + .../devicetree/bindings/arm/apple/apple,pmgr.yaml | 1 + Documentation/devicetree/bindings/arm/cpus.yaml | 2 + .../devicetree/bindings/clock/apple,nco.yaml | 1 + .../devicetree/bindings/dma/apple,admac.yaml | 1 + .../devicetree/bindings/i2c/apple,i2c.yaml | 1 + .../bindings/interrupt-controller/apple,aic2.yaml | 23 +- .../devicetree/bindings/iommu/apple,sart.yaml | 10 +- .../devicetree/bindings/mailbox/apple,mailbox.yaml | 2 + .../devicetree/bindings/nvme/apple,nvme-ans.yaml | 5 +- .../devicetree/bindings/pci/apple,pcie.yaml | 1 + .../devicetree/bindings/pinctrl/apple,pinctrl.yaml | 1 + .../bindings/power/apple,pmgr-pwrstate.yaml | 1 + .../devicetree/bindings/sound/apple,mca.yaml | 1 + .../devicetree/bindings/watchdog/apple,wdt.yaml | 1 + arch/arm64/boot/dts/apple/Makefile | 3 + arch/arm64/boot/dts/apple/t8112-j413.dts | 63 ++ arch/arm64/boot/dts/apple/t8112-j473.dts | 54 + arch/arm64/boot/dts/apple/t8112-j493.dts | 52 + arch/arm64/boot/dts/apple/t8112-jxxx.dtsi | 81 ++ arch/arm64/boot/dts/apple/t8112-pmgr.dtsi | 1141 ++++++++++++++++++++ arch/arm64/boot/dts/apple/t8112.dtsi | 912 ++++++++++++++++ 22 files changed, 2365 insertions(+), 7 deletions(-) --- base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 change-id: 20230202-asahi-t8112-dt-6fc880c8cd73 Best regards,