Commit 5c1e856
committed
dts: comma: pin i2c bus numbers for openpilot via aliases
openpilot opens fixed i2c bus numbers: IMU on bus 1
(sensord.py I2C_BUS_IMU=1), touch on bus 2, power on bus 0.
Linux derives the adapter number from the DT aliases node
(of_alias_get_id), and upstream sdm845.dtsi ships identity
aliases (i2cN=&i2cN) — so the IMU node (i2c@890000 = i2c4)
would otherwise enumerate as bus 4 and sensord would fail.
Override the aliases so the three buses we use map to the
numbers openpilot expects, reassigning the displaced identity
aliases to the now-unused nodes so no two aliases target the
same node. Bus assignment matches the legacy agnos DTS
(se10=/dev/i2c-0, se4=IMU, se5=/dev/i2c-2).
Also enable i2c10 (a88000, the legacy /dev/i2c-0 power bus) so
bus 0 exists; it carries no devices on the comma four (no
ina231 — that is a comma-three part).
Verified on device (mainline 6.18.0-vamos): i2c-1 has the IMU
at 0x6a, i2c-2 has the ft3168 touch at 0x38, i2c-0 present.1 parent 76b9e81 commit 5c1e856
1 file changed
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
11 | 31 | | |
12 | 32 | | |
13 | 33 | | |
| |||
379 | 399 | | |
380 | 400 | | |
381 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
382 | 415 | | |
383 | 416 | | |
384 | 417 | | |
| |||
0 commit comments