Repository navigation
Conversation
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>
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>
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>
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>
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>
|
Thank you, @W4HO-ham, for splitting these out so cleanly, and for being clear Since this PR is where the names get settled, here is what I think "settled"
That means a driver change, and it also means moving my 7 Pro's and raven's Two smaller things for when it leaves draft:
When #162 lands, this will need a rebase onto |
The top three commits of #162, split off as asked there: the two bindings (
sound/google,aoc-snd-card.yamlandsound/google,aoc-path.yaml) andzumapro-tegu's card node. This is stacked on #162, so it shows #162's 17 commits too until that lands.As Derek noted on #162, the bindings document Google's names as they are:
google-aoc-*compatibles without the vendor comma, and unprefixed properties (aoc-card-name,codec_cfg,of_drv).writing-bindings.rstasks us not to add those, and once a binding lands it is ABI. So this stays a draft until the names are settled once, together with the driver change, for both phones (the 7 Pro's card and the 9a's). The card node, by itself, merges with #187 if the Wi-Fi regulator block there and the card here are both kept.