]> git.itanic.dy.fi Git - linux-stable/commitdiff
ARM: dts: Fix TPM schema violations
authorLukas Wunner <lukas@wunner.de>
Sat, 13 Jan 2024 09:03:51 +0000 (10:03 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 25 Jan 2024 17:09:51 +0000 (18:09 +0100)
Since commit 26c9d152ebf3 ("dt-bindings: tpm: Consolidate TCG TIS
bindings"), several issues are reported by "make dtbs_check" for ARM
devicetrees:

The nodename needs to be "tpm@0" rather than "tpmdev@0" and the
compatible property needs to contain the chip's name in addition to the
generic "tcg,tpm_tis-spi" or "tcg,tpm-tis-i2c":

  tpmdev@0: $nodename:0: 'tpmdev@0' does not match '^tpm(@[0-9a-f]+)?$'
        from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml#

  tpm@2e: compatible: 'oneOf' conditional failed, one must be fixed:
        ['tcg,tpm-tis-i2c'] is too short
        from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#

Fix these schema violations.

Aspeed Facebook BMCs use an Infineon SLB9670:
https://lore.kernel.org/all/ZZSmMJ%2F%2Fl972Qbxu@fedora/
https://lore.kernel.org/all/ZZT4%2Fw2eVzMhtsPx@fedora/
https://lore.kernel.org/all/ZZTS0p1hdAchIbKp@heinlein.vulture-banana.ts.net/

Aspeed Tacoma uses a Nuvoton NPCT75X per commit 39d8a73c53a2 ("ARM: dts:
aspeed: tacoma: Add TPM").

phyGATE-Tauri uses an Infineon SLB9670:
https://lore.kernel.org/all/ab45c82485fa272f74adf560cbb58ee60cc42689.camel@phytec.de/

A single schema violation remains in am335x-moxa-uc-2100-common.dtsi
because it is unknown which chip is used on the board.  The devicetree's
author has been asked for clarification but has not responded so far:
https://lore.kernel.org/all/20231220090910.GA32182@wunner.de/

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Tao Ren <rentao.bupt@gmail.com>
Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com>
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-bletchley.dts
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge400.dts
arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dts
arch/arm/boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi
arch/arm/boot/dts/nxp/imx/imx6ull-phytec-tauri.dtsi
arch/arm/boot/dts/nxp/imx/imx7d-flex-concentrator.dts
arch/arm/boot/dts/ti/omap/am335x-moxa-uc-2100-common.dtsi

index e899de681f4752d4077b55a0cd4f8858c6e23df0..5be0e8fd2633c20e2d87abc843b53fca437942be 100644 (file)
@@ -45,8 +45,8 @@ spi1_gpio: spi1-gpio {
                num-chipselects = <1>;
                cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
 
-               tpmdev@0 {
-                       compatible = "tcg,tpm_tis-spi";
+               tpm@0 {
+                       compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
                        spi-max-frequency = <33000000>;
                        reg = <0>;
                };
index a677c827e758fe2042fcf14a192832668e3ffbd0..5a8169bbda8792c76c1da960508c8a0c6bdd4b86 100644 (file)
@@ -80,8 +80,8 @@ spi_gpio: spi {
                gpio-miso = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_HIGH>;
                num-chipselects = <1>;
 
-               tpmdev@0 {
-                       compatible = "tcg,tpm_tis-spi";
+               tpm@0 {
+                       compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
                        spi-max-frequency = <33000000>;
                        reg = <0>;
                };
index 3f6010ef2b86f264fe88935a737b3ce9c60d762b..213023bc5aec4144751c9e7bc8e3e05c156386c8 100644 (file)
@@ -456,7 +456,7 @@ &i2c1 {
        status = "okay";
 
        tpm: tpm@2e {
-               compatible = "tcg,tpm-tis-i2c";
+               compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
                reg = <0x2e>;
        };
 };
index 31590d3186a2e099e44c663c46a87975b60aae27..00e5887c926f181d57bebe6b0b781ad2f2e8a514 100644 (file)
@@ -35,8 +35,8 @@ spi_gpio: spi {
                gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
                gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
 
-               tpmdev@0 {
-                       compatible = "tcg,tpm_tis-spi";
+               tpm@0 {
+                       compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
                        spi-max-frequency = <33000000>;
                        reg = <0>;
                };
index 44cc4ff1d0df358ab66bb036d127175da1be74b6..d12fb44aeb140cfacf05a5b257d2106c79392279 100644 (file)
@@ -116,7 +116,7 @@ &ecspi1 {
        tpm_tis: tpm@1 {
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_tpm>;
-               compatible = "tcg,tpm_tis-spi";
+               compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
                reg = <1>;
                spi-max-frequency = <20000000>;
                interrupt-parent = <&gpio5>;
index 3a723843d5626f6cc4b9ee2750968c01e46306db..9984b343cdf0cad1abd9e0d4d142ded838c47980 100644 (file)
@@ -130,7 +130,7 @@ &ecspi4 {
         * TCG specification - Section 6.4.1 Clocking:
         * TPM shall support a SPI clock frequency range of 10-24 MHz.
         */
-       st33htph: tpm-tis@0 {
+       st33htph: tpm@0 {
                compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
                reg = <0>;
                spi-max-frequency = <24000000>;
index b8730aa52ce6fe521a1b531be42c4ef891c969b5..a59331aa58e55e3ef514fc06b5a36472c901dcd3 100644 (file)
@@ -217,7 +217,7 @@ &spi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi1_pins>;
 
-       tpm_spi_tis@0 {
+       tpm@0 {
                compatible = "tcg,tpm_tis-spi";
                reg = <0>;
                spi-max-frequency = <500000>;