Skip to content

arm64: dts: exynos: google: zumapro-tegu: Add the fuel gauge and USB-C port controller - #119

Closed
W4HO-ham wants to merge 1 commit into
derekross:omamobilefrom
W4HO-ham:tegu-dt-gauge-tcpc
Closed

W4HO-ham wants to merge 1 commit into
derekross:omamobilefrom
W4HO-ham:tegu-dt-gauge-tcpc

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

Draft, stacked on #106 (the DT stack through ramoops); only the last commit is new. It needs a palmtop boot in this form before review: the palmtop runs both devices today, but its bring-up enables the bus at runtime rather than in the board DT, so this exact DT hasn't booted yet.

The 9a's MAX77779 sits on hsi2c6 (USI6, pins gpp12-0/1, 950 kHz as stock). Two of its parts have upstream drivers:

gpa8 becomes an interrupt controller with its four EINT SPIs (44-47), as gpa7 did for NFC in #105.

Checks: checkpatch --strict clean; on today's omamobile with the stack, zumapro-tegu.dtb builds and CHECK_DTBS reports nothing.

On the palmtop: the same nodes and values have run since rounds tc1 (TCPC: a PD contract, replug back in 1 s) and the gauge rounds. This draft moves them into the board DT and enables USI6 and hsi2c6 there. I'll boot it as a DTB-only round on the integration kernel and post the result before asking for review.

@derekross

Copy link
Copy Markdown
Owner

Thank you, and agreed: one boot in this exact form first. Two notes from reading it now so they're fixed in the same push. I checked gpa8's SPIs 44-47 against stock's IRQ_ALIVE_EINT34-37, and they match.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Booted in this form on the palmtop (round gt1: the integration kernel 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, with USI6, hsi2c6 and the fuel gauge enabled in the DT itself as this PR has them, not at runtime). Results:

  • /proc/device-tree/.../usi@108d00c0/status: okay. Both clients bound: 24-0025 (TCPC) and 24-0036 (gauge).
  • Gauge: max77779-battery 24-0036 probes and reads (capacity 56 %, 4.049 V, +1.21 A charging).
  • USB-C: tcpm-source-psy online with a PD contract (usb_type C [PD] PD_PPS ...); typec has port0 and its partner with usb_power_delivery.
  • USB gadget: configured. The port stayed a peripheral, as intended, with no role link yet.
  • No duplicate-device or probe-conflict messages. The one kernel warning in the log is brcmutil's chanspec decode (Wi-Fi, out of tree), unrelated to these nodes.

@W4HO-ham
W4HO-ham marked this pull request as ready for review October 28, 2026 16:14
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Both fixed in 0ea9c70: the &hsi2c6 block now sits above the haptics comment, so that comment is back over &hsi2c9, and the stray blank lines are gone with #105's fix. Rebased on #106, and the DT builds with W=1. Only the layout changed, not a node, so the gt1 result above still holds.

@derekross

Copy link
Copy Markdown
Owner

Thanks, both done in 0ea9c70f57c2: the MAX77779 block sits above the haptics comment, and the stray lines are gone. The 9a's DTB builds without warnings at this commit, and with the stack rebased onto today's omamobile it validates with no messages. The gt1 run covers this form of the nodes, and both drivers are on omamobile.

It sits on #106, so it lands after #106's layout question is settled (or after you move #106 to the top). It also needs the Makefile rebase described on #80.

@derekross

Copy link
Copy Markdown
Owner

Unchanged and still merge-ready in content; it waits on the stack below it. The status is in my note on #105.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Rebased onto #106's new head (one commit, unchanged). Compiles; checkpatch clean.

@derekross

Copy link
Copy Markdown
Owner

Unchanged and still ready. To keep the NFC clock rework from holding it, could you rebase it onto #96 instead of #105? There's one small context conflict next to &hsi2c9. #136 follows it.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Re-stacked onto #96 instead of #105, as asked: one commit of its own now. The context conflict next to &hsi2c9 was the NFC controller's &gpa7 block riding along as context from #105; I kept only this branch's &gpa8 (the USB-C port controller's interrupt) and left &gpa7 to #105. Device tree compiles, checkpatch clean.

W4HO-ham added a commit to W4HO-ham/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
…DT stack

The gs201 Trusty, GSA and AoC drivers and bindings, on top of derekross#96 and derekross#119 (6bbb335).

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks, @W4HO-ham, for re-stacking it onto #96 so quickly. Your own commit's added and removed lines are identical to the version I checked before, so only the context moved. Dropping the &gpa7 block and leaving it to #105 was the right call. The gate passes merged onto today's omamobile (sign-offs, checkpatch with no warnings, eight device trees with no new warnings), the 9a's DTB validates with no messages, and CI is green.

It's ready, and it lands right after #96. Once #96 is merged, a git rebase omamobile leaves just this commit.

One thing to know for the rebase: this PR and #105 add neighbouring blocks, so whichever of the two goes in second gets a small context conflict next to &gpa6. The resolution keeps both blocks, &gpa7 first:

/* The NFC controller's interrupt (gpa7-5). */
&gpa7 {
	interrupt-controller;
	#interrupt-cells = <2>;
	interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
};

/* The USB-C port controller's interrupt (gpa8-3). */
&gpa8 {
	interrupt-controller;
	#interrupt-cells = <2>;
	interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
		     <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
};

I built the 9a's DTB with this PR, #136, #105 and #122 combined that way. It compiles and passes dt-validate with no messages. #136 follows this one.

…C port controller

The Pixel 9a's MAX77779 sits on hsi2c6 (USI6, pins gpp12-0/1, 950 kHz as
stock): its fuel gauge at 0x36 with the board's 2 mOhm shunt, and its
USB-C port controller at 0x25, interrupting on gpa8-3 (active low, as
stock's max77759tcpc@25). The port is described as a sink with a dual
data role and is not linked to the USB controller's role switch yet:
the USB controller stays a peripheral, as today.

gpa8 becomes an interrupt controller with its four EINT SPIs (44-47).

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto today's omamobile (with #96), as you laid out on #96. The rebase dropped #96's commits on its own, and each one was clean:

No content changed, only the base. #104 stays as it is, since it merges onto the base unchanged. For the &gpa7/&gpa8 context conflict between #105 and #119, I'll take your hunk on whichever lands second.

@derekross

Copy link
Copy Markdown
Owner

This landed with #161, which carries the same commit (the same patch and tree as this head, 810c4d3e9315). Closing it as merged through #161. Thank you, @W4HO-ham.

@derekross derekross closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants