diff mbox

[U-Boot,v3,04/11] arm: rpi: Device tree modifications for U-Boot

Message ID 1438954951-13329-5-git-send-email-sjg@chromium.org
State Deferred
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Aug. 7, 2015, 1:42 p.m. UTC
This updates the device tree from the kernel version to something suitable
for U-Boot:

- Add stdout-path alias for console
- Mark the /soc node to be available pre-relocation so that the early serial
console works (we need the 'ranges' property to be available)

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/dts/bcm2835.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Stephen Warren Aug. 11, 2015, 4 a.m. UTC | #1
On 08/07/2015 07:42 AM, Simon Glass wrote:
> This updates the device tree from the kernel version to something suitable
> for U-Boot:
> 
> - Add stdout-path alias for console
> - Mark the /soc node to be available pre-relocation so that the early serial
> console works (we need the 'ranges' property to be available)

If you can get these changes into the kernel's copy of the DT, then this
patch is fine. If not, I don't think we should take this patch. The very
definition of DT is a SW-stack-agnostic data structure. Modifying it on
a per-SW-stack basis means we aren't doing DT, but rather something that
looks like DT but isn't. In that case, we shouldn't call it DT.
Simon Glass Aug. 11, 2015, 4:17 a.m. UTC | #2
Hi Stephen,

On 10 August 2015 at 22:00, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/07/2015 07:42 AM, Simon Glass wrote:
>> This updates the device tree from the kernel version to something suitable
>> for U-Boot:
>>
>> - Add stdout-path alias for console
>> - Mark the /soc node to be available pre-relocation so that the early serial
>> console works (we need the 'ranges' property to be available)
>
> If you can get these changes into the kernel's copy of the DT, then this
> patch is fine. If not, I don't think we should take this patch. The very
> definition of DT is a SW-stack-agnostic data structure. Modifying it on
> a per-SW-stack basis means we aren't doing DT, but rather something that
> looks like DT but isn't. In that case, we shouldn't call it DT.

The "u-boot," prefix is intended to indicate that it is
U-Boot-specific. Linux has "linux," and 800+ uses of it in the ARM
device tree source files.

I can certainly send this patch to Linux. Given your comment above,
will you take it?

Regards,
Simon
Stephen Warren Aug. 11, 2015, 4:25 a.m. UTC | #3
On 08/10/2015 10:17 PM, Simon Glass wrote:
> Hi Stephen,
> 
> On 10 August 2015 at 22:00, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 08/07/2015 07:42 AM, Simon Glass wrote:
>>> This updates the device tree from the kernel version to something suitable
>>> for U-Boot:
>>>
>>> - Add stdout-path alias for console
>>> - Mark the /soc node to be available pre-relocation so that the early serial
>>> console works (we need the 'ranges' property to be available)
>>
>> If you can get these changes into the kernel's copy of the DT, then this
>> patch is fine. If not, I don't think we should take this patch. The very
>> definition of DT is a SW-stack-agnostic data structure. Modifying it on
>> a per-SW-stack basis means we aren't doing DT, but rather something that
>> looks like DT but isn't. In that case, we shouldn't call it DT.
> 
> The "u-boot," prefix is intended to indicate that it is
> U-Boot-specific. Linux has "linux," and 800+ uses of it in the ARM
> device tree source files.
> 
> I can certainly send this patch to Linux. Given your comment above,
> will you take it?

Review of that change would have to be by the DT bindings maintainers on
the DT mailing list. Lee Jones (or perhaps Eric Anholt) owns applying
any RPi patches within Linux.
Simon Glass Aug. 12, 2015, 1:28 p.m. UTC | #4
Hi Stephen,

On 10 August 2015 at 22:25, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/10/2015 10:17 PM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On 10 August 2015 at 22:00, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 08/07/2015 07:42 AM, Simon Glass wrote:
>>>> This updates the device tree from the kernel version to something suitable
>>>> for U-Boot:
>>>>
>>>> - Add stdout-path alias for console
>>>> - Mark the /soc node to be available pre-relocation so that the early serial
>>>> console works (we need the 'ranges' property to be available)
>>>
>>> If you can get these changes into the kernel's copy of the DT, then this
>>> patch is fine. If not, I don't think we should take this patch. The very
>>> definition of DT is a SW-stack-agnostic data structure. Modifying it on
>>> a per-SW-stack basis means we aren't doing DT, but rather something that
>>> looks like DT but isn't. In that case, we shouldn't call it DT.
>>
>> The "u-boot," prefix is intended to indicate that it is
>> U-Boot-specific. Linux has "linux," and 800+ uses of it in the ARM
>> device tree source files.
>>
>> I can certainly send this patch to Linux. Given your comment above,
>> will you take it?
>
> Review of that change would have to be by the DT bindings maintainers on
> the DT mailing list. Lee Jones (or perhaps Eric Anholt) owns applying
> any RPi patches within Linux.

As you saw I sent a patch to that mailing list. Let's see how it goes.

Regards,
Simon
diff mbox

Patch

diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi
index 301c73f..bd6bff6 100644
--- a/arch/arm/dts/bcm2835.dtsi
+++ b/arch/arm/dts/bcm2835.dtsi
@@ -8,6 +8,7 @@ 
 
 	chosen {
 		bootargs = "earlyprintk console=ttyAMA0";
+		stdout-path = &uart;
 	};
 
 	soc {
@@ -16,6 +17,7 @@ 
 		#size-cells = <1>;
 		ranges = <0x7e000000 0x20000000 0x02000000>;
 		dma-ranges = <0x40000000 0x00000000 0x20000000>;
+		u-boot,dm-pre-reloc;
 
 		timer@7e003000 {
 			compatible = "brcm,bcm2835-system-timer";
@@ -92,7 +94,7 @@ 
 			#interrupt-cells = <2>;
 		};
 
-		uart@7e201000 {
+		uart: uart@7e201000 {
 			compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
 			reg = <0x7e201000 0x1000>;
 			interrupts = <2 25>;