diff --git a/Documentation/devicetree/bindings/iommu/apple,dart.yaml b/Documentation/devicetree/bindings/iommu/apple,dart.yaml index 44a0499ada2cbc..ad3f8e90338618 100644 --- a/Documentation/devicetree/bindings/iommu/apple,dart.yaml +++ b/Documentation/devicetree/bindings/iommu/apple,dart.yaml @@ -37,6 +37,7 @@ properties: - enum: - apple,t6020-dart - apple,t8122-dart + - apple,t8132-dart - apple,t8140-dart - apple,t8142-dart - const: apple,t8110-dart diff --git a/Documentation/devicetree/bindings/iommu/apple,sart.yaml b/Documentation/devicetree/bindings/iommu/apple,sart.yaml index 472454c3d24d67..e2e5da6504f11c 100644 --- a/Documentation/devicetree/bindings/iommu/apple,sart.yaml +++ b/Documentation/devicetree/bindings/iommu/apple,sart.yaml @@ -34,6 +34,7 @@ properties: - apple,t6020-sart - apple,t8112-sart - apple,t8122-sart + - apple,t8132-sart - apple,t8140-sart - const: apple,t6000-sart - enum: diff --git a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml index 8d66dc77c0a54e..7e7644c1732e34 100644 --- a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml @@ -31,6 +31,7 @@ properties: - apple,t8103-asc-mailbox - apple,t8112-asc-mailbox - apple,t8122-asc-mailbox + - apple,t8132-asc-mailbox - apple,t8140-asc-mailbox - apple,t8142-asc-mailbox - apple,t6000-asc-mailbox diff --git a/Documentation/devicetree/bindings/mfd/apple,smc.yaml b/Documentation/devicetree/bindings/mfd/apple,smc.yaml index 31d1940f9d3dc0..ff42e94cf252d8 100644 --- a/Documentation/devicetree/bindings/mfd/apple,smc.yaml +++ b/Documentation/devicetree/bindings/mfd/apple,smc.yaml @@ -20,6 +20,7 @@ properties: - enum: - apple,t6020-smc - apple,t8122-smc + - apple,t8132-smc - apple,t8140-smc - apple,t8142-smc - const: apple,t8103-smc diff --git a/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml index 09cdd776f8d8bd..2eecc48c9b0616 100644 --- a/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml @@ -18,6 +18,7 @@ properties: compatible: items: - enum: + - apple,abbey-pmic - apple,baku-pmic - apple,maverick-pmic - apple,sera-pmic diff --git a/Documentation/devicetree/bindings/pci/apple,pcie.yaml b/Documentation/devicetree/bindings/pci/apple,pcie.yaml index df7ef17ae8d2fb..b3234aa02009cd 100644 --- a/Documentation/devicetree/bindings/pci/apple,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/apple,pcie.yaml @@ -56,7 +56,9 @@ properties: - apple,t6000-pcie - const: apple,pcie - items: - - const: apple,t8122-pcie + - enum: + - apple,t8122-pcie + - apple,t8132-pcie - const: apple,t6020-pcie - const: apple,t6020-pcie - const: apple,t8140-pcie @@ -198,6 +200,9 @@ allOf: compatible: contains: const: apple,t6020-pcie + not: + contains: + const: apple,t8132-pcie then: properties: reg-names: @@ -250,7 +255,9 @@ allOf: properties: compatible: contains: - const: apple,t8140-pcie + enum: + - apple,t8132-pcie + - apple,t8140-pcie then: properties: reg: diff --git a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml index f88e21c348667b..931d5c1d369387 100644 --- a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml +++ b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml @@ -25,6 +25,7 @@ properties: - apple,t8012-spmi - apple,t8015-spmi - apple,t8122-spmi + - apple,t8132-spmi - apple,t8140-spmi - const: apple,t8103-spmi - items: diff --git a/arch/arm64/boot/dts/apple/t8132-j773g.dts b/arch/arm64/boot/dts/apple/t8132-j773g.dts index 0583cb9d19f627..8c09229f69f19e 100644 --- a/arch/arm64/boot/dts/apple/t8132-j773g.dts +++ b/arch/arm64/boot/dts/apple/t8132-j773g.dts @@ -15,6 +15,26 @@ / { compatible = "apple,j773g", "apple,t8132", "apple,arm-platform"; model = "Apple Mac mini (M4, 2024)"; + + aliases { + bluetooth0 = &bluetooth0; + ethernet0 = ðernet0; + wifi0 = &wifi0; + }; +}; + +/* + * Persistent console capture for early T8132 bring-up failures. Keep this + * near the top of RAM, outside m1n1's kernel/initramfs load area. + */ +&{/reserved-memory} { + ramoops@103e0000000 { + compatible = "ramoops"; + reg = <0x103 0xe0000000 0x0 0x200000>; + record-size = <0x40000>; + console-size = <0x100000>; + pmsg-size = <0x40000>; + }; }; /* @@ -23,3 +43,144 @@ &framebuffer0 { power-domains = <&ps_dispext0_fe>, <&ps_dptx_phy>; }; + +&smc_mbox { + status = "okay"; +}; + +&smc { + status = "okay"; + + smc_reboot: reboot { + compatible = "apple,smc-reboot"; + nvmem-cells = <&shutdown_flag>, <&boot_stage>, + <&boot_error_count>, <&panic_count>; + nvmem-cell-names = "shutdown_flag", "boot_stage", + "boot_error_count", "panic_count"; + }; + + smc_rtc: rtc { + compatible = "apple,smc-rtc"; + nvmem-cells = <&rtc_offset>; + nvmem-cell-names = "rtc_offset"; + }; +}; + +&nub_spmi { + status = "okay"; + + pmic1: pmic@e { + compatible = "apple,abbey-pmic", "apple,spmi-nvmem"; + reg = <0xe SPMI_USID>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + pm_setting: pm-setting@2001 { + reg = <0x2001 0x1>; + }; + + rtc_offset: rtc-offset@2100 { + reg = <0x2100 0x6>; + }; + + fault_shadow: fault-shadow@867b { + reg = <0x867b 0x10>; + }; + + socd: socd@8b00 { + reg = <0x8b00 0x1800>; + }; + + boot_stage: boot-stage@f801 { + reg = <0xf801 0x1>; + }; + + boot_error_count: boot-error-count@f802,0 { + reg = <0xf802 0x1>; + bits = <0 4>; + }; + + panic_count: panic-count@f802,4 { + reg = <0xf802 0x1>; + bits = <4 4>; + }; + + shutdown_flag: shutdown-flag@f80f,3 { + reg = <0xf80f 0x1>; + bits = <3 1>; + }; + }; + }; +}; + +/* Internal SSD */ + +&ans_mbox { + status = "okay"; +}; + +&sart { + status = "okay"; +}; + +&nvme { + status = "okay"; +}; + +/* + * Internal PCIe: Wi-Fi and Bluetooth (BCM4388) on port 0 and Ethernet on + * port 2 (an AQC113 on the 10 Gb Ethernet model). Port 1 is not wired. + * Fixed bus numbers let the device nodes below carry the MAC and + * Bluetooth addresses and the calibration the loader fills in. + */ + +&pcie0 { + iommu-map = <0x100 &pcie0_dart 1 1>, + <0x200 &pcie2_dart 1 1>; + status = "okay"; +}; + +&pcie0_dart { + status = "okay"; +}; + +&pcie2_dart { + status = "okay"; +}; + +&pcie0_port0 { + pwren-gpios = <&smc_gpio 19 GPIO_ACTIVE_HIGH>; + bus-range = <1 1>; + status = "okay"; + + wifi0: wifi@0,0 { + compatible = "pci14e4,4434"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + /* To be filled by the loader */ + local-mac-address = [00 00 00 00 00 00]; + apple,antenna-sku = "XX"; + brcm,board-type = "apple,sakhalin"; + }; + + bluetooth0: bluetooth@0,1 { + compatible = "pci14e4,5f72"; + reg = <0x10100 0x0 0x0 0x0 0x0>; + /* To be filled by the loader */ + local-bd-address = [00 00 00 00 00 00]; + brcm,board-type = "apple,sakhalin"; + }; +}; + +&pcie0_port2 { + bus-range = <2 2>; + status = "okay"; + + ethernet0: ethernet@0,0 { + reg = <0x20000 0x0 0x0 0x0 0x0>; + /* To be filled by the loader */ + local-mac-address = [00 10 18 00 00 00]; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t8132.dtsi b/arch/arm64/boot/dts/apple/t8132.dtsi index afec92a0601562..8f37fe7d12a2de 100644 --- a/arch/arm64/boot/dts/apple/t8132.dtsi +++ b/arch/arm64/boot/dts/apple/t8132.dtsi @@ -5,9 +5,11 @@ * Copyright The Asahi Linux Contributors */ +#include #include #include #include +#include / { compatible = "apple,t8132", "apple,arm-platform"; @@ -196,6 +198,8 @@ ranges; nonposted-mmio; + /* Required to get >32-bit DMA via DARTs */ + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; pmgr: power-management@380700000 { compatible = "apple,t8132-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; @@ -352,6 +356,13 @@ pinmux = , ; }; + + pcie_pins: pcie-pins { + /* CLKREQ# of ports 0-2 */ + pinmux = , + , + ; + }; }; i2c0: i2c@3ad010000 { @@ -451,6 +462,222 @@ status = "disabled"; }; + + nub_spmi: spmi@388714000 { + compatible = "apple,t8132-spmi", "apple,t8103-spmi"; + reg = <0x3 0x88714000 0x0 0x100>; + #address-cells = <2>; + #size-cells = <0>; + power-domains = <&ps_nub_spmi0>; + status = "disabled"; + }; + + smc_mbox: mailbox@38c608000 { + compatible = "apple,t8132-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x3 0x8c608000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + status = "disabled"; + }; + + smc: smc@38c600000 { + compatible = "apple,t8132-smc", "apple,t8103-smc"; + reg = <0x3 0x8c600000 0x0 0x4000>, + <0x3 0x8de00000 0x0 0x100000>; + reg-names = "smc", "sram"; + mboxes = <&smc_mbox>; + status = "disabled"; + + smc_gpio: gpio { + compatible = "apple,smc-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + }; + + ans_mbox: mailbox@481608000 { + compatible = "apple,t8132-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x4 0x81608000 0x0 0x4000>; + + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + + #mbox-cells = <0>; + power-domains = <&ps_ans>; + status = "disabled"; + }; + + sart: iommu@485c50000 { + compatible = "apple,t8132-sart", "apple,t6000-sart"; + reg = <0x4 0x85c50000 0x0 0x10000>; + power-domains = <&ps_ans>; + status = "disabled"; + }; + + nvme: nvme@4c5cc0000 { + compatible = "apple,t8132-nvme-ans2"; + /* + * ADT reg[9] is the controller window and reg[3] the + * NVMMU. The controller window also aliases the NVMMU + * registers, which older kernels use. + */ + reg = <0x4 0xc5cc0000 0x0 0x60000>, + <0x4 0x81600000 0x0 0x4000>, + <0x4 0x85cc0000 0x0 0x60000>; + reg-names = "nvme", "ans", "nvmmu"; + + interrupt-parent = <&aic>; + interrupts = ; + + mboxes = <&ans_mbox>; + + power-domains = <&ps_ans>, <&ps_apcie_sys_st>; + power-domain-names = "ans", "apcie0"; + resets = <&ps_ans>; + + apple,sart = <&sart>; + status = "disabled"; + }; + + pcie0_dart: iommu@490000000 { + compatible = "apple,t8132-dart", "apple,t8110-dart"; + reg = <0x4 0x90000000 0x0 0xc000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_apcie_gp>; + status = "disabled"; + }; + + pcie1_dart: iommu@491000000 { + compatible = "apple,t8132-dart", "apple,t8110-dart"; + reg = <0x4 0x91000000 0x0 0xc000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_apcie_gp>; + status = "disabled"; + }; + + pcie2_dart: iommu@492000000 { + compatible = "apple,t8132-dart", "apple,t8110-dart"; + reg = <0x4 0x92000000 0x0 0xc000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_apcie_gp>; + status = "disabled"; + }; + + pcie0: pcie@1cb0000000 { + compatible = "apple,t8132-pcie", "apple,t6020-pcie"; + device_type = "pci"; + + reg = <0x1c 0xb0000000 0x0 0x1000000>, + <0x4 0x94000000 0x0 0x4000>, + <0x4 0x90028000 0x0 0x4000>, + <0x4 0x91028000 0x0 0x4000>, + <0x4 0x92028000 0x0 0x4000>, + <0x4 0x97020000 0x0 0x4000>, + <0x4 0x97024000 0x0 0x4000>, + <0x4 0x97028000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "port1", "port2", + "phy0", "phy1", "phy2"; + + interrupt-parent = <&aic>; + interrupts = , + , + ; + + msi-controller; + msi-parent = <&pcie0>; + msi-ranges = <&aic AIC_IRQ 1506 IRQ_TYPE_EDGE_RISING 32>; + + /* Boards map the requester IDs of the ports they use. */ + iommu-map-mask = <0xff00>; + + bus-range = <0 3>; + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x43000000 0xb 0xc0000000 0xb 0xc0000000 0x0 0x20000000>, + <0x02000000 0x0 0x80000000 0xb 0x80000000 0x0 0x40000000>; + + power-domains = <&ps_apcie_phy_sw>; + pinctrl-0 = <&pcie_pins>; + pinctrl-names = "default"; + status = "disabled"; + + pcie0_port0: pci@0,0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + reset-gpios = <&pinctrl_ap 163 GPIO_ACTIVE_LOW>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie0_port0 0 0 0 0>, + <0 0 0 2 &pcie0_port0 0 0 0 1>, + <0 0 0 3 &pcie0_port0 0 0 0 2>, + <0 0 0 4 &pcie0_port0 0 0 0 3>; + status = "disabled"; + }; + + pcie0_port1: pci@1,0 { + device_type = "pci"; + reg = <0x800 0x0 0x0 0x0 0x0>; + reset-gpios = <&pinctrl_ap 164 GPIO_ACTIVE_LOW>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie0_port1 0 0 0 0>, + <0 0 0 2 &pcie0_port1 0 0 0 1>, + <0 0 0 3 &pcie0_port1 0 0 0 2>, + <0 0 0 4 &pcie0_port1 0 0 0 3>; + status = "disabled"; + }; + + pcie0_port2: pci@2,0 { + device_type = "pci"; + reg = <0x1000 0x0 0x0 0x0 0x0>; + reset-gpios = <&pinctrl_ap 165 GPIO_ACTIVE_LOW>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie0_port2 0 0 0 0>, + <0 0 0 2 &pcie0_port2 0 0 0 1>, + <0 0 0 3 &pcie0_port2 0 0 0 2>, + <0 0 0 4 &pcie0_port2 0 0 0 3>; + status = "disabled"; + }; + }; }; timer {