Message ID | 20230724115133.2226-1-r-gunasekaran@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1753487vqg; Mon, 24 Jul 2023 05:09:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlF56jOJimWrG3oxZUuEAnT65dQd314uWX50V/3z4DaeUH+srF3/Vs2aEbcf5VYdGSqWUA+8 X-Received: by 2002:a17:902:e805:b0:1b8:4e69:c8f7 with SMTP id u5-20020a170902e80500b001b84e69c8f7mr8112707plg.23.1690200555995; Mon, 24 Jul 2023 05:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690200555; cv=none; d=google.com; s=arc-20160816; b=n8NeuLt4DsWU4IH+VWSX0m1PCl8nXG3FvzZwM3EWS1NCDkNfN/lATqnT7YtNuiy4dv fS46u3owtiQ0WLZHphUooU1U1HgUy/LbEdmJjKlmcJnym9jevZMTaBeJSNMQTDqkIFFn 1iYWvb1mDlT9cyLhPj3TbObLCN9m4SuMliv+izCmF9AxDvZ9DQD7bABKDwvZGhMf25RR /GKICCiQ2nqAMjy8tn2pVY7OXPxLB/kO/neqSZ7xb5wNO2TlWrJHBdUJdEeWXymkKVPL U43/4MPxMNUfpuuDh5lN5HAxvjFuum4vXxFN1ja1l9kx8JVni7mp74xpxoe+NmTXJqWd ldXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=EWR9FyBFNt9LW4e8g7D8GqUmKvJCxRpjwj+/aBrOjNo=; fh=3UOMV/n534Rjb8XUPkx0Mm3wy3NFPcAL3pOTR8oF6EQ=; b=hRBXnkpfJuah+SPYBqVh5+mWi8WldI7xWgLUYgMYwL2CIURx2DqwJ2ebnc6Xg68ahV loeEzDTMCPWvKGzHfiolSmh6H2g0dhX+PGEd7Y/fM3oJye3KDkCHLH2Yg23zjltjnKEJ ctKgwdJjmTk2oKKP1TBKKjqdcmPM9052kO3jAhgZXOayLXCVuwMPPO7DyNOu0gEOn2TH 4u7wVGPfOAuZavSkHk+278K8OCrXxL5VfVr/Xy5kygAcuZNR8DsIZny2MHaIfMnmt/eQ u3M+MnLGKIk2vvkhPVyPIo5tYHpBp78IXbAKw68hgSIe8DMxdlKUL40NpPqUs5RbHVro yDgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fYQ8aspy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a170902ebc600b001bb42c274a9si9055538plg.504.2023.07.24.05.09.01; Mon, 24 Jul 2023 05:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fYQ8aspy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbjGXLvz (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Mon, 24 Jul 2023 07:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjGXLvx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Jul 2023 07:51:53 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3950310CE; Mon, 24 Jul 2023 04:51:45 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36OBpcYN076159; Mon, 24 Jul 2023 06:51:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690199498; bh=EWR9FyBFNt9LW4e8g7D8GqUmKvJCxRpjwj+/aBrOjNo=; h=From:To:CC:Subject:Date; b=fYQ8aspyAKWsOREu3afqqooXO0ODITZjBByM+gJ2XhHbtZ0oymLJ2BvMUtCMNSK3T gItYYi+zsRopQiDGtTDWY/8zr8hJSXCIIB1fRXPJbTKWuuKP34Mv/eeiFbDDV5GIaL Li5SOJ+Xdev0zpefwV+qVLAqpJsuXa2SFzsl8QbQ= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36OBpcr7046176 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 24 Jul 2023 06:51:38 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 24 Jul 2023 06:51:37 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 24 Jul 2023 06:51:37 -0500 Received: from uda0500640.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36OBpY6m003529; Mon, 24 Jul 2023 06:51:34 -0500 From: Ravi Gunasekaran <r-gunasekaran@ti.com> To: <nm@ti.com>, <vigneshr@ti.com>, <kristo@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org> CC: <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <r-gunasekaran@ti.com>, <rogerq@kernel.org> Subject: [PATCH] arm64: dts: ti: k3-am62a7-sk: Enable dual role support for Type-C port Date: Mon, 24 Jul 2023 17:21:33 +0530 Message-ID: <20230724115133.2226-1-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772303738010375092 X-GMAIL-MSGID: 1772303738010375092 |
Series |
arm64: dts: ti: k3-am62a7-sk: Enable dual role support for Type-C port
|
|
Commit Message
Ravi Gunasekaran
July 24, 2023, 11:51 a.m. UTC
USB0 is interfaced with a Type-C DRP connector and is managed via a
USB PD controller. Add support for the Type-C port with dual data
and power sink role.
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
---
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 33 +++++++++++++++++++++++++
1 file changed, 33 insertions(+)
base-commit: 4d2c646ac07cf4a35ef1c4a935a1a4fd6c6b1a36
Comments
On 24/07/2023 13:51, Ravi Gunasekaran wrote: > USB0 is interfaced with a Type-C DRP connector and is managed via a > USB PD controller. Add support for the Type-C port with dual data > and power sink role. > > Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> > --- > arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 33 +++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts > index d2cca6182738..b478b794de00 100644 > --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts > +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts > @@ -226,6 +226,24 @@ > pinctrl-names = "default"; > pinctrl-0 = <&main_i2c0_pins_default>; > clock-frequency = <400000>; > + > + typec_pd0:tps6598x@3f { Missing space after: Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification: https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation Best regards, Krzysztof
On 7/24/2023 7:27 PM, Krzysztof Kozlowski wrote: > On 24/07/2023 13:51, Ravi Gunasekaran wrote: >> USB0 is interfaced with a Type-C DRP connector and is managed via a >> USB PD controller. Add support for the Type-C port with dual data >> and power sink role. >> >> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> >> --- >> arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 33 +++++++++++++++++++++++++ >> 1 file changed, 33 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >> index d2cca6182738..b478b794de00 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >> +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >> @@ -226,6 +226,24 @@ >> pinctrl-names = "default"; >> pinctrl-0 = <&main_i2c0_pins_default>; >> clock-frequency = <400000>; >> + >> + typec_pd0:tps6598x@3f { Thanks for reviewing the patch. > Missing space after: I will fix this in v2. > > Node names should be generic. See also an explanation and list of > examples (not exhaustive) in DT specification: > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation Thanks for pointing to the section. I checked it and also few other node names in the existing DTs. TPS6598 is a USB Type C and Power Delivery Controller. So does a node name "type-c-pd-controller" sound fine? > > Best regards, > Krzysztof > Regards, Ravi
On 25/07/2023 07:19, Ravi Gunasekaran wrote: > > > On 7/24/2023 7:27 PM, Krzysztof Kozlowski wrote: >> On 24/07/2023 13:51, Ravi Gunasekaran wrote: >>> USB0 is interfaced with a Type-C DRP connector and is managed via a >>> USB PD controller. Add support for the Type-C port with dual data >>> and power sink role. >>> >>> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> >>> --- >>> arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 33 +++++++++++++++++++++++++ >>> 1 file changed, 33 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >>> index d2cca6182738..b478b794de00 100644 >>> --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >>> +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >>> @@ -226,6 +226,24 @@ >>> pinctrl-names = "default"; >>> pinctrl-0 = <&main_i2c0_pins_default>; >>> clock-frequency = <400000>; >>> + >>> + typec_pd0:tps6598x@3f { > > Thanks for reviewing the patch. > >> Missing space after: > > I will fix this in v2. > >> >> Node names should be generic. See also an explanation and list of >> examples (not exhaustive) in DT specification: >> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > Thanks for pointing to the section. I checked it and also few other node names > in the existing DTs. > TPS6598 is a USB Type C and Power Delivery Controller. So does a node name > "type-c-pd-controller" sound fine? Type-c is irrelevant in node name. The name needs to indicate it has something to do with USB, Power Control and Role control. e.g. usb-power-controller or usb-role-controller ? > >> >> Best regards, >> Krzysztof >> > > Regards, > Ravi
On 7/25/2023 1:13 PM, Roger Quadros wrote: > > On 25/07/2023 07:19, Ravi Gunasekaran wrote: >> >> On 7/24/2023 7:27 PM, Krzysztof Kozlowski wrote: >>> On 24/07/2023 13:51, Ravi Gunasekaran wrote: >>>> USB0 is interfaced with a Type-C DRP connector and is managed via a >>>> USB PD controller. Add support for the Type-C port with dual data >>>> and power sink role. >>>> >>>> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> >>>> --- >>>> arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 33 +++++++++++++++++++++++++ >>>> 1 file changed, 33 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >>>> index d2cca6182738..b478b794de00 100644 >>>> --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >>>> +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts >>>> @@ -226,6 +226,24 @@ >>>> pinctrl-names = "default"; >>>> pinctrl-0 = <&main_i2c0_pins_default>; >>>> clock-frequency = <400000>; >>>> + >>>> + typec_pd0:tps6598x@3f { >> Thanks for reviewing the patch. >> >>> Missing space after: >> I will fix this in v2. >> >>> Node names should be generic. See also an explanation and list of >>> examples (not exhaustive) in DT specification: >>> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation >> Thanks for pointing to the section. I checked it and also few other node names >> in the existing DTs. >> TPS6598 is a USB Type C and Power Delivery Controller. So does a node name >> "type-c-pd-controller" sound fine? > Type-c is irrelevant in node name. > The name needs to indicate it has something to do with USB, Power Control and Role control. > > e.g. > usb-power-controller > or > usb-role-controller > ? I will use the node name "usb-power-controller'. > >>> Best regards, >>> Krzysztof >>> >> Regards, >> Ravi
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts index d2cca6182738..b478b794de00 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -226,6 +226,24 @@ pinctrl-names = "default"; pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; + + typec_pd0:tps6598x@3f { + compatible = "ti,tps6598x"; + reg = <0x3f>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + self-powered; + data-role = "dual"; + power-role = "sink"; + port { + usb_con_hs: endpoint { + remote-endpoint = <&usb0_hs_ep>; + }; + }; + }; + }; }; &main_i2c1 { @@ -290,6 +308,21 @@ status = "reserved"; }; +&usbss0 { + status = "okay"; + ti,vbus-divider; +}; + +&usb0 { + usb-role-switch; + + port { + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +}; + &usbss1 { status = "okay"; };