* Rework the picozed-zynq7.dts device tree to use the kernel source
  include 'zynq-7000.dtsi'
* Store the new device tree in the device-tree recipe directory
* Remove existing device tree from conf/machine/boards

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 .../boards/picozed/picozed-zynq7-board.dtsi        |  76 ---------------
 conf/machine/boards/picozed/picozed-zynq7.dts      |   5 -
 conf/machine/picozed-zynq7.conf                    |   7 +-
 .../device-tree/files/picozed/picozed-zynq7.dts    | 102 +++++++++++++++++++++
 4 files changed, 104 insertions(+), 86 deletions(-)
 delete mode 100644 conf/machine/boards/picozed/picozed-zynq7-board.dtsi
 delete mode 100644 conf/machine/boards/picozed/picozed-zynq7.dts
 create mode 100644 recipes-bsp/device-tree/files/picozed/picozed-zynq7.dts

diff --git a/conf/machine/boards/picozed/picozed-zynq7-board.dtsi 
b/conf/machine/boards/picozed/picozed-zynq7-board.dtsi
deleted file mode 100644
index 19d5052..0000000
--- a/conf/machine/boards/picozed/picozed-zynq7-board.dtsi
+++ /dev/null
@@ -1,76 +0,0 @@
-/ {
-       model = "Avnet picoZed";
-       chosen {
-               bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/ram rw";
-               linux,stdout-path = "/axi@0/serial@e0001000";
-       } ;
-       ps7_ddr_0: memory@0 {
-               device_type = "memory";
-               reg = <0x0 0x40000000>;
-       } ;
-       ps7_axi_interconnect_0: amba@0 {
-               ps7_ethernet_0: ps7-ethernet@e000b000 {
-                       phy-handle = <&phy0>;
-                       phy-mode = "rgmii-id";
-                       phy0: phy@0 {
-                               compatible = "marvell,88e1512";
-                               device_type = "ethernet-phy";
-                               reg = <0>;
-                       } ;
-               } ;
-               ps7_qspi_0: ps7-qspi@e000d000 {
-                       flash@0 {
-                               compatible = "micron,m25p80", 
"spansion,s25fl128s", "jedec,spi-nor";
-                               reg = <0x0>;
-                               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>;
-                               };
-                       };
-               } ;
-               ps7_usb_0: ps7-usb@e0002000 {
-                       xlnx,phy-reset-gpio = <&ps7_gpio_0 7 0>; /* MIO USB PHY 
Reset */
-                       usb-phy = <&usb0_phy>;
-               } ;
-               ps7_sd_1: ps7-sdio@e0101000 {
-                       /* The SD1 interface is connected to the non-removable 
eMMC */
-                       non-removable;
-               } ;
-
-               /* Disabled Devices */
-               ps7_sd_0: ps7-sdio@e0100000 { compatible = "invalid"; };
-               ps7_uart_0: serial@e0000000 { compatible = "invalid"; };
-               ps7_ethernet_1: ps7-ethernet@e000c000 { compatible = "invalid"; 
};
-               ps7_i2c_0: ps7-i2c@e0004000 { compatible = "invalid"; };
-               ps7_i2c_1: ps7-i2c@e0005000 { compatible = "invalid"; };
-               ps7_wdt_0: ps7-wdt@f8005000 { compatible = "invalid"; };
-               ps7_can_0: ps7-can@e0008000 { compatible = "invalid"; };
-               ps7_can_1: ps7-can@e0009000 { compatible = "invalid"; };
-               ps7_usb_1: ps7-usb@e0003000 { compatible = "invalid"; };
-       } ;
-
-       usb0_phy: usb-phy {
-               #phy-cells = <0>;
-               compatible = "usb-nop-xceiv";
-               reset-gpios = <&ps7_gpio_0 7 1>; /* MIO 7, GPIO_ACTIVE_LOW */
-       } ;
-} ;
diff --git a/conf/machine/boards/picozed/picozed-zynq7.dts 
b/conf/machine/boards/picozed/picozed-zynq7.dts
deleted file mode 100644
index cd580c9..0000000
--- a/conf/machine/boards/picozed/picozed-zynq7.dts
+++ /dev/null
@@ -1,5 +0,0 @@
-/dts-v1/;
-/include/ "zynq7-base.dtsi"
-/include/ "picozed-zynq7-board.dtsi"
-/ {
-} ;
diff --git a/conf/machine/picozed-zynq7.conf b/conf/machine/picozed-zynq7.conf
index 1f45dad..a57bbed 100644
--- a/conf/machine/picozed-zynq7.conf
+++ b/conf/machine/picozed-zynq7.conf
@@ -12,16 +12,13 @@ require conf/machine/include/machine-xilinx-board.inc
 
 MACHINE_FEATURES = "ext2 vfat usbhost usbgadget"
 
-# microZed machine definition known by Xilinx UBOOT
+# u-boot configuration
 UBOOT_MACHINE = "zynq_picozed_config"
 SPL_BINARY = "boot.bin"
 
 SERIAL_CONSOLE = "115200 ttyPS0"
 
-MACHINE_DEVICETREE := " \
-               picozed/picozed-zynq7-board.dtsi \
-               picozed/picozed-zynq7.dts \
-               "
+MACHINE_DEVICETREE = "picozed/picozed-zynq7.dts"
 
 IMAGE_BOOT_FILES += "boot.bin ${MACHINE}.dtb"
 
diff --git a/recipes-bsp/device-tree/files/picozed/picozed-zynq7.dts 
b/recipes-bsp/device-tree/files/picozed/picozed-zynq7.dts
new file mode 100644
index 0000000..a7817cf
--- /dev/null
+++ b/recipes-bsp/device-tree/files/picozed/picozed-zynq7.dts
@@ -0,0 +1,102 @@
+/dts-v1/;
+/include/ "zynq-7000.dtsi"
+
+/ {
+       model = "Avnet picoZed";
+       compatible = "avnet,picozed", "xlnx,zynq-7000";
+
+       aliases {
+               ethernet0 = &gem0;
+               serial0 = &uart1;
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x0 0x40000000>;
+       };
+
+       chosen {
+               bootargs = "earlyprintk";
+               stdout-path = "serial0:115200n8";
+       };
+
+       usb_phy0: phy0 {
+               compatible = "usb-nop-xceiv";
+               #phy-cells = <0>;
+               reset-gpios = <&gpio0 7 1>; /* MIO 7, GPIO_ACTIVE_LOW */
+       };
+};
+
+&amba {
+       /* empty defintion for kernels that don't have qspi node */
+       qspi: spi@e000d000 { };
+};
+
+&gem0 {
+       status = "okay";
+       phy-mode = "rgmii-id";
+       phy-handle = <&ethernet_phy>;
+
+       ethernet_phy: ethernet-phy@0 {
+               compatible = "marvell,88e1512";
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&sdhci1 {
+       status = "okay";
+       /* SD1 is onnected to a non-removable eMMC flash device */
+       non-removable;
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+       dr_mode = "host";
+       usb-phy = <&usb_phy0>;
+};
+
+&qspi {
+       status = "okay";
+       primary_flash: ps7-qspi@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "micron,m25p80", "spansion,s25fl128s", 
"jedec,spi-nor";
+               reg = <0x0>;
+               spi-max-frequency = <50000000>;
+               /* Example 16M partition table using U-Boot + U-Boot SPL */
+               partition@0x0 {
+                       label = "boot";
+                       reg = <0x0 0xe0000>;
+               };
+               partition@0xe0000 {
+                       label = "ubootenv";
+                       reg = <0xe0000 0x20000>;
+               };
+               partition@0x100000 {
+                       label = "uboot";
+                       reg = <0x100000 0x100000>;
+               };
+               partition@0x200000 {
+                       label = "kernel";
+                       reg = <0x200000 0x4f0000>;
+               };
+               partition@0x6f0000 {
+                       label = "devicetree";
+                       reg = <0x6f0000 0x10000>;
+               };
+               partition@0x700000 {
+                       label = "rootfs";
+                       reg = <0x700000 0x400000>;
+               };
+               partition@0xb00000 {
+                       label = "spare";
+                       reg = <0xb00000 0x500000>;
+               };
+       };
+};
+
-- 
2.7.0

-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to