From patchwork Sat Jun 24 13:16:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13291661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B868EB64DA for ; Sat, 24 Jun 2023 13:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DJXIEA1+lZ5sCiqL4N5gfZNhhBc0XzL1xww7HtIwD2g=; b=fx6C4D34hEj0ay l7AqupjSVdDkZMbDkdNhfGvBXdnx77cG45cvVZ/X3OS5oxUOnEEe5vVKdFgGQDto3rUh2eotth4Qs tTJ78oAq9nT9unyZiBOHyYMb6/MTPZkd8+ijWg1f+iaSj9W24PGqJKALvYGIx1JwscS08KyIXmLmC GpBnrmjivvsldMUGWlFVr4wDU/aONadoTqvJntrZeORFpqjh2faHqS5GQQcuaO+Bb+hmQCR0NKMyx WiJt13Ye60fwZkAZj8h5tk5oPjN7GhvsTUdEZYiYtGf+odwBxT2aQKaNUcyxoeDc6vUWlotv4u/RN Dy5qJqdTJDZVs8h9OW1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qD38U-0061EU-3A; Sat, 24 Jun 2023 13:17:06 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qD38Q-0061DM-1Y; Sat, 24 Jun 2023 13:17:03 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fa7eb35a13so12711935e9.0; Sat, 24 Jun 2023 06:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687612621; x=1690204621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x4HOHpTuxkhDI1uIn7GRBULu0rY5eOvyg0W/1k8C9T4=; b=rUrqWapO4pYhvePnS7Vq1czHnSJ9zPSgqsffqLURJUNHIlAZ8ys2Si7q8pQzxZ74tt FBZszCa8TucARVI8q8sZ9Avu+4Lj6Ctpu46rODvpVqB85qOYaTwYqiX6LQlZb+GFLdXi nW9isyDNnVfiAdioaHD73UdoRS6Hzlo3qFVh2wPjkV/LjRolMt26XqzDM9xRpUkXeV0P a1D+kktEkyFfedDfIJFTLbpXVq1Sv/peqNNlFZGEGDc1PsG8gDz5zzBWi5Q2u+8RNkf7 /m2w4STUaHct/MJ2jp2F/Xb8cf5To/tikiCVX745Mml/Wtkd+V3xnDjwHz4NJZWDiild GNgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687612621; x=1690204621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4HOHpTuxkhDI1uIn7GRBULu0rY5eOvyg0W/1k8C9T4=; b=LL/jIWk9jLErJVXlbW+H/XxUiVsunve4WdS79OQSTHvQ0oDDjOz8rb4Vyhq/9NG/cj DPiyHtga3NUYtYAcnKUZRkRzJrB+/apibLtanR8/0SE/YucnUXVvsuERUjlkB1614amw zvp16e8SDHfnWceRZ/WJ8yfC/6WO4/WuNt0gfoM0I9sVIZBGzyw2LpBXYN3WCVI0O0bg bU+A4cMfR1z2zveXQ+oXsX/YI2WZwGgH2KW0GhmbA9Mk7GvyamGeQI9SHgkROgtzZ7+U 13vsM3rmq2g2Xh4VZukRIEPdAoqPuesfBt9a1qI1+8fVOkIr4Q5BfYsMAiBX8FLlRv8f b39A== X-Gm-Message-State: AC+VfDwoHPXe+lkxSvu40v5sngRQyNpffDPFDYJQV05pnrGWlf9OBDrD ZWTlDiAc6eGiLm5HGSw/INM= X-Google-Smtp-Source: ACHHUZ7xACTfdartW6THNtoCrYALyLgEq0fwWG5cJD775ZZVWt6/8PJrOTn9k1ZPAJRW/uUOUStIWQ== X-Received: by 2002:a1c:f70a:0:b0:3f7:34dc:ed0d with SMTP id v10-20020a1cf70a000000b003f734dced0dmr16795214wmh.25.1687612620714; Sat, 24 Jun 2023 06:17:00 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id l1-20020a1ced01000000b003f9b0830107sm5107428wmh.41.2023.06.24.06.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jun 2023 06:17:00 -0700 (PDT) From: Maksim Kiselev To: linux-spi@vger.kernel.org Cc: Maksim Kiselev , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Mark Brown , Andre Przywara , Cristian Ciocaltea , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/3] spi: sun6i: add quirk for dual and quad SPI modes support Date: Sat, 24 Jun 2023 16:16:22 +0300 Message-Id: <20230624131632.2972546-2-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230624131632.2972546-1-bigunclemax@gmail.com> References: <20230624131632.2972546-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230624_061702_523336_D90BF7D0 X-CRM114-Status: GOOD ( 15.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org New Allwinner's SPI controllers can support dual and quad SPI modes. To enable one of these modes, we should set the corresponding bit in the SUN6I_BURST_CTL_CNT_REG register. DRM (28 bits) for dual mode and Quad_EN (29 bits) for quad transmission. Signed-off-by: Maksim Kiselev --- drivers/spi/spi-sun6i.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 30d541612253..cec2747235ab 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -83,6 +83,9 @@ #define SUN6I_XMIT_CNT_REG 0x34 #define SUN6I_BURST_CTL_CNT_REG 0x38 +#define SUN6I_BURST_CTL_CNT_STC_MASK GENMASK(23, 0) +#define SUN6I_BURST_CTL_CNT_DRM BIT(28) +#define SUN6I_BURST_CTL_CNT_QUAD_EN BIT(29) #define SUN6I_TXDATA_REG 0x200 #define SUN6I_RXDATA_REG 0x300 @@ -90,6 +93,7 @@ struct sun6i_spi_cfg { unsigned long fifo_depth; bool has_clk_ctl; + u32 mode_bits; }; struct sun6i_spi { @@ -266,7 +270,7 @@ static int sun6i_spi_transfer_one(struct spi_master *master, unsigned int div, div_cdr1, div_cdr2, timeout; unsigned int start, end, tx_time; unsigned int trig_level; - unsigned int tx_len = 0, rx_len = 0; + unsigned int tx_len = 0, rx_len = 0, nbits = 0; bool use_dma; int ret = 0; u32 reg; @@ -418,13 +422,29 @@ static int sun6i_spi_transfer_one(struct spi_master *master, sun6i_spi_write(sspi, SUN6I_GBL_CTL_REG, reg); /* Setup the transfer now... */ - if (sspi->tx_buf) + if (sspi->tx_buf) { tx_len = tfr->len; + nbits = tfr->tx_nbits; + } else if (tfr->rx_buf) { + nbits = tfr->rx_nbits; + } + + switch (nbits) { + case SPI_NBITS_DUAL: + reg = SUN6I_BURST_CTL_CNT_DRM; + break; + case SPI_NBITS_QUAD: + reg = SUN6I_BURST_CTL_CNT_QUAD_EN; + break; + case SPI_NBITS_SINGLE: + default: + reg = FIELD_PREP(SUN6I_BURST_CTL_CNT_STC_MASK, tx_len); + } /* Setup the counters */ + sun6i_spi_write(sspi, SUN6I_BURST_CTL_CNT_REG, reg); sun6i_spi_write(sspi, SUN6I_BURST_CNT_REG, tfr->len); sun6i_spi_write(sspi, SUN6I_XMIT_CNT_REG, tx_len); - sun6i_spi_write(sspi, SUN6I_BURST_CTL_CNT_REG, tx_len); if (!use_dma) { /* Fill the TX FIFO */ @@ -623,7 +643,8 @@ static int sun6i_spi_probe(struct platform_device *pdev) master->set_cs = sun6i_spi_set_cs; master->transfer_one = sun6i_spi_transfer_one; master->num_chipselect = 4; - master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; + master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST | + sspi->cfg->mode_bits; master->bits_per_word_mask = SPI_BPW_MASK(8); master->dev.of_node = pdev->dev.of_node; master->auto_runtime_pm = true; From patchwork Sat Jun 24 13:16:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13291662 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 387B7EB64DA for ; Sat, 24 Jun 2023 13:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2JgZSgQOojMStHAV3c/boeEjxmKnqZ9Z9c52+kf0tfM=; b=bSBiTmHqutNL9Y 0j9RKar7XtE7s24GuLbkmD3H14d2VxL5ph93b6/3m71/OfbVbaqfvy7Ouocv8dhfLM57OpGDdLwBR NyR/JBJO5duATpwAOYTNPX3nQwyncikwMUkhfjcEPzWDujInppefruTfy+XP7m2BmWrzmV9ltQBF3 rIoIjJGa3FzdVTiFQiPB3tGUWMYRHs2maxCQSEHH/YTE+2y8X5bcT5t58y45ZQZNEhWbrSuHdW8pT TlYgz07qdJcD9XZx6pR+YVDvDvtCBXqhiW5mxJLcaj2fJcoCczyRXuVWP93rWaeuW96+3+WLDaX70 4udnlmt5qz/ntn0YuWOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qD38d-0061H0-0p; Sat, 24 Jun 2023 13:17:15 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qD38X-0061F7-25; Sat, 24 Jun 2023 13:17:10 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f9ede60140so16104955e9.0; Sat, 24 Jun 2023 06:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687612628; x=1690204628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ou3Llv8LccPhD+lVAZHU8h+Zxb2u2iNeLld4FYbDCL0=; b=NLvKfkmODJ7d2w3rY83obV0RROyfN4Jh/Ro2ode6/E4S4XFJcJXyjsKWYOfKOjhW8x pXfDVb1124NzEtabZQXUHmqmWtNYgWGaVGNPllZkGE5e9Qn+qkGU7eWioQpl5vaOsZ7N Q8ZYtWCThoTgD3Pe59L3yF347vv/gcUlsXuYOAWYxHfKlsOkwXuX5QZOVH0r+zxw9gdO KLc8/kwi2EDUxxTByI218Q9nkxa5ZGzY/tG8ghv0iFz1ww4eA+OQVE3/j25Vw9ylv4II okcXkALJkP8xoGaPVZv2Jpnkc9vV9qUAu5FGxTUI9tVQnNYRxcFmy2BQCIsiT605HwXJ gZ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687612628; x=1690204628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ou3Llv8LccPhD+lVAZHU8h+Zxb2u2iNeLld4FYbDCL0=; b=f3kJ/lFrmaP9vLjdWRKBjPyA/c7gXc5L4Xj+O+idYizDj4VPFUviE1kzHnxm94jDrH R4Z1kXXo0OKZ7+yLfrXOpxaOikv3CdNeZjz3GORgiCCrU6KLAJbOG9R74J/8rrq5sxta BhtHXgF8WDUfVAeT8i51JPQihLoeANHWK8HqpKfkQ8iREzKj00gKIZV8Q9nwoNTxjseb /QDB6xI4ORryUonNGcTI2R3wnCjr/9bMq6TVl8p+NNTspxXttzz57GlZxi3qby+Rfick Lwb4FlWZ+7GVvidjbhjCondLE8aE8dwixsGHcl6dePR3LJ2M24JwH3FbfoD5jqCiRXqZ nSuw== X-Gm-Message-State: AC+VfDz+4tdty1CkCVUwTEskeo3UlrsX/nynbNc+/MpqqxBplXs13u3Q eEjy3Hn+Dm7F9U3SsXQc7ic= X-Google-Smtp-Source: ACHHUZ4vCWn1Kwx1tyQ9XpYEiYzeBd75zN/pheQbZRhsK9gz7NDagLNjcdUqx0JgxusaY+v6Bcuiuw== X-Received: by 2002:a1c:6a0a:0:b0:3f9:2c0:b58 with SMTP id f10-20020a1c6a0a000000b003f902c00b58mr14937759wmc.4.1687612628018; Sat, 24 Jun 2023 06:17:08 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id l1-20020a1ced01000000b003f9b0830107sm5107428wmh.41.2023.06.24.06.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jun 2023 06:17:07 -0700 (PDT) From: Maksim Kiselev To: linux-spi@vger.kernel.org Cc: Maksim Kiselev , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Mark Brown , Andre Przywara , Cristian Ciocaltea , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/3] spi: sun6i: add dual and quad SPI modes support for R329/D1/R528/T113s Date: Sat, 24 Jun 2023 16:16:23 +0300 Message-Id: <20230624131632.2972546-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230624131632.2972546-1-bigunclemax@gmail.com> References: <20230624131632.2972546-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230624_061709_684495_6B5DB036 X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Listed SoCs have SPI controllers that can operate in dual or quad modes. This patch adds dual/quad mode bits for spi_master on these SoCS. Signed-off-by: Maksim Kiselev --- drivers/spi/spi-sun6i.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index cec2747235ab..e9144d76bcdb 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -761,6 +761,7 @@ static const struct sun6i_spi_cfg sun8i_h3_spi_cfg = { static const struct sun6i_spi_cfg sun50i_r329_spi_cfg = { .fifo_depth = SUN8I_FIFO_DEPTH, + .mode_bits = SPI_RX_DUAL | SPI_TX_DUAL | SPI_RX_QUAD | SPI_TX_QUAD, }; static const struct of_device_id sun6i_spi_match[] = { From patchwork Sat Jun 24 13:16:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13291663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60D97EB64DA for ; Sat, 24 Jun 2023 13:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ihxb4fy8lMohiUyYiTfJojnXiJk11U4o3lHg7H7UOAw=; b=ReDD5g9ABPCwFw /aS3sJRfVa1RA1KG3OgwHwueQtVME5sgtij5ttanEXLbhFqzNV39entwLhDS7PV17MqAruJWN2baD X4/mzB3oc3W4S52pBFszajV8YXNJjzacQDVbNat5KPnnMSHBpdopTQ1WL8lyGxkwiMy4PEzXPG2op z37Mpg4CotAE0XuGGpa9q12d4L8kANielvctwvV6/IHVhp9Pabzt1ZZigghBgcFe1uMhqvjQyTbyq jx3t1WUP91gFnVBfaS1lH1KujemyxzjtxL/CUxjv2v30zDX0pnHtcNXdFTD6r6ZRfpgbpy0ENd0SJ yMI5K0E1RnMMCUqnm34A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qD38m-0061LH-0p; Sat, 24 Jun 2023 13:17:24 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qD38f-0061HV-0x; Sat, 24 Jun 2023 13:17:18 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fa0253b9e7so14312345e9.1; Sat, 24 Jun 2023 06:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687612636; x=1690204636; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KAYPGxSTFPjM3RqhwW9I/u0fjI7Fx45EUbdLcf3Fbbk=; b=RTqZRv+kicZW7QzVJK3ZagJlTPPID3erCQjK8DbAaVPTMWw3b0mjuGV5SQVg3A7Hfp kTP3MO1AV9lx1/fyLW3WpWXj4HmKkLq3zsShiKr+AZkRpIUvDHPemFoM8d6lYuJBkhVf VwXLSS0PvzKxnzoIXhwxmKBAloifepGmC78ZDgEmk5MbVTY+UmUcnQs8jnP7jUKTgQ1t ovA2xPB5nkCELrRww6By/LY2lIhiGufo89h+gKofzrfcx/6CnBLsCo++cVmYMzLAiVW3 P2v56HjmRyol/JePLMkvownV0cd+4jPAN3a3PkXbpyjqgTMgtriUwWMRfhDtyahMiisK i7jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687612636; x=1690204636; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KAYPGxSTFPjM3RqhwW9I/u0fjI7Fx45EUbdLcf3Fbbk=; b=VL4qmPvKqU3PN+Sm50S2o9iI3c4iACE9ptXarlQPGr+KD9v9avHm5owVAIByy1LybV qRVeyWpTzGfhY1XEuv9/frfc4oRQtG82WbVhrx7Y736eoAikGf3DQduTwYwD5ugyAWzF p9GN5JRcvvgRx+NDMnY76zTtccmPf3MI2hCE8R4MZu3HTiowO5TLmPWrBTMReZb6GTMB vD6uqPQPxd5bvYPhu5HPB9eDNAJEqilcR5pY11FLc/UFT4uAmNckzanYIlLVfyElnkn5 9mjsMXAeah3i2wLW+LbFebzdKOBsGdqOtHbWf3RRoBAM8fGQORTtH8rhbgkPMI0PPrqN dVSA== X-Gm-Message-State: AC+VfDzkx/WagPim7qXB3LxH/WAZmWoVio5tnYg4GIzoBmcqJu8dlXPL HVUthNk5wLmufwoSWr9ZPWI= X-Google-Smtp-Source: ACHHUZ6AxRD4qR+dRoN7S7SE01tpvdTdIi7AeyJugnitjFY045wLn75ojjvOMv78elsfe85Qmldkag== X-Received: by 2002:a05:600c:245:b0:3fa:838d:adbd with SMTP id 5-20020a05600c024500b003fa838dadbdmr1749644wmj.1.1687612635438; Sat, 24 Jun 2023 06:17:15 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id l1-20020a1ced01000000b003f9b0830107sm5107428wmh.41.2023.06.24.06.17.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jun 2023 06:17:15 -0700 (PDT) From: Maksim Kiselev To: linux-spi@vger.kernel.org Cc: Maksim Kiselev , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Cristian Ciocaltea , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/3] riscv: dts: allwinner: d1: Add QSPI pins node for pinmux PC port Date: Sat, 24 Jun 2023 16:16:24 +0300 Message-Id: <20230624131632.2972546-4-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230624131632.2972546-1-bigunclemax@gmail.com> References: <20230624131632.2972546-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230624_061717_338456_30CC9AFC X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add pinmux node that describes pins on PC port which required for QSPI mode. Signed-off-by: Maksim Kiselev Acked-by: Jernej Skrabec --- arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi index 1bb1e5cae602..9f754dd03d85 100644 --- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi @@ -131,6 +131,13 @@ uart3_pb_pins: uart3-pb-pins { pins = "PB6", "PB7"; function = "uart3"; }; + + /omit-if-no-ref/ + qspi0_pc_pins: qspi0-pc-pins { + pins = "PC2", "PC3", "PC4", "PC5", "PC6", + "PC7"; + function = "spi0"; + }; }; ccu: clock-controller@2001000 {