Skip to content

Commit 94d9b93

Browse files
thierryredingarndb
authored andcommitted
ARM: tegra: Restore DT ABI on Tegra124 Chromebooks
Commit 4829976 ("ARM: tegra: Fix unit_address_vs_reg DTC warnings for /memory") inadventently broke device tree ABI by adding a unit- address to the "/memory" node because the device tree compiler flagged the missing unit-address as a warning. Tegra124 Chromebooks (a.k.a. Nyan) use a bootloader that relies on the full name of the memory node in device tree being exactly "/memory". It can be argued whether this was a good decision or not, and some other bootloaders (such as U-Boot) do accept a unit-address in the name of the node, but the device tree is an ABI and we can't break existing setups just because the device tree compiler considers it bad practice to omit the unit-address nowadays. This partially reverts the offending commit and restores device tree ABI compatibility. Fixes: 4829976 ("ARM: tegra: Fix unit_address_vs_reg DTC warnings for /memory") Reported-by: Tristan Bastian <tristan-c.bastian@gmx.de> Signed-off-by: Thierry Reding <treding@nvidia.com> Tested-by: Tristan Bastian <tristan-c.bastian@gmx.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent a3b22b9 commit 94d9b93

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

arch/arm/boot/dts/tegra124-nyan.dtsi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,25 @@
1313
stdout-path = "serial0:115200n8";
1414
};
1515

16-
memory@80000000 {
16+
/*
17+
* Note that recent version of the device tree compiler (starting with
18+
* version 1.4.2) warn about this node containing a reg property, but
19+
* missing a unit-address. However, the bootloader on these Chromebook
20+
* devices relies on the full name of this node to be exactly /memory.
21+
* Adding the unit-address causes the bootloader to create a /memory
22+
* node and write the memory bank configuration to that node, which in
23+
* turn leads the kernel to believe that the device has 2 GiB of
24+
* memory instead of the amount detected by the bootloader.
25+
*
26+
* The name of this node is effectively ABI and must not be changed.
27+
*/
28+
memory {
29+
device_type = "memory";
1730
reg = <0x0 0x80000000 0x0 0x80000000>;
1831
};
1932

33+
/delete-node/ memory@80000000;
34+
2035
host1x@50000000 {
2136
hdmi@54280000 {
2237
status = "okay";

0 commit comments

Comments
 (0)