Skip to content

Commit 9d7f907

Browse files
Lukasz Majewskifabioestevam
authored andcommitted
ARM: imx: mxs: Add support for imx287 based BTT devices
The btt[c3] devices are based on imx287 SoC. U-Boot SPL 2025.04-01081-g07e086681d26 (Apr 16 2025 - 12:24:36 +0200) Trying to boot from MMC1 U-Boot 2025.04-01081-g07e086681d26 (Apr 16 2025 - 12:24:36 +0200) CPU: Freescale i.MX28 rev1.2 at 454 MHz BOOT: SSP SPI #3, master, 3V3 NOR Model: BTT3 Board: LWE BTT SoM HW rev 0 DRAM: 256 MiB Core: 86 devices, 15 uclasses, devicetree: separate MMC: MXS MMC: 0 Loading Environment from SPIFlash... SF: Detected is25lp128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB OK In: serial@80074000 Out: serial@80074000 Err: serial@80074000 Net: eth0: ethernet@800f0000 Hit any key to stop autoboot: 0 Signed-off-by: Lukasz Majewski <lukma@denx.de>
1 parent 9de873b commit 9d7f907

17 files changed

Lines changed: 1322 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: GPL-2.0+
2+
/*
3+
* Copyright 2025
4+
* Lukasz Majewski, DENX Software Engineering, lukma@denx.de
5+
*/
6+
7+
#include "imx28-btt3-u-boot.dtsi"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: GPL-2.0+
2+
/*
3+
* Copyright 2025
4+
* Lukasz Majewski, DENX Software Engineering, lukma@denx.de
5+
*/
6+
7+
#include "imx28-btt3-u-boot.dtsi"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: GPL-2.0+
2+
/*
3+
* Copyright 2025
4+
* Lukasz Majewski, DENX Software Engineering, lukma@denx.de
5+
*/
6+
7+
#include "imx28-btt3-u-boot.dtsi"
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// SPDX-License-Identifier: GPL-2.0+
2+
/*
3+
* Copyright 2025
4+
* Lukasz Majewski, DENX Software Engineering, lukma@denx.de
5+
*/
6+
7+
/*
8+
* The minimal augmentation DTS U-Boot file to allow eMMC driver
9+
* configuration in SPL for falcon boot.
10+
*/
11+
#include "imx28-u-boot.dtsi"
12+
/ {
13+
aliases {
14+
/delete-property/ saif0;
15+
/delete-property/ saif1;
16+
/delete-property/ spi0;
17+
/delete-property/ spi1;
18+
/delete-property/ usbphy0;
19+
/delete-property/ usbphy1;
20+
};
21+
apb@80000000 {
22+
bootph-pre-ram;
23+
24+
apbh@80000000 {
25+
bootph-pre-ram;
26+
};
27+
28+
apbx@80040000 {
29+
bootph-pre-ram;
30+
};
31+
};
32+
33+
/delete-node/ keypad;
34+
/delete-node/ panel;
35+
/delete-node/ sdio-pwrseq;
36+
/delete-node/ sound;
37+
};
38+
39+
&clks {
40+
bootph-pre-ram;
41+
status = "disable";
42+
};
43+
44+
&duart {
45+
/delete-property/ clocks;
46+
bootph-pre-ram;
47+
type = <1>; /* TYPE_PL011 */
48+
};
49+
50+
&gpio0 {
51+
bootph-pre-ram;
52+
};
53+
54+
&gpio3 {
55+
bootph-pre-ram;
56+
};
57+
58+
&gpio4 {
59+
bootph-pre-ram;
60+
};
61+
62+
&pinctrl {
63+
/delete-property/ pinctrl-names;
64+
/delete-property/ pinctrl-0;
65+
bootph-pre-ram;
66+
};
67+
68+
&ssp0 {
69+
bootph-pre-ram;
70+
};
71+
72+
&ssp3 {
73+
num-cs = <2>;
74+
spi-max-frequency = <40000000>;
75+
bootph-pre-ram;
76+
};
77+
78+
/delete-node/ &hog_pins_a;
79+
/delete-node/ &keypad_pins_bttc;
80+
/delete-node/ &lcdif;
81+
/delete-node/ &lcdif_sync_pins_bttc;
82+
/delete-node/ &pwm;
83+
/delete-node/ &saif0;
84+
/delete-node/ &saif1;
85+
/delete-node/ &ssp1;
86+
/delete-node/ &ssp2;
87+
/delete-node/ &usb0;
88+
/delete-node/ &usb1;
89+
/delete-node/ &usbphy0;
90+
/delete-node/ &usbphy1;

arch/arm/mach-imx/mxs/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ choice
3838
prompt "MX28 board select"
3939
optional
4040

41+
config TARGET_BTT
42+
bool "Support BTT"
43+
select PL01X_SERIAL
44+
imply OF_UPSTREAM
45+
4146
config TARGET_MX28EVK
4247
bool "Support mx28evk"
4348
select PL01X_SERIAL
@@ -70,6 +75,7 @@ config SPL_MXS_PMU_ENABLE_4P2_LINEAR_REGULATOR
7075
from VDD5V) - so the VDD4P2 power source is operational.
7176

7277
source "board/freescale/mx28evk/Kconfig"
78+
source "board/liebherr/btt/Kconfig"
7379
source "board/liebherr/xea/Kconfig"
7480

7581
endif

board/liebherr/btt/Kconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
if TARGET_BTT
2+
3+
config SYS_BOARD
4+
default "btt"
5+
6+
config SYS_VENDOR
7+
default "liebherr"
8+
9+
config SYS_SOC
10+
default "mxs"
11+
12+
config SYS_CONFIG_NAME
13+
default "btt"
14+
15+
config ENV_SIZE
16+
default 0x2000
17+
18+
config ENV_SECT_SIZE
19+
default 0x10000 if ENV_IS_IN_SPI_FLASH
20+
21+
config ENV_OFFSET
22+
default 0x80000 if ENV_IS_IN_SPI_FLASH
23+
24+
endif

board/liebherr/btt/MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BTT BOARD
2+
M: Lukasz Majewski <lukma@denx.de>
3+
S: Maintained
4+
F: board/liebherr/btt/
5+
F: include/configs/btt.h
6+
F: configs/imx28_btt3_defconfig

board/liebherr/btt/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# (C) Copyright 2025
3+
# Lukasz Majewski, DENX Software Engineering, lukma@denx.de.
4+
#
5+
# SPDX-License-Identifier: GPL-2.0+
6+
#
7+
8+
obj-y := btt.o
9+
obj-$(CONFIG_XPL_BUILD) += spl_btt.o

board/liebherr/btt/boot_img_scr.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* SPDX-License-Identifier: GPL-2.0+ */
2+
/*
3+
* Struct for boot image source description for placing in last
4+
* two SPI NOR flash sectors on legcom.
5+
*/
6+
7+
struct boot_img_src {
8+
u8 magic; /* Must be 'B' = 0x42 */
9+
u8 flags; /* flags to specify mmcblk[0|1] boot[0|1] */
10+
u8 crc8; /* CRC-8 over above two bytes */
11+
} __packed;
12+
13+
/*
14+
* Bit definition in boot_img_src.flags:
15+
* Bit 0: mmcblk device 0 or 1 (1 - if this bit set)
16+
* Bit 1: mmcblk boot partition 0 or 1.
17+
* for eMMC: boot0 if this bit is cleared, boot1 - if set
18+
* for SD-card the boot partition value will always be 0
19+
* (independent of the value of this bit)
20+
*
21+
*/
22+
#define BOOT_SRC_MMC1 BIT(0)
23+
#define BOOT_SRC_PART1 BIT(1)
24+
25+
/* Offset of the first boot image source descriptor in SPI NOR */
26+
#define SPI_FLASH_BOOT_SRC_OFFS 0xFE0000
27+
#define SPI_FLASH_SECTOR_SIZE 0x10000

0 commit comments

Comments
 (0)