code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (C) 2020 Bytedance.
/dts-v1/;

#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 = "Bytedance G220A BMC";
	compatible = "bytedance,g220a-bmc", "aspeed,ast2500";

	aliases {
		serial4 = &uart5;
		i2c14 = &channel_3_0;
		i2c15 = &channel_3_1;
		i2c16 = &channel_3_2;
		i2c17 = &channel_3_3;
		i2c18 = &channel_6_0;
		i2c19 = &channel_6_1;
		i2c20 = &channel_6_2;
		i2c21 = &channel_6_3;
		i2c22 = &channel_6_4;
		i2c23 = &channel_6_5;
		i2c24 = &channel_6_6;
		i2c25 = &channel_6_7;
		i2c26 = &channel_6_8;
		i2c27 = &channel_6_9;
		i2c28 = &channel_6_10;
		i2c29 = &channel_6_11;
		i2c30 = &channel_6_12;
		i2c31 = &channel_6_13;
		i2c32 = &channel_6_14;
		i2c33 = &channel_6_15;
		i2c34 = &channel_6_16;
		i2c35 = &channel_6_17;
		i2c36 = &channel_6_18;
		i2c37 = &channel_6_19;
		i2c38 = &channel_6_20;
		i2c39 = &channel_6_21;
		i2c40 = &channel_6_22;
		i2c41 = &channel_6_23;
		i2c42 = &channel_6_24;
		i2c43 = &channel_6_25;
		i2c44 = &channel_10_0;
		i2c45 = &channel_10_1;
		i2c46 = &channel_10_2;
		i2c47 = &channel_10_3;
		i2c48 = &channel_10_4;
		i2c49 = &channel_10_5;
		i2c50 = &channel_10_6;
		i2c51 = &channel_10_7;
	};

	chosen {
		stdout-path = &uart5;
		bootargs = "console=ttyS4,115200 earlycon";
	};

	memory@80000000 {
		reg = <0x80000000 0x40000000>;
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		vga_memory: framebuffer@bc000000 {
			no-map;
			reg = <0xbc000000 0x04000000>; /* 64M */
		};

		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>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		event-burn-in-signal {
			label = "burn-in";
			gpios = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(R, 5)>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		poll-interval = <1000>;

		event-rear-riser1-presence {
			label = "rear-riser1-presence";
			gpios = <&pca0 1 GPIO_ACTIVE_LOW>;
			linux,code = <1>;
		};

		event-alrt-pvddq-cpu0 {
			label = "alrt-pvddq-cpu0";
			gpios = <&pca0 8 GPIO_ACTIVE_LOW>;
			linux,code = <2>;
		};

		event-rear-riser0-presence {
			label = "rear-riser0-presence";
			gpios = <&pca0 9 GPIO_ACTIVE_LOW>;
			linux,code = <3>;
		};

		event-fault-pvddq-cpu0 {
			label = "fault-pvddq-cpu0";
			gpios = <&pca0 10 GPIO_ACTIVE_LOW>;
			linux,code = <4>;
		};

		event-alrt-pvddq-cpu1 {
			label = "alrt-pvddq-cpu1";
			gpios = <&pca0 11 GPIO_ACTIVE_LOW>;
			linux,code = <5>;
		};

		event-fault-pvddq-cpu1 {
			label = "alrt-pvddq-cpu1";
			gpios = <&pca0 12 GPIO_ACTIVE_LOW>;
			linux,code = <6>;
		};

		event-fault-pvccin-cpu1 {
			label = "fault-pvccin-cpuq";
			gpios = <&pca0 13 GPIO_ACTIVE_LOW>;
			linux,code = <7>;
		};

		event-bmc-rom0-wp {
			label = "bmc-rom0-wp";
			gpios = <&pca1 0 GPIO_ACTIVE_LOW>;
			linux,code = <8>;
		};

		event-bmc-rom1-wp {
			label = "bmc-rom1-wp";
			gpios = <&pca1 1 GPIO_ACTIVE_LOW>;
			linux,code = <9>;
		};

		event-fan0-presence {
			label = "fan0-presence";
			gpios = <&pca1 2 GPIO_ACTIVE_LOW>;
			linux,code = <10>;
		};

		event-fan1-presence {
			label = "fan1-presence";
			gpios = <&pca1 3 GPIO_ACTIVE_LOW>;
			linux,code = <11>;
		};

		event-fan2-presence {
			label = "fan2-presence";
			gpios = <&pca1 4 GPIO_ACTIVE_LOW>;
			linux,code = <12>;
		};

		event-fan3-presence {
			label = "fan3-presence";
			gpios = <&pca1 5 GPIO_ACTIVE_LOW>;
			linux,code = <13>;
		};

		event-fan4-presence {
			label = "fan4-presence";
			gpios = <&pca1 6 GPIO_ACTIVE_LOW>;
			linux,code = <14>;
		};

		event-fan5-presence {
			label = "fan5-presence";
			gpios = <&pca1 7 GPIO_ACTIVE_LOW>;
			linux,code = <15>;
		};

		event-front-bp1-presence {
			label = "front-bp1-presence";
			gpios = <&pca1 8 GPIO_ACTIVE_LOW>;
			linux,code = <16>;
		};

		event-rear-bp-presence {
			label = "rear-bp-presence";
			gpios = <&pca1 9 GPIO_ACTIVE_LOW>;
			linux,code = <17>;
		};

		event-fault-pvccin-cpu0 {
			label = "fault-pvccin-cpu0";
			gpios = <&pca1 10 GPIO_ACTIVE_LOW>;
			linux,code = <18>;
		};

		event-alrt-p1v05-pvcc {
			label = "alrt-p1v05-pvcc1";
			gpios = <&pca1 11 GPIO_ACTIVE_LOW>;
			linux,code = <19>;
		};

		event-fault-p1v05-pvccio {
			label = "alrt-p1v05-pvcc1";
			gpios = <&pca1 12 GPIO_ACTIVE_LOW>;
			linux,code = <20>;
		};

		event-alrt-p1v8-pvccio {
			label = "alrt-p1v8-pvccio";
			gpios = <&pca1 13 GPIO_ACTIVE_LOW>;
			linux,code = <21>;
		};

		event-fault-p1v8-pvccio {
			label = "fault-p1v8-pvccio";
			gpios = <&pca1 14 GPIO_ACTIVE_LOW>;
			linux,code = <22>;
		};

		event-front-bp0-presence {
			label = "front-bp0-presence";
			gpios = <&pca1 15 GPIO_ACTIVE_LOW>;
			linux,code = <23>;
		};
	};
};

&fmc {
	status = "okay";
	flash@0 {
		status = "okay";
		label = "bmc";
		m25p,fast-read;
		spi-max-frequency = <50000000>;
#include "openbmc-flash-layout-64.dtsi"
	};
	flash@1 {
		status = "okay";
		label = "alt-bmc";
		m25p,fast-read;
		spi-max-frequency = <50000000>;
#include "openbmc-flash-layout-64-alt.dtsi"
	};
};

&spi1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spi1_default>;
	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "bios";
		spi-max-frequency = <100000000>;
	};
};

&adc {
	status = "okay";
};

&wdt2 {
	status = "okay";
	aspeed,alt-boot;
};

&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","CHASSIS_INTRUSION",
	/*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","","STRAP_BMC_BATTERY_GPIOS5","","",
	/*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";
};

&kcs3 {
	aspeed,lpc-io-reg = <0xCA2>;
	status = "okay";
};

&kcs4 {
	aspeed,lpc-io-reg = <0xCA4>;
	status = "okay";
};

&lpc_snoop {
	snoop-ports = <0x80>;
	status = "okay";
};

&uart1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd1_default
			&pinctrl_rxd1_default
			&pinctrl_nrts1_default
			&pinctrl_ndtr1_default
			&pinctrl_ndsr1_default
			&pinctrl_ncts1_default
			&pinctrl_ndcd1_default
			&pinctrl_nri1_default>;
};

&uart2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd2_default
			&pinctrl_rxd2_default
			&pinctrl_nrts2_default
			&pinctrl_ndtr2_default
			&pinctrl_ndsr2_default
			&pinctrl_ncts2_default
			&pinctrl_ndcd2_default
			&pinctrl_nri2_default>;
};

&uart3 {
	status = "okay";
};

&uart4 {
	status = "okay";
};

&uart5 {
	status = "okay";
};

&mac0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rmii1_default>;
	clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>,
		 <&syscon ASPEED_CLK_MAC1RCLK>;
	clock-names = "MACCLK", "RCLK";
	use-ncsi;
};

&mac1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";
};

&i2c3 {
	status = "okay";
	i2c-switch@70 {
		compatible = "nxp,pca9546";
		reg = <0x70>;
		#address-cells = <1>;
		#size-cells = <0>;

		channel_3_0: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		channel_3_1: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		channel_3_2: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		channel_3_3: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};
	};
};

&i2c4 {
	status = "okay";
	ipmb0@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
	i2c-switch@72 {
		compatible = "nxp,pca9548";
		reg = <0x72>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel_6_0: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		channel_6_1: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		channel_6_2: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		channel_6_3: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};
		channel_6_4: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		channel_6_5: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		channel_6_6: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		channel_6_7: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};

	i2c-switch@70 {
		compatible = "nxp,pca9546";
		reg = <0x70>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel_6_8: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			i2c-switch@71 {
				compatible = "nxp,pca9546";
				reg = <0x71>;
				#address-cells = <1>;
				#size-cells = <0>;
				channel_6_12: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;

				};

				channel_6_13: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};

				channel_6_14: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};

				channel_6_15: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
			};
		 };

		channel_6_9: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
			i2c-switch@71 {
				compatible = "nxp,pca9546";
				reg = <0x71>;
				#address-cells = <1>;
				#size-cells = <0>;
				channel_6_16: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;

				};

				channel_6_17: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};

				channel_6_18: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};

				channel_6_19: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
			};
		 };

		channel_6_10: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
			i2c-switch@71 {
				compatible = "nxp,pca9546";
				reg = <0x71>;
				#address-cells = <1>;
				#size-cells = <0>;
				channel_6_20: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};

				channel_6_21: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};

				channel_6_22: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};

				channel_6_23: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
			};
		 };

		channel_6_11: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
			i2c-switch@71 {
				compatible = "nxp,pca9546";
				reg = <0x71>;
				#address-cells = <1>;
				#size-cells = <0>;
				channel_6_24: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};

				channel_6_25: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
			 };
		};
	};
};

&i2c7 {
	status = "okay";
};

&i2c8 {
	status = "okay";
	pca0:pca9555@24 {
		compatible = "nxp,pca9555";
		reg = <0x24>;
		#address-cells = <1>;
		#size-cells = <0>;

		gpio-controller;
		#gpio-cells = <2>;
		gpio@1 {
			reg = <1>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@8 {
			reg = <8>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@9 {
			reg = <9>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@10 {
			reg = <10>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@11 {
			reg = <11>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@12 {
			reg = <12>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@13 {
			reg = <13>;
			type = <PCA955X_TYPE_GPIO>;
		};
	};

	pca1:pca9555@25 {
		compatible = "nxp,pca9555";
		reg = <0x25>;

		#address-cells = <1>;
		#size-cells = <0>;

		gpio-controller;
		#gpio-cells = <2>;

		gpio@0 {
			reg = <0>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@1 {
			reg = <1>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@2 {
			reg = <2>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@3 {
			reg = <3>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@4 {
			reg = <4>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@5 {
			reg = <5>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@6 {
			reg = <6>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@7 {
			reg = <7>;
			type = <PCA955X_TYPE_GPIO>;
		};
		gpio@8 {
			reg = <8>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@9 {
			reg = <9>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@10 {
			reg = <10>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@11 {
			reg = <11>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@12 {
			reg = <12>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@13 {
			reg = <13>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@14 {
			reg = <14>;
			type = <PCA955X_TYPE_GPIO>;
		};

		gpio@15 {
			reg = <15>;
			type = <PCA955X_TYPE_GPIO>;
		};
	};
};

&i2c9 {
	status = "okay";
};

&i2c10 {
	status = "okay";
	i2c-switch@70 {
		compatible = "nxp,pca9546";
		reg = <0x70>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel_10_0: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		channel_10_1: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		channel_10_2: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		channel_10_3: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};
	};

	i2c-switch@71 {
		compatible = "nxp,pca9546";
		reg = <0x71>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel_10_4: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		channel_10_5: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		channel_10_6: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		channel_10_7: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};
	};
};

&i2c11 {
	status = "okay";
};

&i2c12 {
	status = "okay";
};

&i2c13 {
	status = "okay";
};

&pwm_tacho {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
			 &pinctrl_pwm2_default &pinctrl_pwm3_default
			 &pinctrl_pwm4_default &pinctrl_pwm5_default>;

	fan@0 {
		reg = <0x00>;
		aspeed,fan-tach-ch = /bits/ 8 <0x00 0x01>;
	};
	fan@1 {
		reg = <0x01>;
		aspeed,fan-tach-ch = /bits/ 8 <0x02 0x03>;
	};
	fan@2 {
		reg = <0x02>;
		aspeed,fan-tach-ch = /bits/ 8 <0x04 0x05>;
	};
	fan@3 {
		reg = <0x03>;
		aspeed,fan-tach-ch = /bits/ 8 <0x06 0x07>;
	};
	fan@4 {
		reg = <0x04>;
		aspeed,fan-tach-ch = /bits/ 8 <0x08 0x09>;
	};
	fan@5 {
		reg = <0x05>;
		aspeed,fan-tach-ch = /bits/ 8 <0x0a 0x0b>;
	};
};

&gpio {
	pin_gpio_i3 {
		gpio-hog;
		gpios = <ASPEED_GPIO(I, 3) GPIO_ACTIVE_HIGH>;
		output-low;
		line-name = "NCSI_BMC_R_SEL";
	};

	pin_gpio_b6 {
		gpio-hog;
		gpios = <ASPEED_GPIO(B, 6) GPIO_ACTIVE_HIGH>;
		output-low;
		line-name = "EN_NCSI_SWITCH_N";
	};
};

&video {
	status = "okay";
	memory-region = <&video_engine_memory>;
};

&vhub {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
/dts-v1/;

#include "aspeed-g4.dtsi"
#include <dt-bindings/gpio/aspeed-gpio.h>

#define EFUSE_OUTPUT(n)					\
	efuse##n {					\
		compatible = "regulator-output";	\
		vout-supply = <&efuse##n>;		\
	}

#define __stringify(x) #x

#define EFUSE(hexaddr, num)							\
	efuse@##hexaddr {							\
		compatible = "lm25066";						\
		reg = <0x##hexaddr>;						\
		shunt-resistor-micro-ohms = <675>;				\
		regulators {							\
			efuse##num: vout0 {					\
				regulator-name = __stringify(efuse##num##-reg);	\
			};							\
		};								\
	}

/{
	model = "Delta Power AHE-50DC";
	compatible = "delta,ahe50dc-bmc", "aspeed,ast2400";

	aliases {
		serial4 = &uart5;

		/*
		 * pca9541-arbitrated logical i2c buses are numbered as the
		 * corresponding physical bus plus 20
		 */
		i2c20 = &i2carb0;
		i2c21 = &i2carb1;
		i2c22 = &i2carb2;
		i2c23 = &i2carb3;
		i2c24 = &i2carb4;
		i2c26 = &i2carb6;
		i2c27 = &i2carb7;
		i2c28 = &i2carb8;
		i2c32 = &i2carb12;
	};

	chosen {
		stdout-path = &uart3;
		bootargs = "console=ttyS2,115200n8 earlycon";
	};

	memory@40000000 {
		reg = <0x40000000 0x10000000>;
	};

	leds {
		compatible = "gpio-leds";

		heartbeat {
			gpios = <&gpio ASPEED_GPIO(P, 0) GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};

		panic {
			gpios = <&gpio ASPEED_GPIO(P, 2) GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "panic";
		};
	};

	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>;
	};

	EFUSE_OUTPUT(01);
	EFUSE_OUTPUT(02);
	EFUSE_OUTPUT(03);
	EFUSE_OUTPUT(04);
	EFUSE_OUTPUT(05);
	EFUSE_OUTPUT(06);
	EFUSE_OUTPUT(07);
	EFUSE_OUTPUT(08);
	EFUSE_OUTPUT(09);
	EFUSE_OUTPUT(10);
	EFUSE_OUTPUT(11);
	EFUSE_OUTPUT(12);
	EFUSE_OUTPUT(13);
	EFUSE_OUTPUT(14);
	EFUSE_OUTPUT(15);
	EFUSE_OUTPUT(16);
	EFUSE_OUTPUT(17);
	EFUSE_OUTPUT(18);
	EFUSE_OUTPUT(19);
	EFUSE_OUTPUT(20);
	EFUSE_OUTPUT(21);
	EFUSE_OUTPUT(22);
	EFUSE_OUTPUT(23);
	EFUSE_OUTPUT(24);
	EFUSE_OUTPUT(25);
	EFUSE_OUTPUT(26);
	EFUSE_OUTPUT(27);
	EFUSE_OUTPUT(28);
	EFUSE_OUTPUT(29);
	EFUSE_OUTPUT(30);
	EFUSE_OUTPUT(31);
	EFUSE_OUTPUT(32);
	EFUSE_OUTPUT(33);
	EFUSE_OUTPUT(34);
	EFUSE_OUTPUT(35);
	EFUSE_OUTPUT(36);
	EFUSE_OUTPUT(37);
	EFUSE_OUTPUT(38);
	EFUSE_OUTPUT(39);
	EFUSE_OUTPUT(40);
	EFUSE_OUTPUT(41);
	EFUSE_OUTPUT(42);
	EFUSE_OUTPUT(43);
	EFUSE_OUTPUT(44);
	EFUSE_OUTPUT(45);
	EFUSE_OUTPUT(46);
	EFUSE_OUTPUT(47);
	EFUSE_OUTPUT(48);
	EFUSE_OUTPUT(49);
	EFUSE_OUTPUT(50);

};

&fmc {
	status = "okay";

	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "flash0";
		spi-max-frequency = <50000000>; // 50 MHz
#include "openbmc-flash-layout.dtsi"
	};
};

&uart3 {
	status = "okay";
};

&mac1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
};

&i2c0 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@79 {
		compatible = "nxp,pca9541";
		reg = <0x79>;

		i2carb0: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;

			/* lm25066 efuses @ 10-17, 40-47, 50-57 */
			EFUSE(10, 03);
			EFUSE(11, 04);
			EFUSE(12, 01);
			EFUSE(13, 02);
			EFUSE(14, 13);
			EFUSE(15, 14);
			EFUSE(16, 15);
			EFUSE(17, 16);
			EFUSE(40, 12);
			EFUSE(41, 11);
			EFUSE(42, 10);
			EFUSE(43, 09);
			EFUSE(44, 08);
			EFUSE(45, 07);
			EFUSE(46, 05);
			EFUSE(47, 06);
			EFUSE(50, 17);
			EFUSE(51, 18);
			EFUSE(52, 20);
			EFUSE(53, 19);
			EFUSE(54, 22);
			EFUSE(55, 21);
			EFUSE(56, 24);
			EFUSE(57, 23);
		};
	};
};

&i2c1 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@72 {
		compatible = "nxp,pca9541";
		reg = <0x72>;

		i2carb1: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};
};

&i2c2 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@73 {
		compatible = "nxp,pca9541";
		reg = <0x73>;

		i2carb2: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};
};

&i2c3 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@74 {
		compatible = "nxp,pca9541";
		reg = <0x74>;

		i2carb3: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};
};

&i2c4 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@7a {
		compatible = "nxp,pca9541";
		reg = <0x7a>;

		i2carb4: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;

			gpio@20 {
				compatible = "nxp,pca9534";
				reg = <0x20>;
				gpio-controller;
				#gpio-cells = <2>;
			};

			/* lm25066 efuses @ 10-17, 40-47, 50-57, 59, 5a */
			EFUSE(10, 27);
			EFUSE(11, 28);
			EFUSE(12, 25);
			EFUSE(13, 26);
			EFUSE(14, 37);
			EFUSE(15, 38);
			EFUSE(16, 39);
			EFUSE(17, 40);
			EFUSE(40, 36);
			EFUSE(41, 35);
			EFUSE(42, 34);
			EFUSE(43, 33);
			EFUSE(44, 32);
			EFUSE(45, 31);
			EFUSE(46, 29);
			EFUSE(47, 30);
			EFUSE(50, 41);
			EFUSE(51, 42);
			EFUSE(52, 44);
			EFUSE(53, 43);
			EFUSE(54, 46);
			EFUSE(55, 45);
			EFUSE(56, 48);
			EFUSE(57, 47);
			EFUSE(59, 49);
			EFUSE(5a, 50);
		};
	};
};

&i2c6 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@75 {
		compatible = "nxp,pca9541";
		reg = <0x75>;

		i2carb6: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};
};

&i2c7 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@76 {
		compatible = "nxp,pca9541";
		reg = <0x76>;

		i2carb7: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};
};

&i2c8 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@7c {
		compatible = "nxp,pca9541";
		reg = <0x7c>;

		i2carb8: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;

			fancontrol@30 {
				compatible = "delta,ahe50dc-fan";
				reg = <0x30>;
			};

			/* Baseboard FRU eeprom */
			eeprom@50 {
				compatible = "atmel,24c02";
				reg = <0x50>;
			};
		};
	};
};

&i2c12 {
	status = "okay";
	bus-frequency = <200000>;

	pca9541@71 {
		compatible = "nxp,pca9541";
		reg = <0x71>;

		i2carb12: i2c-arb {
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};
};

&gpio {
	status = "okay";
	gpio-line-names =
		/*  A */ "", "", "", "", "", "", "", "",
		/*  B */ "", "", "", "", "", "", "", "",
		/*  C */ "RESET_PEER_N", "HEARTBEAT_OUT", "", "", "", "", "", "",
		/*  D */ "", "", "", "", "", "", "", "",
		/*  E */ "DOOM_N", "", "", "", "", "LED_PWR_BLUE", "", "",
		/*  F */ "", "", "", "", "", "", "", "",
		/*  G */ "", "", "", "", "", "", "", "",
		/*  H */ "", "", "", "", "", "", "", "",
		/*  I */ "", "", "", "", "", "", "", "",
		/*  J */ "", "", "BMC_ID", "", "", "", "", "",
		/*  K */ "", "", "", "", "", "", "", "",
		/*  L */ "", "", "", "", "", "", "", "",
		/*  M */ "", "", "", "", "", "", "", "",
		/*  N */ "", "", "", "", "", "", "", "",
		/*  O */ "", "", "", "", "", "", "", "",
		/*  P */ "LED_GREEN", "", "LED_RED", "", "", "", "", "",
		/*  Q */ "", "", "", "", "", "", "", "",
		/*  R */ "", "", "", "", "", "", "", "",
		/*  S */ "", "", "", "", "", "", "", "",
		/*  T */ "", "", "", "", "", "", "", "",
		/*  U */ "", "", "", "", "", "", "", "",
		/*  V */ "", "", "", "", "", "", "", "",
		/*  W */ "", "", "", "", "", "", "", "",
		/*  X */ "", "", "", "", "", "", "", "",
		/*  Y */ "HEARTBEAT_IN", "BOARDREV0", "BOARDREV1", "",
		/*  Z */ "", "", "", "", "", "", "", "",
		/* AA */ "", "", "", "", "", "", "", "",
		/* AB */ "", "", "", "";

	/*
	 * I don't rightly know what this GPIO really *is*, but setting it to
	 * zero causes the fans to run at full speed, after which setting it
	 * back to one causes a power output glitch, so install a hog to keep
	 * it at one as a failsafe to ensure nothing accidentally touches it.
	 */
	doom-guardrail {
		gpio-hog;
		gpios = <ASPEED_GPIO(E, 0) GPIO_ACTIVE_LOW>;
		output-low;
	};
};

&adc {
	status = "okay";
	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
		&pinctrl_adc8_default
		&pinctrl_adc9_default>;
};

repo_name: angery/linux


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2021 Facebook Inc.
/dts-v1/;

#include "aspeed-g6.dtsi"
#include <dt-bindings/gpio/aspeed-gpio.h>
#include <dt-bindings/usb/pd.h>
#include <dt-bindings/leds/leds-pca955x.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/i2c/i2c.h>

/ {
	model = "Facebook Bletchley BMC";
	compatible = "facebook,bletchley-bmc", "aspeed,ast2600";

	aliases {
		serial4 = &uart5;
	};

	chosen {
		bootargs = "console=ttyS4,57600n8";
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x80000000 0x80000000>;
	};

	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>;
	};

	spi1_gpio: spi1-gpio {
		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>;
		};
	};

	switchphy: ethernet-phy@0 {
		// Fixed link
	};

	front_gpio_leds {
		compatible = "gpio-leds";
		sys_log_id {
			default-state = "off";
			gpios = <&front_leds 0 GPIO_ACTIVE_LOW>;
		};
	};

	fan_gpio_leds {
		compatible = "gpio-leds";
		fan0_blue {
			retain-state-shutdown;
			default-state = "on";
			gpios = <&fan_leds 8 GPIO_ACTIVE_HIGH>;
		};
		fan1_blue {
			retain-state-shutdown;
			default-state = "on";
			gpios = <&fan_leds 9 GPIO_ACTIVE_HIGH>;
		};
		fan2_blue {
			retain-state-shutdown;
			default-state = "on";
			gpios = <&fan_leds 10 GPIO_ACTIVE_HIGH>;
		};
		fan3_blue {
			retain-state-shutdown;
			default-state = "on";
			gpios = <&fan_leds 11 GPIO_ACTIVE_HIGH>;
		};
		fan0_amber {
			retain-state-shutdown;
			default-state = "off";
			gpios = <&fan_leds 12 GPIO_ACTIVE_HIGH>;
		};
		fan1_amber {
			retain-state-shutdown;
			default-state = "off";
			gpios = <&fan_leds 13 GPIO_ACTIVE_HIGH>;
		};
		fan2_amber {
			retain-state-shutdown;
			default-state = "off";
			gpios = <&fan_leds 14 GPIO_ACTIVE_HIGH>;
		};
		fan3_amber {
			retain-state-shutdown;
			default-state = "off";
			gpios = <&fan_leds 15 GPIO_ACTIVE_HIGH>;
		};
	};

	sled1_gpio_leds {
		compatible = "gpio-leds";
		sled1_amber {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled1_leds 0 GPIO_ACTIVE_LOW>;
		};
		sled1_blue {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled1_leds 1 GPIO_ACTIVE_LOW>;
		};
	};

	sled2_gpio_leds {
		compatible = "gpio-leds";
		sled2_amber {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled2_leds 0 GPIO_ACTIVE_LOW>;
		};
		sled2_blue {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled2_leds 1 GPIO_ACTIVE_LOW>;
		};
	};

	sled3_gpio_leds {
		compatible = "gpio-leds";
		sled3_amber {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled3_leds 0 GPIO_ACTIVE_LOW>;
		};
		sled3_blue {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled3_leds 1 GPIO_ACTIVE_LOW>;
		};
	};

	sled4_gpio_leds {
		compatible = "gpio-leds";
		sled4_amber {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled4_leds 0 GPIO_ACTIVE_LOW>;
		};
		sled4_blue {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled4_leds 1 GPIO_ACTIVE_LOW>;
		};
	};

	sled5_gpio_leds {
		compatible = "gpio-leds";
		sled5_amber {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled5_leds 0 GPIO_ACTIVE_LOW>;
		};
		sled5_blue {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled5_leds 1 GPIO_ACTIVE_LOW>;
		};
	};

	sled6_gpio_leds {
		compatible = "gpio-leds";
		sled6_amber {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled6_leds 0 GPIO_ACTIVE_LOW>;
		};
		sled6_blue {
			retain-state-shutdown;
			default-state = "keep";
			gpios = <&sled6_leds 1 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		presence-sled1 {
			label = "presence-sled1";
			gpios = <&gpio0 ASPEED_GPIO(H, 2) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(H, 2)>;
		};
		presence-sled2 {
			label = "presence-sled2";
			gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(H, 3)>;
		};
		presence-sled3 {
			label = "presence-sled3";
			gpios = <&gpio0 ASPEED_GPIO(H, 4) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(H, 4)>;
		};
		presence-sled4 {
			label = "presence-sled4";
			gpios = <&gpio0 ASPEED_GPIO(H, 5) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(H, 5)>;
		};
		presence-sled5 {
			label = "presence-sled5";
			gpios = <&gpio0 ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(H, 6)>;
		};
		presence-sled6 {
			label = "presence-sled6";
			gpios = <&gpio0 ASPEED_GPIO(H, 7) GPIO_ACTIVE_LOW>;
			linux,code = <ASPEED_GPIO(H, 7)>;
		};
	};

	vbus_sled1: vbus_sled1 {
		compatible = "regulator-fixed";
		regulator-name = "vbus_sled1";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&sled1_ioexp 1 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	vbus_sled2: vbus_sled2 {
		compatible = "regulator-fixed";
		regulator-name = "vbus_sled2";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&sled2_ioexp 1 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	vbus_sled3: vbus_sled3 {
		compatible = "regulator-fixed";
		regulator-name = "vbus_sled3";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&sled3_ioexp 1 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	vbus_sled4: vbus_sled4 {
		compatible = "regulator-fixed";
		regulator-name = "vbus_sled4";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&sled4_ioexp 1 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	vbus_sled5: vbus_sled5 {
		compatible = "regulator-fixed";
		regulator-name = "vbus_sled5";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&sled5_ioexp 1 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	vbus_sled6: vbus_sled6 {
		compatible = "regulator-fixed";
		regulator-name = "vbus_sled6";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&sled6_ioexp 1 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};
};

&mac2 {
	status = "okay";
	phy-mode = "rgmii";
	phy-handle = <&switchphy>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii3_default>;

	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};

&fmc {
	status = "okay";
	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "bmc";
		spi-max-frequency = <50000000>;
#include "openbmc-flash-layout-128.dtsi"
	};
	flash@1 {
		status = "okay";
		m25p,fast-read;
		label = "flash1";
		spi-max-frequency = <50000000>;
	};
};

&spi2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spi2_default>;

	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "pnor";
		spi-max-frequency = <50000000>;
	};
};

&i2c0 {
	status = "okay";
	ina230@45 {
		compatible = "ti,ina230";
		reg = <0x45>;
		shunt-resistor = <2000>;
	};

	mp5023@40 {
		compatible = "mps,mp5023";
		reg = <0x40>;
	};

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	sled1_ioexp41: pca9536@41 {
		compatible = "nxp,pca9536";
		reg = <0x41>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"SLED1_SWD_MUX", "SLED1_XRES_SWD_N",
		"SLED1_CLKREQ_N", "SLED1_PCIE_PWR_EN";
	};

	sled1_ioexp: pca9539@76 {
		compatible = "nxp,pca9539";
		reg = <0x76>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(M, 0) IRQ_TYPE_LEVEL_LOW>;

		gpio-line-names =
		"SLED1_MS_DETECT1","SLED1_VBUS_BMC_EN","SLED1_INA230_ALERT","SLED1_P12V_STBY_ALERT",
		"SLED1_SSD_ALERT","SLED1_MS_DETECT0","SLED1_RST_CCG5","SLED1_FUSB302_INT",
		"SLED1_MD_STBY_RESET","SLED1_MD_IOEXP_EN_FAULT","SLED1_MD_DIR","SLED1_MD_DECAY",
		"SLED1_MD_MODE1","SLED1_MD_MODE2","SLED1_MD_MODE3","power-host1";
	};

	sled1_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-sled1-amber","led-sled1-blue","SLED1_RST_IOEXP","SLED1_MD_REF_PWM",
		"","","","",
		"","","","",
		"","","","";
	};

	sled1_fusb302: typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <0x22>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(B, 0) IRQ_TYPE_LEVEL_LOW>;
		vbus-supply = <&vbus_sled1>;

		connector {
			compatible = "usb-c-connector";
			label = "USB-C";
			power-role = "source";
			data-role = "host";
			pd-disable;
			typec-power-opmode = "default";
		};
	};

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c1 {
	status = "okay";
	ina230@45 {
		compatible = "ti,ina230";
		reg = <0x45>;
		shunt-resistor = <2000>;
	};

	mp5023@40 {
		compatible = "mps,mp5023";
		reg = <0x40>;
	};

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	sled2_ioexp41: pca9536@41 {
		compatible = "nxp,pca9536";
		reg = <0x41>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"SLED2_SWD_MUX", "SLED2_XRES_SWD_N",
		"SLED2_CLKREQ_N", "SLED2_PCIE_PWR_EN";
	};

	sled2_ioexp: pca9539@76 {
		compatible = "nxp,pca9539";
		reg = <0x76>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(M, 1) IRQ_TYPE_LEVEL_LOW>;

		gpio-line-names =
		"SLED2_MS_DETECT1","SLED2_VBUS_BMC_EN","SLED2_INA230_ALERT","SLED2_P12V_STBY_ALERT",
		"SLED2_SSD_ALERT","SLED2_MS_DETECT0","SLED2_RST_CCG5","SLED2_FUSB302_INT",
		"SLED2_MD_STBY_RESET","SLED2_MD_IOEXP_EN_FAULT","SLED2_MD_DIR","SLED2_MD_DECAY",
		"SLED2_MD_MODE1","SLED2_MD_MODE2","SLED2_MD_MODE3","power-host2";
	};

	sled2_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-sled2-amber","led-sled2-blue","SLED2_RST_IOEXP","SLED2_MD_REF_PWM",
		"","","","",
		"","","","",
		"","","","";
	};

	sled2_fusb302: typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <0x22>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(B, 1) IRQ_TYPE_LEVEL_LOW>;
		vbus-supply = <&vbus_sled2>;

		connector {
			compatible = "usb-c-connector";
			label = "USB-C";
			power-role = "source";
			data-role = "host";
			pd-disable;
			typec-power-opmode = "default";
		};
	};

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c2 {
	status = "okay";
	ina230@45 {
		compatible = "ti,ina230";
		reg = <0x45>;
		shunt-resistor = <2000>;
	};

	mp5023@40 {
		compatible = "mps,mp5023";
		reg = <0x40>;
	};

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	sled3_ioexp41: pca9536@41 {
		compatible = "nxp,pca9536";
		reg = <0x41>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"SLED3_SWD_MUX", "SLED3_XRES_SWD_N",
		"SLED3_CLKREQ_N", "SLED3_PCIE_PWR_EN";
	};

	sled3_ioexp: pca9539@76 {
		compatible = "nxp,pca9539";
		reg = <0x76>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(M, 2) IRQ_TYPE_LEVEL_LOW>;

		gpio-line-names =
		"SLED3_MS_DETECT1","SLED3_VBUS_BMC_EN","SLED3_INA230_ALERT","SLED3_P12V_STBY_ALERT",
		"SLED3_SSD_ALERT","SLED3_MS_DETECT0","SLED3_RST_CCG5","SLED3_FUSB302_INT",
		"SLED3_MD_STBY_RESET","SLED3_MD_IOEXP_EN_FAULT","SLED3_MD_DIR","SLED3_MD_DECAY",
		"SLED3_MD_MODE1","SLED3_MD_MODE2","SLED3_MD_MODE3","power-host3";
	};

	sled3_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-sled3-amber","led-sled3-blue","SLED3_RST_IOEXP","SLED3_MD_REF_PWM",
		"","","","",
		"","","","",
		"","","","";
	};

	sled3_fusb302: typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <0x22>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(B, 7) IRQ_TYPE_LEVEL_LOW>;
		vbus-supply = <&vbus_sled3>;

		connector {
			compatible = "usb-c-connector";
			label = "USB-C";
			power-role = "source";
			data-role = "host";
			pd-disable;
			typec-power-opmode = "default";
		};
	};

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c3 {
	status = "okay";
	ina230@45 {
		compatible = "ti,ina230";
		reg = <0x45>;
		shunt-resistor = <2000>;
	};

	mp5023@40 {
		compatible = "mps,mp5023";
		reg = <0x40>;
	};

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	sled4_ioexp41: pca9536@41 {
		compatible = "nxp,pca9536";
		reg = <0x41>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"SLED4_SWD_MUX", "SLED4_XRES_SWD_N",
		"SLED4_CLKREQ_N", "SLED4_PCIE_PWR_EN";
	};

	sled4_ioexp: pca9539@76 {
		compatible = "nxp,pca9539";
		reg = <0x76>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(M, 3) IRQ_TYPE_LEVEL_LOW>;

		gpio-line-names =
		"SLED4_MS_DETECT1","SLED4_VBUS_BMC_EN","SLED4_INA230_ALERT","SLED4_P12V_STBY_ALERT",
		"SLED4_SSD_ALERT","SLED4_MS_DETECT0","SLED4_RST_CCG5","SLED4_FUSB302_INT",
		"SLED4_MD_STBY_RESET","SLED4_MD_IOEXP_EN_FAULT","SLED4_MD_DIR","SLED4_MD_DECAY",
		"SLED4_MD_MODE1","SLED4_MD_MODE2","SLED4_MD_MODE3","power-host4";
	};

	sled4_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-sled4-amber","led-sled4-blue","SLED4_RST_IOEXP","SLED4_MD_REF_PWM",
		"","","","",
		"","","","",
		"","","","";
	};

	sled4_fusb302: typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <0x22>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(S, 7) IRQ_TYPE_LEVEL_LOW>;
		vbus-supply = <&vbus_sled4>;

		connector {
			compatible = "usb-c-connector";
			label = "USB-C";
			power-role = "source";
			data-role = "host";
			pd-disable;
			typec-power-opmode = "default";
		};
	};

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c4 {
	status = "okay";
	ina230@45 {
		compatible = "ti,ina230";
		reg = <0x45>;
		shunt-resistor = <2000>;
	};

	mp5023@40 {
		compatible = "mps,mp5023";
		reg = <0x40>;
	};

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	sled5_ioexp41: pca9536@41 {
		compatible = "nxp,pca9536";
		reg = <0x41>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"SLED5_SWD_MUX", "SLED5_XRES_SWD_N",
		"SLED5_CLKREQ_N", "SLED5_PCIE_PWR_EN";
	};

	sled5_ioexp: pca9539@76 {
		compatible = "nxp,pca9539";
		reg = <0x76>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(M, 4) IRQ_TYPE_LEVEL_LOW>;

		gpio-line-names =
		"SLED5_MS_DETECT1","SLED5_VBUS_BMC_EN","SLED5_INA230_ALERT","SLED5_P12V_STBY_ALERT",
		"SLED5_SSD_ALERT","SLED5_MS_DETECT0","SLED5_RST_CCG5","SLED5_FUSB302_INT",
		"SLED5_MD_STBY_RESET","SLED5_MD_IOEXP_EN_FAULT","SLED5_MD_DIR","SLED5_MD_DECAY",
		"SLED5_MD_MODE1","SLED5_MD_MODE2","SLED5_MD_MODE3","power-host5";
	};

	sled5_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-sled5-amber","led-sled5-blue","SLED5_RST_IOEXP","SLED5_MD_REF_PWM",
		"","","","",
		"","","","",
		"","","","";
	};

	sled5_fusb302: typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <0x22>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(Y, 3) IRQ_TYPE_LEVEL_LOW>;
		vbus-supply = <&vbus_sled5>;

		connector {
			compatible = "usb-c-connector";
			label = "USB-C";
			power-role = "source";
			data-role = "host";
			pd-disable;
			typec-power-opmode = "default";
		};
	};

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c5 {
	status = "okay";
	ina230@45 {
		compatible = "ti,ina230";
		reg = <0x45>;
		shunt-resistor = <2000>;
	};

	mp5023@40 {
		compatible = "mps,mp5023";
		reg = <0x40>;
	};

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	sled6_ioexp41: pca9536@41 {
		compatible = "nxp,pca9536";
		reg = <0x41>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"SLED6_SWD_MUX", "SLED6_XRES_SWD_N",
		"SLED6_CLKREQ_N", "SLED6_PCIE_PWR_EN";
	};

	sled6_ioexp: pca9539@76 {
		compatible = "nxp,pca9539";
		reg = <0x76>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(M, 5) IRQ_TYPE_LEVEL_LOW>;

		gpio-line-names =
		"SLED6_MS_DETECT1","SLED6_VBUS_BMC_EN","SLED6_INA230_ALERT","SLED6_P12V_STBY_ALERT",
		"SLED6_SSD_ALERT","SLED6_MS_DETECT0","SLED6_RST_CCG5","SLED6_FUSB302_INT",
		"SLED6_MD_STBY_RESET","SLED6_MD_IOEXP_EN_FAULT","SLED6_MD_DIR","SLED6_MD_DECAY",
		"SLED6_MD_MODE1","SLED6_MD_MODE2","SLED6_MD_MODE3","power-host6";
	};

	sled6_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-sled6-amber","led-sled6-blue","SLED6_RST_IOEXP","SLED6_MD_REF_PWM",
		"","","","",
		"","","","",
		"","","","";
	};

	sled6_fusb302: typec-portc@22 {
		compatible = "fcs,fusb302";
		reg = <0x22>;

		interrupt-parent = <&gpio0>;
		interrupts = <ASPEED_GPIO(I, 7) IRQ_TYPE_LEVEL_LOW>;
		vbus-supply = <&vbus_sled6>;

		connector {
			compatible = "usb-c-connector";
			label = "USB-C";
			power-role = "source";
			data-role = "host";
			pd-disable;
			typec-power-opmode = "default";
		};
	};

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c6 {
	status = "okay";

	eeprom@56 {
		compatible = "atmel,24c64";
		reg = <0x56>;
	};

	rtc@51 {
		/* in-chip rtc disabled, use external rtc (battery-backed) */
		compatible = "nxp,pcf85263";
		reg = <0x51>;
	};
};

&i2c7 {
	status = "okay";

	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
	};
};

&i2c9 {
	status = "okay";

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};
};

&i2c10 {
	status = "okay";

	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};

	front_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"led-fault-identify","power-p5v-stby-good",
		"power-p1v0-dvdd-good","power-p1v0-avdd-good",
		"","","","",
		"","","","",
		"","","","";
	};
};

&i2c12 {
	status = "okay";

	adm1278@11 {
		compatible = "adi,adm1278";
		reg = <0x11>;
		shunt-resistor-micro-ohms = <300>;
		adi,volt-curr-sample-average = <128>;
		adi,power-sample-average = <128>;
	};

	tmp421@4c {
		compatible = "ti,tmp421";
		reg = <0x4c>;
	};

	tmp421@4d {
		compatible = "ti,tmp421";
		reg = <0x4d>;
	};

	fan_leds: pca9552@67 {
		compatible = "nxp,pca9552";
		reg = <0x67>;
		#address-cells = <1>;
		#size-cells = <0>;
		gpio-controller;
		#gpio-cells = <2>;

		gpio-line-names =
		"presence-fan0","presence-fan1",
		"presence-fan2","presence-fan3",
		"power-fan0-good","power-fan1-good",
		"power-fan2-good","power-fan3-good",
		"","","","",
		"","","","";
	};
};

&i2c13 {
	multi-master;
	aspeed,hw-timeout-ms = <1000>;
	status = "okay";

	//USB Debug Connector
	ipmb13@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&gpio0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpiov2_unbiased_default>;

	gpio-line-names =
	/*A0-A7*/	"","","","","","","","",
	/*B0-B7*/	"FUSB302_SLED1_INT_N","FUSB302_SLED2_INT_N",
			"SEL_SPI2_MUX","SPI2_MUX1",
			"SPI2_MUX2","SPI2_MUX3",
			"","FUSB302_SLED3_INT_N",
	/*C0-C7*/	"","","","","","","","",
	/*D0-D7*/	"","","","","","","","",
	/*E0-E7*/	"","","","","","","","",
	/*F0-F7*/	"BMC_SLED1_STCK","BMC_SLED2_STCK",
			"BMC_SLED3_STCK","BMC_SLED4_STCK",
			"BMC_SLED5_STCK","BMC_SLED6_STCK",
			"","",
	/*G0-G7*/	"BSM_FRU_WP","SWITCH_FRU_MUX","","FM_SOL_UART_CH_SEL",
			"PWRGD_P1V05_VDDCORE","PWRGD_P1V5_VDD","","",
	/*H0-H7*/	"presence-riser1","presence-riser2",
			"presence-sled1","presence-sled2",
			"presence-sled3","presence-sled4",
			"presence-sled5","presence-sled6",
	/*I0-I7*/	"REV_ID0","",
			"REV_ID1","REV_ID2",
			"","BSM_FLASH_WP_STATUS",
			"BMC_TPM_PRES_N","FUSB302_SLED6_INT_N",
	/*J0-J7*/	"","","","","","","","",
	/*K0-K7*/	"","","","","","","","",
	/*L0-L7*/	"","","","","","BMC_RTC_INT","","",
	/*M0-M7*/	"ALERT_SLED1_N","ALERT_SLED2_N",
			"ALERT_SLED3_N","ALERT_SLED4_N",
			"ALERT_SLED5_N","ALERT_SLED6_N",
			"","USB_DEBUG_PWR_BTN_N",
	/*N0-N7*/	"LED_POSTCODE_0","LED_POSTCODE_1",
			"LED_POSTCODE_2","LED_POSTCODE_3",
			"LED_POSTCODE_4","LED_POSTCODE_5",
			"LED_POSTCODE_6","LED_POSTCODE_7",
	/*O0-O7*/	"","","","",
			"","BOARD_ID0","BOARD_ID1","BOARD_ID2",
	/*P0-P7*/	"","","","","","","","BMC_HEARTBEAT",
	/*Q0-Q7*/	"","","","","","","","",
	/*R0-R7*/	"","","","","","","","",
	/*S0-S7*/	"","","","BAT_DETECT",
			"BMC_BT_WP0_N","BMC_BT_WP1_N","","FUSB302_SLED4_INT_N",
	/*T0-T7*/	"","","","","","","","",
	/*U0-U7*/	"","","","","","","","",
	/*V0-V7*/	"PWRGD_CNS_PSU","RST_BMC_MVL_N",
			"P12V_AUX_ALERT1_N","PSU_PRSNT",
			"USB2_SEL0_A","USB2_SEL1_A",
			"USB2_SEL0_B","USB2_SEL1_B",
	/*W0-W7*/	"RST_FRONT_IOEXP_N","","","","","","","",
	/*X0-X7*/	"","","","","","","","",
	/*Y0-Y7*/	"BMC_SELF_HW_RST","BSM_PRSNT_N",
			"BSM_FLASH_LATCH_N","FUSB302_SLED5_INT_N",
			"","","","",
	/*Z0-Z7*/	"","","","","","","","";
};

&adc0 {
	vref = <1800>;
	status = "okay";

	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 {
	vref = <2500>;
	status = "okay";

	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>;
};

&mdio0 {
	status = "okay";
	/* TODO: Add Marvell 88E6191X */
};

&mdio3 {
	status = "okay";
	/* TODO: Add Marvell 88X3310 */
};

&ehci0 {
	status = "okay";
};

&ehci1 {
	status = "okay";
};

&emmc_controller {
	status = "okay";
};

&emmc {
	status = "okay";
};

&pinctrl {
	pinctrl_gpiov2_unbiased_default: gpiov2 {
		pins = "AD14";
		bias-disable;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2020 Facebook Inc.

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include "ast2600-facebook-netbmc-common.dtsi"

/ {
	model = "Facebook Cloudripper BMC";
	compatible = "facebook,cloudripper-bmc", "aspeed,ast2600";

	aliases {
		/*
		 * PCA9548 (1-0070) provides 8 channels connecting to
		 * SMB (Switch Main Board).
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;

		/*
		 * PCA9548 (2-0070) provides 8 channels connecting to
		 * SCM (System Controller Module).
		 */
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;

		/*
		 * PCA9548 (3-0070) provides 8 channels connecting to
		 * SMB (Switch Main Board).
		 */
		i2c32 = &imux32;
		i2c33 = &imux33;
		i2c34 = &imux34;
		i2c35 = &imux35;
		i2c36 = &imux36;
		i2c37 = &imux37;
		i2c38 = &imux38;
		i2c39 = &imux39;

		/*
		 * PCA9548 (8-0070) provides 8 channels connecting to
		 * PDB (Power Delivery Board).
		 */
		i2c40 = &imux40;
		i2c41 = &imux41;
		i2c42 = &imux42;
		i2c43 = &imux43;
		i2c44 = &imux44;
		i2c45 = &imux45;
		i2c46 = &imux46;
		i2c47 = &imux47;

		/*
		 * PCA9548 (15-0076) provides 8 channels connecting to
		 * FCM (Fan Controller Module).
		 */
		i2c48 = &imux48;
		i2c49 = &imux49;
		i2c50 = &imux50;
		i2c51 = &imux51;
		i2c52 = &imux52;
		i2c53 = &imux53;
		i2c54 = &imux54;
		i2c55 = &imux55;
	};

	spi_gpio: spi {
		num-chipselects = <2>;
		cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>,
			   <&gpio0 ASPEED_GPIO(X, 1) GPIO_ACTIVE_HIGH>;

		eeprom@1 {
			compatible = "atmel,at93c46d";
			spi-max-frequency = <250000>;
			data-size = <16>;
			spi-cs-high;
			reg = <1>;
		};
	};
};

&ehci1 {
	status = "okay";
};

/*
 * "mdio1" is connected to the MDC/MDIO interface of the on-board
 * management switch (whose ports are connected to BMC, Host and front
 * panel ethernet port).
 */
&mdio1 {
	status = "okay";
};

&mdio3 {
	status = "okay";

	ethphy1: ethernet-phy@13 {
		compatible = "ethernet-phy-ieee802.3-c22";
		reg = <0x0d>;
	};
};

&mac3 {
	status = "okay";
	phy-mode = "rgmii";
	phy-handle = <&ethphy1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii4_default>;
};

&i2c0 {
	multi-master;
	bus-frequency = <1000000>;
};

&i2c1 {
	/*
	 * PCA9548 (1-0070) provides 8 channels connecting to SMB (Switch
	 * Main Board).
	 */
	i2c-switch@70 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x70>;
		i2c-mux-idle-disconnect;

		imux16: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux17: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux18: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux19: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux20: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux21: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux22: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux23: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

&i2c2 {
	/*
	 * PCA9548 (2-0070) provides 8 channels connecting to SCM (System
	 * Controller Module).
	 */
	i2c-switch@70 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x70>;
		i2c-mux-idle-disconnect;

		imux24: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux25: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux26: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux27: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux28: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux29: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux30: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux31: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

&i2c3 {
	/*
	 * PCA9548 (3-0070) provides 8 channels connecting to SMB (Switch
	 * Main Board).
	 */
	i2c-switch@70 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x70>;
		i2c-mux-idle-disconnect;

		imux32: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux33: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux34: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux35: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux36: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux37: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux38: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux39: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

&i2c6 {
	lp5012@14 {
		compatible = "ti,lp5012";
		reg = <0x14>;
		#address-cells = <1>;
		#size-cells = <0>;

		multi-led@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			color = <LED_COLOR_ID_MULTI>;
			function = LED_FUNCTION_ACTIVITY;
			label = "sys";

			led@0 {
				reg = <0>;
				color = <LED_COLOR_ID_RED>;
			};

			led@1 {
				reg = <1>;
				color = <LED_COLOR_ID_BLUE>;
			};

			led@2 {
				reg = <2>;
				color = <LED_COLOR_ID_GREEN>;
			};
		};

		multi-led@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
			color = <LED_COLOR_ID_MULTI>;
			function = LED_FUNCTION_ACTIVITY;
			label = "fan";

			led@0 {
				reg = <0>;
				color = <LED_COLOR_ID_RED>;
			};

			led@1 {
				reg = <1>;
				color = <LED_COLOR_ID_BLUE>;
			};

			led@2 {
				reg = <2>;
				color = <LED_COLOR_ID_GREEN>;
			};
		};

		multi-led@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
			color = <LED_COLOR_ID_MULTI>;
			function = LED_FUNCTION_ACTIVITY;
			label = "psu";

			led@0 {
				reg = <0>;
				color = <LED_COLOR_ID_RED>;
			};

			led@1 {
				reg = <1>;
				color = <LED_COLOR_ID_BLUE>;
			};

			led@2 {
				reg = <2>;
				color = <LED_COLOR_ID_GREEN>;
			};
		};

		multi-led@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
			color = <LED_COLOR_ID_MULTI>;
			function = LED_FUNCTION_ACTIVITY;
			label = "scm";

			led@0 {
				reg = <0>;
				color = <LED_COLOR_ID_RED>;
			};

			led@1 {
				reg = <1>;
				color = <LED_COLOR_ID_BLUE>;
			};

			led@2 {
				reg = <2>;
				color = <LED_COLOR_ID_GREEN>;
			};
		};
	};
};

&i2c8 {
	/*
	 * PCA9548 (8-0070) provides 8 channels connecting to PDB (Power
	 * Delivery Board).
	 */
	i2c-switch@70 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x70>;
		i2c-mux-idle-disconnect;

		imux40: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux41: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux42: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux43: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux44: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux45: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux46: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux47: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};

	};
};

&i2c15 {
	/*
	 * PCA9548 (15-0076) provides 8 channels connecting to FCM (Fan
	 * Controller Module).
	 */
	i2c-switch@76 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x76>;
		i2c-mux-idle-disconnect;

		imux48: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux49: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux50: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux51: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux52: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux53: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux54: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux55: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2018 Facebook Inc.
/dts-v1/;

#include "ast2500-facebook-netbmc-common.dtsi"

/ {
	model = "Facebook Backpack CMM BMC";
	compatible = "facebook,cmm-bmc", "aspeed,ast2500";

	aliases {
		/*
		 * Override the default uart aliases to avoid breaking
		 * the legacy applications.
		 */
		serial0 = &uart5;
		serial1 = &uart1;
		serial2 = &uart3;
		serial3 = &uart4;

		/*
		 * PCA9548 (1-0077) provides 8 channels for connecting to
		 * 4 Line Cards and 4 Fabric Cards.
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;

		/*
		 * PCA9548 (2-0071) provides 8 channels for connecting to
		 * Power Distribution Board.
		 */
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;

		/*
		 * PCA9548 (8-0077) provides 8 channels and the first 4
		 * channels are connecting to 4 Fan Control Boards.
		 */
		i2c32 = &imux32;
		i2c33 = &imux33;
		i2c34 = &imux34;
		i2c35 = &imux35;
		i2c36 = &imux36;
		i2c37 = &imux37;
		i2c38 = &imux38;
		i2c39 = &imux39;

		/*
		 * 2 PCA9548 (18-0070 & 18-0073), 16 channels connecting
		 * to Line Card #1.
		 */
		i2c40 = &imux40;
		i2c41 = &imux41;
		i2c42 = &imux42;
		i2c43 = &imux43;
		i2c44 = &imux44;
		i2c45 = &imux45;
		i2c46 = &imux46;
		i2c47 = &imux47;
		i2c48 = &imux48;
		i2c49 = &imux49;
		i2c50 = &imux50;
		i2c51 = &imux51;
		i2c52 = &imux52;
		i2c53 = &imux53;
		i2c54 = &imux54;
		i2c55 = &imux55;

		/*
		 * 2 PCA9548 (19-0070 & 19-0073), 16 channels connecting
		 * to Line Card #2.
		 */
		i2c56 = &imux56;
		i2c57 = &imux57;
		i2c58 = &imux58;
		i2c59 = &imux59;
		i2c60 = &imux60;
		i2c61 = &imux61;
		i2c62 = &imux62;
		i2c63 = &imux63;
		i2c64 = &imux64;
		i2c65 = &imux65;
		i2c66 = &imux66;
		i2c67 = &imux67;
		i2c68 = &imux68;
		i2c69 = &imux69;
		i2c70 = &imux70;
		i2c71 = &imux71;

		/*
		 * 2 PCA9548 (20-0070 & 20-0073), 16 channels connecting
		 * to Line Card #3.
		 */
		i2c72 = &imux72;
		i2c73 = &imux73;
		i2c74 = &imux74;
		i2c75 = &imux75;
		i2c76 = &imux76;
		i2c77 = &imux77;
		i2c78 = &imux78;
		i2c79 = &imux79;
		i2c80 = &imux80;
		i2c81 = &imux81;
		i2c82 = &imux82;
		i2c83 = &imux83;
		i2c84 = &imux84;
		i2c85 = &imux85;
		i2c86 = &imux86;
		i2c87 = &imux87;

		/*
		 * 2 PCA9548 (21-0070 & 21-0073), 16 channels connecting
		 * to Line Card #4.
		 */
		i2c88 = &imux88;
		i2c89 = &imux89;
		i2c90 = &imux90;
		i2c91 = &imux91;
		i2c92 = &imux92;
		i2c93 = &imux93;
		i2c94 = &imux94;
		i2c95 = &imux95;
		i2c96 = &imux96;
		i2c97 = &imux97;
		i2c98 = &imux98;
		i2c99 = &imux99;
		i2c100 = &imux100;
		i2c101 = &imux101;
		i2c102 = &imux102;
		i2c103 = &imux103;

		/*
		 * 2 PCA9548 (16-0070 & 16-0073), 16 channels connecting
		 * to Fabric Card #1.
		 */
		i2c104 = &imux104;
		i2c105 = &imux105;
		i2c106 = &imux106;
		i2c107 = &imux107;
		i2c108 = &imux108;
		i2c109 = &imux109;
		i2c110 = &imux110;
		i2c111 = &imux111;
		i2c112 = &imux112;
		i2c113 = &imux113;
		i2c114 = &imux114;
		i2c115 = &imux115;
		i2c116 = &imux116;
		i2c117 = &imux117;
		i2c118 = &imux118;
		i2c119 = &imux119;

		/*
		 * 2 PCA9548 (17-0070 & 17-0073), 16 channels connecting
		 * to Fabric Card #2.
		 */
		i2c120 = &imux120;
		i2c121 = &imux121;
		i2c122 = &imux122;
		i2c123 = &imux123;
		i2c124 = &imux124;
		i2c125 = &imux125;
		i2c126 = &imux126;
		i2c127 = &imux127;
		i2c128 = &imux128;
		i2c129 = &imux129;
		i2c130 = &imux130;
		i2c131 = &imux131;
		i2c132 = &imux132;
		i2c133 = &imux133;
		i2c134 = &imux134;
		i2c135 = &imux135;

		/*
		 * 2 PCA9548 (22-0070 & 22-0073), 16 channels connecting
		 * to Fabric Card #3.
		 */
		i2c136 = &imux136;
		i2c137 = &imux137;
		i2c138 = &imux138;
		i2c139 = &imux139;
		i2c140 = &imux140;
		i2c141 = &imux141;
		i2c142 = &imux142;
		i2c143 = &imux143;
		i2c144 = &imux144;
		i2c145 = &imux145;
		i2c146 = &imux146;
		i2c147 = &imux147;
		i2c148 = &imux148;
		i2c149 = &imux149;
		i2c150 = &imux150;
		i2c151 = &imux151;

		/*
		 * 2 PCA9548 (23-0070 & 23-0073), 16 channels connecting
		 * to Fabric Card #4.
		 */
		i2c152 = &imux152;
		i2c153 = &imux153;
		i2c154 = &imux154;
		i2c155 = &imux155;
		i2c156 = &imux156;
		i2c157 = &imux157;
		i2c158 = &imux158;
		i2c159 = &imux159;
		i2c160 = &imux160;
		i2c161 = &imux161;
		i2c162 = &imux162;
		i2c163 = &imux163;
		i2c164 = &imux164;
		i2c165 = &imux165;
		i2c166 = &imux166;
		i2c167 = &imux167;

		/*
		 * PCA9548 (32-0070), 8 channels connecting to Fan Control
		 # Board #1.
		 */
		i2c168 = &imux168;
		i2c169 = &imux169;
		i2c170 = &imux170;
		i2c171 = &imux171;
		i2c172 = &imux172;
		i2c173 = &imux173;
		i2c174 = &imux174;
		i2c175 = &imux175;

		/*
		 * PCA9548 (33-0070), 8 channels connecting to Fan Control
		 # Board #2.
		 */
		i2c176 = &imux176;
		i2c177 = &imux177;
		i2c178 = &imux178;
		i2c179 = &imux179;
		i2c180 = &imux180;
		i2c181 = &imux181;
		i2c182 = &imux182;
		i2c183 = &imux183;

		/*
		 * PCA9548 (34-0070), 8 channels connecting to Fan Control
		 # Board #3.
		 */
		i2c184 = &imux184;
		i2c185 = &imux185;
		i2c186 = &imux186;
		i2c187 = &imux187;
		i2c188 = &imux188;
		i2c189 = &imux189;
		i2c190 = &imux190;
		i2c191 = &imux191;

		/*
		 * PCA9548 (35-0070), 8 channels connecting to Fan Control
		 # Board #4.
		 */
		i2c192 = &imux192;
		i2c193 = &imux193;
		i2c194 = &imux194;
		i2c195 = &imux195;
		i2c196 = &imux196;
		i2c197 = &imux197;
		i2c198 = &imux198;
		i2c199 = &imux199;
	};

	chosen {
		stdout-path = &uart1;
		bootargs = "console=ttyS1,9600n8 root=/dev/ram rw earlycon";
	};

	ast-adc-hwmon {
		compatible = "iio-hwmon";
		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
			      <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>;
	};
};

&uart1 {
	pinctrl-0 = <&pinctrl_txd1_default
		     &pinctrl_rxd1_default
		     &pinctrl_ncts1_default
		     &pinctrl_ndcd1_default
		     &pinctrl_ndsr1_default
		     &pinctrl_ndtr1_default
		     &pinctrl_nrts1_default>;
};

&uart3 {
	pinctrl-0 = <&pinctrl_txd3_default
		     &pinctrl_rxd3_default
		     &pinctrl_ncts3_default
		     &pinctrl_ndcd3_default
		     &pinctrl_nri3_default>;
};

&uart4 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd4_default
		     &pinctrl_rxd4_default>;
};

/*
 * I2C bus reserved for communication with COM-E.
 */
&i2c0 {
	status = "okay";
};

/*
 * I2C bus to Line Cards and Fabric Cards.
 */
&i2c1 {
	status = "okay";

	i2c-switch@77 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x77>;
		i2c-mux-idle-disconnect;

		/* To Fabric Card #1 */
		imux16: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux104: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux105: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux106: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux107: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux108: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux109: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux110: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux111: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux112: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux113: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux114: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux115: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux116: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux117: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux118: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux119: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Fabric Card #2 */
		imux17: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux120: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux121: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux122: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux123: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux124: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux125: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux126: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux127: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux128: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux129: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux130: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux131: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux132: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux133: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux134: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux135: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Line Card #1 */
		imux18: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux40: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux41: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux42: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux43: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux44: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux45: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux46: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux47: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux48: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux49: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux50: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux51: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux52: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux53: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux54: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux55: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Line Card #2 */
		imux19: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux56: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux57: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux58: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux59: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux60: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux61: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux62: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux63: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux64: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux65: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux66: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux67: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux68: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux69: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux70: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux71: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To LC3 SCM */
		imux20: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux72: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux73: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux74: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux75: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux76: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux77: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux78: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux79: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux80: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux81: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux82: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux83: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux84: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux85: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux86: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux87: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Line Card #4 */
		imux21: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux88: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux89: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux90: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux91: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux92: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux93: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux94: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux95: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux96: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux97: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux98: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux99: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux100: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux101: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux102: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux103: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Fabric Card #3 */
		imux22: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux136: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux137: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux138: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux139: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux140: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux141: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux142: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux143: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux144: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux145: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux146: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux147: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux148: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux149: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux150: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux151: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Fabric Card #4 */
		imux23: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux152: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux153: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux154: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux155: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux156: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux157: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux158: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux159: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				i2c-mux-idle-disconnect;

				imux160: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux161: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux162: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux163: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux164: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux165: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux166: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux167: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};
	};
};

/*
 * I2C bus to Power Distribution Board.
 */
&i2c2 {
	status = "okay";

	i2c-switch@71 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x71>;
		i2c-mux-idle-disconnect;

		imux24: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux25: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux26: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux27: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux28: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux29: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux30: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux31: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

/*
 * I2c bus connected with temperature sensors on CMM.
 */
&i2c3 {
	status = "okay";
};

/*
 * I2C bus reserved for communication with COM-E.
 */
&i2c4 {
	status = "okay";
};

/*
 * I2c bus connected with ADM1278.
 */
&i2c5 {
	status = "okay";
};

/*
 * I2c bus connected with I/O Expander.
 */
&i2c6 {
	status = "okay";
};

/*
 * I2c bus connected with I/O Expander and EPROMs.
 */
&i2c7 {
	status = "okay";
};

/*
 * I2C bus to Fan Control Boards.
 */
&i2c8 {
	status = "okay";

	i2c-switch@77 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x77>;
		i2c-mux-idle-disconnect;

		/* To Fan Control Board #1 */
		imux32: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux168: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux169: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux170: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux171: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux172: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux173: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux174: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux175: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Fan Control Board #2 */
		imux33: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux176: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux177: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux178: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux179: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux180: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux181: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux182: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux183: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Fan Control Board #3 */
		imux34: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux184: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux185: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux186: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux187: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux188: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux189: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux190: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux191: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		/* To Fan Control Board #4 */
		imux35: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;

			i2c-switch@70 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x70>;
				i2c-mux-idle-disconnect;

				imux192: i2c@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
				};
				imux193: i2c@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
				imux194: i2c@2 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <2>;
				};
				imux195: i2c@3 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <3>;
				};
				imux196: i2c@4 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <4>;
				};
				imux197: i2c@5 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <5>;
				};
				imux198: i2c@6 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <6>;
				};
				imux199: i2c@7 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <7>;
				};
			};
		};

		imux36: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux37: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux38: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux39: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

/*
 * I2C bus to CMM CPLD.
 */
&i2c13 {
	status = "okay";
};

&adc {
	status = "okay";
};

&ehci0 {
	status = "okay";
};

&ehci1 {
	status = "okay";
};

&vhub {
	status = "disabled";
};

&sdhci0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sd1_default>;
};

&sdhci1 {
	status = "disabled";
};

&fmc_flash0 {
#include "facebook-bmc-flash-layout.dtsi"
};

&fmc_flash1 {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		flash1@0 {
			reg = <0x0 0x2000000>;
			label = "flash1";
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2020 Facebook Inc.

/dts-v1/;

#include "ast2600-facebook-netbmc-common.dtsi"

/ {
	model = "Facebook Elbert BMC";
	compatible = "facebook,elbert-bmc", "aspeed,ast2600";

	aliases {
		serial0 = &uart5;
		serial1 = &uart1;
		serial2 = &uart2;
		serial3 = &uart3;

		/*
		 * 8 child channels of PCA9548 2-0075.
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;

		/*
		 * 8 child channels of PCA9548 5-0075.
		 */
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;
	};

	chosen {
		stdout-path = &uart5;
	};

	spi_gpio: spi {
		num-chipselects = <1>;
		cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;
	};
};

&lpc_ctrl {
	status = "okay";
};

&kcs2 {
	status = "okay";
	aspeed,lpc-io-reg = <0xca8>;
};

&kcs3 {
	status = "okay";
	aspeed,lpc-io-reg = <0xca2>;
};

&i2c2 {
	i2c-switch@75 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x75>;
		i2c-mux-idle-disconnect;

		imux16: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux17: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux18: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux19: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux20: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux21: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux22: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux23: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

&i2c5 {
	i2c-switch@75 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x75>;
		i2c-mux-idle-disconnect;

		imux24: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
		};

		imux25: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
		};

		imux26: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;
		};

		imux27: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;
		};

		imux28: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;
		};

		imux29: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;
		};

		imux30: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;
		};

		imux31: i2c@7 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <7>;
		};
	};
};

&i2c11 {
	status = "okay";
};

/*
 * BMC's "mac3" controller is connected to BCM53134P's IMP_RGMII port
 * directly (fixed link, no PHY in between).
 * Note: BMC's "mdio0" controller is connected to BCM53134P's MDIO
 * interface, and the MDIO channel will be enabled in dts later, when
 * BCM53134 is added to "bcm53xx" DSA driver.
 */
&mac3 {
	status = "okay";
	phy-mode = "rgmii";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii4_default>;
	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};