Skip to content

Commit

Permalink
Merge tag 'xilinx-for-v2018.01-rc2-v2' of git://www.denx.de/git/u-boo…
Browse files Browse the repository at this point in the history
…t-microblaze

Xilinx changes for v2018.01-rc2-v2

fpga:
- Enable loading bitstream via fit image for !xilinx platforms

zynq:
- Fix SPL SD boot mode

zynqmp:
- Not not reset in panic
- Do not use simple allocator because of fat changes
- Various dt chagnes
- modeboot variable setup
- Fix fpga loading on automotive devices
- Fix coverity issues

test:
- Fix env test for !hush case - Stephen's patch
  • Loading branch information
trini committed Dec 18, 2017
2 parents a9e670d + 3e229a8 commit 90d75d2
Show file tree
Hide file tree
Showing 44 changed files with 212 additions and 81 deletions.
2 changes: 1 addition & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ config ARCH_ZYNQMP
select SUPPORT_SPL
select CLK
select SPL_BOARD_INIT if SPL
select SPL_CLK
select SPL_CLK if SPL
select DM_USB if USB
imply FAT_WRITE

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/dts/zynqmp-ep108.dts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
status = "okay";
clock-frequency = <400000>;
eeprom@54 {
compatible = "at,24c64";
compatible = "atmel,24c64";
reg = <0x54>;
};
};
Expand All @@ -74,7 +74,7 @@
status = "okay";
clock-frequency = <400000>;
eeprom@55 {
compatible = "at,24c64";
compatible = "atmel,24c64";
reg = <0x55>;
};
};
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/dts/zynqmp-zc1751-xm015-dc1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,10 @@
/* fpd_dma clk 667MHz, lpd_dma 500MHz */
&fpd_dma_chan1 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
xlnx,overfetch; /* for testing purpose */
xlnx,ratectrl = <0>; /* for testing purpose */
xlnx,src-issue = <31>;
};

&fpd_dma_chan2 {
status = "okay";
xlnx,ratectrl = <100>; /* for testing purpose */
xlnx,src-issue = <4>; /* for testing purpose */
};

&fpd_dma_chan3 {
Expand All @@ -61,7 +55,6 @@

&fpd_dma_chan4 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan5 {
Expand All @@ -70,7 +63,6 @@

&fpd_dma_chan6 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan7 {
Expand All @@ -79,7 +71,6 @@

&fpd_dma_chan8 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&gem3 {
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/dts/zynqmp-zc1751-xm016-dc2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,10 @@
/* fpd_dma clk 667MHz, lpd_dma 500MHz */
&fpd_dma_chan1 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
xlnx,overfetch; /* for testing purpose */
xlnx,ratectrl = <0>; /* for testing purpose */
xlnx,src-issue = <31>;
};

&fpd_dma_chan2 {
status = "okay";
xlnx,ratectrl = <100>; /* for testing purpose */
xlnx,src-issue = <4>; /* for testing purpose */
};

&fpd_dma_chan3 {
Expand All @@ -71,7 +65,6 @@

&fpd_dma_chan4 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan5 {
Expand All @@ -80,7 +73,6 @@

&fpd_dma_chan6 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan7 {
Expand All @@ -89,7 +81,6 @@

&fpd_dma_chan8 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&gem2 {
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/dts/zynqmp-zc1751-xm018-dc4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@
/* fpd_dma clk 667MHz, lpd_dma 500MHz */
&fpd_dma_chan1 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
xlnx,overfetch; /* for testing purpose */
xlnx,ratectrl = <0>; /* for testing purpose */
xlnx,src-issue = <31>;
};

&fpd_dma_chan2 {
status = "okay";
xlnx,ratectrl = <100>; /* for testing purpose */
xlnx,src-issue = <4>; /* for testing purpose */
};

&fpd_dma_chan3 {
Expand All @@ -73,7 +67,6 @@

&fpd_dma_chan4 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan5 {
Expand All @@ -82,7 +75,6 @@

&fpd_dma_chan6 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan7 {
Expand All @@ -91,7 +83,6 @@

&fpd_dma_chan8 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&lpd_dma_chan1 {
Expand Down
11 changes: 1 addition & 10 deletions arch/arm/dts/zynqmp-zc1751-xm019-dc5.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
};

chosen {
bootargs = "earlycon=cdns,mmio,0xff000000,115200n8";
bootargs = "earlycon";
stdout-path = "serial0:115200n8";
};

Expand All @@ -41,16 +41,10 @@
/* fpd_dma clk 667MHz, lpd_dma 500MHz */
&fpd_dma_chan1 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
xlnx,overfetch; /* for testing purpose */
xlnx,ratectrl = <0>; /* for testing purpose */
xlnx,src-issue = <31>;
};

&fpd_dma_chan2 {
status = "okay";
xlnx,ratectrl = <100>; /* for testing purpose */
xlnx,src-issue = <4>; /* for testing purpose */
};

&fpd_dma_chan3 {
Expand All @@ -59,7 +53,6 @@

&fpd_dma_chan4 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan5 {
Expand All @@ -68,7 +61,6 @@

&fpd_dma_chan6 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan7 {
Expand All @@ -77,7 +69,6 @@

&fpd_dma_chan8 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&gem1 {
Expand Down
20 changes: 11 additions & 9 deletions arch/arm/dts/zynqmp-zcu102-revA.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "zynqmp-clk.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
#include <dt-bindings/phy/phy.h>

/ {
model = "ZynqMP ZCU102 RevA";
Expand Down Expand Up @@ -80,16 +81,10 @@
/* fpd_dma clk 667MHz, lpd_dma 500MHz */
&fpd_dma_chan1 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
xlnx,overfetch; /* for testing purpose */
xlnx,ratectrl = <0>; /* for testing purpose */
xlnx,src-issue = <31>;
};

&fpd_dma_chan2 {
status = "okay";
xlnx,ratectrl = <100>; /* for testing purpose */
xlnx,src-issue = <4>; /* for testing purpose */
};

&fpd_dma_chan3 {
Expand All @@ -98,7 +93,6 @@

&fpd_dma_chan4 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan5 {
Expand All @@ -107,7 +101,6 @@

&fpd_dma_chan6 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&fpd_dma_chan7 {
Expand All @@ -116,7 +109,6 @@

&fpd_dma_chan8 {
status = "okay";
xlnx,include-sg; /* for testing purpose */
};

&gem3 {
Expand Down Expand Up @@ -884,6 +876,8 @@ drivers/hwmon/pmbus/Makefile:11:obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
ceva,p1-comwake-params = /bits/ 8 <0x06 0x14 0x08 0x0E>;
ceva,p1-burst-params = /bits/ 8 <0x13 0x08 0x4A 0x06>;
ceva,p1-retry-params = /bits/ 16 <0x96A4 0x3FFC>;
phy-names = "sata-phy";
phys = <&lane3 PHY_TYPE_SATA 1 1 125000000>;
};

/* SD1 with level shifter */
Expand All @@ -895,6 +889,10 @@ drivers/hwmon/pmbus/Makefile:11:obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
xlnx,mio_bank = <1>;
};

&serdes {
status = "okay";
};

&uart0 {
status = "okay";
pinctrl-names = "default";
Expand All @@ -917,6 +915,10 @@ drivers/hwmon/pmbus/Makefile:11:obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
&dwc3_0 {
status = "okay";
dr_mode = "host";
snps,usb3_lpm_capable;
phy-names = "usb3-phy";
phys = <&lane2 PHY_TYPE_USB3 0 2 26000000>;
maximum-speed = "super-speed";
};

&watchdog0 {
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/dts/zynqmp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
method = "smc";
};

firmware {
pmufw: firmware {
compatible = "xlnx,zynqmp-pm";
method = "smc";
interrupt-parent = <&gic>;
Expand Down Expand Up @@ -804,6 +804,7 @@
};

qspi: spi@ff0f0000 {
u-boot,dm-pre-reloc;
compatible = "xlnx,zynqmp-qspi-1.0";
status = "disabled";
clock-names = "ref_clk", "pclk";
Expand Down
1 change: 1 addition & 0 deletions arch/arm/include/asm/arch-zynqmp/sys_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum {
TCM_SPLIT,
};

int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
unsigned int zynqmp_get_silicon_version(void);

void psu_init(void);
Expand Down
23 changes: 19 additions & 4 deletions board/xilinx/zynqmp/zynqmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ int board_init(void)
if (current_el() != 3) {
static char version[ZYNQMP_VERSION_SIZE];

strncat(version, "xczu", 4);
strncat(version, "zu", 2);
zynqmppl.name = strncat(version,
zynqmp_get_silicon_idcode_name(),
ZYNQMP_VERSION_SIZE - 5);
ZYNQMP_VERSION_SIZE - 3);
printf("Chip ID:\t%s\n", zynqmppl.name);
fpga_init();
fpga_add(fpga_xilinx, &zynqmppl);
Expand All @@ -277,10 +277,13 @@ int board_early_init_r(void)
{
u32 val;

if (current_el() != 3)
return 0;

val = readl(&crlapb_base->timestamp_ref_ctrl);
val &= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;

if (current_el() == 3 && !val) {
if (!val) {
val = readl(&crlapb_base->timestamp_ref_ctrl);
val |= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;
writel(val, &crlapb_base->timestamp_ref_ctrl);
Expand Down Expand Up @@ -343,13 +346,17 @@ int board_late_init(void)
u8 bootmode;
const char *mode;
char *new_targets;
int ret;

if (!(gd->flags & GD_FLG_ENV_DEFAULT)) {
debug("Saved variables - Skipping\n");
return 0;
}

reg = readl(&crlapb_base->boot_mode);
ret = zynqmp_mmio_read((ulong)&crlapb_base->boot_mode, &reg);
if (ret)
return -EINVAL;

if (reg >> BOOT_MODE_ALT_SHIFT)
reg >>= BOOT_MODE_ALT_SHIFT;

Expand All @@ -360,23 +367,28 @@ int board_late_init(void)
case USB_MODE:
puts("USB_MODE\n");
mode = "usb";
env_set("modeboot", "usb_dfu_spl");
break;
case JTAG_MODE:
puts("JTAG_MODE\n");
mode = "pxe dhcp";
env_set("modeboot", "jtagboot");
break;
case QSPI_MODE_24BIT:
case QSPI_MODE_32BIT:
mode = "qspi0";
puts("QSPI_MODE\n");
env_set("modeboot", "qspiboot");
break;
case EMMC_MODE:
puts("EMMC_MODE\n");
mode = "mmc0";
env_set("modeboot", "emmcboot");
break;
case SD_MODE:
puts("SD_MODE\n");
mode = "mmc0";
env_set("modeboot", "sdboot");
break;
case SD1_LSHFT_MODE:
puts("LVL_SHFT_");
Expand All @@ -385,13 +397,16 @@ int board_late_init(void)
puts("SD_MODE1\n");
#if defined(CONFIG_ZYNQ_SDHCI0) && defined(CONFIG_ZYNQ_SDHCI1)
mode = "mmc1";
env_set("sdbootdev", "1");
#else
mode = "mmc0";
#endif
env_set("modeboot", "sdboot");
break;
case NAND_MODE:
puts("NAND_MODE\n");
mode = "nand0";
env_set("modeboot", "nandboot");
break;
default:
mode = "";
Expand Down
Loading

0 comments on commit 90d75d2

Please sign in to comment.