Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-19 Thread Sergei Shtylyov
On 03/16/2016 09:22 PM, Sergei Shtylyov wrote: Also, I am not finding any existing data structure to pass the musb set_mode function to the phy in either usb_phy or usb_otg. Setting the mode (host/peripheral/otg) is done in the same PHY register, so it seems like it should be implemented in the

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-19 Thread Sergei Shtylyov
On 03/16/2016 09:14 PM, David Lechner wrote: Also, I am not finding any existing data structure to pass the musb set_mode function to the phy in either usb_phy or usb_otg. Setting the mode (host/peripheral/otg) is done in the same PHY register, so it seems like it should be implemented in the ne

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-19 Thread Sergei Shtylyov
Hello. On 3/16/2016 6:46 AM, David Lechner wrote: No, this register is shared b/w MUSB and OHCI. The proper thing to do is to write the PHY driver and let it control this shared register. OK. I've started working on this. I am looking at using struct usb_phy, however, enum usb_phy_type o

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-19 Thread David Lechner
On 03/16/2016 01:22 PM, Sergei Shtylyov wrote: The set_mode() method doesn't have anything to do with the predefined roles. What CFGCHIP2 setting do is to override the ID input (and also the VBUS level comparator). This is not required for the normal functioning of either host or peripheral

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-19 Thread Sergei Shtylyov
On 03/16/2016 07:57 AM, David Lechner wrote: No, this register is shared b/w MUSB and OHCI. The proper thing to do is to write the PHY driver and let it control this shared register. OK. I've started working on this. I am looking at using struct usb_phy, however, enum usb_phy_type only has

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-18 Thread David Lechner
On 03/16/2016 12:38 PM, Sergei Shtylyov wrote: On 03/16/2016 07:57 AM, David Lechner wrote: Also, I am not finding any existing data structure to pass the musb set_mode function to the phy in either usb_phy or usb_otg. Setting the mode (host/peripheral/otg) is done in the same PHY register, so

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread David Lechner
On 03/15/2016 10:46 PM, David Lechner wrote: On 03/15/2016 05:45 PM, Sergei Shtylyov wrote: No, this register is shared b/w MUSB and OHCI. The proper thing to do is to write the PHY driver and let it control this shared register. OK. I've started working on this. I am looking at using st

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread David Lechner
On 03/15/2016 05:45 PM, Sergei Shtylyov wrote: No, this register is shared b/w MUSB and OHCI. The proper thing to do is to write the PHY driver and let it control this shared register. OK. I've started working on this. I am looking at using struct usb_phy, however, enum usb_phy_type only

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread Sergei Shtylyov
Hello. On 03/16/2016 01:37 AM, David Lechner wrote: The usb ohci driver has been change to not include mach/*, so we need to pass the cfgchip2 address to the driver so that it can turn the usb phy on and off. Signed-off-by: David Lechner --- arch/arm/mach-davinci/usb.c | 5 + 1 file ch

[PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread David Lechner
The usb ohci driver has been change to not include mach/*, so we need to pass the cfgchip2 address to the driver so that it can turn the usb phy on and off. Signed-off-by: David Lechner --- arch/arm/mach-davinci/usb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-davinci