On Fri, Apr 11, 2014 at 12:16:17PM +0000, Ebright, Dave wrote:
> Peter,
>
> Thanks for your response. I understand that currently for the i.MX51 in the
> ChipIdea drivers that the DEN value is 8 which results in defining endpoints
> ep[0-7]in and ep[0-7]out. I am looking to develop a piece of automated test
> equipment and drivers that emulates an existing device which has the
> following endpoints:
>
> ep0in - control
> ep0out - control
> ep3out - bulk
> ep3in - bulk
> ep4in - interrupt
> ep1out - bulk
> ep1in - bulk
> ep5out - bulk
> ep5in - bulk
> ep6in - interrupt
> ep9out - bulk
> ep9in - bulk
> ep10in - interrupt
>
> Thus the number of endpoints is not a problem, but I'm thinking that having
> ep9out, ep9in, and ep10in would not work (they are not defined). For
> instance if I want to write a user space gadget driver on top of gadgetfs,
> these endpoints will not even be present for use. Only endpoints ep[0-7]in
> and ep[0-7]out are accessible via gadgetfs.
>
> So are you saying that I could open up ep2in and ep2out which are not used to
> act as ep9in and ep9out for instance where ep2 is the physical endpoint, but
> I initialize it like ep9? Will that work? Can you explain this further? Do
> you mean at init I could set up the endpoint address to be 9, but use
> physical endpoint 2 and that should work?
>
Then, do special handling at your application:
sprintf(name, "/dev/gadget/ep%din", index);
if (index == 9) {
desc_source.bEndpointAddress = USB_DIR_IN | 2;
desc_sink.bEndpointAddress = USB_DIR_OUT | 2;
}
Peter
> Thanks,
>
> Dave
>
> -----Original Message-----
> From: Peter Chen [mailto:[email protected]]
> Sent: Thursday, April 10, 2014 9:43 PM
> To: Ebright, Dave
> Cc: [email protected]
> Subject: Re: i.MX51 ChipIdea USB device endpoints questions
>
> On Thu, Apr 10, 2014 at 07:08:22PM +0000, Ebright, Dave wrote:
> > Hi Peter,
> >
> >
> >
> > I’m not sure what mailing list to post this to, but maybe you know…
>
> Linux usb mail list is the best place to ask linux usb questions.
> >
> >
> >
> > I am looking at the i.MX51 USB device functionality for a project I am
> > working on and in the DCCPARAMS register (read only) there is the DEN
> > field which defines the number of endpoints built into the device
> > controller. For the i.MX51 when the register is read the DEN is set to
> > 8. Valid values for this field are 0-16. My first question is do you
> > know of any way of increasing this value? I don’t believe it can be
> > based
> > on the following from the i.MX51 reference manual:
> >
> >
> >
> > “The ARC USB-HS OTG High-Speed USB On-The-Go device controller hardware
> > supports up to the USB
> >
> > 2.0 maximum of 32 endpoint specified numbers. Each additional endpoint
> > beyond the required endpoint
> >
> > position adds additional hardware logic. The maximum number of endpoint
> > numbers available to the DCD
> >
> > is configured at hardware synthesis timer. After synthesis, the DCD can
> > enable, disable and configure
> >
> > endpoint type up to the maximum selected during synthesis.”
> >
> >
> >
> > Does synthesis mean when the processor chip is created or does it mean
> > when the chip first starts up HW senses what the value should be?
>
> When the IC guys begin to integrate usb ip, the endpoint number can be
> changed, but once the chip has finished, this number can't be changed.
>
> >
> >
> >
> > Any idea if it would work to just over-ride the ci->hw_ep_map value set
> > in
> > hw_device_init()? Not sure what the synthesis does? The ChipIdea
> > register set is still the same, but I assume the functionality is somehow
> > limited in the core?
>
> Yes, this value is fixed for certain chipidea IP usb controller.
>
> >
> >
> >
> > If the number of endpoints cannot be increased, would it be possible to
> > map an unused endpoint number to a higher endpoint number. For example
> > let’s say I want my device to use endpoint 9, but endpoint 9 is not
> > defined due to the DEN value of 8. Endpoint 7 exists and is not being
> > used. Would it be possible to customize the chipidea drivers to map
> > endpoint 9 to use endpoint 7 for a custom application or does the USB OTG
> > chipidea core perform HW controlled endpoint addressing (HW looks at
> > endpoint and sends data to the appropriate endpoint queue independent of
> > the driver)?
> >
> >
>
> If endpoint number is 8, for chipidea udc driver, the ci_hw_ep[0..7] is the
> physical RX endpoint 0-7, , the name is "ep[0..7]out", the ci_hw_ep[8..15] is
> the physical TX endpoint 0-7, the name is "ep[0..7]in".
>
> What's the reason you want to customize endpoint number? Currently, it will
> allocate the smallest un-used endpoint number for application.
>
> --
>
> Best Regards,
> Peter Chen
>
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html