All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
@ 2016-09-26 12:26 Fabian Vogt
  2016-09-26 12:26 ` [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support Fabian Vogt
                   ` (10 more replies)
  0 siblings, 11 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

This patch series modifies the used drivers to work with OF_CONTROL
and switches the board code and configs to use it.
The added device trees are directly from the linux kernel tree
and can thus be used for booting the (upstream) kernel.

Fabian Vogt (9):
  gpio: bcm2835: add device tree support
  serial: bcm283x_mu: add device tree support
  serial: pl01x: expose skip_init platdata option in DT
  fdt: add dt-bindings for bcm2835
  fdt: import bcm283x device tree sources from the linux kernel tree
  fdt: adjust bcm283x device tree for u-boot
  serial: bcm283x_mu: support disabling after initialization
  board: rpi: move uart deactivation to board_init
  ARM: bcm283x: use OF_CONTROL for bcm283x

 arch/arm/Kconfig                                   |   1 +
 arch/arm/dts/Makefile                              |   9 +
 arch/arm/dts/bcm2835-rpi-a-plus.dts                |  35 +++
 arch/arm/dts/bcm2835-rpi-a.dts                     |  28 ++
 arch/arm/dts/bcm2835-rpi-b-plus.dts                |  36 +++
 arch/arm/dts/bcm2835-rpi-b-rev2.dts                |  29 ++
 arch/arm/dts/bcm2835-rpi-b.dts                     |  23 ++
 arch/arm/dts/bcm2835-rpi.dtsi                      |  86 ++++++
 arch/arm/dts/bcm2835.dtsi                          |  25 ++
 arch/arm/dts/bcm2836-rpi-2-b.dts                   |  40 +++
 arch/arm/dts/bcm2836.dtsi                          |  78 +++++
 arch/arm/dts/bcm2837-rpi-3-b.dts                   |  30 ++
 arch/arm/dts/bcm2837.dtsi                          |  76 +++++
 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi             |  19 ++
 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi             |  19 ++
 arch/arm/dts/bcm283x-uboot.dtsi                    |  22 ++
 arch/arm/dts/bcm283x.dtsi                          | 323 +++++++++++++++++++++
 board/raspberrypi/rpi/rpi.c                        |  77 ++---
 configs/rpi_2_defconfig                            |   2 +
 configs/rpi_3_32b_defconfig                        |   2 +
 configs/rpi_3_defconfig                            |   2 +
 configs/rpi_defconfig                              |   2 +
 doc/device-tree-bindings/gpio/bcm2835-gpio.txt     |   5 +
 .../serial/bcm2835-aux-uart.txt                    |  10 +
 doc/device-tree-bindings/serial/pl01x.txt          |   3 +
 drivers/gpio/bcm2835_gpio.c                        |  24 ++
 drivers/serial/serial_bcm283x_mu.c                 |  46 ++-
 drivers/serial/serial_pl01x.c                      |   2 +
 include/configs/rpi.h                              |   1 -
 include/dt-bindings/clock/bcm2835-aux.h            |  17 ++
 include/dt-bindings/clock/bcm2835.h                |  66 +++++
 include/dt-bindings/pinctrl/bcm2835.h              |  27 ++
 include/dt-bindings/power/raspberrypi-power.h      |  41 +++
 33 files changed, 1152 insertions(+), 54 deletions(-)
 create mode 100644 arch/arm/dts/bcm2835-rpi-a-plus.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-a.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-b-plus.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-b-rev2.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-b.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi.dtsi
 create mode 100644 arch/arm/dts/bcm2835.dtsi
 create mode 100644 arch/arm/dts/bcm2836-rpi-2-b.dts
 create mode 100644 arch/arm/dts/bcm2836.dtsi
 create mode 100644 arch/arm/dts/bcm2837-rpi-3-b.dts
 create mode 100644 arch/arm/dts/bcm2837.dtsi
 create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
 create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
 create mode 100644 arch/arm/dts/bcm283x-uboot.dtsi
 create mode 100644 arch/arm/dts/bcm283x.dtsi
 create mode 100644 doc/device-tree-bindings/gpio/bcm2835-gpio.txt
 create mode 100644 doc/device-tree-bindings/serial/bcm2835-aux-uart.txt
 create mode 100644 include/dt-bindings/clock/bcm2835-aux.h
 create mode 100644 include/dt-bindings/clock/bcm2835.h
 create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
 create mode 100644 include/dt-bindings/power/raspberrypi-power.h

-- 
2.6.2

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

* [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:32   ` Simon Glass
  2016-11-29 17:33   ` [U-Boot] [U-Boot,1/9] " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 2/9] serial: bcm283x_mu: " Fabian Vogt
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

This patch adds device tree support for the bcm2835 GPIO driver.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 doc/device-tree-bindings/gpio/bcm2835-gpio.txt |  5 +++++
 drivers/gpio/bcm2835_gpio.c                    | 24 ++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 doc/device-tree-bindings/gpio/bcm2835-gpio.txt

diff --git a/doc/device-tree-bindings/gpio/bcm2835-gpio.txt b/doc/device-tree-bindings/gpio/bcm2835-gpio.txt
new file mode 100644
index 0000000..21e0610
--- /dev/null
+++ b/doc/device-tree-bindings/gpio/bcm2835-gpio.txt
@@ -0,0 +1,5 @@
+* Broadcom BCM283x GPIO controller
+
+Required properties:
+- compatible: must be "brcm,bcm2835-gpio"
+- reg: exactly one register range with length 0xb4
diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c
index 8dd7a28..cd5480e 100644
--- a/drivers/gpio/bcm2835_gpio.c
+++ b/drivers/gpio/bcm2835_gpio.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <fdtdec.h>
 
 struct bcm2835_gpios {
 	struct bcm2835_gpio_regs *reg;
@@ -118,9 +119,32 @@ static int bcm2835_gpio_probe(struct udevice *dev)
 	return 0;
 }
 
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+static const struct udevice_id bcm2835_gpio_id[] = {
+	{.compatible = "brcm,bcm2835-gpio"},
+	{}
+};
+
+static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
+{
+	struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
+	fdt_addr_t addr;
+
+	addr = dev_get_addr(dev);
+	if (addr == FDT_ADDR_T_NONE)
+		return -EINVAL;
+
+	plat->base = addr;
+	return 0;
+}
+#endif
+
 U_BOOT_DRIVER(gpio_bcm2835) = {
 	.name	= "gpio_bcm2835",
 	.id	= UCLASS_GPIO,
+	.of_match = of_match_ptr(bcm2835_gpio_id),
+	.ofdata_to_platdata = of_match_ptr(bcm2835_gpio_ofdata_to_platdata),
+	.platdata_auto_alloc_size = sizeof(struct bcm2835_gpio_platdata),
 	.ops	= &gpio_bcm2835_ops,
 	.probe	= bcm2835_gpio_probe,
 	.flags	= DM_FLAG_PRE_RELOC,
-- 
2.6.2

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

* [U-Boot] [PATCH 2/9] serial: bcm283x_mu: add device tree support
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
  2016-09-26 12:26 ` [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:34   ` [U-Boot] [U-Boot, " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT Fabian Vogt
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

This patch adds device tree support for the bcm283x mini-uart driver.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 .../serial/bcm2835-aux-uart.txt                    | 10 ++++++++
 drivers/serial/serial_bcm283x_mu.c                 | 28 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 doc/device-tree-bindings/serial/bcm2835-aux-uart.txt

diff --git a/doc/device-tree-bindings/serial/bcm2835-aux-uart.txt b/doc/device-tree-bindings/serial/bcm2835-aux-uart.txt
new file mode 100644
index 0000000..75886e5
--- /dev/null
+++ b/doc/device-tree-bindings/serial/bcm2835-aux-uart.txt
@@ -0,0 +1,10 @@
+* BCM283x mini UART
+
+Required properties:
+- compatible: must be "brcm,bcm2835-aux-uart"
+- reg: exactly one register range with length 0x1000
+- clock: input clock frequency for the UART (used to calculate the baud
+  rate divisor)
+
+Optional properties:
+- skip-init: if present, the baud rate divisor is not changed
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index f4e062f..e361909 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -25,6 +25,8 @@
 #include <linux/compiler.h>
 #include <fdtdec.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 struct bcm283x_mu_regs {
 	u32 io;
 	u32 iir;
@@ -132,9 +134,35 @@ static const struct dm_serial_ops bcm283x_mu_serial_ops = {
 	.setbrg = bcm283x_mu_serial_setbrg,
 };
 
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+static const struct udevice_id bcm283x_mu_serial_id[] = {
+	{.compatible = "brcm,bcm2835-aux-uart"},
+	{}
+};
+
+static int bcm283x_mu_serial_ofdata_to_platdata(struct udevice *dev)
+{
+	struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
+	fdt_addr_t addr;
+
+	addr = dev_get_addr(dev);
+	if (addr == FDT_ADDR_T_NONE)
+		return -EINVAL;
+
+	plat->base = addr;
+	plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1);
+	plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev->of_offset,
+	                                  "skip-init");
+	plat->disabled = false;
+	return 0;
+}
+#endif
+
 U_BOOT_DRIVER(serial_bcm283x_mu) = {
 	.name = "serial_bcm283x_mu",
 	.id = UCLASS_SERIAL,
+	.of_match = of_match_ptr(bcm283x_mu_serial_id),
+	.ofdata_to_platdata = of_match_ptr(bcm283x_mu_serial_ofdata_to_platdata),
 	.platdata_auto_alloc_size = sizeof(struct bcm283x_mu_serial_platdata),
 	.probe = bcm283x_mu_serial_probe,
 	.ops = &bcm283x_mu_serial_ops,
-- 
2.6.2

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

* [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
  2016-09-26 12:26 ` [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support Fabian Vogt
  2016-09-26 12:26 ` [U-Boot] [PATCH 2/9] serial: bcm283x_mu: " Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:34   ` [U-Boot] [U-Boot, " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835 Fabian Vogt
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

To be able to represent the skip-init platdata element with OF_CONTROL,
it needs to be read from the device tree as well and put into the platform data.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 doc/device-tree-bindings/serial/pl01x.txt | 3 +++
 drivers/serial/serial_pl01x.c             | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/doc/device-tree-bindings/serial/pl01x.txt b/doc/device-tree-bindings/serial/pl01x.txt
index 61c27d1..017b1e2 100644
--- a/doc/device-tree-bindings/serial/pl01x.txt
+++ b/doc/device-tree-bindings/serial/pl01x.txt
@@ -5,3 +5,6 @@ Required properties:
 - reg: exactly one register range with length 0x1000
 - clock: input clock frequency for the UART (used to calculate the baud
   rate divisor)
+
+Optional properties:
+- skip-init: if present, the baud rate divisor is not changed
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 6f83835..a8d3d67 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -356,6 +356,8 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
 	plat->base = addr;
 	plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1);
 	plat->type = dev_get_driver_data(dev);
+	plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev->of_offset,
+	                                  "skip-init");
 	return 0;
 }
 #endif
-- 
2.6.2

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

* [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (2 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:34   ` [U-Boot] [U-Boot,4/9] " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree Fabian Vogt
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

This patch adds dt-bindings as used by the linux kernel device trees
for the bcm283x family.

Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 include/dt-bindings/clock/bcm2835-aux.h       | 17 +++++++
 include/dt-bindings/clock/bcm2835.h           | 66 +++++++++++++++++++++++++++
 include/dt-bindings/pinctrl/bcm2835.h         | 27 +++++++++++
 include/dt-bindings/power/raspberrypi-power.h | 41 +++++++++++++++++
 4 files changed, 151 insertions(+)
 create mode 100644 include/dt-bindings/clock/bcm2835-aux.h
 create mode 100644 include/dt-bindings/clock/bcm2835.h
 create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
 create mode 100644 include/dt-bindings/power/raspberrypi-power.h

diff --git a/include/dt-bindings/clock/bcm2835-aux.h b/include/dt-bindings/clock/bcm2835-aux.h
new file mode 100644
index 0000000..d91156e
--- /dev/null
+++ b/include/dt-bindings/clock/bcm2835-aux.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2015 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#define BCM2835_AUX_CLOCK_UART		0
+#define BCM2835_AUX_CLOCK_SPI1		1
+#define BCM2835_AUX_CLOCK_SPI2		2
+#define BCM2835_AUX_CLOCK_COUNT		3
diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h
new file mode 100644
index 0000000..360e00c
--- /dev/null
+++ b/include/dt-bindings/clock/bcm2835.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2015 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#define BCM2835_PLLA			0
+#define BCM2835_PLLB			1
+#define BCM2835_PLLC			2
+#define BCM2835_PLLD			3
+#define BCM2835_PLLH			4
+
+#define BCM2835_PLLA_CORE		5
+#define BCM2835_PLLA_PER		6
+#define BCM2835_PLLB_ARM		7
+#define BCM2835_PLLC_CORE0		8
+#define BCM2835_PLLC_CORE1		9
+#define BCM2835_PLLC_CORE2		10
+#define BCM2835_PLLC_PER		11
+#define BCM2835_PLLD_CORE		12
+#define BCM2835_PLLD_PER		13
+#define BCM2835_PLLH_RCAL		14
+#define BCM2835_PLLH_AUX		15
+#define BCM2835_PLLH_PIX		16
+
+#define BCM2835_CLOCK_TIMER		17
+#define BCM2835_CLOCK_OTP		18
+#define BCM2835_CLOCK_UART		19
+#define BCM2835_CLOCK_VPU		20
+#define BCM2835_CLOCK_V3D		21
+#define BCM2835_CLOCK_ISP		22
+#define BCM2835_CLOCK_H264		23
+#define BCM2835_CLOCK_VEC		24
+#define BCM2835_CLOCK_HSM		25
+#define BCM2835_CLOCK_SDRAM		26
+#define BCM2835_CLOCK_TSENS		27
+#define BCM2835_CLOCK_EMMC		28
+#define BCM2835_CLOCK_PERI_IMAGE	29
+#define BCM2835_CLOCK_PWM		30
+#define BCM2835_CLOCK_PCM		31
+
+#define BCM2835_PLLA_DSI0		32
+#define BCM2835_PLLA_CCP2		33
+#define BCM2835_PLLD_DSI0		34
+#define BCM2835_PLLD_DSI1		35
+
+#define BCM2835_CLOCK_AVEO		36
+#define BCM2835_CLOCK_DFT		37
+#define BCM2835_CLOCK_GP0		38
+#define BCM2835_CLOCK_GP1		39
+#define BCM2835_CLOCK_GP2		40
+#define BCM2835_CLOCK_SLIM		41
+#define BCM2835_CLOCK_SMI		42
+#define BCM2835_CLOCK_TEC		43
+#define BCM2835_CLOCK_DPI		44
+#define BCM2835_CLOCK_CAM0		45
+#define BCM2835_CLOCK_CAM1		46
+#define BCM2835_CLOCK_DSI0E		47
+#define BCM2835_CLOCK_DSI1E		48
diff --git a/include/dt-bindings/pinctrl/bcm2835.h b/include/dt-bindings/pinctrl/bcm2835.h
new file mode 100644
index 0000000..6f0bc37
--- /dev/null
+++ b/include/dt-bindings/pinctrl/bcm2835.h
@@ -0,0 +1,27 @@
+/*
+ * Header providing constants for bcm2835 pinctrl bindings.
+ *
+ * Copyright (C) 2015 Stefan Wahren <stefan.wahren@i2se.com>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#ifndef __DT_BINDINGS_PINCTRL_BCM2835_H__
+#define __DT_BINDINGS_PINCTRL_BCM2835_H__
+
+/* brcm,function property */
+#define BCM2835_FSEL_GPIO_IN	0
+#define BCM2835_FSEL_GPIO_OUT	1
+#define BCM2835_FSEL_ALT5	2
+#define BCM2835_FSEL_ALT4	3
+#define BCM2835_FSEL_ALT0	4
+#define BCM2835_FSEL_ALT1	5
+#define BCM2835_FSEL_ALT2	6
+#define BCM2835_FSEL_ALT3	7
+
+#endif /* __DT_BINDINGS_PINCTRL_BCM2835_H__ */
diff --git a/include/dt-bindings/power/raspberrypi-power.h b/include/dt-bindings/power/raspberrypi-power.h
new file mode 100644
index 0000000..b3ff8e0
--- /dev/null
+++ b/include/dt-bindings/power/raspberrypi-power.h
@@ -0,0 +1,41 @@
+/*
+ *  Copyright ? 2015 Broadcom
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H
+#define _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H
+
+/* These power domain indices are the firmware interface's indices
+ * minus one.
+ */
+#define RPI_POWER_DOMAIN_I2C0		0
+#define RPI_POWER_DOMAIN_I2C1		1
+#define RPI_POWER_DOMAIN_I2C2		2
+#define RPI_POWER_DOMAIN_VIDEO_SCALER	3
+#define RPI_POWER_DOMAIN_VPU1		4
+#define RPI_POWER_DOMAIN_HDMI		5
+#define RPI_POWER_DOMAIN_USB		6
+#define RPI_POWER_DOMAIN_VEC		7
+#define RPI_POWER_DOMAIN_JPEG		8
+#define RPI_POWER_DOMAIN_H264		9
+#define RPI_POWER_DOMAIN_V3D		10
+#define RPI_POWER_DOMAIN_ISP		11
+#define RPI_POWER_DOMAIN_UNICAM0	12
+#define RPI_POWER_DOMAIN_UNICAM1	13
+#define RPI_POWER_DOMAIN_CCP2RX		14
+#define RPI_POWER_DOMAIN_CSI2		15
+#define RPI_POWER_DOMAIN_CPI		16
+#define RPI_POWER_DOMAIN_DSI0		17
+#define RPI_POWER_DOMAIN_DSI1		18
+#define RPI_POWER_DOMAIN_TRANSPOSER	19
+#define RPI_POWER_DOMAIN_CCP2TX		20
+#define RPI_POWER_DOMAIN_CDP		21
+#define RPI_POWER_DOMAIN_ARM		22
+
+#define RPI_POWER_DOMAIN_COUNT		23
+
+#endif /* _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H */
-- 
2.6.2

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

* [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (3 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835 Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:35   ` [U-Boot] [U-Boot, " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot Fabian Vogt
                   ` (5 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

This patch adds device trees for the bcm283x platform to be used with
OF_CONTROL. The version 4.8-rc7 of the linux kernel was used as source.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 arch/arm/dts/Makefile                  |   9 +
 arch/arm/dts/bcm2835-rpi-a-plus.dts    |  35 ++++
 arch/arm/dts/bcm2835-rpi-a.dts         |  28 +++
 arch/arm/dts/bcm2835-rpi-b-plus.dts    |  36 ++++
 arch/arm/dts/bcm2835-rpi-b-rev2.dts    |  29 +++
 arch/arm/dts/bcm2835-rpi-b.dts         |  23 +++
 arch/arm/dts/bcm2835-rpi.dtsi          |  86 +++++++++
 arch/arm/dts/bcm2835.dtsi              |  25 +++
 arch/arm/dts/bcm2836-rpi-2-b.dts       |  40 ++++
 arch/arm/dts/bcm2836.dtsi              |  78 ++++++++
 arch/arm/dts/bcm2837-rpi-3-b.dts       |  30 +++
 arch/arm/dts/bcm2837.dtsi              |  76 ++++++++
 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi |  19 ++
 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi |  19 ++
 arch/arm/dts/bcm283x.dtsi              | 321 +++++++++++++++++++++++++++++++++
 15 files changed, 854 insertions(+)
 create mode 100644 arch/arm/dts/bcm2835-rpi-a-plus.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-a.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-b-plus.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-b-rev2.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi-b.dts
 create mode 100644 arch/arm/dts/bcm2835-rpi.dtsi
 create mode 100644 arch/arm/dts/bcm2835.dtsi
 create mode 100644 arch/arm/dts/bcm2836-rpi-2-b.dts
 create mode 100644 arch/arm/dts/bcm2836.dtsi
 create mode 100644 arch/arm/dts/bcm2837-rpi-3-b.dts
 create mode 100644 arch/arm/dts/bcm2837.dtsi
 create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
 create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
 create mode 100644 arch/arm/dts/bcm283x.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 1d41d48..eafcfd4 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -283,6 +283,15 @@ dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
 	at91-sama5d2_xplained.dtb
 
+dtb-$(CONFIG_ARCH_BCM283X) += \
+	bcm2835-rpi-a-plus.dtb \
+	bcm2835-rpi-a.dtb \
+	bcm2835-rpi-b-plus.dtb \
+	bcm2835-rpi-b-rev2.dtb \
+	bcm2835-rpi-b.dtb \
+	bcm2836-rpi-2-b.dtb \
+	bcm2837-rpi-3-b.dtb
+
 targets += $(dtb-y)
 
 # Add any required device tree compiler flags here
diff --git a/arch/arm/dts/bcm2835-rpi-a-plus.dts b/arch/arm/dts/bcm2835-rpi-a-plus.dts
new file mode 100644
index 0000000..35ff4e7
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi-a-plus.dts
@@ -0,0 +1,35 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-a-plus", "brcm,bcm2835";
+	model = "Raspberry Pi Model A+";
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+
+		pwr {
+			label = "PWR";
+			gpios = <&gpio 35 0>;
+			default-state = "keep";
+			linux,default-trigger = "default-on";
+		};
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
+
+	/* I2S interface */
+	i2s_alt0: i2s_alt0 {
+		brcm,pins = <18 19 20 21>;
+		brcm,function = <BCM2835_FSEL_ALT0>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/dts/bcm2835-rpi-a.dts b/arch/arm/dts/bcm2835-rpi-a.dts
new file mode 100644
index 0000000..306a84e
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi-a.dts
@@ -0,0 +1,28 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-a", "brcm,bcm2835";
+	model = "Raspberry Pi Model A";
+
+	leds {
+		act {
+			gpios = <&gpio 16 1>;
+		};
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>;
+
+	/* I2S interface */
+	i2s_alt2: i2s_alt2 {
+		brcm,pins = <28 29 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT2>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
+};
diff --git a/arch/arm/dts/bcm2835-rpi-b-plus.dts b/arch/arm/dts/bcm2835-rpi-b-plus.dts
new file mode 100644
index 0000000..d5fdb8e
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi-b-plus.dts
@@ -0,0 +1,36 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
+	model = "Raspberry Pi Model B+";
+
+	leds {
+		act {
+			gpios = <&gpio 47 0>;
+		};
+
+		pwr {
+			label = "PWR";
+			gpios = <&gpio 35 0>;
+			default-state = "keep";
+			linux,default-trigger = "default-on";
+		};
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
+
+	/* I2S interface */
+	i2s_alt0: i2s_alt0 {
+		brcm,pins = <18 19 20 21>;
+		brcm,function = <BCM2835_FSEL_ALT0>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/dts/bcm2835-rpi-b-rev2.dts
new file mode 100644
index 0000000..bfc4bd9
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi-b-rev2.dts
@@ -0,0 +1,29 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9512.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
+	model = "Raspberry Pi Model B rev2";
+
+	leds {
+		act {
+			gpios = <&gpio 16 1>;
+		};
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>;
+
+	/* I2S interface */
+	i2s_alt2: i2s_alt2 {
+		brcm,pins = <28 29 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT2>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/dts/bcm2835-rpi-b.dts b/arch/arm/dts/bcm2835-rpi-b.dts
new file mode 100644
index 0000000..0371bb7
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi-b.dts
@@ -0,0 +1,23 @@
+/dts-v1/;
+#include "bcm2835.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9512.dtsi"
+
+/ {
+	compatible = "raspberrypi,model-b", "brcm,bcm2835";
+	model = "Raspberry Pi Model B";
+
+	leds {
+		act {
+			gpios = <&gpio 16 1>;
+		};
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &alt3>;
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
+};
diff --git a/arch/arm/dts/bcm2835-rpi.dtsi b/arch/arm/dts/bcm2835-rpi.dtsi
new file mode 100644
index 0000000..e9b47b2
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi.dtsi
@@ -0,0 +1,86 @@
+#include <dt-bindings/power/raspberrypi-power.h>
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0 0x10000000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		act {
+			label = "ACT";
+			default-state = "keep";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	soc {
+		firmware: firmware {
+			compatible = "raspberrypi,bcm2835-firmware";
+			mboxes = <&mailbox>;
+		};
+
+		power: power {
+			compatible = "raspberrypi,bcm2835-power";
+			firmware = <&firmware>;
+			#power-domain-cells = <1>;
+		};
+	};
+};
+
+&gpio {
+	pinctrl-names = "default";
+
+	gpioout: gpioout {
+		brcm,pins = <6>;
+		brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+	};
+
+	alt0: alt0 {
+		brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
+		brcm,function = <BCM2835_FSEL_ALT0>;
+	};
+
+	alt3: alt3 {
+		brcm,pins = <48 49 50 51 52 53>;
+		brcm,function = <BCM2835_FSEL_ALT3>;
+	};
+};
+
+&i2c0 {
+	status = "okay";
+	clock-frequency = <100000>;
+};
+
+&i2c1 {
+	status = "okay";
+	clock-frequency = <100000>;
+};
+
+&i2c2 {
+	status = "okay";
+};
+
+&sdhci {
+	status = "okay";
+	bus-width = <4>;
+};
+
+&pwm {
+	status = "okay";
+};
+
+&usb {
+	power-domains = <&power RPI_POWER_DOMAIN_USB>;
+};
+
+&v3d {
+	power-domains = <&power RPI_POWER_DOMAIN_V3D>;
+};
+
+&hdmi {
+	power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
+	status = "okay";
+};
diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi
new file mode 100644
index 0000000..a78759e
--- /dev/null
+++ b/arch/arm/dts/bcm2835.dtsi
@@ -0,0 +1,25 @@
+#include "bcm283x.dtsi"
+
+/ {
+	compatible = "brcm,bcm2835";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,arm1176jzf-s";
+			reg = <0x0>;
+		};
+	};
+
+	soc {
+		ranges = <0x7e000000 0x20000000 0x02000000>;
+		dma-ranges = <0x40000000 0x00000000 0x20000000>;
+
+		arm-pmu {
+			compatible = "arm,arm1176-pmu";
+		};
+	};
+};
diff --git a/arch/arm/dts/bcm2836-rpi-2-b.dts b/arch/arm/dts/bcm2836-rpi-2-b.dts
new file mode 100644
index 0000000..29e1cfe
--- /dev/null
+++ b/arch/arm/dts/bcm2836-rpi-2-b.dts
@@ -0,0 +1,40 @@
+/dts-v1/;
+#include "bcm2836.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.dtsi"
+
+/ {
+	compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
+	model = "Raspberry Pi 2 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";
+		};
+	};
+};
+
+&gpio {
+	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
+
+	/* I2S interface */
+	i2s_alt0: i2s_alt0 {
+		brcm,pins = <18 19 20 21>;
+		brcm,function = <BCM2835_FSEL_ALT0>;
+	};
+};
+
+&hdmi {
+	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/dts/bcm2836.dtsi b/arch/arm/dts/bcm2836.dtsi
new file mode 100644
index 0000000..9d0651d
--- /dev/null
+++ b/arch/arm/dts/bcm2836.dtsi
@@ -0,0 +1,78 @@
+#include "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>;
+		};
+
+		arm-pmu {
+			compatible = "arm,cortex-a7-pmu";
+			interrupt-parent = <&local_intc>;
+			interrupts = <9>;
+		};
+	};
+
+	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>;
+
+		v7_cpu0: cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a7";
+			reg = <0xf00>;
+			clock-frequency = <800000000>;
+		};
+
+		v7_cpu1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a7";
+			reg = <0xf01>;
+			clock-frequency = <800000000>;
+		};
+
+		v7_cpu2: cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a7";
+			reg = <0xf02>;
+			clock-frequency = <800000000>;
+		};
+
+		v7_cpu3: cpu at 3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a7";
+			reg = <0xf03>;
+			clock-frequency = <800000000>;
+		};
+	};
+};
+
+/* 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>;
+};
diff --git a/arch/arm/dts/bcm2837-rpi-3-b.dts b/arch/arm/dts/bcm2837-rpi-3-b.dts
new file mode 100644
index 0000000..7841b72
--- /dev/null
+++ b/arch/arm/dts/bcm2837-rpi-3-b.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9514.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/arm/dts/bcm2837.dtsi b/arch/arm/dts/bcm2837.dtsi
new file mode 100644
index 0000000..8216bbb
--- /dev/null
+++ b/arch/arm/dts/bcm2837.dtsi
@@ -0,0 +1,76 @@
+#include "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 at 0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x000000d8>;
+		};
+
+		cpu1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <1>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x000000e0>;
+		};
+
+		cpu2: cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <2>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x000000e8>;
+		};
+
+		cpu3: cpu at 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>;
+};
diff --git a/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
new file mode 100644
index 0000000..12c981e
--- /dev/null
+++ b/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
@@ -0,0 +1,19 @@
+/ {
+	aliases {
+		ethernet = &ethernet;
+	};
+};
+
+&usb {
+	usb1 at 1 {
+		compatible = "usb424,9512";
+		reg = <1>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethernet: usbether at 1 {
+			compatible = "usb424,ec00";
+			reg = <1>;
+		};
+	};
+};
diff --git a/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
new file mode 100644
index 0000000..3f0a56e
--- /dev/null
+++ b/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
@@ -0,0 +1,19 @@
+/ {
+	aliases {
+		ethernet = &ethernet;
+	};
+};
+
+&usb {
+	usb1 at 1 {
+		compatible = "usb424,9514";
+		reg = <1>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethernet: usbether at 1 {
+			compatible = "usb424,ec00";
+			reg = <1>;
+		};
+	};
+};
diff --git a/arch/arm/dts/bcm283x.dtsi b/arch/arm/dts/bcm283x.dtsi
new file mode 100644
index 0000000..445624a
--- /dev/null
+++ b/arch/arm/dts/bcm283x.dtsi
@@ -0,0 +1,321 @@
+#include <dt-bindings/pinctrl/bcm2835.h>
+#include <dt-bindings/clock/bcm2835.h>
+#include <dt-bindings/clock/bcm2835-aux.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/* This include file covers the common peripherals and configuration between
+ * bcm2835 and bcm2836 implementations, leaving the CPU configuration to
+ * bcm2835.dtsi and bcm2836.dtsi.
+ */
+
+/ {
+	compatible = "brcm,bcm2835";
+	model = "BCM2835";
+	interrupt-parent = <&intc>;
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	chosen {
+		bootargs = "earlyprintk console=ttyAMA0";
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		timer at 7e003000 {
+			compatible = "brcm,bcm2835-system-timer";
+			reg = <0x7e003000 0x1000>;
+			interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
+			/* This could be a reference to BCM2835_CLOCK_TIMER,
+			 * but we don't have the driver using the common clock
+			 * support yet.
+			 */
+			clock-frequency = <1000000>;
+		};
+
+		dma: dma at 7e007000 {
+			compatible = "brcm,bcm2835-dma";
+			reg = <0x7e007000 0xf00>;
+			interrupts = <1 16>,
+				     <1 17>,
+				     <1 18>,
+				     <1 19>,
+				     <1 20>,
+				     <1 21>,
+				     <1 22>,
+				     <1 23>,
+				     <1 24>,
+				     <1 25>,
+				     <1 26>,
+				     /* dma channel 11-14 share one irq */
+				     <1 27>,
+				     <1 27>,
+				     <1 27>,
+				     <1 27>,
+				     /* unused shared irq for all channels */
+				     <1 28>;
+			interrupt-names = "dma0",
+					  "dma1",
+					  "dma2",
+					  "dma3",
+					  "dma4",
+					  "dma5",
+					  "dma6",
+					  "dma7",
+					  "dma8",
+					  "dma9",
+					  "dma10",
+					  "dma11",
+					  "dma12",
+					  "dma13",
+					  "dma14",
+					  "dma-shared-all";
+			#dma-cells = <1>;
+			brcm,dma-channel-mask = <0x7f35>;
+		};
+
+		intc: interrupt-controller at 7e00b200 {
+			compatible = "brcm,bcm2835-armctrl-ic";
+			reg = <0x7e00b200 0x200>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		watchdog at 7e100000 {
+			compatible = "brcm,bcm2835-pm-wdt";
+			reg = <0x7e100000 0x28>;
+		};
+
+		clocks: cprman at 7e101000 {
+			compatible = "brcm,bcm2835-cprman";
+			#clock-cells = <1>;
+			reg = <0x7e101000 0x2000>;
+
+			/* CPRMAN derives everything from the platform's
+			 * oscillator.
+			 */
+			clocks = <&clk_osc>;
+		};
+
+		rng at 7e104000 {
+			compatible = "brcm,bcm2835-rng";
+			reg = <0x7e104000 0x10>;
+		};
+
+		mailbox: mailbox at 7e00b800 {
+			compatible = "brcm,bcm2835-mbox";
+			reg = <0x7e00b880 0x40>;
+			interrupts = <0 1>;
+			#mbox-cells = <0>;
+		};
+
+		gpio: gpio at 7e200000 {
+			compatible = "brcm,bcm2835-gpio";
+			reg = <0x7e200000 0xb4>;
+			/*
+			 * The GPIO IP block is designed for 3 banks of GPIOs.
+			 * Each bank has a GPIO interrupt for itself.
+			 * There is an overall "any bank" interrupt.
+			 * In order, these are GIC interrupts 17, 18, 19, 20.
+			 * Since the BCM2835 only has 2 banks, the 2nd bank
+			 * interrupt output appears to be mirrored onto the
+			 * 3rd bank's interrupt signal.
+			 * So, a bank0 interrupt shows up on 17, 20, and
+			 * a bank1 interrupt shows up on 18, 19, 20!
+			 */
+			interrupts = <2 17>, <2 18>, <2 19>, <2 20>;
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		uart0: serial at 7e201000 {
+			compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
+			reg = <0x7e201000 0x1000>;
+			interrupts = <2 25>;
+			clocks = <&clocks BCM2835_CLOCK_UART>,
+				 <&clocks BCM2835_CLOCK_VPU>;
+			clock-names = "uartclk", "apb_pclk";
+			arm,primecell-periphid = <0x00241011>;
+		};
+
+		i2s: i2s at 7e203000 {
+			compatible = "brcm,bcm2835-i2s";
+			reg = <0x7e203000 0x20>,
+			      <0x7e101098 0x02>;
+
+			dmas = <&dma 2>,
+			       <&dma 3>;
+			dma-names = "tx", "rx";
+			status = "disabled";
+		};
+
+		spi: spi at 7e204000 {
+			compatible = "brcm,bcm2835-spi";
+			reg = <0x7e204000 0x1000>;
+			interrupts = <2 22>;
+			clocks = <&clocks BCM2835_CLOCK_VPU>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c0: i2c at 7e205000 {
+			compatible = "brcm,bcm2835-i2c";
+			reg = <0x7e205000 0x1000>;
+			interrupts = <2 21>;
+			clocks = <&clocks BCM2835_CLOCK_VPU>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		pixelvalve at 7e206000 {
+			compatible = "brcm,bcm2835-pixelvalve0";
+			reg = <0x7e206000 0x100>;
+			interrupts = <2 13>; /* pwa0 */
+		};
+
+		pixelvalve at 7e207000 {
+			compatible = "brcm,bcm2835-pixelvalve1";
+			reg = <0x7e207000 0x100>;
+			interrupts = <2 14>; /* pwa1 */
+		};
+
+		aux: aux at 0x7e215000 {
+			compatible = "brcm,bcm2835-aux";
+			#clock-cells = <1>;
+			reg = <0x7e215000 0x8>;
+			clocks = <&clocks BCM2835_CLOCK_VPU>;
+		};
+
+		uart1: serial at 7e215040 {
+			compatible = "brcm,bcm2835-aux-uart";
+			reg = <0x7e215040 0x40>;
+			interrupts = <1 29>;
+			clocks = <&aux BCM2835_AUX_CLOCK_UART>;
+			status = "disabled";
+		};
+
+		spi1: spi at 7e215080 {
+			compatible = "brcm,bcm2835-aux-spi";
+			reg = <0x7e215080 0x40>;
+			interrupts = <1 29>;
+			clocks = <&aux BCM2835_AUX_CLOCK_SPI1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		spi2: spi at 7e2150c0 {
+			compatible = "brcm,bcm2835-aux-spi";
+			reg = <0x7e2150c0 0x40>;
+			interrupts = <1 29>;
+			clocks = <&aux BCM2835_AUX_CLOCK_SPI2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		pwm: pwm at 7e20c000 {
+			compatible = "brcm,bcm2835-pwm";
+			reg = <0x7e20c000 0x28>;
+			clocks = <&clocks BCM2835_CLOCK_PWM>;
+			assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
+			assigned-clock-rates = <10000000>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		sdhci: sdhci at 7e300000 {
+			compatible = "brcm,bcm2835-sdhci";
+			reg = <0x7e300000 0x100>;
+			interrupts = <2 30>;
+			clocks = <&clocks BCM2835_CLOCK_EMMC>;
+			status = "disabled";
+		};
+
+		hvs at 7e400000 {
+			compatible = "brcm,bcm2835-hvs";
+			reg = <0x7e400000 0x6000>;
+			interrupts = <2 1>;
+		};
+
+		i2c1: i2c at 7e804000 {
+			compatible = "brcm,bcm2835-i2c";
+			reg = <0x7e804000 0x1000>;
+			interrupts = <2 21>;
+			clocks = <&clocks BCM2835_CLOCK_VPU>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c at 7e805000 {
+			compatible = "brcm,bcm2835-i2c";
+			reg = <0x7e805000 0x1000>;
+			interrupts = <2 21>;
+			clocks = <&clocks BCM2835_CLOCK_VPU>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		pixelvalve at 7e807000 {
+			compatible = "brcm,bcm2835-pixelvalve2";
+			reg = <0x7e807000 0x100>;
+			interrupts = <2 10>; /* pixelvalve */
+		};
+
+		hdmi: hdmi at 7e902000 {
+			compatible = "brcm,bcm2835-hdmi";
+			reg = <0x7e902000 0x600>,
+			      <0x7e808000 0x100>;
+			interrupts = <2 8>, <2 9>;
+			ddc = <&i2c2>;
+			clocks = <&clocks BCM2835_PLLH_PIX>,
+				 <&clocks BCM2835_CLOCK_HSM>;
+			clock-names = "pixel", "hdmi";
+			status = "disabled";
+		};
+
+		usb: usb at 7e980000 {
+			compatible = "brcm,bcm2835-usb";
+			reg = <0x7e980000 0x10000>;
+			interrupts = <1 9>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		v3d: v3d at 7ec00000 {
+			compatible = "brcm,bcm2835-v3d";
+			reg = <0x7ec00000 0x1000>;
+			interrupts = <1 10>;
+		};
+
+		vc4: gpu {
+			compatible = "brcm,bcm2835-vc4";
+		};
+	};
+
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* The oscillator is the root of the clock tree. */
+		clk_osc: clock at 3 {
+			compatible = "fixed-clock";
+			reg = <3>;
+			#clock-cells = <0>;
+			clock-output-names = "osc";
+			clock-frequency = <19200000>;
+		};
+
+	};
+};
-- 
2.6.2

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

* [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (4 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:35   ` [U-Boot] [U-Boot, " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization Fabian Vogt
                   ` (4 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

The information currently set via platdata has to be represented in the
device tree now. bcm283x-uboot.dtsi adds the u-boot specific "skip-init"
property to the serial nodes and enables initialization in the pre-reloc phase.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 arch/arm/dts/bcm283x-uboot.dtsi | 22 ++++++++++++++++++++++
 arch/arm/dts/bcm283x.dtsi       |  4 +++-
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/bcm283x-uboot.dtsi

diff --git a/arch/arm/dts/bcm283x-uboot.dtsi b/arch/arm/dts/bcm283x-uboot.dtsi
new file mode 100644
index 0000000..8e4231a
--- /dev/null
+++ b/arch/arm/dts/bcm283x-uboot.dtsi
@@ -0,0 +1,22 @@
+/*
+ * U-Boot addition to keep baudrate set by firmware
+ * and also initialize before relocation.
+ *
+ * (C) Copyright 2016 Fabian Vogt <fvogt@suse.com>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+&soc {
+	u-boot,dm-pre-reloc;
+};
+
+&uart0 {
+	skip-init;
+	u-boot,dm-pre-reloc;
+};
+
+&uart1 {
+	skip-init;
+	u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/bcm283x.dtsi b/arch/arm/dts/bcm283x.dtsi
index 445624a..e5b4f20 100644
--- a/arch/arm/dts/bcm283x.dtsi
+++ b/arch/arm/dts/bcm283x.dtsi
@@ -19,7 +19,7 @@
 		bootargs = "earlyprintk console=ttyAMA0";
 	};
 
-	soc {
+	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -319,3 +319,5 @@
 
 	};
 };
+
+#include "bcm283x-uboot.dtsi"
-- 
2.6.2

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

* [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (5 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:36   ` [U-Boot] [U-Boot, " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init Fabian Vogt
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

For the Raspberry Pi 3 it needs to be possible to disable the serial
device after initialization happens, as only after the GPIO device is available
it is known whether the mini uart is usable.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 drivers/serial/serial_bcm283x_mu.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index e361909..3884f74 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -59,7 +59,7 @@ static int bcm283x_mu_serial_setbrg(struct udevice *dev, int baudrate)
 	struct bcm283x_mu_regs *regs = priv->regs;
 	u32 divider;
 
-	if (plat->skip_init)
+	if (plat->disabled || plat->skip_init)
 		return 0;
 
 	divider = plat->clock / (baudrate * 8);
@@ -85,10 +85,14 @@ static int bcm283x_mu_serial_probe(struct udevice *dev)
 
 static int bcm283x_mu_serial_getc(struct udevice *dev)
 {
+	struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
 	struct bcm283x_mu_priv *priv = dev_get_priv(dev);
 	struct bcm283x_mu_regs *regs = priv->regs;
 	u32 data;
 
+	if (plat->disabled)
+		return -EAGAIN;
+
 	/* Wait until there is data in the FIFO */
 	if (!(readl(&regs->lsr) & BCM283X_MU_LSR_RX_READY))
 		return -EAGAIN;
@@ -100,9 +104,13 @@ static int bcm283x_mu_serial_getc(struct udevice *dev)
 
 static int bcm283x_mu_serial_putc(struct udevice *dev, const char data)
 {
+	struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
 	struct bcm283x_mu_priv *priv = dev_get_priv(dev);
 	struct bcm283x_mu_regs *regs = priv->regs;
 
+	if (plat->disabled)
+		return 0;
+
 	/* Wait until there is space in the FIFO */
 	if (!(readl(&regs->lsr) & BCM283X_MU_LSR_TX_EMPTY))
 		return -EAGAIN;
@@ -115,9 +123,15 @@ static int bcm283x_mu_serial_putc(struct udevice *dev, const char data)
 
 static int bcm283x_mu_serial_pending(struct udevice *dev, bool input)
 {
+	struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
 	struct bcm283x_mu_priv *priv = dev_get_priv(dev);
 	struct bcm283x_mu_regs *regs = priv->regs;
-	unsigned int lsr = readl(&regs->lsr);
+	unsigned int lsr;
+
+	if (plat->disabled)
+		return 0;
+
+	lsr = readl(&regs->lsr);
 
 	if (input) {
 		WATCHDOG_RESET();
-- 
2.6.2

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

* [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (6 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:37   ` [U-Boot] [U-Boot, " Tom Rini
  2016-09-26 12:26 ` [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x Fabian Vogt
                   ` (2 subsequent siblings)
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

When using OF_CONTROL, the disabled value of the mini UART platdata
gets reset after board_early_init_f. So move detection and disabling
to board_init and remove board_early_init_f.
This uses the first device using the mini uart driver, as this method
works reliably with different device trees or even no device tree at all.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 board/raspberrypi/rpi/rpi.c | 40 ++++++++++++++++++++++++++--------------
 include/configs/rpi.h       |  1 -
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 6245b36..09bfcc6 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -443,15 +443,6 @@ static void get_board_rev(void)
 	printf("RPI %s (0x%x)\n", model->name, revision);
 }
 
-int board_init(void)
-{
-	get_board_rev();
-
-	gd->bd->bi_boot_params = 0x100;
-
-	return power_on_module(BCM2835_MBOX_POWER_DEVID_USB_HCD);
-}
-
 #ifndef CONFIG_PL01X_SERIAL
 static bool rpi_is_serial_active(void)
 {
@@ -471,17 +462,38 @@ static bool rpi_is_serial_active(void)
 
 	return true;
 }
+
+/* Disable mini-UART I/O if it's not pinmuxed to our pins.
+ * The firmware only enables it if explicitly done in config.txt: enable_uart=1
+ */
+static void rpi_disable_inactive_uart(void)
+{
+	struct udevice *dev;
+	struct bcm283x_mu_serial_platdata *plat;
+
+	if (uclass_get_device_by_driver(UCLASS_SERIAL,
+					DM_GET_DRIVER(serial_bcm283x_mu),
+					&dev) || !dev)
+		return;
+
+	if (!rpi_is_serial_active()) {
+		plat = dev_get_platdata(dev);
+		plat->disabled = true;
+	}
+}
 #endif
 
-int board_early_init_f(void)
+int board_init(void)
 {
 #ifndef CONFIG_PL01X_SERIAL
-	/* Disable mini-UART I/O if it's not pinmuxed to our pins */
-	if (!rpi_is_serial_active())
-		serial_platdata.disabled = true;
+	rpi_disable_inactive_uart();
 #endif
 
-	return 0;
+	get_board_rev();
+
+	gd->bd->bi_boot_params = 0x100;
+
+	return power_on_module(BCM2835_MBOX_POWER_DEVID_USB_HCD);
 }
 
 int board_mmc_init(bd_t *bis)
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 8d4ad5d..e9c0417 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -16,7 +16,6 @@
 
 /* Architecture, CPU, etc.*/
 #define CONFIG_ARCH_CPU_INIT
-#define CONFIG_BOARD_EARLY_INIT_F
 
 /* Use SoC timer for AArch32, but architected timer for AArch64 */
 #ifndef CONFIG_ARM64
-- 
2.6.2

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

* [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (7 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init Fabian Vogt
@ 2016-09-26 12:26 ` Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:37   ` [U-Boot] [U-Boot,9/9] " Tom Rini
  2016-10-05 15:54 ` [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Stephen Warren
  2016-11-16 13:43 ` Fabian Vogt
  10 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-09-26 12:26 UTC (permalink / raw)
  To: u-boot

This patch removes use of U_BOOT_DEVICE in board/raspberrypi/rpi/rpi.c,
enables OF_CONTROL in the config and adjusts the rpi_*defconfig configs.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
 arch/arm/Kconfig            |  1 +
 board/raspberrypi/rpi/rpi.c | 37 -------------------------------------
 configs/rpi_2_defconfig     |  2 ++
 configs/rpi_3_32b_defconfig |  2 ++
 configs/rpi_3_defconfig     |  2 ++
 configs/rpi_defconfig       |  2 ++
 6 files changed, 9 insertions(+), 37 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a311215..cca6933 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -316,6 +316,7 @@ config ARCH_BCM283X
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
+	select OF_CONTROL
 
 config TARGET_VEXPRESS_CA15_TC2
 	bool "Support vexpress_ca15_tc2"
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 09bfcc6..389e056 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -17,7 +17,6 @@
 #include <asm/arch/mbox.h>
 #include <asm/arch/sdhci.h>
 #include <asm/global_data.h>
-#include <dm/platform_data/serial_pl01x.h>
 #include <dm/platform_data/serial_bcm283x_mu.h>
 #ifdef CONFIG_ARM64
 #include <asm/armv8/mmu.h>
@@ -25,42 +24,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static const struct bcm2835_gpio_platdata gpio_platdata = {
-	.base = BCM2835_GPIO_BASE,
-};
-
-U_BOOT_DEVICE(bcm2835_gpios) = {
-	.name = "gpio_bcm2835",
-	.platdata = &gpio_platdata,
-};
-
-#ifdef CONFIG_PL01X_SERIAL
-static const struct pl01x_serial_platdata serial_platdata = {
-#ifndef CONFIG_BCM2835
-	.base = 0x3f201000,
-#else
-	.base = 0x20201000,
-#endif
-	.type = TYPE_PL011,
-	.skip_init = true,
-};
-
-U_BOOT_DEVICE(bcm2835_serials) = {
-	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
-};
-#else
-static struct bcm283x_mu_serial_platdata serial_platdata = {
-	.base = 0x3f215040,
-	.clock = 250000000,
-	.skip_init = true,
-};
-
-U_BOOT_DEVICE(bcm2837_serials) = {
-	.name = "serial_bcm283x_mu",
-	.platdata = &serial_platdata,
-};
-#endif
 
 struct msg_get_arm_mem {
 	struct bcm2835_mbox_hdr hdr;
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index bda4e95..3db6ff1 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_BCM283X=y
 CONFIG_TARGET_RPI_2=y
+CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b"
+CONFIG_OF_EMBED=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 8e2c410..8111077 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -2,6 +2,8 @@ CONFIG_ARM=y
 CONFIG_ARCH_BCM283X=y
 CONFIG_TARGET_RPI_3_32B=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
+CONFIG_OF_EMBED=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index b7354eb..9636bf5 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -2,6 +2,8 @@ CONFIG_ARM=y
 CONFIG_ARCH_BCM283X=y
 CONFIG_TARGET_RPI_3=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
+CONFIG_OF_EMBED=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index ea39231..878e73c 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_BCM283X=y
 CONFIG_TARGET_RPI=y
+CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b"
+CONFIG_OF_EMBED=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
-- 
2.6.2

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

* [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support
  2016-09-26 12:26 ` [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support Fabian Vogt
@ 2016-09-27  0:32   ` Simon Glass
  2016-11-29 17:33   ` [U-Boot] [U-Boot,1/9] " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:32 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> This patch adds device tree support for the bcm2835 GPIO driver.
>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  doc/device-tree-bindings/gpio/bcm2835-gpio.txt |  5 +++++
>  drivers/gpio/bcm2835_gpio.c                    | 24 ++++++++++++++++++++++++
>  2 files changed, 29 insertions(+)
>  create mode 100644 doc/device-tree-bindings/gpio/bcm2835-gpio.txt

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 2/9] serial: bcm283x_mu: add device tree support
  2016-09-26 12:26 ` [U-Boot] [PATCH 2/9] serial: bcm283x_mu: " Fabian Vogt
@ 2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:34   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:34 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> This patch adds device tree support for the bcm283x mini-uart driver.
>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  .../serial/bcm2835-aux-uart.txt                    | 10 ++++++++
>  drivers/serial/serial_bcm283x_mu.c                 | 28 ++++++++++++++++++++++
>  2 files changed, 38 insertions(+)
>  create mode 100644 doc/device-tree-bindings/serial/bcm2835-aux-uart.txt

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT
  2016-09-26 12:26 ` [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT Fabian Vogt
@ 2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:34   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:34 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> To be able to represent the skip-init platdata element with OF_CONTROL,
> it needs to be read from the device tree as well and put into the platform data.
>
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  doc/device-tree-bindings/serial/pl01x.txt | 3 +++
>  drivers/serial/serial_pl01x.c             | 2 ++
>  2 files changed, 5 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835
  2016-09-26 12:26 ` [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835 Fabian Vogt
@ 2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:34   ` [U-Boot] [U-Boot,4/9] " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:34 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> This patch adds dt-bindings as used by the linux kernel device trees
> for the bcm283x family.
>
> Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  include/dt-bindings/clock/bcm2835-aux.h       | 17 +++++++
>  include/dt-bindings/clock/bcm2835.h           | 66 +++++++++++++++++++++++++++
>  include/dt-bindings/pinctrl/bcm2835.h         | 27 +++++++++++
>  include/dt-bindings/power/raspberrypi-power.h | 41 +++++++++++++++++
>  4 files changed, 151 insertions(+)
>  create mode 100644 include/dt-bindings/clock/bcm2835-aux.h
>  create mode 100644 include/dt-bindings/clock/bcm2835.h
>  create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
>  create mode 100644 include/dt-bindings/power/raspberrypi-power.h

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree
  2016-09-26 12:26 ` [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree Fabian Vogt
@ 2016-09-27  0:34   ` Simon Glass
  2016-11-29 17:35   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:34 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> This patch adds device trees for the bcm283x platform to be used with
> OF_CONTROL. The version 4.8-rc7 of the linux kernel was used as source.
>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  arch/arm/dts/Makefile                  |   9 +
>  arch/arm/dts/bcm2835-rpi-a-plus.dts    |  35 ++++
>  arch/arm/dts/bcm2835-rpi-a.dts         |  28 +++
>  arch/arm/dts/bcm2835-rpi-b-plus.dts    |  36 ++++
>  arch/arm/dts/bcm2835-rpi-b-rev2.dts    |  29 +++
>  arch/arm/dts/bcm2835-rpi-b.dts         |  23 +++
>  arch/arm/dts/bcm2835-rpi.dtsi          |  86 +++++++++
>  arch/arm/dts/bcm2835.dtsi              |  25 +++
>  arch/arm/dts/bcm2836-rpi-2-b.dts       |  40 ++++
>  arch/arm/dts/bcm2836.dtsi              |  78 ++++++++
>  arch/arm/dts/bcm2837-rpi-3-b.dts       |  30 +++
>  arch/arm/dts/bcm2837.dtsi              |  76 ++++++++
>  arch/arm/dts/bcm283x-rpi-smsc9512.dtsi |  19 ++
>  arch/arm/dts/bcm283x-rpi-smsc9514.dtsi |  19 ++
>  arch/arm/dts/bcm283x.dtsi              | 321 +++++++++++++++++++++++++++++++++
>  15 files changed, 854 insertions(+)
>  create mode 100644 arch/arm/dts/bcm2835-rpi-a-plus.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-a.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-b-plus.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-b-rev2.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-b.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi.dtsi
>  create mode 100644 arch/arm/dts/bcm2835.dtsi
>  create mode 100644 arch/arm/dts/bcm2836-rpi-2-b.dts
>  create mode 100644 arch/arm/dts/bcm2836.dtsi
>  create mode 100644 arch/arm/dts/bcm2837-rpi-3-b.dts
>  create mode 100644 arch/arm/dts/bcm2837.dtsi
>  create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
>  create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
>  create mode 100644 arch/arm/dts/bcm283x.dtsi

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot
  2016-09-26 12:26 ` [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot Fabian Vogt
@ 2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:35   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:35 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> The information currently set via platdata has to be represented in the
> device tree now. bcm283x-uboot.dtsi adds the u-boot specific "skip-init"
> property to the serial nodes and enables initialization in the pre-reloc phase.
>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  arch/arm/dts/bcm283x-uboot.dtsi | 22 ++++++++++++++++++++++
>  arch/arm/dts/bcm283x.dtsi       |  4 +++-
>  2 files changed, 25 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/bcm283x-uboot.dtsi

Reviewed-by: Simon Glass <sjg@chromium.org>

I'd be intrigued to see if Linux would accept a version of this patch.

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

* [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization
  2016-09-26 12:26 ` [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization Fabian Vogt
@ 2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:36   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:35 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> For the Raspberry Pi 3 it needs to be possible to disable the serial
> device after initialization happens, as only after the GPIO device is available
> it is known whether the mini uart is usable.
>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  drivers/serial/serial_bcm283x_mu.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x
  2016-09-26 12:26 ` [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x Fabian Vogt
@ 2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:37   ` [U-Boot] [U-Boot,9/9] " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:35 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> This patch removes use of U_BOOT_DEVICE in board/raspberrypi/rpi/rpi.c,
> enables OF_CONTROL in the config and adjusts the rpi_*defconfig configs.
>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  arch/arm/Kconfig            |  1 +
>  board/raspberrypi/rpi/rpi.c | 37 -------------------------------------
>  configs/rpi_2_defconfig     |  2 ++
>  configs/rpi_3_32b_defconfig |  2 ++
>  configs/rpi_3_defconfig     |  2 ++
>  configs/rpi_defconfig       |  2 ++
>  6 files changed, 9 insertions(+), 37 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init
  2016-09-26 12:26 ` [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init Fabian Vogt
@ 2016-09-27  0:35   ` Simon Glass
  2016-11-29 17:37   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-09-27  0:35 UTC (permalink / raw)
  To: u-boot

On 26 September 2016 at 06:26, Fabian Vogt <fvogt@suse.com> wrote:
> When using OF_CONTROL, the disabled value of the mini UART platdata
> gets reset after board_early_init_f. So move detection and disabling
> to board_init and remove board_early_init_f.
> This uses the first device using the mini uart driver, as this method
> works reliably with different device trees or even no device tree at all.
>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> ---
>  board/raspberrypi/rpi/rpi.c | 40 ++++++++++++++++++++++++++--------------
>  include/configs/rpi.h       |  1 -
>  2 files changed, 26 insertions(+), 15 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (8 preceding siblings ...)
  2016-09-26 12:26 ` [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x Fabian Vogt
@ 2016-10-05 15:54 ` Stephen Warren
  2016-10-05 16:48   ` Fabian Vogt
  2016-11-16 13:43 ` Fabian Vogt
  10 siblings, 1 reply; 39+ messages in thread
From: Stephen Warren @ 2016-10-05 15:54 UTC (permalink / raw)
  To: u-boot

On 09/26/2016 06:26 AM, Fabian Vogt wrote:
> This patch series modifies the used drivers to work with OF_CONTROL
> and switches the board code and configs to use it.
> The added device trees are directly from the linux kernel tree
> and can thus be used for booting the (upstream) kernel.

Is there a user-visible or developer-visible benefit to this change? In 
general, converting to use DT to instantiate devices simply ends up 
using more code (and hence complexity and time) to get to the exact same 
state afterwards.

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-05 15:54 ` [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Stephen Warren
@ 2016-10-05 16:48   ` Fabian Vogt
  2016-10-05 16:51     ` Simon Glass
  2016-10-05 20:28     ` Alexander Graf
  0 siblings, 2 replies; 39+ messages in thread
From: Fabian Vogt @ 2016-10-05 16:48 UTC (permalink / raw)
  To: u-boot

Hi,

Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
> > This patch series modifies the used drivers to work with OF_CONTROL
> > and switches the board code and configs to use it.
> > The added device trees are directly from the linux kernel tree
> > and can thus be used for booting the (upstream) kernel.
> 
> Is there a user-visible or developer-visible benefit to this change? In 
> general, converting to use DT to instantiate devices simply ends up 
> using more code (and hence complexity and time) to get to the exact same 
> state afterwards.

There are various reasons, like:

- The device tree describes the platform, so it can also be used by the
  linux kernel for configuration (no separate dtb needed)
- Properties are not hardcoded in the u-boot code
- Slightly different hardware deviations do not require significant code
  changes (like #ifdef or even new platdatas), just a new dts and Kconfig
  adjustments

It's also mentioned in Simon Glass's talk about DM:
https://events.linuxfoundation.org/sites/events/files/slides/Order%20at%20last%20-%20U-Boot%20driver%20model%20slides%20(2).pdf

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-05 16:48   ` Fabian Vogt
@ 2016-10-05 16:51     ` Simon Glass
  2016-10-05 20:28     ` Alexander Graf
  1 sibling, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-10-05 16:51 UTC (permalink / raw)
  To: u-boot

+Tom too

On 5 October 2016 at 10:48, Fabian Vogt <fvogt@suse.com> wrote:
> Hi,
>
> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
>> > This patch series modifies the used drivers to work with OF_CONTROL
>> > and switches the board code and configs to use it.
>> > The added device trees are directly from the linux kernel tree
>> > and can thus be used for booting the (upstream) kernel.
>>
>> Is there a user-visible or developer-visible benefit to this change? In
>> general, converting to use DT to instantiate devices simply ends up
>> using more code (and hence complexity and time) to get to the exact same
>> state afterwards.
>
> There are various reasons, like:
>
> - The device tree describes the platform, so it can also be used by the
>   linux kernel for configuration (no separate dtb needed)
> - Properties are not hardcoded in the u-boot code
> - Slightly different hardware deviations do not require significant code
>   changes (like #ifdef or even new platdatas), just a new dts and Kconfig
>   adjustments
>
> It's also mentioned in Simon Glass's talk about DM:
> https://events.linuxfoundation.org/sites/events/files/slides/Order%20at%20last%20-%20U-Boot%20driver%20model%20slides%20(2).pdf
>
>

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-05 16:48   ` Fabian Vogt
  2016-10-05 16:51     ` Simon Glass
@ 2016-10-05 20:28     ` Alexander Graf
  2016-10-06 19:32       ` Eric Anholt
  1 sibling, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2016-10-05 20:28 UTC (permalink / raw)
  To: u-boot



> Am 05.10.2016 um 18:48 schrieb Fabian Vogt <fvogt@suse.com>:
> 
> Hi,
> 
> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
>>> This patch series modifies the used drivers to work with OF_CONTROL
>>> and switches the board code and configs to use it.
>>> The added device trees are directly from the linux kernel tree
>>> and can thus be used for booting the (upstream) kernel.
>> 
>> Is there a user-visible or developer-visible benefit to this change? In 
>> general, converting to use DT to instantiate devices simply ends up 
>> using more code (and hence complexity and time) to get to the exact same 
>> state afterwards.
> 
> There are various reasons, like:
> 
> - The device tree describes the platform, so it can also be used by the
>  linux kernel for configuration (no separate dtb needed)

With a bit of lobbying, we might even be able to get a working dt from the rpi firmware. That again would enable awesome things like hat support in u-boot :).


Alex

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-05 20:28     ` Alexander Graf
@ 2016-10-06 19:32       ` Eric Anholt
  2016-10-06 23:22         ` Stefan Bruens
  0 siblings, 1 reply; 39+ messages in thread
From: Eric Anholt @ 2016-10-06 19:32 UTC (permalink / raw)
  To: u-boot

Alexander Graf <agraf@suse.de> writes:

>> Am 05.10.2016 um 18:48 schrieb Fabian Vogt <fvogt@suse.com>:
>> 
>> Hi,
>> 
>> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
>>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
>>>> This patch series modifies the used drivers to work with OF_CONTROL
>>>> and switches the board code and configs to use it.
>>>> The added device trees are directly from the linux kernel tree
>>>> and can thus be used for booting the (upstream) kernel.
>>> 
>>> Is there a user-visible or developer-visible benefit to this change? In 
>>> general, converting to use DT to instantiate devices simply ends up 
>>> using more code (and hence complexity and time) to get to the exact same 
>>> state afterwards.
>> 
>> There are various reasons, like:
>> 
>> - The device tree describes the platform, so it can also be used by the
>>  linux kernel for configuration (no separate dtb needed)
>
> With a bit of lobbying, we might even be able to get a working dt from
> the rpi firmware. That again would enable awesome things like hat
> support in u-boot :).

I can't imagine the firmware handing any DT off to the kernel other than
the one that's being shipped from whatever kernel is being loaded.
Being able to update the DT in lockstep with the kernel is very much
part of their process.  (This makes linux insisting that DT is ABI that
must maintain backwards compat quite painful for upstreaming)

Given that the firmware already hands the kernel's DT back to the
kernel, it seems like we should be able to load the kernel's DT too if
we wanted that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161006/28ff970d/attachment.sig>

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-06 19:32       ` Eric Anholt
@ 2016-10-06 23:22         ` Stefan Bruens
  2016-10-07  4:42           ` Eric Anholt
  0 siblings, 1 reply; 39+ messages in thread
From: Stefan Bruens @ 2016-10-06 23:22 UTC (permalink / raw)
  To: u-boot

On Donnerstag, 6. Oktober 2016 12:32:12 CEST Eric Anholt wrote:
> Alexander Graf <agraf@suse.de> writes:
> >> Am 05.10.2016 um 18:48 schrieb Fabian Vogt <fvogt@suse.com>:
> >> 
> >> Hi,
> >> 
> >> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
> >>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
> >>>> This patch series modifies the used drivers to work with OF_CONTROL
> >>>> and switches the board code and configs to use it.
> >>>> The added device trees are directly from the linux kernel tree
> >>>> and can thus be used for booting the (upstream) kernel.
> >>> 
> >>> Is there a user-visible or developer-visible benefit to this change? In
> >>> general, converting to use DT to instantiate devices simply ends up
> >>> using more code (and hence complexity and time) to get to the exact same
> >>> state afterwards.
> >> 
> >> There are various reasons, like:
> >> 
> >> - The device tree describes the platform, so it can also be used by the
> >> 
> >>  linux kernel for configuration (no separate dtb needed)
> > 
> > With a bit of lobbying, we might even be able to get a working dt from
> > the rpi firmware. That again would enable awesome things like hat
> > support in u-boot :).
> 
> I can't imagine the firmware handing any DT off to the kernel other than
> the one that's being shipped from whatever kernel is being loaded.
> Being able to update the DT in lockstep with the kernel is very much
> part of their process.  (This makes linux insisting that DT is ABI that
> must maintain backwards compat quite painful for upstreaming)
> 
> Given that the firmware already hands the kernel's DT back to the
> kernel, it seems like we should be able to load the kernel's DT too if
> we wanted that.

You mean the DT modified by the firmware according to config.txt, at least 
applying the specified DT overlays?

Kind regards,

Stefan

-- 
Stefan Br?ns  /  Bergstra?e 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-06 23:22         ` Stefan Bruens
@ 2016-10-07  4:42           ` Eric Anholt
  2016-10-07 20:42             ` Tom Rini
  0 siblings, 1 reply; 39+ messages in thread
From: Eric Anholt @ 2016-10-07  4:42 UTC (permalink / raw)
  To: u-boot

Stefan Bruens <stefan.bruens@rwth-aachen.de> writes:

> On Donnerstag, 6. Oktober 2016 12:32:12 CEST Eric Anholt wrote:
>> Alexander Graf <agraf@suse.de> writes:
>> >> Am 05.10.2016 um 18:48 schrieb Fabian Vogt <fvogt@suse.com>:
>> >> 
>> >> Hi,
>> >> 
>> >> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
>> >>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
>> >>>> This patch series modifies the used drivers to work with OF_CONTROL
>> >>>> and switches the board code and configs to use it.
>> >>>> The added device trees are directly from the linux kernel tree
>> >>>> and can thus be used for booting the (upstream) kernel.
>> >>> 
>> >>> Is there a user-visible or developer-visible benefit to this change? In
>> >>> general, converting to use DT to instantiate devices simply ends up
>> >>> using more code (and hence complexity and time) to get to the exact same
>> >>> state afterwards.
>> >> 
>> >> There are various reasons, like:
>> >> 
>> >> - The device tree describes the platform, so it can also be used by the
>> >> 
>> >>  linux kernel for configuration (no separate dtb needed)
>> > 
>> > With a bit of lobbying, we might even be able to get a working dt from
>> > the rpi firmware. That again would enable awesome things like hat
>> > support in u-boot :).
>> 
>> I can't imagine the firmware handing any DT off to the kernel other than
>> the one that's being shipped from whatever kernel is being loaded.
>> Being able to update the DT in lockstep with the kernel is very much
>> part of their process.  (This makes linux insisting that DT is ABI that
>> must maintain backwards compat quite painful for upstreaming)
>> 
>> Given that the firmware already hands the kernel's DT back to the
>> kernel, it seems like we should be able to load the kernel's DT too if
>> we wanted that.
>
> You mean the DT modified by the firmware according to config.txt, at least 
> applying the specified DT overlays?

Yeah, that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161006/182a5e16/attachment.sig>

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-07  4:42           ` Eric Anholt
@ 2016-10-07 20:42             ` Tom Rini
  2016-10-07 21:59               ` Stefan Bruens
  0 siblings, 1 reply; 39+ messages in thread
From: Tom Rini @ 2016-10-07 20:42 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 06, 2016 at 09:42:52PM -0700, Eric Anholt wrote:
> Stefan Bruens <stefan.bruens@rwth-aachen.de> writes:
> 
> > On Donnerstag, 6. Oktober 2016 12:32:12 CEST Eric Anholt wrote:
> >> Alexander Graf <agraf@suse.de> writes:
> >> >> Am 05.10.2016 um 18:48 schrieb Fabian Vogt <fvogt@suse.com>:
> >> >> 
> >> >> Hi,
> >> >> 
> >> >> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
> >> >>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
> >> >>>> This patch series modifies the used drivers to work with OF_CONTROL
> >> >>>> and switches the board code and configs to use it.
> >> >>>> The added device trees are directly from the linux kernel tree
> >> >>>> and can thus be used for booting the (upstream) kernel.
> >> >>> 
> >> >>> Is there a user-visible or developer-visible benefit to this change? In
> >> >>> general, converting to use DT to instantiate devices simply ends up
> >> >>> using more code (and hence complexity and time) to get to the exact same
> >> >>> state afterwards.
> >> >> 
> >> >> There are various reasons, like:
> >> >> 
> >> >> - The device tree describes the platform, so it can also be used by the
> >> >> 
> >> >>  linux kernel for configuration (no separate dtb needed)
> >> > 
> >> > With a bit of lobbying, we might even be able to get a working dt from
> >> > the rpi firmware. That again would enable awesome things like hat
> >> > support in u-boot :).
> >> 
> >> I can't imagine the firmware handing any DT off to the kernel other than
> >> the one that's being shipped from whatever kernel is being loaded.
> >> Being able to update the DT in lockstep with the kernel is very much
> >> part of their process.  (This makes linux insisting that DT is ABI that
> >> must maintain backwards compat quite painful for upstreaming)
> >> 
> >> Given that the firmware already hands the kernel's DT back to the
> >> kernel, it seems like we should be able to load the kernel's DT too if
> >> we wanted that.
> >
> > You mean the DT modified by the firmware according to config.txt, at least 
> > applying the specified DT overlays?
> 
> Yeah, that.

That would also be a good thing, yes.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161007/69ea4530/attachment.sig>

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-10-07 20:42             ` Tom Rini
@ 2016-10-07 21:59               ` Stefan Bruens
  0 siblings, 0 replies; 39+ messages in thread
From: Stefan Bruens @ 2016-10-07 21:59 UTC (permalink / raw)
  To: u-boot

On Freitag, 7. Oktober 2016 16:42:40 CEST Tom Rini wrote:
> On Thu, Oct 06, 2016 at 09:42:52PM -0700, Eric Anholt wrote:
> > Stefan Bruens <stefan.bruens@rwth-aachen.de> writes:
> > > On Donnerstag, 6. Oktober 2016 12:32:12 CEST Eric Anholt wrote:
> > >> Alexander Graf <agraf@suse.de> writes:
> > >> >> Am 05.10.2016 um 18:48 schrieb Fabian Vogt <fvogt@suse.com>:
> > >> >> 
> > >> >> Hi,
> > >> >> 
> > >> >> Am Mittwoch, 5. Oktober 2016, 09:54:46 CEST schrieb Stephen Warren:
> > >> >>> On 09/26/2016 06:26 AM, Fabian Vogt wrote:
> > >> >>>> This patch series modifies the used drivers to work with
> > >> >>>> OF_CONTROL
> > >> >>>> and switches the board code and configs to use it.
> > >> >>>> The added device trees are directly from the linux kernel tree
> > >> >>>> and can thus be used for booting the (upstream) kernel.
> > >> >>> 
> > >> >>> Is there a user-visible or developer-visible benefit to this
> > >> >>> change? In
> > >> >>> general, converting to use DT to instantiate devices simply ends up
> > >> >>> using more code (and hence complexity and time) to get to the exact
> > >> >>> same
> > >> >>> state afterwards.
> > >> >> 
> > >> >> There are various reasons, like:
> > >> >> 
> > >> >> - The device tree describes the platform, so it can also be used by
> > >> >> the
> > >> >> 
> > >> >>  linux kernel for configuration (no separate dtb needed)
> > >> > 
> > >> > With a bit of lobbying, we might even be able to get a working dt
> > >> > from
> > >> > the rpi firmware. That again would enable awesome things like hat
> > >> > support in u-boot :).
> > >> 
> > >> I can't imagine the firmware handing any DT off to the kernel other
> > >> than
> > >> the one that's being shipped from whatever kernel is being loaded.
> > >> Being able to update the DT in lockstep with the kernel is very much
> > >> part of their process.  (This makes linux insisting that DT is ABI that
> > >> must maintain backwards compat quite painful for upstreaming)
> > >> 
> > >> Given that the firmware already hands the kernel's DT back to the
> > >> kernel, it seems like we should be able to load the kernel's DT too if
> > >> we wanted that.
> > > 
> > > You mean the DT modified by the firmware according to config.txt, at
> > > least
> > > applying the specified DT overlays?
> > 
> > Yeah, that.
> 
> That would also be a good thing, yes.

My primary concern here was the bcm2708-rpi-b.dtb vs bcm2835-rpi-b.dtb 
devicetrees, i.e. the one distributed by the RPi foundation vs the upstream 
kernel one.

This concern may no longer be valid, https://www.raspberrypi.org/
documentation/configuration/device-tree.md#part3 says:
---
The loader now supports builds using bcm2835_defconfig, which selects the 
upstreamed BCM2835 support. This configuration will cause bcm2835-rpi-b.dtb 
and bcm2835-rpi-b-plus.dtb to be built. If these files are copied with the 
kernel, and if the kernel has been tagged by a recent mkknlimg, then the 
loader will attempt to load one of those DTBs by default.
---

Open points:
1. is u-boot.bin tagged in an appropriate way (i.e. as done by mkknlimg)?
2. what about the other RPis, i.e. RPi2, RPI3, RPi1-CM?

Kind regards,

Stefan

-- 
Stefan Br?ns  /  Bergstra?e 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
                   ` (9 preceding siblings ...)
  2016-10-05 15:54 ` [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Stephen Warren
@ 2016-11-16 13:43 ` Fabian Vogt
  2016-11-25 19:45   ` Simon Glass
  10 siblings, 1 reply; 39+ messages in thread
From: Fabian Vogt @ 2016-11-16 13:43 UTC (permalink / raw)
  To: u-boot

Hi,

any news on this? As far as I can tell nothing happened after my last
reply to this thread, so: Ping!

Thanks,
Fabian

Am Montag, 26. September 2016, 14:26:42 CET schrieben Sie:
> This patch series modifies the used drivers to work with OF_CONTROL
> and switches the board code and configs to use it.
> The added device trees are directly from the linux kernel tree
> and can thus be used for booting the (upstream) kernel.
> 
> Fabian Vogt (9):
>   gpio: bcm2835: add device tree support
>   serial: bcm283x_mu: add device tree support
>   serial: pl01x: expose skip_init platdata option in DT
>   fdt: add dt-bindings for bcm2835
>   fdt: import bcm283x device tree sources from the linux kernel tree
>   fdt: adjust bcm283x device tree for u-boot
>   serial: bcm283x_mu: support disabling after initialization
>   board: rpi: move uart deactivation to board_init
>   ARM: bcm283x: use OF_CONTROL for bcm283x
> 
>  arch/arm/Kconfig                                   |   1 +
>  arch/arm/dts/Makefile                              |   9 +
>  arch/arm/dts/bcm2835-rpi-a-plus.dts                |  35 +++
>  arch/arm/dts/bcm2835-rpi-a.dts                     |  28 ++
>  arch/arm/dts/bcm2835-rpi-b-plus.dts                |  36 +++
>  arch/arm/dts/bcm2835-rpi-b-rev2.dts                |  29 ++
>  arch/arm/dts/bcm2835-rpi-b.dts                     |  23 ++
>  arch/arm/dts/bcm2835-rpi.dtsi                      |  86 ++++++
>  arch/arm/dts/bcm2835.dtsi                          |  25 ++
>  arch/arm/dts/bcm2836-rpi-2-b.dts                   |  40 +++
>  arch/arm/dts/bcm2836.dtsi                          |  78 +++++
>  arch/arm/dts/bcm2837-rpi-3-b.dts                   |  30 ++
>  arch/arm/dts/bcm2837.dtsi                          |  76 +++++
>  arch/arm/dts/bcm283x-rpi-smsc9512.dtsi             |  19 ++
>  arch/arm/dts/bcm283x-rpi-smsc9514.dtsi             |  19 ++
>  arch/arm/dts/bcm283x-uboot.dtsi                    |  22 ++
>  arch/arm/dts/bcm283x.dtsi                          | 323 +++++++++++++++++++++
>  board/raspberrypi/rpi/rpi.c                        |  77 ++---
>  configs/rpi_2_defconfig                            |   2 +
>  configs/rpi_3_32b_defconfig                        |   2 +
>  configs/rpi_3_defconfig                            |   2 +
>  configs/rpi_defconfig                              |   2 +
>  doc/device-tree-bindings/gpio/bcm2835-gpio.txt     |   5 +
>  .../serial/bcm2835-aux-uart.txt                    |  10 +
>  doc/device-tree-bindings/serial/pl01x.txt          |   3 +
>  drivers/gpio/bcm2835_gpio.c                        |  24 ++
>  drivers/serial/serial_bcm283x_mu.c                 |  46 ++-
>  drivers/serial/serial_pl01x.c                      |   2 +
>  include/configs/rpi.h                              |   1 -
>  include/dt-bindings/clock/bcm2835-aux.h            |  17 ++
>  include/dt-bindings/clock/bcm2835.h                |  66 +++++
>  include/dt-bindings/pinctrl/bcm2835.h              |  27 ++
>  include/dt-bindings/power/raspberrypi-power.h      |  41 +++
>  33 files changed, 1152 insertions(+), 54 deletions(-)
>  create mode 100644 arch/arm/dts/bcm2835-rpi-a-plus.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-a.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-b-plus.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-b-rev2.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi-b.dts
>  create mode 100644 arch/arm/dts/bcm2835-rpi.dtsi
>  create mode 100644 arch/arm/dts/bcm2835.dtsi
>  create mode 100644 arch/arm/dts/bcm2836-rpi-2-b.dts
>  create mode 100644 arch/arm/dts/bcm2836.dtsi
>  create mode 100644 arch/arm/dts/bcm2837-rpi-3-b.dts
>  create mode 100644 arch/arm/dts/bcm2837.dtsi
>  create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
>  create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
>  create mode 100644 arch/arm/dts/bcm283x-uboot.dtsi
>  create mode 100644 arch/arm/dts/bcm283x.dtsi
>  create mode 100644 doc/device-tree-bindings/gpio/bcm2835-gpio.txt
>  create mode 100644 doc/device-tree-bindings/serial/bcm2835-aux-uart.txt
>  create mode 100644 include/dt-bindings/clock/bcm2835-aux.h
>  create mode 100644 include/dt-bindings/clock/bcm2835.h
>  create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
>  create mode 100644 include/dt-bindings/power/raspberrypi-power.h
> 
> 

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

* [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL
  2016-11-16 13:43 ` Fabian Vogt
@ 2016-11-25 19:45   ` Simon Glass
  0 siblings, 0 replies; 39+ messages in thread
From: Simon Glass @ 2016-11-25 19:45 UTC (permalink / raw)
  To: u-boot

Hi,

On 16 November 2016 at 06:43, Fabian Vogt <fvogt@suse.com> wrote:
> Hi,
>
> any news on this? As far as I can tell nothing happened after my last
> reply to this thread, so: Ping!

Adding Tom - the patches are assigned to him in Patchwork.

- Simon

>
> Thanks,
> Fabian
>
> Am Montag, 26. September 2016, 14:26:42 CET schrieben Sie:
>> This patch series modifies the used drivers to work with OF_CONTROL
>> and switches the board code and configs to use it.
>> The added device trees are directly from the linux kernel tree
>> and can thus be used for booting the (upstream) kernel.
>>
>> Fabian Vogt (9):
>>   gpio: bcm2835: add device tree support
>>   serial: bcm283x_mu: add device tree support
>>   serial: pl01x: expose skip_init platdata option in DT
>>   fdt: add dt-bindings for bcm2835
>>   fdt: import bcm283x device tree sources from the linux kernel tree
>>   fdt: adjust bcm283x device tree for u-boot
>>   serial: bcm283x_mu: support disabling after initialization
>>   board: rpi: move uart deactivation to board_init
>>   ARM: bcm283x: use OF_CONTROL for bcm283x
>>
>>  arch/arm/Kconfig                                   |   1 +
>>  arch/arm/dts/Makefile                              |   9 +
>>  arch/arm/dts/bcm2835-rpi-a-plus.dts                |  35 +++
>>  arch/arm/dts/bcm2835-rpi-a.dts                     |  28 ++
>>  arch/arm/dts/bcm2835-rpi-b-plus.dts                |  36 +++
>>  arch/arm/dts/bcm2835-rpi-b-rev2.dts                |  29 ++
>>  arch/arm/dts/bcm2835-rpi-b.dts                     |  23 ++
>>  arch/arm/dts/bcm2835-rpi.dtsi                      |  86 ++++++
>>  arch/arm/dts/bcm2835.dtsi                          |  25 ++
>>  arch/arm/dts/bcm2836-rpi-2-b.dts                   |  40 +++
>>  arch/arm/dts/bcm2836.dtsi                          |  78 +++++
>>  arch/arm/dts/bcm2837-rpi-3-b.dts                   |  30 ++
>>  arch/arm/dts/bcm2837.dtsi                          |  76 +++++
>>  arch/arm/dts/bcm283x-rpi-smsc9512.dtsi             |  19 ++
>>  arch/arm/dts/bcm283x-rpi-smsc9514.dtsi             |  19 ++
>>  arch/arm/dts/bcm283x-uboot.dtsi                    |  22 ++
>>  arch/arm/dts/bcm283x.dtsi                          | 323 +++++++++++++++++++++
>>  board/raspberrypi/rpi/rpi.c                        |  77 ++---
>>  configs/rpi_2_defconfig                            |   2 +
>>  configs/rpi_3_32b_defconfig                        |   2 +
>>  configs/rpi_3_defconfig                            |   2 +
>>  configs/rpi_defconfig                              |   2 +
>>  doc/device-tree-bindings/gpio/bcm2835-gpio.txt     |   5 +
>>  .../serial/bcm2835-aux-uart.txt                    |  10 +
>>  doc/device-tree-bindings/serial/pl01x.txt          |   3 +
>>  drivers/gpio/bcm2835_gpio.c                        |  24 ++
>>  drivers/serial/serial_bcm283x_mu.c                 |  46 ++-
>>  drivers/serial/serial_pl01x.c                      |   2 +
>>  include/configs/rpi.h                              |   1 -
>>  include/dt-bindings/clock/bcm2835-aux.h            |  17 ++
>>  include/dt-bindings/clock/bcm2835.h                |  66 +++++
>>  include/dt-bindings/pinctrl/bcm2835.h              |  27 ++
>>  include/dt-bindings/power/raspberrypi-power.h      |  41 +++
>>  33 files changed, 1152 insertions(+), 54 deletions(-)
>>  create mode 100644 arch/arm/dts/bcm2835-rpi-a-plus.dts
>>  create mode 100644 arch/arm/dts/bcm2835-rpi-a.dts
>>  create mode 100644 arch/arm/dts/bcm2835-rpi-b-plus.dts
>>  create mode 100644 arch/arm/dts/bcm2835-rpi-b-rev2.dts
>>  create mode 100644 arch/arm/dts/bcm2835-rpi-b.dts
>>  create mode 100644 arch/arm/dts/bcm2835-rpi.dtsi
>>  create mode 100644 arch/arm/dts/bcm2835.dtsi
>>  create mode 100644 arch/arm/dts/bcm2836-rpi-2-b.dts
>>  create mode 100644 arch/arm/dts/bcm2836.dtsi
>>  create mode 100644 arch/arm/dts/bcm2837-rpi-3-b.dts
>>  create mode 100644 arch/arm/dts/bcm2837.dtsi
>>  create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi
>>  create mode 100644 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
>>  create mode 100644 arch/arm/dts/bcm283x-uboot.dtsi
>>  create mode 100644 arch/arm/dts/bcm283x.dtsi
>>  create mode 100644 doc/device-tree-bindings/gpio/bcm2835-gpio.txt
>>  create mode 100644 doc/device-tree-bindings/serial/bcm2835-aux-uart.txt
>>  create mode 100644 include/dt-bindings/clock/bcm2835-aux.h
>>  create mode 100644 include/dt-bindings/clock/bcm2835.h
>>  create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
>>  create mode 100644 include/dt-bindings/power/raspberrypi-power.h
>>
>>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [U-Boot,1/9] gpio: bcm2835: add device tree support
  2016-09-26 12:26 ` [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support Fabian Vogt
  2016-09-27  0:32   ` Simon Glass
@ 2016-11-29 17:33   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:33 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:43PM +0200, Fabian Vogt wrote:

> This patch adds device tree support for the bcm2835 GPIO driver.
> 
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/720ab24f/attachment.sig>

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

* [U-Boot] [U-Boot, 2/9] serial: bcm283x_mu: add device tree support
  2016-09-26 12:26 ` [U-Boot] [PATCH 2/9] serial: bcm283x_mu: " Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
@ 2016-11-29 17:34   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:34 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:44PM +0200, Fabian Vogt wrote:

> This patch adds device tree support for the bcm283x mini-uart driver.
> 
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/c805570e/attachment.sig>

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

* [U-Boot] [U-Boot, 3/9] serial: pl01x: expose skip_init platdata option in DT
  2016-09-26 12:26 ` [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
@ 2016-11-29 17:34   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:34 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:45PM +0200, Fabian Vogt wrote:

> To be able to represent the skip-init platdata element with OF_CONTROL,
> it needs to be read from the device tree as well and put into the platform data.
> 
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/d6be33f4/attachment.sig>

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

* [U-Boot] [U-Boot,4/9] fdt: add dt-bindings for bcm2835
  2016-09-26 12:26 ` [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835 Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
@ 2016-11-29 17:34   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:34 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:46PM +0200, Fabian Vogt wrote:

> This patch adds dt-bindings as used by the linux kernel device trees
> for the bcm283x family.
> 
> Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/e94344b7/attachment-0001.sig>

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

* [U-Boot] [U-Boot, 5/9] fdt: import bcm283x device tree sources from the linux kernel tree
  2016-09-26 12:26 ` [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree Fabian Vogt
  2016-09-27  0:34   ` Simon Glass
@ 2016-11-29 17:35   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:35 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:47PM +0200, Fabian Vogt wrote:

> This patch adds device trees for the bcm283x platform to be used with
> OF_CONTROL. The version 4.8-rc7 of the linux kernel was used as source.
> 
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/3ffb6cd4/attachment.sig>

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

* [U-Boot] [U-Boot, 6/9] fdt: adjust bcm283x device tree for u-boot
  2016-09-26 12:26 ` [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
@ 2016-11-29 17:35   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:35 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:48PM +0200, Fabian Vogt wrote:

> The information currently set via platdata has to be represented in the
> device tree now. bcm283x-uboot.dtsi adds the u-boot specific "skip-init"
> property to the serial nodes and enables initialization in the pre-reloc phase.
> 
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/c1f90fb0/attachment.sig>

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

* [U-Boot] [U-Boot, 7/9] serial: bcm283x_mu: support disabling after initialization
  2016-09-26 12:26 ` [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
@ 2016-11-29 17:36   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:36 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:49PM +0200, Fabian Vogt wrote:

> For the Raspberry Pi 3 it needs to be possible to disable the serial
> device after initialization happens, as only after the GPIO device is available
> it is known whether the mini uart is usable.
> 
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/40a2046d/attachment.sig>

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

* [U-Boot] [U-Boot, 8/9] board: rpi: move uart deactivation to board_init
  2016-09-26 12:26 ` [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
@ 2016-11-29 17:37   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:37 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:50PM +0200, Fabian Vogt wrote:

> When using OF_CONTROL, the disabled value of the mini UART platdata
> gets reset after board_early_init_f. So move detection and disabling
> to board_init and remove board_early_init_f.
> This uses the first device using the mini uart driver, as this method
> works reliably with different device trees or even no device tree at all.
> 
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/ebf56eee/attachment.sig>

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

* [U-Boot] [U-Boot,9/9] ARM: bcm283x: use OF_CONTROL for bcm283x
  2016-09-26 12:26 ` [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x Fabian Vogt
  2016-09-27  0:35   ` Simon Glass
@ 2016-11-29 17:37   ` Tom Rini
  1 sibling, 0 replies; 39+ messages in thread
From: Tom Rini @ 2016-11-29 17:37 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 02:26:51PM +0200, Fabian Vogt wrote:

> This patch removes use of U_BOOT_DEVICE in board/raspberrypi/rpi/rpi.c,
> enables OF_CONTROL in the config and adjusts the rpi_*defconfig configs.
> 
> Signed-off-by: Fabian Vogt <fvogt@suse.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/b6a09b0c/attachment.sig>

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

end of thread, other threads:[~2016-11-29 17:37 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26 12:26 [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Fabian Vogt
2016-09-26 12:26 ` [U-Boot] [PATCH 1/9] gpio: bcm2835: add device tree support Fabian Vogt
2016-09-27  0:32   ` Simon Glass
2016-11-29 17:33   ` [U-Boot] [U-Boot,1/9] " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 2/9] serial: bcm283x_mu: " Fabian Vogt
2016-09-27  0:34   ` Simon Glass
2016-11-29 17:34   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT Fabian Vogt
2016-09-27  0:34   ` Simon Glass
2016-11-29 17:34   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 4/9] fdt: add dt-bindings for bcm2835 Fabian Vogt
2016-09-27  0:34   ` Simon Glass
2016-11-29 17:34   ` [U-Boot] [U-Boot,4/9] " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 5/9] fdt: import bcm283x device tree sources from the linux kernel tree Fabian Vogt
2016-09-27  0:34   ` Simon Glass
2016-11-29 17:35   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 6/9] fdt: adjust bcm283x device tree for u-boot Fabian Vogt
2016-09-27  0:35   ` Simon Glass
2016-11-29 17:35   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 7/9] serial: bcm283x_mu: support disabling after initialization Fabian Vogt
2016-09-27  0:35   ` Simon Glass
2016-11-29 17:36   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 8/9] board: rpi: move uart deactivation to board_init Fabian Vogt
2016-09-27  0:35   ` Simon Glass
2016-11-29 17:37   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-26 12:26 ` [U-Boot] [PATCH 9/9] ARM: bcm283x: use OF_CONTROL for bcm283x Fabian Vogt
2016-09-27  0:35   ` Simon Glass
2016-11-29 17:37   ` [U-Boot] [U-Boot,9/9] " Tom Rini
2016-10-05 15:54 ` [U-Boot] [PATCH 0/9] Switch bcm283x platform to use OF_CONTROL Stephen Warren
2016-10-05 16:48   ` Fabian Vogt
2016-10-05 16:51     ` Simon Glass
2016-10-05 20:28     ` Alexander Graf
2016-10-06 19:32       ` Eric Anholt
2016-10-06 23:22         ` Stefan Bruens
2016-10-07  4:42           ` Eric Anholt
2016-10-07 20:42             ` Tom Rini
2016-10-07 21:59               ` Stefan Bruens
2016-11-16 13:43 ` Fabian Vogt
2016-11-25 19:45   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.