Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp495863imm; Wed, 20 Jun 2018 01:39:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKImjRzQSqug3ozgoTuluviLTYycdbfG7HdDgT0CTwk+rBU0ULqFxpgOMA7uiZRdlM2tsutJ X-Received: by 2002:a63:6ecb:: with SMTP id j194-v6mr18047262pgc.158.1529483952732; Wed, 20 Jun 2018 01:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529483952; cv=none; d=google.com; s=arc-20160816; b=QdfRATWn0ah3aa56T/THJpGaFTdysfjMkckf/wHlwJj7NQ/3gGbymdwI7RWS3/7tQP XOqnq6sbrxukqRRg+a9rNnm5X1Tn/BUW/dti9G/AR19O1c231xJ7U8ZVz5ESbMJtHKIU 2jOS0OIDx8NVrmdRPwwWJysI3bxzVbCiUG6OlwPdpwuAkrAjz64Scxrs9U9tffb7xke+ uRcRI02A2s5TMLG9tlLh31h1g1L/kyYvruusfwvo1WmbGZr2tDC+q2tEe71YNC+4WjF3 cb4dV9fFi/Ulut4GBZfnGNinpL1rxEfdcsB4S6c21uGzuVioSLp4kqSvUrFutwYCZiWe X2EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=yUBVxY3XWkhC9ZtepE3dagP2Ibsu2wk5lPjBQy2A2rA=; b=03cMyRVaBZgi6rECwKQMCbwcz7mTvWqC/Ki9NQafQSq9/YtzwkKv1iAETLvG59a2r6 QzIi3XmR6P15zr4MEZw2WH6lz0YvRxVQ2VNy4kkmj95CKIqFnWjlBEy6OEKKJS4eto7T D8vrJbyITihuxT4IcGXzhPflICXC2rHMEBDJfQi8oVvdo4XtGdMLOPZkUHo1xxlR5nv4 jOUO/hoaOUj2lmbe+jdO3RNdt0X1mo9rRZZM/DlNRRVLKVJ7XVweBv5JgjL9kZX6xXcD qOiT1bLeR0wPCnUmdrQljTdoBXAYDLok1qgKQ3pcjKYHh9iKZozEtlZ8jfR1H9LgaIxf jsrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tqfeClOJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13-v6si1803670pln.62.2018.06.20.01.38.58; Wed, 20 Jun 2018 01:39:12 -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=@gmail.com header.s=20161025 header.b=tqfeClOJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754779AbeFTIhK (ORCPT + 99 others); Wed, 20 Jun 2018 04:37:10 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:37041 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbeFTIhC (ORCPT ); Wed, 20 Jun 2018 04:37:02 -0400 Received: by mail-lf0-f65.google.com with SMTP id g21-v6so3680480lfb.4; Wed, 20 Jun 2018 01:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yUBVxY3XWkhC9ZtepE3dagP2Ibsu2wk5lPjBQy2A2rA=; b=tqfeClOJjKs0YbQJmA4f4phlCR8d/Io7WFoZ4lSz/UF/omTSLs6qfYj8ycDvjbTwwk /KHP9A2bk8JbYnciQRbU6wLbECNzUrBboiZbDwun378El++xWZTqMOdq2dASmX6vzeAL /Wz6HeXHS+JoivSY6mJ76bvRjy5aBUpK8ZwayXgGWAvBvLtNjPNQoxz3cB20zjq8u4YQ jWCjeW0SuTsMuZDul5Gg+BwMDa4JBUvHCUybm4fR1cotaVmBuYfrUb0PZ6trpNGnuHas PgNqTY5dGJskz31Rpz8IIG9mI0AKQla6hgQLPcrDbnIE61B1Qi5RsjUFjB5MwOYdKUT3 j5fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=yUBVxY3XWkhC9ZtepE3dagP2Ibsu2wk5lPjBQy2A2rA=; b=Hkvg4qXslQ/5nztcOM4xSL5GSFtyLW6ygkeNsvDgXhp2IPNpxO6fWU6arUNRomWA7D bzOqEJ1DOABRcTYyA81jtSTQ5uT5ngAW7EJ4Dgg5iO77rr8qXmjaSirMYh4Nr7fqc9i0 nT+Rr3AU+CtcQjigjG2uskbaYqg0GLFvIRqFROKhdJaofvcOuLzQrDGQRv0s8jpqTiLg e2AEcwpP0jHTb7PAj+wx7sNwFO/6j8Q/mZTdXXeCY1nTHMMVWS8lixEcV8Muf+fEFHLI 6118pm8U5bOlZx8DtLK4EDTP2ARlbya9AM2Tpeueq01sJj0QZLfiwey6PdFrLtwG/Jqw ZthQ== X-Gm-Message-State: APt69E2AKiTowC3ZiuSkBNrBqpT58sCULlLfHuxSMmOfV08SJTFVPj6v 4tarrzN/6srEZxExwe2KJm1Te/Uy X-Received: by 2002:a2e:5358:: with SMTP id t24-v6mr13793436ljd.129.1529480112692; Wed, 20 Jun 2018 00:35:12 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id n84-v6sm287354lfi.19.2018.06.20.00.35.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 00:35:11 -0700 (PDT) From: Esben Haabendal To: Mark Brown , linux-spi@vger.kernel.org Cc: Kurt Kanzenbach , Angelo Dureghello , Nikita Yushchenko , Sanchayan Maity , Yuan Yao , linux-kernel@vger.kernel.org, Esben Haabendal , =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Subject: [PATCH 12/12] spi: spi-fsl-dspi: Enable extended SPI mode Date: Wed, 20 Jun 2018 09:34:42 +0200 Message-Id: <20180620073442.20913-13-esben.haabendal@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620073442.20913-1-esben.haabendal@gmail.com> References: <20180620073442.20913-1-esben.haabendal@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Esben Haabendal Set the XSPI bit for devices configured for XSPI mode (currently LS1021A), and thereby switch to extended SPI mode, allowing for SPI transfers using from 4 to 32 bits per word instead of 4 to 16 bits per word. Signed-off-by: Esben Haabendal Cc: Martin Hundebøll --- drivers/spi/spi-fsl-dspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index eed55491b2c9..1f85dcdb2203 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -46,6 +46,7 @@ #define SPI_MCR_PCSIS (0x3F << 16) #define SPI_MCR_CLR_TXF (1 << 11) #define SPI_MCR_CLR_RXF (1 << 10) +#define SPI_MCR_XSPI (1 << 3) #define SPI_TCR 0x08 #define SPI_TCR_GET_TCNT(x) (((x) & 0xffff0000) >> 16) @@ -968,7 +969,8 @@ static const struct regmap_config dspi_xspi_regmap_config[] = { static void dspi_init(struct fsl_dspi *dspi) { - regmap_write(dspi->regmap, SPI_MCR, SPI_MCR_MASTER | SPI_MCR_PCSIS); + regmap_write(dspi->regmap, SPI_MCR, SPI_MCR_MASTER | SPI_MCR_PCSIS | + (dspi->devtype_data->xspi_mode ? SPI_MCR_XSPI : 0)); regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR); if (dspi->devtype_data->xspi_mode) regmap_write(dspi->regmap, SPI_CTARE(0), -- 2.17.1