Add a device tree for the Red Pitaya SDRlab 122-16.

To boot NetBSD on the 122-16, copy the .dtb built from
zynq-red-pitays-122-16.dts, the first-stage bootloader (called
boot.bin) and U-Boot that came with the 122-16 and a kernel image,
netbsd.ub, built for earmv7hf to an MS-DOS partition on an
MBR-partitioned SD card.  At the U-Boot prompt, "Zynq> ", type these
commands:

i2c dev 0
eeprom read 0 0x50 0 0x1804 0x400
env import -b 0 0x400 hw_rev serial ethaddr
setenv bootargs "root=ld0a"
fatload mmc 0 0x01f00000 device~1.dtb
fatload mmc 0 0x02000000 netbsd.ub
fdt addr 0x01f00000
fdt set /axi/ethernet@e000b000 local-mac-address $ethaddr
bootm 0x02000000 - 0x01f00000

Note that the ethernet PHY will not attach unless you have applied
the patches from Lloyd Parkes in kern/58083.
pull/36/head
dyoung 2024-05-04 02:21:48 +00:00
parent 5fb492e854
commit 7c4812b990
5 changed files with 98 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.earmv7,v 1.10 2023/11/01 12:51:13 simonb Exp $
# $NetBSD: ad.earmv7,v 1.11 2024/05/04 02:21:48 dyoung Exp $
#
# DO NOT EDIT THIS FILE MANUALLY
# Generated by "make update-sets" in sys/dtb
@ -580,6 +580,7 @@
./boot/dtb/zynq-ebaz4205.dtb dtb-base-boot dtb
./boot/dtb/zynq-microzed.dtb dtb-base-boot dtb
./boot/dtb/zynq-parallella.dtb dtb-base-boot dtb
./boot/dtb/zynq-red-pitaya-122-16.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc702.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc706.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc770-xm010.dtb dtb-base-boot dtb

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.earmv7hf,v 1.10 2023/05/04 13:41:46 bouyer Exp $
# $NetBSD: ad.earmv7hf,v 1.11 2024/05/04 02:21:48 dyoung Exp $
#
# DO NOT EDIT THIS FILE MANUALLY
# Generated by "make update-sets" in sys/dtb
@ -580,6 +580,7 @@
./boot/dtb/zynq-ebaz4205.dtb dtb-base-boot dtb
./boot/dtb/zynq-microzed.dtb dtb-base-boot dtb
./boot/dtb/zynq-parallella.dtb dtb-base-boot dtb
./boot/dtb/zynq-red-pitaya-122-16.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc702.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc706.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc770-xm010.dtb dtb-base-boot dtb

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.earmv7hfeb,v 1.10 2023/05/06 08:43:20 skrll Exp $
# $NetBSD: ad.earmv7hfeb,v 1.11 2024/05/04 02:21:48 dyoung Exp $
#
# DO NOT EDIT THIS FILE MANUALLY
# Generated by "make update-sets" in sys/dtb
@ -580,6 +580,7 @@
./boot/dtb/zynq-ebaz4205.dtb dtb-base-boot dtb
./boot/dtb/zynq-microzed.dtb dtb-base-boot dtb
./boot/dtb/zynq-parallella.dtb dtb-base-boot dtb
./boot/dtb/zynq-red-pitaya-122-16.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc702.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc706.dtb dtb-base-boot dtb
./boot/dtb/zynq-zc770-xm010.dtb dtb-base-boot dtb

View File

@ -0,0 +1,91 @@
// SPDX-License-Identifier: GPL-2.0+
/dts-v1/;
#include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/zynq-7000.dtsi"
/ {
model = "Red Pitaya SDRlab 122-16";
compatible = "xlnx,zynq-7000";
aliases {
ethernet0 = &gem0;
serial0 = &uart0;
};
memory@0 {
device_type = "memory";
reg = <0x0 0x20000000>;
};
/* The SDRlab 122-16 comes out of the box with a bootloader that
* (I think) loads a bitstream to the FPGA. I reserve the same
* memory regions as the device tree that comes with the 122-16
* does, just in case the FPGA alters them. If we can come up
* with a new bootloader, then I think NetBSD can use all of
* these regions safely.
*/
reserved-memory {
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;
linux,cma {
compatible = "shared-dma-pool";
reusable;
size = <0x1000000>;
alignment = <0x2000>;
linux,cma-default;
};
labuf@a000000 {
reg = <0xa000000 0x2000000>;
linux,phandle = <0x2f>;
phandle = <0x2f>;
};
buffer@1000000 {
reg = <0x1000000 0x180000>;
linux,phandle = <0x30>;
phandle = <0x30>;
};
};
chosen {
bootargs = "";
stdout-path = "serial0:115200n8";
};
usb_phy0: phy0 {
#phy-cells = <0>;
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio0 46 1>;
};
};
&clkc {
ps-clk-frequency = <33333333>;
};
&gem0 {
status = "okay";
phy-mode = "rgmii-id";
phy-handle = <&ethernet_phy>;
ethernet_phy: ethernet-phy@0 {
reg = <1>;
device_type = "ethernet-phy";
};
};
&sdhci0 {
status = "okay";
};
&uart0 {
status = "okay";
};
&usb0 {
status = "okay";
dr_mode = "host";
usb-phy = <&usb_phy0>;
};

View File

@ -1367,6 +1367,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
zynq-zc770-xm011.dtb \
zynq-zc770-xm012.dtb \
zynq-zc770-xm013.dtb \
zynq-red-pitaya-122-16.dtb \
zynq-zed.dtb \
zynq-zturn.dtb \
zynq-zturn-v5.dtb \