[{"id":1780983,"web_url":"http://patchwork.ozlabs.org/comment/1780983/","msgid":"<20171005204400.4q3fpeui525tmfo4@rob-hp-laptop>","list_archive_url":null,"date":"2017-10-05T20:44:00","subject":"Re: [PATCH resend 02/12] usb: typec: add basic typec properties","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Tue, Sep 26, 2017 at 12:05:13PM +0800, Li Jun wrote:\n> port-type is required for any typec port; default-role is only required\n> for drp; power source capable needs src-pdos; power sink capable needs\n> snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw.\n\n\"dt-bindings: usb: ...\" for the subject prefix.\n\n> \n> Signed-off-by: Li Jun <jun.li@nxp.com>\n> ---\n>  Documentation/devicetree/bindings/usb/typec.txt | 46 +++++++++++++++++++++++++\n>  1 file changed, 46 insertions(+)\n> \n> diff --git a/Documentation/devicetree/bindings/usb/typec.txt b/Documentation/devicetree/bindings/usb/typec.txt\n> new file mode 100644\n> index 0000000..36d4467\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/usb/typec.txt\n> @@ -0,0 +1,46 @@\n> +Generic typec and power delivery properties\n> +-------------------------------------------\n\nWhat node do these apply to? A type C connector node? The PD \nmicrocontroller?\n\nI'm reluctant to accept just a random list of properties without a more \ncomplete Type-C binding which I'd expect to have a connector node, OF \ngraph ports to connect to video outputs, connection to USB controller, \nand connection to the PD controller.\n\n> +\n> +Required properties:\n> +- port-type:    should be one of \"source\", \"sink\" or \"dual\".\n> +- default-role: preferred power role if drp, should be \"sink\" or \"source\".\n> +- src-pdos:     An array of u32 with each entry providing supported power\n> +                source data object(PDO), the detailed bit definitions of\n> +                PDO can be found in \"Universal Serial Bus Power Delivery\n> +                Specification\" chapter 6.4.1.2 Source_Capabilities Message,\n> +                the order of each entry(PDO) should follow the PD spec chapter\n> +                6.4.1. Required only for power source and power dual role with\n> +                power delivery support.\n> +- snk-pdos:     An array of u32 with each entry providing supported power\n> +                sink data object(PDO), the detailed bit definitions of PDO\n> +                can be found in \"Universal Serial Bus Power Delivery\n> +                Specification\" chapter 6.4.1.3 Sink Capabilities Message,\n> +                the order of each entry(PDO) should follow the PD spec chapter\n> +                6.4.1. Required only for power sink and power dual role with\n> +                power delivery support.\n\n> +- max-snk-mv:   The max voltage the sink can support in millivoltage, required\n> +                only for power sink and power dual role with power delivery\n> +                support.\n> +- max-snk-ma:   The max current the sink can support in milliampere, required\n> +                only for power sink and power dual role with power delivery\n> +                support.\n> +- op-snk-mw:    Sink required operating power in milliwatts, if source offered\n> +                power is less then it, Capability Mismatch is set, required\n> +                only for power sink and power dual role with power delivery\n> +                support.\n\nUse the standard unit suffixes as defined in property-units.txt\n\n> +\n> +Example:\n> +\n> +ptn5110@50 {\n> +\tcompatible = \"usb,tcpci\";\n> +\treg = <0x50>;\n> +\tinterrupt-parent = <&gpio3>;\n> +\tinterrupts = <3 IRQ_TYPE_LEVEL_LOW>;\n> +\tport-type = \"dual\";\n> +\tdefault-role = \"sink\";\n> +\tsrc-pdos = <0x380190c8>;\n> +\tsnk-pdos = <0x380190c8 0x3802d0c8>;\n> +\tmax-snk-mv = <9000>;\n> +\tmax-snk-ma = <1000>;\n> +\top-snk-mw = <9000>;\n> +};\n> -- \n> 2.6.6\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe devicetree\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y7PrP2cFBz9t48\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 07:44:05 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751639AbdJEUoD (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 5 Oct 2017 16:44:03 -0400","from mail-oi0-f68.google.com ([209.85.218.68]:32860 \"EHLO\n\tmail-oi0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751409AbdJEUoC (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 5 Oct 2017 16:44:02 -0400","by mail-oi0-f68.google.com with SMTP id n129so9168740oia.0;\n\tThu, 05 Oct 2017 13:44:02 -0700 (PDT)","from localhost (216-188-254-6.dyn.grandenetworks.net.\n\t[216.188.254.6]) by smtp.gmail.com with ESMTPSA id\n\ts92sm9628093otb.67.2017.10.05.13.44.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 05 Oct 2017 13:44:01 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=mIZixOl39HdKgwCHCmTIZyAsZAeW4623MffS0PkzITQ=;\n\tb=efEofsDy+N3c7yfVmAy/rb0TBwPo8KLle0sPiNUwhiynT/bL80K0oKiJfM5KaON3jZ\n\tbHMPqXYXjzigI463aaGhRTwr5t5ENyDubHjKEI2hePRgfOJ53xoyFD+7cPtgtEpZKLX4\n\tiQStTzbYdV6cpmvKrbnm29PnUVFUoc//lxpusdobiPiZQcGFZZqnS+Lx2Eo5KJa6g0iI\n\tXz6xBzI1Ey88ZVEg/0mM/9DB9ghzJNlJJFdfcmPfkKmuve7T19DU3PVp+Lb+1gsoj0Ef\n\tNqUUa76ul7uequ2RVCK2lOF1NE9sSihkx7SuWhxyCzov+4SEIahSIbTpYmCrg0ZerAPN\n\tgcbA==","X-Gm-Message-State":"AMCzsaXJffpynv0o10FwKSwKYwhDY4MOSHeG5ES1uYSezpMI/mZWQRpM\n\t+gwWnWp+jhxkdRxaBRBDuA==","X-Google-Smtp-Source":"AOwi7QCdyLIk/e1tWwOD63f9hXbWRt0zF4/zhO61eBx/0iN22yGR2rm1DwowTA3D3ci8vRtOR76rcw==","X-Received":"by 10.157.54.184 with SMTP id h53mr10851945otc.7.1507236241907; \n\tThu, 05 Oct 2017 13:44:01 -0700 (PDT)","Date":"Thu, 5 Oct 2017 15:44:00 -0500","From":"Rob Herring <robh@kernel.org>","To":"Li Jun <jun.li@nxp.com>","Cc":"gregkh@linuxfoundation.org, linux@roeck-us.net,\n\tmark.rutland@arm.com, heikki.krogerus@linux.intel.com,\n\tyueyao@google.com, o_leveque@orange.fr, peter.chen@nxp.com,\n\taisheng.dong@nxp.com, linux-usb@vger.kernel.org,\n\tdevicetree@vger.kernel.org","Subject":"Re: [PATCH resend 02/12] usb: typec: add basic typec properties","Message-ID":"<20171005204400.4q3fpeui525tmfo4@rob-hp-laptop>","References":"<1506398723-19359-1-git-send-email-jun.li@nxp.com>\n\t<1506398723-19359-3-git-send-email-jun.li@nxp.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506398723-19359-3-git-send-email-jun.li@nxp.com>","User-Agent":"NeoMutt/20170113 (1.7.2)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1782729,"web_url":"http://patchwork.ozlabs.org/comment/1782729/","msgid":"<DB4PR04MB07683A52DD500A40C2B9047A89740@DB4PR04MB0768.eurprd04.prod.outlook.com>","list_archive_url":null,"date":"2017-10-09T11:21:23","subject":"RE: [PATCH resend 02/12] usb: typec: add basic typec properties","submitter":{"id":69265,"url":"http://patchwork.ozlabs.org/api/people/69265/","name":"Jun Li","email":"jun.li@nxp.com"},"content":"Hi Rob,\n\n> -----Original Message-----\n> From: Rob Herring [mailto:robh@kernel.org]\n> Sent: Friday, October 06, 2017 4:44 AM\n> To: Jun Li <jun.li@nxp.com>\n> Cc: gregkh@linuxfoundation.org; linux@roeck-us.net; mark.rutland@arm.com;\n> heikki.krogerus@linux.intel.com; yueyao@google.com; o_leveque@orange.fr;\n> Peter Chen <peter.chen@nxp.com>; A.s. Dong <aisheng.dong@nxp.com>; linux-\n> usb@vger.kernel.org; devicetree@vger.kernel.org\n> Subject: Re: [PATCH resend 02/12] usb: typec: add basic typec properties\n> \n> On Tue, Sep 26, 2017 at 12:05:13PM +0800, Li Jun wrote:\n> > port-type is required for any typec port; default-role is only\n> > required for drp; power source capable needs src-pdos; power sink\n> > capable needs snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw.\n> \n> \"dt-bindings: usb: ...\" for the subject prefix.\n> \n\nWill update in next version.\n\n> >\n> > Signed-off-by: Li Jun <jun.li@nxp.com>\n> > ---\n> >  Documentation/devicetree/bindings/usb/typec.txt | 46\n> > +++++++++++++++++++++++++\n> >  1 file changed, 46 insertions(+)\n> >\n> > diff --git a/Documentation/devicetree/bindings/usb/typec.txt\n> > b/Documentation/devicetree/bindings/usb/typec.txt\n> > new file mode 100644\n> > index 0000000..36d4467\n> > --- /dev/null\n> > +++ b/Documentation/devicetree/bindings/usb/typec.txt\n> > @@ -0,0 +1,46 @@\n> > +Generic typec and power delivery properties\n> > +-------------------------------------------\n> \n> What node do these apply to? A type C connector node? The PD microcontroller?\n> \n\nMy initial thinking is those are general type-c properties, which can be applied to\ntype-C connector or used by PD microcontroller directly (my example),  I want\nto get inputs on how this can be handled properly, so do you think a separated\nnode(e.g. type-c connector) is required to describe all the capability of the type-c\nport has, then a type-c related driver get the phandle of it? \n\n> I'm reluctant to accept just a random list of properties without a more complete\n> Type-C binding which I'd expect to have a connector node, OF graph ports to\n> connect to video outputs, connection to USB controller, and connection to the\n> PD controller.\n> \n\nAs type-C with PD has many properties to complete the description for diff usage,\nso this is just a first step to have the basic power related bindings.\n\n> > +\n> > +Required properties:\n> > +- port-type:    should be one of \"source\", \"sink\" or \"dual\".\n> > +- default-role: preferred power role if drp, should be \"sink\" or \"source\".\n> > +- src-pdos:     An array of u32 with each entry providing supported power\n> > +                source data object(PDO), the detailed bit definitions of\n> > +                PDO can be found in \"Universal Serial Bus Power Delivery\n> > +                Specification\" chapter 6.4.1.2 Source_Capabilities Message,\n> > +                the order of each entry(PDO) should follow the PD spec chapter\n> > +                6.4.1. Required only for power source and power dual role with\n> > +                power delivery support.\n> > +- snk-pdos:     An array of u32 with each entry providing supported power\n> > +                sink data object(PDO), the detailed bit definitions of PDO\n> > +                can be found in \"Universal Serial Bus Power Delivery\n> > +                Specification\" chapter 6.4.1.3 Sink Capabilities Message,\n> > +                the order of each entry(PDO) should follow the PD spec chapter\n> > +                6.4.1. Required only for power sink and power dual role with\n> > +                power delivery support.\n> \n> > +- max-snk-mv:   The max voltage the sink can support in millivoltage, required\n> > +                only for power sink and power dual role with power delivery\n> > +                support.\n> > +- max-snk-ma:   The max current the sink can support in milliampere, required\n> > +                only for power sink and power dual role with power delivery\n> > +                support.\n> > +- op-snk-mw:    Sink required operating power in milliwatts, if source offered\n> > +                power is less then it, Capability Mismatch is set, required\n> > +                only for power sink and power dual role with power delivery\n> > +                support.\n> \n> Use the standard unit suffixes as defined in property-units.txt\n> \n\nThanks, will update in next version.\n\nLi Jun\n> > +\n> > +Example:\n> > +\n> > +ptn5110@50 {\n> > +\tcompatible = \"usb,tcpci\";\n> > +\treg = <0x50>;\n> > +\tinterrupt-parent = <&gpio3>;\n> > +\tinterrupts = <3 IRQ_TYPE_LEVEL_LOW>;\n> > +\tport-type = \"dual\";\n> > +\tdefault-role = \"sink\";\n> > +\tsrc-pdos = <0x380190c8>;\n> > +\tsnk-pdos = <0x380190c8 0x3802d0c8>;\n> > +\tmax-snk-mv = <9000>;\n> > +\tmax-snk-ma = <1000>;\n> > +\top-snk-mw = <9000>;\n> > +};\n> > --\n> > 2.6.6\n> >\n> > --\n> > To unsubscribe from this list: send the line \"unsubscribe devicetree\"\n> > in the body of a message to majordomo@vger.kernel.org More majordomo\n> > info at  http://vger.kernel.org/majordomo-info.html\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=nxp.com header.i=@nxp.com header.b=\"s+xK1dDD\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=jun.li@nxp.com; "],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y9d9Y4rZbz9tY3\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon,  9 Oct 2017 22:21:37 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754076AbdJILVb (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tMon, 9 Oct 2017 07:21:31 -0400","from mail-he1eur01on0080.outbound.protection.outlook.com\n\t([104.47.0.80]:56032\n\t\"EHLO EUR01-HE1-obe.outbound.protection.outlook.com\"\n\trhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP\n\tid S1753943AbdJILV3 (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tMon, 9 Oct 2017 07:21:29 -0400","from DB4PR04MB0768.eurprd04.prod.outlook.com (10.141.45.21) by\n\tDB4PR04MB316.eurprd04.prod.outlook.com (10.141.239.155) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.77.7; Mon, 9 Oct 2017 11:21:25 +0000","from DB4PR04MB0768.eurprd04.prod.outlook.com\n\t([fe80::38a4:9a83:4e70:d431]) by\n\tDB4PR04MB0768.eurprd04.prod.outlook.com\n\t([fe80::38a4:9a83:4e70:d431%16]) with mapi id 15.20.0077.020;\n\tMon, 9 Oct 2017 11:21:23 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=IzpcqhVhsX2NLfsU0CvfsvX+t735hqzT4vfUTh4EoS4=;\n\tb=s+xK1dDDc9DL/vVnc/ZysJSgGNYzEpql2ZXpsvtH7H9w1ReOx/slsKSbrKtfVx5/7N9viLm8r9/4aDYRQ4Q8JghJtW760tWU9X2D3UjyKpCTq8B7e+Nwy/+WcfaS10L+r2OUB0WgU9++d+X2yKfZng369DKT4ZFZhZIFsmIXgjQ=","From":"Jun Li <jun.li@nxp.com>","To":"Rob Herring <robh@kernel.org>","CC":"\"gregkh@linuxfoundation.org\" <gregkh@linuxfoundation.org>,\n\t\"linux@roeck-us.net\" <linux@roeck-us.net>,\n\t\"mark.rutland@arm.com\" <mark.rutland@arm.com>,\n\t\"heikki.krogerus@linux.intel.com\" <heikki.krogerus@linux.intel.com>, \n\t\"yueyao@google.com\" <yueyao@google.com>,\n\t\"o_leveque@orange.fr\" <o_leveque@orange.fr>,\n\tPeter Chen <peter.chen@nxp.com>, \"A.s. Dong\" <aisheng.dong@nxp.com>, \n\t\"linux-usb@vger.kernel.org\" <linux-usb@vger.kernel.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>","Subject":"RE: [PATCH resend 02/12] usb: typec: add basic typec properties","Thread-Topic":"[PATCH resend 02/12] usb: typec: add basic typec properties","Thread-Index":"AQHTNp6j8r4+H8NMukqG7RLjzNpETqLVyBoAgAVzg5A=","Date":"Mon, 9 Oct 2017 11:21:23 +0000","Message-ID":"<DB4PR04MB07683A52DD500A40C2B9047A89740@DB4PR04MB0768.eurprd04.prod.outlook.com>","References":"<1506398723-19359-1-git-send-email-jun.li@nxp.com>\n\t<1506398723-19359-3-git-send-email-jun.li@nxp.com>\n\t<20171005204400.4q3fpeui525tmfo4@rob-hp-laptop>","In-Reply-To":"<20171005204400.4q3fpeui525tmfo4@rob-hp-laptop>","Accept-Language":"zh-CN, en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","authentication-results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=nxp.com header.i=@nxp.com header.b=\"s+xK1dDD\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=jun.li@nxp.com; "],"x-originating-ip":"[199.59.231.64]","x-ms-publictraffictype":"Email","x-microsoft-exchange-diagnostics":"1; DB4PR04MB316;\n\t6:FBmzFqF141gjSxd8fQ4ExeRQ8UzXlsim1/Wc0j5QQUsef4DILbU5lLSNeNhhxW9qoDZ9kXGOMTsrrP7oda4OxFBD4Qf1fpczvD+s/jsl4HxdJP4uHqe40MuxiBRYUAxL0ofXYgVe+6i61xsNP+l4l3OrjN0K/6ThId8AL1ajlyd+tt7s4W9isKYRXVb3NVlrfDw4bIjudRKrdx+mRntu1D60cttZGW2DQTgHELhzgPcANMcT5JhfLm0A5g7Av9gKSsNKyQyCeDXlp4N8qCQUfl9NhDB5hsUC8R3pubWXKbgxa8Vcf0pp9wCQurCbivTEOLlya1WA+OP0zlT8XzxpzQ==;\n\t5:yhAswJZW6unr05yoHeLLfzF03SQjuGxU/XZ2pa1Jba7qutkujjCN/4ad+E4+GSeFxFNjLUmxgTL12YQmeO3REuvtBU8hj+qeJUVzTl49UQYv0e1RfLSQwpl+lANrpV74bnBrIytAAZwsWFuuHxkN3w==;\n\t24:WLWq1LAhdxP2M1R3GECRYm5PHjHIrr8kCLZvbFc1ReAeujelwYhtL8uK5T4/4p2PD5PrzX1lO73Hy52zFoTbE5lgZGctxMtJlTkbsEvn+XE=;\n\t7:EubWrsaa9dFrgbGLvb9sv+A7exVflG84CrPppAsFRJaO/IZZY5rkrcO7ZXQ9J3OdiiC+r0REmhH82IdVFAxNFrnRfTbIHzJjPXjO+SAHmcQz7l7kXfHDgnRUtt1ZuikXHbGWM3zR/a6nn0aMXtT7LOom7Qc8oSGW5TNmstyBKvId2SRRnreDEzNS5osIgs1L+xBTivxwMiA3K34a2etBzbxkXiVL8J3ngn1bP8NyiE4=","x-ms-exchange-antispam-srfa-diagnostics":"SSOS;SSOR;","x-forefront-antispam-report":"SFV:SKI; SCL:-1; SFV:NSPM;\n\tSFS:(10009020)(6009001)(346002)(39860400002)(376002)(377454003)(13464003)(24454002)(189002)(199003)(3280700002)(8676002)(81156014)(81166006)(8936002)(2950100002)(4326008)(74316002)(2900100001)(6246003)(7736002)(14454004)(53546010)(305945005)(34040400001)(5660300001)(66066001)(6916009)(99286003)(55016002)(101416001)(54906003)(54356999)(76176999)(316002)(50986999)(229853002)(53936002)(6306002)(7696004)(9686003)(105586002)(106356001)(575784001)(33656002)(478600001)(97736004)(25786009)(3660700001)(5250100002)(86362001)(966005)(6436002)(68736007)(6506006)(102836003)(3846002)(189998001)(6116002)(2906002)(422495003);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB316;\n\tH:DB4PR04MB0768.eurprd04.prod.outlook.com; FPR:; SPF:None;\n\tPTR:InfoNoRecords; MX:1; A:1; LANG:en; ","x-ms-office365-filtering-correlation-id":"10c46ba7-2bcb-4469-3b12-08d50f07dfdd","x-ms-office365-filtering-ht":"Tenant","x-microsoft-antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075);\n\tSRVR:DB4PR04MB316; ","x-ms-traffictypediagnostic":"DB4PR04MB316:","x-exchange-antispam-report-test":"UriScan:(249592161093381)(180628864354917)(9452136761055)(185117386973197)(211936372134217)(21532816269658)(228905959029699);","x-microsoft-antispam-prvs":"<DB4PR04MB31610AD1C639660EE7D7EF789740@DB4PR04MB316.eurprd04.prod.outlook.com>","x-exchange-antispam-report-cfa-test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(920507026)(6055026)(6041248)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:DB4PR04MB316; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:DB4PR04MB316; ","x-forefront-prvs":"045584D28C","received-spf":"None (protection.outlook.com: nxp.com does not designate\n\tpermitted sender hosts)","spamdiagnosticoutput":"1:99","spamdiagnosticmetadata":"NSPM","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"quoted-printable","MIME-Version":"1.0","X-OriginatorOrg":"nxp.com","X-MS-Exchange-CrossTenant-originalarrivaltime":"09 Oct 2017 11:21:23.6861\n\t(UTC)","X-MS-Exchange-CrossTenant-fromentityheader":"Hosted","X-MS-Exchange-CrossTenant-id":"686ea1d3-bc2b-4c6f-a92c-d99c5c301635","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"DB4PR04MB316","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1782810,"web_url":"http://patchwork.ozlabs.org/comment/1782810/","msgid":"<CAL_JsqJWxm1bT38vG3P+2ZihUec5-EVcGAygH+V-RgyF-VjBpg@mail.gmail.com>","list_archive_url":null,"date":"2017-10-09T13:12:05","subject":"Re: [PATCH resend 02/12] usb: typec: add basic typec properties","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Mon, Oct 9, 2017 at 6:21 AM, Jun Li <jun.li@nxp.com> wrote:\n> Hi Rob,\n>\n>> -----Original Message-----\n>> From: Rob Herring [mailto:robh@kernel.org]\n>> Sent: Friday, October 06, 2017 4:44 AM\n>> To: Jun Li <jun.li@nxp.com>\n>> Cc: gregkh@linuxfoundation.org; linux@roeck-us.net; mark.rutland@arm.com;\n>> heikki.krogerus@linux.intel.com; yueyao@google.com; o_leveque@orange.fr;\n>> Peter Chen <peter.chen@nxp.com>; A.s. Dong <aisheng.dong@nxp.com>; linux-\n>> usb@vger.kernel.org; devicetree@vger.kernel.org\n>> Subject: Re: [PATCH resend 02/12] usb: typec: add basic typec properties\n>>\n>> On Tue, Sep 26, 2017 at 12:05:13PM +0800, Li Jun wrote:\n>> > port-type is required for any typec port; default-role is only\n>> > required for drp; power source capable needs src-pdos; power sink\n>> > capable needs snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw.\n>>\n>> \"dt-bindings: usb: ...\" for the subject prefix.\n>>\n>\n> Will update in next version.\n>\n>> >\n>> > Signed-off-by: Li Jun <jun.li@nxp.com>\n>> > ---\n>> >  Documentation/devicetree/bindings/usb/typec.txt | 46\n>> > +++++++++++++++++++++++++\n>> >  1 file changed, 46 insertions(+)\n>> >\n>> > diff --git a/Documentation/devicetree/bindings/usb/typec.txt\n>> > b/Documentation/devicetree/bindings/usb/typec.txt\n>> > new file mode 100644\n>> > index 0000000..36d4467\n>> > --- /dev/null\n>> > +++ b/Documentation/devicetree/bindings/usb/typec.txt\n>> > @@ -0,0 +1,46 @@\n>> > +Generic typec and power delivery properties\n>> > +-------------------------------------------\n>>\n>> What node do these apply to? A type C connector node? The PD microcontroller?\n>>\n>\n> My initial thinking is those are general type-c properties, which can be applied to\n> type-C connector or used by PD microcontroller directly (my example),  I want\n> to get inputs on how this can be handled properly, so do you think a separated\n> node(e.g. type-c connector) is required to describe all the capability of the type-c\n> port has, then a type-c related driver get the phandle of it?\n>\n>> I'm reluctant to accept just a random list of properties without a more complete\n>> Type-C binding which I'd expect to have a connector node, OF graph ports to\n>> connect to video outputs, connection to USB controller, and connection to the\n>> PD controller.\n>>\n>\n> As type-C with PD has many properties to complete the description for diff usage,\n> so this is just a first step to have the basic power related bindings.\n\nWe need something more complete, not something that just evolves. At\nleast the basic relationships between connectors, PD controller,\nalternate modes, and USB controllers needs to be defined.\n\nAndrzej started on defining USB connectors[1]. That's where we need to\nstart for Type-C bindings. Work together on this.\n\nRob\n\n>> > +Required properties:\n>> > +- port-type:    should be one of \"source\", \"sink\" or \"dual\".\n>> > +- default-role: preferred power role if drp, should be \"sink\" or \"source\".\n>> > +- src-pdos:     An array of u32 with each entry providing supported power\n>> > +                source data object(PDO), the detailed bit definitions of\n>> > +                PDO can be found in \"Universal Serial Bus Power Delivery\n>> > +                Specification\" chapter 6.4.1.2 Source_Capabilities Message,\n>> > +                the order of each entry(PDO) should follow the PD spec chapter\n>> > +                6.4.1. Required only for power source and power dual role with\n>> > +                power delivery support.\n>> > +- snk-pdos:     An array of u32 with each entry providing supported power\n>> > +                sink data object(PDO), the detailed bit definitions of PDO\n>> > +                can be found in \"Universal Serial Bus Power Delivery\n>> > +                Specification\" chapter 6.4.1.3 Sink Capabilities Message,\n>> > +                the order of each entry(PDO) should follow the PD spec chapter\n>> > +                6.4.1. Required only for power sink and power dual role with\n>> > +                power delivery support.\n>>\n>> > +- max-snk-mv:   The max voltage the sink can support in millivoltage, required\n>> > +                only for power sink and power dual role with power delivery\n>> > +                support.\n>> > +- max-snk-ma:   The max current the sink can support in milliampere, required\n>> > +                only for power sink and power dual role with power delivery\n>> > +                support.\n>> > +- op-snk-mw:    Sink required operating power in milliwatts, if source offered\n>> > +                power is less then it, Capability Mismatch is set, required\n>> > +                only for power sink and power dual role with power delivery\n>> > +                support.\n>>\n>> Use the standard unit suffixes as defined in property-units.txt\n>>\n>\n> Thanks, will update in next version.\n>\n> Li Jun\n>> > +\n>> > +Example:\n>> > +\n>> > +ptn5110@50 {\n>> > +   compatible = \"usb,tcpci\";\n>> > +   reg = <0x50>;\n>> > +   interrupt-parent = <&gpio3>;\n>> > +   interrupts = <3 IRQ_TYPE_LEVEL_LOW>;\n>> > +   port-type = \"dual\";\n>> > +   default-role = \"sink\";\n>> > +   src-pdos = <0x380190c8>;\n>> > +   snk-pdos = <0x380190c8 0x3802d0c8>;\n>> > +   max-snk-mv = <9000>;\n>> > +   max-snk-ma = <1000>;\n>> > +   op-snk-mw = <9000>;\n>> > +};\n\n[1] http://www.spinics.net/lists/devicetree/msg197601.html\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=robh@kernel.org"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y9gdY3F45z9s7B\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tTue, 10 Oct 2017 00:12:33 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754289AbdJINMa (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tMon, 9 Oct 2017 09:12:30 -0400","from mail.kernel.org ([198.145.29.99]:51742 \"EHLO mail.kernel.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1754195AbdJINM1 (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tMon, 9 Oct 2017 09:12:27 -0400","from mail-qt0-f172.google.com (mail-qt0-f172.google.com\n\t[209.85.216.172])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id C5F012192C;\n\tMon,  9 Oct 2017 13:12:26 +0000 (UTC)","by mail-qt0-f172.google.com with SMTP id f8so7921325qta.5;\n\tMon, 09 Oct 2017 06:12:26 -0700 (PDT)","by 10.12.130.134 with HTTP; Mon, 9 Oct 2017 06:12:05 -0700 (PDT)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org C5F012192C","X-Gm-Message-State":"AMCzsaV1RPgfK83cXxayOhmfCRSady6BjjUd53PVnMgYMSi/NUpdutJp\n\tVr/bHzq27RYioE9Kivar87I5yAk1oYrqf4us6w==","X-Google-Smtp-Source":"AOwi7QCjLB2DlPBuHA5vpLGhyKr8euJD3cTARgFKVYv6J5CWFhKBR+rdluOd3Qj3ufpXEQnYytoCcbxrXCxsqFhAV3Q=","X-Received":"by 10.237.42.107 with SMTP id k40mr469095qtf.253.1507554745916; \n\tMon, 09 Oct 2017 06:12:25 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<DB4PR04MB07683A52DD500A40C2B9047A89740@DB4PR04MB0768.eurprd04.prod.outlook.com>","References":"<1506398723-19359-1-git-send-email-jun.li@nxp.com>\n\t<1506398723-19359-3-git-send-email-jun.li@nxp.com>\n\t<20171005204400.4q3fpeui525tmfo4@rob-hp-laptop>\n\t<DB4PR04MB07683A52DD500A40C2B9047A89740@DB4PR04MB0768.eurprd04.prod.outlook.com>","From":"Rob Herring <robh@kernel.org>","Date":"Mon, 9 Oct 2017 08:12:05 -0500","X-Gmail-Original-Message-ID":"<CAL_JsqJWxm1bT38vG3P+2ZihUec5-EVcGAygH+V-RgyF-VjBpg@mail.gmail.com>","Message-ID":"<CAL_JsqJWxm1bT38vG3P+2ZihUec5-EVcGAygH+V-RgyF-VjBpg@mail.gmail.com>","Subject":"Re: [PATCH resend 02/12] usb: typec: add basic typec properties","To":"Jun Li <jun.li@nxp.com>, Andrzej Hajda <a.hajda@samsung.com>","Cc":"\"gregkh@linuxfoundation.org\" <gregkh@linuxfoundation.org>,\n\t\"linux@roeck-us.net\" <linux@roeck-us.net>,\n\t\"mark.rutland@arm.com\" <mark.rutland@arm.com>,\n\t\"heikki.krogerus@linux.intel.com\" <heikki.krogerus@linux.intel.com>, \n\t\"yueyao@google.com\" <yueyao@google.com>,\n\t\"o_leveque@orange.fr\" <o_leveque@orange.fr>,\n\tPeter Chen <peter.chen@nxp.com>, \"A.s. Dong\" <aisheng.dong@nxp.com>, \n\t\"linux-usb@vger.kernel.org\" <linux-usb@vger.kernel.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}}]