From 6d2a57d57b6ac07dc54694cfbcf3bb97e966dd6f Mon Sep 17 00:00:00 2001 From: Nikesh Oswal Date: Mon, 17 Oct 2022 10:02:55 +0000 Subject: [PATCH] nvidia-oot: add tsec driver as oot module 1. Add tsec device entry in the DT overlay file 2. Copy over the existing tsec driver source code and compile it when building with oot kernel 3. Add a dummy tsec folder with an empty Makefile which conveys that common driver source is used from kernel/nvidia/drivers/video/tegra/tsec Bug 3817626 Change-Id: I7b3064fc08bf7507b7660985564bc6bc8eba86eb Signed-off-by: Nikesh Oswal Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793265 Reviewed-by: Bharat Nihalani Reviewed-by: Mikko Perttunen GVS: Gerrit_Virtual_Submit --- .../boot/dts/nvidia/tegra234-soc-overlay.dtsi | 16 ++++++++++++++++ drivers/video/tegra/Makefile | 1 + drivers/video/tegra/tsec/Makefile | 9 +++++++++ kernel-src-files-copy-list.txt | 3 +++ 4 files changed, 29 insertions(+) create mode 100644 drivers/video/tegra/tsec/Makefile diff --git a/arch/arm64/boot/dts/nvidia/tegra234-soc-overlay.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-soc-overlay.dtsi index 8784597a..d90de551 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234-soc-overlay.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234-soc-overlay.dtsi @@ -563,6 +563,22 @@ status = "okay"; }; + + tsec@15500000 { + compatible = "nvidia,tegra234-tsec"; + reg = <0x15500000 0x00040000>; + interrupts = <0 228 0x04>; + resets = <&bpmp TEGRA234_RESET_TSEC>; + clocks = <&bpmp TEGRA234_CLK_TSEC>, + <&bpmp TEGRA234_CLK_FUSE>, + <&bpmp TEGRA234_CLK_TSEC_PKA>; + clock-names = "tsec", "efuse", "tsec_pka"; + + iommus = <&smmu_niso1 TEGRA234_SID_TSEC>; + nvidia,memory-controller = <&mc>; + dma-coherent; + status = "okay"; + }; }; }; diff --git a/drivers/video/tegra/Makefile b/drivers/video/tegra/Makefile index e3379966..828e50fa 100644 --- a/drivers/video/tegra/Makefile +++ b/drivers/video/tegra/Makefile @@ -4,3 +4,4 @@ obj-m += nvmap/ obj-m += host/nvdla/ obj-m += host/pva/ +obj-m += tsec/ diff --git a/drivers/video/tegra/tsec/Makefile b/drivers/video/tegra/tsec/Makefile new file mode 100644 index 00000000..1197267b --- /dev/null +++ b/drivers/video/tegra/tsec/Makefile @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. + +# NOTE: Do not change or add anything in this makefile. +# The source code and makefile rules are copied from the +# kernel/nvidia/drivers/video/tegra/tsec. This file is +# just place-holder for empty makefile to avoid any build +# issue when copy is not done from command line and building +# the tree independent of source copy. diff --git a/kernel-src-files-copy-list.txt b/kernel-src-files-copy-list.txt index 582287ff..28263ab6 100644 --- a/kernel-src-files-copy-list.txt +++ b/kernel-src-files-copy-list.txt @@ -19,6 +19,9 @@ nvidia/include/soc/tegra/fuse-helper.h include/soc/tegra/fuse-helper.h # Files/directories for host1x module nvidia/drivers/gpu/host1x drivers/gpu +# Files/directories for the tsec module +nvidia/drivers/video/tegra/tsec drivers/video/tegra + # Files/directories for host1x-nvhost module nvidia/drivers/gpu/host1x-nvhost drivers/gpu nvidia/include/linux/nvhost.h include/linux/nvhost.h