From patchwork Sun Nov 21 19:53:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Boger X-Patchwork-Id: 12693245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E06ECC433F5 for ; Sun, 21 Nov 2021 19:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Q7mkFxrpSW3bryr4jVBpWwgt6tmdZrDRcwlRkXsE1Is=; b=Q1nkALwbuYZcyp K4YFYSJyC7j2z6XCfOSrGZDkYrAdzKjt+8k6u6NCPn6sa+lYCQRmwJ3JVtTT6lsTYK29MKeoFIf1T /ZaO71Am4k1J4uCfhuJJSbnZxC2M3+/2+ZL7Z/4H7KRvZz2wOP3PlhH38cH2BwYy/VXqjtWslY3MJ PtJOiYAb1dWbUUI6Bz6Z/z37qbuwvGZywbNpYF3162g5V6KI7mY7oNCOVN4fYb1KhpWya23PnXDf2 rnGt9HU1lGNscCIcA6RYLztqYhL8h0YpCaitP51ajzmm0Gs57w5Z24xtyT/mwP4OZxjzyqmzai70A nx4ZLRldEiZo5m9XcMbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mosub-00EGK3-0p; Sun, 21 Nov 2021 19:54:05 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mosuW-00EGJM-F7 for linux-arm-kernel@lists.infradead.org; Sun, 21 Nov 2021 19:54:02 +0000 Received: by mail-lf1-x135.google.com with SMTP id u3so70507151lfl.2 for ; Sun, 21 Nov 2021 11:53:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wirenboard-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jDQ8casRaZS+l1rxrJCeAbTXhjCUovQT3i2rAe9QnHQ=; b=MspbIXHJZk6p7mD0w87WeBtdD2oQQ6mFcbm/J1qs30y1odPZzznO6xCH/B/wkCBNSN X/nWbP+N04MmihCNEK2Gt99s8ezqN6FH1yYQuArKeosps1EGRR32bAf6FDdq0PAKVlDd pwbafdunsgefopVeK/1o7iWYESVYpeqJvgIbIpvAVzEIenJ2tLTkoWEtl+Umw3YtfqYD Wu0bmamuT4LFy36T/ElYlv/ZaSqjzSt6W624cw/jeD2/ZdosRqmRTJqUW4ThYc1YaFGD s/vew8Y8wbdTkQzlhLCl1NyHddBSZFfik14o2stDjB7gNcFZEJN5RVe4X3OPKrvgJmoV N1Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jDQ8casRaZS+l1rxrJCeAbTXhjCUovQT3i2rAe9QnHQ=; b=KxFRXy0AFB3LexLOt0eEXYTSN5keee/lzXwQQkhkAhZ3DMIv/begfF1TQIg8sXw4bx vdxtouBhYine09mCwEmiVO0i0sy+HOjRJzdMkmWKAlI7iubroE9rW4YPotG9sTunge+o 4KQSOOoVgVa95F6iYm2ZunYw+/7rI7IfQo+bj6bjhE3fdmZxbp/Er2O/j/Il0zdBMavV /HO3F9RmYkBwIcBKCctuVhG2MwKI2fZGtBX0G19RzTN8bzWVDtzMs05cndOGiOAnAWj5 F3wpslpzqEzgdypzNdw/UV1xy1UJdlD0n/zYOXMUUlPBomrTgxAkFwzGZ0GgHbwOpUbc 7epw== X-Gm-Message-State: AOAM530SsI2q7E7E5XJycnMlLZENWuFiXwAhsMY80W1jBD1x7DEYgNqC 1xiY5DlLkfEyWk7qktH7AA9ITw== X-Google-Smtp-Source: ABdhPJwYpfyTLMo2Ivu2ZTj1fJkpboEZubzV2cCg94mVmf+fnyIlfXPkRv+Ng7Qi7mRHrLClMA9mJw== X-Received: by 2002:a2e:b177:: with SMTP id a23mr45983013ljm.168.1637524437115; Sun, 21 Nov 2021 11:53:57 -0800 (PST) Received: from boger-laptop.lan (81.5.99.121.dhcp.mipt-telecom.ru. [81.5.99.121]) by smtp.gmail.com with ESMTPSA id a24sm768987ljq.18.2021.11.21.11.53.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 11:53:56 -0800 (PST) From: Evgeny Boger To: Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Cc: Evgeny Boger , devicetree@vger.kernel.org, Rob Herring , linux-sunxi@lists.linux.dev Subject: [PATCH v3 0/3] sun8i: r40: second ethernet support Date: Sun, 21 Nov 2021 22:53:34 +0300 Message-Id: <20211121195337.230475-1-boger@wirenboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211121_115400_624894_8219CC39 X-CRM114-Status: GOOD ( 12.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds support for two Ethernet ports on Allwinner R40. R40 (aka V40,A40i,T3) has two different Ethernet IPs called EMAC and GMAC. EMAC only support 10/100 Mbit in MII mode, while GMAC support both 10/100 (MII) and 10/100/1000 (RGMII). In contrast to A10/A20 where GMAC and EMAC share the same pins making EMAC somewhat pointless, on R40 EMAC can be routed to port H. Both EMAC (on port H) and GMAC (on port A) can be then enabled at the same time, allowing for two ethernet ports. Tested on custom A40i board with two IP101GRI PHYs in MII mode. Changes in v3: Minor fixes in bindings. Rebased on top of linux-next/master. dt_bindings_check and dtbs_check passed. - bindings: separate commit for DT bindings - bindings: simplify handling of compatible strings - bindings: make resets property required on R40 - dts: get rid of duplicate node Changes in v2: - EMAC reset is no longer optional on R40 - Add a new DT compatible string for R40 EMAC - Deassert reset line before enabling the clock - minor fixes: formatting, DT node order, leftover pinctrl props Evgeny Boger (3): net: allwinner: reset control support dt-bindings: net: support for Allwinner R40 EMAC controller dts: r40: add second ethernet support .../net/allwinner,sun4i-a10-emac.yaml | 20 +++++- arch/arm/boot/dts/sun8i-r40.dtsi | 50 +++++++++++++++ drivers/net/ethernet/allwinner/sun4i-emac.c | 64 +++++++++++++++++-- 3 files changed, 128 insertions(+), 6 deletions(-)