diff mbox series

[v1,5/5] ARM: dts: aspeed: Harma: Add spi-gpio

Message ID 20240102044409.3810873-6-peteryin.openbmc@gmail.com (mailing list archive)
State New, archived
Headers show
Series Revise Meta(Facebook) Harma BMC(AST2600) | expand

Commit Message

PeterYin Jan. 2, 2024, 4:44 a.m. UTC
Add spi-gpio for tpm device.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
---
 .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Patrick Williams Jan. 3, 2024, 12:17 p.m. UTC | #1
On Tue, Jan 02, 2024 at 12:44:09PM +0800, Peter Yin wrote:
> Add spi-gpio for tpm device.
> 
> Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
> ---
>  .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts
> index 36aad01dda20..25ae044cd176 100644
> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts
> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts
> @@ -28,6 +28,8 @@ aliases {
>  		i2c29 = &imux29;
>  		i2c30 = &imux30;
>  		i2c31 = &imux31;
> +
> +		spi1 = &spi_gpio;
>  	};
>  
>  	chosen {
> @@ -67,6 +69,25 @@ led-2 {
>  			gpios = <&gpio0 124 GPIO_ACTIVE_HIGH>;
>  		};
>  	};
> +
> +	spi_gpio: spi-gpio {
> +		status = "okay";
> +		compatible = "spi-gpio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		gpio-sck = <&gpio0 ASPEED_GPIO(Z, 3) GPIO_ACTIVE_HIGH>;
> +		gpio-mosi = <&gpio0 ASPEED_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;
> +		gpio-miso = <&gpio0 ASPEED_GPIO(Z, 5) GPIO_ACTIVE_HIGH>;
> +		num-chipselects = <1>;
> +		cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
> +
> +		tpmdev@0 {
> +			compatible = "tcg,tpm_tis-spi";

Due to other pending changes, there is a request that all tpm_tis-spi
also contain a compatible with a chip vendor.  Please add
"infineon,slb9670".

See https://lore.kernel.org/lkml/ZZTS0p1hdAchIbKp@heinlein.vulture-banana.ts.net/
for more context.

> +			spi-max-frequency = <33000000>;
> +			reg = <0>;
> +		};
> +	};
>  };
>  
>  // HOST BIOS Debug
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts
index 36aad01dda20..25ae044cd176 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts
@@ -28,6 +28,8 @@  aliases {
 		i2c29 = &imux29;
 		i2c30 = &imux30;
 		i2c31 = &imux31;
+
+		spi1 = &spi_gpio;
 	};
 
 	chosen {
@@ -67,6 +69,25 @@  led-2 {
 			gpios = <&gpio0 124 GPIO_ACTIVE_HIGH>;
 		};
 	};
+
+	spi_gpio: spi-gpio {
+		status = "okay";
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		gpio-sck = <&gpio0 ASPEED_GPIO(Z, 3) GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio0 ASPEED_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio0 ASPEED_GPIO(Z, 5) GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+		cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
+
+		tpmdev@0 {
+			compatible = "tcg,tpm_tis-spi";
+			spi-max-frequency = <33000000>;
+			reg = <0>;
+		};
+	};
 };
 
 // HOST BIOS Debug