From patchwork Tue Sep 1 13:15:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 11748139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9D7D13B6 for ; Tue, 1 Sep 2020 13:16:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F76720767 for ; Tue, 1 Sep 2020 13:16:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lnvo+L4/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="jsCfYUDg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F76720767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=geanix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=a71eEcudKYzKtq/r249eCRo3QHz8RU5FLeVo2FkUm/E=; b=lnvo+L4/vF4eUAbW3Nh1LKlQqb qB72pgvy7PgLYNXO423X/zV4PBq1K9B9iH3IHYOxFwD4AUBzuJHL+IOD20FUnHMJR+XiOviZ6HyJ8 DtJP17GW2UTa36FsvmP+0srNl5WTucyqBHVLSQz26Kgx0bkbjyUbFdvJtfVfUIbemhxs20r2Av26Z Elcn6bf+fODsBK5DGAfBo0QyJmt9U9NEv0xKgtcruAfp1wboNlwbx9WdpGPPep28oUsJu1xQuBjgG 7AxjiO54XygkrTxi6c4uPqWy9lJkrtK3J0vERYuOgKiR03LOLhgW/zYqXMI6nQk+i3cRYY9QgE9Hu rk9yWUAw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD68g-0000yy-HZ; Tue, 01 Sep 2020 13:15:54 +0000 Received: from first.geanix.com ([116.203.34.67]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD68d-0000y6-HR for linux-arm-kernel@lists.infradead.org; Tue, 01 Sep 2020 13:15:52 +0000 Received: from localhost (80-62-117-118-mobile.dk.customer.tdc.net [80.62.117.118]) by first.geanix.com (Postfix) with ESMTPSA id D4153F01EF2; Tue, 1 Sep 2020 13:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1598966147; bh=1XIifE2ETTejgPspM92kIy25ipP/BkfhYgSc4XbPfh0=; h=From:To:Cc:Subject:Date; b=jsCfYUDguHlTohltxLJgJ3MI1e04MaAJjcQ+VYnrFU68AU5fsNEizHfdqhrJTnkhT wqkHZtjOz77gmS3R2KwhZZd9sWUhWq2XDD8CVIArlKTA/r+J+fv6IARQGFkyRMMaRU z96raMzE12FDsSJxQ/E8BQkzKZc48zqlHANPM3QpU46i0ej3klOYa+tQFwj68GH824 e/7YH6YgvqGFv0dg+ROHZZedZGy01S8LEj7UzS1I812sg1l0VUXHgpr72Z8lXrXqm4 9HljZmzxXw/22Z+YGW3ddx1MDOl8EFlJwKroIjqb9MTQipaBo0tX8TSe83esEWeTTR trur2GigENCBA== From: Esben Haabendal To: linux-arm-kernel@lists.infradead.org, Sekhar Nori , Bartosz Golaszewski Subject: [PATCH 1/2] ARM: davinci: da850: Add SPI1 pinmux definitions Date: Tue, 1 Sep 2020 15:15:46 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3.1 required=4.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ff3d05386fc5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_091551_939508_1327A25E X-CRM114-Status: GOOD ( 10.16 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Extend the MUX configuration to allow enabling SPI1 pin functions. Signed-off-by: Esben Haabendal --- arch/arm/mach-davinci/da850.c | 13 +++++++++++++ arch/arm/mach-davinci/include/mach/mux.h | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 68156e7239a6..d07ea5dbab65 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -157,6 +157,19 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, MMCSD1_DAT_3, 19, 8, 15, 2, false) MUX_CFG(DA850, MMCSD1_CLK, 18, 12, 15, 2, false) MUX_CFG(DA850, MMCSD1_CMD, 18, 16, 15, 2, false) + /* SPI1 function */ + MUX_CFG(DA850, SPI1_SIMO, 5, 20, 15, 1, false) + MUX_CFG(DA850, SPI1_SOMI, 5, 16, 15, 1, false) + MUX_CFG(DA850, SPI1_ENA, 5, 12, 15, 1, false) + MUX_CFG(DA850, SPI1_CLK, 5, 8, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS0, 5, 4, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS1, 5, 0, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS2, 4, 28, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS3, 4, 24, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS4, 4, 20, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS5, 4, 16, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS6, 4, 12, 15, 1, false) + MUX_CFG(DA850, SPI1_SCS7, 4, 8, 15, 1, false) /* EMIF2.5/EMIFA function */ MUX_CFG(DA850, EMA_D_7, 9, 0, 15, 1, false) MUX_CFG(DA850, EMA_D_6, 9, 4, 15, 1, false) diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index 631655e68ae0..2340ca92110d 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h @@ -865,6 +865,20 @@ enum davinci_da850_index { DA850_MMCSD1_CLK, DA850_MMCSD1_CMD, + /* SPI1 function */ + DA850_SPI1_SIMO, + DA850_SPI1_SOMI, + DA850_SPI1_ENA, + DA850_SPI1_CLK, + DA850_SPI1_SCS0, + DA850_SPI1_SCS1, + DA850_SPI1_SCS2, + DA850_SPI1_SCS3, + DA850_SPI1_SCS4, + DA850_SPI1_SCS5, + DA850_SPI1_SCS6, + DA850_SPI1_SCS7, + /* EMIF2.5/EMIFA function */ DA850_EMA_D_7, DA850_EMA_D_6, From patchwork Tue Sep 1 13:15:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 11748141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CADC913B6 for ; Tue, 1 Sep 2020 13:17:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A341C20767 for ; Tue, 1 Sep 2020 13:17:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tyI/HK8R"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="VoRYefDO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A341C20767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=geanix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=BaX5VMcPT2gYtkCodcvjjROGB2EdbfaBBcGf8aW/4N8=; b=tyI/HK8RDGWhd9FiIRg5E3P42 Nj2kKrDjajGNGICC9fvw2edmjFF1U+Vd6WdDxpZ6BsXRYrbFdpb7L7tZqo2nClalAG07MHDwMcCn7 PUFDyyEDS8hMJWGvePqXbRg57nbwIIFj8i0FGukhtvVkcqWXRyTv4kPDurNfFWwClLeque83mMrTq z0ABvnXMxSmom3gil9l64yW1ldqGq1oyxz3oKI9fJlaz1PImO1JoZEF+IU1ByRbosVefpthsFQKji tCLTds+zsMJYQ3vqCVluEtC4S80g9eCwytmsyjDKIdeGSMrvR23GN4rxmxoB7mpUkFNsJLEIZflKe 9JYNSEoqA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD68i-0000z9-2S; Tue, 01 Sep 2020 13:15:56 +0000 Received: from first.geanix.com ([116.203.34.67]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD68e-0000y8-4U for linux-arm-kernel@lists.infradead.org; Tue, 01 Sep 2020 13:15:52 +0000 Received: from localhost (80-62-117-118-mobile.dk.customer.tdc.net [80.62.117.118]) by first.geanix.com (Postfix) with ESMTPSA id 712C7F02222; Tue, 1 Sep 2020 13:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1598966149; bh=395ek0ZjKDf3qxZMH6ahj6SrSVbfI4tFTQvYM1MzeiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VoRYefDOQ+591EDrBpj2mz5FG8tBGbepXMr2K5G8THlBHinfRSivBvmV0v1H1xz7o 7lJCa6VPgUXBt0JCqFmpIhwgWCjAhEGu+B8HueVnP/QHKYkPNjgOzgY9OjBwLy3KQf x9Sl3h8FOh59O8a7AampoZHc3sJetucEkVKoR/e+whvk9jW1elsbB6ay3Sg4xURIhT jjwcFs7oQzMWehX0q7sD+zVnretv/nlRl4y1pF4GpRwQLkKy0p0xmEbfU+beaghqBO RLyGEZ2vqV18Y11fIfHCQ02V8RYSVTMjqq556tPTITDWiRd9ucLohwADQ7oDk3k7yG ARozU+FdYBxnw== From: Esben Haabendal To: linux-arm-kernel@lists.infradead.org, Sekhar Nori , Bartosz Golaszewski Subject: [PATCH 2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of SPI1 pins Date: Tue, 1 Sep 2020 15:15:47 +0200 Message-Id: <8aec86241fca6bd3af2d67ae799eeb2c91606c36.1598966077.git.esben@geanix.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-3.1 required=4.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ff3d05386fc5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_091552_294109_1DDFB946 X-CRM114-Status: GOOD ( 11.53 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Let Linux manage pinmux setup of SPI1 pins instead of relying on bootloader to do this. This is especially convenient for boards where bootloader update is not feasible. Signed-off-by: Esben Haabendal --- arch/arm/mach-davinci/board-mityomapl138.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 3382b93d9a2a..44468a804fe8 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -517,6 +517,12 @@ static const short mityomap_rmii_pins[] = { -1 }; +static const short mityomap_spi1_pins[] = { + DA850_SPI1_SIMO, DA850_SPI1_SOMI, DA850_SPI1_CLK, + DA850_SPI1_SCS0, + -1, +}; + static void __init mityomapl138_config_emac(void) { void __iomem *cfg_chip3_base; @@ -585,6 +591,10 @@ static void __init mityomapl138_init(void) mityomapl138_setup_nand(); + ret = davinci_cfg_reg_list(mityomap_spi1_pins); + if (ret) + pr_warn("SPI1 pinmux setup failed: %d\n", ret); + ret = spi_register_board_info(mityomapl138_spi_flash_info, ARRAY_SIZE(mityomapl138_spi_flash_info)); if (ret)