From 62c5d9f2f69c63ebc581d0d375325b50e42aa56b Mon Sep 17 00:00:00 2001 From: Yi-Wei Wang Date: Wed, 15 Nov 2023 14:39:35 +0800 Subject: [PATCH] nv-platform: p3701: separate cvm from nv-common Remove tegra234-p3701-0000.dtsi from tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi and have cvm-specific file included in tegra234-p3737-0000+p3701-000*-nv.dts accordingly. In addition, create tegra234-p3701-0005.dtsi which includes same definitions as tegra234-p3701-0000.dtsi but with CMA size set to 512MB. Hence, no longer to handle the CMA size in the dynamic overlay. Bug 4378720 Signed-off-by: Yi-Wei Wang Change-Id: I4230f7d7a0a3cc5e189ee5a121981123bbb889c5 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/3016296 Reviewed-by: Brad Griffis Reviewed-by: svcacv GVS: Gerrit_Virtual_Submit --- nv-platform/tegra234-p3701-0005.dtsi | 21 +++++++++++++++++++ .../tegra234-p3737-0000+p3701-0000-nv.dts | 1 + .../tegra234-p3737-0000+p3701-0004-nv.dts | 1 + .../tegra234-p3737-0000+p3701-0005-nv.dts | 1 + .../tegra234-p3737-0000+p3701-0008-nv.dts | 1 + ...ra234-p3737-0000+p3701-xxxx-nv-common.dtsi | 1 - ...tegra234-p3737-0000+p3701-0000-dynamic.dts | 16 +------------- 7 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 nv-platform/tegra234-p3701-0005.dtsi diff --git a/nv-platform/tegra234-p3701-0005.dtsi b/nv-platform/tegra234-p3701-0005.dtsi new file mode 100644 index 0000000..396a74c --- /dev/null +++ b/nv-platform/tegra234-p3701-0005.dtsi @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +#include "tegra234-p3701-0000.dtsi" + +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + linux,cma { /* Needed for nvgpu comptags */ + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x20000000>; /* 512MB */ + alignment = <0x0 0x10000>; + linux,cma-default; + status = "okay"; + }; + }; +}; diff --git a/nv-platform/tegra234-p3737-0000+p3701-0000-nv.dts b/nv-platform/tegra234-p3737-0000+p3701-0000-nv.dts index 8905082..ed41bf6 100644 --- a/nv-platform/tegra234-p3737-0000+p3701-0000-nv.dts +++ b/nv-platform/tegra234-p3737-0000+p3701-0000-nv.dts @@ -5,3 +5,4 @@ #include "tegra234-p3737-0000+p3701-0000.dts" #include "tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi" +#include "tegra234-p3701-0000.dtsi" diff --git a/nv-platform/tegra234-p3737-0000+p3701-0004-nv.dts b/nv-platform/tegra234-p3737-0000+p3701-0004-nv.dts index e3c843e..c11c8df 100644 --- a/nv-platform/tegra234-p3737-0000+p3701-0004-nv.dts +++ b/nv-platform/tegra234-p3737-0000+p3701-0004-nv.dts @@ -5,3 +5,4 @@ #include "staging/tegra234-p3737-0000+p3701-0004.dts" #include "tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi" +#include "tegra234-p3701-0000.dtsi" diff --git a/nv-platform/tegra234-p3737-0000+p3701-0005-nv.dts b/nv-platform/tegra234-p3737-0000+p3701-0005-nv.dts index e9f5418..4d149fe 100644 --- a/nv-platform/tegra234-p3737-0000+p3701-0005-nv.dts +++ b/nv-platform/tegra234-p3737-0000+p3701-0005-nv.dts @@ -5,3 +5,4 @@ #include "staging/tegra234-p3737-0000+p3701-0005.dts" #include "tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi" +#include "tegra234-p3701-0005.dtsi" diff --git a/nv-platform/tegra234-p3737-0000+p3701-0008-nv.dts b/nv-platform/tegra234-p3737-0000+p3701-0008-nv.dts index f1f3c28..5aabde9 100644 --- a/nv-platform/tegra234-p3737-0000+p3701-0008-nv.dts +++ b/nv-platform/tegra234-p3737-0000+p3701-0008-nv.dts @@ -5,3 +5,4 @@ #include "staging/tegra234-p3737-0000+p3701-0008.dts" #include "tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi" +#include "tegra234-p3701-0008.dtsi" diff --git a/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi b/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi index 55d8ca4..9edcfe4 100644 --- a/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi +++ b/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi @@ -8,7 +8,6 @@ #include "nv-soc/tegra234-soc-audio-dai-links.dtsi" #include "nv-soc/tegra234-soc-camera.dtsi" #include "tegra234-p3737-0000.dtsi" -#include "tegra234-p3701-0000.dtsi" #include "tegra234-dcb-p3737-0000-p3701-0000.dtsi" / { diff --git a/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts b/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts index ab8f440..998616e 100644 --- a/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts +++ b/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts @@ -13,20 +13,6 @@ overlay-name = "Tegra234 p3737-0000+p3701-xxxx Dynamic Overlay"; fragment-t234-p3737-0000-p3701-0000@0 { - target-path = "/"; - board_config { - ids = "3701-0005-*","3701-0008-*"; - }; - __overlay__ { - reserved-memory { - linux,cma { /* Needed for nvgpu comptags */ - size = <0x0 0x20000000>; /* 512MB */ - }; - }; - }; - }; - - fragment-t234-p3737-0000-p3701-0000@1 { target-path = "/"; board_config { ids = ">=3737-0000-TS4", ">=3737-0000-RC1", ">=3737-0000-300"; @@ -69,7 +55,7 @@ }; }; - fragment-t234-p3737-0000-p3701-0000@2 { + fragment-t234-p3737-0000-p3701-0000@1 { target-path = "/"; board_config { ids = "3737-0000-TS1","3737-0000-TS2","3737-0000-TS3","3737-0000-EB1","3737-0000-EB2","3737-0000-EB3","3737-0000-000","3737-0000-100","3737-0000-200";