<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: Role switch issue with iMX6UL</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873064#M132626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ranjan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can check linux documentation, also patch was sent you via mail.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/usb/chipidea.txt?h=imx_4.9.11_1.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/usb/chipidea.txt?h=imx_4.9.11_1.0.0_ga"&gt;chipidea.txt\usb\Documentation - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2019 01:44:52 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2019-02-04T01:44:52Z</dc:date>
    <item>
      <title>Role switch issue with iMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873063#M132625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using iMX6UL and using usb1 as otg port to connect to Apple device.I have enabled hnp and srp in device tree.We are trying to achieve role switch on usb1 port .Host to device is happening and we are able communicate with apple device.But when communication is not happening on usb1 then we want role switch to happen from Device to host and iMX should start charging Apple device.It is showing role switch has happened to Host mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;cat /sys/kernel/debug/ci_hdrc.0/role -&amp;gt; Host&lt;/P&gt;&lt;P&gt;But the problem is Apple device is not getting charged or more specific Apple device is not getting enumerated on iMX side.&lt;/P&gt;&lt;P&gt;We are using Linux 4.9.11 version . Can any body have any patch or solution to this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UART2 Serial Port Initializing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Module Controller UARTt port tymxc1 Opened Successfully&lt;BR /&gt;&amp;nbsp; Bau&lt;BR /&gt;&amp;nbsp;len 35&lt;BR /&gt;dRate = 115200&lt;BR /&gt;using random self ethernet address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Parity&amp;nbsp;&amp;nbsp; = noneStarting Module Controller Read thread&lt;BR /&gt;&amp;nbsp;Starting Module Controller Send Command thread&lt;BR /&gt;&amp;nbsp;Moodule controller UART Init End&lt;BR /&gt;initTransducerDetectionSystem Entry&lt;BR /&gt;&amp;nbsp;Test Writusing random host ethernet address&lt;BR /&gt;e function testing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;iap_host_register_device_ready_callback called&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iAP2_Host_bfnHostInitiusb0: HOST MAC b2:43:27:12:8e:80&lt;BR /&gt;alization called&lt;BR /&gt;iAP2_Host_bfnHostInitialization start&lt;BR /&gt;iAP2_Host_SetConfig start&lt;BR /&gt;&amp;nbsp; using hiddev: /dev/usb/hiddev0&lt;BR /&gt;&amp;nbsp; using i2cdev: /dev/i2c-1&lt;BR /&gt;&amp;nbsp; using i2caddrusb0: MAC 22:73:55:4b:40:80&lt;BR /&gt;: 17&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Open /dev/mfi-ffs/ep0&lt;BR /&gt;g_ffs gadget: g_ffs ready&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Send USB descriptors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Send USB strings&lt;BR /&gt;&amp;nbsp; UART2 Read Thread Entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Allocate buffer for endpoint&lt;BR /&gt;&amp;nbsp;CREATED [ep0_thread] SUCCESSFULLY.&lt;BR /&gt;ep0_thread_function(): EVENT BIND&lt;BR /&gt;VID: 0x5ac&lt;BR /&gt;PID: 0x12ab&lt;BR /&gt;USB Apple Device Detected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;usb_mfi_request_role_switch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; iAP2_USB_Device : Send role switch USB request using received value&lt;BR /&gt;usb 1-1: USB disconnect, device number 2&lt;BR /&gt;Debug: Closing libusb ci_hdrc ci_hdrc.0: remove, state 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usb usb1: USB disconnect, device number 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debug: Switching to device mode&lt;BR /&gt;ci_hdrc ci_hdrc.0: USB bus 1 deregistered&lt;BR /&gt;USB MFI role switch status: 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Starting iAP_USBDev_init_usb_gffs_device&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oen FFS_OUT /dev/mfi-ffs/ep1 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oen FFS_IN /dev/mfi-ffs/ep2 13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oen FFS_NATIVE_OUT /dev/mfi-ffs/ep3 14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oen FFS_NATIVE_IN /dev/mfi-ffs/ep4 15&lt;BR /&gt;iAP2_Host_vfStateMachineDriver start&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iAP_USBDev_read_thread_native started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iap_usb_device_read_native_enable 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iAP_USBDev_read_thread started&lt;BR /&gt;g_ffs gadget: high-speed config #1: FunctionFS + NCM&lt;BR /&gt;ep0_thread_function(): EVENT ENABLE&lt;BR /&gt;&amp;nbsp; iAP2_Link_vfnSendSyncPayload&lt;BR /&gt;iAP2_Sessions_vfnStateMachine started&lt;BR /&gt;iAP2_Link_vfnTask start&lt;BR /&gt;iAP_Auth_vfnStateMachine started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;iAP2_Link_vfnReleaseMemReqId 0&lt;BR /&gt;iAP Host Initialization completeci_hdrc ci_hdrc.0: EHCI Host Controller&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Inside IF block of main app&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Inside transducer_charger_checkInside IF block of ChargerDetectionThread&lt;BR /&gt;&amp;nbsp;SWITCHING TO USB HOST MODE..&lt;BR /&gt;ERROR: iAP_USBDev_read_native, errno: 108 ret -1&lt;BR /&gt;ep0_thread_function(): EVENT DISABLE&lt;BR /&gt;SWITCHING TO USB HOST MODE..&lt;BR /&gt;ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00&lt;BR /&gt;usb usb1: New USB device found, idVendor=1d6b, idProduct=0002&lt;BR /&gt;usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1&lt;BR /&gt;usb usb1: Product: EHCI Host Controller&lt;BR /&gt;usb usb1: Manufacturer: Linux 4.9.11-02215-g5aba4a9 ehci_hcd&lt;BR /&gt;usb usb1: SerialNumber: ci_hdrc.0&lt;BR /&gt;hub 1-0:1.0: USB hub found&lt;BR /&gt;hub 1-0:1.0: 1 port detected&lt;BR /&gt;USB BOARD SET TO HOST MODE.&lt;BR /&gt;ep0_thread_function. ENDED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for reply.&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Ranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 07:29:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873063#M132625</guid>
      <dc:creator>ranjan_kumar</dc:creator>
      <dc:date>2019-01-30T07:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Role switch issue with iMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873064#M132626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ranjan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can check linux documentation, also patch was sent you via mail.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/usb/chipidea.txt?h=imx_4.9.11_1.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/usb/chipidea.txt?h=imx_4.9.11_1.0.0_ga"&gt;chipidea.txt\usb\Documentation - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2019 01:44:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873064#M132626</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-02-04T01:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Role switch issue with iMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873065#M132627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;Thanks for the patch. After applying the patch role switch is happening .As as per the log given below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module Controller UARTt port tymxc1 Opened Successfully&lt;BR /&gt;&amp;nbsp; BaudRate = 115200&lt;BR /&gt;&amp;nbsp; StopBits = 1&lt;BR /&gt;&amp;nbsp; Parity&amp;nbsp;&amp;nbsp; = noneStarting Module Controller Read thread&lt;BR /&gt;&amp;nbsp;Starting Module Controller Send Command thread&lt;BR /&gt;&amp;nbsp;Moodule controller UART Init End&lt;BR /&gt;initTransducerDetectionSystem Entry&lt;BR /&gt;&amp;nbsp;Command sent to UART MC&lt;BR /&gt;&amp;nbsp;UART2 Read Thread Entry&lt;BR /&gt;Initializing packet manager from pid 200 Test Write function testing&lt;/P&gt;&lt;P&gt;&amp;nbsp;iap_host_register_devic&lt;BR /&gt;&amp;nbsp;len 35&lt;BR /&gt;e_ready_callback called&lt;/P&gt;&lt;P&gt;iAP2_using random self ethernet address&lt;BR /&gt;Host_bfnHostInitialization called&lt;BR /&gt;iAP2_Host_bfnHostInitializatiousing random host ethernet address&lt;BR /&gt;n start&lt;BR /&gt;iAP2_Host_SetConfig start&lt;BR /&gt;&amp;nbsp; using hiddev: /dev/usb/hiddusb0: HOST MAC 8e:73:9f:1d:b7:fd&lt;BR /&gt;ev0&lt;BR /&gt;&amp;nbsp; using i2cdev: /dev/i2c-1&lt;BR /&gt;&amp;nbsp; using i2caddr: 17&lt;/P&gt;&lt;P&gt;&amp;nbsp;Open /dev/mfi-ffs/ep0&lt;/P&gt;&lt;P&gt;&amp;nbsp;Send USB descriptors&lt;/P&gt;&lt;P&gt;usb0: MAC 7e:59:29:de:1b:c8&lt;/P&gt;&lt;P&gt;g_ffs gadget: g_ffs ready&lt;/P&gt;&lt;P&gt;&amp;nbsp;Allocate buffer for endpoint&lt;BR /&gt;&amp;nbsp;CREATED [ep0_thread] SUCCESSFULLY.&lt;BR /&gt;ep0_thread_function(): EVENT BIND&lt;BR /&gt;VID: 0x5ac&lt;BR /&gt;PID: 0x12ab&lt;BR /&gt;USB Apple Device Detected&lt;/P&gt;&lt;P&gt;&amp;nbsp;usb_mfi_request_role_switch&lt;/P&gt;&lt;P&gt;&amp;nbsp; iAP2_USB_Device : Send role switch USB request using received value&lt;BR /&gt;usb 1-1: USB disconnect, device number 2&lt;BR /&gt;Debug: Closing libusb ci_hdrc ci_hdrc.0: remove, state 1&lt;/P&gt;&lt;P&gt;usb usb1: USB disconnect, device number 1&lt;/P&gt;&lt;P&gt;Debug: Switching to device mode&lt;BR /&gt;Bytes received from Moudule Controller UART = 17&lt;BR /&gt;ci_hdrc ci_hdrc.0: USB bus 1 deregistered&lt;BR /&gt;USB MFI role switch status: 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i am doing role switch it is showing role switching is happening from gadget to Host. As &amp;nbsp;Imx6 is in host mode it should enumerate Apple again after role switch as Imx6 is host and Apple is in device mode.But the enumeration is not happening. Do you have any idea where exactly the vbus is getting disable while going from gadget to Host.&lt;/P&gt;&lt;P&gt;I am putting the log below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:root@imx6ulevk"&gt;root@imx6ulevk&lt;/A&gt;:~# cat /sys/bus/platform/devices/ci_hdrc.0/role&lt;BR /&gt;Ranjan inside ci_role_show role : host&lt;BR /&gt;host&lt;BR /&gt;&lt;A href="mailto:root@imx6ulevk"&gt;root@imx6ulevk&lt;/A&gt;:~# echo gadget &amp;gt;&amp;nbsp; /sys/bus/platform/devices/ci_hdrc.0/role&lt;BR /&gt;ci_hdrc ci_hdrc.0: remove, state 4&lt;BR /&gt;usb usb1: USB disconnect, device number 1&lt;BR /&gt;ci_hdrc ci_hdrc.0: USB bus 1 deregistered&lt;BR /&gt;Ranjan Inside ci_role_store IF block&lt;BR /&gt;&lt;A href="mailto:root@imx6ulevk"&gt;root@imx6ulevk&lt;/A&gt;:~# cat /sys/bus/platform/devices/ci_hdrc.0/role&lt;BR /&gt;Ranjan inside ci_role_show role : gadget&lt;BR /&gt;gadget&lt;BR /&gt;&lt;A href="mailto:root@imx6ulevk"&gt;root@imx6ulevk&lt;/A&gt;:~# echo host &amp;gt;&amp;nbsp; /sys/bus/platform/devices/ci_ci_hdrc ci_hdrc.0: EHCI Host Controller&lt;BR /&gt;hdrc.0/role&lt;BR /&gt;ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1&lt;BR /&gt;ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00&lt;BR /&gt;usb usb1: New USB device found, idVendor=1d6b, idProduct=0002&lt;BR /&gt;usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1&lt;BR /&gt;usb usb1: Product: EHCI Host Controller&lt;BR /&gt;usb usb1: Manufacturer: Linux 4.9.11-02216-gfff505b-dirty ehci_hcd&lt;BR /&gt;usb usb1: SerialNumber: ci_hdrc.0&lt;BR /&gt;hub 1-0:1.0: USB hub found&lt;BR /&gt;hub 1-0:1.0: 1 port detected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;As you can see while doing role switch device-&amp;gt; host&amp;nbsp; ,apple device not showing.&lt;/P&gt;&lt;P&gt;Please provide any input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Ranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 12:56:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/873065#M132627</guid>
      <dc:creator>ranjan_kumar</dc:creator>
      <dc:date>2019-02-06T12:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Role switch issue with iMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/1179177#M164588</link>
      <description>&lt;P&gt;Hello Igor,&lt;/P&gt;&lt;P&gt;We are facing same issue on IMX8QM MEK board, with &lt;STRONG&gt;usbotg1&lt;/STRONG&gt; which is located on base board and using same driver(chipidea).&lt;/P&gt;&lt;P&gt;Do you guys have specific patch for IMX8QM MEK?&lt;/P&gt;&lt;P&gt;If you have any information please help me with that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 05:55:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/1179177#M164588</guid>
      <dc:creator>emb-vikapat</dc:creator>
      <dc:date>2020-11-06T05:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Role switch issue with iMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/1197443#M166264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/97663"&gt;@ranjan_kumar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We are using chipidea controller's usbotg1 of imx8qm mek board where we could send roleswitch command to iphone (from gadget to host) and switching MEK to gadget but then we lose vbus (as expected). We are trying to enable vbus through soft_connect without any luck&lt;/P&gt;&lt;P&gt;getting error logs as "soft-connect without a gadget driver" also ci_hdrc.0 device no response&lt;/P&gt;&lt;P&gt;Any pointers will be very much appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 14:06:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Role-switch-issue-with-iMX6UL/m-p/1197443#M166264</guid>
      <dc:creator>abdulredwan</dc:creator>
      <dc:date>2020-12-10T14:06:24Z</dc:date>
    </item>
  </channel>
</rss>

