Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp677929pxu; Thu, 3 Dec 2020 09:54:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNwaqZICb0KJthnOKUKvZ5mxMnsixKlY0bkklcKuWKMRhSIznNenBqNHGq+nqS6ps1keuS X-Received: by 2002:a05:6402:114b:: with SMTP id g11mr3993364edw.228.1607018076626; Thu, 03 Dec 2020 09:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607018076; cv=none; d=google.com; s=arc-20160816; b=wMzEO0/mq5GXDGuBVl0a9DMDimMrOSVWkPf4ySAO/PwcXqt2HgBHPuWMFJ9j+soNWY lWYd5zpHKPQT9rk9AHcWxIFCfnD1DrLhi1ooY6e7Mzjq2oDq7RKb5ww+B2/rd1lehcAq 3K7crvNLMR94AQHzIOS99/1D0/aXw8gdMHMtUZe+dYcbwaE5ShTsH6ejUjV5GrZyOz7+ EmhVzAJh6/1+lP+2ULzGc0CDRNFnr9uV2jy/C05FzqtmkNBOz/MS7evvDRmTsQcrHWvC zcVIRqZPmWE5LlM6JTtZtD1I2fkhS3oX2p+/dL6KXy9zGXFQ6Uz5n/utpFguGhiFq/2w Niew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=f/lU7wZvUZo1FXkT5r4NrXSCYN/0Xgw0B9cmSE39UdA=; b=a/v1oCR7IhTBnVG6eCaBkSXbibFnPz4oheSaJ3qiIa4PnufYgRCyxG0Quq2LL8Mjcy dx3HOJ/OEnNhp3zP+XajDc2MB2VCmA29c08Vu6DlbwNpTHy53KWTtuqh805CNwiCmP7e HrYVEiEawbbOCzQp7LqxKNWVEkZ+GK5V0jR8miNg6hups5oIBP4ANy7Dtt1k7O31hrqb h5GUZMceNbeO8icOnkevAXsH7A84swFe7bmgahdxDhXMTxXyYL++EW1QNvfJ1iC4z+aI fGCqVnEYcTlYcfAOxF9LvWbGzllC1ZOosiaqaktKw5+EH1D8k8vaZ92rkQnqEwmpJpbh uwdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZIrdH97C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu25si1464344ejb.146.2020.12.03.09.54.13; Thu, 03 Dec 2020 09:54:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZIrdH97C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731405AbgLCRvQ (ORCPT + 99 others); Thu, 3 Dec 2020 12:51:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731330AbgLCRvN (ORCPT ); Thu, 3 Dec 2020 12:51:13 -0500 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65083C061A52; Thu, 3 Dec 2020 09:50:27 -0800 (PST) Received: by mail-ed1-x541.google.com with SMTP id ck29so3018001edb.8; Thu, 03 Dec 2020 09:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=f/lU7wZvUZo1FXkT5r4NrXSCYN/0Xgw0B9cmSE39UdA=; b=ZIrdH97CEuLYgmMBy23rE/QGKt+bIHisjsPFuKIE7wUvYV3UZFNVEhzsNg1prn/CYg Sx+XjGfJnLksyoxByA08Tt86UCiamtth3ueqtTX34kokrB9JwOOMtq5POZ2Zw6Su/7aq uPWhBxRIsrMjAS7wmJJU+ZE18TmWgb4RcxvJBboJCcjcc+aGc9fUTfb78MDX7WiN9A4V WwXRvirp7LKRx8eEWA4HUsV7Nd2QrZg15ajBOsgy/AGi37XTs1sq8kWFOF/1RUnMTstt aeB48LVWJzamq2NvARiHyUNDnIb1uztkt86aJDcTGuaxI8KlB+fcMwpKIUBuOJKRdZd4 x6SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=f/lU7wZvUZo1FXkT5r4NrXSCYN/0Xgw0B9cmSE39UdA=; b=lWlEau2AUyin7r1II56WgZj+wMyaGH9G3fy4lDXBz4N9pp2C9NImTnyx+M08wAFKsq FXeCUGuM1duq7G+BxaZyY2zHtaEUYKRvoSb6+cysl7krAtNUZqBzVLULFfZOfkwpoAak 5K0An075w7epiDmE6z80n+MYRp3FsQetOfEHhHiRXLe0P0J7ZSpq+qiVz99zBhkFFwRg h+yYRi7MThligzHUEIU5wqt0jF6vQdHojiRjfvrP7qbsx9vPZGHCVL6l45jz5Dcu3EUA v6wUrt+qlxtHiQBZIOMfcFK/4bJbPi1AYb3qnkk/T5kbDlxc9GBcLQ7hsDR6xLWOiikr JtHQ== X-Gm-Message-State: AOAM532Z8tY4M7r+HTtEpcokK9QPkeYAwSpvSau3jdgBumou310Jy1u8 pJbv2YuDfCeWfeOsxbk2lnfvHODBz7E= X-Received: by 2002:a50:d6c6:: with SMTP id l6mr3958749edj.80.1607017826093; Thu, 03 Dec 2020 09:50:26 -0800 (PST) Received: from skbuf ([188.25.2.120]) by smtp.gmail.com with ESMTPSA id r9sm1291588ejd.38.2020.12.03.09.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 09:50:25 -0800 (PST) Date: Thu, 3 Dec 2020 19:50:24 +0200 From: Vladimir Oltean To: =?utf-8?B?0JzQsNC60YHQuNC8INCa0LjRgdC10LvRkdCy?= Cc: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Kochetkov Subject: Re: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support Message-ID: <20201203175024.hzivclydoxp6txir@skbuf> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxim, On Thu, Dec 03, 2020 at 08:12:19PM +0300, Максим Киселёв wrote: > From: Maxim Kiselev > Date: Thu, 3 Dec 2020 18:56:12 +0300 > Subject: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support > > This patch allows use of GPIO for the chip select. > Because dSPI controller can't send transactions without hardware chip > selects, so first unused native CS will be set in SPI_PUSHR_CMD_PCS Are you sure? From the reference manual: SPIx_PUSHR bits 10–15 PCS: Select which PCS signals are to be asserted for the transfer. Refer to the chip-specific SPI information for the number of PCS signals used in this chip. 0 Negate the PCS[x] signal. 1 Assert the PCS[x] signal. And the definition is: #define SPI_PUSHR_CMD_PCS(x) (BIT(x) & GENMASK(5, 0)) Notice the BIT(x). I expect that you can set the PCS to 0 and no hard chip select will assert.