mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 12/13] ARM: stm32mp: 135-DK: enable environment, bbu handler and deep probe
Date: Mon, 27 Nov 2023 07:49:46 +0100	[thread overview]
Message-ID: <20231127064947.2207726-13-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20231127064947.2207726-1-a.fatoum@pengutronix.de>

Now that we have proper clock controller support, let's configure the
board to have an environment on SD-Card, a barebox update handler for
the SD-Card and enable deep probe as well.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/stm32mp13xx-dk/Makefile |  1 +
 arch/arm/boards/stm32mp13xx-dk/board.c  | 25 +++++++++++++++++++++++++
 arch/arm/dts/stm32mp135f-dk.dts         |  9 +++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 arch/arm/boards/stm32mp13xx-dk/board.c

diff --git a/arch/arm/boards/stm32mp13xx-dk/Makefile b/arch/arm/boards/stm32mp13xx-dk/Makefile
index 9961af02a3ea..1d052d28c9fc 100644
--- a/arch/arm/boards/stm32mp13xx-dk/Makefile
+++ b/arch/arm/boards/stm32mp13xx-dk/Makefile
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 lwl-y += lowlevel.o
+obj-y += board.o
diff --git a/arch/arm/boards/stm32mp13xx-dk/board.c b/arch/arm/boards/stm32mp13xx-dk/board.c
new file mode 100644
index 000000000000..24104328f0db
--- /dev/null
+++ b/arch/arm/boards/stm32mp13xx-dk/board.c
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <driver.h>
+#include <init.h>
+#include <mach/stm32mp/bbu.h>
+#include <deep-probe.h>
+
+static int stm32mp13xx_dk_probe(struct device *dev)
+{
+	stm32mp_bbu_mmc_fip_register("sd", "/dev/mmc0", BBU_HANDLER_FLAG_DEFAULT);
+	return 0;
+}
+
+static const struct of_device_id stm32mp13xx_dk_of_match[] = {
+	{ .compatible = "st,stm32mp135f-dk" },
+	{ /* sentinel */ },
+};
+BAREBOX_DEEP_PROBE_ENABLE(stm32mp13xx_dk_of_match);
+
+static struct driver stm32mp13xx_dk_board_driver = {
+	.name = "board-stm32mp13xx_dk",
+	.probe = stm32mp13xx_dk_probe,
+	.of_compatible = stm32mp13xx_dk_of_match,
+} ;
+device_platform_driver(stm32mp13xx_dk_board_driver);
diff --git a/arch/arm/dts/stm32mp135f-dk.dts b/arch/arm/dts/stm32mp135f-dk.dts
index f07f7f5536fe..5f0f52d00535 100644
--- a/arch/arm/dts/stm32mp135f-dk.dts
+++ b/arch/arm/dts/stm32mp135f-dk.dts
@@ -5,4 +5,13 @@
 
 / {
 	model = "STM32MP135F-DK";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+
+		environment {
+			compatible = "barebox,environment";
+			device-path = &sdmmc1, "partname:barebox-environment";
+		};
+	};
 };
-- 
2.39.2




  parent reply	other threads:[~2023-11-27  7:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27  6:49 [PATCH 00/13] ARM: stm32mp: add full STM32MP13 support with OP-TEE Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 01/13] clk: stm32mp1: build only when STM32MP15 support is enabled Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 02/13] clk: factor out clk_hw_get_parent_index Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 03/13] include: add initial <linux/clk-provider.h> Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 04/13] clk: divider: implement CLK_DIVIDER_ALLOW_ZERO Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 05/13] clk: divider: implement divider_[ro_]round_rate_parent Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 06/13] clk: implement clk clk_hw_get_parent_by_index Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 07/13] clk: add struct clk_init_data::parent_hws Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 08/13] clk: implement clk_hw_reparent Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 09/13] clk: add STM32MP13 clock and reset drivers Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 10/13] pinctrl: stm32: match st,stm32mp135-pinctrl DT compatible Ahmad Fatoum
2023-11-27  6:49 ` [PATCH 11/13] aiodev: stm32: add STM32MP13x support Ahmad Fatoum
2023-11-27  6:49 ` Ahmad Fatoum [this message]
2023-11-27  6:49 ` [PATCH 13/13] ARM: stm32mp: remove STM32MP13 .stm32 image Ahmad Fatoum
2023-12-05  7:35 ` [PATCH 00/13] ARM: stm32mp: add full STM32MP13 support with OP-TEE 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=20231127064947.2207726-13-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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