3 Microchip EVB-KSZ9477

KSZ9477 Managed Switch Evaluation Kit with SAMA5D36 MPU (EVB-KSZ9477).

Contents

3.1 Board Overview

The EVB-KSZ9477 evaluation board features the KSZ9477 seven-port managed gigabit Ethernet switch. It has five 10BASE-Te/100BASE-TX/1000BASE-T physical layer transceivers (PHYs) and associated MAC units, one SGMII and one RGMII interfaces. Ports 1 through 5, with integrated MAC and PHY are connected to RJ45 Ethernet jacks with integrated magnetics. The SGMII interface is connected to a small form-factor pluggable (SFP) transceiver receptacle whereas, the RGMII interface is connected to the SAMA5D36A embedded microprocessor (MPU).

The board provides 2 Gbit (256 MiB) DDR2 SDRAM and 2 Gbit (256 MiB) of NAND flash memory.

../../../../_images/evb-ksz9477.jpg

Fig. 3.1 EVB-KSZ9477 Interfaces and Connectors

3.1.1 Block Diagram

../../../../_images/evb-ksz9477-block-diagram.png

Fig. 3.2 EVB-KSZ9477 Block Diagram

3.1.2 Specification

Table 3.1 EVB-KSZ9477 Specification

Model

EVB-KSZ9477

Processor

Atmel SAMA5D36 (324-ball BGA package)
1 × ARM Cortex-A5 with v7-A Thumb®-2 instruction set
frequency up to 536 MHz

Memory

256 MiB DDR2 SDRAM

Storage

Full-size SD card slot
256 MiB NAND flash

Debug

JTAG interface to program and debug the MPU (20-pin header)
1 × Serial communication (6-pin header)

USB

1 × USB 2.0 Micro-AB (Device mode)

Ethernet

5 × Gigabit Ethernet PHYs
1 × SGMII Gigabit Ethernet Port (Fiber SFP)

Other Connectors

1 × SPI/I2C Aardvark Header (10-pin)
1 × KSZ9477 output probe points (8-pin header)
1 × I/O connector for the MPU (6-pin header)
1 × GPIO for the MPU (16-pin header)
1 × LCD Connector for the MPU (50-pin FPC Connector)
8 × KSZ9477 Strap DIP-Switches
1 × 3-pin board power source selection (5V input jack or USB)

Power Source

DC Jack or USB

Power

5V/2A DC input jack

3.2 Build Targets

3.2.1 Machines

Table 3.2 Supported Machines

Board[1]

Target YAML[2]

Machine[3]

Target Recipe(s)[4]

Running Media[5]

Installation Media[6]

EVB-KSZ9477

evb-ksz9477-sd.yml

evb-ksz9477-sd

tanowrt-image-full-swu

SD card

evb-ksz9477-nand.yml

evb-ksz9477-nand

tanowrt-image-full-swu-factory

internal NAND

SD card

3.2.2 Images

Table 3.3 Supported Images

Read-Only Root Filesystem Image

Recipe[7]

Supported by Target(s)

Description

tanowrt-image-full

tanowrt-image-full

All

Standard TanoWrt image.

tanowrt-image-full-swu

All

Standard TanoWrt image and firmware upgrade image. When building this image, tanowrt-image-full will also be built as dependency.

tanowrt-image-full-swu-factory

evb-ksz9477-nand.yml

Factory installation image for standard TanoWrt image. When building this image, tanowrt-image-full and tanowrt-image-full-swu will also be built as dependencies.

3.3 Build

Please read the common information on how to perform a TanoWrt images build and preparing the build environment in section “Building TanoWrt”.

See also

  • See section Section 3.2.1 to select the required target YAML file (<target-yml>).

  • See section Section 3.2.2 to select the required root filesystem image recipe (<target-recipe>).

  • See section Section 3.5 for detailed information about the produced build artifacts.

3.3.1 Examples

3.3.1.1 Build Default Images for EVB-KSZ9477 Board

For SD Card

$ kas build targets/kas/evb-ksz9477-sd.yml

Default images will be produced to boot and run from the SD card on the EVB-KSZ9477 target board.

For Internal NAND Flash

$ kas build targets/kas/evb-ksz9477-nand.yml

An initial factory installation image will be generated, intended to run from the SD card. The installer image will install the default image to the internal NAND flash memory and further the EVB-KSZ9477 board will boot and run from the NAND flash memory.

3.4 Partitioning Layouts

3.4.1 SD Card

The partitioning and data layout of the SD card image for the EVB-KSZ9477 board are shown in the figure below.

../../../../_images/evb-ksz9477-layout-sd.svg

Fig. 3.3 EVB-KSZ9477 Partitions Layout for SD Card

3.4.2 NAND

The partitioning and data layout of the NAND image for the EVB-KSZ9477 board are shown in the figure below.

../../../../_images/evb-ksz9477-layout-nand.svg

Fig. 3.4 EVB-KSZ9477 Partitions Layout for NAND

3.5 Produced Build Artifacts

All produced build artifacts are stored in the ~/tanowrt/build/tanowrt-glibc/deploy/images/<MACHINE> directory. Refer to table Produced Build Artifacts for a description of some common (not all) build artifacts.

Table 3.4 Produced Build Artifacts

Artifact

Target(s)

Description

Bootloader (AT91Bootstrap)

at91bootstrap.bin-sdcard

All

AT91Bootstrap binary for SD card images.

at91bootstrap.bin-nand

evb-ksz9477-nand.yml

AT91Bootstrap binary for NAND flash images.

Bootloader (U-Boot)

startup-<MACHINE>.img

All

U-Boot startup script.

startup-factory-<MACHINE>.img

evb-ksz9477-nand.yml

U-Boot startup script for factory installation image.

u-boot-initial-env-<MACHINE>-sdcard

All

U-Boot initial environment image for SD card image.

u-boot-initial-env-<MACHINE>-nand

evb-ksz9477-nand.yml

U-Boot initial environment image for internal NAND flash.

u-boot-<MACHINE>.bin-sdcard

All

U-Boot binary image for booting from SD card.

u-boot-<MACHINE>.bin-nand

evb-ksz9477-nand.yml

U-Boot binary image for booting from internal NAND flash.

Linux Kernel and DTB

fitImage-<MACHINE>.bin

All

Flattened Image Tree (FIT) image with Linux kernel and Device Tree Blobs (DTB).

fitImage-<MACHINE>.ext4

All

FIT image packed into an ext4 file system image.

at91-evb-ksz9477.dtb

All

Target Device Tree Blob (DTB).

fitImage-tanowrt-image-initramfs-swu-factory-<MACHINE>.ext4

evb-ksz9477-nand.yml

FIT image for SWU factory installation image with initramfs image.

Images

<rootfs-image>-<MACHINE>.sdcard.img

evb-ksz9477-sd.yml

SD card image including all required partitions for booting and running the system. This image is ready to be written to the SD card using the dd utility or similar (see Writing Images).

<rootfs-image>-swu-factory-<MACHINE>.sdcard.img

evb-ksz9477-nand.yml

SD card factory installation image. This image is ready to be written to the SD card using the dd utility or similar (see Writing Images).

tanowrt-image-initramfs-swu-factory-<MACHINE>.cpio.gz

evb-ksz9477-nand.yml

Root filesystem initramfs image for factory installtion image. This image is included in fitImage-tanowrt-image-initramfs-swu-factory-<MACHINE>.ext4.

<rootfs-image>-<MACHINE>.squashfs-lzo

All

Root filesystem image (squashfs with LZO compression).

<rootfs-image>-swu-<MACHINE>.swu

All

Firmware upgrade image.

Note

<MACHINE> in the artifacts path and artifact file names are replaced by the actual value of the MACHINE BitBake variable for the chosen target. <rootfs-image> is replaced by the actual read-only root filesystem image name.

For example, below is the lists of artifacts produced by the evb-ksz9477-nand.yml and evb-ksz9477-sd.yml target builds. There are two types of listings here — a complete listing, and a reduced listing without the symbolic links display.

3.5.1 Build Artifacts Listings for evb-ksz9477-sd.yml Target

[~/tanowrt/build/tanowrt-glibc/deploy/images/evb-ksz9477-sd]$ ls -gGh | grep -v -e "^l"
total 135M
-rwxr-xr-x 2  20K Jul 27 17:35 at91bootstrap.bin-sdcard
-rw-r--r-- 2  50K Jul 27 17:37 at91-evb-ksz9477--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd-20220727143416.dtb
-rw-r--r-- 2  50K Jul 27 17:37 at91-evb-ksz9477-sfp--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd-20220727143416.dtb
-rw-r--r-- 2 4.6M Jul 27 17:37 fitImage--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd-20220727143416.bin
-rw-r--r-- 2 6.5M Jul 27 17:37 fitImage-4.19.78+gitAUTOINC+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd.ext4
-rw-r--r-- 2 6.5M Jul 27 17:37 fitImage-evb-ksz9477-sd.ext4
-rw-r--r-- 2 2.4K Jul 27 17:37 fitImage-its--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd-20220727143416.its
-rw-r--r-- 2 4.5M Jul 27 17:37 fitImage-linux.bin--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd-20220727143416.bin
-rw-r--r-- 2 2.0M Jul 27 17:37 modules--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-sd-20220727143416.tgz
drwxr-xr-x 7  260 Jul 27 16:28 sam-ba
-rw-r--r-- 2  890 Jul 27 17:35 startup-factory.img
-rw-r--r-- 2   19 Jul 27 17:35 startup-factory.img.version
-rw-r--r-- 2 2.1K Jul 27 17:35 startup.img
-rw-r--r-- 2   19 Jul 27 17:35 startup.img.version
-rw-r--r-- 2 5.3K Jul 27 17:38 tanowrt-image-full.env
-rw-r--r-- 2  63K Jul 27 17:38 tanowrt-image-full-evb-ksz9477-sd-20220727143416.rootfs.manifest
-rw-r--r-- 2 940M Jul 27 17:38 tanowrt-image-full-evb-ksz9477-sd-20220727143416.rootfs.sdcard.img
-rw-r--r-- 2  24M Jul 27 17:38 tanowrt-image-full-evb-ksz9477-sd-20220727143416.rootfs.squashfs-lzo
-rw-r--r-- 2   24 Jul 27 17:38 tanowrt-image-full-evb-ksz9477-sd-20220727143416.rootfs.version
-rw-r--r-- 2 374K Jul 27 17:38 tanowrt-image-full-evb-ksz9477-sd-20220727143416.testdata.json
-rw-r--r-- 2 2.6K Jul 27 17:38 tanowrt-image-full-sdimage-at91-swu-a-b.wks
-rw-r--r-- 2  31M Jul 27 17:38 tanowrt-image-full-swu-evb-ksz9477-sd-20220727143416.swu
-rw-r--r-- 2  192 Jul 27 17:35 u-boot-initial-env-evb-ksz9477-sd-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0
-rw-r--r-- 2 128K Jul 27 17:35 u-boot-initial-env-evb-ksz9477-sd-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0.bin
-rw-r--r-- 2 719K Jul 27 17:35 u-boot-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0.bin

3.5.2 Build Artifacts Listings for evb-ksz9477-nand.yml Target

[~/tanowrt/build/tanowrt-glibc/deploy/images/evb-ksz9477-nand]$ ls -gGh | grep -v -e "^l"
total 123M
-rwxr-xr-x 2  15K Jul 27 16:41 at91bootstrap.bin-nand
-rw-r--r-- 2  16K Jul 27 16:41 at91bootstrap.bin-nand-pmecc
-rwxr-xr-x 2  20K Jul 27 16:41 at91bootstrap.bin-sdcard
-rw-r--r-- 2  20K Jul 27 16:41 at91bootstrap.bin-sdcard-pmecc
-rw-r--r-- 2  50K Jul 27 16:45 at91-evb-ksz9477--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.dtb
-rw-r--r-- 2  50K Jul 27 16:45 at91-evb-ksz9477-sfp--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.dtb
-rw-r--r-- 2 4.6M Jul 27 16:45 fitImage--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.bin
-rw-r--r-- 2 2.4K Jul 27 16:45 fitImage-its--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.its
-rw-r--r-- 2 3.1K Jul 27 16:45 fitImage-its-tanowrt-image-initramfs-swu-factory-evb-ksz9477-nand--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.its
-rw-r--r-- 2 4.5M Jul 27 16:45 fitImage-linux.bin--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.bin
-rw-r--r-- 2  12M Jul 27 16:45 fitImage-tanowrt-image-initramfs-swu-factory-evb-ksz9477-nand--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.bin
-rw-r--r-- 2 2.0M Jul 27 16:45 modules--4.19.78+git0+046113c438+ksz2-tano0.2.20.20.0.1-evb-ksz9477-nand-20220727132751.tgz
drwxr-xr-x 7  260 Jul 27 16:28 sam-ba
-rw-r--r-- 2  965 Jul 27 16:42 startup-factory.img
-rw-r--r-- 2   19 Jul 27 16:42 startup-factory.img.version
-rw-r--r-- 2 2.3K Jul 27 16:42 startup.img
-rw-r--r-- 2   19 Jul 27 16:42 startup.img.version
-rw-r--r-- 2  64K Jul 27 16:45 tanowrt-image-full-evb-ksz9477-nand-20220727132751.rootfs.manifest
-rw-r--r-- 2  23M Jul 27 16:46 tanowrt-image-full-evb-ksz9477-nand-20220727132751.rootfs.squashfs-lzo
-rw-r--r-- 2   24 Jul 27 16:46 tanowrt-image-full-evb-ksz9477-nand-20220727132751.rootfs.version
-rw-r--r-- 2 374K Jul 27 16:45 tanowrt-image-full-evb-ksz9477-nand-20220727132751.testdata.json
-rw-r--r-- 2  29M Jul 27 16:46 tanowrt-image-full-swu-evb-ksz9477-nand-20220727132751.swu
-rw-r--r-- 2 5.9K Jul 27 16:32 tanowrt-image-full-swu-factory.env
-rw-r--r-- 2  42M Jul 27 16:46 tanowrt-image-full-swu-factory-evb-ksz9477-nand-20220727132751.sdcard.img
-rw-r--r-- 2  778 Jul 27 16:32 tanowrt-image-full-swu-factory-sdimage-at91-swu-factory.wks
-rw-r--r-- 2 6.6M Jul 27 16:45 tanowrt-image-initramfs-swu-factory-evb-ksz9477-nand-20220727132751.rootfs.cpio.gz
-rw-r--r-- 2 3.3K Jul 27 16:45 tanowrt-image-initramfs-swu-factory-evb-ksz9477-nand-20220727132751.rootfs.manifest
-rw-r--r-- 2   24 Jul 27 16:45 tanowrt-image-initramfs-swu-factory-evb-ksz9477-nand-20220727132751.rootfs.version
-rw-r--r-- 2 381K Jul 27 16:45 tanowrt-image-initramfs-swu-factory-evb-ksz9477-nand-20220727132751.testdata.json
-rw-r--r-- 2  187 Jul 27 16:41 u-boot-initial-env-evb-ksz9477-nand-nand-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0
-rw-r--r-- 2 128K Jul 27 16:41 u-boot-initial-env-evb-ksz9477-nand-nand-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0.bin
-rw-r--r-- 2  192 Jul 27 16:41 u-boot-initial-env-evb-ksz9477-nand-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0
-rw-r--r-- 2 128K Jul 27 16:41 u-boot-initial-env-evb-ksz9477-nand-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0.bin
-rw-r--r-- 2 727K Jul 27 16:41 u-boot-nand-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0.bin
-rw-r--r-- 2 719K Jul 27 16:41 u-boot-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.0.bin

3.6 Writing Images

3.6.1 Writing Image to SD Card

No special information about writing images to SD card for EVB-KSZ9477 board. See common instructions in Writing Images to SD Card or USB Flash Drive section.

Examples

Writing factory installation image for the evb-ksz9477-nand.yml target to the SD card /dev/mmcblk1:

$ dd if=tanowrt-image-full-swu-factory-evb-ksz9477-nand.sdcard.img of=/dev/mmcblk1

Writing bootable card image for the evb-ksz9477-sd.yml target to the SD card /dev/mmcblk1:

$ dd if=tanowrt-image-full-evb-ksz9477-sd.sdcard.img of=/dev/mmcblk1

3.6.2 Writing Image to NAND Flash

For the initial flashing of the internal NAND memory it is recommended to use the special image of the initial factory installation. If you choose a build target (see Build Targets for details) that assumes using the factory installation image for the initial flashing of the device, a factory installation image (<rootfs-image>-swu-factory-<MACHINE>.sdcard.img) will be automatically generated during the build process (see Build). To write the factory installation image to a SD card, follow the instructions from Writing Images to SD Card or USB Flash Drive section.

When you boot device from the prepaired SD card with factory installation image the installation of TanoWrt to the internal NAND flash memory will be done automatically. The detailed installation log is available on the debug UART. After the installation is complete, the board will power off automatically. You need to remove SD card with the installation image and power on the board. When the board boots up, the installed system will be booted from the internal NAND flash memory.

Caution

Be aware that during the installation all existing data on the internal NAND flash memory will be permanently lost.

3.7 Booting and Running

3.7.1 Configuring Boot Mode

The EVB-KSZ9477 board does not have any switches or jumpers for selecting the boot source. By default, booting is performed from the SD card. If booting from an SD card fails, NAND flash memory is used for booting.

3.7.2 Hardware Configuration

Ensure that the J13 (NAND Enable) jumper on EVB-KSZ9477 board is shorted (this is needed for installing and running the TanoWrt from the internal NAND flash memory).

To avoid network loops while the bootloader is running and while the operating system is booting (while the STP/RSTP support software is not yet running) it is recommended to set the SW1:1 switch to the “ON” position. Switch SW1:1 is used for automatic start of the switch with the default configuration when the power is turned on.

3.7.3 Booting from SD Card

  1. Insert the SD card into the slot on the EVB-KSZ9477 board (power is off).

  2. Power on board.

  3. TanoWrt will be booting from SD card.

  4. Log in to system using default credentials.

3.8 Serial Console

Serial console on EVB-KSZ9477 board are available through 6-pin serial communication header J10. Connect the USB to TTL serial cable as described below. Don’t connect the VCC wire of the USB to TTL converted, connect only TX, RX and GND wires.

EVB-KSZ9477 J10 6-pin Header

Signal

Pin 1

Not used

Pin 2

TX

Pin 3

RX

Pin 4

Not connected

Pin 5

Not used

Pin 6

GND

See Fig. 3.1 for example connection USB to TTL converter with EVB-KSZ9477 board.

The default serial console settings for EVB-KSZ9477 for U-Boot and kernel are described in the table below.

Parameter

Value

Baudrate

115200

Data bits

8

Stop bits

1

Parity

none

Flow control

none

3.9 Default Network Configuration

../../../../_images/evb-ksz9477-network.jpg

Fig. 3.5 EVB-KSZ9477 Default Network Configuration

By default, network ports 1, 2, 3, 4 and 6 are joined into a bridge (br-lan interface) with the RSTP protocol enabled. Bridge br-lan is in the LAN firewall zone. By default, the br-lan bridge is configured with static IP address 192.168.0.1/24 with enabled DHCP server.

The network port 5 (interface sw1p5) is a separate network interface included in the WAN firewall zone with enabled translation (NAT) from LAN zone. The IP address of the sw1p5 interface is also configured with a DHCP client. A firewall with blocking rules for incoming traffic is enabled on the sw1p5 interface. Therefore, there is no access to the web configuration interface through this interface.

To see obtained IP configuration for WAN network use the following command:

[root@tanowrt ~]# ifstatus wan | jsonfilter -e '@["ipv4-address"][0].address'
10.0.1.65

Also you can connect to the board using USB RNDIS connection (usb0 interface). RNDIS interface configured with static IP address 172.16.0.1/24 with enabled DHCP server.

All ethernet ports (from 1 to 6) have enabled LLDP for Rx and Tx state by default.

3.10 Web User Interface

The WebUI can be accessed via any Ethernet port bridged to LAN network (1, 2, 3, 4 or 6) or via USB RNDIS connection through HTTP(s) protocol. You must see something like this in browser:

../../../../_images/page-login.png

Fig. 3.6 LuCI WebUI Login Page

../../../../_images/evb-ksz9477-luci-status.png

Fig. 3.7 LuCI WebUI Overview Page

3.11 Firmware Upgrade

No special information about firmware upgrade. Use produced .swu artifact for upgrading running system.

See also

See common instructions in Firmware Upgrade section.

3.12 Known Issues

Code

Affected Target(s)

Issue Description

evb-ksz9477-sd.yml
evb-ksz9477-nand.yml

SFP port (port 6) does not working with any kind of transceivers (sw1p6 interface).

3.13 References

  1. https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/EVB-KSZ9477