lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJppK7fMmX_cePhaK4Xy-+gfZfYZSWJDbEnVvq_60B32Rig@mail.gmail.com>
Date: Thu, 2 May 2024 14:44:24 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Krishna Kurapati PSSNV <quic_kriskura@...cinc.com>
Cc: Komal Bajaj <quic_kbajaj@...cinc.com>, Bjorn Andersson <andersson@...nel.org>, 
	Konrad Dybcio <konrad.dybcio@...aro.org>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, linux-arm-msm@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Bjorn Andersson <quic_bjorande@...cinc.com>, quic_wcheng@...cinc.com, 
	quic_ppratap@...cinc.com, Jack Pham <quic_jackp@...cinc.com>
Subject: Re: [PATCH v3 0/3] Add devicetree support of USB for QDU/QRU1000

On Thu, 2 May 2024 at 12:48, Krishna Kurapati PSSNV
<quic_kriskura@...cinc.com> wrote:
>
>
>
> On 5/2/2024 2:39 PM, Dmitry Baryshkov wrote:
> > On Thu, 2 May 2024 at 12:04, Komal Bajaj <quic_kbajaj@...cinc.com> wrote:
> >>
> >> This series adds devicetree nodes to support interconnects and usb for qdu/qru1000.
> >> This is based on previously sent driver series[1].
> >>
> >> ------
> >> Changes in v3:
> >> * As per comments on upstream[2], to get role-switch working on QDU/QRU1000, it was recommended to
> >>    use the actual TI switch driver. Since driver doesn't have the functionality to provide role-switch
> >>    based on gpio, thus reverting back USB dr_mode to peripheral and removed the remote end-point nodes
> >>    and usb-conn-gpio based role switch functionality.
> >
> > This is not correct. The recommendation was to describe hardware properly.
> > Which means adding schema description, adding  ti,your-switch
> > compatible to the usb-conn-gpio.c driver, etc.
> >
>
> Hi Dmitry,
>
>   Sorry for the confusion. In the comments [1],
>
> "So the compatible string should be "ti,hd3ss3220". Which is fine to be
> used in the platform driver. Just describe the differences in the
> schema."
>
> The compatible "ti,hd3ss3220" is already associated with a TI switch
> driver [2]. But it works based on I2C. So we assumed you wanted us to
> make changes to [2] by adding GPIO functionality (which usb-conn-gpio
> exactly does), since the compatible you suggested matched with the TI
> driver.

First of all, please don't make assumptions. It's better to ask rather
than making assumptions which turn up to be incorrect.

Compatibles describe hardware. DT describes hardware. There are no
drivers in question (yet).
You have TI switch on your board, so you have to use "ti,hd3ss3220" to
describe it.

Existing schema describes it as an I2C device. You have to extend the
schema to allow non-i2c attachment. Describe GPIOs, make reg optional.
Make this description purely from the datasheet and usb-c-connector
point of view.

> If it was to add compatible in usb-conn-gpio, then we can support OTG
> functionality with no schema changes I believe, but the compatible
> string might need a different name to avoid clashing with the name in [2].

And this is the second, largely independent question. The
usb-conn-gpio driver is a platform driver.The existing hd3ss3220.c
driver is an I2C one. There is no clash between them.

Note, unlike plain gpio-b-connector, the switch supports more pins and
actually provides USB-C information to the host even when used in the
dumb mode. Thus it might be better to add a separate driver that
registers typec port and reports USB-C events.

>
> [1]:
> https://lore.kernel.org/all/CAA8EJppNZrLzT=vGS0NXnKJT_wL+bMB9jFhJ9K7b7FPgFQbcig@mail.gmail.com/
>
> [2]:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/typec/hd3ss3220.c?h=v6.9-rc2
>
> Regards,
> Krishna,
>
> >> * Link to v2: https://lore.kernel.org/linux-arm-msm/20240319091020.15137-1-quic_kbajaj@quicinc.com/
> >>
> >> Changes in v2:
> >> * Changes qmpphy node name
> >> * Changes dr_mode to otg and added USB-B port USB role switch
> >> * Dropped maximum-speed property from usb dwc3 node
> >> * Link to v1: https://lore.kernel.org/linux-arm-msm/20240311120859.18489-1-quic_kbajaj@quicinc.com/
> >>
> >> [1] https://lore.kernel.org/linux-arm-msm/20240502082017.13777-1-quic_kbajaj@quicinc.com/
> >> [2] https://lore.kernel.org/all/CAA8EJppNZrLzT=vGS0NXnKJT_wL+bMB9jFhJ9K7b7FPgFQbcig@mail.gmail.com/
> >> ------
> >>
> >> Komal Bajaj (3):
> >>    arm64: dts: qcom: qdu1000: Add USB3 and PHY support
> >>    arm64: dts: qcom: qdu1000-idp: enable USB nodes
> >>    arm64: dts: qcom: qru1000-idp: enable USB nodes
> >>
> >>   arch/arm64/boot/dts/qcom/qdu1000-idp.dts |  23 +++++
> >>   arch/arm64/boot/dts/qcom/qdu1000.dtsi    | 120 +++++++++++++++++++++++
> >>   arch/arm64/boot/dts/qcom/qru1000-idp.dts |  23 +++++
> >>   3 files changed, 166 insertions(+)
> >>
> >> --
> >> 2.42.0
> >>
> >>
> >
> >



-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ