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: 999526 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="urmdAFUI"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42yf8x4bhXz9s0n for ; Mon, 19 Nov 2018 04:29:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbeKSDuK (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-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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),