public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-kernel@vger.kernel.org, monstr@monstr.eu,
	michal.simek@xilinx.com, git@xilinx.com,
	ilias.apalodimas@linaro.org, Marek Vasut <marex@denx.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Piyush Mehta <piyush.mehta@amd.com>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: usb: Add binding for Microchip usb5744 hub controller
Date: Thu, 4 May 2023 09:55:07 +0200	[thread overview]
Message-ID: <66c1efb3-32c1-b751-0faf-1fd6814bf05c@amd.com> (raw)
In-Reply-To: <d5763073-3aaa-8a7f-1336-337c125b1a0e@linaro.org>



On 5/4/23 09:31, Krzysztof Kozlowski wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
> 
> 
> On 04/05/2023 09:25, Michal Simek wrote:
>>
>>
>> On 5/4/23 08:46, Krzysztof Kozlowski wrote:
>>> On 03/05/2023 15:39, Michal Simek wrote:
>>>> The Microchip usb5744 is a SS/HS USB 3.0 hub controller with 4 ports.
>>>> The binding describes USB related aspects of the USB5744 hub, it as
>>>> well cover the option of connecting the controller as an i2c slave.
>>>> When i2c interface is connected hub needs to be initialized first.
>>>> Hub itself has fixed i2c address 0x2D but hardcoding address is not good
>>>> idea because address can be shifted by i2c address translator in the
>>>> middle.
>>>>
>>>> Signed-off-by: Piyush Mehta <piyush.mehta@amd.com>
>>>> Signed-off-by: Michal Simek <michal.simek@amd.com>
>>>> ---
>>>>
>>>> It looks like that usb8041 has also an optional i2c interface which is not
>>>> covered. But it is mentioned at commit 40e58a8a7ca6 ("dt-bindings: usb:
>>>> Add binding for TI USB8041 hub controller").
>>>>
>>>> i2c-bus name property was suggested by Rob at
>>>> https://lore.kernel.org/all/CAL_JsqJedhX6typpUKbnzV7CLK6UZVjq3CyG9iY_j5DLPqvVdw@mail.gmail.com/
>>>> and
>>>> https://lore.kernel.org/all/CAL_JsqJZBbu+UXqUNdZwg-uv0PAsNg55026PTwhKr5wQtxCjVQ@mail.gmail.com/
>>>>
>>>> the question is if adding address like this is acceptable.
>>>> But it must be specified.
>>>
>>> Why? phandle points it explicitly.
>>
>> Ok it means just list usb hub on i2c with label and point to it. Works for me.
> 
> Right. I missed you want the address of the hub but phandle goes to the
> bus. I think listing it on I2C bus (see
> arch/arm/boot/dts/vf610-zii-scu4-aib.dts) should work. I think we can
> have I2C devices without compatibles.

Device is definitely on i2c bus. But the problem with phande to bus is that 
there could more the same usb hubs and different i2c addresses of it. That's why 
I need to have exact match.
Marek has similar hub where i2c address can be strapped too.

> The problem is that property should have only one definition/type and
> i2c-bus is already used in other cases as just "phandle". If we go with
> your phandle+address approach, then this should be phandle-array with
> items and then we have two different types.

What to do with it then?

Thanks,
Michal

  reply	other threads:[~2023-05-04  7:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 13:39 [PATCH] dt-bindings: usb: Add binding for Microchip usb5744 hub controller Michal Simek
2023-05-04  6:46 ` Krzysztof Kozlowski
2023-05-04  7:25   ` Michal Simek
2023-05-04  7:31     ` Krzysztof Kozlowski
2023-05-04  7:55       ` Michal Simek [this message]
2023-05-04  8:08         ` Krzysztof Kozlowski

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=66c1efb3-32c1-b751-0faf-1fd6814bf05c@amd.com \
    --to=michal.simek@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=piyush.mehta@amd.com \
    --cc=robh+dt@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