The PI7C9X7952 uses different channel base offsets in its two access maps. In I/O mode, Diodes places UART1 at BAR0 plus 008h and UART0 at BAR0 plus 000h. In memory mode, UART1 is BAR1 plus 0200h and UART0 is BAR1 plus 0000h. Do not carry the I/O mode's eight-byte channel stride into the memory map. A reference oscillator running normally and a port appearing in the operating system do not establish that the driver is accessing the intended channel.
Select the Resource Before Adding Two Offsets
Take the Line Status Register at the channel-relative offset 05h. For UART1, I/O mode adds 008h and then 05h, giving offset 00Dh relative to the BAR0 resource. Memory mode adds 0200h and then 05h, giving 0205h relative to the BAR1 resource. Those are offsets inside their respective resources, not standalone physical addresses. Use the resource mapped by the host driver; distinguish the raw PCI configuration value carrying resource attributes from the mapped resource and the displayed offset.
Keep the resource type, channel and local register offset separate in the implementation. Switching BARs while retaining a channel multiplier of eight does not reach UART1 in memory mode even if the arithmetic is accepted. UART0 begins at zero in both maps, so testing only the first port can miss the error. Also verify which physical port corresponds to each software label; a screen label such as “port one” may not mean silicon UART1.
Check Both Channels Individually
On an isolated bench board, give the channels distinguishable input and preserve the actual resource, offset, channel identity and resulting status for each approved access. Use documented readable registers, taking account of side effects, instead of sweeping the entire space to see what responds. When only one channel works, compare the trace against both manufacturer maps before attributing the problem to cabling, power, reset or baud. A plausible returned byte alone does not identify the channel.
Related selection guide: MERLIN Crystal Timing: Why keep a 2 kΩ pull-up on XTLO when a Diodes PI7C9X7952 uses an external oscillator?
Resource link: https://www.mecxtal.com.cn/en/handbook/dio-053.html
