Repository navigation
Pixel 9a (zumapro): the AoC, GSA, Trusty and speaker amplifiers from the device tree - #162
Conversation
|
Two more runs on the same kernel (
|
|
Speaker confirmed by ear. On the same kernel, with the AoC started at boot by device-tegu 0.2.2, a 5 s 440 Hz tone at -10 dBFS ( |
|
Thanks for the question, and congratulations on the speaker by ear. Please follow #141's gs201 card rather than adding a separate binding: one AoC sound-card binding, with the tegu compatibles added to it next to gs201's, so the two cards share a schema and a driver path. I'll get #141 out of draft so you have something stable to build on; until then it's fine for this branch to carry it, as it does now. |
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>
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>
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>
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>
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>
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>
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>
|
Rebased onto today's |
|
Thank you, @W4HO-ham, for the rebase down to 18 clean commits, and for calls with audio both ways from the device tree. You're right about the card binding, and I'm sorry: #141 landed without one (the 7 Pro's card is still an overlay), so there was nothing to follow. I withdraw that request. The gate passes apart from the card, and every DTB except the 9a's is unchanged. I also went through the AoC driver's gs201 path: the PCU and GPIO bases, the doorbell offsets, the chip id fields and the force-vnom default all match the old constants, and my 7 Pro's node has no clocks and no Before it lands:
Since the AoC driver's constants moved into per-SoC data, I'll boot this on my 7 Pro (AoC, sound card, sensors) before merging. Without the card commit it merges cleanly with #187. |
|
Added the two bindings, ahead of the card's device tree commit: |
|
Thank you, @W4HO-ham, for writing the two bindings, and for checking them against both phones' cards. CI's On the bindings, I'd still like them, with the card, in their own PR. A binding becomes ABI once it lands, and these document Google's names as they are: Two points from this morning are still open:
Then I'll boot the 17 on my 7 Pro (AoC, sound card, sensors) and merge. |
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>
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>
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>
…roller 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>
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>
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>
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>
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) <robh@kernel.org> Link: https://patch.msgid.link/20260922212122.1116270-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
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>
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>
|
Done. This branch is now the 17 commits (c3bfbdd). The two bindings and the card are in #193, a draft stacked on this one, until the names are settled for both phones. The new The |
|
The smoke report from this head. The kernel is these 17 commits (c3bfbdd) merged onto today's The AoC came up from the device tree at boot through Three rows don't apply to this branch:
|
|
Thank you, @W4HO-ham, for the split, the gate and the smoke report, all in The smoke report shows the AoC coming up from the device tree with 93 That's everything from you. What's left is on my side: a boot of these 17 on |
|
@W4HO-ham the 7 Pro run is done and it's clean, so this goes in. The kernel was
Since the test kernel was built, |
This makes the 9a's audio and sensor DSP (the AoC) start from the device tree, with no runtime overlays and no out-of-tree modules: Trusty, the GSA, the AoC with its mailboxes, the two TAS2572 speaker amplifiers and the AoC sound card.
Rebased on today's
omamobile(4cf2c8b). It's now the 18 commits below on top ofomamobile, no merges. Everything else this branch used to carry is already onomamobile.What's in it
ti,tas2572at 0x48 needs.All 18 are the same patches as before the rebase (
git patch-idmatches; the one context difference is inEnable the AoC, where the surrounding lines ofzumapro-tegu.dtsmoved). Authors and sign-offs are unchanged.What dropped out, and why
omamobilepatch for patch: Audio on gs201: CS35L41 amplifiers, Trusty, GSA and the AoC (curated 2/8) #141 (curated/2-audio), arm64: dts: exynos: google: zumapro-tegu: Add the haptics and the torch #96, arm64: dts: exynos: google: zumapro-tegu: Add the fuel gauge and USB-C port controller #119 and the parts of mfd, regulator: the S2MPG15 sub-PMIC (Pixel 9a) and its LDOs #101 this needed. Table below.omamobilein a reworked form (9d8d2db, 8b8235e); LDO5S, LDO7S and LDO9S-11S, the AoC's sensor rails, are all there.wait for the MAX77759 to release ALRT,ignore interrupts with no status bit set) were superseded onomamobileby 92b2b5d and 91d3f15.The 65 commits already on omamobile (old commit here, then omamobile's)
0dfc2bb08297e81264f726000b8cbcea7a2db3b8cdc3314c006e9ff656fadcf4eb4fd86c479c3e0e05d84fa270cbc608dca66f96f76ba72a90916b3772d1b11ef8415dc20714d749b6da930a00370efda152fe3473ee7b7aff32160168089cfbb9da3e5d8980ad5940fc0812d38da912bf45932b70138fb2e1358a42b1dc20aea4fa2769434e077dd4ddc4f4d4bc823cb2b612916d333177acb9210acd18b5902d41f124e82e1daa9acf8a5c9fc9c4733c34ebebfa3362f45fc9a616bc0fa5451c55d4699d42cd9e5a972fcf2c0a9a4de06c61225e824040f012500caa5bc9fdb330c099d4322eb104488dbf3732949b4b15d50a67ad7b06f00d335c49c40ba0dc6db0148c44940056fd1d8b190a066ed3dd9a462301282495c309b549ce5324636f0e13fc82a040a1db7ed8204a6ae392868c319a2623cfe4f446e9dd3a9c9d5c59b1bc855491ba1ebd25bd22162e11e47eb170c05f1f26af8a7f101f04f5b3635f5e5c670fe7fbe93600d6ab200cd12cfeb5d80b31f3e19915c5915f4bdba1ea9622f44b9af279a0ef8991cf7ea798862dd73f96b9966b6a66da04f8664658dcd0848412b5a180068f460b9c8c06cb930bdcd41e9676952955f88a595fc7e7dadc6b0df5fa7b171234b005d24a496575f9ca6d979348605dcb181abf7fccbf4f96f59eed536637ab2f61736bfc003cd5680435d11c015ac4031040c1b134fc2dd875a85f4f082be599f9dc67a01c0aaf8d6e15688bdfbe08986bf5266809cfd3e824a43ac75ee6380097c5eddc47a28b8e918251d2a47f81abf83b32fcaeba80466668758b19971a87822a8573a2848885a4fdf705ea8d55e118788d7e6457f79fb0619f53c08a165dc752eeaebeae2f98a109af1093ae40d158884c6c4e4bac4fdaeb3759581105abf9aeae1b8b14436589f7cc6bd03537107ee3455472e5745429c46b8b522c273acf48dbeae8e3f9083e43b0cd3808babf9742a49eba808a07eeb194f81703f02002e4019e72ea4a1fd4a360ade88fc8122b5352136cdd274e599405132bb36c3e80e983249b216c2cc42d5628f18889043af51a3d2b776bbb335874c5b74615d524e7Hardware
These 18 commits ran on the palmtop today (2026-11-03) on top of the 9a modem series. The AoC came up from the device tree with 93 services, the sound card
google,tegu-aoc-snd-cardregistered, and two phone calls had audio both ways. The earlier runs on this branch (speaker heard by ear through the TAS2572s, microphone capture, the sensors throughomamobile-sensor-proxy) are in the comments below. That kernel had omamobile's newer AoC doorbell code (6d37aa0, 93640e5), the same as this rebase.Checks
tools/kernel-pr-check --build --mergeagainstomamobile4cf2c8b:checkpatch --strict: no errors. Warnings:soc: google: aoc: Add Tensor G4 (zumapro)asks whether MAINTAINERS needs updating for the newaoc_sensor_power.c, and the sound-card commit's eightgoogle-aoc-*compatibles are undocumented.W=1builds of the 6 touched C files: no warnings.dt_binding_checkon the 4 touched bindings (google,gs201-gsa,google,gs201-aoc-mbox,google,gs201-aoc,ti,tas2781): clean.exynos/googleboard builds withW=1with nothing new.dtbs_checkon zumapro-tegu: 0 lines at the base, 184 new at the head, nothing gone, no other board changed. All 184 are inside the sound card:/sound-aoc, itsbe_*/fe_*links andcodec_cfg, and the sevenaoc_*nodes. They are the eight compatibles without a schema and dtschema's type checks on the properties under them. Trusty, the GSA, the AoC, its mailboxes, USI4/I2C19 and the two TAS2572s add nothing. This is the only failing check.The card binding
You asked me to follow #141's gs201 card binding. #141's content is on
omamobilenow, but it has no sound-card binding: gs201's card is still described by an overlay on the 7 Pro side. So there's nothing to follow yet, and the card commit still uses Google'sgoogle-aoc-*compatibles as stock's device tree does.My proposal: keep this PR to what's above, and write one AoC sound-card binding as a follow-up that covers gs201 and zumapro together, with both boards' cards moved onto it. That would also clear the 184
dtbs_checklines. If you'd rather have the binding in this PR, say so and I'll add it here, or I can drop the card commit from this PR until the binding lands.