public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* USB companion HUB for usb5744
@ 2022-09-23 13:08 Michal Simek
  2022-09-23 17:13 ` Matthias Kaehlcke
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2022-09-23 13:08 UTC (permalink / raw)
  To: Matthias Kaehlcke, Greg Kroah-Hartman, Krzysztof Kozlowski,
	Mehta, Piyush, Marek Vasut
  Cc: Linux USB List, Linux Kernel Mailing List, git (AMD-Xilinx),
	Paladugu, Siva Durga Prasad

Hi Matthias,

I want to follow up with you on discussion we had couple of months ago around 
usb companion HUB series which is finally merged to the tree.
We are using USB5744 hub(4 ports), it supports USB3.0 functionality backward 
compatible with USB2.0.

To generic driver support for regulator and gpio reset was added.
In our case usb hub has i2c interface connected and hub expects initialization 
via i2c to start to operate.

In past you mentioned to create new file just for handling hubs itself.

Anyway from DT perspective I discussed description with Rob some time ago
https://lore.kernel.org/all/CAL_JsqJZBbu+UXqUNdZwg-uv0PAsNg55026PTwhKr5wQtxCjVQ@mail.gmail.com/
where he wanted to use i2c-bus link.

It will end up with description like this.

	usbhub0_2_0: hub@1 { /* u43 */
		compatible = "usb424,2744";
		reg = <1>;
		i2c-bus = <&usbhub_i2c0>;
		reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
		peer-hub = <&usbhub0_3_0>;
	};

	usbhub0_3_0: hub@2 { /* u43 */
		compatible = "usb424,5744";
		reg = <2>;
		i2c-bus = <&usbhub_i2c0>;
		reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
		peer-hub = <&usbhub0_2_0>;
	};

In probe onboard_hub_power_on is called to toggle gpio line which we need and 
then we need to write 16 bits to basic initialization (or more for different one).
Marek also mentioned that he has another chip from Microchip where i2c address 
can be setup. I think it would be good to get any guidance how this should be 
integrated.

 From my perspective i2c address should be described in DT.

Can we use any description like?
i2c-bus = <&usbhub_i2c0 0x2d>;

And initialization sequence via any property with 
uint32-array/uint16-array/uint8-array types.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-23 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 13:08 USB companion HUB for usb5744 Michal Simek
2022-09-23 17:13 ` Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox