Hello Peter, On 16-05-12 16:40:16, Peter Chen wrote: > On Wed, May 11, 2016 at 06:11:36PM +0530, Sanchayan Maity wrote: > > Use USBC_DET feature of standard Colibri SODIMM pin 137 for USB > > device/host switching using the generic extcon USB gpio implementation. > > > > Signed-off-by: Sanchayan Maity <maitysancha...@gmail.com> > > --- > > arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 12 ++++++++++++ > > arch/arm/boot/dts/vf-colibri.dtsi | 7 +++++++ > > 2 files changed, 19 insertions(+) > > > > diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi > > b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi > > index a8a8e43..a012f80 100644 > > --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi > > +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi > > @@ -50,6 +50,14 @@ > > clock-frequency = <16000000>; > > }; > > > > + extcon_usbc_det: usbc_det { > > + compatible = "linux,extcon-usb-gpio"; > > + debounce = <25>; > > + id-gpio = <&gpio3 6 GPIO_ACTIVE_HIGH>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_usbc_det>; > > + }; > > + > > panel: panel { > > compatible = "edt,et057090dhu"; > > backlight = <&bl>; > > @@ -162,6 +170,10 @@ > > status = "okay"; > > }; > > > > +&usbdev0 { > > + extcon = <&extcon_usbc_det>, <&extcon_usbc_det>; > > +}; > > + > > I still not understand why vbus needs id-extcon too? Per my understand, > this pin will not be changed between connects to pc and disconnects to > pc.
While the ID extcon will take care of switching the role, without the vbus gadget connect/disconnect being called appropriately as per the current state, I have observed the client configuration to not work. >From the descriptions of usb_gadget_vbus_connect/disconnect I understand this to be required. Do I understand wrong? - Sanchayan. > > > &usbh1 { > > vbus-supply = <®_usbh_vbus>; > > }; > > diff --git a/arch/arm/boot/dts/vf-colibri.dtsi > > b/arch/arm/boot/dts/vf-colibri.dtsi > > index b741709..a7a3e88 100644 > > --- a/arch/arm/boot/dts/vf-colibri.dtsi > > +++ b/arch/arm/boot/dts/vf-colibri.dtsi > > @@ -174,6 +174,7 @@ > > > > &usbdev0 { > > disable-over-current; > > + dr_mode = "otg"; > > status = "okay"; > > }; > > > > @@ -362,6 +363,12 @@ > > >; > > }; > > > > + pinctrl_usbc_det: gpio_usbc_det { > > + fsl,pins = < > > + VF610_PAD_PTC29__GPIO_102 0x22ed > > + >; > > + }; > > + > > pinctrl_usbh1_reg: gpio_usb_vbus { > > fsl,pins = < > > VF610_PAD_PTD4__GPIO_83 0x22ed > > -- > > 2.8.2 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > > Best Regards, > Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html