[17/17] ARM: dts: omap4: Use "syscon-otghs" instead of "ctrl-module" in USB node
diff mbox

Message ID 1435060743-5511-18-git-send-email-kishon@ti.com
State New
Headers show

Commit Message

Kishon Vijay Abraham I June 23, 2015, 11:59 a.m. UTC
Add "syscon-otghs" property and remove the deprecated "ctrl-module"
property from MUSB devicetree node.

Since "omap_control_usbotg" devicetree node is no longer used, remove
it.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Tony Lindgren June 24, 2015, 10:41 a.m. UTC | #1
* Kishon Vijay Abraham I <kishon@ti.com> [150623 05:02]:
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -852,12 +852,6 @@
>  			};
>  		};
>  
> -		omap_control_usbotg: control-phy@4a00233c {
> -			compatible = "ti,control-phy-otghs";
> -			reg = <0x4a00233c 0x4>;
> -			reg-names = "otghs_control";
> -		};
> -
>  		usb_otg_hs: usb_otg_hs@4a0ab000 {
>  			compatible = "ti,omap4-musb";
>  			reg = <0x4a0ab000 0x7ff>;
> @@ -870,7 +864,7 @@
>  			multipoint = <1>;
>  			num-eps = <16>;
>  			ram-bits = <12>;
> -			ctrl-module = <&omap_control_usbotg>;
> +			syscon-otghs = <&scm_conf 0x33c>;
>  		};
>  
>  		aes: aes@4b501000 {

We should still keep a separate entry for the phy in the dtsi
files. And the phy should be a child of the scm_conf area in the
dtsi file.

This is because the scm and usb_otg_hs are separate devices and
can be clocked separately. So the phy driver needs to be a
separate driver to avoid spaghetti code and issues with clocking.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kishon Vijay Abraham I June 24, 2015, 11:21 a.m. UTC | #2
Hi Tony,

On Wednesday 24 June 2015 04:11 PM, Tony Lindgren wrote:
> * Kishon Vijay Abraham I <kishon@ti.com> [150623 05:02]:
>> --- a/arch/arm/boot/dts/omap4.dtsi
>> +++ b/arch/arm/boot/dts/omap4.dtsi
>> @@ -852,12 +852,6 @@
>>   			};
>>   		};
>>
>> -		omap_control_usbotg: control-phy@4a00233c {
>> -			compatible = "ti,control-phy-otghs";
>> -			reg = <0x4a00233c 0x4>;
>> -			reg-names = "otghs_control";
>> -		};
>> -
>>   		usb_otg_hs: usb_otg_hs@4a0ab000 {
>>   			compatible = "ti,omap4-musb";
>>   			reg = <0x4a0ab000 0x7ff>;
>> @@ -870,7 +864,7 @@
>>   			multipoint = <1>;
>>   			num-eps = <16>;
>>   			ram-bits = <12>;
>> -			ctrl-module = <&omap_control_usbotg>;
>> +			syscon-otghs = <&scm_conf 0x33c>;
>>   		};
>>
>>   		aes: aes@4b501000 {
>
> We should still keep a separate entry for the phy in the dtsi
> files. And the phy should be a child of the scm_conf area in the
> dtsi file.
>
> This is because the scm and usb_otg_hs are separate devices and
> can be clocked separately. So the phy driver needs to be a
> separate driver to avoid spaghetti code and issues with clocking.

AFAIK SCM is clocked by L4CFG_L4_GICLK which is either free running or is 
managed automatically by the HW i.e gated when there is no access to the 
CTRL_MODULE_CORE registers.

Having a separate control-PHY driver only to do a regmap update to SCM is 
unnecessary IMHO.

Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren June 24, 2015, 11:46 a.m. UTC | #3
* Kishon Vijay Abraham I <kishon@ti.com> [150624 04:23]:
> On Wednesday 24 June 2015 04:11 PM, Tony Lindgren wrote:
> >* Kishon Vijay Abraham I <kishon@ti.com> [150623 05:02]:
> >>--- a/arch/arm/boot/dts/omap4.dtsi
> >>+++ b/arch/arm/boot/dts/omap4.dtsi
> >>@@ -852,12 +852,6 @@
> >>  			};
> >>  		};
> >>
> >>-		omap_control_usbotg: control-phy@4a00233c {
> >>-			compatible = "ti,control-phy-otghs";
> >>-			reg = <0x4a00233c 0x4>;
> >>-			reg-names = "otghs_control";
> >>-		};
> >>-
> >>  		usb_otg_hs: usb_otg_hs@4a0ab000 {
> >>  			compatible = "ti,omap4-musb";
> >>  			reg = <0x4a0ab000 0x7ff>;
> >>@@ -870,7 +864,7 @@
> >>  			multipoint = <1>;
> >>  			num-eps = <16>;
> >>  			ram-bits = <12>;
> >>-			ctrl-module = <&omap_control_usbotg>;
> >>+			syscon-otghs = <&scm_conf 0x33c>;
> >>  		};
> >>
> >>  		aes: aes@4b501000 {
> >
> >We should still keep a separate entry for the phy in the dtsi
> >files. And the phy should be a child of the scm_conf area in the
> >dtsi file.
> >
> >This is because the scm and usb_otg_hs are separate devices and
> >can be clocked separately. So the phy driver needs to be a
> >separate driver to avoid spaghetti code and issues with clocking.
> 
> AFAIK SCM is clocked by L4CFG_L4_GICLK which is either free running or is
> managed automatically by the HW i.e gated when there is no access to the
> CTRL_MODULE_CORE registers.

The point is they are separate devices on the interconnect. And we
don't want to add dependencies between separate devices. And there
is nothing stopping us from starting to idle the SCM module.
 
> Having a separate control-PHY driver only to do a regmap update to SCM is
> unnecessary IMHO.

Not true. The phy driver can be generic and used by multiple platforms.

And the phy driver should be capable of idling the phy separately
independent of the USB module. And the phy driver should be able to
tell the system things like ID pin status, VBUS status and so on.

So to summarize, we are _not_ going to start tinkering with the sycon
registers directly from random device drivers in a separate IO space.

Anything using the syscon registers must implement a driver for some
Linux generic framework such as phy, clock, or regulator framework.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roger Quadros June 24, 2015, 12:02 p.m. UTC | #4
On Wed, 24 Jun 2015 03:41:16 -0700
Tony Lindgren <tony@atomide.com> wrote:

> * Kishon Vijay Abraham I <kishon@ti.com> [150623 05:02]:
> > --- a/arch/arm/boot/dts/omap4.dtsi
> > +++ b/arch/arm/boot/dts/omap4.dtsi
> > @@ -852,12 +852,6 @@
> >  			};
> >  		};
> >  
> > -		omap_control_usbotg: control-phy@4a00233c {
> > -			compatible = "ti,control-phy-otghs";
> > -			reg = <0x4a00233c 0x4>;
> > -			reg-names = "otghs_control";
> > -		};
> > -
> >  		usb_otg_hs: usb_otg_hs@4a0ab000 {
> >  			compatible = "ti,omap4-musb";
> >  			reg = <0x4a0ab000 0x7ff>;
> > @@ -870,7 +864,7 @@
> >  			multipoint = <1>;
> >  			num-eps = <16>;
> >  			ram-bits = <12>;
> > -			ctrl-module = <&omap_control_usbotg>;
> > +			syscon-otghs = <&scm_conf 0x33c>;
> >  		};
> >  
> >  		aes: aes@4b501000 {
> 
> We should still keep a separate entry for the phy in the dtsi
> files. And the phy should be a child of the scm_conf area in the
> dtsi file.

The PHY already has a separate entry with its own set of registers.
Just that some bits have been shoved into the control module space
not only for PHY but for other modules as well like DSS, DCAN, etc.

> 
> This is because the scm and usb_otg_hs are separate devices and
> can be clocked separately. So the phy driver needs to be a
> separate driver to avoid spaghetti code and issues with clocking.

for the PHY register space this is already done.

But for the register bits that lie in control module space isn't that
taken care by syscon driver?

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index d0e0960..3bc77b1 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -852,12 +852,6 @@ 
 			};
 		};
 
-		omap_control_usbotg: control-phy@4a00233c {
-			compatible = "ti,control-phy-otghs";
-			reg = <0x4a00233c 0x4>;
-			reg-names = "otghs_control";
-		};
-
 		usb_otg_hs: usb_otg_hs@4a0ab000 {
 			compatible = "ti,omap4-musb";
 			reg = <0x4a0ab000 0x7ff>;
@@ -870,7 +864,7 @@ 
 			multipoint = <1>;
 			num-eps = <16>;
 			ram-bits = <12>;
-			ctrl-module = <&omap_control_usbotg>;
+			syscon-otghs = <&scm_conf 0x33c>;
 		};
 
 		aes: aes@4b501000 {