This adds support for the Analog Devices SC584-EZKIT.

Signed-off-by: Vasileios Bimpikas <[email protected]>
Signed-off-by: Utsav Agarwal <[email protected]>
Signed-off-by: Arturs Artamonovs <[email protected]>
Signed-off-by: Nathan Barrett-Morrison <[email protected]>
Signed-off-by: Caleb Ethridge <[email protected]>
Signed-off-by: Greg Malysa <[email protected]>

---

Changes in v3:
- Add one more GPIO that was named incorrectly
- Removed whitespace in .env

Changes in v2:
- GPIO names and polarities adjusted to match logical usage

 arch/arm/dts/sc584-ezkit.dts          | 230 ++++++++++++++++++++++++++
 board/adi/sc584-ezkit/Makefile        |   6 +
 board/adi/sc584-ezkit/sc584-ezkit.c   |  21 +++
 board/adi/sc584-ezkit/sc584-ezkit.env |  17 +-
 configs/sc584-ezkit_defconfig         |  96 +++++++++++
 5 files changed, 363 insertions(+), 7 deletions(-)
 create mode 100644 board/adi/sc584-ezkit/Makefile
 create mode 100644 board/adi/sc584-ezkit/sc584-ezkit.c
 create mode 100644 configs/sc584-ezkit_defconfig

diff --git a/arch/arm/dts/sc584-ezkit.dts b/arch/arm/dts/sc584-ezkit.dts
index 4ec6bcfb658..e9f4e1da383 100644
--- a/arch/arm/dts/sc584-ezkit.dts
+++ b/arch/arm/dts/sc584-ezkit.dts
@@ -11,3 +11,233 @@
        model = "ADI SC584-EZKIT";
        compatible = "adi,sc584-ezkit", "adi,sc58x";
 };
+
+&i2c2 {
+       gpio_expander1: 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;
+               };
+
+               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;
+               };
+
+               audio_jack_sel {
+                       gpio-hog;
+                       gpios = <10 GPIO_ACTIVE_HIGH>;
+                       output-low;
+                       line-name = "audio_jack_sel";
+                       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_expander2: mcp23017@22 {
+               compatible = "microchip,mcp23017";
+               reg = <0x22>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               bootph-pre-ram;
+
+               pushbutton3 {
+                       gpio-hog;
+                       gpios = <0 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "pushbutton3-en";
+                       bootph-pre-ram;
+               };
+
+               pushbutton2 {
+                       gpio-hog;
+                       gpios = <1 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "pushbutton2-en";
+                       bootph-pre-ram;
+               };
+
+               pushbutton1 {
+                       gpio-hog;
+                       gpios = <2 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "pushbutton1-en";
+                       bootph-pre-ram;
+               };
+
+               leds {
+                       gpio-hog;
+                       gpios = <3 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "leds-en";
+                       bootph-pre-ram;
+               };
+
+               flg0 {
+                       gpio-hog;
+                       gpios = <4 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "flg0_loop";
+                       bootph-pre-ram;
+               };
+
+               flg1 {
+                       gpio-hog;
+                       gpios = <5 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "flg1_loop";
+                       bootph-pre-ram;
+               };
+
+               flg2 {
+                       gpio-hog;
+                       gpios = <6 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "flg2_loop";
+                       bootph-pre-ram;
+               };
+
+               flg3 {
+                       gpio-hog;
+                       gpios = <7 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "flg3_loop";
+                       bootph-pre-ram;
+               };
+
+               adau1977 {
+                       gpio-hog;
+                       gpios = <8 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "adau1977_en";
+                       bootph-pre-ram;
+               };
+
+               adau1977_fault_rst {
+                       gpio-hog;
+                       gpios = <9 GPIO_ACTIVE_LOW>;
+                       output-low;
+                       line-name = "adau1977_fault_rst_en";
+                       bootph-pre-ram;
+               };
+
+               thumbwheel {
+                       gpio-hog;
+                       gpios = <10 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "thumbwheel_oe";
+                       bootph-pre-ram;
+               };
+
+               engine_rpm {
+                       gpio-hog;
+                       gpios = <11 GPIO_ACTIVE_LOW>;
+                       output-high;
+                       line-name = "engine_rpm_oe";
+                       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>;
+       };
+};
diff --git a/board/adi/sc584-ezkit/Makefile b/board/adi/sc584-ezkit/Makefile
new file mode 100644
index 00000000000..86f94976cf3
--- /dev/null
+++ b/board/adi/sc584-ezkit/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# (C) Copyright 2025 - Analog Devices, Inc.
+#
+
+obj-y  := sc584-ezkit.o
diff --git a/board/adi/sc584-ezkit/sc584-ezkit.c 
b/board/adi/sc584-ezkit/sc584-ezkit.c
new file mode 100644
index 00000000000..288c2670761
--- /dev/null
+++ b/board/adi/sc584-ezkit/sc584-ezkit.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * (C) Copyright 2025 - Analog Devices, Inc.
+ */
+
+#include <phy.h>
+#include <asm/u-boot.h>
+#include <asm/arch-adi/sc5xx/sc5xx.h>
+#include <asm/arch-adi/sc5xx/soc.h>
+
+int board_phy_config(struct phy_device *phydev)
+{
+       fixup_dp83867_phy(phydev);
+       return 0;
+}
+
+int board_init(void)
+{
+       sc5xx_enable_rgmii();
+       return 0;
+}
diff --git a/board/adi/sc584-ezkit/sc584-ezkit.env 
b/board/adi/sc584-ezkit/sc584-ezkit.env
index af9a9e01bcf..8a6f7edd5e8 100644
--- a/board/adi/sc584-ezkit/sc584-ezkit.env
+++ b/board/adi/sc584-ezkit/sc584-ezkit.env
@@ -1,13 +1,16 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later+ */
-
 /*
  * (C) Copyright 2024 - Analog Devices, Inc.
  */
 
-#include <env/adi/adi_boot.env>
-
-adi_stage2_offset=0x20000
-adi_image_offset=0xE0000
-adi_rfs_offset=0x6E0000
-loadaddr=0x89300000
+adi_stage2_offset=CONFIG_SC5XX_UBOOT_OFFSET
+adi_image_offset=CONFIG_SC5XX_FITIMAGE_OFFSET
+adi_rfs_offset=CONFIG_SC5XX_ROOTFS_OFFSET
 jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc584-ezkit.jffs2
+loadaddr=CONFIG_SC5XX_LOADADDR
+
+#define USE_NFS
+#define USE_SPI
+#define USE_RAM
+
+#include <env/adi/adi_boot.env>
diff --git a/configs/sc584-ezkit_defconfig b/configs/sc584-ezkit_defconfig
new file mode 100644
index 00000000000..25ac59e4733
--- /dev/null
+++ b/configs/sc584-ezkit_defconfig
@@ -0,0 +1,96 @@
+CONFIG_ARM=y
+CONFIG_SYS_ARM_CACHE_WRITETHROUGH=y
+CONFIG_ARCH_SC5XX=y
+CONFIG_SYS_MALLOC_LEN=0x100000
+CONFIG_SPL_GPIO=y
+CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_OFFSET=0xD0000
+CONFIG_ENV_SECT_SIZE=0x4000
+CONFIG_DM_GPIO=y
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_STACK=0x200C0000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
+CONFIG_SPL_BSS_START_ADDR=0x200A0000
+CONFIG_SPL_BSS_MAX_SIZE=0x8000
+CONFIG_SC58X=y
+CONFIG_SC5XX_UBOOT_OFFSET=0x20000
+CONFIG_SC5XX_FITIMAGE_OFFSET=0xE0000
+CONFIG_SC5XX_ROOTFS_OFFSET=0x6E0000
+CONFIG_SC5XX_LOADADDR=0x89300000
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
+CONFIG_ADI_BUG_EZKHW21=y
+CONFIG_CGU0_CLKOUTSEL=7
+# CONFIG_EFI_LOADER is not set
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="run ramboot"
+CONFIG_SYS_CBSIZE=512
+CONFIG_CYCLIC_MAX_CPU_TIME_US=1000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_BOOTM_NETBSD is not set
+# CONFIG_BOOTM_PLAN9 is not set
+# CONFIG_BOOTM_RTEMS is not set
+# CONFIG_BOOTM_VXWORKS is not set
+# CONFIG_CMD_ELF is not set
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_PINMUX is not set
+CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
+CONFIG_SYS_DISABLE_AUTOLOAD=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_MII=y
+# CONFIG_CMD_MDIO is not set
+CONFIG_CMD_PING=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+# CONFIG_OF_TAG_MIGRATE is not set
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_ENV_SPI_MAX_HZ=10000000
+CONFIG_USE_HOSTNAME=y
+CONFIG_HOSTNAME="sc584-ezkit"
+CONFIG_NET_RETRY_COUNT=20
+CONFIG_IP_DEFRAG=y
+CONFIG_SPL_CLK=y
+CONFIG_SPL_CLK_CCF=y
+CONFIG_GPIO_HOG=y
+CONFIG_SPL_GPIO_HOG=y
+CONFIG_DM_GPIO_LOOKUP_LABEL=y
+CONFIG_SPL_DM_GPIO_LOOKUP_LABEL=y
+CONFIG_MCP230XX_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_GPIO=y
+CONFIG_SYS_I2C_ADI=y
+CONFIG_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_DW_ALTDESCRIPTOR=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_GENERIC is not set
+CONFIG_SPL_PINCTRL=y
+# CONFIG_SPL_PINCTRL_GENERIC is not set
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_ADI_SPI3=y
+CONFIG_SPL_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_SC5XX=y
+CONFIG_USB_MUSB_PIO_ONLY=y
+CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
+# CONFIG_REGEX is not set
+# CONFIG_SPL_CRC8 is not set
-- 
2.49.1

Reply via email to