Article Announcing v4.16 Linux kernel for ADSP-SC5xx Processors with Linuxaddin-1.3.1(Development snapshot for advanced linux users)

Analog Devices is pleased to announce that they are making available a development snapshot of a new linux kernel v4.16 together with the exsiting release Linuxaddin 1.3.1. 

The new 4.16 linux kernel will contain the following:

  • Updated Linux kernel [available now]
    • v4.16 supported
  • MCAPI bug fix for communication between arm core and sharc core2 on sc5xx processor.

Released repo and branch

Who can use the development snapshot?

Customers who want to use the 4.16 linux kernel but still want to use the exsiting release LinuxAddin-1.3.1 via buildroot.

This new linux kernel is only a develoment snapshot, not a full release.  It has undergone some testing but not to the level of a full formal product release.

There will be no binaries produced for this new linux kernel. There are no current plans to integrate this new kernel in to the Linux add-in.

If this doesn’t sound like you, then this development snapshot is not suitable for you. Please wait for the full product release when more comprehensive documentation including a User Guide will be provided.

4.16 Linux kernel User Guide with LinuxAddin 1.3.1

Please note that all the related software and operations should follow the Linux-addin-1.3.1 user guide. Below lists the difference beteween the 4.16 linux kernel and the Linux addin 1.3.1 release.

Prepare buildroot and linux kernel source code

Please refer to the Linux addin user guide to install related sofware. After you finish installation, unzip your buildroot and linux kernel source files.

cp /opt/analog/cces-linux-add-in/1.3.1/buildroot-sc5xx-1.3.1/src/buildroot-sc5xx-1.3.1.tar.gz ~/workspace
tar -zxvf buildroot-sc5xx-1.3.1.tar.gz
cd ~/workspace/buildroot/linux

Replace linux kernel source code

mv linux-kernel linux-kernel-v4.0
git clone -b develop/linuxaddin-1.3.1-4.16-kernel https://github.com/analogdevicesinc/dsp-linux.git linux-kernel

Build and Make linux kernel

Take the SC589-EZKIT board as an example, run the commands below just as the old linux kernel.

make sc589-ezkit_defconfig
make menuconfig

Remember to remove linuxptp package in the menuconfig due to the buildroot ptp test case does not suit for the new linux kernel.

Finally run "make" will build the latest images for you.

Known issue

  1. ADSP-SC584(BOM 2.4 and Sillicon 1.2) does not work with the OpenOCD in CCES 2.8.3 or older version CCES due to the GCC version.
  2. As the u-Boot in release LinuxAddin 1.3.1 only support SC584-EZKIT BOM revision 1.8 or older(old gigabit ethernet PHY DP83865), So if you want to use a newer SC584-EZKIT (new PHY DP83867) together with LinuxAddin1.3.1, you should apply a patch for u-Boot.

# Patch to support phy DP83867 based on ADI Linux Add-in 1.3.1
# Copyright 2019 Analog Devices Inc.
# Licensed under the GPL-2
From a4f637507648d0c94844356fc469ac15ee869971 Mon Sep 17 00:00:00 2001
From: jian chen <jian.chen@analog.com>
Date: Mon, 5 Aug 2019 13:16:41 +0800
Subject: [PATCH] enable eth phy auto-detection function in u-boot for
 sc584-ezkit

Phy can be detected automatically by reading phy id in uboot phy driver, the
relevant phy driver can be applied once registered into phy driver list.

Signed-off-by: jian chen <jian.chen@analog.com>
---
 board/adi/sc584-ezkit/sc584-ezkit.c | 25 +++++++++++++++++++++----
 include/configs/sc584-ezkit.h       |  2 +-
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/board/adi/sc584-ezkit/sc584-ezkit.c b/board/adi/sc584-ezkit/sc584-ezkit.c
index d8cf70f..1f2e26c 100644
--- a/board/adi/sc584-ezkit/sc584-ezkit.c
+++ b/board/adi/sc584-ezkit/sc584-ezkit.c
@@ -10,6 +10,7 @@
 #include <netdev.h>
 #include <phy.h>
 #include <asm/io.h>
+#include <asm/gpio.h>
 #include <asm/mach-types.h>
 #include <asm/arch/portmux.h>
 #include <asm/arch/sc58x.h>
@@ -82,9 +83,13 @@ int board_eth_init(bd_t *bis)
 
 	if (CONFIG_DW_PORTS & 1) {
 		gpio_request(GPIO_PB14, "emac0_phy_reset");
+		gpio_request(GPIO_PC15, "emac0_phy_pwdn");
+		gpio_direction_output(GPIO_PC15, 1);
+		gpio_direction_output(GPIO_PB14, 0);
+		mdelay(90);
 		gpio_direction_output(GPIO_PB14, 1);
+		mdelay(20);
 
-		mdelay(1);
 		writel((readl(REG_PADS0_PCFG0) | 0xc), REG_PADS0_PCFG0);
 
 		static const unsigned short pins[] = P_RGMII0;
@@ -102,10 +107,22 @@ int board_phy_config(struct phy_device *phydev)
 
 	if (CONFIG_DW_PORTS & 1) {
 #ifndef CONFIG_PHY_BCM89810
-		phy_data = phy_read(phydev, MDIO_DEVAD_NONE, 0x12);
+#ifdef CONFIG_PHY_TI
+		phy_data = phy_read(phydev, MDIO_DEVAD_NONE, 0x32);
+		phy_write(phydev, MDIO_DEVAD_NONE, 0x32, (1 << 7) | phy_data);
+		int cfg3 = 0;
+		#define MII_DP83867_CFG3    (0x1e)
+		/*
+		 * Pin INT/PWDN on DP83867 should be configured as an Interrupt Output
+		 * instead of a Power-Down Input on ADI SC5XX boards in order to
+		 * prevent the signal interference from other peripherals during they
+		 * are running at the same time.
+		 */
+		cfg3 = phy_read(phydev, MDIO_DEVAD_NONE, MII_DP83867_CFG3);
+		cfg3 |= (1 << 7);
+		phy_write(phydev, MDIO_DEVAD_NONE, MII_DP83867_CFG3, cfg3);
+#endif
 
-		/* enable 3com mode for RGMII */
-		phy_write(phydev, MDIO_DEVAD_NONE, 0x12, (3 << 12) | phy_data);
 #endif
 	}
 
diff --git a/include/configs/sc584-ezkit.h b/include/configs/sc584-ezkit.h
index 79eccbb..609e15b 100644
--- a/include/configs/sc584-ezkit.h
+++ b/include/configs/sc584-ezkit.h
@@ -99,12 +99,12 @@
 #define CONFIG_DTBNAME		"sc584-ezkit.dtb"
 #define CONFIG_HOSTNAME		"sc58x"
 #define CONFIG_DESIGNWARE_ETH
-#define CONFIG_PHY_ADDR		1
 #define CONFIG_DW_PORTS		1
 #define CONFIG_DW_AUTONEG
 #define CONFIG_DW_ALTDESCRIPTOR
 #define CONFIG_MII
 #define CONFIG_PHYLIB
+#define CONFIG_PHY_TI
 /*#define CONFIG_PHY_BCM89810*/
 #define CONFIG_PHY_NATSEMI
 #define CONFIG_ETHADDR	02:80:ad:20:31:e8
-- 
1.9.1

In the 4.16 linux kernel, it could support all SC589-EZKIT/SC584-EZKIT/SC573-EZKIT/SC589-MINI boards with both old PHY(DP83865) and new PHY(dp83867).

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.