arm: dts: mt7623: fix invalid memory node being generated
authorSean Wang <sean.wang@mediatek.com>
Wed, 11 Apr 2018 08:53:56 +0000 (16:53 +0800)
committerMatthias Brugger <matthias.bgg@gmail.com>
Fri, 11 May 2018 15:02:09 +0000 (17:02 +0200)
Below two wrong nodes in existing DTS files would cause a fail boot since
in fact the address 0 is not the correct place the memory device locates
at.

memory {
        device_type = "memory";
        reg = <0x0 0x0 0x0 0x0>;
};

memory@80000000 {
        reg = <0x0 0x80000000 0x0 0x40000000>;
};

In order to avoid having a memory node starting at address 0, we can't
include file skeleton64.dtsi and instead need to explicitly manually
define a few of properties the DTS relies on such as #address-cells
and #size-cells in root node and device_type in the node memory@80000000.

Cc: stable@vger.kernel.org
Fixes: 31ac0d69a1d4 ("ARM: dts: mediatek: add MT7623 basic support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm/boot/dts/mt7623.dtsi
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
arch/arm/boot/dts/mt7623n-rfb.dtsi

index 68e987ddedc7a851f25ffec272763dd4f6443373..d4d04c365960ca76c115ee64b2a19e8785830245 100644 (file)
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/reset/mt2701-resets.h>
 #include <dt-bindings/thermal/thermal.h>
-#include "skeleton64.dtsi"
 
 / {
        compatible = "mediatek,mt7623";
        interrupt-parent = <&sysirq>;
+       #address-cells = <2>;
+       #size-cells = <2>;
 
        cpu_opp_table: opp-table {
                compatible = "operating-points-v2";
index bbf56f855e468b9ef1636629ed14be6d9144b869..5938e4c79debc0486ac481f33ee0234061c9365a 100644 (file)
        };
 
        memory@80000000 {
+               device_type = "memory";
                reg = <0 0x80000000 0 0x40000000>;
        };
 };
index a199ae78dd25b83d58ac70cdb82d85126df2e8f5..343e8efe5f2593cd598aae5792090ff99496d61c 100644 (file)
@@ -40,6 +40,7 @@
        };
 
        memory@80000000 {
+               device_type = "memory";
                reg = <0 0x80000000 0 0x40000000>;
        };