Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1074039lqm; Thu, 2 May 2024 04:44:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpks37UBjpglBqFQBMmBjvq1zDCelXJyEJK8gToJzeKw2sZdVp3ofLNDiPJZDOmeWK5sB6AWYv9U7GMEtNMKLmxzlILFcxnK8q6YrY+g== X-Google-Smtp-Source: AGHT+IFts1uvhQjOqdyjsntRYcqCXnUyC77uzhtn6/jSCKCCUUrMdoKHFjTptGJ9Xz8KCCSLc69z X-Received: by 2002:a17:907:119c:b0:a58:ec38:be74 with SMTP id uz28-20020a170907119c00b00a58ec38be74mr1495195ejb.17.1714650287465; Thu, 02 May 2024 04:44:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714650287; cv=pass; d=google.com; s=arc-20160816; b=Z4dbweVoXSdgdtWJV8dYMJX7l+VrtyXG/MRctBTYPlXfC/4e8R0jSj+sSd/26GDeMo vTdziygQPGY2r/9E0uF711semCWVesHC34f4veU5LKQ6hcoEBLC/BjWnekew0p6epAVi V6c3zg3kfxqIXbnwcYqpaIICL4NPRSn03etdU38vXLEht7qGYZDzfPc/g1ZeSOV+uOaW pVqxNeFZvNrlCZiwuw4hZIefu3ToK+beaHB0+mELvB7o06uRPmocnf5+WBcE6YvgPX0L vYtLgp6Pe4PoQWOp//WosQYj0PxHhRXZ3bBGpp7xQnGxznR6AgImghITinpHFopwQcMR FHwQ== 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=hs0Nc0RqDY6OiurlpPpTgb9tgJy9jZNX1Jp6pCKzxxM=; fh=a8+FPBe0n5o2xYo5mM6raKSd1Z2CpIqtPszPyHFf/oM=; b=0CcgcpLs8CNGS8dDK/PTzxetuumXyzoXBbc5bqrZWRrXoTAl0xnUqZEctoLG915EcJ 6lLnVUO8G+o32FwZ0SxmWNvGS90f5q6mNyeDJy11OUqzY+64ad89KaKHuez5fVnbkCeW AKp5mZD8y1DzqLJZjcgGQITWezZtydjAuoho7EC2eMb+2f1srMYtxzrnNS/q0cKMW5Bb Nq57fNE2RFxy+DnxHs12UTxyPRP0XzLiy/lN/9WRNaDXUbGW8jV9YFtJvMTQG1UfNCjW VVHKCVOL2LaZN5HQs2WuWTn40ZgejuUzapT+0of8C3l5/Povld50MkvK6XkduEkitCv5 nUtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=En+nyEsU; 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-166407-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166407-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j21-20020a170906095500b00a5223362f06si441204ejd.817.2024.05.02.04.44.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 04:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166407-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=En+nyEsU; 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-166407-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166407-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0616E1F21ED1 for ; Thu, 2 May 2024 11:44:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9653A6BB47; Thu, 2 May 2024 11:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="En+nyEsU" Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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 0DC3263417 for ; Thu, 2 May 2024 11:44:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714650278; cv=none; b=nR+hzAIjDS4OOmeYchHBCOBrh8Zgy70NIM9hKUKa+BpddqiSSEhOhEQtc5ZPRB/z8LWwOC/jM0Q0HggkKPIlMIerGBm9qN5/AoyWL1FHGthWLnoWOiAWWBHBrSI0/ShHk0Bkl9tKuZVQIIjtkDPH6zNvbpa+nV6k2Zolkc24hRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714650278; c=relaxed/simple; bh=3B5U1op7r0DTmrEG2HdH2GbKAb31+8iCOdD7rSVpnX0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=LLnCaWN3DYjZIx2pCcZ/T8JKFEZXYiyDmhGeNSPwbhWAax8KDV5X2TP6Re8eJMFvhAkQSHOnyJLiyppeF7z6gpomLV8y5FiVp+qhIT7osRNsZd3lgyjd5JaijQfAGAqc834iM1vGuTdGX+INGRQsZgZL7r1Ach93EwNN60ED/Jo= 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=En+nyEsU; arc=none smtp.client-ip=209.85.219.172 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-f172.google.com with SMTP id 3f1490d57ef6-de54b28c41eso8784423276.0 for ; Thu, 02 May 2024 04:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714650276; x=1715255076; 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=hs0Nc0RqDY6OiurlpPpTgb9tgJy9jZNX1Jp6pCKzxxM=; b=En+nyEsUPc1JwEzc2k+SXZw9ecO8ayict3LYiA2Zoqb4JPZAPhgWobwBFAXXiCX/+4 nDBldw62lP9U/O0o6/7VVHSp++1CfC5j8+cTYD9cL/x+GirTXyAjbpSxqUU0rI3Hhp4S zUy4vP+5/aAXlCRMVGpGCwWC1KEwCgyiZy3IST6S/YBDwQuJDagdpqppxct8nQw4dXra lO+aMKeIcPAXRMWs/oWrKnOXykg3k46r8ZkDUbWgV9J2kT6n4D2OqRCZsbl4nopYFGNJ IEjROQEVwzkGzqUyl3vdCxPzuYh/2J6JDO3DVACT2SQdz5dVezziZoZzVWYJ7RwJcDc7 GATA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714650276; x=1715255076; 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=hs0Nc0RqDY6OiurlpPpTgb9tgJy9jZNX1Jp6pCKzxxM=; b=E/89836WSocx7GujdzdFtg7IZWuaRvH0eWiuX9u3zbyiIqXjilHa30w8dhclkeMQZl eOLZXiK9xaak+0Dge7HoSySjxsN28edYisyDJpYNtEDS/+PKfT3n7Qf5FnCYoz2iY+VG z9Yn8/3oIGen/k6bYd8+FFF4d4+UN6dMDR7zGaUUXi/mxJvHKtSubw27q8JitUdFJP3O Zpe15xz2GAuADcl6McYEAZkfFDCxONzBFB5TvDYNiBkws5ex8JKkaz5iFdFko+2Jqxwh OHZItICZ9SlpfN8IxW5Q3ruMk5PtEBjxl7/h7UfuCGZHKbhoDVJONMnFek7+aP8eV218 Q4kw== X-Forwarded-Encrypted: i=1; AJvYcCXgFYd14ReiZntyZoUFCf/BTGeZ62o5RUGzNpJkLMVwD8PFclgZnSyUW7PeSrZ6jabIeTjl4/HQdV74eVwb8v8skJDrkAipdnR3pUnB X-Gm-Message-State: AOJu0YxsIQcudO2kX3f4G0d7ZlRHTN/pvoBhBBmoz+DYnckuHxpWG4VP evVk5P6SZmHP2ygG5Hs8G5jTcv9lFJ6dawbALm+2260pb8eUf3d2NfCOnsdGaLd9lJ34R0BzMrl GPZjcMpjLsEs7Us8bnE8OX/1Kb+7B0GDoc0TsSQ== X-Received: by 2002:a5b:52:0:b0:de4:738b:c2ea with SMTP id e18-20020a5b0052000000b00de4738bc2eamr5728494ybp.24.1714650275853; Thu, 02 May 2024 04:44:35 -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> In-Reply-To: <5134c012-60b1-4c07-9e1f-c48c3d88d404@quicinc.com> From: Dmitry Baryshkov Date: Thu, 2 May 2024 14:44:24 +0300 Message-ID: Subject: Re: [PATCH v3 0/3] Add devicetree support of USB for QDU/QRU1000 To: Krishna Kurapati PSSNV Cc: Komal Bajaj , 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 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. > > [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