Repository navigation
hisi: give gk7205v500/v510/v530 their own pad table - #229
Conversation
The V500-family chips were handed EV200regs. They share ev200's iocfg addresses but not its selectors, so ipctool reginfo named the wrong functions on them, and a consumer asking for a PWM pad (majestic's PWM backlight) found none past PWM3: the IR lamps of a GK7205V510 PTZ camera sit on PWM8 and PWM9, which the ev200 table calls LCD_DATA4 and "reserved". V500regs is generated from XMedia's PIN_OUT_V510.xlsx: sheet 1 gives each pin's function numbers, which are the selector values, and sheet 3 the register addresses. PIN_OUT_V530.xlsx agrees on all 93 rows but one, where it adds FMC_STARTUP_DISABLE as selector 2 of UART0_TXD, and that is merged in. The QFN V330/V230 pin-outs are strict subsets. iocfg_reg0-5 are the power-sequencing pins and have no selector. reginfo_test checks PWM8/PWM9/PWM11 resolve to the right pads and selectors, that pad 56 no longer offers LCD_DATA4, and V510 joins the table-integrity sweep.
PR Summary by QodoUse a dedicated pad-mux table for GK7205V500-family chips
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
The V500 table carried the selector the V530 pin-out adds to UART0_TXD for all three chips, so on a V500 or V510 a caller could find FMC_STARTUP_DISABLE and have ipchw_padmux_set() write selector 2 to the console's TX pad, a value the V510 sheet does not list. V530regs now differs from V500regs in that one row, picked by chip name; the other rows stay shared through two macros rather than a second copy of the list. reginfo_test: a 7205V510 offers no FMC_STARTUP_DISABLE, a 7205V530 offers it at selector 2 and still resolves PWM8, and V530 joins the integrity sweep.
clang-format read the trailing comma inside V500_REGS_HEAD as an expression and rendered the next element as "V500_REGS_HEAD & V500_iocfg_reg86", which compiles to the right thing and reads as a bitwise AND.
Problem
The gk7205v500 family (GK7205V500/V510/V530, XMedia XM720xxx) was handed
EV200regs. It shares ev200's iocfg register addresses but not its selectors, so on these chips:ipctool reginfonames the wrong function for many pads;ipchw_padmux_by_func()finds no PWM pad past PWM3. On a Zenointel SD-2N-4G (GK7205V510) the two IR lamps sit on PWM8 (pad GPIO56) and PWM9 (pad GPIO55), which the ev200 table callsLCD_DATA4and "reserved". majestic's PWM backlight asks this table which pad carries a channel, so it could not drive either lamp.Change
A
V500regstable, selected forIS_7205V500:PIN_OUT_V510.xlsx. Sheet 1 gives each pin's function numbers, which are the selector values; sheet 3 gives the register addresses.PIN_OUT_V530.xlsxagrees on all 93 rows but one, where it addsFMC_STARTUP_DISABLEas selector 2 ofUART0_TXD; that is merged in. The QFN V330/V230 pin-outs are strict subsets.gen_padmux_names.py --checkpasses.Tests
reginfo_test: PWM8, PWM9 and PWM11 resolve to the right pads and selectors, and pad 56 no longer offersLCD_DATA4.Verified on hardware
On a GK7205V510, majestic built against this table finds PWM8 on pad 56 (selector 5) and PWM9 on pad 55 (selector 2). It muxes both and drives both lamps at the same duty: both channels latch the same high time, and the lamps draw about 3 W each.