Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp343795lqo; Wed, 8 May 2024 01:09:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqoz97joWyGVSxFbijy0oFzHidPD8ROhJAe9kjoYRKte0TdXi/ZJQfDPfpQf6Ml4u3memgWysbc6a3Tlu4vES217rQAa85324wQ11hOQ== X-Google-Smtp-Source: AGHT+IGlO8a6JO3r6yZGs4oYM7cmum49cf527Cywr0uELd99koWy2jFqKlj24JltaDaZPvAQ0jXy X-Received: by 2002:a25:2706:0:b0:dcf:c299:2467 with SMTP id 3f1490d57ef6-debb9d6c0demr2193808276.5.1715155785497; Wed, 08 May 2024 01:09:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715155785; cv=pass; d=google.com; s=arc-20160816; b=cnki7PjYKwHTmRI4qVPoYNv4Det7rB/zz3+SG6qIvuD170ouIkj6gnqRTOwsu0+06m VSw386v3g1aCXUiuHqz7d+hOG0awmKfA7KieB2xgInTxZMkg3xAdMX4/RrRf8TikFBpH VlUKzGVaQOc/tlvvj7uFBBhgcFARCpT9WkedxThDrW+i08QaJxTUzVJ+iSjGlttcPuYt T5R74mFtpa8y5E8+/BxLNAxmNJ0DmFuX7+yNNlRLvsjWNco1rVHJqihDVCwIv2a9/Pw3 ptWb/pZPOw1wd1ctjQ/d38NHV/lsTVwhno3KNITbktBEoXeeQKa/A1yPohQrHQ9eMzw/ Op0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=YyPej1pI/oVXVkHLEEGi3mJmmE4iMy2MyP2y6dxfKZ0=; fh=XzWo8T3AIy+ZBRTGJrwWk+ObHJMNYxeyy4Qo8GwUXxo=; b=0HiEKJksKox9D/mUbhhzWAWFiaccEvc/9VIBd4dXnz5QK+GWd1xWeBTDqEWMe+2vVI FE6G3QRFO8pBfkhWFUKQLkn/mEmY5Hwn4tXko6oA4aOwEn2KpkJfX/cecye0KaOYpKas mt7lmawDTTNkCBPzsaTRzPhmuqsVuvkNb3m+qnjeaKbaBMDxj7irbzySexDdq7hOAOEy FGuyxvmOmVu7ckuUggGFrpEXRZL4M33QMOrCsmPPjBR5qgUxanPOFQ67gvPxl+1pDk4T WrcRpXiw/245UlnAovsXM+QB11LxlpHqawS9Bz3EJH51SULmB+980Yc4FT+N/h1Do823 Xiyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XhRf6AyW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-172886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p7-20020a05622a13c700b00434ae31ed72si14017962qtk.540.2024.05.08.01.09.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XhRf6AyW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-172886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2CCC61C2102F for ; Wed, 8 May 2024 08:09:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0003524AF; Wed, 8 May 2024 08:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XhRf6AyW" Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB37B4D59F for ; Wed, 8 May 2024 08:09:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715155751; cv=none; b=c4yBknuWq7eiObrq1rkiw/+jYJgocwIgfFIR58bQonbTl7bYHaTzrDnIZHS7JYCzNOdZYQKAvzGpI+dJ7SlzNAb1OWJcWUfxACTiWMgzpjMeFIQz1X5xyurE6f/GONAv4Z+e/pCpuylRr+a+htvRS4pG2QjEIoJfZhjdoUv4dHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715155751; c=relaxed/simple; bh=x2v9F1VDhB91ey8gDsIzGFW7qT7YEX73UMWKN8WTf4o=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MhH4RGt1JNAOeMNbEC0tuq/xCPEQULSW48oc/PXF6NpeJ0yaydrwz+hCpduOhwHD0FFx0ZmgW/p+3XNxVX8ZQEHm9A1J3bPe5L8X2Um95g9zt+lYQLz4ZvIJdvOeDsMGIHiuDKuGRZjxuFnFeGwOI5YBEGHYD4lRE+G5eiLWL9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XhRf6AyW; arc=none smtp.client-ip=209.85.219.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-de45dba15feso4285453276.3 for ; Wed, 08 May 2024 01:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715155749; x=1715760549; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YyPej1pI/oVXVkHLEEGi3mJmmE4iMy2MyP2y6dxfKZ0=; b=XhRf6AyWzL/+kQeMN23EWXf/rpMX3gv4W40NJmIHkJ42uMfbsfurV50JiholzzQHix tOpU8O6kahS44hL4gq9xM9H7IRLtiVr6doR2+xJTVgyA8BK6zUmRa39zCbwwTEgmpoVy JV1VDaQ1gaLB8m6bzy3rEvIgb6BJx5u91xlEAsFQ/U2IfcLqZTnqxMFtmDU0KT9sCCVJ xXCuOXVqEIui4R8vbyMPa6p/pS0h8Tx0QYAUcX4NLwAWZhPGx73RGBdjsn9uhcE90urU Pzgop5gNKQam0fXhd6ltGLbOfolwdyF3kymyf2hiMcJP5kQD5yfr2YSjxVLLWmUTJru2 77/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715155749; x=1715760549; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YyPej1pI/oVXVkHLEEGi3mJmmE4iMy2MyP2y6dxfKZ0=; b=qI6+s6/LLayGPWb+5RTt15X6h/OaYfgBwtHU3NT1l0vbuiL2RbUswIMewe/pjC1NRA 5IVV5rQalYGQrhgSdXgH5IiOnsBwoqxgzrtNJBNC0bojTYtzk5g8HMvgQd2e6u5P9mse IQxA3UWaTFOHvZ1vJGM1tI0cN20AhFGTSJ46XAK5OwCNAk+9C6WEFa6GJHH/hdcOWWpp MFni1Zd6aAv8//Km0RrIXcz1O106n/kvB0IQ36u0wae5CN0qQGmFH8AD3QpvP7ws15xg siAHx6psUhuL74Ddv5DThsXGTfnQbs45B+yDj7GE6vLMXwjtGkg/bbNaNYPnG6NNj3CB FViw== X-Forwarded-Encrypted: i=1; AJvYcCX/5rkKRTIF9AKqqNB6JgJ6ZXMQbTWhYxlF+IbJVhC1zh9zOUuygZFiT11gfBK68AJv3ii3OQycZgRR3vblW9VgZgU8GTgmTCb+zkap X-Gm-Message-State: AOJu0Yy5In1e6o7E+aDpi1aPNW0YJ2ZjDMgrAKbvI92Xm7aIbngEVsKv OIwhXqQpbzGysFBN436a8fx964chGTc1FTBwu0joDxTrd25Qd0UHzQnjhVwuJtG2Mc4KdAHyxwZ sItccgzr75YpISZk0UvfTTiCLN2HwkdcQ9AiWjw== X-Received: by 2002:a25:dc4c:0:b0:dcb:f7a0:b031 with SMTP id 3f1490d57ef6-debb9e3d259mr2017607276.50.1715155748788; Wed, 08 May 2024 01:09:08 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240502090326.21489-1-quic_kbajaj@quicinc.com> <5134c012-60b1-4c07-9e1f-c48c3d88d404@quicinc.com> <737b595c-3433-8ad8-ca89-7af77098f589@quicinc.com> In-Reply-To: <737b595c-3433-8ad8-ca89-7af77098f589@quicinc.com> From: Dmitry Baryshkov Date: Wed, 8 May 2024 11:08:57 +0300 Message-ID: Subject: Re: [PATCH v3 0/3] Add devicetree support of USB for QDU/QRU1000 To: Komal Bajaj Cc: Krishna Kurapati PSSNV , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , quic_wcheng@quicinc.com, quic_ppratap@quicinc.com, Jack Pham Content-Type: text/plain; charset="UTF-8" On Wed, 8 May 2024 at 09:12, Komal Bajaj wrote: > > > > On 5/2/2024 5:14 PM, Dmitry Baryshkov wrote: > > On Thu, 2 May 2024 at 12:48, Krishna Kurapati PSSNV > > wrote: > >> > >> > >> > >> On 5/2/2024 2:39 PM, Dmitry Baryshkov wrote: > >>> On Thu, 2 May 2024 at 12:04, Komal Bajaj 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. > > Hi Dmitry, > > Regarding the comment: > "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." > > We are also aligned with your statement of expressing the hardware > correctly. Since this needs quite a bit of effort to write a new driver > for TI switch or modifying existing TI driver to add GPIO support, can't > we go ahead with peripheral support only since the driver support is > absent currently. I think you are again mixing things here. You don't have to use the existing TI driver. Instead you can start with the gpio-b-usb-connector driver and later push a new driver for the switch instead. This has nothing to do with the hardware description of the device. > > We will plan to submit the patches in upcoming days for this. Since we > usually enable USB in peripheral mode so that USB debug (adb) will work, > I am thinking we can merge this and take up the OTG/host mode > separately. Please let me know your feedback on this. Well, granted that we are now close to the release, you can not merge anything. So you have about three weeks before the next patches can hit Bjorn's tree. I think this leaves plenty of time to develop a proper solution. > > Thanks > Komal > > > > >> > >> [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