Compare commits

...

13 Commits

Author SHA1 Message Date
Vishwaroop A
da22d336b5 device-tree: add make file support for T268
Add makefile support for T268 specific DT repos

Bug 5235249

Change-Id: I4a0a049f850445f4afd7e39662853b19cff2f27b
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux/kernel-devicetree/+/3355735
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-05-06 17:55:11 -07:00
Jian-Min Liu
fa7e112eba 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>
2024-07-29 05:45:05 -07:00
Laxman Dewangan
cf5f0c7264 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
2024-07-12 09:08:30 -07:00
Sandipan Patra
d290b67c3d 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
2024-06-29 12:22:49 -07:00
Laxman Dewangan
0acb474aaf 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
2024-06-29 12:22:45 -07:00
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 103 additions and 15 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,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright (c) 2022 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
objtree = $(srctree)
objtree ?= $(srctree)
# Redefine the fixdep command
cmd_and_fixdep = \
@@ -13,12 +13,19 @@ include $(oottree)/scripts/Makefile.lib
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
ifneq ($(findstring oot,$(NV_BUILD_KERNEL_OPTIONS)),)
DTC_CPP_FLAGS += -DLINUX_VERSION=515 -DTEGRA_HOST1X_DT_VERSION=2
else
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2
endif
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
ifdef CONFIG_TEGRA_SYSTEM_TYPE_ACK
ifdef CONFIG_TEGRA_KLEAF_BUILD
SOURCE_TOP := $(ROOT_DIR)
else # !CONFIG_TEGRA_KLEAF_BUILD
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
ifneq ($(TEGRA_TOP),)
SOURCE_TOP := $(TEGRA_TOP)
else ifneq ($(TOP),)
@@ -26,8 +33,13 @@ 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
# Get relative path for tegra-dtstree from this makefile
null :=
@@ -37,17 +49,28 @@ 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)/soc/tegra/generic-dts/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)/soc/generic-dts/tegra/include/kernel
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/tegra/include/nvidia-oot
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/t23x/include
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/t23x/dts
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
DTC_INCLUDE += $(tegra-dtstree)/t268/dts-public/include/kernel
DTC_INCLUDE += $(tegra-dtstree)/t268/dts-public
dtb-y :=
dtbo-y :=
@@ -55,7 +78,23 @@ dtbo-y :=
DTB_LIST := $(dtb-y)
DTBO_LIST := $(dtbo-y)
dtb-y :=
kdts := $(shell find $(tegra-dtstree)/platform -name generic-dts)
fdts := $(tegra-dtstree)/t23x
fdts += $(tegra-dtstree)/t264
fdts += $(tegra-dtstree)/t268
# 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)
@@ -121,8 +160,14 @@ 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

@@ -11,10 +11,21 @@ cmd_and_fixdep = \
include $(oottree)/scripts/Makefile.lib
# Stop warning of the graph port and graph endpoint
DTC_FLAGS += -Wno-graph_port
DTC_FLAGS += -Wno-graph_endpoint
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
DTC_CPP_FLAGS += -DLINUX_VERSION=515 -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 ($(TOP),)
SOURCE_TOP := $(TOP)
else
$(error TOP is not defined)
endif
else
ifneq ($(TEGRA_TOP),)
SOURCE_TOP := $(TEGRA_TOP)
else ifneq ($(TOP),)
@@ -22,6 +33,7 @@ SOURCE_TOP := $(TOP)
else
$(error TEGRA_TOP or TOP is not defined)
endif
endif
tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia
# Get relative path for tegra-dtstree from this makefile
@@ -51,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)