diff --git a/arch/arm64/boot/dts/apple/Makefile b/arch/arm64/boot/dts/apple/Makefile index 52b15f4bdb8cb..7a628213c726e 100644 --- a/arch/arm64/boot/dts/apple/Makefile +++ b/arch/arm64/boot/dts/apple/Makefile @@ -120,3 +120,9 @@ dtb-$(CONFIG_ARCH_APPLE) += t8142-j813.dtb dtb-$(CONFIG_ARCH_APPLE) += t8152-j873g.dtb # Explicit cold-ANE lead test; never select as the production board DTB. + +dtb-$(CONFIG_ARCH_APPLE) += t6040-j773s.dtb + +dtb-$(CONFIG_ARCH_APPLE) += t6041-j614c.dtb + +dtb-$(CONFIG_ARCH_APPLE) += t6041-j575c.dtb diff --git a/arch/arm64/boot/dts/apple/t6040-j773s-audio.dtsi b/arch/arm64/boot/dts/apple/t6040-j773s-audio.dtsi new file mode 100644 index 0000000000000..9ea4cfa8f9963 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6040-j773s-audio.dtsi @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* J773S audio endpoints. Keep the routes and hardware disabled until qualified. */ + +#include +#include + +/ { + speaker_sdz: regulator-speaker-sdz { + compatible = "regulator-fixed"; + regulator-name = "speaker-sdz"; + gpios = <&pinctrl_ap 54 GPIO_ACTIVE_HIGH>; + enable-active-high; + status = "disabled"; + }; +}; + +&i2c1 { + audio_speaker: codec@38 { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x38>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + interrupts-extended = <&pinctrl_ap 55 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + }; + +}; + +&i2c2 { + audio_codec_output: codec@4b { + compatible = "cirrus,cs42l84"; + reg = <0x4b>; + #sound-dai-cells = <0>; + reset-gpios = <&pinctrl_nub 58 GPIO_ACTIVE_HIGH>; + interrupts-extended = <&pinctrl_ap 106 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + }; + +}; diff --git a/arch/arm64/boot/dts/apple/t6040-j773s.dts b/arch/arm64/boot/dts/apple/t6040-j773s.dts new file mode 100644 index 0000000000000..56f009733998b --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6040-j773s.dts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* Apple Mac mini (M4 Pro, 2024). Unqualified peripherals remain disabled. */ + +/dts-v1/; + +#include "t6040.dtsi" + +/ { + compatible = "apple,j773s", "apple,t6040", "apple,arm-platform"; + model = "Apple Mac mini (M4 Pro, 2024)"; + chassis-type = "desktop"; + + aliases { + serial0 = &serial0; + sep = &sep; + pmp = &pmp; + gpu = &gpu; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + stdout-path = "serial0:115200n8"; + + framebuffer0: framebuffer@0 { + compatible = "apple,simple-framebuffer", "simple-framebuffer"; + reg = <0 0 0 0>; + /* The loader supplies this boot's framebuffer allocation. */ + status = "disabled"; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + /* Runtime firmware reservations are supplied by the loader. */ + }; + + memory@0 { + device_type = "memory"; + reg = <0 0 0 0>; /* Filled by the loader. */ + }; +}; + +&serial0 { + status = "okay"; +}; + +/* These endpoints belong to the laptop board, not the Mac mini. */ +/delete-node/ &battery_monitor; +/delete-node/ &hid_mux; +/delete-node/ &audio_low_power_mic; +/delete-node/ &audio_mic_buffer; +/delete-node/ &audio_listening_client; + +#include "t6040-j773s-audio.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi index 53e986ddbf96b..b4784cdfde877 100644 --- a/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi @@ -1,351 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT -/* - * Structural hardware resources from the board's saved Apple Device Tree. - * Keep unqualified blocks disabled: describing them does not transfer - * ownership from firmware or make their registers safe to access. - */ +#include "t604x-peripherals.dtsi" -/ { - - /* ADT /arm-io/dwi. */ - dwi: dwi@5029b0000 { - compatible = "apple,t6041-dwi", "apple,dwi"; - reg = <0x5 0x029b0000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_dwi>; - status = "disabled"; - }; - - /* ADT /arm-io/aes. */ - aes: crypto@42900c000 { - compatible = "apple,t6041-aes", "apple,aes"; - reg = <0x4 0x2900c000 0x0 0x4000>, - <0x5 0x08340000 0x0 0x8000>, - <0x5 0x08090000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_aes>; - iommus = <&sio_dart 1>; - status = "disabled"; - }; - - /* ADT /arm-io/aon-ptd. */ - aon_ptd: aon-ptd@50cdc0000 { - compatible = "apple,t6041-aon-ptd", "apple,aon-ptd"; - reg = <0x5 0x0cdc0000 0x0 0x4000>, - <0x5 0x0cdd0000 0x0 0x4000>, - <0x5 0x0cdd8000 0x0 0x4000>, - <0x5 0x0cde0000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - ; - status = "disabled"; - }; - - /* ADT /arm-io/scaler0. */ - scaler0: scaler@521000000 { - compatible = "apple,t6041-scaler", "apple,scaler"; - reg = <0x5 0x21000000 0x0 0x38000>, - <0x5 0x21210000 0x0 0x4000>, - <0x5 0x21204000 0x0 0x4000>, - <0x5 0x20000000 0x0 0x8000>; - interrupt-parent = <&aic>; - interrupts = , - ; - power-domains = <&ps_msr0>, - <&ps_msr0_ase_core>; - iommus = <&scaler0_dart 0>, - <&scaler0_dart 1>; - clocks = <&peripheral_clocks 417>; - resets = <&ps_msr0>; - status = "disabled"; - }; - - /* ADT /arm-io/aic-timebase. */ - aic_timebase: aic-timebase@502580000 { - compatible = "apple,t6041-aic-timebase", "apple,aic-timebase"; - reg = <0x5 0x02580000 0x0 0x1000>; - status = "disabled"; - }; - - /* ADT /arm-io/dbgCPU. */ - cpu_debug: cpu-debug@508700000 { - compatible = "apple,t6041-cpu-debug", "apple,cpu-debug"; - reg = <0x5 0x08700000 0x0 0x28000>, - <0x5 0x085c0000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/apcie0-piodma. */ - apcie0_piodma: dma@410030000 { - compatible = "apple,t6041-pcie-piodma", "apple,pcie-piodma"; - reg = <0x4 0x10030000 0x0 0x4000>, - <0x4 0x10034000 0x0 0x4000>, - <0x4 0x10038000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&pcie_dart 17>; - status = "disabled"; - }; - - /* ADT /arm-io/apcie1-piodma. */ - apcie1_piodma: dma@411030000 { - compatible = "apple,t6041-pcie-piodma", "apple,pcie-piodma"; - reg = <0x4 0x11030000 0x0 0x4000>, - <0x4 0x11034000 0x0 0x4000>, - <0x4 0x11038000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apcie1_dart 17>; - status = "disabled"; - }; - - /* ADT /arm-io/apciec0-piodma. */ - apciec0_piodma: dma@384068000 { - compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; - reg = <0x3 0x84068000 0x0 0x4000>, - <0x3 0x8406c000 0x0 0x4000>, - <0x3 0x84070000 0x0 0x4000>, - <0x3 0x8403c000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apciec0_dart 254>; - status = "disabled"; - }; - - /* ADT /arm-io/apciec1-piodma. */ - apciec1_piodma: dma@38c068000 { - compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; - reg = <0x3 0x8c068000 0x0 0x4000>, - <0x3 0x8c06c000 0x0 0x4000>, - <0x3 0x8c070000 0x0 0x4000>, - <0x3 0x8c03c000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apciec1_dart 254>; - status = "disabled"; - }; - - /* ADT /arm-io/apciec2-piodma. */ - apciec2_piodma: dma@394068000 { - compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; - reg = <0x3 0x94068000 0x0 0x4000>, - <0x3 0x9406c000 0x0 0x4000>, - <0x3 0x94070000 0x0 0x4000>, - <0x3 0x9403c000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apciec2_dart 254>; - status = "disabled"; - }; - - /* ADT /arm-io/apr0. */ - apr0: video-codec@301000000 { - compatible = "apple,t6041-prores", "apple,prores"; - reg = <0x3 0x01000000 0x0 0x4000>, - <0x3 0x00000000 0x0 0x1000000>, - <0x3 0x010c0000 0x0 0x4000>; - reg-names = "core", "wrapper", "aux"; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_scodec>; - iommus = <&apr0_dart 1>; - resets = <&ps_scodec>; - status = "disabled"; - }; - - /* ADT /arm-io/atc0-dpin0. */ - atc0_dpin0: dpin@381e50000 { - compatible = "apple,t6041-dpin", "apple,dpin"; - reg = <0x3 0x81e50000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/atc0-dpin1. */ - atc0_dpin1: dpin@381e58000 { - compatible = "apple,t6041-dpin", "apple,dpin"; - reg = <0x3 0x81e58000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/atc1-dpin0. */ - atc1_dpin0: dpin@389e50000 { - compatible = "apple,t6041-dpin", "apple,dpin"; - reg = <0x3 0x89e50000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/atc1-dpin1. */ - atc1_dpin1: dpin@389e58000 { - compatible = "apple,t6041-dpin", "apple,dpin"; - reg = <0x3 0x89e58000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/atc2-dpin0. */ - atc2_dpin0: dpin@391e50000 { - compatible = "apple,t6041-dpin", "apple,dpin"; - reg = <0x3 0x91e50000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/atc2-dpin1. */ - atc2_dpin1: dpin@391e58000 { - compatible = "apple,t6041-dpin", "apple,dpin"; - reg = <0x3 0x91e58000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/dcp0-expert. */ - dcp_expert: display-expert@4023a8050 { - compatible = "apple,t6041-dcp-expert", "apple,dcp-expert"; - reg = <0x4 0x023a8050 0x0 0x4>, - <0x4 0x02374000 0x0 0x40>, - <0x4 0x02370000 0x0 0x40>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/dcpext0-expert. */ - dcpext0_expert: display-expert@3a23a8050 { - compatible = "apple,t6041-dcp-expert", "apple,dcp-expert"; - reg = <0x3 0xa23a8050 0x0 0x4>, - <0x3 0xa2374000 0x0 0x40>, - <0x3 0xa2370000 0x0 0x40>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* ADT /arm-io/dcpext1-expert. */ - dcpext1_expert: display-expert@6023a8050 { - compatible = "apple,t6041-dcp-expert", "apple,dcp-expert"; - reg = <0x6 0x023a8050 0x0 0x4>, - <0x6 0x02374000 0x0 0x40>, - <0x6 0x02370000 0x0 0x40>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - /* Clock IDs are SoC hardware selectors, not ADT phandles. */ - peripheral_clocks: clock-controller@502800000 { - compatible = "apple,t6041-pmgr-clocks", "apple,pmgr-clocks"; - /* ADT /arm-io/pmgr register banks, in hardware-description order. */ - reg = <0x5 0x02800000 0x0 0x1e0000>, - <0x5 0x08300000 0x0 0x80000>, - <0x5 0x02280000 0x0 0x100000>, - <0x5 0x00000000 0x0 0x80000>, - <0x5 0x08200000 0x0 0x80000>, - <0x5 0x08004000 0x0 0x1000>, - <0x2 0x10e20000 0x0 0x2000>, - <0x2 0x10050000 0x0 0xef1000>, - <0x2 0x10e40000 0x0 0x9000>, - <0x2 0x10e50000 0x0 0xe81000>, - <0x2 0x10e70000 0x0 0x1000>, - <0x2 0x10050000 0x0 0x10000>, - <0x2 0x10150000 0x0 0x10000>, - <0x2 0x10250000 0x0 0x10000>, - <0x2 0x10350000 0x0 0x10000>, - <0x2 0x11e20000 0x0 0x2000>, - <0x2 0x11050000 0x0 0xef1000>, - <0x2 0x11e40000 0x0 0xb000>, - <0x2 0x11e50000 0x0 0xe81000>, - <0x2 0x11e70000 0x0 0x1000>, - <0x2 0x11050000 0x0 0x10000>, - <0x2 0x11150000 0x0 0x10000>, - <0x2 0x11250000 0x0 0x10000>, - <0x2 0x11350000 0x0 0x10000>, - <0x2 0x11450000 0x0 0x10000>, - <0x2 0x11550000 0x0 0x10000>, - <0x2 0x12e20000 0x0 0x2000>, - <0x2 0x12050000 0x0 0xef1000>, - <0x2 0x12e40000 0x0 0xb000>, - <0x2 0x12e50000 0x0 0xe81000>, - <0x2 0x12e70000 0x0 0x1000>, - <0x2 0x12050000 0x0 0x10000>, - <0x2 0x12150000 0x0 0x10000>, - <0x2 0x12250000 0x0 0x10000>, - <0x2 0x12350000 0x0 0x10000>, - <0x2 0x12450000 0x0 0x10000>, - <0x2 0x12550000 0x0 0x10000>, - <0x5 0x02800000 0x0 0x18000>, - <0x5 0x0282c000 0x0 0x4000>, - <0x5 0x02850000 0x0 0x4000>, - <0x5 0x02880000 0x0 0x1c000>, - <0x5 0x02900000 0x0 0x24000>, - <0x5 0x028f0000 0x0 0x4000>, - <0x5 0x028e0000 0x0 0x4000>, - <0x5 0x02820000 0x0 0x4000>, - <0x5 0x08330000 0x0 0x10000>, - <0x5 0x08374000 0x0 0x4000>, - <0x5 0x08360000 0x0 0x4000>, - <0x5 0x00200000 0x0 0x8000>, - <0x5 0x00400000 0x0 0x34000>, - <0x5 0x003c0000 0x0 0x30000>, - <0x5 0x08800000 0x0 0xa8000>, - <0x4 0x85878000 0x0 0x4000>, - <0x2 0x88eb0000 0x0 0x4000>, - <0x2 0x88e80000 0x0 0x30000>, - <0x5 0x08900000 0x0 0x18000>, - <0x5 0x00210000 0x0 0x8000>, - <0x5 0x0020c000 0x0 0x4000>, - <0x5 0x08004000 0x0 0x1000>, - <0x5 0x0007a000 0x0 0x4000>, - <0x5 0x04000000 0x0 0x1000000>, - <0x2 0x88e1c000 0x0 0x4000>, - <0x5 0x022a0000 0x0 0x4000>; - #clock-cells = <1>; - apple,pmgr = <&pmgr>; - status = "disabled"; - }; -}; / { @@ -383,11 +38,7 @@ }; -&aon_ptd { - interrupt-controller; - #interrupt-cells = <1>; - #address-cells = <0>; -}; + &nub_spmi0 { battery_monitor: battery-monitor@b { diff --git a/arch/arm64/boot/dts/apple/t6041-j575c-audio.dtsi b/arch/arm64/boot/dts/apple/t6041-j575c-audio.dtsi new file mode 100644 index 0000000000000..91db5b39d176e --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j575c-audio.dtsi @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* J575C audio endpoints. Keep the routes and hardware disabled until qualified. */ + +#include +#include + +/ { + speaker_sdz: regulator-speaker-sdz { + compatible = "regulator-fixed"; + regulator-name = "speaker-sdz"; + gpios = <&pinctrl_ap 54 GPIO_ACTIVE_HIGH>; + enable-active-high; + status = "disabled"; + }; +}; + +&i2c1 { + audio_speaker: codec@38 { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x38>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + interrupts-extended = <&pinctrl_ap 55 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + }; + +}; + +&i2c2 { + audio_codec_output: codec@4b { + compatible = "cirrus,cs42l84"; + reg = <0x4b>; + #sound-dai-cells = <0>; + reset-gpios = <&pinctrl_nub 58 GPIO_ACTIVE_HIGH>; + interrupts-extended = <&pinctrl_ap 106 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + }; + +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j575c.dts b/arch/arm64/boot/dts/apple/t6041-j575c.dts new file mode 100644 index 0000000000000..21cb2671836e1 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j575c.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* Apple Mac Studio (M4 Max, 2025). Unqualified peripherals remain disabled. */ + +/dts-v1/; + +#include "t6041.dtsi" + +/ { + compatible = "apple,j575c", "apple,t6041", "apple,arm-platform"; + model = "Apple Mac Studio (M4 Max, 2025)"; + chassis-type = "desktop"; + + aliases { + serial0 = &serial0; + sep = &sep; + pmp = &pmp; + gpu = &gpu; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + stdout-path = "serial0:115200n8"; + + framebuffer0: framebuffer@0 { + compatible = "apple,simple-framebuffer", "simple-framebuffer"; + reg = <0 0 0 0>; + /* The loader supplies this boot's framebuffer allocation. */ + status = "disabled"; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + /* Runtime firmware reservations are supplied by the loader. */ + }; + + memory@0 { + device_type = "memory"; + reg = <0 0 0 0>; /* Filled by the loader. */ + }; +}; + +&serial0 { + status = "okay"; +}; + +/* The Max console has the same register interface as the Pro. */ +&serial0 { + reg = <0x4 0x29200000 0 0x4000>; +}; + +#include "t6041-j575c-audio.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6041-j614c-audio.dtsi b/arch/arm64/boot/dts/apple/t6041-j614c-audio.dtsi new file mode 100644 index 0000000000000..04e7cafc1087f --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j614c-audio.dtsi @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* J614C audio endpoints. Keep the routes and hardware disabled until qualified. */ + +#include +#include + +/ { + speaker_sdz: regulator-speaker-sdz { + compatible = "regulator-fixed"; + regulator-name = "speaker-sdz"; + gpios = <&pinctrl_ap 54 GPIO_ACTIVE_HIGH>; + enable-active-high; + status = "disabled"; + }; +}; + +&i2c1 { + audio_speaker: codec@38 { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x38>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + interrupts-extended = <&pinctrl_ap 55 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + }; + + audio_speaker_left_woofer_2: codec@39 { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x39>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + status = "disabled"; + }; + + audio_speaker_left_tweeter: codec@3a { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3a>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + status = "disabled"; + }; + +}; + +&i2c2 { + audio_codec_output: codec@4b { + compatible = "cirrus,cs42l84"; + reg = <0x4b>; + #sound-dai-cells = <0>; + reset-gpios = <&pinctrl_nub 58 GPIO_ACTIVE_HIGH>; + interrupts-extended = <&pinctrl_ap 106 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + }; + +}; + +&i2c3 { + audio_speaker_right_woofer_1: codec@3b { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3b>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + status = "disabled"; + }; + + audio_speaker_right_woofer_2: codec@3c { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3c>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + status = "disabled"; + }; + + audio_speaker_right_tweeter: codec@3d { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3d>; + #sound-dai-cells = <0>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + status = "disabled"; + }; + +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j614c.dts b/arch/arm64/boot/dts/apple/t6041-j614c.dts new file mode 100644 index 0000000000000..c92c8e68c4d2d --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j614c.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* Apple MacBook Pro (14-inch, M4 Max, 2024). Unqualified peripherals remain disabled. */ + +/dts-v1/; + +#include "t6041.dtsi" + +/ { + compatible = "apple,j614c", "apple,t6041", "apple,arm-platform"; + model = "Apple MacBook Pro (14-inch, M4 Max, 2024)"; + chassis-type = "laptop"; + + aliases { + serial0 = &serial0; + sep = &sep; + pmp = &pmp; + gpu = &gpu; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + stdout-path = "serial0:115200n8"; + + framebuffer0: framebuffer@0 { + compatible = "apple,simple-framebuffer", "simple-framebuffer"; + reg = <0 0 0 0>; + /* The loader supplies this boot's framebuffer allocation. */ + status = "disabled"; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + /* Runtime firmware reservations are supplied by the loader. */ + }; + + memory@0 { + device_type = "memory"; + reg = <0 0 0 0>; /* Filled by the loader. */ + }; +}; + +&serial0 { + status = "okay"; +}; + +/* The Max console has the same register interface as the Pro. */ +&serial0 { + reg = <0x4 0x29200000 0 0x4000>; +}; + +#include "t6041-j614c-audio.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6041-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6041-peripherals.dtsi new file mode 100644 index 0000000000000..0eb07eb6b82f0 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-peripherals.dtsi @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/* Restore disabled providers for the shared T604x resource descriptions. */ + +&pmgr_aux { + ps_msr0: power-controller@470 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x470 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "msr0"; + power-domains = <&ps_fab5_soc>; + status = "disabled"; + }; +}; + +&pmgr_aux { + ps_scodec: power-controller@328 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x328 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "scodec"; + power-domains = <&ps_fab1_soc>; + status = "disabled"; + }; +}; + +/ { + apcie1_dart: iommu@411000000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x4 0x11000000 0x0 0x20000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; +}; + +&pmgr_aux { + ps_fab1_soc: power-controller@2d0 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2d0 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "fab1_soc"; + power-domains = <&ps_afi>; + status = "disabled"; + }; +}; + +/ { + apciec0_dart: iommu@384000000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x3 0x84000000 0x0 0x20000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; +}; + +/ { + sio_dart: iommu@429060000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x4 0x29060000 0x0 0x20000>; + #iommu-cells = <1>; + apple,dma-range = <0x100 0x1c000 0x2ff 0xfffe4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_sio>; + status = "disabled"; + }; +}; + +&pmgr { + ps_aes: power-controller@1b0 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1b0 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "aes"; + power-domains = <&ps_sio>; + status = "disabled"; + }; +}; + +&pmgr_aux { + ps_dwi: power-controller@108 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x108 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "dwi"; + status = "disabled"; + }; +}; + +/ { + scaler0_dart: iommu@521260000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x5 0x21260000 0x0 0xc000>; + #iommu-cells = <1>; + apple,dma-range = <0x100 0x0 0x300 0x0>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_msr0>; + status = "disabled"; + }; +}; + +/ { + apciec2_dart: iommu@394000000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x3 0x94000000 0x0 0x20000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; +}; + +&pmgr_aux { + ps_msr0_ase_core: power-controller@478 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x478 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "msr0_ase_core"; + power-domains = <&ps_msr0>; + status = "disabled"; + }; +}; + +/ { + apr0_dart: iommu@301020000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x3 0x01020000 0x0 0xc000>; + #iommu-cells = <1>; + apple,dma-range = <0x100 0x0 0x300 0x0>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_scodec>; + status = "disabled"; + }; +}; + +/ { + apciec1_dart: iommu@38c000000 { + compatible = "apple,t6041-dart", "apple,t8110-dart"; + reg = <0x3 0x8c000000 0x0 0x20000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; +}; + +&pmgr_aux { + ps_fab5_soc: power-controller@440 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x440 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "fab5_soc"; + power-domains = <&ps_afi>; + status = "disabled"; + }; +}; + +#include "t604x-peripherals.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6041.dtsi b/arch/arm64/boot/dts/apple/t6041.dtsi index 094a7c4bd8fa6..f0e7f6f29cd16 100644 --- a/arch/arm64/boot/dts/apple/t6041.dtsi +++ b/arch/arm64/boot/dts/apple/t6041.dtsi @@ -664,3 +664,5 @@ <0x2 0x2a080000 0x0 0x4000>, <0x2 0x2a0c0000 0x0 0x4000>; }; + +#include "t6041-peripherals.dtsi" diff --git a/arch/arm64/boot/dts/apple/t604x-peripherals.dtsi b/arch/arm64/boot/dts/apple/t604x-peripherals.dtsi new file mode 100644 index 0000000000000..5d251ba48794f --- /dev/null +++ b/arch/arm64/boot/dts/apple/t604x-peripherals.dtsi @@ -0,0 +1,354 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/* + * Structural hardware resources from the board's saved Apple Device Tree. + * Keep unqualified blocks disabled: describing them does not transfer + * ownership from firmware or make their registers safe to access. + */ + +/ { + + /* ADT /arm-io/dwi. */ + dwi: dwi@5029b0000 { + compatible = "apple,t6041-dwi", "apple,dwi"; + reg = <0x5 0x029b0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_dwi>; + status = "disabled"; + }; + + /* ADT /arm-io/aes. */ + aes: crypto@42900c000 { + compatible = "apple,t6041-aes", "apple,aes"; + reg = <0x4 0x2900c000 0x0 0x4000>, + <0x5 0x08340000 0x0 0x8000>, + <0x5 0x08090000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_aes>; + iommus = <&sio_dart 1>; + status = "disabled"; + }; + + /* ADT /arm-io/aon-ptd. */ + aon_ptd: aon-ptd@50cdc0000 { + compatible = "apple,t6041-aon-ptd", "apple,aon-ptd"; + reg = <0x5 0x0cdc0000 0x0 0x4000>, + <0x5 0x0cdd0000 0x0 0x4000>, + <0x5 0x0cdd8000 0x0 0x4000>, + <0x5 0x0cde0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + status = "disabled"; + }; + + /* ADT /arm-io/scaler0. */ + scaler0: scaler@521000000 { + compatible = "apple,t6041-scaler", "apple,scaler"; + reg = <0x5 0x21000000 0x0 0x38000>, + <0x5 0x21210000 0x0 0x4000>, + <0x5 0x21204000 0x0 0x4000>, + <0x5 0x20000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr0>, + <&ps_msr0_ase_core>; + iommus = <&scaler0_dart 0>, + <&scaler0_dart 1>; + clocks = <&peripheral_clocks 417>; + resets = <&ps_msr0>; + status = "disabled"; + }; + + /* ADT /arm-io/aic-timebase. */ + aic_timebase: aic-timebase@502580000 { + compatible = "apple,t6041-aic-timebase", "apple,aic-timebase"; + reg = <0x5 0x02580000 0x0 0x1000>; + status = "disabled"; + }; + + /* ADT /arm-io/dbgCPU. */ + cpu_debug: cpu-debug@508700000 { + compatible = "apple,t6041-cpu-debug", "apple,cpu-debug"; + reg = <0x5 0x08700000 0x0 0x28000>, + <0x5 0x085c0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/apcie0-piodma. */ + apcie0_piodma: dma@410030000 { + compatible = "apple,t6041-pcie-piodma", "apple,pcie-piodma"; + reg = <0x4 0x10030000 0x0 0x4000>, + <0x4 0x10034000 0x0 0x4000>, + <0x4 0x10038000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&pcie_dart 17>; + status = "disabled"; + }; + + /* ADT /arm-io/apcie1-piodma. */ + apcie1_piodma: dma@411030000 { + compatible = "apple,t6041-pcie-piodma", "apple,pcie-piodma"; + reg = <0x4 0x11030000 0x0 0x4000>, + <0x4 0x11034000 0x0 0x4000>, + <0x4 0x11038000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apcie1_dart 17>; + status = "disabled"; + }; + + /* ADT /arm-io/apciec0-piodma. */ + apciec0_piodma: dma@384068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x84068000 0x0 0x4000>, + <0x3 0x8406c000 0x0 0x4000>, + <0x3 0x84070000 0x0 0x4000>, + <0x3 0x8403c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec0_dart 254>; + status = "disabled"; + }; + + /* ADT /arm-io/apciec1-piodma. */ + apciec1_piodma: dma@38c068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x8c068000 0x0 0x4000>, + <0x3 0x8c06c000 0x0 0x4000>, + <0x3 0x8c070000 0x0 0x4000>, + <0x3 0x8c03c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec1_dart 254>; + status = "disabled"; + }; + + /* ADT /arm-io/apciec2-piodma. */ + apciec2_piodma: dma@394068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x94068000 0x0 0x4000>, + <0x3 0x9406c000 0x0 0x4000>, + <0x3 0x94070000 0x0 0x4000>, + <0x3 0x9403c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec2_dart 254>; + status = "disabled"; + }; + + /* ADT /arm-io/apr0. */ + apr0: video-codec@301000000 { + compatible = "apple,t6041-prores", "apple,prores"; + reg = <0x3 0x01000000 0x0 0x4000>, + <0x3 0x00000000 0x0 0x1000000>, + <0x3 0x010c0000 0x0 0x4000>; + reg-names = "core", "wrapper", "aux"; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_scodec>; + iommus = <&apr0_dart 1>; + resets = <&ps_scodec>; + status = "disabled"; + }; + + /* ADT /arm-io/atc0-dpin0. */ + atc0_dpin0: dpin@381e50000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x81e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc0-dpin1. */ + atc0_dpin1: dpin@381e58000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x81e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc1-dpin0. */ + atc1_dpin0: dpin@389e50000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x89e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc1-dpin1. */ + atc1_dpin1: dpin@389e58000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x89e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc2-dpin0. */ + atc2_dpin0: dpin@391e50000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x91e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc2-dpin1. */ + atc2_dpin1: dpin@391e58000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x91e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/dcp0-expert. */ + dcp_expert: display-expert@4023a8050 { + compatible = "apple,t6041-dcp-expert", "apple,dcp-expert"; + reg = <0x4 0x023a8050 0x0 0x4>, + <0x4 0x02374000 0x0 0x40>, + <0x4 0x02370000 0x0 0x40>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/dcpext0-expert. */ + dcpext0_expert: display-expert@3a23a8050 { + compatible = "apple,t6041-dcp-expert", "apple,dcp-expert"; + reg = <0x3 0xa23a8050 0x0 0x4>, + <0x3 0xa2374000 0x0 0x40>, + <0x3 0xa2370000 0x0 0x40>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/dcpext1-expert. */ + dcpext1_expert: display-expert@6023a8050 { + compatible = "apple,t6041-dcp-expert", "apple,dcp-expert"; + reg = <0x6 0x023a8050 0x0 0x4>, + <0x6 0x02374000 0x0 0x40>, + <0x6 0x02370000 0x0 0x40>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* Clock IDs are SoC hardware selectors, not ADT phandles. */ + peripheral_clocks: clock-controller@502800000 { + compatible = "apple,t6041-pmgr-clocks", "apple,pmgr-clocks"; + /* ADT /arm-io/pmgr register banks, in hardware-description order. */ + reg = <0x5 0x02800000 0x0 0x1e0000>, + <0x5 0x08300000 0x0 0x80000>, + <0x5 0x02280000 0x0 0x100000>, + <0x5 0x00000000 0x0 0x80000>, + <0x5 0x08200000 0x0 0x80000>, + <0x5 0x08004000 0x0 0x1000>, + <0x2 0x10e20000 0x0 0x2000>, + <0x2 0x10050000 0x0 0xef1000>, + <0x2 0x10e40000 0x0 0x9000>, + <0x2 0x10e50000 0x0 0xe81000>, + <0x2 0x10e70000 0x0 0x1000>, + <0x2 0x10050000 0x0 0x10000>, + <0x2 0x10150000 0x0 0x10000>, + <0x2 0x10250000 0x0 0x10000>, + <0x2 0x10350000 0x0 0x10000>, + <0x2 0x11e20000 0x0 0x2000>, + <0x2 0x11050000 0x0 0xef1000>, + <0x2 0x11e40000 0x0 0xb000>, + <0x2 0x11e50000 0x0 0xe81000>, + <0x2 0x11e70000 0x0 0x1000>, + <0x2 0x11050000 0x0 0x10000>, + <0x2 0x11150000 0x0 0x10000>, + <0x2 0x11250000 0x0 0x10000>, + <0x2 0x11350000 0x0 0x10000>, + <0x2 0x11450000 0x0 0x10000>, + <0x2 0x11550000 0x0 0x10000>, + <0x2 0x12e20000 0x0 0x2000>, + <0x2 0x12050000 0x0 0xef1000>, + <0x2 0x12e40000 0x0 0xb000>, + <0x2 0x12e50000 0x0 0xe81000>, + <0x2 0x12e70000 0x0 0x1000>, + <0x2 0x12050000 0x0 0x10000>, + <0x2 0x12150000 0x0 0x10000>, + <0x2 0x12250000 0x0 0x10000>, + <0x2 0x12350000 0x0 0x10000>, + <0x2 0x12450000 0x0 0x10000>, + <0x2 0x12550000 0x0 0x10000>, + <0x5 0x02800000 0x0 0x18000>, + <0x5 0x0282c000 0x0 0x4000>, + <0x5 0x02850000 0x0 0x4000>, + <0x5 0x02880000 0x0 0x1c000>, + <0x5 0x02900000 0x0 0x24000>, + <0x5 0x028f0000 0x0 0x4000>, + <0x5 0x028e0000 0x0 0x4000>, + <0x5 0x02820000 0x0 0x4000>, + <0x5 0x08330000 0x0 0x10000>, + <0x5 0x08374000 0x0 0x4000>, + <0x5 0x08360000 0x0 0x4000>, + <0x5 0x00200000 0x0 0x8000>, + <0x5 0x00400000 0x0 0x34000>, + <0x5 0x003c0000 0x0 0x30000>, + <0x5 0x08800000 0x0 0xa8000>, + <0x4 0x85878000 0x0 0x4000>, + <0x2 0x88eb0000 0x0 0x4000>, + <0x2 0x88e80000 0x0 0x30000>, + <0x5 0x08900000 0x0 0x18000>, + <0x5 0x00210000 0x0 0x8000>, + <0x5 0x0020c000 0x0 0x4000>, + <0x5 0x08004000 0x0 0x1000>, + <0x5 0x0007a000 0x0 0x4000>, + <0x5 0x04000000 0x0 0x1000000>, + <0x2 0x88e1c000 0x0 0x4000>, + <0x5 0x022a0000 0x0 0x4000>; + #clock-cells = <1>; + apple,pmgr = <&pmgr>; + status = "disabled"; + }; +}; + +&aon_ptd { + interrupt-controller; + #interrupt-cells = <1>; + #address-cells = <0>; +};