From patchwork Fri Dec 8 15:29:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixun Lan X-Patchwork-Id: 10102795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CCCBD60329 for ; Fri, 8 Dec 2017 15:29:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06D328CD0 for ; Fri, 8 Dec 2017 15:29:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4D2E28D07; Fri, 8 Dec 2017 15:29:59 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5607728CD0 for ; Fri, 8 Dec 2017 15:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QDsT3X5UKxLb6jG5Tpx8H8040R0/jYi8jWG2htvqm1Q=; b=QA/mKZdfzrFDd9 6wpwnOza4VDWWNERDcKHJf8PXy90LVPop99g8ZGXWm0/17L0dQwV4iq0PlyBt4kuJIAJLxdSaahOG K/BhO+54zGeSxifgdLs1NoKsp0gXcOvEisAmoXodNuEj6g68cwbljrLKk9TIP7R1xCUOTOqo/YVSL TVnzdwBTGOo4JTomi4nlGdO2zFdtpH4FB6Ez70ciw/CAgmWtvKxBGXAJL2ypVXOYtJOPiuD83NT2+ mvyq/S1NelqafMhaZt3FNVTHcaKJdAaKHZCS7XJPB7tHyeL0aFobc3IVI6H42S1uB/5BMDNnqTsmI ZPQwBYbe4iVtG53d2a0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eNKb5-0004Di-Sp; Fri, 08 Dec 2017 15:29:55 +0000 Received: from mail-sh2.amlogic.com ([58.32.228.45]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eNKb1-0004BR-C7; Fri, 08 Dec 2017 15:29:53 +0000 Received: from localhost.localdomain (10.18.20.164) by mail-sh2.amlogic.com (10.18.11.6) with Microsoft SMTP Server id 15.0.1320.4; Fri, 8 Dec 2017 23:28:41 +0800 From: Yixun Lan To: Linus Walleij Subject: [PATCH] pinctrl: meson-axg: adjust spicc pin naming Date: Fri, 8 Dec 2017 23:29:09 +0800 Message-ID: <20171208152909.15632-1-yixun.lan@amlogic.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-Originating-IP: [10.18.20.164] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171208_072951_710193_2A3BB08A X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Kevin Hilman , Yixun Lan , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Carlo Caione , linux-amlogic@lists.infradead.org, Xingyu Chen , Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to datasheet, we should use numbers for the pin naming instead of letters. The patch here try to fix this to keep the consistency. This patch should not bring any functional change. Fixes: 83c566806a68 ("pinctrl: meson-axg: Add new pinctrl driver for Meson AXG SoC") Suggested-by: Kevin Hilman Signed-off-by: Yixun Lan Acked-by: Kevin Hilman --- The issue was raised by Kevin while review the SPI DT part patches, see [1] [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-December/005641.html Note: the 'Fixes' is coming from pinctrl's tree 'for-next' branch --- drivers/pinctrl/meson/pinctrl-meson-axg.c | 86 +++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.c b/drivers/pinctrl/meson/pinctrl-meson-axg.c index a1a7d42afd42..1fda9d6c7ea3 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-axg.c +++ b/drivers/pinctrl/meson/pinctrl-meson-axg.c @@ -156,25 +156,25 @@ static const unsigned int sdio_d3_pins[] = {GPIOX_3}; static const unsigned int sdio_clk_pins[] = {GPIOX_4}; static const unsigned int sdio_cmd_pins[] = {GPIOX_5}; -/* spi_a */ -static const unsigned int spi_clk_a_pins[] = {GPIOZ_0}; -static const unsigned int spi_mosi_a_pins[] = {GPIOZ_1}; -static const unsigned int spi_miso_a_pins[] = {GPIOZ_2}; -static const unsigned int spi_ss0_a_pins[] = {GPIOZ_3}; -static const unsigned int spi_ss1_a_pins[] = {GPIOZ_4}; -static const unsigned int spi_ss2_a_pins[] = {GPIOZ_5}; - -/* spi_b */ -static const unsigned int spi_clk_b_x_pins[] = {GPIOX_19}; -static const unsigned int spi_mosi_b_x_pins[] = {GPIOX_17}; -static const unsigned int spi_miso_b_x_pins[] = {GPIOX_18}; -static const unsigned int spi_ss0_b_x_pins[] = {GPIOX_16}; - -static const unsigned int spi_clk_b_a_pins[] = {GPIOA_4}; -static const unsigned int spi_mosi_b_a_pins[] = {GPIOA_2}; -static const unsigned int spi_miso_b_a_pins[] = {GPIOA_3}; -static const unsigned int spi_ss0_b_a_pins[] = {GPIOA_5}; -static const unsigned int spi_ss1_b_pins[] = {GPIOA_6}; +/* spi0 */ +static const unsigned int spi0_clk_pins[] = {GPIOZ_0}; +static const unsigned int spi0_mosi_pins[] = {GPIOZ_1}; +static const unsigned int spi0_miso_pins[] = {GPIOZ_2}; +static const unsigned int spi0_ss0_pins[] = {GPIOZ_3}; +static const unsigned int spi0_ss1_pins[] = {GPIOZ_4}; +static const unsigned int spi0_ss2_pins[] = {GPIOZ_5}; + +/* spi1 */ +static const unsigned int spi1_clk_x_pins[] = {GPIOX_19}; +static const unsigned int spi1_mosi_x_pins[] = {GPIOX_17}; +static const unsigned int spi1_miso_x_pins[] = {GPIOX_18}; +static const unsigned int spi1_ss0_x_pins[] = {GPIOX_16}; + +static const unsigned int spi1_clk_a_pins[] = {GPIOA_4}; +static const unsigned int spi1_mosi_a_pins[] = {GPIOA_2}; +static const unsigned int spi1_miso_a_pins[] = {GPIOA_3}; +static const unsigned int spi1_ss0_a_pins[] = {GPIOA_5}; +static const unsigned int spi1_ss1_pins[] = {GPIOA_6}; /* i2c0 */ static const unsigned int i2c0_sck_pins[] = {GPIOZ_6}; @@ -429,12 +429,12 @@ static struct meson_pmx_group meson_axg_periphs_groups[] = { GROUP(nor_cs, 3), /* bank GPIOZ */ - GROUP(spi_clk_a, 1), - GROUP(spi_mosi_a, 1), - GROUP(spi_miso_a, 1), - GROUP(spi_ss0_a, 1), - GROUP(spi_ss1_a, 1), - GROUP(spi_ss2_a, 1), + GROUP(spi0_clk, 1), + GROUP(spi0_mosi, 1), + GROUP(spi0_miso, 1), + GROUP(spi0_ss0, 1), + GROUP(spi0_ss1, 1), + GROUP(spi0_ss2, 1), GROUP(i2c0_sck, 1), GROUP(i2c0_sda, 1), GROUP(i2c1_sck_z, 1), @@ -475,10 +475,10 @@ static struct meson_pmx_group meson_axg_periphs_groups[] = { GROUP(jtag_tdi_x, 2), GROUP(jtag_clk_x, 2), GROUP(jtag_tms_x, 2), - GROUP(spi_clk_b_x, 4), - GROUP(spi_mosi_b_x, 4), - GROUP(spi_miso_b_x, 4), - GROUP(spi_ss0_b_x, 4), + GROUP(spi1_clk_x, 4), + GROUP(spi1_mosi_x, 4), + GROUP(spi1_miso_x, 4), + GROUP(spi1_ss0_x, 4), GROUP(pwm_a_x18, 3), GROUP(pwm_a_x20, 1), GROUP(pwm_b_x, 3), @@ -521,11 +521,11 @@ static struct meson_pmx_group meson_axg_periphs_groups[] = { GROUP(spdif_in_a7, 3), GROUP(spdif_in_a19, 1), GROUP(spdif_in_a20, 2), - GROUP(spi_clk_b_a, 3), - GROUP(spi_mosi_b_a, 3), - GROUP(spi_miso_b_a, 3), - GROUP(spi_ss0_b_a, 3), - GROUP(spi_ss1_b, 3), + GROUP(spi1_clk_a, 3), + GROUP(spi1_mosi_a, 3), + GROUP(spi1_miso_a, 3), + GROUP(spi1_ss0_a, 3), + GROUP(spi1_ss1, 3), GROUP(pwm_a_a, 3), GROUP(pwm_b_a, 3), GROUP(pwm_c_a, 3), @@ -696,15 +696,15 @@ static const char * const sdio_groups[] = { "sdio_cmd", "sdio_clk", }; -static const char * const spi_a_groups[] = { - "spi_clk_a", "spi_mosi_a", "spi_miso_a", "spi_ss0_a", - "spi_ss1_a", "spi_ss2_a" +static const char * const spi0_groups[] = { + "spi0_clk", "spi0_mosi", "spi0_miso", "spi0_ss0", + "spi0_ss1", "spi0_ss2" }; -static const char * const spi_b_groups[] = { - "spi_clk_b_x", "spi_mosi_b_x", "spi_miso_b_x", "spi_ss0_b_x", - "spi_clk_b_a", "spi_mosi_b_a", "spi_miso_b_a", "spi_ss0_b_a", - "spi_ss1_b" +static const char * const spi1_groups[] = { + "spi1_clk_x", "spi1_mosi_x", "spi1_miso_x", "spi1_ss0_x", + "spi1_clk_a", "spi1_mosi_a", "spi1_miso_a", "spi1_ss0_a", + "spi1_ss1" }; static const char * const uart_a_groups[] = { @@ -849,8 +849,8 @@ static struct meson_pmx_func meson_axg_periphs_functions[] = { FUNCTION(gpio_periphs), FUNCTION(emmc), FUNCTION(nor), - FUNCTION(spi_a), - FUNCTION(spi_b), + FUNCTION(spi0), + FUNCTION(spi1), FUNCTION(sdio), FUNCTION(nand), FUNCTION(uart_a),