-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
kernel: 4.4.154
arch: aarch64
board: rk3399-rockpro64
Symptom: In the attempt to activate an spidev on the spi5 of the board, the system freezes up without any debug output.
Attempt 1: Create an device-tree-overlay and load at runtime.
This freezes the system on load.
The overlays for spi5 and spi1 yield the same result.
Attempt 2: Patch the device-tree with the spidev.
For spi5 the system boots into a freeze.
For spi1 (where an spi-flash is present) the system boots and a /dev/spidev32xxx.0 device is available.
Attempt 3: Patch the device-tree for spi5 with the spidev and a fake spi-flash.
System starts and a /dev/spidev32xxx.0 device is available.
The 'unavailable flash' is noted at boot.
The clocks (pclk_spi5, clk_spi5) are now set according to the maximum frequency (seen that in /sys/kernel/debug/clk/clk_summery).
In both attempts, where the spidev device file is available, on can issue an open-syscall without freeze, but as soon as the ioctl is issued the system freezes up.
The ioctl for spidev calls the 'spi_setup' kernel-function, open doesn't.
My guess is that the change of the clocks at runtime is the issue.
Edit 2018-11-13: If one disables the spi-flash on the spi1 channel and puts the spidev in its place, on can do communication on it. The spi5 is needed in addition.