From f472c57a008df2ab8d941fdbad5d9077343462db Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Wed, 24 Feb 2016 16:25:51 +1000 Subject: microzed-zynq7: Rework device tree to use kernel source include * Rework the microzed-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 --- .../boards/microzed/microzed-zynq7-board.dtsi | 76 ---------------- conf/machine/boards/microzed/microzed-zynq7.dts | 5 -- conf/machine/microzed-zynq7.conf | 7 +- .../device-tree/files/microzed/microzed-zynq7.dts | 100 +++++++++++++++++++++ 4 files changed, 102 insertions(+), 86 deletions(-) delete mode 100644 conf/machine/boards/microzed/microzed-zynq7-board.dtsi delete mode 100644 conf/machine/boards/microzed/microzed-zynq7.dts create mode 100644 recipes-bsp/device-tree/files/microzed/microzed-zynq7.dts diff --git a/conf/machine/boards/microzed/microzed-zynq7-board.dtsi b/conf/machine/boards/microzed/microzed-zynq7-board.dtsi deleted file mode 100644 index d56e3e1e..00000000 --- a/conf/machine/boards/microzed/microzed-zynq7-board.dtsi +++ /dev/null @@ -1,76 +0,0 @@ -/* - * microZed DTS for generic boot. - */ - -/ { - model = "Avnet microZed"; - 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>; - } ; - - /* Disabled Devices */ - ps7_sd_1: ps7-sdio@e0101000 { 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/microzed/microzed-zynq7.dts b/conf/machine/boards/microzed/microzed-zynq7.dts deleted file mode 100644 index 3470e5ad..00000000 --- a/conf/machine/boards/microzed/microzed-zynq7.dts +++ /dev/null @@ -1,5 +0,0 @@ -/dts-v1/; -/include/ "zynq7-base.dtsi" -/include/ "microzed-zynq7-board.dtsi" -/ { -} ; diff --git a/conf/machine/microzed-zynq7.conf b/conf/machine/microzed-zynq7.conf index 5182051c..bea7c0a9 100644 --- a/conf/machine/microzed-zynq7.conf +++ b/conf/machine/microzed-zynq7.conf @@ -8,16 +8,13 @@ require conf/machine/include/machine-xilinx-board.inc MACHINE_FEATURES = "ext2 vfat usbhost" -# microZed machine definition known by Xilinx UBOOT +# u-boot configuration UBOOT_MACHINE = "zynq_microzed_config" SPL_BINARY = "boot.bin" SERIAL_CONSOLE = "115200 ttyPS0" -MACHINE_DEVICETREE := " \ - microzed/microzed-zynq7-board.dtsi \ - microzed/microzed-zynq7.dts \ - " +MACHINE_DEVICETREE = "microzed/microzed-zynq7.dts" IMAGE_BOOT_FILES += "boot.bin ${MACHINE}.dtb" diff --git a/recipes-bsp/device-tree/files/microzed/microzed-zynq7.dts b/recipes-bsp/device-tree/files/microzed/microzed-zynq7.dts new file mode 100644 index 00000000..8edb9329 --- /dev/null +++ b/recipes-bsp/device-tree/files/microzed/microzed-zynq7.dts @@ -0,0 +1,100 @@ +/dts-v1/; +/include/ "zynq-7000.dtsi" + +/ { + model = "Avnet microZed"; + compatible = "avnet,microzed", "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 = <ðernet_phy>; + + ethernet_phy: ethernet-phy@0 { + compatible = "marvell,88e1512"; + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +&sdhci0 { + status = "okay"; +}; + +&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>; + }; + }; +}; + -- cgit v1.2.3-54-g00ecf