Compare commits

..

8 Commits

Author SHA1 Message Date
Paritosh Dixit
19952c8e25 device-tree: generic: Fix issue in use of objtree
Fix issue in building the DTBs when KERNEL_OUTPUT and KERNEL_HEADERS
are specified as different directories in the OOT modules' Makefile.
In that case, srctree is set to KERNEL_HEADERS and objtree is set to
KERNEL_OUTPUT, and device-tree Makefile should be able to handle the
case when srctree and objtree are specified as different directories.

Bug 4295120

Change-Id: I164288e957f791d8e8072926743d0a80e23da9cb
Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033099
Reviewed-by: svc-sw-mobile-l4t <svc-sw-mobile-l4t@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
Laxman Dewangan
ccfbeb3f81 device-tree: generic: Add support to scan DT of internal SoCs
Add the support to build the DT of internal SoCs without
adding direct name from the Makefile but passed from the
make command. This will help to make the DT of all internal
SoCs.

Bug 4197981

Change-Id: I03c55cef5903a814a20d6f86d8ecfffe552daf29
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2982406
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
Sameer Pujar
8e9ae77c13 device-tree: generic: Add include path for Jetson-IO overlays
There are platform specific overlays that can be applied by Jetson-IO
tool. Basically these overlays bring up additional functionality on a
given GPIO expansion header on the platform. These platform specific
overlays in turn depend on some of the common overlays and dt-binding
headers. Add these paths to enable build of Jetson-IO overlays.

Bug 4161664

Change-Id: Ia69df6e7e2c9555b151520ddec5ec9c75e6c1cb2
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924006
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-05-29 18:53:06 +00:00
Akshay Tigga
a17ee5a786 Set correct path for tegra-dtstree in ACK builds
Bug 3974840

Change-Id: I1d5b96e07396071e1d267ae4f5d767aab32b675d
Signed-off-by: Bruce Xu <brucex@nvidia.com>
(cherry picked from commit de06f79e350dbe169aaecdcac1a562838cd8ca92)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910052
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Ankita Garg <ankitag@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
Laxman Dewangan
9852878b8a device-tree: generic: Pickup DTB/DTBO makefile from hardware/nvidia/t23x
As part of the optimizing the DTS repo count, it merged few
repos in single repo for keeping minium number of repo.
The path for the new DTS repo are hardware/nvidia/t23x.

Pickup the Makefiles from this new path for building
DTB and DTBO.

Bug 4078385

Change-Id: I89f18e283c5b367219623d47298536c594c108e6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892469
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
Laxman Dewangan
862b80f7eb device-tree: legacy-dts: ignore graph port and endpoint warning
The legacy DTS is intentionally written to have macro in unit
address in the name of the node. This is creating the warning
for graph_port and graph_endpoint.

Ignore the warning for legacy DT build.

Bug 4037171

Change-Id: I57a869a2e69dcb7934fa6650edbd7d15b8e5f784
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2874128
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
Laxman Dewangan
75ccb78c84 device-tree: Makefile: Make the LINUX VERSION to 6.00
Make the Linux kernel version to the 600 as default for
building generic and legacy DTS from nvidia-oot.

There is no case handled for the <515 on the DTS for OOT
architecture.

Change-Id: I8129c9ead5515a460c9c2dbae9d4f18de9fb7a61
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868347
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
Laxman Dewangan
9da870e9ec device-tree: Makefile: Exclude DTS file from protected SOCs
For few kernel variant, it is not required to build DT
for private SoCs. The list of protected SoCs is passed
from parent makefile.

Parse the list and exclude the DTS from that SOC's platform.

Change-Id: If29cdc3e1279b929b5c8f90151dd86245c387075
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2863623
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-29 18:53:06 +00:00
3 changed files with 30 additions and 54 deletions

View File

@@ -1,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
package(
default_visibility = [
"//visibility:public",
],
)
filegroup(
name = "devicetree.scripts",
srcs = glob([
"scripts/**/*",
]),
)
filegroup(
name = "generic-dts.srcs",
srcs = glob([
"generic-dts/**/*",
]),
)

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: GPL-2.0-only
objtree ?= $(srctree)
@@ -13,19 +13,15 @@ include $(oottree)/scripts/Makefile.lib
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2
ifdef CONFIG_TEGRA_SYSTEM_TYPE_ACK
ifdef CONFIG_TEGRA_KLEAF_BUILD
SOURCE_TOP := $(ROOT_DIR)
else # !CONFIG_TEGRA_KLEAF_BUILD
ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
ifneq ($(TOP),)
SOURCE_TOP := $(TOP)
else
$(error TOP is not defined)
endif
endif # end of CONFIG_TEGRA_KLEAF_BUILD
else # !CONFIG_TEGRA_SYSTEM_TYPE_ACK
else
ifneq ($(TEGRA_TOP),)
SOURCE_TOP := $(TEGRA_TOP)
else ifneq ($(TOP),)
@@ -33,14 +29,10 @@ SOURCE_TOP := $(TOP)
else
$(error TEGRA_TOP or TOP is not defined)
endif
endif # end of CONFIG_TEGRA_SYSTEM_TYPE_ACK
ifdef CONFIG_TEGRA_KLEAF_BUILD
tegra-dtstree := $(SOURCE_TOP)/external/nvidia_dts/hardware/nvidia
else
tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia
endif
tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia
# Get relative path for tegra-dtstree from this makefile
null :=
space :=$(null) $(null)
@@ -49,26 +41,17 @@ obj-path-from-top := $(subst $(SOURCE_TOP),,$(obj-path))
rel-top-path := $(subst /, $(space)/,$(obj-path-from-top))
rel-top-path := $(patsubst /%,../,$(rel-top-path))
rel-top-path := $(subst $(space),,$(rel-top-path))
ifdef CONFIG_TEGRA_KLEAF_BUILD
tegra-rel-dtstree := $(rel-top-path)/external/nvidia_dts/hardware/nvidia
else
tegra-rel-dtstree := $(rel-top-path)/hardware/nvidia
endif
DTC_INCLUDE :=
# SOC independent common include
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public/include/kernel
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public/include/nvidia-oot
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public/include/platforms
# SOC T23X specific common include
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/kernel
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/nvidia-oot
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/platforms
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public
DTC_INCLUDE += $(tegra-dtstree)/t264/nv-public/include/kernel-t264
DTC_INCLUDE += $(tegra-dtstree)/t264/nv-public
dtb-y :=
dtbo-y :=
@@ -77,8 +60,20 @@ DTB_LIST := $(dtb-y)
DTBO_LIST := $(dtbo-y)
dtb-y :=
fdts := $(tegra-dtstree)/t23x
fdts += $(tegra-dtstree)/t264
# Add internal SOCs to scan the DT makefiles
ifneq ($(internal_soc_list),)
fdts += $(addprefix $(tegra-dtstree)/,$(internal_soc_list))
endif
# Remove the DTs from protected soc list
ifneq ($(protected_soc_list),)
kdts := $(foreach dt_path, $(fdts), $(if $(filter $(protected_soc_list),$(patsubst -,$(space),$(subst /, $(space),$(dt_path)))),,$(dt_path)))
kdts := $(filter-out $(space)$(space),$(kdts))
else
kdts := $(fdts)
endif
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
dts_mfiles = $(call dts_makefile, $(kdts), Makefile)
@@ -144,14 +139,8 @@ dtbs: $(DTB_OBJS) $(DTBO_OBJS) FORCE
if [ ! -z "$(DTBS_DTBOS)" ] ; then \
cp -u $(DTB_OBJS) $(DTBO_OBJS) $(obj)/dtbs/ ; \
fi
ifdef CONFIG_TEGRA_KLEAF_BUILD
if [ -d $(obj)/external/nvidia_dts/hardware/ ] ; then \
rm -rf $(obj)/external/nvidia_dts/hardware/ ; \
fi
else
if [ -d $(obj)/hardware/ ] ; then \
rm -rf $(obj)/hardware/ ; \
fi
endif
clean-files := *.dtb *.dtbo *.tmp

View File

@@ -17,7 +17,7 @@ DTC_FLAGS += -Wno-graph_endpoint
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2
ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
ifneq ($(TOP),)
@@ -63,7 +63,16 @@ dtbo-oot-y :=
DTB_LIST := $(dtb-oot-y)
DTBO_LIST := $(dtbo-oot-y)
dtb-oot-y :=
kdts := $(shell find $(tegra-dtstree)/platform -name kernel-dts)
fdts := $(shell find $(tegra-dtstree)/platform -name kernel-dts)
# Remove the DTs from protected soc list
ifneq ($(protected_soc_list),)
kdts := $(foreach dt_path, $(fdts), $(if $(filter $(protected_soc_list),$(patsubst -,$(space),$(subst /, $(space),$(dt_path)))),,$(dt_path)))
kdts := $(filter-out $(space)$(space),$(kdts))
else
kdts := $(fdts)
endif
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
dts_mfiles = $(call dts_makefile, $(kdts), Makefile)