From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 11/13] arm: zynq: dts: Add U-Boot device tree additions
Date: Fri, 4 Sep 2015 08:04:37 +0200 [thread overview]
Message-ID: <55E93475.4000007@monstr.eu> (raw)
In-Reply-To: <CAPnjgZ3getqd_utcJaS30ubK_O8P6uc4kc0mv_MwAn=vs2eNdA@mail.gmail.com>
On 09/04/2015 02:22 AM, Simon Glass wrote:
> Hi Michal,
>
> On 3 September 2015 at 05:35, Michal Simek <monstr@monstr.eu> wrote:
>> On 09/02/2015 04:49 AM, Simon Glass wrote:
>>> +Tom and a few others who may have an opinion.
>>>
>>> Hi,
>>>
>>> On 1 September 2015 at 10:19, Masahiro Yamada
>>> <yamada.masahiro@socionext.com> wrote:
>>>> Hi.
>>>>
>>>>
>>>> 2015-09-02 0:41 GMT+09:00 Michal Simek <monstr@monstr.eu>:
>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>> Why not just add one more uboot property to chosen with list of IPs
>>>>>>>>> which needs to be relocated?
>>>>>>>>
>>>>>>>> You mean a list of devices needed before relocation?
>>>>>>>
>>>>>>> I mean something like this:
>>>>>>>
>>>>>>> chosen {
>>>>>>> u-boot,dm-pre-reloc = <&uart1 ...>;
>>>>>>> }
>>>>>>>
>>>>>>> And then just go through this list. I expect that you are looking for
>>>>>>> that property anyway.
>>>>>>
>>>>>> In this case wouldn't it need to list the simple-bus also?
>>>>>
>>>>> yes for zc702 case
>>>>>
>>>>> u-boot,dm-pre-reloc = <&amba &uart1>;
>>>>
>>>> I think this should be
>>>>
>>>> u-boot,dm-pre-reloc = &amba, &uart1;
>>>>
>>>>
>>>> <&label> is used for phandle, while &label is replaced with a string
>>>> standing for the full path for the node.
>>>>
>>>>
>>>> For example, stdout-path takes that:
>>>>
>>>>
>>>> stdout-path = &serial0;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>>>
>>>>>> We also use this with fdtgrep to remove nodes not needed for SPL. So
>>>>>> we would have to come up with a tool to make that work. At present
>>>>>> 'fdtgrep -p u-boot,dm-pre-reloc' picks out all the nodes we want (it
>>>>>> finds nodes with that property).
>>>>>>
>>>>>> I'm actually not sure that this approach is any easier/better. What
>>>>>> are the advantages?
>>>>>
>>>>> The question is if current solution which you are using is fully
>>>>> compatible with binding. Adding bootloader property to the HW node
>>>>> doesn't look like a best solution.
>>>>> On the other hand chosen node is the location where OS specific
>>>>> properties are coming that's why I have suggested to use it.
>>>>
>>>>
>>>> I like Michal's idea.
>>>> We need some work for fdtgrep, but I believe it is worthwhile.
>>>>
>>>> From Michal's recent patches (http://patchwork.ozlabs.org/patch/498609/),
>>>> I guess he is tackling on syncing device trees between Linux and U-boot,
>>>> and this is right thing to do.
>>>>
>>>> Inserting the U-boot specific property here and there
>>>> makes it difficult.
>>>
>>> Yes it is attractive.
>>>
>>> With this scheme we cannot put the properties into .dtsi (i.e. make
>>> them common for the soc). Is there a way around that or would we just
>>> have to live with it?
>>
>> Why not? You can add chosen node to dtsi without any problem which
>> should be shared for all boards. The only one question remains which is
>> what exactly you need to add to dtsi.
>> One example is Zynq. We have 2 serial PS IPs. Which one you want to add?
>> Both?
>
> If you have something like this:
>
> soc {
> uart0 {
> };
> uart1 {
> };
> }
>
> in the common .dtsi then you can currently put the marker in the soc
> node. I'm not sure how you do that with your scheme. If we put it in
> the .dtsi then the .dts will override it.
>
> Does this matter?
As far as I understand DTSI is shared across all boards.
And DTS can overwrite DTSI at any time.
Let me extend this to make it more clear
soc: soc {
uart0: uart at XXX {
};
uart1: uart at XXX {
};
}
In DTSI I would put probably this to show everybody what needs to be there.
chosen {
u-boot,dm-pre-reloc = &soc &uart0 &uart1;
}
And in DTS if you have only one uart DTS will overwrite it.
chosen {
u-boot,dm-pre-reloc = &soc &uart0;
}
Or the next option is to make code smarter and detect that uart1 is
disabled that's why it is not used and only chosen from DTSI should be
enough.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150904/29548541/attachment.sig>
next prev parent reply other threads:[~2015-09-04 6:04 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-29 15:10 [U-Boot] [PATCH 00/13] dm: arm: zynq: Convert serial driver to driver model Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 01/13] fdt: Add a function to look up a /chosen property Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 02/13] fdt: Correct handling of alias regions Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 03/13] fdtgrep: Simplify the alias generation code Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 04/13] dm: serial: Deal with stdout-path with an alias Simon Glass
2015-08-31 11:13 ` Michal Simek
2015-08-31 13:54 ` Simon Glass
2015-08-31 14:08 ` Michal Simek
2015-08-31 23:12 ` Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 05/13] dm: spl: Generate u-boot-spl-dtb.bin only when enabled Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 06/13] dm: spl: Support device tree when BSS is in a different section Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 07/13] arm: zynq: Use separate device tree instead of embedded Simon Glass
2015-08-31 11:24 ` Michal Simek
2015-08-31 13:54 ` Simon Glass
2015-08-31 14:07 ` Michal Simek
2015-08-31 23:12 ` Simon Glass
2015-09-01 13:12 ` Michal Simek
2015-09-02 2:48 ` Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 08/13] arm: zynq: Drop unnecessary code in SPL board_init_f() Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 09/13] arm: zynq: Support the debug UART Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 10/13] dm: arm: zynq: Enable device tree control in SPL Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 11/13] arm: zynq: dts: Add U-Boot device tree additions Simon Glass
2015-08-31 10:01 ` Masahiro Yamada
2015-08-31 13:54 ` Simon Glass
2015-09-01 15:54 ` Masahiro Yamada
2015-08-31 11:30 ` Michal Simek
2015-08-31 13:54 ` Simon Glass
2015-08-31 14:16 ` Michal Simek
2015-08-31 23:13 ` Simon Glass
2015-09-01 15:41 ` Michal Simek
2015-09-01 16:19 ` Masahiro Yamada
2015-09-02 2:49 ` Simon Glass
2015-09-03 11:35 ` Michal Simek
2015-09-04 0:22 ` Simon Glass
2015-09-04 6:04 ` Michal Simek [this message]
2015-09-04 14:32 ` Simon Glass
2015-09-04 17:28 ` Michal Simek
2015-09-09 18:07 ` Simon Glass
2015-09-19 1:07 ` Michal Simek
2015-09-19 11:16 ` Tom Rini
2015-09-19 19:52 ` Simon Glass
2015-09-01 13:13 ` Michal Simek
2015-08-29 15:10 ` [U-Boot] [PATCH 12/13] arm: zynq: serial: Drop non-device-tree serial driver portions Simon Glass
2015-08-29 15:10 ` [U-Boot] [PATCH 13/13] arm: zynq: Move serial driver to driver model Simon Glass
2015-08-31 11:33 ` Michal Simek
2015-08-31 13:54 ` Simon Glass
2015-08-31 14:12 ` Michal Simek
2015-09-01 15:42 ` Michal Simek
2015-08-31 14:11 ` [U-Boot] [PATCH 00/13] dm: arm: zynq: Convert " Michal Simek
2015-08-31 23:12 ` Simon Glass
2015-09-01 15:45 ` Michal Simek
2015-09-01 17:41 ` Michal Simek
2015-09-01 17:50 ` Michal Simek
2015-09-02 14:05 ` Simon Glass
2015-09-04 5:53 ` Michal Simek
2015-09-04 23:40 ` Simon Glass
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=55E93475.4000007@monstr.eu \
--to=monstr@monstr.eu \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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