[PATCH phy 2/6] phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation

Miquel Raynal miquel.raynal at bootlin.com
Tue Nov 9 02:09:20 PST 2021


Hi Marek,

kabel at kernel.org wrote on Thu, 28 Oct 2021 20:42:38 +0200:

> From: Pali Rohár <pali at kernel.org>
> 
> Remove old RPC implementation and add a new native kernel implementation.
> 
> The old implementation uses ARM SMC API to issue RPC calls to ARM Trusted
> Firmware which provides real implementation of PHY configuration.
> 
> But older versions of ARM Trusted Firmware do not provide this PY
> configuration functionality, simply returning: operation not supported; or
> worse, some versions provide the configuration functionality incorrectly.
> 
> For example the firmware shipped in ESPRESSObin board has this older
> version of ARM Trusted Firmware and therefore SATA, USB 3.0 and PCIe
> functionality do not work with newer versions of Linux kernel.
> 
> Due to the above reasons, the following commits were introduced into Linux,
> to workaround these issues by ignoring -EOPNOTSUPP error code from
> phy-mvebu-a3700-comphy driver function phy_power_on():
> 
> commit 45aefe3d2251 ("ata: ahci: mvebu: Make SATA PHY optional for Armada
> 3720")
> commit 3241929b67d2 ("usb: host: xhci: mvebu: make USB 3.0 PHY optional for
> Armada 3720")
> commit b0c6ae0f8948 ("PCI: aardvark: Fix initialization with old Marvell's
> Arm Trusted Firmware")
> 
> Replace this RPC implementation with proper native kernel implementation,
> which is independent on the firmware. Never return -EOPNOTSUPP for proper
> arguments.
> 
> This should solve multiple issues with real-world boards, where it is not
> possible or really inconvenient to change the firmware. Let's eliminate
> these issues.
> 
> This implementation is ported directly from Armada 3720 comphy driver found
> in newest version of ARM Trusted Firmware source code.

I think we should not opt for a status quo and let broken users out
there. It is true that reflashing the firmware can be challenging in
some situations, so let's jump 3 years back and re-integrate that code
in the kernel.

Acked-by: Miquel Raynal <miquel.raynal at bootlin.com>

> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Signed-off-by: Marek Behún <kabel at kernel.org>
> ---

Thanks,
Miquèl



More information about the linux-phy mailing list