From patchwork Sat Jan 12 12:59:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 722A36C2 for ; Sat, 12 Jan 2019 12:59:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FBB7295CE for ; Sat, 12 Jan 2019 12:59:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5310C295D1; Sat, 12 Jan 2019 12:59:51 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 8AC41295CE for ; Sat, 12 Jan 2019 12:59:50 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=gBtKKkXMIaISSuFkw8rMslRI2zpT0qkr4v7IiOOozMQ=; b=gvaqfwQQAkmQ1w yTLXLxH9aV6BTzwybJ8SlnND5Z8Ub7cd0w2ihNqZ6gw2XMWzF4AyU7+pzSXzKii9RCKqAqhW8iaFn 7aH3ceVKzPLbb9HIbs18n7YNSmS4ezcoGaCLaJtkwv9oDIM694U/Cb6RVzHWHJ2uxCZo9lDxCtuLD e0KlUxMhXMSeKytqhYDFoEAyphJUrHH+Ybk12KSb+gPB8OV/SumKGY7YKzsSIQ/LsKCgE5H9T3vWs J8j5k7ywhQogc2CgqXu/iqRhQfyAhzWVfx0M9sfUOrT0pWHpcHrUc1ZogZKjo4/PQ9I3uCRzrbLzp OjANMENJwGdcKHWb2EWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1giItA-0004bB-0n; Sat, 12 Jan 2019 12:59:48 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giIsy-0004Q3-3q; Sat, 12 Jan 2019 12:59:37 +0000 Received: by mail-wr1-x444.google.com with SMTP id z5so17987452wrt.11; Sat, 12 Jan 2019 04:59:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m38PpyT+0TrkN/Qg1dulRkwdOZ2VzWk99FJ00B4tZEw=; b=mQIZtJcmI+p9O5b+ExXp0/oTSCjgaM5nfZ5lnO+oZJdk5baRg26Hhz90YMf3/4svI8 d/XszCO6cuX+yv4VVb8NIXjm5Mr5UGUHMqteBnpUgZsfJSIFa6BQrN/S8Cr3a/7qEa+9 v0sPqY3ZPWRvUNd+AP3PikaEYX4/h1zn87w6tN5otcXuj8jaj2k5SwVmcvO5m5dCWlIU /oiwktTtZwlrDoisMthUb9uWTHrfJfrMn/gamrLlx2uumc5U34IriZiVVsWlDVO+2avS lr2efBWsiI7XJiOgMPT+f7VA7D0Ksy/zNMKJ979fTuVdmwNGnvOF/Y9jFK2+hMARiouQ tH1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m38PpyT+0TrkN/Qg1dulRkwdOZ2VzWk99FJ00B4tZEw=; b=EK4FdCKHUwh1rWg/4EieaE+WsMhn5Itl6Z5DypeVrFfqRbvzOn2mIh9XH/H4LyELyq v164yLWCefqp+F/0EvQaBlonl5Bbceinhm996+llNWS/H1griUlRKXPa0EmeTNx2P9Zo l2/dpd5KXQvSwpRFQHn2uenhUJBVMwWAxTcPgHAFNJJe1s3hlFN74n8lpC//+my9aN/0 Pvjk2KkU6c15sbTPSCjevewLd8O4/xmzPSUBowbd+DBjdG93RIEfW8nFFCqr+fIto1jJ MQXee8CchleKkBNjemQNtIIJLou7Xdk2kQ0a0QAj3lCKGMJ/ezsMCaKibMkTft7FMdvT 1eJw== X-Gm-Message-State: AJcUukfokqnlvS+PZNDg5wjVDMBD2JTV3h526X2XVp97DDgCwAE5AGAp nmt2+l38WMWa+Qy00CvfB1KrzVP1 X-Google-Smtp-Source: ALg8bN4yHHT3M44qQd5zExDCqFweFLH9W8n1N5VZXjp8t1D/hAe5EYrLDXXwoFkYz2lzhj5E1hSOaA== X-Received: by 2002:adf:f785:: with SMTP id q5mr18330829wrp.9.1547297973987; Sat, 12 Jan 2019 04:59:33 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id m4sm15034676wmi.3.2019.01.12.04.59.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 04:59:33 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org Subject: [PATCH v4 1/1] pinctrl: meson: meson8b: add the eth_rxd2 and eth_rxd3 pins Date: Sat, 12 Jan 2019 13:59:13 +0100 Message-Id: <20190112125913.22085-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112125913.22085-1-martin.blumenstingl@googlemail.com> References: <20190112125913.22085-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190112_045936_152746_81D09B2A X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , khilman@baylibre.com, ingrassia@epigenesys.com, linux-arm-kernel@lists.infradead.org, Jianxin Pan Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Gigabit Ethernet requires the Ethernet TXD0..3 and RXD0..3 data lines. Add the missing eth_rxd2 and eth_rxd3 definitions so we don't have to rely on the bootloader to set them up correctly. The vendor u-boot sources for Odroid-C1 use the following Ethernet pinmux configuration: SET_CBUS_REG_MASK(PERIPHS_PIN_MUX_6, 0x3f4f); SET_CBUS_REG_MASK(PERIPHS_PIN_MUX_7, 0xf00000); This translates to the following pin groups in the mainline kernel: - register 6 bit 0: eth_rxd1 (DIF_0_P) - register 6 bit 1: eth_rxd0 (DIF_0_N) - register 6 bit 2: eth_rx_dv (DIF_1_P) - register 6 bit 3: eth_rx_clk (DIF_1_N) - register 6 bit 6: eth_tx_en (DIF_3_P) - register 6 bit 8: eth_ref_clk (DIF_3_N) - register 6 bit 9: eth_mdc (DIF_4_P) - register 6 bit 10: eth_mdio_en (DIF_4_N) - register 6 bit 11: eth_tx_clk (GPIOH_9) - register 6 bit 12: eth_txd2 (GPIOH_8) - register 6 bit 13: eth_txd3 (GPIOH_7) - register 7 bit 20: eth_txd0_0 (GPIOH_6) - register 7 bit 21: eth_txd1_0 (GPIOH_5) - register 7 bit 22: eth_rxd3 (DIF_2_P) - register 7 bit 23: eth_rxd2 (DIF_2_N) All functions except eth_rxd2 and eth_rxd3 are already supported by the pinctrl-meson8b driver. Suggested-by: Jianxin Pan Signed-off-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Tested-by: Emiliano Ingrassia Reviewed-by: Emiliano Ingrassia --- drivers/pinctrl/meson/pinctrl-meson8b.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/meson/pinctrl-meson8b.c b/drivers/pinctrl/meson/pinctrl-meson8b.c index c69ca95b1ad5..84938bd73ac2 100644 --- a/drivers/pinctrl/meson/pinctrl-meson8b.c +++ b/drivers/pinctrl/meson/pinctrl-meson8b.c @@ -346,6 +346,8 @@ static const unsigned int eth_rx_dv_pins[] = { DIF_1_P }; static const unsigned int eth_rx_clk_pins[] = { DIF_1_N }; static const unsigned int eth_txd0_1_pins[] = { DIF_2_P }; static const unsigned int eth_txd1_1_pins[] = { DIF_2_N }; +static const unsigned int eth_rxd3_pins[] = { DIF_2_P }; +static const unsigned int eth_rxd2_pins[] = { DIF_2_N }; static const unsigned int eth_tx_en_pins[] = { DIF_3_P }; static const unsigned int eth_ref_clk_pins[] = { DIF_3_N }; static const unsigned int eth_mdc_pins[] = { DIF_4_P }; @@ -599,6 +601,8 @@ static struct meson_pmx_group meson8b_cbus_groups[] = { GROUP(eth_ref_clk, 6, 8), GROUP(eth_mdc, 6, 9), GROUP(eth_mdio_en, 6, 10), + GROUP(eth_rxd3, 7, 22), + GROUP(eth_rxd2, 7, 23), }; static struct meson_pmx_group meson8b_aobus_groups[] = { @@ -748,7 +752,7 @@ static const char * const ethernet_groups[] = { "eth_tx_clk", "eth_tx_en", "eth_txd1_0", "eth_txd1_1", "eth_txd0_0", "eth_txd0_1", "eth_rx_clk", "eth_rx_dv", "eth_rxd1", "eth_rxd0", "eth_mdio_en", "eth_mdc", "eth_ref_clk", - "eth_txd2", "eth_txd3" + "eth_txd2", "eth_txd3", "eth_rxd3", "eth_rxd2" }; static const char * const i2c_a_groups[] = {