From patchwork Wed Dec 2 20:11:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7751481 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AF899BEEE1 for ; Wed, 2 Dec 2015 20:11:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3BA3204EA for ; Wed, 2 Dec 2015 20:11:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79CC620513 for ; Wed, 2 Dec 2015 20:11:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756189AbbLBULl (ORCPT ); Wed, 2 Dec 2015 15:11:41 -0500 Received: from mail-lf0-f49.google.com ([209.85.215.49]:36621 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755556AbbLBULj (ORCPT ); Wed, 2 Dec 2015 15:11:39 -0500 Received: by lfs39 with SMTP id 39so62123859lfs.3 for ; Wed, 02 Dec 2015 12:11:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:organization:user-agent:in-reply-to :references:mime-version:content-transfer-encoding:content-type; bh=A3qNCge49WtMgvch8MeEuEpCPojchwiDJRmUZC5twlw=; b=cQmtuRqfVf+dP2aa/SKgO8yH5vdb4cPJLGFYZQ/TecPJ7E6tUe+pr2TbQXBLZajfEd zGHhNrQNn6Rbf9nGLoFIJaT9xvPbajTMRymFXY0nYb0DfblwFaFi4SUmZFVlkLKrpUcz sS1bZM+FI9rJ3ZKl41v4rzjGKT/Cu3JAPIkHrKgIu5Wx1Yj3whyB70tg0t7kcZrOyOHf r2kY0pA15pWpd4f2wfV3cL6ussN7/rTmCcu0g/2BF7pZYu6iBezh9dymLGmfeRAeNjp5 dP3Q9soawIY7MYAuERGyxNPqjjxLtkyrIIKvBAoMXmqN4Zk06mzEDDs8i6561PYqryJk LTOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=A3qNCge49WtMgvch8MeEuEpCPojchwiDJRmUZC5twlw=; b=cxVUF9QY4bUBSE3wJA81ZHDG61CdMLlt3D1D5PHl+mr7e0nRRgrLpisz39z5l+w6CK KHbjYzpCAHjXMskdghzVo0EiwCryd21MsPY5EyMwj/q2MVUcarll69SKzlPOxpgHeRNs olGL8EdtzcfuCk0cY6cREopt8v/KQtSmXWj1KKOgItZVQREFRxDBzEWv0mQNecGrNmQv Hiq3a2jl/XzeEcs8jhwn1BXgwax9dwUlRwmtny93+W8h6zEFmfiAviJGZwRAGT+qPaAE UST+RVjIUZ7YLZk0SYPcLwfRJKN/WUZGl6dNC6nfwSOs9B4AnW+V5J0xUmpar7J8+LSy qdDA== X-Gm-Message-State: ALoCoQlTJNspDrOTbrwnqrn3CWm/o+gPBCIkFuITESEcYj/HO0X6D2/9b/Ga5X0MDW6uAjPabAJZ X-Received: by 10.25.127.202 with SMTP id a193mr4092367lfd.80.1449087098138; Wed, 02 Dec 2015 12:11:38 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.80.183]) by smtp.gmail.com with ESMTPSA id 70sm763399lfw.2.2015.12.02.12.11.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 12:11:37 -0800 (PST) From: Sergei Shtylyov To: linus.walleij@linaro.org, linux-sh@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-gpio@vger.kernel.org Subject: [PATCH] pinctrl: sh-pfc: r8a7791: add EtherAVB pin groups Date: Wed, 02 Dec 2015 23:11:35 +0300 Message-ID: <1512650.VUqGxiAB2A@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.2.6-201.fc22.x86_64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <13219129.kD4pZSmcAP@wasted.cogentembedded.com> References: <13219129.kD4pZSmcAP@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the EtherAVB pin groups to the R8A7791 PFC driver. Signed-off-by: Sergei Shtylyov --- The patch is against the 'devel' branch of Linus W.'s 'linux-pinctrl.git' repo. drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 92 +++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7791.c =================================================================== --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/pfc-r8a7791.c +++ linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7791.c @@ -1740,6 +1740,82 @@ static const unsigned int audio_clkout_m AUDIO_CLKOUT_MARK, }; +/* - AVB -------------------------------------------------------------------- */ +static const unsigned int avb_link_pins[] = { + RCAR_GP_PIN(5, 14), +}; +static const unsigned int avb_link_mux[] = { + AVB_LINK_MARK, +}; +static const unsigned int avb_magic_pins[] = { + RCAR_GP_PIN(5, 11), +}; +static const unsigned int avb_magic_mux[] = { + AVB_MAGIC_MARK, +}; +static const unsigned int avb_phy_int_pins[] = { + RCAR_GP_PIN(5, 16), +}; +static const unsigned int avb_phy_int_mux[] = { + AVB_PHY_INT_MARK, +}; +static const unsigned int avb_mdio_pins[] = { + RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 9), +}; +static const unsigned int avb_mdio_mux[] = { + AVB_MDC_MARK, AVB_MDIO_MARK, +}; +static const unsigned int avb_mii_pins[] = { + RCAR_GP_PIN(5, 18), RCAR_GP_PIN(5, 19), RCAR_GP_PIN(5, 20), + RCAR_GP_PIN(5, 21), + + RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2), + RCAR_GP_PIN(5, 3), + + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 13), RCAR_GP_PIN(5, 10), + RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 26), RCAR_GP_PIN(5, 28), + RCAR_GP_PIN(5, 29), +}; +static const unsigned int avb_mii_mux[] = { + AVB_TXD0_MARK, AVB_TXD1_MARK, AVB_TXD2_MARK, + AVB_TXD3_MARK, + + AVB_RXD0_MARK, AVB_RXD1_MARK, AVB_RXD2_MARK, + AVB_RXD3_MARK, + + AVB_RX_ER_MARK, AVB_RX_CLK_MARK, AVB_RX_DV_MARK, + AVB_CRS_MARK, AVB_TX_EN_MARK, AVB_TX_CLK_MARK, + AVB_COL_MARK, +}; +static const unsigned int avb_gmii_pins[] = { + RCAR_GP_PIN(5, 18), RCAR_GP_PIN(5, 19), RCAR_GP_PIN(5, 20), + RCAR_GP_PIN(5, 21), RCAR_GP_PIN(5, 22), RCAR_GP_PIN(5, 23), + RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 25), + + RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2), + RCAR_GP_PIN(5, 3), RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 5), + RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 7), + + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 13), RCAR_GP_PIN(5, 10), + RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 30), RCAR_GP_PIN(5, 17), + RCAR_GP_PIN(5, 26), RCAR_GP_PIN(5, 27), RCAR_GP_PIN(5, 28), + RCAR_GP_PIN(5, 29), +}; +static const unsigned int avb_gmii_mux[] = { + AVB_TXD0_MARK, AVB_TXD1_MARK, AVB_TXD2_MARK, + AVB_TXD3_MARK, AVB_TXD4_MARK, AVB_TXD5_MARK, + AVB_TXD6_MARK, AVB_TXD7_MARK, + + AVB_RXD0_MARK, AVB_RXD1_MARK, AVB_RXD2_MARK, + AVB_RXD3_MARK, AVB_RXD4_MARK, AVB_RXD5_MARK, + AVB_RXD6_MARK, AVB_RXD7_MARK, + + AVB_RX_ER_MARK, AVB_RX_CLK_MARK, AVB_RX_DV_MARK, + AVB_CRS_MARK, AVB_GTX_CLK_MARK, AVB_GTXREFCLK_MARK, + AVB_TX_EN_MARK, AVB_TX_ER_MARK, AVB_TX_CLK_MARK, + AVB_COL_MARK, +}; + /* - CAN -------------------------------------------------------------------- */ static const unsigned int can0_data_pins[] = { @@ -4258,6 +4334,12 @@ static const struct sh_pfc_pin_group pin SH_PFC_PIN_GROUP(audio_clk_b_b), SH_PFC_PIN_GROUP(audio_clk_c), SH_PFC_PIN_GROUP(audio_clkout), + SH_PFC_PIN_GROUP(avb_link), + SH_PFC_PIN_GROUP(avb_magic), + SH_PFC_PIN_GROUP(avb_phy_int), + SH_PFC_PIN_GROUP(avb_mdio), + SH_PFC_PIN_GROUP(avb_mii), + SH_PFC_PIN_GROUP(avb_gmii), SH_PFC_PIN_GROUP(can0_data), SH_PFC_PIN_GROUP(can0_data_b), SH_PFC_PIN_GROUP(can0_data_c), @@ -4597,6 +4679,15 @@ static const char * const audio_clk_grou "audio_clkout", }; +static const char * const avb_groups[] = { + "avb_link", + "avb_magic", + "avb_phy_int", + "avb_mdio", + "avb_mii", + "avb_gmii", +}; + static const char * const can0_groups[] = { "can0_data", "can0_data_b", @@ -5081,6 +5172,7 @@ static const char * const vin2_groups[] static const struct sh_pfc_function pinmux_functions[] = { SH_PFC_FUNCTION(audio_clk), + SH_PFC_FUNCTION(avb), SH_PFC_FUNCTION(can0), SH_PFC_FUNCTION(can1), SH_PFC_FUNCTION(du),