arm: dts: hisilicon: hi3516dv300: register PL022 SSP controllers#38
Merged
widgetii merged 1 commit intoupstream-patchesfrom May 7, 2026
Merged
Conversation
Add spi_bus0/1/2 nodes for the three PL022-compatible SSP controllers at 0x120c0000/0x120c1000/0x120c2000. CONFIG_SPI_PL022 is already enabled in the cv500_neo / av300_neo kernel configs, but without DT nodes nothing instantiates the driver, /sys/class/spi_master/ stays empty, and the vendor open_sensor_spi.ko refuses to load: modprobe: can't load module open_sensor_spi: No such device or address (NULL device *): spi_busnum_to_master() error! Children (sensor SPI, codec SPI, etc.) are bound at runtime by the OSAL stack — we only need the master nodes registered here. Reads clock IDs from the existing dt-bindings/clock/hi3516dv300-clock.h (SPI0_CLK=48, SPI1_CLK=49, SPI2_CLK=54) and SPI shared-peripheral IRQs from the vendor 4.9 DTSI (68/69/70). Affects: hi3516av300, hi3516cv500, hi3516dv300 boards using this DTSI. Fixes: OpenIPC/firmware#2069
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add `spi_bus0/1/2` nodes for the three PL022-compatible SSP controllers at `0x120c0000`/`0x120c1000`/`0x120c2000`. `CONFIG_SPI_PL022` is already enabled in the cv500_neo / av300_neo kernel configs, but without DT nodes nothing instantiates the driver, `/sys/class/spi_master/` stays empty, and the vendor `open_sensor_spi.ko` refuses to load:
```
modprobe: can't load module open_sensor_spi: No such device or address
(NULL device *): spi_busnum_to_master() error!
```
Children (sensor SPI, codec SPI, etc.) are bound at runtime by the OSAL stack — only the master nodes are needed here.
Periphid override
HiSilicon's PL022 hardware reports periphid `0x00800022`, which the mainline pl022 driver doesn't recognise (it expects `0x00041022` for the standard ARM variant). We override via `arm,primecell-periphid = <0x00041022>` — the register layout is compatible enough that the driver binds cleanly and the SPI master comes up. Without the override, the AMBA bus reads the hardware ID and no driver matches.
Reads clock IDs from the existing `dt-bindings/clock/hi3516dv300-clock.h` (SPI0_CLK=48, SPI1_CLK=49, SPI2_CLK=54) and SPI shared-peripheral IRQs from the vendor 4.9 DTSI (68/69/70).
Verified on hardware
hi3516av300 + IMX415:
```
$ ls /sys/class/spi_master/
spi0 spi1 spi2
$ dmesg | grep ssp-pl022
ssp-pl022 120c0000.spi: ARM PL022 driver, device ID: 0x00041022
ssp-pl022 120c0000.spi: mapped registers from 0x120c0000 to (ptrval)
ssp-pl022 120c1000.spi: ARM PL022 driver, device ID: 0x00041022
ssp-pl022 120c2000.spi: ARM PL022 driver, device ID: 0x00041022
$ dmesg | grep sensor_spi
load sensor_spi.ko for Hi3516CV500...OK !
```
Affects: hi3516av300, hi3516cv500, hi3516dv300 boards using this DTSI.
Fixes: OpenIPC/firmware#2069
🤖 Generated with Claude Code