From patchwork Fri Dec 27 20:15:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3412551 Return-Path: X-Original-To: patchwork-linux-arm@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 240889F2A9 for ; Fri, 27 Dec 2013 20:18:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B385A2015E for ; Fri, 27 Dec 2013 20:18:24 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A94D22015D for ; Fri, 27 Dec 2013 20:18:23 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VwdqS-0008Fz-AF; Fri, 27 Dec 2013 20:17:20 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VwdqD-0004Kd-Bj; Fri, 27 Dec 2013 20:17:05 +0000 Received: from juliette.telenet-ops.be ([195.130.137.74]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vwdpm-0004Gu-1i for linux-arm-kernel@lists.infradead.org; Fri, 27 Dec 2013 20:16:40 +0000 Received: from ayla.of.borg ([84.193.72.141]) by juliette.telenet-ops.be with bizsmtp id 6kGE1n00732ts5g06kGE00; Fri, 27 Dec 2013 21:16:16 +0100 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1VwdpO-0004aV-1E; Fri, 27 Dec 2013 21:16:14 +0100 From: Geert Uytterhoeven To: linux-sh@vger.kernel.org Subject: [PATCH v2 1/8] pinctrl: sh-pfc: r7s72100: Add RSPI support Date: Fri, 27 Dec 2013 21:15:55 +0100 Message-Id: <1388175362-17132-2-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1388175362-17132-1-git-send-email-geert@linux-m68k.org> References: <1388175362-17132-1-git-send-email-geert@linux-m68k.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131227_151638_324259_C5372294 X-CRM114-Status: UNSURE ( 8.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.6 (/) Cc: Geert Uytterhoeven , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Geert Uytterhoeven Signed-off-by: Geert Uytterhoeven Cc: Linus Walleij --- v2: No changes drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 94 +++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c index 267677c683c5..5e0f03c14fcc 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c +++ b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c @@ -138,6 +138,70 @@ RIIC1(RZ_PIN_AND_MUX) RIIC2(RZ_PIN_AND_MUX) RIIC3(RZ_PIN_AND_MUX) +#define RSPI0(fn) \ + fn(rspi0, rspck, 2, 12, 2) \ + fn(rspi0, ssl0, 2, 13, 2) \ + fn(rspi0, mosi, 2, 14, 2) \ + fn(rspi0, miso, 2, 15, 2) \ + fn(rspi0, rspck, 7, 15, 2) \ + fn(rspi0, ssl0, 8, 0, 2) \ + fn(rspi0, mosi, 8, 1, 2) \ + fn(rspi0, miso, 8, 2, 2) \ + fn(rspi0, rspck, 10, 12, 4) \ + fn(rspi0, ssl0, 10, 13, 4) \ + fn(rspi0, mosi, 10, 14, 4) \ + fn(rspi0, miso, 10, 15, 4) \ + +#define RSPI1(fn) \ + fn(rspi1, rspck, 4, 4, 2) \ + fn(rspi1, ssl0, 4, 5, 2) \ + fn(rspi1, mosi, 4, 6, 2) \ + fn(rspi1, miso, 4, 7, 2) \ + fn(rspi1, rspck, 6, 4, 7) \ + fn(rspi1, ssl0, 6, 5, 7) \ + fn(rspi1, mosi, 6, 6, 7) \ + fn(rspi1, miso, 6, 7, 7) \ + fn(rspi1, rspck, 11, 12, 2) \ + fn(rspi1, ssl0, 11, 13, 2) \ + fn(rspi1, mosi, 11, 14, 2) \ + fn(rspi1, miso, 11, 15, 2) \ + +#define RSPI2(fn) \ + fn(rspi2, rspck, 8, 3, 3) \ + fn(rspi2, ssl0, 8, 4, 3) \ + fn(rspi2, mosi, 8, 5, 3) \ + fn(rspi2, miso, 8, 6, 3) \ + fn(rspi2, rspck, 8, 14, 5) \ + fn(rspi2, ssl0, 8, 15, 5) \ + fn(rspi2, mosi, 9, 0, 5) \ + fn(rspi2, miso, 9, 1, 5) \ + +#define RSPI3(fn) \ + fn(rspi3, rspck, 3, 0, 8) \ + fn(rspi3, ssl0, 3, 1, 8) \ + fn(rspi3, mosi, 3, 2, 8) \ + fn(rspi3, miso, 3, 3, 8) \ + fn(rspi3, rspck, 5, 0, 8) \ + fn(rspi3, ssl0, 5, 1, 8) \ + fn(rspi3, mosi, 5, 2, 8) \ + fn(rspi3, miso, 5, 3, 8) \ + +#define RSPI4(fn) \ + fn(rspi4, rspck, 2, 8, 8) \ + fn(rspi4, ssl0, 2, 9, 8) \ + fn(rspi4, mosi, 2, 10, 8) \ + fn(rspi4, miso, 2, 11, 8) \ + fn(rspi4, rspck, 4, 0, 7) \ + fn(rspi4, ssl0, 4, 1, 7) \ + fn(rspi4, mosi, 4, 2, 7) \ + fn(rspi4, miso, 4, 3, 7) \ + +RSPI0(RZ_PIN_AND_MUX) +RSPI1(RZ_PIN_AND_MUX) +RSPI2(RZ_PIN_AND_MUX) +RSPI3(RZ_PIN_AND_MUX) +RSPI4(RZ_PIN_AND_MUX) + #define SCIF0(fn) \ fn(scif0, clk, 2, 13, 6) \ fn(scif0, txd, 2, 14, 6) \ @@ -312,6 +376,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { RIIC1(RZ_PMX_GROUP) RIIC2(RZ_PMX_GROUP) RIIC3(RZ_PMX_GROUP) + RSPI0(RZ_PMX_GROUP) + RSPI1(RZ_PMX_GROUP) + RSPI2(RZ_PMX_GROUP) + RSPI3(RZ_PMX_GROUP) + RSPI4(RZ_PMX_GROUP) SCIF0(RZ_PMX_GROUP) SCIF1(RZ_PMX_GROUP) SCIF2(RZ_PMX_GROUP) @@ -339,6 +408,26 @@ static const char * const riic3_groups[] = { RIIC3(RZ_GROUPS) }; +static const char * const rspi0_groups[] = { + RSPI0(RZ_GROUPS) +}; + +static const char * const rspi1_groups[] = { + RSPI1(RZ_GROUPS) +}; + +static const char * const rspi2_groups[] = { + RSPI2(RZ_GROUPS) +}; + +static const char * const rspi3_groups[] = { + RSPI3(RZ_GROUPS) +}; + +static const char * const rspi4_groups[] = { + RSPI4(RZ_GROUPS) +}; + static const char * const scif0_groups[] = { SCIF0(RZ_GROUPS) }; @@ -380,6 +469,11 @@ static const struct sh_pfc_function pinmux_functions[] = { SH_PFC_FUNCTION(riic1), SH_PFC_FUNCTION(riic2), SH_PFC_FUNCTION(riic3), + SH_PFC_FUNCTION(rspi0), + SH_PFC_FUNCTION(rspi1), + SH_PFC_FUNCTION(rspi2), + SH_PFC_FUNCTION(rspi3), + SH_PFC_FUNCTION(rspi4), SH_PFC_FUNCTION(scif0), SH_PFC_FUNCTION(scif1), SH_PFC_FUNCTION(scif2),