cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
e.friel
Contributor
Contributor
329 Views
Registered: ‎10-02-2018

Zybo doesnt have QSPI partitions in device tree

I am using a zybo board to boot linux from a SD card. I now want to load the environment from DDR to QSPI through u-boot and so I checked the device tree for the offset size of qspi and there is no flash partitions specifed within the dts file.

zynq-zybo.dts:

/*
 * Digilent ZYBO board DTS
 *
 *  Copyright (C) 2011 - 2015 Xilinx
 *  Copyright (C) 2012 National Instruments Corp.
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */
/dts-v1/;
#include "zynq-7000.dtsi"

/ {
	model = "Zynq ZYBO Development Board";
	compatible = "digilent,zynq-zybo", "xlnx,zynq-7000";

	aliases {
		ethernet0 = &gem0;
		serial0 = &uart1;
		spi0 = &qspi;
		mmc0 = &sdhci0;
	};

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x20000000>;
	};

	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 = <50000000>;
};

&gem0 {
	status = "okay";
	phy-mode = "rgmii-id";
	phy-handle = <&ethernet_phy>;

	ethernet_phy: ethernet-phy@0 {
		reg = <0>;
		device_type = "ethernet-phy";
	};
};

&qspi {
	u-boot,dm-pre-reloc;
	status = "okay";
};

&sdhci0 {
	u-boot,dm-pre-reloc;
	status = "okay";
};

&uart1 {
	u-boot,dm-pre-reloc;
	status = "okay";
};

&usb0 {
	status = "okay";
	dr_mode = "host";
	usb-phy = <&usb_phy0>;
};

Do I have to manually add flash partitions to the dts?

0 Kudos
2 Replies
aravindb
Moderator
Moderator
292 Views
Registered: ‎02-07-2018

HI @e.friel 

You need to check in components/plnx_workspace/device-tree/device-tree/* path for flash node if you are using the petalinux.

It should be part of dtsi file itself. You can also check in dts file which is created from dtb  using this command

dtc -I dtb -O dts -o system.dts system.dtb

 

For your refernce , zc706  will have qspi corresponding node in components/plnx_workspace/device-tree/device-tree/zc706.dtsi


&qspi {
u-boot,dm-pre-reloc;
is-dual = <1>;
num-cs = <1>;
flash@0 {
compatible = "n25q128a11";
reg = <0x0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
partition@qspi-fsbl-uboot {
label = "qspi-fsbl-uboot";
reg = <0x0 0x100000>;
};
partition@qspi-linux {
label = "qspi-linux";
reg = <0x100000 0x500000>;
};
partition@qspi-device-tree {
label = "qspi-device-tree";
reg = <0x600000 0x20000>;
};
partition@qspi-rootfs {
label = "qspi-rootfs";
reg = <0x620000 0x5E0000>;
};
partition@qspi-bitstream {
label = "qspi-bitstream";
reg = <0xC00000 0x400000>;
};
};
};

 

Thanks & regards

Aravind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos
e.friel
Contributor
Contributor
282 Views
Registered: ‎10-02-2018

@aravindb 

I am using an external git repo for u-boot and that was the contents of the device tree file. Will I use yours as a reference to create a partition on the qspi node? Also do I need several parititions as I am only flashing a BOOT.BIN onto the device?

 

0 Kudos