devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Mighty <bavishimithil@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Lopez Cruz <misael.lopez@ti.com>,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
Date: Wed, 22 May 2024 17:39:31 +0300	[thread overview]
Message-ID: <1c54c68e-1c0e-4ebe-821a-4bc7d4fb8577@gmail.com> (raw)
In-Reply-To: <20240522142222.GA3233115-robh@kernel.org>



On 22/05/2024 17:22, Rob Herring wrote:
> On Wed, May 22, 2024 at 04:56:11PM +0300, Péter Ujfalusi wrote:
>> Hi,
>>
>> On 22/05/2024 10:52, Mighty wrote:
>>> From: Mithil Bavishi <bavishimithil@gmail.com>
>>>
>>> Convert the OMAP4+ McPDM bindings to DT schema.
>>>
>>> Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com>
>>> ---
>>> Changelog v5:
>>> - Add imports for constants
>>> - Add desc to ti,hwmods
>>>
>>>  .../devicetree/bindings/sound/omap-mcpdm.txt  | 30 ---------
>>>  .../bindings/sound/ti,omap4-mcpdm.yaml        | 61 +++++++++++++++++++
>>>  2 files changed, 61 insertions(+), 30 deletions(-)
>>>  delete mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.txt
>>>  create mode 100644 Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
>>> deleted file mode 100644
>>> index ff98a0cb5..000000000
>>> --- a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
>>> +++ /dev/null
>>> @@ -1,30 +0,0 @@
>>> -* Texas Instruments OMAP4+ McPDM
>>> -
>>> -Required properties:
>>> -- compatible: "ti,omap4-mcpdm"
>>> -- reg: Register location and size as an array:
>>> -       <MPU access base address, size>,
>>> -       <L3 interconnect address, size>;
>>> -- interrupts: Interrupt number for McPDM
>>> -- ti,hwmods: Name of the hwmod associated to the McPDM
>>> -- clocks:  phandle for the pdmclk provider, likely <&twl6040>
>>> -- clock-names: Must be "pdmclk"
>>> -
>>> -Example:
>>> -
>>> -mcpdm: mcpdm@40132000 {
>>> -	compatible = "ti,omap4-mcpdm";
>>> -	reg = <0x40132000 0x7f>, /* MPU private access */
>>> -	      <0x49032000 0x7f>; /* L3 Interconnect */
>>> -	interrupts = <0 112 0x4>;
>>> -	interrupt-parent = <&gic>;
>>> -	ti,hwmods = "mcpdm";
>>> -};
>>> -
>>> -In board DTS file the pdmclk needs to be added:
>>> -
>>> -&mcpdm {
>>> -	clocks = <&twl6040>;
>>> -	clock-names = "pdmclk";
>>> -	status = "okay";
>>> -};
>>> diff --git a/Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml b/Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml
>>> new file mode 100644
>>> index 000000000..966406078
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml
>>> @@ -0,0 +1,61 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/sound/ti,omap4-mcpdm.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: OMAP McPDM
>>> +
>>> +maintainers:
>>> +  - Misael Lopez Cruz <misael.lopez@ti.com>
>>> +
>>> +description:
>>> +  OMAP ALSA SoC DAI driver using McPDM port used by TWL6040
>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: ti,omap4-mcpdm
>>> +
>>> +  reg:
>>> +    items:
>>> +      - description: MPU access base address
>>> +      - description: L3 interconnect address
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  ti,hwmods:
>>> +    $ref: /schemas/types.yaml#/definitions/string
>>> +    enum: [mcpdm]
>>> +    description: Name of the hwmod associated to the McPDM, likely "mcpdm"
>>> +
>>> +  clocks:
>>> +    maxItems: 1
>>> +
>>> +  clock-names:
>>> +    items:
>>> +      - const: pdmclk
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - interrupts
>>> +  - ti,hwmods
>>> +  - clocks
>>> +  - clock-names
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>>> +    pdm@40132000 {
>>
>> The original label and name is preferred to be used.
> 
> I imagine both were review comments. I can only imagine given the poor 
> changelog.
> 
> Unused labels in examples should be dropped.
> 
> Node names should be generic. Though if we haven't defined the name in 
> the spec or a schema, I don't care too much what is used.

McPDM uses it's own flavor of PDM, it is not the normal PDM as we all
know, I don't know what other generic name can be used.

> 
>>> +      compatible = "ti,omap4-mcpdm";
>>> +      reg = <0x40132000 0x7f>, /* MPU private access */
>>> +            <0x49032000 0x7f>; /* L3 Interconnect */
>>> +      interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
>>> +      interrupt-parent = <&gic>;
>>> +      ti,hwmods = "mcpdm";
>>> +      clocks = <&twl6040>;
>>> +      clock-names = "pdmclk";
>>
>> The clocks cannot be added at the time when the node is defined, it is
>> board specific. This way you imply that it is OK to have it in main dtsi
>> file. It is not.
> 
> That's a .dtsi structuring decision which is irrelevant to the 
> binding.

I see, but then the dmas/dma-names should also be in here somewhere, yes
it was not part of the original binding doc, but it is mandatory.

Looking at the code and DT files, the reg-names also mandatory.

> 
> Rob

-- 
Péter

      reply	other threads:[~2024-05-22 14:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22  7:52 [PATCH v5] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema Mighty
2024-05-22  8:42 ` Krzysztof Kozlowski
2024-05-22 13:46   ` Mithil
2024-05-22 14:15     ` Krzysztof Kozlowski
2024-05-22 13:56 ` Péter Ujfalusi
2024-05-22 14:16   ` Krzysztof Kozlowski
2024-05-22 14:43     ` Péter Ujfalusi
2024-05-22 15:22       ` Krzysztof Kozlowski
2024-05-22 16:01         ` Péter Ujfalusi
2024-05-22 16:42           ` Krzysztof Kozlowski
2024-05-22 17:02             ` Mithil
2024-05-22 17:07               ` Mithil
2024-05-22 17:07               ` Krzysztof Kozlowski
2024-05-22 17:30                 ` Mithil
2024-05-22 17:47                   ` Mithil
2024-05-22 18:49                     ` Péter Ujfalusi
2024-05-22 18:39                 ` Péter Ujfalusi
2024-05-23  6:08                   ` Krzysztof Kozlowski
2024-05-22 17:05             ` DT schema bindings conversion mentorships (was Re: [PATCH v5] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema) Krzysztof Kozlowski
2024-05-22 17:47               ` Javier Carrasco
2024-05-23  6:12                 ` Krzysztof Kozlowski
2024-05-22 18:36               ` Conor Dooley
2024-05-23 12:33                 ` Daniel Baluta
2024-05-23 12:30               ` Daniel Baluta
2024-05-23 16:24                 ` Rob Herring
2024-05-23 16:31                   ` Javier Carrasco
2024-05-22 14:22   ` [PATCH v5] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema Rob Herring
2024-05-22 14:39     ` Péter Ujfalusi [this message]

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=1c54c68e-1c0e-4ebe-821a-4bc7d4fb8577@gmail.com \
    --to=peter.ujfalusi@gmail.com \
    --cc=bavishimithil@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=misael.lopez@ti.com \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).