devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 6/9] dt-bindings: Add root properties for Raspberry Pi 3
       [not found] <1464934708-24769-1-git-send-email-kraxel@redhat.com>
@ 2016-06-03  6:18 ` Gerd Hoffmann
  2016-06-03  6:18 ` [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the " Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-03  6:18 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel
  Cc: Eric Anholt, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, Stephen Warren, Lee Jones,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

From: Eric Anholt <eric@anholt.net>

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index 11d3056..6ffe087 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -30,6 +30,10 @@ Raspberry Pi 2 Model B
 Required root node properties:
 compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
 
+Raspberry Pi 3 Model B
+Required root node properties:
+compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+
 Raspberry Pi Compute Module
 Required root node properties:
 compatible = "raspberrypi,compute-module", "brcm,bcm2835";
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
       [not found] <1464934708-24769-1-git-send-email-kraxel@redhat.com>
  2016-06-03  6:18 ` [PATCH v2 6/9] dt-bindings: Add root properties for Raspberry Pi 3 Gerd Hoffmann
@ 2016-06-03  6:18 ` Gerd Hoffmann
  2016-06-03  7:38   ` Arnd Bergmann
       [not found]   ` <1464934708-24769-8-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-06-03  6:18 ` [PATCH v2 8/9] ARM: bcm2835: dt: Add the ethernet to the device trees Gerd Hoffmann
  2016-06-03  6:18 ` [PATCH v2 9/9] ARM: bcm2837: " Gerd Hoffmann
  3 siblings, 2 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-03  6:18 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel
  Cc: Eric Anholt, Gerd Hoffmann, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Russell King,
	Florian Fainelli, Ray Jui, Scott Branden, Catalin Marinas,
	Will Deacon,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...

From: Eric Anholt <eric@anholt.net>

While this devicetree also works for booting in 32-bit mode, it's
placed in arm64 since it's a 64-bit CPU (as suggested by Arnd).

v2: Move to arm64/ instead of arm/

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stephen Warren <swarren@wwwdotorg.org> (v1)

[ kraxel: update bcm2837-rpi-3-b.dtb path in arm(32) Makefile ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/boot/dts/Makefile                       |  3 +-
 arch/arm64/boot/dts/broadcom/Makefile            |  1 +
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 29 ++++++++++
 arch/arm64/boot/dts/broadcom/bcm2837.dtsi        | 74 ++++++++++++++++++++++++
 4 files changed, 106 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
 create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 06b6c2d..71e2d36 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b-rev2.dtb \
 	bcm2835-rpi-b-plus.dtb \
 	bcm2835-rpi-a-plus.dtb \
-	bcm2836-rpi-2-b.dtb
+	bcm2836-rpi-2-b.dtb \
+	../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index bec1f8b..05faf2a 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,3 +1,4 @@
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
 dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb
 dtb-$(CONFIG_ARCH_VULCAN) += vulcan-eval.dtb
 
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
new file mode 100644
index 0000000..223793d
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -0,0 +1,29 @@
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "../../../../arm/boot/dts/bcm2835-rpi.dtsi"
+
+/ {
+	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+	model = "Raspberry Pi 3 Model B";
+
+	memory {
+		reg = <0 0x40000000>;
+	};
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+
+		pwr {
+			label = "PWR";
+			gpios = <&gpio 35 0>;
+			default-state = "keep";
+			linux,default-trigger = "default-on";
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi
new file mode 100644
index 0000000..2320f8d
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi
@@ -0,0 +1,74 @@
+#include "../../../../arm/boot/dts/bcm283x.dtsi"
+
+/ {
+	compatible = "brcm,bcm2836";
+
+	soc {
+		ranges = <0x7e000000 0x3f000000 0x1000000>,
+			 <0x40000000 0x40000000 0x00001000>;
+		dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
+
+		local_intc: local_intc {
+			compatible = "brcm,bcm2836-l1-intc";
+			reg = <0x40000000 0x100>;
+			interrupt-controller;
+			#interrupt-cells = <1>;
+			interrupt-parent = <&local_intc>;
+		};
+	};
+
+	timer {
+		compatible = "arm,armv7-timer";
+		interrupt-parent = <&local_intc>;
+		interrupts = <0>, // PHYS_SECURE_PPI
+			     <1>, // PHYS_NONSECURE_PPI
+			     <3>, // VIRT_PPI
+			     <2>; // HYP_PPI
+		always-on;
+	};
+
+	cpus: cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <1>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x000000e0>;
+		};
+
+		cpu2: cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <2>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x000000e8>;
+		};
+
+		cpu3: cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <3>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x000000f0>;
+		};
+	};
+};
+
+/* Make the BCM2835-style global interrupt controller be a child of the
+ * CPU-local interrupt controller.
+ */
+&intc {
+	compatible = "brcm,bcm2836-armctrl-ic";
+	reg = <0x7e00b200 0x200>;
+	interrupt-parent = <&local_intc>;
+	interrupts = <8>;
+};
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 8/9] ARM: bcm2835: dt: Add the ethernet to the device trees
       [not found] <1464934708-24769-1-git-send-email-kraxel@redhat.com>
  2016-06-03  6:18 ` [PATCH v2 6/9] dt-bindings: Add root properties for Raspberry Pi 3 Gerd Hoffmann
  2016-06-03  6:18 ` [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the " Gerd Hoffmann
@ 2016-06-03  6:18 ` Gerd Hoffmann
  2016-06-03  6:18 ` [PATCH v2 9/9] ARM: bcm2837: " Gerd Hoffmann
  3 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-03  6:18 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel
  Cc: Lubomir Rintel, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King, Stephen Warren,
	Lee Jones, Eric Anholt,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

From: Lubomir Rintel <lkundrak@v3.sk>

The hub and the ethernet in its port 1 are hardwired on the board.

Compared to the adapters that can be plugged into the USB ports, this
one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi
has the MAC address for this adapter in its ROM, accessible from its
firmware.

U-Boot can read out the address and set the local-mac-address property of the
node with "ethernet" alias. Let's add the node so that U-Boot can do its
business.

Model B rev2 and Model B+ entries were verified by me, the hierarchy and
pid/vid pair for the Version 2 was provided by Peter Chen. Original
Model B is a blind shot, though very likely correct.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
---
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts    |  1 +
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts    |  1 +
 arch/arm/boot/dts/bcm2835-rpi-b.dts         |  1 +
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts       |  1 +
 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++
 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++
 arch/arm/boot/dts/bcm283x.dtsi              |  2 ++
 7 files changed, 44 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
 create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi

diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index 57d313b..d5fdb8e 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -1,6 +1,7 @@
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
 
 / {
 	compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
index cf2774e..bfc4bd9 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
@@ -1,6 +1,7 @@
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9512.dtsi"
 
 / {
 	compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 8b15f9c..0371bb7 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -1,6 +1,7 @@
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9512.dtsi"
 
 / {
 	compatible = "raspberrypi,model-b", "brcm,bcm2835";
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
index c4743f4..29e1cfe 100644
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
@@ -1,6 +1,7 @@
 /dts-v1/;
 #include "bcm2836.dtsi"
 #include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
 
 / {
 	compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
new file mode 100644
index 0000000..12c981e
--- /dev/null
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
@@ -0,0 +1,19 @@
+/ {
+	aliases {
+		ethernet = &ethernet;
+	};
+};
+
+&usb {
+	usb1@1 {
+		compatible = "usb424,9512";
+		reg = <1>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethernet: usbether@1 {
+			compatible = "usb424,ec00";
+			reg = <1>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
new file mode 100644
index 0000000..3f0a56e
--- /dev/null
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
@@ -0,0 +1,19 @@
+/ {
+	aliases {
+		ethernet = &ethernet;
+	};
+};
+
+&usb {
+	usb1@1 {
+		compatible = "usb424,9514";
+		reg = <1>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethernet: usbether@1 {
+			compatible = "usb424,ec00";
+			reg = <1>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 10b27b9..b982522 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -287,6 +287,8 @@
 			compatible = "brcm,bcm2835-usb";
 			reg = <0x7e980000 0x10000>;
 			interrupts = <1 9>;
+			#address-cells = <1>;
+			#size-cells = <0>;
 		};
 
 		v3d: v3d@7ec00000 {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 9/9] ARM: bcm2837: dt: Add the ethernet to the device trees
       [not found] <1464934708-24769-1-git-send-email-kraxel@redhat.com>
                   ` (2 preceding siblings ...)
  2016-06-03  6:18 ` [PATCH v2 8/9] ARM: bcm2835: dt: Add the ethernet to the device trees Gerd Hoffmann
@ 2016-06-03  6:18 ` Gerd Hoffmann
  3 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-03  6:18 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel
  Cc: Gerd Hoffmann, Florian Fainelli, Ray Jui, Scott Branden,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Catalin Marinas, Will Deacon,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
index 223793d..6f47dd2 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -1,6 +1,7 @@
 /dts-v1/;
 #include "bcm2837.dtsi"
 #include "../../../../arm/boot/dts/bcm2835-rpi.dtsi"
+#include "../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi"
 
 / {
 	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03  6:18 ` [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the " Gerd Hoffmann
@ 2016-06-03  7:38   ` Arnd Bergmann
  2016-06-03  8:45     ` Gerd Hoffmann
       [not found]   ` <1464934708-24769-8-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  1 sibling, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2016-06-03  7:38 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Gerd Hoffmann, linux-rpi-kernel, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt, Rob Herring,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

On Friday, June 3, 2016 8:18:26 AM CEST Gerd Hoffmann wrote:
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 06b6c2d..71e2d36 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
>         bcm2835-rpi-b-rev2.dtb \
>         bcm2835-rpi-b-plus.dtb \
>         bcm2835-rpi-a-plus.dtb \
> -       bcm2836-rpi-2-b.dtb
> +       bcm2836-rpi-2-b.dtb \
> +       ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>         bcm4708-asus-rt-ac56u.dtb \
>         bcm4708-asus-rt-ac68u.dtb \

Let's make this hunk a separate patch so we can discuss it on its
own. I'm not really happy about the way it looks (in general, using ../../../
anywhere in the kernel looks hacky.

How about a separate

dtb-$(CONFIG_ARCH_BCM2835) +=
	../../../arm64/boot/dts/broadcom/

so at least we don't have to add each board on its own?

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03  7:38   ` Arnd Bergmann
@ 2016-06-03  8:45     ` Gerd Hoffmann
  2016-06-03  8:55       ` Arnd Bergmann
  0 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-03  8:45 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, linux-rpi-kernel, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt, Rob Herring,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

On Fr, 2016-06-03 at 09:38 +0200, Arnd Bergmann wrote:
> On Friday, June 3, 2016 8:18:26 AM CEST Gerd Hoffmann wrote:
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 06b6c2d..71e2d36 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
> >         bcm2835-rpi-b-rev2.dtb \
> >         bcm2835-rpi-b-plus.dtb \
> >         bcm2835-rpi-a-plus.dtb \
> > -       bcm2836-rpi-2-b.dtb
> > +       bcm2836-rpi-2-b.dtb \
> > +       ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
> >  dtb-$(CONFIG_ARCH_BCM_5301X) += \
> >         bcm4708-asus-rt-ac56u.dtb \
> >         bcm4708-asus-rt-ac68u.dtb \
> 
> Let's make this hunk a separate patch so we can discuss it on its
> own.

Hmm, I through we where in agreement to do it this way ...

> I'm not really happy about the way it looks (in general, using ../../../
> anywhere in the kernel looks hacky.
> 
> How about a separate
> 
> dtb-$(CONFIG_ARCH_BCM2835) +=
> 	../../../arm64/boot/dts/broadcom/

Not working.

Tried "subdir-$(CONFIG_ARCH_BCM) += ...".  Didn't work either.
Same for "dts-dirs += ...".

Running out of ideas.  Guess I have to leave this to someone who knows
kbuild better than me.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03  8:45     ` Gerd Hoffmann
@ 2016-06-03  8:55       ` Arnd Bergmann
  2016-06-03 10:39         ` Gerd Hoffmann
  0 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2016-06-03  8:55 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Pawel Moll, Scott Branden, Ian Campbell,
	Catalin Marinas, Kumar Gala, Will Deacon, Russell King,
	open list, Eric Anholt, Rob Herring,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	linux-rpi-kernel, Ray Jui, linux-arm-kernel

On Friday, June 3, 2016 10:45:46 AM CEST Gerd Hoffmann wrote:
> On Fr, 2016-06-03 at 09:38 +0200, Arnd Bergmann wrote:
> > On Friday, June 3, 2016 8:18:26 AM CEST Gerd Hoffmann wrote:
> > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > > index 06b6c2d..71e2d36 100644
> > > --- a/arch/arm/boot/dts/Makefile
> > > +++ b/arch/arm/boot/dts/Makefile
> > > @@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
> > >         bcm2835-rpi-b-rev2.dtb \
> > >         bcm2835-rpi-b-plus.dtb \
> > >         bcm2835-rpi-a-plus.dtb \
> > > -       bcm2836-rpi-2-b.dtb
> > > +       bcm2836-rpi-2-b.dtb \
> > > +       ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
> > >  dtb-$(CONFIG_ARCH_BCM_5301X) += \
> > >         bcm4708-asus-rt-ac56u.dtb \
> > >         bcm4708-asus-rt-ac68u.dtb \
> > 
> > Let's make this hunk a separate patch so we can discuss it on its
> > own.
> 
> Hmm, I through we where in agreement to do it this way ...

I think it's ok in principle, this is about the specific syntax.

> > I'm not really happy about the way it looks (in general, using ../../../
> > anywhere in the kernel looks hacky.
> > 
> > How about a separate
> > 
> > dtb-$(CONFIG_ARCH_BCM2835) +=
> >       ../../../arm64/boot/dts/broadcom/
> 
> Not working.
> 
> Tried "subdir-$(CONFIG_ARCH_BCM) += ...".  Didn't work either.
> Same for "dts-dirs += ...".
> 
> Running out of ideas.  Guess I have to leave this to someone who knows
> kbuild better than me.

I tried

subdir-y += ../../../arm64/boot/dts/broadcom

and it seemed to work fine, I got

  DTC     arch/arm/boot/dts/../../../arm64/boot/dts/broadcom/ns2-svk.dtb

in an allmodconfig build, which also includes CONFIG_ARCH_BCM_IPROC.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
       [not found]   ` <1464934708-24769-8-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-03  9:04     ` Stefan Wahren
  0 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2016-06-03  9:04 UTC (permalink / raw)
  To: Gerd Hoffmann, Eric Anholt
  Cc: linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Rob Herring,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

Hi,

Am 03.06.2016 um 08:18 schrieb Gerd Hoffmann:
> From: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
>
> While this devicetree also works for booting in 32-bit mode, it's
> placed in arm64 since it's a 64-bit CPU (as suggested by Arnd).

i'm currently working on a patch series to fix dtc warnings like

Warning (unit_address_vs_reg): Node /memory has a reg or ranges
property, but no unit name

This a copy of affected parts ( look at memory, soc and local_intc node ).

So how should this be handled?

a) fix the issues here
b) extend my patch series after this patch has been applied

Stefan

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03  8:55       ` Arnd Bergmann
@ 2016-06-03 10:39         ` Gerd Hoffmann
  2016-06-03 11:15           ` Arnd Bergmann
  2016-06-03 16:17           ` Rob Herring
  0 siblings, 2 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-03 10:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt, Rob Herring,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

  Hi,

> I tried
> 
> subdir-y += ../../../arm64/boot/dts/broadcom

Hmm, works for me too now, probably had a typo somewhere.

But it works for "make dtbs" only, "make dtbs_install" ignores it.

cheers,
  Gerd

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03 10:39         ` Gerd Hoffmann
@ 2016-06-03 11:15           ` Arnd Bergmann
  2016-06-03 16:17           ` Rob Herring
  1 sibling, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2016-06-03 11:15 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Gerd Hoffmann, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Pawel Moll, Scott Branden, Ian Campbell,
	Catalin Marinas, Kumar Gala, Will Deacon, Russell King,
	open list, Eric Anholt, Rob Herring,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	linux-rpi-kernel, Ray Jui

On Friday, June 3, 2016 12:39:15 PM CEST Gerd Hoffmann wrote:
>   Hi,
> 
> > I tried
> > 
> > subdir-y += ../../../arm64/boot/dts/broadcom
> 
> Hmm, works for me too now, probably had a typo somewhere.
> 
> But it works for "make dtbs" only, "make dtbs_install" ignores it.

Right: this is no good ;-)

make -f /git/arm-soc/scripts/Makefile.dtbinst obj=arch/arm/boot/dts/../../../arm64/boot/dts/broadcom
  mkdir -p /tmp/boot//dtbs/4.7.0-rc1-00345-gd2a060ee0c24-dirty/../../../arm64/boot/dts/broadcom; cp arch/arm/boot/dts/../../../arm64/boot/dts/broadcom/ns2-svk.dtb /tmp/boot//dtbs/4.7.0-rc1-00345-gd2a060ee0c24-dirty/../../../arm64/boot/dts/broadcom

Maybe we can have a symlink there? I've tried that without success too,
but it shouldn't be that hard to get right.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03 10:39         ` Gerd Hoffmann
  2016-06-03 11:15           ` Arnd Bergmann
@ 2016-06-03 16:17           ` Rob Herring
  2016-06-04 21:39             ` Arnd Bergmann
       [not found]             ` <CAL_JsqL2RgTLq9R3v4LDiV6Wa7totbzJBgmzVDgUv_keoS52vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 2 replies; 15+ messages in thread
From: Rob Herring @ 2016-06-03 16:17 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Arnd Bergmann, linux-arm-kernel, linux-rpi-kernel, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

On Fri, Jun 3, 2016 at 5:39 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
>> I tried
>>
>> subdir-y += ../../../arm64/boot/dts/broadcom
>
> Hmm, works for me too now, probably had a typo somewhere.

What directory does the dtb end up in? Because as it was, it ended up
in arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is
worth it if the dtb doesn't end up in arch/arm/boot/dts/.

> But it works for "make dtbs" only, "make dtbs_install" ignores it.

That will be fun for users to debug...

Rob

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-03 16:17           ` Rob Herring
@ 2016-06-04 21:39             ` Arnd Bergmann
       [not found]             ` <CAL_JsqL2RgTLq9R3v4LDiV6Wa7totbzJBgmzVDgUv_keoS52vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2016-06-04 21:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Gerd Hoffmann, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Scott Branden, Ian Campbell, Catalin Marinas,
	Kumar Gala, Will Deacon, Russell King, open list, Eric Anholt,
	Pawel Moll, linux-rpi-kernel, Ray Jui,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...

On Friday, June 3, 2016 11:17:51 AM CEST Rob Herring wrote:
> On Fri, Jun 3, 2016 at 5:39 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >   Hi,
> >
> >> I tried
> >>
> >> subdir-y += ../../../arm64/boot/dts/broadcom
> >
> > Hmm, works for me too now, probably had a typo somewhere.
> 
> What directory does the dtb end up in? Because as it was, it ended up
> in arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is
> worth it if the dtb doesn't end up in arch/arm/boot/dts/.

I think having the dtb in $(objdir)arch/arm64/boot/dts/broadcom is fine, however
installing the  'make dtbs_install' rule copy it to
/boot/dts/../../../arm64/boot/dts/broadcom is not.

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
       [not found]             ` <CAL_JsqL2RgTLq9R3v4LDiV6Wa7totbzJBgmzVDgUv_keoS52vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-06-06  7:20               ` Gerd Hoffmann
  2016-06-06  7:28                 ` Arnd Bergmann
  0 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-06  7:20 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

On Fr, 2016-06-03 at 11:17 -0500, Rob Herring wrote:
> On Fri, Jun 3, 2016 at 5:39 AM, Gerd Hoffmann <kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> >   Hi,
> >
> >> I tried
> >>
> >> subdir-y += ../../../arm64/boot/dts/broadcom
> >
> > Hmm, works for me too now, probably had a typo somewhere.
> 
> What directory does the dtb end up in? Because as it was, it ended up
> in arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is
> worth it if the dtb doesn't end up in arch/arm/boot/dts/.

With the 2/7 patch at the start of this subthread the dtb ends up in
arch/arm64/boot/dts/broadcom for both arm and arm64 builds.

make "dtbs_install" places it in /boot/dtbs/$version/ for arm builds and
in /boot/dtbs/$version/broadcom/ for arm64 builds.

cheers,
  Gerd

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-06  7:20               ` Gerd Hoffmann
@ 2016-06-06  7:28                 ` Arnd Bergmann
  2016-06-06  7:47                   ` Gerd Hoffmann
  0 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2016-06-06  7:28 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Rob Herring, linux-arm-kernel, linux-rpi-kernel, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

On Monday, June 6, 2016 9:20:12 AM CEST Gerd Hoffmann wrote:
> On Fr, 2016-06-03 at 11:17 -0500, Rob Herring wrote:
> > On Fri, Jun 3, 2016 at 5:39 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > >   Hi,
> > >
> > >> I tried
> > >>
> > >> subdir-y += ../../../arm64/boot/dts/broadcom
> > >
> > > Hmm, works for me too now, probably had a typo somewhere.
> > 
> > What directory does the dtb end up in? Because as it was, it ended up
> > in arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is
> > worth it if the dtb doesn't end up in arch/arm/boot/dts/.
> 
> With the 2/7 patch at the start of this subthread the dtb ends up in
> arch/arm64/boot/dts/broadcom for both arm and arm64 builds.
> 
> make "dtbs_install" places it in /boot/dtbs/$version/ for arm builds and
> in /boot/dtbs/$version/broadcom/ for arm64 builds.

Ok, let's stay with that for now then, and solve it better when we
need to do more of the same. Are you aware of any other boards using
bcm2837?

	Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
  2016-06-06  7:28                 ` Arnd Bergmann
@ 2016-06-06  7:47                   ` Gerd Hoffmann
  0 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2016-06-06  7:47 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rob Herring, linux-arm-kernel, linux-rpi-kernel, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Florian Fainelli, Catalin Marinas, Scott Branden, Pawel Moll,
	Ian Campbell, Ray Jui, Will Deacon, Russell King, open list,
	Eric Anholt,
	open list:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
	Kumar Gala

  Hi,

> > With the 2/7 patch at the start of this subthread the dtb ends up in
> > arch/arm64/boot/dts/broadcom for both arm and arm64 builds.
> > 
> > make "dtbs_install" places it in /boot/dtbs/$version/ for arm builds and
> > in /boot/dtbs/$version/broadcom/ for arm64 builds.
> 
> Ok, let's stay with that for now then, and solve it better when we
> need to do more of the same. Are you aware of any other boards using
> bcm2837?

No.

As far I know it has been created specifically for the rpi foundation,
so I expect we might see new members of the rpi family using the bcm2837
too, but probably no other devices.

Maybe Eric Anholt knows more details.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-06-06  7:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1464934708-24769-1-git-send-email-kraxel@redhat.com>
2016-06-03  6:18 ` [PATCH v2 6/9] dt-bindings: Add root properties for Raspberry Pi 3 Gerd Hoffmann
2016-06-03  6:18 ` [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the " Gerd Hoffmann
2016-06-03  7:38   ` Arnd Bergmann
2016-06-03  8:45     ` Gerd Hoffmann
2016-06-03  8:55       ` Arnd Bergmann
2016-06-03 10:39         ` Gerd Hoffmann
2016-06-03 11:15           ` Arnd Bergmann
2016-06-03 16:17           ` Rob Herring
2016-06-04 21:39             ` Arnd Bergmann
     [not found]             ` <CAL_JsqL2RgTLq9R3v4LDiV6Wa7totbzJBgmzVDgUv_keoS52vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-06  7:20               ` Gerd Hoffmann
2016-06-06  7:28                 ` Arnd Bergmann
2016-06-06  7:47                   ` Gerd Hoffmann
     [not found]   ` <1464934708-24769-8-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-03  9:04     ` Stefan Wahren
2016-06-03  6:18 ` [PATCH v2 8/9] ARM: bcm2835: dt: Add the ethernet to the device trees Gerd Hoffmann
2016-06-03  6:18 ` [PATCH v2 9/9] ARM: bcm2837: " Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).