Skip to content

Commit

Permalink
Merge tag 'nmk-dt-on-cleanups' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/linusw/linux-nomadik into next/dt

From Linus Walleij:
Nomadik Device Tree conversion rebased on ARM SoC cleanup branch

This patch set converts the Nomadik (mach-nomadik) to
Device Tree and delete the old board files, paving the
road for single zImage.

* tag 'nmk-dt-on-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik:
  ARM: nomadik: get rid of <mach/hardware.h>
  ARM: nomadik: delete old board files
  ARM: nomadik: add I2C devices to the device tree
  ARM: nomadik: migrate MMC/SD card support to device tree
  ARM: nomadik: convert SMSC91x ethernet to device tree
  ARM: nomadik: move GPIO and pinctrl to device tree
  ARM: nomadik: add FSMC NAND
  ARM: nomadik: move remaining PrimeCells to device tree
  ARM: nomadik: move pin maps to cpu file
  ARM: nomadik: initial devicetree support
  ARM: nomadik: move last custom calls to pinctrl

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Jan 29, 2013
2 parents 440f39a + dea3eac commit a6f243a
Show file tree
Hide file tree
Showing 17 changed files with 588 additions and 647 deletions.
27 changes: 27 additions & 0 deletions Documentation/devicetree/bindings/arm/ste-nomadik.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ST-Ericsson Nomadik Device Tree Bindings

For various board the "board" node may contain specific properties
that pertain to this particular board, such as board-specific GPIOs.

Boards with the Nomadik SoC include:

S8815 "MiniKit" manufactured by Calao Systems:

Required root node property:

compatible="calaosystems,usb-s8815";

Required node: usb-s8815

Example:

usb-s8815 {
ethernet-gpio {
gpios = <&gpio3 19 0x1>;
interrupts = <19 0x1>;
interrupt-parent = <&gpio3>;
};
mmcsd-gpio {
gpios = <&gpio3 16 0x1>;
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/mtd/fsmc-nand.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* FSMC NAND

Required properties:
- compatible : "st,spear600-fsmc-nand"
- compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand"
- reg : Address range of the mtd chip
- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -899,10 +899,12 @@ config ARCH_NOMADIK
select ARCH_REQUIRE_GPIOLIB
select ARM_AMBA
select ARM_VIC
select CLKSRC_NOMADIK_MTU
select COMMON_CLK
select CPU_ARM926T
select GENERIC_CLOCKEVENTS
select MIGHT_HAVE_CACHE_L2X0
select OF
select PINCTRL
select PINCTRL_STN8815
select SPARSE_IRQ
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \
imx28-m28evk.dtb \
imx28-sps1.dtb \
imx28-tx28.dtb
dtb-$(CONFIG_ARCH_NOMADIK) += ste-nomadik-s8815.dtb
dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
omap3-beagle.dtb \
omap3-beagle-xm.dtb \
Expand Down
30 changes: 30 additions & 0 deletions arch/arm/boot/dts/ste-nomadik-s8815.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Device Tree for the ST-Ericsson Nomadik S8815 board
* Produced by Calao Systems
*/

/dts-v1/;
/include/ "ste-nomadik-stn8815.dtsi"

/ {
model = "Calao Systems USB-S8815";
compatible = "calaosystems,usb-s8815";

chosen {
bootargs = "root=/dev/ram0 console=ttyAMA1,115200n8 earlyprintk";
};

/* Custom board node with GPIO pins to active etc */
usb-s8815 {
/* The S8815 is using this very GPIO pin for the SMSC91x IRQs */
ethernet-gpio {
gpios = <&gpio3 19 0x1>;
interrupts = <19 0x1>;
interrupt-parent = <&gpio3>;
};
/* This will bias the MMC/SD card detect line */
mmcsd-gpio {
gpios = <&gpio3 16 0x1>;
};
};
};
256 changes: 256 additions & 0 deletions arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
/*
* Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC
*/
/include/ "skeleton.dtsi"

/ {
#address-cells = <1>;
#size-cells = <1>;

memory {
reg = <0x00000000 0x04000000>,
<0x08000000 0x04000000>;
};

L2: l2-cache {
compatible = "arm,l210-cache";
reg = <0x10210000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <30>;
cache-unified;
cache-level = <2>;
};

mtu0 {
/* Nomadik system timer */
reg = <0x101e2000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <4>;
};

mtu1 {
/* Secondary timer */
reg = <0x101e3000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <5>;
};

gpio0: gpio@101e4000 {
compatible = "st,nomadik-gpio";
reg = <0x101e4000 0x80>;
interrupt-parent = <&vica>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <0>;
};

gpio1: gpio@101e5000 {
compatible = "st,nomadik-gpio";
reg = <0x101e5000 0x80>;
interrupt-parent = <&vica>;
interrupts = <7>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <1>;
};

gpio2: gpio@101e6000 {
compatible = "st,nomadik-gpio";
reg = <0x101e6000 0x80>;
interrupt-parent = <&vica>;
interrupts = <8>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <2>;
};

gpio3: gpio@101e7000 {
compatible = "st,nomadik-gpio";
reg = <0x101e7000 0x80>;
interrupt-parent = <&vica>;
interrupts = <9>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
gpio-bank = <3>;
};

pinctrl {
compatible = "stericsson,nmk-pinctrl-stn8815";
};

/* A NAND flash of 128 MiB */
fsmc: flash@40000000 {
compatible = "stericsson,fsmc-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x10100000 0x1000>, /* FSMC Register*/
<0x40000000 0x2000>, /* NAND Base DATA */
<0x41000000 0x2000>, /* NAND Base ADDR */
<0x40800000 0x2000>; /* NAND Base CMD */
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
status = "okay";

partition@0 {
label = "X-Loader(NAND)";
reg = <0x0 0x40000>;
};
partition@40000 {
label = "MemInit(NAND)";
reg = <0x40000 0x40000>;
};
partition@80000 {
label = "BootLoader(NAND)";
reg = <0x80000 0x200000>;
};
partition@280000 {
label = "Kernel zImage(NAND)";
reg = <0x280000 0x300000>;
};
partition@580000 {
label = "Root Filesystem(NAND)";
reg = <0x580000 0x1600000>;
};
partition@1b80000 {
label = "User Filesystem(NAND)";
reg = <0x1b80000 0x6480000>;
};
};

external-bus@34000000 {
compatible = "simple-bus";
reg = <0x34000000 0x1000000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x34000000 0x1000000>;
ethernet@300 {
compatible = "smsc,lan91c111";
reg = <0x300 0x0fd00>;
};
};

/* I2C0 connected to the STw4811 power management chip */
i2c0 {
compatible = "i2c-gpio";
gpios = <&gpio1 31 0>, /* sda */
<&gpio1 30 0>; /* scl */
#address-cells = <1>;
#size-cells = <0>;

stw4811@2d {
compatible = "st,stw4811";
reg = <0x2d>;
};
};

/* I2C1 connected to various sensors */
i2c1 {
compatible = "i2c-gpio";
gpios = <&gpio1 22 0>, /* sda */
<&gpio1 21 0>; /* scl */
#address-cells = <1>;
#size-cells = <0>;

camera@2d {
compatible = "st,camera";
reg = <0x10>;
};
stw5095@1a {
compatible = "st,stw5095";
reg = <0x1a>;
};
lis3lv02dl@1d {
compatible = "st,lis3lv02dl";
reg = <0x1d>;
};
};

/* I2C2 connected to the USB portions of the STw4811 only */
i2c2 {
compatible = "i2c-gpio";
gpios = <&gpio2 10 0>, /* sda */
<&gpio2 9 0>; /* scl */
#address-cells = <1>;
#size-cells = <0>;
stw4811@2d {
compatible = "st,stw4811-usb";
reg = <0x2d>;
};
};

amba {
compatible = "arm,amba-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;

vica: intc@0x10140000 {
compatible = "arm,versatile-vic";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x10140000 0x20>;
};

vicb: intc@0x10140020 {
compatible = "arm,versatile-vic";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x10140020 0x20>;
};

uart0: uart@101fd000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x101fd000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <12>;
};

uart1: uart@101fb000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x101fb000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <17>;
};

uart2: uart@101f2000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x101f2000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <28>;
status = "disabled";
};

rng: rng@101b0000 {
compatible = "arm,primecell";
reg = <0x101b0000 0x1000>;
};

rtc: rtc@101e8000 {
compatible = "arm,pl031", "arm,primecell";
reg = <0x101e8000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <10>;
};

mmcsd: sdi@101f6000 {
compatible = "arm,pl18x", "arm,primecell";
reg = <0x101f6000 0x1000>;
interrupt-parent = <&vica>;
interrupts = <22>;
max-frequency = <48000000>;
bus-width = <4>;
mmc-cap-mmc-highspeed;
mmc-cap-sd-highspeed;
cd-gpios = <&gpio3 15 0x1>;
cd-inverted;
};
};
};
10 changes: 2 additions & 8 deletions arch/arm/mach-nomadik/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@ menu "Nomadik boards"

config MACH_NOMADIK_8815NHK
bool "ST 8815 Nomadik Hardware Kit (evaluation board)"
select CLKSRC_NOMADIK_MTU
select NOMADIK_8815
select I2C
select I2C_ALGOBIT

endmenu

config NOMADIK_8815
bool

config I2C_BITBANG_8815NHK
tristate "Driver for bit-bang busses found on the 8815 NHK"
depends on I2C && MACH_NOMADIK_8815NHK
depends on PINCTRL_NOMADIK
default y
select I2C_ALGOBIT

endif
6 changes: 0 additions & 6 deletions arch/arm/mach-nomadik/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@

# Cpu revision
obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o

# Specific board support
obj-$(CONFIG_MACH_NOMADIK_8815NHK) += board-nhk8815.o

# Nomadik extra devices
obj-$(CONFIG_I2C_BITBANG_8815NHK) += i2c-8815nhk.o
Loading

0 comments on commit a6f243a

Please sign in to comment.