devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: BCM5301X: Specify PHY of USB 2.0 in DT
@ 2016-06-01 19:16 Rafał Miłecki
       [not found] ` <1464808585-14996-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-06-01 20:07 ` [PATCH V2] " Rafał Miłecki
  0 siblings, 2 replies; 6+ messages in thread
From: Rafał Miłecki @ 2016-06-01 19:16 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Russell King,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by:
commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on
Northstar").
It should be used to let EHCI platform driver init PHY.

Signed-off-by: Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 7d4d29b..9300e19 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -140,6 +140,22 @@
 		};
 	};
 
+	phys {
+		compatible = "simple-bus";
+		ranges = <0x00000000 0x18000000 0x00100000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		usb2_phy2: usb2-phy {
+			compatible = "brcm,ns-usb2-phy";
+			reg = <0x0000c000 0x1000>;
+			reg-names = "dmu";
+			#phy-cells = <0>;
+			clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
+			clock-names = "phy-ref-clk";
+		};
+	};
+
 	axi@18000000 {
 		compatible = "brcm,bus-axi";
 		reg = <0x18000000 0x1000>;
@@ -217,6 +233,8 @@
 
 			#address-cells = <1>;
 			#size-cells = <1>;
+
+			phys = <&usb2_phy2>;
 		};
 
 		usb3: usb3@23000 {
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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 related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: BCM5301X: Specify PHY of USB 2.0 in DT
       [not found] ` <1464808585-14996-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-06-01 19:21   ` Florian Fainelli
       [not found]     ` <574F35C3.6050004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Hauke Mehrtens, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Jon Mason

On 06/01/2016 12:16 PM, Rafał Miłecki wrote:
> Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by:
> commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on
> Northstar").
> It should be used to let EHCI platform driver init PHY.
> 
> Signed-off-by: Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  arch/arm/boot/dts/bcm5301x.dtsi | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
> index 7d4d29b..9300e19 100644
> --- a/arch/arm/boot/dts/bcm5301x.dtsi
> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
> @@ -140,6 +140,22 @@
>  		};
>  	};
>  
> +	phys {
> +		compatible = "simple-bus";
> +		ranges = <0x00000000 0x18000000 0x00100000>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +
> +		usb2_phy2: usb2-phy {
> +			compatible = "brcm,ns-usb2-phy";
> +			reg = <0x0000c000 0x1000>;
> +			reg-names = "dmu";
> +			#phy-cells = <0>;
> +			clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
> +			clock-names = "phy-ref-clk";
> +		};

You guys need to get everything straigthen up when it comes to busing
and child nodes for bcm53101x.dtsi, why do we need a "simple-bus" node
here which overlaps in part with the brcm-bus-axi node's range?

The more I look at BCMA and how it gets used for a non-external WLAN
card, and the less I am convinced it brings anything useful to the game,
quite the contrary...

> +	};
> +
>  	axi@18000000 {
>  		compatible = "brcm,bus-axi";
>  		reg = <0x18000000 0x1000>;
> @@ -217,6 +233,8 @@
>  
>  			#address-cells = <1>;
>  			#size-cells = <1>;
> +
> +			phys = <&usb2_phy2>;
>  		};
>  
>  		usb3: usb3@23000 {
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 6+ messages in thread

* Re: [PATCH] ARM: BCM5301X: Specify PHY of USB 2.0 in DT
       [not found]     ` <574F35C3.6050004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-06-01 19:35       ` Rafał Miłecki
       [not found]         ` <CACna6ryjSYcxKcCaTtkdkExo0G1qiDMQCUCAgx-bMtnjziAoUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2016-06-01 19:35 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Hauke Mehrtens, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Jon Mason

On 1 June 2016 at 21:21, Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 06/01/2016 12:16 PM, Rafał Miłecki wrote:
>> Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by:
>> commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on
>> Northstar").
>> It should be used to let EHCI platform driver init PHY.
>>
>> Signed-off-by: Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  arch/arm/boot/dts/bcm5301x.dtsi | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
>> index 7d4d29b..9300e19 100644
>> --- a/arch/arm/boot/dts/bcm5301x.dtsi
>> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
>> @@ -140,6 +140,22 @@
>>               };
>>       };
>>
>> +     phys {
>> +             compatible = "simple-bus";
>> +             ranges = <0x00000000 0x18000000 0x00100000>;
>> +             #address-cells = <1>;
>> +             #size-cells = <1>;
>> +
>> +             usb2_phy2: usb2-phy {
>> +                     compatible = "brcm,ns-usb2-phy";
>> +                     reg = <0x0000c000 0x1000>;
>> +                     reg-names = "dmu";
>> +                     #phy-cells = <0>;
>> +                     clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
>> +                     clock-names = "phy-ref-clk";
>> +             };
>
> You guys need to get everything straigthen up when it comes to busing
> and child nodes for bcm53101x.dtsi, why do we need a "simple-bus" node
> here which overlaps in part with the brcm-bus-axi node's range?

I believed I'm making things cleaner by adding a separated node for
PHYs (in the future there will be also USB 3.0 PHY and probably a PCIe
PHY). I'm fine with placing this PHY node somewhere else if you think
it better fits there.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 6+ messages in thread

* Re: [PATCH] ARM: BCM5301X: Specify PHY of USB 2.0 in DT
       [not found]         ` <CACna6ryjSYcxKcCaTtkdkExo0G1qiDMQCUCAgx-bMtnjziAoUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-06-01 19:50           ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-06-01 19:50 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Hauke Mehrtens, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Jon Mason

On 06/01/2016 12:35 PM, Rafał Miłecki wrote:
> On 1 June 2016 at 21:21, Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On 06/01/2016 12:16 PM, Rafał Miłecki wrote:
>>> Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by:
>>> commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on
>>> Northstar").
>>> It should be used to let EHCI platform driver init PHY.
>>>
>>> Signed-off-by: Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> ---
>>>  arch/arm/boot/dts/bcm5301x.dtsi | 18 ++++++++++++++++++
>>>  1 file changed, 18 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
>>> index 7d4d29b..9300e19 100644
>>> --- a/arch/arm/boot/dts/bcm5301x.dtsi
>>> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
>>> @@ -140,6 +140,22 @@
>>>               };
>>>       };
>>>
>>> +     phys {
>>> +             compatible = "simple-bus";
>>> +             ranges = <0x00000000 0x18000000 0x00100000>;
>>> +             #address-cells = <1>;
>>> +             #size-cells = <1>;
>>> +
>>> +             usb2_phy2: usb2-phy {
>>> +                     compatible = "brcm,ns-usb2-phy";
>>> +                     reg = <0x0000c000 0x1000>;
>>> +                     reg-names = "dmu";
>>> +                     #phy-cells = <0>;
>>> +                     clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
>>> +                     clock-names = "phy-ref-clk";
>>> +             };
>>
>> You guys need to get everything straigthen up when it comes to busing
>> and child nodes for bcm53101x.dtsi, why do we need a "simple-bus" node
>> here which overlaps in part with the brcm-bus-axi node's range?
> 
> I believed I'm making things cleaner by adding a separated node for
> PHYs (in the future there will be also USB 3.0 PHY and probably a PCIe
> PHY). I'm fine with placing this PHY node somewhere else if you think
> it better fits there.

The intent looks good, but it seems to me (and the datasheet helps here
too) that extending the brcm,bus-axi node to cover a wider register
range size could allow you to put the different PHYs as child nodes of
that bus. That way even if the core is probed with BCMA you still have a
proper of_node refefence that your driver can use.

Maybe as a better immediate solution, something like the NAND controller
node would be more elegant, where it only consumes its register space
and not more?
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 6+ messages in thread

* [PATCH V2] ARM: BCM5301X: Specify PHY of USB 2.0 in DT
  2016-06-01 19:16 [PATCH] ARM: BCM5301X: Specify PHY of USB 2.0 in DT Rafał Miłecki
       [not found] ` <1464808585-14996-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-06-01 20:07 ` Rafał Miłecki
  2016-07-22 20:01   ` Florian Fainelli
  1 sibling, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2016-06-01 20:07 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Russell King,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by:
commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on
Northstar").
It should be used to let EHCI platform driver init PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
V2: Add usb2_phy as child of root node instead of adding separated phys
    "simple-bus".
---
 arch/arm/boot/dts/bcm5301x.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 7d4d29b..142811d 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -140,6 +140,15 @@
 		};
 	};
 
+	usb2_phy: usb2-phy {
+		compatible = "brcm,ns-usb2-phy";
+		reg = <0x1800c000 0x1000>;
+		reg-names = "dmu";
+		#phy-cells = <0>;
+		clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
+		clock-names = "phy-ref-clk";
+	};
+
 	axi@18000000 {
 		compatible = "brcm,bus-axi";
 		reg = <0x18000000 0x1000>;
@@ -217,6 +226,8 @@
 
 			#address-cells = <1>;
 			#size-cells = <1>;
+
+			phys = <&usb2_phy>;
 		};
 
 		usb3: usb3@23000 {
-- 
1.8.4.5

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

* Re: [PATCH V2] ARM: BCM5301X: Specify PHY of USB 2.0 in DT
  2016-06-01 20:07 ` [PATCH V2] " Rafał Miłecki
@ 2016-07-22 20:01   ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-07-22 20:01 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Hauke Mehrtens, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:BROADCOM BCM5301X ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

On 06/01/2016 01:07 PM, Rafał Miłecki wrote:
> Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by:
> commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on
> Northstar").
> It should be used to let EHCI platform driver init PHY.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

Applied, thanks
-- 
Florian

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

end of thread, other threads:[~2016-07-22 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 19:16 [PATCH] ARM: BCM5301X: Specify PHY of USB 2.0 in DT Rafał Miłecki
     [not found] ` <1464808585-14996-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-01 19:21   ` Florian Fainelli
     [not found]     ` <574F35C3.6050004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-01 19:35       ` Rafał Miłecki
     [not found]         ` <CACna6ryjSYcxKcCaTtkdkExo0G1qiDMQCUCAgx-bMtnjziAoUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-01 19:50           ` Florian Fainelli
2016-06-01 20:07 ` [PATCH V2] " Rafał Miłecki
2016-07-22 20:01   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).