devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH net-next v2 01/10] net: phy: add "internal" PHY mode
Date: Wed, 12 Feb 2014 21:29:46 -0800	[thread overview]
Message-ID: <1392269395-23513-2-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1392269395-23513-1-git-send-email-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On some systems, the PHY can be internal, in the same package as the
Ethernet MAC, and still be responding to a specific address on the MDIO
bus, in that case, the Ethernet MAC might need to know about it to
properly configure a port multiplexer to switch to an internal or
external PHY. Add a new PHY interface mode for this and update the
Device Tree of_get_phy_mode() function to look for it.

Signed-off-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Changes since v1:
- rebased against lastest net-next master branch

 include/linux/phy.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 42f1bc7..743c90e 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -74,6 +74,7 @@ typedef enum {
 	PHY_INTERFACE_MODE_RTBI,
 	PHY_INTERFACE_MODE_SMII,
 	PHY_INTERFACE_MODE_XGMII,
+	PHY_INTERFACE_MODE_INTERNAL,
 	PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
 
@@ -113,6 +114,8 @@ static inline const char *phy_modes(phy_interface_t interface)
 		return "smii";
 	case PHY_INTERFACE_MODE_XGMII:
 		return "xgmii";
+	case PHY_INTERFACE_MODE_INTERNAL:
+		return "internal";
 	default:
 		return "unknown";
 	}
@@ -599,7 +602,8 @@ static inline bool phy_interrupt_is_valid(struct phy_device *phydev)
  */
 static inline bool phy_is_internal(struct phy_device *phydev)
 {
-	return phydev->is_internal;
+	return phydev->is_internal ||
+		phydev->interface == PHY_INTERFACE_MODE_INTERNAL;
 }
 
 /**
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-02-13  5:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  5:29 [PATCH net-next v2 00/10] Support for the Broadcom GENET driver Florian Fainelli
     [not found] ` <1392269395-23513-1-git-send-email-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-13  5:29   ` Florian Fainelli [this message]
2014-02-13 20:34     ` [PATCH net-next v2 01/10] net: phy: add "internal" PHY mode David Miller
2014-02-13 20:41       ` Florian Fainelli
2014-02-13  5:29   ` [PATCH net-next v2 04/10] net: phy: add Broadcom BCM7xxx internal PHY driver Florian Fainelli
2014-02-13 10:34     ` Francois Romieu
2014-02-13 18:41       ` Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 02/10] net: phy: add MoCA PHY type Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 03/10] net: phy: update port type for MoCA PHYs Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 05/10] net: bcmgenet: add driver definitions and private structure Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 06/10] net: bcmgenet: add main driver file Florian Fainelli
2014-02-13 10:35   ` Francois Romieu
2014-02-13 10:58     ` Joe Perches
2014-02-13 11:38   ` Mark Rutland
2014-02-13  5:29 ` [PATCH net-next v2 07/10] net: bcmgenet: add MDIO routines Florian Fainelli
2014-02-13 11:50   ` Mark Rutland
2014-02-13 17:00     ` Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 08/10] net: bcmgenet: hook into the build system Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 09/10] Documentation: add Device tree bindings for Broadcom GENET Florian Fainelli
     [not found]   ` <1392269395-23513-10-git-send-email-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-13 11:13     ` Mark Rutland
     [not found]       ` <20140213111328.GB30705-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-02-13 16:57         ` Florian Fainelli
2014-02-13  5:29 ` [PATCH net-next v2 10/10] MAINTAINERS: add entry for the Broadcom GENET driver Florian Fainelli

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=1392269395-23513-2-git-send-email-f.fainelli@gmail.com \
    --to=f.fainelli-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).