From patchwork Fri Feb 2 18:04:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10197769 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 68B3D60362 for ; Fri, 2 Feb 2018 18:06:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5879E28F31 for ; Fri, 2 Feb 2018 18:06:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D48F28F34; Fri, 2 Feb 2018 18:06:27 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham 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 AD59328F31 for ; Fri, 2 Feb 2018 18:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/PFPQycA/qD4zxtwqaAdEPlMZYzjrRHB2OfGm2v2dfw=; b=TucuIt4slG0ba0Nu8TV9OLf8Ld j2OeCbFufhbp9Z44p+ImdCqSVxzKyTgDJ8wIYpaLmZnKQzyvPm435xBiZlXHXiafSk0/E9KaI2Gel JIl72znDuZoJYrZvL0jQWwe5ZoVp0xkQIdwE4BPe3y3DE/E0lHIDJcynkZaMflMpgOSIVNZApHR4I IEagbnNpnG9v1QsZAnKZZqFQZjyqzNcUUVRRr9phoSFYTffTSmqoS+Pw9RcaiSMV/fQvIKS81EI5w NQxInfz+GSB6EbrvR+ep978DquqwqSfE1lYvn6fHPkhBsXfi4vNbhrxIVlGc+lQieMH3lBwgXnk6o 6AlJ9Ypg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ehfjE-0002T6-43; Fri, 02 Feb 2018 18:06:24 +0000 Received: from caracal.maple.relay.mailchannels.net ([23.83.214.30]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ehfim-0001rC-P7 for linux-arm-kernel@lists.infradead.org; Fri, 02 Feb 2018 18:05:58 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 019BB721BBB; Fri, 2 Feb 2018 18:05:45 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.4.59]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id DD90A720F21; Fri, 2 Feb 2018 18:05:43 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.18.55.173]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.13.1); Fri, 02 Feb 2018 18:05:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Abiding-Slimy: 065ddf4f2509cb9d_1517594744696_3549614166 X-MC-Loop-Signature: 1517594744695:1230514151 X-MC-Ingress-Time: 1517594744695 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id A2AD0568A2; Fri, 2 Feb 2018 18:05:39 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Giuseppe Cavallaro , Corentin Labbe , "David S . Miller" Subject: [PATCH 1/3] net: stmmac: dwmac-sun8i: drop V3s compatible and add V3 one Date: Sat, 3 Feb 2018 02:04:54 +0800 Message-Id: <20180202180456.60378-2-icenowy@aosc.io> In-Reply-To: <20180202180456.60378-1-icenowy@aosc.io> References: <20180202180456.60378-1-icenowy@aosc.io> 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: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 V3s is just a differently packaged version of the V3 chip, which has a MAC with the same capability with H3. The V3s just doesn't wire out the external MII/RMII/RGMII bus. (V3 wired out it). Drop the compatible string of V3s in the dwmac-sun8i driver, and add a V3 compatible string, which has all capabilities. Signed-off-by: Icenowy Zheng --- Documentation/devicetree/bindings/net/dwmac-sun8i.txt | 10 +++++----- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt index 3d6d5fa0c4d5..158124e8ee71 100644 --- a/Documentation/devicetree/bindings/net/dwmac-sun8i.txt +++ b/Documentation/devicetree/bindings/net/dwmac-sun8i.txt @@ -7,7 +7,7 @@ Required properties: - compatible: must be one of the following string: "allwinner,sun8i-a83t-emac" "allwinner,sun8i-h3-emac" - "allwinner,sun8i-v3s-emac" + "allwinner,sun8i-v3-emac" "allwinner,sun50i-a64-emac" - reg: address and length of the register for the device. - interrupts: interrupt for the device @@ -23,7 +23,7 @@ Required properties: - syscon: A phandle to the syscon of the SoC with one of the following compatible string: - allwinner,sun8i-h3-system-controller - - allwinner,sun8i-v3s-system-controller + - allwinner,sun8i-v3-system-controller - allwinner,sun50i-a64-system-controller - allwinner,sun8i-a83t-system-controller @@ -35,7 +35,7 @@ external PHY. Optional properties for the following compatibles: - "allwinner,sun8i-h3-emac", - - "allwinner,sun8i-v3s-emac": + - "allwinner,sun8i-v3-emac": - allwinner,leds-active-low: EPHY LEDs are active low Required child node of emac: @@ -51,7 +51,7 @@ of the mdio node. See phy.txt for the generic PHY bindings. The following compatibles require that the emac node have a mdio-mux child node called "mdio-mux": - "allwinner,sun8i-h3-emac" - - "allwinner,sun8i-v3s-emac": + - "allwinner,sun8i-v3-emac": Required properties for the mdio-mux node: - compatible = "allwinner,sun8i-h3-mdio-mux" - mdio-parent-bus: a phandle to EMAC mdio @@ -64,7 +64,7 @@ Required properties for the mdio-mux children node: The following compatibles require a PHY node representing the integrated PHY, under the integrated MDIO bus node if an mdio-mux node is used: - "allwinner,sun8i-h3-emac", - - "allwinner,sun8i-v3s-emac": + - "allwinner,sun8i-v3-emac": Additional information regarding generic multiplexer properties can be found at Documentation/devicetree/bindings/net/mdio-mux.txt diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index a3fa65b1ca8e..fd0519cf27b9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -84,10 +84,12 @@ static const struct emac_variant emac_variant_h3 = { .support_rgmii = true }; -static const struct emac_variant emac_variant_v3s = { +static const struct emac_variant emac_variant_v3 = { .default_syscon_value = 0x38000, .soc_has_internal_phy = true, - .support_mii = true + .support_mii = true, + .support_rmii = true, + .support_rgmii = true }; static const struct emac_variant emac_variant_a83t = { @@ -1074,8 +1076,8 @@ return ret; static const struct of_device_id sun8i_dwmac_match[] = { { .compatible = "allwinner,sun8i-h3-emac", .data = &emac_variant_h3 }, - { .compatible = "allwinner,sun8i-v3s-emac", - .data = &emac_variant_v3s }, + { .compatible = "allwinner,sun8i-v3-emac", + .data = &emac_variant_v3 }, { .compatible = "allwinner,sun8i-a83t-emac", .data = &emac_variant_a83t }, { .compatible = "allwinner,sun50i-a64-emac",