Skip to content

Commit

Permalink
Merge tag 'at91-for-next-dt' of git://github.com/at91linux/linux-at91…
Browse files Browse the repository at this point in the history
… into next/dt

From Nicolas Ferre:
More DT material for AT91:

- conversion of watchdog to DT
- usart definition for evk-pro3 board

* tag 'at91-for-next-dt' of git://github.com/at91linux/linux-at91:
  ARM: at91/dts: evk-pro3: enable watchdog
  ARM: at91/dts: add at91sam9_wdt driver to at91sam926x, at91sam9g45
  watchdog: at91sam9_wdt: add device tree support
  ARM: at91: dt: evk-pro3: enable uart0 and uart2
  • Loading branch information
Olof Johansson committed Nov 21, 2012
2 parents 3fcdc05 + 824b439 commit 6fe05f3
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* Atmel Watchdog Timers

** at91sam9-wdt

Required properties:
- compatible: must be "atmel,at91sam9260-wdt".
- reg: physical base address of the controller and length of memory mapped
region.

Example:

watchdog@fffffd40 {
compatible = "atmel,at91sam9260-wdt";
reg = <0xfffffd40 0x10>;
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/at91sam9260.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@
trigger-external;
};
};

watchdog@fffffd40 {
compatible = "atmel,at91sam9260-wdt";
reg = <0xfffffd40 0x10>;
status = "disabled";
};
};

nand0: nand@40000000 {
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/at91sam9263.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@
#size-cells = <0>;
status = "disabled";
};

watchdog@fffffd40 {
compatible = "atmel,at91sam9260-wdt";
reg = <0xfffffd40 0x10>;
status = "disabled";
};
};

nand0: nand@40000000 {
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/at91sam9g45.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@
trigger-value = <0x6>;
};
};

watchdog@fffffd40 {
compatible = "atmel,at91sam9260-wdt";
reg = <0xfffffd40 0x10>;
status = "disabled";
};
};

nand0: nand@40000000 {
Expand Down
12 changes: 12 additions & 0 deletions arch/arm/boot/dts/evk-pro3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,22 @@
status = "okay";
};

usart0: serial@fffb0000 {
status = "okay";
};

usart2: serial@fffb8000 {
status = "okay";
};

usb1: gadget@fffa4000 {
atmel,vbus-gpio = <&pioC 5 0>;
status = "okay";
};

watchdog@fffffd40 {
status = "okay";
};
};

usb0: ohci@00500000 {
Expand Down
11 changes: 11 additions & 0 deletions drivers/watchdog/at91sam9_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/timer.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <linux/of.h>

#include "at91sam9_wdt.h"

Expand Down Expand Up @@ -302,11 +303,21 @@ static int __exit at91wdt_remove(struct platform_device *pdev)
return res;
}

#if defined(CONFIG_OF)
static const struct of_device_id at91_wdt_dt_ids[] __initconst = {
{ .compatible = "atmel,at91sam9260-wdt" },
{ /* sentinel */ }
};

MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids);
#endif

static struct platform_driver at91wdt_driver = {
.remove = __exit_p(at91wdt_remove),
.driver = {
.name = "at91_wdt",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(at91_wdt_dt_ids),
},
};

Expand Down

0 comments on commit 6fe05f3

Please sign in to comment.