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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:25:00 +0000 (11:25 +0200)
commit c0b0d540db1a8bfb041166c4991dd6f624e8de45 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/boot/dts/mt7623.dtsi
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
arch/arm/boot/dts/mt7623n-rfb.dtsi

index 36983a7d7cfd4915a5f22b2e5d0c6e28f77125c8..1853573235724419002fd7617ddb9bf0e9a20fc3 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 7de704575aeeb80bc912cf7e0760e5cb1479a965..e96c0ca97972098615d065f9155c1f9e0c3da685 100644 (file)
        };
 
        memory@80000000 {
+               device_type = "memory";
                reg = <0 0x80000000 0 0x40000000>;
        };
 };
index 256c5fd947bf4344bc6fbd42156ca523a52c3489..43c9d7ca23a0d86a4db1ba55d8e963eb9a256d7b 100644 (file)
@@ -47,6 +47,7 @@
        };
 
        memory@80000000 {
+               device_type = "memory";
                reg = <0 0x80000000 0 0x40000000>;
        };