Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp2194827rdb; Sun, 21 Jan 2024 11:30:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQhs7wRb6GPxVImh/hFDL5IZgcIZWSDIlh5zD80o/of73nmy2HAEKuJYw8pfWuHq50y3BS X-Received: by 2002:ac8:7f48:0:b0:42a:355f:b1a1 with SMTP id g8-20020ac87f48000000b0042a355fb1a1mr3523900qtk.64.1705865406778; Sun, 21 Jan 2024 11:30:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705865406; cv=pass; d=google.com; s=arc-20160816; b=ArSFIPaVPJ/K98msgIJlIQq0mHzyQVLitacy6iWgYtJ+2FbKXVZhKw2rl6s1BmyezG DRctBSo6ELBb2AaVEANDjjB3yBtfiDxKSllmVivGX0y6EP9yNbOpd46VWKH1aWTHzXwB oJc5d6ssXQ8OzXSshCEzXbQp7zUVn7WZGrD8O2qoSCF2nnDngOrafa1UvMVN+GurA+Vn ML0NYjxqWzDPZvxSOTH+AExSB0+LjtuxmB0Wn0mSAh0Z7fWNeXzAChgtP6OJ/uFneZ0E ygwckTqVlxWOBnDX6itI0A/6bl76IPxsLV7qNtl9f729cqqNHlKPkgS1ptUDaYElfkTH wThA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=/71KA+Z9avWu2cHYxMou4LBKNLAgsGE7jAm0VTGz0X8=; fh=4URQlIX311vFmYs3qa9NPW5PItQz9V4hSuvnMAvnkKo=; b=MvemXQsHlHtqYi0oMkLACSyy59bkmO5Rz+62ygpkSBjAIxhrrr9GCvVTapcTFblcUb GTaBVJ3kHfPSU4ytZbngYgV4I3zfy56Nkhh34zDP9aCRwKI8SdcYU/10dpAFiRHC0bra 69G1tTKlAJVbLUBMuMOUSmUgUKaRzjGHa/K4jStPknJ7v9JvPTo0B+oF9eTXZteTNDCx x7LTF6V5Cj+uZ+36LPmuP/t9CPfXP4Pb1XQDWsCIdN4oXehckC/bYbtWsvPGTuFGjnZd qoqVEBd+nu+5gFRBlecKqwaKCsQHHr1drOR9vZ18o2COJGHJenA0QweE+BeTYSr+wXB6 BPFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EzlEb1y5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-32153-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32153-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u15-20020a05622a198f00b004298bddb6e0si4069387qtc.359.2024.01.21.11.30.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 11:30:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32153-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EzlEb1y5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-32153-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32153-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 84E3E1C208FC for ; Sun, 21 Jan 2024 19:30:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A0C63839A; Sun, 21 Jan 2024 19:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EzlEb1y5" Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0474A374EB; Sun, 21 Jan 2024 19:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705865394; cv=none; b=o27cbdcWeTEf/nyoRkRk3wlj1IlCVpBVhAdGAiZSWgHAvH92rUMhlaR82c/+rm6SuqMFCglRHY4jMCnvKnkCkiGTeCsp7GXA6nKpbKD2LxjeS9RkXJwKjLwTblvdFkoFYffmF70uyENREU6i6V8nXSyVUrQ00edRIXPs87EdoH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705865394; c=relaxed/simple; bh=lzn/PJQVopxFhMAd/XJ5/RhSi1AeJbr0ckRsdkk0gI8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rbKC+FbNx30rU4myRxCbLPSfllbPUGigKsf7q6mPxBTsy7fAqNzMIYGOIVekzP9qucwXBmp4XpmKoK4NyewXY1vGzQc0LRT0r4ioh5RdEiWC1KRFdD2OTStZPkApOAFWXk4ZIOxazocIAhaAlk6XG0GXR5/Y6S+2/z/eaexBGzM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EzlEb1y5; arc=none smtp.client-ip=209.85.210.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-6e0a64d9449so1657353a34.2; Sun, 21 Jan 2024 11:29:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705865392; x=1706470192; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=/71KA+Z9avWu2cHYxMou4LBKNLAgsGE7jAm0VTGz0X8=; b=EzlEb1y58npGFpNmUQrqgelCwUrjppGPzyQbyEoDvGKo51ZQVkv4qpERCA6UZMFbv0 VjTFum5uYPvlbrwmENWwM8zmRatla2nO+Npoh1VEFuLGBAKPV/QqGybAk3bg9DoLG+fv QKCKb4/vak9qJmhfMCIA5kizQud2usamsBuEiJWToaOgDvXXoN+1UoqJJpxu2oLKD2H6 gGH/jQEPbKPPCEAVbiCM/u0dlYoa9HtpUr+bumLUo7tWHZmFBC5Qd+EGdzLnuPjU3QAp 34NgHz0OQXj/nXDjxnwdeJRODkh/BsyPReVGgqVPy0sZUxdC1Fu18QUWYO/Q5tDg3vfG m2mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705865392; x=1706470192; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/71KA+Z9avWu2cHYxMou4LBKNLAgsGE7jAm0VTGz0X8=; b=Jb7+waRPu5MynhOPjsdRyDOUxxmD1MOAMQG7L+yaHJSIfx6j4sDK5F1nkH1i3/8jmU 3l5elCrRL2+7yFye74Yb8lDtdjRVVrZEPkhv5DzGWBABLq7k2NNiz+OpOeAkggp65fSD FyH1fHbmUuwrRXZ2TyMupptKhgtQfl9884gxSitrP1hlrGonXryDd39XwhCpophW+vay hV+QgWfCh5mTSSvC1EHXwUvOYoKLoZ82hn0Js83kGF3xXd1M0Oevo6ei1zKwPp6Li1v9 UAuzQLOWfNN42K9cAIIxnPpbTeJklbZN+zsBt1qGMi5C49QqkJ+EL2O1pBlOzpb2TTmw 0Wdg== X-Gm-Message-State: AOJu0YwHz5ESpqWTeoNFSCGf72T7I1F3MMYNyMllLl3NsdhKNyFZMvC/ 7F9tTPFnN9uSMY2kW2SgLj/eMURzJNN1yAhTaN7HdxjnJidk3dxn X-Received: by 2002:a9d:480b:0:b0:6dc:813:6c3f with SMTP id c11-20020a9d480b000000b006dc08136c3fmr4133438otf.38.1705865392022; Sun, 21 Jan 2024 11:29:52 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id r28-20020a635d1c000000b005c67a388836sm6901617pgb.62.2024.01.21.11.29.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jan 2024 11:29:51 -0800 (PST) Sender: Guenter Roeck Message-ID: Date: Sun, 21 Jan 2024 11:29:48 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 03/10] spi: Add multi-cs memories support in SPI core Content-Language: en-US To: Michael Walle Cc: Mark Brown , Amit Kumar Mahapatra , tudor.ambarus@linaro.org, pratyush@kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sbinding@opensource.cirrus.com, lee@kernel.org, james.schulman@cirrus.com, david.rhodes@cirrus.com, rf@opensource.cirrus.com, perex@perex.cz, tiwai@suse.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, michal.simek@amd.com, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, git@amd.com, amitrkcian2002@gmail.com References: <20231125092137.2948-1-amit.kumar-mahapatra@amd.com> <20231125092137.2948-4-amit.kumar-mahapatra@amd.com> <3d3a11b1-8396-4d8e-9bb3-61ecb67e7efa@roeck-us.net> <9806d99fab46c928f337b30b21057b3e@walle.cc> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+A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UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <9806d99fab46c928f337b30b21057b3e@walle.cc> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/21/24 10:06, Michael Walle wrote: >>>> FWIW, the problem is due to >>> >>>> +#define SPI_CS_CNT_MAX 4 >>> >>>> in the offending patch, but apeed2400 FMC supports up to 5 SPI chip selects. >>>> >>>>   static const struct aspeed_spi_data ast2400_fmc_data = { >>>>          .max_cs        = 5, >>>>     ^^^^^^^^^^^^^^^^^^^ >>>>          .hastype       = true, >>> >>>> Limiting .max_cs to 4 or increasing SPI_CS_CNT_MAX to 5 fixes the problem, >>>> though of course I don't know if increasing SPI_CS_CNT_MAX has other side >>>> effects. >>> >>> Yeah, I was coming to a similar conclusion myself - the limit is just >>> too low.  I can't see any problem with increasing it. >> >> It would cost a bit of memory and somewhat affect performance sine many >> of the newly introduced loops are bound by SPI_CS_CNT_MAX and not by >> num_chipselect. >> >> It also might make sense to document the new limit somewhere. Prior >> to this commit it was not limited at all. >> Documentation/devicetree/bindings/spi/spi-davinci.txt lists 5 chip >> selects in its example for the use of cs-gpios. >> Documentation/devicetree/bindings/spi/spi-controller.yaml also does not >> list a limit. > > Given that, that the rest of this series is under discussion (and esp. whether > it is the correct way to do it) it might make sense to just revert the picked > patches. > I can't really comment on that, but I found that there is another affected devicetree property: num-cs. Its range isn't limited in Documentation/devicetree/bindings/spi/spi-controller.yaml. Various dts/dtsi files use numbers as large as 8. The range is limited in some bindings files, but not all of them. Documentation/devicetree/bindings/spi/spi-lantiq-ssc.txt, for example, says "num-cs: see spi-bus.txt, set to 8 if unset" Various Broadcom dtsi files set it to 8. So I guess 8 would be the absolute minimum to re-enable support for affected systems. Guenter