Skip to content

Commit

Permalink
Merge branch 'at91-3.4-cleanup2-DT2' of git://github.com/at91linux/li…
Browse files Browse the repository at this point in the history
…nux-at91 into next/dt

* 'at91-3.4-cleanup2-DT2' of git://github.com/at91linux/linux-at91: (23 commits)
  ARM: at91: dt: enable usb ehci for sam9g45 and sam9x5
  ARM: at91: usb ehci add dt support
  ARM: at91: dt: enable usb ohci for sam9g20, sam9g45 amd sam9x5
  ARM: at91: usb ohci add dt support
  ARM: at91: add Shutdown Controller (SHDWC) DT support
  ARM: at91: add ram controller DT support
  ARM: at91: add RSTC (Reset Controller) dt support
  ARM: at91: always enable sam9 restart
  ARM: at91: add pmc DT support
  ARM: at91/dt: add specific DT soc init
  ARM: at91/dt: add Calao DAB-MMX daugther board support for USB-A9G20
  ARM: at91: sam9x5 add i2c DT support
  ARM: at91: sam9g45 add i2c DT support
  ARM: at91: usb_a9g20 add DT i2c support
  ARM: at91: sam9g20 add i2c DT support
  i2c/gpio: add DT support
  ARM: at91: sam9x5 add nand support
  atmel/nand: add DT support
  of/mtd/nand: add generic bindings and helpers
  of: introduce helper to manage boolean
  ...
  • Loading branch information
arndb committed Mar 16, 2012
2 parents cdc3df6 + 62c5553 commit 2a9f23d
Show file tree
Hide file tree
Showing 59 changed files with 1,365 additions and 193 deletions.
60 changes: 60 additions & 0 deletions Documentation/devicetree/bindings/arm/atmel-at91.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,63 @@ One interrupt per TC channel in a TC block:
reg = <0xfffdc000 0x100>;
interrupts = <26 4 27 4 28 4>;
};

RSTC Reset Controller required properties:
- compatible: Should be "atmel,<chip>-rstc".
<chip> can be "at91sam9260" or "at91sam9g45"
- reg: Should contain registers location and length

Example:

rstc@fffffd00 {
compatible = "atmel,at91sam9260-rstc";
reg = <0xfffffd00 0x10>;
};

RAMC SDRAM/DDR Controller required properties:
- compatible: Should be "atmel,at91sam9260-sdramc",
"atmel,at91sam9g45-ddramc",
- reg: Should contain registers location and length
For at91sam9263 and at91sam9g45 you must specify 2 entries.

Examples:

ramc0: ramc@ffffe800 {
compatible = "atmel,at91sam9g45-ddramc";
reg = <0xffffe800 0x200>;
};

ramc0: ramc@ffffe400 {
compatible = "atmel,at91sam9g45-ddramc";
reg = <0xffffe400 0x200
0xffffe600 0x200>;
};

SHDWC Shutdown Controller

required properties:
- compatible: Should be "atmel,<chip>-shdwc".
<chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
- reg: Should contain registers location and length

optional properties:
- atmel,wakeup-mode: String, operation mode of the wakeup mode.
Supported values are: "none", "high", "low", "any".
- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).

optional at91sam9260 properties:
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.

optional at91sam9rl properties:
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.

optional at91sam9x5 properties:
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.

Example:

rstc@fffffd00 {
compatible = "atmel,at91sam9260-rstc";
reg = <0xfffffd00 0x10>;
};
11 changes: 11 additions & 0 deletions Documentation/devicetree/bindings/arm/atmel-pmc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* Power Management Controller (PMC)

Required properties:
- compatible: Should be "atmel,at91rm9200-pmc"
- reg: Should contain PMC registers location and length

Examples:
pmc: pmc@fffffc00 {
compatible = "atmel,at91rm9200-pmc";
reg = <0xfffffc00 0x100>;
};
32 changes: 32 additions & 0 deletions Documentation/devicetree/bindings/gpio/gpio_i2c.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Device-Tree bindings for i2c gpio driver

Required properties:
- compatible = "i2c-gpio";
- gpios: sda and scl gpio


Optional properties:
- i2c-gpio,sda-open-drain: sda as open drain
- i2c-gpio,scl-open-drain: scl as open drain
- i2c-gpio,scl-output-only: scl as output only
- i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform)
- i2c-gpio,timeout-ms: timeout to get data

Example nodes:

i2c@0 {
compatible = "i2c-gpio";
gpios = <&pioA 23 0 /* sda */
&pioA 24 0 /* scl */
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;

rv3029c2@56 {
compatible = "rv3029c2";
reg = <0x56>;
};
};
41 changes: 41 additions & 0 deletions Documentation/devicetree/bindings/mtd/atmel-nand.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Atmel NAND flash

Required properties:
- compatible : "atmel,at91rm9200-nand".
- reg : should specify localbus address and size used for the chip,
and if availlable the ECC.
- atmel,nand-addr-offset : offset for the address latch.
- atmel,nand-cmd-offset : offset for the command latch.
- #address-cells, #size-cells : Must be present if the device has sub-nodes
representing partitions.

- gpios : specifies the gpio pins to control the NAND device. detect is an
optional gpio and may be set to 0 if not present.

Optional properties:
- nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default.
Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
"soft_bch".
- nand-bus-width : 8 or 16 bus width if not present 8
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false

Examples:
nand0: nand@40000000,0 {
compatible = "atmel,at91rm9200-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x40000000 0x10000000
0xffffe800 0x200
>;
atmel,nand-addr-offset = <21>;
atmel,nand-cmd-offset = <22>;
nand-on-flash-bbt;
nand-ecc-mode = "soft";
gpios = <&pioC 13 0
&pioC 14 0
0
>;
partition@0 {
...
};
};
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/mtd/nand.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* MTD generic binding

- nand-ecc-mode : String, operation mode of the NAND ecc mode.
Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
"soft_bch".
- nand-bus-width : 8 or 16 bus width if not present 8
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
31 changes: 31 additions & 0 deletions Documentation/devicetree/bindings/usb/atmel-usb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Atmel SOC USB controllers

OHCI

Required properties:
- compatible: Should be "atmel,at91rm9200-ohci" for USB controllers
used in host mode.
- num-ports: Number of ports.
- atmel,vbus-gpio: If present, specifies a gpio that needs to be
activated for the bus to be powered.
- atmel,oc-gpio: If present, specifies a gpio that needs to be
activated for the overcurrent detection.

usb0: ohci@00500000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x100000>;
interrupts = <20 4>;
num-ports = <2>;
};

EHCI

Required properties:
- compatible: Should be "atmel,at91sam9g45-ehci" for USB controllers
used in host mode.

usb1: ehci@00800000 {
compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
reg = <0x00800000 0x100000>;
interrupts = <22 4>;
};
56 changes: 56 additions & 0 deletions arch/arm/boot/dts/at91sam9g20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@
reg = <0xfffff000 0x200>;
};

ramc0: ramc@ffffea00 {
compatible = "atmel,at91sam9260-sdramc";
reg = <0xffffea00 0x200>;
};

pmc: pmc@fffffc00 {
compatible = "atmel,at91rm9200-pmc";
reg = <0xfffffc00 0x100>;
};

rstc@fffffd00 {
compatible = "atmel,at91sam9260-rstc";
reg = <0xfffffd00 0x10>;
};

shdwc@fffffd10 {
compatible = "atmel,at91sam9260-shdwc";
reg = <0xfffffd10 0x10>;
};

pit: timer@fffffd30 {
compatible = "atmel,at91sam9260-pit";
reg = <0xfffffd30 0xf>;
Expand Down Expand Up @@ -172,5 +192,41 @@
status = "disabled";
};
};

nand0: nand@40000000 {
compatible = "atmel,at91rm9200-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x40000000 0x10000000
0xffffe800 0x200
>;
atmel,nand-addr-offset = <21>;
atmel,nand-cmd-offset = <22>;
gpios = <&pioC 13 0
&pioC 14 0
0
>;
status = "disabled";
};

usb0: ohci@00500000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x100000>;
interrupts = <20 4>;
status = "disabled";
};
};

i2c@0 {
compatible = "i2c-gpio";
gpios = <&pioA 23 0 /* sda */
&pioA 24 0 /* scl */
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
14 changes: 13 additions & 1 deletion arch/arm/boot/dts/at91sam9g25ek.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";

chosen {
bootargs = "128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
};

ahb {
Expand All @@ -33,5 +33,17 @@
status = "okay";
};
};

usb0: ohci@00600000 {
status = "okay";
num-ports = <2>;
atmel,vbus-gpio = <&pioD 19 0
&pioD 20 0
>;
};

usb1: ehci@00700000 {
status = "okay";
};
};
};
64 changes: 64 additions & 0 deletions arch/arm/boot/dts/at91sam9g45.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,34 @@
reg = <0xfffff000 0x200>;
};

ramc0: ramc@ffffe400 {
compatible = "atmel,at91sam9g45-ddramc";
reg = <0xffffe400 0x200
0xffffe600 0x200>;
};

pmc: pmc@fffffc00 {
compatible = "atmel,at91rm9200-pmc";
reg = <0xfffffc00 0x100>;
};

rstc@fffffd00 {
compatible = "atmel,at91sam9g45-rstc";
reg = <0xfffffd00 0x10>;
};

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


shdwc@fffffd10 {
compatible = "atmel,at91sam9rl-shdwc";
reg = <0xfffffd10 0x10>;
};

tcb0: timer@fff7c000 {
compatible = "atmel,at91rm9200-tcb";
reg = <0xfff7c000 0x100>;
Expand Down Expand Up @@ -180,5 +201,48 @@
status = "disabled";
};
};

nand0: nand@40000000 {
compatible = "atmel,at91rm9200-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x40000000 0x10000000
0xffffe200 0x200
>;
atmel,nand-addr-offset = <21>;
atmel,nand-cmd-offset = <22>;
gpios = <&pioC 8 0
&pioC 14 0
0
>;
status = "disabled";
};

usb0: ohci@00700000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00700000 0x100000>;
interrupts = <22 4>;
status = "disabled";
};

usb1: ehci@00800000 {
compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
reg = <0x00800000 0x100000>;
interrupts = <22 4>;
status = "disabled";
};
};

i2c@0 {
compatible = "i2c-gpio";
gpios = <&pioA 20 0 /* sda */
&pioA 21 0 /* scl */
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <5>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
Loading

0 comments on commit 2a9f23d

Please sign in to comment.