Patchwork [U-Boot,v2,5/7] Tegra30: Cardhu: Add DT files

login
register
mail settings
Submitter Tom Warren
Date Dec. 3, 2012, 11:45 p.m.
Message ID <1354578322-1834-6-git-send-email-twarren@nvidia.com>
Download mbox | patch
Permalink /patch/203498/
State Superseded
Delegated to: Tom Warren
Headers show

Comments

Tom Warren - Dec. 3, 2012, 11:45 p.m.
These are stripped down for bringup, They'll be filled out later
to match-up with the kernel DT contents, and/or as devices are
brought up (mmc, usb, spi, etc.).

Signed-off-by: Tom Warren <twarren@nvidia.com>
---
V2: Reduce to the minimum needed to build/boot to cmd prompt

 arch/arm/dts/tegra30.dtsi           |    6 ++++++
 board/nvidia/dts/tegra30-cardhu.dts |   14 ++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/dts/tegra30.dtsi
 create mode 100644 board/nvidia/dts/tegra30-cardhu.dts
Stephen Warren - Dec. 4, 2012, 12:40 a.m.
On 12/03/2012 04:45 PM, Tom Warren wrote:
> These are stripped down for bringup, They'll be filled out later
> to match-up with the kernel DT contents, and/or as devices are
> brought up (mmc, usb, spi, etc.).
> 
> Signed-off-by: Tom Warren <twarren@nvidia.com>

> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi

> +/ {
> +	model = "NVIDIA Tegra30";

We don't really need a model property here, but it's not a big deal.

> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts

> +/memreserve/ 0x1c000000 0x04000000;

/memreserve/ isn't correct for U-Boot; no memory should be reserved.

> +/ {
> +	model = "NVIDIA Cardhu";
> +	compatible = "nvidia,cardhu", "nvidia,tegra30";
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0xc0000000>;

That last number should be 0x40000000; it's a size not an end-of-region
value.

Note that once things get more advanced, we'll need to split this up
into tegra30-cardhu.dtsi, tegra30-cardhu-a02.dts,
tegra30-cardhu-a04.dts, but we can do that later.
Simon Glass - Dec. 4, 2012, 12:49 a.m.
Hi Stephen,

On Mon, Dec 3, 2012 at 4:40 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 12/03/2012 04:45 PM, Tom Warren wrote:
>> These are stripped down for bringup, They'll be filled out later
>> to match-up with the kernel DT contents, and/or as devices are
>> brought up (mmc, usb, spi, etc.).
>>
>> Signed-off-by: Tom Warren <twarren@nvidia.com>
>
>> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
>
>> +/ {
>> +     model = "NVIDIA Tegra30";
>
> We don't really need a model property here, but it's not a big deal.

We do actually use it in U-Boot (in ARM patches on the mailing list).

>
>> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
>
>> +/memreserve/ 0x1c000000 0x04000000;
>
> /memreserve/ isn't correct for U-Boot; no memory should be reserved.

But don't we want to use the same fdt for U-Boot as the kernel?

>
>> +/ {
>> +     model = "NVIDIA Cardhu";
>> +     compatible = "nvidia,cardhu", "nvidia,tegra30";
>> +
>> +     memory {
>> +             device_type = "memory";
>> +             reg = <0x80000000 0xc0000000>;
>
> That last number should be 0x40000000; it's a size not an end-of-region
> value.
>
> Note that once things get more advanced, we'll need to split this up
> into tegra30-cardhu.dtsi, tegra30-cardhu-a02.dts,
> tegra30-cardhu-a04.dts, but we can do that later.
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Regards,
Simon
Stephen Warren - Dec. 4, 2012, 12:57 a.m.
On 12/03/2012 05:49 PM, Simon Glass wrote:
> Hi Stephen,
> 
> On Mon, Dec 3, 2012 at 4:40 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 12/03/2012 04:45 PM, Tom Warren wrote:
>>> These are stripped down for bringup, They'll be filled out later
>>> to match-up with the kernel DT contents, and/or as devices are
>>> brought up (mmc, usb, spi, etc.).
>>>
>>> Signed-off-by: Tom Warren <twarren@nvidia.com>
>>
>>> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
>>
>>> +/ {
>>> +     model = "NVIDIA Tegra30";
>>
>> We don't really need a model property here, but it's not a big deal.
> 
> We do actually use it in U-Boot (in ARM patches on the mailing list).

Hmmm. The tegra20.dtsi file doesn't have one...

>>> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
>>
>>> +/memreserve/ 0x1c000000 0x04000000;
>>
>> /memreserve/ isn't correct for U-Boot; no memory should be reserved.
> 
> But don't we want to use the same fdt for U-Boot as the kernel?

The only reason for a memreserve are:

a) To reserve the current display frame-buffer. This is a run-time thing
that U-Boot should add to the DTB itself, not pre-populated in the DT.

b) To reserve memory for some kind of co-processor. We shouldn't be
using memreserve for this any more, but rather allocating the memory
dynamically in the kernel.

So irrespective of the answer to your question we should still remove this.

Re: your question: Perhaps, but we're so far away from that right now,
it almost doesn't seem worth caring yet. Also, while we should certainly
use the same bindings, I'm not sure we should use the same actual .dtb
file bitstream, since the .dtb passed to the kernel should be loaded
from the filesystem/... where the kernel zImage was, not embedded into
the bootloader.
Simon Glass - Dec. 4, 2012, 1:01 a.m.
Hi Stephen,

On Mon, Dec 3, 2012 at 4:57 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 12/03/2012 05:49 PM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On Mon, Dec 3, 2012 at 4:40 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 12/03/2012 04:45 PM, Tom Warren wrote:
>>>> These are stripped down for bringup, They'll be filled out later
>>>> to match-up with the kernel DT contents, and/or as devices are
>>>> brought up (mmc, usb, spi, etc.).
>>>>
>>>> Signed-off-by: Tom Warren <twarren@nvidia.com>
>>>
>>>> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
>>>
>>>> +/ {
>>>> +     model = "NVIDIA Tegra30";
>>>
>>> We don't really need a model property here, but it's not a big deal.
>>
>> We do actually use it in U-Boot (in ARM patches on the mailing list).
>
> Hmmm. The tegra20.dtsi file doesn't have one...

No problem, then it won't display a model.

>
>>>> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
>>>
>>>> +/memreserve/ 0x1c000000 0x04000000;
>>>
>>> /memreserve/ isn't correct for U-Boot; no memory should be reserved.
>>
>> But don't we want to use the same fdt for U-Boot as the kernel?
>
> The only reason for a memreserve are:
>
> a) To reserve the current display frame-buffer. This is a run-time thing
> that U-Boot should add to the DTB itself, not pre-populated in the DT.
>
> b) To reserve memory for some kind of co-processor. We shouldn't be
> using memreserve for this any more, but rather allocating the memory
> dynamically in the kernel.
>
> So irrespective of the answer to your question we should still remove this.
>
> Re: your question: Perhaps, but we're so far away from that right now,
> it almost doesn't seem worth caring yet. Also, while we should certainly
> use the same bindings, I'm not sure we should use the same actual .dtb
> file bitstream, since the .dtb passed to the kernel should be loaded
> from the filesystem/... where the kernel zImage was, not embedded into
> the bootloader.

I don't really mind, but I hold fond hopes of using the same source
for each at some point. Not an issue for now.

Regards,
Simon
Tom Warren - Dec. 4, 2012, 8:29 p.m.
Simon,

On Mon, Dec 3, 2012 at 6:01 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Stephen,
>
> On Mon, Dec 3, 2012 at 4:57 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 12/03/2012 05:49 PM, Simon Glass wrote:
>>> Hi Stephen,
>>>
>>> On Mon, Dec 3, 2012 at 4:40 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>> On 12/03/2012 04:45 PM, Tom Warren wrote:
>>>>> These are stripped down for bringup, They'll be filled out later
>>>>> to match-up with the kernel DT contents, and/or as devices are
>>>>> brought up (mmc, usb, spi, etc.).
>>>>>
>>>>> Signed-off-by: Tom Warren <twarren@nvidia.com>
>>>>
>>>>> diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
>>>>
>>>>> +/ {
>>>>> +     model = "NVIDIA Tegra30";
>>>>
>>>> We don't really need a model property here, but it's not a big deal.
>>>
>>> We do actually use it in U-Boot (in ARM patches on the mailing list).
>>
>> Hmmm. The tegra20.dtsi file doesn't have one...
>
> No problem, then it won't display a model.

Actually, every other build (T20) has the model declared in the .dts
file. Stephen is correct that T30 has it in the .dtsi file, too (not
sure why - another artifact of our internal repo), so removing it will
bring it in line with all the other Tegra builds, and (I assume) will
still display a model name.

>
>>
>>>>> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
>>>>
>>>>> +/memreserve/ 0x1c000000 0x04000000;
>>>>
>>>> /memreserve/ isn't correct for U-Boot; no memory should be reserved.
>>>
>>> But don't we want to use the same fdt for U-Boot as the kernel?
>>
>> The only reason for a memreserve are:
>>
>> a) To reserve the current display frame-buffer. This is a run-time thing
>> that U-Boot should add to the DTB itself, not pre-populated in the DT.
>>
>> b) To reserve memory for some kind of co-processor. We shouldn't be
>> using memreserve for this any more, but rather allocating the memory
>> dynamically in the kernel.
>>
>> So irrespective of the answer to your question we should still remove this.
>>
>> Re: your question: Perhaps, but we're so far away from that right now,
>> it almost doesn't seem worth caring yet. Also, while we should certainly
>> use the same bindings, I'm not sure we should use the same actual .dtb
>> file bitstream, since the .dtb passed to the kernel should be loaded
>> from the filesystem/... where the kernel zImage was, not embedded into
>> the bootloader.
>
> I don't really mind, but I hold fond hopes of using the same source
> for each at some point. Not an issue for now.

Note that the only Tegra20 build that has a memreserve declared
(besides T30) is Seaboard.

I'll remove it, as well as the extra model = line in the .dtsi.

Tom
>
> Regards,
> Simon

Patch

diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
new file mode 100644
index 0000000..e29f5f6
--- /dev/null
+++ b/arch/arm/dts/tegra30.dtsi
@@ -0,0 +1,6 @@ 
+/include/ "skeleton.dtsi"
+
+/ {
+	model = "NVIDIA Tegra30";
+	compatible = "nvidia,tegra30";
+};
diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
new file mode 100644
index 0000000..0aa2625
--- /dev/null
+++ b/board/nvidia/dts/tegra30-cardhu.dts
@@ -0,0 +1,14 @@ 
+/dts-v1/;
+
+/memreserve/ 0x1c000000 0x04000000;
+/include/ ARCH_CPU_DTS
+
+/ {
+	model = "NVIDIA Cardhu";
+	compatible = "nvidia,cardhu", "nvidia,tegra30";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0xc0000000>;
+	};
+};