]> git.baikalelectronics.ru Git - uboot.git/commit
arm64: dts: armada-3720-espressobin: fix COMPHY nodes
authorMarek Behún <marek.behun@nic.cz>
Wed, 19 Aug 2020 09:57:25 +0000 (11:57 +0200)
committerStefan Roese <sr@denx.de>
Mon, 31 Aug 2020 12:45:53 +0000 (14:45 +0200)
commitea306e79554e1cfd9f944e7742ad084861a7469e
treee91eb0a2f7d62958f199df3fa9f6bdb1a664bdba
parent1f02b08956185560698e91e8d7a439e1f5db67e7
arm64: dts: armada-3720-espressobin: fix COMPHY nodes

This commit fixes initialization of COMPHY on EspressoBin.

Commit 2950a5d7d04f ("phy: marvell: a3700: Use comphy_mux on Armada
37xx.") introduced usage of comphy_mux on Armada 37xx comphy driver.
The lanes are defined in comphy_a3700.c as described in functional
specification, that is:
  lane 0 is SGMII1 or USB3
  lane 1 is PCIe or SGMII0
  lane 2 is SATA or USB3

But the DTS for EspressoBin configures PCIe on lane 0 and USB3 on
lane 1, which is wrong in the sense of the specification and doesn't
work with the comphy_mux code, which is 2 years now (the aardvark driver
causes synchronous abort in U-Boot).

It worked till the above mentioned commit, because the code for powering
up PCIe PHY doesn't work with lane number at all, and the code for
powering up USB3 PHY works differently only if USB3 is on lane 2, ie.
the check goes like:
  if (lane == 2)
    something
  else
    something else
so it does not differentiate between lanes 0 and 1.

In the future I shall post patches that remove the comphy_a3700 driver
and add comphy driver which uses calls to ATF, like Linux' driver does.
This will have the advantage of same DTS bindings as Linux', but till
this is done, we need this patch.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Pali Rohár <pali@kernel.org>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Andre Heider <a.heider@gmail.com>
arch/arm/dts/armada-3720-espressobin.dts