Repository navigation
Conversation
The Tensor G4 (zumapro) camera front end has the same Samsung DC-PHY receiver with nine slaves for its twelve CSIS links, the clock lane first on each and one reset bit per slave. Add its compatible; the PHY cell is the CSIS link. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's DC-PHY slaves sit at 0x1c100000 with the bias block at +0x1000 as on gs201, but every slave has its clock lane first and up to four data lanes (three C-PHY trios) after it, and three slaves are a clock lane only, which links 4 and 6 enable next to their own in four-lane D-PHY mode. The layout comes from the Pixel 9a camera HAL's register table and Google's GPL zuma DT; the reset bits are one per slave in the ISP-FE system registers at +0x500. Make the link layout per SoC with the reset bits and the partner clock lane in it, and add zumapro's four-lane links (0, 1, 2, 4 and 6). The data file format is unchanged. On the Pixel 9a, link 1 (the ultrawide IMX712, four lanes at 1105.92 Mbps) powers on with settle 55, and the CSIS link receives about 30 frames a second with no SOT, CRC or ECC errors. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro has the same CSIS link (version 0x08010000 against gs201's 0x05040000, the same register layout) with twelve link contexts, but a different DMA path. Add its compatible with the link registers and the link interrupt only. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's CSIS link has gs201's layout, but its frames reach memory through the ISP front end's CSIS core, which this driver doesn't drive yet. Add a zumapro match that maps the link only and always runs as link_only does: PHY, link and sensor, counting frames, with no WDMA, no routing and none of gs201's CSIS sysreg accesses (an unknown sysreg word aborted gs201). Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
On zumapro a link's frames reach memory through the ISP front end's CSIS core, one page shared by all links, with one interrupt for all of them. Describe it as an optional second register range and interrupt of a zumapro link, with the image logical channel the link writes through. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's CSIS core takes a link's data type on one virtual channel into an image logical channel (LoCH) and writes it to memory through its Bayer WDMA. The register layout and fields come from the Pixel 9a camera HAL's register table and value packers and, for the interrupt bits, Google's GPL zuma ISP event description. Route the link's channel 0 into a LoCH, write packed RAW10 (or RAW8) at the stride the video node set, and program the batch slot at each start of frame only: a configuration written during a frame is a late config and stops the LoCH, so frames with no queued buffer go to a scratch buffer. A status queue page takes the LoCH's per-frame record. The link differs from gs201 in three bits the zumapro HAL sets or clears: pixel mode 3, CMN_CTRL bit 12, and DBG_OPTION_SUITE cleared. gs201 sets DBG_OPTION_SUITE bit 23, and with it the link hands out unpacked 16-bit words, which gs201's WDMA expects; zumapro's core reads them as packed RAW10 and scrambles every pixel. On the Pixel 9a the ultrawide's solid colour test pattern (R 1023, Gr 0, B 341, Gb 682) reads back exactly in RAW10 and RAW16, and libcamera's simple pipeline streams it at 30 fps. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a main camera is a Samsung part with model ID 0x08e8 that takes the GN1's register layout and data file, with a second auxiliary supply and its digital supply switched by the board. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a main camera (model 0x08e8) powers up as stock's module power sequence has it: the interface supply, two 2.9 V auxiliary supplies, the analog and the digital supply, reset released, then the clock and 10 ms. Its soft reset goes through the direct page, its standard registers too, and its horizontal addresses count pixels. Its initialisation and modes come from the data file, as for the other parts. On the Pixel 9a it identifies at 0x56 and streams 2000x1128 over three C-PHY trios. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
All zumapro links write through image LoCH 0, so a stream that stopped with the LoCH in error (the main camera's first C-PHY attempts) left it taking a few frames and then nothing for the next link. Disable, abort and clear the LoCH before routing it. Count the core interrupts each link handles in debugfs, with the last aggregate and processing sources. Bring-up parameters for the link and the core (pixel and parallel mode, CMN_CTRL bits, LoCH data type and memory format) stay for the C-PHY work. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
zumapro's camera software never writes the link's PHY_CMN_CTRL: its PHY lanes are enabled in the DC-PHY transaction. Write it on gs201 only. The ultrawide and front cameras stream as before without it. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…ocks A zumapro link takes the INT DVFS domain, the rail of the ISP front end's NOC clock, and that clock, as "int" and "fe". gs201 keeps its "cam" and "int" DVFS domains. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
ABL leaves the ISP front end's NOC clock at a sixth of SHARED3 (111 MHz). The Pixel 9a main camera's three C-PHY trios at 2740 Msps (18.8 Gbps) overrun the front end at that rate: the link reports ERR_DESKEW_OVER and the LoCH a size mismatch and stream error, with a few hundred bytes of each frame in memory. At 332 MHz every frame lands whole. Take the INT DVFS domain (the clock's rail, through ACPM) and the front end clock as "int" and "fe", and raise both while a link streams, the rail first, restoring them in reverse afterwards. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's ultrawide and front cameras are Sony IMX712s (model 0x0712), with the IMX386's register map and their own initialisation and modes in the data file. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's ultrawide and front cameras answer with model 0x0712 at the IMX386's chip ID register and take the same CCS-style register map. Take the expected model ID from the compatible, for the probe's check and the data file's header. Both cameras stream 4208x3072 RAW10 on four D-PHY lanes on the palmtop with their data file from the 9a's camera HAL. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
|
Added two commits: the IMX712 compatible for sony,imx386 and its model ID in imx386 (the 9a's ultrawide and front cameras). I'd missed them when splitting the series out of my integration tree. dt-doc-validate passes on the binding. |
|
Thank you for this. It's a big series and it reads well: the per-SoC tables, the LoCH path and the clock raise are all gated on the zumapro match, and I could follow every zumapro branch back to a What I checked:
Nothing blocking. Small things for a follow-up PR, since I know you can't rewrite the commits:
Two evidence asks: the tested release I'll merge this (rebase) after the cheetah capture, before the three userspace PRs. |
|
The evidence you asked for. The tested 9a ran 7.3.0-rc6-omamobile-tegu-s2mpg15-m1 from my integration tree:
The small things are in a follow-up PR stacked on this one, #103. On your question 5: I tried programming the first slot after |
|
Thank you for the blob ids. I went through #103 as well. It covers the LoCH citation, the unused This branch still merges cleanly onto today's What's left is on my side: one capture per camera on my Pixel 7 Pro with this series, since the gs201 path is unchanged by the tables but its objects still change. #103 goes on the same test kernel, so the one run covers both. If it's clean, I'll merge this, then #103. The camera results and the DEVICES cell in the next tegu notes PR are still welcome. |
…s#63) into tegu-dt-cameras Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
This brings up the Pixel 9a's camera receiver on top of your gs201 drivers: all three of its cameras (main S5KGN8 over C-PHY, ultrawide and front IMX712 over D-PHY) now stream through libcamera's simple pipeline, and the Camera app shows a live preview.
DC-PHY (2 commits). zumapro has nine slaves for twelve CSIS links, the clock lane first on each, one reset bit per slave in the ISP-FE sysreg at +0x500, and three clock-only slaves that links 4 and 6 enable beside their own in four-lane D-PHY. The layout is a per-SoC table now; the data file format is unchanged, and
tools/extract-camera-data(omarchy-mobile #68) builds the 9a's file from the owner's HAL.CSIS (8 commits). The link is gs201's (version 0x08010000 against 0x05040000, same layout), but frames reach memory through the ISP front end's CSIS core: an image logical channel (LoCH) and its Bayer WDMA. The new path routes the link's VC 0 into LoCH 0, writes packed RAW10, and programs the batch slot only at start of frame (a mid-frame write is a "late config" and stalls the LoCH, so frames with no queued buffer go to a scratch buffer). Three link bits differ from gs201, all from the zumapro HAL: pixel mode 3, CMN_CTRL bit 12, and DBG_OPTION_SUITE cleared. Your bit 23 there makes the link hand out unpacked 16-bit words, which gs201's WDMA wants and zumapro's core scrambles. The main camera's 18.8 Gbps C-PHY link also overran the front end until its NOC clock went from ABL's 111 MHz to 332 MHz, so the driver raises the INT DVFS domain (its rail, through ACPM) and then the clock while a link streams. The gs201 path keeps its defaults:
.wdma,.dbg_bit23and.phy_cmn_ctrlare true for gs201, and the bring-up parameters default to the SoC's values.S5KGN8 (2 commits): the 9a's main camera, model 0x08e8, as a fourth s5kgn1 variant (stock's power order with a second 2.9 V supply and a board-switched digital supply).
Testing, on the palmtop (
7.3.0-rc6-omamobile-tegu-s2mpg15-m1): the solid colour test pattern reads back exactly in RAW10 and RAW16 on the ultrawide; colour bars land whole on all three cameras; libcamera streams each at about 29 fps; the stream counters show no link CRC/ECC/SOT errors on the D-PHY links.tools/kernel-pr-check: sign-offs, prefixes and policy pass; checkpatch has one long format string (matching the file's style) and the MAINTAINERS note for the new header, which the existing gs201-csis directory entry covers. dt-doc-validate and yamllint pass on the three bindings.Not tested: cheetah. The gs201 values are unchanged by design, but I have no Pixel 7 Pro here; could you run a capture on cheetah with this series?
The 9a's DT, clock (CIS clocks, USI3/USI5, the ISP-FE NOC clock) and PMIC GPIO pieces these use come in separate PRs.