summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-06-17 17:07:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-06-20 16:03:50 +0200
commit74c9e3df668067c7819bd3ce3cf58769971250b3 (patch)
tree99c64ec6445470ba93087f06b5263e7fa9d4d990
parent17a71e35975e5de3f122dc4cddd964a9196e4f7b (diff)
downloadbarebox-74c9e3df668067c7819bd3ce3cf58769971250b3.tar.gz
barebox-74c9e3df668067c7819bd3ce3cf58769971250b3.tar.xz
ARM: dts: stm32mp: factor out common DK nodes into dtsi
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> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/dts/stm32mp157a-dk1.dts58
-rw-r--r--arch/arm/dts/stm32mp157a-dk1.dtsi23
-rw-r--r--arch/arm/dts/stm32mp157c-dk2.dts10
3 files changed, 27 insertions, 64 deletions
diff --git a/arch/arm/dts/stm32mp157a-dk1.dts b/arch/arm/dts/stm32mp157a-dk1.dts
index 62c28d396f..f2cafae66b 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 0000000000..8cc70129b2
--- /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 7565cabc3d..6e73162ea4 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"