Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp62969lqz; Fri, 29 Mar 2024 08:36:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXj3kZFjel3pdJoPa+lU+59y0WmUTNQUyrFaUk6Rl5agbdp4xXrRxYwOKenxcxRTccte01LdnJv0ySRt65/o7DYhDwxVyfDJPbuVhXRbw== X-Google-Smtp-Source: AGHT+IGtNwAEkXX+FtoBuuzGhfRf3jPj/pnZAXPK6q8dNsxdrH+HTpFDFyHekCKk3YJxfX7Aq01B X-Received: by 2002:a05:6a21:9996:b0:1a3:a637:9753 with SMTP id ve22-20020a056a21999600b001a3a6379753mr2781107pzb.12.1711726569951; Fri, 29 Mar 2024 08:36:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711726569; cv=pass; d=google.com; s=arc-20160816; b=xdqlKQbhz7EKUb3aYbh0RFKRnJbZXGGVUYAKMTzuuSxTXw8q802a8cdi4xJEjSczPs F7EO+5q6OGxc9KGORnnG64sJEEPZc5AHRqx0TzQW5lH36zT0YFoTvR5SpU1PaTD3MEmt 008Ruby18eEtU3fc08lFQ2XedRGiKnEWSZdtwQvYzuhI73GQ7WA0ZZRH3pNxN7XCU9rl 2XUJuyCSSquLzvmW1jVHpLlTniVV/rtNAc52vvA9M5T3aa6v1dNo+Yk8ey0w57okP/Op cRdqusvJDN/XGe4BBXsLRwulNkrAeoPWM39rLp8lHktiIMl8dMc+MVFn/sMW9s3RvmqX 6kLw== 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=NyDnNSvCJUp05VCQqo3677K6CevG5jtaaiUaNI9UR+M=; fh=3pzF1iCwuXA63RdC0ROVBW37z0vm3L3RsT/Vv+Enk6o=; b=e+Jm7V9C+W4IHyRDTKdnO6CmUCcYQ7+I75x/KvU5QirTg+nmmnpoRAfb8X4lk7RG24 LJzbTrEU4Rb8i1R3ucbcLb4EnADA0IJW5X9CjwmrdtyMCBSFnjkIYNuV4jtwzdA/WIx6 oWIWg/bHNnyXB0jTvtdC9D4HxMiEKK9TIfNF45NxAPHRpZEhfXT5zwzlEF6QqHmJUaKf x1TsDXU4HZf0J+rt+5vrDGRKGu1m3oyqfZhxG7JAgf3CUSFzQsKx/fMfJlCG1yQmbQ9W 25Z48hq622CGa9ZqVdZr4P8fugCvZeN7GLqMwWGX6JP6PAtTThaq//wcVR1FLk1MiJAY +b+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xx1Qa20K; 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-125045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125045-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x7-20020a056a00188700b006ea78daf9f1si3971011pfh.311.2024.03.29.08.36.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 08:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xx1Qa20K; 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-125045-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125045-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4A359B268EC for ; Fri, 29 Mar 2024 14:59:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B550313C3CF; Fri, 29 Mar 2024 12:53:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xx1Qa20K" Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (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 3CA441EEFD for ; Fri, 29 Mar 2024 12:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716835; cv=none; b=VKALDcOhnyd41pMBtdE0dtXL0Zs9D2J0spfWP3xXY/qfK7GBtaC4ZCGsZ97D13G5okSimkBrMW3iL2scsclRffNkZhkbrT0lTrXQvHcnySlLzDOEHAnjD61I2jDTmy4DeJskIn7zr8c9cIXpCEr2YYpU1KW0dtZTdskJLITUcMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716835; c=relaxed/simple; bh=UsSlr2DfmOF/BtL79NIGofPlpt4lDrgJKpftKL7JDDI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Juh+mGyYA6PsLIZzOUHwAb17GzGkKzM3yeZZrOg1wsSqlsdZmoKJ2te1x4MjQtUQxEcPscflUzR7ijyGAkaXNnPRIINOPxlYZEU3DSZm7tSfdPx4DNReNVd72z5Qw8ebiZY2UDrjZcpO7dJL9GTuwTd/hx3jyWwpxRhvQFjYvo8= 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=xx1Qa20K; arc=none smtp.client-ip=209.85.219.170 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-f170.google.com with SMTP id 3f1490d57ef6-dcbc6a6808fso1803423276.2 for ; Fri, 29 Mar 2024 05:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711716833; x=1712321633; 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=NyDnNSvCJUp05VCQqo3677K6CevG5jtaaiUaNI9UR+M=; b=xx1Qa20KQGb1Gf4AovVMHQnR/0+zE2BThA1nMVYx8ld5frjNSyOUOUdZYNgUY4l8Lf fyJjdsv8v6I6RtyCgPjifp/mEj4JgxZJ4YK9PQoXwQn/0WT9Zj9LPpMjw1i9DThLauH5 j1V97wHgknPR9it6h7c+kY3KDCTeTaiRIb4uNOrxi2adamp+TKGIlpC3P+fSX7WeEtWx SDqwumj+SZqC0pI2uuiFeuJOJ3PRvaDh06qHdRAxqFUuHz9/SVvkfxPqT7gLjdKk3GCu FQF9bDH91TAfVsJ1tz15GFAWWaSa781e9GgYq6xu2U/cjXaVwFC9Jg4CtjTvrwuvb59Z NURg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711716833; x=1712321633; 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=NyDnNSvCJUp05VCQqo3677K6CevG5jtaaiUaNI9UR+M=; b=LyqtILPo4ZLTpMDrOTw9uV5NO4oo8xv/tPROmWKjKuaHuiamEJ+EcRsG+6mSvJUWDY NuHBUoOoRobMEYbxWIu5j7qGr6/LDiW6Gcy7MT3htKKhhN3iWVmLlt/opEwsJs6YMtea hXlJKe5LKY3U/rZpxOO27eImXW+z5J4NDGIeIqXGuDMtIy03tvIaV46Y4yf3P1AKITQ/ eQwcfwHhClLJMuiX1rr3eKSRNiVYbZLJPq9soUlyWawmWhjbXpnS3jcVVvOP6/HDQdBl VhGMflbyPB9vL1BSOOOdgFuaOA8l6sO9ykGIXmIebzvVpyXta+M5yQH6Z93ZzUT9C/VV qWBQ== X-Forwarded-Encrypted: i=1; AJvYcCU2h2h6ibc6D6x/YnnhJA41Vru2db+OfIC9qkimBTJGdqr/04612/qPZGw1VwtOrEB/opZU9pI6EGIhXel9zErICDxZO/PRN4OEK856 X-Gm-Message-State: AOJu0YyBVprVa1gCwlIJhN3vHKM7P63rQgupcKGzCXqX8H/7M2B4Fyj7 Hqzj1kgV0FB7dwmRiDJALoCpnEO49+MSt7f+lLZ6YgvoB3wj/ADXkz3qgIv9mb21czPDJaGycpg aJyz1c/wZKRITpUArMjFdltnU/fH1Vj+miN12SQ== X-Received: by 2002:a25:6c8a:0:b0:dc6:c2b2:c039 with SMTP id h132-20020a256c8a000000b00dc6c2b2c039mr2259417ybc.41.1711716833190; Fri, 29 Mar 2024 05:53:53 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240329071948.3101882-1-quic_kriskura@quicinc.com> In-Reply-To: <20240329071948.3101882-1-quic_kriskura@quicinc.com> From: Dmitry Baryshkov Date: Fri, 29 Mar 2024 14:53:42 +0200 Message-ID: Subject: Re: [RFC PATCH 0/2] Add gpio-usb-c-connector compatible To: Krishna Kurapati Cc: Krzysztof Kozlowski , Rob Herring , Greg Kroah-Hartman , Conor Dooley , Miquel Raynal , Guenter Roeck , Bjorn Helgaas , Kyle Tso , Fabrice Gasnier , Heikki Krogerus , u.kleine-koenig@pengutronix.de, AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com Content-Type: text/plain; charset="UTF-8" On Fri, 29 Mar 2024 at 09:20, Krishna Kurapati wrote: > > QDU1000 IDP [1] has a Type-c connector and supports USB 3.0. > However it relies on usb-conn-gpio driver to read the vbus and id > gpio's and provide role switch. However the driver currently has > only gpio-b-connector compatible present in ID table. Adding that > in DT would mean that the device supports Type-B connector and not > Type-c connector. Thanks to Dmitry Baryshkov for pointing it out [2]. USB-B connector is pretty simple, it really has just an ID pin and VBUS input, which translates to two GPIOs being routed from the _connector_ itself. USB-C is much more complicated, it has two CC pins and a VBus power pin. It is not enough just to measure CC pin levels. Moreover, properly handling USB 3.0 inside a USB-C connector requires a separate 'orientation' signal to tell the host which two lanes must be used for the USB SS signals. Thus it is no longer possible to route just two pins from the connector to the SoC. Having all that in mind, I suspect that you are not describing your hardware properly. I suppose that you have a Type-C port controller / redriver / switch, which handles CC lines communication and then provides ID / VBUS signals to the host. In such a case, please describe this TCPC in the DT file and use its compatible string instead of "gpio-c-connector". > > This series intends to add that compatible in driver and bindings > so that it can be used in QDU1000 IDP DT. > > [1]: https://lore.kernel.org/all/20240319091020.15137-3-quic_kbajaj@quicinc.com/ > [2]: https://lore.kernel.org/all/CAA8EJprXPvji8TgZu1idH7y4GtHtD4VmQABFBcRt-9BQaCberg@mail.gmail.com/ > > Krishna Kurapati (2): > dt-bindings: connector: Add gpio-usb-c-connector compatible > usb: common: usb-conn-gpio: Update ID table to add usb-c connector > > Documentation/devicetree/bindings/connector/usb-connector.yaml | 3 +++ > drivers/usb/common/usb-conn-gpio.c | 1 + > 2 files changed, 4 insertions(+) > > -- > 2.34.1 > -- With best wishes Dmitry