diff options
author | Felipe Balbi <balbi@ti.com> | 2014-09-16 16:31:40 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-09-16 17:43:11 -0400 |
commit | e92ce89c29fe104bc1246913f385093bbae7b564 (patch) | |
tree | cbc0eb3eef2eafbe4ef07aeee4fd8ca35a2c2289 | |
parent | 55601c9f24670ba926ebdd4d712ac3b177232330 (diff) |
arm: omap2: n8x0: move i2c devices to DT
By moving i2c devices to DT we can clean up
i2c_board_info and fix a problem with moving
INTC to irq domain where IRQs can be renumbered
on each boot.
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/boot/dts/omap2420-n810.dts | 7 | ||||
-rw-r--r-- | arch/arm/boot/dts/omap2420-n8x0-common.dtsi | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-n8x0.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-omap2/common-board-devices.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pdata-quirks.c | 2 |
5 files changed, 23 insertions, 23 deletions
diff --git a/arch/arm/boot/dts/omap2420-n810.dts b/arch/arm/boot/dts/omap2420-n810.dts index 21baec154b78..b604d26bd48c 100644 --- a/arch/arm/boot/dts/omap2420-n810.dts +++ b/arch/arm/boot/dts/omap2420-n810.dts | |||
@@ -6,3 +6,10 @@ | |||
6 | model = "Nokia N810"; | 6 | model = "Nokia N810"; |
7 | compatible = "nokia,n810", "nokia,n8x0", "ti,omap2420", "ti,omap2"; | 7 | compatible = "nokia,n810", "nokia,n8x0", "ti,omap2420", "ti,omap2"; |
8 | }; | 8 | }; |
9 | |||
10 | &i2c2 { | ||
11 | aic3x@18 { | ||
12 | compatible = "tlv320aic3x"; | ||
13 | reg = <0x18>; | ||
14 | }; | ||
15 | }; | ||
diff --git a/arch/arm/boot/dts/omap2420-n8x0-common.dtsi b/arch/arm/boot/dts/omap2420-n8x0-common.dtsi index 89608b206519..24c50db2a478 100644 --- a/arch/arm/boot/dts/omap2420-n8x0-common.dtsi +++ b/arch/arm/boot/dts/omap2420-n8x0-common.dtsi | |||
@@ -27,6 +27,12 @@ | |||
27 | 27 | ||
28 | &i2c1 { | 28 | &i2c1 { |
29 | clock-frequency = <400000>; | 29 | clock-frequency = <400000>; |
30 | |||
31 | pmic@72 { | ||
32 | compatible = "menelaus"; | ||
33 | reg = <0x72>; | ||
34 | interrupts = <7 IRQ_TYPE_EDGE_RISING>; | ||
35 | }; | ||
30 | }; | 36 | }; |
31 | 37 | ||
32 | &i2c2 { | 38 | &i2c2 { |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index aead77a4bc6d..97767a27ca9d 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "mmc.h" | 33 | #include "mmc.h" |
34 | #include "soc.h" | 34 | #include "soc.h" |
35 | #include "gpmc-onenand.h" | 35 | #include "gpmc-onenand.h" |
36 | #include "common-board-devices.h" | ||
36 | 37 | ||
37 | #define TUSB6010_ASYNC_CS 1 | 38 | #define TUSB6010_ASYNC_CS 1 |
38 | #define TUSB6010_SYNC_CS 4 | 39 | #define TUSB6010_SYNC_CS 4 |
@@ -568,29 +569,14 @@ static int n8x0_menelaus_late_init(struct device *dev) | |||
568 | } | 569 | } |
569 | #endif | 570 | #endif |
570 | 571 | ||
571 | static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = { | 572 | struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = { |
572 | .late_init = n8x0_menelaus_late_init, | 573 | .late_init = n8x0_menelaus_late_init, |
573 | }; | 574 | }; |
574 | 575 | ||
575 | static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = { | 576 | struct aic3x_pdata n810_aic33_data __initdata = { |
576 | { | ||
577 | I2C_BOARD_INFO("menelaus", 0x72), | ||
578 | .irq = 7 + OMAP_INTC_START, | ||
579 | .platform_data = &n8x0_menelaus_platform_data, | ||
580 | }, | ||
581 | }; | ||
582 | |||
583 | static struct aic3x_pdata n810_aic33_data __initdata = { | ||
584 | .gpio_reset = 118, | 577 | .gpio_reset = 118, |
585 | }; | 578 | }; |
586 | 579 | ||
587 | static struct i2c_board_info n810_i2c_board_info_2[] __initdata = { | ||
588 | { | ||
589 | I2C_BOARD_INFO("tlv320aic3x", 0x18), | ||
590 | .platform_data = &n810_aic33_data, | ||
591 | }, | ||
592 | }; | ||
593 | |||
594 | static int __init n8x0_late_initcall(void) | 580 | static int __init n8x0_late_initcall(void) |
595 | { | 581 | { |
596 | if (!board_caps) | 582 | if (!board_caps) |
@@ -612,11 +598,5 @@ void * __init n8x0_legacy_init(void) | |||
612 | board_check_revision(); | 598 | board_check_revision(); |
613 | spi_register_board_info(n800_spi_board_info, | 599 | spi_register_board_info(n800_spi_board_info, |
614 | ARRAY_SIZE(n800_spi_board_info)); | 600 | ARRAY_SIZE(n800_spi_board_info)); |
615 | i2c_register_board_info(0, n8x0_i2c_board_info_1, | ||
616 | ARRAY_SIZE(n8x0_i2c_board_info_1)); | ||
617 | if (board_is_n810()) | ||
618 | i2c_register_board_info(1, n810_i2c_board_info_2, | ||
619 | ARRAY_SIZE(n810_i2c_board_info_2)); | ||
620 | |||
621 | return &mmc1_data; | 601 | return &mmc1_data; |
622 | } | 602 | } |
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index f338177e6900..07c88ae083fb 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ | 1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ |
2 | #define __OMAP_COMMON_BOARD_DEVICES__ | 2 | #define __OMAP_COMMON_BOARD_DEVICES__ |
3 | 3 | ||
4 | #include <sound/tlv320aic3x.h> | ||
5 | #include <linux/mfd/menelaus.h> | ||
4 | #include "twl-common.h" | 6 | #include "twl-common.h" |
5 | 7 | ||
6 | #define NAND_BLOCK_SIZE SZ_128K | 8 | #define NAND_BLOCK_SIZE SZ_128K |
@@ -12,4 +14,7 @@ void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | |||
12 | struct ads7846_platform_data *board_pdata); | 14 | struct ads7846_platform_data *board_pdata); |
13 | void *n8x0_legacy_init(void); | 15 | void *n8x0_legacy_init(void); |
14 | 16 | ||
17 | extern struct menelaus_platform_data n8x0_menelaus_platform_data; | ||
18 | extern struct aic3x_pdata n810_aic33_data; | ||
19 | |||
15 | #endif /* __OMAP_COMMON_BOARD_DEVICES__ */ | 20 | #endif /* __OMAP_COMMON_BOARD_DEVICES__ */ |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 8695fd4ea476..06a0ccfa00a2 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -336,6 +336,8 @@ static struct pdata_init auxdata_quirks[] __initdata = { | |||
336 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | 336 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { |
337 | #ifdef CONFIG_MACH_NOKIA_N8X0 | 337 | #ifdef CONFIG_MACH_NOKIA_N8X0 |
338 | OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL), | 338 | OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL), |
339 | OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data), | ||
340 | OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data), | ||
339 | #endif | 341 | #endif |
340 | #ifdef CONFIG_ARCH_OMAP3 | 342 | #ifdef CONFIG_ARCH_OMAP3 |
341 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), | 343 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), |