RE: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
Hi, > -Original Message- > From: Mats Karrman [mailto:mats.dev.l...@gmail.com] > Sent: 2018年4月30日 15:41 > To: Jun Li > Cc: robh...@kernel.org; gre...@linuxfoundation.org; > heikki.kroge...@linux.intel.com; li...@roeck-us.net; a.ha...@samsung.com; > shufan_...@richtek.com; Peter Chen ; > devicet...@vger.kernel.org; linux-...@vger.kernel.org; dl-linux-imx > ; de...@driverdev.osuosl.org > Subject: Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec > port controller(TCPCI) > > Hi Li Jun, > > Are you working on an updated version of this patch series? > I'm pondering other changes that builds on these patches (the documentation > and the fwnode added to the tcpc_dev and tcpm primarily). I am on a vacation and will be back tomorrow, I will post a new version soon. > > Btw, there is a semi-colon missing in your example below. Thanks, I will add it. Li Jun > > BR // Mats > > On 2018-03-28 18:06, Li Jun wrote: > > > TCPCI stands for typec port controller interface, its implementation > > has full typec port control with power delivery support, it's a > > standard i2c slave with GPIO input as irq interface, detail see spec > > "Universal Serial Bus Type-C Port Controller Interface Specification > > Revision 1.0, Version 1.1" > > > > Signed-off-by: Li Jun > > --- > > .../devicetree/bindings/usb/typec-tcpci.txt| 33 > ++ > > 1 file changed, 33 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt > > b/Documentation/devicetree/bindings/usb/typec-tcpci.txt > > new file mode 100644 > > index 000..7a7a8e0 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.txt > > @@ -0,0 +1,33 @@ > > +TCPCI(Typec port cotroller interface) binding > > +- > > + > > +Required properties: > > +- compatible: should be "usb-tcpci,chip-specific-string". > > +- reg: the i2c slave address of typec port controller device. > > +- interrupt-parent: the phandle to the interrupt controller which provides > > +the interrupt. > > +- interrupts: interrupt specification for tcpci alert. > > + > > +Required sub-node: > > +- connector: The "usb-c-connector" attached to the tcpci chip, the > > +bindings > > + of connector node are specified in > > + Documentation/devicetree/bindings/connector/usb-connector.txt > > + > > +Example: > > + > > +ptn5110@50 { > > + compatible = "usb-tcpci,ptn5110"; > > + reg = <0x50>; > > + interrupt-parent = <&gpio3>; > > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > > + > > + usb_con: connector { > > + compatible = "usb-c-connector"; > > + label = "USB-C"; > > + port-type = "dual"; > > + try-power-role = "sink" > > Here! > > > + source-pdos = <0x380190c8>; > > + sink-pdos = <0x380190c8 0x3802d0c8>; > > + op-sink-microwatt-hours = <900>; > > + }; > > +}; > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
Hi Li Jun, Are you working on an updated version of this patch series? I'm pondering other changes that builds on these patches (the documentation and the fwnode added to the tcpc_dev and tcpm primarily). Btw, there is a semi-colon missing in your example below. BR // Mats On 2018-03-28 18:06, Li Jun wrote: TCPCI stands for typec port controller interface, its implementation has full typec port control with power delivery support, it's a standard i2c slave with GPIO input as irq interface, detail see spec "Universal Serial Bus Type-C Port Controller Interface Specification Revision 1.0, Version 1.1" Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 33 ++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/typec-tcpci.txt new file mode 100644 index 000..7a7a8e0 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.txt @@ -0,0 +1,33 @@ +TCPCI(Typec port cotroller interface) binding +- + +Required properties: +- compatible: should be "usb-tcpci,chip-specific-string". +- reg: the i2c slave address of typec port controller device. +- interrupt-parent: the phandle to the interrupt controller which provides +the interrupt. +- interrupts: interrupt specification for tcpci alert. + +Required sub-node: +- connector: The "usb-c-connector" attached to the tcpci chip, the bindings + of connector node are specified in + Documentation/devicetree/bindings/connector/usb-connector.txt + +Example: + +ptn5110@50 { + compatible = "usb-tcpci,ptn5110"; + reg = <0x50>; + interrupt-parent = <&gpio3>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + port-type = "dual"; + try-power-role = "sink" Here! + source-pdos = <0x380190c8>; + sink-pdos = <0x380190c8 0x3802d0c8>; + op-sink-microwatt-hours = <900>; + }; +}; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
> -Original Message- > From: Rob Herring [mailto:r...@kernel.org] > Sent: 2018年4月16日 22:28 > To: Jun Li > Cc: gre...@linuxfoundation.org; heikki.kroge...@linux.intel.com; > li...@roeck-us.net; a.ha...@samsung.com; shufan_...@richtek.com; Peter > Chen ; devicet...@vger.kernel.org; > linux-...@vger.kernel.org; dl-linux-imx ; > de...@driverdev.osuosl.org > Subject: Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec > port controller(TCPCI) > > On Mon, Apr 16, 2018 at 6:54 AM, Jun Li wrote: > > Hi > >> -Original Message- > >> From: Rob Herring [mailto:r...@kernel.org] > >> Sent: 2018年4月10日 4:04 > >> To: Jun Li > >> Cc: gre...@linuxfoundation.org; heikki.kroge...@linux.intel.com; > >> li...@roeck-us.net; a.ha...@samsung.com; shufan_...@richtek.com; > >> Peter Chen ; devicet...@vger.kernel.org; > >> linux-...@vger.kernel.org; dl-linux-imx ; > >> de...@driverdev.osuosl.org > >> Subject: Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for > >> typec port controller(TCPCI) > >> > >> On Thu, Mar 29, 2018 at 12:06:07AM +0800, Li Jun wrote: > > [...] > > >> > +ptn5110@50 { > >> > + compatible = "usb-tcpci,ptn5110"; > >> > + reg = <0x50>; > >> > + interrupt-parent = <&gpio3>; > >> > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > >> > + > >> > + usb_con: connector { > >> > >> How is the OF graph done in this case? You need some link to the USB > controller. > > > > The platform(i.MX8MQ EVK) for this is still on the way of start > > upstream, I was Planning to add this part with enabling USB3 function, > > as of how this will be done, I only have usb3 ss data(no display port or > Sideband), is something like below OK? > > > > typec: ptn5110@50 { > > compatible = "nxp,ptn5110"; > > ... > > > > usb_con: connector { > > compatible = "usb-c-connector"; > > label = "USB-C"; > > ... > > > > ports { > > #address-cells = <1>; > > #size-cells = <0>; > > > > port@1 { > > reg = <1>; > > usb_con_ss: endpoint { > > remote-endpoint = <&usb3_phy_ss>; > > }; > > }; > > }; > > }; > > }; > > > > &usb3_phy0 { > > status = "okay"; > > > > port { > > usb3_phy_ss: endpoint { > > Normally, the graph connection would be to the USB controller, not the phy as > the phy is just referred to with a "phys" property. Understood, I will put this into a USB controller node. Thanks. Jun > > > remote-endpoint = <&usb_con_ss>; > > }; > > }; > > } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
On Mon, Apr 16, 2018 at 6:54 AM, Jun Li wrote: > Hi >> -Original Message- >> From: Rob Herring [mailto:r...@kernel.org] >> Sent: 2018年4月10日 4:04 >> To: Jun Li >> Cc: gre...@linuxfoundation.org; heikki.kroge...@linux.intel.com; >> li...@roeck-us.net; a.ha...@samsung.com; shufan_...@richtek.com; Peter >> Chen ; devicet...@vger.kernel.org; >> linux-...@vger.kernel.org; dl-linux-imx ; >> de...@driverdev.osuosl.org >> Subject: Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec >> port controller(TCPCI) >> >> On Thu, Mar 29, 2018 at 12:06:07AM +0800, Li Jun wrote: [...] >> > +ptn5110@50 { >> > + compatible = "usb-tcpci,ptn5110"; >> > + reg = <0x50>; >> > + interrupt-parent = <&gpio3>; >> > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; >> > + >> > + usb_con: connector { >> >> How is the OF graph done in this case? You need some link to the USB >> controller. > > The platform(i.MX8MQ EVK) for this is still on the way of start upstream, I > was > Planning to add this part with enabling USB3 function, as of how this will be > done, > I only have usb3 ss data(no display port or Sideband), is something like > below OK? > > typec: ptn5110@50 { > compatible = "nxp,ptn5110"; > ... > > usb_con: connector { > compatible = "usb-c-connector"; > label = "USB-C"; > ... > > ports { > #address-cells = <1>; > #size-cells = <0>; > > port@1 { > reg = <1>; > usb_con_ss: endpoint { > remote-endpoint = <&usb3_phy_ss>; > }; > }; > }; > }; > }; > > &usb3_phy0 { > status = "okay"; > > port { > usb3_phy_ss: endpoint { Normally, the graph connection would be to the USB controller, not the phy as the phy is just referred to with a "phys" property. > remote-endpoint = <&usb_con_ss>; > }; > }; > } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
Hi > -Original Message- > From: Rob Herring [mailto:r...@kernel.org] > Sent: 2018年4月10日 4:04 > To: Jun Li > Cc: gre...@linuxfoundation.org; heikki.kroge...@linux.intel.com; > li...@roeck-us.net; a.ha...@samsung.com; shufan_...@richtek.com; Peter > Chen ; devicet...@vger.kernel.org; > linux-...@vger.kernel.org; dl-linux-imx ; > de...@driverdev.osuosl.org > Subject: Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec > port controller(TCPCI) > > On Thu, Mar 29, 2018 at 12:06:07AM +0800, Li Jun wrote: > > TCPCI stands for typec port controller interface, its implementation > > has full typec port control with power delivery support, it's a > > standard i2c slave with GPIO input as irq interface, detail see spec > > "Universal Serial Bus Type-C Port Controller Interface Specification > > Revision 1.0, Version 1.1" > > > > Signed-off-by: Li Jun > > --- > > .../devicetree/bindings/usb/typec-tcpci.txt| 33 > ++ > > 1 file changed, 33 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt > > b/Documentation/devicetree/bindings/usb/typec-tcpci.txt > > new file mode 100644 > > index 000..7a7a8e0 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.txt > > @@ -0,0 +1,33 @@ > > +TCPCI(Typec port cotroller interface) binding > > +- > > + > > +Required properties: > > +- compatible: should be "usb-tcpci,chip-specific-string". > > Compatible strings should be in the form of "," > OK, I will list the specific compatible string here and change my example case to be "nxp,ptn5110". > > +- reg: the i2c slave address of typec port controller device. > > +- interrupt-parent: the phandle to the interrupt controller which provides > > +the interrupt. > > +- interrupts: interrupt specification for tcpci alert. > > + > > +Required sub-node: > > +- connector: The "usb-c-connector" attached to the tcpci chip, the > > +bindings > > + of connector node are specified in > > + Documentation/devicetree/bindings/connector/usb-connector.txt > > + > > +Example: > > + > > +ptn5110@50 { > > + compatible = "usb-tcpci,ptn5110"; > > + reg = <0x50>; > > + interrupt-parent = <&gpio3>; > > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > > + > > + usb_con: connector { > > How is the OF graph done in this case? You need some link to the USB > controller. The platform(i.MX8MQ EVK) for this is still on the way of start upstream, I was Planning to add this part with enabling USB3 function, as of how this will be done, I only have usb3 ss data(no display port or Sideband), is something like below OK? typec: ptn5110@50 { compatible = "nxp,ptn5110"; ... usb_con: connector { compatible = "usb-c-connector"; label = "USB-C"; ... ports { #address-cells = <1>; #size-cells = <0>; port@1 { reg = <1>; usb_con_ss: endpoint { remote-endpoint = <&usb3_phy_ss>; }; }; }; }; }; &usb3_phy0 { status = "okay"; port { usb3_phy_ss: endpoint { remote-endpoint = <&usb_con_ss>; }; }; } Thanks Jun > > > + compatible = "usb-c-connector"; > > + label = "USB-C"; > > + port-type = "dual"; > > + try-power-role = "sink" > > + source-pdos = <0x380190c8>; > > + sink-pdos = <0x380190c8 0x3802d0c8>; > > + op-sink-microwatt-hours = <900>; > > + }; > > +}; > > -- > > 2.7.4 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe devicetree" > > in the body of a message to majord...@vger.kernel.org More majordomo > > info at > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger > > .kernel.org%2Fmajordomo-info.html&data=02%7C01%7Cjun.li%40nxp.com%7C > 86 > > > a7c0da18204df434d208d59e550c27%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 > % > > > 7C0%7C636589010562193065&sdata=0%2FmoDrqWn9YghWGucWYnMd1YK0BO2 > dVgp%2Fa > > KNZZZ%2BXE%3D&reserved=0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
On Thu, Mar 29, 2018 at 12:06:07AM +0800, Li Jun wrote: > TCPCI stands for typec port controller interface, its implementation > has full typec port control with power delivery support, it's a > standard i2c slave with GPIO input as irq interface, detail see spec > "Universal Serial Bus Type-C Port Controller Interface Specification > Revision 1.0, Version 1.1" > > Signed-off-by: Li Jun > --- > .../devicetree/bindings/usb/typec-tcpci.txt| 33 > ++ > 1 file changed, 33 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt > b/Documentation/devicetree/bindings/usb/typec-tcpci.txt > new file mode 100644 > index 000..7a7a8e0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.txt > @@ -0,0 +1,33 @@ > +TCPCI(Typec port cotroller interface) binding > +- > + > +Required properties: > +- compatible: should be "usb-tcpci,chip-specific-string". Compatible strings should be in the form of "," > +- reg: the i2c slave address of typec port controller device. > +- interrupt-parent: the phandle to the interrupt controller which provides > +the interrupt. > +- interrupts: interrupt specification for tcpci alert. > + > +Required sub-node: > +- connector: The "usb-c-connector" attached to the tcpci chip, the bindings > + of connector node are specified in > + Documentation/devicetree/bindings/connector/usb-connector.txt > + > +Example: > + > +ptn5110@50 { > + compatible = "usb-tcpci,ptn5110"; > + reg = <0x50>; > + interrupt-parent = <&gpio3>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + > + usb_con: connector { How is the OF graph done in this case? You need some link to the USB controller. > + compatible = "usb-c-connector"; > + label = "USB-C"; > + port-type = "dual"; > + try-power-role = "sink" > + source-pdos = <0x380190c8>; > + sink-pdos = <0x380190c8 0x3802d0c8>; > + op-sink-microwatt-hours = <900>; > + }; > +}; > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)
TCPCI stands for typec port controller interface, its implementation has full typec port control with power delivery support, it's a standard i2c slave with GPIO input as irq interface, detail see spec "Universal Serial Bus Type-C Port Controller Interface Specification Revision 1.0, Version 1.1" Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 33 ++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/typec-tcpci.txt new file mode 100644 index 000..7a7a8e0 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/typec-tcpci.txt @@ -0,0 +1,33 @@ +TCPCI(Typec port cotroller interface) binding +- + +Required properties: +- compatible: should be "usb-tcpci,chip-specific-string". +- reg: the i2c slave address of typec port controller device. +- interrupt-parent: the phandle to the interrupt controller which provides +the interrupt. +- interrupts: interrupt specification for tcpci alert. + +Required sub-node: +- connector: The "usb-c-connector" attached to the tcpci chip, the bindings + of connector node are specified in + Documentation/devicetree/bindings/connector/usb-connector.txt + +Example: + +ptn5110@50 { + compatible = "usb-tcpci,ptn5110"; + reg = <0x50>; + interrupt-parent = <&gpio3>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + port-type = "dual"; + try-power-role = "sink" + source-pdos = <0x380190c8>; + sink-pdos = <0x380190c8 0x3802d0c8>; + op-sink-microwatt-hours = <900>; + }; +}; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel