diff --git a/arch/arm64/boot/dts/apple/t6041-j614c-j616c.dtsi b/arch/arm64/boot/dts/apple/t6041-j614c-j616c.dtsi index 5340cc024b9d1..59f265b9534b7 100644 --- a/arch/arm64/boot/dts/apple/t6041-j614c-j616c.dtsi +++ b/arch/arm64/boot/dts/apple/t6041-j614c-j616c.dtsi @@ -14,6 +14,7 @@ #include "t6041-j616c-ane.dtsi" #include +#include #include / { @@ -76,25 +77,26 @@ thermal-zones { /* - * The PMP's fast die loop is off on these boards (no - * apple,fast-die-effort), so these zones are the CPU's only - * throttle. The ADT (temp-sensor, fast-die-ctrl-loop) gives the - * J614c and J616c the M4 Pro's die limits: a 110 C target and a - * 125 C maximum, the sochot level. + * The PMP's fast die-temperature loop (apple,fast-die-effort) + * holds its hot-spot sensors at the ADT fast-die-ctrl-loop target + * of 110 C, as on macOS, and these zones are the backstop behind + * it. The ADT (temp-sensor) gives the J614c and J616c the M4 + * Pro's die limits: 110 C target, 125 C maximum (sochot). * - * - A zone per SMC core-die sensor runs the power allocator from - * 75 C, controls at the 110 C target and throttles only the - * cluster its sensor sits on: Tpx0-5 follow a load on P0, - * Tpx8-D one on P1, Tex0-3 the E cluster. The die zone on TCMz, - * their maximum, controls all three clusters from 115 C as a - * backstop; controlling at 110 C itself, it divided its budget - * by requested power and held P0 at 2.4-2.9 GHz while P1 ran at - * 4.1 GHz. The 1 s samples jump by about 10 C, so the zones are - * integral-led. + * - The SMC sensors read a few degrees above the PMP's: with the + * PMP alone, an all-core load holds TCMz at 112 C. The zones + * switch on at 112 C and control at 116 C, so the PMP keeps the + * fast control. Switched on from 75 C, the power allocator + * trimmed far below its control point and took over: it held + * the E cluster at 1.02 GHz, which the PMP leaves at 2.59 GHz. + * - A zone per SMC core-die sensor throttles only the cluster its + * sensor sits on: Tpx0-5 follow a load on P0, Tpx8-D one on P1, + * Tex0-3 the E cluster. The die zone on TCMz, their maximum, + * throttles all three. The 1 s samples jump by about 10 C, so + * the zones are integral-led. * - The SMC fans follow a power-weighted hot spot (dDT*), not - * TCMz: they only ramp once the CPU runs near 110 C at high - * power, as on macOS. A lower control point holds the power - * below where the fans engage, and the CPU then settles lower. + * TCMz, and ramp once the CPU runs near 110 C at high power, as + * on macOS. * - sustainable-power is what macOS sustained on a J614c under an * all-core FMA load: 48-51 W, TCMz 105-110 C. The P clusters * share one rail meter (PHPC), which reads 25 W with either @@ -113,13 +115,13 @@ trips { cpu_die_switch_on: cpu-die-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_die_passive: cpu-die-passive { - temperature = <115000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -181,13 +183,13 @@ trips { cpu_e0_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_e0_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -227,13 +229,13 @@ trips { cpu_e1_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_e1_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -273,13 +275,13 @@ trips { cpu_e2_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_e2_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -319,13 +321,13 @@ trips { cpu_e3_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_e3_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -365,13 +367,13 @@ trips { cpu_p00_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p00_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -413,13 +415,13 @@ trips { cpu_p01_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p01_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -461,13 +463,13 @@ trips { cpu_p02_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p02_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -509,13 +511,13 @@ trips { cpu_p03_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p03_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -557,13 +559,13 @@ trips { cpu_p04_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p04_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -605,13 +607,13 @@ trips { cpu_p05_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p05_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -653,13 +655,13 @@ trips { cpu_p10_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p10_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -701,13 +703,13 @@ trips { cpu_p11_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p11_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -749,13 +751,13 @@ trips { cpu_p12_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p12_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -797,13 +799,13 @@ trips { cpu_p13_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p13_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -845,13 +847,13 @@ trips { cpu_p14_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p14_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -893,13 +895,13 @@ trips { cpu_p15_switch_on: trip-switch-on { - temperature = <75000>; + temperature = <112000>; hysteresis = <2000>; type = "passive"; }; cpu_p15_passive: trip-passive { - temperature = <110000>; + temperature = <116000>; hysteresis = <5000>; type = "passive"; }; @@ -1184,18 +1186,6 @@ status = "okay"; }; -&cpufreq_e { - /delete-property/ apple,fast-die-effort; -}; - -&cpufreq_p0 { - /delete-property/ apple,fast-die-effort; -}; - -&cpufreq_p1 { - /delete-property/ apple,fast-die-effort; -}; - &wdt { timeout-sec = <140>; }; @@ -2330,6 +2320,136 @@ #include "t6041-j616c-hdmi.dtsi" #include "t6041-j616c-usbc.dtsi" +/* + * Keyboard backlight, as on the M4 Pro boards: the ADT /arm-io/pwm0 has one + * kbd-backlight channel (reg 0) at default-hz 25000, a 40 us period. + */ +/ { + led-controller { + compatible = "pwm-leds"; + + led-0 { + pwms = <&fpwm0 0 40000>; + label = "apple::kbd_backlight"; + function = LED_FUNCTION_KBD_BACKLIGHT; + color = ; + max-brightness = <255>; + }; + }; +}; + +&fpwm0 { + status = "okay"; +}; + +/* + * The front camera. The J614c and J616c ADTs (26.6.2) describe the same isp0: + * sensor-type 5 (an IMX958), cam-connections-scheme 0x10, and a firmware of + * 0xca8000 bytes of TEXT and 0x1344000 of DATA, which iBoot moves each boot. + */ +/ { + /* aura opens a co-processor's DAPF only if it finds its alias. */ + aliases { + isp = &isp; + }; + + reserved-memory { + /* + * iBoot moves the ISP firmware each boot: the loader fills + * these placeholders from the ADT. It runs at 0x100_0000_0000 + * onwards, in its 32 MiB main memory. + */ + isp_fw_text: isp-firmware-text@10000c44000 { + reg = <0x100 0x00c44000 0x0 0xca8000>; + iommu-addresses = <&isp 0x100 0x0 0x0 0xca8000>; + no-map; + }; + + isp_fw_data: isp-firmware-data@10001e7c000 { + reg = <0x100 0x01e7c000 0x0 0x1344000>; + iommu-addresses = <&isp 0x100 0xca8000 0x0 0x1344000>; + no-map; + }; + + /* the firmware's main memory, the driver allocates above it */ + isp_heap: isp-heap { + iommu-addresses = <&isp 0x100 0x0 0x0 0x2000000>; + }; + }; +}; + +&isp { + memory-region = <&isp_fw_text>, <&isp_fw_data>, <&isp_heap>; + memory-region-names = "text", "data", "heap"; + apple,platform-id = <5>; + /* ADT isp0 cam-connections-scheme */ + apple,cam-connections-scheme = <0x10>; + status = "okay"; + + /* The front camera, an IMX958: firmware configuration 5. */ + sensor-presets { + /* 1920x1080 */ + preset0 { + apple,config-index = <5>; + apple,input-size = <1920 2160>; + apple,output-size = <1920 1080>; + apple,crop = <0 0 1920 1080>; + }; + /* 1280x720 */ + preset1 { + apple,config-index = <5>; + apple,input-size = <1920 2160>; + apple,output-size = <1280 720>; + apple,crop = <0 0 1920 1080>; + }; + }; +}; + +&isp_dart0 { + status = "okay"; +}; + +&isp_dart1 { + status = "okay"; +}; + +&isp_dart2 { + status = "okay"; +}; + +/* + * The PMP, as the M4 Pro boards run it (t604x-j614-j616.dtsi). The pmp + * alias lets the loader copy this Mac's PMP values from the ADT and enable + * the PMP. The GPU sits on the PMP's GPU domain: a running PMP otherwise + * treats the GPU as off and holds it at its lowest state. + */ +/ { + aliases { + pmp = &pmp; + }; +}; + +&pmp_dart { + status = "okay"; +}; + +&pmp_report { + status = "okay"; +}; + +&pmp_mbox { + status = "okay"; +}; + +&pmc { + apple,pmp = <&pmp>; + status = "okay"; +}; + +&gpu { + power-domains = <&pmp_gfx>; +}; + / { aliases { nvram = &nvram; diff --git a/arch/arm64/boot/dts/apple/t6041-j616c.dts b/arch/arm64/boot/dts/apple/t6041-j616c.dts index f6a2ad6e49e21..9e122229805c5 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j616c.dts @@ -16,35 +16,6 @@ / { compatible = "apple,j616c", "apple,t6041", "apple,arm-platform"; model = "Apple MacBook Pro (16-inch, M4 Max)"; - - /* aura opens a co-processor's DAPF only if it finds its alias. */ - aliases { - isp = &isp; - }; - - reserved-memory { - /* - * iBoot moves the ISP firmware each boot: the loader fills - * these placeholders from the ADT. It runs at 0x100_0000_0000 - * onwards, in its 32 MiB main memory. - */ - isp_fw_text: isp-firmware-text@10000c44000 { - reg = <0x100 0x00c44000 0x0 0xca8000>; - iommu-addresses = <&isp 0x100 0x0 0x0 0xca8000>; - no-map; - }; - - isp_fw_data: isp-firmware-data@10001e7c000 { - reg = <0x100 0x01e7c000 0x0 0x1344000>; - iommu-addresses = <&isp 0x100 0xca8000 0x0 0x1344000>; - no-map; - }; - - /* the firmware's main memory, the driver allocates above it */ - isp_heap: isp-heap { - iommu-addresses = <&isp 0x100 0x0 0x0 0x2000000>; - }; - }; }; &mtp_hid { @@ -85,42 +56,3 @@ &mesa { firmware-name = "apple/mesacal-j616c.bin", "apple/msrk-j616c.bin"; }; - -&isp { - memory-region = <&isp_fw_text>, <&isp_fw_data>, <&isp_heap>; - memory-region-names = "text", "data", "heap"; - apple,platform-id = <5>; - /* ADT isp0 cam-connections-scheme */ - apple,cam-connections-scheme = <0x10>; - status = "okay"; - - /* The front camera, an IMX958: firmware configuration 5. */ - sensor-presets { - /* 1920x1080 */ - preset0 { - apple,config-index = <5>; - apple,input-size = <1920 2160>; - apple,output-size = <1920 1080>; - apple,crop = <0 0 1920 1080>; - }; - /* 1280x720 */ - preset1 { - apple,config-index = <5>; - apple,input-size = <1920 2160>; - apple,output-size = <1280 720>; - apple,crop = <0 0 1920 1080>; - }; - }; -}; - -&isp_dart0 { - status = "okay"; -}; - -&isp_dart1 { - status = "okay"; -}; - -&isp_dart2 { - status = "okay"; -};