Skip to content

Commit

Permalink
Merge git://git.denx.de/u-boot-microblaze
Browse files Browse the repository at this point in the history
Xilinx changes for v2018.11-rc2-v2

FPGA:
- Fix SPL fpga loading from FIT

ARM64:
- Fix gic accesses in EL2/EL1

Xilinx:
- Add dlc20 board support
- Add Versal board support
- Sync defconfigs
- Enable MP via Kconfig
- Add missing efuse node
- Enable CDC for zcu100

cmd:
- Fix kgdb Kconfig dependency
  • Loading branch information
trini committed Oct 16, 2018
2 parents 2364b70 + b920550 commit d0423c4
Show file tree
Hide file tree
Showing 56 changed files with 1,052 additions and 57 deletions.
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ config SYS_MALLOC_F_LEN

config SYS_MALLOC_LEN
hex "Define memory for Dynamic allocation"
depends on ARCH_ZYNQ
depends on ARCH_ZYNQ || ARCH_VERSAL
help
This defines memory to be allocated for Dynamic allocation
TODO: Use for other architectures
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ F: arch/arm/mach-uniphier/
F: configs/uniphier_*_defconfig
N: uniphier

ARM VERSAL
M: Michal Simek <[email protected]>
S: Maintained
T: git git://git.denx.de/u-boot-microblaze.git
F: arch/arm/mach-versal/

ARM VERSATILE EXPRESS DRIVERS
M: Liviu Dudau <[email protected]>
S: Maintained
Expand Down
11 changes: 11 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,14 @@ config ARCH_SUNXI
imply SPL_SERIAL_SUPPORT
imply USB_GADGET

config ARCH_VERSAL
bool "Support Xilinx Versal Platform"
select ARM64
select CLK
select DM
select DM_SERIAL
select OF_CONTROL

config ARCH_VF610
bool "Freescale Vybrid"
select CPU_V7A
Expand Down Expand Up @@ -911,6 +919,7 @@ config ARCH_ZYNQMP
imply BOARD_LATE_INIT
imply CMD_DM
imply FAT_WRITE
imply MP

config TEGRA
bool "NVIDIA Tegra"
Expand Down Expand Up @@ -1449,6 +1458,8 @@ source "arch/arm/cpu/armv7/vf610/Kconfig"

source "arch/arm/mach-zynq/Kconfig"

source "arch/arm/mach-versal/Kconfig"

source "arch/arm/mach-zynqmp-r5/Kconfig"

source "arch/arm/cpu/armv7/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ machine-$(CONFIG_ARCH_STM32MP) += stm32mp
machine-$(CONFIG_TEGRA) += tegra
machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
machine-$(CONFIG_ARCH_ZYNQ) += zynq
machine-$(CONFIG_ARCH_VERSAL) += versal
machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5

machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
Expand Down
12 changes: 10 additions & 2 deletions arch/arm/cpu/armv8/zynqmp/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,19 @@ u64 get_page_table_size(void)
return 0x14000;
}

#if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
void tcm_init(u8 mode)
{
puts("WARNING: Initializing TCM overwrites TCM content\n");
initialize_tcm(mode);
memset((void *)ZYNQMP_TCM_BASE_ADDR, 0, ZYNQMP_TCM_SIZE);
}
#endif

#ifdef CONFIG_SYS_MEM_RSVD_FOR_MMU
int reserve_mmu(void)
{
initialize_tcm(TCM_LOCK);
memset((void *)ZYNQMP_TCM_BASE_ADDR, 0, ZYNQMP_TCM_SIZE);
tcm_init(TCM_LOCK);
gd->arch.tlb_size = PGTABLE_SIZE;
gd->arch.tlb_addr = ZYNQMP_TCM_BASE_ADDR;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
zynq-cse-nand.dtb \
zynq-cse-nor.dtb \
zynq-cse-qspi-single.dtb \
zynq-dlc20-rev1.0.dtb \
zynq-microzed.dtb \
zynq-minized.dtb \
zynq-picozed.dtb \
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/dts/zynq-7000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@
syscon = <&slcr>;
};

efuse: efuse@f800d000 {
compatible = "xlnx,zynq-efuse";
reg = <0xf800d000 0x20>;
};

global_timer: timer@f8f00200 {
compatible = "arm,cortex-a9-global-timer";
reg = <0xf8f00200 0x20>;
Expand Down
103 changes: 103 additions & 0 deletions arch/arm/dts/zynq-dlc20-rev1.0.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2018 Xilinx, Inc.
*
* Michal Simek <[email protected]>
*/
/dts-v1/;
#include "zynq-7000.dtsi"

/ {
model = "Zynq DLC20 Rev1.0";
compatible = "xlnx,zynq-dlc20-rev1.0", "xlnx,zynq-dlc20",
"xlnx,zynq-7000";

aliases {
ethernet0 = &gem0;
i2c0 = &i2c0;
serial0 = &uart1;
spi0 = &qspi;
mmc0 = &sdhci0;
};

memory@0 {
device_type = "memory";
reg = <0x0 0x20000000>;
};

chosen {
bootargs = "earlyprintk";
stdout-path = "serial0:115200n8";
};

usb_phy0: phy0@e0002000 {
compatible = "ulpi-phy";
#phy-cells = <0>;
reg = <0xe0002000 0x1000>;
view-port = <0x0170>;
drv-vbus;
};
};

&clkc {
ps-clk-frequency = <33333333>; /* U7 */
};

&gem0 {
status = "okay"; /* MIO16-MIO27, MDIO MIO52/53 */
phy-mode = "rgmii-id";
phy-handle = <&ethernet_phy>;

ethernet_phy: ethernet-phy@7 { /* rtl8211e - U25 */
reg = <1>;
};
};

&i2c0 {
status = "okay"; /* MIO14/15 */
clock-frequency = <400000>;
/* U46 - m24c08 */
eeprom: eeprom@54 {
compatible = "atmel,24c08";
reg = <0x54>;
};
};

&qspi {
u-boot,dm-pre-reloc;
status = "okay";
is-dual = <0>;
num-cs = <1>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
flash@0 {
/* Rev1.0 W25Q128FWSIG, RevC N25Q128A */
compatible = "n25q128a11", "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
spi-max-frequency = <50000000>;
};
};

&sdhci0 {
u-boot,dm-pre-reloc;
status = "okay"; /* EMMC MTFC4GACAJCN - MIO40-MIO45 */
non-removable;
bus-width = <4>;
};

&uart1 {
u-boot,dm-pre-reloc;
status = "okay"; /* MIO8/9 */
};

&usb0 {
status = "okay"; /* MIO28-MIO39 */
dr_mode = "device";
usb-phy = <&usb_phy0>;
};

&watchdog0 {
reset-on-timeout;
};
3 changes: 3 additions & 0 deletions arch/arm/include/asm/arch-zynqmp/sys_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@ int invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,
void initialize_tcm(bool mode);
void mem_map_fill(void);
int chip_id(unsigned char id);
#if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
void tcm_init(u8 mode);
#endif

#endif /* _ASM_ARCH_SYS_PROTO_H */
16 changes: 9 additions & 7 deletions arch/arm/lib/gic_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -107,26 +107,28 @@ ENTRY(gic_init_secure_percpu)
mov w11, #0x1 /* Enable SGI 0 */
str w11, [x10, GICR_ISENABLERn]

switch_el x10, 3f, 2f, 1f
3:
/* Initialize Cpu Interface */
mrs x10, ICC_SRE_EL3
orr x10, x10, #0xf /* SRE & Disable IRQ/FIQ Bypass & */
/* Allow EL2 access to ICC_SRE_EL2 */
msr ICC_SRE_EL3, x10
isb

mrs x10, ICC_SRE_EL2
orr x10, x10, #0xf /* SRE & Disable IRQ/FIQ Bypass & */
/* Allow EL1 access to ICC_SRE_EL1 */
msr ICC_SRE_EL2, x10
isb

mov x10, #0x3 /* EnableGrp1NS | EnableGrp1S */
msr ICC_IGRPEN1_EL3, x10
isb

msr ICC_CTLR_EL3, xzr
isb

2:
mrs x10, ICC_SRE_EL2
orr x10, x10, #0xf /* SRE & Disable IRQ/FIQ Bypass & */
/* Allow EL1 access to ICC_SRE_EL1 */
msr ICC_SRE_EL2, x10
isb
1:
msr ICC_CTLR_EL1, xzr /* NonSecure ICC_CTLR_EL1 */
isb

Expand Down
44 changes: 44 additions & 0 deletions arch/arm/mach-versal/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-License-Identifier: GPL-2.0+

if ARCH_VERSAL

config SYS_BOARD
string "Board name"
default "versal"

config SYS_VENDOR
string "Vendor name"
default "xilinx"

config SYS_SOC
default "versal"

config SYS_CONFIG_NAME
string "Board configuration name"
default "xilinx_versal"
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 GICV3
def_bool y

config SYS_MALLOC_LEN
default 0x2000000

config COUNTER_FREQUENCY
int "Timer clock frequency"
default 0
help
Setup time clock frequency for certain platform

config ZYNQ_SDHCI_MAX_FREQ
default 200000000

config VERSAL_OF_BOARD_DTB_ADDR
hex
default 0x1000
depends on OF_BOARD

endif
8 changes: 8 additions & 0 deletions arch/arm/mach-versal/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2016 - 2018 Xilinx, Inc.
# Michal Simek <[email protected]>
#

obj-y += clk.o
obj-y += cpu.o
30 changes: 30 additions & 0 deletions arch/arm/mach-versal/clk.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2016 - 2018 Xilinx, Inc.
* Michal Simek <[email protected]>
*/

#include <common.h>

DECLARE_GLOBAL_DATA_PTR;

#ifdef CONFIG_CLOCKS
/**
* set_cpu_clk_info - Initialize clock framework
*
* Return: 0 always.
*
* This function is called from common code after relocation and sets up the
* clock framework. The framework must not be used before this function had been
* called.
*/
int set_cpu_clk_info(void)
{
gd->cpu_clk = get_tbclk();

gd->bd->bi_arm_freq = gd->cpu_clk / 1000000;
gd->bd->bi_dsp_freq = 0;

return 0;
}
#endif
Loading

0 comments on commit d0423c4

Please sign in to comment.