Skip to content

Commit

Permalink
Merge branch 'ux500-devicetree-for-arm-soc' of git://git.kernel.org/p…
Browse files Browse the repository at this point in the history
…ub/scm/linux/kernel/git/linusw/linux-stericsson into next/dt

Linus Walleij <linus.walleij@linaro.org> writes:

  this pull request contains some device tree work by Lee Jones.
  I have tried to keep these patches in the arch/arm/boot/dts/*
  space to get some sanity in the branch proliferation.

  There is still one patch that touches arch/arm/mach-ux500 too
  though (but it should merge fine with the other ux500 stuff).

  The changes to the device tree are of course dependent on some
  core changes and some patching in the GPIO/pin driver, but as
  the device tree files are believed to be a different world
  (and should one day live in their own git) I split this off
  anyway. I don't think people bisect the device trees per se
  and the board code in conjunction anyway.

* 'ux500-devicetree-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: Configure the PRCMU Timer for db8500 based devices in DT
  ARM: ux500: Enable the SMSC9115 on Snowball via Device Tree
  drivers/gpio: represent gpio-nomadik as an IRQ controller in DT documentation
  ARM: ux500: Rename gpio_keys in the Device Tree file
  drivers/gpio: gpio-nomadik: Provide documentation for Device Tree bindings
  drivers/gpio: gpio-nomadik: Device Tree bindings
  ARM: ux500: Enable the external bus with Device Tree
  ARM: ux500: Shorten Snowball's DT compatible gpio entry
  ARM: ux500: Rename the DT compatible entry for i2c devices on Snowball

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[olof: rebuilt branch due to drop of an early merge]
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Arnd Bergmann authored and Olof Johansson committed May 9, 2012
2 parents 6875dc6 + 3de3d74 commit e86bde3
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 36 deletions.
31 changes: 31 additions & 0 deletions Documentation/devicetree/bindings/gpio/gpio-nmk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Nomadik GPIO controller

Required properties:
- compatible : Should be "st,nomadik-gpio".
- reg : Physical base address and length of the controller's registers.
- interrupts : The interrupt outputs from the controller.
- #gpio-cells : Should be two:
The first cell is the pin number.
The second cell is used to specify optional parameters:
- 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.
- gpio-controller : Marks the device node as a GPIO controller.
- interrupt-controller : Marks the device node as an interrupt controller.
- gpio-bank : Specifies which bank a controller owns.
- st,supports-sleepmode : Specifies whether controller can sleep or not

Example:

gpio1: gpio@8012e080 {
compatible = "st,nomadik-gpio";
reg = <0x8012e080 0x80>;
interrupts = <0 120 0x4>;
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
supports-sleepmode;
gpio-bank = <1>;
};
63 changes: 48 additions & 15 deletions arch/arm/boot/dts/db8500.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,83 +55,101 @@

gpio0: gpio@8012e000 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8012e000 0x80>;
interrupts = <0 119 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <0>;
};

gpio1: gpio@8012e080 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8012e080 0x80>;
interrupts = <0 120 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <1>;
};

gpio2: gpio@8000e000 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8000e000 0x80>;
interrupts = <0 121 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <2>;
};

gpio3: gpio@8000e080 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8000e080 0x80>;
interrupts = <0 122 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <3>;
};

gpio4: gpio@8000e100 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8000e100 0x80>;
interrupts = <0 123 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <4>;
};

gpio5: gpio@8000e180 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8000e180 0x80>;
interrupts = <0 124 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <5>;
};

gpio6: gpio@8011e000 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8011e000 0x80>;
interrupts = <0 125 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <6>;
};

gpio7: gpio@8011e080 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0x8011e080 0x80>;
interrupts = <0 126 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <7>;
};

gpio8: gpio@a03fe000 {
compatible = "stericsson,db8500-gpio",
"stmicroelectronics,nomadik-gpio";
"st,nomadik-gpio";
reg = <0xa03fe000 0x80>;
interrupts = <0 127 0x4>;
supports-sleepmode;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <8>;
};

usb@a03e0000 {
Expand All @@ -153,7 +171,13 @@
reg = <0x80157000 0x1000>;
interrupts = <46 47>;
#address-cells = <1>;
#size-cells = <0>;
#size-cells = <1>;
ranges;

prcmu-timer-4@80157450 {
compatible = "stericsson,db8500-prcmu-timer-4";
reg = <0x80157450 0xC>;
};

ab8500@5 {
compatible = "stericsson,ab8500";
Expand All @@ -163,39 +187,39 @@
};

i2c@80004000 {
compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
compatible = "stericsson,db8500-i2c", "st,nomadik-i2c";
reg = <0x80004000 0x1000>;
interrupts = <0 21 0x4>;
#address-cells = <1>;
#size-cells = <0>;
};

i2c@80122000 {
compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
compatible = "stericsson,db8500-i2c", "st,nomadik-i2c";
reg = <0x80122000 0x1000>;
interrupts = <0 22 0x4>;
#address-cells = <1>;
#size-cells = <0>;
};

i2c@80128000 {
compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
compatible = "stericsson,db8500-i2c", "st,nomadik-i2c";
reg = <0x80128000 0x1000>;
interrupts = <0 55 0x4>;
#address-cells = <1>;
#size-cells = <0>;
};

i2c@80110000 {
compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
compatible = "stericsson,db8500-i2c", "st,nomadik-i2c";
reg = <0x80110000 0x1000>;
interrupts = <0 12 0x4>;
#address-cells = <1>;
#size-cells = <0>;
};

i2c@8012a000 {
compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c";
compatible = "stericsson,db8500-i2c", "st,nomadik-i2c";
reg = <0x8012a000 0x1000>;
interrupts = <0 51 0x4>;
#address-cells = <1>;
Expand Down Expand Up @@ -270,5 +294,14 @@
interrupts = <0 100 0x4>;
status = "disabled";
};

external-bus@50000000 {
compatible = "simple-bus";
reg = <0x50000000 0x4000000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x50000000 0x4000000>;
status = "disabled";
};
};
};
40 changes: 21 additions & 19 deletions arch/arm/boot/dts/snowball.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,35 @@
wakeup = <1>;
linux,code = <2>;
label = "userpb";
gpios = <&gpio1 0>;
gpios = <&gpio1 0 0>;
};
button@2 {
debounce_interval = <50>;
wakeup = <1>;
linux,code = <3>;
label = "userpb";
gpios = <&gpio4 23>;
label = "extkb1";
gpios = <&gpio4 23 0>;
};
button@3 {
debounce_interval = <50>;
wakeup = <1>;
linux,code = <4>;
label = "userpb";
gpios = <&gpio4 23>;
label = "extkb2";
gpios = <&gpio4 24 0>;
};
button@4 {
debounce_interval = <50>;
wakeup = <1>;
linux,code = <5>;
label = "userpb";
gpios = <&gpio5 1>;
label = "extkb3";
gpios = <&gpio5 1 0>;
};
button@5 {
debounce_interval = <50>;
wakeup = <1>;
linux,code = <6>;
label = "userpb";
gpios = <&gpio5 2>;
label = "extkb4";
gpios = <&gpio5 2 0>;
};
};

Expand All @@ -73,17 +73,19 @@
soc-u9500 {

external-bus@50000000 {
compatible = "simple-bus";
reg = <0x50000000 0x10000000>;
#address-cells = <1>;
#size-cells = <1>;
ranges;

ethernet@50000000 {
compatible = "smsc,9111";
reg = <0x50000000 0x10000>;
interrupts = <12>;
status = "okay";

ethernet@0 {
compatible = "smsc,lan9115";
reg = <0 0x10000>;
interrupts = <12 0x1>;
interrupt-parent = <&gpio4>;

reg-shift = <1>;
reg-io-width = <2>;
smsc,force-internal-phy;
smsc,irq-active-high;
smsc,irq-push-pull;
};
};

Expand Down
5 changes: 3 additions & 2 deletions arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,10 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
{},
};

static const struct of_device_id u8500_soc_node[] = {
static const struct of_device_id u8500_local_bus_nodes[] = {
/* only create devices below soc node */
{ .compatible = "stericsson,db8500", },
{ .compatible = "simple-bus"},
{ },
};

Expand All @@ -774,7 +775,7 @@ static void __init u8500_init_machine(void)
snowball_platform_devs[i]->dev.parent = parent;

/* automatically probe child nodes of db8500 device */
of_platform_populate(NULL, u8500_soc_node, u8500_auxdata_lookup, parent);
of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);

if (of_machine_is_compatible("st-ericsson,mop500")) {
mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
Expand Down

0 comments on commit e86bde3

Please sign in to comment.