ARM: tegra: Work safely with 256 MB Colibri-T20 modules
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 9 Jul 2018 16:05:19 +0000 (18:05 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 9 Jul 2018 16:50:53 +0000 (18:50 +0200)
Colibri-T20 can come in 256 MB RAM (with 512 MB NAND) or 512 MB RAM
(with 1024 MB NAND) flavors.  Both of them will use the same DTSI
expecting the bootloader to do the fixup of /memory node.  However in
case it does not happen, let's stay on safe side by limiting the memory
to 256 MB for both versions of Colibri-T20.

Rename to remove the unnecessary memory size from the device tree file
name.  While at it, also follow the typical Toradex SoC, module, carrier
board hierarchy.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Tested-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/tegra20-colibri-iris.dts [moved from arch/arm/boot/dts/tegra20-iris-512.dts with 95% similarity]
arch/arm/boot/dts/tegra20-colibri.dtsi [moved from arch/arm/boot/dts/tegra20-colibri-512.dtsi with 98% similarity]

index 37a3de7..5daf9ef 100644 (file)
@@ -1039,7 +1039,7 @@ dtb-$(CONFIG_ARCH_TANGO) += \
        tango4-vantage-1172.dtb
 dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
        tegra20-harmony.dtb \
-       tegra20-iris-512.dtb \
+       tegra20-colibri-iris.dtb \
        tegra20-medcom-wide.dtb \
        tegra20-paz00.dtb \
        tegra20-plutux.dtb \
similarity index 95%
rename from arch/arm/boot/dts/tegra20-iris-512.dts
rename to arch/arm/boot/dts/tegra20-colibri-iris.dts
index 4012638..57f16c0 100644 (file)
@@ -1,10 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
-#include "tegra20-colibri-512.dtsi"
+#include "tegra20-colibri.dtsi"
 
 / {
-       model = "Toradex Colibri T20 512MB on Iris";
+       model = "Toradex Colibri T20 256/512 MB on Iris";
        compatible = "toradex,iris", "toradex,colibri_t20-512", "nvidia,tegra20";
 
        aliases {
similarity index 98%
rename from arch/arm/boot/dts/tegra20-colibri-512.dtsi
rename to arch/arm/boot/dts/tegra20-colibri.dtsi
index 5623ff8..dc06b23 100644 (file)
@@ -2,7 +2,7 @@
 #include "tegra20.dtsi"
 
 / {
-       model = "Toradex Colibri T20 512MB";
+       model = "Toradex Colibri T20 256/512 MB";
        compatible = "toradex,colibri_t20-512", "nvidia,tegra20";
 
        aliases {
        };
 
        memory@0 {
-               reg = <0x00000000 0x20000000>;
+               /*
+                * Set memory to 256 MB to be safe as this could be used on
+                * 256 or 512 MB module. It is expected from bootloader
+                * to fix this up for 512 MB version.
+                */
+               reg = <0x00000000 0x10000000>;
        };
 
        host1x@50000000 {