From patchwork Sat Feb 17 18:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13561500 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF00AC48BC3 for ; Sat, 17 Feb 2024 18:23:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DMVptlo9zMmY60oZj0SU1s7QZlVRQtTpZus+8HAbUPI=; b=TDcd5ikt2WaZta IYhtZedk8Xec8R27PzyM6n01WRoQ2Me/OLgsuYPV28RsHUZpKMuboyViJGNexB1ZgKSlW/TyYUsc4 xsemKUFgiyLFyoVip/nwhc9wmMXQEZUQmxcOIkRFz8O43StBdlIVeABCvHwOjtxeOSK9w2DMgUQtq xpYXdNJL2jvIJKgJcRxldUf5Ybm1lY8x+2zui4AMedpbO8DohtiqyJ9xY3KZpcpjRyR2seKbvzuh7 4P6y2idUihAUvVT7iJoEKKr5IaS7r/mp6e1LFNl4SyD25YbK+gzkfKGDshyD+t+/vDG9sicjG2pFc 0MQWRTEzT46O36NoGMJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbPKr-000000068gE-0i8n; Sat, 17 Feb 2024 18:22:49 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbPKo-000000068ft-1MtC for linux-arm-kernel@lists.infradead.org; Sat, 17 Feb 2024 18:22:47 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5101cd91017so4113457e87.2 for ; Sat, 17 Feb 2024 10:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708194164; x=1708798964; darn=lists.infradead.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=Dovcf13yx7y8WE/3o6ZxD6mwwUIJXyS5E3nGvyjgRKw=; b=UzZV/AB0maBnacuMFiBBVmcACNYeNtqB9BT/BqdhzBDfX2f6Z5AsCpasCfYHELFidU ix4RUyQRhmwNpqiiSWpRSEECP5lcQFq70fh8k1dJirt7R+DYKrT8m0UX/Sf9/b33Agdl Kbta7kN/l29QJsNDT7sXnuHIDJ0ZItZmEXPpw2VFzBH9pYWB2DzZplqFyHrmqxvkQih8 NpEAYPl9qhE5Wc1kB5Ee4W9JWOwMy3GH7O8UMOaHwRSa5AO4quXDYnL/CYPc2/rpzsUt PUFsxJxrrOUAP3pA7dMIN98Ky5VJaK6dzTe98Eoq9suoO+gi6O/WyDKT+luyn3eGuFpO r6tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708194164; x=1708798964; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Dovcf13yx7y8WE/3o6ZxD6mwwUIJXyS5E3nGvyjgRKw=; b=ghKS6Bzm/Od+jwx+b+rmtRsYviuqMHQwM4PUOJWF6qGY8Ne35obG7v6A/scKbGpMIW 6mZhgVfT8HnLtDushRly7ermNDhtbg1W/ItgPL79ksPKYnFSAi6EjuliQy9XKMWYf9as wfVbpf2TyCEWPHbeDAvnJrts6v814WDVEIZ/V2ErdGl28S1srC3j/9LjpiIYbelzbXK/ gC+xQAnv+HmCA2LkDaeB6n2yFgFHbu/bRsqZbw3QAY7QaGhdOgoi1kR8mt+KGbbvpucH klmQw06OWEZtB6aP3paZTy5rB6B8BQDBw8zRMqsoB/XFi1oMbsGq/D2C+5PQQHlev9JA jQhA== X-Forwarded-Encrypted: i=1; AJvYcCWt6PtrJpkfl2Ek4umW+wmMWNl6Djo2EfFh4WiIVuS3x2AfVlx83BUf4Ky5BhHOVmm2XueCsZ0dPFbEuUSi8ZtkAM5R8x/WKzI3meoZcG0L7tFIgsg= X-Gm-Message-State: AOJu0Yy/hX+A8Aysi9kiLhePH993kOA9bXA3GYVc2IMxM0KHMir7tyoM NFqDvd5W/4XCmgTJO0IAo4jqK7XILNwDtoiqIRWwENr9tH4STpYY X-Google-Smtp-Source: AGHT+IFA9gLy0VjL49HWtcm3DCshExQ/nRE0roMCJYdiHrnptZHlUeEpYO5V+0rz/0w1MwdGSnujaQ== X-Received: by 2002:a19:6904:0:b0:511:6b24:ba46 with SMTP id e4-20020a196904000000b005116b24ba46mr4771705lfc.34.1708194163841; Sat, 17 Feb 2024 10:22:43 -0800 (PST) Received: from hex.my.domain (83.8.201.110.ipv4.supernova.orange.pl. [83.8.201.110]) by smtp.gmail.com with ESMTPSA id p4-20020a05640243c400b00560c6ff443esm1058750edc.66.2024.02.17.10.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 10:22:43 -0800 (PST) From: Artur Weber Date: Sat, 17 Feb 2024 19:22:40 +0100 Subject: [PATCH] ARM: dts: exynos4412-*: decrease memory to account for unusable region MIME-Version: 1.0 Message-Id: <20240217-exynos4-memsize-fix-v1-1-7858e9c5f844@gmail.com> X-B4-Tracking: v=1; b=H4sIAG/50GUC/x2MSwqAMBDFriKzdkCLH/Qq4kLbp87CKh0QP3h3i 8sEkocUQaDUJg8FHKKy+Qh5mpBdBj+DxUUmk5kiM3nNOC+/acErVpUbPMnJzlo3Nhjr0lUUyz0 g6v/a9e/7AfbELrllAAAA To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: Henrik Grimler , =?utf-8?q?Martin_J=C3=BCcker?= , Jack Knightly , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, replicant@osuosl.org, Artur Weber X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708194162; l=3075; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=8oifpfarV9J6Wvv+SArdQLyLIPIXjJtvpilJDp3o5xY=; b=1fLMVp+k6r+NLxpjwtkrkl5xzZEBvgwcASiLsLI04vAxZIDYv6RqkfRVLBWBFQDbaxpvTZw9P OdR5+rinfu0DgUKACC2D5z46VIwXk2ph+yL1jjbWGUtfdQubndboTyS X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240217_102246_408535_0890F772 X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The last 4 MiB of RAM on those devices is likely used by trustzone firmware, and is unusable under Linux. Change the device tree memory node accordingly. The proprietary bootloader (S-BOOT) passes these memory ranges through ATAG_MEM; this change allows us to have the correct memory ranges without relying on ATAG_MEM. Tested-by: Henrik Grimler # i9300, i9305 Signed-off-by: Artur Weber --- This follows a similar fix implemented for the exynos5420-based Galaxy Tab boards: https://lore.kernel.org/all/20240130-galaxy-tab-s-cleanup-v1-3-d4e17857241d@grimler.se/ ...which in turn is inspired by another fix applied to exynos5422 Odroid devices, 6591a02e17e6 ("ARM: dts: reduce total RAM by 22 MiB for exynos5422-odroidxu3"): https://lore.kernel.org/all/1421842972-25807-1-git-send-email-m.szyprowski@samsung.com/ --- arch/arm/boot/dts/samsung/exynos4412-i9300.dts | 2 +- arch/arm/boot/dts/samsung/exynos4412-i9305.dts | 2 +- arch/arm/boot/dts/samsung/exynos4412-n710x.dts | 2 +- arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) --- base-commit: 0f1dd5e91e2ba3990143645faff2bcce2d99778e change-id: 20240217-exynos4-memsize-fix-dccdb9eb75d6 Best regards, diff --git a/arch/arm/boot/dts/samsung/exynos4412-i9300.dts b/arch/arm/boot/dts/samsung/exynos4412-i9300.dts index 61aca5798f38..b79d456e976d 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-i9300.dts +++ b/arch/arm/boot/dts/samsung/exynos4412-i9300.dts @@ -18,7 +18,7 @@ / { memory@40000000 { device_type = "memory"; - reg = <0x40000000 0x40000000>; + reg = <0x40000000 0x3fc00000>; }; }; diff --git a/arch/arm/boot/dts/samsung/exynos4412-i9305.dts b/arch/arm/boot/dts/samsung/exynos4412-i9305.dts index 77083f1a8273..1048ef5d9bc3 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-i9305.dts +++ b/arch/arm/boot/dts/samsung/exynos4412-i9305.dts @@ -11,7 +11,7 @@ / { memory@40000000 { device_type = "memory"; - reg = <0x40000000 0x80000000>; + reg = <0x40000000 0x7fc00000>; }; }; diff --git a/arch/arm/boot/dts/samsung/exynos4412-n710x.dts b/arch/arm/boot/dts/samsung/exynos4412-n710x.dts index 0a151437fc73..eee1000dea92 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-n710x.dts +++ b/arch/arm/boot/dts/samsung/exynos4412-n710x.dts @@ -9,7 +9,7 @@ / { memory@40000000 { device_type = "memory"; - reg = <0x40000000 0x80000000>; + reg = <0x40000000 0x7fc00000>; }; /* bootargs are passed in by bootloader */ diff --git a/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi b/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi index 0b89d5682f85..95fc63295860 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi @@ -23,7 +23,7 @@ / { memory@40000000 { device_type = "memory"; - reg = <0x40000000 0x80000000>; + reg = <0x40000000 0x7fc00000>; }; aliases {