From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 14/14] ARM: Add initial STM32MP1 support
Date: Mon, 11 Mar 2019 18:41:59 -0700 [thread overview]
Message-ID: <CAHQ1cqHvx-9vv=WP2+B0tG=npnLVaENOXw_4dOh_WNe=+R=y9Q@mail.gmail.com> (raw)
In-Reply-To: <20190311093123.7956-15-s.hauer@pengutronix.de>
On Mon, Mar 11, 2019 at 2:48 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> This adds initial STMicroelectronics MP1 support along with support
> for the DK2 devel board. Only very basic support:
>
> - UART
> - SDRAM memory base/size
> - No 1st stage support
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/Kconfig | 11 +++
> arch/arm/Makefile | 1 +
> arch/arm/boards/Makefile | 1 +
> arch/arm/boards/stm32mp157c-dk2/Makefile | 2 +
> arch/arm/boards/stm32mp157c-dk2/board.c | 16 +++
> arch/arm/boards/stm32mp157c-dk2/lowlevel.c | 18 ++++
> arch/arm/configs/stm32mp1_defconfig | 98 +++++++++++++++++++
> arch/arm/dts/Makefile | 1 +
> arch/arm/dts/stm32mp157a-dk1.dts | 62 ++++++++++++
> arch/arm/dts/stm32mp157c-dk2.dts | 14 +++
> arch/arm/dts/stm32mp157c.dtsi | 7 ++
> arch/arm/mach-stm32mp1/Kconfig | 10 ++
> arch/arm/mach-stm32mp1/Makefile | 1 +
> .../arm/mach-stm32mp1/include/mach/debug_ll.h | 28 ++++++
> arch/arm/mach-stm32mp1/include/mach/stm32.h | 35 +++++++
> images/Makefile | 1 +
> images/Makefile.stm32mp1 | 8 ++
> 17 files changed, 314 insertions(+)
> create mode 100644 arch/arm/boards/stm32mp157c-dk2/Makefile
> create mode 100644 arch/arm/boards/stm32mp157c-dk2/board.c
> create mode 100644 arch/arm/boards/stm32mp157c-dk2/lowlevel.c
> create mode 100644 arch/arm/configs/stm32mp1_defconfig
> create mode 100644 arch/arm/dts/stm32mp157a-dk1.dts
> create mode 100644 arch/arm/dts/stm32mp157c-dk2.dts
> create mode 100644 arch/arm/dts/stm32mp157c.dtsi
> create mode 100644 arch/arm/mach-stm32mp1/Kconfig
> create mode 100644 arch/arm/mach-stm32mp1/Makefile
> create mode 100644 arch/arm/mach-stm32mp1/include/mach/debug_ll.h
> create mode 100644 arch/arm/mach-stm32mp1/include/mach/stm32.h
> create mode 100644 images/Makefile.stm32mp1
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 9d3f5b2ca7..6e5f431e29 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -198,6 +198,16 @@ config ARCH_S3C64xx
> select CPU_V6
> select GENERIC_GPIO
>
> +config ARCH_STM32MP1
> + bool "ST stm32mp1xx"
> + select CPU_V7
> + select HAVE_PBL_MULTI_IMAGES
> + select CLKDEV_LOOKUP
> + select COMMON_CLK
> + select COMMON_CLK_OF_PROVIDER
> + select HAS_DEBUG_LL
> + select HAVE_CLK
> +
> config ARCH_VERSATILE
> bool "ARM Versatile boards (ARM926EJ-S)"
> select GPIOLIB
> @@ -284,6 +294,7 @@ source arch/arm/mach-pxa/Kconfig
> source arch/arm/mach-rockchip/Kconfig
> source arch/arm/mach-samsung/Kconfig
> source arch/arm/mach-socfpga/Kconfig
> +source arch/arm/mach-stm32mp1/Kconfig
> source arch/arm/mach-versatile/Kconfig
> source arch/arm/mach-vexpress/Kconfig
> source arch/arm/mach-tegra/Kconfig
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 6b5f21a7a9..9b0e34f50b 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -96,6 +96,7 @@ machine-$(CONFIG_ARCH_PXA) := pxa
> machine-$(CONFIG_ARCH_ROCKCHIP) := rockchip
> machine-$(CONFIG_ARCH_SAMSUNG) := samsung
> machine-$(CONFIG_ARCH_SOCFPGA) := socfpga
> +machine-$(CONFIG_ARCH_STM32MP1) := stm32mp1
> machine-$(CONFIG_ARCH_VERSATILE) := versatile
> machine-$(CONFIG_ARCH_VEXPRESS) := vexpress
> machine-$(CONFIG_ARCH_TEGRA) := tegra
> diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
> index c5dc41526b..5193edff9f 100644
> --- a/arch/arm/boards/Makefile
> +++ b/arch/arm/boards/Makefile
> @@ -123,6 +123,7 @@ obj-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += terasic-de0-nano-soc/
> 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_STM32MP157C_DK2) += stm32mp157c-dk2/
> obj-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += technexion-pico-hobbit/
> obj-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += technexion-wandboard/
> obj-$(CONFIG_MACH_TNY_A9260) += tny-a926x/
> diff --git a/arch/arm/boards/stm32mp157c-dk2/Makefile b/arch/arm/boards/stm32mp157c-dk2/Makefile
> new file mode 100644
> index 0000000000..092c31d6b2
> --- /dev/null
> +++ b/arch/arm/boards/stm32mp157c-dk2/Makefile
> @@ -0,0 +1,2 @@
> +lwl-y += lowlevel.o
> +obj-y += board.o
> diff --git a/arch/arm/boards/stm32mp157c-dk2/board.c b/arch/arm/boards/stm32mp157c-dk2/board.c
> new file mode 100644
> index 0000000000..278a0c0126
> --- /dev/null
> +++ b/arch/arm/boards/stm32mp157c-dk2/board.c
> @@ -0,0 +1,16 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +#include <common.h>
> +#include <linux/sizes.h>
> +#include <init.h>
> +#include <asm/memory.h>
> +
> +static int dk2_postcore_init(void)
> +{
> + if (!of_machine_is_compatible("st,stm32mp157c-dk2"))
> + return 0;
> +
> + arm_add_mem_device("ram0", 0xc0000000, SZ_512M);
> +
Minor nit: I think you can replace 0xc0000000 with STM32_DDR_BASE.
> + return 0;
> +}
> +mem_initcall(dk2_postcore_init);
> diff --git a/arch/arm/boards/stm32mp157c-dk2/lowlevel.c b/arch/arm/boards/stm32mp157c-dk2/lowlevel.c
> new file mode 100644
> index 0000000000..be12160a0b
> --- /dev/null
> +++ b/arch/arm/boards/stm32mp157c-dk2/lowlevel.c
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +#include <common.h>
> +#include <asm/barebox-arm-head.h>
> +#include <asm/barebox-arm.h>
> +#include <debug_ll.h>
> +
> +extern char __dtb_stm32mp157c_dk2_start[];
> +
> +ENTRY_FUNCTION(start_stm32mp157c_dk2, r0, r1, r2)
> +{
> + void *fdt;
> +
> + arm_cpu_lowlevel_init();
> +
> + fdt = __dtb_stm32mp157c_dk2_start + get_runtime_offset();
> +
> + barebox_arm_entry(0xc0000000, SZ_512M, fdt);
Ditto.
Thanks,
Andrey Smirnov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-03-12 1:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 9:31 [PATCH 00/14] Add initial STMicroelectronics MP1 support Sascha Hauer
2019-03-11 9:31 ` [PATCH 01/14] clk: clk-composite: return parent_rate if no rate clk Sascha Hauer
2019-03-11 9:31 ` [PATCH 02/14] clk: parent_names should be const Sascha Hauer
2019-03-11 9:31 ` [PATCH 03/14] clk: export clk_gate_is_enabled() Sascha Hauer
2019-03-11 9:31 ` [PATCH 04/14] clk: Make CLK_IGNORE_UNUSED generic Sascha Hauer
2019-03-11 9:31 ` [PATCH 05/14] clk: Support CLK_IS_CRITICAL flag Sascha Hauer
2019-03-11 9:31 ` [PATCH 06/14] clk: divider: pass divider flags Sascha Hauer
2019-03-11 9:31 ` [PATCH 07/14] clk: divider: Support CLK_DIVIDER_READ_ONLY flag Sascha Hauer
2019-03-11 9:31 ` [PATCH 08/14] clk: mux: Support mux specific flags Sascha Hauer
2019-03-11 9:31 ` [PATCH 09/14] clk: mux: Support CLK_MUX_READ_ONLY flag Sascha Hauer
2019-03-11 9:31 ` [PATCH 10/14] clk: mux: Support CLK_SET_RATE_NO_REPARENT flag Sascha Hauer
2019-03-11 9:31 ` [PATCH 11/14] ARM: stm32mp1: Add clk driver Sascha Hauer
2019-03-11 9:31 ` [PATCH 12/14] ARM: stm32mp1: Add serial driver Sascha Hauer
2019-03-11 9:31 ` [PATCH 13/14] clocksource: Enable architected timer support for CPU_V7 Sascha Hauer
2019-03-11 9:31 ` [PATCH 14/14] ARM: Add initial STM32MP1 support Sascha Hauer
2019-03-12 1:41 ` Andrey Smirnov [this message]
2019-03-13 8:35 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHQ1cqHvx-9vv=WP2+B0tG=npnLVaENOXw_4dOh_WNe=+R=y9Q@mail.gmail.com' \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox