[meta-xilinx] [PATCH 03/12] qemuzynq: Rework device tree to use kernel source include
Nathan Rossi
nathan at nathanrossi.com
Wed Feb 24 01:30:56 PST 2016
* Rework the qemuzynq.dts device tree to use the kernel source include
'zynq-7000.dtsi'
* Store the new device tree in the device-tree recipe directory
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
---
conf/machine/qemuzynq.conf | 5 +-
recipes-bsp/device-tree/files/qemu/qemuzynq.dts | 87 +++++++++++++++++++++++++
2 files changed, 88 insertions(+), 4 deletions(-)
create mode 100644 recipes-bsp/device-tree/files/qemu/qemuzynq.dts
diff --git a/conf/machine/qemuzynq.conf b/conf/machine/qemuzynq.conf
index 1391439..5c62256 100644
--- a/conf/machine/qemuzynq.conf
+++ b/conf/machine/qemuzynq.conf
@@ -11,10 +11,7 @@ EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
SERIAL_CONSOLE = "115200 ttyPS0"
-MACHINE_DEVICETREE := " \
- qemu/qemuzynq.dts \
- qemu/qemuzynq-base.dtsi \
- "
+MACHINE_DEVICETREE = "qemu/qemuzynq.dts"
# Use the networking setup from qemuarm
FILESOVERRIDES_append_pn-init-ifupdown = ":qemuarm"
diff --git a/recipes-bsp/device-tree/files/qemu/qemuzynq.dts b/recipes-bsp/device-tree/files/qemu/qemuzynq.dts
new file mode 100644
index 0000000..5b242c5
--- /dev/null
+++ b/recipes-bsp/device-tree/files/qemu/qemuzynq.dts
@@ -0,0 +1,87 @@
+/dts-v1/;
+/include/ "zynq-7000.dtsi"
+
+/ {
+ model = "Zynq A9 QEMU";
+ compatible = "qemu,xilinx-zynq-a9", "xlnx,zynq-7000";
+
+ aliases {
+ ethernet0 = &gem0;
+ serial0 = &uart1;
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0x0 0x40000000>;
+ };
+
+ chosen {
+ bootargs = "earlyprintk";
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&amba {
+ /* Setup a fixed 25 MHz clock (100Mbps) to trick the ethernet driver */
+ fixednetclk: clock {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <25000000>;
+ };
+
+ /* empty defintion for kernels that don't have qspi node */
+ qspi: spi at e000d000 { };
+};
+
+&gem0 {
+ status = "okay";
+ clocks = <&clkc 30>, <&clkc 30>, <&fixednetclk>, <&fixednetclk>, <&clkc 30>;
+ phy-mode = "rgmii-id";
+ phy-handle = <ðernet_phy>;
+
+ ethernet_phy: ethernet-phy at 23 {
+ device_type = "ethernet-phy";
+ reg = <23>;
+ };
+};
+
+&sdhci0 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&qspi {
+ status = "okay";
+ is-dual = <1>;
+ primary_flash: ps7-qspi at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "st,m25p80";
+ reg = <0x0>;
+ spi-max-frequency = <50000000>;
+ partition at 0x00000000 {
+ label = "boot";
+ reg = <0x00000000 0x00500000>;
+ };
+ partition at 0x00500000 {
+ label = "bootenv";
+ reg = <0x00500000 0x00020000>;
+ };
+ partition at 0x00520000 {
+ label = "config";
+ reg = <0x00520000 0x00020000>;
+ };
+ partition at 0x00540000 {
+ label = "image";
+ reg = <0x00540000 0x00a80000>;
+ };
+ partition at 0x00fc0000 {
+ label = "spare";
+ reg = <0x00fc0000 0x00000000>;
+ };
+ };
+};
+
--
2.7.0
More information about the meta-xilinx
mailing list