public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Behun <marek.behun@nic.cz>
To: u-boot@lists.denx.de
Subject: [EXT] Re: [PATCH v1 02/23] phy: marvell: rename comphy related definitions to COMPHY_XX
Date: Wed, 24 Mar 2021 17:41:27 +0000	[thread overview]
Message-ID: <20210324174127.29eecde0@thinkpad> (raw)
In-Reply-To: <20210324154728.umg7olb56s7ixnkq@pali>

Please be also aware the we have the following patch U-Boot




commit 545591132aa701ff1262bb309fbcd0c3ff0acd75
Author: Marek Beh?n <marek.behun@nic.cz>
Date:   Wed Aug 19 11:57:25 2020 +0200

    arm64: dts: armada-3720-espressobin: fix COMPHY nodes
    
    This commit fixes initialization of COMPHY on EspressoBin.
    
    Commit 22f418935be4 ("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>

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index 84e2c2adba..50381e979e 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -72,13 +72,13 @@
 &comphy {
 	max-lanes = <3>;
 	phy0 {
-		phy-type = <PHY_TYPE_PEX0>;
-		phy-speed = <PHY_SPEED_2_5G>;
+		phy-type = <PHY_TYPE_USB3_HOST0>;
+		phy-speed = <PHY_SPEED_5G>;
 	};
 
 	phy1 {
-		phy-type = <PHY_TYPE_USB3_HOST0>;
-		phy-speed = <PHY_SPEED_5G>;
+		phy-type = <PHY_TYPE_PEX0>;
+		phy-speed = <PHY_SPEED_2_5G>;
 	};
 
 	phy2 {

  reply	other threads:[~2021-03-24 17:41 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 14:06 [PATCH v1 00/23] phy: marvell: Sync Armada 3k/7k/8k SERDES code with Marvell version Stefan Roese
2021-03-24 14:06 ` [PATCH v1 01/23] phy: marvell: add comphy type PHY_TYPE_USB3 Stefan Roese
2021-03-24 14:06 ` [PATCH v1 02/23] phy: marvell: rename comphy related definitions to COMPHY_XX Stefan Roese
2021-03-24 14:42   ` Pali Rohár
2021-03-24 15:04     ` [EXT] " Kostya Porotchkin
2021-03-24 15:39       ` Stefan Roese
2021-03-24 15:47         ` Pali Rohár
2021-03-24 17:41           ` Marek Behun [this message]
2021-04-08  8:03           ` Stefan Roese
2021-03-24 14:06 ` [PATCH v1 03/23] phy: marvell: add missing speed during info prints Stefan Roese
2021-03-24 14:06 ` [PATCH v1 04/23] phy: marvell: cp110: initialize only enabled UTMI units Stefan Roese
2021-03-24 14:06 ` [PATCH v1 05/23] phy: marvell: cp110: utmi: update analog parameters according to latest ETP Stefan Roese
2021-03-24 14:06 ` [PATCH v1 06/23] phy: marvell: fix several minor bugs in comphy_probe Stefan Roese
2021-03-24 14:06 ` [PATCH v1 07/23] phy: marvell: save comphy_map_data priv structure Stefan Roese
2021-03-24 14:06 ` [PATCH v1 08/23] phy: marvell: add RX training command Stefan Roese
2021-03-24 17:46   ` Marek Behun
2021-04-08  8:46     ` Stefan Roese
2021-03-24 14:06 ` [PATCH v1 09/23] phy: marvell: enable comphy info prints for all devices Stefan Roese
2021-03-24 14:06 ` [PATCH v1 10/23] phy: marvell: cp110: remove unused definitions Stefan Roese
2021-03-24 14:06 ` [PATCH v1 11/23] phy: marvell: cp110: let the firmware configure comphy for RXAUI Stefan Roese
2021-03-24 14:06 ` [PATCH v1 12/23] phy: marvell: cp110: let the firmware configure comphy for USB Stefan Roese
2021-03-24 14:06 ` [PATCH v1 13/23] phy: marvell: cp110: let the firmware perform training for XFI Stefan Roese
2021-03-24 14:06 ` [PATCH v1 14/23] phy: marvell: cp110: remove both phy and pipe selector configuration Stefan Roese
2021-03-24 14:06 ` [PATCH v1 15/23] phy: marvell: cp110: clean up driver after it was moved to atf Stefan Roese
2021-03-24 14:06 ` [PATCH v1 16/23] phy: marvell: pass sgmii id to firmware Stefan Roese
2021-03-24 14:06 ` [PATCH v1 17/23] phy: marvell: fix handling of unconnected comphy Stefan Roese
2021-03-24 14:06 ` [PATCH v1 18/23] phy: marvell: cp110: mark u-boot power-off calls Stefan Roese
2021-03-24 14:06 ` [PATCH v1 19/23] phy: marvell: allow to initialize up to 6 USB ports Stefan Roese
2021-03-24 14:06 ` [PATCH v1 20/23] phy: marvell: fix pll initialization for second utmi port Stefan Roese
2021-03-24 14:06 ` [PATCH v1 21/23] phy: marvell: add support for SFI1 Stefan Roese
2021-03-24 14:06 ` [PATCH v1 22/23] phy: marvell: utmi: update utmi config which fixes usb2.0 instability Stefan Roese
2021-03-24 14:06 ` [PATCH v1 23/23] doc: dt-bindings: add Marvell comphy binding Stefan Roese
2021-04-29  6:46 ` [PATCH v1 00/23] phy: marvell: Sync Armada 3k/7k/8k SERDES code with Marvell version Stefan Roese
2021-04-29  8:27   ` Marek Behun
2021-04-29  9:00     ` Stefan Roese
2021-05-04 22:28       ` Pali Rohár
2021-05-05  7:00         ` Stefan Roese
2021-05-05  9:19           ` Pali Rohár
2021-05-05 16:38             ` Marek Behun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210324174127.29eecde0@thinkpad \
    --to=marek.behun@nic.cz \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox