From patchwork Fri Sep 27 23:07:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2957101 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BAA459F244 for ; Fri, 27 Sep 2013 23:07:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3234202A7 for ; Fri, 27 Sep 2013 23:07:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9651202C8 for ; Fri, 27 Sep 2013 23:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753270Ab3I0XHV (ORCPT ); Fri, 27 Sep 2013 19:07:21 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:48188 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752940Ab3I0XHT (ORCPT ); Fri, 27 Sep 2013 19:07:19 -0400 Received: by mail-la0-f50.google.com with SMTP id gx14so2651192lab.23 for ; Fri, 27 Sep 2013 16:07:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id; bh=9bx++Ucu6EZtmR6zBTgXMUrzc6bAybStLc+MCRsfoOQ=; b=ajeDN2bnOIyPDixM9g4I/xbS+gwugZ3BzrpuAUaWKt6v0TJXznHTyRw5OL/F+h4YgJ UGd1WJy3YwwwlZtIRkD7pUKsxE/7DIzse1DAPMe0Twrkm7DE6HuW9pzDshLaAoqgJBJU XdE+NoV2yvNKHxcRnijNY1ICgV2WYphN3Z3UNIfxhkmuf1B0QaOoh6jUIQcDqQGHTFiw 9o7hXOqJMGzBQuzdesUd7H5/CyZ9SH9d7nrB3wDx4VegFvDTpQVSBsHlc7z0vvcyYLH2 bdwEFvXvPRDVssYwNorTsJDYsaxuQITSR1lKwg7s5RzAYvrNnUKVUNF9Z/NePGh38o78 UIlQ== X-Gm-Message-State: ALoCoQnsZqVfA61vETrmsLaolShDDrzn5Xs1hKlKhrZEeCX0OKmCXElhvhPoYPr+1p3jDLAC3Izn X-Received: by 10.112.168.3 with SMTP id zs3mr10732839lbb.2.1380323236830; Fri, 27 Sep 2013 16:07:16 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-85-193.pppoe.mtu-net.ru. [91.76.85.193]) by mx.google.com with ESMTPSA id u18sm7302467lbp.4.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Sep 2013 16:07:16 -0700 (PDT) To: linus.walleij@linaro.org, linux-sh@vger.kernel.org Subject: [PATCH] sh-pfc: r8a7778: add CAN pin groups From: Sergei Shtylyov Organization: Cogent Embedded Date: Sat, 28 Sep 2013 03:07:21 +0400 MIME-Version: 1.0 Message-Id: <201309280307.22017.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 CAN data and clock pin groups to R8A7778 PFC driver. Signed-off-by: Sergei Shtylyov Acked-by: Laurent Pinchart --- The patch is against the 'devel' branch of Linus W.'s 'linux-pinctrl.git' repo. Linus, could you please publish your tree in the MAINTAINERS file at last, so that people don't have to guess where it is? drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 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-r8a7778.c =================================================================== --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/pfc-r8a7778.c +++ linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7778.c @@ -1304,6 +1304,33 @@ AUDIO_PFC_DAT(audio_clkout_a, AUDIO_CLKO AUDIO_PFC_PIN(audio_clkout_b, RCAR_GP_PIN(1, 16)); AUDIO_PFC_DAT(audio_clkout_b, AUDIO_CLKOUT_B); +/* - CAN macro --------_----------------------------------------------------- */ +#define CAN_PFC_PINS(name, args...) SH_PFC_PINS(name, args) +#define CAN_PFC_DATA(name, tx, rx) SH_PFC_MUX2(name, tx, rx) +#define CAN_PFC_CLK(name, clk) SH_PFC_MUX1(name, clk) + +/* - CAN0 ------------------------------------------------------------------- */ +CAN_PFC_PINS(can0_data_a, RCAR_GP_PIN(1, 30), RCAR_GP_PIN(1, 31)); +CAN_PFC_DATA(can0_data_a, CAN0_TX_A, CAN0_RX_A); +CAN_PFC_PINS(can0_data_b, RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 27)); +CAN_PFC_DATA(can0_data_b, CAN0_TX_B, CAN0_RX_B); + +/* - CAN1 ------------------------------------------------------------------- */ +CAN_PFC_PINS(can1_data_a, RCAR_GP_PIN(4, 20), RCAR_GP_PIN(4, 19)); +CAN_PFC_DATA(can1_data_a, CAN1_TX_A, CAN1_RX_A); +CAN_PFC_PINS(can1_data_b, RCAR_GP_PIN(2, 28), RCAR_GP_PIN(2, 29)); +CAN_PFC_DATA(can1_data_b, CAN1_TX_B, CAN1_RX_B); + +/* - CAN_CLK --------------------------------------------------------------- */ +CAN_PFC_PINS(can_clk_a, RCAR_GP_PIN(3, 24)); +CAN_PFC_CLK(can_clk_a, CAN_CLK_A); +CAN_PFC_PINS(can_clk_b, RCAR_GP_PIN(1, 16)); +CAN_PFC_CLK(can_clk_b, CAN_CLK_B); +CAN_PFC_PINS(can_clk_c, RCAR_GP_PIN(4, 24)); +CAN_PFC_CLK(can_clk_c, CAN_CLK_C); +CAN_PFC_PINS(can_clk_d, RCAR_GP_PIN(2, 25)); +CAN_PFC_CLK(can_clk_d, CAN_CLK_D); + /* - Ether ------------------------------------------------------------------ */ SH_PFC_PINS(ether_rmii, RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 9), @@ -1698,6 +1725,14 @@ static const struct sh_pfc_pin_group pin SH_PFC_PIN_GROUP(audio_clk_c), SH_PFC_PIN_GROUP(audio_clkout_a), SH_PFC_PIN_GROUP(audio_clkout_b), + SH_PFC_PIN_GROUP(can0_data_a), + SH_PFC_PIN_GROUP(can0_data_b), + SH_PFC_PIN_GROUP(can1_data_a), + SH_PFC_PIN_GROUP(can1_data_b), + SH_PFC_PIN_GROUP(can_clk_a), + SH_PFC_PIN_GROUP(can_clk_b), + SH_PFC_PIN_GROUP(can_clk_c), + SH_PFC_PIN_GROUP(can_clk_d), SH_PFC_PIN_GROUP(ether_rmii), SH_PFC_PIN_GROUP(ether_link), SH_PFC_PIN_GROUP(ether_magic), @@ -1826,6 +1861,24 @@ static const char * const audio_clk_grou "audio_clkout_b", }; +static const char * const can0_groups[] = { + "can0_data_a", + "can0_data_b", + "can_clk_a", + "can_clk_b", + "can_clk_c", + "can_clk_d", +}; + +static const char * const can1_groups[] = { + "can1_data_a", + "can1_data_b", + "can_clk_a", + "can_clk_b", + "can_clk_c", + "can_clk_d", +}; + static const char * const ether_groups[] = { "ether_rmii", "ether_link", @@ -2022,6 +2075,8 @@ static const char * const vin1_groups[] static const struct sh_pfc_function pinmux_functions[] = { SH_PFC_FUNCTION(audio_clk), + SH_PFC_FUNCTION(can0), + SH_PFC_FUNCTION(can1), SH_PFC_FUNCTION(ether), SH_PFC_FUNCTION(hscif0), SH_PFC_FUNCTION(hscif1),