* [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees @ 2013-05-22 14:27 Florian Vaussard 2013-05-22 14:27 ` [PATCH 1/5] ARM: dts: OMAP2+: use #include for all " Florian Vaussard ` (4 more replies) 0 siblings, 5 replies; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 14:27 UTC (permalink / raw) To: Benoit Cousson Cc: Tony Lindgren, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel, Florian Vaussard Hello, Following a similar proposal by Stephen Warren for tegra [1], this series makes use of the C preprocessor when compiling OMAP DT files, and accomplishes some improvements to improve overall readability. Patch 2 creates a header file to define the OMAP_GPIO() macro, used by patch 3 to make GPIOs more readable. Likewise patch 5 uses the existing constants to make IRQs more readable. Patch 4 is a small random fix. This series was boot-tested on omap3-tobi. For other targets, the decompiled .dtb were diff'ed before and after applying the series to guarantee identity. Best regards, Florian [1] https://patchwork.kernel.org/patch/2560091/ Florian Vaussard (5): ARM: dts: OMAP2+: use #include for all device trees ARM: dts: OMAP2+: create a DT header for GPIO ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt ARM: dts: OMAP4/5: use existing constants for IRQs arch/arm/boot/dts/omap2.dtsi | 4 +- arch/arm/boot/dts/omap2420-h4.dts | 2 +- arch/arm/boot/dts/omap2420.dtsi | 2 +- arch/arm/boot/dts/omap2430.dtsi | 2 +- arch/arm/boot/dts/omap3-beagle-xm.dts | 8 +- arch/arm/boot/dts/omap3-beagle.dts | 10 +- arch/arm/boot/dts/omap3-devkit8000.dts | 10 +- arch/arm/boot/dts/omap3-evm.dts | 4 +- arch/arm/boot/dts/omap3-igep.dtsi | 4 +- arch/arm/boot/dts/omap3-igep0020.dts | 8 +- arch/arm/boot/dts/omap3-igep0030.dts | 4 +- arch/arm/boot/dts/omap3-overo.dtsi | 4 +- arch/arm/boot/dts/omap3-tobi.dts | 4 +- arch/arm/boot/dts/omap3.dtsi | 6 +- arch/arm/boot/dts/omap3430-sdp.dts | 4 +- arch/arm/boot/dts/omap34xx.dtsi | 2 +- arch/arm/boot/dts/omap36xx.dtsi | 2 +- arch/arm/boot/dts/omap4-panda-a4.dts | 4 +- arch/arm/boot/dts/omap4-panda-common.dtsi | 18 +- arch/arm/boot/dts/omap4-panda-es.dts | 4 +- arch/arm/boot/dts/omap4-panda.dts | 4 +- arch/arm/boot/dts/omap4-sdp-es23plus.dts | 2 +- arch/arm/boot/dts/omap4-sdp.dts | 32 ++-- arch/arm/boot/dts/omap4-var-som.dts | 8 +- arch/arm/boot/dts/omap4.dtsi | 117 ++++++------ arch/arm/boot/dts/omap443x.dtsi | 2 +- arch/arm/boot/dts/omap4460.dtsi | 6 +- arch/arm/boot/dts/omap5-evm.dts | 4 +- arch/arm/boot/dts/omap5.dtsi | 125 +++++++------ include/dt-bindings/gpio/omap-gpio.h | 289 +++++++++++++++++++++++++++++ 30 files changed, 497 insertions(+), 198 deletions(-) create mode 100644 include/dt-bindings/gpio/omap-gpio.h -- 1.7.5.4 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/5] ARM: dts: OMAP2+: use #include for all device trees 2013-05-22 14:27 [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees Florian Vaussard @ 2013-05-22 14:27 ` Florian Vaussard 2013-05-22 15:40 ` Tony Lindgren 2013-05-22 14:27 ` [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO Florian Vaussard ` (3 subsequent siblings) 4 siblings, 1 reply; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 14:27 UTC (permalink / raw) To: Benoit Cousson Cc: Tony Lindgren, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel, Florian Vaussard Replace /include/ by #include for OMAP2+ DT, in order to use the C pre-processor, making use of #define features possible. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> --- arch/arm/boot/dts/omap2.dtsi | 2 +- arch/arm/boot/dts/omap2420-h4.dts | 2 +- arch/arm/boot/dts/omap2420.dtsi | 2 +- arch/arm/boot/dts/omap2430.dtsi | 2 +- arch/arm/boot/dts/omap3-beagle-xm.dts | 4 ++-- arch/arm/boot/dts/omap3-beagle.dts | 4 ++-- arch/arm/boot/dts/omap3-devkit8000.dts | 4 ++-- arch/arm/boot/dts/omap3-evm.dts | 4 ++-- arch/arm/boot/dts/omap3-igep.dtsi | 4 ++-- arch/arm/boot/dts/omap3-igep0020.dts | 2 +- arch/arm/boot/dts/omap3-igep0030.dts | 2 +- arch/arm/boot/dts/omap3-overo.dtsi | 4 ++-- arch/arm/boot/dts/omap3-tobi.dts | 2 +- arch/arm/boot/dts/omap3.dtsi | 2 +- arch/arm/boot/dts/omap3430-sdp.dts | 4 ++-- arch/arm/boot/dts/omap34xx.dtsi | 2 +- arch/arm/boot/dts/omap36xx.dtsi | 2 +- arch/arm/boot/dts/omap4-panda-a4.dts | 4 ++-- arch/arm/boot/dts/omap4-panda-common.dtsi | 4 ++-- arch/arm/boot/dts/omap4-panda-es.dts | 4 ++-- arch/arm/boot/dts/omap4-panda.dts | 4 ++-- arch/arm/boot/dts/omap4-sdp-es23plus.dts | 2 +- arch/arm/boot/dts/omap4-sdp.dts | 6 +++--- arch/arm/boot/dts/omap4-var-som.dts | 4 ++-- arch/arm/boot/dts/omap4.dtsi | 2 +- arch/arm/boot/dts/omap443x.dtsi | 2 +- arch/arm/boot/dts/omap4460.dtsi | 2 +- arch/arm/boot/dts/omap5-evm.dts | 4 ++-- arch/arm/boot/dts/omap5.dtsi | 2 +- 29 files changed, 44 insertions(+), 44 deletions(-) diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi index 37aa748..e6e4587 100644 --- a/arch/arm/boot/dts/omap2.dtsi +++ b/arch/arm/boot/dts/omap2.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "skeleton.dtsi" +#include "skeleton.dtsi" / { compatible = "ti,omap2430", "ti,omap2420", "ti,omap2"; diff --git a/arch/arm/boot/dts/omap2420-h4.dts b/arch/arm/boot/dts/omap2420-h4.dts index 68282ee..224c08f 100644 --- a/arch/arm/boot/dts/omap2420-h4.dts +++ b/arch/arm/boot/dts/omap2420-h4.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap2420.dtsi" +#include "omap2420.dtsi" / { model = "TI OMAP2420 H4 board"; diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi index da5b285..c8f9c55 100644 --- a/arch/arm/boot/dts/omap2420.dtsi +++ b/arch/arm/boot/dts/omap2420.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "omap2.dtsi" +#include "omap2.dtsi" / { compatible = "ti,omap2420", "ti,omap2"; diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi index 054bc44..c535a5a 100644 --- a/arch/arm/boot/dts/omap2430.dtsi +++ b/arch/arm/boot/dts/omap2430.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "omap2.dtsi" +#include "omap2.dtsi" / { compatible = "ti,omap2430", "ti,omap2"; diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 3046d1f..e0ce823 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap36xx.dtsi" +#include "omap36xx.dtsi" / { model = "TI OMAP3 BeagleBoard xM"; @@ -75,7 +75,7 @@ }; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" &i2c2 { clock-frequency = <400000>; diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index 6eec699..fcac96a 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap34xx.dtsi" +#include "omap34xx.dtsi" / { model = "TI OMAP3 BeagleBoard"; @@ -107,7 +107,7 @@ }; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" &mmc1 { vmmc-supply = <&vmmc1>; diff --git a/arch/arm/boot/dts/omap3-devkit8000.dts b/arch/arm/boot/dts/omap3-devkit8000.dts index 8a5cdcc..8d0f5e4 100644 --- a/arch/arm/boot/dts/omap3-devkit8000.dts +++ b/arch/arm/boot/dts/omap3-devkit8000.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap34xx.dtsi" +#include "omap34xx.dtsi" / { model = "TimLL OMAP3 Devkit8000"; compatible = "timll,omap3-devkit8000", "ti,omap3"; @@ -80,7 +80,7 @@ status = "disabled"; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" &mmc1 { vmmc-supply = <&vmmc1>; diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts index 96d1c20..d75759b 100644 --- a/arch/arm/boot/dts/omap3-evm.dts +++ b/arch/arm/boot/dts/omap3-evm.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap34xx.dtsi" +#include "omap34xx.dtsi" / { model = "TI OMAP3 EVM (OMAP3530, AM/DM37x)"; @@ -44,7 +44,7 @@ }; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" &i2c2 { clock-frequency = <400000>; diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index f8fe3b7..54588b0 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi @@ -10,7 +10,7 @@ */ /dts-v1/; -/include/ "omap34xx.dtsi" +#include "omap34xx.dtsi" / { memory { @@ -80,7 +80,7 @@ }; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" &i2c2 { clock-frequency = <400000>; diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index e2b9849..2f96a5c 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts @@ -9,7 +9,7 @@ * published by the Free Software Foundation. */ -/include/ "omap3-igep.dtsi" +#include "omap3-igep.dtsi" / { model = "IGEPv2"; diff --git a/arch/arm/boot/dts/omap3-igep0030.dts b/arch/arm/boot/dts/omap3-igep0030.dts index 9dc48d2..f3a1bf0 100644 --- a/arch/arm/boot/dts/omap3-igep0030.dts +++ b/arch/arm/boot/dts/omap3-igep0030.dts @@ -9,7 +9,7 @@ * published by the Free Software Foundation. */ -/include/ "omap3-igep.dtsi" +#include "omap3-igep.dtsi" / { model = "IGEP COM Module"; diff --git a/arch/arm/boot/dts/omap3-overo.dtsi b/arch/arm/boot/dts/omap3-overo.dtsi index a626c50..e112a42 100644 --- a/arch/arm/boot/dts/omap3-overo.dtsi +++ b/arch/arm/boot/dts/omap3-overo.dtsi @@ -11,7 +11,7 @@ */ /dts-v1/; -/include/ "omap34xx.dtsi" +#include "omap34xx.dtsi" / { pwmleds { @@ -49,7 +49,7 @@ }; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" /* i2c2 pins are used for gpio */ &i2c2 { diff --git a/arch/arm/boot/dts/omap3-tobi.dts b/arch/arm/boot/dts/omap3-tobi.dts index a13d12d..5df894f 100644 --- a/arch/arm/boot/dts/omap3-tobi.dts +++ b/arch/arm/boot/dts/omap3-tobi.dts @@ -10,7 +10,7 @@ * Tobi expansion board is manufactured by Gumstix Inc. */ -/include/ "omap3-overo.dtsi" +#include "omap3-overo.dtsi" / { model = "TI OMAP3 Gumstix Overo on Tobi"; diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 82a404d..7c7d494 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "skeleton.dtsi" +#include "skeleton.dtsi" / { compatible = "ti,omap3430", "ti,omap3"; diff --git a/arch/arm/boot/dts/omap3430-sdp.dts b/arch/arm/boot/dts/omap3430-sdp.dts index 144ae43..2a725a0 100644 --- a/arch/arm/boot/dts/omap3430-sdp.dts +++ b/arch/arm/boot/dts/omap3430-sdp.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap34xx.dtsi" +#include "omap34xx.dtsi" / { model = "TI OMAP3430 SDP"; @@ -28,7 +28,7 @@ }; }; -/include/ "twl4030.dtsi" +#include "twl4030.dtsi" &mmc1 { vmmc-supply = <&vmmc1>; diff --git a/arch/arm/boot/dts/omap34xx.dtsi b/arch/arm/boot/dts/omap34xx.dtsi index 75ed4ae..5355d61 100644 --- a/arch/arm/boot/dts/omap34xx.dtsi +++ b/arch/arm/boot/dts/omap34xx.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "omap3.dtsi" +#include "omap3.dtsi" / { cpus { diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi index f3447bc..f8b3765 100644 --- a/arch/arm/boot/dts/omap36xx.dtsi +++ b/arch/arm/boot/dts/omap36xx.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "omap3.dtsi" +#include "omap3.dtsi" / { aliases { diff --git a/arch/arm/boot/dts/omap4-panda-a4.dts b/arch/arm/boot/dts/omap4-panda-a4.dts index e30cdf0..f18fb5c 100644 --- a/arch/arm/boot/dts/omap4-panda-a4.dts +++ b/arch/arm/boot/dts/omap4-panda-a4.dts @@ -7,8 +7,8 @@ */ /dts-v1/; -/include/ "omap443x.dtsi" -/include/ "omap4-panda-common.dtsi" +#include "omap443x.dtsi" +#include "omap4-panda-common.dtsi" /* Pandaboard Rev A4+ have external pullups on SCL & SDA */ &dss_hdmi_pins { diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 03bd60d..63148d1 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi @@ -5,7 +5,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -/include/ "elpida_ecb240abacn.dtsi" +#include "elpida_ecb240abacn.dtsi" / { model = "TI OMAP4 PandaBoard"; @@ -164,7 +164,7 @@ }; }; -/include/ "twl6030.dtsi" +#include "twl6030.dtsi" &i2c2 { pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts index f1d8c21..c6f012e 100644 --- a/arch/arm/boot/dts/omap4-panda-es.dts +++ b/arch/arm/boot/dts/omap4-panda-es.dts @@ -7,8 +7,8 @@ */ /dts-v1/; -/include/ "omap4460.dtsi" -/include/ "omap4-panda-common.dtsi" +#include "omap4460.dtsi" +#include "omap4-panda-common.dtsi" /* Audio routing is differnet between PandaBoard4430 and PandaBoardES */ &sound { diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts index f8b221f..6189a8b 100644 --- a/arch/arm/boot/dts/omap4-panda.dts +++ b/arch/arm/boot/dts/omap4-panda.dts @@ -7,5 +7,5 @@ */ /dts-v1/; -/include/ "omap443x.dtsi" -/include/ "omap4-panda-common.dtsi" +#include "omap443x.dtsi" +#include "omap4-panda-common.dtsi" diff --git a/arch/arm/boot/dts/omap4-sdp-es23plus.dts b/arch/arm/boot/dts/omap4-sdp-es23plus.dts index b4a40ff..4f26355 100644 --- a/arch/arm/boot/dts/omap4-sdp-es23plus.dts +++ b/arch/arm/boot/dts/omap4-sdp-es23plus.dts @@ -5,7 +5,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -/include/ "omap4-sdp.dts" +#include "omap4-sdp.dts" /* SDP boards with 4430 ES2.3+ or 4460 have external pullups on SCL & SDA */ &dss_hdmi_pins { diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index a35d9cd..5edd08e 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -7,8 +7,8 @@ */ /dts-v1/; -/include/ "omap443x.dtsi" -/include/ "elpida_ecb240abacn.dtsi" +#include "omap443x.dtsi" +#include "elpida_ecb240abacn.dtsi" / { model = "TI OMAP4 SDP board"; @@ -316,7 +316,7 @@ }; }; -/include/ "twl6030.dtsi" +#include "twl6030.dtsi" &i2c2 { pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts index 7e04103..6593607 100644 --- a/arch/arm/boot/dts/omap4-var-som.dts +++ b/arch/arm/boot/dts/omap4-var-som.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -/include/ "omap443x.dtsi" +#include "omap443x.dtsi" / { model = "Variscite OMAP4 SOM"; @@ -39,7 +39,7 @@ }; }; -/include/ "twl6030.dtsi" +#include "twl6030.dtsi" &i2c2 { clock-frequency = <400000>; diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 2a56428..53d80aa 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -14,7 +14,7 @@ */ /memreserve/ 0x9d000000 0x03000000; -/include/ "skeleton.dtsi" +#include "skeleton.dtsi" / { compatible = "ti,omap4430", "ti,omap4"; diff --git a/arch/arm/boot/dts/omap443x.dtsi b/arch/arm/boot/dts/omap443x.dtsi index cccf39a..a81f8df 100644 --- a/arch/arm/boot/dts/omap443x.dtsi +++ b/arch/arm/boot/dts/omap443x.dtsi @@ -8,7 +8,7 @@ * kind, whether express or implied. */ -/include/ "omap4.dtsi" +#include "omap4.dtsi" / { cpus { diff --git a/arch/arm/boot/dts/omap4460.dtsi b/arch/arm/boot/dts/omap4460.dtsi index 2cf227c..41762c2 100644 --- a/arch/arm/boot/dts/omap4460.dtsi +++ b/arch/arm/boot/dts/omap4460.dtsi @@ -7,7 +7,7 @@ * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied. */ -/include/ "omap4.dtsi" +#include "omap4.dtsi" / { cpus { diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts index 982acd1..f5f55d1 100644 --- a/arch/arm/boot/dts/omap5-evm.dts +++ b/arch/arm/boot/dts/omap5-evm.dts @@ -7,8 +7,8 @@ */ /dts-v1/; -/include/ "omap5.dtsi" -/include/ "samsung_k3pe0e000b.dtsi" +#include "omap5.dtsi" +#include "samsung_k3pe0e000b.dtsi" / { model = "TI OMAP5 EVM board"; diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index 3dd7ff8..e8e6653 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi @@ -15,7 +15,7 @@ */ /memreserve/ 0x9d000000 0x03000000; -/include/ "skeleton.dtsi" +#include "skeleton.dtsi" / { #address-cells = <1>; -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] ARM: dts: OMAP2+: use #include for all device trees 2013-05-22 14:27 ` [PATCH 1/5] ARM: dts: OMAP2+: use #include for all " Florian Vaussard @ 2013-05-22 15:40 ` Tony Lindgren 2013-05-22 16:05 ` Florian Vaussard 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2013-05-22 15:40 UTC (permalink / raw) To: Florian Vaussard Cc: Benoit Cousson, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel * Florian Vaussard <florian.vaussard@epfl.ch> [130522 07:33]: > Replace /include/ by #include for OMAP2+ DT, in order to use the > C pre-processor, making use of #define features possible. This is good, but let's use it with case. Probably the best use for this right now is to add defines for the mux modes from mach-omap2/mux.h as that makes the raw values readable without comments. Regards, Tony ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] ARM: dts: OMAP2+: use #include for all device trees 2013-05-22 15:40 ` Tony Lindgren @ 2013-05-22 16:05 ` Florian Vaussard 0 siblings, 0 replies; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 16:05 UTC (permalink / raw) To: Tony Lindgren Cc: Benoit Cousson, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel Hi Tony, On 05/22/2013 05:40 PM, Tony Lindgren wrote: > * Florian Vaussard <florian.vaussard@epfl.ch> [130522 07:33]: >> Replace /include/ by #include for OMAP2+ DT, in order to use the >> C pre-processor, making use of #define features possible. > > This is good, but let's use it with case. Probably the best use > for this right now is to add defines for the mux modes from > mach-omap2/mux.h as that makes the raw values readable without > comments. > I think that one first good case is the IRQs in patch 5. But I agree, adding defines for the mux modes would be great. I can have a look at it for a v2. Regards, Florian ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO 2013-05-22 14:27 [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees Florian Vaussard 2013-05-22 14:27 ` [PATCH 1/5] ARM: dts: OMAP2+: use #include for all " Florian Vaussard @ 2013-05-22 14:27 ` Florian Vaussard 2013-05-22 15:26 ` Stephen Warren 2013-05-22 14:27 ` [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro Florian Vaussard ` (2 subsequent siblings) 4 siblings, 1 reply; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 14:27 UTC (permalink / raw) To: Benoit Cousson Cc: Tony Lindgren, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel, Florian Vaussard Define the OMAP_GPIO macro to conveniently use GPIO inside OMAP DT. For example: gpios = <&gpio6 3 0>; /* GPIO 163 */ can be replaced by gpios = OMAP_GPIO(163, 0); Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> --- include/dt-bindings/gpio/omap-gpio.h | 289 ++++++++++++++++++++++++++++++++++ 1 files changed, 289 insertions(+), 0 deletions(-) create mode 100644 include/dt-bindings/gpio/omap-gpio.h diff --git a/include/dt-bindings/gpio/omap-gpio.h b/include/dt-bindings/gpio/omap-gpio.h new file mode 100644 index 0000000..64f2686 --- /dev/null +++ b/include/dt-bindings/gpio/omap-gpio.h @@ -0,0 +1,289 @@ +/* + * This header provides macros and constants for binding ti,omap*-gpio + * + * Compatible with OMAP2, OMAP3, OMAP4 and OMAP5. + */ + +#ifndef _DT_BINDINGS_GPIO_OMAP_GPIO_H +#define _DT_BINDINGS_GPIO_OMAP_GPIO_H + +#include <dt-bindings/gpio/gpio.h> + +#define OMAP_GPIO_0_BANK gpio1 +#define OMAP_GPIO_1_BANK gpio1 +#define OMAP_GPIO_2_BANK gpio1 +#define OMAP_GPIO_3_BANK gpio1 +#define OMAP_GPIO_4_BANK gpio1 +#define OMAP_GPIO_5_BANK gpio1 +#define OMAP_GPIO_6_BANK gpio1 +#define OMAP_GPIO_7_BANK gpio1 +#define OMAP_GPIO_8_BANK gpio1 +#define OMAP_GPIO_9_BANK gpio1 +#define OMAP_GPIO_10_BANK gpio1 +#define OMAP_GPIO_11_BANK gpio1 +#define OMAP_GPIO_12_BANK gpio1 +#define OMAP_GPIO_13_BANK gpio1 +#define OMAP_GPIO_14_BANK gpio1 +#define OMAP_GPIO_15_BANK gpio1 +#define OMAP_GPIO_16_BANK gpio1 +#define OMAP_GPIO_17_BANK gpio1 +#define OMAP_GPIO_18_BANK gpio1 +#define OMAP_GPIO_19_BANK gpio1 +#define OMAP_GPIO_20_BANK gpio1 +#define OMAP_GPIO_21_BANK gpio1 +#define OMAP_GPIO_22_BANK gpio1 +#define OMAP_GPIO_23_BANK gpio1 +#define OMAP_GPIO_24_BANK gpio1 +#define OMAP_GPIO_25_BANK gpio1 +#define OMAP_GPIO_26_BANK gpio1 +#define OMAP_GPIO_27_BANK gpio1 +#define OMAP_GPIO_28_BANK gpio1 +#define OMAP_GPIO_29_BANK gpio1 +#define OMAP_GPIO_30_BANK gpio1 +#define OMAP_GPIO_31_BANK gpio1 + +#define OMAP_GPIO_32_BANK gpio2 +#define OMAP_GPIO_33_BANK gpio2 +#define OMAP_GPIO_34_BANK gpio2 +#define OMAP_GPIO_35_BANK gpio2 +#define OMAP_GPIO_36_BANK gpio2 +#define OMAP_GPIO_37_BANK gpio2 +#define OMAP_GPIO_38_BANK gpio2 +#define OMAP_GPIO_39_BANK gpio2 +#define OMAP_GPIO_40_BANK gpio2 +#define OMAP_GPIO_41_BANK gpio2 +#define OMAP_GPIO_42_BANK gpio2 +#define OMAP_GPIO_43_BANK gpio2 +#define OMAP_GPIO_44_BANK gpio2 +#define OMAP_GPIO_45_BANK gpio2 +#define OMAP_GPIO_46_BANK gpio2 +#define OMAP_GPIO_47_BANK gpio2 +#define OMAP_GPIO_48_BANK gpio2 +#define OMAP_GPIO_49_BANK gpio2 +#define OMAP_GPIO_50_BANK gpio2 +#define OMAP_GPIO_51_BANK gpio2 +#define OMAP_GPIO_52_BANK gpio2 +#define OMAP_GPIO_53_BANK gpio2 +#define OMAP_GPIO_54_BANK gpio2 +#define OMAP_GPIO_55_BANK gpio2 +#define OMAP_GPIO_56_BANK gpio2 +#define OMAP_GPIO_57_BANK gpio2 +#define OMAP_GPIO_58_BANK gpio2 +#define OMAP_GPIO_59_BANK gpio2 +#define OMAP_GPIO_60_BANK gpio2 +#define OMAP_GPIO_61_BANK gpio2 +#define OMAP_GPIO_62_BANK gpio2 +#define OMAP_GPIO_63_BANK gpio2 + +#define OMAP_GPIO_64_BANK gpio3 +#define OMAP_GPIO_65_BANK gpio3 +#define OMAP_GPIO_66_BANK gpio3 +#define OMAP_GPIO_67_BANK gpio3 +#define OMAP_GPIO_68_BANK gpio3 +#define OMAP_GPIO_69_BANK gpio3 +#define OMAP_GPIO_70_BANK gpio3 +#define OMAP_GPIO_71_BANK gpio3 +#define OMAP_GPIO_72_BANK gpio3 +#define OMAP_GPIO_73_BANK gpio3 +#define OMAP_GPIO_74_BANK gpio3 +#define OMAP_GPIO_75_BANK gpio3 +#define OMAP_GPIO_76_BANK gpio3 +#define OMAP_GPIO_77_BANK gpio3 +#define OMAP_GPIO_78_BANK gpio3 +#define OMAP_GPIO_79_BANK gpio3 +#define OMAP_GPIO_80_BANK gpio3 +#define OMAP_GPIO_81_BANK gpio3 +#define OMAP_GPIO_82_BANK gpio3 +#define OMAP_GPIO_83_BANK gpio3 +#define OMAP_GPIO_84_BANK gpio3 +#define OMAP_GPIO_85_BANK gpio3 +#define OMAP_GPIO_86_BANK gpio3 +#define OMAP_GPIO_87_BANK gpio3 +#define OMAP_GPIO_88_BANK gpio3 +#define OMAP_GPIO_89_BANK gpio3 +#define OMAP_GPIO_90_BANK gpio3 +#define OMAP_GPIO_91_BANK gpio3 +#define OMAP_GPIO_92_BANK gpio3 +#define OMAP_GPIO_93_BANK gpio3 +#define OMAP_GPIO_94_BANK gpio3 +#define OMAP_GPIO_95_BANK gpio3 + +#define OMAP_GPIO_96_BANK gpio4 +#define OMAP_GPIO_97_BANK gpio4 +#define OMAP_GPIO_98_BANK gpio4 +#define OMAP_GPIO_99_BANK gpio4 +#define OMAP_GPIO_100_BANK gpio4 +#define OMAP_GPIO_101_BANK gpio4 +#define OMAP_GPIO_102_BANK gpio4 +#define OMAP_GPIO_103_BANK gpio4 +#define OMAP_GPIO_104_BANK gpio4 +#define OMAP_GPIO_105_BANK gpio4 +#define OMAP_GPIO_106_BANK gpio4 +#define OMAP_GPIO_107_BANK gpio4 +#define OMAP_GPIO_108_BANK gpio4 +#define OMAP_GPIO_109_BANK gpio4 +#define OMAP_GPIO_110_BANK gpio4 +#define OMAP_GPIO_111_BANK gpio4 +#define OMAP_GPIO_112_BANK gpio4 +#define OMAP_GPIO_113_BANK gpio4 +#define OMAP_GPIO_114_BANK gpio4 +#define OMAP_GPIO_115_BANK gpio4 +#define OMAP_GPIO_116_BANK gpio4 +#define OMAP_GPIO_117_BANK gpio4 +#define OMAP_GPIO_118_BANK gpio4 +#define OMAP_GPIO_119_BANK gpio4 +#define OMAP_GPIO_120_BANK gpio4 +#define OMAP_GPIO_121_BANK gpio4 +#define OMAP_GPIO_122_BANK gpio4 +#define OMAP_GPIO_123_BANK gpio4 +#define OMAP_GPIO_124_BANK gpio4 +#define OMAP_GPIO_125_BANK gpio4 +#define OMAP_GPIO_126_BANK gpio4 +#define OMAP_GPIO_127_BANK gpio4 + +/* Not available on OMAP2420 */ +#define OMAP_GPIO_128_BANK gpio5 +#define OMAP_GPIO_129_BANK gpio5 +#define OMAP_GPIO_130_BANK gpio5 +#define OMAP_GPIO_131_BANK gpio5 +#define OMAP_GPIO_132_BANK gpio5 +#define OMAP_GPIO_133_BANK gpio5 +#define OMAP_GPIO_134_BANK gpio5 +#define OMAP_GPIO_135_BANK gpio5 +#define OMAP_GPIO_136_BANK gpio5 +#define OMAP_GPIO_137_BANK gpio5 +#define OMAP_GPIO_138_BANK gpio5 +#define OMAP_GPIO_139_BANK gpio5 +#define OMAP_GPIO_140_BANK gpio5 +#define OMAP_GPIO_141_BANK gpio5 +#define OMAP_GPIO_142_BANK gpio5 +#define OMAP_GPIO_143_BANK gpio5 +#define OMAP_GPIO_144_BANK gpio5 +#define OMAP_GPIO_145_BANK gpio5 +#define OMAP_GPIO_146_BANK gpio5 +#define OMAP_GPIO_147_BANK gpio5 +#define OMAP_GPIO_148_BANK gpio5 +#define OMAP_GPIO_149_BANK gpio5 +#define OMAP_GPIO_150_BANK gpio5 +#define OMAP_GPIO_151_BANK gpio5 +#define OMAP_GPIO_152_BANK gpio5 +#define OMAP_GPIO_153_BANK gpio5 +#define OMAP_GPIO_154_BANK gpio5 +#define OMAP_GPIO_155_BANK gpio5 +#define OMAP_GPIO_156_BANK gpio5 +#define OMAP_GPIO_157_BANK gpio5 +#define OMAP_GPIO_158_BANK gpio5 +#define OMAP_GPIO_159_BANK gpio5 + +/* Not available on OMAP2 */ +#define OMAP_GPIO_160_BANK gpio6 +#define OMAP_GPIO_161_BANK gpio6 +#define OMAP_GPIO_162_BANK gpio6 +#define OMAP_GPIO_163_BANK gpio6 +#define OMAP_GPIO_164_BANK gpio6 +#define OMAP_GPIO_165_BANK gpio6 +#define OMAP_GPIO_166_BANK gpio6 +#define OMAP_GPIO_167_BANK gpio6 +#define OMAP_GPIO_168_BANK gpio6 +#define OMAP_GPIO_169_BANK gpio6 +#define OMAP_GPIO_170_BANK gpio6 +#define OMAP_GPIO_171_BANK gpio6 +#define OMAP_GPIO_172_BANK gpio6 +#define OMAP_GPIO_173_BANK gpio6 +#define OMAP_GPIO_174_BANK gpio6 +#define OMAP_GPIO_175_BANK gpio6 +#define OMAP_GPIO_176_BANK gpio6 +#define OMAP_GPIO_177_BANK gpio6 +#define OMAP_GPIO_178_BANK gpio6 +#define OMAP_GPIO_179_BANK gpio6 +#define OMAP_GPIO_180_BANK gpio6 +#define OMAP_GPIO_181_BANK gpio6 +#define OMAP_GPIO_182_BANK gpio6 +#define OMAP_GPIO_183_BANK gpio6 +#define OMAP_GPIO_184_BANK gpio6 +#define OMAP_GPIO_185_BANK gpio6 +#define OMAP_GPIO_186_BANK gpio6 +#define OMAP_GPIO_187_BANK gpio6 +#define OMAP_GPIO_188_BANK gpio6 +#define OMAP_GPIO_189_BANK gpio6 +#define OMAP_GPIO_190_BANK gpio6 +#define OMAP_GPIO_191_BANK gpio6 + +/* Only available on OMAP5 */ +#define OMAP_GPIO_192_BANK gpio7 +#define OMAP_GPIO_193_BANK gpio7 +#define OMAP_GPIO_194_BANK gpio7 +#define OMAP_GPIO_195_BANK gpio7 +#define OMAP_GPIO_196_BANK gpio7 +#define OMAP_GPIO_197_BANK gpio7 +#define OMAP_GPIO_198_BANK gpio7 +#define OMAP_GPIO_199_BANK gpio7 +#define OMAP_GPIO_200_BANK gpio7 +#define OMAP_GPIO_201_BANK gpio7 +#define OMAP_GPIO_202_BANK gpio7 +#define OMAP_GPIO_203_BANK gpio7 +#define OMAP_GPIO_204_BANK gpio7 +#define OMAP_GPIO_205_BANK gpio7 +#define OMAP_GPIO_206_BANK gpio7 +#define OMAP_GPIO_207_BANK gpio7 +#define OMAP_GPIO_208_BANK gpio7 +#define OMAP_GPIO_209_BANK gpio7 +#define OMAP_GPIO_210_BANK gpio7 +#define OMAP_GPIO_211_BANK gpio7 +#define OMAP_GPIO_212_BANK gpio7 +#define OMAP_GPIO_213_BANK gpio7 +#define OMAP_GPIO_214_BANK gpio7 +#define OMAP_GPIO_215_BANK gpio7 +#define OMAP_GPIO_216_BANK gpio7 +#define OMAP_GPIO_217_BANK gpio7 +#define OMAP_GPIO_218_BANK gpio7 +#define OMAP_GPIO_219_BANK gpio7 +#define OMAP_GPIO_220_BANK gpio7 +#define OMAP_GPIO_221_BANK gpio7 +#define OMAP_GPIO_222_BANK gpio7 +#define OMAP_GPIO_223_BANK gpio7 + +/* Only available on OMAP5 */ +#define OMAP_GPIO_224_BANK gpio8 +#define OMAP_GPIO_225_BANK gpio8 +#define OMAP_GPIO_226_BANK gpio8 +#define OMAP_GPIO_227_BANK gpio8 +#define OMAP_GPIO_228_BANK gpio8 +#define OMAP_GPIO_229_BANK gpio8 +#define OMAP_GPIO_230_BANK gpio8 +#define OMAP_GPIO_231_BANK gpio8 +#define OMAP_GPIO_232_BANK gpio8 +#define OMAP_GPIO_233_BANK gpio8 +#define OMAP_GPIO_234_BANK gpio8 +#define OMAP_GPIO_235_BANK gpio8 +#define OMAP_GPIO_236_BANK gpio8 +#define OMAP_GPIO_237_BANK gpio8 +#define OMAP_GPIO_238_BANK gpio8 +#define OMAP_GPIO_239_BANK gpio8 +#define OMAP_GPIO_240_BANK gpio8 +#define OMAP_GPIO_241_BANK gpio8 +#define OMAP_GPIO_242_BANK gpio8 +#define OMAP_GPIO_243_BANK gpio8 +#define OMAP_GPIO_244_BANK gpio8 +#define OMAP_GPIO_245_BANK gpio8 +#define OMAP_GPIO_246_BANK gpio8 +#define OMAP_GPIO_247_BANK gpio8 +#define OMAP_GPIO_248_BANK gpio8 +#define OMAP_GPIO_249_BANK gpio8 +#define OMAP_GPIO_250_BANK gpio8 +#define OMAP_GPIO_251_BANK gpio8 +#define OMAP_GPIO_252_BANK gpio8 +#define OMAP_GPIO_253_BANK gpio8 +#define OMAP_GPIO_254_BANK gpio8 +#define OMAP_GPIO_255_BANK gpio8 + + +#define _OMAP_GPIO_OFFSET(gpio) \ + (gpio & 0x1F) + + +/* Declare a reference to an OMAP GPIO */ +#define OMAP_GPIO(gpio, level) \ + <&OMAP_GPIO_##gpio##_BANK _OMAP_GPIO_OFFSET(gpio) level> + +#endif -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO 2013-05-22 14:27 ` [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO Florian Vaussard @ 2013-05-22 15:26 ` Stephen Warren 2013-05-22 15:34 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Stephen Warren @ 2013-05-22 15:26 UTC (permalink / raw) To: Florian Vaussard Cc: Benoit Cousson, Tony Lindgren, linux-omap, devicetree-discuss, linux-arm-kernel On 05/22/2013 08:27 AM, Florian Vaussard wrote: > Define the OMAP_GPIO macro to conveniently use GPIO inside OMAP DT. > For example: > > gpios = <&gpio6 3 0>; /* GPIO 163 */ > > can be replaced by > > gpios = OMAP_GPIO(163, 0); > diff --git a/include/dt-bindings/gpio/omap-gpio.h b/include/dt-bindings/gpio/omap-gpio.h > +#define OMAP_GPIO_0_BANK gpio1 > +#define OMAP_GPIO_1_BANK gpio1 > +#define OMAP_GPIO_2_BANK gpio1 > +#define OMAP_GPIO_3_BANK gpio1 There are a /lot/ of those. Is this really worth it? If the OMAP GPIO HW is already represented as a bunch of separate DT nodes which represent separate GPIO blocks, then I would have thought the syntax <&gpioN M 0> more directly represents what would be found in the HW manual? If not, surely the DT should have a single node to represent a single GPIO controller, which just happens to internally support a bunch of register arrays. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO 2013-05-22 15:26 ` Stephen Warren @ 2013-05-22 15:34 ` Tony Lindgren 2013-05-22 16:00 ` Florian Vaussard 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2013-05-22 15:34 UTC (permalink / raw) To: Stephen Warren Cc: Florian Vaussard, Benoit Cousson, linux-omap, devicetree-discuss, linux-arm-kernel * Stephen Warren <swarren@wwwdotorg.org> [130522 08:32]: > On 05/22/2013 08:27 AM, Florian Vaussard wrote: > > Define the OMAP_GPIO macro to conveniently use GPIO inside OMAP DT. > > For example: > > > > gpios = <&gpio6 3 0>; /* GPIO 163 */ > > > > can be replaced by > > > > gpios = OMAP_GPIO(163, 0); > > > diff --git a/include/dt-bindings/gpio/omap-gpio.h b/include/dt-bindings/gpio/omap-gpio.h > > > +#define OMAP_GPIO_0_BANK gpio1 > > +#define OMAP_GPIO_1_BANK gpio1 > > +#define OMAP_GPIO_2_BANK gpio1 > > +#define OMAP_GPIO_3_BANK gpio1 > > There are a /lot/ of those. Is this really worth it? > > If the OMAP GPIO HW is already represented as a bunch of separate DT > nodes which represent separate GPIO blocks, then I would have thought > the syntax <&gpioN M 0> more directly represents what would be found in > the HW manual? If not, surely the DT should have a single node to > represent a single GPIO controller, which just happens to internally > support a bunch of register arrays. Yes I agree, let's not go back to numbering anything except within the a single instance. If anything, we can put the gpio number into comments. Regards, Tony ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO 2013-05-22 15:34 ` Tony Lindgren @ 2013-05-22 16:00 ` Florian Vaussard 2013-05-22 16:03 ` Stephen Warren 0 siblings, 1 reply; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 16:00 UTC (permalink / raw) To: Tony Lindgren Cc: Stephen Warren, Benoit Cousson, linux-omap, devicetree-discuss, linux-arm-kernel Hello Stephan, Tony, Thank you for your reviews. On 05/22/2013 05:34 PM, Tony Lindgren wrote: > * Stephen Warren <swarren@wwwdotorg.org> [130522 08:32]: >> On 05/22/2013 08:27 AM, Florian Vaussard wrote: >>> Define the OMAP_GPIO macro to conveniently use GPIO inside OMAP DT. >>> For example: >>> >>> gpios = <&gpio6 3 0>; /* GPIO 163 */ >>> >>> can be replaced by >>> >>> gpios = OMAP_GPIO(163, 0); >> >>> diff --git a/include/dt-bindings/gpio/omap-gpio.h b/include/dt-bindings/gpio/omap-gpio.h >> >>> +#define OMAP_GPIO_0_BANK gpio1 >>> +#define OMAP_GPIO_1_BANK gpio1 >>> +#define OMAP_GPIO_2_BANK gpio1 >>> +#define OMAP_GPIO_3_BANK gpio1 >> >> There are a /lot/ of those. Is this really worth it? >> >> If the OMAP GPIO HW is already represented as a bunch of separate DT >> nodes which represent separate GPIO blocks, then I would have thought >> the syntax <&gpioN M 0> more directly represents what would be found in >> the HW manual? If not, surely the DT should have a single node to >> represent a single GPIO controller, which just happens to internally >> support a bunch of register arrays. > > Yes I agree, let's not go back to numbering anything except within the > a single instance. If anything, we can put the gpio number into comments. > From a board point a view, I consider this macro as being easier to use, than having to perform the necessary arithmetic to get the bank + offset for each GPIO when converting existing boards or developing new ones. But I also agree with you, and I was sad not to find a more elegant way. Maybe someone with better preprocessor skills could come up with a better solution? Regards, Florian ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO 2013-05-22 16:00 ` Florian Vaussard @ 2013-05-22 16:03 ` Stephen Warren 0 siblings, 0 replies; 15+ messages in thread From: Stephen Warren @ 2013-05-22 16:03 UTC (permalink / raw) To: florian.vaussard Cc: Tony Lindgren, Benoit Cousson, linux-omap, devicetree-discuss, linux-arm-kernel On 05/22/2013 10:00 AM, Florian Vaussard wrote: > Hello Stephan, Tony, > > Thank you for your reviews. > > On 05/22/2013 05:34 PM, Tony Lindgren wrote: >> * Stephen Warren <swarren@wwwdotorg.org> [130522 08:32]: >>> On 05/22/2013 08:27 AM, Florian Vaussard wrote: >>>> Define the OMAP_GPIO macro to conveniently use GPIO inside OMAP DT. >>>> For example: >>>> >>>> gpios = <&gpio6 3 0>; /* GPIO 163 */ >>>> >>>> can be replaced by >>>> >>>> gpios = OMAP_GPIO(163, 0); >>> >>>> diff --git a/include/dt-bindings/gpio/omap-gpio.h >>>> b/include/dt-bindings/gpio/omap-gpio.h >>> >>>> +#define OMAP_GPIO_0_BANK gpio1 >>>> +#define OMAP_GPIO_1_BANK gpio1 >>>> +#define OMAP_GPIO_2_BANK gpio1 >>>> +#define OMAP_GPIO_3_BANK gpio1 >>> >>> There are a /lot/ of those. Is this really worth it? ... > From a board point a view, I consider this macro as being easier to use, > than having to perform the necessary arithmetic to get the bank + offset > for each GPIO when converting existing boards or developing new ones. > > But I also agree with you, and I was sad not to find a more elegant > way. Maybe someone with better preprocessor skills could come up with > a better solution? I did a quick bit of searching before, and while cpp is certainly capable of doing the shifting/masking required to calculate the bank ID directly, I don't think it's capable of constructing the symbol gpio1 as opposed to the string "gpio1":-( I'd love to be proven wrong though, but the torture e.g. cpp "99 bottles of beer on the wall" goes through to stuff implies it isn't possible. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro 2013-05-22 14:27 [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees Florian Vaussard 2013-05-22 14:27 ` [PATCH 1/5] ARM: dts: OMAP2+: use #include for all " Florian Vaussard 2013-05-22 14:27 ` [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO Florian Vaussard @ 2013-05-22 14:27 ` Florian Vaussard 2013-05-22 15:28 ` Stephen Warren 2013-05-22 14:27 ` [PATCH 4/5] ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt Florian Vaussard 2013-05-22 14:27 ` [PATCH 5/5] ARM: dts: OMAP4/5: use existing constants for IRQs Florian Vaussard 4 siblings, 1 reply; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 14:27 UTC (permalink / raw) To: Benoit Cousson Cc: Tony Lindgren, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel, Florian Vaussard Use OMAP_GPIO(), in conjunction with standard GPIO flags, to enhance the readability of DT GPIOs. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> --- arch/arm/boot/dts/omap2.dtsi | 2 ++ arch/arm/boot/dts/omap3-beagle-xm.dts | 4 ++-- arch/arm/boot/dts/omap3-beagle.dts | 6 +++--- arch/arm/boot/dts/omap3-devkit8000.dts | 6 +++--- arch/arm/boot/dts/omap3-igep0020.dts | 6 +++--- arch/arm/boot/dts/omap3-igep0030.dts | 2 +- arch/arm/boot/dts/omap3-tobi.dts | 2 +- arch/arm/boot/dts/omap3.dtsi | 2 ++ arch/arm/boot/dts/omap4-panda-common.dtsi | 6 +++--- arch/arm/boot/dts/omap4-sdp.dts | 20 ++++++++++---------- arch/arm/boot/dts/omap4.dtsi | 2 ++ arch/arm/boot/dts/omap5.dtsi | 2 ++ 12 files changed, 34 insertions(+), 26 deletions(-) diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi index e6e4587..7ea5df4 100644 --- a/arch/arm/boot/dts/omap2.dtsi +++ b/arch/arm/boot/dts/omap2.dtsi @@ -8,6 +8,8 @@ * kind, whether express or implied. */ +#include <dt-bindings/gpio/omap-gpio.h> + #include "skeleton.dtsi" / { diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index e0ce823..e773a5e 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts @@ -29,13 +29,13 @@ heartbeat { label = "beagleboard::usr0"; - gpios = <&gpio5 22 0>; /* 150 -> D6 LED */ + gpios = OMAP_GPIO(150, GPIO_ACTIVE_HIGH); /* 150 -> D6 LED */ linux,default-trigger = "heartbeat"; }; mmc { label = "beagleboard::usr1"; - gpios = <&gpio5 21 0>; /* 149 -> D7 LED */ + gpios = OMAP_GPIO(149, GPIO_ACTIVE_HIGH); /* 149 -> D7 LED */ linux,default-trigger = "mmc0"; }; }; diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index fcac96a..f1fd002 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts @@ -33,13 +33,13 @@ heartbeat { label = "beagleboard::usr0"; - gpios = <&gpio5 22 0>; /* 150 -> D6 LED */ + gpios = OMAP_GPIO(150, GPIO_ACTIVE_HIGH); /* 150 -> D6 LED */ linux,default-trigger = "heartbeat"; }; mmc { label = "beagleboard::usr1"; - gpios = <&gpio5 21 0>; /* 149 -> D7 LED */ + gpios = OMAP_GPIO(149, GPIO_ACTIVE_HIGH); /* 149 -> D7 LED */ linux,default-trigger = "mmc0"; }; }; @@ -50,7 +50,7 @@ regulator-name = "hsusb2_reset"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&gpio5 19 0>; /* gpio_147 */ + gpio = OMAP_GPIO(147, GPIO_ACTIVE_HIGH); startup-delay-us = <70000>; enable-active-high; }; diff --git a/arch/arm/boot/dts/omap3-devkit8000.dts b/arch/arm/boot/dts/omap3-devkit8000.dts index 8d0f5e4..fecb5ac 100644 --- a/arch/arm/boot/dts/omap3-devkit8000.dts +++ b/arch/arm/boot/dts/omap3-devkit8000.dts @@ -22,21 +22,21 @@ heartbeat { label = "devkit8000::led1"; - gpios = <&gpio6 26 0>; /* 186 -> LED1 */ + gpios = OMAP_GPIO(186, GPIO_ACTIVE_HIGH); /* 186 -> LED1 */ default-state = "on"; linux,default-trigger = "heartbeat"; }; mmc { label = "devkit8000::led2"; - gpios = <&gpio6 3 0>; /* 163 -> LED2 */ + gpios = OMAP_GPIO(163, GPIO_ACTIVE_HIGH); /* 163 -> LED2 */ default-state = "on"; linux,default-trigger = "none"; }; usr { label = "devkit8000::led3"; - gpios = <&gpio6 4 0>; /* 164 -> LED3 */ + gpios = OMAP_GPIO(164, GPIO_ACTIVE_HIGH); /* 164 -> LED3 */ default-state = "on"; linux,default-trigger = "usr"; }; diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index 2f96a5c..4be8ba1 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts @@ -19,19 +19,19 @@ compatible = "gpio-leds"; boot { label = "omap3:green:boot"; - gpios = <&gpio1 26 0>; + gpios = OMAP_GPIO(26, GPIO_ACTIVE_HIGH); default-state = "on"; }; user0 { label = "omap3:red:user0"; - gpios = <&gpio1 27 0>; + gpios = OMAP_GPIO(27, GPIO_ACTIVE_HIGH); default-state = "off"; }; user1 { label = "omap3:red:user1"; - gpios = <&gpio1 28 0>; + gpios = OMAP_GPIO(28, GPIO_ACTIVE_HIGH); default-state = "off"; }; diff --git a/arch/arm/boot/dts/omap3-igep0030.dts b/arch/arm/boot/dts/omap3-igep0030.dts index f3a1bf0..5a2c7a6 100644 --- a/arch/arm/boot/dts/omap3-igep0030.dts +++ b/arch/arm/boot/dts/omap3-igep0030.dts @@ -37,7 +37,7 @@ user2 { label = "omap3:red:user1"; - gpios = <&gpio1 16 1>; + gpios = OMAP_GPIO(16, GPIO_ACTIVE_LOW); default-state = "off"; }; }; diff --git a/arch/arm/boot/dts/omap3-tobi.dts b/arch/arm/boot/dts/omap3-tobi.dts index 5df894f..8390c8b 100644 --- a/arch/arm/boot/dts/omap3-tobi.dts +++ b/arch/arm/boot/dts/omap3-tobi.dts @@ -20,7 +20,7 @@ compatible = "gpio-leds"; heartbeat { label = "overo:red:gpio21"; - gpios = <&gpio1 21 0>; + gpios = OMAP_GPIO(21, GPIO_ACTIVE_HIGH); linux,default-trigger = "heartbeat"; }; }; diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 7c7d494..15049b8 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -8,6 +8,8 @@ * kind, whether express or implied. */ +#include <dt-bindings/gpio/omap-gpio.h> + #include "skeleton.dtsi" / { diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 63148d1..b71f5cd 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi @@ -20,13 +20,13 @@ compatible = "gpio-leds"; heartbeat { label = "pandaboard::status1"; - gpios = <&gpio1 7 0>; + gpios = OMAP_GPIO(7, GPIO_ACTIVE_HIGH); linux,default-trigger = "heartbeat"; }; mmc { label = "pandaboard::status2"; - gpios = <&gpio1 8 0>; + gpios = OMAP_GPIO(8, GPIO_ACTIVE_HIGH); linux,default-trigger = "mmc0"; }; }; @@ -156,7 +156,7 @@ /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */ interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */ interrupt-parent = <&gic>; - ti,audpwron-gpio = <&gpio4 31 0>; /* gpio line 127 */ + ti,audpwron-gpio = OMAP_GPIO(127, GPIO_ACTIVE_HIGH); vio-supply = <&v1v8>; v2v1-supply = <&v2v1>; diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 5edd08e..f55bb68 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -24,7 +24,7 @@ regulator-name = "VDD_ETH"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&gpio2 16 0>; /* gpio line 48 */ + gpio = OMAP_GPIO(48, GPIO_ACTIVE_HIGH); enable-active-high; regulator-boot-on; }; @@ -41,42 +41,42 @@ compatible = "gpio-leds"; debug0 { label = "omap4:green:debug0"; - gpios = <&gpio2 29 0>; /* 61 */ + gpios = OMAP_GPIO(61, GPIO_ACTIVE_HIGH); }; debug1 { label = "omap4:green:debug1"; - gpios = <&gpio1 30 0>; /* 30 */ + gpios = OMAP_GPIO(30, GPIO_ACTIVE_HIGH); }; debug2 { label = "omap4:green:debug2"; - gpios = <&gpio1 7 0>; /* 7 */ + gpios = OMAP_GPIO(7, GPIO_ACTIVE_HIGH); }; debug3 { label = "omap4:green:debug3"; - gpios = <&gpio1 8 0>; /* 8 */ + gpios = OMAP_GPIO(8, GPIO_ACTIVE_HIGH); }; debug4 { label = "omap4:green:debug4"; - gpios = <&gpio2 18 0>; /* 50 */ + gpios = OMAP_GPIO(50, GPIO_ACTIVE_HIGH); }; user1 { label = "omap4:blue:user"; - gpios = <&gpio6 9 0>; /* 169 */ + gpios = OMAP_GPIO(169, GPIO_ACTIVE_HIGH); }; user2 { label = "omap4:red:user"; - gpios = <&gpio6 10 0>; /* 170 */ + gpios = OMAP_GPIO(170, GPIO_ACTIVE_HIGH); }; user3 { label = "omap4:green:user"; - gpios = <&gpio5 11 0>; /* 139 */ + gpios = OMAP_GPIO(139, GPIO_ACTIVE_HIGH); }; }; @@ -296,7 +296,7 @@ /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */ interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */ interrupt-parent = <&gic>; - ti,audpwron-gpio = <&gpio4 31 0>; /* gpio line 127 */ + ti,audpwron-gpio = OMAP_GPIO(127, GPIO_ACTIVE_HIGH); vio-supply = <&v1v8>; v2v1-supply = <&v2v1>; diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 53d80aa..3c00b72 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -14,6 +14,8 @@ */ /memreserve/ 0x9d000000 0x03000000; +#include <dt-bindings/gpio/omap-gpio.h> + #include "skeleton.dtsi" / { diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index e8e6653..af849e6 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi @@ -15,6 +15,8 @@ */ /memreserve/ 0x9d000000 0x03000000; +#include <dt-bindings/gpio/omap-gpio.h> + #include "skeleton.dtsi" / { -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro 2013-05-22 14:27 ` [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro Florian Vaussard @ 2013-05-22 15:28 ` Stephen Warren 2013-05-22 16:02 ` Florian Vaussard 0 siblings, 1 reply; 15+ messages in thread From: Stephen Warren @ 2013-05-22 15:28 UTC (permalink / raw) To: Florian Vaussard Cc: Benoit Cousson, Tony Lindgren, linux-omap, devicetree-discuss, linux-arm-kernel On 05/22/2013 08:27 AM, Florian Vaussard wrote: > Use OMAP_GPIO(), in conjunction with standard GPIO flags, to enhance the > readability of DT GPIOs. > diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts > index e0ce823..e773a5e 100644 > --- a/arch/arm/boot/dts/omap3-beagle-xm.dts > +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts > @@ -29,13 +29,13 @@ > > heartbeat { > label = "beagleboard::usr0"; > - gpios = <&gpio5 22 0>; /* 150 -> D6 LED */ > + gpios = OMAP_GPIO(150, GPIO_ACTIVE_HIGH); /* 150 -> D6 LED */ One of the advantages of cpp support for me is the ability to remove the redundant part of the command. In other words, perhaps remove the "150 ->" since that information is part of the OMAP_GPIO() "call", leaving just /* D6 LED */. I might have expected "D6" to be the label too, thus removing any need for the comment. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro 2013-05-22 15:28 ` Stephen Warren @ 2013-05-22 16:02 ` Florian Vaussard 0 siblings, 0 replies; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 16:02 UTC (permalink / raw) To: Stephen Warren Cc: Benoit Cousson, Tony Lindgren, linux-omap, devicetree-discuss, linux-arm-kernel Hi Stepen, Thank you for your review, On 05/22/2013 05:28 PM, Stephen Warren wrote: > On 05/22/2013 08:27 AM, Florian Vaussard wrote: >> Use OMAP_GPIO(), in conjunction with standard GPIO flags, to enhance the >> readability of DT GPIOs. > >> diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts >> index e0ce823..e773a5e 100644 >> --- a/arch/arm/boot/dts/omap3-beagle-xm.dts >> +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts >> @@ -29,13 +29,13 @@ >> >> heartbeat { >> label = "beagleboard::usr0"; >> - gpios = <&gpio5 22 0>; /* 150 -> D6 LED */ >> + gpios = OMAP_GPIO(150, GPIO_ACTIVE_HIGH); /* 150 -> D6 LED */ > > One of the advantages of cpp support for me is the ability to remove the > redundant part of the command. In other words, perhaps remove the "150 > ->" since that information is part of the OMAP_GPIO() "call", leaving > just /* D6 LED */. I might have expected "D6" to be the label too, thus > removing any need for the comment. > I agree. I removed almost all the comments from the other files. For here, I would leave /* D6 LED */ as you suggest. Regards, Florian ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 4/5] ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt 2013-05-22 14:27 [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees Florian Vaussard ` (2 preceding siblings ...) 2013-05-22 14:27 ` [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro Florian Vaussard @ 2013-05-22 14:27 ` Florian Vaussard 2013-05-22 15:35 ` Tony Lindgren 2013-05-22 14:27 ` [PATCH 5/5] ARM: dts: OMAP4/5: use existing constants for IRQs Florian Vaussard 4 siblings, 1 reply; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 14:27 UTC (permalink / raw) To: Benoit Cousson Cc: Tony Lindgren, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel, Florian Vaussard On OMAP3, the INTC interrupt controller has only 1 cell. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> --- arch/arm/boot/dts/omap3.dtsi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 15049b8..0f3be20 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -518,7 +518,7 @@ usb_otg_hs: usb_otg_hs@480ab000 { compatible = "ti,omap3-musb"; reg = <0x480ab000 0x1000>; - interrupts = <0 92 0x4>, <0 93 0x4>; + interrupts = <92>, <93>; interrupt-names = "mc", "dma"; ti,hwmods = "usb_otg_hs"; multipoint = <1>; -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt 2013-05-22 14:27 ` [PATCH 4/5] ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt Florian Vaussard @ 2013-05-22 15:35 ` Tony Lindgren 0 siblings, 0 replies; 15+ messages in thread From: Tony Lindgren @ 2013-05-22 15:35 UTC (permalink / raw) To: Florian Vaussard Cc: Benoit Cousson, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel * Florian Vaussard <florian.vaussard@epfl.ch> [130522 07:33]: > On OMAP3, the INTC interrupt controller has only 1 cell. > > Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Thanks a similar fix is already queued up and on it's way to mainline tree. Regards, Tony > --- > arch/arm/boot/dts/omap3.dtsi | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi > index 15049b8..0f3be20 100644 > --- a/arch/arm/boot/dts/omap3.dtsi > +++ b/arch/arm/boot/dts/omap3.dtsi > @@ -518,7 +518,7 @@ > usb_otg_hs: usb_otg_hs@480ab000 { > compatible = "ti,omap3-musb"; > reg = <0x480ab000 0x1000>; > - interrupts = <0 92 0x4>, <0 93 0x4>; > + interrupts = <92>, <93>; > interrupt-names = "mc", "dma"; > ti,hwmods = "usb_otg_hs"; > multipoint = <1>; > -- > 1.7.5.4 > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 5/5] ARM: dts: OMAP4/5: use existing constants for IRQs 2013-05-22 14:27 [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees Florian Vaussard ` (3 preceding siblings ...) 2013-05-22 14:27 ` [PATCH 4/5] ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt Florian Vaussard @ 2013-05-22 14:27 ` Florian Vaussard 4 siblings, 0 replies; 15+ messages in thread From: Florian Vaussard @ 2013-05-22 14:27 UTC (permalink / raw) To: Benoit Cousson Cc: Tony Lindgren, Stephen Warren, linux-omap, devicetree-discuss, linux-arm-kernel, Florian Vaussard Use the constants defined in include/dt-bindings/interrupt-controller/ to enhance readability. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> --- arch/arm/boot/dts/omap4-panda-common.dtsi | 8 +- arch/arm/boot/dts/omap4-sdp.dts | 6 +- arch/arm/boot/dts/omap4-var-som.dts | 4 +- arch/arm/boot/dts/omap4.dtsi | 113 ++++++++++++++------------- arch/arm/boot/dts/omap4460.dtsi | 4 +- arch/arm/boot/dts/omap5.dtsi | 121 +++++++++++++++-------------- 6 files changed, 129 insertions(+), 127 deletions(-) diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index b71f5cd..c2354c9 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi @@ -145,16 +145,16 @@ twl: twl@48 { reg = <0x48>; - /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ - interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ + /* IRQ# = 7 */ + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */ interrupt-parent = <&gic>; }; twl6040: twl@4b { compatible = "ti,twl6040"; reg = <0x4b>; - /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */ - interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */ + /* IRQ# = 119 */ + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */ interrupt-parent = <&gic>; ti,audpwron-gpio = OMAP_GPIO(127, GPIO_ACTIVE_HIGH); diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index f55bb68..3ce4987 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -286,7 +286,7 @@ twl: twl@48 { reg = <0x48>; /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ - interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */ interrupt-parent = <&gic>; }; @@ -294,7 +294,7 @@ compatible = "ti,twl6040"; reg = <0x4b>; /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */ - interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */ + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */ interrupt-parent = <&gic>; ti,audpwron-gpio = OMAP_GPIO(127, GPIO_ACTIVE_HIGH); @@ -375,7 +375,7 @@ spi-max-frequency = <24000000>; reg = <0>; interrupt-parent = <&gpio2>; - interrupts = <2 8>; /* gpio line 34, low triggered */ + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; /* gpio line 34, low triggered */ vdd-supply = <&vdd_eth>; }; }; diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts index 6593607..135ba45 100644 --- a/arch/arm/boot/dts/omap4-var-som.dts +++ b/arch/arm/boot/dts/omap4-var-som.dts @@ -34,7 +34,7 @@ twl: twl@48 { reg = <0x48>; /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ - interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */ interrupt-parent = <&gic>; }; }; @@ -68,7 +68,7 @@ spi-max-frequency = <24000000>; reg = <0>; interrupt-parent = <&gpio6>; - interrupts = <11 8>; /* gpio line 171, low triggered */ + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio line 171, low triggered */ vdd-supply = <&vdd_eth>; }; }; diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 3c00b72..d1037ac 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -15,6 +15,7 @@ /memreserve/ 0x9d000000 0x03000000; #include <dt-bindings/gpio/omap-gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> #include "skeleton.dtsi" @@ -58,7 +59,7 @@ local-timer@0x48240600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x48240600 0x20>; - interrupts = <1 13 0x304>; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>; }; /* @@ -99,8 +100,8 @@ reg = <0x44000000 0x1000>, <0x44800000 0x2000>, <0x45000000 0x1000>; - interrupts = <0 9 0x4>, - <0 10 0x4>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; counter32k: counter@4a304000 { compatible = "ti,omap-counter32k"; @@ -128,10 +129,10 @@ sdma: dma-controller@4a056000 { compatible = "ti,omap4430-sdma"; reg = <0x4a056000 0x1000>; - interrupts = <0 12 0x4>, - <0 13 0x4>, - <0 14 0x4>, - <0 15 0x4>; + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; #dma-cells = <1>; #dma-channels = <32>; #dma-requests = <127>; @@ -140,7 +141,7 @@ gpio1: gpio@4a310000 { compatible = "ti,omap4-gpio"; reg = <0x4a310000 0x200>; - interrupts = <0 29 0x4>; + interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio1"; ti,gpio-always-on; gpio-controller; @@ -152,7 +153,7 @@ gpio2: gpio@48055000 { compatible = "ti,omap4-gpio"; reg = <0x48055000 0x200>; - interrupts = <0 30 0x4>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio2"; gpio-controller; #gpio-cells = <2>; @@ -163,7 +164,7 @@ gpio3: gpio@48057000 { compatible = "ti,omap4-gpio"; reg = <0x48057000 0x200>; - interrupts = <0 31 0x4>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio3"; gpio-controller; #gpio-cells = <2>; @@ -174,7 +175,7 @@ gpio4: gpio@48059000 { compatible = "ti,omap4-gpio"; reg = <0x48059000 0x200>; - interrupts = <0 32 0x4>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio4"; gpio-controller; #gpio-cells = <2>; @@ -185,7 +186,7 @@ gpio5: gpio@4805b000 { compatible = "ti,omap4-gpio"; reg = <0x4805b000 0x200>; - interrupts = <0 33 0x4>; + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio5"; gpio-controller; #gpio-cells = <2>; @@ -196,7 +197,7 @@ gpio6: gpio@4805d000 { compatible = "ti,omap4-gpio"; reg = <0x4805d000 0x200>; - interrupts = <0 34 0x4>; + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio6"; gpio-controller; #gpio-cells = <2>; @@ -209,7 +210,7 @@ reg = <0x50000000 0x1000>; #address-cells = <2>; #size-cells = <1>; - interrupts = <0 20 0x4>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; @@ -218,7 +219,7 @@ uart1: serial@4806a000 { compatible = "ti,omap4-uart"; reg = <0x4806a000 0x100>; - interrupts = <0 72 0x4>; + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart1"; clock-frequency = <48000000>; }; @@ -226,7 +227,7 @@ uart2: serial@4806c000 { compatible = "ti,omap4-uart"; reg = <0x4806c000 0x100>; - interrupts = <0 73 0x4>; + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart2"; clock-frequency = <48000000>; }; @@ -234,7 +235,7 @@ uart3: serial@48020000 { compatible = "ti,omap4-uart"; reg = <0x48020000 0x100>; - interrupts = <0 74 0x4>; + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart3"; clock-frequency = <48000000>; }; @@ -242,7 +243,7 @@ uart4: serial@4806e000 { compatible = "ti,omap4-uart"; reg = <0x4806e000 0x100>; - interrupts = <0 70 0x4>; + interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart4"; clock-frequency = <48000000>; }; @@ -250,7 +251,7 @@ i2c1: i2c@48070000 { compatible = "ti,omap4-i2c"; reg = <0x48070000 0x100>; - interrupts = <0 56 0x4>; + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c1"; @@ -259,7 +260,7 @@ i2c2: i2c@48072000 { compatible = "ti,omap4-i2c"; reg = <0x48072000 0x100>; - interrupts = <0 57 0x4>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c2"; @@ -268,7 +269,7 @@ i2c3: i2c@48060000 { compatible = "ti,omap4-i2c"; reg = <0x48060000 0x100>; - interrupts = <0 61 0x4>; + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c3"; @@ -277,7 +278,7 @@ i2c4: i2c@48350000 { compatible = "ti,omap4-i2c"; reg = <0x48350000 0x100>; - interrupts = <0 62 0x4>; + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c4"; @@ -286,7 +287,7 @@ mcspi1: spi@48098000 { compatible = "ti,omap4-mcspi"; reg = <0x48098000 0x200>; - interrupts = <0 65 0x4>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi1"; @@ -306,7 +307,7 @@ mcspi2: spi@4809a000 { compatible = "ti,omap4-mcspi"; reg = <0x4809a000 0x200>; - interrupts = <0 66 0x4>; + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi2"; @@ -321,7 +322,7 @@ mcspi3: spi@480b8000 { compatible = "ti,omap4-mcspi"; reg = <0x480b8000 0x200>; - interrupts = <0 91 0x4>; + interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi3"; @@ -333,7 +334,7 @@ mcspi4: spi@480ba000 { compatible = "ti,omap4-mcspi"; reg = <0x480ba000 0x200>; - interrupts = <0 48 0x4>; + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi4"; @@ -345,7 +346,7 @@ mmc1: mmc@4809c000 { compatible = "ti,omap4-hsmmc"; reg = <0x4809c000 0x400>; - interrupts = <0 83 0x4>; + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc1"; ti,dual-volt; ti,needs-special-reset; @@ -356,7 +357,7 @@ mmc2: mmc@480b4000 { compatible = "ti,omap4-hsmmc"; reg = <0x480b4000 0x400>; - interrupts = <0 86 0x4>; + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc2"; ti,needs-special-reset; dmas = <&sdma 47>, <&sdma 48>; @@ -366,7 +367,7 @@ mmc3: mmc@480ad000 { compatible = "ti,omap4-hsmmc"; reg = <0x480ad000 0x400>; - interrupts = <0 94 0x4>; + interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc3"; ti,needs-special-reset; dmas = <&sdma 77>, <&sdma 78>; @@ -376,7 +377,7 @@ mmc4: mmc@480d1000 { compatible = "ti,omap4-hsmmc"; reg = <0x480d1000 0x400>; - interrupts = <0 96 0x4>; + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc4"; ti,needs-special-reset; dmas = <&sdma 57>, <&sdma 58>; @@ -386,7 +387,7 @@ mmc5: mmc@480d5000 { compatible = "ti,omap4-hsmmc"; reg = <0x480d5000 0x400>; - interrupts = <0 59 0x4>; + interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc5"; ti,needs-special-reset; dmas = <&sdma 59>, <&sdma 60>; @@ -396,7 +397,7 @@ wdt2: wdt@4a314000 { compatible = "ti,omap4-wdt", "ti,omap3-wdt"; reg = <0x4a314000 0x80>; - interrupts = <0 80 0x4>; + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "wd_timer2"; }; @@ -405,7 +406,7 @@ reg = <0x40132000 0x7f>, /* MPU private access */ <0x49032000 0x7f>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 112 0x4>; + interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mcpdm"; dmas = <&sdma 65>, <&sdma 66>; @@ -417,7 +418,7 @@ reg = <0x4012e000 0x7f>, /* MPU private access */ <0x4902e000 0x7f>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 114 0x4>; + interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "dmic"; dmas = <&sdma 67>; dma-names = "up_link"; @@ -428,7 +429,7 @@ reg = <0x40122000 0xff>, /* MPU private access */ <0x49022000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 17 0x4>; + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp1"; @@ -442,7 +443,7 @@ reg = <0x40124000 0xff>, /* MPU private access */ <0x49024000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 22 0x4>; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp2"; @@ -456,7 +457,7 @@ reg = <0x40126000 0xff>, /* MPU private access */ <0x49026000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 23 0x4>; + interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp3"; @@ -469,7 +470,7 @@ compatible = "ti,omap4-mcbsp"; reg = <0x48096000 0xff>; /* L4 Interconnect */ reg-names = "mpu"; - interrupts = <0 16 0x4>; + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp4"; @@ -481,7 +482,7 @@ keypad: keypad@4a31c000 { compatible = "ti,omap4-keypad"; reg = <0x4a31c000 0x80>; - interrupts = <0 120 0x4>; + interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; reg-names = "mpu"; ti,hwmods = "kbd"; }; @@ -489,7 +490,7 @@ emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>; - interrupts = <0 110 0x4>; + interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif1"; phy-type = <1>; hw-caps-read-idle-ctrl; @@ -500,7 +501,7 @@ emif2: emif@4d000000 { compatible = "ti,emif-4d"; reg = <0x4d000000 0x100>; - interrupts = <0 111 0x4>; + interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "emif2"; phy-type = <1>; hw-caps-read-idle-ctrl; @@ -525,7 +526,7 @@ timer1: timer@4a318000 { compatible = "ti,omap3430-timer"; reg = <0x4a318000 0x80>; - interrupts = <0 37 0x4>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer1"; ti,timer-alwon; }; @@ -533,21 +534,21 @@ timer2: timer@48032000 { compatible = "ti,omap3430-timer"; reg = <0x48032000 0x80>; - interrupts = <0 38 0x4>; + interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer2"; }; timer3: timer@48034000 { compatible = "ti,omap4430-timer"; reg = <0x48034000 0x80>; - interrupts = <0 39 0x4>; + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer3"; }; timer4: timer@48036000 { compatible = "ti,omap4430-timer"; reg = <0x48036000 0x80>; - interrupts = <0 40 0x4>; + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer4"; }; @@ -555,7 +556,7 @@ compatible = "ti,omap4430-timer"; reg = <0x40138000 0x80>, <0x49038000 0x80>; - interrupts = <0 41 0x4>; + interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer5"; ti,timer-dsp; }; @@ -564,7 +565,7 @@ compatible = "ti,omap4430-timer"; reg = <0x4013a000 0x80>, <0x4903a000 0x80>; - interrupts = <0 42 0x4>; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer6"; ti,timer-dsp; }; @@ -573,7 +574,7 @@ compatible = "ti,omap4430-timer"; reg = <0x4013c000 0x80>, <0x4903c000 0x80>; - interrupts = <0 43 0x4>; + interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer7"; ti,timer-dsp; }; @@ -582,7 +583,7 @@ compatible = "ti,omap4430-timer"; reg = <0x4013e000 0x80>, <0x4903e000 0x80>; - interrupts = <0 44 0x4>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer8"; ti,timer-pwm; ti,timer-dsp; @@ -591,7 +592,7 @@ timer9: timer@4803e000 { compatible = "ti,omap4430-timer"; reg = <0x4803e000 0x80>; - interrupts = <0 45 0x4>; + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer9"; ti,timer-pwm; }; @@ -599,7 +600,7 @@ timer10: timer@48086000 { compatible = "ti,omap3430-timer"; reg = <0x48086000 0x80>; - interrupts = <0 46 0x4>; + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer10"; ti,timer-pwm; }; @@ -607,7 +608,7 @@ timer11: timer@48088000 { compatible = "ti,omap4430-timer"; reg = <0x48088000 0x80>; - interrupts = <0 47 0x4>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer11"; ti,timer-pwm; }; @@ -615,7 +616,7 @@ usbhstll: usbhstll@4a062000 { compatible = "ti,usbhs-tll"; reg = <0x4a062000 0x1000>; - interrupts = <0 78 0x4>; + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "usb_tll_hs"; }; @@ -631,14 +632,14 @@ compatible = "ti,ohci-omap3", "usb-ohci"; reg = <0x4a064800 0x400>; interrupt-parent = <&gic>; - interrupts = <0 76 0x4>; + interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; }; usbhsehci: ehci@4a064c00 { compatible = "ti,ehci-omap", "usb-ehci"; reg = <0x4a064c00 0x400>; interrupt-parent = <&gic>; - interrupts = <0 77 0x4>; + interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; }; }; @@ -653,7 +654,7 @@ usb_otg_hs: usb_otg_hs@4a0ab000 { compatible = "ti,omap4-musb"; reg = <0x4a0ab000 0x7ff>; - interrupts = <0 92 0x4>, <0 93 0x4>; + interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "mc", "dma"; ti,hwmods = "usb_otg_hs"; usb-phy = <&usb2_phy>; diff --git a/arch/arm/boot/dts/omap4460.dtsi b/arch/arm/boot/dts/omap4460.dtsi index 41762c2..19628b1 100644 --- a/arch/arm/boot/dts/omap4460.dtsi +++ b/arch/arm/boot/dts/omap4460.dtsi @@ -25,8 +25,8 @@ pmu { compatible = "arm,cortex-a9-pmu"; - interrupts = <0 54 0x4>, - <0 55 0x4>; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "debugss"; }; }; diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index af849e6..cbdaa3c 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi @@ -16,6 +16,7 @@ /memreserve/ 0x9d000000 0x03000000; #include <dt-bindings/gpio/omap-gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> #include "skeleton.dtsi" @@ -47,10 +48,10 @@ timer { compatible = "arm,armv7-timer"; /* PPI secure/nonsecure IRQ, active low level-sensitive */ - interrupts = <1 13 0x308>, - <1 14 0x308>, - <1 11 0x308>, - <1 10 0x308>; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>; clock-frequency = <6144000>; }; @@ -92,8 +93,8 @@ reg = <0x44000000 0x2000>, <0x44800000 0x3000>, <0x45000000 0x4000>; - interrupts = <0 9 0x4>, - <0 10 0x4>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; counter32k: counter@4ae04000 { compatible = "ti,omap-counter32k"; @@ -121,10 +122,10 @@ sdma: dma-controller@4a056000 { compatible = "ti,omap4430-sdma"; reg = <0x4a056000 0x1000>; - interrupts = <0 12 0x4>, - <0 13 0x4>, - <0 14 0x4>, - <0 15 0x4>; + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; #dma-cells = <1>; #dma-channels = <32>; #dma-requests = <127>; @@ -133,7 +134,7 @@ gpio1: gpio@4ae10000 { compatible = "ti,omap4-gpio"; reg = <0x4ae10000 0x200>; - interrupts = <0 29 0x4>; + interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio1"; ti,gpio-always-on; gpio-controller; @@ -145,7 +146,7 @@ gpio2: gpio@48055000 { compatible = "ti,omap4-gpio"; reg = <0x48055000 0x200>; - interrupts = <0 30 0x4>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio2"; gpio-controller; #gpio-cells = <2>; @@ -156,7 +157,7 @@ gpio3: gpio@48057000 { compatible = "ti,omap4-gpio"; reg = <0x48057000 0x200>; - interrupts = <0 31 0x4>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio3"; gpio-controller; #gpio-cells = <2>; @@ -167,7 +168,7 @@ gpio4: gpio@48059000 { compatible = "ti,omap4-gpio"; reg = <0x48059000 0x200>; - interrupts = <0 32 0x4>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio4"; gpio-controller; #gpio-cells = <2>; @@ -178,7 +179,7 @@ gpio5: gpio@4805b000 { compatible = "ti,omap4-gpio"; reg = <0x4805b000 0x200>; - interrupts = <0 33 0x4>; + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio5"; gpio-controller; #gpio-cells = <2>; @@ -189,7 +190,7 @@ gpio6: gpio@4805d000 { compatible = "ti,omap4-gpio"; reg = <0x4805d000 0x200>; - interrupts = <0 34 0x4>; + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio6"; gpio-controller; #gpio-cells = <2>; @@ -200,7 +201,7 @@ gpio7: gpio@48051000 { compatible = "ti,omap4-gpio"; reg = <0x48051000 0x200>; - interrupts = <0 35 0x4>; + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio7"; gpio-controller; #gpio-cells = <2>; @@ -211,7 +212,7 @@ gpio8: gpio@48053000 { compatible = "ti,omap4-gpio"; reg = <0x48053000 0x200>; - interrupts = <0 121 0x4>; + interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "gpio8"; gpio-controller; #gpio-cells = <2>; @@ -224,7 +225,7 @@ reg = <0x50000000 0x1000>; #address-cells = <2>; #size-cells = <1>; - interrupts = <0 20 0x4>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; gpmc,num-cs = <8>; gpmc,num-waitpins = <4>; ti,hwmods = "gpmc"; @@ -233,7 +234,7 @@ i2c1: i2c@48070000 { compatible = "ti,omap4-i2c"; reg = <0x48070000 0x100>; - interrupts = <0 56 0x4>; + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c1"; @@ -242,7 +243,7 @@ i2c2: i2c@48072000 { compatible = "ti,omap4-i2c"; reg = <0x48072000 0x100>; - interrupts = <0 57 0x4>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c2"; @@ -251,7 +252,7 @@ i2c3: i2c@48060000 { compatible = "ti,omap4-i2c"; reg = <0x48060000 0x100>; - interrupts = <0 61 0x4>; + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c3"; @@ -260,7 +261,7 @@ i2c4: i2c@4807a000 { compatible = "ti,omap4-i2c"; reg = <0x4807a000 0x100>; - interrupts = <0 62 0x4>; + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c4"; @@ -269,7 +270,7 @@ i2c5: i2c@4807c000 { compatible = "ti,omap4-i2c"; reg = <0x4807c000 0x100>; - interrupts = <0 60 0x4>; + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "i2c5"; @@ -278,7 +279,7 @@ mcspi1: spi@48098000 { compatible = "ti,omap4-mcspi"; reg = <0x48098000 0x200>; - interrupts = <0 65 0x4>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi1"; @@ -298,7 +299,7 @@ mcspi2: spi@4809a000 { compatible = "ti,omap4-mcspi"; reg = <0x4809a000 0x200>; - interrupts = <0 66 0x4>; + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi2"; @@ -313,7 +314,7 @@ mcspi3: spi@480b8000 { compatible = "ti,omap4-mcspi"; reg = <0x480b8000 0x200>; - interrupts = <0 91 0x4>; + interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi3"; @@ -325,7 +326,7 @@ mcspi4: spi@480ba000 { compatible = "ti,omap4-mcspi"; reg = <0x480ba000 0x200>; - interrupts = <0 48 0x4>; + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; ti,hwmods = "mcspi4"; @@ -337,7 +338,7 @@ uart1: serial@4806a000 { compatible = "ti,omap4-uart"; reg = <0x4806a000 0x100>; - interrupts = <0 72 0x4>; + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart1"; clock-frequency = <48000000>; }; @@ -345,7 +346,7 @@ uart2: serial@4806c000 { compatible = "ti,omap4-uart"; reg = <0x4806c000 0x100>; - interrupts = <0 73 0x4>; + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart2"; clock-frequency = <48000000>; }; @@ -353,7 +354,7 @@ uart3: serial@48020000 { compatible = "ti,omap4-uart"; reg = <0x48020000 0x100>; - interrupts = <0 74 0x4>; + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart3"; clock-frequency = <48000000>; }; @@ -361,7 +362,7 @@ uart4: serial@4806e000 { compatible = "ti,omap4-uart"; reg = <0x4806e000 0x100>; - interrupts = <0 70 0x4>; + interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart4"; clock-frequency = <48000000>; }; @@ -369,7 +370,7 @@ uart5: serial@48066000 { compatible = "ti,omap4-uart"; reg = <0x48066000 0x100>; - interrupts = <0 105 0x4>; + interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart5"; clock-frequency = <48000000>; }; @@ -377,7 +378,7 @@ uart6: serial@48068000 { compatible = "ti,omap4-uart"; reg = <0x48068000 0x100>; - interrupts = <0 106 0x4>; + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "uart6"; clock-frequency = <48000000>; }; @@ -385,7 +386,7 @@ mmc1: mmc@4809c000 { compatible = "ti,omap4-hsmmc"; reg = <0x4809c000 0x400>; - interrupts = <0 83 0x4>; + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc1"; ti,dual-volt; ti,needs-special-reset; @@ -396,7 +397,7 @@ mmc2: mmc@480b4000 { compatible = "ti,omap4-hsmmc"; reg = <0x480b4000 0x400>; - interrupts = <0 86 0x4>; + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc2"; ti,needs-special-reset; dmas = <&sdma 47>, <&sdma 48>; @@ -406,7 +407,7 @@ mmc3: mmc@480ad000 { compatible = "ti,omap4-hsmmc"; reg = <0x480ad000 0x400>; - interrupts = <0 94 0x4>; + interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc3"; ti,needs-special-reset; dmas = <&sdma 77>, <&sdma 78>; @@ -416,7 +417,7 @@ mmc4: mmc@480d1000 { compatible = "ti,omap4-hsmmc"; reg = <0x480d1000 0x400>; - interrupts = <0 96 0x4>; + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc4"; ti,needs-special-reset; dmas = <&sdma 57>, <&sdma 58>; @@ -426,7 +427,7 @@ mmc5: mmc@480d5000 { compatible = "ti,omap4-hsmmc"; reg = <0x480d5000 0x400>; - interrupts = <0 59 0x4>; + interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mmc5"; ti,needs-special-reset; dmas = <&sdma 59>, <&sdma 60>; @@ -444,7 +445,7 @@ reg = <0x40132000 0x7f>, /* MPU private access */ <0x49032000 0x7f>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 112 0x4>; + interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "mcpdm"; dmas = <&sdma 65>, <&sdma 66>; @@ -456,7 +457,7 @@ reg = <0x4012e000 0x7f>, /* MPU private access */ <0x4902e000 0x7f>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 114 0x4>; + interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "dmic"; dmas = <&sdma 67>; dma-names = "up_link"; @@ -467,7 +468,7 @@ reg = <0x40122000 0xff>, /* MPU private access */ <0x49022000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 17 0x4>; + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp1"; @@ -481,7 +482,7 @@ reg = <0x40124000 0xff>, /* MPU private access */ <0x49024000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 22 0x4>; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp2"; @@ -495,7 +496,7 @@ reg = <0x40126000 0xff>, /* MPU private access */ <0x49026000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; - interrupts = <0 23 0x4>; + interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "common"; ti,buffer-size = <128>; ti,hwmods = "mcbsp3"; @@ -507,7 +508,7 @@ timer1: timer@4ae18000 { compatible = "ti,omap5430-timer"; reg = <0x4ae18000 0x80>; - interrupts = <0 37 0x4>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer1"; ti,timer-alwon; }; @@ -515,21 +516,21 @@ timer2: timer@48032000 { compatible = "ti,omap5430-timer"; reg = <0x48032000 0x80>; - interrupts = <0 38 0x4>; + interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer2"; }; timer3: timer@48034000 { compatible = "ti,omap5430-timer"; reg = <0x48034000 0x80>; - interrupts = <0 39 0x4>; + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer3"; }; timer4: timer@48036000 { compatible = "ti,omap5430-timer"; reg = <0x48036000 0x80>; - interrupts = <0 40 0x4>; + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer4"; }; @@ -537,7 +538,7 @@ compatible = "ti,omap5430-timer"; reg = <0x40138000 0x80>, <0x49038000 0x80>; - interrupts = <0 41 0x4>; + interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer5"; ti,timer-dsp; }; @@ -546,7 +547,7 @@ compatible = "ti,omap5430-timer"; reg = <0x4013a000 0x80>, <0x4903a000 0x80>; - interrupts = <0 42 0x4>; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer6"; ti,timer-dsp; ti,timer-pwm; @@ -556,7 +557,7 @@ compatible = "ti,omap5430-timer"; reg = <0x4013c000 0x80>, <0x4903c000 0x80>; - interrupts = <0 43 0x4>; + interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer7"; ti,timer-dsp; }; @@ -565,7 +566,7 @@ compatible = "ti,omap5430-timer"; reg = <0x4013e000 0x80>, <0x4903e000 0x80>; - interrupts = <0 44 0x4>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer8"; ti,timer-dsp; ti,timer-pwm; @@ -574,21 +575,21 @@ timer9: timer@4803e000 { compatible = "ti,omap5430-timer"; reg = <0x4803e000 0x80>; - interrupts = <0 45 0x4>; + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer9"; }; timer10: timer@48086000 { compatible = "ti,omap5430-timer"; reg = <0x48086000 0x80>; - interrupts = <0 46 0x4>; + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer10"; }; timer11: timer@48088000 { compatible = "ti,omap5430-timer"; reg = <0x48088000 0x80>; - interrupts = <0 47 0x4>; + interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "timer11"; ti,timer-pwm; }; @@ -596,7 +597,7 @@ wdt2: wdt@4ae14000 { compatible = "ti,omap5-wdt", "ti,omap3-wdt"; reg = <0x4ae14000 0x80>; - interrupts = <0 80 0x4>; + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; ti,hwmods = "wd_timer2"; }; @@ -605,7 +606,7 @@ ti,hwmods = "emif1"; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4c000000 0x400>; - interrupts = <0 110 0x4>; + interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; hw-caps-read-idle-ctrl; hw-caps-ll-interface; hw-caps-temp-alert; @@ -616,7 +617,7 @@ ti,hwmods = "emif2"; phy-type = <2>; /* DDR PHY type: Intelli PHY */ reg = <0x4d000000 0x400>; - interrupts = <0 111 0x4>; + interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; hw-caps-read-idle-ctrl; hw-caps-ll-interface; hw-caps-temp-alert; @@ -634,7 +635,7 @@ compatible = "ti,dwc3"; ti,hwmods = "usb_otg_ss"; reg = <0x4a020000 0x1000>; - interrupts = <0 93 4>; + interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <1>; utmi-mode = <2>; @@ -642,7 +643,7 @@ dwc3@4a030000 { compatible = "synopsys,dwc3"; reg = <0x4a030000 0x1000>; - interrupts = <0 92 4>; + interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; usb-phy = <&usb2_phy>, <&usb3_phy>; tx-fifo-resize; }; -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-05-22 16:05 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-22 14:27 [PATCH 0/5] ARM: dts: OMAP2+: use preprocessor for device trees Florian Vaussard 2013-05-22 14:27 ` [PATCH 1/5] ARM: dts: OMAP2+: use #include for all " Florian Vaussard 2013-05-22 15:40 ` Tony Lindgren 2013-05-22 16:05 ` Florian Vaussard 2013-05-22 14:27 ` [PATCH 2/5] ARM: dts: OMAP2+: create a DT header for GPIO Florian Vaussard 2013-05-22 15:26 ` Stephen Warren 2013-05-22 15:34 ` Tony Lindgren 2013-05-22 16:00 ` Florian Vaussard 2013-05-22 16:03 ` Stephen Warren 2013-05-22 14:27 ` [PATCH 3/5] ARM: dts: OMAP2+: convert DT files to use the new OMAP_GPIO macro Florian Vaussard 2013-05-22 15:28 ` Stephen Warren 2013-05-22 16:02 ` Florian Vaussard 2013-05-22 14:27 ` [PATCH 4/5] ARM: dts: OMAP3: fix incorrect notation for musb-hdrc interrupt Florian Vaussard 2013-05-22 15:35 ` Tony Lindgren 2013-05-22 14:27 ` [PATCH 5/5] ARM: dts: OMAP4/5: use existing constants for IRQs Florian Vaussard
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).