diff mbox series

[v2,3/6] ARM: dts: aspeed: Common dtsi for Facebook AST2600 Network BMCs

Message ID 20210805222818.8391-4-rentao.bupt@gmail.com
State Accepted
Commit 0c6881e86d2f07458f284429759c5332112859ed
Headers show
Series ARM: dts: Add Facebook AST2600 BMCs | expand

Commit Message

Tao Ren Aug. 5, 2021, 10:28 p.m. UTC
From: Tao Ren <rentao.bupt@gmail.com>

This common descirption is included by all Facebook AST2600 Network BMC
platforms to minimize duplicated device entries across Facebook Network
BMC device trees.

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
---
 Changes in v2:
  - "mac3" is removed from the dtsi (moved to platform dts files).

 .../dts/ast2600-facebook-netbmc-common.dtsi   | 169 ++++++++++++++++++
 1 file changed, 169 insertions(+)
 create mode 100644 arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi

Comments

Tao Ren Jan. 3, 2024, 12:11 a.m. UTC | #1
Hi Lukas,

On Wed, Dec 20, 2023 at 09:14:02AM +0100, Lukas Wunner wrote:
> On Thu, Aug 05, 2021 at 03:28:15PM -0700, rentao.bupt@gmail.com wrote:
> > This common descirption is included by all Facebook AST2600 Network BMC
> > platforms to minimize duplicated device entries across Facebook Network
> > BMC device trees.
> [...]
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi
> [...]
> > +		tpmdev@0 {
> > +			compatible = "tcg,tpm_tis-spi";
> 
> What's the chip used on this board?  Going forward, the DT schema for TPMs
> requires the exact chip name in addition to the generic "tcg,tpm_tis-spi".

Sorry about the late response. It's "infineon,slb9670", and I will
submit a patch for fix it soon.


Cheers,

- Tao
Tao Ren Jan. 3, 2024, 6:16 p.m. UTC | #2
Hi Lukas,

On Wed, Jan 03, 2024 at 01:45:02PM +0100, Lukas Wunner wrote:
> On Tue, Jan 02, 2024 at 04:11:28PM -0800, Tao Ren wrote:
> > On Wed, Dec 20, 2023 at 09:14:02AM +0100, Lukas Wunner wrote:
> > > On Thu, Aug 05, 2021 at 03:28:15PM -0700, rentao.bupt@gmail.com wrote:
> > > > This common descirption is included by all Facebook AST2600 Network BMC
> > > > platforms to minimize duplicated device entries across Facebook Network
> > > > BMC device trees.
> > > [...]
> > > > --- /dev/null
> > > > +++ b/arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi
> > > [...]
> > > > +		tpmdev@0 {
> > > > +			compatible = "tcg,tpm_tis-spi";
> > > 
> > > What's the chip used on this board?  Going forward, the DT schema for TPMs
> > > requires the exact chip name in addition to the generic "tcg,tpm_tis-spi".
> > 
> > Sorry about the late response. It's "infineon,slb9670", and I will
> > submit a patch for fix it soon.
> 
> Thank you Tao and Patrick for the replies.  I've prepared two commits
> to fix all violations of the TPM schema on this branch:
> 
>   https://github.com/l1k/linux/commits/tpm-dt3
> 
> The commits are named:
> 
>   e95bdbc arm64: dts: Fix TPM schema violations
>   63e5dfd ARM: dts: Fix TPM schema violations
> 
> I've now amended the ARM commit to use "infineon,slb9670" for:
> 
>   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/ast2600-facebook-netbmc-common.dtsi
> 
> I intend to submit the two commits once the TPM schema is applied
> either to Jarkko's or Rob's tree:
> 
>   https://lore.kernel.org/all/20231220160422.GA282877-robh@kernel.org/
> 
> Thanks,
> 
> Lukas

I've confirmed it's "infineon,slb9670" for both wedge400 and
ast2600-facebook-netbmc-common.

Pleasr free to add to "63e5dfd (ARM: dts: Fix TPM schema violations)":

Reviewed-by: Tao Ren <rentao.bupt@gmail.com>


Cheers,

- Tao
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi b/arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi
new file mode 100644
index 000000000000..051de5bec345
--- /dev/null
+++ b/arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi
@@ -0,0 +1,169 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2020 Facebook Inc.
+
+#include "aspeed-g6.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+
+/ {
+	aliases {
+		mmc0 = &emmc;
+		spi1 = &spi1;
+		spi2 = &spi_gpio;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,9600n8 root=/dev/ram rw vmalloc=640M";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x80000000>;
+	};
+
+	/*
+	 * GPIO-based SPI Master is required to access SPI TPM, because
+	 * full-duplex SPI transactions are not supported by ASPEED SPI
+	 * Controllers.
+	 */
+	spi_gpio: spi-gpio {
+		status = "okay";
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
+		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";
+			spi-max-frequency = <33000000>;
+			reg = <0>;
+		};
+	};
+};
+
+&fmc {
+	status = "okay";
+
+	flash@0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "spi0.0";
+
+#include "facebook-bmc-flash-layout-128.dtsi"
+	};
+
+	flash@1 {
+		status = "okay";
+		m25p,fast-read;
+		label = "spi0.1";
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			flash1@0 {
+				reg = <0x0 0x8000000>;
+				label = "flash1";
+			};
+		};
+	};
+};
+
+&spi1 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&uart2 {
+	status = "okay";
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&wdt1 {
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&i2c1 {
+	status = "okay";
+};
+
+&i2c2 {
+	status = "okay";
+};
+
+&i2c3 {
+	status = "okay";
+};
+
+&i2c4 {
+	status = "okay";
+};
+
+&i2c5 {
+	status = "okay";
+};
+
+&i2c6 {
+	status = "okay";
+};
+
+&i2c7 {
+	status = "okay";
+};
+
+&i2c8 {
+	status = "okay";
+};
+
+&i2c9 {
+	status = "okay";
+};
+
+&i2c10 {
+	status = "okay";
+};
+
+&i2c12 {
+	status = "okay";
+};
+
+&i2c13 {
+	status = "okay";
+};
+
+&i2c15 {
+	status = "okay";
+};
+
+&vhub {
+	status = "okay";
+};
+
+&emmc_controller {
+	status = "okay";
+};
+
+&emmc {
+	status = "okay";
+
+	non-removable;
+	max-frequency = <25000000>;
+	bus-width = <4>;
+};
+
+&rtc {
+	status = "okay";
+};