Skip to content
Closed
234 changes: 234 additions & 0 deletions device/husky/BATTERY-NOTES.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions device/husky/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Status words as in DEVICES.md. "9a" is the Pixel 9a (`tegu`) work. "Needs" lists
| USB net | testing | Brett (per his comments on #1) | done | USB host and Type-C are in Charging | none |
| Wi-Fi | testing | [Brett](https://github.com/greenbrettmichael) | done | [#156](https://github.com/derekross/linux-omarchy-mobile/pull/156) (draft): zuma's PCIe PHY and the BCM4398 (NCI backplane) in brcmfmac, stacked on #153, #143 (BCM4389) and #56 (API9), which have to land first; firmware from the owner's image with [#214](https://github.com/derekross/omarchy-mobile/pull/214). Open: P2P, recovery after a firmware crash, joining 5 GHz ([NOTES](NOTES.md)) | Test #156 on a second phone: `tools/extract-vendor-firmware -d husky -s <SKU>`, then check the scan and a join |
| Bluetooth | no | unassigned | 9a [#122](https://github.com/derekross/linux-omarchy-mobile/pull/122) (open); cheetah [BLUETOOTH-PLAN](../cheetah/BLUETOOTH-PLAN.md) | The controller is probably the combo chip that does Wi-Fi [I]; its UART, power and wake lines [I: not known to me] | Find the Bluetooth node in Google's tree; write `BLUETOOTH-PLAN.md` |
| Battery | no | Lef | cheetah [POWER-PLAN](../cheetah/POWER-PLAN.md), [WIFI-BATTERY-PLAN](../cheetah/WIFI-BATTERY-PLAN.md); `gs201-cheetah.dts` has the same chip family. The 9a's [#119](https://github.com/derekross/linux-omarchy-mobile/pull/119) is the MAX77779 and does not apply as is | Stock overlay [V, same source as Display]: fuel gauge `maxim,max77759` @0x36, charger `max77759chrg` @0x69, Type-C `max77759tcpc` @0x25 and `max77729pmic` @0x66, all on `hsi2c_11`; also `nxp,pca9468` and the wireless charger `idt,p9412`. Zuma has no clock controller for that I2C block yet (CMU_PERIC, not in `clk-zuma.c`) and no I2C or USI nodes [V]. `tools/phone-smoke` reports "no battery power supply" [V] | Derive the PERIC clocks from Google's cmucal tables, add the I2C nodes, then probe the gauge read-only. **Do not poke the PMIC from userspace** (AGENTS.md §1) |
| Charging, USB-C | no | Lef | cheetah [USB-C-PLAN](../cheetah/USB-C-PLAN.md); 9a: [#97](https://github.com/derekross/linux-omarchy-mobile/pull/97) is `tcpci_maxim` for the MAX77779 (merged), so check what husky's MAX77759 needs [I] | Same I2C bus as Battery; the USB data switch closes on unplug (AGENTS.md gotcha) | As Battery |
| Battery | testing (bus, gauge and MFD on kernel #163; the gauge's model through an overlay) | Lef | cheetah [POWER-PLAN](../cheetah/POWER-PLAN.md), [WIFI-BATTERY-PLAN](../cheetah/WIFI-BATTERY-PLAN.md); `gs201-cheetah.dts` has the same chip family. The 9a's [#119](https://github.com/derekross/linux-omarchy-mobile/pull/119) is the MAX77779 and does not apply as is | Stock overlay [V, same source as Display]: fuel gauge `maxim,max77759` @0x36, charger `max77759chrg` @0x69, Type-C `max77759tcpc` @0x25 and `max77729pmic` @0x66, all on `hsi2c_11`; also `nxp,pca9468` and the wireless charger `idt,p9412`. Zuma had no clock controller for that I2C block (CMU_PERIC, not in `clk-zuma.c`), no I2C or USI nodes, and `tools/phone-smoke` reported "no battery power supply" [V, until kernel #163] | Done on one phone, see [BATTERY-NOTES](BATTERY-NOTES.md): the PERIC1 clocks and the I2C nodes are kernel #163, the gauge works with Google's model loaded by an overlay. The pack ID is read (section 5.6: ATL). Next: the model, from the board file or the pack ID at runtime. **No hand writes to the PMIC or the gauge outside a reviewed tool** (AGENTS.md §1; the notes list the ones made, and why) |
| Charging, USB-C | testing (the MAX77759 charger driver in guarded runs; no USB-C yet) | Lef | cheetah [USB-C-PLAN](../cheetah/USB-C-PLAN.md); 9a: [#97](https://github.com/derekross/linux-omarchy-mobile/pull/97) is `tcpci_maxim` for the MAX77779 (merged), so check what husky's MAX77759 needs [I] | Same I2C bus as Battery; the USB data switch closes on unplug (AGENTS.md gotcha) | The charger ran under the dead-man tool at 500 and 900 mA and on a wall charger (slow net charging, plain 5 V), see [BATTERY-NOTES](BATTERY-NOTES.md). USB-C (`tcpci_maxim`) is not started; the replug rescue in the device package keeps the USB link until it is |
| Haptics, Torch | no | unassigned | 9a [#96](https://github.com/derekross/linux-omarchy-mobile/pull/96) (CS40L26 and LM3644, open); cheetah [HAPTICS-TORCH-PLAN](../cheetah/HAPTICS-TORCH-PLAN.md) | The parts on husky [I: not known to me] | Find them in Google's tree |
| GNSS | no | unassigned | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | Google's userspace in a chroot built from the owner's own factory image; the regulator rule (PMIC modules must load after about 30 s of late init) | After the display and battery rows |
| AoC, Speakers/mics, Sensors | no | unassigned | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [AUDIO-PLAN](../cheetah/AUDIO-PLAN.md); 9a WIP | The AoC starts only through Trusty; the amplifiers need the speaker-protection calibration; high risk (AGENTS.md gotchas) | Read AOC-PLAN to size it |
Expand Down
16 changes: 16 additions & 0 deletions device/husky/overlays/battery-clk-test.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up probe, never default (BATTERY-NOTES.md M2b): only CMU_PERIC1 and its
* sysreg, with USI11 and the bus still off. Read clk_summary afterwards;
* nothing consumes the USI11 gates yet.
*/
/dts-v1/;
/plugin/;

&cmu_peric1 {
status = "okay";
};

&sysreg_peric1 {
status = "okay";
};
26 changes: 26 additions & 0 deletions device/husky/overlays/battery-i2c-test.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up probe, never default (BATTERY-NOTES.md M3): switches on CMU_PERIC1,
* its sysreg, USI11 and hsi2c_11, the bus of the MAX77759 gauge, charger,
* Type-C controller and PMIC. The charger and Type-C drivers are blacklisted by the husky package
* (omamobile-max77759.conf), so nothing talks to those chips until a step
* loads them by hand. The Type-C controller node stays disabled in the board file.
*/
/dts-v1/;
/plugin/;

&cmu_peric1 {
status = "okay";
};

&sysreg_peric1 {
status = "okay";
};

&usi11 {
status = "okay";
};

&hsi2c_11 {
status = "okay";
};
32 changes: 32 additions & 0 deletions device/husky/overlays/gauge-model-atl.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up overlay, never default (BATTERY-NOTES.md M4c and 5.6): load Google's
* ModelGauge m5 model "atl-a1-1k" into the husky fuel gauge. The node is picked by the
* pack's ID, byte 0x17 of its EEPROM: 0 default-a1-0k (what Google falls back to for
* an unknown pack), 1 atl-a1-1k, 2 cos-a1-2k, 3 lsn-a1-3k. Generated from the husky
* stock overlay by tools/gen-gauge-overlay.py: maxim,fg-model = the 24 stock u32 cells
* split into 48 u16 (high half first), maxim,fg-params = the stock byte list as
* big-endian u16 words, in the order of struct max77759_fg_params. The driver loads it
* only while the gauge reports power-on reset (Status bit 1), then clears that bit.
*/
/dts-v1/;
/plugin/;

&hsi2c_11 {
fuel-gauge@36 {
maxim,fg-model = /bits/ 16 <
0xa500 0xb790 0xb920 0xba60 0xbc70 0xbe00 0xbea0 0xc0b0
0xc270 0xc5d0 0xc930 0xcc40 0xcf40 0xd340 0xd6b0 0xde40
0x01e0 0x0b00 0x0d00 0x1310 0x1710 0x1410 0x0f00 0x0b00
0x0910 0x0810 0x07b0 0x07e0 0x05b0 0x07f0 0x04f0 0x04f0
0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
>;
maxim,fg-params = /bits/ 16 <
0xf060 0x1439 0x260e 0x4217 0x0090 0x5f00 0x09cf 0x09cf
0x3200 0x0273 0x09cf 0xa561 0x2400 0x0f80 0x0580 0x0480
0x03b0 0x1402 0x0630 0xed51 0x1eba 0x0014 0x6070 0x1900
0x2241 0x0613 0x2d00
>;
};
};
32 changes: 32 additions & 0 deletions device/husky/overlays/gauge-model.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up overlay, never default (BATTERY-NOTES.md M4c and 5.6): load Google's
* ModelGauge m5 model "default-a1-0k" into the husky fuel gauge. The node is picked by the
* pack's ID, byte 0x17 of its EEPROM: 0 default-a1-0k (what Google falls back to for
* an unknown pack), 1 atl-a1-1k, 2 cos-a1-2k, 3 lsn-a1-3k. Generated from the husky
* stock overlay by tools/gen-gauge-overlay.py: maxim,fg-model = the 24 stock u32 cells
* split into 48 u16 (high half first), maxim,fg-params = the stock byte list as
* big-endian u16 words, in the order of struct max77759_fg_params. The driver loads it
* only while the gauge reports power-on reset (Status bit 1), then clears that bit.
*/
/dts-v1/;
/plugin/;

&hsi2c_11 {
fuel-gauge@36 {
maxim,fg-model = /bits/ 16 <
0x9760 0xa510 0xb100 0xb600 0xb7a0 0xb900 0xba70 0xbc70
0xbde0 0xbfc0 0xc250 0xc510 0xc990 0xcea0 0xd040 0xd750
0x0060 0x0120 0x0200 0x0710 0x0e80 0x0df0 0x1430 0x1bd0
0x1520 0x0d70 0x0950 0x08e0 0x0800 0x0780 0x06b0 0x01e0
0x0100 0x0100 0x0100 0x0100 0x0100 0x0100 0x0100 0x0100
0x0100 0x0100 0x0100 0x0100 0x0100 0x0100 0x0100 0x0100
>;
maxim,fg-params = /bits/ 16 <
0xf060 0x2038 0x260e 0x4217 0x0090 0x5f00 0x0994 0x0994
0x0c80 0x0099 0x0994 0xa561 0x1100 0x0800 0x0301 0x0302
0x0700 0x223e 0x0310 0xed51 0x1eba 0x0014 0x3870 0x0000
0x2241 0xc623 0x2d00
>;
};
};
27 changes: 27 additions & 0 deletions device/husky/overlays/pack-eeprom-test.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up probe, never default (BATTERY-NOTES.md, the pack ID): switches on
* USI9 and hsi2c_9, the bus of the battery pack's EEPROM, whose byte 0x17 is
* the battery ID that picks the fuel gauge model. CMU_PERIC1 and its sysreg are
* on already when battery-i2c-test is loaded; repeating them is harmless. The
* EEPROM node itself is in the board file (read-only). Needs the kernel with
* the USI9 clock path.
*/
/dts-v1/;
/plugin/;

&cmu_peric1 {
status = "okay";
};

&sysreg_peric1 {
status = "okay";
};

&usi9 {
status = "okay";
};

&hsi2c_9 {
status = "okay";
};
Loading