diff mbox

[08/17] ARM: dts: dra7: Add dt node for the sycon pcie

Message ID 1435060743-5511-9-git-send-email-kishon@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kishon Vijay Abraham I June 23, 2015, 11:58 a.m. UTC
Add new device tree node for the control module register space where
PCIe registers are present.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 arch/arm/boot/dts/dra7.dtsi |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Roger Quadros June 24, 2015, 11:50 a.m. UTC | #1
On Tue, 23 Jun 2015 17:28:53 +0530
Kishon Vijay Abraham I <kishon@ti.com> wrote:

> Add new device tree node for the control module register space where
> PCIe registers are present.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  arch/arm/boot/dts/dra7.dtsi |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index 260f300..3f434f7 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -291,6 +291,11 @@
>  			reg = <0x4a002e00 0x7c>;
>  		};
>  
> +		dra7_ctrl_pcie: tisyscon@4a003c00 {
> +			compatible = "syscon";
> +			reg = <0x4a003c00 0x48>;
> +		};
> +

Why do you need to start from 0x4a003c00?
CTRL_CORE_PCIESS1_PCS1 is at 0x4a003c24

>  		sdma: dma-controller@4a056000 {
>  			compatible = "ti,omap4430-sdma";
>  			reg = <0x4a056000 0x1000>;
> -- 
> 1.7.9.5
> 

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
Roger Quadros June 24, 2015, 11:56 a.m. UTC | #2
On Wed, 24 Jun 2015 14:50:17 +0300
Roger Quadros <rogerq@ti.com> wrote:

> On Tue, 23 Jun 2015 17:28:53 +0530
> Kishon Vijay Abraham I <kishon@ti.com> wrote:
> 
> > Add new device tree node for the control module register space where
> > PCIe registers are present.
> > 
> > Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> > ---
> >  arch/arm/boot/dts/dra7.dtsi |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> > index 260f300..3f434f7 100644
> > --- a/arch/arm/boot/dts/dra7.dtsi
> > +++ b/arch/arm/boot/dts/dra7.dtsi
> > @@ -291,6 +291,11 @@
> >  			reg = <0x4a002e00 0x7c>;
> >  		};
> >  
> > +		dra7_ctrl_pcie: tisyscon@4a003c00 {
> > +			compatible = "syscon";
> > +			reg = <0x4a003c00 0x48>;
> > +		};
> > +
> 
> Why do you need to start from 0x4a003c00?
> CTRL_CORE_PCIESS1_PCS1 is at 0x4a003c24

Also, why can't this dra7_ctrl_pcie node be where scm_conf is.

> 
> >  		sdma: dma-controller@4a056000 {
> >  			compatible = "ti,omap4430-sdma";
> >  			reg = <0x4a056000 0x1000>;
> > -- 
> > 1.7.9.5
> > 
> 
> cheers,
> -roger
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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, 12:09 p.m. UTC | #3
* Roger Quadros <rogerq@ti.com> [150624 04:58]:
> On Wed, 24 Jun 2015 14:50:17 +0300
> Roger Quadros <rogerq@ti.com> wrote:
> 
> > On Tue, 23 Jun 2015 17:28:53 +0530
> > Kishon Vijay Abraham I <kishon@ti.com> wrote:
> > 
> > > Add new device tree node for the control module register space where
> > > PCIe registers are present.
> > > 
> > > Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> > > ---
> > >  arch/arm/boot/dts/dra7.dtsi |    5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> > > index 260f300..3f434f7 100644
> > > --- a/arch/arm/boot/dts/dra7.dtsi
> > > +++ b/arch/arm/boot/dts/dra7.dtsi
> > > @@ -291,6 +291,11 @@
> > >  			reg = <0x4a002e00 0x7c>;
> > >  		};
> > >  
> > > +		dra7_ctrl_pcie: tisyscon@4a003c00 {
> > > +			compatible = "syscon";
> > > +			reg = <0x4a003c00 0x48>;
> > > +		};
> > > +
> > 
> > Why do you need to start from 0x4a003c00?
> > CTRL_CORE_PCIESS1_PCS1 is at 0x4a003c24
> 
> Also, why can't this dra7_ctrl_pcie node be where scm_conf is.

Yes all the scm children should be under scm@2000 entry in the
dra7.dtsi file.

And BTW, there's nothing stopping a driver doing of_ioremap
on a larger range and be a child under scm@2000 in the dra7.dtsi
if that range is dedicated to a single driver.

My take is we should only use regmap for the scm_conf area
in general.

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:19 p.m. UTC | #4
On Wed, 24 Jun 2015 05:09:39 -0700
Tony Lindgren <tony@atomide.com> wrote:

> * Roger Quadros <rogerq@ti.com> [150624 04:58]:
> > On Wed, 24 Jun 2015 14:50:17 +0300
> > Roger Quadros <rogerq@ti.com> wrote:
> > 
> > > On Tue, 23 Jun 2015 17:28:53 +0530
> > > Kishon Vijay Abraham I <kishon@ti.com> wrote:
> > > 
> > > > Add new device tree node for the control module register space where
> > > > PCIe registers are present.
> > > > 
> > > > Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> > > > ---
> > > >  arch/arm/boot/dts/dra7.dtsi |    5 +++++
> > > >  1 file changed, 5 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> > > > index 260f300..3f434f7 100644
> > > > --- a/arch/arm/boot/dts/dra7.dtsi
> > > > +++ b/arch/arm/boot/dts/dra7.dtsi
> > > > @@ -291,6 +291,11 @@
> > > >  			reg = <0x4a002e00 0x7c>;
> > > >  		};
> > > >  
> > > > +		dra7_ctrl_pcie: tisyscon@4a003c00 {
> > > > +			compatible = "syscon";
> > > > +			reg = <0x4a003c00 0x48>;
> > > > +		};
> > > > +
> > > 
> > > Why do you need to start from 0x4a003c00?
> > > CTRL_CORE_PCIESS1_PCS1 is at 0x4a003c24
> > 
> > Also, why can't this dra7_ctrl_pcie node be where scm_conf is.
> 
> Yes all the scm children should be under scm@2000 entry in the
> dra7.dtsi file.
> 
> And BTW, there's nothing stopping a driver doing of_ioremap
> on a larger range and be a child under scm@2000 in the dra7.dtsi
> if that range is dedicated to a single driver.

Agreed.

> 
> My take is we should only use regmap for the scm_conf area
> in general.

+1

should we get rid of dra7_ctrl_core and dra7_ctrl_general?
or move them to scm node?

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
Tony Lindgren June 24, 2015, 12:49 p.m. UTC | #5
* Roger Quadros <rogerq@ti.com> [150624 05:21]:
> On Wed, 24 Jun 2015 05:09:39 -0700
> Tony Lindgren <tony@atomide.com> wrote:
> > 
> > My take is we should only use regmap for the scm_conf area
> > in general.
> 
> +1
> 
> should we get rid of dra7_ctrl_core and dra7_ctrl_general?
> or move them to scm node?

Well at least move them. And if there are clear dedicated
register ranges there claimed only by a single device driver,
then those drivers should be just regular loadable driver
modules doing of_ioremap on the range. And in that case they
can be removed.

We have examples of both in dra7.dtsi, pbias_regulator using
the scm_conf via syscon, and then dra7_pmx_core ioremapping
a dedicated register range. So unless there are other messy
register ranges like the scm_conf area then there should not
be need for other syscon areas.

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, 1:29 p.m. UTC | #6
Hi,

On Wednesday 24 June 2015 05:20 PM, Roger Quadros wrote:
> On Tue, 23 Jun 2015 17:28:53 +0530
> Kishon Vijay Abraham I <kishon@ti.com> wrote:
> 
>> Add new device tree node for the control module register space where
>> PCIe registers are present.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>>  arch/arm/boot/dts/dra7.dtsi |    5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>> index 260f300..3f434f7 100644
>> --- a/arch/arm/boot/dts/dra7.dtsi
>> +++ b/arch/arm/boot/dts/dra7.dtsi
>> @@ -291,6 +291,11 @@
>>  			reg = <0x4a002e00 0x7c>;
>>  		};
>>  
>> +		dra7_ctrl_pcie: tisyscon@4a003c00 {
>> +			compatible = "syscon";
>> +			reg = <0x4a003c00 0x48>;
>> +		};
>> +
> 
> Why do you need to start from 0x4a003c00?
> CTRL_CORE_PCIESS1_PCS1 is at 0x4a003c24

Actually wanted to have minimum number of syscon dt nodes. So thought even
others can use dra7_ctrl_pcie phandle. But I looked only at dra7_ctrl_core and
dra7_ctrl_general and not scm_conf :-(

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
Kishon Vijay Abraham I June 24, 2015, 1:30 p.m. UTC | #7
Hi,

On Wednesday 24 June 2015 05:26 PM, Roger Quadros wrote:
> On Wed, 24 Jun 2015 14:50:17 +0300
> Roger Quadros <rogerq@ti.com> wrote:
> 
>> On Tue, 23 Jun 2015 17:28:53 +0530
>> Kishon Vijay Abraham I <kishon@ti.com> wrote:
>>
>>> Add new device tree node for the control module register space where
>>> PCIe registers are present.
>>>
>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>>  arch/arm/boot/dts/dra7.dtsi |    5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>>> index 260f300..3f434f7 100644
>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>> @@ -291,6 +291,11 @@
>>>  			reg = <0x4a002e00 0x7c>;
>>>  		};
>>>  
>>> +		dra7_ctrl_pcie: tisyscon@4a003c00 {
>>> +			compatible = "syscon";
>>> +			reg = <0x4a003c00 0x48>;
>>> +		};
>>> +
>>
>> Why do you need to start from 0x4a003c00?
>> CTRL_CORE_PCIESS1_PCS1 is at 0x4a003c24
> 
> Also, why can't this dra7_ctrl_pcie node be where scm_conf is.

Yes. I think that's the right thing to do. I saw dra7_ctrl_core and
dra7_ctrl_general and added it.

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
diff mbox

Patch

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 260f300..3f434f7 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -291,6 +291,11 @@ 
 			reg = <0x4a002e00 0x7c>;
 		};
 
+		dra7_ctrl_pcie: tisyscon@4a003c00 {
+			compatible = "syscon";
+			reg = <0x4a003c00 0x48>;
+		};
+
 		sdma: dma-controller@4a056000 {
 			compatible = "ti,omap4430-sdma";
 			reg = <0x4a056000 0x1000>;