* [PATCH v2] ARM: dts: zynq: Add OCM node
@ 2015-02-12 10:42 Michal Simek
2015-02-12 10:54 ` Mark Rutland
0 siblings, 1 reply; 8+ messages in thread
From: Michal Simek @ 2015-02-12 10:42 UTC (permalink / raw)
To: linux-kernel, monstr
Cc: Andreas Färber, Sören Brinkmann, Russell King,
devicetree, Steffen Trumtrar, Kumar Gala, Peter Crosthwaite,
Ian Campbell, Rob Herring, Pawel Moll, Rob Herring, Mark Rutland,
Josh Cartwright, linux-arm-kernel
Add OCM node for all zynq boards. OCM location
can changed but for all current boards this
is the location where OCM is.`
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v2:
- Move node to board file suggested by Mark
This patch is done based on discussion here.
https://lkml.org/lkml/2014/12/1/396
Mark: I expect you won't like amba bus reference or
am I wrong?
---
arch/arm/boot/dts/zynq-7000.dtsi | 2 +-
arch/arm/boot/dts/zynq-zc702.dts | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi
index a5cd2eda3edf..acca3c180324 100644
--- a/arch/arm/boot/dts/zynq-7000.dtsi
+++ b/arch/arm/boot/dts/zynq-7000.dtsi
@@ -57,7 +57,7 @@
regulator-always-on;
};
- amba {
+ amba: amba {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/arm/boot/dts/zynq-zc702.dts b/arch/arm/boot/dts/zynq-zc702.dts
index fb59d34e8ee6..79077c5ac60e 100644
--- a/arch/arm/boot/dts/zynq-zc702.dts
+++ b/arch/arm/boot/dts/zynq-zc702.dts
@@ -50,6 +50,13 @@
};
};
+&amba {
+ ocm: sram@fffc0000 {
+ compatible = "mmio-sram";
+ reg = <0xfffc0000 0x10000>;
+ };
+};
+
&can0 {
status = "okay";
pinctrl-names = "default";
--
1.8.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
2015-02-12 10:42 [PATCH v2] ARM: dts: zynq: Add OCM node Michal Simek
@ 2015-02-12 10:54 ` Mark Rutland
2015-02-12 11:01 ` Michal Simek
0 siblings, 1 reply; 8+ messages in thread
From: Mark Rutland @ 2015-02-12 10:54 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu,
Andreas Färber, Sören Brinkmann, Russell King,
devicetree@vger.kernel.org, Steffen Trumtrar, Kumar Gala,
Peter Crosthwaite, Ian Campbell, Rob Herring, Pawel Moll,
Rob Herring, Josh Cartwright,
linux-arm-kernel@lists.infradead.org
On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
> Add OCM node for all zynq boards. OCM location
> can changed but for all current boards this
> is the location where OCM is.`
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> Changes in v2:
> - Move node to board file suggested by Mark
>
> This patch is done based on discussion here.
> https://lkml.org/lkml/2014/12/1/396
>
> Mark: I expect you won't like amba bus reference or
> am I wrong?
I'm fine with dropping things onto a bus in this way. If we're happy to
do it for other nodes I don't see why busses should be special.
Mark.
>
> ---
> arch/arm/boot/dts/zynq-7000.dtsi | 2 +-
> arch/arm/boot/dts/zynq-zc702.dts | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi
> index a5cd2eda3edf..acca3c180324 100644
> --- a/arch/arm/boot/dts/zynq-7000.dtsi
> +++ b/arch/arm/boot/dts/zynq-7000.dtsi
> @@ -57,7 +57,7 @@
> regulator-always-on;
> };
>
> - amba {
> + amba: amba {
> compatible = "simple-bus";
> #address-cells = <1>;
> #size-cells = <1>;
> diff --git a/arch/arm/boot/dts/zynq-zc702.dts b/arch/arm/boot/dts/zynq-zc702.dts
> index fb59d34e8ee6..79077c5ac60e 100644
> --- a/arch/arm/boot/dts/zynq-zc702.dts
> +++ b/arch/arm/boot/dts/zynq-zc702.dts
> @@ -50,6 +50,13 @@
> };
> };
>
> +&amba {
> + ocm: sram@fffc0000 {
> + compatible = "mmio-sram";
> + reg = <0xfffc0000 0x10000>;
> + };
> +};
> +
> &can0 {
> status = "okay";
> pinctrl-names = "default";
> --
> 1.8.2.3
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
2015-02-12 10:54 ` Mark Rutland
@ 2015-02-12 11:01 ` Michal Simek
2015-02-12 14:58 ` Sören Brinkmann
[not found] ` <20150212145836.GZ18532@xsjandreislx>
0 siblings, 2 replies; 8+ messages in thread
From: Michal Simek @ 2015-02-12 11:01 UTC (permalink / raw)
To: Mark Rutland, Michal Simek
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org,
Andreas Färber, Sören Brinkmann, Russell King,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Steffen Trumtrar, Kumar Gala, Peter Crosthwaite, Ian Campbell,
Rob Herring, Pawel Moll, Rob Herring, Josh Cartwright,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
On 02/12/2015 11:54 AM, Mark Rutland wrote:
> On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
>> Add OCM node for all zynq boards. OCM location
>> can changed but for all current boards this
>> is the location where OCM is.`
>>
>> Signed-off-by: Michal Simek <michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
>> ---
>>
>> Changes in v2:
>> - Move node to board file suggested by Mark
>>
>> This patch is done based on discussion here.
>> https://lkml.org/lkml/2014/12/1/396
>>
>> Mark: I expect you won't like amba bus reference or
>> am I wrong?
>
> I'm fine with dropping things onto a bus in this way. If we're happy to
> do it for other nodes I don't see why busses should be special.
Wonderful. I will give people some time to comment this style.
Thanks for your comments,
Michal
--
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] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
2015-02-12 11:01 ` Michal Simek
@ 2015-02-12 14:58 ` Sören Brinkmann
2015-02-12 15:07 ` Mark Rutland
[not found] ` <20150212145836.GZ18532@xsjandreislx>
1 sibling, 1 reply; 8+ messages in thread
From: Sören Brinkmann @ 2015-02-12 14:58 UTC (permalink / raw)
To: Michal Simek
Cc: Mark Rutland, linux-kernel@vger.kernel.org, monstr@monstr.eu,
Andreas Färber, Russell King, devicetree@vger.kernel.org,
Steffen Trumtrar, Kumar Gala, Peter Crosthwaite, Ian Campbell,
Rob Herring, Pawel Moll, Rob Herring, Josh Cartwright,
linux-arm-kernel@lists.infradead.org
On Thu, 2015-02-12 at 12:01PM +0100, Michal Simek wrote:
> On 02/12/2015 11:54 AM, Mark Rutland wrote:
> > On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
> >> Add OCM node for all zynq boards. OCM location
> >> can changed but for all current boards this
> >> is the location where OCM is.`
> >>
> >> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >> ---
> >>
> >> Changes in v2:
> >> - Move node to board file suggested by Mark
> >>
> >> This patch is done based on discussion here.
> >> https://lkml.org/lkml/2014/12/1/396
> >>
> >> Mark: I expect you won't like amba bus reference or
> >> am I wrong?
> >
> > I'm fine with dropping things onto a bus in this way. If we're happy to
> > do it for other nodes I don't see why busses should be special.
>
> Wonderful. I will give people some time to comment this style.
Given that the location is discoverable, wouldn't it make sense to let
'reg' point to the ctrl/cfg registers in the SLCR and let the driver
handle the whereabouts of the OCM location? (but I guess this is going
in circles now, such a proposal was on the table at some point, IIRC).
But I'd prefer:
memory-controller@0xfffc0000 { /* the address here would of course not match all configurations */
interrupts = ...;
syscon = &slcr;
};
Soren
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
[not found] ` <20150212145836.GZ18532@xsjandreislx>
@ 2015-02-12 15:00 ` Michal Simek
0 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2015-02-12 15:00 UTC (permalink / raw)
To: Sören Brinkmann, Michal Simek
Cc: Mark Rutland, devicetree@vger.kernel.org, monstr@monstr.eu,
Russell King, Pawel Moll, Ian Campbell,
linux-kernel@vger.kernel.org, Josh Cartwright, Rob Herring,
Peter Crosthwaite, Kumar Gala, Steffen Trumtrar,
Andreas Färber, linux-arm-kernel@lists.infradead.org
On 02/12/2015 03:58 PM, Sören Brinkmann wrote:
> On Thu, 2015-02-12 at 12:01PM +0100, Michal Simek wrote:
>> On 02/12/2015 11:54 AM, Mark Rutland wrote:
>>> On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
>>>> Add OCM node for all zynq boards. OCM location
>>>> can changed but for all current boards this
>>>> is the location where OCM is.`
>>>>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - Move node to board file suggested by Mark
>>>>
>>>> This patch is done based on discussion here.
>>>> https://lkml.org/lkml/2014/12/1/396
>>>>
>>>> Mark: I expect you won't like amba bus reference or
>>>> am I wrong?
>>>
>>> I'm fine with dropping things onto a bus in this way. If we're happy to
>>> do it for other nodes I don't see why busses should be special.
>>
>> Wonderful. I will give people some time to comment this style.
>
> Given that the location is discoverable, wouldn't it make sense to let
> 'reg' point to the ctrl/cfg registers in the SLCR and let the driver
> handle the whereabouts of the OCM location? (but I guess this is going
> in circles now, such a proposal was on the table at some point, IIRC).
> But I'd prefer:
> memory-controller@0xfffc0000 { /* the address here would of course not match all configurations */
> interrupts = ...;
> syscon = &slcr;
> };
That was discussed with Arnd at that link above.
Thanks,
Michal
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
2015-02-12 14:58 ` Sören Brinkmann
@ 2015-02-12 15:07 ` Mark Rutland
2015-02-12 15:09 ` Sören Brinkmann
2015-02-12 15:15 ` Michal Simek
0 siblings, 2 replies; 8+ messages in thread
From: Mark Rutland @ 2015-02-12 15:07 UTC (permalink / raw)
To: Sören Brinkmann
Cc: Michal Simek, linux-kernel@vger.kernel.org, monstr@monstr.eu,
Andreas Färber, Russell King, devicetree@vger.kernel.org,
Steffen Trumtrar, Kumar Gala, Peter Crosthwaite, Ian Campbell,
Rob Herring, Pawel Moll, Rob Herring, Josh Cartwright,
linux-arm-kernel@lists.infradead.org
On Thu, Feb 12, 2015 at 02:58:36PM +0000, Sören Brinkmann wrote:
> On Thu, 2015-02-12 at 12:01PM +0100, Michal Simek wrote:
> > On 02/12/2015 11:54 AM, Mark Rutland wrote:
> > > On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
> > >> Add OCM node for all zynq boards. OCM location
> > >> can changed but for all current boards this
> > >> is the location where OCM is.`
> > >>
> > >> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > >> ---
> > >>
> > >> Changes in v2:
> > >> - Move node to board file suggested by Mark
> > >>
> > >> This patch is done based on discussion here.
> > >> https://lkml.org/lkml/2014/12/1/396
> > >>
> > >> Mark: I expect you won't like amba bus reference or
> > >> am I wrong?
> > >
> > > I'm fine with dropping things onto a bus in this way. If we're happy to
> > > do it for other nodes I don't see why busses should be special.
> >
> > Wonderful. I will give people some time to comment this style.
>
> Given that the location is discoverable, wouldn't it make sense to let
> 'reg' point to the ctrl/cfg registers in the SLCR and let the driver
> handle the whereabouts of the OCM location? (but I guess this is going
> in circles now, such a proposal was on the table at some point, IIRC).
> But I'd prefer:
> memory-controller@0xfffc0000 { /* the address here would of course not match all configurations */
I'd really prefer that we keep the unit-address and reg consistent.
Given that the address may change on a per-board basis, it simply has to
live in the board file.
However, given that all boards are currently the same it could be
dropped in the SoC file for now, with a comment saying it should be
factored out to boards when the first board with a different address
comes along.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
2015-02-12 15:07 ` Mark Rutland
@ 2015-02-12 15:09 ` Sören Brinkmann
2015-02-12 15:15 ` Michal Simek
1 sibling, 0 replies; 8+ messages in thread
From: Sören Brinkmann @ 2015-02-12 15:09 UTC (permalink / raw)
To: Mark Rutland
Cc: Michal Simek, linux-kernel@vger.kernel.org, monstr@monstr.eu,
Andreas Färber, Russell King, devicetree@vger.kernel.org,
Steffen Trumtrar, Kumar Gala, Peter Crosthwaite, Ian Campbell,
Rob Herring, Pawel Moll, Rob Herring, Josh Cartwright,
linux-arm-kernel@lists.infradead.org
On Thu, 2015-02-12 at 03:07PM +0000, Mark Rutland wrote:
> On Thu, Feb 12, 2015 at 02:58:36PM +0000, Sören Brinkmann wrote:
> > On Thu, 2015-02-12 at 12:01PM +0100, Michal Simek wrote:
> > > On 02/12/2015 11:54 AM, Mark Rutland wrote:
> > > > On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
> > > >> Add OCM node for all zynq boards. OCM location
> > > >> can changed but for all current boards this
> > > >> is the location where OCM is.`
> > > >>
> > > >> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > > >> ---
> > > >>
> > > >> Changes in v2:
> > > >> - Move node to board file suggested by Mark
> > > >>
> > > >> This patch is done based on discussion here.
> > > >> https://lkml.org/lkml/2014/12/1/396
> > > >>
> > > >> Mark: I expect you won't like amba bus reference or
> > > >> am I wrong?
> > > >
> > > > I'm fine with dropping things onto a bus in this way. If we're happy to
> > > > do it for other nodes I don't see why busses should be special.
> > >
> > > Wonderful. I will give people some time to comment this style.
> >
> > Given that the location is discoverable, wouldn't it make sense to let
> > 'reg' point to the ctrl/cfg registers in the SLCR and let the driver
> > handle the whereabouts of the OCM location? (but I guess this is going
> > in circles now, such a proposal was on the table at some point, IIRC).
> > But I'd prefer:
> > memory-controller@0xfffc0000 { /* the address here would of course not match all configurations */
>
> I'd really prefer that we keep the unit-address and reg consistent.
>
> Given that the address may change on a per-board basis, it simply has to
> live in the board file.
It's not a per-board but rather per use-case configuration.
Soren
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: zynq: Add OCM node
2015-02-12 15:07 ` Mark Rutland
2015-02-12 15:09 ` Sören Brinkmann
@ 2015-02-12 15:15 ` Michal Simek
1 sibling, 0 replies; 8+ messages in thread
From: Michal Simek @ 2015-02-12 15:15 UTC (permalink / raw)
To: Mark Rutland, Sören Brinkmann
Cc: Michal Simek, linux-kernel@vger.kernel.org, monstr@monstr.eu,
Andreas Färber, Russell King, devicetree@vger.kernel.org,
Steffen Trumtrar, Kumar Gala, Peter Crosthwaite, Ian Campbell,
Rob Herring, Pawel Moll, Rob Herring, Josh Cartwright,
linux-arm-kernel@lists.infradead.org
On 02/12/2015 04:07 PM, Mark Rutland wrote:
> On Thu, Feb 12, 2015 at 02:58:36PM +0000, Sören Brinkmann wrote:
>> On Thu, 2015-02-12 at 12:01PM +0100, Michal Simek wrote:
>>> On 02/12/2015 11:54 AM, Mark Rutland wrote:
>>>> On Thu, Feb 12, 2015 at 10:42:47AM +0000, Michal Simek wrote:
>>>>> Add OCM node for all zynq boards. OCM location
>>>>> can changed but for all current boards this
>>>>> is the location where OCM is.`
>>>>>
>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>> ---
>>>>>
>>>>> Changes in v2:
>>>>> - Move node to board file suggested by Mark
>>>>>
>>>>> This patch is done based on discussion here.
>>>>> https://lkml.org/lkml/2014/12/1/396
>>>>>
>>>>> Mark: I expect you won't like amba bus reference or
>>>>> am I wrong?
>>>>
>>>> I'm fine with dropping things onto a bus in this way. If we're happy to
>>>> do it for other nodes I don't see why busses should be special.
>>>
>>> Wonderful. I will give people some time to comment this style.
>>
>> Given that the location is discoverable, wouldn't it make sense to let
>> 'reg' point to the ctrl/cfg registers in the SLCR and let the driver
>> handle the whereabouts of the OCM location? (but I guess this is going
>> in circles now, such a proposal was on the table at some point, IIRC).
>> But I'd prefer:
>> memory-controller@0xfffc0000 { /* the address here would of course not match all configurations */
>
> I'd really prefer that we keep the unit-address and reg consistent.
>
> Given that the address may change on a per-board basis, it simply has to
> live in the board file.
>
> However, given that all boards are currently the same it could be
> dropped in the SoC file for now, with a comment saying it should be
> factored out to boards when the first board with a different address
> comes along.
Soren is talking about different solution which I have tried to push to mainline
in that thread above. OCM configuration is discoverable through system controller
to find out which configuration is used.
From this simple sram block it looks like that it is 64k of memory but
it is just one block which can live in low or high address (at 0x0 or 0xfffc0000)
based on controller configuration.
In total there are 4 blocks with low and high locations.
Thanks,
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-02-12 15:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12 10:42 [PATCH v2] ARM: dts: zynq: Add OCM node Michal Simek
2015-02-12 10:54 ` Mark Rutland
2015-02-12 11:01 ` Michal Simek
2015-02-12 14:58 ` Sören Brinkmann
2015-02-12 15:07 ` Mark Rutland
2015-02-12 15:09 ` Sören Brinkmann
2015-02-12 15:15 ` Michal Simek
[not found] ` <20150212145836.GZ18532@xsjandreislx>
2015-02-12 15:00 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox