From 7e63b87b0ed10a4a7b06cb1ea07d03bac5103096 Mon Sep 17 00:00:00 2001 From: Sasha Finkelstein Date: Tue, 7 Apr 2026 13:33:46 +0200 Subject: [PATCH 01/18] Bluetooth: Add Broadcom channel priority commands Certain Broadcom bluetooth chips (bcm4377/bcm4378/bcm438) need ACL streams carrying audio to be set as "high priority" using a vendor specific command to prevent 10-ish second-long dropouts whenever something does a device scan. This patch sends the command when the socket priority is set to TC_PRIO_INTERACTIVE, as BlueZ does for audio. Signed-off-by: Sasha Finkelstein --- MAINTAINERS | 2 ++ drivers/bluetooth/hci_bcm4377.c | 2 ++ include/net/bluetooth/bluetooth.h | 4 ++++ include/net/bluetooth/hci_core.h | 11 +++++++++++ net/bluetooth/Kconfig | 7 +++++++ net/bluetooth/Makefile | 1 + net/bluetooth/brcm.c | 29 +++++++++++++++++++++++++++++ net/bluetooth/brcm.h | 17 +++++++++++++++++ net/bluetooth/hci_conn.c | 27 +++++++++++++++++++++++++++ net/bluetooth/l2cap_sock.c | 13 +++++++++++++ 10 files changed, 113 insertions(+) create mode 100644 net/bluetooth/brcm.c create mode 100644 net/bluetooth/brcm.h diff --git a/MAINTAINERS b/MAINTAINERS index 13241dc0aecafe..f20aebb9bf2d5a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2595,6 +2595,8 @@ F: include/dt-bindings/pinctrl/apple.h F: include/linux/mfd/macsmc.h F: include/linux/soc/apple/* F: include/uapi/drm/asahi_drm.h +F: net/bluetooth/brcm.c +F: net/bluetooth/brcm.h ARM/ARTPEC MACHINE SUPPORT M: Jesper Nilsson diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c index 925d0a6359453e..5f79920c030681 100644 --- a/drivers/bluetooth/hci_bcm4377.c +++ b/drivers/bluetooth/hci_bcm4377.c @@ -2397,6 +2397,8 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (bcm4377->hw->broken_le_ext_adv_report_phy) hci_set_quirk(hdev, HCI_QUIRK_FIXUP_LE_EXT_ADV_REPORT_PHY); + hci_set_brcm_capable(hdev); + pci_set_drvdata(pdev, bcm4377); hci_set_drvdata(hdev, bcm4377); SET_HCIDEV_DEV(hdev, &pdev->dev); diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 3faea66b19799a..5d82944370e427 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -458,6 +458,7 @@ struct l2cap_ctrl { }; struct hci_dev; +struct hci_conn; typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode); typedef void (*hci_req_complete_skb_t)(struct hci_dev *hdev, u8 status, @@ -470,6 +471,9 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status, int hci_ethtool_ts_info(unsigned int index, int sk_proto, struct kernel_ethtool_ts_info *ts_info); +int hci_conn_setsockopt(struct hci_conn *conn, struct sock *sk, int level, + int optname, sockptr_t optval, unsigned int optlen); + #define HCI_REQ_START BIT(0) #define HCI_REQ_SKB BIT(1) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 2c15c9d8dbf74d..eb721509c0ab88 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -642,6 +642,10 @@ struct hci_dev { bool aosp_quality_report; #endif +#if IS_ENABLED(CONFIG_BT_BRCMEXT) + bool brcm_capable; +#endif + int (*open)(struct hci_dev *hdev); int (*close)(struct hci_dev *hdev); int (*flush)(struct hci_dev *hdev); @@ -1794,6 +1798,13 @@ static inline void hci_set_aosp_capable(struct hci_dev *hdev) #endif } +static inline void hci_set_brcm_capable(struct hci_dev *hdev) +{ +#if IS_ENABLED(CONFIG_BT_BRCMEXT) + hdev->brcm_capable = true; +#endif +} + static inline void hci_devcd_setup(struct hci_dev *hdev) { #ifdef CONFIG_DEV_COREDUMP diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig index ee6457d1a5eed3..b611942c7b8ffd 100644 --- a/net/bluetooth/Kconfig +++ b/net/bluetooth/Kconfig @@ -107,6 +107,13 @@ config BT_AOSPEXT This options enables support for the Android Open Source Project defined HCI vendor extensions. +config BT_BRCMEXT + bool "Enable Broadcom extensions" + depends on BT + help + This option enables support for the Broadcom defined HCI + vendor extensions. + config BT_DEBUGFS bool "Export Bluetooth internals in debugfs" depends on BT && DEBUG_FS diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile index 41049b280887db..d402645dfb7da0 100644 --- a/net/bluetooth/Makefile +++ b/net/bluetooth/Makefile @@ -23,5 +23,6 @@ bluetooth-$(CONFIG_BT_LE) += iso.o bluetooth-$(CONFIG_BT_LEDS) += leds.o bluetooth-$(CONFIG_BT_MSFTEXT) += msft.o bluetooth-$(CONFIG_BT_AOSPEXT) += aosp.o +bluetooth-$(CONFIG_BT_BRCMEXT) += brcm.o bluetooth-$(CONFIG_BT_DEBUGFS) += hci_debugfs.o bluetooth-$(CONFIG_BT_SELFTEST) += selftest.o diff --git a/net/bluetooth/brcm.c b/net/bluetooth/brcm.c new file mode 100644 index 00000000000000..9aa0a265ab3d6b --- /dev/null +++ b/net/bluetooth/brcm.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2026 The Asahi Linux Contributors + */ + +#include +#include + +#include "brcm.h" + +int brcm_set_high_priority(struct hci_dev *hdev, u16 handle, bool enable) +{ + struct sk_buff *skb; + u8 cmd[3]; + + if (!hdev->brcm_capable) + return 0; + + cmd[0] = handle; + cmd[1] = handle >> 8; + cmd[2] = !!enable; + + skb = hci_cmd_sync(hdev, 0xfc57, sizeof(cmd), cmd, HCI_CMD_TIMEOUT); + if (IS_ERR(skb)) + return PTR_ERR(skb); + + kfree_skb(skb); + return 0; +} diff --git a/net/bluetooth/brcm.h b/net/bluetooth/brcm.h new file mode 100644 index 00000000000000..fdaee63bd1d23c --- /dev/null +++ b/net/bluetooth/brcm.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2026 The Asahi Linux Contributors + */ + +#if IS_ENABLED(CONFIG_BT_BRCMEXT) + +int brcm_set_high_priority(struct hci_dev *hdev, u16 handle, bool enable); + +#else + +static inline int brcm_set_high_priority(struct hci_dev *hdev, u16 handle, bool enable) +{ + return 0; +} + +#endif diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index fb96d019cf8568..636c36ff077673 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -35,6 +35,7 @@ #include #include +#include "brcm.h" #include "smp.h" #include "eir.h" @@ -3158,6 +3159,32 @@ int hci_conn_set_phy(struct hci_conn *conn, u32 phys) } } +int hci_conn_setsockopt(struct hci_conn *conn, struct sock *sk, int level, + int optname, sockptr_t optval, unsigned int optlen) { + int val; + bool old_high, new_high, changed; + + if (level != SOL_SOCKET) + return 0; + + if (optname != SO_PRIORITY) + return 0; + + if (optlen < sizeof(int)) + return -EINVAL; + + if (copy_from_sockptr(&val, optval, sizeof(val))) + return -EFAULT; + + old_high = sk->sk_priority >= TC_PRIO_INTERACTIVE; + new_high = val >= TC_PRIO_INTERACTIVE; + changed = old_high != new_high; + if (!changed) + return 0; + + return brcm_set_high_priority(conn->hdev, conn->handle, new_high); +} + static int abort_conn_sync(struct hci_dev *hdev, void *data) { struct hci_conn *conn = data; diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index d8cbe278443779..0c86be41622e2b 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -897,6 +897,16 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, BT_DBG("sk %p", sk); + if (level == SOL_SOCKET) { + conn = chan->conn; + if (conn) + err = hci_conn_setsockopt(conn->hcon, sock->sk, level, + optname, optval, optlen); + if (err) + return err; + return sock_setsockopt(sock, level, optname, optval, optlen); + } + if (level == SOL_L2CAP) return l2cap_sock_setsockopt_old(sock, optname, optval, optlen); @@ -1976,6 +1986,9 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, INIT_LIST_HEAD(&l2cap_pi(sk)->rx_busy); + if (sock) + set_bit(SOCK_CUSTOM_SOCKOPT, &sock->flags); + /* The sock takes ownership of the caller's reference on chan. */ l2cap_pi(sk)->chan = chan; From 0a27beeb1a9eceb73a492d581766337c72948963 Mon Sep 17 00:00:00 2001 From: Sasha Finkelstein Date: Thu, 21 May 2026 10:30:50 +0200 Subject: [PATCH 02/18] Fail the build on RUST=y and RUST_IS_AVAILABLE=n The current approach of silently disabling all rust drivers if the toolchain is missing results in users that try to compile their own kernels getting a "successful" build and then being confused about where did their drivers go. In comparison, missing openssl results in a build failure, not a disappearance of everything that depends on it. This also means that allyesconfig will depend on rust, but since the rust experiment concluded with "rust is here to stay", i believe that allyesconfig should be building rust drivers too. Signed-off-by: Sasha Finkelstein --- Documentation/rust/quick-start.rst | 6 +++--- init/Kconfig | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst index a6ec3fa94d3307..764c81d0dd5926 100644 --- a/Documentation/rust/quick-start.rst +++ b/Documentation/rust/quick-start.rst @@ -321,9 +321,9 @@ Configuration ------------- ``Rust support`` (``CONFIG_RUST``) needs to be enabled in the ``General setup`` -menu. The option is only shown if a suitable Rust toolchain is found (see -above), as long as the other requirements are met. In turn, this will make -visible the rest of options that depend on Rust. +menu. In turn, this will make visible the rest of options that depend on Rust. +You can check the value of ``RUST_IS_AVAILABLE`` to determine if your toolchain +is configured correctly. Afterwards, go to:: diff --git a/init/Kconfig b/init/Kconfig index d78a6e616311e8..dbc6d709068f42 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2193,7 +2193,6 @@ config PROFILING config RUST bool "Rust support" depends on HAVE_RUST - depends on RUST_IS_AVAILABLE select EXTENDED_MODVERSIONS if MODVERSIONS depends on !MODVERSIONS || GENDWARFKSYMS depends on !GCC_PLUGIN_RANDSTRUCT From 097b56319e37cb7399ccd1dfefdf5700f8291827 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 9 May 2026 11:58:52 +0200 Subject: [PATCH 03/18] driver-core: Add error message to device_links_missing_supplier WARN() Signed-off-by: Janne Grunau --- drivers/base/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/core.c b/drivers/base/core.c index 3ee92a5b88c3a0..a9df82e5f6b5d9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1076,6 +1076,7 @@ static void device_links_missing_supplier(struct device *dev) if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { WRITE_ONCE(link->status, DL_STATE_AVAILABLE); } else { + dev_err(dev, "devices misses supplier %s\n", dev_name(link->supplier)); WARN_ON(!device_link_test(link, DL_FLAG_SYNC_STATE_ONLY)); WRITE_ONCE(link->status, DL_STATE_DORMANT); } From d78ca86e55bea2e4906025beca56a968142737fb Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 30 May 2026 12:16:44 +0200 Subject: [PATCH 04/18] dt-bindings: gpio: apple,smc: Add compatible for 'gp00' keys Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition to 'gP00' keys. Add a second compatible to handle this keys with an additional macsmc-gpio instance. Signed-off-by: Janne Grunau --- Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml b/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml index 42b1bc0a10c97a..b4063a9dd1248c 100644 --- a/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml @@ -14,7 +14,9 @@ description: properties: compatible: - const: apple,smc-gpio + enum: + - apple,smc-gpio + - apple,smc-low-gpio gpio-controller: true From c8a3899d6716296f175c14726422acd622442745 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 29 May 2026 20:54:16 +0200 Subject: [PATCH 05/18] gpio: gpio-macsmc: Support 'gp00' GPIO keys Add support for SMC GPIO keys with a lower letter 'p' via the "apple,smc-low-gpio" compatible. This adds support for a second macsmc-gpio controller using 'gp00' keys. These keys are used on Apple M3 Pro and Max MacBooks in the controller for keyboard and trackpad and for the built-in DisplayPort to HDMI converter. Signed-off-by: Janne Grunau --- drivers/gpio/gpio-macsmc.c | 45 +++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/drivers/gpio/gpio-macsmc.c b/drivers/gpio/gpio-macsmc.c index b0952d066a9dd0..c3ca445a85ac9d 100644 --- a/drivers/gpio/gpio-macsmc.c +++ b/drivers/gpio/gpio-macsmc.c @@ -75,6 +75,7 @@ struct macsmc_gpio { struct gpio_chip gc; int first_index; + smc_key base_key; }; static int macsmc_gpio_nr(smc_key key) @@ -88,15 +89,15 @@ static int macsmc_gpio_nr(smc_key key) return low | (high << 4); } -static int macsmc_gpio_key(unsigned int offset) +static int macsmc_gpio_key(smc_key base_key, unsigned int offset) { - return _SMC_KEY("gP\0\0") | hex_asc_hi(offset) << 8 | hex_asc_lo(offset); + return base_key | hex_asc_hi(offset) << 8 | hex_asc_lo(offset); } static int macsmc_gpio_find_first_gpio_index(struct macsmc_gpio *smcgp) { struct apple_smc *smc = smcgp->smc; - smc_key key = macsmc_gpio_key(0); + smc_key key = macsmc_gpio_key(smcgp->base_key, 0); smc_key first_key, last_key; int start, count, ret; @@ -143,7 +144,7 @@ static int macsmc_gpio_find_first_gpio_index(struct macsmc_gpio *smcgp) static int macsmc_gpio_get_direction(struct gpio_chip *gc, unsigned int offset) { struct macsmc_gpio *smcgp = gpiochip_get_data(gc); - smc_key key = macsmc_gpio_key(offset); + smc_key key = macsmc_gpio_key(smcgp->base_key, offset); u32 val; int ret; @@ -163,7 +164,7 @@ static int macsmc_gpio_get_direction(struct gpio_chip *gc, unsigned int offset) static int macsmc_gpio_get(struct gpio_chip *gc, unsigned int offset) { struct macsmc_gpio *smcgp = gpiochip_get_data(gc); - smc_key key = macsmc_gpio_key(offset); + smc_key key = macsmc_gpio_key(smcgp->base_key, offset); u32 cmd, val; int ret; @@ -186,7 +187,7 @@ static int macsmc_gpio_get(struct gpio_chip *gc, unsigned int offset) static int macsmc_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) { struct macsmc_gpio *smcgp = gpiochip_get_data(gc); - smc_key key = macsmc_gpio_key(offset); + smc_key key = macsmc_gpio_key(smcgp->base_key, offset); int ret; value |= CMD_OUTPUT; @@ -217,7 +218,7 @@ static int macsmc_gpio_init_valid_mask(struct gpio_chip *gc, if (ret < 0) return ret; - if (key > SMC_KEY(gPff)) + if (key > macsmc_gpio_key(smcgp->base_key, MAX_GPIO - 1)) break; gpio_nr = macsmc_gpio_nr(key); @@ -232,10 +233,15 @@ static int macsmc_gpio_init_valid_mask(struct gpio_chip *gc, return 0; } +struct macsmc_gpio_of_match_data { + smc_key base_key; +}; + static int macsmc_gpio_probe(struct platform_device *pdev) { struct macsmc_gpio *smcgp; struct apple_smc *smc = dev_get_drvdata(pdev->dev.parent); + const struct macsmc_gpio_of_match_data *data = of_device_get_match_data(&pdev->dev); smc_key key; int ret; @@ -245,6 +251,7 @@ static int macsmc_gpio_probe(struct platform_device *pdev) smcgp->dev = &pdev->dev; smcgp->smc = smc; + smcgp->base_key = data ? data->base_key : _SMC_KEY("gP\0\0"); smcgp->first_index = macsmc_gpio_find_first_gpio_index(smcgp); if (smcgp->first_index < 0) @@ -254,12 +261,15 @@ static int macsmc_gpio_probe(struct platform_device *pdev) if (ret < 0) return ret; - if (key > macsmc_gpio_key(MAX_GPIO - 1)) + if (key > macsmc_gpio_key(smcgp->base_key, MAX_GPIO - 1)) return -ENODEV; dev_info(smcgp->dev, "First GPIO key: %p4ch\n", &key); - smcgp->gc.label = "macsmc-pmu-gpio"; + if (device_is_compatible(&pdev->dev, "apple,smc-low-gpio")) + smcgp->gc.label = "macsmc-pmu-low-gpio"; + else + smcgp->gc.label = "macsmc-pmu-gpio"; smcgp->gc.owner = THIS_MODULE; smcgp->gc.get = macsmc_gpio_get; smcgp->gc.set = macsmc_gpio_set; @@ -273,8 +283,23 @@ static int macsmc_gpio_probe(struct platform_device *pdev) return devm_gpiochip_add_data(&pdev->dev, &smcgp->gc, smcgp); } +static const struct macsmc_gpio_of_match_data macsmc_gpio_up_data = { + .base_key = _SMC_KEY("gP\0\0"), +}; + +static const struct macsmc_gpio_of_match_data macsmc_gpio_low_data = { + .base_key = _SMC_KEY("gp\0\0"), +}; + static const struct of_device_id macsmc_gpio_of_table[] = { - { .compatible = "apple,smc-gpio", }, + { + .compatible = "apple,smc-gpio", + .data = &macsmc_gpio_up_data, + }, + { + .compatible = "apple,smc-low-gpio", + .data = &macsmc_gpio_low_data, + }, {} }; MODULE_DEVICE_TABLE(of, macsmc_gpio_of_table); From 96fa2b9c825bd42c3ea4dc8c8adb6182e5016f51 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 30 May 2026 12:20:39 +0200 Subject: [PATCH 06/18] mfd: macsmc: Add second gpio subdevice for 'gp00' keys Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition to 'gP00' keys. These keys are handled by an additional macsmc-gpio instance using the "apple,smc-low-gpio" compatible. Signed-off-by: Janne Grunau --- drivers/mfd/macsmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/macsmc.c b/drivers/mfd/macsmc.c index 514cba7dc897ae..31540f67ddbd8a 100644 --- a/drivers/mfd/macsmc.c +++ b/drivers/mfd/macsmc.c @@ -48,6 +48,7 @@ static const struct mfd_cell apple_smc_devs[] = { MFD_CELL_NAME("macsmc-input"), MFD_CELL_NAME("macsmc-power"), MFD_CELL_OF("macsmc-gpio", NULL, NULL, 0, 0, "apple,smc-gpio"), + MFD_CELL_OF("macsmc-low-gpio", NULL, NULL, 0, 0, "apple,smc-low-gpio"), MFD_CELL_OF("macsmc-hwmon", NULL, NULL, 0, 0, "apple,smc-hwmon"), MFD_CELL_OF("macsmc-reboot", NULL, NULL, 0, 0, "apple,smc-reboot"), MFD_CELL_OF("macsmc-rtc", NULL, NULL, 0, 0, "apple,smc-rtc"), From b55b564be9bad1c2e9af812b0a216b74a9918875 Mon Sep 17 00:00:00 2001 From: James Calligeros Date: Thu, 13 Aug 2026 21:09:10 +1000 Subject: [PATCH 07/18] arm64: Kconfig: Select HAVE_SHARED_GPIOS for Apple Silicon Apple Silicon devices use shared GPIO lines for speaker codec reset. We have been abusing the regulator API for this downstream. Select HAVE_SHARED_GPIOS for ARCH_APPLE so that we can use the new shared GPIO proxy infrastructure for the speaker codec reset lines going forward. Signed-off-by: James Calligeros --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 72c812e76b0b11..7e5123f1092466 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -37,6 +37,7 @@ config ARCH_APPLE bool "Apple Silicon SoC family" select APPLE_AIC select APPLE_PMGR_PWRSTATE if PM + select HAVE_SHARED_GPIOS help This enables support for Apple's in-house ARM SoC family, such as the Apple M1. From f6fc879da3d538df6ebaa27ad20f34cb973123ad Mon Sep 17 00:00:00 2001 From: James Calligeros Date: Sun, 16 Aug 2026 21:12:28 +1000 Subject: [PATCH 08/18] ASoC: tas2764: Initialise SDZ GPIO low On Apple Silicon machines integrating TAS2764, the SDZ pin of all codecs is connected to a shared GPIO line. The kernel's shared GPIO infrastructure relies on the first change of the GPIO state being marked as its "default" state, and allows any consumer of the shared line to assert that state without consensus from other consumers. If the pin is initialised high, the shared GPIO core does not allow the line to be asserted without consensus. This breaks resuming from suspend on Apple Silicon machines; the driver attempts to restore the codec's register state and fails because other codecs are still holding the line low. Initialise the SDZ GPIO as "low" so that the first state change asserts it high, allowing any codec to pull the line up when it needs to. Signed-off-by: James Calligeros --- sound/soc/codecs/tas2764.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c index 34c82fbba8a726..f6b5983a833977 100644 --- a/sound/soc/codecs/tas2764.c +++ b/sound/soc/codecs/tas2764.c @@ -975,7 +975,7 @@ static int tas2764_parse_dt(struct device *dev, struct tas2764_priv *tas2764) } } - tas2764->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_HIGH); + tas2764->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_LOW); if (IS_ERR(tas2764->sdz_gpio)) { if (PTR_ERR(tas2764->sdz_gpio) == -EPROBE_DEFER) return -EPROBE_DEFER; From 4159178335583f8aafe357c9be05addb8d6ee156 Mon Sep 17 00:00:00 2001 From: James Calligeros Date: Sun, 16 Aug 2026 21:18:24 +1000 Subject: [PATCH 09/18] ASoC: tas2770: Initialise SDZ GPIO as low On Apple Silicon machines integrating TAS2770, the SDZ pin of all codecs is connected to a shared GPIO line. The kernel's shared GPIO infrastructure relies on the first change of the GPIO state being marked as its "default" state, and allows any consumer of the shared line to assert that state without consensus from other consumers. If the pin is initialised high, the shared GPIO core does not allow the line to be asserted without consensus. This breaks resuming from suspend on Apple Silicon machines; the driver attempts to restore the codec's register state and fails because other codecs are still holding the line low. Initialise the SDZ GPIO as "low" so that the first state change asserts it high, allowing any codec to pull the line up when it needs to. Signed-off-by: James Calligeros --- sound/soc/codecs/tas2770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 57dfa75088586a..bb1fa910443a35 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -912,7 +912,7 @@ static int tas2770_parse_dt(struct device *dev, struct tas2770_priv *tas2770) return dev_err_probe(dev, PTR_ERR(tas2770->sdz_reg), "Failed to get SDZ supply\n"); - tas2770->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_HIGH); + tas2770->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_LOW); if (IS_ERR(tas2770->sdz_gpio)) { if (PTR_ERR(tas2770->sdz_gpio) == -EPROBE_DEFER) return -EPROBE_DEFER; From 149c82b0ce0b554d0b145bbabd62d96af26c615d Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 16 Aug 2026 14:41:30 +0200 Subject: [PATCH 10/18] fixup! arm64: dts: apple: t8112: Put in audio nodes arm64: dts: apple: j413,j415,j493: Drop SDZ dummy regulator Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t8112-j413.dts | 19 ++++--------------- arch/arm64/boot/dts/apple/t8112-j415.dts | 23 ++++++----------------- arch/arm64/boot/dts/apple/t8112-j493.dts | 19 ++++--------------- 3 files changed, 14 insertions(+), 47 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts/apple/t8112-j413.dts index a9119ac584aa6f..5ae973bc79fef4 100644 --- a/arch/arm64/boot/dts/apple/t8112-j413.dts +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts @@ -101,22 +101,11 @@ }; }; -/* Virtual regulator representing the shared shutdown GPIO */ -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { speaker_left_woof: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -127,7 +116,7 @@ speaker_left_tweet: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -140,7 +129,7 @@ speaker_right_woof: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -151,7 +140,7 @@ speaker_right_tweet: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; diff --git a/arch/arm64/boot/dts/apple/t8112-j415.dts b/arch/arm64/boot/dts/apple/t8112-j415.dts index 9add9c531f68a0..20a64ecc122d87 100644 --- a/arch/arm64/boot/dts/apple/t8112-j415.dts +++ b/arch/arm64/boot/dts/apple/t8112-j415.dts @@ -101,22 +101,11 @@ }; }; -/* Virtual regulator representing the shared shutdown GPIO */ -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { speaker_left_woof1: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 1"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -127,7 +116,7 @@ speaker_left_tweet: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -138,7 +127,7 @@ speaker_left_woof2: codec@3a { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3a>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 2"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -151,7 +140,7 @@ speaker_right_woof1: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 1"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -162,7 +151,7 @@ speaker_right_tweet: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -173,7 +162,7 @@ speaker_right_woof2: codec@3d { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3d>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 2"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; diff --git a/arch/arm64/boot/dts/apple/t8112-j493.dts b/arch/arm64/boot/dts/apple/t8112-j493.dts index ba237db8f95030..fd3953fbb2fa0b 100644 --- a/arch/arm64/boot/dts/apple/t8112-j493.dts +++ b/arch/arm64/boot/dts/apple/t8112-j493.dts @@ -137,22 +137,11 @@ label = "USB-C Left-front"; }; -/* Virtual regulator representing the shared shutdown GPIO */ -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { speaker_left_rear: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Rear"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -163,7 +152,7 @@ speaker_left_front: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Front"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -176,7 +165,7 @@ speaker_right_rear: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Rear"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; @@ -187,7 +176,7 @@ speaker_right_front: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Front"; interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; From 810054cc68012ef9d4b5421506aee4f2371a78da Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 16 Aug 2026 14:45:38 +0200 Subject: [PATCH 11/18] fixup! arm64: dts: apple: t8103*: Put in audio nodes Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t8103-j293.dts | 19 ++++--------------- arch/arm64/boot/dts/apple/t8103-j313.dts | 15 ++------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts index 52b11a6ef3cbfd..2ab28ca93b2cd6 100644 --- a/arch/arm64/boot/dts/apple/t8103-j293.dts +++ b/arch/arm64/boot/dts/apple/t8103-j293.dts @@ -95,22 +95,11 @@ }; }; -/* 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; - }; -}; - &i2c1 { speaker_left_rear: codec@31 { compatible = "ti,tas5770l", "ti,tas2770"; reg = <0x31>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Rear"; interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>; @@ -122,7 +111,7 @@ speaker_left_front: codec@32 { compatible = "ti,tas5770l", "ti,tas2770"; reg = <0x32>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Front"; interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>; @@ -151,7 +140,7 @@ speaker_right_rear: codec@34 { compatible = "ti,tas5770l", "ti,tas2770"; reg = <0x34>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Rear"; interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>; @@ -163,7 +152,7 @@ speaker_right_front: codec@35 { compatible = "ti,tas5770l", "ti,tas2770"; reg = <0x35>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Front"; interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>; diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts index 59526d9e73dc94..f5b7bb4418d0dc 100644 --- a/arch/arm64/boot/dts/apple/t8103-j313.dts +++ b/arch/arm64/boot/dts/apple/t8103-j313.dts @@ -94,22 +94,11 @@ }; }; -/* 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; - }; -}; - &i2c1 { speaker_left: codec@31 { compatible = "ti,tas5770l", "ti,tas2770"; reg = <0x31>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left"; interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>; @@ -122,7 +111,7 @@ speaker_right: codec@34 { compatible = "ti,tas5770l", "ti,tas2770"; reg = <0x34>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right"; interrupts-extended = <&pinctrl_ap 182 IRQ_TYPE_LEVEL_LOW>; From 90cfa17c870104864c7a9aa3f5d3f294b59ccaa3 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 16 Aug 2026 14:48:24 +0200 Subject: [PATCH 12/18] fixup! arm64: dts: apple: t600x-jxxx: Put in audio nodes --- .../arm64/boot/dts/apple/t600x-j314-j316.dtsi | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index ab7fd02cc79550..ec6d9e2bec86c3 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -247,24 +247,13 @@ }; }; -/* Virtual regulator representing the shared shutdown GPIO */ -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { status = "okay"; speaker_left_tweet: codec@3a { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3a>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>; @@ -275,7 +264,7 @@ speaker_left_woof1: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 1"; interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>; @@ -286,7 +275,7 @@ speaker_left_woof2: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 2"; interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>; @@ -314,7 +303,7 @@ speaker_right_tweet: codec@3d { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3d>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>; @@ -325,7 +314,7 @@ speaker_right_woof1: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 1"; interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>; @@ -336,7 +325,7 @@ speaker_right_woof2: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 2"; interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>; From 4dae3d264ba8fb73b88ff82d9a065381ef66d588 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 16 Aug 2026 14:49:49 +0200 Subject: [PATCH 13/18] Revert "arm64: dts: apple: t602x: describe shared SDZ GPIO for tas2764" This reverts commit adb70d3fd6fca02e23928ab6db543f7f97679bab. Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi b/arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi index 0057e6a9465f9d..6b6b0225301d9a 100644 --- a/arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi @@ -55,32 +55,33 @@ interrupts = <44 IRQ_TYPE_LEVEL_LOW>; }; -/* Redefine GPIO for SDZ */ -&speaker_sdz { - gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; -}; - &speaker_left_tweet { + shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>; }; &speaker_left_woof1 { + shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>; }; &speaker_left_woof2 { + shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_tweet { + shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_woof1 { + shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_woof2 { + shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>; }; From 876376351fbfc4cff85e75a31fc69e3a8b296f93 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 16 Aug 2026 14:52:14 +0200 Subject: [PATCH 14/18] fixup! arm64: dts: apple: t[603x,8122]: Add speaker/jack nodes Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t6030-j514s.dts | 10 +++++---- arch/arm64/boot/dts/apple/t6030-j516s.dts | 10 +++++---- .../arm64/boot/dts/apple/t603x-j514-j516.dtsi | 22 +++++-------------- arch/arm64/boot/dts/apple/t8122-j504.dts | 22 +++++-------------- arch/arm64/boot/dts/apple/t8122-j613.dts | 19 ++++------------ arch/arm64/boot/dts/apple/t8122-j615.dts | 19 ++++------------ 6 files changed, 32 insertions(+), 70 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6030-j514s.dts b/arch/arm64/boot/dts/apple/t6030-j514s.dts index 5891cfe035f83c..aa5db1e84483f4 100644 --- a/arch/arm64/boot/dts/apple/t6030-j514s.dts +++ b/arch/arm64/boot/dts/apple/t6030-j514s.dts @@ -33,31 +33,33 @@ brcm,board-type = "apple,texa"; }; -&speaker_sdz { - gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; -}; - &speaker_left_tweet { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_left_woof1 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_left_woof2 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_tweet { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_woof1 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_woof2 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; diff --git a/arch/arm64/boot/dts/apple/t6030-j516s.dts b/arch/arm64/boot/dts/apple/t6030-j516s.dts index 6b59a0f97b166c..5532faac8ed8fa 100644 --- a/arch/arm64/boot/dts/apple/t6030-j516s.dts +++ b/arch/arm64/boot/dts/apple/t6030-j516s.dts @@ -33,31 +33,33 @@ brcm,board-type = "apple,jura"; }; -&speaker_sdz { - gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; -}; - &speaker_left_tweet { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_left_woof1 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_left_woof2 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_tweet { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_woof1 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; &speaker_right_woof2 { + shutdown-gpios = <&pinctrl_ap 171 GPIO_ACTIVE_HIGH>; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; }; diff --git a/arch/arm64/boot/dts/apple/t603x-j514-j516.dtsi b/arch/arm64/boot/dts/apple/t603x-j514-j516.dtsi index 60c769f1022443..a1cfcdbfe89ae8 100644 --- a/arch/arm64/boot/dts/apple/t603x-j514-j516.dtsi +++ b/arch/arm64/boot/dts/apple/t603x-j514-j516.dtsi @@ -108,23 +108,13 @@ }; }; -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { status = "okay"; speaker_left_tweet: codec@3a { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3a>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; @@ -135,7 +125,7 @@ speaker_left_woof1: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 1"; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; @@ -146,7 +136,7 @@ speaker_left_woof2: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 2"; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; @@ -174,7 +164,7 @@ speaker_right_tweet: codec@3d { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3d>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; @@ -185,7 +175,7 @@ speaker_right_woof1: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 1"; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; @@ -196,7 +186,7 @@ speaker_right_woof2: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 2"; interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>; diff --git a/arch/arm64/boot/dts/apple/t8122-j504.dts b/arch/arm64/boot/dts/apple/t8122-j504.dts index 12986c49d126bd..4c36e01bae6412 100644 --- a/arch/arm64/boot/dts/apple/t8122-j504.dts +++ b/arch/arm64/boot/dts/apple/t8122-j504.dts @@ -132,23 +132,13 @@ apple,machine-kind = "MacBook Pro"; }; -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { status = "okay"; speaker_left_tweet: codec@3a { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3a>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -159,7 +149,7 @@ speaker_left_woof1: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 1"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -170,7 +160,7 @@ speaker_left_woof2: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer 2"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -194,7 +184,7 @@ speaker_right_tweet: codec@3d { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3d>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -205,7 +195,7 @@ speaker_right_woof1: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 1"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -216,7 +206,7 @@ speaker_right_woof2: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer 2"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; diff --git a/arch/arm64/boot/dts/apple/t8122-j613.dts b/arch/arm64/boot/dts/apple/t8122-j613.dts index 9e70891cbe139b..aa9e49dc4d12f8 100644 --- a/arch/arm64/boot/dts/apple/t8122-j613.dts +++ b/arch/arm64/boot/dts/apple/t8122-j613.dts @@ -60,22 +60,11 @@ apple,machine-kind = "MacBook Air"; }; -/* Virtual regulator representing the shared shutdown GPIO */ -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { speaker_left_woof: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -86,7 +75,7 @@ speaker_left_tweet: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -99,7 +88,7 @@ speaker_right_woof: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -110,7 +99,7 @@ speaker_right_tweet: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; diff --git a/arch/arm64/boot/dts/apple/t8122-j615.dts b/arch/arm64/boot/dts/apple/t8122-j615.dts index 8f48585c3d664f..99e6fd33d5a645 100644 --- a/arch/arm64/boot/dts/apple/t8122-j615.dts +++ b/arch/arm64/boot/dts/apple/t8122-j615.dts @@ -60,22 +60,11 @@ brcm,board-type = "apple,tuzla"; }; -/* Virtual regulator representing the shared shutdown GPIO */ -/ { - speaker_sdz: fixed-regulator-sn012776-sdz { - compatible = "regulator-fixed"; - regulator-name = "sn012776-sdz"; - startup-delay-us = <5000>; - gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - &i2c1 { speaker_left_woof: codec@38 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x38>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Woofer"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -86,7 +75,7 @@ speaker_left_tweet: codec@39 { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x39>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Left Tweeter"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -99,7 +88,7 @@ speaker_right_woof: codec@3b { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3b>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Woofer"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; @@ -110,7 +99,7 @@ speaker_right_tweet: codec@3c { compatible = "ti,sn012776", "ti,tas2764"; reg = <0x3c>; - SDZ-supply = <&speaker_sdz>; + shutdown-gpios = <&pinctrl_ap 13 GPIO_ACTIVE_HIGH>; #sound-dai-cells = <0>; sound-name-prefix = "Right Tweeter"; interrupts-extended = <&pinctrl_ap 12 IRQ_TYPE_LEVEL_LOW>; From 4635847351daba66df9815a61c6eeb75b585fedb Mon Sep 17 00:00:00 2001 From: Yureka Lilian Date: Sun, 28 Jun 2026 19:28:54 +0200 Subject: [PATCH 15/18] pmdomain: add pmp-report offsets for t6030,t8122 (untested) t6031/t6034 continue using the same offsets as t602x Signed-off-by: Yureka Lilian --- drivers/pmdomain/apple/pmp-report.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/pmdomain/apple/pmp-report.c b/drivers/pmdomain/apple/pmp-report.c index 8050ade5ef8d08..fe3992c2e1390b 100644 --- a/drivers/pmdomain/apple/pmp-report.c +++ b/drivers/pmdomain/apple/pmp-report.c @@ -67,6 +67,13 @@ static const struct apple_pmp_report_offsets apple_pmp_offsets_t602x = { .status = 0x10, }; +static const struct apple_pmp_report_offsets apple_pmp_offsets_t6030 = { + .tgt_read = 0x1180, + .tgt_write = 0x108c0, + .actual = 0x11c0, + .status = 0x10, +}; + static const struct apple_pmp_report_offsets apple_pmp_offsets_t8112 = { .tgt_read = 0xa00, .tgt_write = 0x10500, @@ -74,10 +81,19 @@ static const struct apple_pmp_report_offsets apple_pmp_offsets_t8112 = { .status = 0x10, }; +static const struct apple_pmp_report_offsets apple_pmp_offsets_t8122 = { + .tgt_read = 0x1000, + .tgt_write = 0x10800, + .actual = 0x1080, + .status = 0x10, +}; + static const struct of_device_id apple_pmp_report_of_match[] = { { .compatible = "apple,t6000-pmp-v2-report", .data = &apple_pmp_offsets_t600x }, { .compatible = "apple,t6020-pmp-v2-report", .data = &apple_pmp_offsets_t602x }, + { .compatible = "apple,t6030-pmp-v2-report", .data = &apple_pmp_offsets_t6030 }, { .compatible = "apple,t8112-pmp-v2-report", .data = &apple_pmp_offsets_t8112 }, + { .compatible = "apple,t8122-pmp-v2-report", .data = &apple_pmp_offsets_t8122 }, {} }; From c7a4f22304f55e7a75cd05be79d88fbb59028f48 Mon Sep 17 00:00:00 2001 From: Yureka Date: Tue, 30 Jun 2026 14:49:17 +0200 Subject: [PATCH 16/18] arm64: dts: apple: t8122: PMP support (untested) Signed-off-by: Yureka --- arch/arm64/boot/dts/apple/t8122.dtsi | 159 +++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8122.dtsi b/arch/arm64/boot/dts/apple/t8122.dtsi index 9111fe3b0050dc..7e3f896b30e5d8 100644 --- a/arch/arm64/boot/dts/apple/t8122.dtsi +++ b/arch/arm64/boot/dts/apple/t8122.dtsi @@ -20,6 +20,12 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + #ifdef APPLE_USE_PMP + pmp = &pmp; + #endif + }; + cpus { #address-cells = <2>; #size-cells = <0>; @@ -651,6 +657,133 @@ }; }; + pmp_dart: iommu@2d0300000 { + compatible = "apple,t8122-dart", "apple,t8110-dart"; + reg = <0x2 0xd0300000 0x0 0x4000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_pmp>; + }; + + pmp_report: pmp_report@2d03c0000 { + compatible = "apple,t8122-pmp-v2-report"; + reg = <0x2 0xd03c0000 0x0 0x20000>; + power-domains = <&ps_pms_sram>; + #address-cells = <1>; + #size-cells = <0>; + + pmp_report_ane_sys: report@5 { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x5>; + label = "pmp-ane-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_ane_sys>; + status = "disabled"; + }; + + pmp_report_isp_sys: report@6 { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x6>; + label = "pmp-isp-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_isp_sys>; + status = "disabled"; + }; + + pmp_report_disp: report@7 { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x7>; + label = "pmp-disp"; + #power-domain-cells = <0>; + power-domains = <&ps_disp_cpu>; + apple,always-on; + }; + + pmp_report_dispext: report@8 { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x8>; + label = "pmp-dispext"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext_cpu>; + }; + + pmp_report_venc_sys: report@9 { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x9>; + label = "pmp-venc-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_venc_sys>; + status = "disabled"; + }; + + pmp_report_avd_sys: report@a { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xa>; + label = "pmp-avd-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_avd_sys>; + status = "disabled"; + }; + + pmp_report_msr: report@b { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xb>; + label = "pmp-msr"; + #power-domain-cells = <0>; + power-domains = <&ps_msr>; + status = "disabled"; + }; + + pmp_report_jpg: report@c { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xc>; + label = "pmp-jpg"; + #power-domain-cells = <0>; + power-domains = <&ps_jpg>; + status = "disabled"; + }; + + pmp_report_scodec: report@d { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xd>; + label = "pmp-scodec"; + #power-domain-cells = <0>; + power-domains = <&ps_scodec>; + status = "disabled"; + }; + + pmp_report_ans: report@11 { + compatible = "apple,t8122-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x11>; + label = "pmp-ans"; + #power-domain-cells = <0>; + power-domains = <&ps_ans>; + }; + }; + + pmp: pmp@2d0500000 { + compatible = "apple,t8122-pmp-v2", "apple,t6000-pmp-v2"; + reg = <0x2 0xd0500000 0x0 0x80000>, + <0x2 0xd0c00000 0x0 0x4000>; + reg-names = "pmp", "asc"; + mboxes = <&pmp_mbox>; + mbox-names = "mbox"; + iommus = <&pmp_dart 0>; + power-domains = <&ps_pmp>; + status = "disabled"; + }; + pmgr: power-management@2d0700000 { compatible = "apple,t8122-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; #address-cells = <1>; @@ -659,6 +792,20 @@ /* child nodes are added in t8122-pmgr.dtsi */ }; + pmp_mbox: mbox@2d0c08000 { + compatible = "apple,t8122-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x2 0xd0c08000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_pmp>, <&ps_pms_sram>; + }; + pinctrl_ap: pinctrl@2c7100000 { compatible = "apple,t8122-pinctrl", "apple,t8103-pinctrl"; reg = <0x2 0xc7100000 0x0 0x100000>; @@ -1069,13 +1216,21 @@ "recv-empty", "recv-not-empty"; #mbox-cells = <0>; + #if defined(APPLE_USE_PMP) + power-domains = <&pmp_report_ans>; + #else power-domains = <&ps_ans>; + #endif }; sart: sart@30dc50000 { compatible = "apple,t8122-sart", "apple,t6000-sart"; reg = <0x3 0x0dc50000 0x0 0x10000>; + #if defined(APPLE_USE_PMP) + power-domains = <&pmp_report_ans>; + #else power-domains = <&ps_ans>; + #endif }; nvme: nvme@30dcc0000 { @@ -1090,7 +1245,11 @@ mboxes = <&ans_mbox>; apple,sart = <&sart>; + #if defined(APPLE_USE_PMP) + power-domains = <&pmp_report_ans>, <&ps_apcie_st>; + #else power-domains = <&ps_ans>, <&ps_apcie_st>; + #endif power-domain-names = "ans", "apcie0"; resets = <&ps_ans>; }; From 55de160e95261c406dd703cbe51ca8bba2d780c3 Mon Sep 17 00:00:00 2001 From: Yureka Date: Tue, 30 Jun 2026 14:49:41 +0200 Subject: [PATCH 17/18] arm64: dts: apple: t6030: PMP support (untested) Signed-off-by: Yureka --- arch/arm64/boot/dts/apple/t6030-pmgr.dtsi | 2 + arch/arm64/boot/dts/apple/t6030.dtsi | 168 ++++++++++++++++++++++ 2 files changed, 170 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6030-pmgr.dtsi b/arch/arm64/boot/dts/apple/t6030-pmgr.dtsi index 70b75372784e6a..41300372413051 100644 --- a/arch/arm64/boot/dts/apple/t6030-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t6030-pmgr.dtsi @@ -879,6 +879,7 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = "pmp"; + apple,always-on; }; ps_pms_sram: power-controller@4d0 { @@ -887,6 +888,7 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = "pms_sram"; + apple,always-on; }; ps_lw31: power-controller@4d8 { diff --git a/arch/arm64/boot/dts/apple/t6030.dtsi b/arch/arm64/boot/dts/apple/t6030.dtsi index efa9e577344588..9c05c6ac2a1dfe 100644 --- a/arch/arm64/boot/dts/apple/t6030.dtsi +++ b/arch/arm64/boot/dts/apple/t6030.dtsi @@ -18,6 +18,12 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + #ifdef APPLE_USE_PMP + pmp = &pmp; + #endif + }; + cpus { #address-cells = <2>; #size-cells = <0>; @@ -800,6 +806,156 @@ #clock-cells = <1>; }; + pmp_dart: iommu@350300000 { + compatible = "apple,t6030-dart", "apple,t8110-dart"; + reg = <0x3 0x50300000 0x0 0x4000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_pmp>; + }; + + pmp_report: pmp_report@3503c0000 { + compatible = "apple,t6030-pmp-v2-report"; + reg = <0x3 0x503c0000 0x0 0x20000>; + power-domains = <&ps_pms_sram>; + #address-cells = <1>; + #size-cells = <0>; + + pmp_report_ane_sys: report@5 { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x5>; + label = "pmp-ane-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_ane_sys>; + status = "disabled"; + }; + + pmp_report_isp_sys: report@6 { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x6>; + label = "pmp-isp-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_isp_sys>; + status = "disabled"; + }; + + pmp_report_disp: report@7 { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x7>; + label = "pmp-disp"; + #power-domain-cells = <0>; + power-domains = <&ps_disp_cpu>; + apple,always-on; + }; + + pmp_report_dispext0: report@8 { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x8>; + label = "pmp-dispext0"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext0_cpu>; + }; + + pmp_report_dispext1: report@9 { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x9>; + label = "pmp-dispext1"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext1_cpu>; + }; + + pmp_report_venc_sys: report@a { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xa>; + label = "pmp-venc-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_venc_sys>; + status = "disabled"; + }; + + pmp_report_avd_sys: report@b { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xb>; + label = "pmp-avd-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_avd_sys>; + status = "disabled"; + }; + + pmp_report_msr: report@c { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xc>; + label = "pmp-msr"; + #power-domain-cells = <0>; + power-domains = <&ps_msr>; + status = "disabled"; + }; + + pmp_report_jpg: report@d { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xd>; + label = "pmp-jpg"; + #power-domain-cells = <0>; + power-domains = <&ps_jpg>; + status = "disabled"; + }; + + pmp_report_scodec: report@e { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xe>; + label = "pmp-scodec"; + #power-domain-cells = <0>; + power-domains = <&ps_scodec>; + status = "disabled"; + }; + + pmp_report_ans: report@10 { + compatible = "apple,t6030-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x10>; + label = "pmp-ans"; + #power-domain-cells = <0>; + power-domains = <&ps_ans>; + }; + }; + + pmp: pmp@350500000 { + compatible = "apple,t6030-pmp-v2", "apple,t6000-pmp-v2"; + reg = <0x3 0x50500000 0x0 0x80000>, + <0x3 0x50c00000 0x0 0x4000>; + reg-names = "pmp", "asc"; + mboxes = <&pmp_mbox>; + mbox-names = "mbox"; + iommus = <&pmp_dart 0>; + power-domains = <&ps_pmp>; + status = "disabled"; + }; + + pmp_mbox: mbox@350c08000 { + compatible = "apple,t6030-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x3 0x50c08000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_pmp>, <&ps_pms_sram>; + }; + aic: interrupt-controller@351000000 { compatible = "apple,t6030-aic3", "apple,t8122-aic3"; #interrupt-cells = <3>; @@ -1182,13 +1338,21 @@ "recv-empty", "recv-not-empty"; #mbox-cells = <0>; + #if defined(APPLE_USE_PMP) + power-domains = <&pmp_report_ans>; + #else power-domains = <&ps_ans>; + #endif }; sart: sart@38dc50000 { compatible = "apple,t6030-sart", "apple,t6000-sart"; reg = <0x3 0x8dc50000 0x0 0xc000>; + #if defined(APPLE_USE_PMP) + power-domains = <&pmp_report_ans>; + #else power-domains = <&ps_ans>; + #endif }; nvme: nvme@38dcc0000 { @@ -1203,7 +1367,11 @@ mboxes = <&ans_mbox>; apple,sart = <&sart>; + #if defined(APPLE_USE_PMP) + power-domains = <&pmp_report_ans>, <&ps_apcie_sys_st>; + #else power-domains = <&ps_ans>, <&ps_apcie_sys_st>; + #endif power-domain-names = "ans", "apcie0"; resets = <&ps_ans>; }; From 251be01f0acf86fa5164a8673aa38e0db41569b8 Mon Sep 17 00:00:00 2001 From: Yureka Date: Tue, 30 Jun 2026 14:50:16 +0200 Subject: [PATCH 18/18] arm64: dts: apple: t603[124]: PMP support Tested on t6034 Signed-off-by: Yureka --- arch/arm64/boot/dts/apple/t6031-base.dtsi | 6 + arch/arm64/boot/dts/apple/t6031-die0.dtsi | 202 ++++++++++++++++++++++ arch/arm64/boot/dts/apple/t6031-nvme.dtsi | 12 ++ arch/arm64/boot/dts/apple/t6031-pmgr.dtsi | 2 + arch/arm64/boot/dts/apple/t6032.dtsi | 18 ++ 5 files changed, 240 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6031-base.dtsi b/arch/arm64/boot/dts/apple/t6031-base.dtsi index 4bf7ce8535caa1..61d584387f46a3 100644 --- a/arch/arm64/boot/dts/apple/t6031-base.dtsi +++ b/arch/arm64/boot/dts/apple/t6031-base.dtsi @@ -11,6 +11,12 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + #ifdef APPLE_USE_PMP + pmp = &pmp; + #endif + }; + cpus { #address-cells = <2>; #size-cells = <0>; diff --git a/arch/arm64/boot/dts/apple/t6031-die0.dtsi b/arch/arm64/boot/dts/apple/t6031-die0.dtsi index 78249b623b78f2..d3522fa9696913 100644 --- a/arch/arm64/boot/dts/apple/t6031-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t6031-die0.dtsi @@ -32,6 +32,208 @@ power-domains = <&ps_aic>; }; + pmp_dart: iommu@290300000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x90300000 0x0 0x4000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_pmp>; + }; + + pmp_report: pmp_report@2903c0000 { + compatible = "apple,t6031-pmp-v2-report","apple,t6020-pmp-v2-report"; + reg = <0x2 0x903c0000 0x0 0x30000>; + power-domains = <&ps_pms_sram>; + #address-cells = <1>; + #size-cells = <0>; + + pmp_report_ane_sys: report@e { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xe>; + label = "pmp-ane-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_ane_sys>; + status = "disabled"; + }; + + pmp_report_isp_sys: report@f { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0xf>; + label = "pmp-isp-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_isp_sys>; + status = "disabled"; + }; + + pmp_report_disp: report@10 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x10>; + label = "pmp-disp"; + #power-domain-cells = <0>; + power-domains = <&ps_disp_fe>; + apple,always-on; + }; + + pmp_report_dispext0: report@11 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x11>; + label = "pmp-dispext0"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext0_fe>; + status = "disabled"; + }; + + pmp_report_dispext1: report@12 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x12>; + label = "pmp-dispext1"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext1_fe>; + status = "disabled"; + }; + + pmp_report_dispext2: report@13 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x13>; + label = "pmp-dispext2"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext2_fe>; + status = "disabled"; + }; + + pmp_report_dispext3: report@14 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x14>; + label = "pmp-dispext3"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext3_fe>; + status = "disabled"; + }; + + pmp_report_venc0_sys: report@15 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x15>; + label = "pmp-venc0-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_venc0_sys>; + status = "disabled"; + }; + + pmp_report_venc1_sys: report@16 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x16>; + label = "pmp-venc1-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_venc1_sys>; + status = "disabled"; + }; + + pmp_report_avd_sys: report@17 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x17>; + label = "pmp-avd-sys"; + #power-domain-cells = <0>; + power-domains = <&ps_avd_sys>; + status = "disabled"; + }; + + pmp_report_msr0: report@18 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x18>; + label = "pmp-msr0"; + #power-domain-cells = <0>; + power-domains = <&ps_msr0>; + status = "disabled"; + }; + + pmp_report_msr1: report@19 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x19>; + label = "pmp-msr1"; + #power-domain-cells = <0>; + power-domains = <&ps_msr1>; + status = "disabled"; + }; + + pmp_report_jpg: report@1a { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x1a>; + label = "pmp-jpg"; + #power-domain-cells = <0>; + power-domains = <&ps_jpg>; + status = "disabled"; + }; + + pmp_report_scodec: report@1b { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x1b>; + label = "pmp-scodec"; + #power-domain-cells = <0>; + power-domains = <&ps_scodec>; + status = "disabled"; + }; + + pmp_report_prores: report@1c { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x1c>; + label = "pmp-prores"; + #power-domain-cells = <0>; + power-domains = <&ps_prores>; + status = "disabled"; + }; + + pmp_report_ans: report@21 { + compatible = "apple,t6031-pmp-v2-report-entry", + "apple,t6000-pmp-v2-report-entry"; + reg = <0x21>; + label = "pmp-ans"; + #power-domain-cells = <0>; + power-domains = <&ps_ans>; + }; + }; + + pmp: pmp@290700000 { + compatible = "apple,t6031-pmp-v2", "apple,t6000-pmp-v2"; + reg = <0x2 0x90700000 0x0 0x100000>, + <0x2 0x90c00000 0x0 0x4000>; + reg-names = "pmp", "asc"; + mboxes = <&pmp_mbox>; + mbox-names = "mbox"; + iommus = <&pmp_dart 0>; + power-domains = <&ps_pmp>; + status = "disabled"; + }; + + pmp_mbox: mbox@290c08000 { + compatible = "apple,t6031-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x2 0x90c08000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_pmp>, <&ps_pms_sram>; + }; + nub_spmi: spmi@2a1014000 { compatible = "apple,t6031-spmi", "apple,t8103-spmi"; reg = <0x2 0xa1014000 0x0 0x100>; diff --git a/arch/arm64/boot/dts/apple/t6031-nvme.dtsi b/arch/arm64/boot/dts/apple/t6031-nvme.dtsi index e69cf0e73a2a73..09933dd954be40 100644 --- a/arch/arm64/boot/dts/apple/t6031-nvme.dtsi +++ b/arch/arm64/boot/dts/apple/t6031-nvme.dtsi @@ -15,14 +15,22 @@ ; interrupt-names = "send-empty", "send-not-empty", "recv-empty", "recv-not-empty"; + #if defined(APPLE_USE_PMP) + power-domains = <&DIE_NODE(pmp_report_ans)>; + #else power-domains = <&DIE_NODE(ps_ans)>; + #endif #mbox-cells = <0>; }; DIE_NODE(sart): sart@34dc50000 { compatible = "apple,t6031-sart", "apple,t6000-sart"; reg = <0x3 0x4dc50000 0x0 0x10000>; + #if defined(APPLE_USE_PMP) + power-domains = <&DIE_NODE(pmp_report_ans)>; + #else power-domains = <&DIE_NODE(ps_ans)>; + #endif }; DIE_NODE(nvme): nvme@34dcc0000 { @@ -35,7 +43,11 @@ interrupts = ; mboxes = <&DIE_NODE(ans_mbox)>; apple,sart = <&DIE_NODE(sart)>; + #if defined(APPLE_USE_PMP) + power-domains = <&DIE_NODE(pmp_report_ans)>, + #else power-domains = <&DIE_NODE(ps_ans)>, + #endif <&DIE_NODE(ps_apcie_sys_st)>, <&DIE_NODE(ps_apcie_sys_st1)>; power-domain-names = "ans", "apcie0", "apcie1"; diff --git a/arch/arm64/boot/dts/apple/t6031-pmgr.dtsi b/arch/arm64/boot/dts/apple/t6031-pmgr.dtsi index 02e62cda7852b6..f22448e2f13aeb 100644 --- a/arch/arm64/boot/dts/apple/t6031-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t6031-pmgr.dtsi @@ -1900,6 +1900,7 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = DIE_LABEL(pmp); + apple,always-on; }; DIE_NODE(ps_pms_sram): power-controller@560 { @@ -1908,6 +1909,7 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = DIE_LABEL(pms_sram); + apple,always-on; }; DIE_NODE(ps_atc0_cio_pcie): power-controller@598 { diff --git a/arch/arm64/boot/dts/apple/t6032.dtsi b/arch/arm64/boot/dts/apple/t6032.dtsi index 0f13bf1a08016f..953ccbe86ae5e0 100644 --- a/arch/arm64/boot/dts/apple/t6032.dtsi +++ b/arch/arm64/boot/dts/apple/t6032.dtsi @@ -353,6 +353,8 @@ /delete-node/ &ps_disp_sys; /delete-node/ &ps_disp_sys_die1; +/delete-node/ &pmp_report_disp; + /* delete non-present ISP power-states */ /delete-node/ &isp_dart0; /delete-node/ &isp_dart1; @@ -373,6 +375,22 @@ /delete-node/ &ps_isp_sys; /delete-node/ &ps_isp_sys_die1; +/delete-node/ &pmp_report_isp_sys; + +/* Disable ANS PMP reporting */ +/delete-node/ &pmp_report_ans; +&ans_mbox_die1 { + power-domains = <&ps_ans_die1>; +}; +&sart_die1 { + power-domains = <&ps_ans_die1>; +}; +&nvme_die1 { + power-domains = <&ps_ans_die1>, + <&ps_apcie_sys_st_die1>, + <&ps_apcie_sys_st1_die1>; +}; + &ps_afi_d2d_0 { status = "okay"; };