Skip to content

Commit 75891e5

Browse files
committed
LSDK-19.09 u-boot support
u-boot patches split into lsdk-19.06 and lsdk-19.09 and added patch 0015-.... that adds the support to lsdk-19.09. Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
1 parent 0704752 commit 75891e5

File tree

29 files changed

+4067
-0
lines changed

29 files changed

+4067
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
From 94e3a159d46ffb7f3e3186486dd74293cc33326f Mon Sep 17 00:00:00 2001
2+
From: Rabeeh Khoury <rabeeh@solid-run.com>
3+
Date: Sun, 28 Jul 2019 13:26:45 +0300
4+
Subject: [PATCH 1/6] armv8: add lx2160acex7 build inclusion
5+
6+
Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
7+
---
8+
arch/arm/Kconfig | 13 +++++++++++++
9+
arch/arm/cpu/armv8/Kconfig | 2 +-
10+
arch/arm/dts/Makefile | 3 ++-
11+
3 files changed, 16 insertions(+), 2 deletions(-)
12+
13+
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
14+
index 958d048971..d439d42a4a 100644
15+
--- a/arch/arm/Kconfig
16+
+++ b/arch/arm/Kconfig
17+
@@ -1101,6 +1101,18 @@ config TARGET_LX2160ARDB
18+
is a high-performance development platform that supports the
19+
QorIQ LX2160A/LX2120A/LX2080A Layerscape Architecture processor.
20+
21+
+config TARGET_LX2160ACEX7
22+
+ bool "Support lx2160acex7"
23+
+ select ARCH_LX2160A
24+
+ select ARCH_MISC_INIT
25+
+ select ARM64
26+
+ select ARMV8_MULTIENTRY
27+
+ select BOARD_LATE_INIT
28+
+ help
29+
+ Support for SolidRun LX2160A based com express type 7 module and
30+
+ platform. The lx2160acex7 high-performance platform that supports the
31+
+ QorIQ LX2160A/LX2120A/LX2080A Layerscape Architecture processor.
32+
+
33+
config TARGET_LX2160AQDS
34+
bool "Support lx2160aqds"
35+
select ARCH_LX2160A
36+
@@ -1635,6 +1647,7 @@ source "board/freescale/ls1012aqds/Kconfig"
37+
source "board/freescale/ls1012ardb/Kconfig"
38+
source "board/freescale/ls1012afrdm/Kconfig"
39+
source "board/freescale/lx2160a/Kconfig"
40+
+source "board/solidrun/lx2160a/Kconfig"
41+
source "board/freescale/mx35pdk/Kconfig"
42+
source "board/freescale/s32v234evb/Kconfig"
43+
source "board/grinn/chiliboard/Kconfig"
44+
diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
45+
index 92a2b58ed4..9df6ebdc1b 100644
46+
--- a/arch/arm/cpu/armv8/Kconfig
47+
+++ b/arch/arm/cpu/armv8/Kconfig
48+
@@ -109,7 +109,7 @@ config PSCI_RESET
49+
!TARGET_LS1046ARDB && !TARGET_LS1046AQDS && \
50+
!TARGET_LS1046AFRWY && \
51+
!TARGET_LS2081ARDB && !TARGET_LX2160ARDB && \
52+
- !TARGET_LX2160AQDS && \
53+
+ !TARGET_LX2160AQDS && !TARGET_LX2160ACEX7 && \
54+
!ARCH_UNIPHIER && !TARGET_S32V234EVB
55+
help
56+
Most armv8 systems have PSCI support enabled in EL3, either through
57+
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
58+
index b9f34113ea..c5be9a52cc 100644
59+
--- a/arch/arm/dts/Makefile
60+
+++ b/arch/arm/dts/Makefile
61+
@@ -298,7 +298,8 @@ dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
62+
fsl-ls1088a-rdb.dtb \
63+
fsl-ls1088a-qds.dtb \
64+
fsl-lx2160a-rdb.dtb \
65+
- fsl-lx2160a-qds.dtb
66+
+ fsl-lx2160a-qds.dtb \
67+
+ fsl-lx2160a-cex7.dtb
68+
dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
69+
fsl-ls1043a-qds-lpuart.dtb \
70+
fsl-ls1043a-rdb.dtb \
71+
--
72+
2.17.1
73+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
From dc622cf48bed312045d6a7762d166803db28dff3 Mon Sep 17 00:00:00 2001
2+
From: Rabeeh Khoury <rabeeh@solid-run.com>
3+
Date: Sun, 28 Jul 2019 13:27:46 +0300
4+
Subject: [PATCH 2/6] armv8: lx2160acex: misc hacks to get the sources built
5+
6+
those hacks will be sorted out nicer in the future and this patch will
7+
not be needed anymore
8+
9+
Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
10+
---
11+
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 -
12+
drivers/mmc/fsl_esdhc.c | 2 +-
13+
include/configs/lx2160a_common.h | 4 ++--
14+
3 files changed, 3 insertions(+), 4 deletions(-)
15+
16+
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
17+
index 8c47d81f7f..9236be05c8 100644
18+
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
19+
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
20+
@@ -225,7 +225,6 @@ config ARCH_LX2160A
21+
select SYS_FSL_DDR_LE
22+
select SYS_FSL_DDR_VER_50
23+
select SYS_FSL_EC1
24+
- select SYS_FSL_EC2
25+
select SYS_FSL_ERRATUM_A050106
26+
select SYS_FSL_HAS_RGMII
27+
select SYS_FSL_HAS_SEC
28+
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
29+
index 53277c9216..1ec74bd6ba 100644
30+
--- a/drivers/mmc/fsl_esdhc.c
31+
+++ b/drivers/mmc/fsl_esdhc.c
32+
@@ -1497,7 +1497,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
33+
#endif
34+
}
35+
36+
- priv->wp_enable = 1;
37+
+ priv->wp_enable = 0;
38+
39+
#ifdef CONFIG_DM_GPIO
40+
ret = gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio,
41+
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
42+
index e18c8dfd57..4549be92ab 100644
43+
--- a/include/configs/lx2160a_common.h
44+
+++ b/include/configs/lx2160a_common.h
45+
@@ -248,8 +248,8 @@ int select_i2c_ch_pca9547_sec(unsigned char ch);
46+
BOOTENV \
47+
"mcmemsize=0x70000000\0" \
48+
XSPI_MC_INIT_CMD \
49+
- "boot_scripts=lx2160ardb_boot.scr\0" \
50+
- "boot_script_hdr=hdr_lx2160ardb_bs.out\0" \
51+
+ "boot_scripts=lx2160acex7_boot.scr\0" \
52+
+ "boot_script_hdr=hdr_lx2160acex7_bs.out\0" \
53+
"scan_dev_for_boot_part=" \
54+
"part list ${devtype} ${devnum} devplist; " \
55+
"env exists devplist || setenv devplist 1; " \
56+
--
57+
2.17.1
58+
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
From 62af256d25d61136913a739b14452b6d35eff3dc Mon Sep 17 00:00:00 2001
2+
From: Rabeeh Khoury <rabeeh@solid-run.com>
3+
Date: Sun, 28 Jul 2019 13:29:31 +0300
4+
Subject: [PATCH 3/6] armv8: lx2160acex7: defconfig and main platform include
5+
6+
This patch add lx2160acex7 main defconfig and main include file.
7+
Notice that the defconfig doesn't support the secured boot mode where a
8+
follow up patch will cover this.
9+
10+
Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
11+
---
12+
configs/lx2160acex7_tfa_defconfig | 73 ++++++++++++++++++++++++++
13+
include/configs/lx2160acex7.h | 85 +++++++++++++++++++++++++++++++
14+
2 files changed, 158 insertions(+)
15+
create mode 100644 configs/lx2160acex7_tfa_defconfig
16+
create mode 100644 include/configs/lx2160acex7.h
17+
18+
diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig
19+
new file mode 100644
20+
index 0000000000..d59de7d054
21+
--- /dev/null
22+
+++ b/configs/lx2160acex7_tfa_defconfig
23+
@@ -0,0 +1,73 @@
24+
+CONFIG_ARM=y
25+
+CONFIG_TARGET_LX2160ACEX7=y
26+
+CONFIG_SYS_TEXT_BASE=0x82000000
27+
+CONFIG_SYS_MALLOC_F_LEN=0x6000
28+
+CONFIG_EMC2301=y
29+
+CONFIG_TFABOOT=y
30+
+CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
31+
+CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
32+
+CONFIG_AHCI=y
33+
+CONFIG_NR_DRAM_BANKS=3
34+
+CONFIG_FIT_VERBOSE=y
35+
+CONFIG_OF_BOARD_SETUP=y
36+
+CONFIG_OF_BOARD_FIXUP=y
37+
+CONFIG_OF_STDOUT_VIA_ALIAS=y
38+
+CONFIG_BOOTDELAY=10
39+
+CONFIG_USE_BOOTARGS=y
40+
+CONFIG_BOOTARGS="console=ttyAMA0,115200 root=/dev/ram0 earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf"
41+
+# CONFIG_USE_BOOTCOMMAND is not set
42+
+CONFIG_CMD_GREPENV=y
43+
+CONFIG_CMD_EEPROM=y
44+
+CONFIG_CMD_GPT=y
45+
+CONFIG_CMD_I2C=y
46+
+CONFIG_CMD_MMC=y
47+
+CONFIG_CMD_PCI=y
48+
+CONFIG_CMD_SF=y
49+
+CONFIG_CMD_USB=y
50+
+CONFIG_CMD_CACHE=y
51+
+CONFIG_MP=y
52+
+CONFIG_OF_CONTROL=y
53+
+CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7"
54+
+CONFIG_ENV_IS_IN_MMC=y
55+
+CONFIG_ENV_IS_IN_SPI_FLASH=y
56+
+CONFIG_NET_RANDOM_ETHADDR=y
57+
+CONFIG_DM=y
58+
+CONFIG_SATA_CEVA=y
59+
+CONFIG_FSL_CAAM=y
60+
+CONFIG_DM_MMC=y
61+
+CONFIG_FSL_ESDHC=y
62+
+CONFIG_DM_SPI_FLASH=y
63+
+CONFIG_SPI_FLASH=y
64+
+CONFIG_SPI_FLASH_SPANSION=y
65+
+CONFIG_SPI_FLASH_STMICRO=y
66+
+CONFIG_SPI_FLASH_MICRON=y
67+
+CONFIG_SPI_FLASH_WINBOND=y
68+
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
69+
+CONFIG_PHYLIB=y
70+
+CONFIG_NETDEVICES=y
71+
+CONFIG_PHY_GIGE=y
72+
+CONFIG_CMD_NET=y
73+
+CONFIG_CMD_PING=y
74+
+CONFIG_CMD_PXE=y
75+
+CONFIG_CMD_MII=y
76+
+CONFIG_CMD_DHCP=y
77+
+CONFIG_CMD_FAT=y
78+
+CONFIG_CMD_EXT2=y
79+
+CONFIG_PCI=y
80+
+CONFIG_DM_PCI=y
81+
+CONFIG_DM_PCI_COMPAT=y
82+
+CONFIG_PCIE_LAYERSCAPE_GEN4=y
83+
+CONFIG_PHY_ATHEROS=y
84+
+CONFIG_E1000=y
85+
+CONFIG_DM_SCSI=y
86+
+CONFIG_DM_SERIAL=y
87+
+CONFIG_SERIAL_PROBE_ALL=y
88+
+CONFIG_SPI=y
89+
+CONFIG_DM_SPI=y
90+
+CONFIG_NXP_FSPI=y
91+
+# CONFIG_SYS_NXP_FSPI_AHB=y
92+
+CONFIG_USB=y
93+
+CONFIG_DM_USB=y
94+
+CONFIG_USB_XHCI_HCD=y
95+
+CONFIG_USB_XHCI_DWC3=y
96+
+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
97+
diff --git a/include/configs/lx2160acex7.h b/include/configs/lx2160acex7.h
98+
new file mode 100644
99+
index 0000000000..478cd8242f
100+
--- /dev/null
101+
+++ b/include/configs/lx2160acex7.h
102+
@@ -0,0 +1,85 @@
103+
+/* SPDX-License-Identifier: GPL-2.0+ */
104+
+/*
105+
+ * Copyright 2019 SolidRun ltd.
106+
+ */
107+
+
108+
+#ifndef __LX2_CEX7_H
109+
+#define __LX2_CEX7_H
110+
+
111+
+#include "lx2160a_common.h"
112+
+
113+
+/*#define CONFIG_SYS_FSL_ESDHC_USE_PIO*/
114+
+/* VID */
115+
+
116+
+#define I2C_MUX_CH_VOL_MONITOR 0x2
117+
+/* Voltage monitor on channel 2*/
118+
+#define I2C_VOL_MONITOR_ADDR 0x5c
119+
+#define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2
120+
+#define I2C_VOL_MONITOR_BUS_V_OVF 0x1
121+
+#define I2C_VOL_MONITOR_BUS_V_SHIFT 3
122+
+#define CONFIG_VID_FLS_ENV "lx2160acex7_vdd_mv"
123+
+#define CONFIG_VID
124+
+
125+
+/* The lowest and highest voltage allowed*/
126+
+#define VDD_MV_MIN 700
127+
+#define VDD_MV_MAX 855
128+
+
129+
+/* PM Bus commands code for LTC3882*/
130+
+#define PMBUS_CMD_PAGE 0x0
131+
+#define PMBUS_CMD_READ_VOUT 0x8B
132+
+#define PMBUS_CMD_PAGE_PLUS_WRITE 0x05
133+
+#define PMBUS_CMD_VOUT_COMMAND 0x21
134+
+#define PWM_CHANNEL0 0x0
135+
+
136+
+#define CONFIG_VOL_MONITOR_LTC3882_SET
137+
+#define CONFIG_VOL_MONITOR_LTC3882_READ
138+
+
139+
+/* RTC */
140+
+#define CONFIG_SYS_RTC_BUS_NUM 4
141+
+
142+
+/* MAC/PHY configuration */
143+
+#if defined(CONFIG_FSL_MC_ENET)
144+
+#define CONFIG_MII
145+
+#define CONFIG_ETHPRIME "DPMAC17@rgmii-id"
146+
+
147+
+#define RGMII_PHY_ADDR1 0x01
148+
+
149+
+#endif
150+
+
151+
+/* EMC2301 */
152+
+#define I2C_MUX_CH_EMC2301 0x01
153+
+#define I2C_EMC2301_ADDR 0x2f
154+
+#define I2C_EMC2301_CMD 0x40
155+
+#define I2C_EMC2301_PWM 0x80
156+
+
157+
+/* EEPROM */
158+
+#undef CONFIG_ID_EEPROM /* Fixme */
159+
+#define CONFIG_SYS_I2C_EEPROM_NXID
160+
+#define CONFIG_SYS_EEPROM_BUS_NUM 0
161+
+#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
162+
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
163+
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
164+
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
165+
+
166+
+/* Initial environment variables */
167+
+#define CONFIG_EXTRA_ENV_SETTINGS \
168+
+ EXTRA_ENV_SETTINGS \
169+
+ "lx2160acex7_vdd_mv=800\0" \
170+
+ "BOARD=lx2160acex7\0" \
171+
+ "xspi_bootcmd=echo Trying load from flexspi..;" \
172+
+ "sf probe 0:0 && sf read $load_addr " \
173+
+ "$kernel_start $kernel_size ; env exists secureboot &&" \
174+
+ "sf read $kernelheader_addr_r $kernelheader_start " \
175+
+ "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\
176+
+ " bootm $load_addr#$BOARD\0" \
177+
+ "sd_bootcmd=echo Trying load from sd card..;" \
178+
+ "mmcinfo; mmc read $load_addr " \
179+
+ "$kernel_addr_sd $kernel_size_sd ;" \
180+
+ "env exists secureboot && mmc read $kernelheader_addr_r "\
181+
+ "$kernelhdr_addr_sd $kernelhdr_size_sd " \
182+
+ " && esbc_validate ${kernelheader_addr_r};" \
183+
+ "bootm $load_addr#$BOARD\0"
184+
+
185+
+#include <asm/fsl_secure_boot.h>
186+
+
187+
+#endif /* __LX2_CEX7_H */
188+
--
189+
2.17.1
190+

0 commit comments

Comments
 (0)