* [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4
@ 2011-08-24 10:17 Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 1/7] OMAP3+: boards: Fix the __initconst build error Benoit Cousson
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Hi Grant,
Here is the first part of patches to add device-tree support for OMAP4
platforms. It is partially based on initial works done by Manju for i2c.
The main difference is the usage of the notifier to create omap_device and
the addition of the hwmods bindings.
That series mainly clean the existing DT file and add an empty skeleton for
OMAP4 soc.
It adds as well a minimal OMAP4 board file for basic DT support. The goal
being to remove even the minimal static devices init in order to have a
fully generic OMAP board file.
The next one will start adding some real devices.
Patches are based on for_3.2/2_omap_device_dt + devicetree/test
and are available here:
git://gitorious.org/omap-pm/linux.git for_3.2/3_omap4_dt_base
Thanks to your latest hack, for people who want to play with appended dtb:
make uImage-dtb.omap4-panda
make uImage-dtb.omap4-sdp
Comments are welcome.
Regards,
Benoit
Benoit Cousson (7):
OMAP3+: boards: Fix the __initconst build error
arm/dts: Add initial device tree support for OMAP4 SoC
arm/dts: Update OMAP4 Panda to include common omap4.dtsi
arm/dts: Add support for OMAP4 SDP board
OMAP4: board-panda: Remove DT support from regular board
OMAP4: board-dt: Add generic board with DT support
documentation/dt: Add OMAP bindings
.../devicetree/bindings/arm/omap/omap.txt | 38 +++++++
arch/arm/boot/dts/omap4-panda.dts | 28 ++++-
arch/arm/boot/dts/omap4-sdp.dts | 29 +++++
arch/arm/boot/dts/omap4.dtsi | 80 ++++++++++++++
arch/arm/mach-omap2/Kconfig | 9 ++
arch/arm/mach-omap2/Makefile | 1 +
arch/arm/mach-omap2/board-igep0020.c | 2 +-
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
arch/arm/mach-omap2/board-omap4-dt.c | 110 ++++++++++++++++++++
arch/arm/mach-omap2/board-omap4panda.c | 6 -
arch/arm/mach-omap2/board-overo.c | 2 +-
11 files changed, 293 insertions(+), 14 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/omap/omap.txt
create mode 100644 arch/arm/boot/dts/omap4-sdp.dts
create mode 100644 arch/arm/boot/dts/omap4.dtsi
create mode 100644 arch/arm/mach-omap2/board-omap4-dt.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [RFC PATCH 1/7] OMAP3+: boards: Fix the __initconst build error
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC Benoit Cousson
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
The __initconst introduced some build errors with the following
compiler version:
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010.09-50) 4.5.1
arch/arm/mach-omap2/board-omap3beagle.c:566:20: error:
omap3_beagle_dt_match causes a section type conflict
Replace them by __initdata.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
---
arch/arm/mach-omap2/board-igep0020.c | 2 +-
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
arch/arm/mach-omap2/board-omap4panda.c | 2 +-
arch/arm/mach-omap2/board-overo.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 249165a..2521823 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -671,7 +671,7 @@ static void __init igep_init(void)
}
}
-static const char *igep2_dt_compat[] __initconst = {
+static const char *igep2_dt_compat[] __initdata = {
"ISEE,igep-v2",
NULL
};
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index b3b9cbc..a7923ca 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -563,7 +563,7 @@ static void __init omap3_beagle_init(void)
beagle_opp_init();
}
-static const char *omap3_beagle_dt_match[] __initconst = {
+static const char *omap3_beagle_dt_match[] __initdata = {
"ti,omap3-beagle",
NULL
};
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index b526aa9..1c583c7 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -581,7 +581,7 @@ static void __init omap4_panda_map_io(void)
omap44xx_map_common_io();
}
-static const char *omap4_panda_match[] __initconst = {
+static const char *omap4_panda_match[] __initdata = {
"ti,omap4-panda",
NULL,
};
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 18ae2c2..f0b8489 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -560,7 +560,7 @@ static void __init overo_init(void)
"OVERO_GPIO_USBH_CPEN\n");
}
-static const char *omap3_overo_dt_match[] __initconst = {
+static const char *omap3_overo_dt_match[] __initdata = {
"gumstix,omap3-overo",
NULL
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 1/7] OMAP3+: boards: Fix the __initconst build error Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
2011-08-25 13:37 ` Rob Herring
2011-08-24 10:17 ` [RFC PATCH 3/7] arm/dts: Update OMAP4 Panda to include common omap4.dtsi Benoit Cousson
` (4 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Add initial device-tree support for OMAP4 SoC.
This is based on the original panda board patch done by Manju:
http://permalink.gmane.org/gmane.linux.ports.arm.omap/60393
Add the generic GIC interrupt-controller from ARM.
Add an empty "soc" node to contain non memory mapped IPs
(DSP, MPU, IPU...).
Note: Since reg, irq and dma are provided by hwmod for the
moment, these attributes will not be present at all in DTS
to highlight the gap. They will be added as soon as dma bindings
will be there and drivers will be adapted.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
arch/arm/boot/dts/omap4.dtsi | 80 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boot/dts/omap4.dtsi
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
new file mode 100644
index 0000000..97a3ea7
--- /dev/null
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+
+/*
+ * Carveout for multimedia usecases
+ * It should be the last 48MB of the first 512MB memory part
+ * In theory, it should not even exist. That zone should be reserved
+ * dynamically during the .reserve callback.
+ */
+/memreserve/ 0x9d000000 0x03000000;
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "TI OMAP4430";
+ compatible = "ti,omap4430", "ti,omap4";
+ interrupt-parent = <&gic>;
+
+ aliases {
+ };
+
+ /*
+ * The soc node represents the soc top level view. It is uses for IPs
+ * that are not memory mapped in the MPU view or for the MPU itself.
+ */
+ soc {
+ compatible = "ti,omap-infra";
+ };
+
+ /*
+ * XXX: Use a flat representation of the OMAP4 interconnect.
+ * The real OMAP interconnect network is quite complex.
+ *
+ * MPU -+-- MPU_PRIVATE - GIC, L2
+ * |
+ * +----------------+----------+
+ * | | |
+ * + +- EMIF - DDR |
+ * | | |
+ * | + +--------+
+ * | | |
+ * | +- L4_ABE - AESS, MCBSP, TIMERs...
+ * | |
+ * +- L3_MAIN --+- L4_CORE - IPs...
+ * |
+ * +- L4_PER - IPs...
+ * |
+ * +- L4_CFG -+- L4_WKUP - IPs...
+ * | |
+ * | +- IPs...
+ * +- IPU ----+
+ * | |
+ * +- DSP ----+
+ * | |
+ * +- DSS ----+
+ *
+ * Since that will not bring real advantage to represent that in DT for
+ * the moment, just use a fake OCP bus entry to represent the whole bus
+ * hierarchy.
+ */
+ ocp {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ gic: interrupt-controller at 48241000 {
+ compatible = "ti,omap4-gic", "arm,gic";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ reg = <0x48241000 0x1000>,
+ <0x48240100 0x0200>;
+ };
+ };
+};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 3/7] arm/dts: Update OMAP4 Panda to include common omap4.dtsi
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 1/7] OMAP3+: boards: Fix the __initconst build error Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 4/7] arm/dts: Add support for OMAP4 SDP board Benoit Cousson
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Based on the original omap4-panda.dts file from Manju.
http://www.spinics.net/lists/linux-omap/msg55836.html
Add memory information and a default bootargs to allow
a boot from RAMDISK.
Add missing header.
Include the common omap4.dtsi.
Add a "ti,omap4" compatible value for OMAP4 based boards.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
arch/arm/boot/dts/omap4-panda.dts | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
index 58909e9..c702657 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -1,11 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
/dts-v1/;
-/memreserve/ 0x9D000000 0x03000000; /* Frame buffer */
-/memreserve/ 0xB0000000 0x10000000; /* Top 256MB is unaccessable */
-
-/include/ "skeleton.dtsi"
+/include/ "omap4.dtsi"
/ {
model = "TI OMAP4 PandaBoard";
- compatible = "ti,omap4-panda", "ti,omap4430";
+ compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4";
+
+ /*
+ * Since the initial device tree board file does not create any
+ * devices (MMC, network...), the only way to boot is to provide a
+ * ramdisk.
+ */
+ chosen {
+ bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0x80000000 0x40000000>; /* 1 GB */
+ };
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 4/7] arm/dts: Add support for OMAP4 SDP board
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
` (2 preceding siblings ...)
2011-08-24 10:17 ` [RFC PATCH 3/7] arm/dts: Update OMAP4 Panda to include common omap4.dtsi Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 5/7] OMAP4: board-panda: Remove DT support from regular board Benoit Cousson
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Add the SDP/Blaze (Software Development Board) support with
device tree.
That file is based on the omap4-panda.dts.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: G, Manjunath Kondaiah <manjugk@ti.com>
---
arch/arm/boot/dts/omap4-sdp.dts | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boot/dts/omap4-sdp.dts
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
new file mode 100644
index 0000000..066e28c
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+/dts-v1/;
+
+/include/ "omap4.dtsi"
+
+/ {
+ model = "TI OMAP4 SDP board";
+ compatible = "ti,omap4-sdp", "ti,omap4430", "ti,omap4";
+
+ /*
+ * Since the initial device tree board file does not create any
+ * devices (MMC, network...), the only way to boot is to provide a
+ * ramdisk.
+ */
+ chosen {
+ bootargs = "root=/dev/ram0 rw console=ttyO2,115200n8 initrd=0x81600000,20M ramdisk_size=20480 no_console_suspend debug";
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0x80000000 0x40000000>; /* 1 GB */
+ };
+};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 5/7] OMAP4: board-panda: Remove DT support from regular board
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
` (3 preceding siblings ...)
2011-08-24 10:17 ` [RFC PATCH 4/7] arm/dts: Add support for OMAP4 SDP board Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 6/7] OMAP4: board-dt: Add generic board with DT support Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 7/7] documentation/dt: Add OMAP bindings Benoit Cousson
6 siblings, 0 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
In order to avoid conflict with the new omap4-dt.c board file,
remove the .dt_compat entry from the pandaboard regular board
file.
Any DT work for OMAP4 will have to be done on the generic DT
board file to avoid breaking the legacy board support until
DT migration is done.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-omap4panda.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1c583c7..9aaa960 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -581,11 +581,6 @@ static void __init omap4_panda_map_io(void)
omap44xx_map_common_io();
}
-static const char *omap4_panda_match[] __initdata = {
- "ti,omap4-panda",
- NULL,
-};
-
MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
/* Maintainer: David Anders - Texas Instruments Inc */
.boot_params = 0x80000100,
@@ -595,5 +590,4 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
.init_irq = gic_init_irq,
.init_machine = omap4_panda_init,
.timer = &omap4_timer,
- .dt_compat = omap4_panda_match,
MACHINE_END
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 6/7] OMAP4: board-dt: Add generic board with DT support
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
` (4 preceding siblings ...)
2011-08-24 10:17 ` [RFC PATCH 5/7] OMAP4: board-panda: Remove DT support from regular board Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 7/7] documentation/dt: Add OMAP bindings Benoit Cousson
6 siblings, 0 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Create an OMAP4 generic board to start the DT migration.
This file is doing the minimal initialization needed to boot
properly on a RAMDISK filesystem.
As soon as the OMAP4 specifics will be removed, that board will
be converted to an even more generic board-dt.c that will support
every OMAP 2+ platform.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 9 +++
arch/arm/mach-omap2/Makefile | 1 +
arch/arm/mach-omap2/board-omap4-dt.c | 110 ++++++++++++++++++++++++++++++++++
3 files changed, 120 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-omap2/board-omap4-dt.c
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 57b66d5..5d501d2 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -326,6 +326,15 @@ config MACH_OMAP4_PANDA
select OMAP_PACKAGE_CBS
select REGULATOR_FIXED_VOLTAGE
+config MACH_OMAP4_DT
+ bool "Generic OMAP4 board (FDT support)"
+ default y
+ depends on ARCH_OMAP4
+ select OMAP_PACKAGE_CBL
+ select OMAP_PACKAGE_CBS
+ select REGULATOR_FIXED_VOLTAGE
+ select USE_OF
+
config OMAP3_EMU
bool "OMAP3 debugging peripherals"
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index b1501bd..79e42a1 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -223,6 +223,7 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
omap_phy_internal.o
obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \
omap_phy_internal.o
+obj-$(CONFIG_MACH_OMAP4_DT) += board-omap4-dt.o
obj-$(CONFIG_MACH_PCM049) += board-omap4pcm049.o \
omap_phy_internal.o
diff --git a/arch/arm/mach-omap2/board-omap4-dt.c b/arch/arm/mach-omap2/board-omap4-dt.c
new file mode 100644
index 0000000..9553cf1
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap4-dt.c
@@ -0,0 +1,110 @@
+/*
+ * OMAP4 Device tree boards support
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/irqdomain.h>
+#include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/i2c/twl.h>
+
+#include <asm/mach/arch.h>
+
+#include <plat/board.h>
+#include <plat/common.h>
+
+#include <mach/omap4-common.h>
+
+#include "mux.h"
+#include "common-board-devices.h"
+
+
+static void __init omap4_map_io(void)
+{
+ omap2_set_globals_443x();
+ omap44xx_map_common_io();
+}
+
+static void __init omap_init_early(void)
+{
+ omap2_init_common_infrastructure();
+ /*
+ * XXX: That name is misleading because it does call only
+ * omap2_sdrc_init in the case of OMAP 2&3 platform.
+ * It is a no-op in the case of OMAP4, but keep it for the moment.
+ * It should be replaced by a init_memory_controller kind of function
+ * that will use DT to get the proper memory controller config.
+ */
+ omap2_init_common_devices(NULL, NULL);
+}
+
+static struct of_device_id omap_dt_match_table[] __initdata = {
+ { .compatible = "simple-bus", },
+ { .compatible = "ti,omap-infra", },
+ {}
+};
+
+static struct of_device_id omap_dt_gic_match[] __initdata = {
+ { .compatible = "ti,omap4-gic", },
+ {}
+};
+
+/*
+ * XXX: Still needed to boot until the i2c & twl driver is adapted to
+ * device-tree
+ */
+static struct twl4030_platform_data sdp4430_twldata = {
+ .irq_base = TWL6030_IRQ_BASE,
+ .irq_end = TWL6030_IRQ_END,
+};
+
+static void __init omap4_i2c_init(void)
+{
+ omap4_pmic_init("twl6030", &sdp4430_twldata);
+}
+
+static void __init omap4_init_machine(void)
+{
+ int package = OMAP_PACKAGE_CBS;
+ struct device_node *node;
+
+ node = of_find_matching_node(NULL, omap_dt_gic_match);
+ if (node)
+ irq_domain_add_simple(node, 0);
+
+ if (omap_rev() == OMAP4430_REV_ES1_0)
+ package = OMAP_PACKAGE_CBL;
+ omap4_mux_init(NULL, NULL, package);
+
+ omap4_i2c_init();
+ /*
+ * XXX: Still needed to boot until the omap-serial driver is adapted
+ * to device-tree
+ */
+ omap_serial_init();
+
+ of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
+}
+
+static const char *omap4_boards_compat[] __initdata = {
+ "ti,omap4",
+ NULL,
+};
+
+DT_MACHINE_START(OMAP4_DT, "OMAP4 (Flattened Device Tree)")
+ .reserve = omap_reserve,
+ .map_io = omap4_map_io,
+ .init_early = omap_init_early,
+ .init_irq = gic_init_irq,
+ .init_machine = omap4_init_machine,
+ .timer = &omap4_timer,
+ .dt_compat = omap4_boards_compat,
+MACHINE_END
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 7/7] documentation/dt: Add OMAP bindings
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
` (5 preceding siblings ...)
2011-08-24 10:17 ` [RFC PATCH 6/7] OMAP4: board-dt: Add generic board with DT support Benoit Cousson
@ 2011-08-24 10:17 ` Benoit Cousson
6 siblings, 0 replies; 10+ messages in thread
From: Benoit Cousson @ 2011-08-24 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Add a documentation to capture the specifics OMAP bindings
needed for device-tree support.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
.../devicetree/bindings/arm/omap/omap.txt | 38 ++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/omap/omap.txt
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
new file mode 100644
index 0000000..845f9f1
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -0,0 +1,38 @@
+* Texas Instruments OMAP
+
+OMAP is currently using a static file per SoC family to describe the
+IPs present in the SoC.
+On top of that an omap_device is created to extend the platform_device
+capabilities and to allow binding with one or several hwmods.
+The hwmods will contain all the information to build the device:
+adresse range, irq lines, dma lines, interconnect, PRCM register,
+clock domain, input clocks.
+For the moment just point to the existing hwmod, the next step will be
+to move data from hwmod to device-tree representation.
+
+
+Required properties:
+- compatible: Every devices present in OMAP SoC should be in the
+ form: "ti,XXX"
+- hwmods: list of hwmods attached to a device. Must contain at least
+ one hwmod.
+
+Optional properties:
+- no_idle_on_suspend: When present, it prevents the PM to idle the module
+ during suspend.
+
+
+Example:
+
+spinlock at 1 {
+ compatible = "ti,omap-spinlock";
+ hwmods = "spinlock";
+};
+
+
+Boards:
+- OMAP4 SDP : Software Developement Board
+ compatible = "ti,omap4-sdp", "ti,omap4430"
+
+- OMAP4 PandaBoard : Low cost community board
+ compatible = "ti,omap4-panda", "ti,omap4430"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC
2011-08-24 10:17 ` [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC Benoit Cousson
@ 2011-08-25 13:37 ` Rob Herring
2011-08-25 13:57 ` Cousson, Benoit
0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2011-08-25 13:37 UTC (permalink / raw)
To: linux-arm-kernel
Benoit,
On 08/24/2011 05:17 AM, Benoit Cousson wrote:
> Add initial device-tree support for OMAP4 SoC.
>
> This is based on the original panda board patch done by Manju:
> http://permalink.gmane.org/gmane.linux.ports.arm.omap/60393
>
> Add the generic GIC interrupt-controller from ARM.
>
> Add an empty "soc" node to contain non memory mapped IPs
> (DSP, MPU, IPU...).
>
> Note: Since reg, irq and dma are provided by hwmod for the
> moment, these attributes will not be present at all in DTS
> to highlight the gap. They will be added as soon as dma bindings
> will be there and drivers will be adapted.
>
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: G, Manjunath Kondaiah <manjugk@ti.com>
> ---
> arch/arm/boot/dts/omap4.dtsi | 80 ++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 80 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/boot/dts/omap4.dtsi
>
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> new file mode 100644
> index 0000000..97a3ea7
> --- /dev/null
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -0,0 +1,80 @@
> +/*
> + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
> + *
> + * 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.
> + */
> +
> +/*
> + * Carveout for multimedia usecases
> + * It should be the last 48MB of the first 512MB memory part
> + * In theory, it should not even exist. That zone should be reserved
> + * dynamically during the .reserve callback.
> + */
> +/memreserve/ 0x9d000000 0x03000000;
> +
> +/include/ "skeleton.dtsi"
> +
> +/ {
> + model = "TI OMAP4430";
> + compatible = "ti,omap4430", "ti,omap4";
> + interrupt-parent = <&gic>;
> +
> + aliases {
> + };
> +
> + /*
> + * The soc node represents the soc top level view. It is uses for IPs
> + * that are not memory mapped in the MPU view or for the MPU itself.
> + */
> + soc {
> + compatible = "ti,omap-infra";
> + };
> +
> + /*
> + * XXX: Use a flat representation of the OMAP4 interconnect.
> + * The real OMAP interconnect network is quite complex.
> + *
> + * MPU -+-- MPU_PRIVATE - GIC, L2
> + * |
> + * +----------------+----------+
> + * | | |
> + * + +- EMIF - DDR |
> + * | | |
> + * | + +--------+
> + * | | |
> + * | +- L4_ABE - AESS, MCBSP, TIMERs...
> + * | |
> + * +- L3_MAIN --+- L4_CORE - IPs...
> + * |
> + * +- L4_PER - IPs...
> + * |
> + * +- L4_CFG -+- L4_WKUP - IPs...
> + * | |
> + * | +- IPs...
> + * +- IPU ----+
> + * | |
> + * +- DSP ----+
> + * | |
> + * +- DSS ----+
> + *
> + * Since that will not bring real advantage to represent that in DT for
> + * the moment, just use a fake OCP bus entry to represent the whole bus
> + * hierarchy.
> + */
> + ocp {
> + compatible = "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + gic: interrupt-controller at 48241000 {
> + compatible = "ti,omap4-gic", "arm,gic";
The gic binding is still being hashed out. This needs binding
documentation and handling of PPIs. I'm planning on posting an updated
series today with this.
"arm,gic" should be dropped or replaced with "arm,cortex-a9-gic".
Non-specific DT bindings are not well received. Is OMAP4 gic different
from standard Cortex-A9?
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + reg = <0x48241000 0x1000>,
> + <0x48240100 0x0200>;
Isn't the cpu interface register space 0x100 bytes long?
Rob
> + };
> + };
> +};
^ permalink raw reply [flat|nested] 10+ messages in thread
* [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC
2011-08-25 13:37 ` Rob Herring
@ 2011-08-25 13:57 ` Cousson, Benoit
0 siblings, 0 replies; 10+ messages in thread
From: Cousson, Benoit @ 2011-08-25 13:57 UTC (permalink / raw)
To: linux-arm-kernel
Hi Rob,
On 8/25/2011 3:37 PM, Rob Herring wrote:
> Benoit,
[...]
>> + gic: interrupt-controller at 48241000 {
>> + compatible = "ti,omap4-gic", "arm,gic";
>
> The gic binding is still being hashed out. This needs binding
> documentation and handling of PPIs. I'm planning on posting an updated
> series today with this.
>
> "arm,gic" should be dropped or replaced with "arm,cortex-a9-gic".
> Non-specific DT bindings are not well received. Is OMAP4 gic different
> from standard Cortex-A9?
Not at all. We named it like that based on Grant's comment:
http://permalink.gmane.org/gmane.linux.ports.arm.omap/60393
I'll update it with the new binding.
>> + interrupt-controller;
>> + #interrupt-cells =<1>;
>> + reg =<0x48241000 0x1000>,
>> + <0x48240100 0x0200>;
>
> Isn't the cpu interface register space 0x100 bytes long?
I've just checked the spec, and this is indeed 256 bytes. I'll fix that.
Thanks for the comments.
Regards,
Benoit
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-08-25 13:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 10:17 [RFC PATCH 0/7] OMAP: Add initial support for DT on OMAP4 Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 1/7] OMAP3+: boards: Fix the __initconst build error Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 2/7] arm/dts: Add initial device tree support for OMAP4 SoC Benoit Cousson
2011-08-25 13:37 ` Rob Herring
2011-08-25 13:57 ` Cousson, Benoit
2011-08-24 10:17 ` [RFC PATCH 3/7] arm/dts: Update OMAP4 Panda to include common omap4.dtsi Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 4/7] arm/dts: Add support for OMAP4 SDP board Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 5/7] OMAP4: board-panda: Remove DT support from regular board Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 6/7] OMAP4: board-dt: Add generic board with DT support Benoit Cousson
2011-08-24 10:17 ` [RFC PATCH 7/7] documentation/dt: Add OMAP bindings Benoit Cousson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).