We got a Kria SOM board from DigiKey and are trying to do a board bring up with a custom carrier board (build based on Xilinx recommendation).
My aim is to boot from the SD card (currently controlled by a jumper pin on the carrier card) and
bring up a simple Linux on the k26c SOM as a starting point and then add my custom application.
Hardware design:
I started with creating my own hardware platform using Vivado 2021.2.
I have made sure that the MIO mapping are correct based on the schematic.
SD card - MIO 46-51
GEM (ethernet) - MIO 64-77
Please find images below.
I am able to generate a bit file, export the bitfile and generate an .xsa
Petalinux build:
Then I build the petalinux project (using petalinux 2021.2 version) based on the .xsa. Please find the steps below.
petalinux-create --type project --template zynqMP --name $PROJECT
petalinux-config -p $PROJECT --silentconfig --get-hw-description=my_project.xsa
modify the device tree to include the ethernet (gem) TI DP83867 and sdcard.
Please find below the system-user.dtsi
/include/ "system-conf.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
#include <dt-bindings/phy/phy.h>
/ {
};
&gem3 { /* required by spec */
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gem3_default>;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
mdio: mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: ethernet-phy@1 {
#phy-cells = <1>;
reg = <1>;
compatible = "ethernet-phy-id2000.a231";
ti,rx-internal-delay = <0x8>;
ti,tx-internal-delay = <0xa>;
ti,fifo-depth = <0x01>;
ti,dp83867-rxctrl-strap-quirk;
reset-assert-us = <100>;
reset-deassert-us = <280>;
reset-gpios = <&gpio 38 1>;
};
};
};
&pinctrl0 { /* required by spec */
status = "okay";
pinctrl_gem3_default: gem3-default {
conf {
groups = "ethernet3_0_grp";
slew-rate = <0x1>;
power-source = <0x1>;
};
conf-rx {
pins = "MIO70", "MIO72", "MIO74";
bias-high-impedance;
low-power-disable;
};
conf-bootstrap {
pins = "MIO71", "MIO73", "MIO75";
bias-disable;
low-power-disable;
};
conf-tx {
pins = "MIO64", "MIO65", "MIO66",
"MIO67", "MIO68", "MIO69";
bias-disable;
low-power-enable;
};
conf-mdio {
groups = "mdio3_0_grp";
slew-rate = <0x1>;
power-source = <0x1>;
bias-disable;
};
mux-mdio {
function = "mdio3";
groups = "mdio3_0_grp";
};
mux {
function = "ethernet3";
groups = "ethernet3_0_grp";
};
};
};
&sdhci0 {
no-1-8-v;
//disable-wp;
};
&sdhci1 {
status = "okay";
no-1-8-v;
disable-wp;
broken-cd;
};
&i2c0 {
eeprom: eeprom@50 {
compatible = "atmel,24c08";
reg = <0x50>;
};
cp system-user.dtsi $PROJECT/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
cp system-user.dtsi $PROJECT/project-spec/meta-user/recipes-bsp/uboot-device-tree/files/system-user.dtsi
petalinux-build -p $PROJECT
I copied the resulting BOOT.BIN, image.ub and boot.scr into the SD card and try to start the board and below is what I observe.
Xilinx Zynq MP First Stage Boot Loader
Release 2021.2 Oct 13 2021 - 07:15:53
NOTICE: BL31: v2.4(release):xlnx_rebase_v2.4_2021.1_update1-23-g9188496b9
NOTICE: BL31: Built : 07:41:24, Oct 13 2021
U-Boot 2021.01 (Oct 12 2021 - 09:28:42 +0000)
CPU: ZynqMP
Silicon: v3
Board: Xilinx ZynqMP
DRAM: 4 GiB
PMUFW: v1.1
EL Level: EL2
Chip ID: xck26
NAND: 0 MiB
MMC: mmc@ff170000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Bootmode: SD_MODE1
Reset reason: EXTERNAL
Net:
**ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 1, interface rgmii-id**
**Could not get PHY for eth0: addr 1**
No ethernet found.
As you can see the last few lines indicate that it couldn’t get the PHY correctly.
ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 1, interface rgmii-id
Could not get PHY for eth0: addr 1
I am interested to know how to configure the phy correctly.
As of now, I am able to get the eth0 interface up, but unable to ping another machine in the subnet.
The ping just hangs
root@k26c_bringup:~# ping 192.168.16.1
PING 192.168.16.1 (192.168.16.1): 56 data bytes
^C
--- 192.168.16.1 ping statistics ---
57 packets transmitted, 0 packets received, 100% packet loss
Full log can be found below
k26som_build_log.txt (24.3 KB)
Any help will be greatly appreciated.