Re: [PATCH 3/5] arm64: dts: qcom: lemans-evk: Extend peripheral and subsystem support

From: Krishna Kurapati PSSNV
Date: Wed Sep 03 2025 - 05:12:54 EST




On 9/2/2025 10:46 PM, Dmitry Baryshkov wrote:
On Tue, Sep 02, 2025 at 05:34:27AM +0300, Dmitry Baryshkov wrote:
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@xxxxxxxxxxxxxxxx>
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@xxxxxxxxxxxxxxxx>
Co-developed-by: Sushrut Shree Trivedi <quic_sushruts@xxxxxxxxxxx>
Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@xxxxxxxxxxx>
Co-developed-by: Nirmesh Kumar Singh <quic_nkumarsi@xxxxxxxxxxx>
Signed-off-by: Nirmesh Kumar Singh <quic_nkumarsi@xxxxxxxxxxx>
Co-developed-by: Krishna Kurapati <krishna.kurapati@xxxxxxxxxxxxxxxx>
Signed-off-by: Krishna Kurapati <krishna.kurapati@xxxxxxxxxxxxxxxx>
Co-developed-by: Mohd Ayaan Anwar <quic_mohdayaa@xxxxxxxxxxx>
Signed-off-by: Mohd Ayaan Anwar <quic_mohdayaa@xxxxxxxxxxx>
Co-developed-by: Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>
Signed-off-by: Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>
Co-developed-by: Monish Chunara <quic_mchunara@xxxxxxxxxxx>
Signed-off-by: Monish Chunara <quic_mchunara@xxxxxxxxxxx>
Co-developed-by: Vishal Kumar Pal <quic_vispal@xxxxxxxxxxx>
Signed-off-by: Vishal Kumar Pal <quic_vispal@xxxxxxxxxxx>
Signed-off-by: Wasim Nazir <wasim.nazir@xxxxxxxxxxxxxxxx>
---
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().

Okay, your Type-C manager is HD3SS3220. It drives ID pin low if the VBUS
supply should be enabled. Please enhance the driver with this
functionality. You cann't use the USB role status since it doesn't
perform VSafe0V checks.


Hi Dmitry,

Thanks for the suggestion. Sure, will take up the task of implementing vbus supply based on id-pin in hd3 driver.

Also, will move to otg once that is implemented in port controller driver. Will keep it in device mode for now in this series (or its further revision). Also will make sure to document it in commit text in next revision.

Regards,
krishna,