summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/mnt-reform/Makefile2
-rw-r--r--arch/arm/boards/mnt-reform/board.c40
-rw-r--r--arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg6
-rw-r--r--arch/arm/boards/mnt-reform/lowlevel.c187
-rw-r--r--arch/arm/boards/mnt-reform/lpddr4-timing.c1012
-rw-r--r--arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c2
-rw-r--r--arch/arm/boards/qemu-virt/.gitignore1
-rw-r--r--arch/arm/boards/qemu-virt/Makefile1
-rw-r--r--arch/arm/boards/qemu-virt/board.c34
-rw-r--r--arch/arm/boards/qemu-virt/overlay-of-flash.dts97
-rw-r--r--arch/arm/configs/vexpress_defconfig1
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/imx8mq-mnt-reform2.dts223
-rw-r--r--arch/arm/dts/imx8mq.dtsi8
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c18
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c26
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c16
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c16
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c16
-rw-r--r--arch/arm/mach-at91/at91sam9_reset.S10
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c16
-rw-r--r--arch/arm/mach-at91/at91sam9n12_devices.c16
-rw-r--r--arch/arm/mach-at91/at91sam9x5_devices.c16
-rw-r--r--arch/arm/mach-at91/clock.c16
-rw-r--r--arch/arm/mach-at91/clock.h10
-rw-r--r--arch/arm/mach-at91/ddramc_ll.c6
-rw-r--r--arch/arm/mach-at91/generic.h13
-rw-r--r--arch/arm/mach-at91/include/mach/at91_dbgu.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pio.h16
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pit.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pmc.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91_rstc.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91_rtt.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200_emac.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200_mc.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200_st.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260_matrix.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261_matrix.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263_matrix.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_sdramc.h14
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_smc.h12
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9g45.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9n12.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9x5.h10
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h10
-rw-r--r--arch/arm/mach-at91/include/mach/atmel_hlcdc.h21
-rw-r--r--arch/arm/mach-at91/include/mach/board.h20
-rw-r--r--arch/arm/mach-at91/include/mach/cpu.h17
-rw-r--r--arch/arm/mach-at91/include/mach/ddramc.h6
-rw-r--r--arch/arm/mach-at91/include/mach/hardware.h17
-rw-r--r--arch/arm/mach-at91/include/mach/iomux.h15
-rw-r--r--arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h2
-rw-r--r--arch/arm/mach-at91/include/mach/sama5d2_ll.h2
-rw-r--r--arch/arm/mach-at91/sam9_smc.c13
-rw-r--r--arch/arm/mach-at91/sama5d2_ll.c2
-rw-r--r--arch/arm/mach-at91/sama5d3_devices.c16
-rw-r--r--arch/arm/mach-at91/sama5d4_devices.c15
-rw-r--r--arch/arm/mach-imx/Kconfig9
-rw-r--r--arch/arm/mach-imx/include/mach/imx7-ccm-regs.h4
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-mx8mq.h17
-rw-r--r--arch/arm/mach-vexpress/Kconfig1
-rw-r--r--arch/mips/dts/ar9331-dptechnics-dpt-module.dts2
-rw-r--r--arch/mips/dts/ar9331-okud-max9331.dts2
-rw-r--r--arch/mips/dts/ar9331-openembed-som9331-board.dts2
71 files changed, 1838 insertions, 426 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 81c228efd6..f8cdd90ed6 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -178,3 +178,4 @@ obj-$(CONFIG_MACH_ZII_IMX7D_DEV) += zii-imx7d-dev/
obj-$(CONFIG_MACH_WAGO_PFC_AM35XX) += wago-pfc-am35xx/
obj-$(CONFIG_MACH_LS1046ARDB) += ls1046ardb/
obj-$(CONFIG_MACH_TQMLS1046A) += tqmls1046a/
+obj-$(CONFIG_MACH_MNT_REFORM) += mnt-reform/
diff --git a/arch/arm/boards/mnt-reform/Makefile b/arch/arm/boards/mnt-reform/Makefile
new file mode 100644
index 0000000000..a3da88fbe6
--- /dev/null
+++ b/arch/arm/boards/mnt-reform/Makefile
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o lpddr4-timing.o \ No newline at end of file
diff --git a/arch/arm/boards/mnt-reform/board.c b/arch/arm/boards/mnt-reform/board.c
new file mode 100644
index 0000000000..e2d628586a
--- /dev/null
+++ b/arch/arm/boards/mnt-reform/board.c
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2020 Lucas Stach <dev@lynxeye.de>
+ */
+
+#include <bootsource.h>
+#include <common.h>
+#include <init.h>
+#include <mach/bbu.h>
+
+static int mnt_reform_probe(struct device_d *dev)
+{
+ int emmc_bbu_flag = 0;
+ int sd_bbu_flag = 0;
+
+ if (bootsource_get() == BOOTSOURCE_MMC) {
+ of_device_enable_path("/chosen/environment-emmc");
+ emmc_bbu_flag = BBU_HANDLER_FLAG_DEFAULT;
+ } else {
+ of_device_enable_path("/chosen/environment-sd");
+ sd_bbu_flag = BBU_HANDLER_FLAG_DEFAULT;
+ }
+
+ imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", sd_bbu_flag);
+ imx8m_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", emmc_bbu_flag);
+
+ return 0;
+}
+
+static const struct of_device_id mnt_reform_of_match[] = {
+ { .compatible = "mnt,reform2"},
+ { /* sentinel */ },
+};
+
+static struct driver_d mnt_reform_board_driver = {
+ .name = "board-mnt-reform",
+ .probe = mnt_reform_probe,
+ .of_compatible = DRV_OF_COMPAT(mnt_reform_of_match),
+};
+device_platform_driver(mnt_reform_board_driver);
diff --git a/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg b/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg
new file mode 100644
index 0000000000..80ce03e22c
--- /dev/null
+++ b/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg
@@ -0,0 +1,6 @@
+soc imx8mq
+
+loadaddr 0x007E1000
+max_load_size 0x3F000
+ivtofs 0x400
+#include <mach/habv4-imx8-gencsf.h>
diff --git a/arch/arm/boards/mnt-reform/lowlevel.c b/arch/arm/boards/mnt-reform/lowlevel.c
new file mode 100644
index 0000000000..268dfb611a
--- /dev/null
+++ b/arch/arm/boards/mnt-reform/lowlevel.c
@@ -0,0 +1,187 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2020 Lucas Stach <dev@lynxeye.de>
+ */
+
+#include <asm/barebox-arm.h>
+#include <common.h>
+#include <debug_ll.h>
+#include <firmware.h>
+#include <i2c/i2c-early.h>
+#include <mach/atf.h>
+#include <mach/esdctl.h>
+#include <mach/generic.h>
+#include <mach/imx-gpio.h>
+#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx8mq-regs.h>
+#include <mach/iomux-mx8mq.h>
+#include <mach/xload.h>
+#include <soc/imx8m/ddr.h>
+
+extern char __dtb_imx8mq_mnt_reform2_start[];
+
+#define UART_PAD_CTRL MUX_PAD_CTRL(MX8MQ_PAD_CTL_DSE_65R)
+
+static void mnt_reform_setup_uart(void)
+{
+ void __iomem *uart = IOMEM(MX8M_UART1_BASE_ADDR);
+
+ imx8m_early_setup_uart_clock();
+
+ imx8mq_setup_pad(IMX8MQ_PAD_UART1_TXD__UART1_TX | UART_PAD_CTRL);
+ imx8m_uart_setup(uart);
+
+ pbl_set_putc(imx_uart_putc, uart);
+
+ putc_ll('>');
+}
+
+static void i2c_mux_set(void *i2c, u8 channel)
+{
+ int ret;
+ u8 buf[1];
+ struct i2c_msg msgs[] = {
+ {
+ .addr = 0x70,
+ .buf = buf,
+ .len = 1,
+ },
+ };
+
+ buf[0] = 1 << channel;
+
+ ret = i2c_fsl_xfer(i2c, msgs, ARRAY_SIZE(msgs));
+ if (ret != 1)
+ pr_err("failed to set i2c mux\n");
+}
+
+static void i2c_regulator_set_voltage(void *i2c, u8 reg, u8 voffs)
+{
+ int ret;
+ u8 buf[2];
+ struct i2c_msg msgs[] = {
+ {
+ .addr = 0x60,
+ .buf = buf,
+ .len = 2,
+ },
+ };
+
+ buf[0] = reg;
+ buf[1] = 0x80 + voffs;
+
+ ret = i2c_fsl_xfer(i2c, msgs, ARRAY_SIZE(msgs));
+ if (ret != 1)
+ pr_err("failed to set voltage\n");
+}
+
+#define I2C_PAD_CTRL MUX_PAD_CTRL(MX8MQ_PAD_CTL_DSE_45R | \
+ MX8MQ_PAD_CTL_HYS | \
+ MX8MQ_PAD_CTL_PUE)
+
+static void mnt_reform_init_power(void)
+{
+ void *i2c;
+
+ imx8mq_setup_pad(IMX8MQ_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
+ imx8mq_setup_pad(IMX8MQ_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
+ imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_I2C1);
+
+ i2c = imx8m_i2c_early_init(IOMEM(MX8MQ_I2C1_BASE_ADDR));
+
+ /* de-assert i2c mux reset */
+ imx8m_gpio_direction_output(IOMEM(MX8MQ_GPIO1_BASE_ADDR), 4, 1);
+ /* ARM/DRAM_CORE VSEL */
+ imx8m_gpio_direction_output(IOMEM(MX8MQ_GPIO3_BASE_ADDR), 24, 0);
+ /* DRAM VSEL */
+ imx8m_gpio_direction_output(IOMEM(MX8MQ_GPIO2_BASE_ADDR), 11, 0);
+ /* SOC/GPU/VPU VSEL */
+ imx8m_gpio_direction_output(IOMEM(MX8MQ_GPIO2_BASE_ADDR), 20, 0);
+
+ /* enable I2C1A, ARM/DRAM */
+ i2c_mux_set(i2c, 0);
+ /* .6 + .40 = 1.00V */
+ i2c_regulator_set_voltage(i2c, 0, 40);
+ i2c_regulator_set_voltage(i2c, 1, 40);
+
+ /* enable I2C1B, DRAM 1.1V */
+ i2c_mux_set(i2c, 1);
+ /* .6 + .50 = 1.10V */
+ i2c_regulator_set_voltage(i2c, 0, 50);
+ i2c_regulator_set_voltage(i2c, 1, 50);
+
+ /* enable I2C1C, SOC/GPU/VPU */
+ i2c_mux_set(i2c, 2);
+ /*.6 + .30 = .90V */
+ i2c_regulator_set_voltage(i2c, 0, 30);
+ i2c_regulator_set_voltage(i2c, 1, 30);
+
+ /* enable I2C1D */
+ i2c_mux_set(i2c, 3);
+}
+
+extern struct dram_timing_info mnt_reform_dram_timing;
+
+static __noreturn noinline void mnt_reform_start(void)
+{
+ /*
+ * If we are in EL3 we are running for the first time and need to
+ * initialize the power supplies, DRAM and run TF-A (BL31).
+ * The TF-A will then jump to DRAM in EL2.
+ */
+ if (current_el() == 3) {
+ size_t bl31_size;
+ const u8 *bl31;
+ enum bootsource src;
+ int instance;
+
+ mnt_reform_setup_uart();
+
+ mnt_reform_init_power();
+
+ imx8mq_ddr_init(&mnt_reform_dram_timing);
+
+ imx8mq_get_boot_source(&src, &instance);
+ switch (src) {
+ case BOOTSOURCE_MMC:
+ imx8m_esdhc_load_image(instance, false);
+ break;
+ case BOOTSOURCE_SERIAL:
+ imx8m_esdhc_load_image(1, false);
+ break;
+ default:
+ printf("Unhandled bootsource BOOTSOURCE_%d\n", src);
+ hang();
+ }
+
+ /*
+ * On completion the TF-A will jump to MX8M_ATF_BL33_BASE_ADDR
+ * in EL2. Copy the image there, but replace the PBL part of
+ * that image with ourselves. On a high assurance boot only the
+ * currently running code is validated and contains the checksum
+ * for the piggy data, so we need to ensure that we are running
+ * the same code in DRAM.
+ */
+ memcpy((void *)MX8M_ATF_BL33_BASE_ADDR,
+ __image_start, barebox_pbl_size);
+
+ get_builtin_firmware(imx8mq_bl31_bin, &bl31, &bl31_size);
+
+ imx8mq_atf_load_bl31(bl31, bl31_size);
+ }
+
+ /*
+ * Standard entry we hit once we initialized both DDR and ATF
+ */
+ imx8mq_barebox_entry(__dtb_imx8mq_mnt_reform2_start);
+}
+
+ENTRY_FUNCTION(start_mnt_reform, r0, r1, r2)
+{
+ imx8mq_cpu_lowlevel_init();
+
+ relocate_to_current_adr();
+ setup_c();
+
+ mnt_reform_start();
+}
diff --git a/arch/arm/boards/mnt-reform/lpddr4-timing.c b/arch/arm/boards/mnt-reform/lpddr4-timing.c
new file mode 100644
index 0000000000..0b5853000d
--- /dev/null
+++ b/arch/arm/boards/mnt-reform/lpddr4-timing.c
@@ -0,0 +1,1012 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ */
+
+#include <common.h>
+#include <soc/imx8m/ddr.h>
+#include <soc/imx8m/lpddr4_define.h>
+
+static struct dram_cfg_param mnt_reform_lpddr4_ddrc_cfg[] = {
+ /** Initialize DDRC registers **/
+ { DDRC_DBG1(0), 1 },
+ /* selfref_en=1, SDRAM enter self-refresh state */
+ { DDRC_PWRCTL(0), 1 },
+ { DDRC_MSTR(0), 0xa0080020 | (LPDDR4_CS << 24) },
+ { DDRC_MSTR2(0), 0 },
+ { DDRC_DERATEEN(0), 0x0203 },
+ { DDRC_DERATEINT(0), 0x0003e800 },
+ { DDRC_RFSHTMG(0), 0x006100e0 },
+ { DDRC_INIT0(0), 0xc003061c },
+ { DDRC_INIT1(0), 0x009e0000 },
+ { DDRC_INIT3(0), 0x00d4002d },
+ { DDRC_INIT4(0), ((LPDDR4_MR3 << 16) | 8) },
+ { DDRC_INIT6(0), 0x0066004a },
+ { DDRC_INIT7(0), 0x0016004a },
+ { DDRC_DRAMTMG0(0), 0x1a201b22 },
+ { DDRC_DRAMTMG1(0), 0x00060633 },
+ { DDRC_DRAMTMG3(0), 0x00c0c000 },
+ { DDRC_DRAMTMG4(0), 0x0f04080f },
+ { DDRC_DRAMTMG5(0), 0x02040c0c },
+ { DDRC_DRAMTMG6(0), 0x01010007 },
+ { DDRC_DRAMTMG7(0), 0x0401 },
+ { DDRC_DRAMTMG12(0), 0x00020600 },
+ { DDRC_DRAMTMG13(0), 0x0c100002 },
+ { DDRC_DRAMTMG14(0), 0xe6 },
+ { DDRC_DRAMTMG17(0), 0x00a00050 },
+ { DDRC_ZQCTL0(0), 0xc3200018 },
+ { DDRC_ZQCTL1(0), 0x028061a8 },
+ { DDRC_ZQCTL2(0), 0 },
+ { DDRC_DFITMG0(0), 0x0497820a },
+ { DDRC_DFITMG1(0), 0x00080303 },
+ { DDRC_DFIUPD0(0), 0xe0400018 },
+ { DDRC_DFIUPD1(0), 0x00df00e4 },
+ { DDRC_DFIUPD2(0), 0x80000000 },
+ { DDRC_DFIMISC(0), 0x11 },
+ { DDRC_DFITMG2(0), 0x170a },
+ { DDRC_DBICTL(0), 1 },
+ { DDRC_DFIPHYMSTR(0), 1 },
+ { DDRC_RANKCTL(0), 0x0639 },
+ { DDRC_DRAMTMG2(0), 0x070e1617 },
+
+ /* address mapping */
+ { DDRC_ADDRMAP0(0), 0x00000017 },
+ { DDRC_ADDRMAP3(0), 0 },
+ /* addrmap_col_b10 and addrmap_col_b11 set to de-activated (5-bit width) */
+ { DDRC_ADDRMAP4(0), 0x1f1f },
+ /* bank interleave */
+ /* addrmap_bank_b2, addrmap_bank_b1, addrmap_bank_b0 */
+ { DDRC_ADDRMAP1(0), 0x00080808 },
+ /* addrmap_row_b11, addrmap_row_b10_b2, addrmap_row_b1, addrmap_row_b0 */
+ { DDRC_ADDRMAP5(0), 0x07070707 },
+ /* addrmap_row_b15, addrmap_row_b14, addrmap_row_b13, addrmap_row_b12 */
+ { DDRC_ADDRMAP6(0), 0x07070707 },
+ { DDRC_ADDRMAP7(0), 0x0f0f },
+ { DDRC_FREQ1_DERATEEN(0), 1 },
+ { DDRC_FREQ1_DERATEINT(0), 0xd0c0 },
+ { DDRC_FREQ1_RFSHCTL0(0), 0x0020d040 },
+ { DDRC_FREQ1_RFSHTMG(0), 0x0014002f },
+ { DDRC_FREQ1_INIT3(0), 0x00940009 },
+ { DDRC_FREQ1_INIT4(0), ((LPDDR4_MR3 << 16) | 8) },
+ { DDRC_FREQ1_INIT6(0), 0x0066004a },
+ { DDRC_FREQ1_INIT7(0), 0x0016004a },
+ { DDRC_FREQ1_DRAMTMG0(0), 0x0b070508 },
+ { DDRC_FREQ1_DRAMTMG1(0), 0x0003040b },
+ { DDRC_FREQ1_DRAMTMG2(0), 0x0305090c },
+ { DDRC_FREQ1_DRAMTMG3(0), 0x00505000 },
+ { DDRC_FREQ1_DRAMTMG4(0), 0x04040204 },
+ { DDRC_FREQ1_DRAMTMG5(0), 0x02030303 },
+ { DDRC_FREQ1_DRAMTMG6(0), 0x01010004 },
+ { DDRC_FREQ1_DRAMTMG7(0), 0x0301 },
+ { DDRC_FREQ1_DRAMTMG12(0), 0x00020300 },
+ { DDRC_FREQ1_DRAMTMG13(0), 0x0a100002 },
+ { DDRC_FREQ1_DRAMTMG14(0), 0x31 },
+ { DDRC_FREQ1_DRAMTMG17(0), 0x00220011 },
+ { DDRC_FREQ1_ZQCTL0(0), 0xc0a70006 },
+ { DDRC_FREQ1_DFITMG0(0), 0x03858202 },
+ { DDRC_FREQ1_DFITMG1(0), 0x00080303 },
+ { DDRC_FREQ1_DFITMG2(0), 0x0502 },
+ { DDRC_ODTMAP(0), 0 },
+ { DDRC_SCHED(0), 0x29001505 },
+ { DDRC_SCHED1(0), 0x2c },
+ { DDRC_PERFHPR1(0), 0x5900575b },
+ { DDRC_PERFLPR1(0), 0x90000096 },
+ { DDRC_PERFWR1(0), 0x1000012c },
+ { DDRC_DBG0(0), 0x16 },
+ { DDRC_DBG1(0), 0 },
+ { DDRC_DBGCMD(0), 0 },
+ { DDRC_SWCTL(0), 1 },
+ { DDRC_POISONCFG(0), 0x11 },
+ { DDRC_PCCFG(0), 0x0111 },
+ { DDRC_PCFGR_0(0), 0x10f3 },
+ { DDRC_PCFGW_0(0), 0x72ff },
+ { DDRC_PCTRL_0(0), 1 },
+ { DDRC_PCFGQOS0_0(0), 0x0e00 },
+ { DDRC_PCFGQOS1_0(0), 0x0062ffff },
+ { DDRC_PCFGWQOS0_0(0), 0x0e00 },
+ { DDRC_PCFGWQOS1_0(0), 0xffff },
+};
+
+/* PHY Initialize Configuration */
+static struct dram_cfg_param mnt_reform_lpddr4_ddrphy_cfg[] = {
+ { 0x100a0, 0 },
+ { 0x100a1, 1 },
+ { 0x100a2, 2 },
+ { 0x100a3, 3 },
+ { 0x100a4, 4 },
+ { 0x100a5, 5 },
+ { 0x100a6, 6 },
+ { 0x100a7, 7 },
+ { 0x110a0, 0 },
+ { 0x110a1, 1 },
+ { 0x110a2, 2 },
+ { 0x110a3, 3 },
+ { 0x110a4, 4 },
+ { 0x110a5, 5 },
+ { 0x110a6, 6 },
+ { 0x110a7, 7 },
+ { 0x120a0, 0 },
+ { 0x120a1, 1 },
+ { 0x120a2, 2 },
+ { 0x120a3, 3 },
+ { 0x120a4, 4 },
+ { 0x120a5, 5 },
+ { 0x120a6, 6 },
+ { 0x120a7, 7 },
+ { 0x130a0, 0 },
+ { 0x130a1, 1 },
+ { 0x130a2, 2 },
+ { 0x130a3, 3 },
+ { 0x130a4, 4 },
+ { 0x130a5, 5 },
+ { 0x130a6, 6 },
+ { 0x130a7, 7 },
+ { 0x1005f, 0x01ff },
+ { 0x1015f, 0x01ff },
+ { 0x1105f, 0x01ff },
+ { 0x1115f, 0x01ff },
+ { 0x1205f, 0x01ff },
+ { 0x1215f, 0x01ff },
+ { 0x1305f, 0x01ff },
+ { 0x1315f, 0x01ff },
+ { 0x11005f, 0x01ff },
+ { 0x11015f, 0x01ff },
+ { 0x11105f, 0x01ff },
+ { 0x11115f, 0x01ff },
+ { 0x11205f, 0x01ff },
+ { 0x11215f, 0x01ff },
+ { 0x11305f, 0x01ff },
+ { 0x11315f, 0x01ff },
+ { 0x0055, 0x01ff },
+ { 0x1055, 0x01ff },
+ { 0x2055, 0x01ff },
+ { 0x3055, 0x01ff },
+ { 0x4055, 0x01ff },
+ { 0x5055, 0x01ff },
+ { 0x6055, 0x01ff },
+ { 0x7055, 0x01ff },
+ { 0x8055, 0x01ff },
+ { 0x9055, 0x01ff },
+ { 0x200c5, 0x19 },
+ { 0x1200c5, 7 },
+ { 0x2002e, 2 },
+ { 0x12002e, 1 },
+ { 0x90204, 0 },
+ { 0x190204, 0 },
+ { 0x20024, 0x01ab },
+ { 0x2003a, 0 },
+ { 0x120024, 0x01ab },
+ { 0x2003a, 0 },
+ { 0x20056, 3 },
+ { 0x120056, 3 },
+ { 0x1004d, 0x0e00 },
+ { 0x1014d, 0x0e00 },
+ { 0x1104d, 0x0e00 },
+ { 0x1114d, 0x0e00 },
+ { 0x1204d, 0x0e00 },
+ { 0x1214d, 0x0e00 },
+ { 0x1304d, 0x0e00 },
+ { 0x1314d, 0x0e00 },
+ { 0x11004d, 0x0e00 },
+ { 0x11014d, 0x0e00 },
+ { 0x11104d, 0x0e00 },
+ { 0x11114d, 0x0e00 },
+ { 0x11204d, 0x0e00 },
+ { 0x11214d, 0x0e00 },
+ { 0x11304d, 0x0e00 },
+ { 0x11314d, 0x0e00 },
+ { 0x10049, 0x0eba },
+ { 0x10149, 0x0eba },
+ { 0x11049, 0x0eba },
+ { 0x11149, 0x0eba },
+ { 0x12049, 0x0eba },
+ { 0x12149, 0x0eba },
+ { 0x13049, 0x0eba },
+ { 0x13149, 0x0eba },
+ { 0x110049, 0x0eba },
+ { 0x110149, 0x0eba },
+ { 0x111049, 0x0eba },
+ { 0x111149, 0x0eba },
+ { 0x112049, 0x0eba },
+ { 0x112149, 0x0eba },
+ { 0x113049, 0x0eba },
+ { 0x113149, 0x0eba },
+ { 0x0043, 0x63 },
+ { 0x1043, 0x63 },
+ { 0x2043, 0x63 },
+ { 0x3043, 0x63 },
+ { 0x4043, 0x63 },
+ { 0x5043, 0x63 },
+ { 0x6043, 0x63 },
+ { 0x7043, 0x63 },
+ { 0x8043, 0x63 },
+ { 0x9043, 0x63 },
+ { 0x20018, 3 },
+ { 0x20075, 4 },
+ { 0x20050, 0 },
+ { 0x20008, 0x0320 },
+ { 0x120008, 0xa7 },
+ { 0x20088, 9 },
+ { 0x200b2, 0xdc },
+ { 0x10043, 0x05a1 },
+ { 0x10143, 0x05a1 },
+ { 0x11043, 0x05a1 },
+ { 0x11143, 0x05a1 },
+ { 0x12043, 0x05a1 },
+ { 0x12143, 0x05a1 },
+ { 0x13043, 0x05a1 },
+ { 0x13143, 0x05a1 },
+ { 0x1200b2, 0xdc },
+ { 0x110043, 0x05a1 },
+ { 0x110143, 0x05a1 },
+ { 0x111043, 0x05a1 },
+ { 0x111143, 0x05a1 },
+ { 0x112043, 0x05a1 },
+ { 0x112143, 0x05a1 },
+ { 0x113043, 0x05a1 },
+ { 0x113143, 0x05a1 },
+ { 0x200fa, 1 },
+ { 0x1200fa, 1 },
+ { 0x20019, 1 },
+ { 0x120019, 1 },
+ { 0x200f0, 0 },
+ { 0x200f1, 0 },
+ { 0x200f2, 0x4444 },
+ { 0x200f3, 0x8888 },
+ { 0x200f4, 0x5555 },
+ { 0x200f5, 0 },
+ { 0x200f6, 0 },
+ { 0x200f7, 0xf000 },
+ { 0x20025, 0 },
+ { 0x2002d, 0 },
+ { 0x12002d, 0 },
+ { 0x200c7, 0x80 },
+ { 0x1200c7, 0x80 },
+ { 0x200ca, 0x0106 },
+ { 0x1200ca, 0x0106 },
+ { 0x20110, 2 },
+ { 0x20111, 3 },
+ { 0x20112, 4 },
+ { 0x20113, 5 },
+ { 0x20114, 0 },
+ { 0x20115, 1 },
+};
+
+/* P0 message block parameter for training firmware */
+static struct dram_cfg_param lpddr4_fsp0_cfg[] = {
+ { 0xd0000, 0 },
+ { 0x54003, 0x0c80 },
+ { 0x54004, 2 },
+ { 0x54005, 0x2228 },
+ { 0x54006, LPDDR4_PHY_VREF_VALUE },
+ { 0x54008, 0x131f },
+ { 0x54009, LPDDR4_HDT_CTL_3200_1D },
+ { 0x5400b, 2 },
+ { 0x54012, 0x10 | (LPDDR4_CS << 8) },
+ { 0x54019, 0x2dd4 },
+ { 0x5401a, 0x31 },
+ { 0x5401b, 0x4a66 },
+ { 0x5401c, 0x4a08 },
+ { 0x5401e, 0x16 },
+ { 0x5401f, 0x2dd4 },
+ { 0x54020, 0x31 },
+ { 0x54021, 0x4a66 },
+ { 0x54022, 0x4a08 },
+ { 0x54024, 0x16 },
+ { 0x5402b, 0x1000 },
+ { 0x5402c, LPDDR4_CS },
+ { 0x54032, 0xd400 },
+ { 0x54033, 0x312d },
+ { 0x54034, 0x6600 },
+ { 0x54035, 0x084a },
+ { 0x54036, 0x4a },
+ { 0x54037, 0x1600 },
+ { 0x54038, 0xd400 },
+ { 0x54039, 0x312d },
+ { 0x5403a, 0x6600 },
+ { 0x5403b, 0x084a },
+ { 0x5403c, 0x4a },
+ { 0x5403d, 0x1600 },
+ { 0xd0000, 1 },
+};
+
+
+/* P1 message block parameter for training firmware */
+static struct dram_cfg_param lpddr4_fsp1_cfg[] = {
+ { 0xd0000, 0 },
+ { 0x54002, 1 },
+ { 0x54003, 0x029c },
+ { 0x54004, 2 },
+ { 0x54005, 0x2228 },
+ { 0x54006, LPDDR4_PHY_VREF_VALUE },
+ { 0x54008, 0x121f },
+ { 0x54009, LPDDR4_HDT_CTL_3200_1D },
+ { 0x5400b, 2 },
+ { 0x54012, 0x10 | (LPDDR4_CS << 8) },
+ { 0x54019, 0x0994 },
+ { 0x5401a, 0x31 },
+ { 0x5401b, 0x4a66 },
+ { 0x5401c, 0x4a08 },
+ { 0x5401e, 0x16 },
+ { 0x5401f, 0x0994 },
+ { 0x54020, 0x31 },
+ { 0x54021, 0x4a66 },
+ { 0x54022, 0x4a08 },
+ { 0x54024, 0x16 },
+ { 0x5402b, 0x1000 },
+ { 0x5402c, LPDDR4_CS },
+ { 0x54032, 0x9400 },
+ { 0x54033, 0x3109 },
+ { 0x54034, 0x6600 },
+ { 0x54035, 0x084a },
+ { 0x54036, 0x4a },
+ { 0x54037, 0x1600 },
+ { 0x54038, 0x9400 },
+ { 0x54039, 0x3109 },
+ { 0x5403a, 0x6600 },
+ { 0x5403b, 0x084a },
+ { 0x5403c, 0x4a },
+ { 0x5403d, 0x1600 },
+ { 0xd0000, 1 },
+};
+
+
+/* P0 2D message block parameter for training firmware */
+static struct dram_cfg_param lpddr4_fsp0_2d_cfg[] = {
+ { 0xd0000, 0 },
+ { 0x54003, 0x0c80 },
+ { 0x54004, 2 },
+ { 0x54005, 0x2228 },
+ { 0x54006, LPDDR4_PHY_VREF_VALUE },
+ { 0x54008, 0x61 },
+ { 0x54009, LPDDR4_HDT_CTL_3200_1D },
+ { 0x5400b, 2 },
+ { 0x5400d, 0x0100 },
+ { 0x5400f, 0x0100 },
+ { 0x54010, 0x1f7f },
+ { 0x54012, 0x10 | (LPDDR4_CS << 8) },
+ { 0x54019, 0x2dd4 },
+ { 0x5401a, 0x31 },
+ { 0x5401b, 0x4a66 },
+ { 0x5401c, 0x4a08 },
+ { 0x5401e, 0x16 },
+ { 0x5401f, 0x2dd4 },
+ { 0x54020, 0x31 },
+ { 0x54021, 0x4a66 },
+ { 0x54022, 0x4a08 },
+ { 0x54024, 0x16 },
+ { 0x5402b, 0x1000 },
+ { 0x5402c, LPDDR4_CS },
+ { 0x54032, 0xd400 },
+ { 0x54033, 0x312d },
+ { 0x54034, 0x6600 },
+ { 0x54035, 0x084a },
+ { 0x54036, 0x4a },
+ { 0x54037, 0x1600 },
+ { 0x54038, 0xd400 },
+ { 0x54039, 0x312d },
+ { 0x5403a, 0x6600 },
+ { 0x5403b, 0x084a },
+ { 0x5403c, 0x4a },
+ { 0x5403d, 0x1600 },
+ { 0xd0000, 1 },
+};
+
+/* DRAM PHY init engine image */
+static struct dram_cfg_param mnt_reform_lpddr4_phy_pie[] = {
+ { 0xd0000, 0 },
+ { 0x90000, 0x10 },
+ { 0x90001, 0x0400 },
+ { 0x90002, 0x010e },
+ { 0x90003, 0 },
+ { 0x90004, 0 },
+ { 0x90005, 8 },
+ { 0x90029, 0x0b },
+ { 0x9002a, 0x0480 },
+ { 0x9002b, 0x0109 },
+ { 0x9002c, 8 },
+ { 0x9002d, 0x0448 },
+ { 0x9002e, 0x0139 },
+ { 0x9002f, 8 },
+ { 0x90030, 0x0478 },
+ { 0x90031, 0x0109 },
+ { 0x90032, 0 },
+ { 0x90033, 0xe8 },
+ { 0x90034, 0x0109 },
+ { 0x90035, 2 },
+ { 0x90036, 0x10 },
+ { 0x90037, 0x0139 },
+ { 0x90038, 0x0f },
+ { 0x90039, 0x07c0 },
+ { 0x9003a, 0x0139 },
+ { 0x9003b, 0x44 },
+ { 0x9003c, 0x0630 },
+ { 0x9003d, 0x0159 },
+ { 0x9003e, 0x014f },
+ { 0x9003f, 0x0630 },
+ { 0x90040, 0x0159 },
+ { 0x90041, 0x47 },
+ { 0x90042, 0x0630 },
+ { 0x90043, 0x0149 },
+ { 0x90044, 0x4f },
+ { 0x90045, 0x0630 },
+ { 0x90046, 0x0179 },
+ { 0x90047, 8 },
+ { 0x90048, 0xe0 },
+ { 0x90049, 0x0109 },
+ { 0x9004a, 0 },
+ { 0x9004b, 0x07c8 },
+ { 0x9004c, 0x0109 },
+ { 0x9004d, 0 },
+ { 0x9004e, 1 },
+ { 0x9004f, 8 },
+ { 0x90050, 0 },
+ { 0x90051, 0x045a },
+ { 0x90052, 9 },
+ { 0x90053, 0 },
+ { 0x90054, 0x0448 },
+ { 0x90055, 0x0109 },
+ { 0x90056, 0x40 },
+ { 0x90057, 0x0630 },
+ { 0x90058, 0x0179 },
+ { 0x90059, 1 },
+ { 0x9005a, 0x0618 },
+ { 0x9005b, 0x0109 },
+ { 0x9005c, 0x40c0 },
+ { 0x9005d, 0x0630 },
+ { 0x9005e, 0x0149 },
+ { 0x9005f, 8 },
+ { 0x90060, 4 },
+ { 0x90061, 0x48 },
+ { 0x90062, 0x4040 },
+ { 0x90063, 0x0630 },
+ { 0x90064, 0x0149 },
+ { 0x90065, 0 },
+ { 0x90066, 4 },
+ { 0x90067, 0x48 },
+ { 0x90068, 0x40 },
+ { 0x90069, 0x0630 },
+ { 0x9006a, 0x0149 },
+ { 0x9006b, 0x10 },
+ { 0x9006c, 4 },
+ { 0x9006d, 0x18 },
+ { 0x9006e, 0 },
+ { 0x9006f, 4 },
+ { 0x90070, 0x78 },
+ { 0x90071, 0x0549 },
+ { 0x90072, 0x0630 },
+ { 0x90073, 0x0159 },
+ { 0x90074, 0x0d49 },
+ { 0x90075, 0x0630 },
+ { 0x90076, 0x0159 },
+ { 0x90077, 0x094a },
+ { 0x90078, 0x0630 },
+ { 0x90079, 0x0159 },
+ { 0x9007a, 0x0441 },
+ { 0x9007b, 0x0630 },
+ { 0x9007c, 0x0149 },
+ { 0x9007d, 0x42 },
+ { 0x9007e, 0x0630 },
+ { 0x9007f, 0x0149 },
+ { 0x90080, 1 },
+ { 0x90081, 0x0630 },
+ { 0x90082, 0x0149 },
+ { 0x90083, 0 },
+ { 0x90084, 0xe0 },
+ { 0x90085, 0x0109 },
+ { 0x90086, 0x0a },
+ { 0x90087, 0x10 },
+ { 0x90088, 0x0109 },
+ { 0x90089, 9 },
+ { 0x9008a, 0x03c0 },
+ { 0x9008b, 0x0149 },
+ { 0x9008c, 9 },
+ { 0x9008d, 0x03c0 },
+ { 0x9008e, 0x0159 },
+ { 0x9008f, 0x18 },
+ { 0x90090, 0x10 },
+ { 0x90091, 0x0109 },
+ { 0x90092, 0 },
+ { 0x90093, 0x03c0 },
+ { 0x90094, 0x0109 },
+ { 0x90095, 0x18 },
+ { 0x90096, 4 },
+ { 0x90097, 0x48 },
+ { 0x90098, 0x18 },
+ { 0x90099, 4 },
+ { 0x9009a, 0x58 },
+ { 0x9009b, 0x0a },
+ { 0x9009c, 0x10 },
+ { 0x9009d, 0x0109 },
+ { 0x9009e, 2 },
+ { 0x9009f, 0x10 },
+ { 0x900a0, 0x0109 },
+ { 0x900a1, 5 },
+ { 0x900a2, 0x07c0 },
+ { 0x900a3, 0x0109 },
+ { 0x900a4, 0x10 },
+ { 0x900a5, 0x10 },
+ { 0x900a6, 0x0109 },
+ { 0x40000, 0x0811 },
+ { 0x40020, 0x0880 },
+ { 0x40040, 0 },
+ { 0x40060, 0 },
+ { 0x40001, 0x4008 },
+ { 0x40021, 0x83 },
+ { 0x40041, 0x4f },
+ { 0x40061, 0 },
+ { 0x40002, 0x4040 },
+ { 0x40022, 0x83 },
+ { 0x40042, 0x51 },
+ { 0x40062, 0 },
+ { 0x40003, 0x0811 },
+ { 0x40023, 0x0880 },
+ { 0x40043, 0 },
+ { 0x40063, 0 },
+ { 0x40004, 0x0720 },
+ { 0x40024, 0x0f },
+ { 0x40044, 0x1740 },
+ { 0x40064, 0 },
+ { 0x40005, 0x16 },
+ { 0x40025, 0x83 },
+ { 0x40045, 0x4b },
+ { 0x40065, 0 },
+ { 0x40006, 0x0716 },
+ { 0x40026, 0x0f },
+ { 0x40046, 0x2001 },
+ { 0x40066, 0 },
+ { 0x40007, 0x0716 },
+ { 0x40027, 0x0f },
+ { 0x40047, 0x2800 },
+ { 0x40067, 0 },
+ { 0x40008, 0x0716 },
+ { 0x40028, 0x0f },
+ { 0x40048, 0x0f00 },
+ { 0x40068, 0 },
+ { 0x40009, 0x0720 },
+ { 0x40029, 0x0f },
+ { 0x40049, 0x1400 },
+ { 0x40069, 0 },
+ { 0x4000a, 0x0e08 },
+ { 0x4002a, 0x0c15 },
+ { 0x4004a, 0 },
+ { 0x4006a, 0 },
+ { 0x4000b, 0x0623 },
+ { 0x4002b, 0x15 },
+ { 0x4004b, 0 },
+ { 0x4006b, 0 },
+ { 0x4000c, 0x4028 },
+ { 0x4002c, 0x80 },
+ { 0x4004c, 0 },
+ { 0x4006c, 0 },
+ { 0x4000d, 0x0e08 },
+ { 0x4002d, 0x0c1a },
+ { 0x4004d, 0 },
+ { 0x4006d, 0 },
+ { 0x4000e, 0x0623 },
+ { 0x4002e, 0x1a },
+ { 0x4004e, 0 },
+ { 0x4006e, 0 },
+ { 0x4000f, 0x4040 },
+ { 0x4002f, 0x80 },
+ { 0x4004f, 0 },
+ { 0x4006f, 0 },
+ { 0x40010, 0x2604 },
+ { 0x40030, 0x15 },
+ { 0x40050, 0 },
+ { 0x40070, 0 },
+ { 0x40011, 0x0708 },
+ { 0x40031, 5 },
+ { 0x40051, 0 },
+ { 0x40071, 0x2002 },
+ { 0x40012, 8 },
+ { 0x40032, 0x80 },
+ { 0x40052, 0 },
+ { 0x40072, 0 },
+ { 0x40013, 0x2604 },
+ { 0x40033, 0x1a },
+ { 0x40053, 0 },
+ { 0x40073, 0 },
+ { 0x40014, 0x0708 },
+ { 0x40034, 0x0a },
+ { 0x40054, 0 },
+ { 0x40074, 0x2002 },
+ { 0x40015, 0x4040 },
+ { 0x40035, 0x80 },
+ { 0x40055, 0 },
+ { 0x40075, 0 },
+ { 0x40016, 0x060a },
+ { 0x40036, 0x15 },
+ { 0x40056, 0x1200 },
+ { 0x40076, 0 },
+ { 0x40017, 0x061a },
+ { 0x40037, 0x15 },
+ { 0x40057, 0x1300 },
+ { 0x40077, 0 },
+ { 0x40018, 0x060a },
+ { 0x40038, 0x1a },
+ { 0x40058, 0x1200 },
+ { 0x40078, 0 },
+ { 0x40019, 0x0642 },
+ { 0x40039, 0x1a },
+ { 0x40059, 0x1300 },
+ { 0x40079, 0 },
+ { 0x4001a, 0x4808 },
+ { 0x4003a, 0x0880 },
+ { 0x4005a, 0 },
+ { 0x4007a, 0 },
+ { 0x900a7, 0 },
+ { 0x900a8, 0x0790 },
+ { 0x900a9, 0x011a },
+ { 0x900aa, 8 },
+ { 0x900ab, 0x07aa },
+ { 0x900ac, 0x2a },
+ { 0x900ad, 0x10 },
+ { 0x900ae, 0x07b2 },
+ { 0x900af, 0x2a },
+ { 0x900b0, 0 },
+ { 0x900b1, 0x07c8 },
+ { 0x900b2, 0x0109 },
+ { 0x900b3, 0x10 },
+ { 0x900b4, 0x02a8 },
+ { 0x900b5, 0x0129 },
+ { 0x900b6, 8 },
+ { 0x900b7, 0x0370 },
+ { 0x900b8, 0x0129 },
+ { 0x900b9, 0x0a },
+ { 0x900ba, 0x03c8 },
+ { 0x900bb, 0x01a9 },
+ { 0x900bc, 0x0c },
+ { 0x900bd, 0x0408 },
+ { 0x900be, 0x0199 },
+ { 0x900bf, 0x14 },
+ { 0x900c0, 0x0790 },
+ { 0x900c1, 0x011a },
+ { 0x900c2, 8 },
+ { 0x900c3, 4 },
+ { 0x900c4, 0x18 },
+ { 0x900c5, 0x0e },
+ { 0x900c6, 0x0408 },
+ { 0x900c7, 0x0199 },
+ { 0x900c8, 8 },
+ { 0x900c9, 0x8568 },
+ { 0x900ca, 0x0108 },
+ { 0x900cb, 0x18 },
+ { 0x900cc, 0x0790 },
+ { 0x900cd, 0x016a },
+ { 0x900ce, 8 },
+ { 0x900cf, 0x01d8 },
+ { 0x900d0, 0x0169 },
+ { 0x900d1, 0x10 },
+ { 0x900d2, 0x8558 },
+ { 0x900d3, 0x0168 },
+ { 0x900d4, 0x70 },
+ { 0x900d5, 0x0788 },
+ { 0x900d6, 0x016a },
+ { 0x900d7, 0x1ff8 },
+ { 0x900d8, 0x85a8 },
+ { 0x900d9, 0x01e8 },
+ { 0x900da, 0x50 },
+ { 0x900db, 0x0798 },
+ { 0x900dc, 0x016a },
+ { 0x900dd, 0x60 },
+ { 0x900de, 0x07a0 },
+ { 0x900df, 0x016a },
+ { 0x900e0, 8 },
+ { 0x900e1, 0x8310 },
+ { 0x900e2, 0x0168 },
+ { 0x900e3, 8 },
+ { 0x900e4, 0xa310 },
+ { 0x900e5, 0x0168 },
+ { 0x900e6, 0x0a },
+ { 0x900e7, 0x0408 },
+ { 0x900e8, 0x0169 },
+ { 0x900e9, 0x6e },
+ { 0x900ea, 0 },
+ { 0x900eb, 0x68 },
+ { 0x900ec, 0 },
+ { 0x900ed, 0x0408 },
+ { 0x900ee, 0x0169 },
+ { 0x900ef, 0 },
+ { 0x900f0, 0x8310 },
+ { 0x900f1, 0x0168 },
+ { 0x900f2, 0 },
+ { 0x900f3, 0xa310 },
+ { 0x900f4, 0x0168 },
+ { 0x900f5, 0x1ff8 },
+ { 0x900f6, 0x85a8 },
+ { 0x900f7, 0x01e8 },
+ { 0x900f8, 0x68 },
+ { 0x900f9, 0x0798 },
+ { 0x900fa, 0x016a },
+ { 0x900fb, 0x78 },
+ { 0x900fc, 0x07a0 },
+ { 0x900fd, 0x016a },
+ { 0x900fe, 0x68 },
+ { 0x900ff, 0x0790 },
+ { 0x90100, 0x016a },
+ { 0x90101, 8 },
+ { 0x90102, 0x8b10 },
+ { 0x90103, 0x0168 },
+ { 0x90104, 8 },
+ { 0x90105, 0xab10 },
+ { 0x90106, 0x0168 },
+ { 0x90107, 0x0a },
+ { 0x90108, 0x0408 },
+ { 0x90109, 0x0169 },
+ { 0x9010a, 0x58 },
+ { 0x9010b, 0 },
+ { 0x9010c, 0x68 },
+ { 0x9010d, 0 },
+ { 0x9010e, 0x0408 },
+ { 0x9010f, 0x0169 },
+ { 0x90110, 0 },
+ { 0x90111, 0x8b10 },
+ { 0x90112, 0x0168 },
+ { 0x90113, 0 },
+ { 0x90114, 0xab10 },
+ { 0x90115, 0x0168 },
+ { 0x90116, 0 },
+ { 0x90117, 0x01d8 },
+ { 0x90118, 0x0169 },
+ { 0x90119, 0x80 },
+ { 0x9011a, 0x0790 },
+ { 0x9011b, 0x016a },
+ { 0x9011c, 0x18 },
+ { 0x9011d, 0x07aa },
+ { 0x9011e, 0x6a },
+ { 0x9011f, 0x0a },
+ { 0x90120, 0 },
+ { 0x90121, 0x01e9 },
+ { 0x90122, 8 },
+ { 0x90123, 0x8080 },
+ { 0x90124, 0x0108 },
+ { 0x90125, 0x0f },
+ { 0x90126, 0x0408 },
+ { 0x90127, 0x0169 },
+ { 0x90128, 0x0c },
+ { 0x90129, 0 },
+ { 0x9012a, 0x68 },
+ { 0x9012b, 9 },
+ { 0x9012c, 0 },
+ { 0x9012d, 0x01a9 },
+ { 0x9012e, 0 },
+ { 0x9012f, 0x0408 },
+ { 0x90130, 0x0169 },
+ { 0x90131, 0 },
+ { 0x90132, 0x8080 },
+ { 0x90133, 0x0108 },
+ { 0x90134, 8 },
+ { 0x90135, 0x07aa },
+ { 0x90136, 0x6a },
+ { 0x90137, 0 },
+ { 0x90138, 0x8568 },
+ { 0x90139, 0x0108 },
+ { 0x9013a, 0xb7 },
+ { 0x9013b, 0x0790 },
+ { 0x9013c, 0x016a },
+ { 0x9013d, 0x1f },
+ { 0x9013e, 0 },
+ { 0x9013f, 0x68 },
+ { 0x90140, 8 },
+ { 0x90141, 0x8558 },
+ { 0x90142, 0x0168 },
+ { 0x90143, 0x0f },
+ { 0x90144, 0x0408 },
+ { 0x90145, 0x0169 },
+ { 0x90146, 0x0c },
+ { 0x90147, 0 },
+ { 0x90148, 0x68 },
+ { 0x90149, 0 },
+ { 0x9014a, 0x0408 },
+ { 0x9014b, 0x0169 },
+ { 0x9014c, 0 },
+ { 0x9014d, 0x8558 },
+ { 0x9014e, 0x0168 },
+ { 0x9014f, 8 },
+ { 0x90150, 0x03c8 },
+ { 0x90151, 0x01a9 },
+ { 0x90152, 3 },
+ { 0x90153, 0x0370 },
+ { 0x90154, 0x0129 },
+ { 0x90155, 0x20 },
+ { 0x90156, 0x02aa },
+ { 0x90157, 9 },
+ { 0x90158, 0 },
+ { 0x90159, 0x0400 },
+ { 0x9015a, 0x010e },
+ { 0x9015b, 8 },
+ { 0x9015c, 0xe8 },
+ { 0x9015d, 0x0109 },
+ { 0x9015e, 0 },
+ { 0x9015f, 0x8140 },
+ { 0x90160, 0x010c },
+ { 0x90161, 0x10 },
+ { 0x90162, 0x8138 },
+ { 0x90163, 0x010c },
+ { 0x90164, 8 },
+ { 0x90165, 0x07c8 },
+ { 0x90166, 0x0101 },
+ { 0x90167, 8 },
+ { 0x90168, 0 },
+ { 0x90169, 8 },
+ { 0x9016a, 8 },
+ { 0x9016b, 0x0448 },
+ { 0x9016c, 0x0109 },
+ { 0x9016d, 0x0f },
+ { 0x9016e, 0x07c0 },
+ { 0x9016f, 0x0109 },
+ { 0x90170, 0 },
+ { 0x90171, 0xe8 },
+ { 0x90172, 0x0109 },
+ { 0x90173, 0x47 },
+ { 0x90174, 0x0630 },
+ { 0x90175, 0x0109 },
+ { 0x90176, 8 },
+ { 0x90177, 0x0618 },
+ { 0x90178, 0x0109 },
+ { 0x90179, 8 },
+ { 0x9017a, 0xe0 },
+ { 0x9017b, 0x0109 },
+ { 0x9017c, 0 },
+ { 0x9017d, 0x07c8 },
+ { 0x9017e, 0x0109 },
+ { 0x9017f, 8 },
+ { 0x90180, 0x8140 },
+ { 0x90181, 0x010c },
+ { 0x90182, 0 },
+ { 0x90183, 1 },
+ { 0x90184, 8 },
+ { 0x90185, 8 },
+ { 0x90186, 4 },
+ { 0x90187, 8 },
+ { 0x90188, 8 },
+ { 0x90189, 0x07c8 },
+ { 0x9018a, 0x0101 },
+ { 0x90006, 0 },
+ { 0x90007, 0 },
+ { 0x90008, 8 },
+ { 0x90009, 0 },
+ { 0x9000a, 0 },
+ { 0x9000b, 0 },
+ { 0xd00e7, 0x0400 },
+ { 0x90017, 0 },
+ { 0x9001f, 0x2a },
+ { 0x90026, 0x6a },
+ { 0x400d0, 0 },
+ { 0x400d1, 0x0101 },
+ { 0x400d2, 0x0105 },
+ { 0x400d3, 0x0107 },
+ { 0x400d4, 0x010f },
+ { 0x400d5, 0x0202 },
+ { 0x400d6, 0x020a },
+ { 0x400d7, 0x020b },
+ { 0x2003a, 2 },
+ { 0x2000b, 0x64 },
+ { 0x2000c, 0xc8 },
+ { 0x2000d, 0x07d0 },
+ { 0x2000e, 0x2c },
+ { 0x12000b, 0x14 },
+ { 0x12000c, 0x29 },
+ { 0x12000d, 0x01a1 },
+ { 0x12000e, 0x10 },
+ { 0x9000c, 0 },
+ { 0x9000d, 0x0173 },
+ { 0x9000e, 0x60 },
+ { 0x9000f, 0x6110 },
+ { 0x90010, 0x2152 },
+ { 0x90011, 0xdfbd },
+ { 0x90012, 0x60 },
+ { 0x90013, 0x6152 },
+ { 0x20010, 0x5a },
+ { 0x20011, 3 },
+ { 0x40080, 0xe0 },
+ { 0x40081, 0x12 },
+ { 0x40082, 0xe0 },
+ { 0x40083, 0x12 },
+ { 0x40084, 0xe0 },
+ { 0x40085, 0x12 },
+ { 0x140080, 0xe0 },
+ { 0x140081, 0x12 },
+ { 0x140082, 0xe0 },
+ { 0x140083, 0x12 },
+ { 0x140084, 0xe0 },
+ { 0x140085, 0x12 },
+ { 0x400fd, 0x0f },
+ { 0x10011, 1 },
+ { 0x10012, 1 },
+ { 0x10013, 0x0180 },
+ { 0x10018, 1 },
+ { 0x10002, 0x6209 },
+ { 0x100b2, 1 },
+ { 0x101b4, 1 },
+ { 0x102b4, 1 },
+ { 0x103b4, 1 },
+ { 0x104b4, 1 },
+ { 0x105b4, 1 },
+ { 0x106b4, 1 },
+ { 0x107b4, 1 },
+ { 0x108b4, 1 },
+ { 0x11011, 1 },
+ { 0x11012, 1 },
+ { 0x11013, 0x0180 },
+ { 0x11018, 1 },
+ { 0x11002, 0x6209 },
+ { 0x110b2, 1 },
+ { 0x111b4, 1 },
+ { 0x112b4, 1 },
+ { 0x113b4, 1 },
+ { 0x114b4, 1 },
+ { 0x115b4, 1 },
+ { 0x116b4, 1 },
+ { 0x117b4, 1 },
+ { 0x118b4, 1 },
+ { 0x12011, 1 },
+ { 0x12012, 1 },
+ { 0x12013, 0x0180 },
+ { 0x12018, 1 },
+ { 0x12002, 0x6209 },
+ { 0x120b2, 1 },
+ { 0x121b4, 1 },
+ { 0x122b4, 1 },
+ { 0x123b4, 1 },
+ { 0x124b4, 1 },
+ { 0x125b4, 1 },
+ { 0x126b4, 1 },
+ { 0x127b4, 1 },
+ { 0x128b4, 1 },
+ { 0x13011, 1 },
+ { 0x13012, 1 },
+ { 0x13013, 0x0180 },
+ { 0x13018, 1 },
+ { 0x13002, 0x6209 },
+ { 0x130b2, 1 },
+ { 0x131b4, 1 },
+ { 0x132b4, 1 },
+ { 0x133b4, 1 },
+ { 0x134b4, 1 },
+ { 0x135b4, 1 },
+ { 0x136b4, 1 },
+ { 0x137b4, 1 },
+ { 0x138b4, 1 },
+ { 0x2003a, 2 },
+ { 0xc0080, 2 },
+ { 0xd0000, 1 }
+};
+
+static struct dram_fsp_msg mnt_reform_lpddr4_dram_fsp_msg[] = {
+ {
+ /* P0 3200mts 1D */
+ .drate = 3200,
+ .fw_type = FW_1D_IMAGE,
+ .fsp_cfg = lpddr4_fsp0_cfg,
+ .fsp_cfg_num = ARRAY_SIZE(lpddr4_fsp0_cfg),
+ },
+ {
+ /* P1 667mts 1D */
+ .drate = 667,
+ .fw_type = FW_1D_IMAGE,
+ .fsp_cfg = lpddr4_fsp1_cfg,
+ .fsp_cfg_num = ARRAY_SIZE(lpddr4_fsp1_cfg),
+ },
+ {
+ /* P0 3200mts 2D */
+ .drate = 3200,
+ .fw_type = FW_2D_IMAGE,
+ .fsp_cfg = lpddr4_fsp0_2d_cfg,
+ .fsp_cfg_num = ARRAY_SIZE(lpddr4_fsp0_2d_cfg),
+ },
+};
+
+/* ddr timing config params */
+struct dram_timing_info mnt_reform_dram_timing = {
+ .ddrc_cfg = mnt_reform_lpddr4_ddrc_cfg,
+ .ddrc_cfg_num = ARRAY_SIZE(mnt_reform_lpddr4_ddrc_cfg),
+ .ddrphy_cfg = mnt_reform_lpddr4_ddrphy_cfg,
+ .ddrphy_cfg_num = ARRAY_SIZE(mnt_reform_lpddr4_ddrphy_cfg),
+ .fsp_msg = mnt_reform_lpddr4_dram_fsp_msg,
+ .fsp_msg_num = ARRAY_SIZE(mnt_reform_lpddr4_dram_fsp_msg),
+ .ddrphy_pie = mnt_reform_lpddr4_phy_pie,
+ .ddrphy_pie_num = ARRAY_SIZE(mnt_reform_lpddr4_phy_pie),
+ .fsp_table = { 3200, 667, },
+};
diff --git a/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c b/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c
index 8d6cc389ba..e7c01f9cc9 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <soc/imx8m/ddr.h>
+
+#define DDR_ONE_RANK
#include <soc/imx8m/lpddr4_define.h>
static struct dram_cfg_param lpddr4_ddrc_cfg[] = {
diff --git a/arch/arm/boards/qemu-virt/.gitignore b/arch/arm/boards/qemu-virt/.gitignore
new file mode 100644
index 0000000000..5d65b54bf1
--- /dev/null
+++ b/arch/arm/boards/qemu-virt/.gitignore
@@ -0,0 +1 @@
+*.dtb*
diff --git a/arch/arm/boards/qemu-virt/Makefile b/arch/arm/boards/qemu-virt/Makefile
index dcfc2937d3..8451c7832d 100644
--- a/arch/arm/boards/qemu-virt/Makefile
+++ b/arch/arm/boards/qemu-virt/Makefile
@@ -1 +1,2 @@
obj-y += board.o
+obj-y += overlay-of-flash.dtb.o
diff --git a/arch/arm/boards/qemu-virt/board.c b/arch/arm/boards/qemu-virt/board.c
index 3aeea1a017..9d8c90eb5b 100644
--- a/arch/arm/boards/qemu-virt/board.c
+++ b/arch/arm/boards/qemu-virt/board.c
@@ -5,7 +5,41 @@
*/
#include <common.h>
#include <init.h>
+#include <of.h>
#include <asm/system_info.h>
+#include <asm/barebox-arm.h>
+
+extern char __dtb_overlay_of_flash_start[];
+
+static int replace_dtb(void) {
+ struct device_node *overlay;
+ void *fdt;
+ struct device_node *root;
+
+ fdt = barebox_arm_boot_dtb();
+ if (fdt)
+ pr_debug("using boarddata provided DTB\n");
+
+ if (!fdt) {
+ pr_debug("No DTB found\n");
+ return 0;
+ }
+
+ root = of_unflatten_dtb(fdt);
+
+ if (!of_device_is_compatible(root, "linux,dummy-virt")) {
+ of_delete_node(root);
+ return 0;
+ }
+
+ overlay = of_unflatten_dtb(__dtb_overlay_of_flash_start);
+ of_overlay_apply_tree(root, overlay);
+ barebox_register_of(root);
+
+ return 0;
+}
+
+pure_initcall(replace_dtb);
static int virt_probe(struct device_d *dev)
{
diff --git a/arch/arm/boards/qemu-virt/overlay-of-flash.dts b/arch/arm/boards/qemu-virt/overlay-of-flash.dts
new file mode 100644
index 0000000000..e00dc5d7e2
--- /dev/null
+++ b/arch/arm/boards/qemu-virt/overlay-of-flash.dts
@@ -0,0 +1,97 @@
+/dts-v1/;
+/plugin/;
+/ {
+ fragment@0 {
+ target-path = "/flash@0";
+ __overlay__ {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "initramfs";
+ reg = <0x0 0x3c00000>;
+ };
+
+ environment_flash: partition@3c00000 {
+ label = "barebox-environment";
+ reg = <0x3c00000 0x200000>;
+ };
+
+ backend_state_flash: partition@3e00000 {
+ label = "barebox-state";
+ reg = <0x3e00000 0x200000>;
+ };
+ };
+ };
+ };
+ fragment@1 {
+ target-path="/";
+ __overlay__ {
+ chosen {
+ environment {
+ compatible = "barebox,environment";
+ device-path = "/flash@0/partitions/partition@3c00000";
+ };
+ };
+ aliases {
+ state = "/state";
+ };
+
+ state {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "barebox,state";
+ magic = <0x290cf8c6>;
+ backend-type = "raw";
+ backend = < &backend_state_flash >;
+ backend-stridesize = <0x200>;
+
+ bootstate {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ system0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ remaining_attempts@0 {
+ reg = <0x0 0x4>;
+ type = "uint32";
+ default = <3>;
+ };
+
+ priority@4 {
+ reg = <0x4 0x4>;
+ type = "uint32";
+ default = <20>;
+ };
+ };
+
+ system1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ remaining_attempts@8 {
+ reg = <0x8 0x4>;
+ type = "uint32";
+ default = <3>;
+ };
+
+ priority@c {
+ reg = <0xc 0x4>;
+ type = "uint32";
+ default = <21>;
+ };
+ };
+
+ last_chosen@10 {
+ reg = <0x10 0x4>;
+ type = "uint32";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index f17af2bb95..760e39b440 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -50,6 +50,7 @@ CONFIG_NET=y
CONFIG_NET_NFS=y
CONFIG_NET_NETCONSOLE=y
CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_OF_OVERLAY=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_DRIVER_NET_SMC91111=y
# CONFIG_SPI is not set
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index a1e0bb6a41..63bd73dfaa 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -169,5 +169,6 @@ lwl-$(CONFIG_MACH_WAGO_PFC_AM35XX) += am35xx-pfc-750_820x.dtb.o
lwl-$(CONFIG_MACH_LS1046ARDB) += fsl-ls1046a-rdb.dtb.o
lwl-$(CONFIG_MACH_TQMLS1046A) += fsl-tqmls1046a-mbls10xxa.dtb.o
lwl-$(CONFIG_MACH_ZEDBOARD) += zynq-zed.dtb.o
+lwl-$(CONFIG_MACH_MNT_REFORM) += imx8mq-mnt-reform2.dtb.o
clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo
diff --git a/arch/arm/dts/imx8mq-mnt-reform2.dts b/arch/arm/dts/imx8mq-mnt-reform2.dts
new file mode 100644
index 0000000000..4e80e00dd1
--- /dev/null
+++ b/arch/arm/dts/imx8mq-mnt-reform2.dts
@@ -0,0 +1,223 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2019-2020 MNT Research GmbH
+ * Copyright 2020 Lucas Stach <dev@lynxeye.de>
+ */
+
+/dts-v1/;
+
+#include <arm64/freescale/imx8mq.dtsi>
+#include "imx8mq.dtsi"
+#include "imx8mq-ddrc.dtsi"
+
+/ {
+ model = "MNT Reform2";
+ compatible = "mnt,reform2", "fsl,imx8mq";
+
+ chosen {
+ stdout-path = &uart1;
+
+ environment-emmc {
+ compatible = "barebox,environment";
+ device-path = &usdhc1, "partname:barebox-environment";
+ status = "disabled";
+ };
+
+ environment-sd {
+ compatible = "barebox,environment";
+ device-path = &usdhc2, "partname:barebox-environment";
+ status = "disabled";
+ };
+ };
+
+ pcie1_refclk: pcie1-refclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ };
+};
+
+&fec1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec1>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&ethphy0>;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy0: ethernet-phy@4 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <4>;
+ interrupts = <&gpio1 11 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ocotp {
+ barebox,provide-mac-address = <&fec1 0x640>;
+};
+
+&pcie1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie1>;
+ reset-gpio = <&gpio3 23 GPIO_ACTIVE_LOW>;
+ clocks = <&clk IMX8MQ_CLK_PCIE2_ROOT>,
+ <&clk IMX8MQ_CLK_PCIE2_AUX>,
+ <&clk IMX8MQ_CLK_PCIE2_PHY>,
+ <&pcie1_refclk>;
+ clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&usb3_phy0 {
+ status = "okay";
+};
+
+&usb3_phy1 {
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&usb_dwc3_1 {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&usdhc1 {
+ assigned-clocks = <&clk IMX8MQ_CLK_USDHC1>;
+ assigned-clock-rates = <400000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc1>;
+ bus-width = <8>;
+ no-mmc-hs400;
+ non-removable;
+ no-sd;
+ no-sdio;
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0xe0000>;
+ };
+
+ partition@e0000 {
+ label = "barebox-environment";
+ reg = <0xe0000 0x20000>;
+ };
+};
+
+&usdhc2 {
+ assigned-clocks = <&clk IMX8MQ_CLK_USDHC2>;
+ assigned-clock-rates = <200000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc2>;
+ bus-width = <4>;
+ no-1-8-v;
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0xe0000>;
+ };
+
+ partition@e0000 {
+ label = "barebox-environment";
+ reg = <0xe0000 0x20000>;
+ };
+};
+
+&wdog1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdog>;
+ fsl,ext-reset-output;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_fec1: fec1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_ENET_MDC_ENET1_MDC 0x3
+ MX8MQ_IOMUXC_ENET_MDIO_ENET1_MDIO 0x23
+ MX8MQ_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f
+ MX8MQ_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f
+ MX8MQ_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f
+ MX8MQ_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f
+ MX8MQ_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f
+ MX8MQ_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f
+ MX8MQ_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91
+ MX8MQ_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0xd1
+ MX8MQ_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91
+ MX8MQ_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91
+ MX8MQ_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91
+ MX8MQ_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0xd1
+ MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x1
+ MX8MQ_IOMUXC_GPIO1_IO11_GPIO1_IO11 0x1
+ >;
+ };
+
+ pinctrl_pcie1: pcie1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SAI5_RXD2_GPIO3_IO23 0x16
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX 0x45
+ MX8MQ_IOMUXC_UART1_TXD_UART1_DCE_TX 0x45
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x83
+ MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xc3
+ MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xc3
+ MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xc3
+ MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xc3
+ MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xc3
+ MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xc3
+ MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xc3
+ MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xc3
+ MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xc3
+ MX8MQ_IOMUXC_SD1_RESET_B_GPIO2_IO10 0x41
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x03
+ MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xc3
+ MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xc3
+ MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xc3
+ MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xc3
+ MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xc
+ >;
+ };
+
+ pinctrl_wdog: wdog1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ >;
+ };
+};
diff --git a/arch/arm/dts/imx8mq.dtsi b/arch/arm/dts/imx8mq.dtsi
index ec8347f38f..e56cdfe130 100644
--- a/arch/arm/dts/imx8mq.dtsi
+++ b/arch/arm/dts/imx8mq.dtsi
@@ -17,7 +17,9 @@
<&clk IMX8MQ_CLK_USDHC2>,
<&clk IMX8MQ_CLK_ENET_AXI>,
<&clk IMX8MQ_CLK_ENET_TIMER>,
- <&clk IMX8MQ_CLK_ENET_REF>;
+ <&clk IMX8MQ_CLK_ENET_REF>,
+ <&clk IMX8MQ_ARM_PLL>,
+ <&clk IMX8MQ_CLK_A53_DIV>;
assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_400M>,
<&clk IMX8MQ_SYS1_PLL_400M>,
@@ -29,5 +31,7 @@
<200000000>,
<266000000>,
<25000000>,
- <125000000>;
+ <125000000>,
+ <800000000>,
+ <800000000>;
};
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index f370160580..b509926d82 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -1,15 +1,9 @@
-/*
- * arch/arm/mach-at91/at91rm9200_devices.c
- *
- * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
- * Copyright (C) 2005 David Brownell
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2005 Thibaut VARENE <varenet@parisc-linux.org>
+// SPDX-FileCopyrightText: 2005 David Brownell
+
+/* arch/arm/mach-at91/at91rm9200_devices.c */
+
#include <common.h>
#include <gpio.h>
#include <asm/armlinux.h>
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index f89983fe63..ccbefbbc33 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -1,26 +1,6 @@
-/*
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Alex Zuepke <azu@sysgo.de>
- *
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2002 Sysgo Real-Time Solutions GmbH (http://www.elinos.com, Marius Groeger <mgroeger@sysgo.de>, Alex Zuepke <azu@sysgo.de>)
+// SPDX-FileCopyrightText: 2002 Gary Jennejohn <gj@denx.de>, DENX Software Engineering
#include <common.h>
#include <init.h>
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index eafcfeacf7..5ebe21c88a 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -1,14 +1,8 @@
-/*
- * arch/arm/mach-at91/at91sam9260_devices.c
- *
- * Copyright (C) 2006 Atmel
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2006 Atmel
+
+/* arch/arm/mach-at91/at91sam9260_devices.c */
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index fcf719a09a..dfde848aa3 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -1,14 +1,8 @@
-/*
- * arch/arm/mach-at91/at91sam9261_devices.c
- *
- * Copyright (C) 2006 Atmel
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2006 Atmel
+
+/* arch/arm/mach-at91/at91sam9261_devices.c */
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index c7e4962a93..0adf1ff0cb 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -1,14 +1,8 @@
-/*
- * arch/arm/mach-at91/at91sam9263_devices.c
- *
- * Copyright (C) 2006 Atmel
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2006 Atmel
+
+/* arch/arm/mach-at91/at91sam9263_devices.c */
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/at91sam9_reset.S b/arch/arm/mach-at91/at91sam9_reset.S
index ba3f768331..e50b5e13d5 100644
--- a/arch/arm/mach-at91/at91sam9_reset.S
+++ b/arch/arm/mach-at91/at91sam9_reset.S
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2010 BitBox Ltd */
+
/*
* reset AT91SAM9G20 as per errata
*
- * (C) BitBox Ltd 2010
- *
* unless the SDRAM is cleanly shutdown before we hit the
* reset register it can be left driving the data bus and
* killing the chance of a subsequent boot from NAND
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#include <linux/linkage.h>
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 389d88c17d..d55ab4f9ea 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -1,14 +1,8 @@
-/*
- * arch/arm/mach-at91/at91sam9263_devices.c
- *
- * Copyright (C) 2006 Atmel
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2006 Atmel
+
+/* arch/arm/mach-at91/at91sam9263_devices.c */
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/at91sam9n12_devices.c b/arch/arm/mach-at91/at91sam9n12_devices.c
index 91b3e9b2fb..ef432f8758 100644
--- a/arch/arm/mach-at91/at91sam9n12_devices.c
+++ b/arch/arm/mach-at91/at91sam9n12_devices.c
@@ -1,14 +1,8 @@
-/*
- * On-Chip devices setup code for the AT91SAM9x5 family
- *
- * Copyright (C) 2010 Atmel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2010 Atmel Corporation
+
+/* On-Chip devices setup code for the AT91SAM9x5 family */
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/at91sam9x5_devices.c b/arch/arm/mach-at91/at91sam9x5_devices.c
index 022e4fb59a..a2c9f3085c 100644
--- a/arch/arm/mach-at91/at91sam9x5_devices.c
+++ b/arch/arm/mach-at91/at91sam9x5_devices.c
@@ -1,14 +1,8 @@
-/*
- * On-Chip devices setup code for the AT91SAM9x5 family
- *
- * Copyright (C) 2010 Atmel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2010 Atmel Corporation
+
+/* On-Chip devices setup code for the AT91SAM9x5 family */
+
#include <common.h>
#include <linux/sizes.h>
#include <gpio.h>
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 9a58b243d8..8fe0115765 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -1,14 +1,8 @@
-/*
- * linux/arch/arm/mach-at91/clock.c
- *
- * Copyright (C) 2005 David Brownell
- * Copyright (C) 2005 Ivan Kokshaysky
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2005 David Brownell
+// SPDX-FileCopyrightText: 2005 Ivan Kokshaysky
+
+/* linux/arch/arm/mach-at91/clock.c */
#include <common.h>
#include <command.h>
diff --git a/arch/arm/mach-at91/clock.h b/arch/arm/mach-at91/clock.h
index 97a08fd83f..30297a20a0 100644
--- a/arch/arm/mach-at91/clock.h
+++ b/arch/arm/mach-at91/clock.h
@@ -1,10 +1,6 @@
-/*
- * linux/arch/arm/mach-at91/clock.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/* linux/arch/arm/mach-at91/clock.h */
#include <linux/clkdev.h>
diff --git a/arch/arm/mach-at91/ddramc_ll.c b/arch/arm/mach-at91/ddramc_ll.c
index 4768fdcd62..77d03720cc 100644
--- a/arch/arm/mach-at91/ddramc_ll.c
+++ b/arch/arm/mach-at91/ddramc_ll.c
@@ -12,7 +12,7 @@
void at91_ddram_initialize(void __iomem *base_address,
void __iomem *ram_address,
- struct at91_ddramc_register *ddramc_config)
+ const struct at91_ddramc_register *ddramc_config)
{
unsigned long ba_offset;
unsigned long cr = 0;
@@ -235,7 +235,7 @@ void at91_ddram_initialize(void __iomem *base_address,
void at91_lpddr2_sdram_initialize(void __iomem *base_address,
void __iomem *ram_address,
- struct at91_ddramc_register *ddramc_config)
+ const struct at91_ddramc_register *ddramc_config)
{
unsigned long reg;
@@ -386,7 +386,7 @@ void at91_lpddr2_sdram_initialize(void __iomem *base_address,
void at91_lpddr1_sdram_initialize(void __iomem *base_address,
void __iomem *ram_address,
- struct at91_ddramc_register *ddramc_config)
+ const struct at91_ddramc_register *ddramc_config)
{
unsigned long ba_offset;
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index d125e5ffd0..cdc1b7598a 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -1,12 +1,7 @@
-/*
- * linux/arch/arm/mach-at91/generic.h
- *
- * Copyright (C) 2005 David Brownell
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* SPDX-FileCopyrightText: 2005 David Brownell */
+
+/* linux/arch/arm/mach-at91/generic.h */
/* function called by setup to perform late init */
extern void (*at91_boot_soc)(void);
diff --git a/arch/arm/mach-at91/include/mach/at91_dbgu.h b/arch/arm/mach-at91/include/mach/at91_dbgu.h
index 29aaa2dfe1..f79175c5e9 100644
--- a/arch/arm/mach-at91/include/mach/at91_dbgu.h
+++ b/arch/arm/mach-at91/include/mach/at91_dbgu.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* arch/arm/mach-at91/include/mach/at91_dbgu.h
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
* Debug Unit (DBGU) - System peripherals registers.
* Based on AT91RM9200 datasheet revision E and SAMA5D3 datasheet revision B.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_DBGU_H
diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h b/arch/arm/mach-at91/include/mach/at91_pio.h
index 0f129c9975..61cff83c73 100644
--- a/arch/arm/mach-at91/include/mach/at91_pio.h
+++ b/arch/arm/mach-at91/include/mach/at91_pio.h
@@ -1,18 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+/* SPDX-FileCopyrightText: 2015 Atmel */
+/* SPDX-FileCopyrightText: 2015 Ludovic Desroches <ludovic.desroches@atmel.com> */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91_pio.h]
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- * Copyright (C) 2015 Atmel,
- * 2015 Ludovic Desroches <ludovic.desroches@atmel.com>
- *
* Parallel I/O Controller (PIO) - System peripherals registers.
* Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_PIO_H
diff --git a/arch/arm/mach-at91/include/mach/at91_pit.h b/arch/arm/mach-at91/include/mach/at91_pit.h
index 8581efacb9..4cdeeb4871 100644
--- a/arch/arm/mach-at91/include/mach/at91_pit.h
+++ b/arch/arm/mach-at91/include/mach/at91_pit.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Andrew Victor */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91_pit.h]
*
- * Copyright (C) 2007 Andrew Victor
- * Copyright (C) 2007 Atmel Corporation.
- *
* Periodic Interval Timer (PIT) - System peripherals regsters.
* Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_PIT_H
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h
index 66b4e49286..2860ea4854 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* [origin: Linux kernel arch/arm/mach-at91/include/mach/at91_pmc.h]
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
* Power Management Controller (PMC) - System peripherals registers.
* Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_PMC_H
diff --git a/arch/arm/mach-at91/include/mach/at91_rstc.h b/arch/arm/mach-at91/include/mach/at91_rstc.h
index d67bed5213..1dc665b877 100644
--- a/arch/arm/mach-at91/include/mach/at91_rstc.h
+++ b/arch/arm/mach-at91/include/mach/at91_rstc.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Andrew Victor */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91_rstc.h]
*
- * Copyright (C) 2007 Andrew Victor
- * Copyright (C) 2007 Atmel Corporation.
- *
* Reset Controller (RSTC) - System peripherals regsters.
* Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_RSTC_H
diff --git a/arch/arm/mach-at91/include/mach/at91_rtt.h b/arch/arm/mach-at91/include/mach/at91_rtt.h
index ad29df1918..b4197665dd 100644
--- a/arch/arm/mach-at91/include/mach/at91_rtt.h
+++ b/arch/arm/mach-at91/include/mach/at91_rtt.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Andrew Victor */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* arch/arm/mach-at91/include/mach/at91_rtt.h
*
- * Copyright (C) 2007 Andrew Victor
- * Copyright (C) 2007 Atmel Corporation.
- *
* Real-time Timer (RTT) - System peripherals regsters.
* Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_RTT_H
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h
index 01f5d23e0c..4d6c8939ef 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200.h
+++ b/arch/arm/mach-at91/include/mach/at91rm9200.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* [origin: Linux kernel arch/arm/mach-at91/include/mach/at91rm9200.h]
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
* Common definitions.
* Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91RM9200_H
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_emac.h b/arch/arm/mach-at91/include/mach/at91rm9200_emac.h
index 74244520e6..5de0349433 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200_emac.h
+++ b/arch/arm/mach-at91/include/mach/at91rm9200_emac.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* [origin: arch/arm/mach-at91/include/mach/at91rm9200_emac.h]
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
* Ethernet MAC registers.
* Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91RM9200_EMAC_H
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_mc.h b/arch/arm/mach-at91/include/mach/at91rm9200_mc.h
index 03e1b87f5f..41ee1caba7 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200_mc.h
+++ b/arch/arm/mach-at91/include/mach/at91rm9200_mc.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* arch/arm/mach-at91/include/mach/at91rm9200_mc.h
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
* Memory Controllers (MC, EBI, SMC, SDRAMC, BFC) - System peripherals registers.
* Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91RM9200_MC_H
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_st.h b/arch/arm/mach-at91/include/mach/at91rm9200_st.h
index bd676a7081..67bcfaa13b 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200_st.h
+++ b/arch/arm/mach-at91/include/mach/at91rm9200_st.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 Ivan Kokshaysky */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* arch/arm/mach-at91/include/mach/at91_st.h
*
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
* System Timer (ST) - System peripherals registers.
* Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91RM9200_ST_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 708e661b4d..1375872ce2 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2006 Andrew Victor */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9260.h]
*
- * (C) 2006 Andrew Victor
- *
* Common definitions.
* Based on AT91SAM9260 datasheet revision A (Preliminary).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9260_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
index 792afa39b7..fb5e76bb51 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
*
- * Copyright (C) 2007 Atmel Corporation.
- *
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9260 datasheet revision B.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9260_MATRIX_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
index df948d3e72..fa42907473 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: SAN People */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9261.h]
*
- * Copyright (C) SAN People
- *
* Common definitions.
* Based on AT91SAM9261 datasheet revision E. (Preliminary)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9261_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
index 63e92ccd22..dda9cef945 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9261_matrix.h]
*
- * Copyright (C) 2007 Atmel Corporation.
- *
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9261_MATRIX_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h
index a357ea83fe..2ea9aadafa 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9263.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9263.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9263.h]
*
- * (C) 2007 Atmel Corporation.
- *
* Common definitions.
* Based on AT91SAM9263 datasheet revision B (Preliminary).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9263_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
index 0082666cd3..2f10ce096e 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2006 Atmel Corporation */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9263_matrix.h]
*
- * Copyright (C) 2006 Atmel Corporation.
- *
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9263 datasheet revision B (Preliminary).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9263_MATRIX_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
index 7bd887c8cb..80effe2148 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
@@ -1,17 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> */
+/* SPDX-FileCopyrightText: 2007 Andrew Victor */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* [origin: Linux kernel arch/arm/mach-at91/include/mach/at91_wdt.h]
*
- * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- * Copyright (C) 2007 Andrew Victor
- * Copyright (C) 2007 Atmel Corporation.
- *
* SDRAM Controllers (SDRAMC) - System peripherals registers.
* Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9_SDRAMC_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
index 0908f6df25..d23ea52bce 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_smc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
@@ -1,16 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2007 Andrew Victor */
+/* SPDX-FileCopyrightText: 2007 Atmel Corporation */
+
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9_smc.h]
*
- * Copyright (C) 2007 Andrew Victor
- * Copyright (C) 2007 Atmel Corporation.
- *
* Static Memory Controllers (SMC) - System peripherals registers.
* Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9_SMC_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h
index f79df0b8c3..d7596930d2 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2008-2009 Atmel Corporation */
+
/*
* Chip-specific header file for the AT91SAM9G45 family
*
- * Copyright (C) 2008-2009 Atmel Corporation.
- *
* Common definitions.
* Based on AT91SAM9G45 preliminary datasheet.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9G45_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
index 53f50fef8f..239e11df3d 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2008-2009 Atmel Corporation */
+
/*
* Matrix-centric header file for the AT91SAM9G45 family
*
- * Copyright (C) 2008-2009 Atmel Corporation.
- *
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9G45 preliminary datasheet.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9G45_MATRIX_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12.h b/arch/arm/mach-at91/include/mach/at91sam9n12.h
index dd9c0fc4e0..b68a529b05 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9n12.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9n12.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2011 Atmel Corporation */
+
/*
* Chip-specific header file for the AT91SAM9N12 SoC
*
- * Copyright (C) 2011 Atmel Corporation
- *
* Common definitions.
* Based on AT91SAM9N12 preliminary datasheet
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef __MACH_AT91SAM9N12_H_
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
index bdb0211abc..43f255808f 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2011 Atmel Corporation */
+
/*
* Matrix-Centric header file for the AT91SAM9N12 SoC
*
- * Copyright (C) 2011 Atmel Corporation
- *
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9N12 preliminary datasheet.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef _AT91SAM9N12_MATRIX_H_
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h
index f9d54df601..00bef3456a 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9x5.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2009-2010 Atmel Corporation */
+
/*
* Chip-specific header file for the AT91SAM9x5 family
*
- * Copyright (C) 2009-2010 Atmel Corporation.
- *
* Common definitions.
* Based on AT91SAM9x5 preliminary datasheet.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9X5_H
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
index fca7646d35..2ab211c012 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
@@ -1,15 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2009-2010 Atmel Corporation */
+
/*
* Matrix-centric header file for the AT91SAM9x5 family
*
- * Copyright (C) 2009-2010 Atmel Corporation.
- *
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9x5 preliminary datasheet.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91SAM9X5_MATRIX_H
diff --git a/arch/arm/mach-at91/include/mach/atmel_hlcdc.h b/arch/arm/mach-at91/include/mach/atmel_hlcdc.h
index e1aa693818..a44160431e 100644
--- a/arch/arm/mach-at91/include/mach/atmel_hlcdc.h
+++ b/arch/arm/mach-at91/include/mach/atmel_hlcdc.h
@@ -1,21 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2010 Atmel Corporation */
+
/*
- * Header file for AT91 High end LCD Controller
- *
- * Data structure and register user interface
- *
- * Copyright (C) 2010 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PUROFFSETE. See the
- * GNU General Public License for more details.
+ * Header file for AT91 High end LCD Controller
*
+ * Data structure and register user interface
*/
+
#ifndef __MACH_ATMEL_HLCD_H__
#define __MACH_ATMEL_HLCD_H__
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 033341e270..754a6b7c5e 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -1,19 +1,7 @@
-/*
- * [origin Linux: arch/arm/mach-at91/include/mach/board.h]
- *
- * Copyright (C) 2005 HP Labs
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 HP Labs */
+
+/* [origin Linux: arch/arm/mach-at91/include/mach/board.h] */
#ifndef __ASM_ARCH_BOARD_H
#define __ASM_ARCH_BOARD_H
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index fa25a4783b..37e516947b 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -1,15 +1,8 @@
-/*
- * arch/arm/mach-at91/include/mach/cpu.h
- *
- * Copyright (C) 2006 SAN People
- * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2006 SAN People */
+/* SPDX-FileCopyrightText: 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> */
+
+/* arch/arm/mach-at91/include/mach/cpu.h */
#ifndef __MACH_CPU_H__
#define __MACH_CPU_H__
diff --git a/arch/arm/mach-at91/include/mach/ddramc.h b/arch/arm/mach-at91/include/mach/ddramc.h
index b929bf5f58..5d6f3a70b7 100644
--- a/arch/arm/mach-at91/include/mach/ddramc.h
+++ b/arch/arm/mach-at91/include/mach/ddramc.h
@@ -21,16 +21,16 @@ struct at91_ddramc_register {
void at91_ddram_initialize(void __iomem *base_address,
void __iomem *ram_address,
- struct at91_ddramc_register *ddramc_config);
+ const struct at91_ddramc_register *ddramc_config);
void at91_lpddr2_sdram_initialize(void __iomem *base_address,
void __iomem *ram_address,
- struct at91_ddramc_register *ddramc_config);
+ const struct at91_ddramc_register *ddramc_config);
void at91_lpddr1_sdram_initialize(void __iomem *base_address,
void __iomem *ram_address,
- struct at91_ddramc_register *ddramc_config);
+ const struct at91_ddramc_register *ddramc_config);
void __noreturn sama5d2_barebox_entry(unsigned int r4, void *boarddata);
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
index 3ae54247e0..0d08a99fe4 100644
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ b/arch/arm/mach-at91/include/mach/hardware.h
@@ -1,15 +1,8 @@
-/*
- * [origin: Linux kernel include/asm-arm/arch-at91/hardware.h]
- *
- * Copyright (C) 2003 SAN People
- * Copyright (C) 2003 ATMEL
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2003 SAN People */
+/* SPDX-FileCopyrightText: 2003 ATMEL */
+
+/* [origin: Linux kernel include/asm-arm/arch-at91/hardware.h] */
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
diff --git a/arch/arm/mach-at91/include/mach/iomux.h b/arch/arm/mach-at91/include/mach/iomux.h
index 0c91b22a8f..bdd34bed94 100644
--- a/arch/arm/mach-at91/include/mach/iomux.h
+++ b/arch/arm/mach-at91/include/mach/iomux.h
@@ -1,14 +1,7 @@
-/*
- * [origin: Linux kernel include/asm-arm/arch-at91/gpio.h]
- *
- * Copyright (C) 2005 HP Labs
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* SPDX-FileCopyrightText: 2005 HP Labs */
+
+/* [origin: Linux kernel include/asm-arm/arch-at91/gpio.h] */
#ifndef __ASM_ARCH_AT91_GPIO_H
#define __ASM_ARCH_AT91_GPIO_H
diff --git a/arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h b/arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h
index 35c92c43fc..6a75ac71fc 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h
+++ b/arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h
@@ -11,7 +11,7 @@
static inline void sama5d2_d1g_ddrconf(void) /* DDR2 1Gbit SDRAM */
{
- struct at91_ddramc_register conf = {
+ const struct at91_ddramc_register conf = {
.mdr = AT91_DDRC2_DBW_16_BITS | AT91_DDRC2_MD_DDR2_SDRAM,
.cr = AT91_DDRC2_NC_DDR10_SDR9 | AT91_DDRC2_NR_13 |
diff --git a/arch/arm/mach-at91/include/mach/sama5d2_ll.h b/arch/arm/mach-at91/include/mach/sama5d2_ll.h
index 96f3bc5452..244b1a7065 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2_ll.h
+++ b/arch/arm/mach-at91/include/mach/sama5d2_ll.h
@@ -25,7 +25,7 @@ static inline void sama5d2_udelay_init(unsigned int msc)
}
-void sama5d2_ddr2_init(struct at91_ddramc_register *ddramc_reg_config);
+void sama5d2_ddr2_init(const struct at91_ddramc_register *ddramc_reg_config);
static inline int sama5d2_pmc_enable_generic_clock(unsigned int periph_id,
unsigned int clk_source,
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
index 813c2a0d94..66261a95ee 100644
--- a/arch/arm/mach-at91/sam9_smc.c
+++ b/arch/arm/mach-at91/sam9_smc.c
@@ -1,12 +1,7 @@
-/*
- * linux/arch/arm/mach-at91/sam9_smc.c
- *
- * Copyright (C) 2008 Andrew Victor
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
+// SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: 2008 Andrew Victor
+
+/* linux/arch/arm/mach-at91/sam9_smc.c */
#include <common.h>
#include <init.h>
diff --git a/arch/arm/mach-at91/sama5d2_ll.c b/arch/arm/mach-at91/sama5d2_ll.c
index c3b5061777..3366a50e8f 100644
--- a/arch/arm/mach-at91/sama5d2_ll.c
+++ b/arch/arm/mach-at91/sama5d2_ll.c
@@ -18,7 +18,7 @@
#define sama5d2_pmc_write(off, val) writel(val, SAMA5D2_BASE_PMC + off)
#define sama5d2_pmc_read(off) readl(SAMA5D2_BASE_PMC + off)
-void sama5d2_ddr2_init(struct at91_ddramc_register *ddramc_reg_config)
+void sama5d2_ddr2_init(const struct at91_ddramc_register *ddramc_reg_config)
{
unsigned int reg;
diff --git a/arch/arm/mach-at91/sama5d3_devices.c b/arch/arm/mach-at91/sama5d3_devices.c
index e29ed2ba97..75f588deff 100644
--- a/arch/arm/mach-at91/sama5d3_devices.c
+++ b/arch/arm/mach-at91/sama5d3_devices.c
@@ -1,14 +1,8 @@
-/*
- * On-Chip devices setup code for the AT91SAM9x5 family
- *
- * Copyright (C) 2010 Atmel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2010 Atmel Corporation
+
+/* On-Chip devices setup code for the AT91SAM9x5 family */
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/sama5d4_devices.c b/arch/arm/mach-at91/sama5d4_devices.c
index 7be9e260d4..6af1d3a4de 100644
--- a/arch/arm/mach-at91/sama5d4_devices.c
+++ b/arch/arm/mach-at91/sama5d4_devices.c
@@ -1,14 +1,7 @@
-/*
- * On-Chip devices setup code for the SAMA5D4 family
- *
- * Copyright (C) 2014 Atmel Corporation.
- * Bo Shen <voice.shen@atmel.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2014 Atmel Corporation (Bo Shen <voice.shen@atmel.com>)
+
+/* On-Chip devices setup code for the SAMA5D4 family */
#include <common.h>
#include <init.h>
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index dd49537fd5..3f8012c732 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -583,6 +583,15 @@ config MACH_WEBASTO_CCBV2
select ARCH_IMX6UL
select ARM_USE_COMPRESSED_DTB
+config MACH_MNT_REFORM
+ bool "MNT Reform"
+ select ARCH_IMX8MQ
+ select FIRMWARE_IMX_LPDDR4_PMU_TRAIN
+ select FIRMWARE_IMX8MQ_ATF
+ select ARM_SMCCC
+ select MCI_IMX_ESDHC_PBL
+ select I2C_IMX_EARLY
+
endif
# ----------------------------------------------------------
diff --git a/arch/arm/mach-imx/include/mach/imx7-ccm-regs.h b/arch/arm/mach-imx/include/mach/imx7-ccm-regs.h
index de6eb1bbd1..5c60794ca7 100644
--- a/arch/arm/mach-imx/include/mach/imx7-ccm-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx7-ccm-regs.h
@@ -3,6 +3,7 @@
#define IMX7_CCM_CCGR_UART1 148
#define IMX7_CCM_CCGR_UART2 149
+#define IMX7_CCM_CCGR_UART3 150
#define IMX7_CLOCK_ROOT_INDEX(x) (((x) - 0x8000) / 128)
@@ -16,6 +17,9 @@
#define IMX7_UART2_CLK_ROOT IMX7_CLOCK_ROOT_INDEX(0xb000)
#define IMX7_UART2_CLK_ROOT__OSC_24M IMX7_CCM_TARGET_ROOTn_MUX(0b000)
+#define IMX7_UART3_CLK_ROOT IMX7_CLOCK_ROOT_INDEX(0xb080)
+#define IMX7_UART3_CLK_ROOT__OSC_24M IMX7_CCM_TARGET_ROOTn_MUX(0b000)
+
/* 0 <= n <= 190 */
#define IMX7_CCM_CCGRn_SET(n) (0x4004 + 16 * (n))
#define IMX7_CCM_CCGRn_CLR(n) (0x4008 + 16 * (n))
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8mq.h b/arch/arm/mach-imx/include/mach/iomux-mx8mq.h
index d397e975c0..b6efdda4ff 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8mq.h
+++ b/arch/arm/mach-imx/include/mach/iomux-mx8mq.h
@@ -623,6 +623,23 @@ enum {
IMX8MQ_PAD_UART4_TXD__GPIO5_IO29 = IOMUX_PAD(0x04B8, 0x0250, 5, 0x0000, 0, 0),
};
+#define MX8MQ_PAD_CTL_DSE_HIZ (0 << 0)
+#define MX8MQ_PAD_CTL_DSE_255R (1 << 0)
+#define MX8MQ_PAD_CTL_DSE_155R (2 << 0)
+#define MX8MQ_PAD_CTL_DSE_75R (3 << 0)
+#define MX8MQ_PAD_CTL_DSE_85R (4 << 0)
+#define MX8MQ_PAD_CTL_DSE_65R (5 << 0)
+#define MX8MQ_PAD_CTL_DSE_45R (6 << 0)
+#define MX8MQ_PAD_CTL_DSE_40R (7 << 0)
+#define MX8MQ_PAD_CTL_SR_50M (0 << 3)
+#define MX8MQ_PAD_CTL_SR_100M (1 << 3)
+#define MX8MQ_PAD_CTL_SR_150M (2 << 3)
+#define MX8MQ_PAD_CTL_SR_200M (3 << 3)
+#define MX8MQ_PAD_CTL_ODE BIT(5)
+#define MX8MQ_PAD_CTL_PUE BIT(6)
+#define MX8MQ_PAD_CTL_HYS BIT(7)
+#define MX8MQ_PAD_CTL_LVTTL BIT(8)
+
static inline void imx8mq_setup_pad(iomux_v3_cfg_t pad)
{
void __iomem *iomux = IOMEM(MX8MQ_IOMUXC_BASE_ADDR);
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 9d301f7ae8..557c9653f4 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -11,5 +11,6 @@ config MACH_VIRT
bool "QEMU virt"
select ARM_PSCI_CLIENT
select BOARD_ARM_GENERIC_DT
+ select OF_OVERLAY
endif
diff --git a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
index cbaf5ab39e..24ce0d0d67 100644
--- a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
+++ b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
@@ -7,6 +7,8 @@
};
chosen {
+ stdout-path = &uart;
+
environment {
compatible = "barebox,environment";
device-path = &spiflash, "partname:barebox-environment";
diff --git a/arch/mips/dts/ar9331-okud-max9331.dts b/arch/mips/dts/ar9331-okud-max9331.dts
index 53350899f9..3b93bee93b 100644
--- a/arch/mips/dts/ar9331-okud-max9331.dts
+++ b/arch/mips/dts/ar9331-okud-max9331.dts
@@ -17,6 +17,8 @@
};
chosen {
+ stdout-path = &uart;
+
environment {
compatible = "barebox,environment";
device-path = &spiflash, "partname:barebox-environment";
diff --git a/arch/mips/dts/ar9331-openembed-som9331-board.dts b/arch/mips/dts/ar9331-openembed-som9331-board.dts
index ff9d25e352..4736332f8f 100644
--- a/arch/mips/dts/ar9331-openembed-som9331-board.dts
+++ b/arch/mips/dts/ar9331-openembed-som9331-board.dts
@@ -33,6 +33,8 @@
chosen {
+ stdout-path = &uart;
+
environment {
compatible = "barebox,environment";
device-path = &spiflash, "partname:barebox-environment";