[U-Boot] [PATCH 11/13] arm: zynq: dts: Add U-Boot device tree additions

Michal Simek
2015-09-01T15:41:40Z

On 09/01/2015 01:13 AM, Simon Glass wrote:
> Hi Michal,
>
> On 31 August 2015 at 08:16, Michal Simek <monstr@monstr.eu> wrote:
>> On 08/31/2015 03:54 PM, Simon Glass wrote:
>>> Hi Michal,
>>>
>>> On 31 August 2015 at 05:30, Michal Simek <monstr@monstr.eu> wrote:
>>>> On 08/29/2015 05:10 PM, Simon Glass wrote:
>>>>> We need to mark some device tree nodes so that they are available before
>>>>> relocation. This enables driver model to find these automatically. In the
>>>>> case of SPL it ensures that these nodes will be retained in SPL.
>>>>>
>>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>>> ---
>>>>>
>>>>> arch/arm/dts/zynq-7000.dtsi | 1 +
>>>>> arch/arm/dts/zynq-microzed.dts | 5 +++++
>>>>> arch/arm/dts/zynq-picozed.dts | 5 +++++
>>>>> arch/arm/dts/zynq-zc702.dts | 1 +
>>>>> arch/arm/dts/zynq-zc706.dts | 1 +
>>>>> arch/arm/dts/zynq-zc770-xm010.dts | 1 +
>>>>> arch/arm/dts/zynq-zc770-xm011.dts | 1 +
>>>>> arch/arm/dts/zynq-zc770-xm012.dts | 1 +
>>>>> arch/arm/dts/zynq-zc770-xm013.dts | 1 +
>>>>> arch/arm/dts/zynq-zed.dts | 1 +
>>>>> arch/arm/dts/zynq-zybo.dts | 1 +
>>>>> 11 files changed, 19 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi
>>>>> index 0b62cb0..12614f2 100644
>>>>> --- a/arch/arm/dts/zynq-7000.dtsi
>>>>> +++ b/arch/arm/dts/zynq-7000.dtsi
>>>>> @@ -54,6 +54,7 @@
>>>>> };
>>>>>
>>>>> amba: amba {
>>>>> + u-boot,dm-pre-reloc;
>>>>> compatible = "simple-bus";
>>>>> #address-cells = <1>;
>>>>> #size-cells = <1>;
>>>>> diff --git a/arch/arm/dts/zynq-microzed.dts b/arch/arm/dts/zynq-microzed.dts
>>>>> index c373a2c..5dff18e6 100644
>>>>> --- a/arch/arm/dts/zynq-microzed.dts
>>>>> +++ b/arch/arm/dts/zynq-microzed.dts
>>>>> @@ -21,3 +21,8 @@
>>>>> reg = <0 0x40000000>;
>>>>> };
>>>>> };
>>>>> +
>>>>> +&uart1 {
>>>>> + u-boot,dm-pre-reloc;
>>>>
>>>> Was this reviewed on DT mailing list?
>>>
>>> There is a thread going at present for Raspberry Pi but it had not
>>> yielded much light last time I looked.
>>>
>>>>
>>>> TBH adding this to every node seems to me a lot of work.
>>>
>>> This i how it works at present. Typically we only have a UART and that
>>> is not necessary since U-Boot can force-bind this. But when the UART
>>> is not in the root node we have to add something.
>>
>> It is partially problem with DT mess that we have platforms with and
>> without bus. :-)
>>
>>>
>>>> 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>;

>
> 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.

>>
>>
>>> If you like you could look at working up a patch for this. I'm
>>> certainly interested in other ideas. It does need to be efficient.
>>
>> I will test this series and will look at it in more details soon.
>
> Thanks.
>
> BTW are there zynqmp dev boards available at reasonable cost? I did
> this Zynq series because I discovered some old patches that were not
> applied and decided to update then. It's a really interesting platform
> - FPGA, etc.

Not now. But you can use qemu platform. I will look at it to see what
there is. But I have confirmation that you should be able to run u-boot
there.

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/20150901/7fe48cab/attachment.sig>