Repository navigation
Conversation
4023f58 to
aa96818
Compare
|
Thank you, @W4HO-ham. Three cameras coming up from the device tree alone, with every module loading on its own, is a big step for the 9a. The description shows exactly what ran: the release, the module list, CI: the run for this head was cancelled after an hour while the runner was still installing packages, before any check started, so that's the runner, not your branch. I'll re-run it. Locally, on today's What I'd like changed:
On the bus speed: your boot of this head ran On size and order: this carries #63, #103 and #101 through merge commits, so it lands after those and after #161, then rebased onto |
|
7 Pro check done for the shared part: |
aa96818 to
8762e32
Compare
|
Done:
The description now says the 100 kHz bus is tested. The tree is identical to the booted head ( |
|
Thank you, @W4HO-ham. All three points are done, and I checked each against the new head:
The description now says the 100 kHz bus is tested, which matches your boot. One thing to know for the combined On the checks: the commit checks pass on this head (all 38 commits signed off, |
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>
…used define The LoCH interrupt registers' offsets are also in Google's GPL zuma-isp-event-info.dtsi, not only their bits: say so. ZP_STRIDE_ALIGN was never used (CSIS_STRIDE_ALIGN, 64, already covers it). Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…roles The GN8's power-up order is rear_main_camera_power_seq in Google's GPL zuma-tegu-camera.dtsi, which also names ldo5 and ldo4 as the actuator's and OIS's AVDD and AF_VM (the sensor's own being ldo1 and vdig). Replace the open question with that; both stay required, as the module's sequence powers them before the sensor. Link: https://android.googlesource.com/kernel/devices/google/tegu/+/6276884d9940694b25a6934671918ec8ac412ee8/dts/zuma-tegu-camera.dtsi Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
None of gs201-csis, the MIPI DC-PHY receiver or the S5KGN1 and IMX386 sensor drivers had an entry. Add one block for the four and their bindings. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
On the Pixel 9a the first capture after switching cameras came back empty whenever the previous stream ran on a D-PHY link (the ultrawide or the front camera) and worked: the new link received its frames, but the LoCH raised no interrupt and wrote nothing. The next capture on the same link worked. The LoCH's EN_STATUS register (0x0a8, named in the camera HAL's register table) shows why. After a stream that stopped cleanly it still reads active with the old link in its low bits (0x106 after link 6, 0x101 after link 1), and every failing start began that way, every good start with it clear. The abort at route time didn't clear it, because the LoCH ignores an abort while it is disabled. So when the LoCH is still active, enable it (its DMA is already off) for the abort, and disable it afterwards. Nine captures in a row, switching between all three cameras in every order, now all write frames; before, about half of the switches failed. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The zuma PMU regmap only accepts listed registers. The MIPI DC-PHY receiver
isolates its PHY through PMU offset 0x3ebc, which was not listed, so every
phy_power_on() returned -EIO and no camera buffer could be queued on the
Pixel 9a ("phy poweron failed --> -5" for each queued buffer).
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Describe the general purpose pins of the Tensor G4's two PMICs as a gpio child node, as for the S2MPG13: six on the S2MPG14 main PMIC and ten on the S2MPG15 sub-PMIC. On the Pixel 9a they switch the camera power: the S2MPG15's pins enable the camera buck-boost, select the camera PMIC and enable the cameras' 1.35 V supply, and one S2MPG14 pin switches the main camera's digital supply (Google's GPL zumapro camera device trees). Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Give both Tensor G4 PMICs a gpio regmap on ACPM access type 0x0c and a gpio cell, as the S2MPG13 has. The regmaps read the interrupt masks, the status and the per-pin SET registers and write only the SET registers; the clear-on-read interrupt registers stay out. The register layout is from Google's GPL s2mpg14-register.h and s2mpg15-register.h: six pins on the S2MPG14, ten on the S2MPG15 with their status in two registers. On the Pixel 9a these pins switch the camera power. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Tensor G4's PMICs have the S2MPG13's pin control registers, with the same output level and output enable bits, at other offsets: six pins on the S2MPG14 and ten on the S2MPG15, whose input levels take two status registers. Describe each chip's SET base, status register and pin count in match data, and take it from the platform id when the device has no OF node. On the Pixel 9a the S2MPG15's pins enable the camera buck-boost, select the camera PMIC and enable the cameras' 1.35 V supply, and an S2MPG14 pin switches the main camera's digital supply. Run there with the integration tree: the sub-PMIC's ten SET registers read 0x40 (output, low) at hand-off, and all three cameras power up through these pins. Register layouts from Google's GPL s2mpg14 and s2mpg15 register headers. The S2MPG13's registers and bits are unchanged: its match data is the old constants (set_base S2MPG13_GPIO_0_SET, status S2MPG13_GPIO_STATUS, ngpio S2MPG13_GPIO_NUM), and with eight pins `status + offset / 8` and `BIT(offset % 8)` are the old status register and bit. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Tensor G4's ISP front end, which holds the camera receiver links and the MIPI DC-PHY slaves, has a system register block of its own. The DC-PHY driver releases each slave's reset through it (offset 0x500, one bit per slave), as gs201's does through the CSIS sysreg. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Add the ISP front end's camera receiver: its system registers, the MIPI DC-PHY with its nine slaves, and receiver links 0, 1 and 6, the ones the Pixel 9a's main, ultrawide and front cameras use. Each link has its own registers and interrupt and shares the CSIS core, through which frames reach memory; it streams with the INT DVFS domain and the ISP-FE NOC clock raised. The bootloader leaves the ISP front end powered and its gates on, and nothing describes its power domain or CMU yet. Everything stays disabled; a board enables what it wires. Addresses, interrupts and the slave reset bits from Google's GPL zuma device trees (zuma-isp.dtsi) and isp_fe.h, checked on the 9a, where all three links have streamed. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Describe the Pixel 9a's camera supplies as stock's board description has them: the RT6160 buck-boost (PP3200_CAM_BB) and the SLG51002 camera PMIC on hsi2c4, enabled and selected by the S2MPG15's GPIO 1 and 0; the 1.35 V rail on the S2MPG15's GPIO 2; the sensors' shared 1.8 V on S2MPG15 LDO12S; and the main camera's digital supply, a switch on the S2MPG14's GPIO 0. This adds the sub-PMIC and both PMICs' GPIO blocks. Nothing is always on: every rail stays off until a sensor driver powers its camera. Run on the 9a with the integration tree, where all three sensors power up and stream through these supplies. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Describe the Pixel 9a's three cameras and wire them to their receiver links: the main camera, a Samsung GN8, on hsi2c5 and three C-PHY trios into link 0; the ultrawide, a Sony IMX712, on hsi2c2 and four D-PHY lanes into link 1; and the front camera, a second IMX712, on hsi2c3 and four lanes into link 6. Each sensor has its own master clock from CMU_TOP, its reset line and its supplies in stock's power-up order. Buses, pins, pulls, resets, master clock outputs and supplies follow stock's board description and Google's GPL zuma-tegu-camera.dtsi and zumapro-pinctrl.dtsi. The sensor modes and the DC-PHY receive settings aren't public: they are data files taken from the owner's own phone. All three cameras stream on the 9a through libcamera with these nodes. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
8762e32 to
6d0a35e
Compare
|
Rebased onto today's |
|
Thank you, @W4HO-ham. The rebase looks right: 26 commits with no merges, the first 18 identical to #63 and #103, and your own eight unchanged apart from context and the What it waits for is on my side: the 7 Pro camera capture for #63 and #103, which I promised on 10-28 and haven't done yet. Those two change cheetah's camera receiver, DC-PHY and IMX386 objects, so they merge after that run, and then this one. Your Before it comes out of draft, could you boot this head once? The cameras' GPIO child and LDO12S now share the sub-PMIC with the AoC's rails, which no boot has run yet. |
This describes the 9a's cameras in the device tree, so they come up from a published kernel with no runtime overlays and no out-of-tree modules. It sits on #161 (charger, on #119, on #96) and merges #101 (S2MPG15, for LDO12S) and #103 (which contains #63, the gs201-csis zumapro path and the DC-PHY receiver). Both merges were clean. On top:
phy_power_on()failed with -EIO ("phy poweron failed --> -5") and no buffer could be queued.Every node, address, IRQ, supply, voltage and pin comes from the integration DT, where all three cameras streamed on 10-27. The changes beyond that are layout only: SoC nodes moved into zumapro.dtsi, and pin groups renamed. One difference, now tested: the published tree runs the camera power chips' bus at 100 kHz (for the torch), where the integration tree ran 390 kHz; the boot of this head ran
hsi2c4at 100 kHz and all three cameras streamed.Tested on the palmtop today, head 4023f58. The kernel was defconfig + omarchy-mobile's fragment with omarchy-mobile#227 and
CONFIG_REGULATOR_RT6160=m, thenolddefconfig;uname -rwas7.3.0-rc6-omamobile-push1-g4023f585ccae. The modules loaded from the device tree with nothing by hand:gpio_s2mpg13 rt6160_regulator slg51002_regulator phy_gs201_mipi_dcphy_rx gs201_csis imx386 s5kgn1./dev/media0-2and/dev/video0-2appeared.cam -l(libcamera's simple pipeline) listed:cam -c N -s width=1280,height=960 --capture=3captured 4915200-byte frames from each: the main camera at about 19 fps, the ultrawide and the front at about 30 fps. On the ultrawide, csis reported 8 frame starts, 7 frame ends, 6 WDMA done with 0 errors, and 0 AXI errors. There are 8 link errors (INT0 bit 3), one per frame, which the integration tree also showed; the frames are intact.Why draft: it carries #101 and #103, which are still in review, and the commits need the owner's sign-off.
dtbs_check(with a tolerant schema build, since dtschema 2026.04 crashes on the tree) shows 0 errors. W=1 builds of the DTB and the touched C files are clean.checkpatch --strictreports only the missing sign-off.2026-11-01 update (review round): the PMU commit (0x3ebc) is now the first commit, ahead of everything that adds or enables the receiver. The
gpio-s2mpg13message says the S2MPG13's registers and bits are unchanged, and its header comment is rewrapped under 80 columns. The tree is identical to the booted head apart from that comment.