<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 21, 2022 at 4:46 AM Zev Weiss <<a href="mailto:zweiss@equinix.com">zweiss@equinix.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 20, 2022 at 03:53:31AM PDT, Logananth Sundararaj wrote:<br>
>The Yosemite V3.5 is a facebook multi-node server<br>
>platform that host four OCP server. The BMC<br>
>in the Yosemite V3.5 platform based on AST2600 SoC.<br>
><br>
>This patch adds linux device tree entry related to<br>
>Yosemite V3.5 specific devices connected to BMC SoC.<br>
><br>
>Signed-off-by: Logananth Sundararaj <<a href="mailto:logananth_s@hcl.com" target="_blank">logananth_s@hcl.com</a>><br>
><br>
>---<br>
>--- v4 - Bootagrs and memory removed.<br>
>--- v3 - Addressed v2 patch comments.<br>
>--- v2 - Enabled i2c drivers.<br>
>--- v1 - Initial draft.<br>
>---<br>
>---<br>
> arch/arm/boot/dts/Makefile                    |   1 +<br>
> .../boot/dts/aspeed-bmc-facebook-fby35.dts    | 260 ++++++++++++++++++<br>
> 2 files changed, 261 insertions(+)<br>
> create mode 100644 arch/arm/boot/dts/aspeed-bmc-facebook-fby35.dts<br>
><br>
>diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile<br>
>index 7e0934180724..58add093e5fb 100644<br>
>--- a/arch/arm/boot/dts/Makefile<br>
>+++ b/arch/arm/boot/dts/Makefile<br>
>@@ -1465,6 +1465,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \<br>
>       aspeed-bmc-facebook-cloudripper.dtb \<br>
>       aspeed-bmc-facebook-cmm.dtb \<br>
>       aspeed-bmc-facebook-elbert.dtb \<br>
>+      aspeed-bmc-facebook-fby35.dtb \<br>
>       aspeed-bmc-facebook-fuji.dtb \<br>
>       aspeed-bmc-facebook-galaxy100.dtb \<br>
>       aspeed-bmc-facebook-minipack.dtb \<br>
>diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-fby35.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-fby35.dts<br>
>new file mode 100644<br>
>index 000000000000..05efba7117a8<br>
>--- /dev/null<br>
>+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-fby35.dts<br>
>@@ -0,0 +1,260 @@<br>
>+// SPDX-License-Identifier: GPL-2.0-or-later<br>
>+// Copyright (c) 2020 Facebook Inc.<br>
>+<br>
>+/dts-v1/;<br>
>+<br>
>+#include "aspeed-g6.dtsi"<br>
>+#include <dt-bindings/gpio/aspeed-gpio.h><br>
>+#include <dt-bindings/i2c/i2c.h><br>
>+<br>
>+/ {<br>
>+      model = "Facebook fby35";<br>
>+      compatible = "facebook,fby35", "aspeed,ast2600";<br>
>+<br>
>+      aliases {<br>
>+              serial4 = &uart5;<br>
>+      };<br>
>+<br>
>+      chosen {<br>
>+              stdout-path = &uart5;<br>
>+      };<br>
>+<br>
>+      iio-hwmon {<br>
>+              compatible = "iio-hwmon";<br>
>+              io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>,<br>
>+                      <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,<br>
>+                      <&adc1 0>, <&adc1 1>, <&adc1 2>, <&adc1 3>,<br>
>+                      <&adc1 4>, <&adc1 5>, <&adc1 6>;<br>
>+      };<br>
<br>
A blank line here would be nice for formatting consistency...<br>
<br></blockquote><div>will fix it. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>+      spi_gpio: spi-gpio {<br>
>+              status = "okay";<br>
>+              compatible = "spi-gpio";<br>
>+              #address-cells = <1>;<br>
>+              #size-cells = <0>;<br>
>+<br>
>+              gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;<br>
>+              gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;<br>
>+              gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;<br>
>+              num-chipselects = <1>;<br>
>+              cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;<br>
>+<br>
>+              tpmdev@0 {<br>
>+                      compatible = "tcg,tpm_tis-spi";<br>
>+                      spi-max-frequency = <33000000>;<br>
>+                      reg = <0>;<br>
>+              };<br>
>+      };<br>
>+<br>
<br>
...and this one could be removed.<br>
<br></blockquote><div>will fix it. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>+};<br>
>+<br>
>+&mac3 {<br>
>+      status = "okay";<br>
>+<br>
>+      pinctrl-names = "default";<br>
>+      pinctrl-0 = <&pinctrl_rmii4_default>;<br>
>+      no-hw-checksum;<br>
>+      use-ncsi;<br>
>+      mlx,multi-host;<br>
>+      ncsi-ctrl,start-redo-probe;<br>
>+      ncsi-ctrl,no-channel-monitor;<br>
>+      ncsi-package = <1>;<br>
>+      ncsi-channel = <1>;<br>
>+      ncsi-rexmit = <1>;<br>
>+      ncsi-timeout = <2>;<br>
>+};<br>
>+<br>
>+&uart1 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&uart2 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&uart3 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&uart4 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&uart5 {<br>
>+      status = "okay";<br>
>+      compatible = "snps,dw-apb-uart";<br>
>+};<br>
>+<br>
>+&wdt1 {<br>
>+      status = "okay";<br>
>+      pinctrl-names = "default";<br>
>+      pinctrl-0 = <&pinctrl_wdtrst1_default>;<br>
>+      aspeed,reset-type = "soc";<br>
>+      aspeed,external-signal;<br>
>+      aspeed,ext-push-pull;<br>
>+      aspeed,ext-active-high;<br>
>+      aspeed,ext-pulse-duration = <256>;<br>
>+};<br>
>+<br>
>+&rtc {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&fmc {<br>
>+      status = "okay";<br>
>+      flash@0 {<br>
>+              status = "okay";<br>
>+              m25p,fast-read;<br>
>+              label = "spi0.1";<br>
>+              spi-max-frequency = <50000000>;<br>
>+              #include "openbmc-flash-layout-128.dtsi"<br>
>+      };<br>
>+      flash@1 {<br>
>+              status = "okay";<br>
>+              m25p,fast-read;<br>
>+              label = "spi0.0";<br>
>+              spi-max-frequency = <50000000>;<br>
>+              #include "openbmc-flash-layout.dtsi"<br>
>+      };<br>
<br>
The labels on these look backwards from what I'd guess was probably<br>
intended (flash@0 is spi0.1 and flash@1 is spi0.0).<br>
<br></blockquote><div>Let's check into this, and fix it. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>+};<br>
>+<br>
>+&i2c0 {<br>
>+      //Host1 IPMB bus<br>
<br>
While it's not currently 100% consistent, I think the generally<br>
preferred style is to put a space after '//' (here and elsewhere).<br></blockquote><div>will fix it. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>+      status = "okay";<br>
>+      multi-master;<br>
>+      ipmb0@10 {<br>
>+              compatible = "ipmb-dev";<br>
>+              reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;<br>
>+              i2c-protocol;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c1 {<br>
>+      //Host2 IPMB bus<br>
>+      status = "okay";<br>
>+      multi-master;<br>
>+      ipmb1@10 {<br>
>+              compatible = "ipmb-dev";<br>
>+              reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;<br>
>+              i2c-protocol;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c2 {<br>
>+      //Host3 IPMB bus<br>
>+      status = "okay";<br>
>+      multi-master;<br>
>+      ipmb2@10 {<br>
>+              compatible = "ipmb-dev";<br>
>+              reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;<br>
>+              i2c-protocol;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c3 {<br>
>+      //Host1 IPMB bus<br>
>+      status = "okay";<br>
>+      multi-master;<br>
>+      ipmb3@10 {<br>
>+              compatible = "ipmb-dev";<br>
>+              reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;<br>
>+              i2c-protocol;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c4 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&i2c5 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&i2c6 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&i2c7 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&i2c8 {<br>
>+      //NIC SENSOR TEMP<br>
>+      status = "okay";<br>
>+      tmp421@1f {<br>
>+              compatible = "ti,tmp421";<br>
>+              reg = <0x1f>;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c9 {<br>
>+      // Debug-Card IPMB bus<br>
>+      status = "okay";<br>
>+      multi-master;<br>
>+      ipmb9@30 {<br>
>+              compatible = "ipmb-dev";<br>
>+              reg = <(0x30 | I2C_OWN_SLAVE_ADDRESS)>;<br>
>+              i2c-protocol;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c10 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&i2c11 {<br>
>+      status = "okay";<br>
>+      //FRU EEPROM<br>
>+      eeprom@51 {<br>
>+              compatible = "atmel,24c64";<br>
>+              reg = <0x51>;<br>
>+              pagesize = <32>;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c12 {<br>
>+      status = "okay";<br>
>+      //INLET TEMP<br>
>+      tmp75@4e {<br>
>+              compatible = "ti,tmp75";<br>
>+              reg = <0x4e>;<br>
>+      };<br>
>+      //OUTLET TEMP<br>
>+      tmp75@4f {<br>
>+              compatible = "ti,tmp75";<br>
>+              reg = <0x4f>;<br>
>+      };<br>
>+};<br>
>+<br>
>+&i2c13 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&adc0 {<br>
>+      ref_voltage = <2500>;<br>
>+      status = "okay";<br>
>+<br>
>+      pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default<br>
>+              &pinctrl_adc2_default &pinctrl_adc3_default<br>
>+              &pinctrl_adc4_default &pinctrl_adc5_default<br>
>+              &pinctrl_adc6_default &pinctrl_adc7_default>;<br>
>+};<br>
>+<br>
>+&adc1 {<br>
>+      ref_voltage = <2500>;<br>
>+      status = "okay";<br>
>+<br>
>+      pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default<br>
>+              &pinctrl_adc10_default &pinctrl_adc11_default<br>
>+              &pinctrl_adc12_default &pinctrl_adc13_default>;<br>
>+};<br>
<br>
Missing blank line.<br>
<br></blockquote><div>will fix. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>+&ehci0 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&ehci1 {<br>
>+      status = "okay";<br>
>+};<br>
>+<br>
>+&uhci {<br>
>+      status = "okay";<br>
>+};<br>
>-- <br>
>2.17.1<br>
></blockquote><div>Thanks <br></div><div>-Logananth <br></div></div></div>