Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: ls1021a: Remove num-lanes property from PCIe nodes

Remove the num-lanes property to avoid the driver setting the
link width.

On FSL Layerscape SoCs, the number of lanes assigned to PCIe
controller is not fixed, it is determined by the selected SerDes
protocol in the RCW (Reset Configuration Word).

The PCIe link training is completed automatically through the selected
SerDes protocol - the link width set-up is updated by hardware after
power on reset, so the num-lanes property is not needed for Layerscape
PCIe.

The current num-lanes property was added erroneously, which actually
indicates the maximum lanes the PCIe controller can support up to,
instead of the lanes assigned to the PCIe controller. The link width set
by SerDes protocol will be overridden by the num-lanes property, hence
the subsequent re-training will fail when the assigned lanes do not
match the value in the num-lanes property.

Remove the property to fix the issue.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>

authored by

Hou Zhiqiang and committed by
Lorenzo Pieralisi
568adba9 66de33f0

-2
-2
arch/arm/boot/dts/ls1021a.dtsi
··· 874 874 #address-cells = <3>; 875 875 #size-cells = <2>; 876 876 device_type = "pci"; 877 - num-lanes = <4>; 878 877 num-viewport = <6>; 879 878 bus-range = <0x0 0xff>; 880 879 ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */ ··· 898 899 #address-cells = <3>; 899 900 #size-cells = <2>; 900 901 device_type = "pci"; 901 - num-lanes = <4>; 902 902 num-viewport = <6>; 903 903 bus-range = <0x0 0xff>; 904 904 ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */