Skip to contentSkip to conversation

ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64 to arm.

PATCH Superseded Eric Anholt 2 participants 3 messages Jul 19, 2017 – Jul 26, 2017

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64 to arm.

BCM2837 is somewhat unusual in that we build its DT on both arm32 and arm64. Most devices are being run in arm32 mode.

Having the body of the DT for 2837 separate from 2835/6 has been a source of pain, as we often need to make changes that span both directories simultaneously (for example, the thermal changes for 4.13, and pinmuxing changes earlier). Other changes are made more complicated than they need to be, such as the SDHOST enabling, because we end up splitting a single change into a 283[56] half and a 2837 half.

---

I had asked about what we could do about our DT merging troubles back in https://lkml.org/lkml/2017/5/16/707 with no response. I'm hoping we can take this patch as a resolution to that, and submit (almost all) future RPi DT changes through the arm32 dt tree.

 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
 .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
 3 files changed, 42 insertions(+), 42 deletions(-)
 rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)
arch/arm/boot/dts/bcm2837-rpi-3-b.dts +41 -1
index c72a27d908b6..972f14db28ac 100644
@@ -1 +1,41 @@
-#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+	model = "Raspberry Pi 3 Model B";
+
+	memory {
+		reg = <0 0x40000000>;
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
+
+/* SDHCI is used to control the SDIO for wireless */
+&sdhci {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_gpio34>;
+	status = "okay";
+	bus-width = <4>;
+	non-removable;
+};
+
+/* SDHOST is used to drive the SD card */
+&sdhost {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdhost_gpio48>;
+	status = "okay";
+	bus-width = <4>;
+};
arch/arm/boot/dts/bcm2837.dtsi renamed from arch/arm64/boot/dts/broadcom/bcm2837.dtsi +0 -0
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/bcm2837.dtsi
rename to arch/arm/boot/dts/bcm2837.dtsi
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +1 -41

42 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw

Hi Eric,

suggestion inline

Quoted 31 lines · Eric Anholt

BCM2837 is somewhat unusual in that we build its DT on both arm32 and arm64. Most devices are being run in arm32 mode.

Having the body of the DT for 2837 separate from 2835/6 has been a source of pain, as we often need to make changes that span both directories simultaneously (for example, the thermal changes for 4.13, and pinmuxing changes earlier). Other changes are made more complicated than they need to be, such as the SDHOST enabling, because we end up splitting a single change into a 283[56] half and a 2837 half.

---

I had asked about what we could do about our DT merging troubles back in https://lkml.org/lkml/2017/5/16/707 with no response. I'm hoping we can take this patch as a resolution to that, and submit (almost all) future RPi DT changes through the arm32 dt tree.

  arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
  .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
  arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
  3 files changed, 42 insertions(+), 42 deletions(-)

rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)

arch/arm/boot/dts/bcm2837-rpi-3-b.dts +0 -0
index c72a27d908b6..972f14db28ac 100644

arch/arm/boot/dts/bcm2837-rpi-3-b.dts line 5

Quoted 6 lines
arch/arm/boot/dts/bcm2837-rpi-3-b.dts +5 -1
@@ -1 +1,41 @@
-#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"

If you're moving this back to the arm directory why not change the include path and remove the 4 symlinks in arm64/boot/dts/broadcom?

+#include "arm/bcm2837.dtsi"
+#include "arm/bcm2835-rpi.dtsi"
+#include "arm/bcm283x-rpi-smsc9514.dtsi"
+#include "arm/bcm283x-rpi-usb-host.dtsi"

Quoted 87 lines
arch/arm/boot/dts/bcm2837-rpi-3-b.dts +36 -0
+
+/ {
+	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+	model = "Raspberry Pi 3 Model B";
+
+	memory {
+		reg = <0 0x40000000>;
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
+
+/* SDHCI is used to control the SDIO for wireless */
+&sdhci {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_gpio34>;
+	status = "okay";
+	bus-width = <4>;
+	non-removable;
+};
+
+/* SDHOST is used to drive the SD card */
+&sdhost {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdhost_gpio48>;
+	status = "okay";
+	bus-width = <4>;
+};
arch/arm/boot/dts/bcm2837.dtsi renamed from arch/arm64/boot/dts/broadcom/bcm2837.dtsi +0 -0
similarity index 100%
rename from arch/arm64/boot/dts/broadcom/bcm2837.dtsi
rename to arch/arm/boot/dts/bcm2837.dtsi
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +1 -41
index 972f14db28ac..699d340a3437 100644
@@ -1,41 +1 @@
-/dts-v1/;
-#include "bcm2837.dtsi"
-#include "bcm2835-rpi.dtsi"
-#include "bcm283x-rpi-smsc9514.dtsi"
-#include "bcm283x-rpi-usb-host.dtsi"
-
-/ {
-	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
-	model = "Raspberry Pi 3 Model B";
-
-	memory {
-		reg = <0 0x40000000>;
-	};
-
-	leds {
-		act {
-			gpios = <&gpio 47 0>;
-		};
-	};
-};
-
-&uart1 {
-	status = "okay";
-};
-
-/* SDHCI is used to control the SDIO for wireless */
-&sdhci {
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	status = "okay";
-	bus-width = <4>;
-	non-removable;
-};
-
-/* SDHOST is used to drive the SD card */
-&sdhost {
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdhost_gpio48>;
-	status = "okay";
-	bus-width = <4>;
-};
+#include "arm/bcm2837-rpi-3-b.dts"
#2 lore raw
Quoted 46 lines · Scott Branden

Hi Eric,

suggestion inline

Quoted 31 lines · Eric Anholt

BCM2837 is somewhat unusual in that we build its DT on both arm32 and arm64. Most devices are being run in arm32 mode.

Having the body of the DT for 2837 separate from 2835/6 has been a source of pain, as we often need to make changes that span both directories simultaneously (for example, the thermal changes for 4.13, and pinmuxing changes earlier). Other changes are made more complicated than they need to be, such as the SDHOST enabling, because we end up splitting a single change into a 283[56] half and a 2837 half.

---

I had asked about what we could do about our DT merging troubles back in https://lkml.org/lkml/2017/5/16/707 with no response. I'm hoping we can take this patch as a resolution to that, and submit (almost all) future RPi DT changes through the arm32 dt tree.

  arch/arm/boot/dts/bcm2837-rpi-3-b.dts              | 42 +++++++++++++++++++++-
  .../dts/broadcom => arm/boot/dts}/bcm2837.dtsi     |  0
  arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   | 42 +---------------------
  3 files changed, 42 insertions(+), 42 deletions(-)

rename arch/{arm64/boot/dts/broadcom => arm/boot/dts}/bcm2837.dtsi (100%)

arch/arm/boot/dts/bcm2837-rpi-3-b.dts +0 -0
index c72a27d908b6..972f14db28ac 100644

arch/arm/boot/dts/bcm2837-rpi-3-b.dts line 5

Quoted 6 lines
arch/arm/boot/dts/bcm2837-rpi-3-b.dts +5 -1
@@ -1 +1,41 @@
-#include "arm64/broadcom/bcm2837-rpi-3-b.dts"
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"

If you're moving this back to the arm directory why not change the include path and remove the 4 symlinks in arm64/boot/dts/broadcom?

Review

Quoted 4 lines
(quoted diff) +4 -0
+#include "arm/bcm2837.dtsi"
+#include "arm/bcm2835-rpi.dtsi"
+#include "arm/bcm283x-rpi-smsc9514.dtsi"
+#include "arm/bcm283x-rpi-usb-host.dtsi"

Even better, it seems we don't need the arm/ here -- when we're
processing the include in arm/, the neighboring files get found.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170726/a13ee4ec/attachment-0001.sig>