arm: dts: apple: Update Apple M1 device trees

This synchronizes the device trees with those that are in the
process of being upstreamed into Linux. These now match the
current state of the device trees on the asahi branch of the
Asahi Linux github repository.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
This commit is contained in:
Mark Kettenis 2022-02-19 12:26:52 +01:00
parent cee66705cc
commit 40851eab15
13 changed files with 1852 additions and 286 deletions

View file

@ -0,0 +1,47 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Common ISP configuration for Apple silicon platforms.
*
* Copyright The Asahi Linux Contributors
*/
/ {
aliases {
isp = &isp;
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
isp_heap: isp-heap {
compatible = "apple,asc-mem";
/* Filled in by bootloder */
reg = <0 0 0 0>;
no-map;
};
};
};
&isp {
memory-region = <&isp_heap>;
memory-region-names = "heap";
status = "okay";
};
&isp_dart0 {
status = "okay";
};
&isp_dart1 {
status = "okay";
};
&isp_dart2 {
status = "okay";
};
&ps_isp_sys {
status = "okay";
};

View file

@ -0,0 +1,57 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* ISP configuration for platforms with IMX248 sensor.
*
* Copyright The Asahi Linux Contributors
*/
#include "isp-common.dtsi"
&isp {
apple,temporal-filter = <0>;
sensor-presets {
/* 1280x720 */
preset0 {
apple,config-index = <0>;
apple,input-size = <1296 736>;
apple,output-size = <1280 720>;
apple,crop = <8 8 1280 720>;
};
/* 960x720 (4:3) */
preset1 {
apple,config-index = <0>;
apple,input-size = <1296 736>;
apple,output-size = <960 720>;
apple,crop = <168 8 960 720>;
};
/* 960x540 (16:9) */
preset2 {
apple,config-index = <0>;
apple,input-size = <1296 736>;
apple,output-size = <960 540>;
apple,crop = <8 8 1280 720>;
};
/* 640x480 (4:3) */
preset3 {
apple,config-index = <0>;
apple,input-size = <1296 736>;
apple,output-size = <640 480>;
apple,crop = <168 8 960 720>;
};
/* 640x360 (16:9) */
preset4 {
apple,config-index = <0>;
apple,input-size = <1296 736>;
apple,output-size = <640 360>;
apple,crop = <8 8 1280 720>;
};
/* 320x180 (16:9) */
preset5 {
apple,config-index = <0>;
apple,input-size = <1296 736>;
apple,output-size = <320 180>;
apple,crop = <8 8 1280 720>;
};
};
};

View file

@ -0,0 +1,71 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* ISP configuration for platforms with IMX364 sensor.
*
* Copyright The Asahi Linux Contributors
*/
#include "isp-common.dtsi"
&isp {
apple,temporal-filter = <0>;
sensor-presets {
/* 1920x1080 */
preset0 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <1920 1080>;
apple,crop = <0 0 1920 1080>;
};
/* 1440x720 (4:3) */
preset1 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <1440 1080>;
apple,crop = <240 0 1440 1080>;
};
/* 1280x720 (16:9) */
preset2 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <1280 720>;
apple,crop = <0 0 1920 1080>;
};
/* 960x720 (4:3) */
preset3{
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <960 720>;
apple,crop = <240 0 1440 1080>;
};
/* 960x540 (16:9) */
preset4 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <960 540>;
apple,crop = <0 0 1920 1080>;
};
/* 640x480 (4:3) */
preset5 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <640 480>;
apple,crop = <240 0 1440 1080>;
};
/* 640x360 (16:9) */
preset6 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <640 360>;
apple,crop = <0 0 1920 1080>;
};
/* 320x180 (16:9) */
preset7 {
apple,config-index = <0>;
apple,input-size = <1920 1080>;
apple,output-size = <320 180>;
apple,crop = <0 0 1920 1080>;
};
};
};

View file

@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Common config for Apple's nvram using a SPI nor flash. This is common on all
* M1 and M2 devices. identically set up identically on all M1 and M2 devicesspi1, spinor and nvram config identical on all devices
*
* Copyright The Asahi Linux Contributors
*/
&spi1 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
nvram: partition@700000 {
label = "nvram";
/* To be filled by the loader */
reg = <0x0 0x0>;
status = "disabled";
};
};
};
};

View file

@ -21,6 +21,14 @@
};
};
&dcp {
apple,connector-type = "HDMI-A";
};
&bluetooth0 {
brcm,board-type = "apple,atlantisb";
};
&wifi0 {
brcm,board-type = "apple,atlantisb";
};
@ -45,10 +53,12 @@
&port01 {
bus-range = <2 2>;
status = "okay";
};
&port02 {
bus-range = <3 3>;
status = "okay";
ethernet0: ethernet@0,0 {
reg = <0x30000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
@ -56,74 +66,71 @@
};
};
&i2c1 {
clock-frequency = <50000>;
&pcie0_dart_1 {
status = "okay";
};
&pcie0_dart_2 {
status = "okay";
};
&i2c1 {
speaker_amp: codec@31 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x31>;
reset-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
#sound-dai-cells = <0>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <2>;
ti,sdout-zero-fill;
};
};
&i2c2 {
status = "okay";
clock-frequency = <50000>;
jack_codec: codec@48 {
compatible = "cirrus,cs42l83", "cirrus,cs42l42";
compatible = "cirrus,cs42l83";
reg = <0x48>;
reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&pinctrl_ap>;
interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
#sound-dai-cells = <0>;
cirrus,ts-inv = <1>;
sound-name-prefix = "Jack";
};
};
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Mac mini integrated audio";
#address-cells = <1>;
#size-cells = <0>;
compatible = "apple,j274-macaudio", "apple,macaudio";
model = "Mac mini J274";
simple-audio-card,dai-link@0 {
reg = <0>;
format = "left_j";
tdm-slot-width = <32>;
mclk-fs = <64>;
dai-link@0 {
link-name = "Speaker";
link0_cpu: cpu {
cpu {
sound-dai = <&mca 0>;
bitclock-master;
frame-master;
};
link0_codec: codec {
codec {
sound-dai = <&speaker_amp>;
};
};
simple-audio-card,dai-link@1 {
bitclock-inversion;
frame-inversion;
reg = <1>;
format = "i2s";
mclk-fs = <64>;
tdm-slot-width = <32>;
dai-link@1 {
link-name = "Headphone Jack";
link1_cpu: cpu {
cpu {
sound-dai = <&mca 2>;
bitclock-master;
frame-master;
};
link1_codec: codec {
codec {
sound-dai = <&jack_codec>;
};
};
};
};
&gpu {
apple,perf-base-pstate = <3>;
};

View file

@ -11,10 +11,40 @@
#include "t8103.dtsi"
#include "t8103-jxxx.dtsi"
#include <dt-bindings/leds/common.h>
/ {
compatible = "apple,j293", "apple,t8103", "apple,arm-platform";
model = "Apple MacBook Pro (13-inch, M1, 2020)";
led-controller {
compatible = "pwm-leds";
led-0 {
pwms = <&fpwm1 0 40000>;
label = "kbd_backlight";
function = LED_FUNCTION_KBD_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
max-brightness = <255>;
default-state = "keep";
};
};
aliases {
touchbar0 = &touchbar0;
};
};
&dcp {
panel: panel {
compatible = "apple,panel-j293", "apple,panel";
width-mm = <286>;
height-mm = <179>;
apple,max-brightness = <525>;
};
};
&bluetooth0 {
brcm,board-type = "apple,honshu";
};
&wifi0 {
@ -33,6 +63,26 @@
label = "USB-C Left-front";
};
&spi0 {
status = "okay";
touchbar0: touchbar@0 {
compatible = "apple,j293-touchbar",
"apple,z2-touchbar", "apple,z2-multitouch";
reg = <0>;
spi-max-frequency = <11500000>;
spi-cs-setup-delay-ns = <2000>;
spi-cs-hold-delay-ns = <2000>;
reset-gpios = <&pinctrl_ap 139 GPIO_ACTIVE_LOW>;
cs-gpios = <&pinctrl_ap 109 0>;
interrupts-extended = <&pinctrl_ap 194 IRQ_TYPE_EDGE_FALLING>;
firmware-name = "apple/dfrmtfw-j293.bin";
touchscreen-size-x = <23045>;
touchscreen-size-y = <640>;
label = "MacBookPro17,1 Touch Bar";
};
};
&spi3 {
status = "okay";
@ -41,45 +91,96 @@
reg = <0>;
spi-max-frequency = <8000000>;
/*
* cs-setup and cs-hold delays are derived from Apple's ADT
* Mac OS driver meta data secify 45 us for 'cs to clock' and
* 'clock to cs' delays.
* Apple's ADT specifies 20us CS change delays, and the
* SPI HID interface metadata specifies 45us. Using either
* seems not to be reliable, but adding both works, so
* best guess is they are cumulative.
*/
spi-cs-setup-delay-ns = <20000>;
spi-cs-hold-delay-ns = <20000>;
spi-cs-setup-delay-ns = <65000>;
spi-cs-hold-delay-ns = <65000>;
spi-cs-inactive-delay-ns = <250000>;
spien-gpios = <&pinctrl_ap 195 0>;
interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
};
};
/*
* Remove unused PCIe ports and disable the associated DARTs.
*/
&pcie0_dart_1 {
status = "disabled";
/* Virtual regulator representing the shared shutdown GPIO */
/ {
speaker_sdz: fixed-regulator-tas5770-sdz {
compatible = "regulator-fixed";
regulator-name = "tas5770-sdz";
startup-delay-us = <5000>;
gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&pcie0_dart_2 {
status = "disabled";
};
&i2c1 {
speaker_left_rear: codec@31 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x31>;
SDZ-supply = <&speaker_sdz>;
#sound-dai-cells = <0>;
sound-name-prefix = "Left Rear";
interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>;
ti,imon-slot-no = <8>;
ti,vmon-slot-no = <10>;
ti,pdm-slot-no = <12>;
};
/delete-node/ &port01;
/delete-node/ &port02;
speaker_left_front: codec@32 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x32>;
SDZ-supply = <&speaker_sdz>;
#sound-dai-cells = <0>;
sound-name-prefix = "Left Front";
interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <2>;
ti,pdm-slot-no = <4>;
ti,sdout-pull-down;
};
};
&i2c2 {
status = "okay";
clock-frequency = <50000>;
jack_codec: codec@48 {
compatible = "cirrus,cs42l83", "cirrus,cs42l42";
compatible = "cirrus,cs42l83";
reg = <0x48>;
reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&pinctrl_ap>;
interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
#sound-dai-cells = <0>;
cirrus,ts-inv = <1>;
sound-name-prefix = "Jack";
};
};
&i2c3 {
speaker_right_rear: codec@34 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x34>;
SDZ-supply = <&speaker_sdz>;
#sound-dai-cells = <0>;
sound-name-prefix = "Right Rear";
interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>;
ti,imon-slot-no = <12>;
ti,vmon-slot-no = <14>;
ti,pdm-slot-no = <16>;
};
speaker_right_front: codec@35 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x35>;
SDZ-supply = <&speaker_sdz>;
#sound-dai-cells = <0>;
sound-name-prefix = "Right Front";
interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>;
ti,imon-slot-no = <4>;
ti,vmon-slot-no = <6>;
ti,pdm-slot-no = <8>;
ti,sdout-pull-down;
};
};
@ -87,30 +188,50 @@
status = "okay";
};
&fpwm1 {
status = "okay";
};
&display_dfr {
status = "okay";
dfr_panel: panel@0 {
compatible = "apple,summit";
reg = <0>;
};
};
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "MacBook integrated audio";
#address-cells = <1>;
#size-cells = <0>;
compatible = "apple,j293-macaudio", "apple,macaudio";
model = "MacBook Pro J293";
simple-audio-card,dai-link@0 {
bitclock-inversion;
frame-inversion;
reg = <0>;
format = "i2s";
mclk-fs = <64>;
tdm-slot-width = <32>;
dai-link@0 {
link-name = "Speakers";
link0_cpu: cpu {
sound-dai = <&mca 2>;
bitclock-master;
frame-master;
cpu {
sound-dai = <&mca 0>, <&mca 1>;
};
codec {
sound-dai = <&speaker_left_front>, <&speaker_left_rear>,
<&speaker_right_front>, <&speaker_right_rear>;
};
};
link0_codec: codec {
dai-link@1 {
link-name = "Headphone Jack";
cpu {
sound-dai = <&mca 2>;
};
codec {
sound-dai = <&jack_codec>;
};
};
};
};
#include "isp-imx248.dtsi"
&isp {
apple,platform-id = <1>;
};

View file

@ -11,16 +11,46 @@
#include "t8103.dtsi"
#include "t8103-jxxx.dtsi"
#include <dt-bindings/leds/common.h>
/ {
compatible = "apple,j313", "apple,t8103", "apple,arm-platform";
model = "Apple MacBook Air (M1, 2020)";
led-controller {
compatible = "pwm-leds";
led-0 {
pwms = <&fpwm1 0 40000>;
label = "kbd_backlight";
function = LED_FUNCTION_KBD_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
max-brightness = <255>;
default-state = "keep";
};
};
};
&dcp {
panel: panel {
compatible = "apple,panel-j313", "apple,panel";
width-mm = <286>;
height-mm = <179>;
apple,max-brightness = <420>;
};
};
&bluetooth0 {
brcm,board-type = "apple,shikoku";
};
&wifi0 {
brcm,board-type = "apple,shikoku";
};
&fpwm1 {
status = "okay";
};
/*
* Provide labels for the USB type C ports.
*/
@ -41,71 +71,100 @@
reg = <0>;
spi-max-frequency = <8000000>;
/*
* cs-setup and cs-hold delays are derived from Apple's ADT
* Mac OS driver meta data secify 45 us for 'cs to clock' and
* 'clock to cs' delays.
* Apple's ADT specifies 20us CS change delays, and the
* SPI HID interface metadata specifies 45us. Using either
* seems not to be reliable, but adding both works, so
* best guess is they are cumulative.
*/
spi-cs-setup-delay-ns = <20000>;
spi-cs-hold-delay-ns = <20000>;
spi-cs-setup-delay-ns = <65000>;
spi-cs-hold-delay-ns = <65000>;
spi-cs-inactive-delay-ns = <250000>;
spien-gpios = <&pinctrl_ap 195 0>;
interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
};
};
/*
* Remove unused PCIe ports and disable the associated DARTs.
*/
&pcie0_dart_1 {
status = "disabled";
/* Virtual regulator representing the shared shutdown GPIO */
/ {
speaker_sdz: fixed-regulator-tas5770-sdz {
compatible = "regulator-fixed";
regulator-name = "tas5770-sdz";
startup-delay-us = <5000>;
gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&pcie0_dart_2 {
status = "disabled";
&i2c1 {
speaker_left: codec@31 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x31>;
SDZ-supply = <&speaker_sdz>;
#sound-dai-cells = <0>;
sound-name-prefix = "Left";
interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <2>;
ti,sdout-zero-fill;
};
};
/delete-node/ &port01;
/delete-node/ &port02;
&i2c3 {
clock-frequency = <50000>;
speaker_right: codec@34 {
compatible = "ti,tas5770l", "ti,tas2770";
reg = <0x34>;
SDZ-supply = <&speaker_sdz>;
#sound-dai-cells = <0>;
sound-name-prefix = "Right";
interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>;
ti,imon-slot-no = <4>;
ti,vmon-slot-no = <6>;
ti,sdout-zero-fill;
};
jack_codec: codec@48 {
compatible = "cirrus,cs42l83", "cirrus,cs42l42";
compatible = "cirrus,cs42l83";
reg = <0x48>;
reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&pinctrl_ap>;
interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
#sound-dai-cells = <0>;
cirrus,ts-inv = <1>;
sound-name-prefix = "Jack";
};
};
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "MacBook integrated audio";
#address-cells = <1>;
#size-cells = <0>;
compatible = "apple,j313-macaudio", "apple,macaudio";
model = "MacBook Air J313";
simple-audio-card,dai-link@0 {
bitclock-inversion;
frame-inversion;
reg = <0>;
format = "i2s";
mclk-fs = <64>;
tdm-slot-width = <32>;
dai-link@0 {
link-name = "Speakers";
link0_cpu: cpu {
sound-dai = <&mca 2>;
bitclock-master;
frame-master;
cpu {
sound-dai = <&mca 0>, <&mca 1>;
};
codec {
sound-dai = <&speaker_left>, <&speaker_right>;
};
};
link0_codec: codec {
dai-link@1 {
link-name = "Headphone Jack";
cpu {
sound-dai = <&mca 2>;
};
codec {
sound-dai = <&jack_codec>;
};
};
};
};
#include "isp-imx248.dtsi"
&isp {
apple,platform-id = <1>;
};

View file

@ -14,13 +14,26 @@
/ {
compatible = "apple,j456", "apple,t8103", "apple,arm-platform";
model = "Apple iMac (24-inch, 4x USB-C, M1, 2020)";
model = "Apple iMac (24-inch, 4x USB-C, M1, 2021)";
aliases {
ethernet0 = &ethernet0;
};
};
&dcp {
panel: panel {
compatible = "apple,panel-j456", "apple,panel";
width-mm = <522>;
height-mm = <294>;
apple,max-brightness = <525>;
};
};
&bluetooth0 {
brcm,board-type = "apple,capri";
};
&wifi0 {
brcm,board-type = "apple,capri";
};
@ -63,10 +76,12 @@
&port01 {
bus-range = <2 2>;
status = "okay";
};
&port02 {
bus-range = <3 3>;
status = "okay";
ethernet0: ethernet@0,0 {
reg = <0x30000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
@ -74,44 +89,51 @@
};
};
&i2c1 {
clock-frequency = <50000>;
&pcie0_dart_1 {
status = "okay";
};
&pcie0_dart_2 {
status = "okay";
};
&i2c1 {
jack_codec: codec@48 {
compatible = "cirrus,cs42l83", "cirrus,cs42l42";
compatible = "cirrus,cs42l83";
reg = <0x48>;
reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&pinctrl_ap>;
interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
#sound-dai-cells = <0>;
cirrus,ts-inv = <1>;
sound-name-prefix = "Jack";
};
};
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "iMac integrated audio";
#address-cells = <1>;
#size-cells = <0>;
compatible = "apple,j456-macaudio", "apple,macaudio";
model = "iMac J456";
simple-audio-card,dai-link@0 {
bitclock-inversion;
frame-inversion;
reg = <0>;
format = "i2s";
mclk-fs = <64>;
tdm-slot-width = <32>;
dai-link@1 {
link-name = "Headphone Jack";
link0_cpu: cpu {
cpu {
sound-dai = <&mca 2>;
bitclock-master;
frame-master;
};
link0_codec: codec {
codec {
sound-dai = <&jack_codec>;
};
};
};
};
&gpu {
apple,perf-base-pstate = <3>;
};
#include "isp-imx364.dtsi"
&isp {
apple,platform-id = <2>;
};

View file

@ -14,13 +14,26 @@
/ {
compatible = "apple,j457", "apple,t8103", "apple,arm-platform";
model = "Apple iMac (24-inch, 2x USB-C, M1, 2020)";
model = "Apple iMac (24-inch, 2x USB-C, M1, 2021)";
aliases {
ethernet0 = &ethernet0;
};
};
&dcp {
panel: panel {
compatible = "apple,panel-j457", "apple,panel";
width-mm = <522>;
height-mm = <294>;
apple,max-brightness = <525>;
};
};
&bluetooth0 {
brcm,board-type = "apple,santorini";
};
&wifi0 {
brcm,board-type = "apple,santorini";
};
@ -45,6 +58,7 @@
&port02 {
bus-range = <3 3>;
status = "okay";
ethernet0: ethernet@0,0 {
reg = <0x30000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
@ -52,54 +66,47 @@
};
};
/*
* Remove unused PCIe port and disable the associated DART.
*/
&pcie0_dart_1 {
status = "disabled";
&pcie0_dart_2 {
status = "okay";
};
/delete-node/ &port01;
&i2c1 {
clock-frequency = <50000>;
jack_codec: codec@48 {
compatible = "cirrus,cs42l83", "cirrus,cs42l42";
compatible = "cirrus,cs42l83";
reg = <0x48>;
reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&pinctrl_ap>;
interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
#sound-dai-cells = <0>;
cirrus,ts-inv = <1>;
sound-name-prefix = "Jack";
};
};
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "iMac integrated audio";
#address-cells = <1>;
#size-cells = <0>;
compatible = "apple,j457-macaudio", "apple,macaudio";
model = "iMac J457";
simple-audio-card,dai-link@0 {
bitclock-inversion;
frame-inversion;
reg = <0>;
format = "i2s";
mclk-fs = <64>;
tdm-slot-width = <32>;
dai-link@1 {
link-name = "Headphone Jack";
link0_cpu: cpu {
cpu {
sound-dai = <&mca 2>;
bitclock-master;
frame-master;
};
link0_codec: codec {
codec {
sound-dai = <&jack_codec>;
};
};
};
};
&gpu {
apple,perf-base-pstate = <3>;
};
#include "isp-imx364.dtsi"
&isp {
apple,platform-id = <2>;
};

View file

@ -9,13 +9,18 @@
* Copyright The Asahi Linux Contributors
*/
#include <dt-bindings/spmi/spmi.h>
/ {
aliases {
bluetooth0 = &bluetooth0;
dcp = &dcp;
disp0 = &display;
disp0_piodma = &disp0_piodma;
nvram = &nvram;
serial0 = &serial0;
serial2 = &serial2;
wifi0 = &wifi0;
atcphy0 = &atcphy0;
atcphy1 = &atcphy1;
};
chosen {
@ -28,11 +33,19 @@
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
power-domains = <&ps_disp0_cpu0>;
/* Format properties will be added by loader */
status = "disabled";
};
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0x2 0>; /* To be filled by loader */
@ -69,6 +82,12 @@
remote-endpoint = <&typec0_usb_hs>;
};
};
port@1 {
reg = <1>;
typec0_con_ss: endpoint {
remote-endpoint = <&typec0_usb_ss>;
};
};
};
};
};
@ -94,6 +113,12 @@
remote-endpoint = <&typec1_usb_hs>;
};
};
port@1 {
reg = <1>;
typec1_con_ss: endpoint {
remote-endpoint = <&typec1_usb_ss>;
};
};
};
};
};
@ -116,6 +141,23 @@
};
};
/* Type-C PHYs */
&atcphy0 {
port {
typec0_usb_ss: endpoint {
remote-endpoint = <&typec0_con_ss>;
};
};
};
&atcphy1 {
port {
typec1_usb_ss: endpoint {
remote-endpoint = <&typec1_con_ss>;
};
};
};
/*
* Force the bus number assignments so that we can declare some of the
* on-board devices and properties that are populated by the bootloader
@ -123,7 +165,7 @@
*/
&port00 {
bus-range = <1 1>;
pwren-gpios = <&smc 13 0>;
pwren-gpios = <&smc_gpio 13 GPIO_ACTIVE_HIGH>;
wifi0: network@0,0 {
compatible = "pci14e4,4425";
reg = <0x10000 0x0 0x0 0x0 0x0>;
@ -131,13 +173,17 @@
local-mac-address = [00 00 00 00 00 00];
apple,antenna-sku = "XX";
};
};
&spmi {
status = "okay";
pmu@f {
compatible = "apple,sera-pmu";
reg = <0xf SPMI_USID>;
bluetooth0: bluetooth@0,1 {
compatible = "pci14e4,5f69";
reg = <0x10100 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-bd-address = [00 00 00 00 00 00];
};
};
&nco_clkref {
clock-frequency = <900000000>;
};
#include "spi1-nvram.dtsi"

View file

@ -339,7 +339,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "sio_adma";
power-domains = <&ps_sio>, <&ps_pms>;
power-domains = <&ps_sio>, <&ps_pms>, <&ps_audio_p>;
};
ps_aes: power-controller@238 {
@ -387,6 +387,15 @@
power-domains = <&ps_sio>, <&ps_spi_p>;
};
ps_spi4: power-controller@260 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x260 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "spi4";
power-domains = <&ps_sio>, <&ps_spi_p>;
};
ps_uart_n: power-controller@268 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x268 4>;
@ -483,7 +492,8 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "mca0";
power-domains = <&ps_audio_p>, <&ps_sio_adma>, <&ps_mca1>, <&ps_mca2>, <&ps_mca3>, <&ps_mca4>, <&ps_mca5>;
power-domains = <&ps_audio_p>, <&ps_sio_adma>;
apple,externally-clocked;
};
ps_mca1: power-controller@2c0 {
@ -493,6 +503,7 @@
#reset-cells = <0>;
label = "mca1";
power-domains = <&ps_audio_p>, <&ps_sio_adma>;
apple,externally-clocked;
};
ps_mca2: power-controller@2c8 {
@ -502,6 +513,7 @@
#reset-cells = <0>;
label = "mca2";
power-domains = <&ps_audio_p>, <&ps_sio_adma>;
apple,externally-clocked;
};
ps_mca3: power-controller@2d0 {
@ -511,6 +523,7 @@
#reset-cells = <0>;
label = "mca3";
power-domains = <&ps_audio_p>, <&ps_sio_adma>;
apple,externally-clocked;
};
ps_mca4: power-controller@2d8 {
@ -520,6 +533,7 @@
#reset-cells = <0>;
label = "mca4";
power-domains = <&ps_audio_p>, <&ps_sio_adma>;
apple,externally-clocked;
};
ps_mca5: power-controller@2e0 {
@ -529,6 +543,7 @@
#reset-cells = <0>;
label = "mca5";
power-domains = <&ps_audio_p>, <&ps_sio_adma>;
apple,externally-clocked;
};
ps_dpa0: power-controller@2e8 {
@ -558,15 +573,6 @@
apple,always-on; /* Memory controller */
};
ps_spi4: power-controller@260 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x260 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "spi4";
power-domains = <&ps_sio>, <&ps_spi_p>;
};
ps_dcs0: power-controller@300 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x300 4>;
@ -645,8 +651,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "disp0_fe";
power-domains = <&ps_rmx>;
apple,always-on; /* TODO: figure out if we can enable PM here */
power-domains = <&ps_rmx>, <&ps_pmp>;
};
ps_dispext_fe: power-controller@368 {
@ -655,7 +660,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "dispext_fe";
power-domains = <&ps_rmx>;
power-domains = <&ps_rmx>, <&ps_pmp>;
};
ps_dispext_cpu0: power-controller@378 {
@ -717,6 +722,7 @@
#reset-cells = <0>;
label = "apcie_gp";
power-domains = <&ps_apcie>;
apple,always-on; /* Breaks things if shut down */
};
ps_ans2: power-controller@3f0 {
@ -725,11 +731,6 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "ans2";
/*
* The ADT makes ps_apcie_st depend on ps_ans2 instead, but this
* doesn't make much sense since ANS2 uses APCIE_ST.
*/
power-domains = <&ps_apcie_st>;
};
ps_gfx: power-controller@3f8 {
@ -738,6 +739,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "gfx";
power-domains = <&ps_pmp>;
};
ps_dcs4: power-controller@320 {
@ -810,6 +812,7 @@
#reset-cells = <0>;
label = "isp_sys";
power-domains = <&ps_rmx>;
status = "disabled";
};
ps_venc_sys: power-controller@408 {
@ -836,7 +839,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "apcie_st";
power-domains = <&ps_apcie>;
power-domains = <&ps_apcie>, <&ps_ans2>;
};
ps_ane_sys: power-controller@470 {
@ -1005,9 +1008,125 @@
#reset-cells = <0>;
label = "disp0_cpu0";
power-domains = <&ps_disp0_fe>;
apple,always-on; /* TODO: figure out if we can enable PM here */
apple,min-state = <4>;
};
/* There is a dependency tree involved with these PDs,
* but we do not express it here since the ISP driver
* is supposed to sequence them in the right order anyway
* (and we do not know the exact tree structure).
*
* This also works around spurious parent PD activation
* on machines with ISP disabled (desktops).
*/
ps_isp_set0: power-controller@4000 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4000 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set0";
apple,force-disable;
};
ps_isp_set1: power-controller@4008 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4008 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set1";
apple,force-disable;
apple,force-reset;
};
ps_isp_set2: power-controller@4010 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4010 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set2";
apple,force-disable;
apple,force-reset;
};
ps_isp_fe: power-controller@4018 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4018 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_fe";
};
ps_isp_set4: power-controller@4020 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4020 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set4";
};
ps_isp_set5: power-controller@4028 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4028 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set5";
};
ps_isp_set6: power-controller@4030 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4030 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set6";
};
ps_isp_set7: power-controller@4038 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4038 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set7";
};
ps_isp_set8: power-controller@4040 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4040 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set8";
};
ps_isp_set9: power-controller@4048 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4048 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set9";
};
ps_isp_set10: power-controller@4050 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4050 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set10";
};
ps_isp_set11: power-controller@4058 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4058 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set11";
};
ps_isp_set12: power-controller@4060 {
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x4060 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "isp_set12";
};
};
&pmgr_mini {
@ -1100,6 +1219,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "msg";
apple,always-on; /* Core AON device? */
};
ps_atc0_usb_aon: power-controller@88 {
@ -1108,6 +1228,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "atc0_usb_aon";
apple,always-on; /* Needs to stay on for dwc3 to work */
};
ps_atc1_usb_aon: power-controller@90 {
@ -1116,6 +1237,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "atc1_usb_aon";
apple,always-on; /* Needs to stay on for dwc3 to work */
};
ps_atc0_usb: power-controller@98 {

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
#ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_APPLE_AIC_H
#define _DT_BINDINGS_INTERRUPT_CONTROLLER_APPLE_AIC_H
@ -11,5 +11,7 @@
#define AIC_TMR_HV_VIRT 1
#define AIC_TMR_GUEST_PHYS 2
#define AIC_TMR_GUEST_VIRT 3
#define AIC_CPU_PMU_E 4
#define AIC_CPU_PMU_P 5
#endif