Devicetree
 help / color / mirror / Atom feed
* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
       [not found]         ` <CAFp+6iHvKYiF_neANRq5roAEJwhvcaLk7pAd7Dy94Z5XiDkhgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-01-31 15:38           ` Felipe Balbi
  2013-02-01  5:21             ` kishon
       [not found]             ` <20130131153836.GF4064-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Felipe Balbi @ 2013-01-31 15:38 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, kishon,
	Vivek Gautam, linux-omap-u79uwXL29TY76Z2rM5mHXA, Rob Herring


[-- Attachment #1.1: Type: text/plain, Size: 1613 bytes --]

On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
> Hi Felipe,
> 
> 
> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
> > Hi,
> >
> > On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
> >> >> Moreover, SoCs having multiple dwc3 controllers will have multiple
> >> >> PHYs, which eventually be added using usb_add_phy_dev(), and not
> >> >> using usb_add_phy(). So each dwc3 controller won't be able to
> >> >> get PHYs by simply calling devm_usb_get_phy() also.
> >> >
> >> > No. We have added usb_get_phy_dev() for that purpose in the case of non-dt.
> >> > I think, instead you can have a patch to use devm_usb_get_phy_dev() here and
> >> > in exynos platform specific code use usb_bind_phy() to bind the phy and
> >> > controller till you change it to dt.
> >> >
> >>
> >> We have dt support for dwc3-exynos, in such case we should go ahead with
> >> of_platform_populate(), right ?
> >> But if when i use of_platform_populate() i will not be able to set
> >> dma_mask to dwc3->dev. :-(
> >
> > do you have a special need for dma_mask because OF already sets it.
> >
> If i am not wrong of_platform_device_create_pdata() will set
> "dev->dev.coherent_dma_mask = DMA_BIT_MASK(32)"
> and not dma_mask.
> I fact we had some discussion sometime back when we needed the same
> for dwc3-exynos in the thread:
> [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
> 
> But couldn't get final node on it.
> So suggestions here please. :-)

hmm.. you're right there. Grant, Rob ? Any hints ?

-- 
balbi

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
  2013-01-31 15:38           ` [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node Felipe Balbi
@ 2013-02-01  5:21             ` kishon
       [not found]               ` <510B50DA.6010201-l0cyMroinI0@public.gmane.org>
       [not found]             ` <20130131153836.GF4064-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: kishon @ 2013-02-01  5:21 UTC (permalink / raw)
  To: balbi
  Cc: Vivek Gautam, Vivek Gautam, linux-usb, linux-kernel, linux-omap,
	linux-samsung-soc, gregkh, Grant Likely, Rob Herring,
	devicetree-discuss

Hi,

On Thursday 31 January 2013 09:08 PM, Felipe Balbi wrote:
> On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
>> Hi Felipe,
>>
>>
>> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi@ti.com> wrote:
>>> Hi,
>>>
>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
>>>>>
>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of non-dt.
>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev() here and
>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy and
>>>>> controller till you change it to dt.
>>>>>
>>>>
>>>> We have dt support for dwc3-exynos, in such case we should go ahead with
>>>> of_platform_populate(), right ?
>>>> But if when i use of_platform_populate() i will not be able to set
>>>> dma_mask to dwc3->dev. :-(

You can do something like this

static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);

static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
{
	dev->dma_mask = &dwc3_exynos_dma_mask;

	return 0;
}

And in your probe after of_platform_populate, you can add

device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);

Here pdev is the platform device of dwc3-exynos. By this way all the 
children of dwc3-exynos will have dma_mask set to the required value.

I'm not sure if there is any other better way to achieve the same 
(without patching of.c ;-))

Thanks
Kishon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
       [not found]               ` <510B50DA.6010201-l0cyMroinI0@public.gmane.org>
@ 2013-02-01  6:22                 ` Vivek Gautam
  2013-02-01  6:24                   ` Vivek Gautam
  0 siblings, 1 reply; 10+ messages in thread
From: Vivek Gautam @ 2013-02-01  6:22 UTC (permalink / raw)
  To: kishon
  Cc: balbi-l0cyMroinI0, Vivek Gautam, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, Grant Likely,
	Rob Herring, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Hi Kishon,


On Fri, Feb 1, 2013 at 10:51 AM, kishon <kishon-l0cyMroinI0@public.gmane.org> wrote:
> Hi,
>
>
> On Thursday 31 January 2013 09:08 PM, Felipe Balbi wrote:
>>
>> On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
>>>
>>> Hi Felipe,
>>>
>>>
>>> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
>>>>
>>>> Hi,
>>>>
>>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
>>>>>>>
>>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
>>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
>>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
>>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
>>>>>>
>>>>>>
>>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of
>>>>>> non-dt.
>>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev()
>>>>>> here and
>>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy
>>>>>> and
>>>>>> controller till you change it to dt.
>>>>>>
>>>>>
>>>>> We have dt support for dwc3-exynos, in such case we should go ahead
>>>>> with
>>>>> of_platform_populate(), right ?
>>>>> But if when i use of_platform_populate() i will not be able to set
>>>>> dma_mask to dwc3->dev. :-(
>
>
> You can do something like this
>
> static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
>
> static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
> {
>         dev->dma_mask = &dwc3_exynos_dma_mask;
>
>         return 0;
> }
>
> And in your probe after of_platform_populate, you can add
>
> device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);
>
> Here pdev is the platform device of dwc3-exynos. By this way all the
> children of dwc3-exynos will have dma_mask set to the required value.
>

Nice idea, thanks :-)
hmm.. so i can patch this now, and get things working ;-)

> I'm not sure if there is any other better way to achieve the same (without
> patching of.c ;-))
>


-- 
Thanks & Regards
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
  2013-02-01  6:22                 ` Vivek Gautam
@ 2013-02-01  6:24                   ` Vivek Gautam
  2013-02-01  8:50                     ` Felipe Balbi
  0 siblings, 1 reply; 10+ messages in thread
From: Vivek Gautam @ 2013-02-01  6:24 UTC (permalink / raw)
  To: balbi
  Cc: kishon, Vivek Gautam, linux-usb, linux-kernel, linux-omap,
	linux-samsung-soc, gregkh, Grant Likely, Rob Herring,
	devicetree-discuss

Hi Balbi,


On Fri, Feb 1, 2013 at 11:52 AM, Vivek Gautam <gautamvivek1987@gmail.com> wrote:
> Hi Kishon,
>
>
> On Fri, Feb 1, 2013 at 10:51 AM, kishon <kishon@ti.com> wrote:
>> Hi,
>>
>>
>> On Thursday 31 January 2013 09:08 PM, Felipe Balbi wrote:
>>>
>>> On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
>>>>
>>>> Hi Felipe,
>>>>
>>>>
>>>> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi@ti.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
>>>>>>>>
>>>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
>>>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
>>>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
>>>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
>>>>>>>
>>>>>>>
>>>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of
>>>>>>> non-dt.
>>>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev()
>>>>>>> here and
>>>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy
>>>>>>> and
>>>>>>> controller till you change it to dt.
>>>>>>>
>>>>>>
>>>>>> We have dt support for dwc3-exynos, in such case we should go ahead
>>>>>> with
>>>>>> of_platform_populate(), right ?
>>>>>> But if when i use of_platform_populate() i will not be able to set
>>>>>> dma_mask to dwc3->dev. :-(
>>
>>
>> You can do something like this
>>
>> static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
>>
>> static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
>> {
>>         dev->dma_mask = &dwc3_exynos_dma_mask;
>>
>>         return 0;
>> }
>>
>> And in your probe after of_platform_populate, you can add
>>
>> device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);
>>
>> Here pdev is the platform device of dwc3-exynos. By this way all the
>> children of dwc3-exynos will have dma_mask set to the required value.
>>
>
> Nice idea, thanks :-)
> hmm.. so i can patch this now, and get things working ;-)
>

If this is fine with you shall i go ahead and post a patch for the same ? ;-)


>> I'm not sure if there is any other better way to achieve the same (without
>> patching of.c ;-))
>>
>



-- 
Thanks & Regards
Vivek

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
  2013-02-01  6:24                   ` Vivek Gautam
@ 2013-02-01  8:50                     ` Felipe Balbi
       [not found]                       ` <20130201085053.GG8060-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2013-02-01  8:50 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: balbi, kishon, Vivek Gautam, linux-usb, linux-kernel, linux-omap,
	linux-samsung-soc, gregkh, Grant Likely, Rob Herring,
	devicetree-discuss

[-- Attachment #1: Type: text/plain, Size: 2507 bytes --]

On Fri, Feb 01, 2013 at 11:54:01AM +0530, Vivek Gautam wrote:
> Hi Balbi,
> 
> 
> On Fri, Feb 1, 2013 at 11:52 AM, Vivek Gautam <gautamvivek1987@gmail.com> wrote:
> > Hi Kishon,
> >
> >
> > On Fri, Feb 1, 2013 at 10:51 AM, kishon <kishon@ti.com> wrote:
> >> Hi,
> >>
> >>
> >> On Thursday 31 January 2013 09:08 PM, Felipe Balbi wrote:
> >>>
> >>> On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
> >>>>
> >>>> Hi Felipe,
> >>>>
> >>>>
> >>>> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi@ti.com> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
> >>>>>>>>
> >>>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
> >>>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
> >>>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
> >>>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
> >>>>>>>
> >>>>>>>
> >>>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of
> >>>>>>> non-dt.
> >>>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev()
> >>>>>>> here and
> >>>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy
> >>>>>>> and
> >>>>>>> controller till you change it to dt.
> >>>>>>>
> >>>>>>
> >>>>>> We have dt support for dwc3-exynos, in such case we should go ahead
> >>>>>> with
> >>>>>> of_platform_populate(), right ?
> >>>>>> But if when i use of_platform_populate() i will not be able to set
> >>>>>> dma_mask to dwc3->dev. :-(
> >>
> >>
> >> You can do something like this
> >>
> >> static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
> >>
> >> static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
> >> {
> >>         dev->dma_mask = &dwc3_exynos_dma_mask;
> >>
> >>         return 0;
> >> }
> >>
> >> And in your probe after of_platform_populate, you can add
> >>
> >> device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);
> >>
> >> Here pdev is the platform device of dwc3-exynos. By this way all the
> >> children of dwc3-exynos will have dma_mask set to the required value.
> >>
> >
> > Nice idea, thanks :-)
> > hmm.. so i can patch this now, and get things working ;-)
> >
> 
> If this is fine with you shall i go ahead and post a patch for the same ? ;-)

should be fine, but we can wait a bit to see if DeviceTree folks reply,
your patch will only go on v3.10 anyway.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
       [not found]                       ` <20130201085053.GG8060-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
@ 2013-02-01  8:53                         ` Vivek Gautam
  2013-02-01  9:43                           ` Felipe Balbi
  0 siblings, 1 reply; 10+ messages in thread
From: Vivek Gautam @ 2013-02-01  8:53 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, kishon,
	Vivek Gautam, linux-omap-u79uwXL29TY76Z2rM5mHXA

On Fri, Feb 1, 2013 at 2:20 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
> On Fri, Feb 01, 2013 at 11:54:01AM +0530, Vivek Gautam wrote:
>> Hi Balbi,
>>
>>
>> On Fri, Feb 1, 2013 at 11:52 AM, Vivek Gautam <gautamvivek1987-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > Hi Kishon,
>> >
>> >
>> > On Fri, Feb 1, 2013 at 10:51 AM, kishon <kishon-l0cyMroinI0@public.gmane.org> wrote:
>> >> Hi,
>> >>
>> >>
>> >> On Thursday 31 January 2013 09:08 PM, Felipe Balbi wrote:
>> >>>
>> >>> On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
>> >>>>
>> >>>> Hi Felipe,
>> >>>>
>> >>>>
>> >>>> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
>> >>>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
>> >>>>>>>>
>> >>>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
>> >>>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
>> >>>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
>> >>>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of
>> >>>>>>> non-dt.
>> >>>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev()
>> >>>>>>> here and
>> >>>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy
>> >>>>>>> and
>> >>>>>>> controller till you change it to dt.
>> >>>>>>>
>> >>>>>>
>> >>>>>> We have dt support for dwc3-exynos, in such case we should go ahead
>> >>>>>> with
>> >>>>>> of_platform_populate(), right ?
>> >>>>>> But if when i use of_platform_populate() i will not be able to set
>> >>>>>> dma_mask to dwc3->dev. :-(
>> >>
>> >>
>> >> You can do something like this
>> >>
>> >> static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
>> >>
>> >> static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
>> >> {
>> >>         dev->dma_mask = &dwc3_exynos_dma_mask;
>> >>
>> >>         return 0;
>> >> }
>> >>
>> >> And in your probe after of_platform_populate, you can add
>> >>
>> >> device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);
>> >>
>> >> Here pdev is the platform device of dwc3-exynos. By this way all the
>> >> children of dwc3-exynos will have dma_mask set to the required value.
>> >>
>> >
>> > Nice idea, thanks :-)
>> > hmm.. so i can patch this now, and get things working ;-)
>> >
>>
>> If this is fine with you shall i go ahead and post a patch for the same ? ;-)
>
> should be fine, but we can wait a bit to see if DeviceTree folks reply,
> your patch will only go on v3.10 anyway.
>

Yeah, sure. No problem at all.
For the time being i will continue to use this change for my other
development work too. :-)


-- 
Thanks & Regards
Vivek

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
  2013-02-01  8:53                         ` Vivek Gautam
@ 2013-02-01  9:43                           ` Felipe Balbi
  0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2013-02-01  9:43 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: balbi, kishon, Vivek Gautam, linux-usb, linux-kernel, linux-omap,
	linux-samsung-soc, gregkh, Grant Likely, Rob Herring,
	devicetree-discuss

[-- Attachment #1: Type: text/plain, Size: 2314 bytes --]

Hi,

On Fri, Feb 01, 2013 at 02:23:28PM +0530, Vivek Gautam wrote:
> >> >>>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
> >> >>>>>>>>
> >> >>>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
> >> >>>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
> >> >>>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
> >> >>>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of
> >> >>>>>>> non-dt.
> >> >>>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev()
> >> >>>>>>> here and
> >> >>>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy
> >> >>>>>>> and
> >> >>>>>>> controller till you change it to dt.
> >> >>>>>>>
> >> >>>>>>
> >> >>>>>> We have dt support for dwc3-exynos, in such case we should go ahead
> >> >>>>>> with
> >> >>>>>> of_platform_populate(), right ?
> >> >>>>>> But if when i use of_platform_populate() i will not be able to set
> >> >>>>>> dma_mask to dwc3->dev. :-(
> >> >>
> >> >>
> >> >> You can do something like this
> >> >>
> >> >> static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
> >> >>
> >> >> static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
> >> >> {
> >> >>         dev->dma_mask = &dwc3_exynos_dma_mask;
> >> >>
> >> >>         return 0;
> >> >> }
> >> >>
> >> >> And in your probe after of_platform_populate, you can add
> >> >>
> >> >> device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);
> >> >>
> >> >> Here pdev is the platform device of dwc3-exynos. By this way all the
> >> >> children of dwc3-exynos will have dma_mask set to the required value.
> >> >>
> >> >
> >> > Nice idea, thanks :-)
> >> > hmm.. so i can patch this now, and get things working ;-)
> >> >
> >>
> >> If this is fine with you shall i go ahead and post a patch for the same ? ;-)
> >
> > should be fine, but we can wait a bit to see if DeviceTree folks reply,
> > your patch will only go on v3.10 anyway.
> >
> 
> Yeah, sure. No problem at all.
> For the time being i will continue to use this change for my other
> development work too. :-)

Sure, makes sense ;-)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
       [not found]             ` <20130131153836.GF4064-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
@ 2013-02-28 14:39               ` Vivek Gautam
  2013-03-01  6:41                 ` Felipe Balbi
  0 siblings, 1 reply; 10+ messages in thread
From: Vivek Gautam @ 2013-02-28 14:39 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, kishon,
	Vivek Gautam, linux-omap-u79uwXL29TY76Z2rM5mHXA

Hi,

On Thu, Jan 31, 2013 at 9:08 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
> On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
>> Hi Felipe,
>>
>>
>> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
>> > Hi,
>> >
>> > On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
>> >> >> Moreover, SoCs having multiple dwc3 controllers will have multiple
>> >> >> PHYs, which eventually be added using usb_add_phy_dev(), and not
>> >> >> using usb_add_phy(). So each dwc3 controller won't be able to
>> >> >> get PHYs by simply calling devm_usb_get_phy() also.
>> >> >
>> >> > No. We have added usb_get_phy_dev() for that purpose in the case of non-dt.
>> >> > I think, instead you can have a patch to use devm_usb_get_phy_dev() here and
>> >> > in exynos platform specific code use usb_bind_phy() to bind the phy and
>> >> > controller till you change it to dt.
>> >> >
>> >>
>> >> We have dt support for dwc3-exynos, in such case we should go ahead with
>> >> of_platform_populate(), right ?
>> >> But if when i use of_platform_populate() i will not be able to set
>> >> dma_mask to dwc3->dev. :-(
>> >
>> > do you have a special need for dma_mask because OF already sets it.
>> >
>> If i am not wrong of_platform_device_create_pdata() will set
>> "dev->dev.coherent_dma_mask = DMA_BIT_MASK(32)"
>> and not dma_mask.
>> I fact we had some discussion sometime back when we needed the same
>> for dwc3-exynos in the thread:
>> [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
>>
>> But couldn't get final node on it.
>> So suggestions here please. :-)
>
> hmm.. you're right there. Grant, Rob ? Any hints ?
>

Any suggestions on this ?

> --
> balbi



-- 
Thanks & Regards
Vivek

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
  2013-02-28 14:39               ` Vivek Gautam
@ 2013-03-01  6:41                 ` Felipe Balbi
  2013-03-04 15:02                   ` Felipe Balbi
  0 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2013-03-01  6:41 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: Grant Likely, Rob Herring, Felipe Balbi, kishon, Vivek Gautam,
	linux-usb, linux-kernel, linux-omap, linux-samsung-soc, gregkh,
	devicetree-discuss, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]

Hi,

On Thu, Feb 28, 2013 at 08:09:33PM +0530, Vivek Gautam wrote:
> On Thu, Jan 31, 2013 at 9:08 PM, Felipe Balbi <balbi@ti.com> wrote:
> > On Thu, Jan 31, 2013 at 09:00:37PM +0530, Vivek Gautam wrote:
> >> Hi Felipe,
> >>
> >>
> >> On Thu, Jan 31, 2013 at 8:55 PM, Felipe Balbi <balbi@ti.com> wrote:
> >> > Hi,
> >> >
> >> > On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
> >> >> >> Moreover, SoCs having multiple dwc3 controllers will have multiple
> >> >> >> PHYs, which eventually be added using usb_add_phy_dev(), and not
> >> >> >> using usb_add_phy(). So each dwc3 controller won't be able to
> >> >> >> get PHYs by simply calling devm_usb_get_phy() also.
> >> >> >
> >> >> > No. We have added usb_get_phy_dev() for that purpose in the case of non-dt.
> >> >> > I think, instead you can have a patch to use devm_usb_get_phy_dev() here and
> >> >> > in exynos platform specific code use usb_bind_phy() to bind the phy and
> >> >> > controller till you change it to dt.
> >> >> >
> >> >>
> >> >> We have dt support for dwc3-exynos, in such case we should go ahead with
> >> >> of_platform_populate(), right ?
> >> >> But if when i use of_platform_populate() i will not be able to set
> >> >> dma_mask to dwc3->dev. :-(
> >> >
> >> > do you have a special need for dma_mask because OF already sets it.
> >> >
> >> If i am not wrong of_platform_device_create_pdata() will set
> >> "dev->dev.coherent_dma_mask = DMA_BIT_MASK(32)"
> >> and not dma_mask.
> >> I fact we had some discussion sometime back when we needed the same
> >> for dwc3-exynos in the thread:
> >> [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
> >>
> >> But couldn't get final node on it.
> >> So suggestions here please. :-)
> >
> > hmm.. you're right there. Grant, Rob ? Any hints ?
> >
> 
> Any suggestions on this ?

anyone ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node.
  2013-03-01  6:41                 ` Felipe Balbi
@ 2013-03-04 15:02                   ` Felipe Balbi
  0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2013-03-04 15:02 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Vivek Gautam, Grant Likely, Rob Herring, kishon, Vivek Gautam,
	linux-usb, linux-kernel, linux-omap, linux-samsung-soc, gregkh,
	devicetree-discuss, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

Hi,

On Fri, Mar 01, 2013 at 08:41:29AM +0200, Felipe Balbi wrote:
> > >> >> >> Moreover, SoCs having multiple dwc3 controllers will have multiple
> > >> >> >> PHYs, which eventually be added using usb_add_phy_dev(), and not
> > >> >> >> using usb_add_phy(). So each dwc3 controller won't be able to
> > >> >> >> get PHYs by simply calling devm_usb_get_phy() also.
> > >> >> >
> > >> >> > No. We have added usb_get_phy_dev() for that purpose in the case of non-dt.
> > >> >> > I think, instead you can have a patch to use devm_usb_get_phy_dev() here and
> > >> >> > in exynos platform specific code use usb_bind_phy() to bind the phy and
> > >> >> > controller till you change it to dt.
> > >> >> >
> > >> >>
> > >> >> We have dt support for dwc3-exynos, in such case we should go ahead with
> > >> >> of_platform_populate(), right ?
> > >> >> But if when i use of_platform_populate() i will not be able to set
> > >> >> dma_mask to dwc3->dev. :-(
> > >> >
> > >> > do you have a special need for dma_mask because OF already sets it.
> > >> >
> > >> If i am not wrong of_platform_device_create_pdata() will set
> > >> "dev->dev.coherent_dma_mask = DMA_BIT_MASK(32)"
> > >> and not dma_mask.
> > >> I fact we had some discussion sometime back when we needed the same
> > >> for dwc3-exynos in the thread:
> > >> [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
> > >>
> > >> But couldn't get final node on it.
> > >> So suggestions here please. :-)
> > >
> > > hmm.. you're right there. Grant, Rob ? Any hints ?
> > >
> > 
> > Any suggestions on this ?
> 
> anyone ?

ping ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-03-04 15:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1359631232-7107-1-git-send-email-gautam.vivek@samsung.com>
     [not found] ` <510A56BF.3040804@ti.com>
     [not found]   ` <CAFp+6iFkb=U0CJA=3zmQvd5XfMwbROuRJjXoJG7zvvq4_upzNw@mail.gmail.com>
     [not found]     ` <20130131152527.GE4064@arwen.pp.htv.fi>
     [not found]       ` <CAFp+6iHvKYiF_neANRq5roAEJwhvcaLk7pAd7Dy94Z5XiDkhgA@mail.gmail.com>
     [not found]         ` <CAFp+6iHvKYiF_neANRq5roAEJwhvcaLk7pAd7Dy94Z5XiDkhgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31 15:38           ` [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt node Felipe Balbi
2013-02-01  5:21             ` kishon
     [not found]               ` <510B50DA.6010201-l0cyMroinI0@public.gmane.org>
2013-02-01  6:22                 ` Vivek Gautam
2013-02-01  6:24                   ` Vivek Gautam
2013-02-01  8:50                     ` Felipe Balbi
     [not found]                       ` <20130201085053.GG8060-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-02-01  8:53                         ` Vivek Gautam
2013-02-01  9:43                           ` Felipe Balbi
     [not found]             ` <20130131153836.GF4064-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-02-28 14:39               ` Vivek Gautam
2013-03-01  6:41                 ` Felipe Balbi
2013-03-04 15:02                   ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox