-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: recover support for TPM module
The linux-compulab 5.15.35 contained support for the TPM module that goes into the M.2 slot. The update to 5.15.71 dropped this support. This commit re-introduces support for this TPM module in both linux-compulab and linux-balena-bootloader. Changelog-entry: recover support for TPM module Signed-off-by: Alex Gonzalez <[email protected]>
- Loading branch information
Showing
4 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
...pes-kernel/linux/linux-compulab/0055-compulab-iot-gate-imx8plus-add-support-for-TPM.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
From ce2773f1ef518603ce7c8ca238b2c570e34b9fdd Mon Sep 17 00:00:00 2001 | ||
From: Ilya Ledvich <[email protected]> | ||
Date: Fri, 25 Nov 2022 16:19:32 +0200 | ||
Subject: [PATCH] compulab: iot-gate-imx8plus: add support for TPM | ||
|
||
Add support for TPM extension module in M.2 Expansion Connector (aka M2TPM). | ||
The M2TPM module features SLB9670 Trusted Platform Module by Infineon over SPI. | ||
|
||
Signed-off-by: Ilya Ledvich <[email protected]> | ||
--- | ||
arch/arm64/boot/dts/compulab/Makefile | 1 + | ||
.../dts/compulab/iot-gate-imx8plus-m2tpm.dts | 61 +++++++++++++++++++ | ||
.../arm64/configs/iot-gate-imx8plus_defconfig | 1 + | ||
3 files changed, 63 insertions(+) | ||
create mode 100644 arch/arm64/boot/dts/compulab/iot-gate-imx8plus-m2tpm.dts | ||
|
||
diff --git a/arch/arm64/boot/dts/compulab/Makefile b/arch/arm64/boot/dts/compulab/Makefile | ||
index 4fbb26d4bcec..60205dd04b1f 100644 | ||
--- a/arch/arm64/boot/dts/compulab/Makefile | ||
+++ b/arch/arm64/boot/dts/compulab/Makefile | ||
@@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_MXC) += ucm-imx8m-plus-uart1.dtb | ||
dtb-$(CONFIG_ARCH_MXC) += ucm-imx8m-plus-headless.dtb | ||
dtb-$(CONFIG_ARCH_MXC) += iot-gate-imx8plus.dtb | ||
dtb-$(CONFIG_ARCH_MXC) += iot-gate-imx8plus-usbdev.dtb | ||
+dtb-$(CONFIG_ARCH_MXC) += iot-gate-imx8plus-m2tpm.dtb | ||
|
||
dtb-$(CONFIG_ARCH_MXC) += som-imx8m-plus.dtb | ||
dtb-$(CONFIG_ARCH_MXC) += som-imx8m-plus_mipi-csi1.dtb | ||
diff --git a/arch/arm64/boot/dts/compulab/iot-gate-imx8plus-m2tpm.dts b/arch/arm64/boot/dts/compulab/iot-gate-imx8plus-m2tpm.dts | ||
new file mode 100644 | ||
index 000000000000..f1e94e21e904 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/compulab/iot-gate-imx8plus-m2tpm.dts | ||
@@ -0,0 +1,61 @@ | ||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
+/* | ||
+ * Copyright 2022 CompuLab Ltd | ||
+ */ | ||
+ | ||
+#include "iot-gate-imx8plus.dts" | ||
+ | ||
+/* IOT-GATE-IMX8PLUS with TPM extension module in M.2 Expansion Connector */ | ||
+ | ||
+/ { | ||
+ tpm_nreset: tpm-nreset { | ||
+ compatible = "gpio-reset"; | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&pinctrl_tpm_nrst>; | ||
+ reset-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>; | ||
+ #reset-cells = <0>; | ||
+ initially-in-reset; | ||
+ }; | ||
+}; | ||
+ | ||
+&ecspi2 { | ||
+ status = "okay"; | ||
+ | ||
+ /delete-node/ spidev2@0; | ||
+ | ||
+ slb9670: slb9670-ecspi2@0 { | ||
+ resets = <&tpm_nreset>; | ||
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi"; | ||
+ reg = <0>; | ||
+ spi-max-frequency = <5000000>; | ||
+ status = "okay"; | ||
+ }; | ||
+}; | ||
+ | ||
+&i2c5 { | ||
+ status = "okay"; | ||
+ | ||
+ eeprom_m2: eeprom-i2c5@54 { | ||
+ compatible = "atmel,24c08"; | ||
+ pagesize = <16>; | ||
+ reg = <0x54>; | ||
+ status = "okay"; | ||
+ }; | ||
+}; | ||
+ | ||
+&i2c6 { | ||
+ status = "disabled"; | ||
+}; | ||
+ | ||
+&usdhc2 { | ||
+ status = "disabled"; | ||
+}; | ||
+ | ||
+&iomuxc { | ||
+ pinctrl_tpm_nrst: tpmnrstgrp { | ||
+ fsl,pins = < | ||
+ MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x19 | ||
+ >; | ||
+ }; | ||
+}; | ||
+ | ||
diff --git a/arch/arm64/configs/iot-gate-imx8plus_defconfig b/arch/arm64/configs/iot-gate-imx8plus_defconfig | ||
index d72dc869651c..575741d2e1e8 100644 | ||
--- a/arch/arm64/configs/iot-gate-imx8plus_defconfig | ||
+++ b/arch/arm64/configs/iot-gate-imx8plus_defconfig | ||
@@ -683,6 +683,7 @@ CONFIG_HW_RANDOM_TIMERIOMEM=m | ||
CONFIG_HW_RANDOM_BA431=m | ||
CONFIG_HW_RANDOM_VIRTIO=m | ||
CONFIG_TCG_TPM=y | ||
+CONFIG_TCG_TIS_SPI=m | ||
CONFIG_TCG_TIS_I2C_INFINEON=y | ||
CONFIG_I2C_CHARDEV=y | ||
CONFIG_I2C_MUX=y | ||
-- | ||
2.20.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters