Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2617342yba; Mon, 8 Apr 2019 00:33:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlrYASf/FaGF5GVtA9suXmiJAY2dA5cM7W3ux26MjucIkI/4ixdmfxQ72xa1z9zVfNmS87 X-Received: by 2002:a65:6295:: with SMTP id f21mr24963127pgv.129.1554708800708; Mon, 08 Apr 2019 00:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554708800; cv=none; d=google.com; s=arc-20160816; b=n7K55QnYjenne8HJjBeVWD3tGVrHWI5JRVpCGgzxDwHCwdJaLWfAlgn18GpbnKvQsx Ojs7GwxFyfvL2Kd0WelR0T1t7jIq1grR4nTZ+XKMelSEN3giw8mUUxRPjLU5h9UI3L+m GCeKDDR/6Chlve+LlX6Lm4gIwwd8FtAXDREXFEvDqTTA2Ta1F813Wr2qJRCjm+QGneo1 H+3qpJXIvAEx7eThmMyfcfvVmDVHjBAxKeBtobb4SdBQ6zVmFLYr+oTm7xLTqAglnKVr fucFmSRTXjjbzWwhno39Tt0g5cJ41iYV2YORQelwSNwZtDTUDjr9wipQN09vkAMaakKL 3MxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=ITrwBjYxRF02082MkJnJP0JWiVmsSZWqXgap45mz8Zw=; b=b/0TfDMyow5nhzQtZu2o0qGGqD5cqLQvEfPMNW9KFHb24h1GSAhE3/rQEeE0YVedyw IThVlEDxlmNjda/I3ycgcFYJkMKIVnwcYj61MoTVWbkpsg56B4eTQuZYphjcx7VfC9gz niPGyM6dFe3WmcUxan+lTzBOIGzLZXhvtaUKuPQd1sJ6sdjtuQdoiTLUOaoyYw5t+NSP OoWfXtMko+pJcg13EZ2E+O0rfxVTbT+Aq3JhZNIu8HIhZd1ZeNutIVSCISGH+JnCwy9F Y9kLUaIclDrG3LwKyrlKDqEmijnuqd2QaQYIqF/+3s1r5Eb2L+YkG9OviB5g7JfMf0+w gxgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RDofjGNB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si25571672pfa.63.2019.04.08.00.33.05; Mon, 08 Apr 2019 00:33:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RDofjGNB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbfDHHcZ (ORCPT + 99 others); Mon, 8 Apr 2019 03:32:25 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44342 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbfDHHcY (ORCPT ); Mon, 8 Apr 2019 03:32:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=ITrwBjYxRF02082MkJnJP0JWiVmsSZWqXgap45mz8Zw=; b=RDofjGNBViq+ pUTAX9OZ6zRzFZJXx9ovBBD+qsUAL7Kg29L6UXQNw1wpVzm8nABYs+l0GKjywfsHwwl1skWAjv9/z TlGWmlErGt4JFbRro6SI90K3I0KrBA0itN8nZA6mYZCSSs5XdziizL3bKHUVPRQ3npnnzME28GRtK BHjyo=; Received: from [8.46.76.46] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hDOlN-0003xl-0X; Mon, 08 Apr 2019 07:32:18 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id BC75D441D3C; Mon, 8 Apr 2019 14:32:06 +0700 (+07) From: Mark Brown To: Sowjanya Komatineni Cc: Mark Brown , thierry.reding@gmail.com, jonathanh@nvidia.com, talho@nvidia.com, skomatineni@nvidia.com, broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, kyarlagadda@nvidia.com, ldewangan@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-spi@vger.kernel.org Subject: Applied "spi: tegra114: add dual mode support" to the spi tree In-Reply-To: <1554423259-26056-8-git-send-email-skomatineni@nvidia.com> X-Patchwork-Hint: ignore Message-Id: <20190408073206.BC75D441D3C@finisterre.ee.mobilebroadband> Date: Mon, 8 Apr 2019 14:32:06 +0700 (+07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch spi: tegra114: add dual mode support has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 9877a347f2056f7aa4e770de9a20048ad288f545 Mon Sep 17 00:00:00 2001 From: Sowjanya Komatineni Date: Thu, 4 Apr 2019 17:14:07 -0700 Subject: [PATCH] spi: tegra114: add dual mode support This patch adds support for dual mode SPI transfer. Dual mode uses both MOSI and MISO lines in parallel where the data is interleaved on MOSI and MISO lines increasing the throughput. Packet from Tx FIFO is transmitted on both MOSI and MISO lines and packet to Rx FIFO is received from both MOSI and MISO lines. Even bits are transmitted or received on the MOSI data line and odd bits are transmitted or received on the MISO data line. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown --- drivers/spi/spi-tegra114.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 402799c7f6b7..1e749ce13029 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -786,6 +786,11 @@ static int tegra_spi_start_transfer_one(struct spi_device *spi, total_fifo_words = tegra_spi_calculate_curr_xfer_param(spi, tspi, t); + if (t->rx_nbits == SPI_NBITS_DUAL || t->tx_nbits == SPI_NBITS_DUAL) + command1 |= SPI_BOTH_EN_BIT; + else + command1 &= ~SPI_BOTH_EN_BIT; + if (tspi->is_packed) command1 |= SPI_PACKED; else @@ -1152,7 +1157,8 @@ static int tegra_spi_probe(struct platform_device *pdev) master->max_speed_hz = 25000000; /* 25MHz */ /* the spi->mode bits understood by this driver: */ - 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 | + SPI_TX_DUAL | SPI_RX_DUAL; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32); master->setup = tegra_spi_setup; master->transfer_one_message = tegra_spi_transfer_one_message; -- 2.20.1