From 44d7300cba4e1640493e51ecc1c315185b717a16 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:16:20 -0643 Subject: [PATCH 01/20] dt-bindings: clock: google,zumapro: Add the HSI0 USI4 clocks Add CMU_HSI0's USI4 clock ids, 28 to 32, appended after USI3's. On the Pixel 9a USI4 is I2C19, the control bus of the two TAS2572 speaker amplifiers. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-sfr.c Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- include/dt-bindings/clock/google,zumapro.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/dt-bindings/clock/google,zumapro.h b/include/dt-bindings/clock/google,zumapro.h index e54d7a6f35..b46da728ad 100644 --- a/include/dt-bindings/clock/google,zumapro.h +++ b/include/dt-bindings/clock/google,zumapro.h @@ -103,6 +103,11 @@ #define CLK_DOUT_HSI0_USI3 25 #define CLK_GOUT_HSI0_USI3_IP 26 #define CLK_GOUT_HSI0_USI3_PCLK 27 +#define CLK_MOUT_HSI0_USI4_LOCAL 28 +#define CLK_GOUT_HSI0_USI4_SOURCE 29 +#define CLK_DOUT_HSI0_USI4 30 +#define CLK_GOUT_HSI0_USI4_IP 31 +#define CLK_GOUT_HSI0_USI4_PCLK 32 /* CMU_G3D. */ #define CLK_FOUT_G3D 1 From a3948cb509b890346872fd46524c67a859df77da Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:16:31 -0643 Subject: [PATCH 02/20] clk: samsung: zumapro: Add the HSI0 USI4 clocks Add CMU_HSI0's USI4, the Pixel 9a's I2C19 (the TAS2572 speaker amplifiers' control bus). The bootloader leaves the path running, so it is described read-only: the local mux and the divider take CLK_MUX_READ_ONLY and CLK_DIVIDER_READ_ONLY, and the source, IP and PCLK gates go in hsi0_ro_gates rather than hsi0_regs. The I2C driver derives its timing from the inherited rate. The mux (0x1024), divider (0x1824) and gates (0x2128, 0x210c, 0x2110), and the mux parents (HSI0 PERI user, oscclk), follow zuma's cmucal-sfr.c and cmucal-node.c, four bytes on from USI3's. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty carries these clocks under that tree's own ids. The bootloader's state read back as the PERI user route, divide by one, and the three gates on; with them the exynos5-hsi2c driver binds I2C19 and both TAS2572s probe and play. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-sfr.c Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/soc/google/cal-if/zuma/cmucal-node.c Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- drivers/clk/samsung/clk-zumapro.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-zumapro.c b/drivers/clk/samsung/clk-zumapro.c index 4e47c45c12..d813b970b7 100644 --- a/drivers/clk/samsung/clk-zumapro.c +++ b/drivers/clk/samsung/clk-zumapro.c @@ -621,6 +621,7 @@ PNAME(mout_hsi0_noc_local_parents) = { "zumapro_mout_hsi0_noc_user", "zumapro_mo PNAME(mout_hsi0_peri_user_parents) = { "oscclk", "zumapro_dout_hsi0_peri" }; PNAME(mout_hsi0_usi2_local_parents) = { "zumapro_mout_hsi0_peri_user", "oscclk" }; PNAME(mout_hsi0_usi3_local_parents) = { "zumapro_mout_hsi0_peri_user", "oscclk" }; +PNAME(mout_hsi0_usi4_local_parents) = { "zumapro_mout_hsi0_peri_user", "oscclk" }; static const struct samsung_pll_clock hsi0_plls[] __initconst = { PLL(pll_0822x, CLK_FOUT_HSI0_USB, "zumapro_fout_hsi0_usb", "oscclk", @@ -645,6 +646,9 @@ static const struct samsung_mux_clock hsi0_muxes[] __initconst = { 0x101c, 0, 1, 0, CLK_MUX_READ_ONLY), nMUX(CLK_MOUT_HSI0_USI3_LOCAL, "zumapro_mout_hsi0_usi3_local", mout_hsi0_usi3_local_parents, 0x1020, 0, 1), + MUX_F(CLK_MOUT_HSI0_USI4_LOCAL, "zumapro_mout_hsi0_usi4_local", + mout_hsi0_usi4_local_parents, + 0x1024, 0, 1, 0, CLK_MUX_READ_ONLY), }; static const struct samsung_div_clock hsi0_dividers[] __initconst = { @@ -656,6 +660,8 @@ static const struct samsung_div_clock hsi0_dividers[] __initconst = { 0x181c, 0, 4, 0, 0), DIV_F(CLK_DOUT_HSI0_USI3, "zumapro_dout_hsi0_usi3", "zumapro_gout_hsi0_usi3_source", 0x1820, 0, 4, CLK_SET_RATE_PARENT, 0), + DIV_F(CLK_DOUT_HSI0_USI4, "zumapro_dout_hsi0_usi4", "zumapro_gout_hsi0_usi4_source", + 0x1824, 0, 4, 0, CLK_DIVIDER_READ_ONLY), }; static const struct samsung_gate_clock hsi0_gates[] __initconst = { @@ -681,6 +687,14 @@ static const struct samsung_gate_clock hsi0_gates[] __initconst = { * and power-off remain outside this firmware-on handoff. */ static const struct samsung_gate_clock hsi0_ro_gates[] __initconst = { + GATE(CLK_GOUT_HSI0_USI4_SOURCE, "zumapro_gout_hsi0_usi4_source", + "zumapro_mout_hsi0_usi4_local", + 0x2128, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_HSI0_USI4_IP, "zumapro_gout_hsi0_usi4_ip", "zumapro_dout_hsi0_usi4", + 0x210c, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_HSI0_USI4_PCLK, "zumapro_gout_hsi0_usi4_pclk", + "zumapro_mout_hsi0_noc_local", + 0x2110, 21, CLK_IGNORE_UNUSED, 0), GATE(CLK_GOUT_HSI0_ALT, "zumapro_gout_hsi0_alt", "hsi0-alt", 0x204c, 21, CLK_IGNORE_UNUSED, 0), GATE(CLK_GOUT_HSI0_EUSB_REF, "zumapro_gout_hsi0_eusb_ref", "zumapro_mout_hsi0_usb20_ref", @@ -717,7 +731,7 @@ static const struct samsung_cmu_info hsi0_cmu __initconst = { .nr_gate_clks = ARRAY_SIZE(hsi0_gates), .ro_gate_clks = hsi0_ro_gates, .nr_ro_gate_clks = ARRAY_SIZE(hsi0_ro_gates), - .nr_clk_ids = CLK_GOUT_HSI0_USI3_PCLK + 1, + .nr_clk_ids = CLK_GOUT_HSI0_USI4_PCLK + 1, .clk_regs = hsi0_regs, .nr_clk_regs = ARRAY_SIZE(hsi0_regs), .clk_name = "bus", From 45d04431c088780514687ceddad3d4e351bda7f7 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:16:49 -0643 Subject: [PATCH 03/20] dt-bindings: soc: google: gs201-gsa: Add Tensor G4 (zumapro) The Pixel 9a's GSA (Tensor G4, zumapro) takes the same mailbox commands as gs201's, at 0x16490000 with GIC SPI 375. Its AoC firmware loads with no write to the GSA's stage-2 MPU, so a zumapro node describes the mailbox only. Address and interrupt from Google's GPL zumapro device tree. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../bindings/soc/google/google,gs201-gsa.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/google/google,gs201-gsa.yaml b/Documentation/devicetree/bindings/soc/google/google,gs201-gsa.yaml index 5868df472d..e2e2732241 100644 --- a/Documentation/devicetree/bindings/soc/google/google,gs201-gsa.yaml +++ b/Documentation/devicetree/bindings/soc/google/google,gs201-gsa.yaml @@ -17,7 +17,9 @@ description: properties: compatible: - const: google,gs201-gsa + enum: + - google,gs201-gsa + - google,zumapro-gsa reg: minItems: 1 @@ -42,6 +44,21 @@ required: - reg - interrupts +allOf: + - if: + properties: + compatible: + const: google,zumapro-gsa + then: + description: + On zumapro the GSA reads an image without Linux touching its + stage-2 MPU, so only the mailbox is described. + properties: + reg: + maxItems: 1 + reg-names: + maxItems: 1 + additionalProperties: false examples: From 3c5a3b716cca958f8e819b2e937645b7d8548755 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:16:49 -0643 Subject: [PATCH 04/20] soc: google: gsa: Add Tensor G4 (zumapro) Match google,zumapro-gsa. The 9a's GSA answers the same mailbox and Trusty hwmgr commands as gs201's, and the driver already leaves the S2MPU alone when the node has no "s2mpu" range, as a zumapro node doesn't. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty runs this driver with only this match added. With it the GSA reports the AoC inactive, authenticates the signed AoC image and starts it, and the AoC comes up with its 93 services. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- drivers/soc/google/gsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/google/gsa.c b/drivers/soc/google/gsa.c index d3e37d182b..b491645d68 100644 --- a/drivers/soc/google/gsa.c +++ b/drivers/soc/google/gsa.c @@ -857,6 +857,7 @@ static void gsa_remove(struct platform_device *pdev) static const struct of_device_id gsa_of_match[] = { { .compatible = "google,gs201-gsa" }, + { .compatible = "google,zumapro-gsa" }, { } }; MODULE_DEVICE_TABLE(of, gsa_of_match); From 823e00c8b1f22be13969c10c4f9df8263222e0dd Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:17:06 -0643 Subject: [PATCH 05/20] dt-bindings: mailbox: google,gs201-aoc-mbox: Add Tensor G4 (zumapro) The Pixel 9a's AoC mailboxes (Tensor G4, zumapro) have gs201's register layout: three of them, A32, F1 and P6, at 0x15200000, 0x15220000 and 0x15240000 with GIC SPIs 77 to 79, 16 doorbells each way. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../devicetree/bindings/mailbox/google,gs201-aoc-mbox.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mailbox/google,gs201-aoc-mbox.yaml b/Documentation/devicetree/bindings/mailbox/google,gs201-aoc-mbox.yaml index df919aaa40..838c338dd2 100644 --- a/Documentation/devicetree/bindings/mailbox/google,gs201-aoc-mbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/google,gs201-aoc-mbox.yaml @@ -17,7 +17,9 @@ description: properties: compatible: - const: google,gs201-aoc-mbox + enum: + - google,gs201-aoc-mbox + - google,zumapro-aoc-mbox reg: maxItems: 1 From 7f35b9e4741a8b1dd764113edfbed65129dfca2c Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:17:06 -0643 Subject: [PATCH 06/20] soc: google: aoc: mailbox-wc: Add Tensor G4 (zumapro) Match google,zumapro-aoc-mbox. The 9a's three AoC mailboxes have gs201's registers. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty runs this driver with only this match added; the AoC's 48 doorbells carry its startup and its 93 services. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- drivers/soc/google/aoc/mailbox-wc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/google/aoc/mailbox-wc.c b/drivers/soc/google/aoc/mailbox-wc.c index 3cae32624b..e74de0e34d 100644 --- a/drivers/soc/google/aoc/mailbox-wc.c +++ b/drivers/soc/google/aoc/mailbox-wc.c @@ -63,6 +63,9 @@ static const struct of_device_id wc_mbox_match[] = { { .compatible = "google,gs201-aoc-mbox", }, + { + .compatible = "google,zumapro-aoc-mbox", + }, {}, }; MODULE_DEVICE_TABLE(of, wc_mbox_match); From b969614bf27ee7e03f7b754f786e776aa4054bdd Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:19:21 -0643 Subject: [PATCH 07/20] dt-bindings: soc: google: gs201-aoc: Add Tensor G4 (zumapro) The Pixel 9a's AoC (Tensor G4, zumapro) runs the same firmware protocol as gs201's, but its authenticated firmware owns the AoC's memory protection: Linux writes neither the AoC's S2MPU nor its System MMU, so a zumapro node has only the power request and chip id ranges and no google,sysmmu. It also names its signed image (firmware-name, one per board), and takes the two sensor rails as supplies in their power order, where gs201 nodes list regulator names. Add google,gnss-type for the board's GNSS receiver, which the firmware takes as a boot parameter (2 on the 9a, as in Google's GPL zumapro-phone-ignss.dtsi), and clocks, the ACPM DVFS domains read before each start: on the 9a the firmware faulted at every start until the AP had asked ACPM for the DVFS rates first. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../bindings/soc/google/google,gs201-aoc.yaml | 108 ++++++++++++++---- 1 file changed, 87 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/google/google,gs201-aoc.yaml b/Documentation/devicetree/bindings/soc/google/google,gs201-aoc.yaml index f6b78d041f..c51328c19c 100644 --- a/Documentation/devicetree/bindings/soc/google/google,gs201-aoc.yaml +++ b/Documentation/devicetree/bindings/soc/google/google,gs201-aoc.yaml @@ -4,38 +4,48 @@ $id: http://devicetree.org/schemas/soc/google/google,gs201-aoc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Google gs201 AoC (Always-on Compute) +title: Google Tensor AoC (Always-on Compute) maintainers: - Derek Ross description: - The AoC is the audio and sensor DSP of gs201. The AP loads its firmware - into a reserved carve-out, the GSA authenticates and starts it, and the - AoC reaches memory through its own System MMU. + The AoC is the audio and sensor DSP of Tensor SoCs. The AP loads its + firmware into a reserved carve-out and the GSA authenticates and starts + it. On gs201 the AoC reaches memory through its own System MMU, which + Linux sets up. On zumapro (Tensor G4) the authenticated firmware owns + the AoC's memory protection, so Linux touches neither its S2MPU nor its + System MMU. properties: compatible: - const: google,gs201-aoc + enum: + - google,gs201-aoc + - google,zumapro-aoc reg: - minItems: 3 - items: - - description: the AoC power request register (aoc_req) and its - acknowledge at +0x40 - - description: the AoC's stage-2 MPU - - description: the chip id block, read for the firmware's boot - parameters - - description: the AoC power control unit (A32 reset control and - revision), in the AoC block + minItems: 2 + maxItems: 4 reg-names: - minItems: 3 - items: - - const: aoc_req - - const: s2mpu - - const: chipid - - const: pcu + minItems: 2 + maxItems: 4 + + clocks: + description: the ACPM DVFS domains whose rates are read before each + firmware start + minItems: 1 + maxItems: 17 + + firmware-name: + maxItems: 1 + description: the signed AoC firmware image + + sensor-1v8-supply: + description: the sensors' 1.8 V, turned on before the 3.3 V + + sensor-3v3-supply: + description: the sensors' 3.3 V, turned off before the 1.8 V interrupts: maxItems: 1 @@ -69,16 +79,72 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: board revision passed to the firmware + google,gnss-type: + $ref: /schemas/types.yaml#/definitions/uint32 + description: the board's GNSS receiver, passed to the firmware + (kAOCGnssType) + required: - compatible - reg - reg-names - memory-region - google,gsa - - google,sysmmu - google,board-id - google,board-rev +allOf: + - if: + properties: + compatible: + const: google,zumapro-aoc + then: + properties: + reg: + items: + - description: the AoC power request register (aoc_req) and its + acknowledge at +0x40 + - description: the chip id block, read for the firmware's boot + parameters + reg-names: + items: + - const: aoc_req + - const: chipid + mboxes: + minItems: 48 + google,sysmmu: false + required: + - firmware-name + - interrupts + - interrupt-names + - mboxes + - sensor-1v8-supply + - sensor-3v3-supply + else: + properties: + reg: + minItems: 3 + items: + - description: the AoC power request register (aoc_req) and its + acknowledge at +0x40 + - description: the AoC's stage-2 MPU + - description: the chip id block, read for the firmware's boot + parameters + - description: the AoC power control unit (A32 reset control and + revision), in the AoC block + reg-names: + minItems: 3 + items: + - const: aoc_req + - const: s2mpu + - const: chipid + - const: pcu + clocks: false + sensor-1v8-supply: false + sensor-3v3-supply: false + required: + - google,sysmmu + additionalProperties: false examples: From 8d48df9683a1604a800f4ff1eea3abdd1cc5e9a8 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:19:22 -0643 Subject: [PATCH 08/20] soc: google: aoc: Add Tensor G4 (zumapro) The Pixel 9a's AoC takes gs201's firmware protocol, with these differences, kept in per-SoC match data: - Its authenticated firmware owns the AoC's memory protection: the GSA authenticates the image with the S2MPU and System MMU untouched, so the driver neither maps nor writes them. - The PCU, GPIO and doorbell blocks sit at 0x1400000, 0x1c00000 and 0x1f004/0x1f008 in the AoC's address space, from Google's zumapro AoC device tree. - The chip type is the product id's low byte, and the main revision is in it too, not in the 0x10 word. - The firmware image is named by firmware-name; a zumapro node must have it, and the board id and revision. - The sensors' 1.8 V and 3.3 V are two named supplies, turned on in that order at probe and off in reverse (aoc_sensor_power.c). - Without force-vnom in the DT the firmware gets forced VNOM off. gs201 keeps getting it on, as it always has (dt_property() returns DT_PROPERTY_NOT_FOUND, not 0, for a missing property). The firmware path is hardened where a zumapro failure could otherwise go wrong without a way back: the image is copied only while the GSA reports the AoC inactive and the power request is acknowledged, a failed copy stops the load, the authentication header stays allocated (the GSA may still read it after a timeout), a second submission in the same boot is refused, and a watchdog or AP reset leaves the AoC down for a reboot rather than dumping or restarting it, since the image is locked once authenticated. "google,gnss-type" replaces the unprefixed "gnss-type", which no gs201 DT sets. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty runs this driver with bring-up parameters on top (startup tracing, a boot parameter readback, a gate on power request writes, left at "write"). With it the AoC authenticates, starts and reaches its 93 services and stays up; seven fresh boots in a row passed, with speaker and microphone audio through the AoC sound card and the AoC's sensors on D-Bus. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- drivers/soc/google/Kconfig | 2 +- drivers/soc/google/aoc/Makefile | 3 +- drivers/soc/google/aoc/aoc.c | 312 +++++++++++++++++----- drivers/soc/google/aoc/aoc.h | 25 ++ drivers/soc/google/aoc/aoc_sensor_power.c | 117 ++++++++ drivers/soc/google/aoc/aoc_sensor_power.h | 23 ++ drivers/soc/google/aoc/aoc_v1.c | 12 + 7 files changed, 418 insertions(+), 76 deletions(-) create mode 100644 drivers/soc/google/aoc/aoc_sensor_power.c create mode 100644 drivers/soc/google/aoc/aoc_sensor_power.h diff --git a/drivers/soc/google/Kconfig b/drivers/soc/google/Kconfig index f4dd87cb8c..b865fd6915 100644 --- a/drivers/soc/google/Kconfig +++ b/drivers/soc/google/Kconfig @@ -74,7 +74,7 @@ config GS201_AOC Google's AoC core driver, ported: loads and authenticates the AoC firmware through the GSA, starts it, and exposes its services on the AoC bus. Firmware loading is triggered from sysfs (firmware), not at - probe. + probe. Supports gs201 and zumapro (Tensor G4). config GS201_AOC_CHAR tristate "gs201 AoC service character devices" diff --git a/drivers/soc/google/aoc/Makefile b/drivers/soc/google/aoc/Makefile index 064ecbf6c3..462602ac80 100644 --- a/drivers/soc/google/aoc/Makefile +++ b/drivers/soc/google/aoc/Makefile @@ -4,6 +4,7 @@ ccflags-y += -I$(src) obj-$(CONFIG_GS201_AOC_MBOX) += mailbox-wc.o obj-$(CONFIG_GS201_AOC) += aoc_core.o -aoc_core-y := aoc.o aoc_ipc_core.o aoc_firmware.o aoc_service_core.o aoc_v1.o +aoc_core-y := aoc.o aoc_ipc_core.o aoc_firmware.o aoc_service_core.o aoc_v1.o \ + aoc_sensor_power.o obj-$(CONFIG_GS201_AOC_CHAR) += aoc_char_dev.o aoc_channel_dev.o obj-y += alsa/ diff --git a/drivers/soc/google/aoc/aoc.c b/drivers/soc/google/aoc/aoc.c index 8fd393c084..264ecaa5db 100644 --- a/drivers/soc/google/aoc/aoc.c +++ b/drivers/soc/google/aoc/aoc.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,7 @@ static struct platform_device sscd_dev = { .name = "aoc-sscd", static void *aoc_sram_virt_mapping; static void __iomem *aoc_chipid_virt; +static const struct aoc_soc_data *aoc_chipid_soc; /* gs-chipid.c, gs201 variant: product, type, revision for the firmware */ u32 gs_chipid_get_product_id(void) @@ -101,18 +103,22 @@ u32 gs_chipid_get_type(void) if (!aoc_chipid_virt) return 0; r0 = readl(aoc_chipid_virt); + if (!aoc_chipid_soc->merge_subrevision_into_type) + return r0 & 0xff; r10 = readl(aoc_chipid_virt + 0x10); return (r0 | ((r10 & 0x00f00000) >> 20)) & 0xff; } u32 gs_chipid_get_revision(void) { - u32 r10; + u32 r10, main; if (!aoc_chipid_virt) return 0; + main = readl(aoc_chipid_virt + aoc_chipid_soc->chipid_main_reg); r10 = readl(aoc_chipid_virt + 0x10); - return (((r10 >> 20) & 0xf) << 4) | ((r10 >> 16) & 0xf); + return (((main >> aoc_chipid_soc->chipid_main_shift) & 0xf) << 4) | + ((r10 >> 16) & 0xf); } static void *aoc_dram_virt_mapping; @@ -490,33 +496,46 @@ static u32 aoc_board_config_parse(struct device_node *node, u32 *board_id, u32 * } static int aoc_fw_authenticate(struct aoc_prvdata *prvdata, - const struct firmware *fw) { - - int rc; + const struct firmware *fw) +{ dma_addr_t header_dma_addr; void *header_vaddr; + int rc; - /* Allocate coherent memory for the image header */ - header_vaddr = dma_alloc_coherent(prvdata->gsa_dev, AOC_AUTH_HEADER_SIZE, - &header_dma_addr, GFP_KERNEL); - if (!header_vaddr) { - dev_err(prvdata->dev, "Failed to allocate coherent memory for header\n"); - rc = -ENOMEM; - goto err_alloc; + if (prvdata->soc->firmware_managed_mmu && prvdata->firmware_submitted) + return -EALREADY; + + /* The managed path keeps DMA storage alive even after a timeout. */ + if (prvdata->soc->firmware_managed_mmu) { + header_vaddr = prvdata->auth_header_virt; + if (!header_vaddr) { + header_vaddr = dmam_alloc_coherent(prvdata->gsa_dev, + AOC_AUTH_HEADER_SIZE, + &prvdata->auth_header_dma, + GFP_KERNEL); + prvdata->auth_header_virt = header_vaddr; + } + header_dma_addr = prvdata->auth_header_dma; + } else { + header_vaddr = dma_alloc_coherent(prvdata->gsa_dev, + AOC_AUTH_HEADER_SIZE, + &header_dma_addr, GFP_KERNEL); } + if (!header_vaddr) + return -ENOMEM; memcpy(header_vaddr, fw->data, AOC_AUTH_HEADER_SIZE); - + /* Publish the coherent authentication header before the mailbox request. */ + dma_wmb(); + prvdata->firmware_submitted = true; rc = gsa_load_aoc_fw_image(prvdata->gsa_dev, header_dma_addr, prvdata->dram_resource.start + AOC_BINARY_DRAM_OFFSET); - if (rc) { + if (rc) dev_err(prvdata->dev, "GSA authentication failed: %d\n", rc); - goto err_auth; - } -err_auth: -err_alloc: - dma_free_coherent(prvdata->gsa_dev, AOC_AUTH_HEADER_SIZE, header_vaddr, header_dma_addr); + if (!prvdata->soc->firmware_managed_mmu) + dma_free_coherent(prvdata->gsa_dev, AOC_AUTH_HEADER_SIZE, + header_vaddr, header_dma_addr); return rc; } @@ -529,7 +548,9 @@ static void aoc_fw_callback(const struct firmware *fw, void *ctx) u32 carveout_base = prvdata->dram_resource.start; u32 carveout_size = prvdata->dram_size; u32 dt_force_vnom = dt_property(prvdata->dev->of_node, "force-vnom"); - u32 force_vnom = ((dt_force_vnom != 0) || (prvdata->force_voltage_nominal != 0)) ? 1 : 0; + u32 force_vnom = prvdata->force_voltage_nominal || + (dt_force_vnom == DT_PROPERTY_NOT_FOUND ? + prvdata->soc->force_vnom_default : dt_force_vnom != 0); u32 disable_mm = prvdata->disable_monitor_mode; u32 enable_uart = prvdata->enable_uart_tx; u32 force_speaker_ultrasonic = prvdata->force_speaker_ultrasonic; @@ -540,7 +561,7 @@ static void aoc_fw_callback(const struct firmware *fw, void *ctx) u32 chip_revision = gs_chipid_get_revision(); u32 chip_type = gs_chipid_get_type(); u32 chip_product_id = gs_chipid_get_product_id(); - u32 dt_gnss_type = dt_property(prvdata->dev->of_node, "gnss-type"); + u32 dt_gnss_type = dt_property(prvdata->dev->of_node, "google,gnss-type"); u32 gnss_type = dt_gnss_type == DT_PROPERTY_NOT_FOUND ? 0 : dt_gnss_type; u32 dt_wifi_chip = dt_property(prvdata->dev->of_node, "wifi-chip"); u32 wifi_chip = dt_wifi_chip == DT_PROPERTY_NOT_FOUND ? 0 : dt_wifi_chip; @@ -586,7 +607,11 @@ static void aoc_fw_callback(const struct firmware *fw, void *ctx) return; } - aoc_board_config_parse(prvdata->dev->of_node, &board_id, &board_rev); + if (aoc_board_config_parse(prvdata->dev->of_node, &board_id, &board_rev) && + prvdata->soc->firmware_managed_mmu) { + dev_err(dev, "no google,board-id or google,board-rev\n"); + goto free_fw; + } if (!fw) { dev_err(dev, "Failed to load AoC firmware image\n"); @@ -660,10 +685,26 @@ static void aoc_fw_callback(const struct firmware *fw, void *ctx) aoc_control = aoc_dram_translate(prvdata, ipc_offset); + if (prvdata->soc->firmware_managed_mmu) { + int state = gsa_send_aoc_cmd(prvdata->gsa_dev, GSA_AOC_GET_STATE); + + if (state != GSA_AOC_STATE_INACTIVE || prvdata->firmware_submitted) { + dev_err(dev, "refusing firmware copy: secure state %d\n", state); + goto free_fw; + } + if (wait_for_aoc_status(prvdata, true)) { + dev_err(dev, "firmware-owned power request is not acknowledged\n"); + goto free_fw; + } + } + { bool commit_rc = _aoc_fw_commit(fw, aoc_dram_virt_mapping + AOC_BINARY_DRAM_OFFSET); if (!commit_rc) { dev_err(dev, "FW commit failed!\n"); + /* gs201 carries on to authentication, as before */ + if (prvdata->soc->firmware_managed_mmu) + goto free_fw; } } @@ -682,14 +723,17 @@ static void aoc_fw_callback(const struct firmware *fw, void *ctx) dev_err(dev, "no aoc_req acknowledge\n"); goto free_fw; } - dev_info(dev, "AoC S2MPU CTRL0 %#x, opening\n", - readl(prvdata->s2mpu_virt + AOC_S2MPU_CTRL0)); - writel(0, prvdata->s2mpu_virt + AOC_S2MPU_CTRL0); - rc = aoc_configure_iommu(prvdata, fw); - if (rc) { - dev_err(dev, "System MMU setup failed: %d\n", rc); - goto free_fw; + if (!prvdata->soc->firmware_managed_mmu) { + dev_info(dev, "AoC S2MPU CTRL0 %#x, opening\n", + readl(prvdata->s2mpu_virt + AOC_S2MPU_CTRL0)); + writel(0, prvdata->s2mpu_virt + AOC_S2MPU_CTRL0); + rc = aoc_configure_iommu(prvdata, fw); + if (rc) { + dev_err(dev, "System MMU setup failed: %d\n", rc); + goto free_fw; + } } + rc = aoc_fw_authenticate(prvdata, fw); if (rc) { dev_err(dev, "GSA: FW authentication failed: %d\n", rc); @@ -1119,6 +1163,18 @@ static ssize_t sensor_power_enable_store(struct device *dev, struct aoc_prvdata *prvdata = dev_get_drvdata(dev); int val; + if (prvdata->soc->ordered_sensor_supplies) { + int ret = kstrtoint(buf, 10, &val); + + if (ret) + return ret; + /* Once the firmware is submitted, only a reboot cycles the rails */ + if (prvdata->firmware_submitted) + return -EBUSY; + ret = aoc_sensor_power_set(&prvdata->sensor_power, !!val); + return ret ? ret : count; + } + if (kstrtoint(buf, 10, &val) == 0) { dev_info(prvdata->dev,"sensor_power_enable %d", val); configure_sensor_regulator(prvdata, !!val); @@ -1159,10 +1215,35 @@ static int aoc_platform_probe(struct platform_device *dev); static void aoc_platform_remove(struct platform_device *dev); static void aoc_platform_shutdown(struct platform_device *dev); +static const struct aoc_soc_data gs201_aoc_data = { + .merge_subrevision_into_type = true, + /* What a gs201 node without "force-vnom" has always passed */ + .force_vnom_default = true, + .chipid_main_reg = 0x10, + .chipid_main_shift = 20, + .pcu_base = 0xa00000, + .gpio_base = 0xd70000, + .pcu_db_set = 0xd004, + .pcu_db_clear = 0xd008, +}; + +static const struct aoc_soc_data zumapro_aoc_data = { + .ordered_sensor_supplies = true, + .firmware_managed_mmu = true, + .chipid_main_reg = 0, + .chipid_main_shift = 0, + .pcu_base = 0x1400000, + .gpio_base = 0x1c00000, + .pcu_db_set = 0x1f004, + .pcu_db_clear = 0x1f008, +}; + static const struct of_device_id aoc_match[] = { { .compatible = "google,gs201-aoc", + .data = &gs201_aoc_data, }, + { .compatible = "google,zumapro-aoc", .data = &zumapro_aoc_data }, {}, }; MODULE_DEVICE_TABLE(of, aoc_match); @@ -1472,6 +1553,7 @@ static bool configure_sensor_regulator(struct aoc_prvdata *prvdata, bool enable) { bool check_enabled; int i; + if (enable) { check_enabled = true; for (i = 0; i < prvdata->sensor_power_count; i++) { @@ -1577,6 +1659,27 @@ void reset_sensor_power(struct aoc_prvdata *prvdata, bool is_init) int count; bool success; + if (prvdata->soc->ordered_sensor_supplies) { + int ret; + + if (prvdata->firmware_submitted) { + dev_err(prvdata->dev, "sensor rails stay on while the firmware runs\n"); + return; + } + if (!is_init) { + ret = aoc_sensor_power_set(&prvdata->sensor_power, false); + if (ret) { + dev_err(prvdata->dev, "sensor power off failed: %d\n", ret); + return; + } + msleep(150); + } + ret = aoc_sensor_power_set(&prvdata->sensor_power, true); + if (ret) + dev_err(prvdata->dev, "sensor power on failed: %d\n", ret); + return; + } + if (prvdata->sensor_power_count == 0) { return; } @@ -1790,8 +1893,7 @@ static void aoc_watchdog(struct work_struct *work) struct aoc_ramdump_header *ramdump_header = (struct aoc_ramdump_header *)((unsigned long)prvdata->dram_virt + RAMDUMP_HEADER_OFFSET); - struct wakeup_source *ws = - wakeup_source_register(prvdata->dev, dev_name(prvdata->dev)); + struct wakeup_source *ws; unsigned long ramdump_timeout; unsigned long carveout_paddr_from_aoc; unsigned long carveout_vaddr_from_aoc; @@ -1808,6 +1910,18 @@ static void aoc_watchdog(struct work_struct *work) bool ap_triggered_reset, valid_magic; struct aoc_section_header *crash_info_section; + /* Firmware-managed: no ramdump and no restart; a reboot recovers */ + if (prvdata->soc->firmware_managed_mmu) { + mutex_lock(&aoc_service_lock); + aoc_state = AOC_STATE_SSR; + mutex_unlock(&aoc_service_lock); + dev_err(prvdata->dev, + "DSP fault; ordinary reboot required (%s)\n", + prvdata->ap_triggered_reset ? "AP request" : "DSP watchdog"); + return; + } + ws = wakeup_source_register(prvdata->dev, dev_name(prvdata->dev)); + /* If we're already in SSR state, do nothing. */ mutex_lock(&aoc_service_lock); if (aoc_state == AOC_STATE_SSR) { @@ -2497,15 +2611,34 @@ long aoc_unlocked_ioctl_handle_ion_fd(unsigned int cmd, unsigned long arg) * pcu-db-set/clr-offset, cp-aperture-start/end-offset, clock-divider); * the mailbox channel count is that of the mboxes property. */ +static int aoc_read_firmware_name(struct aoc_prvdata *p, + struct device_node *node) +{ + const char *name; + int ret; + + ret = of_property_read_string(node, "firmware-name", &name); + if (ret) { + if (p->soc->firmware_managed_mmu) + return ret; + name = default_firmware; + } + if (!*name) + return -EINVAL; + if (strscpy(p->firmware_name, name, sizeof(p->firmware_name)) < 0) + return -E2BIG; + return 0; +} + static int platform_probe_parse_dt(struct device *dev, struct device_node *aoc_node) { struct aoc_prvdata *prvdata = platform_get_drvdata(aoc_platform_device); int n; - prvdata->aoc_pcu_base = 0xa00000; - prvdata->aoc_gpio_base = 0xd70000; - prvdata->aoc_pcu_db_set_offset = 0xd004; - prvdata->aoc_pcu_db_clr_offset = 0xd008; + prvdata->aoc_pcu_base = prvdata->soc->pcu_base; + prvdata->aoc_gpio_base = prvdata->soc->gpio_base; + prvdata->aoc_pcu_db_set_offset = prvdata->soc->pcu_db_set; + prvdata->aoc_pcu_db_clr_offset = prvdata->soc->pcu_db_clear; prvdata->aoc_cp_aperture_start_offset = 0x7fdf80; prvdata->aoc_cp_aperture_end_offset = 0x7fffff; prvdata->aoc_clock_divider = 1; @@ -2537,16 +2670,26 @@ static int aoc_platform_probe(struct platform_device *pdev) rc = -EEXIST; goto err_platform_not_null; } - aoc_platform_device = pdev; - aoc_node = dev->of_node; - mem_node = of_parse_phandle(aoc_node, "memory-region", 0); prvdata = devm_kzalloc(dev, sizeof(*prvdata), GFP_KERNEL); if (!prvdata) { rc = -ENOMEM; goto err_failed_prvdata_alloc; } + prvdata->soc = of_device_get_match_data(dev); + if (!prvdata->soc) { + rc = -ENODEV; + goto err_failed_prvdata_alloc; + } + prvdata->dev = dev; + if (prvdata->soc->ordered_sensor_supplies) { + rc = aoc_sensor_power_init(dev, &prvdata->sensor_power); + if (rc) + return rc; + } + aoc_platform_device = pdev; + mem_node = of_parse_phandle(aoc_node, "memory-region", 0); platform_set_drvdata(pdev, prvdata); if (platform_probe_parse_dt(dev, aoc_node) < 0) { @@ -2619,8 +2762,9 @@ static int aoc_platform_probe(struct platform_device *pdev) } - strscpy(prvdata->firmware_name, default_firmware, - sizeof(prvdata->firmware_name)); + rc = aoc_read_firmware_name(prvdata, aoc_node); + if (rc) + goto err_mem_resources; rc = allocate_mailbox_channels(prvdata); if (rc) { @@ -2635,28 +2779,37 @@ static int aoc_platform_probe(struct platform_device *pdev) if (ret < 0) goto err_watchdog_irq; - /* The System MMU's fault interrupts belong to gs201-aoc-sysmmu */ prvdata->iommu_nonsecure_irq = 0; prvdata->iommu_secure_irq = 0; - prvdata->mmu = aoc_sysmmu_get(dev); - if (IS_ERR(prvdata->mmu)) { - rc = PTR_ERR(prvdata->mmu); - goto err_watchdog_iommu_irq; + /* The System MMU's fault interrupts belong to gs201-aoc-sysmmu */ + if (!prvdata->soc->firmware_managed_mmu) { + prvdata->mmu = aoc_sysmmu_get(dev); + if (IS_ERR(prvdata->mmu)) { + rc = PTR_ERR(prvdata->mmu); + goto err_watchdog_iommu_irq; + } + ret = devm_add_action_or_reset(dev, release_sysmmu, prvdata->mmu); + if (ret) { + rc = ret; + goto err_watchdog_iommu_irq; + } } - ret = devm_add_action_or_reset(dev, release_sysmmu, prvdata->mmu); - if (ret) { - rc = ret; - goto err_watchdog_iommu_irq; + if (!prvdata->soc->firmware_managed_mmu) { + prvdata->s2mpu_virt = + devm_platform_ioremap_resource_byname(pdev, "s2mpu"); + if (IS_ERR(prvdata->s2mpu_virt)) { + rc = PTR_ERR(prvdata->s2mpu_virt); + goto err_watchdog_iommu_irq; + } } - - /* In BLK_AOC: only touched once aoc_req is acknowledged */ - prvdata->s2mpu_virt = devm_platform_ioremap_resource_byname(pdev, "s2mpu"); - prvdata->chipid_virt = devm_platform_ioremap_resource_byname(pdev, "chipid"); - if (IS_ERR(prvdata->s2mpu_virt) || IS_ERR(prvdata->chipid_virt)) { - rc = -ENOMEM; + prvdata->chipid_virt = + devm_platform_ioremap_resource_byname(pdev, "chipid"); + if (IS_ERR(prvdata->chipid_virt)) { + rc = PTR_ERR(prvdata->chipid_virt); goto err_watchdog_iommu_irq; } aoc_chipid_virt = prvdata->chipid_virt; + aoc_chipid_soc = prvdata->soc; pr_notice("found aoc with interrupt:%d dram:%pR\n", aoc_irq, &prvdata->dram_resource); @@ -2711,30 +2864,41 @@ static int aoc_platform_probe(struct platform_device *pdev) return -ENOMEM; } - prvdata->sensor_power_count = of_property_count_strings(aoc_node, "sensor_power_list"); - if (prvdata->sensor_power_count > MAX_SENSOR_POWER_NUM) { - pr_warn("sensor power count %i is larger than available number.", - prvdata->sensor_power_count); - prvdata->sensor_power_count = MAX_SENSOR_POWER_NUM; - } else if (prvdata->sensor_power_count < 0) { - pr_err("unsupported sensor power list, err = %i.", prvdata->sensor_power_count); - prvdata->sensor_power_count = 0; - } + if (prvdata->soc->ordered_sensor_supplies) { + rc = aoc_sensor_power_set(&prvdata->sensor_power, true); + if (rc) { + dev_err(dev, "failed to enable sensor supplies: %d\n", rc); + goto err_sram_dram_map; + } + } else { + prvdata->sensor_power_count = + of_property_count_strings(aoc_node, "sensor_power_list"); + if (prvdata->sensor_power_count > MAX_SENSOR_POWER_NUM) { + pr_warn("sensor power count %i is larger than available number.", + prvdata->sensor_power_count); + prvdata->sensor_power_count = MAX_SENSOR_POWER_NUM; + } else if (prvdata->sensor_power_count < 0) { + pr_err("unsupported sensor power list, err = %i.", + prvdata->sensor_power_count); + prvdata->sensor_power_count = 0; + } - ret = of_property_read_string_array(aoc_node, "sensor_power_list", - (const char**)&prvdata->sensor_power_list, - prvdata->sensor_power_count); + ret = of_property_read_string_array(aoc_node, "sensor_power_list", + (const char **)&prvdata->sensor_power_list, + prvdata->sensor_power_count); - for (i = 0; i < prvdata->sensor_power_count; i++) { - prvdata->sensor_regulator[i] = + for (i = 0; i < prvdata->sensor_power_count; i++) { + prvdata->sensor_regulator[i] = devm_regulator_get_exclusive(dev, prvdata->sensor_power_list[i]); - if (IS_ERR_OR_NULL(prvdata->sensor_regulator[i])) { - prvdata->sensor_regulator[i] = NULL; - pr_err("failed to get %s regulator.", prvdata->sensor_power_list[i]); + if (IS_ERR_OR_NULL(prvdata->sensor_regulator[i])) { + prvdata->sensor_regulator[i] = NULL; + pr_err("failed to get %s regulator.", + prvdata->sensor_power_list[i]); + } } - } - reset_sensor_power(prvdata, true); + reset_sensor_power(prvdata, true); + } aoc_parse_dmic_power(prvdata, aoc_node); configure_dmic_regulator(prvdata, true); diff --git a/drivers/soc/google/aoc/aoc.h b/drivers/soc/google/aoc/aoc.h index 8900499bff..0d09b3d08d 100644 --- a/drivers/soc/google/aoc/aoc.h +++ b/drivers/soc/google/aoc/aoc.h @@ -20,6 +20,7 @@ #include #include "aoc-compat.h" #include "aoc_ipc_core.h" +#include "aoc_sensor_power.h" /* TODO: Remove internal calls, or promote to "public" */ #include "aoc_ipc_core_internal.h" @@ -90,7 +91,31 @@ struct aoc_service_dev { typedef int (*aoc_map_handler)(u32 handle, phys_addr_t p, size_t size, bool mapped, void *ctx); +/* + * What differs between Tensor generations: where the AoC's PCU and GPIO + * blocks sit in its address space, the chip id layout, the sensor supplies, + * whether Linux sets up the AoC's S2MPU and System MMU or the authenticated + * firmware owns its protection, and the forced-VNOM default. + */ +struct aoc_soc_data { + bool ordered_sensor_supplies; + bool firmware_managed_mmu; + bool merge_subrevision_into_type; + bool force_vnom_default; + u32 chipid_main_reg; + u32 chipid_main_shift; + u32 pcu_base; + u32 gpio_base; + u32 pcu_db_set; + u32 pcu_db_clear; +}; + struct aoc_prvdata { + struct aoc_sensor_power sensor_power; + const struct aoc_soc_data *soc; + bool firmware_submitted; + void *auth_header_virt; + dma_addr_t auth_header_dma; struct mbox_slot *mbox_channels; struct dentry *debugfs; struct aoc_service_dev **services; diff --git a/drivers/soc/google/aoc/aoc_sensor_power.c b/drivers/soc/google/aoc/aoc_sensor_power.c new file mode 100644 index 0000000000..02726dc530 --- /dev/null +++ b/drivers/soc/google/aoc/aoc_sensor_power.c @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Ordered ownership of the sensor supplies used by the Zumapro AoC. */ + +#include +#include +#include +#include +#include + +#include "aoc_sensor_power.h" + +static const char * const aoc_sensor_supply_names[AOC_SENSOR_SUPPLIES] = { + "sensor-1v8", "sensor-3v3", +}; + +/* Stop if a higher rail cannot be disabled: do not remove its lower rail. */ +static int aoc_sensor_power_disable(struct aoc_sensor_power *power, + unsigned long mask) +{ + int i, ret; + + for (i = AOC_SENSOR_SUPPLIES - 1; i >= 0; i--) { + if (!(power->enabled & mask & BIT(i))) + continue; + ret = regulator_disable(power->supplies[i]); + if (ret) + return ret; + power->enabled &= ~BIT(i); + } + + return 0; +} + +int aoc_sensor_power_set(struct aoc_sensor_power *power, bool enable) +{ + unsigned long added = 0; + int i, ret, rollback; + + mutex_lock(&power->lock); + if (!enable) { + ret = aoc_sensor_power_disable(power, GENMASK(AOC_SENSOR_SUPPLIES - 1, 0)); + goto out; + } + + /* Individual enables retain each provider's settling delay and order. */ + for (i = 0; i < AOC_SENSOR_SUPPLIES; i++) { + if (power->enabled & BIT(i)) { + ret = regulator_is_enabled(power->supplies[i]); + if (ret <= 0) { + if (!ret) + ret = -EIO; + goto undo; + } + continue; + } + ret = regulator_is_enabled(power->supplies[i]); + if (ret < 0) + goto undo; + /* Normal get starts with no consumer vote, even if hardware is on. */ + ret = regulator_enable(power->supplies[i]); + if (ret) + goto undo; + power->enabled |= BIT(i); + added |= BIT(i); + ret = regulator_is_enabled(power->supplies[i]); + if (ret <= 0) { + if (!ret) + ret = -EIO; + goto undo; + } + } + ret = 0; + goto out; + +undo: + rollback = aoc_sensor_power_disable(power, added); + if (rollback) + dev_err(power->dev, "sensor supply rollback failed: %d\n", rollback); +out: + mutex_unlock(&power->lock); + return ret; +} + +static void aoc_sensor_power_release(void *data) +{ + struct aoc_sensor_power *power = data; + int ret; + + ret = aoc_sensor_power_set(power, false); + if (ret) + dev_err(power->dev, "sensor supply release failed: %d\n", ret); +} + +int aoc_sensor_power_init(struct device *dev, struct aoc_sensor_power *power) +{ + int i; + + power->dev = dev; + mutex_init(&power->lock); + /* Both suppliers must exist before any AoC probe side effects. */ + if (!device_property_present(dev, "sensor-1v8-supply") || + !device_property_present(dev, "sensor-3v3-supply")) + return dev_err_probe(dev, -EINVAL, "both sensor supplies are required\n"); + + for (i = 0; i < AOC_SENSOR_SUPPLIES; i++) { + /* Optional-get rejects a missing supplier instead of using a dummy. */ + power->supplies[i] = + devm_regulator_get_optional(dev, aoc_sensor_supply_names[i]); + if (IS_ERR(power->supplies[i])) + return dev_err_probe(dev, PTR_ERR(power->supplies[i]), + "failed to get %s supply\n", + aoc_sensor_supply_names[i]); + } + + /* Registered last, so owned votes are dropped before the handles. */ + return devm_add_action_or_reset(dev, aoc_sensor_power_release, power); +} diff --git a/drivers/soc/google/aoc/aoc_sensor_power.h b/drivers/soc/google/aoc/aoc_sensor_power.h new file mode 100644 index 0000000000..c6015c5819 --- /dev/null +++ b/drivers/soc/google/aoc/aoc_sensor_power.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef AOC_SENSOR_POWER_H +#define AOC_SENSOR_POWER_H + +#include + +struct device; +struct regulator; + +#define AOC_SENSOR_SUPPLIES 2 + +struct aoc_sensor_power { + struct device *dev; + struct regulator *supplies[AOC_SENSOR_SUPPLIES]; + /* Serializes the consumer votes and their power sequence. */ + struct mutex lock; + unsigned long enabled; +}; + +int aoc_sensor_power_init(struct device *dev, struct aoc_sensor_power *power); +int aoc_sensor_power_set(struct aoc_sensor_power *power, bool enable); + +#endif diff --git a/drivers/soc/google/aoc/aoc_v1.c b/drivers/soc/google/aoc/aoc_v1.c index f45f91f4d6..c3470208e7 100644 --- a/drivers/soc/google/aoc/aoc_v1.c +++ b/drivers/soc/google/aoc/aoc_v1.c @@ -253,6 +253,18 @@ EXPORT_SYMBOL_GPL(trigger_aoc_ramdump); static irqreturn_t watchdog_int_handler(int irq, void *dev) { + struct aoc_prvdata *prvdata = dev_get_drvdata(dev); + + /* + * Firmware-managed AoCs (zumapro) are not restarted: keep the fault + * for the watchdog work and don't take the interrupt again. + */ + if (prvdata->soc->firmware_managed_mmu) { + disable_irq_nosync(irq); + dev_err(dev, "AoC watchdog interrupt\n"); + schedule_work(&prvdata->watchdog_work); + return IRQ_HANDLED; + } trigger_aoc_ssr(false, NULL); return IRQ_HANDLED; } From 7fa8180c8b28d1dbe201e6c34697253c766dbaae Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:19:48 -0643 Subject: [PATCH 09/20] soc: google: aoc: Read the ACPM DVFS rates before a firmware start On the Pixel 9a the AoC firmware faulted at every start (a DSP watchdog right after it announced its services) until the AP had asked ACPM for the DVFS domains' rates first. With one GET-rate request for each of the 17 domains before the firmware request the start is stable: 93 services, no watchdog interrupt, online indefinitely. Stock does the same query at boot (cal-if's vclk_get_boot_freq() calls exynos_acpm_get_rate()), so the APM's DVFS plugin evidently expects it before it serves the AoC's own votes. Which domain matters hasn't been narrowed down. Take the domains as clocks: the ACPM clocks have CLK_GET_RATE_NOCACHE, so clk_get_rate() sends the same request. The rates are read in the firmware callback before the power request; a node without clocks (every gs201 one) reads nothing. Tested on the Pixel 9a, 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, with the same requests sent through the exynos-acpm handle by a helper module just before the firmware request: the AoC came up and stayed up on every start since (the first two runs, then seven fresh boots in a row). Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- drivers/soc/google/aoc/aoc.c | 22 ++++++++++++++++++++++ drivers/soc/google/aoc/aoc.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/drivers/soc/google/aoc/aoc.c b/drivers/soc/google/aoc/aoc.c index 264ecaa5db..6e8ae51446 100644 --- a/drivers/soc/google/aoc/aoc.c +++ b/drivers/soc/google/aoc/aoc.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -539,6 +540,22 @@ static int aoc_fw_authenticate(struct aoc_prvdata *prvdata, return rc; } +/* + * Ask ACPM for the current rate of each DVFS domain in "clocks" (ACPM + * clocks don't cache their rate). On zumapro the firmware faulted at every + * start until the AP had made this query once before it. + */ +static void aoc_read_dvfs_rates(struct aoc_prvdata *prvdata) +{ + unsigned long rate; + int i; + + for (i = 0; i < prvdata->num_dvfs_clks; i++) { + rate = clk_get_rate(prvdata->dvfs_clks[i].clk); + dev_dbg(prvdata->dev, "DVFS %d: %lu Hz\n", i, rate); + } +} + static void aoc_fw_callback(const struct firmware *fw, void *ctx) { static bool first_load_prevented = false; @@ -630,6 +647,7 @@ static void aoc_fw_callback(const struct firmware *fw, void *ctx) fw_data[i].value = board_rev; } + aoc_read_dvfs_rates(prvdata); request_aoc_on(prvdata, true); if (!fw->data) { @@ -2688,6 +2706,10 @@ static int aoc_platform_probe(struct platform_device *pdev) if (rc) return rc; } + rc = devm_clk_bulk_get_all(dev, &prvdata->dvfs_clks); + if (rc < 0) + return dev_err_probe(dev, rc, "failed to get the DVFS clocks\n"); + prvdata->num_dvfs_clks = rc; aoc_platform_device = pdev; mem_node = of_parse_phandle(aoc_node, "memory-region", 0); platform_set_drvdata(pdev, prvdata); diff --git a/drivers/soc/google/aoc/aoc.h b/drivers/soc/google/aoc/aoc.h index 0d09b3d08d..47359799f4 100644 --- a/drivers/soc/google/aoc/aoc.h +++ b/drivers/soc/google/aoc/aoc.h @@ -116,6 +116,8 @@ struct aoc_prvdata { bool firmware_submitted; void *auth_header_virt; dma_addr_t auth_header_dma; + struct clk_bulk_data *dvfs_clks; + int num_dvfs_clks; struct mbox_slot *mbox_channels; struct dentry *debugfs; struct aoc_service_dev **services; From 4880bab6259ef6fe7354ec49c3dee340bd246edc Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:20:19 -0643 Subject: [PATCH 10/20] soc: google: aoc: Clear the heaps on zumapro before the first start Android creates the AoC's sensor, playback and capture heaps with its physical-heap constructors, which clear them at probe. This port lays the heaps out without creating them, so on zumapro clear the three together (they're contiguous at the top of the carve-out) before the firmware is first authenticated. On the Pixel 9a this is part of the composition that runs, 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, where the same clearing is behind a bring-up parameter that every start since 2026-10-25 has set. On its own it didn't fix the firmware's startup fault (that was the DVFS query); it is kept so the firmware sees the memory Android gives it. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- drivers/soc/google/aoc/aoc.c | 14 ++++++++++++++ drivers/soc/google/aoc/aoc.h | 1 + 2 files changed, 15 insertions(+) diff --git a/drivers/soc/google/aoc/aoc.c b/drivers/soc/google/aoc/aoc.c index 6e8ae51446..366bdca832 100644 --- a/drivers/soc/google/aoc/aoc.c +++ b/drivers/soc/google/aoc/aoc.c @@ -1248,6 +1248,7 @@ static const struct aoc_soc_data gs201_aoc_data = { static const struct aoc_soc_data zumapro_aoc_data = { .ordered_sensor_supplies = true, .firmware_managed_mmu = true, + .zero_heaps = true, .chipid_main_reg = 0, .chipid_main_shift = 0, .pcu_base = 0x1400000, @@ -2545,6 +2546,19 @@ bool aoc_create_dma_buf_heaps(struct aoc_prvdata *prvdata) base -= CAPTURE_HEAP_SIZE; prvdata->audio_capture_heap_base = base; + /* + * Android's heap constructors clear the three heaps at probe; on + * zumapro do the same before the firmware is ever authenticated. + */ + if (prvdata->soc->zero_heaps) { + memset_io((void __iomem *)prvdata->dram_virt + + (base - prvdata->dram_resource.start), 0, + CAPTURE_HEAP_SIZE + PLAYBACK_HEAP_SIZE + + SENSOR_DIRECT_HEAP_SIZE); + /* Before any later authentication and start */ + dma_wmb(); + } + return true; } diff --git a/drivers/soc/google/aoc/aoc.h b/drivers/soc/google/aoc/aoc.h index 47359799f4..f7468bea0d 100644 --- a/drivers/soc/google/aoc/aoc.h +++ b/drivers/soc/google/aoc/aoc.h @@ -102,6 +102,7 @@ struct aoc_soc_data { bool firmware_managed_mmu; bool merge_subrevision_into_type; bool force_vnom_default; + bool zero_heaps; u32 chipid_main_reg; u32 chipid_main_shift; u32 pcu_base; From 6c874d61ebd4893d3634d4234e0996e47903e9ac Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:21:32 -0643 Subject: [PATCH 11/20] arm64: dts: exynos: google: zumapro: Add HSI0's USI4 and its I2C controller Describe CMU_HSI0's USI4 in I2C mode and its controller, the Pixel 9a's I2C19 (the speaker amplifiers' control bus), as USI3's SPI is: the USI control registers at 0x111f00c0 apart from the controller's, the HSI0 sysreg's selector at 0x1024, GIC SPI 410. Both stay disabled. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty has these two nodes, enabled by an overlay at runtime; exynos-usi and exynos5-hsi2c bind them and the two TAS2572s answer at 0x48 and 0x49. Address, selector and interrupt from Google's GPL zumapro-usi.dtsi. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../arm64/boot/dts/exynos/google/zumapro.dtsi | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi index f8be1721dd..8fac5f8abf 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi @@ -1099,6 +1099,34 @@ }; }; + usi4_hsi0: usi@111f00c0 { + compatible = "google,zumapro-usi", "samsung,exynos850-usi"; + reg = <0x0 0x111f00c0 0x20>; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USI4_PCLK>, + <&cmu_hsi0 CLK_GOUT_HSI0_USI4_IP>; + clock-names = "pclk", "ipclk"; + samsung,sysreg = <&sysreg_hsi0 0x1024>; + samsung,mode = ; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x111f0000 0x0 0x111f0000 0x1000>; + status = "disabled"; + + hsi2c19: i2c@111f0000 { + compatible = "google,zumapro-hsi2c", + "samsung,exynosautov9-hsi2c"; + /* USI control starts at 0xc0; do not claim it twice. */ + reg = <0x111f0000 0xc0>; + interrupts = ; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USI4_IP>, + <&cmu_hsi0 CLK_GOUT_HSI0_USI4_PCLK>; + clock-names = "hsi2c", "hsi2c_pclk"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + }; + usb: usb@11210000 { compatible = "snps,dwc3"; reg = <0x0 0x11210000 0x10000>; From 3e27354d9477f67218a650965f42e1bafad92fc3 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:21:32 -0643 Subject: [PATCH 12/20] arm64: dts: exynos: google: zumapro: Add Trusty Describe Trusty, the secure OS the bootloader starts, as on gs201: its IPIs are GIC SGIs 8 to 15. It stays disabled. The GSA starts the AoC through Trusty's hwmgr service, so audio and sensors need it. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty has this node, enabled by an overlay at runtime; trusty-core, -log, -ipc and -virtio bind it and the GSA reaches its hwmgr port. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../arm64/boot/dts/exynos/google/zumapro.dtsi | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi index 8fac5f8abf..3ba0b68c0c 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi @@ -594,6 +594,26 @@ }; }; + /* Trusty, the secure OS that runs from the bootloader's tzsw image. */ + trusty: trusty { + compatible = "android,trusty-smc-v1"; + status = "disabled"; + + irq { + compatible = "android,trusty-irq-v1"; + /* Trusty IPIs 8-15 are GIC SGIs 8-15 */ + ipi-range = <8 15 8>; + }; + + log { + compatible = "android,trusty-log-v1"; + }; + + virtio { + compatible = "android,trusty-virtio-v1"; + }; + }; + soc: soc { compatible = "simple-bus"; #address-cells = <2>; From 5a76d690cf089b498a9f4433871e3e40be78c241 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:21:32 -0643 Subject: [PATCH 13/20] arm64: dts: exynos: google: zumapro: Add the GSA Describe the GSA's mailbox at 0x16490000 with GIC SPI 375. It stays disabled. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty has this node, enabled by an overlay at runtime; the gsa driver binds it, reads the AoC's state through Trusty, and authenticates and starts the AoC. Address and interrupt from Google's GPL zumapro device tree. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- arch/arm64/boot/dts/exynos/google/zumapro.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi index 3ba0b68c0c..4cb1de9c5f 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi @@ -1533,6 +1533,14 @@ }; }; + gsa: gsa@16490000 { + compatible = "google,zumapro-gsa"; + reg = <0x0 0x16490000 0x1000>; + reg-names = "mbox"; + interrupts = ; + status = "disabled"; + }; + dsi0: dsi@19440000 { compatible = "google,zumapro-dsim", "google,gs201-dsim"; reg = <0x0 0x19440000 0x300>, From cac9ca6b686e26b26902d86fd4d1aad30f4f5465 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:21:32 -0643 Subject: [PATCH 14/20] arm64: dts: exynos: google: zumapro: Add the AoC and its mailboxes Describe the AoC, the audio and sensor DSP, and its three mailboxes (A32, F1, P6, GIC SPIs 77 to 79). The AoC's power request is at 0x154b0000, its watchdog on SPI 130, and it reads the chip id block at 0x10000000; its 48 doorbells are the mailboxes' 16 each. Its clocks are the 17 ACPM DVFS domains, all of which the 9a's AoC driver asks ACPM about before each start. The firmware owns the AoC's memory protection, so neither its S2MPU nor its System MMU is described. All stay disabled; the board adds the carve-out, its firmware name, its board id and the sensor supplies. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty has these nodes (plus a disabled System MMU node this driver no longer uses), enabled by overlays at runtime; the AoC starts and reaches its 93 services. Addresses and interrupts from Google's GPL zumapro device tree. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../arm64/boot/dts/exynos/google/zumapro.dtsi | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi index 4cb1de9c5f..be17249e58 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zumapro.dtsi @@ -1370,6 +1370,30 @@ status = "disabled"; }; + aoc_mbox_a32: mailbox@15200000 { + compatible = "google,zumapro-aoc-mbox"; + reg = <0x0 0x15200000 0x1000>; + interrupts = ; + #mbox-cells = <1>; + status = "disabled"; + }; + + aoc_mbox_f1: mailbox@15220000 { + compatible = "google,zumapro-aoc-mbox"; + reg = <0x0 0x15220000 0x1000>; + interrupts = ; + #mbox-cells = <1>; + status = "disabled"; + }; + + aoc_mbox_p6: mailbox@15240000 { + compatible = "google,zumapro-aoc-mbox"; + reg = <0x0 0x15240000 0x1000>; + interrupts = ; + #mbox-cells = <1>; + status = "disabled"; + }; + cmu_apm: clock-controller@15400000 { compatible = "google,zumapro-cmu-apm"; reg = <0x0 0x15400000 0x8000>; @@ -1402,6 +1426,62 @@ }; }; + /* + * The audio and sensor DSP. Its authenticated firmware owns its + * memory protection: Linux touches neither its S2MPU nor its + * System MMU, so neither is described. + */ + aoc: aoc@154b0000 { + compatible = "google,zumapro-aoc"; + reg = <0x0 0x154b0000 0x1000>, <0x0 0x10000000 0x20>; + reg-names = "aoc_req", "chipid"; + interrupts = ; + interrupt-names = "watchdog"; + clocks = <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_MIF>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_INT>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_CPUCL0>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_CPUCL1>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_CPUCL2>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_DSU>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_BCI>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_G3D>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_G3DL2>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_TPU>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_INTCAM>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_TNR>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_CAM>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_MFC>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_DISP>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_AOC>, + <&acpm_ipc ZUMAPRO_CLK_ACPM_DVFS_BW>; + google,gsa = <&gsa>; + mboxes = <&aoc_mbox_a32 0>, <&aoc_mbox_a32 1>, + <&aoc_mbox_a32 2>, <&aoc_mbox_a32 3>, + <&aoc_mbox_a32 4>, <&aoc_mbox_a32 5>, + <&aoc_mbox_a32 6>, <&aoc_mbox_a32 7>, + <&aoc_mbox_a32 8>, <&aoc_mbox_a32 9>, + <&aoc_mbox_a32 10>, <&aoc_mbox_a32 11>, + <&aoc_mbox_a32 12>, <&aoc_mbox_a32 13>, + <&aoc_mbox_a32 14>, <&aoc_mbox_a32 15>, + <&aoc_mbox_f1 0>, <&aoc_mbox_f1 1>, + <&aoc_mbox_f1 2>, <&aoc_mbox_f1 3>, + <&aoc_mbox_f1 4>, <&aoc_mbox_f1 5>, + <&aoc_mbox_f1 6>, <&aoc_mbox_f1 7>, + <&aoc_mbox_f1 8>, <&aoc_mbox_f1 9>, + <&aoc_mbox_f1 10>, <&aoc_mbox_f1 11>, + <&aoc_mbox_f1 12>, <&aoc_mbox_f1 13>, + <&aoc_mbox_f1 14>, <&aoc_mbox_f1 15>, + <&aoc_mbox_p6 0>, <&aoc_mbox_p6 1>, + <&aoc_mbox_p6 2>, <&aoc_mbox_p6 3>, + <&aoc_mbox_p6 4>, <&aoc_mbox_p6 5>, + <&aoc_mbox_p6 6>, <&aoc_mbox_p6 7>, + <&aoc_mbox_p6 8>, <&aoc_mbox_p6 9>, + <&aoc_mbox_p6 10>, <&aoc_mbox_p6 11>, + <&aoc_mbox_p6 12>, <&aoc_mbox_p6 13>, + <&aoc_mbox_p6 14>, <&aoc_mbox_p6 15>; + status = "disabled"; + }; + pinctrl_alive: pinctrl@154d0000 { compatible = "google,zumapro-pinctrl"; reg = <0x0 0x154d0000 0x1000>; From 895f2f1d5d7ccbb3c42177e6a7bd737044ba3b39 Mon Sep 17 00:00:00 2001 From: "Rob Herring (Arm)" Date: Tue, 22 Sep 2026 16:21:21 -0500 Subject: [PATCH 15/20] ASoC: dt-bindings: Fix TAS2563 address constraints Apply the TAS2781 register range only when the compatible is exactly ti,tas2781. This avoids applying the TAS2781 single-address rule to TAS2563 nodes with 0x4c-0x4f addresses. Assisted-by: LLM Signed-off-by: Rob Herring (Arm) Link: https://patch.msgid.link/20260922212122.1116270-1-robh@kernel.org Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/ti,tas2781.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml index aa5a317b5a..50c7792b24 100644 --- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml +++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml @@ -219,9 +219,7 @@ allOf: - if: properties: compatible: - contains: - enum: - - ti,tas2781 + const: ti,tas2781 then: properties: reg: From 392e9e42d79efd8fad941538f0025b45e34a6a8c Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:22:26 -0643 Subject: [PATCH 16/20] arm64: dts: exynos: google: zumapro-tegu: Add the speaker amplifiers The Pixel 9a's two speakers have a TI TAS2572 each on I2C19 (HSI0's USI4): the top one at 0x48 with its reset on gpp6-3, the bottom one at 0x49 with its reset on gph2-1, as in Google's GPL zumapro-tegu-audio-common-tas2572.dtsi. Describe them one node each: the tas2781 driver takes one register profile (RCA file) per node, and the TAS2572 profiles in linux-firmware cover one device. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty with these nodes applied as an overlay at runtime: both bind to tasdev-codec, and with the AoC sound card both speakers play through PipeWire. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../boot/dts/exynos/google/zumapro-tegu.dts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts b/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts index 76a95c1b05..b12564d632 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts +++ b/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts @@ -363,6 +363,30 @@ status = "okay"; }; +/* + * The speaker amplifiers, two TAS2572s: top at 0x48 (reset gpp6-3) and + * bottom at 0x49 (reset gph2-1). One node each, since the tas2781 driver + * takes one register profile per node and TI's TAS2572 profiles cover one + * device. The AoC sound card names them Top and Bottom. + */ +&hsi2c19 { + status = "okay"; + + tas2572_top: amplifier@48 { + compatible = "ti,tas2572", "ti,tas2781"; + reg = <0x48>; + reset-gpios = <&gpp6 3 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + }; + + tas2572_bottom: amplifier@49 { + compatible = "ti,tas2572", "ti,tas2781"; + reg = <0x49>; + reset-gpios = <&gph2 1 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + }; +}; + /* The torch: a TI LM3644 flash driver, both LED outputs on one white LED. */ &hsi2c4 { clock-frequency = <100000>; @@ -687,6 +711,10 @@ status = "okay"; }; +&usi4_hsi0 { + status = "okay"; +}; + &usi6 { status = "okay"; }; From c3bfbdd031a7ca360be83ac665d40b905eeafb89 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:22:51 -0643 Subject: [PATCH 17/20] arm64: dts: exynos: google: zumapro-tegu: Enable the AoC Turn on Trusty, the GSA, the AoC's three mailboxes and the AoC, and give the AoC the board's parts: the carve-out, its signed image (aoc-tegu.bin), stock's board id and revision (0x60b02, 0x10000, from Google's GPL tegu device trees), GNSS type 2 (the modem's integrated receiver, as Google's zumapro-phone-ignss.dtsi), and the sensor rails, the S2MPG15's LDO7S (1.8 V) and LDO5S (3.3 V). Nothing starts the AoC at boot: the firmware is loaded when userspace writes its name to the AoC's "firmware" attribute, once the modules are loaded in order. The drivers' probes only map registers, talk to Trusty and the GSA, and turn on the two sensor rails. Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty with the same nodes (the Trusty, GSA, mailbox and AoC ones enabled by overlays at runtime, the AoC's board properties in its DT): the GSA authenticates and starts the firmware, which reaches its 93 services and stays up, and the sensor proxy finds the accelerometer, light, proximity and compass sensors on the AoC. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../boot/dts/exynos/google/zumapro-tegu.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts b/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts index b12564d632..f66e006084 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts +++ b/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts @@ -195,6 +195,48 @@ }; }; }; + + pmic-2 { + compatible = "samsung,s2mpg15-pmic"; + + regulators { + sensor_3v3: ldo5s { + regulator-name = "sensor-3v3"; + }; + + sensor_1v8: ldo7s { + regulator-name = "sensor-1v8"; + }; + }; + }; +}; + +/* + * The AoC's firmware is the board's own signed image; the board id and + * revision are stock's for this board, and GNSS type 2 is the modem's + * integrated receiver. + */ +&aoc { + memory-region = <&aoc_reserved>; + firmware-name = "aoc-tegu.bin"; + google,board-id = <0x60b02>; + google,board-rev = <0x10000>; + google,gnss-type = <2>; + sensor-1v8-supply = <&sensor_1v8>; + sensor-3v3-supply = <&sensor_3v3>; + status = "okay"; +}; + +&aoc_mbox_a32 { + status = "okay"; +}; + +&aoc_mbox_f1 { + status = "okay"; +}; + +&aoc_mbox_p6 { + status = "okay"; }; &ap2apm_mailbox { @@ -363,6 +405,10 @@ status = "okay"; }; +&gsa { + status = "okay"; +}; + /* * The speaker amplifiers, two TAS2572s: top at 0x48 (reset gpp6-3) and * bottom at 0x49 (reset gph2-1). One node each, since the tas2781 driver @@ -634,6 +680,10 @@ status = "okay"; }; +&trusty { + status = "okay"; +}; + /* * Bluetooth: the BCM4383 on the APM's UART at 3 Mbaud, powered through * BT_REG_ON (gpn8-0) behind its latch (ble-dbo on gpp24-3), with device wake From b9502f2373862da81e59acf5c2c0a0d95794ed3b Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:41:30 -0647 Subject: [PATCH 18/20] ASoC: dt-bindings: google: Add the AoC audio path and PCM drivers The AoC sound card is built from a DAI component, the AoC path, and the AoC drivers that serve each DAI link's PCM by the kind of stream: plain PCM, voice, compressed, host-less, VoIP and in-call. Their nodes carry only a compatible, and the path its #sound-dai-cells. Describe them so the card's nodes on gs201 and zumapro can be checked. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../bindings/sound/google,aoc-path.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/google,aoc-path.yaml diff --git a/Documentation/devicetree/bindings/sound/google,aoc-path.yaml b/Documentation/devicetree/bindings/sound/google,aoc-path.yaml new file mode 100644 index 0000000000..f4e1102bdd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/google,aoc-path.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/google,aoc-path.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Google Tensor AoC audio path and PCM drivers + +maintainers: + - W4HO <87742609+W4HO-ham@users.noreply.github.com> + +description: + The pieces the AoC sound card (google,aoc-snd-card.yaml) is built from. + The path is the DAI component every DAI link runs on, one DAI per AoC + entry point and port. The others are the AoC drivers a DAI link's + platform names to serve its PCM, by the kind of stream. + +properties: + compatible: + enum: + - google-aoc-path + - google-aoc-snd-pcm + - google-aoc-snd-voice + - google-aoc-snd-compr + - google-aoc-snd-nohost + - google-aoc-snd-voip + - google-aoc-snd-incall + + "#sound-dai-cells": + const: 1 + +required: + - compatible + +allOf: + - if: + properties: + compatible: + const: google-aoc-path + then: + required: + - "#sound-dai-cells" + else: + properties: + "#sound-dai-cells": false + +additionalProperties: false + +examples: + - | + aoc_path { + compatible = "google-aoc-path"; + #sound-dai-cells = <1>; + }; + + aoc_pcm_drv { + compatible = "google-aoc-snd-pcm"; + }; From 27f2848551e23bc074deff4d9236c806be66362b Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:41:30 -0647 Subject: [PATCH 19/20] ASoC: dt-bindings: google: Add the AoC sound card The AoC's sound card: its ALSA long name, the codec name prefixes, the clocks the AoC drives for its codecs, and the DAI links, front ends on the AoC's entry points and back ends on its ports, each naming its AoC path DAI, the drivers that serve its PCM, and for a back end its codecs and wire format. The names follow the driver, which already parses them on gs201 and zumapro. With this and the path binding, dtbs_check reports nothing for the Pixel 9a's card (it reported 184 lines without), nor for the Pixel 7 Pro's card applied as an overlay. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../bindings/sound/google,aoc-snd-card.yaml | 237 ++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/google,aoc-snd-card.yaml diff --git a/Documentation/devicetree/bindings/sound/google,aoc-snd-card.yaml b/Documentation/devicetree/bindings/sound/google,aoc-snd-card.yaml new file mode 100644 index 0000000000..1d9e793c84 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/google,aoc-snd-card.yaml @@ -0,0 +1,237 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/google,aoc-snd-card.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Google Tensor AoC sound card + +maintainers: + - W4HO <87742609+W4HO-ham@users.noreply.github.com> + +description: + The sound card of the AoC, the audio and sensor DSP of Tensor SoCs. Its + front ends are the AoC's entry points (the PCM device number is the entry + point), and its back ends are the AoC's own ports to the amplifiers, + microphones, Bluetooth and USB. Each DAI link names the AoC path DAI it + runs on, the AoC driver that serves its PCM, and for a back end the + codecs and the format on the wire. The same card serves gs201 and + zumapro. + +properties: + compatible: + const: google-aoc-snd-card + + aoc-card-name: + $ref: /schemas/types.yaml#/definitions/string + description: + The ALSA card's long name, which UCM profiles and session rules match. + + codec_cfg: + type: object + description: Name prefixes for codecs that serve more than one back end. + additionalProperties: false + patternProperties: + "^[a-z0-9]+$": + type: object + additionalProperties: false + properties: + of_node: + $ref: /schemas/types.yaml#/definitions/phandle + description: The codec. + prefix: + $ref: /schemas/types.yaml#/definitions/string + description: The prefix of its controls and widgets. + required: + - of_node + - prefix + + clks: + type: object + description: + Clocks the AoC drives for codecs or DAIs, from its system clocks (sys) + or its PLLs (pll). + additionalProperties: false + patternProperties: + "^(sys|pll)$": + type: object + additionalProperties: false + patternProperties: + "^(sys|pll)@[a-z0-9_]+$": + type: object + additionalProperties: false + properties: + comp: + $ref: /schemas/types.yaml#/definitions/phandle + description: The component the clock feeds. + dai_id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The DAI the clock feeds, when there is no component. + src: + enum: [MCLK, BCLK, PLL] + id: + $ref: /schemas/types.yaml#/definitions/uint32 + srcid: + $ref: /schemas/types.yaml#/definitions/uint32 + in_mul: + $ref: /schemas/types.yaml#/definitions/uint32 + out_mul: + $ref: /schemas/types.yaml#/definitions/uint32 + oneOf: + - required: [comp] + - required: [dai_id] + required: + - src + - id + - srcid + - in_mul + - out_mul + + dai_link: + type: object + description: The card's DAI links, front ends (fe_) and back ends (be_). + additionalProperties: false + patternProperties: + "^(fe|be)_[a-z0-9_]+$": + $ref: "#/$defs/link" + +$defs: + link: + type: object + additionalProperties: false + properties: + dai-name: + $ref: /schemas/types.yaml#/definitions/string + stream-name: + $ref: /schemas/types.yaml#/definitions/string + id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The link's ID. A front end's is its AoC entry point; a back end's + has bit 31 set and names the AoC port. + dynamic: + type: boolean + description: A DPCM front end. + no-pcm: + type: boolean + description: A DPCM back end, with no PCM device of its own. + playback: + type: boolean + capture: + type: boolean + useops: + type: boolean + description: The back end uses the AoC path's stream operations. + usefixup: + type: boolean + description: The back end's hardware parameters come from its AoC port. + cpu: + type: object + additionalProperties: false + properties: + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + description: The AoC path DAI and the link's ID. + required: + - sound-dai + codec: + type: object + additionalProperties: false + properties: + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 1 + required: + - sound-dai + platform: + type: object + additionalProperties: false + description: The AoC drivers that serve the link's PCM. + patternProperties: + "^(rx|tx|vorx|votx)[0-9]*$": + type: object + additionalProperties: false + properties: + of_drv: + $ref: /schemas/types.yaml#/definitions/phandle + required: + - of_drv + daifmt: + type: object + additionalProperties: false + properties: + dai-format: + enum: [i2s, dsp_a, dsp_b, left_j, right_j] + bitclock-inversion: + type: boolean + required: + - dai-format + required: + - dai-name + - stream-name + - id + - cpu + +required: + - compatible + - aoc-card-name + - dai_link + +additionalProperties: false + +examples: + - | + sound-aoc { + compatible = "google-aoc-snd-card"; + aoc-card-name = "google,tegu-aoc-snd-card"; + + codec_cfg { + top { + of_node = <1>; + prefix = "Top"; + }; + }; + + dai_link { + fe_ep1_rx { + dai-name = "audio_playback0"; + stream-name = "EP1 playback"; + id = <0x00>; + dynamic; + playback; + + cpu { + sound-dai = <2 0x00>; + }; + + platform { + rx1 { + of_drv = <3>; + }; + }; + }; + + be_tdm0_rx { + dai-name = "TDM_0_RX Playback"; + stream-name = "TDM_0_RX Playback"; + id = <0x80000006>; + playback; + no-pcm; + useops; + usefixup; + + codec { + sound-dai = <1>; + }; + + cpu { + sound-dai = <2 0x80000006>; + }; + + daifmt { + dai-format = "dsp_a"; + }; + }; + }; + }; From 4abd3d497e607a77ba8dfc35b613feaf51b75895 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:23:32 -0643 Subject: [PATCH 20/20] arm64: dts: exynos: google: zumapro-tegu: Add the AoC sound card Describe the AoC sound card as stock's device tree does: the entry-point PCM, voice, compress, path, no-host, VoIP and in-call nodes and stock's DAI links (EP1-EP8 playback, EP1-EP6 capture, VoIP, in-call, no-host, the I2S, TDM, mic, Bluetooth, USB and in-call back ends), with the two TAS2572s as the TDM 0 codecs, prefixed Top and Bottom. The haptics codec and the DisplayPort links are left out. The card's name is google,tegu-aoc-snd-card, so the 7 Pro's UCM profile and WirePlumber rules, which match google,aoc-snd-card, leave it to the 9a's own. These are Google's driver's bindings (google-aoc-snd-*), which have no schema yet. The card binds only once the AoC's audio services exist, after a firmware start, but its nodes are there from boot, so the platform devices autoload aoc_alsa_dev: as on the 7 Pro, the AoC modules must be blacklisted and loaded in order by the AoC's start script (aoc_alsa_dev before aoc_char_dev, which takes every free service). Booted on the Pixel 9a: 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty with these nodes applied as an overlay after the AoC came up: the card registers, PipeWire plays on both speakers through the tegu UCM profile, and EP1 captures from two microphones; the AoC stays up. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com> --- .../boot/dts/exynos/google/zumapro-tegu.dts | 992 ++++++++++++++++++ 1 file changed, 992 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts b/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts index f66e006084..a1fe22f20e 100644 --- a/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts +++ b/arch/arm64/boot/dts/exynos/google/zumapro-tegu.dts @@ -147,6 +147,998 @@ regulator-boot-on; regulator-always-on; }; + + /* + * The AoC sound card as stock's device tree describes it (Google's + * driver, so Google's compatibles): the + * entry-point PCMs, voice, compress, path, no-host, VoIP and in-call + * nodes and the stock DAI links, with the two TAS2572s on TDM 0. The + * haptics codec and the DisplayPort links are left out. + */ + aoc_pcm_ep: aoc_pcm_drv { + compatible = "google-aoc-snd-pcm"; + }; + + aoc_voice_ep: aoc_voice_drv { + compatible = "google-aoc-snd-voice"; + }; + + aoc_compr_ep: aoc_compr_drv { + compatible = "google-aoc-snd-compr"; + }; + + aud_aoc_path: aoc_path { + #sound-dai-cells = <0x01>; + compatible = "google-aoc-path"; + }; + + aoc_nohost_drv: aoc_nohost { + compatible = "google-aoc-snd-nohost"; + }; + + aoc_voip_ep: aoc_voip_drv { + compatible = "google-aoc-snd-voip"; + }; + + aoc_incall_ep: aoc_incall_drv { + compatible = "google-aoc-snd-incall"; + }; + + aoc_snd_card: sound-aoc { + compatible = "google-aoc-snd-card"; + /* + * Not "google,aoc-snd-card": the 7 Pro's UCM profile and + * WirePlumber rules match that name. + */ + aoc-card-name = "google,tegu-aoc-snd-card"; + + codec_cfg { + top { + of_node = <&tas2572_top>; + prefix = "Top"; + }; + + bottom { + of_node = <&tas2572_bottom>; + prefix = "Bottom"; + }; + }; + + dai_link { + fe_ep1_rx { + dai-name = "audio_playback0"; + stream-name = "EP1 playback"; + id = <0x00>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x00>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep2_rx { + dai-name = "audio_playback1"; + stream-name = "EP2 playback"; + id = <0x01>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x01>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep3_rx { + dai-name = "audio_playback2"; + stream-name = "EP3 playback"; + id = <0x02>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x02>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep4_rx { + dai-name = "audio_playback3"; + stream-name = "EP4 playback"; + id = <0x03>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x03>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep5_rx { + dai-name = "audio_playback4"; + stream-name = "EP5 playback"; + id = <0x04>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x04>; + }; + + platform { + vorx { + of_drv = <&aoc_voice_ep>; + }; + }; + }; + + fe_ep6_rx { + dai-name = "audio_playback5"; + stream-name = "EP6 playback"; + id = <0x05>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x05>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep7_rx { + dai-name = "audio_playback6"; + stream-name = "EP7 playback"; + id = <0x06>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x06>; + }; + + platform { + rx1 { + of_drv = <&aoc_compr_ep>; + }; + }; + }; + + fe_ep8_rx { + dai-name = "audio_haptics"; + stream-name = "EP8 playback"; + id = <0x07>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x07>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep1_tx { + dai-name = "audio_capture0"; + stream-name = "EP1 capture"; + id = <0x40000000>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000000>; + }; + + platform { + tx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep2_tx { + dai-name = "audio_capture1"; + stream-name = "EP2 capture"; + id = <0x40000001>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000001>; + }; + + platform { + tx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep3_tx { + dai-name = "audio_capture2"; + stream-name = "EP3 capture"; + id = <0x40000002>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000002>; + }; + + platform { + tx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep4_tx { + dai-name = "audio_capture3"; + stream-name = "EP4 capture"; + id = <0x40000003>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000003>; + }; + + platform { + votx { + of_drv = <&aoc_voice_ep>; + }; + }; + }; + + fe_ep5_tx { + dai-name = "ultrasonic_capture"; + stream-name = "EP5 capture"; + id = <0x40000004>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000004>; + }; + + platform { + tx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_ep6_tx { + dai-name = "audio_capture5"; + stream-name = "EP6 capture"; + id = <0x40000005>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000005>; + }; + + platform { + tx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_nohost1_rx { + dai-name = "nohost1 playback"; + stream-name = "nohost1 playback"; + id = <0x20000008>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x20000008>; + }; + + platform { + rx1 { + of_drv = <&aoc_nohost_drv>; + }; + }; + }; + + fe_nohost1_tx { + dai-name = "nohost1 capture"; + stream-name = "nohost1 capture"; + id = <0x60000008>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x60000008>; + }; + + platform { + tx1 { + of_drv = <&aoc_nohost_drv>; + }; + }; + }; + + fe_voip_rx { + dai-name = "audio_voip_rx"; + stream-name = "audio_voip_rx"; + id = <0x0a>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x0a>; + }; + + platform { + rx1 { + of_drv = <&aoc_voip_ep>; + }; + }; + }; + + fe_voip_tx { + dai-name = "audio_voip_tx"; + stream-name = "audio_voip_tx"; + id = <0x4000000a>; + dynamic; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x4000000a>; + }; + + platform { + tx1 { + of_drv = <&aoc_voip_ep>; + }; + }; + }; + + fe_incall_pb0_rx { + dai-name = "audio_incall_pb_0"; + stream-name = "audio_incall_pb_0"; + id = <0x0b>; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x0b>; + }; + + platform { + rx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_incall_pb1_rx { + dai-name = "audio_incall_pb_1"; + stream-name = "audio_incall_pb_1"; + id = <0x0c>; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x0c>; + }; + + platform { + rx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_incall_cap0_tx { + dai-name = "audio_incall_cap_0"; + stream-name = "audio_incall_cap_0"; + id = <0x4000000d>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x4000000d>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_incall_cap1_tx { + dai-name = "audio_incall_cap_1"; + stream-name = "audio_incall_cap_1"; + id = <0x4000000e>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x4000000e>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_incall_cap2_tx { + dai-name = "audio_incall_cap_2"; + stream-name = "audio_incall_cap_2"; + id = <0x4000000f>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x4000000f>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_raw_rx { + dai-name = "audio_raw"; + stream-name = "audio_raw"; + id = <0x09>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x09>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_haptic_nohost_rx { + dai-name = "haptic nohost playback"; + stream-name = "haptic nohost playback"; + id = <0x20000011>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x20000011>; + }; + + platform { + rx1 { + of_drv = <&aoc_nohost_drv>; + }; + }; + }; + + fe_hifi_rx { + dai-name = "audio_hifiout"; + stream-name = "audio_hifiout"; + id = <0x10>; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x10>; + }; + + platform { + rx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_hifi_tx { + dai-name = "audio_hifiin"; + stream-name = "audio_hifiin"; + id = <0x40000010>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000010>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_android_aec_tx { + dai-name = "audio_android_aec"; + stream-name = "audio_android_aec"; + id = <0x40000012>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000012>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_us_rx { + dai-name = "audio_ultrasonic"; + stream-name = "audio_ultrasonic"; + id = <0x13>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x13>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_incall_pb2_rx { + dai-name = "audio_incall_pb_2"; + stream-name = "audio_incall_pb_2"; + id = <0x14>; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x14>; + }; + + platform { + rx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_ims_rx { + dai-name = "audio_immersive"; + stream-name = "audio_immersive"; + id = <0x15>; + dynamic; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x15>; + }; + + platform { + rx1 { + of_drv = <&aoc_pcm_ep>; + }; + }; + }; + + fe_capture_inject_rx { + dai-name = "audio_capture_inject"; + stream-name = "audio_capture_inject"; + id = <0x16>; + playback; + + cpu { + sound-dai = <&aud_aoc_path 0x16>; + }; + + platform { + rx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + fe_hotword_tap_tx { + dai-name = "audio_hotword_tap"; + stream-name = "audio_hotword_tap"; + id = <0x40000017>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000017>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + + be_i2s0_rx { + dai-name = "I2S_0_RX Playback"; + stream-name = "I2S_0_RX Playback"; + id = <0x80000000>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x80000000>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_i2s0_tx { + dai-name = "I2S_0_TX Capture"; + stream-name = "I2S_0_TX Capture"; + id = <0xc0000001>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000001>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_i2s1_rx { + dai-name = "I2S_1_RX Playback"; + stream-name = "I2S_1_RX Playback"; + id = <0x80000002>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x80000002>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_i2s1_tx { + dai-name = "I2S_1_TX Capture"; + stream-name = "I2S_1_TX Capture"; + id = <0xc0000003>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000003>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_i2s2_rx { + dai-name = "I2S_2_RX Playback"; + stream-name = "I2S_2_RX Playback"; + id = <0x80000004>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x80000004>; + }; + + daifmt { + dai-format = "i2s"; + bitclock-inversion; + }; + }; + + be_i2s2_tx { + dai-name = "I2S_2_TX Capture"; + stream-name = "I2S_2_TX Capture"; + id = <0xc0000005>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000005>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_tdm0_rx { + dai-name = "TDM_0_RX Playback"; + stream-name = "TDM_0_RX Playback"; + id = <0x80000006>; + playback; + no-pcm; + useops; + usefixup; + + codec { + sound-dai = <&tas2572_top>, <&tas2572_bottom>; + }; + + cpu { + sound-dai = <&aud_aoc_path 0x80000006>; + }; + + daifmt { + dai-format = "dsp_a"; + }; + }; + + be_tdm0_tx { + dai-name = "TDM_0_TX Capture"; + stream-name = "TDM_0_TX Capture"; + id = <0xc0000007>; + capture; + no-pcm; + useops; + usefixup; + + codec { + sound-dai = <&tas2572_top>, <&tas2572_bottom>; + }; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000007>; + }; + + daifmt { + dai-format = "dsp_a"; + }; + }; + + be_tdm1_rx { + dai-name = "TDM_1_RX Playback"; + stream-name = "TDM_1_RX Playback"; + id = <0x80000008>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x80000008>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_tdm1_tx { + dai-name = "TDM_1_TX Capture"; + stream-name = "TDM_1_TX Capture"; + id = <0xc0000009>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000009>; + }; + + daifmt { + dai-format = "i2s"; + }; + }; + + be_internal_mic_tx { + dai-name = "INTERNAL_MIC_TX Capture"; + stream-name = "INTERNAL_MIC_TX Capture"; + id = <0xc000000a>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc000000a>; + }; + }; + + be_internal_mic_us_tx { + dai-name = "INTERNAL_MIC_US_TX Capture"; + stream-name = "INTERNAL_MIC_US_TX Capture"; + id = <0xc0000013>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000013>; + }; + }; + + be_bt_rx { + dai-name = "BT_RX Playback"; + stream-name = "BT_RX Playback"; + id = <0x8000000b>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x8000000b>; + }; + }; + + be_bt_tx { + dai-name = "BT_TX Capture"; + stream-name = "BT_TX Capture"; + id = <0xc000000c>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc000000c>; + }; + }; + + be_usb_rx { + dai-name = "USB_RX Playback"; + stream-name = "USB_RX Playback"; + id = <0x8000000d>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x8000000d>; + }; + }; + + be_usb_tx { + dai-name = "USB_TX Capture"; + stream-name = "USB_TX Capture"; + id = <0xc000000e>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc000000e>; + }; + }; + + be_incall_rx { + dai-name = "INCALL_RX Playback"; + stream-name = "INCALL_RX Playback"; + id = <0x8000000f>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x8000000f>; + }; + }; + + be_incall_tx { + dai-name = "INCALL_TX Capture"; + stream-name = "INCALL_TX Capture"; + id = <0xc0000010>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000010>; + }; + }; + + be_haptic_rx { + dai-name = "HAPTIC_RX Playback"; + stream-name = "HAPTIC_RX Playback"; + id = <0x80000011>; + playback; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0x80000011>; + }; + + daifmt { + dai-format = "dsp_a"; + }; + }; + + be_eraser_tx { + dai-name = "ERASER_TX Capture"; + stream-name = "ERASER_TX Capture"; + id = <0xc0000012>; + capture; + no-pcm; + useops; + usefixup; + + cpu { + sound-dai = <&aud_aoc_path 0xc0000012>; + }; + }; + + fe_incall_cap3_tx { + dai-name = "audio_incall_cap_3"; + stream-name = "audio_incall_cap_3"; + id = <0x40000019>; + capture; + + cpu { + sound-dai = <&aud_aoc_path 0x40000019>; + }; + + platform { + tx1 { + of_drv = <&aoc_incall_ep>; + }; + }; + }; + }; + }; }; &{/reserved-memory} {