ARM: dts: aspeed: Add Supermicro X13dem system BMC devicetree
Subsystems (2)
PATCH 1/1 ARM: dts: aspeed: Add Supermicro X13dem system BMC devicetree
From: Ryan Sie <[email protected]>
Add a devicetree for the new X13dem system.
--- .../boot/dts/aspeed-bmc-supermicro-x13dem.dts | 283 ++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +283 -0
@@ -0,0 +1,283 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright 2023 Supermicro Corp. +/dts-v1/; + +#include "aspeed-g6.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> +#include <dt-bindings/i2c/i2c.h> + +/ { + model = "X13dem"; + compatible = "aspeed,ast2600"; + + aliases { + mmc0 = &emmc; + }; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200n8 earlycon"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* LPC FW cycle bridge region requires natural alignment */ + flash_memory: region@b4000000 { + no-map; + reg = <0xb4000000 0x04000000>; /* 64M */ + }; + + /* VGA region is dictated by hardware strapping */ + vga_memory: region@bf000000 { + no-map; + compatible = "shared-dma-pool"; + reg = <0xbf000000 0x01000000>; /* 16M */ + }; + }; + + leds { + compatible = "gpio-leds"; + powerfail { + gpios = <&gpio0 ASPEED_GPIO(G, 5) GPIO_ACTIVE_LOW>; + }; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>, + <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>, + <&adc1 0>, <&adc1 1>, <&adc1 2>, <&adc1 3>, + <&adc1 4>, <&adc1 5>, <&adc1 6>, <&adc1 7>; + }; +}; + +&adc0 { + status = "okay"; + aspeed,int-vref-microvolt = <2500000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default + &pinctrl_adc2_default &pinctrl_adc3_default + &pinctrl_adc4_default &pinctrl_adc5_default + &pinctrl_adc6_default &pinctrl_adc7_default>; +}; + +&adc1 { + status = "okay"; + aspeed,int-vref-microvolt = <2500000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default + &pinctrl_adc10_default &pinctrl_adc11_default + &pinctrl_adc12_default &pinctrl_adc13_default + &pinctrl_adc14_default &pinctrl_adc15_default>; +}; + +&emmc_controller { + status = "okay"; +}; + +&pinctrl_emmc_default { + bias-disable; +}; + +&emmc { + status = "okay"; + clk-phase-mmc-hs200 = <180>, <180>; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + + flash@0 { + status = "okay"; + m25p,fast-read; + label = "spi1:0"; + spi-max-frequency = <25000000>; + }; +}; + +&gpio0 { + status = "okay"; + gpio-line-names = + /*A0-A7*/ "","","","","","","","", + /*B0-B7*/ "","","","","","","jpfr2","jpfr3", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "","","","","","","","", + /*E0-E7*/ "","","","","","","","", + /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","pwrfail-led","","", + /*H0-H7*/ "smc-n","nmi-n","pwrbtn-n","rst-n","","","phy1-rst","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "","","","","","","","", + /*O0-O7*/ "","","","","","","","speaker-bmc", + /*P0-P7*/ "cpld-int","","","","","","","bmc-hbled-n", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","","","pwr-ctrl-4","","","", + /*S0-S7*/ "","","wake-n","","pwrok-in","pcie-rst-in","","uid-sw-in", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","bios-cmp-in","smci-pch-out","","","","nmi-in","bmc-ready", + /*Y0-Y7*/ "","bmc-hb-led","bmc-cpld-mux-sel","emmc-rst","","","sci-bmc-out","", + /*Z0-Z7*/ "bmc-prg-n","pwer-ctrl-1","pwrbtn-in","","","","",""; +}; + +&gpio1 { + status = "disabled"; +}; + +&sgpiom0 { + status = "disabled"; + gpio-line-names = + /* SGPIO output lines */ + /*OA0-OA7*/ "","","","","","","","", + /*OB0-OB7*/ "","","","","","","","", + /*OC0-OC7*/ "","","","","","","","", + /*OD0-OD7*/ "","","","","","","","", + /*OE0-OE7*/ "","","","","","","","", + /*OF0-OF7*/ "","","","","","","","", + /*OG0-OG7*/ "","","","","","","","", + /*OH0-OH7*/ "","","","","","","","", + /*OI0-OI7*/ "","","","","","","","", + /*OJ0-OJ7*/ "","","","","","","","", + /*DUMMY*/ "","","","","","","","", + /*DUMMY*/ "","","","","","","","", + + /* SGPIO input lines */ + /*IA0-IA7*/ "","","","","","","","", + /*IB0-IB7*/ "","","","","","","","", + /*IC0-IC7*/ "","","","","","","","", + /*ID0-ID7*/ "","","","","","","","", + /*IE0-IE7*/ "","","","","","","","", + /*IF0-IF7*/ "","","","","","","","", + /*IG0-IG7*/ "","","","","","","","", + /*IH0-IH7*/ "","","","","","","","", + /*II0-II7*/ "","","","","","","","", + /*IJ0-IJ7*/ "","","","","","","",""; +}; + +&kcs3 { + aspeed,lpc-io-reg = <0xca2>; + status = "okay"; +}; + +&kcs4 { + aspeed,lpc-io-reg = <0xca4>; + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&uart3 { + status = "okay"; +}; + +&uart4 { + status = "okay"; +}; + +&uart_routing { + status = "okay"; +}; + +&mdio0 { + status = "okay"; + + ethphy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mac0 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default>; +}; + +&mac2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rmii3_default>; + clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>, + <&syscon ASPEED_CLK_MAC3RCLK>; + clock-names = "MACCLK", "RCLK"; + use-ncsi; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "disabled"; +}; + +&i2c2 { + multi-master; + status = "okay"; +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; + bus-frequency = <400000>; +}; + +&i2c5 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; +}; + +&i2c7 { + status = "okay"; +}; + +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; +}; + +&xdma { + status = "okay"; + memory-region = <&vga_memory>; +}; + +&vhub { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; +
Signature · 1 line
2.34.1
Joel Stanley
maintainerQuoted 4 lines · On Tue, 9 May 2023 at 00:11, <[email protected]> wrote:
From: Ryan Sie <[email protected]>
Add a devicetree for the new X13dem system.
That is obvious. Some more details about the system would help for review.
Quoted 13 lines
Signed-off-by Ryan Sie <[email protected]>--- .../boot/dts/aspeed-bmc-supermicro-x13dem.dts | 283 ++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dtsarch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +0
-0
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts line 10
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +10
-0@@ -0,0 +1,283 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright 2023 Supermicro Corp. +/dts-v1/; + +#include "aspeed-g6.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> +#include <dt-bindings/i2c/i2c.h> + +/ { + model = "X13dem";
Convetion is to name the machine the model + BMC, so this would be "X13DEM BMC".
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts line 11
Quoted 1 line
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +1
-0+ compatible = "aspeed,ast2600";
Needs a compatible for the machine.
Quoted 14 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +14
-0+ + aliases { + mmc0 = &emmc; + }; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200n8 earlycon"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + };
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts line 35
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +10
-0+ + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* LPC FW cycle bridge region requires natural alignment */ + flash_memory: region@b4000000 { + no-map; + reg = <0xb4000000 0x04000000>; /* 64M */
Are you sure you need this?
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts line 42
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +7
-0+ }; + + /* VGA region is dictated by hardware strapping */ + vga_memory: region@bf000000 { + no-map; + compatible = "shared-dma-pool"; + reg = <0xbf000000 0x01000000>; /* 16M */
Are you sure you need this?
Quoted 58 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +58
-0+ }; + }; + + leds { + compatible = "gpio-leds"; + powerfail { + gpios = <&gpio0 ASPEED_GPIO(G, 5) GPIO_ACTIVE_LOW>; + }; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>, + <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>, + <&adc1 0>, <&adc1 1>, <&adc1 2>, <&adc1 3>, + <&adc1 4>, <&adc1 5>, <&adc1 6>, <&adc1 7>; + }; +}; + +&adc0 { + status = "okay"; + aspeed,int-vref-microvolt = <2500000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default + &pinctrl_adc2_default &pinctrl_adc3_default + &pinctrl_adc4_default &pinctrl_adc5_default + &pinctrl_adc6_default &pinctrl_adc7_default>; +}; + +&adc1 { + status = "okay"; + aspeed,int-vref-microvolt = <2500000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default + &pinctrl_adc10_default &pinctrl_adc11_default + &pinctrl_adc12_default &pinctrl_adc13_default + &pinctrl_adc14_default &pinctrl_adc15_default>; +}; + +&emmc_controller { + status = "okay"; +}; + +&pinctrl_emmc_default { + bias-disable; +}; + +&emmc { + status = "okay"; + clk-phase-mmc-hs200 = <180>, <180>; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + + flash@0 {
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts line 110
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +10
-0+ status = "okay"; + m25p,fast-read; + label = "spi1:0"; + spi-max-frequency = <25000000>; + }; +}; + +&gpio0 { + status = "okay"; + gpio-line-names =
Consult this document for common names:
https://github.com/openbmc/docs/blob/master/designs/device-tree-gpio-naming.md
Quoted 24 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +24
-0+ /*A0-A7*/ "","","","","","","","", + /*B0-B7*/ "","","","","","","jpfr2","jpfr3", + /*C0-C7*/ "","","","","","","","", + /*D0-D7*/ "","","","","","","","", + /*E0-E7*/ "","","","","","","","", + /*F0-F7*/ "","","","","","","","", + /*G0-G7*/ "","","","","","pwrfail-led","","", + /*H0-H7*/ "smc-n","nmi-n","pwrbtn-n","rst-n","","","phy1-rst","", + /*I0-I7*/ "","","","","","","","", + /*J0-J7*/ "","","","","","","","", + /*K0-K7*/ "","","","","","","","", + /*L0-L7*/ "","","","","","","","", + /*M0-M7*/ "","","","","","","","", + /*N0-N7*/ "","","","","","","","", + /*O0-O7*/ "","","","","","","","speaker-bmc", + /*P0-P7*/ "cpld-int","","","","","","","bmc-hbled-n", + /*Q0-Q7*/ "","","","","","","","", + /*R0-R7*/ "","","","","pwr-ctrl-4","","","", + /*S0-S7*/ "","","wake-n","","pwrok-in","pcie-rst-in","","uid-sw-in", + /*T0-T7*/ "","","","","","","","", + /*U0-U7*/ "","","","","","","","", + /*V0-V7*/ "","","","","","","","", + /*W0-W7*/ "","","","","","","","", + /*X0-X7*/ "","bios-cmp-in","smci-pch-out","","","","nmi-in","bmc-ready",
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts line 144
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +10
-0+ /*Y0-Y7*/ "","bmc-hb-led","bmc-cpld-mux-sel","emmc-rst","","","sci-bmc-out","", + /*Z0-Z7*/ "bmc-prg-n","pwer-ctrl-1","pwrbtn-in","","","","",""; +}; + +&gpio1 { + status = "disabled"; +}; + +&sgpiom0 { + status = "disabled";
If you're disabling it you can remove the names below.
Quoted 142 lines
arch/arm/boot/dts/aspeed-bmc-supermicro-x13dem.dts new file +139
-1+ gpio-line-names = + /* SGPIO output lines */ + /*OA0-OA7*/ "","","","","","","","", + /*OB0-OB7*/ "","","","","","","","", + /*OC0-OC7*/ "","","","","","","","", + /*OD0-OD7*/ "","","","","","","","", + /*OE0-OE7*/ "","","","","","","","", + /*OF0-OF7*/ "","","","","","","","", + /*OG0-OG7*/ "","","","","","","","", + /*OH0-OH7*/ "","","","","","","","", + /*OI0-OI7*/ "","","","","","","","", + /*OJ0-OJ7*/ "","","","","","","","", + /*DUMMY*/ "","","","","","","","", + /*DUMMY*/ "","","","","","","","", + + /* SGPIO input lines */ + /*IA0-IA7*/ "","","","","","","","", + /*IB0-IB7*/ "","","","","","","","", + /*IC0-IC7*/ "","","","","","","","", + /*ID0-ID7*/ "","","","","","","","", + /*IE0-IE7*/ "","","","","","","","", + /*IF0-IF7*/ "","","","","","","","", + /*IG0-IG7*/ "","","","","","","","", + /*IH0-IH7*/ "","","","","","","","", + /*II0-II7*/ "","","","","","","","", + /*IJ0-IJ7*/ "","","","","","","",""; +}; + +&kcs3 { + aspeed,lpc-io-reg = <0xca2>; + status = "okay"; +}; + +&kcs4 { + aspeed,lpc-io-reg = <0xca4>; + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&uart3 { + status = "okay"; +}; + +&uart4 { + status = "okay"; +}; + +&uart_routing { + status = "okay"; +}; + +&mdio0 { + status = "okay"; + + ethphy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mac0 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default>; +}; + +&mac2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rmii3_default>; + clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>, + <&syscon ASPEED_CLK_MAC3RCLK>; + clock-names = "MACCLK", "RCLK"; + use-ncsi; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "disabled"; +}; + +&i2c2 { + multi-master; + status = "okay"; +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; + bus-frequency = <400000>; +}; + +&i2c5 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; +}; + +&i2c7 { + status = "okay"; +}; + +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; +}; + +&xdma { + status = "okay"; + memory-region = <&vga_memory>; +}; + +&vhub { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; + --2.34.1