mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v1 02/12] ARM: dts: stm32mp: factor out common DK nodes into dtsi
Date: Mon, 17 Jun 2019 17:07:41 +0200	[thread overview]
Message-ID: <20190617150751.3421-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20190617150751.3421-1-a.fatoum@pengutronix.de>

The DK2 appears to be just the DK1 with a display, thus factor out the
barebox-specifics into a new stm32mp157a-dk1.dtsi, which we can include
in both device trees after including the upstream device tree.

As the updated device tree introduced new nodes, the now duplicates
(&ethernet0, &uart4, /chosen and /aliases) are dropped from the barebox
device as part of this commit as well.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/dts/stm32mp157a-dk1.dts  | 58 ++-----------------------------
 arch/arm/dts/stm32mp157a-dk1.dtsi | 23 ++++++++++++
 arch/arm/dts/stm32mp157c-dk2.dts  | 10 ++----
 3 files changed, 27 insertions(+), 64 deletions(-)
 create mode 100644 arch/arm/dts/stm32mp157a-dk1.dtsi

diff --git a/arch/arm/dts/stm32mp157a-dk1.dts b/arch/arm/dts/stm32mp157a-dk1.dts
index 62c28d396f00..f2cafae66b9b 100644
--- a/arch/arm/dts/stm32mp157a-dk1.dts
+++ b/arch/arm/dts/stm32mp157a-dk1.dts
@@ -4,59 +4,5 @@
  * Author: Alexandre Torgue <alexandre.torgue@st.com>.
  */
 
-/dts-v1/;
-
-#include <arm/stm32mp157c.dtsi>
-#include <arm/stm32mp157-pinctrl.dtsi>
-#include "stm32mp157c.dtsi"
-
-/ {
-	model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
-	compatible = "st,stm32mp157a-dk1", "st,stm32mp157";
-
-	aliases {
-		ethernet0 = &ethernet0;
-		serial0 = &uart4;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	sram: sram@10050000 {
-		compatible = "mmio-sram";
-		reg = <0x10050000 0x10000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0 0x10050000 0x10000>;
-
-		dma_pool: dma_pool@0 {
-			reg = <0x0 0x10000>;
-			pool;
-		};
-	};
-};
-
-&ethernet0 {
-	status = "okay";
-	pinctrl-0 = <&ethernet0_rgmii_pins_a>;
-	pinctrl-names = "default", "sleep";
-	phy-mode = "rgmii";
-	max-speed = <1000>;
-	phy-handle = <&phy0>;
-
-	mdio0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "snps,dwmac-mdio";
-		phy0: ethernet-phy@0 {
-			reg = <0>;
-		};
-	};
-};
-
-&uart4 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart4_pins_a>;
-	status = "okay";
-};
+#include <arm/stm32mp157a-dk1.dts>
+#include "stm32mp157a-dk1.dtsi"
diff --git a/arch/arm/dts/stm32mp157a-dk1.dtsi b/arch/arm/dts/stm32mp157a-dk1.dtsi
new file mode 100644
index 000000000000..8cc70129b215
--- /dev/null
+++ b/arch/arm/dts/stm32mp157a-dk1.dtsi
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2018 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com>.
+ */
+
+#include "stm32mp157c.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	sram: sram@10050000 {
+		compatible = "mmio-sram";
+		reg = <0x10050000 0x10000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x10050000 0x10000>;
+
+		dma_pool: dma_pool@0 {
+			reg = <0x0 0x10000>;
+			pool;
+		};
+	};
+};
diff --git a/arch/arm/dts/stm32mp157c-dk2.dts b/arch/arm/dts/stm32mp157c-dk2.dts
index 7565cabc3d92..6e73162ea4bd 100644
--- a/arch/arm/dts/stm32mp157c-dk2.dts
+++ b/arch/arm/dts/stm32mp157c-dk2.dts
@@ -4,11 +4,5 @@
  * Author: Alexandre Torgue <alexandre.torgue@st.com>.
  */
 
-/dts-v1/;
-
-#include "stm32mp157a-dk1.dts"
-
-/ {
-	model = "STMicroelectronics STM32MP157C-DK2 Discovery Board";
-	compatible = "st,stm32mp157c-dk2", "st,stm32mp157";
-};
+#include <arm/stm32mp157c-dk2.dts>
+#include "stm32mp157a-dk1.dtsi"
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2019-06-17 15:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 15:07 [PATCH v1 00/12] ARM: stm32mp: add drivers for GPIO, pinctrl Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 01/12] ARM: dts: stm32mp157a-dk1.dts: include upstream dts before barebox' Ahmad Fatoum
2019-06-17 15:07 ` Ahmad Fatoum [this message]
2019-06-17 15:07 ` [PATCH v1 03/12] gpiolib: add gpio_get_chip helper Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 04/12] driver: add stubs for hardware spinlocks Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 05/12] pinctrl: add driver for STM32 GPIO and pin multiplexer Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 06/12] ARM: dts: stm32mp157a-dk1: enable heartbeat and error LEDs Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 07/12] ARM: stm32mp: turn on GPIO related options Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 08/12] ARM: stm32mp157c-dk2: add board-specific sysconf fixups Ahmad Fatoum
2019-06-17 15:14   ` Ahmad Fatoum
2019-06-18  5:43     ` Rouven Czerwinski
2019-06-17 15:07 ` [PATCH v1 09/12] ARM: psci: fix erroneous call of ->system_reset on system_off Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 10/12] ARM: sm: move get_gicd_base_address to header for reuse Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 11/12] ARM: stm32mp: implement PSCI support Ahmad Fatoum
2019-06-17 15:07 ` [PATCH v1 12/12] ARM: stm32mp157c-dk2: boot kernel in nonsecure mode Ahmad Fatoum
2019-06-20 14:32 ` [PATCH v1 00/12] ARM: stm32mp: add drivers for GPIO, pinctrl Sascha Hauer
2019-07-03 16:51   ` Ahmad Fatoum
2019-07-04  5:39     ` Ahmad Fatoum
2019-07-04  7:01       ` 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=20190617150751.3421-3-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