Message ID | 20240109-axi-spi-engine-series-3-v1-11-e42c6a986580@baylibre.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-22682-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1019965dyi; Wed, 10 Jan 2024 11:54:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0+zea6jcYd2Cu+smUcxQQ+N6li7KDDwaU2WrqdC7SlAqeq6yI/aDA199ql7xPkwC578ne X-Received: by 2002:a05:6808:238c:b0:3bb:6823:46da with SMTP id bp12-20020a056808238c00b003bb682346damr142546oib.85.1704916470281; Wed, 10 Jan 2024 11:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704916470; cv=none; d=google.com; s=arc-20160816; b=wmPzW/CV6+/LxCXJT+0o6vcjmg+XqUOdCOLzgi2RCgd55ckokVB+qoYaEbbmC869pH POw5ordx7haIUS5GJwZlgUuqVFodrNmm7TZ0MZw/TXXfMYveviykssbOJwvJ2BUNeIXT dSfCHusq9UznmLKNNFhULsrfMLgt8kZpZoK27ijdpozFSrZmB0Xm8GRB+70s/KKqbaik YU/q1+6lMd0YyygYp5KE/cOjzkWRrQXDnYR0MN+FtZNXtPsdw4eT6rH+Cw5/pUs1dVtk GkbGAsR+mdEGE0upJoacG1kjplPfWYDne2rJwN81HWiXNlTR3FUvtSUUFAi36MmqZlYy iZNw== ARC-Message-Signature: i=1; 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=AA0bcNe9/eac59bnZ/IUUlYB3WuV6EB6kCsXeejEFVs=; fh=cIqT9NcZdjUqupo3CRF2zie7E78k65IMo1it3Fi0alA=; b=yITa3iqsGTn3PxvV7xz/YfFaUAyiQqrCGL5AbfrVY6eSv1wO9fsPf4uDNzZHclJ9Sz mckas6dajGQz4uI0suA+JGokOeT6ympI5NOt8G98dCuLqYYg8jo31rmN7S8q5bb+KkHl sA4PKgl5WFTbGGeo4HAR9SBtP5u8znKZ7y05A8LjWvj5owmuJBcbyZ7UP0uIi1Yqxboe LZG7QZjWqJW8QB4kqW9HwsTrZpEYcbGzyoSzt2vP0uDUK0k8A9rqog5MRgrMKYxZEa/O f4KTvSBt48bWuJgbevxwSrChV4NrxfHu8XZiQ0IApQ9EYELQDZeA4uNcnoxr8C/b+FLm icag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=02WsKl4v; spf=pass (google.com: domain of linux-kernel+bounces-22682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22682-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d27-20020a0caa1b000000b0067f95cebfa8si4860264qvb.343.2024.01.10.11.54.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:54:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22682-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=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=02WsKl4v; spf=pass (google.com: domain of linux-kernel+bounces-22682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22682-ouuuleilei=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 EA1EE1C22D6B for <ouuuleilei@gmail.com>; Wed, 10 Jan 2024 19:54:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 141E955771; Wed, 10 Jan 2024 19:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="02WsKl4v" Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (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 6ADD64F214 for <linux-kernel@vger.kernel.org>; Wed, 10 Jan 2024 19:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-598a3a5bd36so280772eaf.0 for <linux-kernel@vger.kernel.org>; Wed, 10 Jan 2024 11:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1704916279; x=1705521079; 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=AA0bcNe9/eac59bnZ/IUUlYB3WuV6EB6kCsXeejEFVs=; b=02WsKl4vaIeUkHFh469ekUOkLLs5JbPq5RX9EcQS5BrIbbISSd++VW4XhrP/bHsz+0 ZHghSUVfT6+KTiNlvBk0KB3tiAosRCdJlqhtkK+IaGb7hrhkCxNYnhZHS42VHFmsza++ 093De/0cvuY4EJc6Iv528DvMX4Q9V+3U46Md5bl8KU6hHJaE3I7Q5GVadA44pZr/0ao5 XAfnkbsO2ZM+iEY+7R6mX/4V5k+AKMKs4QFtj70CDopfcm2jbN65/f8pHF8toDUPKfIX K2PvhHDI7uTufif83DZcj16VGjvLABxyjhMSBTvxwAaJwUF8FSarp8KXf/3Qpm1dfvqZ Yp0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704916279; x=1705521079; 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=AA0bcNe9/eac59bnZ/IUUlYB3WuV6EB6kCsXeejEFVs=; b=pdzQJjyiM0wCKUUiPxNVFy0QBBE4cHJWcVtrQrPhImku+7tXPCQJ6jUQDAmh/SKnnw 6i+tJajZ7CcBwvelY9AA8jEmz9nWW7C2FCjj3TRyZkMvFnN5EnxOnguXovbvRLj1MrgB KNaoOcAuedEhWd9pdFODXhxEicE6g3m+SBMFt9+NuUqhmITO7CwuvwFNcL6b5m3wfSXa mnGTjeGXuvMea4p8f1vXVlFfHj/DjDZtCgi4zbgo0QBDx/EakrZLfYRCS3jpDsZjRjOq kBgSeSsGIgkP0kuF6fHjVzjC63tLn0Z4SD45M3gMqCgGf4S5AF9/OVGvXR+mjLHwwhaR rFFA== X-Gm-Message-State: AOJu0YxWJmjHD4lnsEA/ItSf2NjVW3a5pKha/mElBelXIAL2B1lH6fuL ZNqBSmZtRLQgcEsnj5zLCTVIpwTwMM5Gdg== X-Received: by 2002:a4a:58cd:0:b0:594:cea0:eeda with SMTP id f196-20020a4a58cd000000b00594cea0eedamr108844oob.2.1704916279403; Wed, 10 Jan 2024 11:51:19 -0800 (PST) Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 187-20020a4a0dc4000000b00595b35927a3sm938513oob.39.2024.01.10.11.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:51:19 -0800 (PST) From: David Lechner <dlechner@baylibre.com> To: Mark Brown <broonie@kernel.org>, Jonathan Cameron <jic23@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Michael Hennerich <michael.hennerich@analog.com>, =?utf-8?q?Nuno_S=C3=A1?= <nuno.sa@analog.com>, Frank Rowand <frowand.list@gmail.com> Cc: David Lechner <dlechner@baylibre.com>, Thierry Reding <thierry.reding@gmail.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Jonathan Corbet <corbet@lwn.net>, linux-spi@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/13] dt-bindings: iio: offload: add binding for PWM/DMA triggered buffer Date: Wed, 10 Jan 2024 13:49:52 -0600 Message-ID: <20240109-axi-spi-engine-series-3-v1-11-e42c6a986580@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240109-axi-spi-engine-series-3-v1-0-e42c6a986580@baylibre.com> References: <20240109-axi-spi-engine-series-3-v1-0-e42c6a986580@baylibre.com> 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-Type: text/plain; charset="utf-8" X-Mailer: b4 0.12.4 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787734492408983728 X-GMAIL-MSGID: 1787734492408983728 |
Series |
spi: axi-spi-engine: add offload support
|
|
Commit Message
David Lechner
Jan. 10, 2024, 7:49 p.m. UTC
This adds a new binding for a PWM trigger and DMA data output connected
to an SPI controller offload instance.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
.../adi,spi-offload-pwm-trigger-dma-buffer.yaml | 59 ++++++++++++++++++++++
1 file changed, 59 insertions(+)
Comments
On Wed, 10 Jan 2024 13:49:52 -0600, David Lechner wrote: > This adds a new binding for a PWM trigger and DMA data output connected > to an SPI controller offload instance. > > Signed-off-by: David Lechner <dlechner@baylibre.com> > --- > .../adi,spi-offload-pwm-trigger-dma-buffer.yaml | 59 ++++++++++++++++++++++ > 1 file changed, 59 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: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/spi/adi,axi-spi-engine.yaml Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.example.dts:22.22-32.15: Warning (spi_bus_reg): /example-0/spi/offloads: missing or empty reg property Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 966, in resolve_fragment document = document[part] ~~~~~~~~^^^^^^ TypeError: 'bool' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/dt-validate", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 144, in main sg.check_dtb(filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 89, in check_dtb self.check_subtree(dt, subtree, False, "/", "/", filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 82, in check_subtree self.check_subtree(tree, value, disabled, name, fullname + name, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 82, in check_subtree self.check_subtree(tree, value, disabled, name, fullname + name, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 82, in check_subtree self.check_subtree(tree, value, disabled, name, fullname + name, filename) [Previous line repeated 1 more time] File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 77, in check_subtree self.check_node(tree, subtree, disabled, nodename, fullname, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 33, in check_node for error in self.validator.iter_errors(node, filter=match_schema_file): File "/usr/local/lib/python3.11/dist-packages/dtschema/validator.py", line 405, in iter_errors for error in self.DtValidator(sch, File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 288, in iter_errors for error in errors: File "/usr/local/lib/python3.11/dist-packages/jsonschema/_validators.py", line 414, in if_ yield from validator.descend(instance, then, schema_path="then") File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 305, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 288, in iter_errors for error in errors: File "/usr/local/lib/python3.11/dist-packages/jsonschema/_validators.py", line 294, in ref scope, resolved = validator.resolver.resolve(ref) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 898, in resolve return url, self._remote_cache(url) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 916, in resolve_from_url return self.resolve_fragment(document, fragment) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 968, in resolve_fragment raise exceptions.RefResolutionError( jsonschema.exceptions.RefResolutionError: Unresolvable JSON pointer: '$defs/offload' doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240109-axi-spi-engine-series-3-v1-11-e42c6a986580@baylibre.com 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 Wed, Jan 10, 2024 at 01:49:52PM -0600, David Lechner wrote: > This adds a new binding for a PWM trigger and DMA data output connected > to an SPI controller offload instance. > > Signed-off-by: David Lechner <dlechner@baylibre.com> > --- > .../adi,spi-offload-pwm-trigger-dma-buffer.yaml | 59 ++++++++++++++++++++++ > 1 file changed, 59 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml b/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml > new file mode 100644 > index 000000000000..748cfab19eff > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml > @@ -0,0 +1,59 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: SPI Offload with PWM Trigger and DMA Buffer Data Output > + > +maintainers: > + - Michael Hennerich <Michael.Hennerich@analog.com> > + - Nuno Sá <nuno.sa@analog.com> > + > +description: | > + This binding describes the connection of a PWM device to the trigger input > + and a DMA channel to the output data stream of a SPI Offload instance. > + > + https://wiki.analog.com/resources/fpga/peripherals/spi_engine/offload > + https://wiki.analog.com/resources/fpga/peripherals/spi_engine/tutorial > + > +$ref: /schemas/spi/adi,axi-spi-engine.yaml#/$defs/offload Not really worth the complexity just for 'reg'. Generally, the bus schema would define general constraints on reg like range of address values and the device schema (this one) is just how many entries. > + > +properties: > + compatible: > + const: adi,spi-offload-pwm-trigger-dma-buffer > + > + reg: > + maxItems: 1 > + > + pwms: > + maxItems: 1 > + > + dmas: > + maxItems: 1 > + > +required: > + - compatible > + - pwms > + - dmas > + > +unevaluatedProperties: false > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + offloads { > + #address-cells = <1>; > + #size-cells = <0>; > + > + offload@0 { > + compatible = "adi,spi-offload-pwm-trigger-dma-buffer"; > + reg = <0>; > + pwms = <&pwm 0>; > + dmas = <&dma 0>; > + }; > + }; Just make one complete example for the device. > + }; > > -- > 2.43.0 >
diff --git a/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml b/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml new file mode 100644 index 000000000000..748cfab19eff --- /dev/null +++ b/Documentation/devicetree/bindings/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/offload/adi,spi-offload-pwm-trigger-dma-buffer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SPI Offload with PWM Trigger and DMA Buffer Data Output + +maintainers: + - Michael Hennerich <Michael.Hennerich@analog.com> + - Nuno Sá <nuno.sa@analog.com> + +description: | + This binding describes the connection of a PWM device to the trigger input + and a DMA channel to the output data stream of a SPI Offload instance. + + https://wiki.analog.com/resources/fpga/peripherals/spi_engine/offload + https://wiki.analog.com/resources/fpga/peripherals/spi_engine/tutorial + +$ref: /schemas/spi/adi,axi-spi-engine.yaml#/$defs/offload + +properties: + compatible: + const: adi,spi-offload-pwm-trigger-dma-buffer + + reg: + maxItems: 1 + + pwms: + maxItems: 1 + + dmas: + maxItems: 1 + +required: + - compatible + - pwms + - dmas + +unevaluatedProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + offloads { + #address-cells = <1>; + #size-cells = <0>; + + offload@0 { + compatible = "adi,spi-offload-pwm-trigger-dma-buffer"; + reg = <0>; + pwms = <&pwm 0>; + dmas = <&dma 0>; + }; + }; + };