From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>,
vkoul@kernel.org, agross@kernel.org, andersson@kernel.org,
krzysztof.kozlowski+dt@linaro.org, lgirdwood@gmail.com,
broonie@kernel.org, robh+dt@kernel.org, quic_plai@quicinc.com,
bgoswami@quicinc.com, perex@perex.cz, tiwai@suse.com,
srinivas.kandagatla@linaro.org, quic_rohkumar@quicinc.com,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
swboyd@chromium.org, judyhsiao@chromium.org
Cc: Ratna Deepthi Kudaravalli <quic_rkudarav@quicinc.com>
Subject: Re: [PATCH v3] dt-bindings: soundwire: Convert text bindings to DT Schema
Date: Thu, 20 Oct 2022 14:34:52 -0400 [thread overview]
Message-ID: <77087a4a-ac21-c622-59ec-1b308c37cc2c@linaro.org> (raw)
In-Reply-To: <1666271160-22424-1-git-send-email-quic_srivasam@quicinc.com>
On 20/10/2022 09:06, Srinivasa Rao Mandadapu wrote:
> Convert soundwire text bindings to DT Schema format.
>
> Update interrupt property items as per device tree,
> as it is not appropriately described in text file.
>
> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
> Co-developed-by: Ratna Deepthi Kudaravalli <quic_rkudarav@quicinc.com>
> Signed-off-by: Ratna Deepthi Kudaravalli <quic_rkudarav@quicinc.com>
> ---
Thank you for your patch. There is something to discuss/improve.
> -};
> diff --git a/Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml b/Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml
> new file mode 100644
> index 0000000..12cd3c1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml
> @@ -0,0 +1,184 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm SoundWire Controller
> +
> +maintainers:
> + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> + - Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
> +
> +description:
> + The Qualcomm SoundWire controller along with its board specific bus parameters.
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,soundwire-v1.3.0
> + - qcom,soundwire-v1.5.0
> + - qcom,soundwire-v1.5.1
> + - qcom,soundwire-v1.6.0
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + items:
> + - description: specify the SoundWire controller core.
> + - description: specify the Soundwire controller wake IRQ.
The second property was optional. You need to test DTS before sending
the bindings. Please run `make dtbs_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
IOW, you need here:
minItems: 1
> +
> + interrupt-names:
minItems: 1
> + items:
> + - const: wakeup
> + - const: core
That's definitely wrong order and should not pass any tests...
> +
> + clocks:
> + items:
> + - description: iface clock
> +
> + clock-names:
> + items:
> + - const: iface
> +
> + resets:
> + items:
> + - description: SWR_AUDIO_CGCR RESET
> +
> + reset-names:
> + items:
> + - const: swr_audio_cgcr
> +
> + '#sound-dai-cells':
> + const: 1
> +
> + '#address-cells':
> + const: 2
> +
> + '#size-cells':
> + const: 0
> +
> + wakeup-source: true
> +
> + qcom,din-ports:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: count of data in ports
> +
> + qcom,dout-ports:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: count of data out ports
> +
> + qcom,ports-word-length:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: size of payload channel sample.
> + maxItems: 5
> +
> + qcom,ports-sinterval-low:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: sample interval low of each data port.
> + maxItems: 5
> +
> + qcom,ports-offset1:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: payload transport window offset1 of each data port.
You miss here some pieces of original description,
> + maxItems: 5
> +
> + qcom,ports-offset2:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: payload transport window offset2 of each data port.
Ditto - and in other places.
> + maxItems: 5
> +
> + qcom,ports-lane-control:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: identify which data lane the data port uses.
> + maxItems: 5
> +
> + qcom,ports-block-pack-mode:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: indicate the block packing mode.
> + maxItems: 5
> +
> + qcom,ports-hstart:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: identifying lowerst numbered coloum in SoundWire frame.
> + maxItems: 5
> +
> + qcom,ports-hstop:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: identifying highest numbered coloum in SoundWire frame.
> + maxItems: 5
> +
> + qcom,ports-block-group-count:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + description: indicate how many sample intervals are combined into a payload.
> + maxItems: 5
> +
> + codec@4:
It's too specific. What if different device uses different address?
You need patternProperties "^codec@[0-9a-f]+$"
> + $ref: ../sound/qcom,wcd938x-sdw.yaml#
Full path, so /schemas/sound/qcom,wcd.....
Cannot we have other codecs attached? For example check SC7280 IDP,
SM8250 MTP, RB5.
> + description:
> + Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC.
> + It has RX and TX Soundwire slave devices. This bindings is for the
> + slave devices.
> + type: object
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> + - '#sound-dai-cells'
> + - '#address-cells'
> + - '#size-cells'
> + - qcom,dout-ports
> + - qcom,din-ports
> + - qcom,ports-sinterval-low
> + - qcom,ports-offset1
> + - qcom,ports-offset2
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h>
> +
> + soundwire@3210000 {
> + compatible = "qcom,soundwire-v1.6.0";
> + reg = <0x03210000 0x2000>;
> +
> + interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
> + <&pdc 130 IRQ_TYPE_LEVEL_HIGH>;
> +
Missing interrupt names.
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-10-20 18:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 13:06 Srinivasa Rao Mandadapu
2022-10-20 18:34 ` Krzysztof Kozlowski [this message]
2022-10-20 18:35 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77087a4a-ac21-c622-59ec-1b308c37cc2c@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andersson@kernel.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=judyhsiao@chromium.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=quic_plai@quicinc.com \
--cc=quic_rkudarav@quicinc.com \
--cc=quic_rohkumar@quicinc.com \
--cc=quic_srivasam@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=swboyd@chromium.org \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®