Commit 8d897006 authored by Marcin Wojtas's avatar Marcin Wojtas Committed by Gregory CLEMENT

arm64: dts: marvell: add unique identifiers for Armada A8k SPI controllers

Enabling SPI controllers, which are attached to different busses
inside an SoC, may result in overlapping enumeration and cause
sysfs registration failure. Example log after enabling two
controllers on Armada 8040 SoC with same identifiers:

[    3.740415] sysfs: cannot create duplicate filename
'/class/spi_master/spi0'
[    3.747510] ------------[ cut here ]------------
[    3.752145] WARNING: at fs/sysfs/dir.c:31
[...]
[    4.002299] orion_spi: probe of f4700600.spi failed with error -17

spi-orion driver offers dedicated DT property ('cell-index'), that
allow setting unique identifiers. Recently added support for CP110-slave
HW block introduced two new SPI controllers' nodes with same ID as
ones from CP110-master.

This commit fixes the issue by assigning different 'cell-index' values
for CP110-slave SPI controllers.

Fixes: 4eef78a0 ("arm64: dts: marvell: add description for the slave
CP110 in Armada 8K")
Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
parent 2ec27be3
...@@ -130,7 +130,7 @@ cps_spi0: spi@700600 { ...@@ -130,7 +130,7 @@ cps_spi0: spi@700600 {
reg = <0x700600 0x50>; reg = <0x700600 0x50>;
#address-cells = <0x1>; #address-cells = <0x1>;
#size-cells = <0x0>; #size-cells = <0x0>;
cell-index = <1>; cell-index = <3>;
clocks = <&cps_syscon0 1 21>; clocks = <&cps_syscon0 1 21>;
status = "disabled"; status = "disabled";
}; };
...@@ -140,7 +140,7 @@ cps_spi1: spi@700680 { ...@@ -140,7 +140,7 @@ cps_spi1: spi@700680 {
reg = <0x700680 0x50>; reg = <0x700680 0x50>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cell-index = <2>; cell-index = <4>;
clocks = <&cps_syscon0 1 21>; clocks = <&cps_syscon0 1 21>;
status = "disabled"; status = "disabled";
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment