Message ID | 20240212140331.915498-2-tudor.ambarus@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-61787-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2449578dyd; Mon, 12 Feb 2024 06:09:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXvRw2mwrYpBqATlzIgT7fAhTFTqAlw/smVK2UTTl61WCNWCG1QvLf9uLZ0GsMezEfKcTNef/m/UAOvIvhKo3uQzh3xfQ== X-Google-Smtp-Source: AGHT+IEujfWIyiKMaTFJhWB4zExOaqswMLBwxK0TGaPDHEVN5ywjrZ1aHq2zlLbwViCV9ljNktwb X-Received: by 2002:a05:620a:12fa:b0:785:d8a3:ab84 with SMTP id f26-20020a05620a12fa00b00785d8a3ab84mr2284156qkl.34.1707746943231; Mon, 12 Feb 2024 06:09:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707746943; cv=pass; d=google.com; s=arc-20160816; b=sHHfCzNOVKi01Aa0OVFAiRLNbMRuw+3+bHafSA7u7iwmdfq7HPg5B8dNkSsomfkgau eCwnTGnztLZQzI/tk8wI+Dt2taRx9jux7wYQ+DEYsQAN+GVRL+BjAwrG0yBOq46CmwBr kWmt1KpErDyAGSrbXoIXXpkIhg41mTdWKO0vaNs1YSzq0pKQ774EXHmJTEr7JzLlVy12 tNRgRGmS88ZoYBX0DJLGS4G9f/kwVBh+rPjfwN8OlGG8PZQdCCt1HO98RfqYmbbCWPL8 PbxGsxgkY53T8TOyNCf97sPRoqpVnEQTmPrY8ddLiaBxSqFbhHPW8Q85tkcFUaYhuZMt o8DQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=eQjx1BYq38FUSUDdH+R5TkxMe5lYPMpuxbAcZUZM76E=; fh=RI/SteN+ayVGKoepbArxxyXSTaHRWY0VODj62X4uUU8=; b=FjobjgtvYqxpKGLOvOlE/PczbhTs6voXUDqSD++NgbQE3qFKeD8lkeVDFmrORkYBgs K5hOQA3LXy0ks/sV+BinzyfbU9I2EYLhXIDOjcGEt0yq8kKDNwsfwzD1qzvbeIt3xkAI X7evneL0X19HBn/w7DiYvnlulv0B4mmOsj4H4q8RF15h7i7T+0jV9JhYaORsq79tB75k BIFuFDLfDDCcMwYMtwMeZcxDcC2YJd0NJaidvEFbdZ3p8WG9+Rr2vdUr3pgcjm4fk6HS IYKmnolyIgM6k8A2zo14I+FeeQ7GK2W2PRCyFnJawT0ESeXrbDPXqMm7Pk3+7iPHY5XT WDzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g66FBhGd; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61787-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61787-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCUgA5q4xeEKIQDETi5eJYopSAXRH/3rOaYAI3k1fzETWwjXy/svajXwCX3rXakpyH7su34rNeF/RbFODwSefpRpMZruLQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id vu14-20020a05620a560e00b00783322de747si5983807qkn.339.2024.02.12.06.09.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:09:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61787-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g66FBhGd; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61787-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61787-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ECAB71C2359D for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 14:09:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47E433D549; Mon, 12 Feb 2024 14:03:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="g66FBhGd" Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 6BDCA3D0B4 for <linux-kernel@vger.kernel.org>; Mon, 12 Feb 2024 14:03:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707746626; cv=none; b=Vtk/WVDyA2Fjrfr1mrKMBaPPcUKQF2YHjjRTGTxFG/srH2lHaPrp6R22td7CePznrGB7UXf3edkRDMKt6GAlwtnwGI5RoGWVA5Hba0vh3iVNoJFb/vMetN+ERHBeyOzxmh7PiVlSngjVHO8Whn/Cz2r26P1WuESI4w1t0DWN99k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707746626; c=relaxed/simple; bh=Hi+AYpj4IQjYK7Gxuv2V8sKTS8H17ViP7cxbuRFgK6s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gMhgkdn8k5xnX/SPbIFsTenBxIY5Qyap7YowXt3dxaxvNDt5GLN5WjMKJZxyzndEMi35Cv/v08UwT978OvFlKHnnHl7sJlWO8hrJ0ZTnDSHsx4urA5Khrj2iwZvjmG6XYb6L6NvlFi2265aKzHaCQ1Z1/eCaRru9HvlGzJAVfYM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=g66FBhGd; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-33b815b182fso684984f8f.3 for <linux-kernel@vger.kernel.org>; Mon, 12 Feb 2024 06:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707746622; x=1708351422; darn=vger.kernel.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=eQjx1BYq38FUSUDdH+R5TkxMe5lYPMpuxbAcZUZM76E=; b=g66FBhGde5ZkjVnf6WsgiGuhLz14oF5pvl9gDE9OHU74RYA5qODAL7fTTOOsHUQmZr x8C/ZGchsPt3VO7GwC7MJxQzO65gFfeJHflq1W3tMFxb6cnf4137vT35/pO5q4ZmAsg9 hpbfMUKQeUQ8ap/m7j53WaVcCahlJaIm8+5dsnefp0A4Fgz33TM4sdNbocxS8crNJiEe sb6GozXrGF4dw0FdfpnQRQhbF4KHO0bMEO/3KflJibbSAfDQaLQ756UPWU6w6xIZOC2C TQN8/wLORrRrpvwan88GazGefDBx1gcpXITer8NMNG+/IUf+rmGekll9mf15EHuDMx4z dwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707746622; x=1708351422; 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=eQjx1BYq38FUSUDdH+R5TkxMe5lYPMpuxbAcZUZM76E=; b=u3iiBrMvTjoQwG1Fd+4NY10An/i+b3ZUDtWB2XoH2O2T1XM6e+qbL0QpBB/jA46PW8 RQ3bwhAOpWQbqqq5U7Y2jlzEVJxPWCIc01g/Ihqq4CjpN4fhjWFBEuLMwvGqvvK4tDAS D6D6jgKd3DfF24plfwPbuEixy20Mc2wUQ7jdQEpy/vfoeR7qxAMCbaZVIbo6D0Xj2rRp +otzkDSeCxDmftUjAeYKv/6ONULFVM/EdTPGSgWMiqwj9oDW3apcbSUxYs66xbA4MYZz CoD3clltq7vtlAjgLHEQ1dAlTXC6UmVjkOj8mC4Ev8+/F868eDnqy/ecWGKnvYxOBhTz RfeQ== X-Forwarded-Encrypted: i=1; AJvYcCXtp67KLir8g4n422qCuF869GXWkJ9/yh8nCvKX/hJYtWGhMuwNZGuRn0Fagb40Bv49yOV1RKC+ZZ1OXKAF8xdrLKNJkW7YQK6v4iYY X-Gm-Message-State: AOJu0YyUuBTm4fkZrMEynNjZqZUQHNgmNl0yYVMAEMivohMcv/D6pB4z ppMIZs3s9utg/Ofbo1iBXQFGqYTyRtKB0rrBAbzWfS721TdhdjkefnbHBuvzsI4= X-Received: by 2002:adf:fb48:0:b0:33b:1823:284a with SMTP id c8-20020adffb48000000b0033b1823284amr5807851wrs.14.1707746622602; Mon, 12 Feb 2024 06:03:42 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCX0s1LuCBYrQfPi8TpB7Zi643w8nhk9MWn8/7690ls8R429+G8WviCV2mw8rEEOPiRXLeb6KBSVYdmxtEk0ZM5JR75szSXHuOfyOalc2rXUjEJGAjoKeRSu73I+xkiL7utx1bXJT1lpYp5pPZbhRltaLKksxN3uBwcmOCuoPEobd8b78gFVdXFh274nBi49hMoKa+rxCCyBl5a417sv4lTCBwRqpc8QyODjEYExQqE2NN3c/lmVAfXORcAEKUgs9JoGbN36vFGqY1Zxd7W3ukTFp6GR9mislxOyXZ0hDZZfz+i7eGuMVKt8owbrT9jyFUvMsuXJSYrh862UNEMJs8GtNaZsMY1qsJB73VdSOnL9qI31TTxN9kBARrr2/7gWaVVbG5WdfdIG8ax5h6qRlFK36XOwWh9Q5UapDCB3T4iu3Zr41DBaIT16H4UBjwmwaTKa8ulXn622/1aCGE8Sm2/MmhDqGhk/3tfpYbiUuKs0NDozV44B32u+rcKNvzjldLiYiNIQD/vskN4nX+ZGIY+jLUqXqJw9gxokfkgbRRo9JuVV5onr2uyAdjrBreLuAkAFKLT9cToxyJRvZ/bQ5dKiZ6VbLbLKqGfLD5F/0Hoo42w9yyc= 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 v9-20020a5d4b09000000b0033b843786e1sm2135356wrq.51.2024.02.12.06.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:03:37 -0800 (PST) From: Tudor Ambarus <tudor.ambarus@linaro.org> 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, arnd@arndb.de, Tudor Ambarus <tudor.ambarus@linaro.org> Subject: [PATCH v2 01/12] spi: dt-bindings: introduce FIFO depth properties Date: Mon, 12 Feb 2024 14:03:20 +0000 Message-ID: <20240212140331.915498-2-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240212140331.915498-1-tudor.ambarus@linaro.org> References: <20240212140331.915498-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790702458574232449 X-GMAIL-MSGID: 1790702458574232449 |
Series |
spi: s3c64xx: remove OF alias ID dependency
|
|
Commit Message
Tudor Ambarus
Feb. 12, 2024, 2:03 p.m. UTC
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.
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
.../bindings/spi/spi-controller.yaml | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
Comments
On Mon, 12 Feb 2024 14:03:20 +0000, Tudor Ambarus wrote: > 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. > > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> > --- > .../bindings/spi/spi-controller.yaml | 27 +++++++++++++++++++ > 1 file changed, 27 insertions(+) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: /Documentation/devicetree/bindings/spi/spi-controller.yaml:152:9: [warning] wrong indentation: expected 6 but found 8 (indentation) /Documentation/devicetree/bindings/spi/spi-controller.yaml:156:9: [warning] wrong indentation: expected 6 but found 8 (indentation) dtschema/dtc warnings/errors: doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240212140331.915498-2-tudor.ambarus@linaro.org The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 12.02.2024 17:36, Rob Herring wrote: > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > ./Documentation/devicetree/bindings/spi/spi-controller.yaml:152:9: > [warning] wrong indentation: expected 6 but found 8 (indentation) > ./Documentation/devicetree/bindings/spi/spi-controller.yaml:156:9: > [warning] wrong indentation: expected 6 but found 8 (indentation) > > dtschema/dtc warnings/errors: oh, the horror, I missed these. I'll re-check and resend. Thanks, ta
On Mon, Feb 12, 2024 at 02:03:20PM +0000, Tudor Ambarus wrote: > 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. > > Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> > --- > .../bindings/spi/spi-controller.yaml | 27 +++++++++++++++++++ > 1 file changed, 27 insertions(+) With the indentation fixed, Reviewed-by: Rob Herring <robh@kernel.org>
Hi Tudor, kernel test robot noticed the following build warnings: [auto build test WARNING on broonie-spi/for-next] [also build test WARNING on robh/for-next linus/master v6.8-rc4 next-20240216] [cannot apply to krzk/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Tudor-Ambarus/spi-dt-bindings-introduce-FIFO-depth-properties/20240212-221427 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next patch link: https://lore.kernel.org/r/20240212140331.915498-2-tudor.ambarus%40linaro.org patch subject: [PATCH v2 01/12] spi: dt-bindings: introduce FIFO depth properties compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240216/202402161543.5JdIODY4-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202402161543.5JdIODY4-lkp@intel.com/ dtcheck warnings: (new ones prefixed by >>) >> Documentation/devicetree/bindings/spi/spi-controller.yaml:152:9: [warning] wrong indentation: expected 6 but found 8 (indentation) Documentation/devicetree/bindings/spi/spi-controller.yaml:156:9: [warning] wrong indentation: expected 6 but found 8 (indentation) vim +152 Documentation/devicetree/bindings/spi/spi-controller.yaml 8 9 maintainers: 10 - Mark Brown <broonie@kernel.org> 11 12 description: | 13 SPI busses can be described with a node for the SPI controller device 14 and a set of child nodes for each SPI slave on the bus. The system SPI 15 controller may be described for use in SPI master mode or in SPI slave mode, 16 but not for both at the same time. 17 18 properties: 19 $nodename: 20 pattern: "^spi(@.*|-([0-9]|[1-9][0-9]+))?$" 21 22 "#address-cells": 23 enum: [0, 1] 24 25 "#size-cells": 26 const: 0 27 28 cs-gpios: 29 description: | 30 GPIOs used as chip selects. 31 If that property is used, the number of chip selects will be 32 increased automatically with max(cs-gpios, hardware chip selects). 33 34 So if, for example, the controller has 4 CS lines, and the 35 cs-gpios looks like this 36 cs-gpios = <&gpio1 0 0>, <0>, <&gpio1 1 0>, <&gpio1 2 0>; 37 38 Then it should be configured so that num_chipselect = 4, with 39 the following mapping 40 cs0 : &gpio1 0 0 41 cs1 : native 42 cs2 : &gpio1 1 0 43 cs3 : &gpio1 2 0 44 45 The second flag of a gpio descriptor can be GPIO_ACTIVE_HIGH (0) 46 or GPIO_ACTIVE_LOW(1). Legacy device trees often use 0. 47 48 There is a special rule set for combining the second flag of an 49 cs-gpio with the optional spi-cs-high flag for SPI slaves. 50 51 Each table entry defines how the CS pin is to be physically 52 driven (not considering potential gpio inversions by pinmux): 53 54 device node | cs-gpio | CS pin state active | Note 55 ================+===============+=====================+===== 56 spi-cs-high | - | H | 57 - | - | L | 58 spi-cs-high | ACTIVE_HIGH | H | 59 - | ACTIVE_HIGH | L | 1 60 spi-cs-high | ACTIVE_LOW | H | 2 61 - | ACTIVE_LOW | L | 62 63 Notes: 64 1) Should print a warning about polarity inversion. 65 Here it would be wise to avoid and define the gpio as 66 ACTIVE_LOW. 67 2) Should print a warning about polarity inversion 68 because ACTIVE_LOW is overridden by spi-cs-high. 69 Should be generally avoided and be replaced by 70 spi-cs-high + ACTIVE_HIGH. 71 72 fifo-depth: 73 $ref: /schemas/types.yaml#/definitions/uint32 74 description: 75 Size of the RX and TX data FIFOs in bytes. 76 77 rx-fifo-depth: 78 $ref: /schemas/types.yaml#/definitions/uint32 79 description: 80 Size of the RX data FIFO in bytes. 81 82 tx-fifo-depth: 83 $ref: /schemas/types.yaml#/definitions/uint32 84 description: 85 Size of the TX data FIFO in bytes. 86 87 num-cs: 88 $ref: /schemas/types.yaml#/definitions/uint32 89 description: 90 Total number of chip selects. 91 92 spi-slave: 93 $ref: /schemas/types.yaml#/definitions/flag 94 description: 95 The SPI controller acts as a slave, instead of a master. 96 97 slave: 98 type: object 99 100 properties: 101 compatible: 102 description: 103 Compatible of the SPI device. 104 105 required: 106 - compatible 107 108 patternProperties: 109 "^.*@[0-9a-f]+$": 110 type: object 111 $ref: spi-peripheral-props.yaml 112 additionalProperties: true 113 114 properties: 115 spi-3wire: 116 $ref: /schemas/types.yaml#/definitions/flag 117 description: 118 The device requires 3-wire mode. 119 120 spi-cpha: 121 $ref: /schemas/types.yaml#/definitions/flag 122 description: 123 The device requires shifted clock phase (CPHA) mode. 124 125 spi-cpol: 126 $ref: /schemas/types.yaml#/definitions/flag 127 description: 128 The device requires inverse clock polarity (CPOL) mode. 129 130 required: 131 - compatible 132 - reg 133 134 dependencies: 135 rx-fifo-depth: [ tx-fifo-depth ] 136 tx-fifo-depth: [ rx-fifo-depth ] 137 138 allOf: 139 - if: 140 not: 141 required: 142 - spi-slave 143 then: 144 properties: 145 "#address-cells": 146 const: 1 147 else: 148 properties: 149 "#address-cells": 150 const: 0 151 - not: > 152 required: 153 - fifo-depth 154 - rx-fifo-depth 155 - not: 156 required: 157 - fifo-depth 158 - tx-fifo-depth 159
diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml index 524f6fe8c27b..add39884d226 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