Introduce fwnode_mdiobus_register_phy() to register PHYs on the
mdiobus. From the compatible string, identify whether the PHY is
c45 and based on this create a PHY device instance which is
registered on the mdiobus.
Signed-off-by: Calvin Johnson
---
Changes in v3: None
Changes in v2: None
Define fwnode_phy_find_device() to iterate an mdiobus and find the
phy device of the provided phy fwnode. Additionally define
device_phy_find_device() to find phy device of provided device.
Define fwnode_get_phy_node() to get phy_node using named reference.
Signed-off-by: Calvin Johnson
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
provide them to be connected to MAC.
Describe properties "phy-handle" and "phy-mode".
Signed-off-by: Calvin Johnson
---
Changes in v3: None
Changes in v2:
- Updated with more description in document
Do
ine removal
- Remove unused inclusion of acpi.h
Changes in v2:
- Updated with more description in document
- use reverse christmas tree ordering for local variables
- Refactor OF functions to use fwnode functions
Calvin Johnson (15):
Documentation: ACPI: DSD: Document MDIO PHY
On Tue, Dec 15, 2020 at 07:45:16PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> wrote:
> >
> > Using fwnode_get_id(), get the reg property value for DT node
> > and get the _ADR ob
Hi Laurent,
Thanks for reviewing.
On Tue, Dec 15, 2020 at 07:00:28PM +0200, Laurent Pinchart wrote:
> Hi Calvin,
>
> Thank you for the patch.
>
> On Tue, Dec 15, 2020 at 10:13:11PM +0530, Calvin Johnson wrote:
> > Using fwnode_get_id(), get the reg property value fo
On Tue, Dec 15, 2020 at 07:55:01PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> wrote:
> >
> > fwnode_mdiobus_register() internally takes care of both DT
> > and ACPI cases to register mdiobus. Replace existing
On Tue, Dec 15, 2020 at 07:53:26PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> wrote:
> >
> > Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus.
> > If the fwnode is DT node, then call of_mdiobus_register().
&
On Tue, Dec 15, 2020 at 07:33:40PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> wrote:
> >
> > Introduce fwnode_mdiobus_register_phy() to register PHYs on the
> > mdiobus. From the compatible string, identify whether the PHY is
> >
On Tue, Dec 15, 2020 at 07:28:10PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> wrote:
> >
> > Extract phy_id from compatible string. This will be used by
> > fwnode_mdiobus_register_phy() to create phy dev
On Tue, Dec 15, 2020 at 07:23:26PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> wrote:
> >
> > Define fwnode_phy_find_device() to iterate an mdiobus and find the
> > phy device of the provided phy fwnode. Additionally define
> > de
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
provide them to be connected to MAC.
Describe properties "phy-handle" and "phy-mode".
Signed-off-by: Calvin Johnson
---
Changes in v2:
- Updated with more description in document
Documentation/firmware-gu
With the introduction of fwnode_get_phy_id(), refactor of_get_phy_id()
to use fwnode equivalent.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/mdio/of_mdio.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/net/mdio/of_mdio.c b
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy().
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/mdio/of_mdio.c | 43 +++---
include/linux/of_mdio.h| 6 +-
2 files changed, 8 insertions(+), 41 deletions
Refactor of_phy_find_device() to use fwnode_phy_find_device().
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/mdio/of_mdio.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
index
Introduce fwnode_mdiobus_register_phy() to register PHYs on the
mdiobus. From the compatible string, identify whether the PHY is
c45 and based on this create a PHY device instance which is
registered on the mdiobus.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/phy
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/ethernet/freescale/xgmac_mdio.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c
b/drivers/net/ethernet/freescale/xgmac_mdio.c
index bfa2826c5545..ae
Define fwnode_mdio_find_device() to get a pointer to the
mdio_device from fwnode passed to the function.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/mdio/of_mdio.c | 11 +--
drivers/net/phy/phy_device.c | 23 +++
include/linux/phy.h
Define phylink_fwnode_phy_connect() to connect phy specified by
a fwnode to a phylink instance.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/phy/phylink.c | 54 +++
include/linux/phylink.h | 3 +++
2 files changed, 57 insertions
Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect().
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/phy/phylink.c | 39 +--
1 file changed, 1 insertion(+), 38 deletions(-)
diff --git a/drivers/net/phy/phylink.c b
to mac->phylink.
Signed-off-by: Calvin Johnson
---
Changes in v2:
- Refactor OF functions to use fwnode functions
.../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 86 +++
1 file changed, 50 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dp
& register a phy_device for each PHY
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/phy/mdio_bus.c | 50 ++
include/linux/phy.h| 1 +
2 files changed, 51 insertions(+)
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net
Using fwnode_get_id(), get the reg property value for DT node
and get the _ADR object value for ACPI node.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/base/property.c | 26 ++
include/linux/property.h | 1 +
2 files changed, 27 insertions(+)
diff
Extract phy_id from compatible string. This will be used by
fwnode_mdiobus_register_phy() to create phy device using the
phy_id.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/phy/phy_device.c | 21 +
include/linux/phy.h | 5 +
2 files
Define fwnode_phy_find_device() to iterate an mdiobus and find the
phy device of the provided phy fwnode. Additionally define
device_phy_find_device() to find phy device of provided device.
Define fwnode_get_phy_node() to get phy_node using named reference.
Signed-off-by: Calvin Johnson
- Refactor OF functions to use fwnode functions
Calvin Johnson (14):
Documentation: ACPI: DSD: Document MDIO PHY
net: phy: Introduce phy related fwnode functions
of: mdio: Refactor of_phy_find_device()
net: phy: Introduce fwnode_get_phy_id()
of: mdio: Refactor of_get_phy_id()
net
Hi Florian,
On Thu, Oct 08, 2020 at 07:26:44PM -0700, Florian Fainelli wrote:
>
>
> On 10/8/2020 7:20 PM, Calvin Johnson wrote:
> > Hi Rob,
> >
> > On Thu, Oct 08, 2020 at 11:35:07AM -0500, Rob Herring wrote:
> > > On Thu, Oct 8, 2020 at
Hi Rob,
On Thu, Oct 08, 2020 at 11:35:07AM -0500, Rob Herring wrote:
> On Thu, Oct 8, 2020 at 9:47 AM Calvin Johnson
> wrote:
> >
> > Better place for of_mdio.c is drivers/net/mdio.
> > Move of_mdio.c from drivers/of to drivers/net/mdio
>
> One thing off my todo l
Better place for of_mdio.c is drivers/net/mdio.
Move of_mdio.c from drivers/of to drivers/net/mdio
Signed-off-by: Calvin Johnson
---
MAINTAINERS| 2 +-
drivers/net/mdio/Kconfig | 8
drivers/net/mdio/Makefile | 2 ++
drivers/{of => net/m
On Sat, Oct 03, 2020 at 11:09:49PM +0530, Calvin Johnson wrote:
> Hi Grant,
>
> On Fri, Oct 02, 2020 at 12:22:37PM +0100, Grant Likely wrote:
> >
> >
> > > -static int dpaa2_mac_get_if_mode(struct device_node *node,
> > > +static int dpaa2_mac_get_i
Hi Russell and Florian,
On Fri, Oct 02, 2020 at 04:50:26PM +0100, Russell King - ARM Linux admin wrote:
> On Fri, Oct 02, 2020 at 08:14:07AM -0700, Florian Fainelli wrote:
> > On 10/2/2020 4:05 AM, Grant Likely wrote:
> > > On 30/09/2020 17:04, Calvin Johnson wrote:
> >
On Fri, Oct 02, 2020 at 12:05:14PM +0100, Grant Likely wrote:
>
>
> On 30/09/2020 17:04, Calvin Johnson wrote:
> > Extract phy_id from compatible string. This will be used by
> > fwnode_mdiobus_register_phy() to create phy device using the
> > phy_id.
> >
Hi Grant,
On Fri, Oct 02, 2020 at 12:22:37PM +0100, Grant Likely wrote:
>
>
> On 30/09/2020 17:04, Calvin Johnson wrote:
> > Modify dpaa2_mac_connect() to support ACPI along with DT.
> > Modify dpaa2_mac_get_node() to get the dpmac fwnode from either
> > D
Hi Andy,
On Thu, Oct 01, 2020 at 06:36:06PM +0300, Andy Shevchenko wrote:
> On Wed, Sep 30, 2020 at 7:06 PM Calvin Johnson
> wrote:
> >
> > Modify dpaa2_mac_connect() to support ACPI along with DT.
> > Modify dpaa2_mac_get_node() to get the dpmac fwnode fr
Hi Rafael,
On Wed, Sep 30, 2020 at 06:37:09PM +0200, Rafael J. Wysocki wrote:
> On Wed, Sep 30, 2020 at 6:05 PM Calvin Johnson
> wrote:
> >
> > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
> > provide them to be connected to MAC.
> >
>
On Wed, Sep 30, 2020 at 08:19:02PM +0200, Andrew Lunn wrote:
> On Wed, Sep 30, 2020 at 07:07:25PM +0100, Russell King - ARM Linux admin
> wrote:
> > On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote:
> > > > @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(device_phy_find_device);
> > > > */
On Wed, Sep 30, 2020 at 03:03:49PM -0700, David Miller wrote:
> From: Calvin Johnson
> Date: Wed, 30 Sep 2020 21:34:25 +0530
>
> > +struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode)
> > +{
> > + struct device *d;
> > + struct mdio
to mac->phylink.
Signed-off-by: Calvin Johnson
---
.../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 79 ---
1 file changed, 50 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
in
} // end of MDI0
-
Signed-off-by: Calvin Johnson
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 48 +++--
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c
b/drivers/net/ethernet/freescale
Define phylink_fwnode_phy_connect() to connect phy specified by
a fwnode to a phylink instance.
Signed-off-by: Calvin Johnson
---
drivers/net/phy/phylink.c | 51 +++
include/linux/phylink.h | 3 +++
2 files changed, 54 insertions(+)
diff --git a/drivers
Extract phy_id from compatible string. This will be used by
fwnode_mdiobus_register_phy() to create phy device using the
phy_id.
Signed-off-by: Calvin Johnson
---
drivers/net/phy/phy_device.c | 32 +++-
include/linux/phy.h | 5 +
2 files changed, 36
Define fwnode_phy_find_device() to iterate an mdiobus and find the
phy device of the provided phy fwnode. Additionally define
device_phy_find_device() to find phy device of provided device.
Define fwnode_get_phy_node() to get phy_node using named reference.
Signed-off-by: Calvin Johnson
()
device_phy_find_device()
fwnode_get_phy_node()
First one helps in connecting phy to phylink instance.
Next two helps in getting phy_id and registering phy to mdiobus
Next two help in finding a phy on a mdiobus.
Next one helps in getting phy_node from a fwnode.
Calvin Johnson (7):
Documentation: ACPI
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
provide them to be connected to MAC.
Describe properties "phy-handle" and "phy-mode".
Signed-off-by: Calvin Johnson
---
Documentation/firmware-guide/acpi/dsd/phy.rst | 78 +++
1 file ch
Introduce fwnode_mdiobus_register_phy() to register PHYs on the
mdiobus. From the compatible string, identify whether the PHY is
c45 and based on this create a PHY device instance which is
registered on the mdiobus.
Signed-off-by: Calvin Johnson
---
drivers/net/phy/mdio_bus.c | 40
On Wed, Jul 01, 2020 at 01:27:43PM +0300, Andy Shevchenko wrote:
> On Wed, Jul 1, 2020 at 9:13 AM Calvin Johnson
> wrote:
> >
> > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
> > provide them to be connected to MAC.
> >
> > An ACPI node
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and
provide them to be connected to MAC.
An ACPI node property "mdio-handle" is introduced to reference the
MDIO bus on which PHYs are registered with autoprobing method used
by mdiobus_register().
Signed-off-by: Calv
connected to mac->phylink.
Signed-off-by: Calvin Johnson
---
Changes in v2:
- clean up dpaa2_mac_get_node()
- introduce find_phy_device()
- use acpi_find_child_device()
.../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 79 ---
1 file changed, 50 insertions(+),
On getting hold of the MDIO
bus, use find_phy_device() to get the PHY connected to the MAC.
Signed-off-by: Calvin Johnson
---
Changes in v2: None
drivers/net/phy/phy_device.c | 25 +
include/linux/phy.h | 1 +
2 files changed, 26 insertions(+)
diff --git a/drive
()
- use acpi_find_child_device()
Calvin Johnson (3):
net: phy: introduce find_phy_device()
Documentation: ACPI: DSD: Document MDIO PHY
net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver
Documentation/firmware-guide/acpi/dsd/phy.rst | 40 ++
.../net/ethernet/freescale/dpaa2/dpaa2
On Mon, May 11, 2020 at 03:04:57PM +0200, Andrew Lunn wrote:
> > NXP's LX2160ARDB platform currently has the following MDIO-PHY connection.
> >
> > MDIO-1 ==> one 40G PHY, two 1G PHYs(C45), two 10G PHYs(C22)
> > MDIO-2 ==> one 25G PHY
>
> It has been suggested that ACPI only support a one to one
On Mon, May 11, 2020 at 11:48:17AM +0100, Russell King - ARM Linux admin wrote:
> On Mon, May 11, 2020 at 03:59:30PM +0530, Calvin Johnson wrote:
> > On Mon, May 11, 2020 at 10:38:49AM +0100, Russell King - ARM Linux admin
> > wrote:
> > > On Mon, May 11, 2020 at 01:30:40
On Mon, May 11, 2020 at 10:38:49AM +0100, Russell King - ARM Linux admin wrote:
> On Mon, May 11, 2020 at 01:30:40PM +0530, Calvin Johnson wrote:
> > On Sat, May 09, 2020 at 01:42:57AM +0200, Andrew Lunn wrote:
> > > On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton
On Sat, May 09, 2020 at 01:42:57AM +0200, Andrew Lunn wrote:
> On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote:
> > Hi,
> >
> > On 5/8/20 3:27 PM, Andrew Lunn wrote:
> > > > > There is a very small number of devices where the vendor messed up,
> > > > > and did not put valid
On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote:
> Hi,
>
> On 5/8/20 3:27 PM, Andrew Lunn wrote:
> > > > There is a very small number of devices where the vendor messed up,
> > > > and did not put valid contents in the ID registers. In such cases, we
> > > > can read the IDs from
Thanks Andrew and Jeremy for the detailed discussion!
On Fri, May 08, 2020 at 08:13:01PM +0200, Andrew Lunn wrote:
> > > It does have a numeric version defined for EISA types. OTOH I suspect that
> > > your right. If there were a "PHY\VEN_ID_" definition, it may
> > > not
> > > be ideal
On Thu, May 07, 2020 at 02:54:09PM -0500, Jeremy Linton wrote:
> Hi,
>
> On 5/7/20 12:27 PM, Andy Shevchenko wrote:
> > On Thu, May 7, 2020 at 4:26 PM Jeremy Linton wrote:
> > > On 5/5/20 8:29 AM, Calvin Johnson wrote:
> >
> > > > +
On Tue, May 05, 2020 at 05:22:00PM +0300, Andy Shevchenko wrote:
> On Tue, May 5, 2020 at 4:30 PM Calvin Johnson
> wrote:
> >
> > Introduce fwnode_mdiobus_register_phy() to register PHYs on the
> > mdiobus. From the compatible string, identify whether the PHY is
> >
fwnode_find_reference() doesn't return NULL and hence that check
should be avoided.
Signed-off-by: Calvin Johnson
Reviewed-by: Mathieu Poirier
---
drivers/hwtracing/coresight/coresight-cti-platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing
Hi Rafael,
On Wed, Apr 29, 2020 at 12:26:12PM +0200, Rafael J. Wysocki wrote:
> On Wed, Apr 29, 2020 at 7:38 AM Calvin Johnson
> wrote:
> >
> > > So, yes, there's another driver using it, but the ACPI folk probably
> > > never got a look-in on that instance.
fwnode_find_reference() doesn't return NULL and hence that check
should be avoided.
Signed-off-by: Calvin Johnson
---
drivers/hwtracing/coresight/coresight-cti-platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-cti
Introduce fwnode_mdiobus_register_phy() to register PHYs on the
mdiobus. From the compatible string, identify whether the PHY is
c45 and based on this create a PHY device instance which is
registered on the mdiobus.
Signed-off-by: Calvin Johnson
---
Changes in v3:
Introduce two functions
Define phylink_fwnode_phy_connect() to connect phy specified by
a fwnode to a phylink instance.
Signed-off-by: Calvin Johnson
---
Changes in v3:
remove NULL return check as it is invalid
remove unused phylink_device_phy_connect()
Changes in v2:
replace of_ and acpi_ code with generic
Define fwnode_phy_find_device() to iterate an mdiobus and find the
phy device of the provided phy fwnode. Additionally define
device_phy_find_device() to find phy device of provided device.
Define fwnode_get_phy_node() to get phy_node using named reference.
Signed-off-by: Calvin Johnson
Header includes are not sorted. Alphabetically sort them.
Signed-off-by: Calvin Johnson
---
Changes in v3: None
Changes in v2: None
drivers/net/phy/phy_device.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/phy/phy_device.c b
eric fwnode to get phy-handle.
Calvin Johnson (5):
net: phy: Introduce phy related fwnode functions
net: phy: alphabetically sort header includes
phylink: Introduce phylink_fwnode_phy_connect()
net: phy: Introduce fwnode_get_phy_id()
net: mdiobus: Introduce fwnode_mdiobus_register
Extract phy_id from compatible string. This will be used by
fwnode_mdiobus_register_phy() to create phy device using the
phy_id.
Signed-off-by: Calvin Johnson
---
Changes in v3: None
Changes in v2: None
drivers/net/phy/phy_device.c | 21 +
include/linux/phy.h | 5
On Mon, Apr 27, 2020 at 06:54:06PM +0530, Calvin Johnson wrote:
Hi Russell, others,
> Following functions are defined:
> phylink_fwnode_phy_connect()
> phylink_device_phy_connect()
> fwnode_phy_find_device()
> device_phy_find_device()
> fwnode_get_phy_node()
&
On Mon, Apr 27, 2020 at 03:48:07PM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Apr 27, 2020 at 08:02:38PM +0530, Calvin Johnson wrote:
> > On Mon, Apr 27, 2020 at 02:58:20PM +0100, Russell King - ARM Linux admin
> > wrote:
> > > On Mon, Apr 27, 2020 at 06:54:06
101 - 169 of 169 matches
Mail list logo