Commit e6511df4 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge branch 'omap/dt-missed-3.4' into drivers/mmc

The omap/dt branch adds a few instances of mmc device nodes that
need to get changed to use the common bindings. Pull that into
a new branch so we can apply the patch in a single run.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 66f75a5d b3431f5b
...@@ -18,3 +18,52 @@ memory { ...@@ -18,3 +18,52 @@ memory {
reg = <0x80000000 0x20000000>; /* 512 MB */ reg = <0x80000000 0x20000000>; /* 512 MB */
}; };
}; };
&i2c1 {
clock-frequency = <2600000>;
twl: twl@48 {
reg = <0x48>;
interrupts = <7>; /* SYS_NIRQ cascaded to intc */
interrupt-parent = <&intc>;
vsim: regulator@10 {
compatible = "ti,twl4030-vsim";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
};
};
};
/include/ "twl4030.dtsi"
&i2c2 {
clock-frequency = <400000>;
};
&i2c3 {
clock-frequency = <100000>;
/*
* Display monitor features are burnt in the EEPROM
* as EDID data.
*/
eeprom@50 {
compatible = "ti,eeprom";
reg = <0x50>;
};
};
&mmc1 {
vmmc-supply = <&vmmc1>;
vmmc_aux-supply = <&vsim>;
ti,bus-width = <8>;
};
&mmc2 {
status = "disable";
};
&mmc3 {
status = "disable";
};
...@@ -69,6 +69,60 @@ intc: interrupt-controller@48200000 { ...@@ -69,6 +69,60 @@ intc: interrupt-controller@48200000 {
reg = <0x48200000 0x1000>; reg = <0x48200000 0x1000>;
}; };
gpio1: gpio@48310000 {
compatible = "ti,omap3-gpio";
ti,hwmods = "gpio1";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio2: gpio@49050000 {
compatible = "ti,omap3-gpio";
ti,hwmods = "gpio2";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio3: gpio@49052000 {
compatible = "ti,omap3-gpio";
ti,hwmods = "gpio3";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio4: gpio@49054000 {
compatible = "ti,omap3-gpio";
ti,hwmods = "gpio4";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio5: gpio@49056000 {
compatible = "ti,omap3-gpio";
ti,hwmods = "gpio5";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio6: gpio@49058000 {
compatible = "ti,omap3-gpio";
ti,hwmods = "gpio6";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
uart1: serial@4806a000 { uart1: serial@4806a000 {
compatible = "ti,omap3-uart"; compatible = "ti,omap3-uart";
ti,hwmods = "uart1"; ti,hwmods = "uart1";
...@@ -113,5 +167,53 @@ i2c3: i2c@48060000 { ...@@ -113,5 +167,53 @@ i2c3: i2c@48060000 {
#size-cells = <0>; #size-cells = <0>;
ti,hwmods = "i2c3"; ti,hwmods = "i2c3";
}; };
mcspi1: spi@48098000 {
compatible = "ti,omap2-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi1";
ti,spi-num-cs = <4>;
};
mcspi2: spi@4809a000 {
compatible = "ti,omap2-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi2";
ti,spi-num-cs = <2>;
};
mcspi3: spi@480b8000 {
compatible = "ti,omap2-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi3";
ti,spi-num-cs = <2>;
};
mcspi4: spi@480ba000 {
compatible = "ti,omap2-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi4";
ti,spi-num-cs = <1>;
};
mmc1: mmc@4809c000 {
compatible = "ti,omap3-hsmmc";
ti,hwmods = "mmc1";
ti,dual-volt;
};
mmc2: mmc@480b4000 {
compatible = "ti,omap3-hsmmc";
ti,hwmods = "mmc2";
};
mmc3: mmc@480ad000 {
compatible = "ti,omap3-hsmmc";
ti,hwmods = "mmc3";
};
}; };
}; };
...@@ -18,3 +18,59 @@ memory { ...@@ -18,3 +18,59 @@ memory {
reg = <0x80000000 0x40000000>; /* 1 GB */ reg = <0x80000000 0x40000000>; /* 1 GB */
}; };
}; };
&i2c1 {
clock-frequency = <400000>;
twl: twl@48 {
reg = <0x48>;
/* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */
interrupt-parent = <&gic>;
};
};
/include/ "twl6030.dtsi"
&i2c2 {
clock-frequency = <400000>;
};
&i2c3 {
clock-frequency = <100000>;
/*
* Display monitor features are burnt in their EEPROM as EDID data.
* The EEPROM is connected as I2C slave device.
*/
eeprom@50 {
compatible = "ti,eeprom";
reg = <0x50>;
};
};
&i2c4 {
clock-frequency = <400000>;
};
&mmc1 {
vmmc-supply = <&vmmc>;
ti,bus-width = <8>;
};
&mmc2 {
status = "disable";
};
&mmc3 {
status = "disable";
};
&mmc4 {
status = "disable";
};
&mmc5 {
ti,non-removable;
ti,bus-width = <4>;
};
...@@ -17,4 +17,101 @@ memory { ...@@ -17,4 +17,101 @@ memory {
device_type = "memory"; device_type = "memory";
reg = <0x80000000 0x40000000>; /* 1 GB */ reg = <0x80000000 0x40000000>; /* 1 GB */
}; };
vdd_eth: fixedregulator@0 {
compatible = "regulator-fixed";
regulator-name = "VDD_ETH";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio2 16 0>; /* gpio line 48 */
enable-active-high;
regulator-boot-on;
};
};
&i2c1 {
clock-frequency = <400000>;
twl: twl@48 {
reg = <0x48>;
/* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */
interrupt-parent = <&gic>;
};
};
/include/ "twl6030.dtsi"
&i2c2 {
clock-frequency = <400000>;
};
&i2c3 {
clock-frequency = <400000>;
/*
* Temperature Sensor
* http://www.ti.com/lit/ds/symlink/tmp105.pdf
*/
tmp105@48 {
compatible = "ti,tmp105";
reg = <0x48>;
};
/*
* Ambient Light Sensor
* http://www.rohm.com/products/databook/sensor/pdf/bh1780gli-e.pdf
*/
bh1780@29 {
compatible = "rohm,bh1780";
reg = <0x29>;
};
};
&i2c4 {
clock-frequency = <400000>;
/*
* 3-Axis Digital Compass
* http://www.sparkfun.com/datasheets/Sensors/Magneto/HMC5843.pdf
*/
hmc5843@1e {
compatible = "honeywell,hmc5843";
reg = <0x1e>;
};
};
&mcspi1 {
eth@0 {
compatible = "ks8851";
spi-max-frequency = <24000000>;
reg = <0>;
interrupt-parent = <&gpio2>;
interrupts = <2>; /* gpio line 34 */
vdd-supply = <&vdd_eth>;
};
};
&mmc1 {
vmmc-supply = <&vmmc>;
ti,bus-width = <8>;
};
&mmc2 {
vmmc-supply = <&vaux1>;
ti,bus-width = <8>;
ti,non-removable;
};
&mmc3 {
status = "disable";
};
&mmc4 {
status = "disable";
};
&mmc5 {
ti,bus-width = <4>;
ti,non-removable;
}; };
...@@ -104,6 +104,60 @@ gic: interrupt-controller@48241000 { ...@@ -104,6 +104,60 @@ gic: interrupt-controller@48241000 {
<0x48240100 0x0100>; <0x48240100 0x0100>;
}; };
gpio1: gpio@4a310000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio1";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio2: gpio@48055000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio2";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio3: gpio@48057000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio3";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio4: gpio@48059000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio4";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio5: gpio@4805b000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio5";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
gpio6: gpio@4805d000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio6";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};
uart1: serial@4806a000 { uart1: serial@4806a000 {
compatible = "ti,omap4-uart"; compatible = "ti,omap4-uart";
ti,hwmods = "uart1"; ti,hwmods = "uart1";
...@@ -155,5 +209,68 @@ i2c4: i2c@48350000 { ...@@ -155,5 +209,68 @@ i2c4: i2c@48350000 {
#size-cells = <0>; #size-cells = <0>;
ti,hwmods = "i2c4"; ti,hwmods = "i2c4";
}; };
mcspi1: spi@48098000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi1";
ti,spi-num-cs = <4>;
};
mcspi2: spi@4809a000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi2";
ti,spi-num-cs = <2>;
};
mcspi3: spi@480b8000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi3";
ti,spi-num-cs = <2>;
};
mcspi4: spi@480ba000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi4";
ti,spi-num-cs = <1>;
};
mmc1: mmc@4809c000 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc1";
ti,dual-volt;
ti,needs-special-reset;
};
mmc2: mmc@480b4000 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc2";
ti,needs-special-reset;
};
mmc3: mmc@480ad000 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc3";
ti,needs-special-reset;
};
mmc4: mmc@480d1000 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc4";
ti,needs-special-reset;
};
mmc5: mmc@480d5000 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc5";
ti,needs-special-reset;
};
}; };
}; };
/*
* 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.
*/
/*
* Integrated Power Management Chip
*/
&twl {
compatible = "ti,twl4030";
interrupt-controller;
#interrupt-cells = <1>;
rtc {
compatible = "ti,twl4030-rtc";
interrupts = <11>;
};
vdac: regulator@0 {
compatible = "ti,twl4030-vdac";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
vpll2: regulator@1 {
compatible = "ti,twl4030-vpll2";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
vmmc1: regulator@2 {
compatible = "ti,twl4030-vmmc1";
regulator-min-microvolt = <1850000>;
regulator-max-microvolt = <3150000>;
};
};
/*
* 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.
*/
/*
* Integrated Power Management Chip
* http://www.ti.com/lit/ds/symlink/twl6030.pdf
*/
&twl {
compatible = "ti,twl6030";
interrupt-controller;
#interrupt-cells = <1>;
rtc {
compatible = "ti,twl4030-rtc";
interrupts = <11>;
};
vaux1: regulator@0 {
compatible = "ti,twl6030-vaux1";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3000000>;
};
vaux2: regulator@1 {
compatible = "ti,twl6030-vaux2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <2800000>;
};
vaux3: regulator@2 {
compatible = "ti,twl6030-vaux3";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3000000>;
};
vmmc: regulator@3 {
compatible = "ti,twl6030-vmmc";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3000000>;
};
vpp: regulator@4 {
compatible = "ti,twl6030-vpp";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2500000>;
};
vusim: regulator@5 {
compatible = "ti,twl6030-vusim";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <2900000>;
};
vdac: regulator@6 {
compatible = "ti,twl6030-vdac";
};
vana: regulator@7 {
compatible = "ti,twl6030-vana";
};
vcxio: regulator@8 {
compatible = "ti,twl6030-vcxio";
};
vusb: regulator@9 {
compatible = "ti,twl6030-vusb";
};
v1v8: regulator@10 {
compatible = "ti,twl6030-v1v8";
};
v2v1: regulator@11 {
compatible = "ti,twl6030-v2v1";
};
clk32kg: regulator@12 {
compatible = "ti,twl6030-clk32kg";
};
};
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/i2c/twl.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
...@@ -95,22 +94,6 @@ MACHINE_END ...@@ -95,22 +94,6 @@ MACHINE_END
#endif #endif
#ifdef CONFIG_ARCH_OMAP3 #ifdef CONFIG_ARCH_OMAP3
static struct twl4030_platform_data beagle_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
};
static void __init omap3_i2c_init(void)
{
omap3_pmic_init("twl4030", &beagle_twldata);
}
static void __init omap3_init(void)
{
omap3_i2c_init();
omap_generic_init();
}
static const char *omap3_boards_compat[] __initdata = { static const char *omap3_boards_compat[] __initdata = {
"ti,omap3", "ti,omap3",
NULL, NULL,
...@@ -122,7 +105,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") ...@@ -122,7 +105,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
.init_early = omap3430_init_early, .init_early = omap3430_init_early,
.init_irq = omap_init_irq, .init_irq = omap_init_irq,
.handle_irq = omap3_intc_handle_irq, .handle_irq = omap3_intc_handle_irq,
.init_machine = omap3_init, .init_machine = omap_generic_init,
.timer = &omap3_timer, .timer = &omap3_timer,
.dt_compat = omap3_boards_compat, .dt_compat = omap3_boards_compat,
.restart = omap_prcm_restart, .restart = omap_prcm_restart,
...@@ -130,22 +113,6 @@ MACHINE_END ...@@ -130,22 +113,6 @@ MACHINE_END
#endif #endif
#ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_ARCH_OMAP4
static struct twl4030_platform_data sdp4430_twldata = {
.irq_base = TWL6030_IRQ_BASE,
.irq_end = TWL6030_IRQ_END,
};
static void __init omap4_i2c_init(void)
{
omap4_pmic_init("twl6030", &sdp4430_twldata, NULL, 0);
}
static void __init omap4_init(void)
{
omap4_i2c_init();
omap_generic_init();
}
static const char *omap4_boards_compat[] __initdata = { static const char *omap4_boards_compat[] __initdata = {
"ti,omap4", "ti,omap4",
NULL, NULL,
...@@ -157,7 +124,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)") ...@@ -157,7 +124,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
.init_early = omap4430_init_early, .init_early = omap4430_init_early,
.init_irq = omap_init_irq, .init_irq = omap_init_irq,
.handle_irq = gic_handle_irq, .handle_irq = gic_handle_irq,
.init_machine = omap4_init, .init_machine = omap_generic_init,
.timer = &omap4_timer, .timer = &omap4_timer,
.dt_compat = omap4_boards_compat, .dt_compat = omap4_boards_compat,
.restart = omap_prcm_restart, .restart = omap_prcm_restart,
......
...@@ -705,7 +705,9 @@ static int __init omap2_init_devices(void) ...@@ -705,7 +705,9 @@ static int __init omap2_init_devices(void)
omap_init_dmic(); omap_init_dmic();
omap_init_camera(); omap_init_camera();
omap_init_mbox(); omap_init_mbox();
omap_init_mcspi(); /* If dtb is there, the devices will be created dynamically */
if (!of_have_populated_dt())
omap_init_mcspi();
omap_init_pmu(); omap_init_pmu();
omap_hdq_init(); omap_hdq_init();
omap_init_sti(); omap_init_sti();
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/of.h>
#include <plat/omap_hwmod.h> #include <plat/omap_hwmod.h>
#include <plat/omap_device.h> #include <plat/omap_device.h>
...@@ -146,7 +147,10 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) ...@@ -146,7 +147,10 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
*/ */
static int __init omap2_gpio_init(void) static int __init omap2_gpio_init(void)
{ {
return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, /* If dtb is there, the devices will be created dynamically */
NULL); if (of_have_populated_dt())
return -ENODEV;
return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
} }
postcore_initcall(omap2_gpio_init); postcore_initcall(omap2_gpio_init);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment