From patchwork Tue Jan 24 20:10:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 9535817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71D066042D for ; Tue, 24 Jan 2017 20:12:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D6AD1FF0B for ; Tue, 24 Jan 2017 20:12:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5180720007; Tue, 24 Jan 2017 20:12:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 098FF1FF0B for ; Tue, 24 Jan 2017 20:12:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cW7Rw-00059X-NG; Tue, 24 Jan 2017 20:12:16 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cW7QZ-0004UO-CE for linux-arm-kernel@lists.infradead.org; Tue, 24 Jan 2017 20:10:54 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 5486420C73; Tue, 24 Jan 2017 21:10:32 +0100 (CET) Received: from localhost (83.146.29.93.rev.sfr.net [93.29.146.83]) by mail.free-electrons.com (Postfix) with ESMTPSA id 296B020432; Tue, 24 Jan 2017 21:10:32 +0100 (CET) From: Gregory CLEMENT To: Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v6 4/4] phy: marvell: Add support for the PHY embedded in the topaz switch Date: Tue, 24 Jan 2017 21:10:26 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170124_121051_718241_AC4BE3DC X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Jason Cooper , Joe Zhou , Jon Pannell , Nadav Haklai , Kostya Porotchkin , Gregory CLEMENT , Wilson Ding , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The PHY with the ID 0x1410C00 can be found embedded in the Marvell Topaz switches (88E6141/88E6341). It is compatible with the 88E1510 (at least for the temperature information), so add support for it, using the 88E1510 specific functions. Signed-off-by: Gregory CLEMENT --- drivers/net/phy/marvell.c | 21 +++++++++++++++++++++ include/linux/marvell_phy.h | 1 + 2 files changed, 22 insertions(+) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 64229976ace1..8b9338a746b8 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -2141,6 +2141,26 @@ static struct phy_driver marvell_drivers[] = { .get_strings = marvell_get_strings, .get_stats = marvell_get_stats, }, + { + .phy_id = MARVELL_PHY_ID_88E6141, + .phy_id_mask = MARVELL_PHY_ID_MASK, + .name = "Marvell 88E6141", + .probe = m88e1510_probe, + .remove = &marvell_remove, + .features = PHY_GBIT_FEATURES, + .flags = PHY_HAS_INTERRUPT, + .config_init = &marvell_config_init, + .config_aneg = &m88e1510_config_aneg, + .read_status = &marvell_read_status, + .ack_interrupt = &marvell_ack_interrupt, + .config_intr = &marvell_config_intr, + .did_interrupt = &m88e1121_did_interrupt, + .resume = &genphy_resume, + .suspend = &genphy_suspend, + .get_sset_count = marvell_get_sset_count, + .get_strings = marvell_get_strings, + .get_stats = marvell_get_stats, + }, }; module_phy_driver(marvell_drivers); @@ -2159,6 +2179,7 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = { { MARVELL_PHY_ID_88E1510, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1540, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E3016, MARVELL_PHY_ID_MASK }, + { MARVELL_PHY_ID_88E6141, MARVELL_PHY_ID_MASK }, { } }; diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h index a57f0dfb6db7..6f33b73f2044 100644 --- a/include/linux/marvell_phy.h +++ b/include/linux/marvell_phy.h @@ -5,6 +5,7 @@ #define MARVELL_PHY_ID_MASK 0xfffffff0 /* Known PHY IDs */ +#define MARVELL_PHY_ID_88E6141 0x01410c00 #define MARVELL_PHY_ID_88E1101 0x01410c60 #define MARVELL_PHY_ID_88E1112 0x01410c90 #define MARVELL_PHY_ID_88E1111 0x01410cc0