Skip to content

spi: adi_spi3: remove spurious 500 kHz controller speed cap - #108

Open
jiez wants to merge 1 commit into
adi-u-boot-2025.10.yfrom
adsp-sc5xx-spi-speed
Open

spi: adi_spi3: remove spurious 500 kHz controller speed cap#108
jiez wants to merge 1 commit into
adi-u-boot-2025.10.yfrom
adsp-sc5xx-spi-speed

Conversation

@jiez

@jiez jiez commented Jun 24, 2026

Copy link
Copy Markdown

The driver reads spi-max-frequency from the controller DT node as a cap applied in set_speed(). Upstream Linux DTS places spi-max-frequency only on child device nodes (the flash), not on the controller node, so the driver fell back to the 500 kHz default — throttling every transfer to 1/20th of the intended speed.

The Linux adi SPI driver (spi-adi.c) never reads spi-max-frequency from the controller node at all; speed comes entirely from the per-transfer speed_hz. Default to U32_MAX so that when the controller node has no cap, the per-device spi-max-frequency governs without interference.

The driver reads spi-max-frequency from the controller DT node as a cap
applied in set_speed(). Upstream Linux DTS places spi-max-frequency only
on child device nodes (the flash), not on the controller node, so the
driver fell back to the 500 kHz default — throttling every transfer to
1/20th of the intended speed.

The Linux adi SPI driver (spi-adi.c) never reads spi-max-frequency from
the controller node at all; speed comes entirely from the per-transfer
speed_hz. Default to U32_MAX so that when the controller node has no
cap, the per-device spi-max-frequency governs without interference.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
@jiez
jiez requested review from a team June 24, 2026 18:25
@jiez jiez self-assigned this Jun 24, 2026
@jiez jiez added this to ADSP Jun 24, 2026
@pamolloy pamolloy moved this to In Development in ADSP Jun 26, 2026
Comment thread drivers/spi/adi_spi3.c
fdt_addr_t addr;

plat->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 500000);
plat->max_hz = dev_read_u32_default(bus, "spi-max-frequency", U32_MAX);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why parse this meaningless property at all? Why not just drop it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Development

Development

Successfully merging this pull request may close these issues.

3 participants