diff --git a/arch/arm/boot/dts/overlays/tpm-slb9673-overlay.dts b/arch/arm/boot/dts/overlays/tpm-slb9673-overlay.dts new file mode 100644 index 0000000000..cba8c25c30 --- /dev/null +++ b/arch/arm/boot/dts/overlays/tpm-slb9673-overlay.dts @@ -0,0 +1,50 @@ +/* + * Device Tree overlay for the Infineon SLB9673 Trusted Platform Module add-on + * boards, which can be used as a secure key storage and hwrng. + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2835"; + + /* Due to issue https://github.com/raspberrypi/linux/issues/4884 the + hardware I2C needs to be disabled and software I2C enabled */ + fragment@0 { + target = <&i2c_arm>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@1 { + target-path = "/"; + __overlay__ { + i2c1: i2c-gpio@1 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + gpios = <&gpio 2 6>, /* SDA GPIO_OPEN_DRAIN */ + <&gpio 3 6>; /* CLK GPIO_OPEN_DRAIN */ + clock-frequency = <400000>; + status = "okay"; + }; + }; + }; + + /* Add the TPM */ + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + slb9673: slb9673@2e { + compatible = "infineon,slb9673", "tcg,tpm-tis-i2c"; + reg = <0x2e>; + status = "okay"; + }; + }; + }; +};