Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48b3b08e authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'at91-3.4-cleanup2+DT' of git://github.com/at91linux/linux-at91 into next/dt

* 'at91-3.4-cleanup2+DT' of git://github.com/at91linux/linux-at91: (22 commits)
  ARM: at91: at91sam9x5cm/dt: add leds support
  ARM: at91: usb_a9g20/dt: add gpio-keys support
  ARM: at91: at91sam9m10g45ek/dt: add gpio-keys support
  ARM: at91: at91sam9m10g45ek/dt: add leds support
  ARM: at91: usb_a9g20/dt: add leds support
  ARM: at91/pio: add new PIO3 features
  ARM: at91: add sam9_smc.o to at91sam9x5 build
  ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
  ARM: at91/tc: add device tree support to atmel_tclib
  ARM: at91/tclib: take iomem size from resource
  ARM: at91/pit: add traces in case of error
  ARM: at91: pit add DT support
  ARM: at91: AIC and GPIO IRQ device tree initialization
  ARM: at91/board-dt: remove AIC irq domain from board file
  ARM: at91/gpio: remove the static specification of gpio_chip.base
  ARM: at91/gpio: add .to_irq gpio_chip handler
  ARM: at91/gpio: non-DT builds do not have gpio_chip.of_node field
  ARM: at91/gpio: add irqdomain and DT support
  ARM: at91/gpio: change comments and one variable name
  ARM/USB: at91/ohci-at91: remove the use of irq_to_gpio
  ...
parents 6e1d521b f75622f4
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
* Advanced Interrupt Controller (AIC)

Required properties:
- compatible: Should be "atmel,<chip>-aic"
- interrupt-controller: Identifies the node as an interrupt controller.
- interrupt-parent: For single AIC system, it is an empty property.
- #interrupt-cells: The number of cells to define the interrupts. It sould be 2.
  The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet).
  The second cell is used to specify flags:
    bits[3:0] trigger type and level flags:
      1 = low-to-high edge triggered.
      2 = high-to-low edge triggered.
      4 = active high level-sensitive.
      8 = active low level-sensitive.
      Valid combinations are 1, 2, 3, 4, 8.
      Default flag for internal sources should be set to 4 (active high).
- reg: Should contain AIC registers location and length

Examples:
	/*
	 * AIC
	 */
	aic: interrupt-controller@fffff000 {
		compatible = "atmel,at91rm9200-aic";
		interrupt-controller;
		interrupt-parent;
		#interrupt-cells = <2>;
		reg = <0xfffff000 0x200>;
	};

	/*
	 * An interrupt generating device that is wired to an AIC.
	 */
	dma: dma-controller@ffffec00 {
		compatible = "atmel,at91sam9g45-dma";
		reg = <0xffffec00 0x200>;
		interrupts = <21 4>;
	};
+32 −0
Original line number Diff line number Diff line
Atmel AT91 device tree bindings.
================================

PIT Timer required properties:
- compatible: Should be "atmel,at91sam9260-pit"
- reg: Should contain registers location and length
- interrupts: Should contain interrupt for the PIT which is the IRQ line
  shared across all System Controller members.

TC/TCLIB Timer required properties:
- compatible: Should be "atmel,<chip>-pit".
  <chip> can be "at91rm9200" or "at91sam9x5"
- reg: Should contain registers location and length
- interrupts: Should contain all interrupts for the TC block
  Note that you can specify several interrupt cells if the TC
  block has one interrupt per channel.

Examples:

One interrupt per TC block:
	tcb0: timer@fff7c000 {
		compatible = "atmel,at91rm9200-tcb";
		reg = <0xfff7c000 0x100>;
		interrupts = <18 4>;
	};

One interrupt per TC channel in a TC block:
	tcb1: timer@fffdc000 {
		compatible = "atmel,at91rm9200-tcb";
		reg = <0xfffdc000 0x100>;
		interrupts = <26 4 27 4 28 4>;
	};
+20 −0
Original line number Diff line number Diff line
* Atmel GPIO controller (PIO)

Required properties:
- compatible: "atmel,<chip>-gpio", where <chip> is at91rm9200 or at91sam9x5.
- reg: Should contain GPIO controller registers location and length
- interrupts: Should be the port interrupt shared by all the pins.
- #gpio-cells: Should be two.  The first cell is the pin number and
  the second cell is used to specify optional parameters (currently
  unused).
- gpio-controller: Marks the device node as a GPIO controller.

Example:
	pioA: gpio@fffff200 {
		compatible = "atmel,at91rm9200-gpio";
		reg = <0xfffff200 0x100>;
		interrupts = <2 4>;
		#gpio-cells = <2>;
		gpio-controller;
	};
+1 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@ config ARCH_AT91
	select ARCH_REQUIRE_GPIOLIB
	select HAVE_CLK
	select CLKDEV_LOOKUP
	select IRQ_DOMAIN
	help
	  This enables support for systems based on the Atmel AT91RM9200,
	  AT91SAM9 processors.
+59 −9
Original line number Diff line number Diff line
@@ -23,6 +23,11 @@
		serial4 = &usart3;
		serial5 = &usart4;
		serial6 = &usart5;
		gpio0 = &pioA;
		gpio1 = &pioB;
		gpio2 = &pioC;
		tcb0 = &tcb0;
		tcb1 = &tcb1;
	};
	cpus {
		cpu@0 {
@@ -47,24 +52,69 @@
			ranges;

			aic: interrupt-controller@fffff000 {
				#interrupt-cells = <1>;
				#interrupt-cells = <2>;
				compatible = "atmel,at91rm9200-aic";
				interrupt-controller;
				interrupt-parent;
				reg = <0xfffff000 0x200>;
			};

			pit: timer@fffffd30 {
				compatible = "atmel,at91sam9260-pit";
				reg = <0xfffffd30 0xf>;
				interrupts = <1 4>;
			};

			tcb0: timer@fffa0000 {
				compatible = "atmel,at91rm9200-tcb";
				reg = <0xfffa0000 0x100>;
				interrupts = <17 4 18 4 19 4>;
			};

			tcb1: timer@fffdc000 {
				compatible = "atmel,at91rm9200-tcb";
				reg = <0xfffdc000 0x100>;
				interrupts = <26 4 27 4 28 4>;
			};

			pioA: gpio@fffff400 {
				compatible = "atmel,at91rm9200-gpio";
				reg = <0xfffff400 0x100>;
				interrupts = <2 4>;
				#gpio-cells = <2>;
				gpio-controller;
				interrupt-controller;
			};

			pioB: gpio@fffff600 {
				compatible = "atmel,at91rm9200-gpio";
				reg = <0xfffff600 0x100>;
				interrupts = <3 4>;
				#gpio-cells = <2>;
				gpio-controller;
				interrupt-controller;
			};

			pioC: gpio@fffff800 {
				compatible = "atmel,at91rm9200-gpio";
				reg = <0xfffff800 0x100>;
				interrupts = <4 4>;
				#gpio-cells = <2>;
				gpio-controller;
				interrupt-controller;
			};

			dbgu: serial@fffff200 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffff200 0x200>;
				interrupts = <1>;
				interrupts = <1 4>;
				status = "disabled";
			};

			usart0: serial@fffb0000 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffb0000 0x200>;
				interrupts = <6>;
				interrupts = <6 4>;
				atmel,use-dma-rx;
				atmel,use-dma-tx;
				status = "disabled";
@@ -73,7 +123,7 @@
			usart1: serial@fffb4000 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffb4000 0x200>;
				interrupts = <7>;
				interrupts = <7 4>;
				atmel,use-dma-rx;
				atmel,use-dma-tx;
				status = "disabled";
@@ -82,7 +132,7 @@
			usart2: serial@fffb8000 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffb8000 0x200>;
				interrupts = <8>;
				interrupts = <8 4>;
				atmel,use-dma-rx;
				atmel,use-dma-tx;
				status = "disabled";
@@ -91,7 +141,7 @@
			usart3: serial@fffd0000 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffd0000 0x200>;
				interrupts = <23>;
				interrupts = <23 4>;
				atmel,use-dma-rx;
				atmel,use-dma-tx;
				status = "disabled";
@@ -100,7 +150,7 @@
			usart4: serial@fffd4000 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffd4000 0x200>;
				interrupts = <24>;
				interrupts = <24 4>;
				atmel,use-dma-rx;
				atmel,use-dma-tx;
				status = "disabled";
@@ -109,7 +159,7 @@
			usart5: serial@fffd8000 {
				compatible = "atmel,at91sam9260-usart";
				reg = <0xfffd8000 0x200>;
				interrupts = <25>;
				interrupts = <25 4>;
				atmel,use-dma-rx;
				atmel,use-dma-tx;
				status = "disabled";
@@ -118,7 +168,7 @@
			macb0: ethernet@fffc4000 {
				compatible = "cdns,at32ap7000-macb", "cdns,macb";
				reg = <0xfffc4000 0x100>;
				interrupts = <21>;
				interrupts = <21 4>;
				status = "disabled";
			};
		};
Loading