Received: by 10.223.185.116 with SMTP id b49csp2727335wrg; Mon, 5 Mar 2018 07:48:37 -0800 (PST) X-Google-Smtp-Source: AG47ELvaoxagKl3AlbnUvSJ5iC7D4YN3i7NoxvuTRf32b3it1xl4Hk+rza1/YJKvoITeAkuDucNR X-Received: by 2002:a17:902:e65:: with SMTP id 92-v6mr13538037plw.268.1520264917402; Mon, 05 Mar 2018 07:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520264917; cv=none; d=google.com; s=arc-20160816; b=kW4gtNd00F6Uxh+M39nh0QyyinWVKNZXo1IozMpXvdOESph3NU0G3e6j2hl3npn+iW ffJnHUulNATbKCqVRK/TQkELnN3A5Wluy/XjbyYuh6pvV9Wvq8+QyvOeMnYt9xJKEiZU MQPS40lvkf+pawSPQM61pEf3IX/tYOdOfSJoXMZ7aoZoXi3BwqnO2GuChaqrORieQmCd DqEe3yLuTjjVwc7AQAiTukqUlkLTCeZ59LCRPOj/BWYk+4koDDDZB4zT90OSUmKOVXeJ Ek5mqr9XX9aLOEuDQR5BiwcPIFsVCzzRATVwMsuQ6cnXoJQXeyzCpzQjKH0zPDXxAQe/ BYVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=KpGWw9Nkkgfej+1hHGdFn9S0jNIGXYu2UMe4P9cnJqY=; b=UJ5Pv6twluHdUTQCtQwC+feK11KAfAQeYNAuS4tyMXCji04NUiokdStPN0QR9BQlM7 1CqAK/rmQcNSmwZ4PTkOB0t0OCXivCF867GqBGl6gpONOs4sH6Udgm8ClQ7esRUWDlxk HsOmd0n6WhMoY1UAnJY613Q2ntqhb3+EfEFeofVW9deovadOgBAVjX+OOllUHl64TABV 4kLNz6vXgxKeu6WIFblRCUq0MZOu3K7EU7snbP+MV5vd4Zs+t+xaFhYvuusTV9/Y4Q4o N2wTKDvH+0hJuWcyQeuH1OMb2CE1ZtDh2Ijor99T8fvD86t+Xur5e88nYyoVbmGx9HKf DCbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10si151014pgu.428.2018.03.05.07.48.22; Mon, 05 Mar 2018 07:48:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932138AbeCEPqz (ORCPT + 99 others); Mon, 5 Mar 2018 10:46:55 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:10638 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932092AbeCEPqw (ORCPT ); Mon, 5 Mar 2018 10:46:52 -0500 X-UUID: cb59fb966ffa4e67b5565ac6019ee814-20180305 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1035679495; Mon, 05 Mar 2018 23:46:49 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 5 Mar 2018 23:46:48 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 5 Mar 2018 23:46:48 +0800 Message-ID: <1520264808.8089.261.camel@mtkswgap22> Subject: Re: [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2 From: Sean Wang To: Rob Herring CC: Matthias Brugger , Mark Rutland , , , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" Date: Mon, 5 Mar 2018 23:46:48 +0800 In-Reply-To: References: <20180302154215.xr3b2zlmuojw5i6l@rob-hp-laptop> <1520033229.8089.198.camel@mtkswgap22> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-03-05 at 08:16 -0600, Rob Herring wrote: > On Fri, Mar 2, 2018 at 5:27 PM, Sean Wang wrote: > > On Fri, 2018-03-02 at 09:42 -0600, Rob Herring wrote: > >> On Fri, Feb 23, 2018 at 06:16:36PM +0800, sean.wang@mediatek.com wrote: > >> > From: Sean Wang > >> > > >> > There is 2GB DDR3 available on bananapi-r2 board as [1] specified. > >> > > >> > [1] http://www.banana-pi.org/r2.html > >> > > >> > Signed-off-by: Sean Wang > >> > --- > >> > arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 5 +++++ > >> > 1 file changed, 5 insertions(+) > >> > > >> > diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts > >> > index 140ff78..3e8d02c 100644 > >> > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts > >> > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts > >> > @@ -38,6 +38,11 @@ > >> > default-state = "off"; > >> > }; > >> > }; > >> > + > >> > + memory { > >> > >> Unit address? > >> > > > > If I did it with adding unit address > > > > - memory { > > + memory@80000000 { > > device_type = "memory"; > > reg = <0 0x80000000 0 0x80000000>; > > }; > > > > > > bad dtc blob is being generated and contains two memory nodes, one is > > memory and the other is memory@80000000 whose blob disassembly detail is > > as the following. > > > > memory { > > device_type = "memory"; > > reg = <0x0 0x0 0x0 0x0>; > > }; > > > > > > > > memory@80000000 { > > device_type = "memory"; > > reg = <0x0 0x80000000 0x0 0x80000000>; > > }; > > > > > > and bad memory node with size 0 would cause the boot fails. > > > > > > is it a dtc compiler problem ? > > No, you are declaring "memory" node somewhere else. Perhaps using > skeleton.dtsi which we are trying to remove or you have some default. > Yes, your guess is right. the DTS explicitly includes skeleton64.dtsi so two memory node is being generated. > Using just 'memory' is fine if the base address is variable and > determined at boot time or you have a bootloader that expects just > 'memory'. Otherwise, this should be fixed, but you can do that after > this patch if you want. > The address where memory is located at is fixed so I should insert a patch removing skeleton64.dtsi before adding a unit address to each memory node. Furthermore, the original DTS including skeleton64.dtsi seems to be a little improper as CPU uses 32-bit addressing way to access all hardware devices on MT7623 SoC. Thus, it seems to be better even necessary to explicitly set both #address-cells and #size-cells to 1 at the root node and change reg property for following the child nodes when skeleton64.dtsi is being removed. > Rob