diff --git a/arch/arm64/boot/dts/apple/t6050-j714s.dts b/arch/arm64/boot/dts/apple/t6050-j714s.dts index 23475ad163f58..a411c8958d2f2 100644 --- a/arch/arm64/boot/dts/apple/t6050-j714s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j714s.dts @@ -44,11 +44,6 @@ model = "Apple MacBook Pro (14-inch, M5 Pro, 2026)"; chassis-type = "laptop"; - aliases { - /* the boot loader reserves the SEP firmware and adds its manifests through this alias */ - sep = &sep; - }; - chosen { #address-cells = <2>; #size-cells = <2>; @@ -528,64 +523,9 @@ power-domains = <&pmp0_gfx>; }; -/* - * The SEP (ADT sep, dart-sep): its mailbox, and its power domain with the two - * fabric parents left to the firmware, which genpd votes on and never turns off. - * The boot loader enables the SEP itself through its alias. - */ -&sep_mbox { - status = "okay"; -}; - -&ps_sep { - status = "okay"; -}; - -&ps_fab8_soc { - apple,firmware-owned; - status = "okay"; -}; - -&ps_fab0_piogw { - apple,firmware-owned; - status = "okay"; -}; - -/* - * Touch ID (ADT spi2/mesa): J616s's Mesa sensor (sensor-id 0x3356) at 8 MHz on - * chip select 0, powered by NUB GPIO 21 (function-mesa_pwr), data ready on AP - * GPIO 138. The controller's clock (ADT clock-ids 451) is the 24 MHz reference. - */ -&ps_nub_gpio { - status = "okay"; -}; - -&nub_gpio0 { - status = "okay"; -}; - -&ps_spi2 { - status = "okay"; -}; - -&spi2 { - clocks = <&clkref>; - status = "okay"; - - mesa: fingerprint@0 { - compatible = "apple,mesa-fingerprint"; - reg = <0>; - spi-max-frequency = <8000000>; - spi-cpol; - spi-cs-setup-delay-ns = <20>; - spi-cs-hold-delay-ns = <20>; - enable-gpios = <&nub_gpio0 21 GPIO_ACTIVE_HIGH>; - interrupt-parent = <&pinctrl_ap>; - interrupts = <138 IRQ_TYPE_EDGE_RISING>; - /* Per-device factory data from this Mac's own iBoot system container */ - firmware-name = "apple/mesacal-j714s.bin", "apple/msrk-j714s.bin"; - }; -}; +/* Touch ID: the SEP and the Mesa sensor, with this Mac's own calibration and root key */ +#define T6050_TOUCHID_FIRMWARE "apple/mesacal-j714s.bin", "apple/msrk-j714s.bin" +#include "t6050-touchid.dtsi" /* * The ProRes engine (apr0) and its DART, in the SCODEC power state. Its diff --git a/arch/arm64/boot/dts/apple/t6050-j716c-sep.dtsi b/arch/arm64/boot/dts/apple/t6050-j716c-sep.dtsi deleted file mode 100644 index 23019a719e07b..0000000000000 --- a/arch/arm64/boot/dts/apple/t6050-j716c-sep.dtsi +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR MIT -/* J716c SEP handoff and the providers needed for warm registration. */ - -/ { - aliases { - /* The loader supplies the reserved image and registration manifests. */ - sep = &sep; - }; -}; - -/* The SEP and its DART are enabled by the driver after its policy is selected. */ -&sep_mbox { - status = "okay"; -}; - -&ps_sep { - status = "okay"; -}; - -/* Retain the fabric parents while the pre-booted enclave owns them. */ -&ps_fab8_soc { - apple,firmware-owned; - status = "okay"; -}; - -&ps_fab0_piogw { - apple,firmware-owned; - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/apple/t6050-j716c.dts b/arch/arm64/boot/dts/apple/t6050-j716c.dts index ce7d52fc05a79..863d0c524f3b6 100644 --- a/arch/arm64/boot/dts/apple/t6050-j716c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j716c.dts @@ -284,49 +284,15 @@ 63 2e 00 06 02 69 4f 53 00 00 00 00]; }; -/* - * Touch ID (ADT spi2/mesa), wired as on the J714s: the Mesa sensor (sensor-id - * 0x3356) at 8 MHz on chip select 0, powered by NUB GPIO 21 (function-mesa_pwr), - * data ready on AP GPIO 138. The controller's clock (ADT clock-ids 451) is the - * 24 MHz reference. - */ -&ps_nub_gpio { - status = "okay"; -}; - -&nub_gpio0 { - status = "okay"; -}; - -&ps_spi2 { - status = "okay"; -}; - -&spi2 { - clocks = <&clkref>; - status = "okay"; - - mesa: fingerprint@0 { - compatible = "apple,mesa-fingerprint"; - reg = <0>; - spi-max-frequency = <8000000>; - spi-cpol; - spi-cs-setup-delay-ns = <20>; - spi-cs-hold-delay-ns = <20>; - enable-gpios = <&nub_gpio0 21 GPIO_ACTIVE_HIGH>; - interrupt-parent = <&pinctrl_ap>; - interrupts = <138 IRQ_TYPE_EDGE_RISING>; - /* Per-device factory data from this Mac's own iBoot system container */ - firmware-name = "apple/mesacal-j716c.bin", "apple/msrk-j716c.bin"; - }; -}; +/* Touch ID: the SEP and the Mesa sensor, with this Mac's own calibration and root key */ +#define T6050_TOUCHID_FIRMWARE "apple/mesacal-j716c.bin", "apple/msrk-j716c.bin" +#include "t6050-touchid.dtsi" #include "t6050-j716c-isp.dtsi" #include "t6050-j716c-gpu-panel.dtsi" #include "t6050-j716c-display.dtsi" #include "t6050-j716c-left-usb4.dtsi" -#include "t6050-j716c-sep.dtsi" #include "t6050-j716c-sleep.dtsi" #include "t6050-j716c-sleep-full.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi index 9d071b83ab919..073d8a94094f9 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi @@ -121,12 +121,12 @@ /* * As on J716c, where reading pin 112 takes an SError, only the pins a node - * names are exposed: 80 and 81, PCIe ports 0 and 1's PERST#, and 134 and 139, - * the jack codec's interrupt and reset. A board that names more pins replaces - * the list. + * names are exposed: 80 and 81, PCIe ports 0 and 1's PERST#; 134 and 139, the jack + * codec's interrupt and reset; 138, the Touch ID sensor's data-ready line + * (t6050-touchid.dtsi). A board that names more pins replaces the list. */ &pinctrl_ap { - gpio-reserved-ranges = <0 80>, <82 52>, <135 4>, <140 81>; + gpio-reserved-ranges = <0 80>, <82 52>, <135 3>, <140 81>; }; /* diff --git a/arch/arm64/boot/dts/apple/t6050-k114.dtsi b/arch/arm64/boot/dts/apple/t6050-k114.dtsi index ac9f638d7ee27..4f9c13198dfff 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114.dtsi @@ -45,10 +45,10 @@ * exposed: 80 and 81 (PCIe ports 0 and 1's PERST#); 106 and 107, the speaker amps' * interrupt and shutdown line (ADT audio-speaker, used only where a board describes * the amps); 134 and 139, the jack codec's interrupt and reset; 136 and 137, the - * speaker ID. + * speaker ID; 138, the Touch ID sensor's data-ready line (t6050-touchid.dtsi). */ &pinctrl_ap { - gpio-reserved-ranges = <0 80>, <82 24>, <108 26>, <135 1>, <138 1>, <140 81>; + gpio-reserved-ranges = <0 80>, <82 24>, <108 26>, <135 1>, <140 81>; }; /* diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 402d1d947d9a4..7923a3807e010 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -167,6 +167,10 @@ height-mm = <199>; }; +/* Touch ID: the SEP and the Mesa sensor, with this Mac's own calibration and root key */ +#define T6050_TOUCHID_FIRMWARE "apple/mesacal-k114c.bin", "apple/msrk-k114c.bin" +#include "t6050-touchid.dtsi" + /* * The K114c keeps J714's card with its speakers, at the J714's safe level. The * chassis' K114 entry (t6050-k114.dtsi) has the jack only. diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index 43908a0b6faed..fdf02afb0530e 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -49,6 +49,10 @@ height-mm = <199>; }; +/* Touch ID: the SEP and the Mesa sensor, with this Mac's own calibration and root key */ +#define T6050_TOUCHID_FIRMWARE "apple/mesacal-k114s.bin", "apple/msrk-k114s.bin" +#include "t6050-touchid.dtsi" + /* * The USB-C ports ATC1 and ATC2, as on the other K boards (t6050-k114-k116-usb.dtsi), then the * 14-inch chassis' MagSafe 3 PD controller and the right port's USB4/Thunderbolt router diff --git a/arch/arm64/boot/dts/apple/t6050-k116c.dts b/arch/arm64/boot/dts/apple/t6050-k116c.dts index dc2002084a106..4439c8fd8dc68 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116c.dts @@ -41,5 +41,9 @@ height-mm = <223>; }; +/* Touch ID: the SEP and the Mesa sensor, with this Mac's own calibration and root key */ +#define T6050_TOUCHID_FIRMWARE "apple/mesacal-k116c.bin", "apple/msrk-k116c.bin" +#include "t6050-touchid.dtsi" + /* The USB-C ports ATC1 and ATC2, as on the other K boards */ #include "t6050-k114-k116-usb.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k116s.dts b/arch/arm64/boot/dts/apple/t6050-k116s.dts index 3b29c1084dc2b..54d0391b6fde3 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116s.dts @@ -26,13 +26,6 @@ #define T6050_K116S #include "t6050-peripherals.dtsi" -/ { - aliases { - /* the boot loader reserves the SEP firmware and adds its manifests through this alias */ - sep = &sep; - }; -}; - &pinctrl_ap { /* * Pin 112 takes an SError when read, so only the pins a node names are @@ -176,29 +169,6 @@ #include "t6050-k116s-pmp-tunables.dtsi" -/* - * The SEP (ADT sep, dart-sep), as on the J714s: its mailbox, and its power domain with the two - * fabric parents left to the firmware, which genpd votes on and never turns off. The boot - * loader enables the SEP itself through its alias. - */ -&sep_mbox { - status = "okay"; -}; - -&ps_sep { - status = "okay"; -}; - -&ps_fab8_soc { - apple,firmware-owned; - status = "okay"; -}; - -&ps_fab0_piogw { - apple,firmware-owned; - status = "okay"; -}; - /* Sound: the J714s description, every value checked against the K116s ADT. */ /* * The amps' shared shutdown line (SDZ): ADT audio-speaker function-reset, AP pin 107. One @@ -544,41 +514,9 @@ status = "okay"; }; -/* - * Touch ID (ADT spi2/mesa): the Mesa sensor on spi2 at 8 MHz, chip select 0, - * powered by NUB GPIO 21 (function-mesa_pwr), data ready on AP GPIO 138, as - * on the J714s. spi2 runs from the 24 MHz reference (ADT clock-ids 451). - */ -&ps_nub_gpio { - status = "okay"; -}; - -&nub_gpio0 { - status = "okay"; -}; - -&ps_spi2 { - status = "okay"; -}; - -&spi2 { - clocks = <&clkref>; - status = "okay"; - - mesa: fingerprint@0 { - compatible = "apple,mesa-fingerprint"; - reg = <0>; - spi-max-frequency = <8000000>; - spi-cpol; - spi-cs-setup-delay-ns = <20>; - spi-cs-hold-delay-ns = <20>; - enable-gpios = <&nub_gpio0 21 GPIO_ACTIVE_HIGH>; - interrupt-parent = <&pinctrl_ap>; - interrupts = <138 IRQ_TYPE_EDGE_RISING>; - /* Per-device factory data from this Mac's own iBoot system container */ - firmware-name = "apple/mesacal-k116s.bin", "apple/msrk-k116s.bin"; - }; -}; +/* Touch ID: the SEP and the Mesa sensor, with this Mac's own calibration and root key */ +#define T6050_TOUCHID_FIRMWARE "apple/mesacal-k116s.bin", "apple/msrk-k116s.bin" +#include "t6050-touchid.dtsi" /* * The video encoder's power states, as on the J714s. iBoot leaves VENC0_SYS on, and the SoC does diff --git a/arch/arm64/boot/dts/apple/t6050-sep.dtsi b/arch/arm64/boot/dts/apple/t6050-sep.dtsi new file mode 100644 index 0000000000000..102b254178a1d --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-sep.dtsi @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The SEP (ADT sep, dart-sep) on the T6050 laptops: its mailbox, and its power domain with the + * two fabric parents left to the firmware, which genpd votes on and never turns off. The SEP + * and its DART stay disabled here: apple_sep enables them after it selects its policy, and only + * where the mailbox is enabled. + * + * Included after t6050-peripherals.dtsi. + */ + +/ { + aliases { + /* the boot loader reserves the SEP firmware and adds its manifests through this alias */ + sep = &sep; + }; +}; + +&sep_mbox { + status = "okay"; +}; + +&ps_sep { + status = "okay"; +}; + +&ps_fab8_soc { + apple,firmware-owned; + status = "okay"; +}; + +&ps_fab0_piogw { + apple,firmware-owned; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-touchid.dtsi b/arch/arm64/boot/dts/apple/t6050-touchid.dtsi new file mode 100644 index 0000000000000..0d7cb8986b809 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-touchid.dtsi @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Touch ID on the T6050 laptops: the SEP (t6050-sep.dtsi) and the Mesa sensor (ADT spi2/mesa). + * The live ADTs of the J714s, J716c, K114s and K116s and the 27.2 DeviceTrees of the other + * boards describe it alike: spi2 at 8 MHz, chip select 0, powered by NUB GPIO 21 + * (function-mesa_pwr), data ready on AP GPIO 138. spi2 runs from the 24 MHz reference (ADT + * clock-ids 451). + * + * The board defines T6050_TOUCHID_FIRMWARE before including this file: the sensor's + * calibration and signed root key, per-device factory data that aurora-touchid-setup builds + * from this Mac's own iBoot System Container. The board also leaves AP pin 138 out of its + * gpio-reserved-ranges. + * + * Included after t6050-peripherals.dtsi. + */ + +#ifndef T6050_TOUCHID_FIRMWARE +#error "define T6050_TOUCHID_FIRMWARE (calibration, root key) before including t6050-touchid.dtsi" +#endif + +#include "t6050-sep.dtsi" + +&ps_nub_gpio { + status = "okay"; +}; + +&nub_gpio0 { + status = "okay"; +}; + +&ps_spi2 { + status = "okay"; +}; + +&spi2 { + clocks = <&clkref>; + status = "okay"; + + mesa: fingerprint@0 { + compatible = "apple,mesa-fingerprint"; + reg = <0>; + spi-max-frequency = <8000000>; + spi-cpol; + spi-cs-setup-delay-ns = <20>; + spi-cs-hold-delay-ns = <20>; + enable-gpios = <&nub_gpio0 21 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <138 IRQ_TYPE_EDGE_RISING>; + firmware-name = T6050_TOUCHID_FIRMWARE; + }; +};