[External] Re: [PATCH linux dev-5.8 2/2] ARM: dts: aspeed: Add Bytedance g220a BMC machine

王志强 wangzhiqiang.bj at bytedance.com
Mon Sep 28 20:14:57 AEST 2020


On Mon, Sep 28, 2020 at 3:00 PM Joel Stanley <joel at jms.id.au> wrote:
>
> On Mon, 28 Sep 2020 at 06:43, John Wang <wangzhiqiang.bj at bytedance.com> wrote:
> >
> > From: Lotus Xu <xuxiaohan at bytedance.com>
> >
> > The g220a is a server platform with an ASPEED AST2500 BMC.
> >
> > Signed-off-by: Lotus Xu <xuxiaohan at bytedance.com>
> > Signed-off-by: John Wang <wangzhiqiang.bj at bytedance.com>
> > ---
> >  arch/arm/boot/dts/Makefile                    |   1 +
> >  .../boot/dts/aspeed-bmc-bytedance-g220a.dts   | 926 ++++++++++++++++++
> >  2 files changed, 927 insertions(+)
> >  create mode 100644 arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts
> >
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 56fd8c8a2ba9..7e4d3600e16d 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -1351,6 +1351,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
> >         aspeed-bmc-amd-ethanolx.dtb \
> >         aspeed-bmc-arm-centriq2400-rep.dtb \
> >         aspeed-bmc-arm-stardragon4800-rep2.dtb \
> > +       aspeed-bmc-bytedance-g220a.dtb \
> >         aspeed-bmc-facebook-cmm.dtb \
> >         aspeed-bmc-facebook-minipack.dtb \
> >         aspeed-bmc-facebook-tiogapass.dtb \
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts b/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts
> > new file mode 100644
> > index 000000000000..fe0437256ac8
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/aspeed-bmc-bytedance-g220a.dts
> > @@ -0,0 +1,926 @@
> > +/dts-v1/;
>
> Copyright holder and licence should go here.

ok

>
> > +
> > +#include "aspeed-g5.dtsi"
> > +#include <dt-bindings/gpio/aspeed-gpio.h>
> > +#include <dt-bindings/i2c/i2c.h>
> > +#include <dt-bindings/leds/leds-pca955x.h>
> > +
> > +/ {
> > +       model = "AST2500 BMC";
>
> Put your system name here. eg "Bytedance G220A BMC".

done.

>
> > +       compatible = "bytedance,g220a-bmc", "aspeed,ast2500";
> > +
>
> > +       reserved-memory {
> > +               #address-cells = <1>;
> > +               #size-cells = <1>;
> > +               ranges;
> > +
> > +               vga_memory: framebuffer at bc000000 {
> > +                       no-map;
> > +                       reg = <0xbc000000 0x04000000>; /* 64M */
> > +               };
> > +
> > +               gfx_memory: framebuffer {
> > +                       size = <0x01000000>;
> > +                       alignment = <0x01000000>;
> > +                       compatible = "shared-dma-pool";
> > +                       reusable;
> > +               };
>
> This is used by the BMC's internal video device. I assume your system
> is using that, as well as the host VGA device?

Ah, G220A does not use the BMC's internal video device, will remove the node.

>
> I am interested as I have recently looked at reworking how the BMC
> selects between the two:
>
>  https://lore.kernel.org/dri-devel/20200916083413.777307-1-joel@jms.id.au/
>
> > +
> > +               video_engine_memory: jpegbuffer {
> > +                       size = <0x02000000>;    /* 32M */
> > +                       alignment = <0x01000000>;
> > +                       compatible = "shared-dma-pool";
> > +                       reusable;
> > +               };
> > +       };
> > +
> > +       iio-hwmon {
> > +               compatible = "iio-hwmon";
> > +               io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
> > +                       <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>,
> > +                       <&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>,
> > +                       <&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>;
> > +       };
> > +
> > +       leds {
> > +               compatible = "gpio-leds";
> > +               bmc_alive {
> > +                       label = "bmc_alive";
> > +                       gpios = <&gpio ASPEED_GPIO(B, 0) GPIO_ACTIVE_LOW>;
> > +                       linux,default-trigger = "timer";
> > +                       led-pattern = <1000 1000>;
>
> Nice feature!
>
> > +               };
> > +       };
> > +
>
> > +&gpio {
> > +       status = "okay";
> > +       gpio-line-names =
> > +       /*A0-A7*/       "SMRST_OCP_N","MAC2_LINK","BMC_CPLD_SMB_RST_R_N","BMC_CPLD_GPIO0",
> > +                       "","","","",
> > +       /*B0-B7*/       "BMC_INIT_R_OK","FM_BOARD_REV_ID2","FM_PROJECT_ID7","FAULT_P12V_STBY_N",
> > +                       "","CPU0_PROCHOT_LVT3_N","","BIOS_LOAD_DEFAULT_R_N",
> > +       /*C0-C7*/       "","","","","","","","",
> > +       /*D0-D7*/       "","","","","","","","",
> > +       /*E0-E7*/       "FM_PROJECT_ID0","FM_PROJECT_ID1","FM_PROJECT_ID2","FM_PROJECT_ID3",
> > +                       "FM_PROJECT_ID4","FM_PROJECT_ID5","","",
> > +       /*F0-F7*/       "PSU0_PRSNT_N","PSU1_PRSNT_N","","FAULT_P12V_NVME_N",
> > +                       "BIOS_DEBUG_MODE_R_N","DISABLE_CPU_DDR_R_SPD","COOLING_STRATEGY",
> > +                       "PCH_GLB_RST_N",
> > +       /*G0-G7*/       "P12V_PMBUS_ALERT_N","CPLD_ALERT_N","BMC_RELOAD_N",
> > +                       "P12V_PVDDQ_PMBUS_ALERT_N","BMC_JTAG_TCK_MUX_R_SEL","","NMI_OUT",
> > +                       "NMI_BUTTON",
> > +       /*H0-H7*/       "BMC_CPLD_JTAG_TDI","BMC_CPLD_JTAG_TDO","BMC_CPLD_JTAG_TCK",
> > +                       "BMC_CPLD_JTAG_TMS","FM_PROJECT_ID6","FM_BOARD_REV_ID0",
> > +                       "PCA9546_U70_RST_N","IRQ_SML0_ALERT_N",
> > +       /*I0-I7*/       "FAULT_FRONT_RISER_P12V_N","FAULT_OCP_P12V_N","FM_BMC_PCH_SCI_R_N",
> > +                       "","","","","",
> > +       /*J0-J7*/       "FM_CPU0_SKTOCC_N","FM_CPU1_SKTOCC_N","FM_CPU1_DISABLE_COD_N",
> > +                       "","","","","",
> > +       /*K0-K7*/       "","","","","","","","",
> > +       /*L0-L7*/       "P12V_FAULT_N","PWRGD_P12V_PCIE_RISER","","LEAKAGE_DETECT_INPUT_N",
> > +                       "","IRQ_SML1_PMBUS_ALERT_N","","",
> > +       /*M0-M7*/       "","","","","","","","",
> > +       /*N0-N7*/       "","","","","","","","",
> > +       /*O0-O7*/       "","","","","","","","",
> > +       /*P0-P7*/       "","","","","","","","",
> > +       /*Q0-Q7*/       "","","","","","","FM_PCH_THERMTRIP_N","INTRUDER_N",
> > +       /*R0-R7*/       "","PVCCIN_CPU1_SMBALERT_N","BMC_PREQ_R_N","FAULT_P12V_PCIE_RISER_N",
> > +                       "ALT_P12V_PCIE_RISER_N","BURN_BOARD_N","PVCCIN_CPU0_SMBALERT_N","",
> > +       /*S0-S7*/       "BMC_PRDY_N","SIO_POWER_GOOD","FM_BMC_PWR_DEBUG_R_N",
> > +                       "FM_BMC_XDP_DEBUG_EN","","","","",
> > +       /*T0-T7*/       "","","","","","","","",
> > +       /*U0-U7*/       "","","","","","","","",
> > +       /*V0-V7*/       "","","","","","","","",
> > +       /*W0-W7*/       "","","","","","","","",
> > +       /*X0-X7*/       "","","","","","","","",
> > +       /*Y0-Y7*/       "","PWRGD_PSU0_PWROK","CPU1_PROCHOT_LVT3_N","IRQ_BMC_PCH_SMI_LPC_N",
> > +                       "","","","",
> > +       /*Z0-Z7*/       "XDP_PRSNT_N","BMC_XDP_SYS_PWROK","BMC_XDP_JTAG_SEL",
> > +                       "PCH_BMC_SMI_ACTIVE_R_N","","","","",
> > +       /*AA0-AA7*/     "PWRGD_P12V_STBY_OCP","PS_PWROK","RST_PLTRST_BMC_R_N","HDA_SDO_R",
> > +                       "FM_SLPS4_R_N","PWRGD_PSU1_PWROK","POWER_BUTTON","POWER_OUT",
> > +       /*AB0-AB7*/     "","RESET_OUT","SPI_BIOS_MODE_SELECT","POST_COMPLETE","","","","",
> > +       /*AC0-AC7*/     "","","","","","","","CPLD_PLTRST_B_N";
> > +};
>
> Nice. Did you use a script to generate these?

:hmm, I did not have a script... :(.


>
> Nice patch. Please resend with the copyright information fixed and we
> can merge this in.
>
> Cheers,
>
> Joel


More information about the openbmc mailing list