public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: vladimir.murzin@arm•com (Vladimir Murzin)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 09/10] ARM: dts: introduce MPS2 AN385/AN386
Date: Thu, 18 Feb 2016 10:11:37 +0000	[thread overview]
Message-ID: <56C598D9.3030001@arm.com> (raw)
In-Reply-To: <7272921.u1gphgWzUn@wuerfel>

On 17/02/16 16:58, Arnd Bergmann wrote:
> On Wednesday 17 February 2016 16:48:44 Vladimir Murzin wrote:
>> On 16/02/16 16:10, Vladimir Murzin wrote:
>>> On 16/02/16 11:01, Arnd Bergmann wrote:
>>>> On Tuesday 16 February 2016 10:08:14 Vladimir Murzin wrote:
>>>>> +
>>>>> +       ethernet at 40200000 {
>>>>> +               compatible = "smsc,lan9220", "smsc,lan9115";
>>>>> +               reg = <0x40200000 0x10000>;
>>>>> +               interrupts = <13>;
>>>>> +               interrupt-parent = <&nvic>;
>>>>> +               smsc,irq-active-high;
>>>>> +       };
>>>>> +};
>>>>> +
>>>>>
>>>>
>>>> This node seems slightly misplaced. Is there some external bus interface
>>>> that this is connected to? The address suggests that it should be somewhere
>>>> below the /soc node, and you probably want to list the external bus
>>>> interface with a "ranges" property that identifies the addresses visibile
>>>> there, and put the external chip under there.
>>>>
>>>
>>> I might messed it up since the MAC/PHY connects to the same 16-bit
>>> interface as the 16MB PSRAM external memory and both connected via AHB.
>>>
>>> Not sure how it should be expressed, so some help form DT camp would be
>>> appreciated.
>>
>> Does following fixup address your point on where/how ethernet node
>> should be placed?
> 
> 
> 
>> diff --git a/arch/arm/boot/dts/mps2-an385.dts b/arch/arm/boot/dts/an385.dts
>> index 976f86d..50c8d24 100644
>> --- a/arch/arm/boot/dts/mps2-an385.dts
>> +++ b/arch/arm/boot/dts/mps2-an385.dts
>> @@ -63,14 +63,10 @@
>>  		device_type = "memory";
>>  		reg = <0x21000000 0x1000000>;
>>  	};
>> +};
>>
>> -	ethernet at 40200000 {
>> -		compatible = "smsc,lan9220", "smsc,lan9115";
>> -		reg = <0x40200000 0x10000>;
>> -		interrupts = <13>;
>> -		interrupt-parent = <&nvic>;
>> -		smsc,irq-active-high;
>> -	};
>> +&mb {
>> +	ranges = <0 0x40200000 0x10000>;
>>  };
> 
> How is the range being set here? The way I read this is:
> 
> "There is an external bus controller whose single CPU physical
> address for MMIO is configurable. The chip always connects
> a lan9220 device to it (as that is in the dtsi file) and
> nothing else is possible, and the bootloader in this
> version of the machine has configured the window to be
> at address 0x40200000."
> 
> Is that what the hardware does?
> 
> I would have expected the opposite, with the external bus
> interface being hardwired to one or more physical addresses
> (more than one if you have multiple chip-selects), and
> then allow to connect different devices, which are in the
> .dts file, while the bus controller is defined in the
> .dtsi file.
> 

Right, I thought in a wrong way, in opposite it makes more sense now.

.dtsi

/* below the soc/ */
smb {
	compatible = "simple-bus";
	#address-cells = <2>;
	#size-cells = <1>;
	ranges = <0 0 0x40200000 0x10000>,
		 <1 0 0xa0000000 0x10000>;
};

.dts

smb {
	ethernet at 0,0 {
		compatible = "smsc,lan9220", "smsc,lan9115";
		reg = <0 0x0 0x10000>;
		interrupts = <13>;
		interrupt-parent = <&nvic>;
		smsc,irq-active-high;
};


and looking again at .dtsi it seems to me that fpgaio should be moved
below the soc/ under separate bus interface which would hosts audio and
spi too or I keep missing things around device-tree?

I appreciate your help on this, thanks!

Vladimir

> 	Arnd
> 
> 
> 

  reply	other threads:[~2016-02-18 10:11 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 10:08 [PATCH v3 00/10] Support for Cortex-M Prototyping System Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 01/10] dt-bindings: document the MPS2 timer bindings Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 02/10] clockevents/drivers: add MPS2 Timer driver Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 03/10] dt-bindings: document the MPS2 UART bindings Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 04/10] serial: mps2-uart: add MPS2 UART driver Vladimir Murzin
2016-02-16 10:48   ` Andy Shevchenko
2016-02-16 14:25     ` Vladimir Murzin
2016-02-16 11:02   ` One Thousand Gnomes
2016-02-16 15:09     ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 05/10] serial: mps2-uart: add support for early console Vladimir Murzin
2016-02-16 10:36   ` Andy Shevchenko
2016-02-16 13:09     ` Vladimir Murzin
2016-02-16 13:13       ` Andy Shevchenko
2016-02-16 13:38         ` Vladimir Murzin
2016-02-16 14:00           ` Andy Shevchenko
2016-02-16 16:12             ` One Thousand Gnomes
2016-02-19  9:45       ` Vladimir Murzin
2016-02-19  9:57         ` Andy Shevchenko
2016-02-19 15:46           ` Peter Hurley
2016-02-19 16:27             ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 06/10] ARM: mps2: introduce MPS2 platform Vladimir Murzin
2016-02-16 10:56   ` Arnd Bergmann
2016-02-16 14:35     ` Vladimir Murzin
2016-02-16 14:39       ` Arnd Bergmann
2016-02-16 10:08 ` [PATCH v3 07/10] ARM: mps2: add low-level debug support Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 08/10] ARM: configs: add MPS2 defconfig Vladimir Murzin
2016-02-16 10:58   ` Arnd Bergmann
2016-02-16 14:51     ` Vladimir Murzin
2016-02-16 15:08       ` Arnd Bergmann
2016-02-16 15:14         ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 09/10] ARM: dts: introduce MPS2 AN385/AN386 Vladimir Murzin
2016-02-16 11:01   ` Arnd Bergmann
2016-02-16 16:10     ` Vladimir Murzin
2016-02-17 16:48       ` Vladimir Murzin
2016-02-17 16:58         ` Arnd Bergmann
2016-02-18 10:11           ` Vladimir Murzin [this message]
2016-02-18 10:45             ` Arnd Bergmann
2016-02-18 11:13               ` Vladimir Murzin
2016-02-18 12:16                 ` Arnd Bergmann
2016-02-18 12:47                   ` Vladimir Murzin
2016-02-16 15:17   ` Linus Walleij
2016-02-16 15:37     ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 10/10] ARM: dts: introduce MPS2 AN399/AN400 Vladimir Murzin
2016-02-16 11:05 ` [PATCH v3 00/10] Support for Cortex-M Prototyping System Arnd Bergmann
2016-02-16 16:14   ` Vladimir Murzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C598D9.3030001@arm.com \
    --to=vladimir.murzin@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox