phy: ti: gmii-sel: Add support for CPSW5G GMII SEL in J7200
authorSiddharth Vadapalli <s-vadapalli@ti.com>
Mon, 12 Sep 2022 08:56:50 +0000 (14:26 +0530)
committerVinod Koul <vkoul@kernel.org>
Tue, 13 Sep 2022 17:40:26 +0000 (23:10 +0530)
commitaf96579dc31761a5f5bcb207d046764f1183069a
tree49089073179d6c32f49fb3884cd75b6b21eecc0c
parentbd76037833244e4bf234130f1fa418ff54fd5779
phy: ti: gmii-sel: Add support for CPSW5G GMII SEL in J7200

Each of the CPSW5G ports in J7200 support additional modes like QSGMII.
Add a new compatible for J7200 to support the additional modes.

In TI's J7200, each of the CPSW5G ethernet interfaces can act as a
QSGMII or QSGMII-SUB port. The QSGMII interface is responsible for
performing auto-negotiation between the MAC and the PHY while the rest of
the interfaces are designated as QSGMII-SUB interfaces, indicating that
they will not be taking part in the auto-negotiation process.

To indicate the interface which will serve as the main QSGMII interface,
add a property "ti,qsgmii-main-ports", whose value indicates the
port number of the interface which shall serve as the main QSGMII
interface. The rest of the interfaces are then assigned QSGMII-SUB mode by
default. The property "ti,qsgmii-main-ports" is used to configure the
CTRLMMR_ENETx_CTRL register.

Depending on the device, it is possible for more than one QSGMII main port
to exist. Thus, the property "ti,qsgmii-main-ports" is defined as an array
of values in order to reuse the property for other devices.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://lore.kernel.org/r/20220912085650.83263-4-s-vadapalli@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/ti/phy-gmii-sel.c