From mboxrd@z Thu Jan 1 00:00:00 1970 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 A18F6C48297 for ; Fri, 9 Feb 2024 16:56:02 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oCwkJhAezfGpYfd8w35n15c33osHNkGvbNDaDGnj4sk=; b=AV9eVhGxzZ6RRX +hViwuDOx+I59sgGBttumOEbArcMjRBlqenIK6VBB89LHdJQjlnksHHDMoVqweRQUqigDsLfpXbQK 1Fs92D2BKFhosA1pogqGc9jJZ9AvO8Ap/4BygB6cOrCKd9oAd9C1qjRDQeM3FPTq4fEKe/AneLz6s BoBWQFuWO6SHm+NCydz9pI4eTgJ6cy4hqT6Mu/JwEJBdbjV/AOiaPnhwI3khqrDusSKYA9y/DLA1C YPjIZVLNO+nSfd5gAolcW7Aqz6hYzA/5jTQamBby1CnRsyYLqkhT2KzurL72vyljc8xdPVGKkg8rN aeZAKGxnoYYw/M+uEsQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYUAK-000000001YX-1BRm; Fri, 09 Feb 2024 16:55:52 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYUAG-000000001Wg-2G4W for linux-arm-kernel@lists.infradead.org; Fri, 09 Feb 2024 16:55:50 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33b4e6972f6so562209f8f.2 for ; Fri, 09 Feb 2024 08:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707497746; x=1708102546; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/epRNUqk5bS4B27yS6gbt0yFbjWLwovjSS3KxytHN1E=; b=KDH9reskWyyCLkoQekpA3Lh8lL2z2NGTKfB0o8f5YKBUThHKW4xrsHBlwJgBqhZrFX ScrUlcnZ+zlonPOYKNWA3pW55Eub1KtPOOrL/1TDg9EzBKhT5UQ0eWtQ9PL6YRunntF0 8uzjOKjzpPtN7oywF7TJ3nKjBrzGxX7RUF05+OzkG5HjewrCJ0F1SdDxBa8y/03ItgM2 394OwwlpT9Er5K63ekYXsuUjFA34Em/LmDf3lsQlwErDaRSgwB+klX5oBQxWuQez6vlA 13sLPoLJcqCqiVsAI+WU8RVV+/zxuXsAAff4P3JyOSUgyM8t8c0DoohXdL3vHz578/24 +IKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707497746; x=1708102546; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/epRNUqk5bS4B27yS6gbt0yFbjWLwovjSS3KxytHN1E=; b=m0+mdoGNDGsgzK6+utVD+OAU3p86XBrG7GiJ4DXFh6e7G48DmZZGoXktqLX3WORNr5 thdK+3Ua2svkR/e/qnIE+ARKHJsIrv7ZmuCJKRYHYZooFHnyNzL9YPewq6aTHVw8v1gQ 1ZrMJaee9CipSv4JF+IvEyMUNetjSfdl4FNkGhuAiItnOLGCzi0CGnc9Op3fvK2sW5JE oVW+rser1fMmxaMi2PRIrqbolQIXJ/sepdKaTmuRa3RUF7Fq4WndHT7QjE8zNlgcdzcl rHeRmxdzbGsQpuxsZpSJyiBY1oKuQrQVFUYr/k1DU646dKeiA5U39yHptnraUczKhfyB LYBA== X-Gm-Message-State: AOJu0YxokiO5NV5+c6O+YigUJMzg3SXhMG91XsoSIwQCxTkoBb7OspEx h4qTqIKy9ow9XfPOUelUYxFnSKaDwV42tClkgZbZZT4AflZ9obxCFdbsP5N9iUE= X-Google-Smtp-Source: AGHT+IGDz7nT4Hwxrg8DOKvtqArAeRo/nRjYmEWj2rJqTy0Lf8i1frf6JpbdvA41af5doIW8cHQ81Q== X-Received: by 2002:a5d:4e46:0:b0:33b:65b7:615 with SMTP id r6-20020a5d4e46000000b0033b65b70615mr1735251wrt.49.1707497745976; Fri, 09 Feb 2024 08:55:45 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWwhnLUL9UmyZIkCpUXjW5FkEFhj65h0qSQTsUTtF817VZoSsFj9X3pMMYZiPwDP+pWEGWJwZiWGYkC4wtYXuw2jAtdwyAYGMZpJtNWENWJ1BOhoAkekX2adTD1gaVGh7lK9vF/rEdOr6E1LJSKO1GEFIBIhJpUMA8vd0neupmmfKIHStt2L7mqLCkK+JiXach6DRjOfSjvAd6Mz/iTm60+u5+5PxT2oZFjoEWUS8lloImx+CiRE2vp/ByweyqU4TadmUzU/0f3+7dSu2EkAxRUUihUNI/PP877G+f/hmSmDf9NDeeMhdm1VvRmEupd4717iSlFLLQWN6NqMBjW2I5jUL0eq6ddA7A3/ws0270PRuQYPndA5EyQmhvL0P4tcxRQox99XvfNmQJi/jRevWw8U2YLl4epeT1ahQ9dQ+L3/RXqbFb6DIIyLkmAtreN4Jz4eXBSw98MflqaOAc4SlbMJHeM9M9qbb7mMHPh9KZxbyy6IrzJwuVAG3dlAOsHykjjsEvsO4jDRCm119NbPoERI7I2qs9Z/+EixzwBSRpKYLSmiIE4rKzOiqh2ojf/zWzpiYV7YrF7MkDbJK03Gt6eor5+ECUR5J1AOOjwInQKfn4w Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id u7-20020a056000038700b0033b5730d6aasm2329011wrf.10.2024.02.09.08.55.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Feb 2024 08:55:45 -0800 (PST) Message-ID: <0ac8d573-6486-458d-afb9-090b5f8d4a21@linaro.org> Date: Fri, 9 Feb 2024 16:55:43 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 01/12] spi: dt-bindings: introduce the ``fifo-depth`` property Content-Language: en-US To: Conor Dooley Cc: Geert Uytterhoeven , broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org, krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, conor+dt@kernel.org, devicetree@vger.kernel.org, arnd@arndb.de References: <20240208135045.3728927-1-tudor.ambarus@linaro.org> <20240208135045.3728927-2-tudor.ambarus@linaro.org> <20240208-grating-legwarmer-0a04cfb04d61@spud> <20240209-chest-sleet-a119fc3d4243@spud> From: Tudor Ambarus In-Reply-To: <20240209-chest-sleet-a119fc3d4243@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240209_085548_625970_A6D456D0 X-CRM114-Status: GOOD ( 24.91 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/9/24 16:21, Conor Dooley wrote: > On Fri, Feb 09, 2024 at 01:56:56PM +0000, Tudor Ambarus wrote: >> >> + Geert >> >> On 2/8/24 18:24, Conor Dooley wrote: >>> On Thu, Feb 08, 2024 at 01:50:34PM +0000, Tudor Ambarus wrote: >>>> There are instances of the same IP that are configured by the integrator >>>> with different FIFO depths. Introduce the fifo-depth property to allow >>>> such nodes to specify their FIFO depth. >>>> >>>> We haven't seen SPI IPs with different FIFO depths for RX and TX, thus >>>> introduce a single property. >>> >>> Some citation attached to this would be nice. "We haven't seen" offers >>> no detail as to what IPs that allow this sort of configuration of FIFO >>> size that you have actually checked. >>> >>> I went and checked our IP that we use in FPGA fabric, which has a >>> configurable fifo depth. It only has a single knob for both RX and TX >>> FIFOs. The Xilinx xps spi core also has configurable FIFOs, but again RX >>> and TX sizes are tied there. At least that's a sample size of three. >>> >>> One of our guys is working on support for the IP I just mentioned and >>> would be defining a vendor property for this, so >>> Reviewed-by: Conor Dooley >>> >> >> Thanks, Conor. I had in mind that SPI has a shift register and it's >> improbable to have different FIFO depths for RX and TX. > > IDK, but I've learned to expect the unexpectable, especially when it > comes to the IPs intended for use in FPGAs. > >> At least I don't >> see how it would work, I guess it will use the minimum depth between the >> two? > > I'm not really sure how it would work other than that in the general > case, but some use case specific configuration could work, but I do > agree that it is > >> I grepped by "fifo" in the spi bindings and I now see that renesas is >> using dedicated properties for RX and TX, but I think that there too the >> FIFOs have the same depths. Looking into drivers/spi/spi-sh-msiof.c I >> see that the of_device_id.data contains 64 bytes FIFOs for RX and TX, >> regardless of the compatible. >> >> Geert, any idea if the FIFO depths can differ for RX and TX in >> spi-sh-msiof.c? >> >> Anyway, even if there are such imbalanced architectures, I guess we can >> consider them when/if they appear? (add rx/tx-fifo-depth dt properties) > > I think so. > >> Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml: >> Override the default TX fifo size. Unit is words. Ignored if 0. >> Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml: >> renesas,rx-fifo-size: >> Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml: >> Override the default RX fifo size. Unit is words. Ignored if 0. > > These renesas ones seemed interesting at first glance due to these > comments, but what's missed by grep the is "deprecated" marking on > these. They seem to have been replaced by soc-specific compatibles. In the driver the renesas,{rx,tx}-fifo-size properties still have the highest priority: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/tree/drivers/spi/spi-sh-msiof.c#n1350 Maybe something for Geert, as I see he was the one marking these properties as deprecated. I guess he forgot to update the driver. Anyway, I think we shall be fine, even if we don't hear from Geert. Cheers, ta _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel