Commit 93ce2855 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'davinci-for-v3.9/dt-2' of git://gitorious.org/linux-davinci/linux-davinci into next/dt

From Sekhar Nori:
Second round of DT updates for DaVinci.

This pull request adds support for I2C0 and watchdog timer
for DA850 EVM booting using device tree. It also enables
machine reboot when using device tree.

* tag 'davinci-for-v3.9/dt-2' of git://gitorious.org/linux-davinci/linux-davinci:
  ARM: davinci: da850 DT: add support for machine reboot
  ARM: davinci: da850: add wdt DT node
  ARM: davinci: da850: add DT node for I2C0
parents 13c5d519 19c7c0d8
...@@ -30,6 +30,15 @@ serial2: serial@1d0d000 { ...@@ -30,6 +30,15 @@ serial2: serial@1d0d000 {
rtc0: rtc@1c23000 { rtc0: rtc@1c23000 {
status = "okay"; status = "okay";
}; };
i2c0: i2c@1c22000 {
status = "okay";
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
};
wdt: wdt@1c21000 {
status = "okay";
};
}; };
nand_cs3@62000000 { nand_cs3@62000000 {
status = "okay"; status = "okay";
......
...@@ -56,6 +56,12 @@ nand_cs3_pins: pinmux_nand_pins { ...@@ -56,6 +56,12 @@ nand_cs3_pins: pinmux_nand_pins {
0x30 0x01100000 0x0ff00000 0x30 0x01100000 0x0ff00000
>; >;
}; };
i2c0_pins: pinmux_i2c0_pins {
pinctrl-single,bits = <
/* I2C0_SDA,I2C0_SCL */
0x10 0x00002200 0x0000ff00
>;
};
}; };
serial0: serial@1c42000 { serial0: serial@1c42000 {
compatible = "ns16550a"; compatible = "ns16550a";
...@@ -88,6 +94,19 @@ rtc0: rtc@1c23000 { ...@@ -88,6 +94,19 @@ rtc0: rtc@1c23000 {
19>; 19>;
status = "disabled"; status = "disabled";
}; };
i2c0: i2c@1c22000 {
compatible = "ti,davinci-i2c";
reg = <0x22000 0x1000>;
interrupts = <15>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
wdt: wdt@1c21000 {
compatible = "ti,davinci-wdt";
reg = <0x21000 0x1000>;
status = "disabled";
};
}; };
nand_cs3@62000000 { nand_cs3@62000000 {
compatible = "ti,davinci-nand"; compatible = "ti,davinci-nand";
......
...@@ -37,11 +37,18 @@ static void __init da8xx_init_irq(void) ...@@ -37,11 +37,18 @@ static void __init da8xx_init_irq(void)
of_irq_init(da8xx_irq_match); of_irq_init(da8xx_irq_match);
} }
struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
{}
};
#ifdef CONFIG_ARCH_DAVINCI_DA850 #ifdef CONFIG_ARCH_DAVINCI_DA850
static void __init da850_init_machine(void) static void __init da850_init_machine(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); of_platform_populate(NULL, of_default_bus_match_table,
da850_auxdata_lookup, NULL);
da8xx_uart_clk_enable(); da8xx_uart_clk_enable();
} }
......
...@@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = { ...@@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = {
}, },
}; };
struct platform_device da8xx_wdt_device = { static struct platform_device da8xx_wdt_device = {
.name = "watchdog", .name = "watchdog",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(da8xx_watchdog_resources), .num_resources = ARRAY_SIZE(da8xx_watchdog_resources),
...@@ -368,7 +368,15 @@ struct platform_device da8xx_wdt_device = { ...@@ -368,7 +368,15 @@ struct platform_device da8xx_wdt_device = {
void da8xx_restart(char mode, const char *cmd) void da8xx_restart(char mode, const char *cmd)
{ {
davinci_watchdog_reset(&da8xx_wdt_device); struct device *dev;
dev = bus_find_device_by_name(&platform_bus_type, NULL, "watchdog");
if (!dev) {
pr_err("%s: failed to find watchdog device\n", __func__);
return;
}
davinci_watchdog_reset(to_platform_device(dev));
} }
int __init da8xx_register_watchdog(void) int __init da8xx_register_watchdog(void)
......
...@@ -110,7 +110,6 @@ extern struct emac_platform_data da8xx_emac_pdata; ...@@ -110,7 +110,6 @@ extern struct emac_platform_data da8xx_emac_pdata;
extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata; extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata;
extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata; extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;
extern struct platform_device da8xx_wdt_device;
extern const short da830_emif25_pins[]; extern const short da830_emif25_pins[];
extern const short da830_spi0_pins[]; extern const short da830_spi0_pins[];
......
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