From fb49b8c22dbb1c48b9f3906af1308c0fa4d7aa82 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Tue, 6 Dec 2011 17:49:08 +0100 Subject: [PATCH 01/12] arm/dts: OMAP: Remove bootargs node from board files Since 3.2, the CONFIG_ARM_ATAG_DTB_COMPAT config allows an old bootloader to still use ATAG to provide cmdline. Remove chosen/bootargs from the DTS board files. Signed-off-by: Benoit Cousson Cc: Grant Likely Acked-by: Rob Herring Signed-off-by: Tony Lindgren --- arch/arm/boot/dts/omap3-beagle.dts | 9 --------- arch/arm/boot/dts/omap4-panda.dts | 9 --------- arch/arm/boot/dts/omap4-sdp.dts | 9 --------- 3 files changed, 27 deletions(-) diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index 9486be62bcdd..9f72cd4cf308 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts @@ -13,15 +13,6 @@ model = "TI OMAP3 BeagleBoard"; compatible = "ti,omap3-beagle", "ti,omap3"; - /* - * 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 earlyprintk"; - }; - memory { device_type = "memory"; reg = <0x80000000 0x20000000>; /* 512 MB */ diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts index c7026578ce7d..9755ad5917f8 100644 --- a/arch/arm/boot/dts/omap4-panda.dts +++ b/arch/arm/boot/dts/omap4-panda.dts @@ -13,15 +13,6 @@ model = "TI OMAP4 PandaBoard"; 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 */ diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 066e28c90328..63c6b2b2bf42 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -13,15 +13,6 @@ 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 */ From 40c0591f0a349ec074357e05c6ab1a3bc951807c Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Thu, 1 Dec 2011 10:21:16 +0100 Subject: [PATCH 02/12] ARM: OMAP2+: kconfig: Enable devicetree by default for OMAP2+ systems devicetree will become the mandatory boot method for OMAP2+. In order to avoid cluttering the OMAP code with #ifdef CONFIG_OF, select USE_OF by default for every OMAP2+ systems. Enable PROC_DEVICETREE as well. Signed-off-by: Benoit Cousson Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/Kconfig | 1 - arch/arm/plat-omap/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index b6625130831d..bdd5b68fba80 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -111,7 +111,6 @@ comment "OMAP Board Type" config MACH_OMAP_GENERIC bool "Generic OMAP2+ board" depends on ARCH_OMAP2PLUS - select USE_OF default y help Support for generic TI OMAP2+ boards using Flattened Device Tree. diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index aa59f4247dc5..734009a93857 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -24,6 +24,8 @@ config ARCH_OMAP2PLUS select CLKDEV_LOOKUP select GENERIC_IRQ_CHIP select OMAP_DM_TIMER + select USE_OF + select PROC_DEVICETREE help "Systems based on OMAP2, OMAP3 or OMAP4" From 0e02a8c1a5a5aea8b0fd8c16dd7d1ac2de641275 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Thu, 1 Dec 2011 11:05:17 +0100 Subject: [PATCH 03/12] ARM: OMAP2+: board-generic: Remove un-needed .atag_offset for DT_MACHINE Some .atag_offset entries were wrongly added during a merge conflict resolution in 3.3. Remove them all, since DT boot does not use that attribute anymore. Replace as well the #if... by #ifdef for consistency. Signed-off-by: Benoit Cousson Cc: Tony Lindgren --- arch/arm/mach-omap2/board-generic.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index d58756060483..9d25cb6c9a0d 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -90,14 +90,13 @@ static void __init omap3_init(void) } #endif -#if defined(CONFIG_SOC_OMAP2420) +#ifdef CONFIG_SOC_OMAP2420 static const char *omap242x_boards_compat[] __initdata = { "ti,omap2420", NULL, }; DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)") - .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap242x_map_io, .init_early = omap2420_init_early, @@ -109,14 +108,13 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)") MACHINE_END #endif -#if defined(CONFIG_SOC_OMAP2430) +#ifdef CONFIG_SOC_OMAP2430 static const char *omap243x_boards_compat[] __initdata = { "ti,omap2430", NULL, }; DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)") - .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap243x_map_io, .init_early = omap2430_init_early, @@ -129,14 +127,13 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)") MACHINE_END #endif -#if defined(CONFIG_ARCH_OMAP3) +#ifdef CONFIG_ARCH_OMAP3 static const char *omap3_boards_compat[] __initdata = { "ti,omap3", NULL, }; DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") - .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = omap3430_init_early, @@ -148,14 +145,13 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") MACHINE_END #endif -#if defined(CONFIG_ARCH_OMAP4) +#ifdef CONFIG_ARCH_OMAP4 static const char *omap4_boards_compat[] __initdata = { "ti,omap4", NULL, }; DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)") - .atag_offset = 0x100, .reserve = omap_reserve, .map_io = omap4_map_io, .init_early = omap4430_init_early, From 5dc06b7ea31a41707ab67e3caad5127bd45069b6 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Fri, 20 Jan 2012 18:14:00 +0100 Subject: [PATCH 04/12] ARM: OMAP2+: omap_device: Replace dev_warn by dev_dbg in omap_device_build_from_dt This warning becomes a little bit too verbose with the increase of device nodes in some DTS files. Change it to debug only. Signed-off-by: Benoit Cousson Acked-by: Kevin Hilman --- arch/arm/plat-omap/omap_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index e8d98693d2dd..69fde03729cd 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -348,7 +348,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev) oh_cnt = of_property_count_strings(node, "ti,hwmods"); if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) { - dev_warn(&pdev->dev, "No 'hwmods' to build omap_device\n"); + dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n"); return -ENODEV; } From 506d81ef31ece39c760e8c2b2071e6aa3b983b72 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Thu, 8 Dec 2011 16:47:39 +0100 Subject: [PATCH 05/12] ARM: OMAP2+: pm: Do not init statically the SR and voltage layer with DT In the case of DT, the PMIC and SR initialization will be done using a completely different mechanism. Disable this part if a DT blob is available. Signed-off-by: Benoit Cousson Acked-by: Kevin Hilman Acked-by: Rob Herring Acked-by: Grant Likely --- arch/arm/mach-omap2/pm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 1881fe915149..ad4f69394166 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -227,6 +227,14 @@ postcore_initcall(omap2_common_pm_init); static int __init omap2_common_pm_late_init(void) { + /* + * In the case of DT, the PMIC and SR initialization will be done using + * a completely different mechanism. + * Disable this part if a DT blob is available. + */ + if (of_have_populated_dt()) + return 0; + /* Init the voltage layer */ omap_pmic_late_init(); omap_voltage_late_init(); From ef28a1863ff81e7e71a2159ef0215ad0c29b4040 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Thu, 2 Feb 2012 23:10:10 +0100 Subject: [PATCH 06/12] ARM: OMAP1: kconfig: Enable IRQ_DOMAIN by default for OMAP1 platforms The devices that can act as an interrupt controller like the GPIO are going to be handled using the IRQ domain mechanism in order to avoid the static IRQ mapping done so far inside plat-omap/irqs.h. Enable IRQ_DOMAIN by default to allow the drivers shared with OMAP2+ to compile properly on OMAP1 platforms. Signed-off-by: Benoit Cousson Cc: Tony Lindgren --- arch/arm/plat-omap/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index aa59f4247dc5..abe156d103c3 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -14,6 +14,7 @@ config ARCH_OMAP1 select CLKDEV_LOOKUP select CLKSRC_MMIO select GENERIC_IRQ_CHIP + select IRQ_DOMAIN select HAVE_IDE select NEED_MACH_MEMORY_H help From 19bfb76ca32f8e4fa80746608ff4a77707f40520 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Thu, 16 Feb 2012 11:55:27 +0100 Subject: [PATCH 07/12] arm/dts: OMAP3&4: Remove the '0x' prefix for serial nodes Follow the DTS convention and thus name the nodes @
without any '0x' prefix in the physical address. Suggested-by: Tony Lindgren Signed-off-by: Benoit Cousson --- arch/arm/boot/dts/omap3.dtsi | 8 ++++---- arch/arm/boot/dts/omap4.dtsi | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 216c3317461d..1c9d10a06a22 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -67,25 +67,25 @@ #interrupt-cells = <1>; }; - uart1: serial@0x4806a000 { + uart1: serial@4806a000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart1"; clock-frequency = <48000000>; }; - uart2: serial@0x4806c000 { + uart2: serial@4806c000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart2"; clock-frequency = <48000000>; }; - uart3: serial@0x49020000 { + uart3: serial@49020000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart3"; clock-frequency = <48000000>; }; - uart4: serial@0x49042000 { + uart4: serial@49042000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart4"; clock-frequency = <48000000>; diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index e8fe75fac7c5..f40af046c1c3 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -104,25 +104,25 @@ <0x48240100 0x0100>; }; - uart1: serial@0x4806a000 { + uart1: serial@4806a000 { compatible = "ti,omap4-uart"; ti,hwmods = "uart1"; clock-frequency = <48000000>; }; - uart2: serial@0x4806c000 { + uart2: serial@4806c000 { compatible = "ti,omap4-uart"; ti,hwmods = "uart2"; clock-frequency = <48000000>; }; - uart3: serial@0x48020000 { + uart3: serial@48020000 { compatible = "ti,omap4-uart"; ti,hwmods = "uart3"; clock-frequency = <48000000>; }; - uart4: serial@0x4806e000 { + uart4: serial@4806e000 { compatible = "ti,omap4-uart"; ti,hwmods = "uart4"; clock-frequency = <48000000>; From bfe9c8ae114009491f51452ec727667d516ee79f Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 23 Feb 2012 10:17:02 -0800 Subject: [PATCH 08/12] ARM: OMAP2+: Set Kconfig dependencies for PROC_DEVICETREE Otherwise we get: warning: (ARCH_OMAP2PLUS) selects PROC_DEVICETREE which has unmet direct dependencies (OF && PROC_FS && !SPARC) Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index e289dd279783..f419a082b04b 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -26,7 +26,7 @@ config ARCH_OMAP2PLUS select GENERIC_IRQ_CHIP select OMAP_DM_TIMER select USE_OF - select PROC_DEVICETREE + select PROC_DEVICETREE if PROC_FS help "Systems based on OMAP2, OMAP3 or OMAP4" From 58e778f9cef4a01bd9d61a0e1e945e71a9c287cc Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Wed, 17 Aug 2011 19:00:03 +0530 Subject: [PATCH 09/12] arm/dts: OMAP4: Add i2c controller nodes Add i2c controllers nodes into the main ocp bus. Signed-off-by: Benoit Cousson Acked-by: Rob Herring Acked-by: Grant Likely --- arch/arm/boot/dts/omap4.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index e8fe75fac7c5..00e54d22344b 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -127,5 +127,33 @@ ti,hwmods = "uart4"; clock-frequency = <48000000>; }; + + i2c1: i2c@48070000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c1"; + }; + + i2c2: i2c@48072000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c2"; + }; + + i2c3: i2c@48060000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c3"; + }; + + i2c4: i2c@48350000 { + compatible = "ti,omap4-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c4"; + }; }; }; From ca59a5c11050bed67f4f60c19c397d109d767d97 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Tue, 30 Aug 2011 16:50:24 +0200 Subject: [PATCH 10/12] arm/dts: OMAP3: Add i2c controller nodes Add i2c controllers nodes into the main ocp bus. Signed-off-by: Benoit Cousson Acked-by: Grant Likely Acked-by: Rob Herring --- arch/arm/boot/dts/omap3.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 216c3317461d..06b460176b11 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -90,5 +90,26 @@ ti,hwmods = "uart4"; clock-frequency = <48000000>; }; + + i2c1: i2c@48070000 { + compatible = "ti,omap3-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c1"; + }; + + i2c2: i2c@48072000 { + compatible = "ti,omap3-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c2"; + }; + + i2c3: i2c@48060000 { + compatible = "ti,omap3-i2c"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "i2c3"; + }; }; }; From 958e767645bb7265beb582b6a9104b1931128c28 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Fri, 25 Nov 2011 12:11:52 +0100 Subject: [PATCH 11/12] arm/dts: OMAP4: Update DTS file with new GIC bindings The GIC binding was updated in 3.2 and expects 3 interrupt-cells. - Update the #interrupt-cells Signed-off-by: Benoit Cousson Acked-by: Rob Herring --- arch/arm/boot/dts/omap4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 00e54d22344b..c089bdac3ad4 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -99,7 +99,7 @@ gic: interrupt-controller@48241000 { compatible = "arm,cortex-a9-gic"; interrupt-controller; - #interrupt-cells = <1>; + #interrupt-cells = <3>; reg = <0x48241000 0x1000>, <0x48240100 0x0100>; }; From f0e15e2b0c6b3e89daade25a1e9a2d80136c14c3 Mon Sep 17 00:00:00 2001 From: Vaibhav Hiremath Date: Fri, 16 Dec 2011 12:35:53 +0530 Subject: [PATCH 12/12] arm/dts: Add support for TI OMAP3 EVM board Add OMAP3 EVM (OMAP3530, AM/DM37x) DTS file to use the omap3.dtsi SoC file, along with memory node information. Signed-off-by: Vaibhav Hiremath Signed-off-by: Benoit Cousson Acked-by: Grant Likely --- arch/arm/boot/dts/omap3-evm.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 arch/arm/boot/dts/omap3-evm.dts diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts new file mode 100644 index 000000000000..2eee16ec59b4 --- /dev/null +++ b/arch/arm/boot/dts/omap3-evm.dts @@ -0,0 +1,20 @@ +/* + * 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/ "omap3.dtsi" + +/ { + model = "TI OMAP3 EVM (OMAP3530, AM/DM37x)"; + compatible = "ti,omap3-evm", "ti,omap3"; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; +};