From 7e09e4a7cf42757403908de86029a834a690a486 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Wed, 28 Oct 2026 17:06:04 -0647 Subject: [PATCH 1/4] device/tegu: USB-C host mode through TCPM, and the 10-28 evening findings --- device/tegu/NOTES.md | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 31ad87f8e..2620a8fba 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -13,6 +13,53 @@ hash/build ID; this dirty release is not a published kernel package. `[V]` marks verified observations; `[I]` marks an inference still to test. Raw captures, recordings, backups and vendor files remain off repository. +## 2026-10-28, evening: USB-C host mode through TCPM + +Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty` (the +integration tree), DTB with the TCPC as a dual-role port. + +- **USB-C host mode works end to end** [V]. TCPM runs the port as dual-role + (try sink, source PDO 5 V 900 mA), with `vbus-supply` = the MAX77779 + charger's `chgin-otg` regulator (kernel #124) over the RT9470's OTG boost, + and a graph to dwc3's role switch. A USB flash drive attaches as source + (SRC_READY), VBUS holds at 5.2 V, the data role goes to host, and the + drive enumerates at high speed (`sde: sde1 sde2`). With the drive out and + the laptop back: sink, a PD contract, the gadget configured. Again after a + fresh boot. +- **Why VBUS collapsed at first** [V]: the RT9470's JEITA temperature + control (0x0c bit 7) was on and read hot (STAT2 0x80), and its I2C + watchdog (0x01 bits 1:0) had expired (STAT3 0x20). With either set, the + boost reported OTG (ICSTAT 0x0f) while VBUS fell from 5.2 V within ~60 ms, + and TCPM retried every second. Google's `rt9471_charger` turns JEITA off + on the 9a (`en-jeita` is unset in `zumapro-buck-charge-rt9471.dtsi`) and + only runs the watchdog while it kicks it. With both off, VBUS holds under + Rd and Rp, with and without AutoDischargeDisconnect. The boost's driver + has to clear both. +- **The eUSB2 side** [V]: the PHY has to come out of reset with the device + attached. A drive plugged into a port that's already host isn't seen + (the TUSB2E11's attach-detect interrupt never latched). TCPM's flow + (attach on CC, then the role switch, then `phy-snps-eusb2` resetting the + PHY on the role change) does it in that order. +- **NFC after s2idle** [V]: the ST54L loses its NCI state across a + suspend. The first command after resume gets no I2C ACK (`NFC: Error -6 + on I2C send`), and every NCI request times out after it. Powering the + adapter off and on through neard (a fresh NCI init) brings it back, so + the sleep hook has to power the adapter off before the sleep and on + after it, not only stop polling. +- **Fingerprint calibration** [V]: the HAL injects it itself + (`injectMtCali`), reading a 112-byte header at offset 0 of + `/dev/block/by-name/mfg_data`. The file `fastboot oem udfps get-cal-url` + names has exactly that layout (magic `0xca11ca11`, version 1, and the + payload length at 0x6c). Written into the chroot's private `mfg_data.img` + copy (the partition itself untouched), it's accepted: + `vendor.gf.cali.state = 1`, and the "No SA calibration present" line is + gone. Enrollment is next. +- **GNSS** [V]: telling the AoC the GNSS type (`gnss-type = <2>`, as + Google's `zumapro-phone-ignss.dtsi`) doesn't change the fault. Kepler + loads and goes OPERATIONAL, and the HAL starts a session, but every engine + start still ends in "KEP M7 HARDFAULT ... LR,PC 600B5B39 0000062C" + (20 in 4 minutes). + ## 2026-10-26: audio (speakers, microphones, A2DP) with omamobile-audio 0.5.0 Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`: the private From ba3a53137ed2ca776f7c3950f2e75a266af48bbf Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:09:16 -0647 Subject: [PATCH 2/4] device/tegu NOTES: name the unpublished host-mode parts, how the swaps were covered, and what is still unknown Points from review: the setup is in #136, the cable swaps were attended with per-script dead-man switches, JEITA reading hot is an inference, and the warm-reboot boost state and RT9470 charging are unmeasured. --- device/tegu/NOTES.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 2620a8fba..f3da6267b 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -25,16 +25,41 @@ integration tree), DTB with the TCPC as a dual-role port. (SRC_READY), VBUS holds at 5.2 V, the data role goes to host, and the drive enumerates at high speed (`sde: sde1 sde2`). With the drive out and the laptop back: sink, a PD contract, the gadget configured. Again after a - fresh boot. + fresh boot. Two parts of that setup aren't in a public tree yet: the DT + fragment (the TCPC as dual-role with `vbus-supply`, the graph to dwc3) and + the RT9470 bring-up module that writes OTG_EN, JEITA_EN and the watchdog + bits. Both are in #136, as they ran, with a runbook. This supersedes + #100's "the eUSB2 repeater doesn't take the host role yet". +- **How the cable swaps were covered** [V]: attended, with W4HO at the + palmtop for every swap. Taking the laptop out cuts the only link, so each + sampling script carried its own dead-man: with no USB gadget configured 6 + to 8 minutes after the cable came out, it unloaded `tcpci_maxim` and set + the role switch back to device, so the laptop would come back as a sink. + It never fired, because the laptop came back every time. The DTB boot + itself ran under a one-boot DTB dead-man. The next run uses a reboot + timer armed before the unplug and stopped over a fresh login (#136's + runbook). `tools/usbc-deadman` is written for the 7 Pro's MAX77759 and + doesn't apply here. - **Why VBUS collapsed at first** [V]: the RT9470's JEITA temperature - control (0x0c bit 7) was on and read hot (STAT2 0x80), and its I2C - watchdog (0x01 bits 1:0) had expired (STAT3 0x20). With either set, the + control (0x0c bit 7) was on with STAT2 reading 0x80, and its I2C + watchdog (0x01 bits 1:0) had expired (STAT3 0x20). That JEITA read "hot" + is an inference [I]: the TS pin may have no thermistor on it, which + hasn't been checked. With either set, the boost reported OTG (ICSTAT 0x0f) while VBUS fell from 5.2 V within ~60 ms, and TCPM retried every second. Google's `rt9471_charger` turns JEITA off on the 9a (`en-jeita` is unset in `zumapro-buck-charge-rt9471.dtsi`) and only runs the watchdog while it kicks it. With both off, VBUS holds under Rd and Rp, with and without AutoDischargeDisconnect. The boost's driver has to clear both. +- **What that leaves open** [I]: with the watchdog off, nothing turns the + boost off after a crash. What a warm reboot with host mode on leaves + behind (the RT9470's OTG bit and ICSTAT before any driver loads) hasn't + been measured, so whether VBUS stays out across one is unknown. With + JEITA off the RT9470 has no temperature cut-off of its own, which + matters only if it charges. Its CE comes from the MAX77779's sGPIO 7, + which hasn't been read. On the charger with the battery full, FUNCTION + read 0x41 (`CHG_EN` set) and ICSTAT 0xf1 (VBUS ready, not charging), so + whether it charges under our kernel isn't known yet. - **The eUSB2 side** [V]: the PHY has to come out of reset with the device attached. A drive plugged into a port that's already host isn't seen (the TUSB2E11's attach-detect interrupt never latched). TCPM's flow @@ -53,7 +78,8 @@ integration tree), DTB with the TCPC as a dual-role port. payload length at 0x6c). Written into the chroot's private `mfg_data.img` copy (the partition itself untouched), it's accepted: `vendor.gf.cali.state = 1`, and the "No SA calibration present" line is - gone. Enrollment is next. + gone. Later that evening enrollment completed, but matching doesn't work + yet (#135). - **GNSS** [V]: telling the AoC the GNSS type (`gnss-type = <2>`, as Google's `zumapro-phone-ignss.dtsi`) doesn't change the fault. Kepler loads and goes OPERATIONAL, and the HAL starts a session, but every engine From 217be872021fff5550480f459496706d9ca478d2 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Wed, 28 Oct 2026 20:15:48 -0647 Subject: [PATCH 3/4] device/tegu NOTES: the host-mode setup is on the kernel bring-up branch Review: name where the parts are (derekross/linux-omarchy-mobile#127) and where the plan is (#136). --- device/tegu/NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index f3da6267b..62ce35424 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -28,7 +28,7 @@ integration tree), DTB with the TCPC as a dual-role port. fresh boot. Two parts of that setup aren't in a public tree yet: the DT fragment (the TCPC as dual-role with `vbus-supply`, the graph to dwc3) and the RT9470 bring-up module that writes OTG_EN, JEITA_EN and the watchdog - bits. Both are in #136, as they ran, with a runbook. This supersedes + bits. They are on the kernel bring-up branch derekross/linux-omarchy-mobile#127, with the plan and runbook in #136. This supersedes #100's "the eUSB2 repeater doesn't take the host role yet". - **How the cable swaps were covered** [V]: attended, with W4HO at the palmtop for every swap. Taking the laptop out cuts the only link, so each From 648207168b25d790bff6b85060f274e088e8e984 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Thu, 29 Oct 2026 10:00:14 -0647 Subject: [PATCH 4/4] device/tegu NOTES: forward pointers for NFC and fingerprint, wrap the #127 line The 10-28 evening entry still says the sleep hook has to power the NFC adapter off, and that fingerprint matching doesn't work. Both are out of date: the ST54L's NFC mode (linux-omarchy-mobile#131, #137) makes the power-off hook unnecessary, and one try of such a hook failed to wake, and matching works since FINGERPRINT-PLAN F9/F10 (#138). Point forward from both bullets so nobody builds the hook from the old note, and wrap the sentence about #127 like the rest of the entry. --- device/tegu/NOTES.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 62ce35424..abdb4679a 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -28,8 +28,10 @@ integration tree), DTB with the TCPC as a dual-role port. fresh boot. Two parts of that setup aren't in a public tree yet: the DT fragment (the TCPC as dual-role with `vbus-supply`, the graph to dwc3) and the RT9470 bring-up module that writes OTG_EN, JEITA_EN and the watchdog - bits. They are on the kernel bring-up branch derekross/linux-omarchy-mobile#127, with the plan and runbook in #136. This supersedes - #100's "the eUSB2 repeater doesn't take the host role yet". + bits. They are on the kernel bring-up branch + derekross/linux-omarchy-mobile#127, with the plan and runbook in #136. + This supersedes #100's "the eUSB2 repeater doesn't take the host role + yet". - **How the cable swaps were covered** [V]: attended, with W4HO at the palmtop for every swap. Taking the laptop out cuts the only link, so each sampling script carried its own dead-man: with no USB gadget configured 6 @@ -70,7 +72,9 @@ integration tree), DTB with the TCPC as a dual-role port. on I2C send`), and every NCI request times out after it. Powering the adapter off and on through neard (a fresh NCI init) brings it back, so the sleep hook has to power the adapter off before the sleep and on - after it, not only stop polling. + after it, not only stop polling (10-29: not needed with + https://github.com/derekross/linux-omarchy-mobile/pull/131, and a + power-off hook failed to wake once; see #137). - **Fingerprint calibration** [V]: the HAL injects it itself (`injectMtCali`), reading a 112-byte header at offset 0 of `/dev/block/by-name/mfg_data`. The file `fastboot oem udfps get-cal-url` @@ -79,7 +83,7 @@ integration tree), DTB with the TCPC as a dual-role port. copy (the partition itself untouched), it's accepted: `vendor.gf.cali.state = 1`, and the "No SA calibration present" line is gone. Later that evening enrollment completed, but matching doesn't work - yet (#135). + yet (#135; 10-29: it does now, see FINGERPRINT-PLAN F9/F10 in #138). - **GNSS** [V]: telling the AoC the GNSS type (`gnss-type = <2>`, as Google's `zumapro-phone-ignss.dtsi`) doesn't change the fault. Kepler loads and goes OPERATIONAL, and the HAL starts a session, but every engine