From patchwork Mon Feb 11 09:48:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1039729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Co23MviV"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43ygvm6XDqz9sML for ; Mon, 11 Feb 2019 20:48:20 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726036AbfBKJsT (ORCPT ); Mon, 11 Feb 2019 04:48:19 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:33942 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfBKJsT (ORCPT ); Mon, 11 Feb 2019 04:48:19 -0500 Received: by mail-wm1-f67.google.com with SMTP id y185so14006008wmd.1 for ; Mon, 11 Feb 2019 01:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J7RvHl+LPyQ1r+IJhJsVjEYgSCpW++Q68IDAp7yfvaQ=; b=Co23MviVHoCJtaftk/ogaut2GcR80AOZRLj2qZrI43o6uqgkgaFSw+I9z0eGKwDITt jJkaF/QLmsqwQRhe57ZAuc9IlIC8CNwDVL7pjMifu5LwMoecb3xcaSFGTQKtijs4zApy lP4rxMJon4oaMFGU/qumarAEMbN/CgG4M3BuRvZlh6IREHjEFGZ962HuSrnTvotyfcDZ CyD8jziIMFCVRg69mdDnRmGRBkPqpmOB5BWpBDhRo0UU2ImDyAWoMmlp957jRFKqaQuW +zrU10rV5rHYJkyKAoPDy6zM3buO5tiAXoTrQ1PrEeVd02hMgyTEdFwqDce1x7iirdWG zLBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J7RvHl+LPyQ1r+IJhJsVjEYgSCpW++Q68IDAp7yfvaQ=; b=is8KGO+KyI5SJu8yJ7czj1qsKCpaPyuxQ7pxMHxEUgwV9WVjZcmDGTg2/AHVcMgRwq uRVDyBIVk0UT4Hz3H+lAk6Jy9B1DMmngUUz0iw41LLMMC7ZdnvG9vwbHesZF3uwUZqxW dd/1BPRFWhH3bb5SnPndekNR5IWhuVSico3mcZhYfEQkIWQL7/U85CpiHO8VsW/WHSZO cpJHZ929xL/eUPM1k3LEBsjd84DNYjUGlbgeqI2AXXjq7XJ9KpAtDwujfQtvctRSrVmT 1tGixLtzrxeNHIq8f2SuzAKnvAlxKvP9odq+OgHYwMyb5XYFp/Tib0Z118IZFnJuekDX neLg== X-Gm-Message-State: AHQUAuZ3nvbdoz7dgZ0X6TvxrvcP0roEzFeJWTK+DEs6qpKDSa15M8Qx mTYZhNbtSfdJAIuqy1C80Oc= X-Google-Smtp-Source: AHgI3IY7wrdkXPItNFXhdB/LELTHryuZzPN6aLOR/jrCYGTjcLImEWDAKhiQAib4MxDu7eeWQIwx+A== X-Received: by 2002:adf:ba8d:: with SMTP id p13mr21735320wrg.53.1549878497627; Mon, 11 Feb 2019 01:48:17 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id c14sm995449wrn.12.2019.02.11.01.48.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 01:48:17 -0800 (PST) From: Thierry Reding To: Thierry Reding Cc: Tristan Bastian , Jon Hunter , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: tegra: Restore DT ABI on Tegra124 Chromebooks Date: Mon, 11 Feb 2019 10:48:15 +0100 Message-Id: <20190211094815.4561-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Thierry Reding 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 --- arch/arm/boot/dts/tegra124-nyan.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi index d5f11d6d987e..4433008d7aa6 100644 --- a/arch/arm/boot/dts/tegra124-nyan.dtsi +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi @@ -13,7 +13,19 @@ 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 { reg = <0x0 0x80000000 0x0 0x80000000>; };