Commit eb5f0ff
clocks: add V4A family (CV500 / AV300) — 4 PLLs + HPM
Adds a `clocks_family_v4a` table covering Hi3516CV500 / Hi3516AV300 /
Hi3516DV300 etc. (chip_generation = HISI_V4A = 0x3516C500).
Register map sourced first-party from the V4A mask-ROM reverse
engineering at widgetii/HI3516CV500-SDK sdk/bootrom/bootrom-re/
regmap-crg.h (CRG offsets) and the V4A SDK
HI3516CV500-SDK/sdk/fastburn/fastboot/Source/ddr_training.c (HPM
register addresses + bit layout).
Decoded on V4A:
- APLL/DPLL/EPLL/VPLL register pairs at (CRG+0x00..0x1C). All four use
the same Hi3516A APLL bit layout (FBDIV at ctrl_reg2[11:0], REFDIV
at ctrl_reg2[17:12], POSTDIV1/POSTDIV2 at ctrl_reg1[26:24]/[30:28]),
unlike V4 where DPLL/EPLL had a different (still-unverified) layout.
- Per-PLL lock state from PERI_CRG_PLL122 (CRG+0x1E8). APLL=bit0,
DPLL=bit1, EPLL=bit3 (V4A bootrom RE polls `& 0xB == 0xB`); bit 2
inferred as VPLL since the field board reads 0x0F (all four locked).
- HPM characterization at HPM_CHECK_REG = 0x12020098 (SC_CTRL region,
not CRG): sys_hpm_core at bits [24:16] is 9-bit on V4A (vs 10-bit on
V4), and the aux fingerprint moves to HPM_CORE_REG0 = 0x120300D8 in
the MISC region. Same 150-350 validity window, same 190-310 nominal
binning range as V4.
Not yet decoded on V4A (kept out per "decypher or remove" rule from
PR #163):
- DDR cksel mux. PERI_CRG31 at 0x7C reads non-zero on hi3516av300 but
the bit positions for the cksel field aren't in the bootrom RE and
the V4A SDK clock driver doesn't expose DDR as a tunable Linux
clock. Skip until a board with known DDR rate anchors it. Brief
survey on V4A therefore omits `ddr.data_rate_mbps` -- it falls back
to `cpu_pll.freq_mhz + hpm.bin`.
Also tightens the brief-mode emit: only the first PLL (by convention
the CPU/APLL) is shown in the survey output. DPLL/EPLL/VPLL on V4A
are detail and only appear in the full `ipctool clocks` output. The
V4 brief output is unchanged (V4 only has one PLL entry anyway).
Verified on openipc-hi3516av300.dlab.doty.ru (dual-core Cortex-A7,
SMP, Linux 4.9.37):
- brief: cpu_pll.freq_mhz=900, hpm.bin=mid (5 lines after `clocks:`)
- full: APLL=900 / DPLL=594 / EPLL=528 / VPLL=552 MHz, all locked;
HPM value=260 (mid bin), aux_value=0x81090109
- cpubench median 899 MHz (within 0.1% of register-decoded APLL,
triangulated from dep_add/indep_add/dep_mul)
V4 boards re-verified: hi3516ev300 OpenIPC + gk7205v300 OpenIPC both
still produce the 8-line brief block they did in #163.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f7a640e commit eb5f0ff
3 files changed
Lines changed: 118 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
271 | 273 | | |
272 | 274 | | |
273 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
0 commit comments