netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Krishna Kurapati PSSNV <krishna.kurapati@oss.qualcomm.com>
Cc: Monish Chunara <quic_mchunara@quicinc.com>,
	Sushrut Shree Trivedi <quic_sushruts@quicinc.com>,
	Wasim Nazir <wasim.nazir@oss.qualcomm.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	kernel@oss.qualcomm.com, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org,
	Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
	Nirmesh Kumar Singh <quic_nkumarsi@quicinc.com>,
	Mohd Ayaan Anwar <quic_mohdayaa@quicinc.com>,
	Dikshita Agarwal <quic_dikshita@quicinc.com>,
	Vishal Kumar Pal <quic_vispal@quicinc.com>
Subject: Re: [PATCH 3/5] arm64: dts: qcom: lemans-evk: Extend peripheral and subsystem support
Date: Tue, 2 Sep 2025 05:34:27 +0300	[thread overview]
Message-ID: <ly5j2eodrajifosz34nokia4zckfftakz5253d2h6kd2cxjoq3@yrquqgpnvhp6> (raw)
In-Reply-To: <ed3a79e0-516e-42f4-b3c6-a78ca6c01d86@oss.qualcomm.com>

On Mon, Sep 01, 2025 at 01:02:15PM +0530, Krishna Kurapati PSSNV wrote:
> 
> 
> On 8/29/2025 9:54 PM, Dmitry Baryshkov wrote:
> > On Fri, Aug 29, 2025 at 07:50:57PM +0530, Monish Chunara wrote:
> > > On Thu, Aug 28, 2025 at 04:30:00PM +0300, Dmitry Baryshkov wrote:
> > > > On Thu, Aug 28, 2025 at 06:38:03PM +0530, Sushrut Shree Trivedi wrote:
> > > > > 
> > > > > On 8/27/2025 7:05 AM, Dmitry Baryshkov wrote:
> > > > > > On Tue, Aug 26, 2025 at 11:51:02PM +0530, Wasim Nazir wrote:
> > > > > > > Enhance the Qualcomm Lemans EVK board file to support essential
> > > > > > > peripherals and improve overall hardware capabilities, as
> > > > > > > outlined below:
> > > > > > >     - Enable GPI (Generic Peripheral Interface) DMA-0/1/2 and QUPv3-0/2
> > > > > > >       controllers to facilitate DMA and peripheral communication.
> > > > > > >     - Add support for PCIe-0/1, including required regulators and PHYs,
> > > > > > >       to enable high-speed external device connectivity.
> > > > > > >     - Integrate the TCA9534 I/O expander via I2C to provide 8 additional
> > > > > > >       GPIO lines for extended I/O functionality.
> > > > > > >     - Enable the USB0 controller in device mode to support USB peripheral
> > > > > > >       operations.
> > > > > > >     - Activate remoteproc subsystems for supported DSPs such as Audio DSP,
> > > > > > >       Compute DSP-0/1 and Generic DSP-0/1, along with their corresponding
> > > > > > >       firmware.
> > > > > > >     - Configure nvmem-layout on the I2C EEPROM to store data for Ethernet
> > > > > > >       and other consumers.
> > > > > > >     - Enable the QCA8081 2.5G Ethernet PHY on port-0 and expose the
> > > > > > >       Ethernet MAC address via nvmem for network configuration.
> > > > > > >       It depends on CONFIG_QCA808X_PHY to use QCA8081 PHY.
> > > > > > >     - Add support for the Iris video decoder, including the required
> > > > > > >       firmware, to enable video decoding capabilities.
> > > > > > >     - Enable SD-card slot on SDHC.
> > > > > > > 
> > > > > > > Co-developed-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
> > > > > > > Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
> > > > > > > Co-developed-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
> > > > > > > Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
> > > > > > > Co-developed-by: Nirmesh Kumar Singh <quic_nkumarsi@quicinc.com>
> > > > > > > Signed-off-by: Nirmesh Kumar Singh <quic_nkumarsi@quicinc.com>
> > > > > > > Co-developed-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> > > > > > > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> > > > > > > Co-developed-by: Mohd Ayaan Anwar <quic_mohdayaa@quicinc.com>
> > > > > > > Signed-off-by: Mohd Ayaan Anwar <quic_mohdayaa@quicinc.com>
> > > > > > > Co-developed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > > > > > > Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > > > > > > Co-developed-by: Monish Chunara <quic_mchunara@quicinc.com>
> > > > > > > Signed-off-by: Monish Chunara <quic_mchunara@quicinc.com>
> > > > > > > Co-developed-by: Vishal Kumar Pal <quic_vispal@quicinc.com>
> > > > > > > Signed-off-by: Vishal Kumar Pal <quic_vispal@quicinc.com>
> > > > > > > Signed-off-by: Wasim Nazir <wasim.nazir@oss.qualcomm.com>
> > > > > > > ---
> > > > > > >    arch/arm64/boot/dts/qcom/lemans-evk.dts | 387 ++++++++++++++++++++++++++++++++
> > > > > > >    1 file changed, 387 insertions(+)
> > > > > > > 
> > > > > > 
> > > > > > > @@ -356,6 +720,29 @@ &ufs_mem_phy {
> > > > > > >    	status = "okay";
> > > > > > >    };
> > > > > > > +&usb_0 {
> > > > > > > +	status = "okay";
> > > > > > > +};
> > > > > > > +
> > > > > > > +&usb_0_dwc3 {
> > > > > > > +	dr_mode = "peripheral";
> > > > > > Is it actually peripheral-only?
> > > > > 
> > > > > Hi Dmitry,
> > > > > 
> > > > > HW supports OTG mode also, but for enabling OTG we need below mentioned
> > > > > driver changes in dwc3-qcom.c :
> > > > 
> > > > Is it the USB-C port? If so, then you should likely be using some form
> > > > of the Type-C port manager (in software or in hardware). These platforms
> > > > usually use pmic-glink in order to handle USB-C.
> > > > 
> > > > Or is it micro-USB-OTG port?
> > > > 
> > > 
> > > Yes, it is a USB Type-C port for usb0 and we are using a 3rd party Type-C port
> > > controller for the same. Will be enabling relevant dts node as part of OTG
> > > enablement once driver changes are in place.
> > 
> > Which controller are you using? In the existing designs USB-C works
> > without extra patches for the DWC3 controller.
> > 
> 
> Hi Dmitry,
> 
>  On EVK Platform, the VBUS is controlled by a GPIO from expander. Unlike in
> other platforms like SA8295 ADP, QCS8300 Ride, instead of keeping vbus
> always on for dr_mode as host mode, we wanted to implement vbus control in
> dwc3-qcom.c based on top of [1]. In this patch, there is set_role callback
> present to turn off/on the vbus. So after this patch is merged, we wanted to
> implement vbus control and then flatten DT node and then add vbus supply to
> glue node. Hence made peripheral only dr_mode now.

In such a case VBUS should be controlled by the USB-C controller rather
than DWC3. The reason is pretty simple: the power direction and data
direction are not 1:1 related anymore. The Type-C port manager decides
whether to supply power over USB-C / Vbus or not and (if supported)
which voltage to use. See TCPM's tcpc_dev::set_vbus().

> 
> [1]: https://lore.kernel.org/all/20250812055542.1588528-3-krishna.kurapati@oss.qualcomm.com/
> 
> Regards,
> Krishna,
> 
> > > 
> > > > > 
> > > > > a) dwc3 core callback registration by dwc3 glue driver; this change is under
> > > > >      review in upstream.
> > > > > b) vbus supply enablement for host mode; this change is yet to be submitted
> > > > >      to upstream.
> > > > > 
> > > > > Post the above mentioned driver changes, we are planning to enable OTG on
> > > > > usb0.
> > 
> 

-- 
With best wishes
Dmitry

  reply	other threads:[~2025-09-02  2:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 18:20 [PATCH 0/5] arm64: dts: qcom: lemans-evk: Extend board support for additional peripherals Wasim Nazir
2025-08-26 18:21 ` [PATCH 1/5] dt-bindings: mmc: sdhci-msm: Document the Lemans compatible Wasim Nazir
2025-08-27  1:19   ` Dmitry Baryshkov
2025-08-28 14:54     ` Monish Chunara
2025-08-26 18:21 ` [PATCH 2/5] arm64: dts: qcom: lemans: Add SDHC controller and SDC pin configuration Wasim Nazir
2025-08-27  1:20   ` Dmitry Baryshkov
2025-08-28 14:57     ` Monish Chunara
2025-09-03 16:12     ` Konrad Dybcio
2025-09-03 16:28       ` Wasim Nazir
2025-09-03 17:16         ` Konrad Dybcio
2025-08-26 18:21 ` [PATCH 3/5] arm64: dts: qcom: lemans-evk: Extend peripheral and subsystem support Wasim Nazir
2025-08-27  1:35   ` Dmitry Baryshkov
2025-08-28  6:35     ` Sushrut Shree Trivedi
2025-08-28 11:01       ` Dmitry Baryshkov
2025-08-28 13:08     ` Sushrut Shree Trivedi
2025-08-28 13:30       ` Dmitry Baryshkov
2025-08-29 14:20         ` Monish Chunara
2025-08-29 16:24           ` Dmitry Baryshkov
2025-09-01  7:32             ` Krishna Kurapati PSSNV
2025-09-02  2:34               ` Dmitry Baryshkov [this message]
2025-09-02 17:16                 ` Dmitry Baryshkov
2025-09-03  9:12                   ` Krishna Kurapati PSSNV
2025-08-28 15:05     ` Monish Chunara
2025-09-01 11:32     ` Vikash Garodia
2025-08-27 23:06   ` Bjorn Andersson
2025-08-28 12:23     ` Wasim Nazir
2025-08-28  6:56   ` Krzysztof Kozlowski
2025-08-28 15:15     ` Wasim Nazir
2025-08-26 18:21 ` [PATCH 4/5] arm64: dts: qcom: lemans: Add gpr node Wasim Nazir
2025-08-26 18:21 ` [PATCH 5/5] arm64: dts: qcom: lemans-evk: Add sound card Wasim Nazir
2025-08-27 23:07   ` Bjorn Andersson
2025-08-28 16:21     ` Mohammad Rafi Shaik
2025-08-26 23:19 ` [PATCH 0/5] arm64: dts: qcom: lemans-evk: Extend board support for additional peripherals Rob Herring (Arm)

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=ly5j2eodrajifosz34nokia4zckfftakz5253d2h6kd2cxjoq3@yrquqgpnvhp6 \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quic_dikshita@quicinc.com \
    --cc=quic_mchunara@quicinc.com \
    --cc=quic_mohdayaa@quicinc.com \
    --cc=quic_nkumarsi@quicinc.com \
    --cc=quic_sushruts@quicinc.com \
    --cc=quic_vispal@quicinc.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=viken.dadhaniya@oss.qualcomm.com \
    --cc=wasim.nazir@oss.qualcomm.com \
    /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).