diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-03-14 10:10:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-03-14 10:10:25 +0100 |
commit | 26dc1bf751724540716a4a17a80f7605ebf61b3a (patch) | |
tree | abdbff429227f48dfd0855dac8ad6381ee8b9ac1 /arch/arm/boards | |
parent | d8ef1573dfc3475d4f5dffa37cb4444b5d6f21eb (diff) | |
parent | 79d2a2d4a4608fd0ca9f1eeb06e4aee0fb095f19 (diff) | |
download | barebox-26dc1bf751724540716a4a17a80f7605ebf61b3a.tar.gz barebox-26dc1bf751724540716a4a17a80f7605ebf61b3a.tar.xz |
Merge branch 'for-next/stm32'
Diffstat (limited to 'arch/arm/boards')
-rw-r--r-- | arch/arm/boards/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-stm32mp1/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-stm32mp1/board.c | 28 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c | 19 | ||||
-rw-r--r-- | arch/arm/boards/stm32mp13xx-dk/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/stm32mp13xx-dk/lowlevel.c | 19 |
6 files changed, 73 insertions, 0 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index a15963c775..75e15cbda4 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -101,6 +101,7 @@ obj-$(CONFIG_MACH_PCM049) += phytec-phycore-omap4460/ obj-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += phytec-som-am335x/ obj-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += phytec-som-imx6/ obj-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += phytec-phycore-imx7/ +obj-$(CONFIG_MACH_PHYTEC_PHYCORE_STM32MP1) += phytec-phycore-stm32mp1/ obj-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += phytec-som-imx8mq/ obj-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += plathome-openblocks-ax3/ obj-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += plathome-openblocks-a6/ @@ -139,6 +140,7 @@ obj-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += terasic-sockit/ obj-$(CONFIG_MACH_SOLIDRUN_CUBOX) += solidrun-cubox/ obj-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += solidrun-microsom/ obj-$(CONFIG_MACH_STM32MP15XX_DKX) += stm32mp15xx-dkx/ +obj-$(CONFIG_MACH_STM32MP13XX_DK) += stm32mp13xx-dk/ obj-$(CONFIG_MACH_LXA_MC1) += lxa-mc1/ obj-$(CONFIG_MACH_STM32MP15X_EV1) += stm32mp15x-ev1/ obj-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += technexion-pico-hobbit/ diff --git a/arch/arm/boards/phytec-phycore-stm32mp1/Makefile b/arch/arm/boards/phytec-phycore-stm32mp1/Makefile new file mode 100644 index 0000000000..1d052d28c9 --- /dev/null +++ b/arch/arm/boards/phytec-phycore-stm32mp1/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +lwl-y += lowlevel.o +obj-y += board.o diff --git a/arch/arm/boards/phytec-phycore-stm32mp1/board.c b/arch/arm/boards/phytec-phycore-stm32mp1/board.c new file mode 100644 index 0000000000..eb6147785f --- /dev/null +++ b/arch/arm/boards/phytec-phycore-stm32mp1/board.c @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#include <common.h> +#include <driver.h> +#include <bootsource.h> + +static int phycore_stm32mp1_probe(struct device_d *dev) +{ + if (bootsource_get_instance() == 0) + of_device_enable_path("/chosen/environment-sd"); + else + of_device_enable_path("/chosen/environment-emmc"); + + barebox_set_hostname("phyCORE-STM32MP1"); + + return 0; +} + +static const struct of_device_id phycore_stm32mp1_of_match[] = { + { .compatible = "phytec,phycore-stm32mp1-3" }, + { /* sentinel */ }, +}; + +static struct driver_d phycore_stm32mp1_board_driver = { + .name = "board-phycore-stm32mp1", + .probe = phycore_stm32mp1_probe, + .of_compatible = phycore_stm32mp1_of_match, +}; +device_platform_driver(phycore_stm32mp1_board_driver); diff --git a/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c b/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c new file mode 100644 index 0000000000..f76bad86a1 --- /dev/null +++ b/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include <common.h> +#include <mach/entry.h> +#include <debug_ll.h> + +extern char __dtb_z_stm32mp157c_phycore_stm32mp1_3_start[]; + +ENTRY_FUNCTION(start_phycore_stm32mp1_3, r0, r1, r2) +{ + void *fdt; + + stm32mp_cpu_lowlevel_init(); + + putc_ll('>'); + + fdt = __dtb_z_stm32mp157c_phycore_stm32mp1_3_start + get_runtime_offset(); + + stm32mp1_barebox_entry(fdt); +} diff --git a/arch/arm/boards/stm32mp13xx-dk/Makefile b/arch/arm/boards/stm32mp13xx-dk/Makefile new file mode 100644 index 0000000000..9961af02a3 --- /dev/null +++ b/arch/arm/boards/stm32mp13xx-dk/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +lwl-y += lowlevel.o diff --git a/arch/arm/boards/stm32mp13xx-dk/lowlevel.c b/arch/arm/boards/stm32mp13xx-dk/lowlevel.c new file mode 100644 index 0000000000..ac4fa40e19 --- /dev/null +++ b/arch/arm/boards/stm32mp13xx-dk/lowlevel.c @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include <mach/entry.h> +#include <debug_ll.h> + +extern char __dtb_z_stm32mp135f_dk_start[]; + +ENTRY_FUNCTION(start_stm32mp13xx_dk, r0, r1, r2) +{ + void *fdt; + + stm32mp_cpu_lowlevel_init(); + + putc_ll('>'); + + fdt = __dtb_z_stm32mp135f_dk_start + get_runtime_offset(); + + stm32mp1_barebox_entry(fdt); +} |