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 Fuji BMC";
	compatible = "facebook,fuji-bmc", "aspeed,ast2600";

	aliases {
		/*
		 * PCA9548 (2-0070) provides 8 channels connecting to
		 * SCM (System Controller Module).
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;

		/*
		 * PCA9548 (8-0070) provides 8 channels connecting to
		 * SMB (Switch Main Board).
		 */
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;

		/*
		 * PCA9548 (11-0077) provides 8 channels connecting to
		 * SMB (Switch Main Board).
		 */
		i2c40 = &imux40;
		i2c41 = &imux41;
		i2c42 = &imux42;
		i2c43 = &imux43;
		i2c44 = &imux44;
		i2c45 = &imux45;
		i2c46 = &imux46;
		i2c47 = &imux47;

		/*
		 * PCA9548 (24-0071) provides 8 channels connecting to
		 * PDB-Left.
		 */
		i2c48 = &imux48;
		i2c49 = &imux49;
		i2c50 = &imux50;
		i2c51 = &imux51;
		i2c52 = &imux52;
		i2c53 = &imux53;
		i2c54 = &imux54;
		i2c55 = &imux55;

		/*
		 * PCA9548 (25-0072) provides 8 channels connecting to
		 * PDB-Right.
		 */
		i2c56 = &imux56;
		i2c57 = &imux57;
		i2c58 = &imux58;
		i2c59 = &imux59;
		i2c60 = &imux60;
		i2c61 = &imux61;
		i2c62 = &imux62;
		i2c63 = &imux63;

		/*
		 * PCA9548 (26-0076) provides 8 channels connecting to
		 * FCM1.
		 */
		i2c64 = &imux64;
		i2c65 = &imux65;
		i2c66 = &imux66;
		i2c67 = &imux67;
		i2c68 = &imux68;
		i2c69 = &imux69;
		i2c70 = &imux70;
		i2c71 = &imux71;

		/*
		 * PCA9548 (27-0076) provides 8 channels connecting to
		 * FCM2.
		 */
		i2c72 = &imux72;
		i2c73 = &imux73;
		i2c74 = &imux74;
		i2c75 = &imux75;
		i2c76 = &imux76;
		i2c77 = &imux77;
		i2c78 = &imux78;
		i2c79 = &imux79;

		/*
		 * PCA9548 (40-0076) provides 8 channels connecting to
		 * PIM1.
		 */
		i2c80 = &imux80;
		i2c81 = &imux81;
		i2c82 = &imux82;
		i2c83 = &imux83;
		i2c84 = &imux84;
		i2c85 = &imux85;
		i2c86 = &imux86;
		i2c87 = &imux87;

		/*
		 * PCA9548 (41-0076) provides 8 channels connecting to
		 * PIM2.
		 */
		i2c88 = &imux88;
		i2c89 = &imux89;
		i2c90 = &imux90;
		i2c91 = &imux91;
		i2c92 = &imux92;
		i2c93 = &imux93;
		i2c94 = &imux94;
		i2c95 = &imux95;

		/*
		 * PCA9548 (42-0076) provides 8 channels connecting to
		 * PIM3.
		 */
		i2c96 = &imux96;
		i2c97 = &imux97;
		i2c98 = &imux98;
		i2c99 = &imux99;
		i2c100 = &imux100;
		i2c101 = &imux101;
		i2c102 = &imux102;
		i2c103 = &imux103;

		/*
		 * PCA9548 (43-0076) provides 8 channels connecting to
		 * PIM4.
		 */
		i2c104 = &imux104;
		i2c105 = &imux105;
		i2c106 = &imux106;
		i2c107 = &imux107;
		i2c108 = &imux108;
		i2c109 = &imux109;
		i2c110 = &imux110;
		i2c111 = &imux111;

		/*
		 * PCA9548 (44-0076) provides 8 channels connecting to
		 * PIM5.
		 */
		i2c112 = &imux112;
		i2c113 = &imux113;
		i2c114 = &imux114;
		i2c115 = &imux115;
		i2c116 = &imux116;
		i2c117 = &imux117;
		i2c118 = &imux118;
		i2c119 = &imux119;

		/*
		 * PCA9548 (45-0076) provides 8 channels connecting to
		 * PIM6.
		 */
		i2c120 = &imux120;
		i2c121 = &imux121;
		i2c122 = &imux122;
		i2c123 = &imux123;
		i2c124 = &imux124;
		i2c125 = &imux125;
		i2c126 = &imux126;
		i2c127 = &imux127;

		/*
		 * PCA9548 (46-0076) provides 8 channels connecting to
		 * PIM7.
		 */
		i2c128 = &imux128;
		i2c129 = &imux129;
		i2c130 = &imux130;
		i2c131 = &imux131;
		i2c132 = &imux132;
		i2c133 = &imux133;
		i2c134 = &imux134;
		i2c135 = &imux135;

		/*
		 * PCA9548 (47-0076) provides 8 channels connecting to
		 * PIM8.
		 */
		i2c136 = &imux136;
		i2c137 = &imux137;
		i2c138 = &imux138;
		i2c139 = &imux139;
		i2c140 = &imux140;
		i2c141 = &imux141;
		i2c142 = &imux142;
		i2c143 = &imux143;
	};

	spi_gpio: spi {
		num-chipselects = <3>;
		cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>,
			   <0>,	/* device reg=<1> does not exist */
			   <&gpio0 ASPEED_GPIO(X, 2) GPIO_ACTIVE_HIGH>;

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

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

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

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

			adm1278@10 {
				compatible = "adi,adm1278";
				reg = <0x10>;
				#address-cells = <1>;
				#size-cells = <0>;
				shunt-resistor-micro-ohms = <1500>;
			};
		};

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

&i2c8 {
	/*
	 * PCA9548 (8-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;

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

			i2c-switch@71 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x71>;
				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>;

					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 = "smb";

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

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

		};

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

			i2c-switch@72 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x72>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;

					adm1278@10 {
						compatible = "adi,adm1278";
						reg = <0x10>;
						#address-cells = <1>;
						#size-cells = <0>;
						shunt-resistor-micro-ohms = <250>;
					};
				};

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

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;

					adm1278@10 {
						compatible = "adi,adm1278";
						reg = <0x10>;
						#address-cells = <1>;
						#size-cells = <0>;
						shunt-resistor-micro-ohms = <250>;
					};
				};

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

		};

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

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

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

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

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};

		};

	};
};

&ehci1 {
	status = "okay";
};

&mdio1 {
	status = "okay";

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

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


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

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

/ {
	model = "Facebook Galaxy 100 BMC";
	compatible = "facebook,galaxy100-bmc", "aspeed,ast2400";

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

	ast-adc-hwmon {
		compatible = "iio-hwmon";
		io-channels = <&adc 3>, <&adc 4>, <&adc 8>, <&adc 9>;
	};
};

&wdt2 {
	status = "okay";
	aspeed,reset-type = "system";
};

&fmc {
	flash@1 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.1";

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

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

&i2c9 {
	status = "okay";
};

&vhub {
	status = "okay";
};

repo_name: angery/linux


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

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

/ {
	model = "Facebook Minipack 100 BMC";
	compatible = "facebook,minipack-bmc", "aspeed,ast2500";

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

		/*
		 * i2c switch 2-0070, pca9548, 8 child channels assigned
		 * with bus number 16-23.
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;

		/*
		 * i2c switch 8-0070, pca9548, 8 child channels assigned
		 * with bus number 24-31.
		 */
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;

		/*
		 * i2c switch 9-0070, pca9548, 8 child channels assigned
		 * with bus number 32-39.
		 */
		i2c32 = &imux32;
		i2c33 = &imux33;
		i2c34 = &imux34;
		i2c35 = &imux35;
		i2c36 = &imux36;
		i2c37 = &imux37;
		i2c38 = &imux38;
		i2c39 = &imux39;

		/*
		 * i2c switch 11-0070, pca9548, 8 child channels assigned
		 * with bus number 40-47.
		 */
		i2c40 = &imux40;
		i2c41 = &imux41;
		i2c42 = &imux42;
		i2c43 = &imux43;
		i2c44 = &imux44;
		i2c45 = &imux45;
		i2c46 = &imux46;
		i2c47 = &imux47;

		/*
		 * I2C Switch 24-0071 (channel #0 of 8-0070): 8 channels for
		 * connecting to left PDB (Power Distribution Board).
		 */
		i2c48 = &imux48;
		i2c49 = &imux49;
		i2c50 = &imux50;
		i2c51 = &imux51;
		i2c52 = &imux52;
		i2c53 = &imux53;
		i2c54 = &imux54;
		i2c55 = &imux55;

		/*
		 * I2C Switch 25-0072 (channel #1 of 8-0070): 8 channels for
		 * connecting to right PDB (Power Distribution Board).
		 */
		i2c56 = &imux56;
		i2c57 = &imux57;
		i2c58 = &imux58;
		i2c59 = &imux59;
		i2c60 = &imux60;
		i2c61 = &imux61;
		i2c62 = &imux62;
		i2c63 = &imux63;

		/*
		 * I2C Switch 26-0076 (channel #2 of 8-0070): 8 channels for
		 * connecting to top FCM (Fan Control Module).
		 */
		i2c64 = &imux64;
		i2c65 = &imux65;
		i2c66 = &imux66;
		i2c67 = &imux67;
		i2c68 = &imux68;
		i2c69 = &imux69;
		i2c70 = &imux70;
		i2c71 = &imux71;

		/*
		 * I2C Switch 27-0076 (channel #3 of 8-0070): 8 channels for
		 * connecting to bottom FCM (Fan Control Module).
		 */
		i2c72 = &imux72;
		i2c73 = &imux73;
		i2c74 = &imux74;
		i2c75 = &imux75;
		i2c76 = &imux76;
		i2c77 = &imux77;
		i2c78 = &imux78;
		i2c79 = &imux79;

		/*
		 * I2C Switch 40-0073 (channel #0 of 11-0070): connecting
		 * to PIM (Port Interface Module) #1 (1-based).
		 */
		i2c80 = &imux80;
		i2c81 = &imux81;
		i2c82 = &imux82;
		i2c83 = &imux83;
		i2c84 = &imux84;
		i2c85 = &imux85;
		i2c86 = &imux86;
		i2c87 = &imux87;

		/*
		 * I2C Switch 41-0073 (channel #1 of 11-0070): connecting
		 * to PIM (Port Interface Module) #2 (1-based).
		 */
		i2c88 = &imux88;
		i2c89 = &imux89;
		i2c90 = &imux90;
		i2c91 = &imux91;
		i2c92 = &imux92;
		i2c93 = &imux93;
		i2c94 = &imux94;
		i2c95 = &imux95;

		/*
		 * I2C Switch 42-0073 (channel #2 of 11-0070): connecting
		 * to PIM (Port Interface Module) #3 (1-based).
		 */
		i2c96 = &imux96;
		i2c97 = &imux97;
		i2c98 = &imux98;
		i2c99 = &imux99;
		i2c100 = &imux100;
		i2c101 = &imux101;
		i2c102 = &imux102;
		i2c103 = &imux103;

		/*
		 * I2C Switch 43-0073 (channel #3 of 11-0070): connecting
		 * to PIM (Port Interface Module) #4 (1-based).
		 */
		i2c104 = &imux104;
		i2c105 = &imux105;
		i2c106 = &imux106;
		i2c107 = &imux107;
		i2c108 = &imux108;
		i2c109 = &imux109;
		i2c110 = &imux110;
		i2c111 = &imux111;

		/*
		 * I2C Switch 44-0073 (channel #4 of 11-0070): connecting
		 * to PIM (Port Interface Module) #5 (1-based).
		 */
		i2c112 = &imux112;
		i2c113 = &imux113;
		i2c114 = &imux114;
		i2c115 = &imux115;
		i2c116 = &imux116;
		i2c117 = &imux117;
		i2c118 = &imux118;
		i2c119 = &imux119;

		/*
		 * I2C Switch 45-0073 (channel #5 of 11-0070): connecting
		 * to PIM (Port Interface Module) #6 (1-based).
		 */
		i2c120 = &imux120;
		i2c121 = &imux121;
		i2c122 = &imux122;
		i2c123 = &imux123;
		i2c124 = &imux124;
		i2c125 = &imux125;
		i2c126 = &imux126;
		i2c127 = &imux127;

		/*
		 * I2C Switch 46-0073 (channel #6 of 11-0070): connecting
		 * to PIM (Port Interface Module) #7 (1-based).
		 */
		i2c128 = &imux128;
		i2c129 = &imux129;
		i2c130 = &imux130;
		i2c131 = &imux131;
		i2c132 = &imux132;
		i2c133 = &imux133;
		i2c134 = &imux134;
		i2c135 = &imux135;

		/*
		 * I2C Switch 47-0073 (channel #7 of 11-0070): connecting
		 * to PIM (Port Interface Module) #8 (1-based).
		 */
		i2c136 = &imux136;
		i2c137 = &imux137;
		i2c138 = &imux138;
		i2c139 = &imux139;
		i2c140 = &imux140;
		i2c141 = &imux141;
		i2c142 = &imux142;
		i2c143 = &imux143;
	};

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

&wdt2 {
	status = "okay";
	aspeed,reset-type = "system";
};

/*
 * Both firmware flashes are 64MB on Minipack BMC.
 */
&fmc_flash0 {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		/*
		 * u-boot partition: 384KB.
		 */
		u-boot@0 {
			reg = <0x0 0x60000>;
			label = "u-boot";
		};

		/*
		 * u-boot environment variables: 128KB.
		 */
		u-boot-env@60000 {
			reg = <0x60000 0x20000>;
			label = "env";
		};

		/*
		 * FIT image: 55.5 MB.
		 */
		fit@80000 {
			reg = <0x80000 0x3780000>;
			label = "fit";
		};

		/*
		 * "data0" partition (8MB) is reserved for persistent
		 * data store.
		 */
		data0@3800000 {
			reg = <0x3800000 0x800000>;
			label = "data0";
		};

		/*
		 * "flash0" partition (covering the entire flash) is
		 * explicitly created to avoid breaking legacy applications.
		 */
		flash0@0 {
			reg = <0x0 0x4000000>;
			label = "flash0";
		};
	};
};

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

		flash1@0 {
			reg = <0x0 0x4000000>;
		};
	};
};

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

&uart2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd2_default
		     &pinctrl_rxd2_default>;
};

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

&i2c0 {
	status = "okay";
	bus-frequency = <400000>;
	multi-master;
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";

	/*
	 * I2C Switch 2-0070 is connecting to SCM (System Controller
	 * Module).
	 */
	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>;
		};
	};
};

&i2c3 {
	status = "okay";
};

&i2c4 {
	status = "okay";
	multi-master;
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
};

&i2c7 {
	status = "okay";
};

&i2c8 {
	status = "okay";

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

		/*
		 * I2C Switch 8-0070 channel #0: connecting to left PDB
		 * (Power Distribution Board).
		 */
		imux24: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

			i2c-switch@71 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x71>;
				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>;
				};
			};
		};

		/*
		 * I2C Switch 8-0070 channel #1: connecting to right PDB
		 * (Power Distribution Board).
		 */
		imux25: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;

			i2c-switch@72 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x72>;
				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 8-0070 channel #2: connecting to top FCM
		 * (Fan Control Module).
		 */
		imux26: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};
		};

		/*
		 * I2C Switch 8-0070 channel #3: connecting to bottom
		 * FCM (Fan Control Module).
		 */
		imux27: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;

			i2c-switch@76 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x76>;
				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>;
				};
			};
		};

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

&i2c9 {
	status = "okay";

	/*
	 * I2C Switch 9-0070 is connecting to MAC/PHY EEPROMs on 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>;
		};
	};
};

&i2c10 {
	status = "okay";
};

&i2c11 {
	status = "okay";

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

		/*
		 * I2C Switch 11-0070 channel #0: connecting to PIM
		 * (Port Interface Module) #1 (1-based).
		 */
		imux40: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

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

		/*
		 * I2C Switch 11-0070 channel #1: connecting to PIM
		 * (Port Interface Module) #2 (1-based).
		 */
		imux41: i2c@1 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				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 11-0070 channel #2: connecting to PIM
		 * (Port Interface Module) #3 (1-based).
		 */
		imux42: i2c@2 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <2>;

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

		/*
		 * I2C Switch 11-0070 channel #3: connecting to PIM
		 * (Port Interface Module) #4 (1-based).
		 */
		imux43: i2c@3 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <3>;

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				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 11-0070 channel #4: connecting to PIM
		 * (Port Interface Module) #5 (1-based).
		 */
		imux44: i2c@4 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <4>;

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

		/*
		 * I2C Switch 11-0070 channel #5: connecting to PIM
		 * (Port Interface Module) #6 (1-based).
		 */
		imux45: i2c@5 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <5>;

			i2c-switch@73 {
				compatible = "nxp,pca9548";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x73>;
				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 11-0070 channel #6: connecting to PIM
		 * (Port Interface Module) #7 (1-based).
		 */
		imux46: i2c@6 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <6>;

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

		/*
		 * I2C Switch 11-0070 channel #7: connecting to PIM
		 * (Port Interface Module) #8 (1-based).
		 */
		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;

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

&i2c12 {
	status = "okay";
};

&i2c13 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2018 Facebook Inc.
// Author: Vijay Khemka <vijaykhemka@fb.com>
/dts-v1/;

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

/ {
	model = "Facebook TiogaPass BMC";
	compatible = "facebook,tiogapass-bmc", "aspeed,ast2500";
	aliases {
		serial0 = &uart1;
		serial4 = &uart5;

		/*
		 * Hardcode the bus number of i2c switches' channels to
		 * avoid breaking the legacy applications.
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;
	};
	chosen {
		stdout-path = &uart5;
		bootargs = "console=ttyS4,115200 earlycon";
	};

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

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

};

&fmc {
	status = "okay";
	flash@0 {
		status = "okay";
		m25p,fast-read;
#include "openbmc-flash-layout.dtsi"
	};
};

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

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

&lpc_ctrl {
	// Enable lpc clock
	status = "okay";
};

&uart1 {
	// Host Console
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd1_default
		     &pinctrl_rxd1_default>;
};

&uart2 {
	// SoL Host Console
	status = "okay";
};

&uart3 {
	// SoL BMC Console
	status = "okay";
};

&uart5 {
	// BMC Console
	status = "okay";
};

&kcs2 {
	// BMC KCS channel 2
	status = "okay";
	aspeed,lpc-io-reg = <0xca8>;
};

&kcs3 {
	// BMC KCS channel 3
	status = "okay";
	aspeed,lpc-io-reg = <0xca2>;
};

&gpio {
	status = "okay";
	gpio-line-names =
	/*A0-A7*/	"BMC_CPLD_FPGA_SEL","","","","","","","",
	/*B0-B7*/	"","BMC_DEBUG_EN","","","","BMC_PPIN","PS_PWROK",
			"IRQ_PVDDQ_GHJ_VRHOT_LVT3",
	/*C0-C7*/	"","","","","","","","",
	/*D0-D7*/	"BIOS_MRC_DEBUG_MSG_DIS","BOARD_REV_ID0","",
			"BOARD_REV_ID1","IRQ_DIMM_SAVE_LVT3","BOARD_REV_ID2",
			"CPU_ERR0_LVT3_BMC","CPU_ERR1_LVT3_BMC",
	/*E0-E7*/	"RESET_BUTTON","RESET_OUT","POWER_BUTTON",
			"POWER_OUT","NMI_BUTTON","","CPU0_PROCHOT_LVT3_ BMC",
			"CPU1_PROCHOT_LVT3_ BMC",
	/*F0-F7*/	"IRQ_PVDDQ_ABC_VRHOT_LVT3","",
			"IRQ_PVCCIN_CPU0_VRHOT_LVC3",
			"IRQ_PVCCIN_CPU1_VRHOT_LVC3",
			"IRQ_PVDDQ_KLM_VRHOT_LVT3","","P3VBAT_BRIDGE_EN","",
	/*G0-G7*/	"CPU_ERR2_LVT3","CPU_CATERR_LVT3","PCH_BMC_THERMTRIP",
			"CPU0_SKTOCC_LVT3","","","","BIOS_SMI_ACTIVE",
	/*H0-H7*/	"LED_POST_CODE_0","LED_POST_CODE_1","LED_POST_CODE_2",
			"LED_POST_CODE_3","LED_POST_CODE_4","LED_POST_CODE_5",
			"LED_POST_CODE_6","LED_POST_CODE_7",
	/*I0-I7*/	"CPU0_FIVR_FAULT_LVT3","CPU1_FIVR_FAULT_LVT3",
			"FORCE_ADR","UV_ADR_TRIGGER_EN","","","","",
	/*J0-J7*/	"","","","","","","","",
	/*K0-K7*/	"","","","","","","","",
	/*L0-L7*/	"IRQ_UV_DETECT","IRQ_OC_DETECT","HSC_TIMER_EXP","",
			"MEM_THERM_EVENT_PCH","PMBUS_ALERT_BUF_EN","","",
	/*M0-M7*/	"CPU0_RC_ERROR","CPU1_RC_ERROR","","OC_DETECT_EN",
			"CPU0_THERMTRIP_LATCH_LVT3",
			"CPU1_THERMTRIP_LATCH_LVT3","","",
	/*N0-N7*/	"","","","CPU_MSMI_LVT3","","BIOS_SPI_BMC_CTRL","","",
	/*O0-O7*/	"","","","","","","","",
	/*P0-P7*/	"BOARD_SKU_ID0","BOARD_SKU_ID1","BOARD_SKU_ID2",
			"BOARD_SKU_ID3","BOARD_SKU_ID4","BMC_PREQ",
			"BMC_PWR_DEBUG","RST_RSMRST",
	/*Q0-Q7*/	"","","","","UARTSW_LSB","UARTSW_MSB",
			"POST_CARD_PRES_BMC","PE_BMC_WAKE",
	/*R0-R7*/	"","","BMC_TCK_MUX_SEL","BMC_PRDY",
			"BMC_XDP_PRSNT_IN","RST_BMC_PLTRST_BUF","SLT_CFG0",
			"SLT_CFG1",
	/*S0-S7*/	"THROTTLE","BMC_READY","","HSC_SMBUS_SWITCH_EN","",
			"","","",
	/*T0-T7*/	"","","","","","","","",
	/*U0-U7*/	"","","","","","BMC_FAULT","","",
	/*V0-V7*/	"","","","FAST_PROCHOT_EN","","","","",
	/*W0-W7*/	"","","","","","","","",
	/*X0-X7*/	"","","","GLOBAL_RST_WARN",
			"CPU0_MEMABC_MEMHOT_LVT3_BMC",
			"CPU0_MEMDEF_MEMHOT_LVT3_BMC",
			"CPU1_MEMGHJ_MEMHOT_LVT3_BMC",
			"CPU1_MEMKLM_MEMHOT_LVT3_BMC",
	/*Y0-Y7*/	"SIO_S3","SIO_S5","BMC_JTAG_SEL","SIO_ONCONTROL","",
			"","","",
	/*Z0-Z7*/	"","SIO_POWER_GOOD","IRQ_PVDDQ_DEF_VRHOT_LVT3","",
			"","","","",
	/*AA0-AA7*/	"CPU1_SKTOCC_LVT3","IRQ_SML1_PMBUS_ALERT",
			"SERVER_POWER_LED","","PECI_MUX_SELECT","UV_HIGH_SET",
			"","POST_COMPLETE",
	/*AB0-AB7*/	"IRQ_HSC_FAULT","OCP_MEZZA_PRES","","","","","","",
	/*AC0-AC7*/	"","","","","","","","";
};

&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_rmii2_default>;
	use-ncsi;
};

&adc {
	status = "okay";
};

&i2c0 {
	status = "okay";
	//Airmax Conn B, CPU0 PIROM, CPU1 PIROM
};

&i2c1 {
	status = "okay";
	//X24 Riser
	i2c-switch@71 {
		compatible = "nxp,pca9544";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x71>;

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

			ina230@45 {
				compatible = "ti,ina230";
				reg = <0x45>;
			};

			tmp75@48 {
				compatible = "ti,tmp75";
				reg = <0x48>;
			};

			tmp421@49 {
				compatible = "ti,tmp75";
				reg = <0x49>;
			};

			eeprom@50 {
				compatible = "atmel,24c64";
				reg = <0x50>;
				pagesize = <32>;
			};

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

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

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

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

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

			};

		};

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

			ina230@45 {
				compatible = "ti,ina230";
				reg = <0x45>;
			};

			tmp421@48 {
				compatible = "ti,tmp75";
				reg = <0x48>;
			};

			tmp421@49 {
				compatible = "ti,tmp75";
				reg = <0x49>;
			};

			eeprom@50 {
				compatible = "atmel,24c64";
				reg = <0x50>;
				pagesize = <32>;
			};

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

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

			};

		};

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

			ina230@45 {
				compatible = "ti,ina230";
				reg = <0x45>;
			};

			tmp421@48 {
				compatible = "ti,tmp75";
				reg = <0x48>;
			};

			tmp421@49 {
				compatible = "ti,tmp75";
				reg = <0x49>;
			};

			eeprom@50 {
				compatible = "atmel,24c64";
				reg = <0x50>;
				pagesize = <32>;
			};

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

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

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

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

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

			};

		};

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

			i2c-switch@40 {
				compatible = "ti,ina230";
				reg = <0x40>;
			};

			i2c-switch@41 {
				compatible = "ti,ina230";
				reg = <0x41>;
			};

			i2c-switch@45 {
				compatible = "ti,ina230";
				reg = <0x45>;
			};

		};

	};
};

&i2c2 {
	status = "okay";
	// Mezz Management SMBus
};

&i2c3 {
	status = "okay";
	// SMBus to Board ID EEPROM
};

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

&i2c5 {
	status = "okay";
	// CPU Voltage regulators
	regulator@48 {
		compatible = "infineon,pxe1610";
		reg = <0x48>;
	};
	regulator@4a {
		compatible = "infineon,pxe1610";
		reg = <0x4a>;
	};
	regulator@50 {
		compatible = "infineon,pxe1610";
		reg = <0x50>;
	};
	regulator@52 {
		compatible = "infineon,pxe1610";
		reg = <0x52>;
	};
	regulator@58 {
		compatible = "infineon,pxe1610";
		reg = <0x58>;
	};
	regulator@5a {
		compatible = "infineon,pxe1610";
		reg = <0x5a>;
	};
	regulator@68 {
		compatible = "infineon,pxe1610";
		reg = <0x68>;
	};
	regulator@70 {
		compatible = "infineon,pxe1610";
		reg = <0x70>;
	};
	regulator@72 {
		compatible = "infineon,pxe1610";
		reg = <0x72>;
	};
};

&i2c6 {
	status = "okay";
	tpm@20 {
		compatible = "infineon,slb9645tt";
		reg = <0x20>;
	};
	tmp421@4e {
		compatible = "ti,tmp421";
		reg = <0x4e>;
	};
	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};
	eeprom@54 {
		compatible = "atmel,24c64";
		reg = <0x54>;
		pagesize = <32>;
	};
};

&i2c7 {
	status = "okay";
	//HSC, AirMax Conn A
	adm1278@45 {
		compatible = "adm1275";
		reg = <0x45>;
		shunt-resistor-micro-ohms = <250>;
	};
};

&i2c8 {
	status = "okay";
	tmp421@1f {
		compatible = "ti,tmp421";
		reg = <0x1f>;
	};
	//Mezz Sensor SMBus
};

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

&pwm_tacho {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
	fan@0 {
		reg = <0x00>;
		aspeed,fan-tach-ch = /bits/ 8 <0x00>;
	};

	fan@1 {
		reg = <0x01>;
		aspeed,fan-tach-ch = /bits/ 8 <0x02>;
	};
};


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

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

/ {
	model = "Facebook Wedge 100 BMC";
	compatible = "facebook,wedge100-bmc", "aspeed,ast2400";

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

	ast-adc-hwmon {
		compatible = "iio-hwmon";
		io-channels = <&adc 5>, <&adc 6>, <&adc 7>, <&adc 8>, <&adc 9>;
	};
};

&wdt2 {
	status = "okay";
	aspeed,reset-type = "system";
};

&fmc {
	flash@1 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.1";

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

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

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

&i2c9 {
	status = "okay";
};

&vhub {
	status = "okay";
};


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

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

/ {
	model = "Facebook Wedge 40 BMC";
	compatible = "facebook,wedge40-bmc", "aspeed,ast2400";

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

	ast-adc-hwmon {
		compatible = "iio-hwmon";
		io-channels = <&adc 5>, <&adc 6>, <&adc 7>, <&adc 8>, <&adc 9>;
	};
};

&wdt2 {
	status = "disabled";
};

&pwm_tacho {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_default
		     &pinctrl_pwm1_default
		     &pinctrl_pwm6_default
		     &pinctrl_pwm7_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@6 {
		reg = <0x06>;
		aspeed,fan-tach-ch = /bits/ 8 <0x04 0x05>;
	};

	fan@7 {
		reg = <0x07>;
		aspeed,fan-tach-ch = /bits/ 8 <0x06 0x07>;
	};
};


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

#include <dt-bindings/gpio/aspeed-gpio.h>
#include "ast2500-facebook-netbmc-common.dtsi"

/ {
	model = "Facebook Wedge 400 BMC";
	compatible = "facebook,wedge400-bmc", "aspeed,ast2500";

	aliases {
		/*
		 * PCA9548 (2-0070) provides 8 channels connecting to
		 * SCM (System Controller Module).
		 */
		i2c16 = &imux16;
		i2c17 = &imux17;
		i2c18 = &imux18;
		i2c19 = &imux19;
		i2c20 = &imux20;
		i2c21 = &imux21;
		i2c22 = &imux22;
		i2c23 = &imux23;

		/*
		 * PCA9548 (8-0070) provides 8 channels connecting to
		 * SMB (Switch Main Board).
		 */
		i2c24 = &imux24;
		i2c25 = &imux25;
		i2c26 = &imux26;
		i2c27 = &imux27;
		i2c28 = &imux28;
		i2c29 = &imux29;
		i2c30 = &imux30;
		i2c31 = &imux31;

		/*
		 * PCA9548 (11-0076) provides 8 channels connecting to
		 * FCM (Fan Controller Module).
		 */
		i2c32 = &imux32;
		i2c33 = &imux33;
		i2c34 = &imux34;
		i2c35 = &imux35;
		i2c36 = &imux36;
		i2c37 = &imux37;
		i2c38 = &imux38;
		i2c39 = &imux39;

		spi2 = &spi_gpio;
	};

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

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

	/*
	 * GPIO-based SPI Master is required to access SPI TPM, because
	 * full-duplex SPI transactions are not supported by ASPEED SPI
	 * Controllers.
	 */
	spi_gpio: spi {
		status = "okay";
		compatible = "spi-gpio";
		#address-cells = <1>;
		#size-cells = <0>;

		cs-gpios = <&gpio ASPEED_GPIO(R, 2) GPIO_ACTIVE_LOW>;
		gpio-sck = <&gpio ASPEED_GPIO(R, 3) GPIO_ACTIVE_HIGH>;
		gpio-mosi = <&gpio ASPEED_GPIO(R, 4) GPIO_ACTIVE_HIGH>;
		gpio-miso = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_HIGH>;
		num-chipselects = <1>;

		tpmdev@0 {
			compatible = "tcg,tpm_tis-spi";
			spi-max-frequency = <33000000>;
			reg = <0>;
		};
	};
};

/*
 * Both firmware flashes are 128MB on Wedge400 BMC.
 */
&fmc_flash0 {
#include "facebook-bmc-flash-layout-128.dtsi"
};

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

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

&uart2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd2_default
		     &pinctrl_rxd2_default>;
};

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

/*
 * I2C bus #0 is multi-master environment dedicated for BMC and Bridge IC
 * communication.
 */
&i2c0 {
	status = "okay";
	multi-master;
	bus-frequency = <1000000>;
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";

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

&i2c3 {
	status = "okay";
};

&i2c4 {
	status = "okay";
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
};

&i2c7 {
	status = "okay";
};

&i2c8 {
	status = "okay";

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

	};
};

&i2c9 {
	status = "okay";
};

&i2c10 {
	status = "okay";
};

&i2c11 {
	status = "okay";

	i2c-switch@76 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x76>;
		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>;
		};

	};
};

&i2c12 {
	status = "okay";
};

&i2c13 {
	status = "okay";
};

&adc {
	status = "okay";
};

&ehci1 {
	status = "okay";
};

&uhci {
	status = "okay";
};

&sdhci1 {
	/*
	 * DMA mode needs to be disabled to avoid conflicts with UHCI
	 * Controller in AST2500 SoC.
	 */
	sdhci-caps-mask = <0x0 0x580000>;
};


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

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

/ {
	model = "Facebook YAMP 100 BMC";
	compatible = "facebook,yamp-bmc", "aspeed,ast2500";

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

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

&uart2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd2_default
		     &pinctrl_rxd2_default>;
};

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

&mac1 {
	status = "disabled";
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";

	i2c-switch@75 {
		compatible = "nxp,pca9548";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x75>;
	};
};

&i2c3 {
	status = "okay";
};

&i2c4 {
	status = "okay";
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
};

&i2c7 {
	status = "okay";
};

&i2c8 {
	status = "okay";
};

&i2c9 {
	status = "okay";
};

&i2c10 {
	status = "okay";
};

&i2c11 {
	status = "okay";
};

&i2c12 {
	status = "okay";
};

&i2c13 {
	status = "okay";
};

&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-or-later
// Copyright (c) 2018 Facebook Inc.
/dts-v1/;
#include "aspeed-g5.dtsi"
#include <dt-bindings/i2c/i2c.h>

/ {
	model = "Facebook Yosemitev2 BMC";
	compatible = "facebook,yosemitev2-bmc", "aspeed,ast2500";
	aliases {
		serial4 = &uart5;
	};
	chosen {
		stdout-path = &uart5;
	};

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

	iio-hwmon {
		// VOLATAGE SENSOR
		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> ;
	};
};

&fmc {
	status = "okay";
	flash@0 {
		status = "okay";
		m25p,fast-read;
#include "openbmc-flash-layout.dtsi"
	};
};

&spi1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spi1_default>;
	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "pnor";
	};
};
&uart1 {
	// Host1 Console
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd1_default
		     &pinctrl_rxd1_default>;
};

&uart2 {
	// Host2 Console
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd2_default
		     &pinctrl_rxd2_default>;

};

&uart3 {
	// Host3 Console
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd3_default
		     &pinctrl_rxd3_default>;
};

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

&uart5 {
	// BMC Console
	status = "okay";
};

&vuart {
	// Virtual UART
	status = "okay";
};

&mac0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rmii1_default>;
	use-ncsi;
	mlx,multi-host;
};

&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
			&pinctrl_adc10_default
			&pinctrl_adc11_default
			&pinctrl_adc12_default
			&pinctrl_adc13_default
			&pinctrl_adc14_default
			&pinctrl_adc15_default>;
};

&i2c1 {
	//Host1 IPMB bus
	status = "okay";
	multi-master;
	ipmb1@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&i2c3 {
	//Host2 IPMB bus
	status = "okay";
	multi-master;
	ipmb3@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&i2c5 {
	//Host3 IPMB bus
	status = "okay";
	multi-master;
	ipmb5@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&i2c7 {
	//Host4 IPMB bus
	status = "okay";
	multi-master;
	ipmb7@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&i2c8 {
	status = "okay";
	//FRU EEPROM
	eeprom@51 {
		compatible = "atmel,24c64";
		reg = <0x51>;
		pagesize = <32>;
	};
};

&i2c9 {
	status = "okay";
	tmp421@4e {
	//INLET TEMP
		compatible = "ti,tmp421";
		reg = <0x4e>;
	};
	//OUTLET TEMP
	tmp421@4f {
		compatible = "ti,tmp421";
		reg = <0x4f>;
	};
};

&i2c10 {
	status = "okay";
	//HSC
	adm1278@40 {
		compatible = "adi,adm1278";
		reg = <0x40>;
	};
};

&i2c11 {
	status = "okay";
	//MEZZ_TEMP_SENSOR
	tmp421@1f {
		compatible = "ti,tmp421";
		reg = <0x1f>;
	};
};

&i2c12 {
	status = "okay";
};

&i2c13 {
	status = "okay";
	// Debug Card
	multi-master;
	ipmb13@10 {
		compatible = "ipmb-dev";
		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
		i2c-protocol;
	};
};

&pwm_tacho {
	status = "okay";
	//FSC
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
	fan@0 {
		reg = <0x00>;
		aspeed,fan-tach-ch = /bits/ 8 <0x00>;
	};
	fan@1 {
		reg = <0x01>;
		aspeed,fan-tach-ch = /bits/ 8 <0x01>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright 2022 IBM Corp.
/dts-v1/;

#include "aspeed-g6.dtsi"
#include <dt-bindings/gpio/aspeed-gpio.h>
#include <dt-bindings/i2c/i2c.h>
#include <dt-bindings/leds/leds-pca955x.h>

/ {
	model = "Bonnell";
	compatible = "ibm,bonnell-bmc", "aspeed,ast2600";

	aliases {
		i2c100 = &cfam0_i2c0;
		i2c101 = &cfam0_i2c1;
		i2c110 = &cfam0_i2c10;
		i2c111 = &cfam0_i2c11;
		i2c112 = &cfam0_i2c12;
		i2c113 = &cfam0_i2c13;
		i2c114 = &cfam0_i2c14;
		i2c115 = &cfam0_i2c15;
		i2c202 = &cfam1_i2c2;
		i2c203 = &cfam1_i2c3;
		i2c210 = &cfam1_i2c10;
		i2c211 = &cfam1_i2c11;
		i2c214 = &cfam1_i2c14;
		i2c215 = &cfam1_i2c15;
		i2c216 = &cfam1_i2c16;
		i2c217 = &cfam1_i2c17;

		serial4 = &uart5;
		i2c16 = &i2c11mux0chn0;
		i2c17 = &i2c11mux0chn1;
		i2c18 = &i2c11mux0chn2;
		i2c19 = &i2c11mux0chn3;

		spi10 = &cfam0_spi0;
		spi11 = &cfam0_spi1;
		spi12 = &cfam0_spi2;
		spi13 = &cfam0_spi3;
		spi20 = &cfam1_spi0;
		spi21 = &cfam1_spi1;
		spi22 = &cfam1_spi2;
		spi23 = &cfam1_spi3;

	};

	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;

		ramoops@b3e00000 {
			compatible = "ramoops";
			reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
			record-size = <0x8000>;
			console-size = <0x8000>;
			ftrace-size = <0x8000>;
			pmsg-size = <0x8000>;
			max-reason = <3>; /* KMSG_DUMP_EMERG */
		};

		/* 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";

		fan0 {
			gpios = <&gpio0 ASPEED_GPIO(G, 0) GPIO_ACTIVE_LOW>;
		};

		fan1 {
			gpios = <&gpio0 ASPEED_GPIO(G, 1) GPIO_ACTIVE_LOW>;
		};

		rear-enc-id0 {
			gpios = <&gpio0 ASPEED_GPIO(H, 2) GPIO_ACTIVE_LOW>;
		};

		rear-enc-fault0 {
			gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <1000>;

		fan0-presence {
			label = "fan0-presence";
			gpios = <&gpio0 ASPEED_GPIO(F, 4) GPIO_ACTIVE_LOW>;
			linux,code = <6>;
		};

		fan1-presence {
			label = "fan1-presence";
			gpios = <&gpio0 ASPEED_GPIO(F, 5) GPIO_ACTIVE_LOW>;
			linux,code = <7>;
		};
	};

	iio-hwmon-battery {
		compatible = "iio-hwmon";
		io-channels = <&adc1 7>;
	};
};

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

&ehci1 {
	status = "okay";
};

&uhci {
	status = "okay";
};

&gpio0 {
	gpio-line-names =
		/*A0-A7*/	"","","","","","","","",
		/*B0-B7*/	"","","","","","","checkstop","",
		/*C0-C7*/	"","","","","","","","",
		/*D0-D7*/	"","","","","","","","",
		/*E0-E7*/	"","","","","","","","",
		/*F0-F7*/	"","","rtc-battery-voltage-read-enable","reset-cause-pinhole","","","","",
		/*G0-G7*/	"fan0","fan1","","","","","","",
		/*H0-H7*/	"","","rear-enc-id0","rear-enc-fault0","","","","",
		/*I0-I7*/	"","","","","","","bmc-secure-boot","",
		/*J0-J7*/	"","","","","","","","",
		/*K0-K7*/	"","","","","","","","",
		/*L0-L7*/	"","","","","","","","",
		/*M0-M7*/	"","","","","","","","",
		/*N0-N7*/	"","","","","","","","",
		/*O0-O7*/	"","","","usb-power","","","","",
		/*P0-P7*/	"","","","","","","","",
		/*Q0-Q7*/	"cfam-reset","","regulator-standby-faulted","","","","","",
		/*R0-R7*/	"bmc-tpm-reset","power-chassis-control","power-chassis-good","","","","","",
		/*S0-S7*/	"presence-ps0","presence-ps1","","","power-ffs-sync-history","","","",
		/*T0-T7*/	"","","","","","","","",
		/*U0-U7*/	"","","","","","","","",
		/*V0-V7*/	"","","","","","","","",
		/*W0-W7*/	"","","","","","","","",
		/*X0-X7*/	"","","","","","","","",
		/*Y0-Y7*/	"","","","","","","","",
		/*Z0-Z7*/	"","","","","","","","";

	usb_power {
		gpio-hog;
		gpios = <ASPEED_GPIO(O, 3) GPIO_ACTIVE_LOW>;
		output-high;
	};
};

&emmc_controller {
	status = "okay";
};

&pinctrl_emmc_default {
	bias-disable;
};

&emmc {
	status = "okay";
	clk-phase-mmc-hs200 = <180>, <180>;
};

&fsim0 {
	status = "okay";

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

	cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_HIGH>;

	cfam@0,0 {
		reg = <0 0>;
		#address-cells = <1>;
		#size-cells = <1>;
		chip-id = <0>;

		scom@1000 {
			compatible = "ibm,fsi2pib";
			reg = <0x1000 0x400>;
		};

		i2c@1800 {
			compatible = "ibm,fsi-i2c-master";
			reg = <0x1800 0x400>;
			#address-cells = <1>;
			#size-cells = <0>;

			cfam0_i2c0: i2c-bus@0 {
				reg = <0>;	/* OMI01 */
			};

			cfam0_i2c1: i2c-bus@1 {
				reg = <1>;	/* OMI23 */
			};

			cfam0_i2c10: i2c-bus@a {
				reg = <10>;	/* OP3A */
			};

			cfam0_i2c11: i2c-bus@b {
				reg = <11>;	/* OP3B */
			};

			cfam0_i2c12: i2c-bus@c {
				reg = <12>;	/* OP4A */
			};

			cfam0_i2c13: i2c-bus@d {
				reg = <13>;	/* OP4B */
			};

			cfam0_i2c14: i2c-bus@e {
				reg = <14>;	/* OP5A */
			};

			cfam0_i2c15: i2c-bus@f {
				reg = <15>;	/* OP5B */
			};
		};

		fsi2spi@1c00 {
			compatible = "ibm,fsi2spi";
			reg = <0x1c00 0x400>;
			#address-cells = <1>;
			#size-cells = <0>;

			cfam0_spi0: spi@0 {
				reg = <0x0>;
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};

			cfam0_spi1: spi@20 {
				reg = <0x20>;
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};

			cfam0_spi2: spi@40 {
				reg = <0x40>;
				compatible = "ibm,fsi2spi-restricted";
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};

			cfam0_spi3: spi@60 {
				reg = <0x60>;
				compatible = "ibm,fsi2spi-restricted";
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};
		};

		sbefifo@2400 {
			compatible = "ibm,p9-sbefifo";
			reg = <0x2400 0x400>;
			#address-cells = <1>;
			#size-cells = <0>;

			fsi_occ0: occ {
				compatible = "ibm,p10-occ";

				occ-hwmon {
					compatible = "ibm,p10-occ-hwmon";
					ibm,no-poll-on-init;
				};
			};
		};

		fsi_hub0: hub@3400 {
			compatible = "fsi-master-hub";
			reg = <0x3400 0x400>;
			#address-cells = <2>;
			#size-cells = <0>;
		};
	};
};

&fsi_hub0 {
	cfam@1,0 {
		reg = <1 0>;
		#address-cells = <1>;
		#size-cells = <1>;
		chip-id = <1>;

		scom@1000 {
			compatible = "ibm,fsi2pib";
			reg = <0x1000 0x400>;
		};

		i2c@1800 {
			compatible = "ibm,fsi-i2c-master";
			reg = <0x1800 0x400>;
			#address-cells = <1>;
			#size-cells = <0>;

			cfam1_i2c2: i2c-bus@2 {
				reg = <2>;	/* OMI45 */
			};

			cfam1_i2c3: i2c-bus@3 {
				reg = <3>;	/* OMI67 */
			};

			cfam1_i2c10: i2c-bus@a {
				reg = <10>;	/* OP3A */
			};

			cfam1_i2c11: i2c-bus@b {
				reg = <11>;	/* OP3B */
			};

			cfam1_i2c14: i2c-bus@e {
				reg = <14>;	/* OP5A */
			};

			cfam1_i2c15: i2c-bus@f {
				reg = <15>;	/* OP5B */
			};

			cfam1_i2c16: i2c-bus@10 {
				reg = <16>;	/* OP6A */
			};

			cfam1_i2c17: i2c-bus@11 {
				reg = <17>;	/* OP6B */
			};
		};

		fsi2spi@1c00 {
			compatible = "ibm,fsi2spi";
			reg = <0x1c00 0x400>;
			#address-cells = <1>;
			#size-cells = <0>;

			cfam1_spi0: spi@0 {
				reg = <0x0>;
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};

			cfam1_spi1: spi@20 {
				reg = <0x20>;
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};

			cfam1_spi2: spi@40 {
				reg = <0x40>;
				compatible = "ibm,fsi2spi-restricted";
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};

			cfam1_spi3: spi@60 {
				reg = <0x60>;
				compatible = "ibm,fsi2spi-restricted";
				#address-cells = <1>;
				#size-cells = <0>;

				eeprom@0 {
					at25,byte-len = <0x80000>;
					at25,addr-mode = <4>;
					at25,page-size = <256>;

					compatible = "atmel,at25";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};
			};
		};

		sbefifo@2400 {
			compatible = "ibm,p9-sbefifo";
			reg = <0x2400 0x400>;
			#address-cells = <1>;
			#size-cells = <0>;

			fsi_occ1: occ {
				compatible = "ibm,p10-occ";

				occ-hwmon {
					compatible = "ibm,p10-occ-hwmon";
					ibm,no-poll-on-init;
				};
			};
		};

		fsi_hub1: hub@3400 {
			compatible = "fsi-master-hub";
			reg = <0x3400 0x400>;
			#address-cells = <2>;
			#size-cells = <0>;

			no-scan-on-init;
		};
	};
};

&ibt {
	status = "okay";
};

&i2c0 {
	status = "okay";

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

	tca9554@20 {
		compatible = "ti,tca9554";
		reg = <0x20>;
		#address-cells = <1>;
		#size-cells = <0>;

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

		gpio-line-names = "",
			"RUSSEL_FW_I2C_ENABLE_N",
			"RUSSEL_OPPANEL_PRESENCE_N",
			"BLYTH_OPPANEL_PRESENCE_N",
			"CPU_TPM_CARD_PRESENT_N",
			"",
			"",
			"DASD_BP_PRESENT_N";
	};
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";

	ucd90160@64 {
		compatible = "ti,ucd90160";
		reg = <0x64>;
	};
};

&i2c3 {
	status = "okay";

	power-supply@58 {
		compatible = "ibm,cffps";
		reg = <0x58>;
	};

	power-supply@59 {
		compatible = "ibm,cffps";
		reg = <0x59>;
	};
};

&i2c4 {
	status = "okay";
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
};

&i2c7 {
	multi-master;
	status = "okay";

	si7021-a20@40 {
		compatible = "silabs,si7020";
		reg = <0x40>;
	};

	tmp275@48 {
		compatible = "ti,tmp275";
		reg = <0x48>;
	};

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

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

	max31785@52 {
		compatible = "maxim,max31785a";
		reg = <0x52>;
		#address-cells = <1>;
		#size-cells = <0>;

		fan0: fan@0 {
			compatible = "pmbus-fan";
			reg = <0>;
			tach-pulses = <2>;
		};

		fan1: fan@1 {
			compatible = "pmbus-fan";
			reg = <1>;
			tach-pulses = <2>;
		};
	};

	pca9551@60 {
		compatible = "nxp,pca9551";
		reg = <0x60>;
		#address-cells = <1>;
		#size-cells = <0>;

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

		led@0 {
			label = "front-sys-id0";
			reg = <0>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};

		led@1 {
			label = "front-check-log0";
			reg = <1>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};

		led@2 {
			label = "front-enc-fault1";
			reg = <2>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};

		led@3 {
			label = "front-sys-pwron0";
			reg = <3>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};
	};

	ibm-panel@62 {
		compatible = "ibm,op-panel";
		reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
	};

	dps: dps310@76 {
		compatible = "infineon,dps310";
		reg = <0x76>;
		#io-channel-cells = <0>;
	};
};

&i2c8 {
	status = "okay";

	rtc@32 {
		compatible = "epson,rx8900";
		reg = <0x32>;
	};

	tmp275@48 {
		compatible = "ti,tmp275";
		reg = <0x48>;
	};

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

	pca9551@60 {
		compatible = "nxp,pca9551";
		reg = <0x60>;
		#address-cells = <1>;
		#size-cells = <0>;

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

		gpio-line-names = "",
			"APSS_RESET_N",
			"",
			"N_MODE_CPU_N",
			"",
			"",
			"P10_DCM_PRESENT",
			"";
	};
};

&i2c9 {
	status = "okay";

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

&i2c10 {
	status = "okay";
};

&i2c11 {
	status = "okay";

	tca9554@20 {
		compatible = "ti,tca9554";
		reg = <0x20>;
		#address-cells = <1>;
		#size-cells = <0>;

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

		gpio-line-names = "BOOT_RCVRY_TWI",
			"BOOT_RCVRY_UART",
			"",
			"",
			"",
			"",
			"",
			"PE_SWITCH_RSTB_N";
	};

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

	pca9849@75 {
		compatible = "nxp,pca849";
		reg = <0x75>;
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";
		i2c-mux-idle-disconnect;

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

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

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

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

&i2c12 {
	status = "okay";

	tpm@2e {
		compatible = "nuvoton,npct75x";
		reg = <0x2e>;
	};

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

&i2c13 {
	status = "okay";

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

	pca9551@60 {
		compatible = "nxp,pca9551";
		reg = <0x60>;
		#address-cells = <1>;
		#size-cells = <0>;

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

		led@0 {
			label = "nvme0";
			reg = <0>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};

		led@1 {
			label = "nvme1";
			reg = <1>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};

		led@2 {
			label = "nvme2";
			reg = <2>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};

		led@3 {
			label = "nvme3";
			reg = <3>;
			retain-state-shutdown;
			default-state = "keep";
			type = <PCA955X_TYPE_LED>;
		};
	};
};

&i2c14 {
	status = "okay";
};

&i2c15 {
	status = "okay";
};

&vuart1 {
	status = "okay";
};

&vuart2 {
	status = "okay";
};

&lpc_ctrl {
	status = "okay";
	memory-region = <&flash_memory>;
};

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

&mac3 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rmii4_default>;
	clocks = <&syscon ASPEED_CLK_GATE_MAC4CLK>,
		 <&syscon ASPEED_CLK_MAC4RCLK>;
	clock-names = "MACCLK", "RCLK";
	use-ncsi;
};

&wdt1 {
	aspeed,reset-type = "none";
	aspeed,external-signal;
	aspeed,ext-push-pull;
	aspeed,ext-active-high;

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

&wdt2 {
	status = "okay";
};

&xdma {
	status = "okay";
	memory-region = <&vga_memory>;
};

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

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


code:
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright 2021 IBM Corp.
/dts-v1/;

#include "aspeed-bmc-ibm-rainier-4u.dts"

/ {
	model = "Rainier 1S4U";
};

&max {
	/delete-node/ fan3;
	/delete-node/ fan5;
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright 2020 IBM Corp.
/dts-v1/;

#include "aspeed-bmc-ibm-rainier.dts"

/ {
	model = "Rainier 4U";
};

&i2c3 {
	power-supply@6a {
		compatible = "ibm,cffps";
		reg = <0x6a>;
	};

	power-supply@6b {
		compatible = "ibm,cffps";
		reg = <0x6b>;
	};
};