Compare commits

..

10 Commits

Author SHA1 Message Date
Jian-Min Liu
d488feae65 kleaf: Adjust dts file path to align with kleaf
There is path difference between kleaf build environment and the existing environment, Use the condition CONFIG_TEGRA_KLEAF_BUILD to adjust the relative path.

Bug 4344670

Change-Id: I4fe35944467cd3ed76e111c9c3588bcb9032511f
Reviewed-on: https://git-master.nvidia.com/r/c/linux/kernel-devicetree/+/3171629
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-16 16:41:46 +00:00
Laxman Dewangan
cd1c454299 generic-dt: Include the dt binding headers from tegra
Include the dt binding headers from common location for all
SOCs. The common dt-binding headers are at
    hardware/nvidia/tegra/nv-public/include

Bug 4734150

Change-Id: I12fa9364612e1634c2cbc6209b18ff5ed711185a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux/kernel-devicetree/+/3168951
2025-07-16 16:41:39 +00:00
Sandipan Patra
a34574ecc9 device-tree: generic: Pickup DTB makefile from hardware/nvidia/t264
The path for the t264 DTS repo are hardware/nvidia/t264

Pickup the Makefiles from this new path for building
DTB.

Bug 4459750

Change-Id: I4d799241ab6479c7999a4dd77523d842ac6550f4
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089965
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux/kernel-devicetree/+/3164879
2025-07-16 16:41:24 +00:00
Laxman Dewangan
5fc4366307 device-tree: Add OS_LINUX as the DTC flag
Add device tree compiler flag as OS_LINUX for building the
DT for linux.

Bug 3081230

Change-Id: I7b5efc8840988f7afb9bcd2ee7c1c0997d4f8c3a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089477
Reviewed-on: https://git-master.nvidia.com/r/c/linux/kernel-devicetree/+/3164878
2025-07-16 16:40:45 +00:00
Paritosh Dixit
823381077e 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>
2025-07-16 16:40:38 +00:00
Sameer Pujar
cae046f8ff 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>
2025-07-16 15:59:41 +00:00
Akshay Tigga
439b3bb090 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>
2025-07-16 15:59:33 +00:00
Laxman Dewangan
7c2b56d612 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>
2025-07-16 15:59:14 +00:00
Laxman Dewangan
8d83cca278 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>
2025-07-16 15:55:18 +00:00
Laxman Dewangan
fb61f96359 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>
2025-07-16 15:55:11 +00:00
3 changed files with 53 additions and 29 deletions

22
BUILD.bazel Normal file
View File

@@ -0,0 +1,22 @@
# 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-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
objtree ?= $(srctree) objtree ?= $(srctree)
@@ -13,15 +13,19 @@ include $(oottree)/scripts/Makefile.lib
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS) DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),) ifdef CONFIG_TEGRA_SYSTEM_TYPE_ACK
ifdef CONFIG_TEGRA_KLEAF_BUILD
SOURCE_TOP := $(ROOT_DIR)
else # !CONFIG_TEGRA_KLEAF_BUILD
ifneq ($(TOP),) ifneq ($(TOP),)
SOURCE_TOP := $(TOP) SOURCE_TOP := $(TOP)
else else
$(error TOP is not defined) $(error TOP is not defined)
endif endif
else endif # end of CONFIG_TEGRA_KLEAF_BUILD
else # !CONFIG_TEGRA_SYSTEM_TYPE_ACK
ifneq ($(TEGRA_TOP),) ifneq ($(TEGRA_TOP),)
SOURCE_TOP := $(TEGRA_TOP) SOURCE_TOP := $(TEGRA_TOP)
else ifneq ($(TOP),) else ifneq ($(TOP),)
@@ -29,9 +33,13 @@ SOURCE_TOP := $(TOP)
else else
$(error TEGRA_TOP or TOP is not defined) $(error TEGRA_TOP or TOP is not defined)
endif endif
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 tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia
endif
# Get relative path for tegra-dtstree from this makefile # Get relative path for tegra-dtstree from this makefile
null := null :=
@@ -41,17 +49,26 @@ obj-path-from-top := $(subst $(SOURCE_TOP),,$(obj-path))
rel-top-path := $(subst /, $(space)/,$(obj-path-from-top)) rel-top-path := $(subst /, $(space)/,$(obj-path-from-top))
rel-top-path := $(patsubst /%,../,$(rel-top-path)) rel-top-path := $(patsubst /%,../,$(rel-top-path))
rel-top-path := $(subst $(space),,$(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 tegra-rel-dtstree := $(rel-top-path)/hardware/nvidia
endif
DTC_INCLUDE := DTC_INCLUDE :=
# SOC independent common include # SOC independent common include
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public 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 # SOC T23X specific common include
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/kernel 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/nvidia-oot
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/platforms DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/platforms
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public 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 := dtb-y :=
dtbo-y := dtbo-y :=
@@ -60,20 +77,8 @@ DTB_LIST := $(dtb-y)
DTBO_LIST := $(dtbo-y) DTBO_LIST := $(dtbo-y)
dtb-y := dtb-y :=
fdts := $(tegra-dtstree)/t23x 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) kdts := $(fdts)
endif
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d))) dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
dts_mfiles = $(call dts_makefile, $(kdts), Makefile) dts_mfiles = $(call dts_makefile, $(kdts), Makefile)
@@ -139,8 +144,14 @@ dtbs: $(DTB_OBJS) $(DTBO_OBJS) FORCE
if [ ! -z "$(DTBS_DTBOS)" ] ; then \ if [ ! -z "$(DTBS_DTBOS)" ] ; then \
cp -u $(DTB_OBJS) $(DTBO_OBJS) $(obj)/dtbs/ ; \ cp -u $(DTB_OBJS) $(DTBO_OBJS) $(obj)/dtbs/ ; \
fi 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 \ if [ -d $(obj)/hardware/ ] ; then \
rm -rf $(obj)/hardware/ ; \ rm -rf $(obj)/hardware/ ; \
fi fi
endif
clean-files := *.dtb *.dtbo *.tmp 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 += $(EXTRA_CPP_FLAGS)
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),) ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
ifneq ($(TOP),) ifneq ($(TOP),)
@@ -63,16 +63,7 @@ dtbo-oot-y :=
DTB_LIST := $(dtb-oot-y) DTB_LIST := $(dtb-oot-y)
DTBO_LIST := $(dtbo-oot-y) DTBO_LIST := $(dtbo-oot-y)
dtb-oot-y := dtb-oot-y :=
fdts := $(shell find $(tegra-dtstree)/platform -name kernel-dts) kdts := $(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_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
dts_mfiles = $(call dts_makefile, $(kdts), Makefile) dts_mfiles = $(call dts_makefile, $(kdts), Makefile)