From patchwork Sun Nov 18 17:29:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10687989 X-Patchwork-Delegate: geert@linux-m68k.org 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 F1BC614BD for ; Sun, 18 Nov 2018 17:29:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0CC529AF9 for ; Sun, 18 Nov 2018 17:29:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C44C929AFB; Sun, 18 Nov 2018 17:29: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 122C629AF9 for ; Sun, 18 Nov 2018 17:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbeKSDuK (ORCPT ); Sun, 18 Nov 2018 22:50:10 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40996 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbeKSDuK (ORCPT ); Sun, 18 Nov 2018 22:50:10 -0500 Received: by mail-wr1-f65.google.com with SMTP id x10so927333wrs.8; Sun, 18 Nov 2018 09:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KQZVYVlYPqzmfRGp3qMd55rwdUOlDLvxVuzrUggFREs=; b=urmdAFUIKNupM2pt0AWtRcIaGOqkhhgcN2AE7A2DrhEVl9j0S6L5izXMZbSJvCNKDM C143RfDez8ewncIPZprsKs19z7B/4V37pW+Pwxara1fbUAMS/zp6XdavQxd8F8FPOcLA 2Z3NPKIzrarspANOJ+kgq3g7NtpotxzRRnVG+m3n3rN2/7S5JQ1nrapsjE49gNGiCPge Y+59pWhimRtpOGqz2kdtX3fnqGFFokUiRdCpetfNNc+EDQuNMq1PnWwI6xRckStGtHw2 k09vUjCK1nl6YEC0LnMd9VnS6stIuu2qWnTTf/oAS5kfCM76CV5LyCQhMsOp5b7Kz9bZ HhLA== 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; bh=KQZVYVlYPqzmfRGp3qMd55rwdUOlDLvxVuzrUggFREs=; b=b+kzlqiARiUZRLGzydWz+lwUbpGu6LXR0OJXU6vpk091nbg63Q1vJ1hETlQrPUoNYm Pc4TSvxCZcW8X3vpwq4d/6aVUZiNCzLCuxTCh798dlbSPwkaFd05ToTpU8bKPHGsalfd J7WmB4pJOKIhV6jtaio2lnwO1ja5m3KO5PdZvf7rYVtAVPNJlCy7Kr+Y752i0gUMEuq0 r659T9ckV8LNa9eGBtLe0+K7BhKa32SLfbbVSlRKWrL3ogyvQpEG97Wn0NK65WtmhPeq v862gmVpDNLVsCS+wjf2VNMlonqm5x5u6L9OQBPVJemRzmtxtdBuBZBypf0dBZaI8eEq gbZA== X-Gm-Message-State: AA+aEWYuOlzkqfQhtqqQDV2W0yCPYjOo8G4IhDJ/Td2Fa0x77iF51++9 sgZTLipwuV3aF2VPPErulDZATkmv X-Google-Smtp-Source: AFSGD/VzBTA6DZBxey31oqAyRohpeKmU+iwbHlkJcdHtGrd1dPv215K1S7wWgnKsHi+nHh/5r7Lezg== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr12918490wrn.142.1542562157904; Sun, 18 Nov 2018 09:29:17 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id n15sm3509746wrt.21.2018.11.18.09.29.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Nov 2018 09:29:16 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-gpio@vger.kernel.org Cc: Takeshi Kihara , Marek Vasut , Geert Uytterhoeven , Simon Horman , Wolfram Sang , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/4] pinctrl: sh-pfc: r8a77965: Add CAN pins, groups and functions Date: Sun, 18 Nov 2018 18:29:00 +0100 Message-Id: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara This patch adds CAN{0,1} pins, groups and functions to the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c index dfdd982984d4..759b10e91d74 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c @@ -1784,6 +1784,44 @@ static const unsigned int avb_avtp_capture_b_mux[] = { AVB_AVTP_CAPTURE_B_MARK, }; +/* - CAN ------------------------------------------------------------------ */ +static const unsigned int can0_data_a_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24), +}; + +static const unsigned int can0_data_a_mux[] = { + CAN0_TX_A_MARK, CAN0_RX_A_MARK, +}; + +static const unsigned int can0_data_b_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1), +}; + +static const unsigned int can0_data_b_mux[] = { + CAN0_TX_B_MARK, CAN0_RX_B_MARK, +}; + +static const unsigned int can1_data_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26), +}; + +static const unsigned int can1_data_mux[] = { + CAN1_TX_MARK, CAN1_RX_MARK, +}; + +/* - CAN Clock -------------------------------------------------------------- */ +static const unsigned int can_clk_pins[] = { + /* CLK */ + RCAR_GP_PIN(1, 25), +}; + +static const unsigned int can_clk_mux[] = { + CAN_CLK_MARK, +}; + /* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = { /* R[7:2], G[7:2], B[7:2] */ @@ -3754,6 +3792,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(avb_avtp_capture_a), SH_PFC_PIN_GROUP(avb_avtp_match_b), SH_PFC_PIN_GROUP(avb_avtp_capture_b), + SH_PFC_PIN_GROUP(can0_data_a), + SH_PFC_PIN_GROUP(can0_data_b), + SH_PFC_PIN_GROUP(can1_data), + SH_PFC_PIN_GROUP(can_clk), SH_PFC_PIN_GROUP(du_rgb666), SH_PFC_PIN_GROUP(du_rgb888), SH_PFC_PIN_GROUP(du_clk_out_0), @@ -4036,6 +4078,19 @@ static const char * const avb_groups[] = { "avb_avtp_capture_b", }; +static const char * const can0_groups[] = { + "can0_data_a", + "can0_data_b", +}; + +static const char * const can1_groups[] = { + "can1_data", +}; + +static const char * const can_clk_groups[] = { + "can_clk", +}; + static const char * const du_groups[] = { "du_rgb666", "du_rgb888", @@ -4395,6 +4450,9 @@ static const char * const usb30_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(can_clk), SH_PFC_FUNCTION(du), SH_PFC_FUNCTION(hscif0), SH_PFC_FUNCTION(hscif1), From patchwork Sun Nov 18 17:29:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10687991 X-Patchwork-Delegate: geert@linux-m68k.org 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 E171D14DB for ; Sun, 18 Nov 2018 17:29:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2D8229AF9 for ; Sun, 18 Nov 2018 17:29:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6E6129AFB; Sun, 18 Nov 2018 17:29:22 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53C7329AF9 for ; Sun, 18 Nov 2018 17:29:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727128AbeKSDuL (ORCPT ); Sun, 18 Nov 2018 22:50:11 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46173 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbeKSDuL (ORCPT ); Sun, 18 Nov 2018 22:50:11 -0500 Received: by mail-wr1-f65.google.com with SMTP id l9so16703678wrt.13; Sun, 18 Nov 2018 09:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J3OiH6SQ+04PO9sNCNIYcxyy5CrtJFVfSoQy6XGY9Jk=; b=Zg0j/nMZ4rkuQf1GBaucf31Yz8gcVh1InWlFRHhOnz7aK8LuY7t4NqG1odKvKDRi9H bhUAfXBYYiCWAvFYHNkCRSpNOzO64Sx33MRMPeTCZkwHDnJfXEob22LZ0O52FoQ09PvI izHnmmLBBKpWTdLYGKPuMosSjnFSPVqwOAxXqea7Cc2kxfUrhwJyTNzum50MsSMzGAqK 3jXlwIsIgnhzaarziaU2L3LbGCcU8gfR3PT5EsjHaMIHrvxBLj46LuDMCOCSLdk3XM1W yciX/TiiPLyMX8SI9jfEBEnhOLmJ2Bgd0729rQOgOWy1bPZE0AF90mkFtdh2zoA6Un8j eIHg== 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; bh=J3OiH6SQ+04PO9sNCNIYcxyy5CrtJFVfSoQy6XGY9Jk=; b=BT8WW1/oeujS8wIlrYHA6OLXlkXg/X6StcUNT6tEury8JOHZ2kiqR86Uwdk6dg9d6B TxeUoBCJb5DpU2YqIxm4Y4Gi49LcbuvsPe/AyQI4NI9jIXL1kLEqJVCS39Yn864KNmy0 y4a8ZhZ6Vj72tAlFoSDspWf855I3DaRdp2soXGnHlboJegTCInIz5Hsv2WPi0pEZQ9fl xDS49ZEZdy9dJB3xjo7BHfDxLI76XKiHJNfuwxTLrsD/othL47UL0i45CUg0owt9oscn kQLQ1dzGSxIkeqFt4v0j8Gt3jy0GMcLTajoNWeARuej8MRB85+o3XPmxwskyEhTWXXes QDQQ== X-Gm-Message-State: AGRZ1gIM/cqwLWrDXe2swNpRMRInRQvU/30JIiu0SOY7JPZZmWD0u+uU ScAkGyJw2mGwqNqkpWL5/hJZjoNS X-Google-Smtp-Source: AJdET5fU6D5SfFZSD4G4kW+NDBM9D2i1GQlQRu3y2oBz/jbJc+iejufKJwbHlHmEniSll1V01gjSew== X-Received: by 2002:a5d:4bd2:: with SMTP id l18-v6mr15790603wrt.168.1542562159642; Sun, 18 Nov 2018 09:29:19 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id n15sm3509746wrt.21.2018.11.18.09.29.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Nov 2018 09:29:18 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-gpio@vger.kernel.org Cc: Takeshi Kihara , Marek Vasut , Geert Uytterhoeven , Simon Horman , Wolfram Sang , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: [PATCH 2/4] pinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions Date: Sun, 18 Nov 2018 18:29:01 +0100 Message-Id: <20181118172903.4481-2-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> References: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara This patch adds CAN FD{0,1} pins, groups and functions to the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c index 759b10e91d74..e26d101fe51c 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c @@ -1822,6 +1822,34 @@ static const unsigned int can_clk_mux[] = { CAN_CLK_MARK, }; +/* - CAN FD --------------------------------------------------------------- */ +static const unsigned int canfd0_data_a_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24), +}; + +static const unsigned int canfd0_data_a_mux[] = { + CANFD0_TX_A_MARK, CANFD0_RX_A_MARK, +}; + +static const unsigned int canfd0_data_b_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1), +}; + +static const unsigned int canfd0_data_b_mux[] = { + CANFD0_TX_B_MARK, CANFD0_RX_B_MARK, +}; + +static const unsigned int canfd1_data_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26), +}; + +static const unsigned int canfd1_data_mux[] = { + CANFD1_TX_MARK, CANFD1_RX_MARK, +}; + /* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = { /* R[7:2], G[7:2], B[7:2] */ @@ -3796,6 +3824,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(can0_data_b), SH_PFC_PIN_GROUP(can1_data), SH_PFC_PIN_GROUP(can_clk), + SH_PFC_PIN_GROUP(canfd0_data_a), + SH_PFC_PIN_GROUP(canfd0_data_b), + SH_PFC_PIN_GROUP(canfd1_data), SH_PFC_PIN_GROUP(du_rgb666), SH_PFC_PIN_GROUP(du_rgb888), SH_PFC_PIN_GROUP(du_clk_out_0), @@ -4091,6 +4122,15 @@ static const char * const can_clk_groups[] = { "can_clk", }; +static const char * const canfd0_groups[] = { + "canfd0_data_a", + "canfd0_data_b", +}; + +static const char * const canfd1_groups[] = { + "canfd1_data", +}; + static const char * const du_groups[] = { "du_rgb666", "du_rgb888", @@ -4453,6 +4493,8 @@ static const struct sh_pfc_function pinmux_functions[] = { SH_PFC_FUNCTION(can0), SH_PFC_FUNCTION(can1), SH_PFC_FUNCTION(can_clk), + SH_PFC_FUNCTION(canfd0), + SH_PFC_FUNCTION(canfd1), SH_PFC_FUNCTION(du), SH_PFC_FUNCTION(hscif0), SH_PFC_FUNCTION(hscif1), From patchwork Sun Nov 18 17:29:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10687993 X-Patchwork-Delegate: geert@linux-m68k.org 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 24D0514DB for ; Sun, 18 Nov 2018 17:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04A6F29AF9 for ; Sun, 18 Nov 2018 17:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED26A29AFC; Sun, 18 Nov 2018 17:29:25 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03B9729AF9 for ; Sun, 18 Nov 2018 17:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbeKSDuN (ORCPT ); Sun, 18 Nov 2018 22:50:13 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45212 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbeKSDuN (ORCPT ); Sun, 18 Nov 2018 22:50:13 -0500 Received: by mail-wr1-f68.google.com with SMTP id v6so7714153wrr.12; Sun, 18 Nov 2018 09:29:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PdO6MTnx/25XpYutY1EbKG7xtFzE9+M0erX7uFfbwoc=; b=P+o7ohWtIdde8H8ArBa+MfByOyBV0mxWDWwMJu4B8KAZrHqxrDnBNJZRtffUpiYVtf 1mG/GYfYgrHClKwCJg5S12RzjJ1RXj3qEz/HBhfdbUJ1kqqaXMI+648gx7ltKQdRt8KC c1aef9egPIW+GYkNr3KJkEVHdkwV9ENq4DTrMKUh+WwGdNed336jqwKeFUY+wuFELrPJ VLyoRo7LPtkygqAldWGQwImYpWozZmRIj/0NNFSCpO9592ds7WJJLByPomoNbD6eJrxm jGpDxYns49uKeqi9HFhkAIpaKSYwyfdwMvDLgFPEEfD8HwBciSYQXEb39R+byOXyrtzn 28WA== 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; bh=PdO6MTnx/25XpYutY1EbKG7xtFzE9+M0erX7uFfbwoc=; b=Vd9zCqwtCgWtwazCCd9WyKaQyaNFnXeHF1FjmYdp58vFJwsmhiWatxuTdN7ZrzVxP5 xWvUV7c7ElY1MOqFY+Ix1M39PvEO/8XosHnTpBw1/mfpjjLuRAirDvjW3pGRAvTPQx7C EF8hWOyBoH02/Fd+NEGgjM0L5cRS1NtGB3nr+P3IAy+WiWdMl8D9OQyK/0Fz/NphMClG cXfsA2SUJyHHpC0Xw6pnF4sxmrT2uEe1WXetfpDSjkvQN2R9naHrPkB4rvpGZcLzxB3i hy0Fp+Qn3wFj2+aLclwB1mScwq67r+jAB+HDb6krWUfC35YvgS/ZPJKGWxSWitLjnJMQ FSzQ== X-Gm-Message-State: AGRZ1gL6SVX3gIL8QTtYOM1IoA/eV9jb6H/cz7N+ZO0Jctt0Js8Y7sXC c2Yfgb/Y3AfuD8Mcax1lPayreE2Z X-Google-Smtp-Source: AJdET5cCYmvXjUfDxMc14IkCdK5iJ+mFyz3+J6hyvQBuM0uPfX+ggiGZk1pqKXIUiY3Oj5r4+V6Bsg== X-Received: by 2002:a5d:46c2:: with SMTP id g2mr15970414wrs.49.1542562161207; Sun, 18 Nov 2018 09:29:21 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id n15sm3509746wrt.21.2018.11.18.09.29.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Nov 2018 09:29:20 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-gpio@vger.kernel.org Cc: Takeshi Kihara , Marek Vasut , Geert Uytterhoeven , Simon Horman , Wolfram Sang , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: [PATCH 3/4] pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions Date: Sun, 18 Nov 2018 18:29:02 +0100 Message-Id: <20181118172903.4481-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> References: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 51 +++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c index 95d478353627..db000acc880c 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c @@ -1375,6 +1375,35 @@ static const unsigned int avb_avtp_capture_a_mux[] = { AVB_AVTP_CAPTURE_A_MARK, }; +/* - CAN ------------------------------------------------------------------ */ +static const unsigned int can0_data_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), +}; + +static const unsigned int can0_data_mux[] = { + CAN0_TX_MARK, CAN0_RX_MARK, +}; + +static const unsigned int can1_data_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 7), +}; + +static const unsigned int can1_data_mux[] = { + CAN1_TX_MARK, CAN1_RX_MARK, +}; + +/* - CAN Clock -------------------------------------------------------------- */ +static const unsigned int can_clk_pins[] = { + /* CLK */ + RCAR_GP_PIN(0, 14), +}; + +static const unsigned int can_clk_mux[] = { + CAN_CLK_MARK, +}; + /* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = { /* R[7:2], G[7:2], B[7:2] */ @@ -2606,7 +2635,7 @@ static const unsigned int usb30_id_mux[] = { }; static const struct { - struct sh_pfc_pin_group common[140]; + struct sh_pfc_pin_group common[143]; struct sh_pfc_pin_group automotive[0]; } pinmux_groups = { .common = { @@ -2617,6 +2646,9 @@ static const struct { SH_PFC_PIN_GROUP(avb_avtp_pps), SH_PFC_PIN_GROUP(avb_avtp_match_a), SH_PFC_PIN_GROUP(avb_avtp_capture_a), + SH_PFC_PIN_GROUP(can0_data), + SH_PFC_PIN_GROUP(can1_data), + SH_PFC_PIN_GROUP(can_clk), SH_PFC_PIN_GROUP(du_rgb666), SH_PFC_PIN_GROUP(du_rgb888), SH_PFC_PIN_GROUP(du_clk_in_0), @@ -2763,6 +2795,18 @@ static const char * const avb_groups[] = { "avb_avtp_capture_a", }; +static const char * const can0_groups[] = { + "can0_data", +}; + +static const char * const can1_groups[] = { + "can1_data", +}; + +static const char * const can_clk_groups[] = { + "can_clk", +}; + static const char * const du_groups[] = { "du_rgb666", "du_rgb888", @@ -2990,11 +3034,14 @@ static const char * const usb30_groups[] = { }; static const struct { - struct sh_pfc_function common[32]; + struct sh_pfc_function common[35]; struct sh_pfc_function automotive[0]; } pinmux_functions = { .common = { SH_PFC_FUNCTION(avb), + SH_PFC_FUNCTION(can0), + SH_PFC_FUNCTION(can1), + SH_PFC_FUNCTION(can_clk), SH_PFC_FUNCTION(du), SH_PFC_FUNCTION(i2c1), SH_PFC_FUNCTION(i2c2), From patchwork Sun Nov 18 17:29:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10687995 X-Patchwork-Delegate: geert@linux-m68k.org 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 70B0014BD for ; Sun, 18 Nov 2018 17:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50C2C29AF9 for ; Sun, 18 Nov 2018 17:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 446C929AFB; Sun, 18 Nov 2018 17:29:26 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DDDC29AFA for ; Sun, 18 Nov 2018 17:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727166AbeKSDuO (ORCPT ); Sun, 18 Nov 2018 22:50:14 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51288 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727131AbeKSDuO (ORCPT ); Sun, 18 Nov 2018 22:50:14 -0500 Received: by mail-wm1-f65.google.com with SMTP id w7-v6so3078214wmc.1; Sun, 18 Nov 2018 09:29:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7282K/48A/m/BG1sCrjCAL5xLAed06/0uYgQFDwABiU=; b=HdYY1+3mjchkZR5vbNcipmOdyQqEwjcR96QcDWBPELaUD+JATFzQqnAe2uhkfFM3WK SqI6XqChcC1oWE1h0zwywSvFD+sXJrsVFE7E53407T02SbI+5VYwXs7wOufu8T5TTmb3 NEfQdlbC/maQp7V5C5NuR2SgAMx/NVQIR3xTxChd3D3LiewiDG0mpxAXlGS2qipHHAls M86CP51fbuN17J9UihJq6Ucak6eWV82+8VEGYy657qs5BsjqYgCYs7XlTWNkyAJ8nZEX GAbyWimIKUb0NlulyzNkllPFXXonUIlSlOsatQezhq5kyNTVyiN7d7pWke7ut2XUdVGD c4CQ== 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; bh=7282K/48A/m/BG1sCrjCAL5xLAed06/0uYgQFDwABiU=; b=jUT+KhVwIim5ZSor41zGvkFwoUmjZMEmLzcLmPaWOYJv5weVXWHPE4bwcN1DDB4kf9 bANvzgMX4lCt/HrjhhTOVtpy/XFhXTuZB1d/7V5OcYTUmwHr7WDfsSf2nDaGF6n7Z6D1 EXAaQolq4gGABMjepJ4fkTjAAtMPk0rJFIuAVMf904dM37uxj7VBoR9DoYjtKXi3uFTV vAB2gQFQ4tGXIy8sVUfCQz8d/gO+JSpsyuslwzHKU2d9Paijch5mvGPdig5v8899LINY mGq5QRen+e/SQVnZhgzRHsCP8NjCL/PjXeezlNIVn/sSZDTOjDKnhMHpezJAOBBo+7vt 99Pw== X-Gm-Message-State: AGRZ1gJCgmXrZUNwhXie1okzrs5Xkm1GaMQ3i17b+pNDBPQnXuyRAbEY MqCioXfheqj0AMLhwkNp5f8VRmUe X-Google-Smtp-Source: AFSGD/V8sdnkBVD3Vb1MSsUWY8Hac0Vdkfjt40E+ZxtEJ4VXIRkGd3AqCXXXdH6H/ExCsqMfnVh8Mg== X-Received: by 2002:a1c:d1cd:: with SMTP id i196mr4541244wmg.107.1542562162536; Sun, 18 Nov 2018 09:29:22 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id n15sm3509746wrt.21.2018.11.18.09.29.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Nov 2018 09:29:21 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-gpio@vger.kernel.org Cc: Takeshi Kihara , Marek Vasut , Geert Uytterhoeven , Simon Horman , Wolfram Sang , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: [PATCH 4/4] pinctrl: sh-pfc: r8a77990: Add CAN FD pins, groups and functions Date: Sun, 18 Nov 2018 18:29:03 +0100 Message-Id: <20181118172903.4481-4-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> References: <20181118172903.4481-1-marek.vasut+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara This patch adds CAN FD{0,1} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 35 +++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c index db000acc880c..96c2f4fcdb8e 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c @@ -1404,6 +1404,25 @@ static const unsigned int can_clk_mux[] = { CAN_CLK_MARK, }; +/* - CAN FD --------------------------------------------------------------- */ +static const unsigned int canfd0_data_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), +}; + +static const unsigned int canfd0_data_mux[] = { + CANFD0_TX_MARK, CANFD0_RX_MARK, +}; + +static const unsigned int canfd1_data_pins[] = { + /* TX, RX */ + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 7), +}; + +static const unsigned int canfd1_data_mux[] = { + CANFD1_TX_MARK, CANFD1_RX_MARK, +}; + /* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = { /* R[7:2], G[7:2], B[7:2] */ @@ -2635,7 +2654,7 @@ static const unsigned int usb30_id_mux[] = { }; static const struct { - struct sh_pfc_pin_group common[143]; + struct sh_pfc_pin_group common[145]; struct sh_pfc_pin_group automotive[0]; } pinmux_groups = { .common = { @@ -2649,6 +2668,8 @@ static const struct { SH_PFC_PIN_GROUP(can0_data), SH_PFC_PIN_GROUP(can1_data), SH_PFC_PIN_GROUP(can_clk), + SH_PFC_PIN_GROUP(canfd0_data), + SH_PFC_PIN_GROUP(canfd1_data), SH_PFC_PIN_GROUP(du_rgb666), SH_PFC_PIN_GROUP(du_rgb888), SH_PFC_PIN_GROUP(du_clk_in_0), @@ -2807,6 +2828,14 @@ static const char * const can_clk_groups[] = { "can_clk", }; +static const char * const canfd0_groups[] = { + "canfd0_data", +}; + +static const char * const canfd1_groups[] = { + "canfd1_data", +}; + static const char * const du_groups[] = { "du_rgb666", "du_rgb888", @@ -3034,7 +3063,7 @@ static const char * const usb30_groups[] = { }; static const struct { - struct sh_pfc_function common[35]; + struct sh_pfc_function common[37]; struct sh_pfc_function automotive[0]; } pinmux_functions = { .common = { @@ -3042,6 +3071,8 @@ static const struct { SH_PFC_FUNCTION(can0), SH_PFC_FUNCTION(can1), SH_PFC_FUNCTION(can_clk), + SH_PFC_FUNCTION(canfd0), + SH_PFC_FUNCTION(canfd1), SH_PFC_FUNCTION(du), SH_PFC_FUNCTION(i2c1), SH_PFC_FUNCTION(i2c2),