Message ID | 20240205164316.805408-2-m.felsch@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-53034-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp997453dyb; Mon, 5 Feb 2024 08:45:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2p0jq8l3C9qTcgU/z0A3aKxGiS0WBkwmgAWcPc7vRXtFInc8oWWxPbGOhCGq7MyvM/mSB X-Received: by 2002:a05:6512:1055:b0:511:49ce:afc1 with SMTP id c21-20020a056512105500b0051149ceafc1mr128574lfb.48.1707151559165; Mon, 05 Feb 2024 08:45:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707151559; cv=pass; d=google.com; s=arc-20160816; b=ONfx/WpEBd9ZPPOa44m8MtFA7244u/JeSdyURAhwi+3ZO2Jc6zLYM3pvqO1+SzKMYD aojIaixCx9OgCPMrfsz9TDsBdXH3LGjuDasU7vAsLMiWec8G85+de5UQXcXDADbbvF9e ivkrAHvaXiWH6aQHd7xbcuoici6imBjsdHAmXMC/+2vVAPNoUyk9Q9K/YXdS+TEP7KCP szFF3x3Q4Hhn1m3ZEivYsmT78+cZDewM6Mh42ZZjAFL0nzvEEo9wRfDD82JhssaTvx2T mNWflH0qRhqwXpWcsaXcnMA2hL2F76ehoeL9fyGe37cXxLcmmkv4t7YwJa8nCoEF7W9d fw1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=P7ox2dxxgRLE30Ex2tloij6RXtqtfA4k/0S01b+JcXE=; fh=26L+tWbUXXaA41HHg0qXUPp6ZgcjfPBz48saakaThWc=; b=sPXEIl0qjTd7nxxDPOmlFW6Mr8LJhmQZvMnO8vWkatoEDvKEPcDSt0T9qrWkZ3R0bM qVKAPztYKiYqGxV8NfkkbzywZrc+jQRM+wQwA1cvBvXnNcyLyC221FiuZNJ8zoUZPmsj nePgkhEt/+hkOo8AcKcDcdb+EgcmAMBdonr0aqcfKJzPcaYEjynFj6RS3i5IDrOChxd/ VPEQHScKXxOz8V+qbS3JMlIlUSTeDlVIYJv+GTDw/Eo0T7RdefMccQ52V3SCkGRn4qDm PpLVLvMKid9R/uwvd7DwRxbZ6qfsmHhamyaWeySA+E/1BgUHp/te8nfx4vEdU4FQ4IFc LMmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-53034-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53034-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXF4xp3nISTcJgr9TAqGsT7f0XZqAF8uMufYHVzycslOHFHycL3An+80T04kJ4Ga+ulkUh8IR86yricFWS7RC7XtDqBqg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id le17-20020a170907171100b00a37e458fccdsi7975ejc.993.2024.02.05.08.45.58 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 08:45:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53034-ouuuleilei=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; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-53034-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53034-ouuuleilei=gmail.com@vger.kernel.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 BD9C81F25F1D for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 16:45:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B63A5482DF; Mon, 5 Feb 2024 16:43:45 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E7E740BF2 for <linux-kernel@vger.kernel.org>; Mon, 5 Feb 2024 16:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707151424; cv=none; b=bUJwO5kRyVB8x+FDCmSHrtZKN/JMAy9CQO8zfYfFjTbduVw4aVrHfBJo+4hMx70MIoXzLYM890B+RL1K3fP5xl4OiC0dwbx+dtdSmBFN1I5oNHICzuaxpvAri2V/vHlIjW6gpW+0H4QRBsRINryrTHQi7HRm0l7aaXHU3GLsn+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707151424; c=relaxed/simple; bh=xLjwZJOeXZFadK4nYdC3krKeoAWYMaGJ7UQfwJG985E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pVc83WRP9yeS8huLHYdgoYXNjs6BN2m3gp3ZYyO6lwr02qf5PzNcQ9QaMZp8TL/sTOcBPGTwmOtlxm4krukNhxNokBPL8rf+Hc/baN7FCeEBLshgTChfSdVOAoeqyViSVMXmHRxk5TBLwoJqnDp5GZEYntlDbPPXd1/J+lMN/J4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from <m.felsch@pengutronix.de>) id 1rX240-0004Lp-9O; Mon, 05 Feb 2024 17:43:20 +0100 From: Marco Felsch <m.felsch@pengutronix.de> To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux@roeck-us.net, heikki.krogerus@linux.intel.com Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 1/4] dt-bindings: usb: typec-tcpci: add tcpci compatible binding Date: Mon, 5 Feb 2024 17:43:13 +0100 Message-Id: <20240205164316.805408-2-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240205164316.805408-1-m.felsch@pengutronix.de> References: <20240205164316.805408-1-m.felsch@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790078153109322476 X-GMAIL-MSGID: 1790078153109322476 |
Series |
USB-C TCPM Orientation Support
|
|
Commit Message
Marco Felsch
Feb. 5, 2024, 4:43 p.m. UTC
This binding descripes the generic TCPCI specification [1]. So add the
generic binding support since which can be used if an different TCPC is
used compatible which is compatible to [1].
[1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 05/02/2024 17:43, Marco Felsch wrote: > This binding descripes the generic TCPCI specification [1]. So add the Typo: describes. No, this binding describes PTN5110, not generic TCPCI. This is not accurate commit description. > generic binding support since which can be used if an different TCPC is > used compatible which is compatible to [1]. Sorry, cannot parse it. Please run it through native speaker, Google grammar check, ChatGPT or some other way. > > [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > --- > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > index eaedb4cc6b6c..7bd7bbbac9e0 100644 > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > @@ -11,7 +11,9 @@ maintainers: > > properties: > compatible: > - const: nxp,ptn5110 > + enum: > + - nxp,ptn5110 > + - tcpci I don't think this is correct. First, this is binding for NXP chip, so why generic implementation should be here? I would expect it in its own dedicated binding. Second, we rarely want generic compatibles. Care to share more details? Are all details expected to follow spec, without need of quirks? Best regards, Krzysztof
On 24-02-06, Krzysztof Kozlowski wrote: > On 05/02/2024 17:43, Marco Felsch wrote: > > This binding descripes the generic TCPCI specification [1]. So add the > > Typo: describes. Argh. > No, this binding describes PTN5110, not generic TCPCI. This is not > accurate commit description. This binding is currently missued if another TCPCI conform chip is used which requires no special handling. I could have dropped this commit since the 'tcpci' is already present at i2c-device-id level. > > > generic binding support since which can be used if an different TCPC is > > used compatible which is compatible to [1]. > > Sorry, cannot parse it. Please run it through native speaker, Google > grammar check, ChatGPT or some other way. Argh.. you're right, sorry. I will rephrase it. > > [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > --- > > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > index eaedb4cc6b6c..7bd7bbbac9e0 100644 > > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > @@ -11,7 +11,9 @@ maintainers: > > > > properties: > > compatible: > > - const: nxp,ptn5110 > > + enum: > > + - nxp,ptn5110 > > + - tcpci > > I don't think this is correct. First, this is binding for NXP chip, so > why generic implementation should be here? I would expect it in its own > dedicated binding. The nxp,ptn5110 device was the first driver which implements an TCPCI conform driver. The driver already support the tcpci binding for i2c-id devices as I mentioned above. IMHO this whole binding (file) should be converted and the nxp,ptn5110 compatible should be marked as deprecated. > Second, we rarely want generic compatibles. Care to share more details? As said above this particular NXP chip is an TCPCI conform chip. There is nothing special about it. There are other vendors like OnSemi (in my case) which implement also an TCPCI conform chip. The (Linux) driver already binds to the generic tcpci compatible if the i2c-core falls back to the i2c-device id. It's even more confusing that the i2c-id supports only the generic binding the of-compatible support only the specifc one. > Are all details expected to follow spec, without need of quirks? Please see above, I hope this helps. Regards, Marco > > Best regards, > Krzysztof > >
On 24-02-06, Marco Felsch wrote: > On 24-02-06, Krzysztof Kozlowski wrote: > > On 05/02/2024 17:43, Marco Felsch wrote: > > > This binding descripes the generic TCPCI specification [1]. So add the > > > > Typo: describes. > > Argh. > > > No, this binding describes PTN5110, not generic TCPCI. This is not > > accurate commit description. > > This binding is currently missued if another TCPCI conform chip is used /missused/misused/ > which requires no special handling. I could have dropped this commit > since the 'tcpci' is already present at i2c-device-id level. > > > > > > generic binding support since which can be used if an different TCPC is > > > used compatible which is compatible to [1]. > > > > Sorry, cannot parse it. Please run it through native speaker, Google > > grammar check, ChatGPT or some other way. > > Argh.. you're right, sorry. I will rephrase it. > > > > [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > --- > > > Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > > index eaedb4cc6b6c..7bd7bbbac9e0 100644 > > > --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > > +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml > > > @@ -11,7 +11,9 @@ maintainers: > > > > > > properties: > > > compatible: > > > - const: nxp,ptn5110 > > > + enum: > > > + - nxp,ptn5110 > > > + - tcpci > > > > I don't think this is correct. First, this is binding for NXP chip, so > > why generic implementation should be here? I would expect it in its own > > dedicated binding. > > The nxp,ptn5110 device was the first driver which implements an TCPCI > conform driver. The driver already support the tcpci binding for i2c-id > devices as I mentioned above. IMHO this whole binding (file) should be > converted and the nxp,ptn5110 compatible should be marked as deprecated. > > > Second, we rarely want generic compatibles. Care to share more details? > > As said above this particular NXP chip is an TCPCI conform chip. There > is nothing special about it. There are other vendors like OnSemi (in my > case) which implement also an TCPCI conform chip. The (Linux) driver > already binds to the generic tcpci compatible if the i2c-core falls back > to the i2c-device id. It's even more confusing that the i2c-id supports > only the generic binding the of-compatible support only the specifc one. > > > Are all details expected to follow spec, without need of quirks? > > Please see above, I hope this helps. > > Regards, > Marco > > > > > Best regards, > > Krzysztof > > > > > >
On 06/02/2024 15:52, Marco Felsch wrote: > On 24-02-06, Krzysztof Kozlowski wrote: >> On 05/02/2024 17:43, Marco Felsch wrote: >>> This binding descripes the generic TCPCI specification [1]. So add the >> >> Typo: describes. > > Argh. > >> No, this binding describes PTN5110, not generic TCPCI. This is not >> accurate commit description. > > This binding is currently missued if another TCPCI conform chip is used Why would people misuse binding instead of doing things properly? :) > which requires no special handling. I could have dropped this commit > since the 'tcpci' is already present at i2c-device-id level. > >> >>> generic binding support since which can be used if an different TCPC is >>> used compatible which is compatible to [1]. >> >> Sorry, cannot parse it. Please run it through native speaker, Google >> grammar check, ChatGPT or some other way. > > Argh.. you're right, sorry. I will rephrase it. > >>> [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf >>> >>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> >>> --- >>> Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml >>> index eaedb4cc6b6c..7bd7bbbac9e0 100644 >>> --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml >>> +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml >>> @@ -11,7 +11,9 @@ maintainers: >>> >>> properties: >>> compatible: >>> - const: nxp,ptn5110 >>> + enum: >>> + - nxp,ptn5110 >>> + - tcpci >> >> I don't think this is correct. First, this is binding for NXP chip, so >> why generic implementation should be here? I would expect it in its own >> dedicated binding. > > The nxp,ptn5110 device was the first driver which implements an TCPCI > conform driver. The driver already support the tcpci binding for i2c-id > devices as I mentioned above. IMHO this whole binding (file) should be > converted and the nxp,ptn5110 compatible should be marked as deprecated. You speak about driver, but I was speaking about binding. > >> Second, we rarely want generic compatibles. Care to share more details? > > As said above this particular NXP chip is an TCPCI conform chip. There > is nothing special about it. There are other vendors like OnSemi (in my > case) which implement also an TCPCI conform chip. The (Linux) driver > already binds to the generic tcpci compatible if the i2c-core falls back > to the i2c-device id. It's even more confusing that the i2c-id supports > only the generic binding the of-compatible support only the specifc one. I don't know much about TCPCI, so maybe questions are obvious: you are claiming that there will be no differentiating hardware element, like reset-gpios or power supply for none of TCPCI-conforming chips? All of them will never need any different hardware configuration? Is this what you claim? Just to remind: there was such claim for USB and PCI till we figured out it was simply wrong and we are living now with on-board hubs and PCI power-sequencing stuff. > >> Are all details expected to follow spec, without need of quirks? > > Please see above, I hope this helps. Sorry, doesn't. You still speak about driver and how it can bind to something. I did not ask about this at all. To be clear: WE ARE NOT TALKING ABOUT LINUX DRIVER. We talk about hardware and how it is represented in Devicetree, including its supplies, pins, GPIOs and any ideas hardware engineers like to bring. Best regards, Krzysztof
On 24-02-06, Krzysztof Kozlowski wrote: > On 06/02/2024 15:52, Marco Felsch wrote: > > On 24-02-06, Krzysztof Kozlowski wrote: > >> On 05/02/2024 17:43, Marco Felsch wrote: > >>> This binding descripes the generic TCPCI specification [1]. So add the > >> > >> Typo: describes. > > > > Argh. > > > >> No, this binding describes PTN5110, not generic TCPCI. This is not > >> accurate commit description. > > > > This binding is currently missued if another TCPCI conform chip is used > > Why would people misuse binding instead of doing things properly? :) You know people... ;) .. > >>> properties: > >>> compatible: > >>> - const: nxp,ptn5110 > >>> + enum: > >>> + - nxp,ptn5110 > >>> + - tcpci > >> > >> I don't think this is correct. First, this is binding for NXP chip, so > >> why generic implementation should be here? I would expect it in its own > >> dedicated binding. > > > > The nxp,ptn5110 device was the first driver which implements an TCPCI > > conform driver. The driver already support the tcpci binding for i2c-id > > devices as I mentioned above. IMHO this whole binding (file) should be > > converted and the nxp,ptn5110 compatible should be marked as deprecated. > > You speak about driver, but I was speaking about binding. I know and I was afraid of mention the driver within this conversation since this is all about bindings and devices :) Nevertheless this particular NXP device does support the generic "tcpci" compatible already. The support is pulled indirectly via the i2c_device_id.name which is in the end used for of/acpi/legacy devices. > >> Second, we rarely want generic compatibles. Care to share more details? > > > > As said above this particular NXP chip is an TCPCI conform chip. There > > is nothing special about it. There are other vendors like OnSemi (in my > > case) which implement also an TCPCI conform chip. The (Linux) driver > > already binds to the generic tcpci compatible if the i2c-core falls back > > to the i2c-device id. It's even more confusing that the i2c-id supports > > only the generic binding the of-compatible support only the specifc one. > > I don't know much about TCPCI, so maybe questions are obvious: you are > claiming that there will be no differentiating hardware element, like > reset-gpios or power supply for none of TCPCI-conforming chips? All of > them will never need any different hardware configuration? Of course TCPCI doesn't mention reset gpios or power supplies but if you use this argumentation the already supported NXP device shouldn't be available too since the binding is missing the VDD supply ;) Since we never break compatibility, the vdd-supply have to be optional and the same can be done for reset-gpios. > Is this what you claim? Please see above. > Just to remind: there was such claim for USB and PCI till we figured out > it was simply wrong and we are living now with on-board hubs and PCI > power-sequencing stuff. Don't get me wrong, I get your point. In the end I don't care and can copy'n'paste the whole file and change the compatible to the OnSemi device or I can add the dedicated OnSemi compatible to this file. But I don't wanted to add an 2nd specific compatible while the device already supports the generic one but via i2c_device_id.name. Therefore I aligned the i2c_device_id with the of_device_id. > >> Are all details expected to follow spec, without need of quirks? > > > > Please see above, I hope this helps. > > Sorry, doesn't. You still speak about driver and how it can bind to > something. I did not ask about this at all. > > To be clear: > WE ARE NOT TALKING ABOUT LINUX DRIVER. I KNOW > We talk about hardware and how it is represented in Devicetree, > including its supplies, pins, GPIOs and any ideas hardware engineers > like to bring. I Know that too. Regards, Marco
On 07/02/2024 10:05, Marco Felsch wrote: > On 24-02-06, Krzysztof Kozlowski wrote: >> On 06/02/2024 15:52, Marco Felsch wrote: >>> On 24-02-06, Krzysztof Kozlowski wrote: >>>> On 05/02/2024 17:43, Marco Felsch wrote: >>>>> This binding descripes the generic TCPCI specification [1]. So add the >>>> >>>> Typo: describes. >>> >>> Argh. >>> >>>> No, this binding describes PTN5110, not generic TCPCI. This is not >>>> accurate commit description. >>> >>> This binding is currently missued if another TCPCI conform chip is used >> >> Why would people misuse binding instead of doing things properly? :) > > You know people... ;) > > ... > >>>>> properties: >>>>> compatible: >>>>> - const: nxp,ptn5110 >>>>> + enum: >>>>> + - nxp,ptn5110 >>>>> + - tcpci >>>> >>>> I don't think this is correct. First, this is binding for NXP chip, so >>>> why generic implementation should be here? I would expect it in its own >>>> dedicated binding. >>> >>> The nxp,ptn5110 device was the first driver which implements an TCPCI >>> conform driver. The driver already support the tcpci binding for i2c-id >>> devices as I mentioned above. IMHO this whole binding (file) should be >>> converted and the nxp,ptn5110 compatible should be marked as deprecated. >> >> You speak about driver, but I was speaking about binding. > > I know and I was afraid of mention the driver within this conversation > since this is all about bindings and devices :) > > Nevertheless this particular NXP device does support the generic "tcpci" > compatible already. The support is pulled indirectly via the > i2c_device_id.name which is in the end used for of/acpi/legacy devices. > >>>> Second, we rarely want generic compatibles. Care to share more details? >>> >>> As said above this particular NXP chip is an TCPCI conform chip. There >>> is nothing special about it. There are other vendors like OnSemi (in my >>> case) which implement also an TCPCI conform chip. The (Linux) driver >>> already binds to the generic tcpci compatible if the i2c-core falls back >>> to the i2c-device id. It's even more confusing that the i2c-id supports >>> only the generic binding the of-compatible support only the specifc one. >> >> I don't know much about TCPCI, so maybe questions are obvious: you are >> claiming that there will be no differentiating hardware element, like >> reset-gpios or power supply for none of TCPCI-conforming chips? All of >> them will never need any different hardware configuration? > > Of course TCPCI doesn't mention reset gpios or power supplies but if you > use this argumentation the already supported NXP device shouldn't be > available too since the binding is missing the VDD supply ;) Since we The existing binding is incomplete and maybe, as you suggested, misused, but this is not a reason to make it worse. > never break compatibility, the vdd-supply have to be optional and the > same can be done for reset-gpios. So the answer to my questions is: They will not be 100% identical and they will need customization? > >> Is this what you claim? > > Please see above. > >> Just to remind: there was such claim for USB and PCI till we figured out >> it was simply wrong and we are living now with on-board hubs and PCI >> power-sequencing stuff. > > Don't get me wrong, I get your point. In the end I don't care and can > copy'n'paste the whole file and change the compatible to the OnSemi > device or I can add the dedicated OnSemi compatible to this file. But I > don't wanted to add an 2nd specific compatible while the device already > supports the generic one but via i2c_device_id.name. Therefore I aligned > the i2c_device_id with the of_device_id. You can add generic compatible used as fallback. That's pretty common practice. > >>>> Are all details expected to follow spec, without need of quirks? >>> >>> Please see above, I hope this helps. >> >> Sorry, doesn't. You still speak about driver and how it can bind to >> something. I did not ask about this at all. >> >> To be clear: >> WE ARE NOT TALKING ABOUT LINUX DRIVER. > > I KNOW > >> We talk about hardware and how it is represented in Devicetree, >> including its supplies, pins, GPIOs and any ideas hardware engineers >> like to bring. Then terms "driver" and "binding" (or matching) do not fit here as arguments whether specific compatible should be there or not. There is guideline for that: writing bindings, which exactly, 100% covers this thing here. Best regards, Krzysztof
On 24-02-07, Krzysztof Kozlowski wrote: > On 07/02/2024 10:05, Marco Felsch wrote: > > On 24-02-06, Krzysztof Kozlowski wrote: > >> On 06/02/2024 15:52, Marco Felsch wrote: > >>> On 24-02-06, Krzysztof Kozlowski wrote: > >>>> On 05/02/2024 17:43, Marco Felsch wrote: > >>>>> This binding descripes the generic TCPCI specification [1]. So add the .. > > Don't get me wrong, I get your point. In the end I don't care and can > > copy'n'paste the whole file and change the compatible to the OnSemi > > device or I can add the dedicated OnSemi compatible to this file. But I > > don't wanted to add an 2nd specific compatible while the device already > > supports the generic one but via i2c_device_id.name. Therefore I aligned > > the i2c_device_id with the of_device_id. > > You can add generic compatible used as fallback. That's pretty common > practice. Okay. To bring this discussion to an end, I will add the generic compatible as fallback :) Thanks, Marco > > > > >>>> Are all details expected to follow spec, without need of quirks? > >>> > >>> Please see above, I hope this helps. > >> > >> Sorry, doesn't. You still speak about driver and how it can bind to > >> something. I did not ask about this at all. > >> > >> To be clear: > >> WE ARE NOT TALKING ABOUT LINUX DRIVER. > > > > I KNOW > > > >> We talk about hardware and how it is represented in Devicetree, > >> including its supplies, pins, GPIOs and any ideas hardware engineers > >> like to bring. > > Then terms "driver" and "binding" (or matching) do not fit here as > arguments whether specific compatible should be there or not. There is > guideline for that: writing bindings, which exactly, 100% covers this > thing here. > > Best regards, > Krzysztof > >
diff --git a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml index eaedb4cc6b6c..7bd7bbbac9e0 100644 --- a/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml +++ b/Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml @@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: nxp,ptn5110 + enum: + - nxp,ptn5110 + - tcpci reg: maxItems: 1