mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charan Pedumuru <charan.pedumuru@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Felipe Balbi <balbi@ti.com>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: usb: ti,omap4-musb: convert to DT schema
Date: Tue, 27 Jan 2026 20:56:34 +0530	[thread overview]
Message-ID: <e1b2b86f-6762-4b6b-bcb9-f8c7349e8077@gmail.com> (raw)
In-Reply-To: <20260126160610.GA2471873-robh@kernel.org>



On 26-01-2026 21:36, Rob Herring wrote:
> On Mon, Jan 26, 2026 at 01:22:04PM +0000, Charan Pedumuru wrote:
>> Convert OMAP MUSB USB OTG Controller binding to DT schema.
>> Changes during conversion:
>> - Introduce new compatible string patterns "am35x_otg_hs" and "usb_otg_hs"
>>   to properly match existing nodes already defined in the DT sources.
>> - Include "interrupts" and "interrupt-names" properties in the YAML, as
>>   they are used by many in-tree DTS files.
>> - Extend the "power" property to allow the value 150 (in addition to
>>   existing values), since this is present in several in-tree DTS examples.
>>
>> Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com>
>> ---
>>  .../devicetree/bindings/usb/ti,omap4-musb.yaml     | 133 +++++++++++++++++++++
>>  1 file changed, 133 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/ti,omap4-musb.yaml b/Documentation/devicetree/bindings/usb/ti,omap4-musb.yaml
>> new file mode 100644
>> index 000000000000..16e95fe4c38d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/usb/ti,omap4-musb.yaml
>> @@ -0,0 +1,133 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/usb/ti,omap4-musb.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Texas Instruments OMAP MUSB USB OTG Controller
>> +
>> +maintainers:
>> +  - Felipe Balbi <balbi@ti.com
> 
> Missing '>'

Yeah, I missed it, will add in the next rev.

> 
>> +
>> +description:
>> +  Texas Instruments glue layer for the Mentor Graphics MUSB OTG controller.
>> +  Handles SoC-specific integration including PHY interface bridging(ULPI/
>> +  UTMI), interrupt aggregation, DMA engine coordination (internal/
>> +  external), VBUS/session control via control module mailbox, and
>> +  clock/reset management. Provides fixed hardware configuration parameters
>> +  to the generic MUSB core driver.
>> +
>> +properties:
>> +  $nodename:
>> +    pattern: "^(am35x_otg_hs|usb_otg_hs|usb)@[0-9a-f]+$"
> 
> Again, do not document non-standard names. That's anything not in the DT 
> spec.

Sure, I will remove pattern entirely.

> 
>> +
>> +  compatible:
>> +    enum:
>> +      - ti,omap3-musb
>> +      - ti,omap4-musb
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  ti,hwmods:
>> +    $ref: /schemas/types.yaml#/definitions/string
>> +    description:
>> +      Specifies the name of the TI PRCM (Power, Reset and Clock Management)
>> +      hardware module that must be enabled (powered and clocked) for this
>> +      device node to operate. The value "usb_otg_hs" refers to the USB
>> +      On-The-Go High-Speed controller IP block.
>> +    const: usb_otg_hs
> 
> deprecated: true
> 
> (I think we want that everywhere?)
> 
> Actually, looks like only omap2430 sets this, but that's not covered by 
> this schema. Unless you need to add "ti,omap2-musb"?

Okay, in that case I will drop the property.

> 
>> +
>> +  interrupts:
>> +    minItems: 1
>> +    maxItems: 2
>> +
>> +  interrupt-names:
>> +    minItems: 1
>> +    maxItems: 2
>> +    items:
>> +      enum: [mc, dma]
> 
> I would assume only 'dma' is optional? Does this work?:
> 
> items:
>   - const: mc
>   - const: dma

Yes, this works.

> 
>> +
>> +  multipoint:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Indicates the MUSB controller supports multipoint. This is a MUSB
>> +      configuration-specific setting.
>> +    const: 1
>> +
>> +  num-eps:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Specifies the number of endpoints. This is a MUSB configuration
>> +      specific setting.
>> +    const: 16
>> +
>> +  ram-bits:
>> +    description:
>> +      Specifies the RAM address size.
>> +    const: 12
>> +
>> +  interface-type:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Describes the type of interface between the controller and the PHY.
>> +      0 for ULPI, 1 for UTMI.
>> +    enum: [0, 1]
>> +
>> +  mode:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: 1 for HOST, 2 for PERIPHERAL, 3 for OTG.
>> +    enum: [1, 2, 3]
>> +
>> +  power:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      Signifies the controller can supply up to 100mA when operating
>> +      in host mode.
>> +    enum: [50, 150]
> 
> Which value corresponds to 100mA?

50 corresponds to 100mA, I will add it to the description.

> 
>> +
>> +  phys:
>> +    maxItems: 1
>> +
>> +  phy-names:
>> +    const: usb2-phy
>> +
>> +  usb-phy:
>> +    $ref: /schemas/types.yaml#/definitions/phandle-array
>> +    description: Phandle for the PHY device.
>> +    deprecated: true
>> +
>> +  ctrl-module:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      Phandle of the control module this glue uses to write to mailbox.
>> +
>> +required:
>> +  - reg
>> +  - compatible
>> +  - interrupts
>> +  - interrupt-names
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +    usb_otg_hs@4a0ab000 {
> 
> usb@...

Okay.

> 
>> +        compatible = "ti,omap4-musb";
>> +        reg = <0x4a0ab000 0x1000>;
>> +        interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
>> +                     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
>> +        interrupt-names = "mc", "dma";
>> +        ti,hwmods = "usb_otg_hs";
>> +        multipoint = <1>;
>> +        num-eps = <16>;
>> +        ram-bits = <12>;
>> +        ctrl-module = <&omap_control_usb>;
>> +        phys = <&usb2_phy>;
>> +        phy-names = "usb2-phy";
>> +        interface-type = <1>;
>> +        mode = <3>;
>> +        power = <50>;
>> +    };
>> +...
>>
>> -- 
>> 2.52.0
>>

-- 
Best Regards,
Charan.


  reply	other threads:[~2026-01-27 15:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 13:22 [PATCH 0/2] dt-bindings: usb: Convert TI OMAP MUSB OTG controller and DWC3 USB Glue " Charan Pedumuru
2026-01-26 13:22 ` [PATCH 1/2] dt-bindings: usb: ti,omap4-musb: convert " Charan Pedumuru
2026-01-26 16:06   ` Rob Herring
2026-01-27 15:26     ` Charan Pedumuru [this message]
2026-01-26 13:22 ` [PATCH 2/2] dt-bindings: usb: ti,dwc3: " Charan Pedumuru
2026-01-26 16:08   ` Rob Herring
2026-01-27 15:04     ` Charan Pedumuru

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=e1b2b86f-6762-4b6b-bcb9-f8c7349e8077@gmail.com \
    --to=charan.pedumuru@gmail.com \
    --cc=balbi@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®