microblaze: - Align defconfig zynq: - Rework fpga initialization and cpuinfo handling zynqmp: - Add ZynqMP R5 support - Wire and enable watchdog on zcu100-revC - Setup MMU map for DDR at run time - Show board info based on DT and cleanup IDENT_STRING zynqmp tools: - Add read partition support - Add initial support for Xilinx bif format for boot.bin generation mmc: - Fix get_timer usage on 64bit cpus - Add support for SD3.0 UHS mode nand-zynq: - Add support for 16bit buswidth - Use address cycles from onfi params scsi: - convert ceva sata to UCLASS_AHCI timer: - Add Cadence TTC for ZynqMP r5 watchdog: - Minor cadence driver cleanup -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlr1ldMACgkQykllyylKDCHioACghoJw6+NqsZXl8zGWRP38yZ5K mvgAnihfOQq125mpKPZmcc5yt6wVwYIU =8ji9 -----END PGP SIGNATURE----- Merge tag 'xilinx-for-v2018.07' of git://www.denx.de/git/u-boot-microblaze Xilinx changes for v2018.07 microblaze: - Align defconfig zynq: - Rework fpga initialization and cpuinfo handling zynqmp: - Add ZynqMP R5 support - Wire and enable watchdog on zcu100-revC - Setup MMU map for DDR at run time - Show board info based on DT and cleanup IDENT_STRING zynqmp tools: - Add read partition support - Add initial support for Xilinx bif format for boot.bin generation mmc: - Fix get_timer usage on 64bit cpus - Add support for SD3.0 UHS mode nand-zynq: - Add support for 16bit buswidth - Use address cycles from onfi params scsi: - convert ceva sata to UCLASS_AHCI timer: - Add Cadence TTC for ZynqMP r5 watchdog: - Minor cadence driver cleanuplime2-spi
commit
3b52847a45
@ -0,0 +1,73 @@ |
||||
// SPDX-License-Identifier: GPL-2.0 |
||||
/* |
||||
* dts file for Xilinx ZynqMP R5 |
||||
* |
||||
* (C) Copyright 2018, Xilinx, Inc. |
||||
* |
||||
* Michal Simek <michal.simek@xilinx.com> |
||||
*/ |
||||
|
||||
/dts-v1/; |
||||
|
||||
/ { |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
compatible = "xlnx,zynqmp-r5"; |
||||
model = "Xilinx ZynqMP R5"; |
||||
|
||||
cpus { |
||||
#address-cells = <0x1>; |
||||
#size-cells = <0x0>; |
||||
|
||||
cpu@0 { |
||||
compatible = "arm,cortex-r5"; |
||||
device_type = "cpu"; |
||||
reg = <0>; |
||||
}; |
||||
}; |
||||
|
||||
aliases { |
||||
serial0 = &uart1; |
||||
}; |
||||
|
||||
memory@0 { |
||||
device_type = "memory"; |
||||
reg = <0x00000000 0x20000000>; |
||||
}; |
||||
|
||||
chosen { |
||||
bootargs = ""; |
||||
stdout-path = "serial0:115200n8"; |
||||
}; |
||||
|
||||
clk100: clk100 { |
||||
compatible = "fixed-clock"; |
||||
#clock-cells = <0>; |
||||
clock-frequency = <100000000>; |
||||
u-boot,dm-pre-reloc; |
||||
}; |
||||
|
||||
amba { |
||||
u-boot,dm-pre-reloc; |
||||
compatible = "simple-bus"; |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
ranges; |
||||
|
||||
ttc0: timer@ff110000 { |
||||
compatible = "cdns,ttc"; |
||||
status = "okay"; |
||||
reg = <0xff110000 0x1000>; |
||||
timer-width = <32>; |
||||
clocks = <&clk100>; |
||||
}; |
||||
|
||||
uart1: serial@ff010000 { |
||||
u-boot,dm-pre-reloc; |
||||
compatible = "cdns,uart-r1p12", "xlnx,xuartps"; |
||||
reg = <0xff010000 0x1000>; |
||||
clock-names = "uart_clk", "pclk"; |
||||
clocks = <&clk100 &clk100>; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,79 @@ |
||||
// SPDX-License-Identifier: GPL-2.0 |
||||
/* |
||||
* dts file for Xilinx ZynqMP ZC1275 RevB |
||||
* |
||||
* (C) Copyright 2018, Xilinx, Inc. |
||||
* |
||||
* Michal Simek <michal.simek@xilinx.com> |
||||
* Siva Durga Prasad Paladugu <sivadur@xilinx.com> |
||||
*/ |
||||
|
||||
/dts-v1/; |
||||
|
||||
#include "zynqmp.dtsi" |
||||
#include "zynqmp-clk-ccf.dtsi" |
||||
|
||||
/ { |
||||
model = "ZynqMP ZC1275 RevB"; |
||||
compatible = "xlnx,zynqmp-zc1275-revB", "xlnx,zynqmp-zc1275", "xlnx,zynqmp"; |
||||
|
||||
aliases { |
||||
serial0 = &uart0; |
||||
serial1 = &dcc; |
||||
spi0 = &qspi; |
||||
mmc0 = &sdhci1; |
||||
}; |
||||
|
||||
chosen { |
||||
bootargs = "earlycon"; |
||||
stdout-path = "serial0:115200n8"; |
||||
}; |
||||
|
||||
memory@0 { |
||||
device_type = "memory"; |
||||
reg = <0x0 0x0 0x0 0x80000000>; |
||||
}; |
||||
}; |
||||
|
||||
&dcc { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&qspi { |
||||
status = "okay"; |
||||
flash@0 { |
||||
compatible = "m25p80"; /* 32MB */ |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
reg = <0x0>; |
||||
spi-tx-bus-width = <1>; |
||||
spi-rx-bus-width = <4>; |
||||
spi-max-frequency = <108000000>; /* Based on DC1 spec */ |
||||
partition@qspi-fsbl-uboot { /* for testing purpose */ |
||||
label = "qspi-fsbl-uboot"; |
||||
reg = <0x0 0x100000>; |
||||
}; |
||||
partition@qspi-linux { /* for testing purpose */ |
||||
label = "qspi-linux"; |
||||
reg = <0x100000 0x500000>; |
||||
}; |
||||
partition@qspi-device-tree { /* for testing purpose */ |
||||
label = "qspi-device-tree"; |
||||
reg = <0x600000 0x20000>; |
||||
}; |
||||
partition@qspi-rootfs { /* for testing purpose */ |
||||
label = "qspi-rootfs"; |
||||
reg = <0x620000 0x5E0000>; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
&uart0 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&sdhci1 { |
||||
status = "okay"; |
||||
no-1-8-v; |
||||
xlnx,mio_bank = <1>; |
||||
}; |
@ -0,0 +1,27 @@ |
||||
# SPDX-License-Identifier: GPL-2.0 |
||||
|
||||
if ARCH_ZYNQMP_R5 |
||||
|
||||
config SYS_BOARD |
||||
string "Board name" |
||||
default "zynqmp_r5" |
||||
|
||||
config SYS_VENDOR |
||||
string "Vendor name" |
||||
default "xilinx" |
||||
|
||||
config SYS_SOC |
||||
default "zynqmp-r5" |
||||
|
||||
config SYS_CONFIG_NAME |
||||
string "Board configuration name" |
||||
default "xilinx_zynqmp_r5" |
||||
help |
||||
This option contains information about board configuration name. |
||||
Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header |
||||
will be used for board configuration. |
||||
|
||||
config SYS_MALLOC_F_LEN |
||||
default 0x600 |
||||
|
||||
endif |
@ -0,0 +1,3 @@ |
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
obj-y += cpu.o
|
@ -0,0 +1,37 @@ |
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (C) 2018 Xilinx, Inc. (Michal Simek) |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <asm/armv7_mpu.h> |
||||
|
||||
DECLARE_GLOBAL_DATA_PTR; |
||||
|
||||
struct mpu_region_config region_config[] = { |
||||
{ 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW, |
||||
O_I_WB_RD_WR_ALLOC, REGION_1GB }, |
||||
{ 0x20000000, REGION_1, XN_EN, PRIV_RO_USR_RO, |
||||
O_I_WB_RD_WR_ALLOC, REGION_512MB }, |
||||
{ 0x40000000, REGION_2, XN_EN, PRIV_RO_USR_RO, |
||||
O_I_WB_RD_WR_ALLOC, REGION_1GB }, |
||||
}; |
||||
|
||||
int arch_cpu_init(void) |
||||
{ |
||||
gd->cpu_clk = CONFIG_CPU_FREQ_HZ; |
||||
|
||||
setup_mpu_regions(region_config, sizeof(region_config) / |
||||
sizeof(struct mpu_region_config)); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
/*
|
||||
* Perform the low-level reset. |
||||
*/ |
||||
void reset_cpu(ulong addr) |
||||
{ |
||||
while (1) |
||||
; |
||||
} |
@ -0,0 +1,229 @@ |
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Xilinx ZynqMP SoC Tap Delay Programming |
||||
* |
||||
* Copyright (C) 2018 Xilinx, Inc. |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <asm/arch/sys_proto.h> |
||||
|
||||
#define SD_DLL_CTRL 0xFF180358 |
||||
#define SD_ITAP_DLY 0xFF180314 |
||||
#define SD_OTAP_DLY 0xFF180318 |
||||
#define SD0_DLL_RST_MASK 0x00000004 |
||||
#define SD0_DLL_RST 0x00000004 |
||||
#define SD1_DLL_RST_MASK 0x00040000 |
||||
#define SD1_DLL_RST 0x00040000 |
||||
#define SD0_ITAPCHGWIN_MASK 0x00000200 |
||||
#define SD0_ITAPCHGWIN 0x00000200 |
||||
#define SD1_ITAPCHGWIN_MASK 0x02000000 |
||||
#define SD1_ITAPCHGWIN 0x02000000 |
||||
#define SD0_ITAPDLYENA_MASK 0x00000100 |
||||
#define SD0_ITAPDLYENA 0x00000100 |
||||
#define SD1_ITAPDLYENA_MASK 0x01000000 |
||||
#define SD1_ITAPDLYENA 0x01000000 |
||||
#define SD0_ITAPDLYSEL_MASK 0x000000FF |
||||
#define SD0_ITAPDLYSEL_HSD 0x00000015 |
||||
#define SD0_ITAPDLYSEL_SD_DDR50 0x0000003D |
||||
#define SD0_ITAPDLYSEL_MMC_DDR50 0x00000012 |
||||
|
||||
#define SD1_ITAPDLYSEL_MASK 0x00FF0000 |
||||
#define SD1_ITAPDLYSEL_HSD 0x00150000 |
||||
#define SD1_ITAPDLYSEL_SD_DDR50 0x003D0000 |
||||
#define SD1_ITAPDLYSEL_MMC_DDR50 0x00120000 |
||||
|
||||
#define SD0_OTAPDLYSEL_MASK 0x0000003F |
||||
#define SD0_OTAPDLYSEL_MMC_HSD 0x00000006 |
||||
#define SD0_OTAPDLYSEL_SD_HSD 0x00000005 |
||||
#define SD0_OTAPDLYSEL_SDR50 0x00000003 |
||||
#define SD0_OTAPDLYSEL_SDR104_B0 0x00000003 |
||||
#define SD0_OTAPDLYSEL_SDR104_B2 0x00000002 |
||||
#define SD0_OTAPDLYSEL_SD_DDR50 0x00000004 |
||||
#define SD0_OTAPDLYSEL_MMC_DDR50 0x00000006 |
||||
|
||||
#define SD1_OTAPDLYSEL_MASK 0x003F0000 |
||||
#define SD1_OTAPDLYSEL_MMC_HSD 0x00060000 |
||||
#define SD1_OTAPDLYSEL_SD_HSD 0x00050000 |
||||
#define SD1_OTAPDLYSEL_SDR50 0x00030000 |
||||
#define SD1_OTAPDLYSEL_SDR104_B0 0x00030000 |
||||
#define SD1_OTAPDLYSEL_SDR104_B2 0x00020000 |
||||
#define SD1_OTAPDLYSEL_SD_DDR50 0x00040000 |
||||
#define SD1_OTAPDLYSEL_MMC_DDR50 0x00060000 |
||||
|
||||
#define MMC_BANK2 0x2 |
||||
|
||||
#define MMC_TIMING_UHS_SDR25 1 |
||||
#define MMC_TIMING_UHS_SDR50 2 |
||||
#define MMC_TIMING_UHS_SDR104 3 |
||||
#define MMC_TIMING_UHS_DDR50 4 |
||||
#define MMC_TIMING_MMC_HS200 5 |
||||
#define MMC_TIMING_SD_HS 6 |
||||
#define MMC_TIMING_MMC_DDR52 7 |
||||
#define MMC_TIMING_MMC_HS 8 |
||||
|
||||
void zynqmp_dll_reset(u8 deviceid) |
||||
{ |
||||
/* Issue DLL Reset */ |
||||
if (deviceid == 0) |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD0_DLL_RST_MASK, |
||||
SD0_DLL_RST); |
||||
else |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD1_DLL_RST_MASK, |
||||
SD1_DLL_RST); |
||||
|
||||
mdelay(1); |
||||
|
||||
/* Release DLL Reset */ |
||||
if (deviceid == 0) |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD0_DLL_RST_MASK, 0x0); |
||||
else |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD1_DLL_RST_MASK, 0x0); |
||||
} |
||||
|
||||
static void arasan_zynqmp_tap_sdr104(u8 deviceid, u8 timing, u8 bank) |
||||
{ |
||||
if (deviceid == 0) { |
||||
/* Program OTAP */ |
||||
if (bank == MMC_BANK2) |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_SDR104_B2); |
||||
else |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_SDR104_B0); |
||||
} else { |
||||
/* Program OTAP */ |
||||
if (bank == MMC_BANK2) |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_SDR104_B2); |
||||
else |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_SDR104_B0); |
||||
} |
||||
} |
||||
|
||||
static void arasan_zynqmp_tap_hs(u8 deviceid, u8 timing, u8 bank) |
||||
{ |
||||
if (deviceid == 0) { |
||||
/* Program ITAP */ |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPCHGWIN_MASK, |
||||
SD0_ITAPCHGWIN); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYENA_MASK, |
||||
SD0_ITAPDLYENA); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYSEL_MASK, |
||||
SD0_ITAPDLYSEL_HSD); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPCHGWIN_MASK, 0x0); |
||||
/* Program OTAP */ |
||||
if (timing == MMC_TIMING_MMC_HS) |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_MMC_HSD); |
||||
else |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_SD_HSD); |
||||
} else { |
||||
/* Program ITAP */ |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPCHGWIN_MASK, |
||||
SD1_ITAPCHGWIN); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYENA_MASK, |
||||
SD1_ITAPDLYENA); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYSEL_MASK, |
||||
SD1_ITAPDLYSEL_HSD); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPCHGWIN_MASK, 0x0); |
||||
/* Program OTAP */ |
||||
if (timing == MMC_TIMING_MMC_HS) |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_MMC_HSD); |
||||
else |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_SD_HSD); |
||||
} |
||||
} |
||||
|
||||
static void arasan_zynqmp_tap_ddr50(u8 deviceid, u8 timing, u8 bank) |
||||
{ |
||||
if (deviceid == 0) { |
||||
/* Program ITAP */ |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPCHGWIN_MASK, |
||||
SD0_ITAPCHGWIN); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYENA_MASK, |
||||
SD0_ITAPDLYENA); |
||||
if (timing == MMC_TIMING_UHS_DDR50) |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYSEL_MASK, |
||||
SD0_ITAPDLYSEL_SD_DDR50); |
||||
else |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYSEL_MASK, |
||||
SD0_ITAPDLYSEL_MMC_DDR50); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPCHGWIN_MASK, 0x0); |
||||
/* Program OTAP */ |
||||
if (timing == MMC_TIMING_UHS_DDR50) |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_SD_DDR50); |
||||
else |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_MMC_DDR50); |
||||
} else { |
||||
/* Program ITAP */ |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPCHGWIN_MASK, |
||||
SD1_ITAPCHGWIN); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYENA_MASK, |
||||
SD1_ITAPDLYENA); |
||||
if (timing == MMC_TIMING_UHS_DDR50) |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYSEL_MASK, |
||||
SD1_ITAPDLYSEL_SD_DDR50); |
||||
else |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYSEL_MASK, |
||||
SD1_ITAPDLYSEL_MMC_DDR50); |
||||
zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPCHGWIN_MASK, 0x0); |
||||
/* Program OTAP */ |
||||
if (timing == MMC_TIMING_UHS_DDR50) |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_SD_DDR50); |
||||
else |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_MMC_DDR50); |
||||
} |
||||
} |
||||
|
||||
static void arasan_zynqmp_tap_sdr50(u8 deviceid, u8 timing, u8 bank) |
||||
{ |
||||
if (deviceid == 0) { |
||||
/* Program OTAP */ |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK, |
||||
SD0_OTAPDLYSEL_SDR50); |
||||
} else { |
||||
/* Program OTAP */ |
||||
zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK, |
||||
SD1_OTAPDLYSEL_SDR50); |
||||
} |
||||
} |
||||
|
||||
void arasan_zynqmp_set_tapdelay(u8 deviceid, u8 timing, u8 bank) |
||||
{ |
||||
if (deviceid == 0) |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD0_DLL_RST_MASK, |
||||
SD0_DLL_RST); |
||||
else |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD1_DLL_RST_MASK, |
||||
SD1_DLL_RST); |
||||
|
||||
switch (timing) { |
||||
case MMC_TIMING_UHS_SDR25: |
||||
arasan_zynqmp_tap_hs(deviceid, timing, bank); |
||||
break; |
||||
case MMC_TIMING_UHS_SDR50: |
||||
arasan_zynqmp_tap_sdr50(deviceid, timing, bank); |
||||
break; |
||||
case MMC_TIMING_UHS_SDR104: |
||||
case MMC_TIMING_MMC_HS200: |
||||
arasan_zynqmp_tap_sdr104(deviceid, timing, bank); |
||||
break; |
||||
case MMC_TIMING_UHS_DDR50: |
||||
arasan_zynqmp_tap_ddr50(deviceid, timing, bank); |
||||
break; |
||||
} |
||||
|
||||
if (deviceid == 0) |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD0_DLL_RST_MASK, 0x0); |
||||
else |
||||
zynqmp_mmio_write(SD_DLL_CTRL, SD1_DLL_RST_MASK, 0x0); |
||||
} |
@ -0,0 +1,523 @@ |
||||
/*
|
||||
* (c) Copyright 2015 Xilinx, Inc. All rights reserved. |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#include <asm/arch/psu_init_gpl.h> |
||||
#include <xil_io.h> |
||||
|
||||
static unsigned long psu_pll_init_data(void) |
||||
{ |
||||
psu_mask_write(0xFF5E0034, 0xFE7FEDEFU, 0x7E4E2C62U); |
||||
psu_mask_write(0xFF5E0030, 0x00717F00U, 0x00013C00U); |
||||
psu_mask_write(0xFF5E0030, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFF5E0030, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFF5E0030, 0x00000001U, 0x00000000U); |
||||
mask_poll(0xFF5E0040, 0x00000002U); |
||||
psu_mask_write(0xFF5E0030, 0x00000008U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0048, 0x00003F00U, 0x00000200U); |
||||
psu_mask_write(0xFF5E0024, 0xFE7FEDEFU, 0x7E4B0C82U); |
||||
psu_mask_write(0xFF5E0020, 0x00717F00U, 0x00015A00U); |
||||
psu_mask_write(0xFF5E0020, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFF5E0020, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFF5E0020, 0x00000001U, 0x00000000U); |
||||
mask_poll(0xFF5E0040, 0x00000001U); |
||||
psu_mask_write(0xFF5E0020, 0x00000008U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0044, 0x00003F00U, 0x00000300U); |
||||
psu_mask_write(0xFD1A0024, 0xFE7FEDEFU, 0x7E4B0C62U); |
||||
psu_mask_write(0xFD1A0020, 0x00717F00U, 0x00014200U); |
||||
psu_mask_write(0xFD1A0020, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFD1A0020, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD1A0020, 0x00000001U, 0x00000000U); |
||||
mask_poll(0xFD1A0044, 0x00000001U); |
||||
psu_mask_write(0xFD1A0020, 0x00000008U, 0x00000000U); |
||||
psu_mask_write(0xFD1A0048, 0x00003F00U, 0x00000300U); |
||||
psu_mask_write(0xFD1A0030, 0xFE7FEDEFU, 0x7E4B0C62U); |
||||
psu_mask_write(0xFD1A002C, 0x00717F00U, 0x00014800U); |
||||
psu_mask_write(0xFD1A002C, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFD1A002C, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD1A002C, 0x00000001U, 0x00000000U); |
||||
mask_poll(0xFD1A0044, 0x00000002U); |
||||
psu_mask_write(0xFD1A002C, 0x00000008U, 0x00000000U); |
||||
psu_mask_write(0xFD1A004C, 0x00003F00U, 0x00000300U); |
||||
psu_mask_write(0xFD1A003C, 0xFE7FEDEFU, 0x7E4B0C62U); |
||||
psu_mask_write(0xFD1A0038, 0x00717F00U, 0x00014000U); |
||||
psu_mask_write(0xFD1A0038, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFD1A0038, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD1A0038, 0x00000001U, 0x00000000U); |
||||
mask_poll(0xFD1A0044, 0x00000004U); |
||||
psu_mask_write(0xFD1A0038, 0x00000008U, 0x00000000U); |
||||
psu_mask_write(0xFD1A0050, 0x00003F00U, 0x00000200U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_clock_init_data(void) |
||||
{ |
||||
psu_mask_write(0xFF5E0068, 0x013F3F07U, 0x01010C00U); |
||||
psu_mask_write(0xFF5E0070, 0x013F3F07U, 0x01010502U); |
||||
psu_mask_write(0xFF18030C, 0x00020000U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0074, 0x013F3F07U, 0x01010F00U); |
||||
psu_mask_write(0xFF5E0120, 0x013F3F07U, 0x01010F00U); |
||||
psu_mask_write(0xFF5E0090, 0x01003F07U, 0x01000302U); |
||||
psu_mask_write(0xFF5E009C, 0x01003F07U, 0x01000400U); |
||||
psu_mask_write(0xFF5E00A4, 0x01003F07U, 0x01000900U); |
||||
psu_mask_write(0xFF5E00A8, 0x01003F07U, 0x01000302U); |
||||
psu_mask_write(0xFF5E00AC, 0x01003F07U, 0x01000F02U); |
||||
psu_mask_write(0xFF5E00B0, 0x01003F07U, 0x01000602U); |
||||
psu_mask_write(0xFF5E00B8, 0x01003F07U, 0x01000302U); |
||||
psu_mask_write(0xFF5E00C0, 0x013F3F07U, 0x01010A02U); |
||||
psu_mask_write(0xFF5E00C4, 0x013F3F07U, 0x01010402U); |
||||
psu_mask_write(0xFF5E00C8, 0x013F3F07U, 0x01010802U); |
||||
psu_mask_write(0xFF5E0108, 0x013F3F07U, 0x01011D02U); |
||||
psu_mask_write(0xFF5E0104, 0x00000007U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0128, 0x01003F07U, 0x01000104U); |
||||
psu_mask_write(0xFD1A0060, 0x03003F07U, 0x03000100U); |
||||
psu_mask_write(0xFD1A0068, 0x01003F07U, 0x01000200U); |
||||
psu_mask_write(0xFD1A0080, 0x00003F07U, 0x00000600U); |
||||
psu_mask_write(0xFD1A0084, 0x07003F07U, 0x07000203U); |
||||
psu_mask_write(0xFD1A00B8, 0x01003F07U, 0x01000203U); |
||||
psu_mask_write(0xFD1A00BC, 0x01003F07U, 0x01000203U); |
||||
psu_mask_write(0xFD1A00C0, 0x01003F07U, 0x01000202U); |
||||
psu_mask_write(0xFD1A00C4, 0x01003F07U, 0x01000502U); |
||||
psu_mask_write(0xFD1A00F8, 0x00003F07U, 0x00000200U); |
||||
psu_mask_write(0xFF180380, 0x000000FFU, 0x00000000U); |
||||
psu_mask_write(0xFD610100, 0x00000001U, 0x00000000U); |
||||
psu_mask_write(0xFF180300, 0x00000001U, 0x00000000U); |
||||
psu_mask_write(0xFF410050, 0x00000001U, 0x00000000U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_ddr_init_data(void) |
||||
{ |
||||
psu_mask_write(0xFD1A0108, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFD070000, 0xE30FBE3DU, 0x81040001U); |
||||
psu_mask_write(0xFD070010, 0x8000F03FU, 0x00000030U); |
||||
psu_mask_write(0xFD070020, 0x000003F3U, 0x00000100U); |
||||
psu_mask_write(0xFD070024, 0xFFFFFFFFU, 0x00800000U); |
||||
psu_mask_write(0xFD070030, 0x0000007FU, 0x00000000U); |
||||
psu_mask_write(0xFD070034, 0x00FFFF1FU, 0x00403210U); |
||||
psu_mask_write(0xFD070050, 0x00F1F1F4U, 0x00210000U); |
||||
psu_mask_write(0xFD070054, 0x0FFF0FFFU, 0x00000000U); |
||||
psu_mask_write(0xFD070060, 0x00000073U, 0x00000001U); |
||||
psu_mask_write(0xFD070064, 0x0FFF83FFU, 0x00308034U); |
||||
psu_mask_write(0xFD070070, 0x00000017U, 0x00000010U); |
||||
psu_mask_write(0xFD070074, 0x00000003U, 0x00000000U); |
||||
psu_mask_write(0xFD0700C4, 0x3F000391U, 0x10000200U); |
||||
psu_mask_write(0xFD0700C8, 0x01FF1F3FU, 0x0030051FU); |
||||
psu_mask_write(0xFD0700D0, 0xC3FF0FFFU, 0x00020063U); |
||||
psu_mask_write(0xFD0700D4, 0x01FF7F0FU, 0x00290000U); |
||||
psu_mask_write(0xFD0700D8, 0x0000FF0FU, 0x00000E05U); |
||||
psu_mask_write(0xFD0700DC, 0xFFFFFFFFU, 0x05200004U); |
||||
psu_mask_write(0xFD0700E0, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD0700E4, 0x00FF03FFU, 0x00110004U); |
||||
psu_mask_write(0xFD0700E8, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD0700EC, 0xFFFF0000U, 0x00000000U); |
||||
psu_mask_write(0xFD0700F0, 0x0000003FU, 0x00000010U); |
||||
psu_mask_write(0xFD0700F4, 0x00000FFFU, 0x0000066FU); |
||||
psu_mask_write(0xFD070100, 0x7F3F7F3FU, 0x07080D07U); |
||||
psu_mask_write(0xFD070104, 0x001F1F7FU, 0x0005020BU); |
||||
psu_mask_write(0xFD070108, 0x3F3F3F3FU, 0x03030607U); |
||||
psu_mask_write(0xFD07010C, 0x3FF3F3FFU, 0x00502006U); |
||||
psu_mask_write(0xFD070110, 0x1F0F0F1FU, 0x13020206U); |
||||
psu_mask_write(0xFD070114, 0x0F0F3F1FU, 0x03030202U); |
||||
psu_mask_write(0xFD070118, 0x0F0F000FU, 0x01010003U); |
||||
psu_mask_write(0xFD07011C, 0x00000F0FU, 0x00000303U); |
||||
psu_mask_write(0xFD070120, 0x7F7F7F7FU, 0x02020909U); |
||||
psu_mask_write(0xFD070124, 0x40070F3FU, 0x0004040DU); |
||||
psu_mask_write(0xFD07012C, 0x7F1F031FU, 0x440C011CU); |
||||
psu_mask_write(0xFD070130, 0x00030F1FU, 0x00020608U); |
||||
psu_mask_write(0xFD070180, 0xF7FF03FFU, 0x80800020U); |
||||
psu_mask_write(0xFD070184, 0x3FFFFFFFU, 0x02009896U); |
||||
psu_mask_write(0xFD070190, 0x1FBFBF3FU, 0x04828202U); |
||||
psu_mask_write(0xFD070194, 0xF31F0F0FU, 0x00020304U); |
||||
psu_mask_write(0xFD070198, 0x0FF1F1F1U, 0x07000101U); |
||||
psu_mask_write(0xFD07019C, 0x000000F1U, 0x00000021U); |
||||
psu_mask_write(0xFD0701A0, 0xC3FF03FFU, 0x00400003U); |
||||
psu_mask_write(0xFD0701A4, 0x00FF00FFU, 0x00C800FFU); |
||||
psu_mask_write(0xFD0701B0, 0x00000007U, 0x00000000U); |
||||
psu_mask_write(0xFD0701B4, 0x00003F3FU, 0x00000000U); |
||||
psu_mask_write(0xFD0701C0, 0x00000007U, 0x00000000U); |
||||
psu_mask_write(0xFD070200, 0x0000001FU, 0x0000001FU); |
||||
psu_mask_write(0xFD070204, 0x001F1F1FU, 0x00080808U); |
||||
psu_mask_write(0xFD070208, 0x0F0F0F0FU, 0x00000000U); |
||||
psu_mask_write(0xFD07020C, 0x0F0F0F0FU, 0x00000000U); |
||||
psu_mask_write(0xFD070210, 0x00000F0FU, 0x00000F0FU); |
||||
psu_mask_write(0xFD070214, 0x0F0F0F0FU, 0x070F0707U); |
||||
psu_mask_write(0xFD070218, 0x8F0F0F0FU, 0x0F070707U); |
||||
psu_mask_write(0xFD07021C, 0x00000F0FU, 0x00000F0FU); |
||||
psu_mask_write(0xFD070220, 0x00001F1FU, 0x00000000U); |
||||
psu_mask_write(0xFD070224, 0x0F0F0F0FU, 0x07070707U); |
||||
psu_mask_write(0xFD070228, 0x0F0F0F0FU, 0x07070707U); |
||||
psu_mask_write(0xFD07022C, 0x0000000FU, 0x00000007U); |
||||
psu_mask_write(0xFD070240, 0x0F1F0F7CU, 0x06000604U); |
||||
psu_mask_write(0xFD070244, 0x00003333U, 0x00000001U); |
||||
psu_mask_write(0xFD070250, 0x7FFF3F07U, 0x01002001U); |
||||
psu_mask_write(0xFD070264, 0xFF00FFFFU, 0x08000040U); |
||||
psu_mask_write(0xFD07026C, 0xFF00FFFFU, 0x08000040U); |
||||
psu_mask_write(0xFD070280, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD070284, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD070288, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD07028C, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD070290, 0x0000FFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD070294, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD070300, 0x00000011U, 0x00000000U); |
||||
psu_mask_write(0xFD07030C, 0x80000033U, 0x00000000U); |
||||
psu_mask_write(0xFD070320, 0x00000001U, 0x00000000U); |
||||
psu_mask_write(0xFD070400, 0x00000111U, 0x00000001U); |
||||
psu_mask_write(0xFD070404, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070408, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070490, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD070494, 0x0033000FU, 0x0020000BU); |
||||
psu_mask_write(0xFD070498, 0x07FF07FFU, 0x00000000U); |
||||
psu_mask_write(0xFD0704B4, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD0704B8, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070540, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD070544, 0x03330F0FU, 0x02000B03U); |
||||
psu_mask_write(0xFD070548, 0x07FF07FFU, 0x00000000U); |
||||
psu_mask_write(0xFD070564, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070568, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD0705F0, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD0705F4, 0x03330F0FU, 0x02000B03U); |
||||
psu_mask_write(0xFD0705F8, 0x07FF07FFU, 0x00000000U); |
||||
psu_mask_write(0xFD070614, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070618, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD0706A0, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD0706A4, 0x0033000FU, 0x00100003U); |
||||
psu_mask_write(0xFD0706A8, 0x07FF07FFU, 0x0000004FU); |
||||
psu_mask_write(0xFD0706AC, 0x0033000FU, 0x00100003U); |
||||
psu_mask_write(0xFD0706B0, 0x000007FFU, 0x0000004FU); |
||||
psu_mask_write(0xFD0706C4, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD0706C8, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070750, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD070754, 0x0033000FU, 0x00100003U); |
||||
psu_mask_write(0xFD070758, 0x07FF07FFU, 0x0000004FU); |
||||
psu_mask_write(0xFD07075C, 0x0033000FU, 0x00100003U); |
||||
psu_mask_write(0xFD070760, 0x000007FFU, 0x0000004FU); |
||||
psu_mask_write(0xFD070774, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070778, 0x000073FFU, 0x0000200FU); |
||||
psu_mask_write(0xFD070800, 0x00000001U, 0x00000001U); |
||||
psu_mask_write(0xFD070804, 0x0033000FU, 0x00100003U); |
||||
psu_mask_write(0xFD070808, 0x07FF07FFU, 0x0000004FU); |
||||
psu_mask_write(0xFD07080C, 0x0033000FU, 0x00100003U); |
||||
psu_mask_write(0xFD070810, 0x000007FFU, 0x0000004FU); |
||||
psu_mask_write(0xFD070F04, 0x000001FFU, 0x00000000U); |
||||
psu_mask_write(0xFD070F08, 0x000000FFU, 0x00000000U); |
||||
psu_mask_write(0xFD070F0C, 0x000001FFU, 0x00000010U); |
||||
psu_mask_write(0xFD070F10, 0x000000FFU, 0x0000000FU); |
||||
psu_mask_write(0xFD072190, 0x1FBFBF3FU, 0x07828002U); |
||||
psu_mask_write(0xFD1A0108, 0x0000000CU, 0x00000000U); |
||||
psu_mask_write(0xFD080010, 0xFFFFFFFFU, 0x07001E00U); |
||||
psu_mask_write(0xFD080018, 0xFFFFFFFFU, 0x00F05D90U); |
||||
psu_mask_write(0xFD08001C, 0xFFFFFFFFU, 0x55AA5480U); |
||||
psu_mask_write(0xFD080024, 0xFFFFFFFFU, 0x010100F4U); |
||||
psu_mask_write(0xFD080040, 0xFFFFFFFFU, 0x1900C810U); |
||||
psu_mask_write(0xFD080044, 0xFFFFFFFFU, 0x4E200708U); |
||||
psu_mask_write(0xFD080068, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD080090, 0xFFFFFFFFU, 0x02A04061U); |
||||
psu_mask_write(0xFD0800C0, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD0800C4, 0xFFFFFFFFU, 0x000000DAU); |
||||
psu_mask_write(0xFD080100, 0xFFFFFFFFU, 0x0800040BU); |
||||
psu_mask_write(0xFD080110, 0xFFFFFFFFU, 0x040E0A04U); |
||||
psu_mask_write(0xFD080114, 0xFFFFFFFFU, 0x28100004U); |
||||
psu_mask_write(0xFD080118, 0xFFFFFFFFU, 0x000F0200U); |
||||
psu_mask_write(0xFD08011C, 0xFFFFFFFFU, 0x82000800U); |
||||
psu_mask_write(0xFD080120, 0xFFFFFFFFU, 0x00682B0AU); |
||||
psu_mask_write(0xFD080124, 0xFFFFFFFFU, 0x00152504U); |
||||
psu_mask_write(0xFD080128, 0xFFFFFFFFU, 0x00000506U); |
||||
psu_mask_write(0xFD080140, 0xFFFFFFFFU, 0x08400020U); |
||||
psu_mask_write(0xFD080144, 0xFFFFFFFFU, 0x00000C80U); |
||||
psu_mask_write(0xFD080150, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080154, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080180, 0xFFFFFFFFU, 0x00000520U); |
||||
psu_mask_write(0xFD080184, 0xFFFFFFFFU, 0x00000004U); |
||||
psu_mask_write(0xFD080188, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD08018C, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080190, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080194, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080198, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD0801AC, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD0801B0, 0xFFFFFFFFU, 0x0000004DU); |
||||
psu_mask_write(0xFD0801B4, 0xFFFFFFFFU, 0x00000008U); |
||||
psu_mask_write(0xFD0801B8, 0xFFFFFFFFU, 0x0000004DU); |
||||
psu_mask_write(0xFD0801D8, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080200, 0xFFFFFFFFU, 0x800081C7U); |
||||
psu_mask_write(0xFD080204, 0xFFFFFFFFU, 0x00010236U); |
||||
psu_mask_write(0xFD080240, 0xFFFFFFFFU, 0x00141054U); |
||||
psu_mask_write(0xFD080250, 0xFFFFFFFFU, 0x00088000U); |
||||
psu_mask_write(0xFD080414, 0xFFFFFFFFU, 0x12340800U); |
||||
psu_mask_write(0xFD0804F4, 0xFFFFFFFFU, 0x00000005U); |
||||
psu_mask_write(0xFD080500, 0xFFFFFFFFU, 0x30000028U); |
||||
psu_mask_write(0xFD080508, 0xFFFFFFFFU, 0x0A000000U); |
||||
psu_mask_write(0xFD08050C, 0xFFFFFFFFU, 0x00000009U); |
||||
psu_mask_write(0xFD080510, 0xFFFFFFFFU, 0x0A000000U); |
||||
psu_mask_write(0xFD080520, 0xFFFFFFFFU, 0x0300B0B0U); |
||||
psu_mask_write(0xFD080528, 0xFFFFFFFFU, 0xF1032019U); |
||||
psu_mask_write(0xFD08052C, 0xFFFFFFFFU, 0x07F001E3U); |
||||
psu_mask_write(0xFD080544, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080548, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080558, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD08055C, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080560, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080564, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080680, 0xFFFFFFFFU, 0x0088E858U); |
||||
psu_mask_write(0xFD080684, 0xFFFFFFFFU, 0x000077BBU); |
||||
psu_mask_write(0xFD080694, 0xFFFFFFFFU, 0x01E10210U); |
||||
psu_mask_write(0xFD080698, 0xFFFFFFFFU, 0x01E10000U); |
||||
psu_mask_write(0xFD0806A4, 0xFFFFFFFFU, 0x000076BBU); |
||||
psu_mask_write(0xFD080700, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080704, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD08070C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080710, 0xFFFFFFFFU, 0x0E00B00CU); |
||||
psu_mask_write(0xFD080714, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080718, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080800, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080804, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD08080C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080810, 0xFFFFFFFFU, 0x0E00B00CU); |
||||
psu_mask_write(0xFD080814, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080818, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080900, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080904, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD08090C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080910, 0xFFFFFFFFU, 0x0E00B00CU); |
||||
psu_mask_write(0xFD080914, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080918, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080A00, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080A04, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD080A0C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080A10, 0xFFFFFFFFU, 0x0E00B00CU); |
||||
psu_mask_write(0xFD080A14, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080A18, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080B00, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080B04, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD080B08, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080B0C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080B10, 0xFFFFFFFFU, 0x0E00B004U); |
||||
psu_mask_write(0xFD080B14, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080B18, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080C00, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080C04, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD080C08, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080C0C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080C10, 0xFFFFFFFFU, 0x0E00B00CU); |
||||
psu_mask_write(0xFD080C14, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080C18, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080D00, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080D04, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD080D08, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080D0C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080D10, 0xFFFFFFFFU, 0x0E00B004U); |
||||
psu_mask_write(0xFD080D14, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080D18, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080E00, 0xFFFFFFFFU, 0x40800604U); |
||||
psu_mask_write(0xFD080E04, 0xFFFFFFFFU, 0x00007FFFU); |
||||
psu_mask_write(0xFD080E08, 0xFFFFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFD080E0C, 0xFFFFFFFFU, 0x3F000008U); |
||||
psu_mask_write(0xFD080E10, 0xFFFFFFFFU, 0x0E00B00CU); |
||||
psu_mask_write(0xFD080E14, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080E18, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD080F00, 0xFFFFFFFFU, 0x40803660U); |
||||
psu_mask_write(0xFD080F04, 0xFFFFFFFFU, 0x55556000U); |
||||
psu_mask_write(0xFD080F08, 0xFFFFFFFFU, 0xAAAAAAAAU); |
||||
psu_mask_write(0xFD080F0C, 0xFFFFFFFFU, 0x0029A4A4U); |
||||
psu_mask_write(0xFD080F10, 0xFFFFFFFFU, 0x0C00B000U); |
||||
psu_mask_write(0xFD080F14, 0xFFFFFFFFU, 0x09093030U); |
||||
psu_mask_write(0xFD080F18, 0xFFFFFFFFU, 0x09092B2BU); |
||||
psu_mask_write(0xFD081400, 0xFFFFFFFFU, 0x2A019FFEU); |
||||
psu_mask_write(0xFD081404, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD08141C, 0xFFFFFFFFU, 0x01264300U); |
||||
psu_mask_write(0xFD08142C, 0xFFFFFFFFU, 0x00041800U); |
||||
psu_mask_write(0xFD081430, 0xFFFFFFFFU, 0x70000000U); |
||||
psu_mask_write(0xFD081440, 0xFFFFFFFFU, 0x2A019FFEU); |
||||
psu_mask_write(0xFD081444, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD08145C, 0xFFFFFFFFU, 0x01264300U); |
||||
psu_mask_write(0xFD08146C, 0xFFFFFFFFU, 0x00041800U); |
||||
psu_mask_write(0xFD081470, 0xFFFFFFFFU, 0x70000000U); |
||||
psu_mask_write(0xFD081480, 0xFFFFFFFFU, 0x2A019FFEU); |
||||
psu_mask_write(0xFD081484, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD08149C, 0xFFFFFFFFU, 0x01264300U); |
||||
psu_mask_write(0xFD0814AC, 0xFFFFFFFFU, 0x00041800U); |
||||
psu_mask_write(0xFD0814B0, 0xFFFFFFFFU, 0x70000000U); |
||||
psu_mask_write(0xFD0814C0, 0xFFFFFFFFU, 0x2A019FFEU); |
||||
psu_mask_write(0xFD0814C4, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD0814DC, 0xFFFFFFFFU, 0x01264300U); |
||||
psu_mask_write(0xFD0814EC, 0xFFFFFFFFU, 0x00041800U); |
||||
psu_mask_write(0xFD0814F0, 0xFFFFFFFFU, 0x70000000U); |
||||
psu_mask_write(0xFD081500, 0xFFFFFFFFU, 0x15019FFEU); |
||||
psu_mask_write(0xFD081504, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD08151C, 0xFFFFFFFFU, 0x01264300U); |
||||
psu_mask_write(0xFD08152C, 0xFFFFFFFFU, 0x00041800U); |
||||
psu_mask_write(0xFD081530, 0xFFFFFFFFU, 0x70000000U); |
||||
psu_mask_write(0xFD0817C4, 0xFFFFFFFFU, 0x06124000U); |
||||
psu_mask_write(0xFD0817DC, 0xFFFFFFFFU, 0x012643C4U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_mio_init_data(void) |
||||
{ |
||||
psu_mask_write(0xFF180000, 0x000000FEU, 0x00000002U); |
||||
psu_mask_write(0xFF180004, 0x000000FEU, 0x00000002U); |
||||
psu_mask_write(0xFF180010, 0x000000FEU, 0x00000002U); |
||||
psu_mask_write(0xFF180014, 0x000000FEU, 0x00000002U); |
||||
psu_mask_write(0xFF180018, 0x000000FEU, 0x00000002U); |
||||
psu_mask_write(0xFF180088, 0x000000FEU, 0x000000C0U); |
||||
psu_mask_write(0xFF18008C, 0x000000FEU, 0x000000C0U); |
||||
psu_mask_write(0xFF18009C, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800A0, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800A4, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800A8, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800AC, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800B0, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800B4, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800B8, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800BC, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800C0, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800C4, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800C8, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF1800CC, 0x000000FEU, 0x00000010U); |
||||
psu_mask_write(0xFF180204, 0x0000007FU, 0x00000002U); |
||||
psu_mask_write(0xFF180208, 0x000FFF8CU, 0x00003004U); |
||||
psu_mask_write(0xFF180138, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF18013C, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180140, 0x03FFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFF180144, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180148, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF18014C, 0x03FFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFF180154, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180158, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF18015C, 0x03FFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFF180160, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180164, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180168, 0x03FFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFF180170, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180174, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180178, 0x03FFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFF18017C, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180180, 0x03FFFFFFU, 0x03FFFFFFU); |
||||
psu_mask_write(0xFF180184, 0x03FFFFFFU, 0x00000000U); |
||||
psu_mask_write(0xFF180200, 0x0000000FU, 0x00000000U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_peripherals_pre_init_data(void) |
||||
{ |
||||
psu_mask_write(0xFF5E0108, 0x013F3F07U, 0x00012302U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_peripherals_init_data(void) |
||||
{ |
||||
psu_mask_write(0xFD1A0100, 0x0000807CU, 0x00000000U); |
||||
psu_mask_write(0xFF5E0238, 0x001A0000U, 0x00000000U); |
||||
psu_mask_write(0xFF5E023C, 0x0093C018U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0238, 0x00000001U, 0x00000000U); |
||||
psu_mask_write(0xFF180390, 0x00000004U, 0x00000004U); |
||||
psu_mask_write(0xFF5E0238, 0x00000040U, 0x00000000U); |
||||
psu_mask_write(0xFF180310, 0x00008000U, 0x00000000U); |
||||
psu_mask_write(0xFF180320, 0x33800000U, 0x02800000U); |
||||
psu_mask_write(0xFF18031C, 0x7FFE0000U, 0x64500000U); |
||||
psu_mask_write(0xFF180358, 0x00000008U, 0x00000008U); |
||||
psu_mask_write(0xFF180324, 0x03C00000U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0238, 0x00000200U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0238, 0x00008000U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0238, 0x00000800U, 0x00000000U); |
||||
psu_mask_write(0xFF5E0238, 0x00000002U, 0x00000000U); |
||||
psu_mask_write(0xFF000034, 0x000000FFU, 0x00000005U); |
||||
psu_mask_write(0xFF000018, 0x0000FFFFU, 0x0000008FU); |
||||
psu_mask_write(0xFF000000, 0x000001FFU, 0x00000017U); |
||||
psu_mask_write(0xFF000004, 0x000003FFU, 0x00000020U); |
||||
psu_mask_write(0xFF5E0238, 0x00040000U, 0x00000000U); |
||||
psu_mask_write(0xFF4B0024, 0x000000FFU, 0x000000FFU); |
||||
psu_mask_write(0xFFCA5000, 0x00001FFFU, 0x00000000U); |
||||
psu_mask_write(0xFD5C0060, 0x000F000FU, 0x00000000U); |
||||
psu_mask_write(0xFFA60040, 0x80000000U, 0x80000000U); |
||||
psu_mask_write(0xFF260020, 0xFFFFFFFFU, 0x01FC9F08U); |
||||
psu_mask_write(0xFF260000, 0x00000001U, 0x00000001U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_afi_config(void) |
||||
{ |
||||
psu_mask_write(0xFD1A0100, 0x00001F80U, 0x00000000U); |
||||
psu_mask_write(0xFF5E023C, 0x00080000U, 0x00000000U); |
||||
psu_mask_write(0xFD615000, 0x00000300U, 0x00000200U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static unsigned long psu_ddr_phybringup_data(void) |
||||
{ |
||||
unsigned int regval = 0; |
||||
unsigned int pll_retry = 10; |
||||
unsigned int pll_locked = 0; |
||||
|
||||
while ((pll_retry > 0) && (!pll_locked)) { |
||||
Xil_Out32(0xFD080004, 0x00040010); |
||||
Xil_Out32(0xFD080004, 0x00040011); |
||||
|
||||
while ((Xil_In32(0xFD080030) & 0x1) != 1) |
||||
; |
||||
|
||||
pll_locked = (Xil_In32(0xFD080030) & 0x80000000) >> 31; |
||||
pll_locked &= (Xil_In32(0xFD0807E0) & 0x10000) >> 16; |
||||
pll_locked &= (Xil_In32(0xFD0809E0) & 0x10000) >> 16; |
||||
pll_locked &= (Xil_In32(0xFD080BE0) & 0x10000) >> 16; |
||||
pll_locked &= (Xil_In32(0xFD080DE0) & 0x10000) >> 16; |
||||
pll_retry--; |
||||
} |
||||
Xil_Out32(0xFD0800C0, Xil_In32(0xFD0800C0) | (pll_retry << 16)); |
||||
Xil_Out32(0xFD080004U, 0x00040063U); |
||||
|
||||
while ((Xil_In32(0xFD080030U) & 0x0000000FU) != 0x0000000FU) |
||||
; |
||||
prog_reg(0xFD080004U, 0x00000001U, 0x00000000U, 0x00000001U); |
||||
|
||||
while ((Xil_In32(0xFD080030U) & 0x000000FFU) != 0x0000001FU) |
||||
; |
||||
Xil_Out32(0xFD0701B0U, 0x00000001U); |
||||
Xil_Out32(0xFD070320U, 0x00000001U); |
||||
while ((Xil_In32(0xFD070004U) & 0x0000000FU) != 0x00000001U) |
||||
; |
||||
prog_reg(0xFD080014U, 0x00000040U, 0x00000006U, 0x00000001U); |
||||
Xil_Out32(0xFD080004, 0x0004FE01); |
||||
regval = Xil_In32(0xFD080030); |
||||
while (regval != 0x80000FFF) |
||||
regval = Xil_In32(0xFD080030); |
||||
Xil_Out32(0xFD070180U, 0x00800020U); |
||||
Xil_Out32(0xFD070060U, 0x00000000U); |
||||
prog_reg(0xFD080014U, 0x00000040U, 0x00000006U, 0x00000000U); |
||||
|
||||
return 1; |
||||
} |
||||
|
||||
static void init_peripheral(void) |
||||
{ |
||||
psu_mask_write(0xFD5F0018, 0x8000001FU, 0x8000001FU); |
||||
} |
||||
|
||||
int psu_init(void) |
||||
{ |
||||
int status = 1; |
||||
|
||||
status &= psu_mio_init_data(); |
||||
status &= psu_peripherals_pre_init_data(); |
||||
status &= psu_pll_init_data(); |
||||
status &= psu_clock_init_data(); |
||||
status &= psu_ddr_init_data(); |
||||
status &= psu_ddr_phybringup_data(); |
||||
status &= psu_peripherals_init_data(); |
||||
init_peripheral(); |
||||
|
||||
status &= psu_afi_config(); |
||||
|
||||
if (status == 0) |
||||
return 1; |
||||
return 0; |
||||
} |
@ -0,0 +1,7 @@ |
||||
XILINX_ZYNQMP_R5 BOARDS |
||||
M: Michal Simek <michal.simek@xilinx.com> |
||||
S: Maintained |
||||
F: arch/arm/dts/zynqmp-r5* |
||||
F: board/xilinx/zynqmp_r5/ |
||||
F: include/configs/xilinx_zynqmp_r5_* |
||||
F: configs/xilinx_zynqmp_r5_* |
@ -0,0 +1,6 @@ |
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# (C) Copyright 2018 Xilinx, Inc. (Michal Simek)
|
||||
#
|
||||
|
||||
obj-y := board.o
|
@ -0,0 +1,25 @@ |
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* (C) Copyright 2018 Xilinx, Inc. (Michal Simek) |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <fdtdec.h> |
||||
|
||||
int board_init(void) |
||||
{ |
||||
return 0; |
||||
} |
||||
|
||||
int dram_init_banksize(void) |
||||
{ |
||||
return fdtdec_setup_memory_banksize(); |
||||
} |
||||
|
||||
int dram_init(void) |
||||
{ |
||||
if (fdtdec_setup_memory_size() != 0) |
||||
return -EINVAL; |
||||
|
||||
return 0; |
||||
} |
@ -0,0 +1,16 @@ |
||||
CONFIG_ARM=y |
||||
CONFIG_ARCH_ZYNQMP_R5=y |
||||
CONFIG_SYS_TEXT_BASE=0x10000000 |
||||
CONFIG_DEFAULT_DEVICE_TREE="zynqmp-r5" |
||||
CONFIG_DEBUG_UART=y |
||||
# CONFIG_DISPLAY_CPUINFO is not set |
||||
CONFIG_SYS_PROMPT="ZynqMP r5> " |
||||
# CONFIG_CMD_FLASH is not set |
||||
# CONFIG_CMD_SETEXPR is not set |
||||
CONFIG_OF_EMBED=y |
||||
CONFIG_DEBUG_UART_ZYNQ=y |
||||
CONFIG_DEBUG_UART_BASE=0xff010000 |
||||
CONFIG_DEBUG_UART_CLOCK=100000000 |
||||
CONFIG_ZYNQ_SERIAL=y |
||||
CONFIG_TIMER=y |
||||
CONFIG_CADENCE_TTC_TIMER=y |
@ -0,0 +1,53 @@ |
||||
CONFIG_ARM=y |
||||
CONFIG_SYS_CONFIG_NAME="xilinx_zynqmp_zc1275_revB" |
||||
CONFIG_ARCH_ZYNQMP=y |
||||
CONFIG_SYS_TEXT_BASE=0x8000000 |
||||
CONFIG_SYS_MALLOC_F_LEN=0x8000 |
||||
# CONFIG_SPL_LIBDISK_SUPPORT is not set |
||||
CONFIG_SPL=y |
||||
# CONFIG_SPL_FAT_SUPPORT is not set |
||||
CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zc1275-revB" |
||||
CONFIG_DEBUG_UART=y |
||||
CONFIG_DISTRO_DEFAULTS=y |
||||
CONFIG_FIT=y |
||||
CONFIG_FIT_VERBOSE=y |
||||
CONFIG_SPL_LOAD_FIT=y |
||||
# CONFIG_DISPLAY_CPUINFO is not set |
||||
CONFIG_SPL_OS_BOOT=y |
||||
CONFIG_SPL_RAM_SUPPORT=y |
||||
CONFIG_SPL_RAM_DEVICE=y |
||||
CONFIG_SPL_ATF=y |
||||
CONFIG_SYS_PROMPT="ZynqMP> " |
||||
CONFIG_CMD_MEMTEST=y |
||||
CONFIG_CMD_CLK=y |
||||
# CONFIG_CMD_FLASH is not set |
||||
CONFIG_CMD_FPGA_LOADBP=y |
||||
CONFIG_CMD_FPGA_LOADP=y |
||||
CONFIG_CMD_MMC=y |
||||
# CONFIG_CMD_NET is not set |
||||
CONFIG_CMD_TIME=y |
||||
CONFIG_CMD_TIMER=y |
||||
CONFIG_SPL_OF_CONTROL=y |
||||
CONFIG_OF_EMBED=y |
||||
CONFIG_SPL_DM=y |
||||
CONFIG_CLK_ZYNQMP=y |
||||
CONFIG_FPGA_XILINX=y |
||||
CONFIG_FPGA_ZYNQMPPL=y |
||||
CONFIG_MISC=y |
||||
CONFIG_DM_MMC=y |
||||
CONFIG_MMC_SDHCI=y |
||||
CONFIG_MMC_SDHCI_ZYNQ=y |
||||
CONFIG_SPI_FLASH=y |
||||
CONFIG_SPI_FLASH_BAR=y |
||||
CONFIG_SF_DUAL_FLASH=y |
||||
CONFIG_SPI_FLASH_MACRONIX=y |
||||
CONFIG_SPI_FLASH_SPANSION=y |
||||
CONFIG_SPI_FLASH_STMICRO=y |
||||
CONFIG_SPI_FLASH_WINBOND=y |
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set |
||||
CONFIG_DEBUG_UART_ZYNQ=y |
||||
CONFIG_DEBUG_UART_BASE=0xff000000 |
||||
CONFIG_DEBUG_UART_CLOCK=100000000 |
||||
CONFIG_DEBUG_UART_ANNOUNCE=y |
||||
CONFIG_ZYNQ_SERIAL=y |
||||
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y |
@ -0,0 +1,91 @@ |
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (C) 2018 Xilinx, Inc. (Michal Simek) |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <dm.h> |
||||
#include <errno.h> |
||||
#include <timer.h> |
||||
#include <asm/io.h> |
||||
|
||||
#define CNT_CNTRL_RESET BIT(4) |
||||
|
||||
struct cadence_ttc_regs { |
||||
u32 clk_cntrl1; /* 0x0 - Clock Control 1 */ |
||||
u32 clk_cntrl2; /* 0x4 - Clock Control 2 */ |
||||
u32 clk_cntrl3; /* 0x8 - Clock Control 3 */ |
||||
u32 counter_cntrl1; /* 0xC - Counter Control 1 */ |
||||
u32 counter_cntrl2; /* 0x10 - Counter Control 2 */ |
||||
u32 counter_cntrl3; /* 0x14 - Counter Control 3 */ |
||||
u32 counter_val1; /* 0x18 - Counter Control 1 */ |
||||
u32 counter_val2; /* 0x1C - Counter Control 2 */ |
||||
u32 counter_val3; /* 0x20 - Counter Control 3 */ |
||||
u32 reserved[15]; |
||||
u32 interrupt_enable1; /* 0x60 - Interrupt Enable 1 */ |
||||
u32 interrupt_enable2; /* 0x64 - Interrupt Enable 2 */ |
||||
u32 interrupt_enable3; /* 0x68 - Interrupt Enable 3 */ |
||||
}; |
||||
|
||||
struct cadence_ttc_priv { |
||||
struct cadence_ttc_regs *regs; |
||||
}; |
||||
|
||||
static int cadence_ttc_get_count(struct udevice *dev, u64 *count) |
||||
{ |
||||
struct cadence_ttc_priv *priv = dev_get_priv(dev); |
||||
|
||||
*count = readl(&priv->regs->counter_val1); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
static int cadence_ttc_probe(struct udevice *dev) |
||||
{ |
||||
struct cadence_ttc_priv *priv = dev_get_priv(dev); |
||||
|
||||
/* Disable interrupts for sure */ |
||||
writel(0, &priv->regs->interrupt_enable1); |
||||
writel(0, &priv->regs->interrupt_enable2); |
||||
writel(0, &priv->regs->interrupt_enable3); |
||||
|
||||
/* Make sure that clocks are configured properly without prescaller */ |
||||
writel(0, &priv->regs->clk_cntrl1); |
||||
writel(0, &priv->regs->clk_cntrl2); |
||||
writel(0, &priv->regs->clk_cntrl3); |
||||
|
||||
/* Reset and enable this counter */ |
||||
writel(CNT_CNTRL_RESET, &priv->regs->counter_cntrl1); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
static int cadence_ttc_ofdata_to_platdata(struct udevice *dev) |
||||
{ |
||||
struct cadence_ttc_priv *priv = dev_get_priv(dev); |
||||
|
||||
priv->regs = map_physmem(devfdt_get_addr(dev), |
||||
sizeof(struct cadence_ttc_regs), MAP_NOCACHE); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
static const struct timer_ops cadence_ttc_ops = { |
||||
.get_count = cadence_ttc_get_count, |
||||
}; |
||||
|
||||
static const struct udevice_id cadence_ttc_ids[] = { |
||||
{ .compatible = "cdns,ttc" }, |
||||
{} |
||||
}; |
||||
|
||||
U_BOOT_DRIVER(cadence_ttc) = { |
||||
.name = "cadence_ttc", |
||||
.id = UCLASS_TIMER, |
||||
.of_match = cadence_ttc_ids, |
||||
.ofdata_to_platdata = cadence_ttc_ofdata_to_platdata, |
||||
.priv_auto_alloc_size = sizeof(struct cadence_ttc_priv), |
||||
.probe = cadence_ttc_probe, |
||||
.ops = &cadence_ttc_ops, |
||||
.flags = DM_FLAG_PRE_RELOC, |
||||
}; |
@ -0,0 +1,51 @@ |
||||
/* SPDX-License-Identifier: GPL-2.0 */ |
||||
/*
|
||||
* (C) Copyright 2018 Xilinx, Inc. (Michal Simek) |
||||
*/ |
||||
|
||||
#ifndef __CONFIG_ZYNQMP_R5_H |
||||
#define __CONFIG_ZYNQMP_R5_H |
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS |
||||
|
||||
/* CPU clock */ |
||||
#define CONFIG_CPU_FREQ_HZ 500000000 |
||||
|
||||
/* Serial drivers */ |
||||
/* The following table includes the supported baudrates */ |
||||
#define CONFIG_SYS_BAUDRATE_TABLE \ |
||||
{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} |
||||
|
||||
# define CONFIG_ENV_SIZE (128 << 10) |
||||
|
||||
/* Allow to overwrite serial and ethaddr */ |
||||
#define CONFIG_ENV_OVERWRITE |
||||
|
||||
/* Boot configuration */ |
||||
#define CONFIG_SYS_LOAD_ADDR 0 /* default? */ |
||||
|
||||
#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ |
||||
|
||||
#define CONFIG_NR_DRAM_BANKS 1 |
||||
|
||||
#define CONFIG_SYS_MALLOC_LEN 0x1400000 |
||||
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR 0xFFFF0000 |
||||
#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 |
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ |
||||
CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE) |
||||
|
||||
/* Extend size of kernel image for uncompression */ |
||||
#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) |
||||
|
||||
#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE |
||||
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT |
||||
|
||||
/* 0x0 - 0x40 is used for placing exception vectors */ |
||||
#define CONFIG_SYS_MEMTEST_START 0x40 |
||||
#define CONFIG_SYS_MEMTEST_END 0x100 |
||||
#define CONFIG_SYS_MEMTEST_SCRATCH 0 |
||||
|
||||
#endif /* __CONFIG_ZYNQ_ZYNQMP_R5_H */ |
@ -0,0 +1,16 @@ |
||||
/*
|
||||
* Configuration for Xilinx ZynqMP zc1275 RevB |
||||
* |
||||
* (C) Copyright 2018 Xilinx, Inc. |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#ifndef __CONFIG_ZYNQMP_ZC1275_REVB_H |
||||
#define __CONFIG_ZYNQMP_ZC1275_REVB_H |
||||
|
||||
#define CONFIG_ZYNQ_SDHCI1 |
||||
|
||||
#include <configs/xilinx_zynqmp.h> |
||||
|
||||
#endif /* __CONFIG_ZYNQMP_ZC1275_REVB_H */ |
@ -0,0 +1,19 @@ |
||||
/* SPDX-License-Identifier: GPL-2.0 */ |
||||
/*
|
||||
* Xilinx ZynqMP SoC Tap Delay Programming |
||||
* |
||||
* Copyright (C) 2018 Xilinx, Inc. |
||||
*/ |
||||
|
||||
#ifndef __ZYNQMP_TAP_DELAY_H__ |
||||
#define __ZYNQMP_TAP_DELAY_H__ |
||||
|
||||
#ifdef CONFIG_ARCH_ZYNQMP |
||||
void zynqmp_dll_reset(u8 deviceid); |
||||
void arasan_zynqmp_set_tapdelay(u8 device_id, u8 uhsmode, u8 bank); |
||||
#else |
||||
inline void zynqmp_dll_reset(u8 deviceid) {} |
||||
inline void arasan_zynqmp_set_tapdelay(u8 device_id, u8 uhsmode, u8 bank) {} |
||||
#endif |
||||
|
||||
#endif |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,139 @@ |
||||
/*
|
||||
* Copyright (C) 2016 Michal Simek <michals@xilinx.com> |
||||
* Copyright (C) 2015 Nathan Rossi <nathan@nathanrossi.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
* |
||||
* The following Boot Header format/structures and values are defined in the |
||||
* following documents: |
||||
* * ug1085 ZynqMP TRM doc v1.4 (Chapter 11, Table 11-4) |
||||
* * ug1137 ZynqMP Software Developer Guide v6.0 (Chapter 16) |
||||
*/ |
||||
|
||||
#ifndef _ZYNQMPIMAGE_H_ |
||||
#define _ZYNQMPIMAGE_H_ |
||||
|
||||
#include <stdint.h> |
||||
|
||||
#define HEADER_INTERRUPT_DEFAULT (cpu_to_le32(0xeafffffe)) |
||||
#define HEADER_REGINIT_NULL (cpu_to_le32(0xffffffff)) |
||||
#define HEADER_WIDTHDETECTION (cpu_to_le32(0xaa995566)) |
||||
#define HEADER_IMAGEIDENTIFIER (cpu_to_le32(0x584c4e58)) |
||||
#define HEADER_CPU_SELECT_MASK (0x3 << 10) |
||||
#define HEADER_CPU_SELECT_R5_SINGLE (0x0 << 10) |
||||
#define HEADER_CPU_SELECT_A53_32BIT (0x1 << 10) |
||||
#define HEADER_CPU_SELECT_A53_64BIT (0x2 << 10) |
||||
#define HEADER_CPU_SELECT_R5_DUAL (0x3 << 10) |
||||
|
||||
enum { |
||||
ENCRYPTION_EFUSE = 0xa5c3c5a3, |
||||
ENCRYPTION_OEFUSE = 0xa5c3c5a7, |
||||
ENCRYPTION_BBRAM = 0x3a5c3c5a, |
||||
ENCRYPTION_OBBRAM = 0xa35c7ca5, |
||||
ENCRYPTION_NONE = 0x0, |
||||
}; |
||||
|
||||
struct zynqmp_reginit { |
||||
uint32_t address; |
||||
uint32_t data; |
||||
}; |
||||
|
||||
#define HEADER_INTERRUPT_VECTORS 8 |
||||
#define HEADER_REGINITS 256 |
||||
|
||||
struct image_header_table { |
||||
uint32_t version; /* 0x00 */ |
||||
uint32_t nr_parts; /* 0x04 */ |
||||
uint32_t partition_header_offset; /* 0x08, divided by 4 */ |
||||
uint32_t image_header_offset; /* 0x0c, divided by 4 */ |
||||
uint32_t auth_certificate_offset; /* 0x10 */ |
||||
uint32_t boot_device; /* 0x14 */ |
||||
uint32_t __reserved1[9]; /* 0x18 - 0x38 */ |
||||
uint32_t checksum; /* 0x3c */ |
||||
}; |
||||
|
||||
#define PART_ATTR_VEC_LOCATION 0x800000 |
||||
#define PART_ATTR_BS_BLOCK_SIZE_MASK 0x700000 |
||||
#define PART_ATTR_BS_BLOCK_SIZE_DEFAULT 0x000000 |
||||
#define PART_ATTR_BS_BLOCK_SIZE_8MB 0x400000 |
||||
#define PART_ATTR_BIG_ENDIAN 0x040000 |
||||
#define PART_ATTR_PART_OWNER_MASK 0x030000 |
||||
#define PART_ATTR_PART_OWNER_FSBL 0x000000 |
||||
#define PART_ATTR_PART_OWNER_UBOOT 0x010000 |
||||
#define PART_ATTR_RSA_SIG 0x008000 |
||||
#define PART_ATTR_CHECKSUM_MASK 0x007000 |
||||
#define PART_ATTR_CHECKSUM_NONE 0x000000 |
||||
#define PART_ATTR_CHECKSUM_MD5 0x001000 |
||||
#define PART_ATTR_CHECKSUM_SHA2 0x002000 |
||||
#define PART_ATTR_CHECKSUM_SHA3 0x003000 |
||||
#define PART_ATTR_DEST_CPU_SHIFT 8 |
||||
#define PART_ATTR_DEST_CPU_MASK 0x000f00 |
||||
#define PART_ATTR_DEST_CPU_NONE 0x000000 |
||||
#define PART_ATTR_DEST_CPU_A53_0 0x000100 |
||||
#define PART_ATTR_DEST_CPU_A53_1 0x000200 |
||||
#define PART_ATTR_DEST_CPU_A53_2 0x000300 |
||||
#define PART_ATTR_DEST_CPU_A53_3 0x000400 |
||||
#define PART_ATTR_DEST_CPU_R5_0 0x000500 |
||||
#define PART_ATTR_DEST_CPU_R5_1 0x000600 |
||||
#define PART_ATTR_DEST_CPU_R5_L 0x000700 |
||||
#define PART_ATTR_DEST_CPU_PMU 0x000800 |
||||
#define PART_ATTR_ENCRYPTED 0x000080 |
||||
#define PART_ATTR_DEST_DEVICE_SHIFT 4 |
||||
#define PART_ATTR_DEST_DEVICE_MASK 0x000070 |
||||
#define PART_ATTR_DEST_DEVICE_NONE 0x000000 |
||||
#define PART_ATTR_DEST_DEVICE_PS 0x000010 |
||||
#define PART_ATTR_DEST_DEVICE_PL 0x000020 |
||||
#define PART_ATTR_DEST_DEVICE_PMU 0x000030 |
||||
#define PART_ATTR_DEST_DEVICE_XIP 0x000040 |
||||
#define PART_ATTR_A53_EXEC_AARCH32 0x000008 |
||||
#define PART_ATTR_TARGET_EL_SHIFT 1 |
||||
#define PART_ATTR_TARGET_EL_MASK 0x000006 |
||||
#define PART_ATTR_TZ_SECURE 0x000001 |
||||
|
||||
static const char *dest_cpus[0x10] = { |
||||
"none", "a5x-0", "a5x-1", "a5x-2", "a5x-3", "r5-0", "r5-1", |
||||
"r5-lockstep", "pmu", "unknown", "unknown", "unknown", "unknown", |
||||
"unknown", "unknown", "unknown" |
||||
}; |
||||
|
||||
struct partition_header { |
||||
uint32_t len_enc; /* 0x00, divided by 4 */ |
||||
uint32_t len_unenc; /* 0x04, divided by 4 */ |
||||
uint32_t len; /* 0x08, divided by 4 */ |
||||
uint32_t next_partition_offset; /* 0x0c */ |
||||
uint64_t entry_point; /* 0x10 */ |
||||
uint64_t load_address; /* 0x18 */ |
||||
uint32_t offset; /* 0x20, divided by 4 */ |
||||
uint32_t attributes; /* 0x24 */ |
||||
uint32_t __reserved1; /* 0x28 */ |
||||
uint32_t checksum_offset; /* 0x2c, divided by 4 */ |
||||
uint32_t __reserved2; /* 0x30 */ |
||||
uint32_t auth_certificate_offset; /* 0x34 */ |
||||
uint32_t __reserved3; /* 0x38 */ |
||||
uint32_t checksum; /* 0x3c */ |
||||
}; |
||||
|
||||
struct zynqmp_header { |
||||
uint32_t interrupt_vectors[HEADER_INTERRUPT_VECTORS]; /* 0x0 */ |
||||
uint32_t width_detection; /* 0x20 */ |
||||
uint32_t image_identifier; /* 0x24 */ |
||||
uint32_t encryption; /* 0x28 */ |
||||
uint32_t image_load; /* 0x2c */ |
||||
uint32_t image_offset; /* 0x30 */ |
||||
uint32_t pfw_image_length; /* 0x34 */ |
||||
uint32_t total_pfw_image_length; /* 0x38 */ |
||||
uint32_t image_size; /* 0x3c */ |
||||
uint32_t image_stored_size; /* 0x40 */ |
||||
uint32_t image_attributes; /* 0x44 */ |
||||
uint32_t checksum; /* 0x48 */ |
||||
uint32_t __reserved1[19]; /* 0x4c */ |
||||
uint32_t image_header_table_offset; /* 0x98 */ |
||||
uint32_t __reserved2[7]; /* 0x9c */ |
||||
struct zynqmp_reginit register_init[HEADER_REGINITS]; /* 0xb8 */ |
||||
uint32_t __reserved4[66]; /* 0x9c0 */ |
||||
}; |
||||
|
||||
void zynqmpimage_default_header(struct zynqmp_header *ptr); |
||||
void zynqmpimage_print_header(const void *ptr); |
||||
|
||||
#endif /* _ZYNQMPIMAGE_H_ */ |
Loading…
Reference in new issue