Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3243700imc; Wed, 13 Mar 2019 12:33:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMN3qHqOeTcNr3S6EiQwYS4/rsDMJnpOUzYsU83tXjS+rFYKRmcLOv1FFfH1jgwi/moJIU X-Received: by 2002:a17:902:aa87:: with SMTP id d7mr45668050plr.146.1552505589419; Wed, 13 Mar 2019 12:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552505589; cv=none; d=google.com; s=arc-20160816; b=vgb8ykGnAyuqNCdJoleukWVFmD8l2K+2t3lbRKVrZFsFNPA+qqd/ZNfWWmgWOSISkK 3KjEnsvNOupJmNSN5EQxPGA5BCBCJyBNwrJQGbpQZ7EeKGaQDvLmeemmoTIoRbp1Tk1J pOiK4LxIEBsGkHEKmyAuTc8mYtJiQqfqn/n1NSyDvCPQn2ncKOSQwSuKjeKPaodD2B6E vgg6IcNxNK1wSYmNYGpxGNBBtFVQMi4XizJS1tdZlL3J5u/xGD0JcgsRA2oTifrXfDJR 6JP7s1GyoCGtA0KhTM6eTW2xFf84HZC+/vs/KXZy+L3GkNgyisgnCuuY1rhWRVbgTfIY jbmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Rk5hsrI7zbWmDHbr6hfN8TVaHCn5NuJDIg2b5Xw/D2A=; b=njiUigwvl0M62vIDOxk7FYzR5enY8CCpwi4FA7PYOBhuQTuh37KWGRo9Mc40mvNOTM 1MBu4V5WlLQQaP1dKVE9XmR28qm4CoXdJIrqP9E/897aawRMJoRuOpCxPDZQSksHDKZF 4SDwWvmKBD+dDjxzGHVSC4Xgp6d5Xr15gbfTBC2Spiwg4Y7GOjKjwqL94Jpst6G3BKjA 0/pqyhCzE/C+codjbJXjJ0GeuV1KohiazxX9K4eo+wqeNf97OO+qfqZVsAUuEaIfmDqp mmba+jAA5wh2ih2BTpHMR/CZU6fV6rUBEl4ETtTnPzFahkvb8yGbpQvlK/NTc3DO6EO2 bK3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C87J9lgt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si11719554plb.426.2019.03.13.12.32.53; Wed, 13 Mar 2019 12:33:09 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=C87J9lgt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727668AbfCMTb4 (ORCPT + 99 others); Wed, 13 Mar 2019 15:31:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:41984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727471AbfCMTL0 (ORCPT ); Wed, 13 Mar 2019 15:11:26 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 616AF2173C; Wed, 13 Mar 2019 19:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552504285; bh=mMofaRByHjHV8jKqOEAERfdAx178lalRUCmPJoX82eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C87J9lgtA3pB/INTHWdBlMdYyub8So14f4yVl8uc9qe9XNyYXeW3vJAGpnxL38ca5 NIn9jDNZ7DSVqHwOmW/w+nQGIqASzjXXQ/r3M0UhSwwMHMQ3g3UBrw03xry2AU5VKv Oc3Mr30QCT94LKuLXQCJTS1sLi3jyw2JHlqNoaa8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thierry Reding , Arnd Bergmann , Sasha Levin , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH AUTOSEL 4.20 31/60] ARM: tegra: Restore DT ABI on Tegra124 Chromebooks Date: Wed, 13 Mar 2019 15:09:52 -0400 Message-Id: <20190313191021.158171-31-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190313191021.158171-1-sashal@kernel.org> References: <20190313191021.158171-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thierry Reding [ Upstream commit 94d9b9337d09bdd27735005b3251d97ab29f7273 ] Commit 482997699ef0 ("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: 482997699ef0 ("ARM: tegra: Fix unit_address_vs_reg DTC warnings for /memory") Reported-by: Tristan Bastian Signed-off-by: Thierry Reding Tested-by: Tristan Bastian Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/boot/dts/tegra124-nyan.dtsi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi index d5f11d6d987e..bc85b6a166c7 100644 --- a/arch/arm/boot/dts/tegra124-nyan.dtsi +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi @@ -13,10 +13,25 @@ stdout-path = "serial0:115200n8"; }; - memory@80000000 { + /* + * Note that recent version of the device tree compiler (starting with + * version 1.4.2) warn about this node containing a reg property, but + * missing a unit-address. However, the bootloader on these Chromebook + * devices relies on the full name of this node to be exactly /memory. + * Adding the unit-address causes the bootloader to create a /memory + * node and write the memory bank configuration to that node, which in + * turn leads the kernel to believe that the device has 2 GiB of + * memory instead of the amount detected by the bootloader. + * + * The name of this node is effectively ABI and must not be changed. + */ + memory { + device_type = "memory"; reg = <0x0 0x80000000 0x0 0x80000000>; }; + /delete-node/ memory@80000000; + host1x@50000000 { hdmi@54280000 { status = "okay"; -- 2.19.1