From patchwork Fri Feb 16 07:05:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13559611 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 3A78AC48260 for ; Fri, 16 Feb 2024 07:06:20 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BIVXvsVNTG+T4sK9ixciSLTlS6TLxpcpFE/U9URdaxU=; b=IP5+iXZKRYjCwj 8OlyHFJ/oWJf82q/SeSbqB4omtnuieNKIctL9yl3BF13n8G/a/d0WLl6eBM96ke5Wg4wVOLDnn+lJ OaUNDk6oBG6HwuZdZwOlDGm6IWF+eJHlXjfYd049Y104ZJhnOam2LDcVemKCMgaZx12bPrf9ucQxq GUbRliPxny/leuhn+cTr/OMLtjZ7QTlcidBWE4Sq42fP6au7F81CsfGPY30KbaqyLSSu+/ImordSn SWb6igo+E13iIT2ZKH64VkpgD/OqKKn1o0pwrx3Xid7zxK7uph7kXPvEk8WRyf5tsJLNUqOGs/gqH E84ZahCPGOonBP9T+tyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIR-00000001J9h-1CXq; Fri, 16 Feb 2024 07:06:07 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIM-00000001J87-1HWB for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 07:06:05 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-41242adfdd7so1911765e9.1 for ; Thu, 15 Feb 2024 23:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708067160; x=1708671960; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8D7ZEx/LF+mDksAYVmzVu5K6Rxew4tV88XlD+DBkpGU=; b=osNKySn68bRebDkJJmj+JS0HYz5y5ipC7r3QCP3w8vL2/C8Q6rePbObqkq3XLG1dcF QOChsFPQ3eoUoqBITDh0UMimmnZgzafgl9OLwGBPBmufiEYJzZXIipD2Ro8OCOsBfAEm 5c2qlkNpXIz/tWJ1hs+St9DMZRkbL+NhXpoQFSXQQO/GvV/r2gPPa3+qRhu6Dxbk4PMs VYMkCjd0azV4NRXEBnGodyk6WnAfs0FsTLeFsNgWfEA4VIypNV8OQG4h12bFZjnd7xS2 +rGr02bAC2cO1YFnoayVrRWUONC7exj1tajMNcEECuE7ym4w8UTUT0+iSRUSZpQDsw6e +n6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708067160; x=1708671960; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8D7ZEx/LF+mDksAYVmzVu5K6Rxew4tV88XlD+DBkpGU=; b=YytsDnXZORv3Gp1L2hNiQGR4lMGcPEKjUPcNT61c6yw9SdUBovMy67nJ4FYXxKaH+B eZ/0wkyJNx8O/q69Z/Jjqox0B8D2/u3zHRoFln7iKzeG5R7t1p5OcprQBRzNUBx0cFN7 3wlxef3IGBavPpAjLC4ijFZglS7KETbMCU6mgVE3+5wfHPsrWH4cmtoY0wEj49FDYnzW IrqjzS0pINfF14TjnTwih4xgge/ynyL5Am1epOtY7I84mTlVn6vu4m2hAACWEcFNtH6S BCXD8VaVLuBVPeATvbZvJLDGfVbJWl8lFpSlvGG8aGyDrzfOksaRa7rei8UQINkm/b/N Xf+w== X-Forwarded-Encrypted: i=1; AJvYcCX6wA8KLT4PVTaVP/RZGjLViPWNATLsAyHqoubmYkF7C0QSTqeaLADtOPp+9dcZicd9aJ9tw+CSN9f5R0n7/ysUJvT1YxFxkBcWlBjsuT7Ukbj4eGY= X-Gm-Message-State: AOJu0Yy0Ca2kZJ9gERcP/XNdrTWIQJ2S6VVpHnyC53iWFeUkBGfSYOL4 6heFJH1KzdHoTTsPOaJsejLiYlpVIz3wGqTMvnKNkmGTHL9OLAJ3QKtD8+qGyMo= X-Google-Smtp-Source: AGHT+IEaVVo8epQKUlxIIvLhi2Q03wenfAIfbN8GFZX4RL21UNSksOlgMTjHKy944oORUJuiWp4u+Q== X-Received: by 2002:a5d:5387:0:b0:33d:13b6:1dd6 with SMTP id d7-20020a5d5387000000b0033d13b61dd6mr1938422wrv.39.1708067160583; Thu, 15 Feb 2024 23:06:00 -0800 (PST) Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id k18-20020a5d66d2000000b0033940016d6esm1298839wrw.93.2024.02.15.23.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 23:05:59 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, krzysztof.kozlowski@linaro.org, semen.protsenko@linaro.org, conor+dt@kernel.org Cc: 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, devicetree@vger.kernel.org, Tudor Ambarus Subject: [PATCH v3 01/12] spi: dt-bindings: introduce FIFO depth properties Date: Fri, 16 Feb 2024 07:05:44 +0000 Message-ID: <20240216070555.2483977-2-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog In-Reply-To: <20240216070555.2483977-1-tudor.ambarus@linaro.org> References: <20240216070555.2483977-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_230602_373372_61078F6E X-CRM114-Status: GOOD ( 11.11 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There are SPI IPs that can be configured by the integrator with a specific FIFO depth depending on the system's capabilities. For example, the samsung USI SPI IP can be configured by the integrator with a TX/RX FIFO from 8 byte to 256 bytes. Introduce the ``fifo-depth`` property for such instances of IPs where the same FIFO depth is used for both RX and TX. Introduce ``rx-fifo-depth`` and ``tx-fifo-depth`` properties for cases where the RX FIFO depth is different from the TX FIFO depth. Make the dedicated RX/TX properties dependent on each other and mutual exclusive with the other. Reviewed-by: Rob Herring Signed-off-by: Tudor Ambarus Reviewed-by: Conor Dooley --- .../bindings/spi/spi-controller.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml index 524f6fe8c27b..093150c0cb87 100644 --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml @@ -69,6 +69,21 @@ properties: Should be generally avoided and be replaced by spi-cs-high + ACTIVE_HIGH. + fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Size of the RX and TX data FIFOs in bytes. + + rx-fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Size of the RX data FIFO in bytes. + + tx-fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Size of the TX data FIFO in bytes. + num-cs: $ref: /schemas/types.yaml#/definitions/uint32 description: @@ -116,6 +131,10 @@ patternProperties: - compatible - reg +dependencies: + rx-fifo-depth: [ tx-fifo-depth ] + tx-fifo-depth: [ rx-fifo-depth ] + allOf: - if: not: @@ -129,6 +148,14 @@ allOf: properties: "#address-cells": const: 0 + - not: + required: + - fifo-depth + - rx-fifo-depth + - not: + required: + - fifo-depth + - tx-fifo-depth additionalProperties: true