* Using PTN5110 w/ USB Hub @ 2022-04-11 17:26 Adam Ford 2022-04-12 15:37 ` Jun Li 0 siblings, 1 reply; 7+ messages in thread From: Adam Ford @ 2022-04-11 17:26 UTC (permalink / raw) To: Guenter Roeck, heikki.krogerus, USB list I have a board with a dual role USB conttroller connected to a dual role hub connected to a PTN5110 for enabing power to the USB-C. SoC -> Hub -> PTN-> USB-C The hope was the PTN5110 would enable/disable the src_en pin when I connect a device that needs power. Unfortunately, most of the examples I can see for the device trees on a PTN5110 show some sort of connection to a USB controller, but I am going through a hub, not a controller. Is it possible to configure the PTN5110 to either not require connection to a USB controller or plumb it to a USB hub? thanks adam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using PTN5110 w/ USB Hub 2022-04-11 17:26 Using PTN5110 w/ USB Hub Adam Ford @ 2022-04-12 15:37 ` Jun Li 2022-04-12 15:58 ` Adam Ford 0 siblings, 1 reply; 7+ messages in thread From: Jun Li @ 2022-04-12 15:37 UTC (permalink / raw) To: Adam Ford; +Cc: Guenter Roeck, Heikki Krogerus, USB list, Li Jun, xu.yang_2 Adam Ford <aford173@gmail.com> 于2022年4月12日周二 08:24写道: > > I have a board with a dual role USB conttroller connected to a dual > role hub Could you please explain more about what's "a dual role hub"? > connected to a PTN5110 for enabing power to the USB-C. > > SoC -> Hub -> PTN-> USB-C What signals of Hub chip connect to PTN5110 chip? > > The hope was the PTN5110 would enable/disable the src_en pin when I > connect a device that needs power. Unfortunately, most of the > examples I can see for the device trees on a PTN5110 show some sort of > connection to a USB controller, but I am going through a hub, not a > controller. > > Is it possible to configure the PTN5110 to either not require > connection to a USB controller or plumb it to a USB hub? My understanding PTN5110(TCPCI controller with PD PHY) is independent with USB data path, for USB data path, I think it should be: SoC -> Hub -> USB-C PTN5110 should not care or know if there is a Hub between type-C connector and USB controller. If the type-C connector connects to a Hub, then it's a DFP only on data, and from power point view, you also only power source role, right? thanks Li Jun > > thanks > > adam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using PTN5110 w/ USB Hub 2022-04-12 15:37 ` Jun Li @ 2022-04-12 15:58 ` Adam Ford 2022-04-13 13:12 ` Heikki Krogerus 2022-04-13 13:16 ` Jun Li 0 siblings, 2 replies; 7+ messages in thread From: Adam Ford @ 2022-04-12 15:58 UTC (permalink / raw) To: Jun Li; +Cc: Guenter Roeck, Heikki Krogerus, USB list, Li Jun, xu.yang_2 On Tue, Apr 12, 2022 at 10:37 AM Jun Li <lijun.kernel@gmail.com> wrote: > > Adam Ford <aford173@gmail.com> 于2022年4月12日周二 08:24写道: > > > > I have a board with a dual role USB conttroller connected to a dual > > role hub > > Could you please explain more about what's "a dual role hub"? Thanks for responding. The datasheet is listed here: https://ww1.microchip.com/downloads/en/DeviceDoc/00002238D.pdf I worded that poorly, sorry. It supports DCP, CDP, SDP. From the datasheet: • USB Hub Feature Controller IC Hub with:- 1 USB 3.1 Gen 1 USB Type-CTM downstream port- 4 USB 3.1 Gen 1 legacy downstream ports- 1 USB 2.0 downstream port- Legacy upstream port • USB-IF Battery Charger revision 1.2 support on up & downstream ports (DCP, CDP, SDP) The hope was to have the PTN enable the SRC_EN when the USB-C cable is connected to the hub. > > > connected to a PTN5110 for enabing power to the USB-C. > > > > SoC -> Hub -> PTN-> USB-C > > What signals of Hub chip connect to PTN5110 chip? Technically, only the CC pins are connected between the USB-C connector and the PTN5110. There isn't really a connection to the hub itself, but the output on the PTN enables a regulator which powers the USB-C which does connect to the hub. > > > > > The hope was the PTN5110 would enable/disable the src_en pin when I > > connect a device that needs power. Unfortunately, most of the > > examples I can see for the device trees on a PTN5110 show some sort of > > connection to a USB controller, but I am going through a hub, not a > > controller. > > > > Is it possible to configure the PTN5110 to either not require > > connection to a USB controller or plumb it to a USB hub? > > My understanding PTN5110(TCPCI controller with PD PHY) is independent > with USB data path, for USB data path, I think it should be: > SoC -> Hub -> USB-C > PTN5110 should not care or know if there is a Hub between type-C connector > and USB controller. > If the type-C connector connects to a Hub, then it's a DFP only on data, > and from power point view, you also only power source role, right? Yes. We're basically trying to source power when a device is connected and power down the regulator when the USB-C device is disconnected. Unfortunately, the PTN5110 never enables power even when I specify it's source only with no sink. The driver acts like it needs some sort of USB node, and when it doesn't find one, and the example device tree in the YAML file shows a refernce to the USB controller. I assumed I needed to plumb it to the hub somehow. If I am reading your response correctly, I should just add the node for the USB controller and forget the hub exists, is that correct? > > thanks > Li Jun > > > > thanks > > > > adam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using PTN5110 w/ USB Hub 2022-04-12 15:58 ` Adam Ford @ 2022-04-13 13:12 ` Heikki Krogerus 2022-04-13 13:16 ` Jun Li 1 sibling, 0 replies; 7+ messages in thread From: Heikki Krogerus @ 2022-04-13 13:12 UTC (permalink / raw) To: Adam Ford; +Cc: Jun Li, Guenter Roeck, USB list, Li Jun, xu.yang_2 Hi Adam, On Tue, Apr 12, 2022 at 10:58:03AM -0500, Adam Ford wrote: > On Tue, Apr 12, 2022 at 10:37 AM Jun Li <lijun.kernel@gmail.com> wrote: > > > > Adam Ford <aford173@gmail.com> 于2022年4月12日周二 08:24写道: > > > > > > I have a board with a dual role USB conttroller connected to a dual > > > role hub > > > > Could you please explain more about what's "a dual role hub"? > Thanks for responding. > > > The datasheet is listed here: > https://ww1.microchip.com/downloads/en/DeviceDoc/00002238D.pdf > > I worded that poorly, sorry. It supports DCP, CDP, SDP. > > >From the datasheet: > • USB Hub Feature Controller IC Hub with:- 1 USB 3.1 Gen 1 USB > Type-CTM downstream port- 4 USB 3.1 Gen 1 legacy downstream ports- 1 > USB 2.0 downstream port- Legacy upstream port > • USB-IF Battery Charger revision 1.2 support on up & downstream ports > (DCP, CDP, SDP) > > The hope was to have the PTN enable the SRC_EN when the USB-C cable is > connected to the hub. > > > > > > connected to a PTN5110 for enabing power to the USB-C. > > > > > > SoC -> Hub -> PTN-> USB-C > > > > What signals of Hub chip connect to PTN5110 chip? > > Technically, only the CC pins are connected between the USB-C > connector and the PTN5110. There isn't really a connection to the hub > itself, but the output on the PTN enables a regulator which powers the > USB-C which does connect to the hub. > > > > > > > > > The hope was the PTN5110 would enable/disable the src_en pin when I > > > connect a device that needs power. Unfortunately, most of the > > > examples I can see for the device trees on a PTN5110 show some sort of > > > connection to a USB controller, but I am going through a hub, not a > > > controller. > > > > > > Is it possible to configure the PTN5110 to either not require > > > connection to a USB controller or plumb it to a USB hub? > > > > My understanding PTN5110(TCPCI controller with PD PHY) is independent > > with USB data path, for USB data path, I think it should be: > > SoC -> Hub -> USB-C > > PTN5110 should not care or know if there is a Hub between type-C connector > > and USB controller. > > If the type-C connector connects to a Hub, then it's a DFP only on data, > > and from power point view, you also only power source role, right? > > Yes. We're basically trying to source power when a device is > connected and power down the regulator when the USB-C device is > disconnected. Unfortunately, the PTN5110 never enables power even when > I specify it's source only with no sink. The driver acts like it > needs some sort of USB node, and when it doesn't find one, and the > example device tree in the YAML file shows a refernce to the USB > controller. I assumed I needed to plumb it to the hub somehow. If I > am reading your response correctly, I should just add the node for the > USB controller and forget the hub exists, is that correct? Which driver are you talking about? thanks, -- heikki ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Using PTN5110 w/ USB Hub 2022-04-12 15:58 ` Adam Ford 2022-04-13 13:12 ` Heikki Krogerus @ 2022-04-13 13:16 ` Jun Li 2022-04-14 13:05 ` Xu Yang 1 sibling, 1 reply; 7+ messages in thread From: Jun Li @ 2022-04-13 13:16 UTC (permalink / raw) To: Xu Yang, Adam Ford, Jun Li, Xu Yang Cc: Guenter Roeck, Heikki Krogerus, USB list > -----Original Message----- > From: Adam Ford <aford173@gmail.com> > Sent: Tuesday, April 12, 2022 11:58 PM > To: Jun Li <lijun.kernel@gmail.com> > Cc: Guenter Roeck <linux@roeck-us.net>; Heikki Krogerus > <heikki.krogerus@linux.intel.com>; USB list <linux-usb@vger.kernel.org>; > Jun Li <jun.li@nxp.com>; Xu Yang <xu.yang_2@nxp.com> > Subject: Re: Using PTN5110 w/ USB Hub > > On Tue, Apr 12, 2022 at 10:37 AM Jun Li <lijun.kernel@gmail.com> wrote: > > > > Adam Ford <aford173@gmail.com> 于2022年4月12日周二 08:24写道: > > > > > > I have a board with a dual role USB conttroller connected to a dual > > > role hub > > > > Could you please explain more about what's "a dual role hub"? > Thanks for responding. > > > The datasheet is listed here: > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww1.m > icrochip.com%2Fdownloads%2Fen%2FDeviceDoc%2F00002238D.pdf&data=04%7 > C01%7Cjun.li%40nxp.com%7C71a9f6a3197248e09d0708da1c9d4187%7C686ea1d3bc2 > b4c6fa92cd99c5c301635%7C0%7C1%7C637853758981725860%7CUnknown%7CTWFpbGZs > b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D% > 7C3000&sdata=VFowzrzgNKvG7ZbXGMUBtmMa2nV5bH5Jl9knYVS%2BJ7w%3D&r > eserved=0 > > I worded that poorly, sorry. It supports DCP, CDP, SDP. > > From the datasheet: > • USB Hub Feature Controller IC Hub with:- 1 USB 3.1 Gen 1 USB > Type-CTM downstream port- 4 USB 3.1 Gen 1 legacy downstream ports- 1 > USB 2.0 downstream port- Legacy upstream port > • USB-IF Battery Charger revision 1.2 support on up & downstream ports > (DCP, CDP, SDP) P2 ~ P6 all are normal downstream ports, how about P1? It's just has 2 sets of SS lanes(for typec) but still downstream port(DFP)? > > The hope was to have the PTN enable the SRC_EN when the USB-C cable is > connected to the hub. If you use the correct USB-C cable(Present Rd), PTN should detect a sink and Linux tcpm + tcpci driver will enable SRC_EN for you, Did you correctly enable the typec port driver? Cat /sys/kernel/debug/usb/tcpm-xxx/log @Xu Yang, could you help check if a source only config like below still Can work? ptn5110: tcpc@50 { compatible = "nxp,ptn5110"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_typec>; reg = <0x50>; interrupt-parent = <&gpio4>; interrupts = <19 8>; usb_con: connector { compatible = "usb-c-connector"; label = "USB-C"; power-role = "source"; data-role = "host"; source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; ports { #address-cells = <1>; #size-cells = <0>; port@1 { reg = <1>; typec_con_ss: endpoint { remote-endpoint = <&usb3_data_ss>; }; }; }; }; }; > > > > > > connected to a PTN5110 for enabing power to the USB-C. > > > > > > SoC -> Hub -> PTN-> USB-C > > > > What signals of Hub chip connect to PTN5110 chip? > > Technically, only the CC pins are connected between the USB-C > connector and the PTN5110. There isn't really a connection to the hub > itself, but the output on the PTN enables a regulator which powers the > USB-C which does connect to the hub. That's a typical usage. > > > > > > > > > The hope was the PTN5110 would enable/disable the src_en pin when I > > > connect a device that needs power. Unfortunately, most of the > > > examples I can see for the device trees on a PTN5110 show some sort of > > > connection to a USB controller, but I am going through a hub, not a > > > controller. > > > > > > Is it possible to configure the PTN5110 to either not require > > > connection to a USB controller or plumb it to a USB hub? > > > > My understanding PTN5110(TCPCI controller with PD PHY) is independent > > with USB data path, for USB data path, I think it should be: > > SoC -> Hub -> USB-C > > PTN5110 should not care or know if there is a Hub between type-C connector > > and USB controller. > > If the type-C connector connects to a Hub, then it's a DFP only on data, > > and from power point view, you also only power source role, right? > > Yes. We're basically trying to source power when a device is > connected and power down the regulator when the USB-C device is > disconnected. Unfortunately, the PTN5110 never enables power even when > I specify it's source only with no sink. The driver acts like it > needs some sort of USB node, If you don't need usb data dual role(host and device), I assume the typec node does not need link to any usb controller node, PTN just works to enable power(via SRC_EN) and do orientation flip. > and when it doesn't find one, and the > example device tree in the YAML file shows a refernce to the USB > controller. I assumed I needed to plumb it to the hub somehow. If I > am reading your response correctly, I should just add the node for the > USB controller and forget the hub exists, is that correct? You even need not link PTN to USB controller, see my comment above. Li Jun > > > > > thanks > > Li Jun > > > > > > thanks > > > > > > adam ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Using PTN5110 w/ USB Hub 2022-04-13 13:16 ` Jun Li @ 2022-04-14 13:05 ` Xu Yang 2022-04-14 13:07 ` Adam Ford 0 siblings, 1 reply; 7+ messages in thread From: Xu Yang @ 2022-04-14 13:05 UTC (permalink / raw) To: Jun Li, Adam Ford, Jun Li; +Cc: Guenter Roeck, Heikki Krogerus, USB list Hi jun, > -----Original Message----- > From: Jun Li <jun.li@nxp.com> > Sent: Wednesday, April 13, 2022 9:16 PM > To: Xu Yang <xu.yang_2@nxp.com>; Adam Ford <aford173@gmail.com>; Jun Li > <lijun.kernel@gmail.com>; Xu Yang <xu.yang_2@nxp.com> > Cc: Guenter Roeck <linux@roeck-us.net>; Heikki Krogerus > <heikki.krogerus@linux.intel.com>; USB list <linux-usb@vger.kernel.org> > Subject: RE: Using PTN5110 w/ USB Hub > > > > > -----Original Message----- > > From: Adam Ford <aford173@gmail.com> > > Sent: Tuesday, April 12, 2022 11:58 PM > > To: Jun Li <lijun.kernel@gmail.com> > > Cc: Guenter Roeck <linux@roeck-us.net>; Heikki Krogerus > > <heikki.krogerus@linux.intel.com>; USB list > > <linux-usb@vger.kernel.org>; Jun Li <jun.li@nxp.com>; Xu Yang > > <xu.yang_2@nxp.com> > > Subject: Re: Using PTN5110 w/ USB Hub > > > > On Tue, Apr 12, 2022 at 10:37 AM Jun Li <lijun.kernel@gmail.com> wrote: > > > > > > Adam Ford <aford173@gmail.com> 于2022年4月12日周二 08:24写道: > > > > > > > > I have a board with a dual role USB conttroller connected to a > > > > dual role hub > > > > > > Could you please explain more about what's "a dual role hub"? > > Thanks for responding. > > > > > > The datasheet is listed here: > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww1. > > m > > > icrochip.com%2Fdownloads%2Fen%2FDeviceDoc%2F00002238D.pdf&data > =04% > > 7 > > > C01%7Cjun.li%40nxp.com%7C71a9f6a3197248e09d0708da1c9d4187%7C686ea > 1d3bc > > 2 > > > b4c6fa92cd99c5c301635%7C0%7C1%7C637853758981725860%7CUnknown%7 > CTWFpbGZ > > s > > > b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0 > %3D > > % > > > 7C3000&sdata=VFowzrzgNKvG7ZbXGMUBtmMa2nV5bH5Jl9knYVS%2BJ7w > %3D& > > r > > eserved=0 > > > > I worded that poorly, sorry. It supports DCP, CDP, SDP. > > > > From the datasheet: > > • USB Hub Feature Controller IC Hub with:- 1 USB 3.1 Gen 1 USB > > Type-CTM downstream port- 4 USB 3.1 Gen 1 legacy downstream ports- 1 > > USB 2.0 downstream port- Legacy upstream port • USB-IF Battery Charger > > revision 1.2 support on up & downstream ports (DCP, CDP, SDP) > > P2 ~ P6 all are normal downstream ports, how about P1? It's just has 2 sets of SS > lanes(for typec) but still downstream port(DFP)? > > > > > The hope was to have the PTN enable the SRC_EN when the USB-C cable is > > connected to the hub. > > If you use the correct USB-C cable(Present Rd), PTN should detect a sink and > Linux tcpm + tcpci driver will enable SRC_EN for you, Did you correctly enable > the typec port driver? > > Cat /sys/kernel/debug/usb/tcpm-xxx/log > > @Xu Yang, could you help check if a source only config like below still Can work? > > ptn5110: tcpc@50 { > compatible = "nxp,ptn5110"; > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_typec>; > reg = <0x50>; > interrupt-parent = <&gpio4>; > interrupts = <19 8>; > > > usb_con: connector { > compatible = "usb-c-connector"; > label = "USB-C"; > power-role = "source"; > data-role = "host"; > source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; > > ports { > #address-cells = <1>; > #size-cells = <0>; > > port@1 { > reg = <1>; > typec_con_ss: endpoint { > remote-endpoint = <&usb3_data_ss>; > }; > }; > }; > }; > }; After my check, the ptn5110 can work with the above source only config. Xu Yang > > > > > > > > > > connected to a PTN5110 for enabing power to the USB-C. > > > > > > > > SoC -> Hub -> PTN-> USB-C > > > > > > What signals of Hub chip connect to PTN5110 chip? > > > > Technically, only the CC pins are connected between the USB-C > > connector and the PTN5110. There isn't really a connection to the hub > > itself, but the output on the PTN enables a regulator which powers the > > USB-C which does connect to the hub. > > That's a typical usage. > > > > > > > > > > > > > > The hope was the PTN5110 would enable/disable the src_en pin when > > > > I connect a device that needs power. Unfortunately, most of the > > > > examples I can see for the device trees on a PTN5110 show some > > > > sort of connection to a USB controller, but I am going through a > > > > hub, not a controller. > > > > > > > > Is it possible to configure the PTN5110 to either not require > > > > connection to a USB controller or plumb it to a USB hub? > > > > > > My understanding PTN5110(TCPCI controller with PD PHY) is > > > independent with USB data path, for USB data path, I think it should be: > > > SoC -> Hub -> USB-C > > > PTN5110 should not care or know if there is a Hub between type-C > > > connector and USB controller. > > > If the type-C connector connects to a Hub, then it's a DFP only on > > > data, and from power point view, you also only power source role, right? > > > > Yes. We're basically trying to source power when a device is > > connected and power down the regulator when the USB-C device is > > disconnected. Unfortunately, the PTN5110 never enables power even when > > I specify it's source only with no sink. The driver acts like it > > needs some sort of USB node, > > If you don't need usb data dual role(host and device), I assume the typec node > does not need link to any usb controller node, PTN just works to enable > power(via SRC_EN) and do orientation flip. > > > and when it doesn't find one, and the > > example device tree in the YAML file shows a refernce to the USB > > controller. I assumed I needed to plumb it to the hub somehow. If I > > am reading your response correctly, I should just add the node for the > > USB controller and forget the hub exists, is that correct? > > You even need not link PTN to USB controller, see my comment above. > > Li Jun > > > > > > > > > thanks > > > Li Jun > > > > > > > > thanks > > > > > > > > adam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using PTN5110 w/ USB Hub 2022-04-14 13:05 ` Xu Yang @ 2022-04-14 13:07 ` Adam Ford 0 siblings, 0 replies; 7+ messages in thread From: Adam Ford @ 2022-04-14 13:07 UTC (permalink / raw) To: Xu Yang; +Cc: Jun Li, Jun Li, Guenter Roeck, Heikki Krogerus, USB list On Thu, Apr 14, 2022 at 8:05 AM Xu Yang <xu.yang_2@nxp.com> wrote: > > Hi jun, > > > -----Original Message----- > > From: Jun Li <jun.li@nxp.com> > > Sent: Wednesday, April 13, 2022 9:16 PM > > To: Xu Yang <xu.yang_2@nxp.com>; Adam Ford <aford173@gmail.com>; Jun Li > > <lijun.kernel@gmail.com>; Xu Yang <xu.yang_2@nxp.com> > > Cc: Guenter Roeck <linux@roeck-us.net>; Heikki Krogerus > > <heikki.krogerus@linux.intel.com>; USB list <linux-usb@vger.kernel.org> > > Subject: RE: Using PTN5110 w/ USB Hub > > > > > > > > > -----Original Message----- > > > From: Adam Ford <aford173@gmail.com> > > > Sent: Tuesday, April 12, 2022 11:58 PM > > > To: Jun Li <lijun.kernel@gmail.com> > > > Cc: Guenter Roeck <linux@roeck-us.net>; Heikki Krogerus > > > <heikki.krogerus@linux.intel.com>; USB list > > > <linux-usb@vger.kernel.org>; Jun Li <jun.li@nxp.com>; Xu Yang > > > <xu.yang_2@nxp.com> > > > Subject: Re: Using PTN5110 w/ USB Hub > > > > > > On Tue, Apr 12, 2022 at 10:37 AM Jun Li <lijun.kernel@gmail.com> wrote: > > > > > > > > Adam Ford <aford173@gmail.com> 于2022年4月12日周二 08:24写道: > > > > > > > > > > I have a board with a dual role USB conttroller connected to a > > > > > dual role hub > > > > > > > > Could you please explain more about what's "a dual role hub"? > > > Thanks for responding. > > > > > > > > > The datasheet is listed here: > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww1. > > > m > > > > > icrochip.com%2Fdownloads%2Fen%2FDeviceDoc%2F00002238D.pdf&data > > =04% > > > 7 > > > > > C01%7Cjun.li%40nxp.com%7C71a9f6a3197248e09d0708da1c9d4187%7C686ea > > 1d3bc > > > 2 > > > > > b4c6fa92cd99c5c301635%7C0%7C1%7C637853758981725860%7CUnknown%7 > > CTWFpbGZ > > > s > > > > > b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0 > > %3D > > > % > > > > > 7C3000&sdata=VFowzrzgNKvG7ZbXGMUBtmMa2nV5bH5Jl9knYVS%2BJ7w > > %3D& > > > r > > > eserved=0 > > > > > > I worded that poorly, sorry. It supports DCP, CDP, SDP. > > > > > > From the datasheet: > > > • USB Hub Feature Controller IC Hub with:- 1 USB 3.1 Gen 1 USB > > > Type-CTM downstream port- 4 USB 3.1 Gen 1 legacy downstream ports- 1 > > > USB 2.0 downstream port- Legacy upstream port • USB-IF Battery Charger > > > revision 1.2 support on up & downstream ports (DCP, CDP, SDP) > > > > P2 ~ P6 all are normal downstream ports, how about P1? It's just has 2 sets of SS > > lanes(for typec) but still downstream port(DFP)? > > > > > > > > The hope was to have the PTN enable the SRC_EN when the USB-C cable is > > > connected to the hub. > > > > If you use the correct USB-C cable(Present Rd), PTN should detect a sink and > > Linux tcpm + tcpci driver will enable SRC_EN for you, Did you correctly enable > > the typec port driver? > > > > Cat /sys/kernel/debug/usb/tcpm-xxx/log > > > > @Xu Yang, could you help check if a source only config like below still Can work? > > > > ptn5110: tcpc@50 { > > compatible = "nxp,ptn5110"; > > pinctrl-names = "default"; > > pinctrl-0 = <&pinctrl_typec>; > > reg = <0x50>; > > interrupt-parent = <&gpio4>; > > interrupts = <19 8>; > > > > > > usb_con: connector { > > compatible = "usb-c-connector"; > > label = "USB-C"; > > power-role = "source"; > > data-role = "host"; > > source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; > > > > ports { > > #address-cells = <1>; > > #size-cells = <0>; > > > > port@1 { > > reg = <1>; > > typec_con_ss: endpoint { > > remote-endpoint = <&usb3_data_ss>; > > }; > > }; > > }; > > }; > > }; > > After my check, the ptn5110 can work with the above source only config. I've been sick for a few days, so when I can work on this again, I will give it a try. I think I understand it better now. Thanks for your help. adam > > Xu Yang > > > > > > > > > > > > > > > connected to a PTN5110 for enabing power to the USB-C. > > > > > > > > > > SoC -> Hub -> PTN-> USB-C > > > > > > > > What signals of Hub chip connect to PTN5110 chip? > > > > > > Technically, only the CC pins are connected between the USB-C > > > connector and the PTN5110. There isn't really a connection to the hub > > > itself, but the output on the PTN enables a regulator which powers the > > > USB-C which does connect to the hub. > > > > That's a typical usage. > > > > > > > > > > > > > > > > > > > The hope was the PTN5110 would enable/disable the src_en pin when > > > > > I connect a device that needs power. Unfortunately, most of the > > > > > examples I can see for the device trees on a PTN5110 show some > > > > > sort of connection to a USB controller, but I am going through a > > > > > hub, not a controller. > > > > > > > > > > Is it possible to configure the PTN5110 to either not require > > > > > connection to a USB controller or plumb it to a USB hub? > > > > > > > > My understanding PTN5110(TCPCI controller with PD PHY) is > > > > independent with USB data path, for USB data path, I think it should be: > > > > SoC -> Hub -> USB-C > > > > PTN5110 should not care or know if there is a Hub between type-C > > > > connector and USB controller. > > > > If the type-C connector connects to a Hub, then it's a DFP only on > > > > data, and from power point view, you also only power source role, right? > > > > > > Yes. We're basically trying to source power when a device is > > > connected and power down the regulator when the USB-C device is > > > disconnected. Unfortunately, the PTN5110 never enables power even when > > > I specify it's source only with no sink. The driver acts like it > > > needs some sort of USB node, > > > > If you don't need usb data dual role(host and device), I assume the typec node > > does not need link to any usb controller node, PTN just works to enable > > power(via SRC_EN) and do orientation flip. > > > > > and when it doesn't find one, and the > > > example device tree in the YAML file shows a refernce to the USB > > > controller. I assumed I needed to plumb it to the hub somehow. If I > > > am reading your response correctly, I should just add the node for the > > > USB controller and forget the hub exists, is that correct? > > > > You even need not link PTN to USB controller, see my comment above. > > > > Li Jun > > > > > > > > > > > > > thanks > > > > Li Jun > > > > > > > > > > thanks > > > > > > > > > > adam ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-14 13:07 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-04-11 17:26 Using PTN5110 w/ USB Hub Adam Ford 2022-04-12 15:37 ` Jun Li 2022-04-12 15:58 ` Adam Ford 2022-04-13 13:12 ` Heikki Krogerus 2022-04-13 13:16 ` Jun Li 2022-04-14 13:05 ` Xu Yang 2022-04-14 13:07 ` Adam Ford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox