* Re: [PATCH 19/20] ARM: Exynos5: Add combiner, wakeup interrupt controller and ethernet nodes
[not found] ` <1335813270-13083-20-git-send-email-thomas.abraham@linaro.org>
@ 2012-05-02 17:57 ` Olof Johansson
2012-05-19 6:11 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Olof Johansson @ 2012-05-02 17:57 UTC (permalink / raw)
To: Thomas Abraham
Cc: linux-arm-kernel, kgene.kim, linux-samsung-soc, Grant Likely,
devicetree-discuss
Hi,
[adding devicetree-discuss]
On Mon, Apr 30, 2012 at 12:14 PM, Thomas Abraham
<thomas.abraham@linaro.org> wrote:
> And interrupt combiner, external interrupt wakeup interrupt controller
> and smsc9215 lan controller nodes.
>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> arch/arm/boot/dts/exynos5250-smdk5250.dts | 11 ++++++
> arch/arm/boot/dts/exynos5250.dtsi | 55 +++++++++++++++++++++++++++++
> 2 files changed, 66 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
> index bcc4b89..dbc4bdb 100644
> --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
> +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
> @@ -24,6 +24,17 @@
> bootargs = "root=/dev/ram0 rw ramdisk=8192 console=ttySAC1,115200";
> };
>
> + lan9215@0x05000000 {
> + compatible = "smsc,lan9215", "smsc,lan9115";
> + reg = <0x05000000 0x20000>;
> + interrupts = <5 0>;
> + interrupt-parent = <&wakeup_eint>;
> + phy-mode = "mii";
> + smsc,irq-push-pull;
> + smsc,force-internal-phy;
> + local-mac-address = [00 80 00 23 45 67];
> + };
> +
since the 911x sits on a chipselect bus, you should instead add that
bus to the dtsi and define this on that bus.
Something like this in the dtsi:
sromc-bus {
#address-cells = <2>;
#size-cells = <1>;
ranges = < 0 0 0x04000000 0x20000
1 0 0x05000000 0x20000
2 0 0x06000000 0x20000
3 0 0x07000000 0x20000>;
};
and in the dts:
sromc-bus {
lan9215@1,0 {
compatible = "smsc,lan9215", "smsc,lan9115";
reg = <1 0 0x20000>;
interrupts = <5 0>;
interrupt-parent = <&wakeup_eint>;
phy-mode = "mii";
smsc,irq-push-pull;
smsc,force-internal-phy;
local-mac-address = [00 80 00 23 45 67];
};
};
(You might be able to do just fine with one address cell, I'm not 100%
sure why Grant's example uses two, but I used the same above for
consistency).
Also, I don't think it's a good idea to hardcode the mac address in
the dts like this; have u-boot fill it in from the environment
variable there instead, if needed.
-Olof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 19/20] ARM: Exynos5: Add combiner, wakeup interrupt controller and ethernet nodes
2012-05-02 17:57 ` [PATCH 19/20] ARM: Exynos5: Add combiner, wakeup interrupt controller and ethernet nodes Olof Johansson
@ 2012-05-19 6:11 ` Grant Likely
2012-05-19 6:23 ` Olof Johansson
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2012-05-19 6:11 UTC (permalink / raw)
To: Olof Johansson, Thomas Abraham
Cc: linux-arm-kernel, kgene.kim, linux-samsung-soc,
devicetree-discuss
On Wed, 2 May 2012 10:57:11 -0700, Olof Johansson <olof@lixom.net> wrote:
> Hi,
>
> [adding devicetree-discuss]
>
> On Mon, Apr 30, 2012 at 12:14 PM, Thomas Abraham
> <thomas.abraham@linaro.org> wrote:
> > And interrupt combiner, external interrupt wakeup interrupt controller
> > and smsc9215 lan controller nodes.
> >
> > Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> > ---
> > Â arch/arm/boot/dts/exynos5250-smdk5250.dts | Â 11 ++++++
> >  arch/arm/boot/dts/exynos5250.dtsi     |  55 +++++++++++++++++++++++++++++
> > Â 2 files changed, 66 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
> > index bcc4b89..dbc4bdb 100644
> > --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
> > +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
> > @@ -24,6 +24,17 @@
> > Â Â Â Â Â Â Â Â bootargs = "root=/dev/ram0 rw ramdisk=8192 console=ttySAC1,115200";
> > Â Â Â Â };
> >
> > + Â Â Â lan9215@0x05000000 {
> > + Â Â Â Â Â Â Â compatible = "smsc,lan9215", "smsc,lan9115";
> > + Â Â Â Â Â Â Â reg = <0x05000000 0x20000>;
> > + Â Â Â Â Â Â Â interrupts = <5 0>;
> > + Â Â Â Â Â Â Â interrupt-parent = <&wakeup_eint>;
> > + Â Â Â Â Â Â Â phy-mode = "mii";
> > + Â Â Â Â Â Â Â smsc,irq-push-pull;
> > + Â Â Â Â Â Â Â smsc,force-internal-phy;
> > + Â Â Â Â Â Â Â local-mac-address = [00 80 00 23 45 67];
> > + Â Â Â };
> > +
>
> since the 911x sits on a chipselect bus, you should instead add that
> bus to the dtsi and define this on that bus.
>
> Something like this in the dtsi:
>
> sromc-bus {
> #address-cells = <2>;
> #size-cells = <1>;
> ranges = < 0 0 0x04000000 0x20000
> 1 0 0x05000000 0x20000
> 2 0 0x06000000 0x20000
> 3 0 0x07000000 0x20000>;
> };
>
> and in the dts:
>
> sromc-bus {
> lan9215@1,0 {
> compatible = "smsc,lan9215", "smsc,lan9115";
> reg = <1 0 0x20000>;
> interrupts = <5 0>;
> interrupt-parent = <&wakeup_eint>;
> phy-mode = "mii";
> smsc,irq-push-pull;
> smsc,force-internal-phy;
> local-mac-address = [00 80 00 23 45 67];
> };
> };
>
>
> (You might be able to do just fine with one address cell, I'm not 100%
> sure why Grant's example uses two, but I used the same above for
> consistency).
Because otherwise there is no way to describe an offset from the base
of the chipselect base value, and the core code will try to apply the
size to the cs part of the address specifier. (so in the example
above the address range described by:
reg = <1 0x20000>;
would mean cs values 1 to 0x20001; which is definitely wrong.
> Also, I don't think it's a good idea to hardcode the mac address in
> the dts like this; have u-boot fill it in from the environment
> variable there instead, if needed.
Very bad practice indeed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 19/20] ARM: Exynos5: Add combiner, wakeup interrupt controller and ethernet nodes
2012-05-19 6:11 ` Grant Likely
@ 2012-05-19 6:23 ` Olof Johansson
0 siblings, 0 replies; 3+ messages in thread
From: Olof Johansson @ 2012-05-19 6:23 UTC (permalink / raw)
To: Grant Likely
Cc: Thomas Abraham, linux-arm-kernel, kgene.kim, linux-samsung-soc,
devicetree-discuss
On Fri, May 18, 2012 at 11:11 PM, Grant Likely
<grant.likely@secretlab.ca> wrote:
> On Wed, 2 May 2012 10:57:11 -0700, Olof Johansson <olof@lixom.net> wrote:
>> Hi,
>>
>> [adding devicetree-discuss]
>>
>> On Mon, Apr 30, 2012 at 12:14 PM, Thomas Abraham
>> <thomas.abraham@linaro.org> wrote:
>> > And interrupt combiner, external interrupt wakeup interrupt controller
>> > and smsc9215 lan controller nodes.
>> >
>> > Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> > ---
>> > arch/arm/boot/dts/exynos5250-smdk5250.dts | 11 ++++++
>> > arch/arm/boot/dts/exynos5250.dtsi | 55 +++++++++++++++++++++++++++++
>> > 2 files changed, 66 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
>> > index bcc4b89..dbc4bdb 100644
>> > --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
>> > +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
>> > @@ -24,6 +24,17 @@
>> > bootargs = "root=/dev/ram0 rw ramdisk=8192 console=ttySAC1,115200";
>> > };
>> >
>> > + lan9215@0x05000000 {
>> > + compatible = "smsc,lan9215", "smsc,lan9115";
>> > + reg = <0x05000000 0x20000>;
>> > + interrupts = <5 0>;
>> > + interrupt-parent = <&wakeup_eint>;
>> > + phy-mode = "mii";
>> > + smsc,irq-push-pull;
>> > + smsc,force-internal-phy;
>> > + local-mac-address = [00 80 00 23 45 67];
>> > + };
>> > +
>>
>> since the 911x sits on a chipselect bus, you should instead add that
>> bus to the dtsi and define this on that bus.
>>
>> Something like this in the dtsi:
>>
>> sromc-bus {
>> #address-cells = <2>;
>> #size-cells = <1>;
>> ranges = < 0 0 0x04000000 0x20000
>> 1 0 0x05000000 0x20000
>> 2 0 0x06000000 0x20000
>> 3 0 0x07000000 0x20000>;
>> };
>>
>> and in the dts:
>>
>> sromc-bus {
>> lan9215@1,0 {
>> compatible = "smsc,lan9215", "smsc,lan9115";
>> reg = <1 0 0x20000>;
>> interrupts = <5 0>;
>> interrupt-parent = <&wakeup_eint>;
>> phy-mode = "mii";
>> smsc,irq-push-pull;
>> smsc,force-internal-phy;
>> local-mac-address = [00 80 00 23 45 67];
>> };
>> };
>>
>>
>> (You might be able to do just fine with one address cell, I'm not 100%
>> sure why Grant's example uses two, but I used the same above for
>> consistency).
>
> Because otherwise there is no way to describe an offset from the base
> of the chipselect base value, and the core code will try to apply the
> size to the cs part of the address specifier. (so in the example
> above the address range described by:
>
> reg = <1 0x20000>;
>
> would mean cs values 1 to 0x20001; which is definitely wrong.
Ah yes, that makes perfect sense. I can't seem to create an account to
update the 'Device_Tree_Usage' page on the devicetree.org wiki, but
it'd probably not be a bad idea to include the above for explanation
there.
-Olof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-19 6:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1335813270-13083-1-git-send-email-thomas.abraham@linaro.org>
[not found] ` <1335813270-13083-20-git-send-email-thomas.abraham@linaro.org>
2012-05-02 17:57 ` [PATCH 19/20] ARM: Exynos5: Add combiner, wakeup interrupt controller and ethernet nodes Olof Johansson
2012-05-19 6:11 ` Grant Likely
2012-05-19 6:23 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox