mbox series

[v5,0/7] Add Armada 3700 COMPHY support

Message ID 20190108163124.6409-1-miquel.raynal@bootlin.com (mailing list archive)
Headers show
Series Add Armada 3700 COMPHY support | expand

Message

Miquel Raynal Jan. 8, 2019, 4:31 p.m. UTC
Hello,

This series adds a new driver to support Armada 3700 COMPHY IP.
The series has been tested on an ESPRESSObin with SATA, PCIe
and USB3 host. For this purpose, patch 1 enumerates the SATA PHY
mode. The SGMII PHY mode that is supported by the IP has been written
(uses SMC calls anyway) but could not be tested on this platform.

Three series will follow to add PHY support (or at least a PHY nodes
in the A3700/ESPRESSObin device trees) to the MVEBU AHCI driver, the
Aardvark PCI controller driver and the MVEBU xHCI driver. All this is
needed in order to achieve suspend to RAM on this platform.

Thanks,
Miquèl


Changes since v4:
=================
* Fixed error in the driver probe where PHY_INTERFACE_MODE_NA was
  assigned to lane->mode instead of lane->submode.
* Compile-in the driver by default (depends on ARCH_MVEBU).
* Add dependency on HAVE_ARM_SMCC in Kconfig.

Changes since v3:
=================
* Added Rob's Reviewed-by tag on bindings.
* Rebased on top of phy -next as of the 12th of December, 2018.
* Adapted the driver to support SGMII/1000BASEX and
  HS_SGMII/2500BASEX.

Changes since v2:
=================
* Remove redundant check on lane->port/args->arg[0] at the end of the
  ->xlate() callback. Do it on both armada-cp110 and armada-a3700
  COMPHY drivers.
* Put my SoB as author of the patch first when a patch is co-developed.

Changes since v1:
=================
* Fix wrong check in ->xlate().
* Apply the same fix to the cp110 comphy driver from which the a3700
  driver is based.
* Added credit to Gregorz Jaszczyk for his work.
* Added Suggested-by tag to the patch adding the COMPHY DT node.


Grzegorz Jaszczyk (1):
  phy: enumerate SATA PHY mode

Miquel Raynal (6):
  phy: mvebu-cp110-comphy: fix port check in ->xlate()
  phy: add A3700 COMPHY support
  dt-bindings: phy: mvebu-comphy: extend the file to describe a3700
    bindings
  MAINTAINERS: phy: add entry for Armada 3700 COMPHY driver
  ARM64: dts: marvell: armada-37xx: fix SATA node scope
  ARM64: dts: marvell: armada-37xx: declare the COMPHY node

 .../bindings/phy/phy-mvebu-comphy.txt         |  65 +++-
 MAINTAINERS                                   |   6 +
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  31 +-
 drivers/phy/marvell/Kconfig                   |  12 +
 drivers/phy/marvell/Makefile                  |   1 +
 drivers/phy/marvell/phy-mvebu-a3700-comphy.c  | 318 ++++++++++++++++++
 drivers/phy/marvell/phy-mvebu-cp110-comphy.c  |   2 -
 include/linux/phy/phy.h                       |   1 +
 8 files changed, 421 insertions(+), 15 deletions(-)
 create mode 100644 drivers/phy/marvell/phy-mvebu-a3700-comphy.c

Comments

Miquel Raynal Feb. 6, 2019, 8:57 a.m. UTC | #1
Hi Kishon,

Miquel Raynal <miquel.raynal@bootlin.com> wrote on Tue,  8 Jan 2019
17:31:17 +0100:

> Hello,
> 
> This series adds a new driver to support Armada 3700 COMPHY IP.
> The series has been tested on an ESPRESSObin with SATA, PCIe
> and USB3 host. For this purpose, patch 1 enumerates the SATA PHY
> mode. The SGMII PHY mode that is supported by the IP has been written
> (uses SMC calls anyway) but could not be tested on this platform.
> 
> Three series will follow to add PHY support (or at least a PHY nodes
> in the A3700/ESPRESSObin device trees) to the MVEBU AHCI driver, the
> Aardvark PCI controller driver and the MVEBU xHCI driver. All this is
> needed in order to achieve suspend to RAM on this platform.
> 
> Thanks,
> Miquèl
> 

Any inputs on this series? It is important for me because it impacts
SATA, PCIe and USB changes I plan to get merge.

Thanks,
Miquèl

> 
> Changes since v4:
> =================
> * Fixed error in the driver probe where PHY_INTERFACE_MODE_NA was
>   assigned to lane->mode instead of lane->submode.
> * Compile-in the driver by default (depends on ARCH_MVEBU).
> * Add dependency on HAVE_ARM_SMCC in Kconfig.
> 
> Changes since v3:
> =================
> * Added Rob's Reviewed-by tag on bindings.
> * Rebased on top of phy -next as of the 12th of December, 2018.
> * Adapted the driver to support SGMII/1000BASEX and
>   HS_SGMII/2500BASEX.
> 
> Changes since v2:
> =================
> * Remove redundant check on lane->port/args->arg[0] at the end of the
>   ->xlate() callback. Do it on both armada-cp110 and armada-a3700  
>   COMPHY drivers.
> * Put my SoB as author of the patch first when a patch is co-developed.
> 
> Changes since v1:
> =================
> * Fix wrong check in ->xlate().
> * Apply the same fix to the cp110 comphy driver from which the a3700
>   driver is based.
> * Added credit to Gregorz Jaszczyk for his work.
> * Added Suggested-by tag to the patch adding the COMPHY DT node.
> 
> 
> Grzegorz Jaszczyk (1):
>   phy: enumerate SATA PHY mode
> 
> Miquel Raynal (6):
>   phy: mvebu-cp110-comphy: fix port check in ->xlate()
>   phy: add A3700 COMPHY support
>   dt-bindings: phy: mvebu-comphy: extend the file to describe a3700
>     bindings
>   MAINTAINERS: phy: add entry for Armada 3700 COMPHY driver
>   ARM64: dts: marvell: armada-37xx: fix SATA node scope
>   ARM64: dts: marvell: armada-37xx: declare the COMPHY node
> 
>  .../bindings/phy/phy-mvebu-comphy.txt         |  65 +++-
>  MAINTAINERS                                   |   6 +
>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  31 +-
>  drivers/phy/marvell/Kconfig                   |  12 +
>  drivers/phy/marvell/Makefile                  |   1 +
>  drivers/phy/marvell/phy-mvebu-a3700-comphy.c  | 318 ++++++++++++++++++
>  drivers/phy/marvell/phy-mvebu-cp110-comphy.c  |   2 -
>  include/linux/phy/phy.h                       |   1 +
>  8 files changed, 421 insertions(+), 15 deletions(-)
>  create mode 100644 drivers/phy/marvell/phy-mvebu-a3700-comphy.c
>
Kishon Vijay Abraham I Feb. 6, 2019, 11:17 a.m. UTC | #2
Hi,

On 06/02/19 2:27 PM, Miquel Raynal wrote:
> Hi Kishon,
> 
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Tue,  8 Jan 2019
> 17:31:17 +0100:
> 
>> Hello,
>>
>> This series adds a new driver to support Armada 3700 COMPHY IP.
>> The series has been tested on an ESPRESSObin with SATA, PCIe
>> and USB3 host. For this purpose, patch 1 enumerates the SATA PHY
>> mode. The SGMII PHY mode that is supported by the IP has been written
>> (uses SMC calls anyway) but could not be tested on this platform.
>>
>> Three series will follow to add PHY support (or at least a PHY nodes
>> in the A3700/ESPRESSObin device trees) to the MVEBU AHCI driver, the
>> Aardvark PCI controller driver and the MVEBU xHCI driver. All this is
>> needed in order to achieve suspend to RAM on this platform.
>>
>> Thanks,
>> Miquèl
>>
> 
> Any inputs on this series? It is important for me because it impacts
> SATA, PCIe and USB changes I plan to get merge.

merged now, thanks.

-Kishon
> 
> Thanks,
> Miquèl
> 
>>
>> Changes since v4:
>> =================
>> * Fixed error in the driver probe where PHY_INTERFACE_MODE_NA was
>>   assigned to lane->mode instead of lane->submode.
>> * Compile-in the driver by default (depends on ARCH_MVEBU).
>> * Add dependency on HAVE_ARM_SMCC in Kconfig.
>>
>> Changes since v3:
>> =================
>> * Added Rob's Reviewed-by tag on bindings.
>> * Rebased on top of phy -next as of the 12th of December, 2018.
>> * Adapted the driver to support SGMII/1000BASEX and
>>   HS_SGMII/2500BASEX.
>>
>> Changes since v2:
>> =================
>> * Remove redundant check on lane->port/args->arg[0] at the end of the
>>   ->xlate() callback. Do it on both armada-cp110 and armada-a3700  
>>   COMPHY drivers.
>> * Put my SoB as author of the patch first when a patch is co-developed.
>>
>> Changes since v1:
>> =================
>> * Fix wrong check in ->xlate().
>> * Apply the same fix to the cp110 comphy driver from which the a3700
>>   driver is based.
>> * Added credit to Gregorz Jaszczyk for his work.
>> * Added Suggested-by tag to the patch adding the COMPHY DT node.
>>
>>
>> Grzegorz Jaszczyk (1):
>>   phy: enumerate SATA PHY mode
>>
>> Miquel Raynal (6):
>>   phy: mvebu-cp110-comphy: fix port check in ->xlate()
>>   phy: add A3700 COMPHY support
>>   dt-bindings: phy: mvebu-comphy: extend the file to describe a3700
>>     bindings
>>   MAINTAINERS: phy: add entry for Armada 3700 COMPHY driver
>>   ARM64: dts: marvell: armada-37xx: fix SATA node scope
>>   ARM64: dts: marvell: armada-37xx: declare the COMPHY node
>>
>>  .../bindings/phy/phy-mvebu-comphy.txt         |  65 +++-
>>  MAINTAINERS                                   |   6 +
>>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  31 +-
>>  drivers/phy/marvell/Kconfig                   |  12 +
>>  drivers/phy/marvell/Makefile                  |   1 +
>>  drivers/phy/marvell/phy-mvebu-a3700-comphy.c  | 318 ++++++++++++++++++
>>  drivers/phy/marvell/phy-mvebu-cp110-comphy.c  |   2 -
>>  include/linux/phy/phy.h                       |   1 +
>>  8 files changed, 421 insertions(+), 15 deletions(-)
>>  create mode 100644 drivers/phy/marvell/phy-mvebu-a3700-comphy.c
>>