Loading...
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * (C) Copyright 2024 - Analog Devices, Inc.
 */

/dts-v1/;

#include "sc58x.dtsi"

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	model = "ADI SC589-EZKIT";
	compatible = "adi,sc589-ezkit", "adi,sc58x";
};

&i2c0 {
	#address-cells = <1>;
	#size-cells = <0>;
	gpio_expander0: mcp23017@21 {
		compatible = "microchip,mcp23017";
		reg = <0x21>;
		gpio-controller;
		#gpio-cells = <2>;
		bootph-pre-ram;

		eeprom {
			gpio-hog;
			gpios = <0 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "eeprom-en";
			bootph-pre-ram;
		};

		uart0-flow-en {
			gpio-hog;
			gpios = <1 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "uart0-flow-en";
			bootph-pre-ram;
		};

		uart0-en {
			gpio-hog;
			gpios = <2 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "uart0-en";
			bootph-pre-ram;
		};

		eth0 {
			gpio-hog;
			gpios = <3 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "eth0-en";
			bootph-pre-ram;
		};

		eth1 {
			gpio-hog;
			gpios = <4 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "eth1-en";
			bootph-pre-ram;
		};

		mlb {
			gpio-hog;
			gpios = <5 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "mlb-en";
			bootph-pre-ram;
		};

		can0 {
			gpio-hog;
			gpios = <6 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "can0-en";
			bootph-pre-ram;
		};

		can1 {
			gpio-hog;
			gpios = <7 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "can1-en";
			bootph-pre-ram;
		};

		adau1962 {
			gpio-hog;
			gpios = <8 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "adau1962-en";
			bootph-pre-ram;
		};

		adau1979 {
			gpio-hog;
			gpios = <9 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "adau1979-en";
			bootph-pre-ram;
		};

		sd_wp {
			gpio-hog;
			gpios = <11 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "sd-wp-en";
			bootph-pre-ram;
		};

		spi2d2-d3 {
			gpio-hog;
			gpios = <12 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "spi2d2-d3-en";
			bootph-pre-ram;
		};

		spi2flash-cs {
			gpio-hog;
			gpios = <13 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "spi2flash-cs";
			bootph-pre-ram;
		};

		spdif-opt {
			gpio-hog;
			gpios = <14 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "spdif-optical-en";
			bootph-pre-ram;
		};

		spdif-dig {
			gpio-hog;
			gpios = <15 GPIO_ACTIVE_LOW>;
			output-low;
			line-name = "spdif-digital-en";
			bootph-pre-ram;
		};
	};

	gpio_expander1: mcp23017@22 {
		compatible = "microchip,mcp23017";
		reg = <0x22>;
		gpio-controller;
		#gpio-cells = <2>;
		bootph-pre-ram;

		pushbutton1 {
			gpio-hog;
			gpios = <0 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "pushbutton1-en";
			bootph-pre-ram;
		};

		pushbutton2 {
			gpio-hog;
			gpios = <1 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "pushbutton2-en";
			bootph-pre-ram;
		};

		led10 {
			gpio-hog;
			gpios = <2 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "led10-en";
			bootph-pre-ram;
		};

		led11 {
			gpio-hog;
			gpios = <3 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "led11-en";
			bootph-pre-ram;
		};

		led12 {
			gpio-hog;
			gpios = <4 GPIO_ACTIVE_LOW>;
			output-high;
			line-name = "led12-en";
			bootph-pre-ram;
		};
	};
};

&eth0 {
	snps,reset-gpio = <&gpio0 ADI_ADSP_PIN('B', 14) GPIO_ACTIVE_LOW>;
};

&gpio0 {
	emac0_phy_pwdn {
		gpio-hog;
		output-high;
		gpios = <ADI_ADSP_PIN('C', 15) GPIO_ACTIVE_HIGH>;
	};
};

&mmc {
	status = "okay";
};