diff options
138 files changed, 7736 insertions, 2906 deletions
diff --git a/Documentation/arm/SPEAr/overview.txt b/Documentation/arm/SPEAr/overview.txt index 253a35c6f782..28a9af953b9d 100644 --- a/Documentation/arm/SPEAr/overview.txt +++ b/Documentation/arm/SPEAr/overview.txt | |||
@@ -17,14 +17,14 @@ Introduction | |||
17 | SPEAr (Platform) | 17 | SPEAr (Platform) |
18 | - SPEAr3XX (3XX SOC series, based on ARM9) | 18 | - SPEAr3XX (3XX SOC series, based on ARM9) |
19 | - SPEAr300 (SOC) | 19 | - SPEAr300 (SOC) |
20 | - SPEAr300_EVB (Evaluation Board) | 20 | - SPEAr300 Evaluation Board |
21 | - SPEAr310 (SOC) | 21 | - SPEAr310 (SOC) |
22 | - SPEAr310_EVB (Evaluation Board) | 22 | - SPEAr310 Evaluation Board |
23 | - SPEAr320 (SOC) | 23 | - SPEAr320 (SOC) |
24 | - SPEAr320_EVB (Evaluation Board) | 24 | - SPEAr320 Evaluation Board |
25 | - SPEAr6XX (6XX SOC series, based on ARM9) | 25 | - SPEAr6XX (6XX SOC series, based on ARM9) |
26 | - SPEAr600 (SOC) | 26 | - SPEAr600 (SOC) |
27 | - SPEAr600_EVB (Evaluation Board) | 27 | - SPEAr600 Evaluation Board |
28 | - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9) | 28 | - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9) |
29 | - SPEAr1300 (SOC) | 29 | - SPEAr1300 (SOC) |
30 | 30 | ||
@@ -51,10 +51,11 @@ Introduction | |||
51 | Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c and for | 51 | Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c and for |
52 | spear6xx is mach-spear6xx/spear6xx.c. mach-spear* also contain soc/machine | 52 | spear6xx is mach-spear6xx/spear6xx.c. mach-spear* also contain soc/machine |
53 | specific files, like spear300.c, spear310.c, spear320.c and spear600.c. | 53 | specific files, like spear300.c, spear310.c, spear320.c and spear600.c. |
54 | mach-spear* also contains board specific files for each machine type. | 54 | mach-spear* doesn't contains board specific files as they fully support |
55 | Flattened Device Tree. | ||
55 | 56 | ||
56 | 57 | ||
57 | Document Author | 58 | Document Author |
58 | --------------- | 59 | --------------- |
59 | 60 | ||
60 | Viresh Kumar, (c) 2010 ST Microelectronics | 61 | Viresh Kumar <viresh.kumar@st.com>, (c) 2010-2012 ST Microelectronics |
diff --git a/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt b/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt new file mode 100644 index 000000000000..539adca19e8f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | * NXP LPC32xx Main Interrupt Controller | ||
2 | (MIC, including SIC1 and SIC2 secondary controllers) | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: Should be "nxp,lpc3220-mic" | ||
6 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
7 | - interrupt-parent: Empty for the interrupt controller itself | ||
8 | - #interrupt-cells: The number of cells to define the interrupts. Should be 2. | ||
9 | The first cell is the IRQ number | ||
10 | The second cell is used to specify mode: | ||
11 | 1 = low-to-high edge triggered | ||
12 | 2 = high-to-low edge triggered | ||
13 | 4 = active high level-sensitive | ||
14 | 8 = active low level-sensitive | ||
15 | Default for internal sources should be set to 4 (active high). | ||
16 | - reg: Should contain MIC registers location and length | ||
17 | |||
18 | Examples: | ||
19 | /* | ||
20 | * MIC | ||
21 | */ | ||
22 | mic: interrupt-controller@40008000 { | ||
23 | compatible = "nxp,lpc3220-mic"; | ||
24 | interrupt-controller; | ||
25 | interrupt-parent; | ||
26 | #interrupt-cells = <2>; | ||
27 | reg = <0x40008000 0xC000>; | ||
28 | }; | ||
29 | |||
30 | /* | ||
31 | * ADC | ||
32 | */ | ||
33 | adc@40048000 { | ||
34 | compatible = "nxp,lpc3220-adc"; | ||
35 | reg = <0x40048000 0x1000>; | ||
36 | interrupt-parent = <&mic>; | ||
37 | interrupts = <39 4>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/lpc32xx.txt b/Documentation/devicetree/bindings/arm/lpc32xx.txt new file mode 100644 index 000000000000..56ec8ddc4a3b --- /dev/null +++ b/Documentation/devicetree/bindings/arm/lpc32xx.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | NXP LPC32xx Platforms Device Tree Bindings | ||
2 | ------------------------------------------ | ||
3 | |||
4 | Boards with the NXP LPC32xx SoC shall have the following properties: | ||
5 | |||
6 | Required root node property: | ||
7 | |||
8 | compatible: must be "nxp,lpc3220", "nxp,lpc3230", "nxp,lpc3240" or "nxp,lpc3250" | ||
diff --git a/Documentation/devicetree/bindings/arm/mrvl/intc.txt b/Documentation/devicetree/bindings/arm/mrvl/intc.txt new file mode 100644 index 000000000000..80b9a94d9a23 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mrvl/intc.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | * Marvell MMP Interrupt controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "mrvl,mmp-intc", "mrvl,mmp2-intc" or | ||
5 | "mrvl,mmp2-mux-intc" | ||
6 | - reg : Address and length of the register set of the interrupt controller. | ||
7 | If the interrupt controller is intc, address and length means the range | ||
8 | of the whold interrupt controller. If the interrupt controller is mux-intc, | ||
9 | address and length means one register. Since address of mux-intc is in the | ||
10 | range of intc. mux-intc is secondary interrupt controller. | ||
11 | - reg-names : Name of the register set of the interrupt controller. It's | ||
12 | only required in mux-intc interrupt controller. | ||
13 | - interrupts : Should be the port interrupt shared by mux interrupts. It's | ||
14 | only required in mux-intc interrupt controller. | ||
15 | - interrupt-controller : Identifies the node as an interrupt controller. | ||
16 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
17 | interrupt source. | ||
18 | - mrvl,intc-nr-irqs : Specifies the number of interrupts in the interrupt | ||
19 | controller. | ||
20 | - mrvl,clr-mfp-irq : Specifies the interrupt that needs to clear MFP edge | ||
21 | detection first. | ||
22 | |||
23 | Example: | ||
24 | intc: interrupt-controller@d4282000 { | ||
25 | compatible = "mrvl,mmp2-intc"; | ||
26 | interrupt-controller; | ||
27 | #interrupt-cells = <1>; | ||
28 | reg = <0xd4282000 0x1000>; | ||
29 | mrvl,intc-nr-irqs = <64>; | ||
30 | }; | ||
31 | |||
32 | intcmux4@d4282150 { | ||
33 | compatible = "mrvl,mmp2-mux-intc"; | ||
34 | interrupts = <4>; | ||
35 | interrupt-controller; | ||
36 | #interrupt-cells = <1>; | ||
37 | reg = <0x150 0x4>, <0x168 0x4>; | ||
38 | reg-names = "mux status", "mux mask"; | ||
39 | mrvl,intc-nr-irqs = <2>; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/mrvl.txt b/Documentation/devicetree/bindings/arm/mrvl/mrvl.txt index d8de933e9d81..117d741a2e4f 100644 --- a/Documentation/devicetree/bindings/arm/mrvl.txt +++ b/Documentation/devicetree/bindings/arm/mrvl/mrvl.txt | |||
@@ -4,3 +4,11 @@ Marvell Platforms Device Tree Bindings | |||
4 | PXA168 Aspenite Board | 4 | PXA168 Aspenite Board |
5 | Required root node properties: | 5 | Required root node properties: |
6 | - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; | 6 | - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; |
7 | |||
8 | PXA910 DKB Board | ||
9 | Required root node properties: | ||
10 | - compatible = "mrvl,pxa910-dkb"; | ||
11 | |||
12 | MMP2 Brownstone Board | ||
13 | Required root node properties: | ||
14 | - compatible = "mrvl,mmp2-brownstone"; | ||
diff --git a/Documentation/devicetree/bindings/arm/mrvl/timer.txt b/Documentation/devicetree/bindings/arm/mrvl/timer.txt new file mode 100644 index 000000000000..9a6e251462e7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mrvl/timer.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | * Marvell MMP Timer controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "mrvl,mmp-timer". | ||
5 | - reg : Address and length of the register set of timer controller. | ||
6 | - interrupts : Should be the interrupt number. | ||
7 | |||
8 | Example: | ||
9 | timer0: timer@d4014000 { | ||
10 | compatible = "mrvl,mmp-timer"; | ||
11 | reg = <0xd4014000 0x100>; | ||
12 | interrupts = <13>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/spear.txt b/Documentation/devicetree/bindings/arm/spear.txt index f8e54f092328..aa5f355cc947 100644 --- a/Documentation/devicetree/bindings/arm/spear.txt +++ b/Documentation/devicetree/bindings/arm/spear.txt | |||
@@ -6,3 +6,21 @@ Boards with the ST SPEAr600 SoC shall have the following properties: | |||
6 | Required root node property: | 6 | Required root node property: |
7 | 7 | ||
8 | compatible = "st,spear600"; | 8 | compatible = "st,spear600"; |
9 | |||
10 | Boards with the ST SPEAr300 SoC shall have the following properties: | ||
11 | |||
12 | Required root node property: | ||
13 | |||
14 | compatible = "st,spear300"; | ||
15 | |||
16 | Boards with the ST SPEAr310 SoC shall have the following properties: | ||
17 | |||
18 | Required root node property: | ||
19 | |||
20 | compatible = "st,spear310"; | ||
21 | |||
22 | Boards with the ST SPEAr320 SoC shall have the following properties: | ||
23 | |||
24 | Required root node property: | ||
25 | |||
26 | compatible = "st,spear320"; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-nmk.txt b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt new file mode 100644 index 000000000000..ee87467ad8d6 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-nmk.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | Nomadik GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "st,nomadik-gpio". | ||
5 | - reg : Physical base address and length of the controller's registers. | ||
6 | - interrupts : The interrupt outputs from the controller. | ||
7 | - #gpio-cells : Should be two: | ||
8 | The first cell is the pin number. | ||
9 | The second cell is used to specify optional parameters: | ||
10 | - bits[3:0] trigger type and level flags: | ||
11 | 1 = low-to-high edge triggered. | ||
12 | 2 = high-to-low edge triggered. | ||
13 | 4 = active high level-sensitive. | ||
14 | 8 = active low level-sensitive. | ||
15 | - gpio-controller : Marks the device node as a GPIO controller. | ||
16 | - interrupt-controller : Marks the device node as an interrupt controller. | ||
17 | - gpio-bank : Specifies which bank a controller owns. | ||
18 | - st,supports-sleepmode : Specifies whether controller can sleep or not | ||
19 | |||
20 | Example: | ||
21 | |||
22 | gpio1: gpio@8012e080 { | ||
23 | compatible = "st,nomadik-gpio"; | ||
24 | reg = <0x8012e080 0x80>; | ||
25 | interrupts = <0 120 0x4>; | ||
26 | #gpio-cells = <2>; | ||
27 | gpio-controller; | ||
28 | interrupt-controller; | ||
29 | supports-sleepmode; | ||
30 | gpio-bank = <1>; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt index 1e34cfe5ebea..05428f39d9ac 100644 --- a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt | |||
@@ -3,19 +3,25 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : Should be "mrvl,pxa-gpio" or "mrvl,mmp-gpio" | 4 | - compatible : Should be "mrvl,pxa-gpio" or "mrvl,mmp-gpio" |
5 | - reg : Address and length of the register set for the device | 5 | - reg : Address and length of the register set for the device |
6 | - interrupts : Should be the port interrupt shared by all gpio pins, if | 6 | - interrupts : Should be the port interrupt shared by all gpio pins. |
7 | - interrupt-name : Should be the name of irq resource. | 7 | There're three gpio interrupts in arch-pxa, and they're gpio0, |
8 | one number. | 8 | gpio1 and gpio_mux. There're only one gpio interrupt in arch-mmp, |
9 | gpio_mux. | ||
10 | - interrupt-name : Should be the name of irq resource. Each interrupt | ||
11 | binds its interrupt-name. | ||
12 | - interrupt-controller : Identifies the node as an interrupt controller. | ||
13 | - #interrupt-cells: Specifies the number of cells needed to encode an | ||
14 | interrupt source. | ||
9 | - gpio-controller : Marks the device node as a gpio controller. | 15 | - gpio-controller : Marks the device node as a gpio controller. |
10 | - #gpio-cells : Should be one. It is the pin number. | 16 | - #gpio-cells : Should be one. It is the pin number. |
11 | 17 | ||
12 | Example: | 18 | Example: |
13 | 19 | ||
14 | gpio: gpio@d4019000 { | 20 | gpio: gpio@d4019000 { |
15 | compatible = "mrvl,mmp-gpio", "mrvl,pxa-gpio"; | 21 | compatible = "mrvl,mmp-gpio"; |
16 | reg = <0xd4019000 0x1000>; | 22 | reg = <0xd4019000 0x1000>; |
17 | interrupts = <49>, <17>, <18>; | 23 | interrupts = <49>; |
18 | interrupt-name = "gpio_mux", "gpio0", "gpio1"; | 24 | interrupt-name = "gpio_mux"; |
19 | gpio-controller; | 25 | gpio-controller; |
20 | #gpio-cells = <1>; | 26 | #gpio-cells = <1>; |
21 | interrupt-controller; | 27 | interrupt-controller; |
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt index 071eb3caae91..b891ee218354 100644 --- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt | |||
@@ -3,34 +3,31 @@ | |||
3 | Required properties : | 3 | Required properties : |
4 | 4 | ||
5 | - reg : Offset and length of the register set for the device | 5 | - reg : Offset and length of the register set for the device |
6 | - compatible : should be "mrvl,mmp-twsi" where CHIP is the name of a | 6 | - compatible : should be "mrvl,mmp-twsi" where mmp is the name of a |
7 | compatible processor, e.g. pxa168, pxa910, mmp2, mmp3. | 7 | compatible processor, e.g. pxa168, pxa910, mmp2, mmp3. |
8 | For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required | 8 | For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required |
9 | as shown in the example below. | 9 | as shown in the example below. |
10 | 10 | ||
11 | Recommended properties : | 11 | Recommended properties : |
12 | 12 | ||
13 | - interrupts : <a b> where a is the interrupt number and b is a | 13 | - interrupts : the interrupt number |
14 | field that represents an encoding of the sense and level | ||
15 | information for the interrupt. This should be encoded based on | ||
16 | the information in section 2) depending on the type of interrupt | ||
17 | controller you have. | ||
18 | - interrupt-parent : the phandle for the interrupt controller that | 14 | - interrupt-parent : the phandle for the interrupt controller that |
19 | services interrupts for this device. | 15 | services interrupts for this device. If the parent is the default |
16 | interrupt controller in device tree, it could be ignored. | ||
20 | - mrvl,i2c-polling : Disable interrupt of i2c controller. Polling | 17 | - mrvl,i2c-polling : Disable interrupt of i2c controller. Polling |
21 | status register of i2c controller instead. | 18 | status register of i2c controller instead. |
22 | - mrvl,i2c-fast-mode : Enable fast mode of i2c controller. | 19 | - mrvl,i2c-fast-mode : Enable fast mode of i2c controller. |
23 | 20 | ||
24 | Examples: | 21 | Examples: |
25 | twsi1: i2c@d4011000 { | 22 | twsi1: i2c@d4011000 { |
26 | compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c"; | 23 | compatible = "mrvl,mmp-twsi"; |
27 | reg = <0xd4011000 0x1000>; | 24 | reg = <0xd4011000 0x1000>; |
28 | interrupts = <7>; | 25 | interrupts = <7>; |
29 | mrvl,i2c-fast-mode; | 26 | mrvl,i2c-fast-mode; |
30 | }; | 27 | }; |
31 | 28 | ||
32 | twsi2: i2c@d4025000 { | 29 | twsi2: i2c@d4025000 { |
33 | compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c"; | 30 | compatible = "mrvl,mmp-twsi"; |
34 | reg = <0xd4025000 0x1000>; | 31 | reg = <0xd4025000 0x1000>; |
35 | interrupts = <58>; | 32 | interrupts = <58>; |
36 | }; | 33 | }; |
diff --git a/Documentation/devicetree/bindings/i2c/pnx.txt b/Documentation/devicetree/bindings/i2c/pnx.txt new file mode 100644 index 000000000000..fe98ada33ee4 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/pnx.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | * NXP PNX I2C Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - reg: Offset and length of the register set for the device | ||
6 | - compatible: should be "nxp,pnx-i2c" | ||
7 | - interrupts: configure one interrupt line | ||
8 | - #address-cells: always 1 (for i2c addresses) | ||
9 | - #size-cells: always 0 | ||
10 | - interrupt-parent: the phandle for the interrupt controller that | ||
11 | services interrupts for this device. | ||
12 | |||
13 | Optional properties: | ||
14 | |||
15 | - clock-frequency: desired I2C bus clock frequency in Hz, Default: 100000 Hz | ||
16 | |||
17 | Examples: | ||
18 | |||
19 | i2c1: i2c@400a0000 { | ||
20 | compatible = "nxp,pnx-i2c"; | ||
21 | reg = <0x400a0000 0x100>; | ||
22 | interrupt-parent = <&mic>; | ||
23 | interrupts = <51 0>; | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <0>; | ||
26 | }; | ||
27 | |||
28 | i2c2: i2c@400a8000 { | ||
29 | compatible = "nxp,pnx-i2c"; | ||
30 | reg = <0x400a8000 0x100>; | ||
31 | interrupt-parent = <&mic>; | ||
32 | interrupts = <50 0>; | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <0>; | ||
35 | clock-frequency = <100000>; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/lpc-eth.txt b/Documentation/devicetree/bindings/net/lpc-eth.txt new file mode 100644 index 000000000000..585021acd178 --- /dev/null +++ b/Documentation/devicetree/bindings/net/lpc-eth.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * NXP LPC32xx SoC Ethernet Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "nxp,lpc-eth" | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupts: Should contain ethernet controller interrupt | ||
7 | |||
8 | Optional properties: | ||
9 | - phy-mode: String, operation mode of the PHY interface. | ||
10 | Supported values are: "mii", "rmii" (default) | ||
11 | - use-iram: Use LPC32xx internal SRAM (IRAM) for DMA buffering | ||
12 | - local-mac-address : 6 bytes, mac address | ||
13 | |||
14 | Example: | ||
15 | |||
16 | mac: ethernet@31060000 { | ||
17 | compatible = "nxp,lpc-eth"; | ||
18 | reg = <0x31060000 0x1000>; | ||
19 | interrupt-parent = <&mic>; | ||
20 | interrupts = <29 0>; | ||
21 | |||
22 | phy-mode = "rmii"; | ||
23 | use-iram; | ||
24 | }; | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 64ae22c4fce7..82936f63cf16 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -571,6 +571,7 @@ config ARCH_LPC32XX | |||
571 | select USB_ARCH_HAS_OHCI | 571 | select USB_ARCH_HAS_OHCI |
572 | select CLKDEV_LOOKUP | 572 | select CLKDEV_LOOKUP |
573 | select GENERIC_CLOCKEVENTS | 573 | select GENERIC_CLOCKEVENTS |
574 | select USE_OF | ||
574 | help | 575 | help |
575 | Support for the NXP LPC32XX family of processors | 576 | Support for the NXP LPC32XX family of processors |
576 | 577 | ||
@@ -606,6 +607,7 @@ config ARCH_MMP | |||
606 | select CLKDEV_LOOKUP | 607 | select CLKDEV_LOOKUP |
607 | select GENERIC_CLOCKEVENTS | 608 | select GENERIC_CLOCKEVENTS |
608 | select GPIO_PXA | 609 | select GPIO_PXA |
610 | select IRQ_DOMAIN | ||
609 | select PLAT_PXA | 611 | select PLAT_PXA |
610 | select SPARSE_IRQ | 612 | select SPARSE_IRQ |
611 | select GENERIC_ALLOCATOR | 613 | select GENERIC_ALLOCATOR |
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi new file mode 100644 index 000000000000..f449efc9825f --- /dev/null +++ b/arch/arm/boot/dts/at91sam9260.dtsi | |||
@@ -0,0 +1,273 @@ | |||
1 | /* | ||
2 | * at91sam9260.dtsi - Device Tree Include file for AT91SAM9260 family SoC | ||
3 | * | ||
4 | * Copyright (C) 2011 Atmel, | ||
5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>, | ||
6 | * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
7 | * | ||
8 | * Licensed under GPLv2 or later. | ||
9 | */ | ||
10 | |||
11 | /include/ "skeleton.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Atmel AT91SAM9260 family SoC"; | ||
15 | compatible = "atmel,at91sam9260"; | ||
16 | interrupt-parent = <&aic>; | ||
17 | |||
18 | aliases { | ||
19 | serial0 = &dbgu; | ||
20 | serial1 = &usart0; | ||
21 | serial2 = &usart1; | ||
22 | serial3 = &usart2; | ||
23 | serial4 = &usart3; | ||
24 | serial5 = &usart4; | ||
25 | serial6 = &usart5; | ||
26 | gpio0 = &pioA; | ||
27 | gpio1 = &pioB; | ||
28 | gpio2 = &pioC; | ||
29 | tcb0 = &tcb0; | ||
30 | tcb1 = &tcb1; | ||
31 | }; | ||
32 | cpus { | ||
33 | cpu@0 { | ||
34 | compatible = "arm,arm926ejs"; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | memory { | ||
39 | reg = <0x20000000 0x04000000>; | ||
40 | }; | ||
41 | |||
42 | ahb { | ||
43 | compatible = "simple-bus"; | ||
44 | #address-cells = <1>; | ||
45 | #size-cells = <1>; | ||
46 | ranges; | ||
47 | |||
48 | apb { | ||
49 | compatible = "simple-bus"; | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <1>; | ||
52 | ranges; | ||
53 | |||
54 | aic: interrupt-controller@fffff000 { | ||
55 | #interrupt-cells = <2>; | ||
56 | compatible = "atmel,at91rm9200-aic"; | ||
57 | interrupt-controller; | ||
58 | reg = <0xfffff000 0x200>; | ||
59 | }; | ||
60 | |||
61 | ramc0: ramc@ffffea00 { | ||
62 | compatible = "atmel,at91sam9260-sdramc"; | ||
63 | reg = <0xffffea00 0x200>; | ||
64 | }; | ||
65 | |||
66 | pmc: pmc@fffffc00 { | ||
67 | compatible = "atmel,at91rm9200-pmc"; | ||
68 | reg = <0xfffffc00 0x100>; | ||
69 | }; | ||
70 | |||
71 | rstc@fffffd00 { | ||
72 | compatible = "atmel,at91sam9260-rstc"; | ||
73 | reg = <0xfffffd00 0x10>; | ||
74 | }; | ||
75 | |||
76 | shdwc@fffffd10 { | ||
77 | compatible = "atmel,at91sam9260-shdwc"; | ||
78 | reg = <0xfffffd10 0x10>; | ||
79 | }; | ||
80 | |||
81 | pit: timer@fffffd30 { | ||
82 | compatible = "atmel,at91sam9260-pit"; | ||
83 | reg = <0xfffffd30 0xf>; | ||
84 | interrupts = <1 4>; | ||
85 | }; | ||
86 | |||
87 | tcb0: timer@fffa0000 { | ||
88 | compatible = "atmel,at91rm9200-tcb"; | ||
89 | reg = <0xfffa0000 0x100>; | ||
90 | interrupts = <17 4 18 4 19 4>; | ||
91 | }; | ||
92 | |||
93 | tcb1: timer@fffdc000 { | ||
94 | compatible = "atmel,at91rm9200-tcb"; | ||
95 | reg = <0xfffdc000 0x100>; | ||
96 | interrupts = <26 4 27 4 28 4>; | ||
97 | }; | ||
98 | |||
99 | pioA: gpio@fffff400 { | ||
100 | compatible = "atmel,at91rm9200-gpio"; | ||
101 | reg = <0xfffff400 0x100>; | ||
102 | interrupts = <2 4>; | ||
103 | #gpio-cells = <2>; | ||
104 | gpio-controller; | ||
105 | interrupt-controller; | ||
106 | }; | ||
107 | |||
108 | pioB: gpio@fffff600 { | ||
109 | compatible = "atmel,at91rm9200-gpio"; | ||
110 | reg = <0xfffff600 0x100>; | ||
111 | interrupts = <3 4>; | ||
112 | #gpio-cells = <2>; | ||
113 | gpio-controller; | ||
114 | interrupt-controller; | ||
115 | }; | ||
116 | |||
117 | pioC: gpio@fffff800 { | ||
118 | compatible = "atmel,at91rm9200-gpio"; | ||
119 | reg = <0xfffff800 0x100>; | ||
120 | interrupts = <4 4>; | ||
121 | #gpio-cells = <2>; | ||
122 | gpio-controller; | ||
123 | interrupt-controller; | ||
124 | }; | ||
125 | |||
126 | dbgu: serial@fffff200 { | ||
127 | compatible = "atmel,at91sam9260-usart"; | ||
128 | reg = <0xfffff200 0x200>; | ||
129 | interrupts = <1 4>; | ||
130 | status = "disabled"; | ||
131 | }; | ||
132 | |||
133 | usart0: serial@fffb0000 { | ||
134 | compatible = "atmel,at91sam9260-usart"; | ||
135 | reg = <0xfffb0000 0x200>; | ||
136 | interrupts = <6 4>; | ||
137 | atmel,use-dma-rx; | ||
138 | atmel,use-dma-tx; | ||
139 | status = "disabled"; | ||
140 | }; | ||
141 | |||
142 | usart1: serial@fffb4000 { | ||
143 | compatible = "atmel,at91sam9260-usart"; | ||
144 | reg = <0xfffb4000 0x200>; | ||
145 | interrupts = <7 4>; | ||
146 | atmel,use-dma-rx; | ||
147 | atmel,use-dma-tx; | ||
148 | status = "disabled"; | ||
149 | }; | ||
150 | |||
151 | usart2: serial@fffb8000 { | ||
152 | compatible = "atmel,at91sam9260-usart"; | ||
153 | reg = <0xfffb8000 0x200>; | ||
154 | interrupts = <8 4>; | ||
155 | atmel,use-dma-rx; | ||
156 | atmel,use-dma-tx; | ||
157 | status = "disabled"; | ||
158 | }; | ||
159 | |||
160 | usart3: serial@fffd0000 { | ||
161 | compatible = "atmel,at91sam9260-usart"; | ||
162 | reg = <0xfffd0000 0x200>; | ||
163 | interrupts = <23 4>; | ||
164 | atmel,use-dma-rx; | ||
165 | atmel,use-dma-tx; | ||
166 | status = "disabled"; | ||
167 | }; | ||
168 | |||
169 | usart4: serial@fffd4000 { | ||
170 | compatible = "atmel,at91sam9260-usart"; | ||
171 | reg = <0xfffd4000 0x200>; | ||
172 | interrupts = <24 4>; | ||
173 | atmel,use-dma-rx; | ||
174 | atmel,use-dma-tx; | ||
175 | status = "disabled"; | ||
176 | }; | ||
177 | |||
178 | usart5: serial@fffd8000 { | ||
179 | compatible = "atmel,at91sam9260-usart"; | ||
180 | reg = <0xfffd8000 0x200>; | ||
181 | interrupts = <25 4>; | ||
182 | atmel,use-dma-rx; | ||
183 | atmel,use-dma-tx; | ||
184 | status = "disabled"; | ||
185 | }; | ||
186 | |||
187 | macb0: ethernet@fffc4000 { | ||
188 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | ||
189 | reg = <0xfffc4000 0x100>; | ||
190 | interrupts = <21 4>; | ||
191 | status = "disabled"; | ||
192 | }; | ||
193 | |||
194 | usb1: gadget@fffa4000 { | ||
195 | compatible = "atmel,at91rm9200-udc"; | ||
196 | reg = <0xfffa4000 0x4000>; | ||
197 | interrupts = <10 4>; | ||
198 | status = "disabled"; | ||
199 | }; | ||
200 | |||
201 | adc0: adc@fffe0000 { | ||
202 | compatible = "atmel,at91sam9260-adc"; | ||
203 | reg = <0xfffe0000 0x100>; | ||
204 | interrupts = <5 4>; | ||
205 | atmel,adc-use-external-triggers; | ||
206 | atmel,adc-channels-used = <0xf>; | ||
207 | atmel,adc-vref = <3300>; | ||
208 | atmel,adc-num-channels = <4>; | ||
209 | atmel,adc-startup-time = <15>; | ||
210 | atmel,adc-channel-base = <0x30>; | ||
211 | atmel,adc-drdy-mask = <0x10000>; | ||
212 | atmel,adc-status-register = <0x1c>; | ||
213 | atmel,adc-trigger-register = <0x04>; | ||
214 | |||
215 | trigger@0 { | ||
216 | trigger-name = "timer-counter-0"; | ||
217 | trigger-value = <0x1>; | ||
218 | }; | ||
219 | trigger@1 { | ||
220 | trigger-name = "timer-counter-1"; | ||
221 | trigger-value = <0x3>; | ||
222 | }; | ||
223 | |||
224 | trigger@2 { | ||
225 | trigger-name = "timer-counter-2"; | ||
226 | trigger-value = <0x5>; | ||
227 | }; | ||
228 | |||
229 | trigger@3 { | ||
230 | trigger-name = "external"; | ||
231 | trigger-value = <0x13>; | ||
232 | trigger-external; | ||
233 | }; | ||
234 | }; | ||
235 | }; | ||
236 | |||
237 | nand0: nand@40000000 { | ||
238 | compatible = "atmel,at91rm9200-nand"; | ||
239 | #address-cells = <1>; | ||
240 | #size-cells = <1>; | ||
241 | reg = <0x40000000 0x10000000 | ||
242 | 0xffffe800 0x200 | ||
243 | >; | ||
244 | atmel,nand-addr-offset = <21>; | ||
245 | atmel,nand-cmd-offset = <22>; | ||
246 | gpios = <&pioC 13 0 | ||
247 | &pioC 14 0 | ||
248 | 0 | ||
249 | >; | ||
250 | status = "disabled"; | ||
251 | }; | ||
252 | |||
253 | usb0: ohci@00500000 { | ||
254 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
255 | reg = <0x00500000 0x100000>; | ||
256 | interrupts = <20 4>; | ||
257 | status = "disabled"; | ||
258 | }; | ||
259 | }; | ||
260 | |||
261 | i2c@0 { | ||
262 | compatible = "i2c-gpio"; | ||
263 | gpios = <&pioA 23 0 /* sda */ | ||
264 | &pioA 24 0 /* scl */ | ||
265 | >; | ||
266 | i2c-gpio,sda-open-drain; | ||
267 | i2c-gpio,scl-open-drain; | ||
268 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
269 | #address-cells = <1>; | ||
270 | #size-cells = <0>; | ||
271 | status = "disabled"; | ||
272 | }; | ||
273 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi new file mode 100644 index 000000000000..0209913a65a2 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -0,0 +1,220 @@ | |||
1 | /* | ||
2 | * at91sam9263.dtsi - Device Tree Include file for AT91SAM9263 family SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 only. | ||
7 | */ | ||
8 | |||
9 | /include/ "skeleton.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9263 family SoC"; | ||
13 | compatible = "atmel,at91sam9263"; | ||
14 | interrupt-parent = <&aic>; | ||
15 | |||
16 | aliases { | ||
17 | serial0 = &dbgu; | ||
18 | serial1 = &usart0; | ||
19 | serial2 = &usart1; | ||
20 | serial3 = &usart2; | ||
21 | gpio0 = &pioA; | ||
22 | gpio1 = &pioB; | ||
23 | gpio2 = &pioC; | ||
24 | gpio3 = &pioD; | ||
25 | gpio4 = &pioE; | ||
26 | tcb0 = &tcb0; | ||
27 | }; | ||
28 | cpus { | ||
29 | cpu@0 { | ||
30 | compatible = "arm,arm926ejs"; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | memory { | ||
35 | reg = <0x20000000 0x08000000>; | ||
36 | }; | ||
37 | |||
38 | ahb { | ||
39 | compatible = "simple-bus"; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <1>; | ||
42 | ranges; | ||
43 | |||
44 | apb { | ||
45 | compatible = "simple-bus"; | ||
46 | #address-cells = <1>; | ||
47 | #size-cells = <1>; | ||
48 | ranges; | ||
49 | |||
50 | aic: interrupt-controller@fffff000 { | ||
51 | #interrupt-cells = <2>; | ||
52 | compatible = "atmel,at91rm9200-aic"; | ||
53 | interrupt-controller; | ||
54 | reg = <0xfffff000 0x200>; | ||
55 | }; | ||
56 | |||
57 | pmc: pmc@fffffc00 { | ||
58 | compatible = "atmel,at91rm9200-pmc"; | ||
59 | reg = <0xfffffc00 0x100>; | ||
60 | }; | ||
61 | |||
62 | ramc: ramc@ffffe200 { | ||
63 | compatible = "atmel,at91sam9260-sdramc"; | ||
64 | reg = <0xffffe200 0x200 | ||
65 | 0xffffe800 0x200>; | ||
66 | }; | ||
67 | |||
68 | pit: timer@fffffd30 { | ||
69 | compatible = "atmel,at91sam9260-pit"; | ||
70 | reg = <0xfffffd30 0xf>; | ||
71 | interrupts = <1 4>; | ||
72 | }; | ||
73 | |||
74 | tcb0: timer@fff7c000 { | ||
75 | compatible = "atmel,at91rm9200-tcb"; | ||
76 | reg = <0xfff7c000 0x100>; | ||
77 | interrupts = <19 4>; | ||
78 | }; | ||
79 | |||
80 | rstc@fffffd00 { | ||
81 | compatible = "atmel,at91sam9260-rstc"; | ||
82 | reg = <0xfffffd00 0x10>; | ||
83 | }; | ||
84 | |||
85 | shdwc@fffffd10 { | ||
86 | compatible = "atmel,at91sam9260-shdwc"; | ||
87 | reg = <0xfffffd10 0x10>; | ||
88 | }; | ||
89 | |||
90 | pioA: gpio@fffff200 { | ||
91 | compatible = "atmel,at91rm9200-gpio"; | ||
92 | reg = <0xfffff200 0x100>; | ||
93 | interrupts = <2 4>; | ||
94 | #gpio-cells = <2>; | ||
95 | gpio-controller; | ||
96 | interrupt-controller; | ||
97 | }; | ||
98 | |||
99 | pioB: gpio@fffff400 { | ||
100 | compatible = "atmel,at91rm9200-gpio"; | ||
101 | reg = <0xfffff400 0x100>; | ||
102 | interrupts = <3 4>; | ||
103 | #gpio-cells = <2>; | ||
104 | gpio-controller; | ||
105 | interrupt-controller; | ||
106 | }; | ||
107 | |||
108 | pioC: gpio@fffff600 { | ||
109 | compatible = "atmel,at91rm9200-gpio"; | ||
110 | reg = <0xfffff600 0x100>; | ||
111 | interrupts = <4 4>; | ||
112 | #gpio-cells = <2>; | ||
113 | gpio-controller; | ||
114 | interrupt-controller; | ||
115 | }; | ||
116 | |||
117 | pioD: gpio@fffff800 { | ||
118 | compatible = "atmel,at91rm9200-gpio"; | ||
119 | reg = <0xfffff800 0x100>; | ||
120 | interrupts = <4 4>; | ||
121 | #gpio-cells = <2>; | ||
122 | gpio-controller; | ||
123 | interrupt-controller; | ||
124 | }; | ||
125 | |||
126 | pioE: gpio@fffffa00 { | ||
127 | compatible = "atmel,at91rm9200-gpio"; | ||
128 | reg = <0xfffffa00 0x100>; | ||
129 | interrupts = <4 4>; | ||
130 | #gpio-cells = <2>; | ||
131 | gpio-controller; | ||
132 | interrupt-controller; | ||
133 | }; | ||
134 | |||
135 | dbgu: serial@ffffee00 { | ||
136 | compatible = "atmel,at91sam9260-usart"; | ||
137 | reg = <0xffffee00 0x200>; | ||
138 | interrupts = <1 4>; | ||
139 | status = "disabled"; | ||
140 | }; | ||
141 | |||
142 | usart0: serial@fff8c000 { | ||
143 | compatible = "atmel,at91sam9260-usart"; | ||
144 | reg = <0xfff8c000 0x200>; | ||
145 | interrupts = <7 4>; | ||
146 | atmel,use-dma-rx; | ||
147 | atmel,use-dma-tx; | ||
148 | status = "disabled"; | ||
149 | }; | ||
150 | |||
151 | usart1: serial@fff90000 { | ||
152 | compatible = "atmel,at91sam9260-usart"; | ||
153 | reg = <0xfff90000 0x200>; | ||
154 | interrupts = <8 4>; | ||
155 | atmel,use-dma-rx; | ||
156 | atmel,use-dma-tx; | ||
157 | status = "disabled"; | ||
158 | }; | ||
159 | |||
160 | usart2: serial@fff94000 { | ||
161 | compatible = "atmel,at91sam9260-usart"; | ||
162 | reg = <0xfff94000 0x200>; | ||
163 | interrupts = <9 4>; | ||
164 | atmel,use-dma-rx; | ||
165 | atmel,use-dma-tx; | ||
166 | status = "disabled"; | ||
167 | }; | ||
168 | |||
169 | macb0: ethernet@fffbc000 { | ||
170 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | ||
171 | reg = <0xfffbc000 0x100>; | ||
172 | interrupts = <21 4>; | ||
173 | status = "disabled"; | ||
174 | }; | ||
175 | |||
176 | usb1: gadget@fff78000 { | ||
177 | compatible = "atmel,at91rm9200-udc"; | ||
178 | reg = <0xfff78000 0x4000>; | ||
179 | interrupts = <24 4>; | ||
180 | status = "disabled"; | ||
181 | }; | ||
182 | }; | ||
183 | |||
184 | nand0: nand@40000000 { | ||
185 | compatible = "atmel,at91rm9200-nand"; | ||
186 | #address-cells = <1>; | ||
187 | #size-cells = <1>; | ||
188 | reg = <0x40000000 0x10000000 | ||
189 | 0xffffe000 0x200 | ||
190 | >; | ||
191 | atmel,nand-addr-offset = <21>; | ||
192 | atmel,nand-cmd-offset = <22>; | ||
193 | gpios = <&pioA 22 0 | ||
194 | &pioD 15 0 | ||
195 | 0 | ||
196 | >; | ||
197 | status = "disabled"; | ||
198 | }; | ||
199 | |||
200 | usb0: ohci@00a00000 { | ||
201 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
202 | reg = <0x00a00000 0x100000>; | ||
203 | interrupts = <29 4>; | ||
204 | status = "disabled"; | ||
205 | }; | ||
206 | }; | ||
207 | |||
208 | i2c@0 { | ||
209 | compatible = "i2c-gpio"; | ||
210 | gpios = <&pioB 4 0 /* sda */ | ||
211 | &pioB 5 0 /* scl */ | ||
212 | >; | ||
213 | i2c-gpio,sda-open-drain; | ||
214 | i2c-gpio,scl-open-drain; | ||
215 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
216 | #address-cells = <1>; | ||
217 | #size-cells = <0>; | ||
218 | status = "disabled"; | ||
219 | }; | ||
220 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts new file mode 100644 index 000000000000..f86ac4b609fc --- /dev/null +++ b/arch/arm/boot/dts/at91sam9263ek.dts | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * at91sam9263ek.dts - Device Tree file for Atmel at91sam9263 reference board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 only | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9263.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel at91sam9263ek"; | ||
13 | compatible = "atmel,at91sam9263ek", "atmel,at91sam9263", "atmel,at91sam9"; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; | ||
17 | }; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x20000000 0x4000000>; | ||
21 | }; | ||
22 | |||
23 | clocks { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | ranges; | ||
27 | |||
28 | main_clock: clock@0 { | ||
29 | compatible = "atmel,osc", "fixed-clock"; | ||
30 | clock-frequency = <16367660>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | ahb { | ||
35 | apb { | ||
36 | dbgu: serial@ffffee00 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | usart0: serial@fff8c000 { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | macb0: ethernet@fffbc000 { | ||
45 | phy-mode = "rmii"; | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | usb1: gadget@fff78000 { | ||
50 | atmel,vbus-gpio = <&pioA 25 0>; | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | }; | ||
54 | |||
55 | nand0: nand@40000000 { | ||
56 | nand-bus-width = <8>; | ||
57 | nand-ecc-mode = "soft"; | ||
58 | nand-on-flash-bbt = <1>; | ||
59 | status = "okay"; | ||
60 | |||
61 | at91bootstrap@0 { | ||
62 | label = "at91bootstrap"; | ||
63 | reg = <0x0 0x20000>; | ||
64 | }; | ||
65 | |||
66 | barebox@20000 { | ||
67 | label = "barebox"; | ||
68 | reg = <0x20000 0x40000>; | ||
69 | }; | ||
70 | |||
71 | bareboxenv@60000 { | ||
72 | label = "bareboxenv"; | ||
73 | reg = <0x60000 0x20000>; | ||
74 | }; | ||
75 | |||
76 | bareboxenv2@80000 { | ||
77 | label = "bareboxenv2"; | ||
78 | reg = <0x80000 0x20000>; | ||
79 | }; | ||
80 | |||
81 | oftree@80000 { | ||
82 | label = "oftree"; | ||
83 | reg = <0xa0000 0x20000>; | ||
84 | }; | ||
85 | |||
86 | kernel@a0000 { | ||
87 | label = "kernel"; | ||
88 | reg = <0xc0000 0x400000>; | ||
89 | }; | ||
90 | |||
91 | rootfs@4a0000 { | ||
92 | label = "rootfs"; | ||
93 | reg = <0x4c0000 0x7800000>; | ||
94 | }; | ||
95 | |||
96 | data@7ca0000 { | ||
97 | label = "data"; | ||
98 | reg = <0x7cc0000 0x8340000>; | ||
99 | }; | ||
100 | }; | ||
101 | |||
102 | usb0: ohci@00a00000 { | ||
103 | num-ports = <2>; | ||
104 | status = "okay"; | ||
105 | atmel,vbus-gpio = <&pioA 24 0 | ||
106 | &pioA 21 0 | ||
107 | >; | ||
108 | }; | ||
109 | }; | ||
110 | |||
111 | leds { | ||
112 | compatible = "gpio-leds"; | ||
113 | |||
114 | d3 { | ||
115 | label = "d3"; | ||
116 | gpios = <&pioB 7 0>; | ||
117 | linux,default-trigger = "heartbeat"; | ||
118 | }; | ||
119 | |||
120 | d2 { | ||
121 | label = "d2"; | ||
122 | gpios = <&pioC 29 1>; | ||
123 | linux,default-trigger = "nand-disk"; | ||
124 | }; | ||
125 | }; | ||
126 | |||
127 | gpio_keys { | ||
128 | compatible = "gpio-keys"; | ||
129 | #address-cells = <1>; | ||
130 | #size-cells = <0>; | ||
131 | |||
132 | left_click { | ||
133 | label = "left_click"; | ||
134 | gpios = <&pioC 5 1>; | ||
135 | linux,code = <272>; | ||
136 | gpio-key,wakeup; | ||
137 | }; | ||
138 | |||
139 | right_click { | ||
140 | label = "right_click"; | ||
141 | gpios = <&pioC 4 1>; | ||
142 | linux,code = <273>; | ||
143 | gpio-key,wakeup; | ||
144 | }; | ||
145 | }; | ||
146 | |||
147 | i2c@0 { | ||
148 | status = "okay"; | ||
149 | |||
150 | 24c512@50 { | ||
151 | compatible = "24c512"; | ||
152 | reg = <0x50>; | ||
153 | pagesize = <128>; | ||
154 | }; | ||
155 | }; | ||
156 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi index 773ef484037a..2a1d1ca8bd86 100644 --- a/arch/arm/boot/dts/at91sam9g20.dtsi +++ b/arch/arm/boot/dts/at91sam9g20.dtsi | |||
@@ -1,238 +1,26 @@ | |||
1 | /* | 1 | /* |
2 | * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC | 2 | * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC |
3 | * | 3 | * |
4 | * Copyright (C) 2011 Atmel, | 4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>, | ||
6 | * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
7 | * | 5 | * |
8 | * Licensed under GPLv2 or later. | 6 | * Licensed under GPLv2. |
9 | */ | 7 | */ |
10 | 8 | ||
11 | /include/ "skeleton.dtsi" | 9 | /include/ "at91sam9260.dtsi" |
12 | 10 | ||
13 | / { | 11 | / { |
14 | model = "Atmel AT91SAM9G20 family SoC"; | 12 | model = "Atmel AT91SAM9G20 family SoC"; |
15 | compatible = "atmel,at91sam9g20"; | 13 | compatible = "atmel,at91sam9g20"; |
16 | interrupt-parent = <&aic>; | ||
17 | |||
18 | aliases { | ||
19 | serial0 = &dbgu; | ||
20 | serial1 = &usart0; | ||
21 | serial2 = &usart1; | ||
22 | serial3 = &usart2; | ||
23 | serial4 = &usart3; | ||
24 | serial5 = &usart4; | ||
25 | serial6 = &usart5; | ||
26 | gpio0 = &pioA; | ||
27 | gpio1 = &pioB; | ||
28 | gpio2 = &pioC; | ||
29 | tcb0 = &tcb0; | ||
30 | tcb1 = &tcb1; | ||
31 | }; | ||
32 | cpus { | ||
33 | cpu@0 { | ||
34 | compatible = "arm,arm926ejs"; | ||
35 | }; | ||
36 | }; | ||
37 | 14 | ||
38 | memory { | 15 | memory { |
39 | reg = <0x20000000 0x08000000>; | 16 | reg = <0x20000000 0x08000000>; |
40 | }; | 17 | }; |
41 | 18 | ||
42 | ahb { | 19 | ahb { |
43 | compatible = "simple-bus"; | ||
44 | #address-cells = <1>; | ||
45 | #size-cells = <1>; | ||
46 | ranges; | ||
47 | |||
48 | apb { | 20 | apb { |
49 | compatible = "simple-bus"; | 21 | adc0: adc@fffe0000 { |
50 | #address-cells = <1>; | 22 | atmel,adc-startup-time = <40>; |
51 | #size-cells = <1>; | ||
52 | ranges; | ||
53 | |||
54 | aic: interrupt-controller@fffff000 { | ||
55 | #interrupt-cells = <2>; | ||
56 | compatible = "atmel,at91rm9200-aic"; | ||
57 | interrupt-controller; | ||
58 | reg = <0xfffff000 0x200>; | ||
59 | }; | ||
60 | |||
61 | ramc0: ramc@ffffea00 { | ||
62 | compatible = "atmel,at91sam9260-sdramc"; | ||
63 | reg = <0xffffea00 0x200>; | ||
64 | }; | ||
65 | |||
66 | pmc: pmc@fffffc00 { | ||
67 | compatible = "atmel,at91rm9200-pmc"; | ||
68 | reg = <0xfffffc00 0x100>; | ||
69 | }; | ||
70 | |||
71 | rstc@fffffd00 { | ||
72 | compatible = "atmel,at91sam9260-rstc"; | ||
73 | reg = <0xfffffd00 0x10>; | ||
74 | }; | ||
75 | |||
76 | shdwc@fffffd10 { | ||
77 | compatible = "atmel,at91sam9260-shdwc"; | ||
78 | reg = <0xfffffd10 0x10>; | ||
79 | }; | ||
80 | |||
81 | pit: timer@fffffd30 { | ||
82 | compatible = "atmel,at91sam9260-pit"; | ||
83 | reg = <0xfffffd30 0xf>; | ||
84 | interrupts = <1 4>; | ||
85 | }; | ||
86 | |||
87 | tcb0: timer@fffa0000 { | ||
88 | compatible = "atmel,at91rm9200-tcb"; | ||
89 | reg = <0xfffa0000 0x100>; | ||
90 | interrupts = <17 4 18 4 19 4>; | ||
91 | }; | ||
92 | |||
93 | tcb1: timer@fffdc000 { | ||
94 | compatible = "atmel,at91rm9200-tcb"; | ||
95 | reg = <0xfffdc000 0x100>; | ||
96 | interrupts = <26 4 27 4 28 4>; | ||
97 | }; | ||
98 | |||
99 | pioA: gpio@fffff400 { | ||
100 | compatible = "atmel,at91rm9200-gpio"; | ||
101 | reg = <0xfffff400 0x100>; | ||
102 | interrupts = <2 4>; | ||
103 | #gpio-cells = <2>; | ||
104 | gpio-controller; | ||
105 | interrupt-controller; | ||
106 | }; | ||
107 | |||
108 | pioB: gpio@fffff600 { | ||
109 | compatible = "atmel,at91rm9200-gpio"; | ||
110 | reg = <0xfffff600 0x100>; | ||
111 | interrupts = <3 4>; | ||
112 | #gpio-cells = <2>; | ||
113 | gpio-controller; | ||
114 | interrupt-controller; | ||
115 | }; | ||
116 | |||
117 | pioC: gpio@fffff800 { | ||
118 | compatible = "atmel,at91rm9200-gpio"; | ||
119 | reg = <0xfffff800 0x100>; | ||
120 | interrupts = <4 4>; | ||
121 | #gpio-cells = <2>; | ||
122 | gpio-controller; | ||
123 | interrupt-controller; | ||
124 | }; | ||
125 | |||
126 | dbgu: serial@fffff200 { | ||
127 | compatible = "atmel,at91sam9260-usart"; | ||
128 | reg = <0xfffff200 0x200>; | ||
129 | interrupts = <1 4>; | ||
130 | status = "disabled"; | ||
131 | }; | ||
132 | |||
133 | usart0: serial@fffb0000 { | ||
134 | compatible = "atmel,at91sam9260-usart"; | ||
135 | reg = <0xfffb0000 0x200>; | ||
136 | interrupts = <6 4>; | ||
137 | atmel,use-dma-rx; | ||
138 | atmel,use-dma-tx; | ||
139 | status = "disabled"; | ||
140 | }; | ||
141 | |||
142 | usart1: serial@fffb4000 { | ||
143 | compatible = "atmel,at91sam9260-usart"; | ||
144 | reg = <0xfffb4000 0x200>; | ||
145 | interrupts = <7 4>; | ||
146 | atmel,use-dma-rx; | ||
147 | atmel,use-dma-tx; | ||
148 | status = "disabled"; | ||
149 | }; | ||
150 | |||
151 | usart2: serial@fffb8000 { | ||
152 | compatible = "atmel,at91sam9260-usart"; | ||
153 | reg = <0xfffb8000 0x200>; | ||
154 | interrupts = <8 4>; | ||
155 | atmel,use-dma-rx; | ||
156 | atmel,use-dma-tx; | ||
157 | status = "disabled"; | ||
158 | }; | ||
159 | |||
160 | usart3: serial@fffd0000 { | ||
161 | compatible = "atmel,at91sam9260-usart"; | ||
162 | reg = <0xfffd0000 0x200>; | ||
163 | interrupts = <23 4>; | ||
164 | atmel,use-dma-rx; | ||
165 | atmel,use-dma-tx; | ||
166 | status = "disabled"; | ||
167 | }; | ||
168 | |||
169 | usart4: serial@fffd4000 { | ||
170 | compatible = "atmel,at91sam9260-usart"; | ||
171 | reg = <0xfffd4000 0x200>; | ||
172 | interrupts = <24 4>; | ||
173 | atmel,use-dma-rx; | ||
174 | atmel,use-dma-tx; | ||
175 | status = "disabled"; | ||
176 | }; | ||
177 | |||
178 | usart5: serial@fffd8000 { | ||
179 | compatible = "atmel,at91sam9260-usart"; | ||
180 | reg = <0xfffd8000 0x200>; | ||
181 | interrupts = <25 4>; | ||
182 | atmel,use-dma-rx; | ||
183 | atmel,use-dma-tx; | ||
184 | status = "disabled"; | ||
185 | }; | ||
186 | |||
187 | macb0: ethernet@fffc4000 { | ||
188 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | ||
189 | reg = <0xfffc4000 0x100>; | ||
190 | interrupts = <21 4>; | ||
191 | status = "disabled"; | ||
192 | }; | ||
193 | |||
194 | usb1: gadget@fffa4000 { | ||
195 | compatible = "atmel,at91rm9200-udc"; | ||
196 | reg = <0xfffa4000 0x4000>; | ||
197 | interrupts = <10 4>; | ||
198 | status = "disabled"; | ||
199 | }; | 23 | }; |
200 | }; | 24 | }; |
201 | |||
202 | nand0: nand@40000000 { | ||
203 | compatible = "atmel,at91rm9200-nand"; | ||
204 | #address-cells = <1>; | ||
205 | #size-cells = <1>; | ||
206 | reg = <0x40000000 0x10000000 | ||
207 | 0xffffe800 0x200 | ||
208 | >; | ||
209 | atmel,nand-addr-offset = <21>; | ||
210 | atmel,nand-cmd-offset = <22>; | ||
211 | gpios = <&pioC 13 0 | ||
212 | &pioC 14 0 | ||
213 | 0 | ||
214 | >; | ||
215 | status = "disabled"; | ||
216 | }; | ||
217 | |||
218 | usb0: ohci@00500000 { | ||
219 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
220 | reg = <0x00500000 0x100000>; | ||
221 | interrupts = <20 4>; | ||
222 | status = "disabled"; | ||
223 | }; | ||
224 | }; | ||
225 | |||
226 | i2c@0 { | ||
227 | compatible = "i2c-gpio"; | ||
228 | gpios = <&pioA 23 0 /* sda */ | ||
229 | &pioA 24 0 /* scl */ | ||
230 | >; | ||
231 | i2c-gpio,sda-open-drain; | ||
232 | i2c-gpio,scl-open-drain; | ||
233 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
234 | #address-cells = <1>; | ||
235 | #size-cells = <0>; | ||
236 | status = "disabled"; | ||
237 | }; | 25 | }; |
238 | }; | 26 | }; |
diff --git a/arch/arm/boot/dts/at91sam9g20ek.dts b/arch/arm/boot/dts/at91sam9g20ek.dts new file mode 100644 index 000000000000..e5324bf9d529 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g20ek.dts | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9g20ek_common.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel at91sam9g20ek"; | ||
13 | compatible = "atmel,at91sam9g20ek", "atmel,at91sam9g20", "atmel,at91sam9"; | ||
14 | |||
15 | leds { | ||
16 | compatible = "gpio-leds"; | ||
17 | |||
18 | ds1 { | ||
19 | label = "ds1"; | ||
20 | gpios = <&pioA 9 0>; | ||
21 | linux,default-trigger = "heartbeat"; | ||
22 | }; | ||
23 | |||
24 | ds5 { | ||
25 | label = "ds5"; | ||
26 | gpios = <&pioA 6 1>; | ||
27 | }; | ||
28 | }; | ||
29 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts new file mode 100644 index 000000000000..f1b2e148ac8c --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * at91sam9g20ek_2mmc.dts - Device Tree file for Atmel at91sam9g20ek 2 MMC board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9g20ek_common.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel at91sam9g20ek 2 mmc"; | ||
13 | compatible = "atmel,at91sam9g20ek_2mmc", "atmel,at91sam9g20", "atmel,at91sam9"; | ||
14 | |||
15 | leds { | ||
16 | compatible = "gpio-leds"; | ||
17 | |||
18 | ds1 { | ||
19 | label = "ds1"; | ||
20 | gpios = <&pioB 9 0>; | ||
21 | linux,default-trigger = "heartbeat"; | ||
22 | }; | ||
23 | |||
24 | ds5 { | ||
25 | label = "ds5"; | ||
26 | gpios = <&pioB 8 1>; | ||
27 | }; | ||
28 | }; | ||
29 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi new file mode 100644 index 000000000000..b06c0db273b1 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi | |||
@@ -0,0 +1,142 @@ | |||
1 | /* | ||
2 | * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /include/ "at91sam9g20.dtsi" | ||
9 | |||
10 | / { | ||
11 | |||
12 | chosen { | ||
13 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; | ||
14 | }; | ||
15 | |||
16 | memory { | ||
17 | reg = <0x20000000 0x4000000>; | ||
18 | }; | ||
19 | |||
20 | clocks { | ||
21 | #address-cells = <1>; | ||
22 | #size-cells = <1>; | ||
23 | ranges; | ||
24 | |||
25 | main_clock: clock@0 { | ||
26 | compatible = "atmel,osc", "fixed-clock"; | ||
27 | clock-frequency = <18432000>; | ||
28 | }; | ||
29 | }; | ||
30 | |||
31 | ahb { | ||
32 | apb { | ||
33 | dbgu: serial@fffff200 { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | |||
37 | usart0: serial@fffb0000 { | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | usart1: serial@fffb4000 { | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | macb0: ethernet@fffc4000 { | ||
46 | phy-mode = "rmii"; | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | usb1: gadget@fffa4000 { | ||
51 | atmel,vbus-gpio = <&pioC 5 0>; | ||
52 | status = "okay"; | ||
53 | }; | ||
54 | }; | ||
55 | |||
56 | nand0: nand@40000000 { | ||
57 | nand-bus-width = <8>; | ||
58 | nand-ecc-mode = "soft"; | ||
59 | nand-on-flash-bbt; | ||
60 | status = "okay"; | ||
61 | |||
62 | at91bootstrap@0 { | ||
63 | label = "at91bootstrap"; | ||
64 | reg = <0x0 0x20000>; | ||
65 | }; | ||
66 | |||
67 | barebox@20000 { | ||
68 | label = "barebox"; | ||
69 | reg = <0x20000 0x40000>; | ||
70 | }; | ||
71 | |||
72 | bareboxenv@60000 { | ||
73 | label = "bareboxenv"; | ||
74 | reg = <0x60000 0x20000>; | ||
75 | }; | ||
76 | |||
77 | bareboxenv2@80000 { | ||
78 | label = "bareboxenv2"; | ||
79 | reg = <0x80000 0x20000>; | ||
80 | }; | ||
81 | |||
82 | oftree@80000 { | ||
83 | label = "oftree"; | ||
84 | reg = <0xa0000 0x20000>; | ||
85 | }; | ||
86 | |||
87 | kernel@a0000 { | ||
88 | label = "kernel"; | ||
89 | reg = <0xc0000 0x400000>; | ||
90 | }; | ||
91 | |||
92 | rootfs@4a0000 { | ||
93 | label = "rootfs"; | ||
94 | reg = <0x4c0000 0x7800000>; | ||
95 | }; | ||
96 | |||
97 | data@7ca0000 { | ||
98 | label = "data"; | ||
99 | reg = <0x7cc0000 0x8340000>; | ||
100 | }; | ||
101 | }; | ||
102 | |||
103 | usb0: ohci@00500000 { | ||
104 | num-ports = <2>; | ||
105 | status = "okay"; | ||
106 | }; | ||
107 | }; | ||
108 | |||
109 | i2c@0 { | ||
110 | status = "okay"; | ||
111 | |||
112 | 24c512@50 { | ||
113 | compatible = "24c512"; | ||
114 | reg = <0x50>; | ||
115 | }; | ||
116 | |||
117 | wm8731@1b { | ||
118 | compatible = "wm8731"; | ||
119 | reg = <0x1b>; | ||
120 | }; | ||
121 | }; | ||
122 | |||
123 | gpio_keys { | ||
124 | compatible = "gpio-keys"; | ||
125 | #address-cells = <1>; | ||
126 | #size-cells = <0>; | ||
127 | |||
128 | btn3 { | ||
129 | label = "Buttin 3"; | ||
130 | gpios = <&pioA 30 1>; | ||
131 | linux,code = <0x103>; | ||
132 | gpio-key,wakeup; | ||
133 | }; | ||
134 | |||
135 | btn4 { | ||
136 | label = "Buttin 4"; | ||
137 | gpios = <&pioA 31 1>; | ||
138 | linux,code = <0x104>; | ||
139 | gpio-key,wakeup; | ||
140 | }; | ||
141 | }; | ||
142 | }; | ||
diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi index 14bc30705099..881bc3987844 100644 --- a/arch/arm/boot/dts/db8500.dtsi +++ b/arch/arm/boot/dts/db8500.dtsi | |||
@@ -55,83 +55,101 @@ | |||
55 | 55 | ||
56 | gpio0: gpio@8012e000 { | 56 | gpio0: gpio@8012e000 { |
57 | compatible = "stericsson,db8500-gpio", | 57 | compatible = "stericsson,db8500-gpio", |
58 | "stmicroelectronics,nomadik-gpio"; | 58 | "st,nomadik-gpio"; |
59 | reg = <0x8012e000 0x80>; | 59 | reg = <0x8012e000 0x80>; |
60 | interrupts = <0 119 0x4>; | 60 | interrupts = <0 119 0x4>; |
61 | supports-sleepmode; | 61 | supports-sleepmode; |
62 | gpio-controller; | 62 | gpio-controller; |
63 | #gpio-cells = <2>; | ||
64 | gpio-bank = <0>; | ||
63 | }; | 65 | }; |
64 | 66 | ||
65 | gpio1: gpio@8012e080 { | 67 | gpio1: gpio@8012e080 { |
66 | compatible = "stericsson,db8500-gpio", | 68 | compatible = "stericsson,db8500-gpio", |
67 | "stmicroelectronics,nomadik-gpio"; | 69 | "st,nomadik-gpio"; |
68 | reg = <0x8012e080 0x80>; | 70 | reg = <0x8012e080 0x80>; |
69 | interrupts = <0 120 0x4>; | 71 | interrupts = <0 120 0x4>; |
70 | supports-sleepmode; | 72 | supports-sleepmode; |
71 | gpio-controller; | 73 | gpio-controller; |
74 | #gpio-cells = <2>; | ||
75 | gpio-bank = <1>; | ||
72 | }; | 76 | }; |
73 | 77 | ||
74 | gpio2: gpio@8000e000 { | 78 | gpio2: gpio@8000e000 { |
75 | compatible = "stericsson,db8500-gpio", | 79 | compatible = "stericsson,db8500-gpio", |
76 | "stmicroelectronics,nomadik-gpio"; | 80 | "st,nomadik-gpio"; |
77 | reg = <0x8000e000 0x80>; | 81 | reg = <0x8000e000 0x80>; |
78 | interrupts = <0 121 0x4>; | 82 | interrupts = <0 121 0x4>; |
79 | supports-sleepmode; | 83 | supports-sleepmode; |
80 | gpio-controller; | 84 | gpio-controller; |
85 | #gpio-cells = <2>; | ||
86 | gpio-bank = <2>; | ||
81 | }; | 87 | }; |
82 | 88 | ||
83 | gpio3: gpio@8000e080 { | 89 | gpio3: gpio@8000e080 { |
84 | compatible = "stericsson,db8500-gpio", | 90 | compatible = "stericsson,db8500-gpio", |
85 | "stmicroelectronics,nomadik-gpio"; | 91 | "st,nomadik-gpio"; |
86 | reg = <0x8000e080 0x80>; | 92 | reg = <0x8000e080 0x80>; |
87 | interrupts = <0 122 0x4>; | 93 | interrupts = <0 122 0x4>; |
88 | supports-sleepmode; | 94 | supports-sleepmode; |
89 | gpio-controller; | 95 | gpio-controller; |
96 | #gpio-cells = <2>; | ||
97 | gpio-bank = <3>; | ||
90 | }; | 98 | }; |
91 | 99 | ||
92 | gpio4: gpio@8000e100 { | 100 | gpio4: gpio@8000e100 { |
93 | compatible = "stericsson,db8500-gpio", | 101 | compatible = "stericsson,db8500-gpio", |
94 | "stmicroelectronics,nomadik-gpio"; | 102 | "st,nomadik-gpio"; |
95 | reg = <0x8000e100 0x80>; | 103 | reg = <0x8000e100 0x80>; |
96 | interrupts = <0 123 0x4>; | 104 | interrupts = <0 123 0x4>; |
97 | supports-sleepmode; | 105 | supports-sleepmode; |
98 | gpio-controller; | 106 | gpio-controller; |
107 | #gpio-cells = <2>; | ||
108 | gpio-bank = <4>; | ||
99 | }; | 109 | }; |
100 | 110 | ||
101 | gpio5: gpio@8000e180 { | 111 | gpio5: gpio@8000e180 { |
102 | compatible = "stericsson,db8500-gpio", | 112 | compatible = "stericsson,db8500-gpio", |
103 | "stmicroelectronics,nomadik-gpio"; | 113 | "st,nomadik-gpio"; |
104 | reg = <0x8000e180 0x80>; | 114 | reg = <0x8000e180 0x80>; |
105 | interrupts = <0 124 0x4>; | 115 | interrupts = <0 124 0x4>; |
106 | supports-sleepmode; | 116 | supports-sleepmode; |
107 | gpio-controller; | 117 | gpio-controller; |
118 | #gpio-cells = <2>; | ||
119 | gpio-bank = <5>; | ||
108 | }; | 120 | }; |
109 | 121 | ||
110 | gpio6: gpio@8011e000 { | 122 | gpio6: gpio@8011e000 { |
111 | compatible = "stericsson,db8500-gpio", | 123 | compatible = "stericsson,db8500-gpio", |
112 | "stmicroelectronics,nomadik-gpio"; | 124 | "st,nomadik-gpio"; |
113 | reg = <0x8011e000 0x80>; | 125 | reg = <0x8011e000 0x80>; |
114 | interrupts = <0 125 0x4>; | 126 | interrupts = <0 125 0x4>; |
115 | supports-sleepmode; | 127 | supports-sleepmode; |
116 | gpio-controller; | 128 | gpio-controller; |
129 | #gpio-cells = <2>; | ||
130 | gpio-bank = <6>; | ||
117 | }; | 131 | }; |
118 | 132 | ||
119 | gpio7: gpio@8011e080 { | 133 | gpio7: gpio@8011e080 { |
120 | compatible = "stericsson,db8500-gpio", | 134 | compatible = "stericsson,db8500-gpio", |
121 | "stmicroelectronics,nomadik-gpio"; | 135 | "st,nomadik-gpio"; |
122 | reg = <0x8011e080 0x80>; | 136 | reg = <0x8011e080 0x80>; |
123 | interrupts = <0 126 0x4>; | 137 | interrupts = <0 126 0x4>; |
124 | supports-sleepmode; | 138 | supports-sleepmode; |
125 | gpio-controller; | 139 | gpio-controller; |
140 | #gpio-cells = <2>; | ||
141 | gpio-bank = <7>; | ||
126 | }; | 142 | }; |
127 | 143 | ||
128 | gpio8: gpio@a03fe000 { | 144 | gpio8: gpio@a03fe000 { |
129 | compatible = "stericsson,db8500-gpio", | 145 | compatible = "stericsson,db8500-gpio", |
130 | "stmicroelectronics,nomadik-gpio"; | 146 | "st,nomadik-gpio"; |
131 | reg = <0xa03fe000 0x80>; | 147 | reg = <0xa03fe000 0x80>; |
132 | interrupts = <0 127 0x4>; | 148 | interrupts = <0 127 0x4>; |
133 | supports-sleepmode; | 149 | supports-sleepmode; |
134 | gpio-controller; | 150 | gpio-controller; |
151 | #gpio-cells = <2>; | ||
152 | gpio-bank = <8>; | ||
135 | }; | 153 | }; |
136 | 154 | ||
137 | usb@a03e0000 { | 155 | usb@a03e0000 { |
@@ -153,7 +171,13 @@ | |||
153 | reg = <0x80157000 0x1000>; | 171 | reg = <0x80157000 0x1000>; |
154 | interrupts = <46 47>; | 172 | interrupts = <46 47>; |
155 | #address-cells = <1>; | 173 | #address-cells = <1>; |
156 | #size-cells = <0>; | 174 | #size-cells = <1>; |
175 | ranges; | ||
176 | |||
177 | prcmu-timer-4@80157450 { | ||
178 | compatible = "stericsson,db8500-prcmu-timer-4"; | ||
179 | reg = <0x80157450 0xC>; | ||
180 | }; | ||
157 | 181 | ||
158 | ab8500@5 { | 182 | ab8500@5 { |
159 | compatible = "stericsson,ab8500"; | 183 | compatible = "stericsson,ab8500"; |
@@ -163,7 +187,7 @@ | |||
163 | }; | 187 | }; |
164 | 188 | ||
165 | i2c@80004000 { | 189 | i2c@80004000 { |
166 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | 190 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; |
167 | reg = <0x80004000 0x1000>; | 191 | reg = <0x80004000 0x1000>; |
168 | interrupts = <0 21 0x4>; | 192 | interrupts = <0 21 0x4>; |
169 | #address-cells = <1>; | 193 | #address-cells = <1>; |
@@ -171,7 +195,7 @@ | |||
171 | }; | 195 | }; |
172 | 196 | ||
173 | i2c@80122000 { | 197 | i2c@80122000 { |
174 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | 198 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; |
175 | reg = <0x80122000 0x1000>; | 199 | reg = <0x80122000 0x1000>; |
176 | interrupts = <0 22 0x4>; | 200 | interrupts = <0 22 0x4>; |
177 | #address-cells = <1>; | 201 | #address-cells = <1>; |
@@ -179,7 +203,7 @@ | |||
179 | }; | 203 | }; |
180 | 204 | ||
181 | i2c@80128000 { | 205 | i2c@80128000 { |
182 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | 206 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; |
183 | reg = <0x80128000 0x1000>; | 207 | reg = <0x80128000 0x1000>; |
184 | interrupts = <0 55 0x4>; | 208 | interrupts = <0 55 0x4>; |
185 | #address-cells = <1>; | 209 | #address-cells = <1>; |
@@ -187,7 +211,7 @@ | |||
187 | }; | 211 | }; |
188 | 212 | ||
189 | i2c@80110000 { | 213 | i2c@80110000 { |
190 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | 214 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; |
191 | reg = <0x80110000 0x1000>; | 215 | reg = <0x80110000 0x1000>; |
192 | interrupts = <0 12 0x4>; | 216 | interrupts = <0 12 0x4>; |
193 | #address-cells = <1>; | 217 | #address-cells = <1>; |
@@ -195,7 +219,7 @@ | |||
195 | }; | 219 | }; |
196 | 220 | ||
197 | i2c@8012a000 { | 221 | i2c@8012a000 { |
198 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | 222 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; |
199 | reg = <0x8012a000 0x1000>; | 223 | reg = <0x8012a000 0x1000>; |
200 | interrupts = <0 51 0x4>; | 224 | interrupts = <0 51 0x4>; |
201 | #address-cells = <1>; | 225 | #address-cells = <1>; |
@@ -270,5 +294,14 @@ | |||
270 | interrupts = <0 100 0x4>; | 294 | interrupts = <0 100 0x4>; |
271 | status = "disabled"; | 295 | status = "disabled"; |
272 | }; | 296 | }; |
297 | |||
298 | external-bus@50000000 { | ||
299 | compatible = "simple-bus"; | ||
300 | reg = <0x50000000 0x4000000>; | ||
301 | #address-cells = <1>; | ||
302 | #size-cells = <1>; | ||
303 | ranges = <0 0x50000000 0x4000000>; | ||
304 | status = "disabled"; | ||
305 | }; | ||
273 | }; | 306 | }; |
274 | }; | 307 | }; |
diff --git a/arch/arm/boot/dts/ethernut5.dts b/arch/arm/boot/dts/ethernut5.dts new file mode 100644 index 000000000000..1ea9d34460a4 --- /dev/null +++ b/arch/arm/boot/dts/ethernut5.dts | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * ethernut5.dts - Device Tree file for Ethernut 5 board | ||
3 | * | ||
4 | * Copyright (C) 2012 egnite GmbH <info@egnite.de> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9260.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Ethernut 5"; | ||
13 | compatible = "egnite,ethernut5", "atmel,at91sam9260", "atmel,at91sam9"; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2"; | ||
17 | }; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x20000000 0x08000000>; | ||
21 | }; | ||
22 | |||
23 | ahb { | ||
24 | apb { | ||
25 | dbgu: serial@fffff200 { | ||
26 | status = "okay"; | ||
27 | }; | ||
28 | |||
29 | usart0: serial@fffb0000 { | ||
30 | status = "okay"; | ||
31 | }; | ||
32 | |||
33 | usart1: serial@fffb4000 { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | |||
37 | macb0: ethernet@fffc4000 { | ||
38 | phy-mode = "rmii"; | ||
39 | status = "okay"; | ||
40 | }; | ||
41 | |||
42 | usb1: gadget@fffa4000 { | ||
43 | atmel,vbus-gpio = <&pioC 5 0>; | ||
44 | status = "okay"; | ||
45 | }; | ||
46 | }; | ||
47 | |||
48 | nand0: nand@40000000 { | ||
49 | nand-bus-width = <8>; | ||
50 | nand-ecc-mode = "soft"; | ||
51 | nand-on-flash-bbt; | ||
52 | status = "okay"; | ||
53 | |||
54 | gpios = <0 | ||
55 | &pioC 14 0 | ||
56 | 0 | ||
57 | >; | ||
58 | |||
59 | root@0 { | ||
60 | label = "root"; | ||
61 | reg = <0x0 0x08000000>; | ||
62 | }; | ||
63 | |||
64 | data@20000 { | ||
65 | label = "data"; | ||
66 | reg = <0x08000000 0x38000000>; | ||
67 | }; | ||
68 | }; | ||
69 | |||
70 | usb0: ohci@00500000 { | ||
71 | num-ports = <2>; | ||
72 | status = "okay"; | ||
73 | }; | ||
74 | }; | ||
75 | |||
76 | i2c@0 { | ||
77 | status = "okay"; | ||
78 | |||
79 | pcf8563@50 { | ||
80 | compatible = "nxp,pcf8563"; | ||
81 | reg = <0x51>; | ||
82 | }; | ||
83 | }; | ||
84 | }; | ||
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/kizbox.dts new file mode 100644 index 000000000000..e8814fe0e277 --- /dev/null +++ b/arch/arm/boot/dts/kizbox.dts | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * kizbox.dts - Device Tree file for Overkiz Kizbox board | ||
3 | * | ||
4 | * Copyright (C) 2012 Boris BREZILLON <linux-arm@overkiz.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9g20.dtsi" | ||
10 | |||
11 | / { | ||
12 | |||
13 | model = "Overkiz kizbox"; | ||
14 | compatible = "overkiz,kizbox", "atmel,at91sam9g20", "atmel,at91sam9"; | ||
15 | |||
16 | chosen { | ||
17 | bootargs = "panic=5 ubi.mtd=1 rootfstype=ubifs root=ubi0:root"; | ||
18 | }; | ||
19 | |||
20 | memory { | ||
21 | reg = <0x20000000 0x2000000>; | ||
22 | }; | ||
23 | |||
24 | clocks { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | ranges; | ||
28 | |||
29 | main_clock: clock@0 { | ||
30 | compatible = "atmel,osc", "fixed-clock"; | ||
31 | clock-frequency = <18432000>; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | ahb { | ||
36 | apb { | ||
37 | dbgu: serial@fffff200 { | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | usart0: serial@fffb0000 { | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | usart1: serial@fffb4000 { | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | macb0: ethernet@fffc4000 { | ||
50 | phy-mode = "mii"; | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | }; | ||
55 | |||
56 | nand0: nand@40000000 { | ||
57 | nand-bus-width = <8>; | ||
58 | nand-ecc-mode = "soft"; | ||
59 | status = "okay"; | ||
60 | |||
61 | bootloaderkernel@0 { | ||
62 | label = "bootloader-kernel"; | ||
63 | reg = <0x0 0xc0000>; | ||
64 | }; | ||
65 | |||
66 | ubi@c0000 { | ||
67 | label = "ubi"; | ||
68 | reg = <0xc0000 0x7f40000>; | ||
69 | }; | ||
70 | |||
71 | }; | ||
72 | |||
73 | usb0: ohci@00500000 { | ||
74 | num-ports = <1>; | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | }; | ||
78 | |||
79 | i2c@0 { | ||
80 | status = "okay"; | ||
81 | |||
82 | pcf8563@51 { | ||
83 | /* nxp pcf8563 rtc */ | ||
84 | compatible = "nxp,pcf8563"; | ||
85 | reg = <0x51>; | ||
86 | }; | ||
87 | |||
88 | }; | ||
89 | |||
90 | leds { | ||
91 | compatible = "gpio-leds"; | ||
92 | |||
93 | led1g { | ||
94 | label = "led1:green"; | ||
95 | gpios = <&pioB 0 1>; | ||
96 | linux,default-trigger = "none"; | ||
97 | }; | ||
98 | |||
99 | led1r { | ||
100 | label = "led1:red"; | ||
101 | gpios = <&pioB 1 1>; | ||
102 | linux,default-trigger = "none"; | ||
103 | }; | ||
104 | |||
105 | led2g { | ||
106 | label = "led2:green"; | ||
107 | gpios = <&pioB 2 1>; | ||
108 | linux,default-trigger = "none"; | ||
109 | default-state = "on"; | ||
110 | }; | ||
111 | |||
112 | led2r { | ||
113 | label = "led2:red"; | ||
114 | gpios = <&pioB 3 1>; | ||
115 | linux,default-trigger = "none"; | ||
116 | }; | ||
117 | }; | ||
118 | |||
119 | gpio_keys { | ||
120 | compatible = "gpio-keys"; | ||
121 | #address-cells = <1>; | ||
122 | #size-cells = <0>; | ||
123 | |||
124 | reset { | ||
125 | label = "reset"; | ||
126 | gpios = <&pioB 30 1>; | ||
127 | linux,code = <0x100>; | ||
128 | gpio-key,wakeup; | ||
129 | }; | ||
130 | |||
131 | mode { | ||
132 | label = "mode"; | ||
133 | gpios = <&pioB 31 1>; | ||
134 | linux,code = <0x101>; | ||
135 | gpio-key,wakeup; | ||
136 | }; | ||
137 | }; | ||
138 | }; \ No newline at end of file | ||
diff --git a/arch/arm/boot/dts/lpc32xx.dtsi b/arch/arm/boot/dts/lpc32xx.dtsi new file mode 100644 index 000000000000..2d696866f71c --- /dev/null +++ b/arch/arm/boot/dts/lpc32xx.dtsi | |||
@@ -0,0 +1,292 @@ | |||
1 | /* | ||
2 | * NXP LPC32xx SoC | ||
3 | * | ||
4 | * Copyright 2012 Roland Stigge <stigge@antcom.de> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "skeleton.dtsi" | ||
15 | |||
16 | / { | ||
17 | compatible = "nxp,lpc3220"; | ||
18 | interrupt-parent = <&mic>; | ||
19 | |||
20 | cpus { | ||
21 | cpu@0 { | ||
22 | compatible = "arm,arm926ejs"; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | ahb { | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <1>; | ||
29 | compatible = "simple-bus"; | ||
30 | ranges = <0x20000000 0x20000000 0x30000000>; | ||
31 | |||
32 | /* | ||
33 | * Enable either SLC or MLC | ||
34 | */ | ||
35 | slc: flash@20020000 { | ||
36 | compatible = "nxp,lpc3220-slc"; | ||
37 | reg = <0x20020000 0x1000>; | ||
38 | status = "disable"; | ||
39 | }; | ||
40 | |||
41 | mlc: flash@200B0000 { | ||
42 | compatible = "nxp,lpc3220-mlc"; | ||
43 | reg = <0x200B0000 0x1000>; | ||
44 | status = "disable"; | ||
45 | }; | ||
46 | |||
47 | dma@31000000 { | ||
48 | compatible = "arm,pl080", "arm,primecell"; | ||
49 | reg = <0x31000000 0x1000>; | ||
50 | interrupts = <0x1c 0>; | ||
51 | }; | ||
52 | |||
53 | /* | ||
54 | * Enable either ohci or usbd (gadget)! | ||
55 | */ | ||
56 | ohci@31020000 { | ||
57 | compatible = "nxp,ohci-nxp", "usb-ohci"; | ||
58 | reg = <0x31020000 0x300>; | ||
59 | interrupts = <0x3b 0>; | ||
60 | status = "disable"; | ||
61 | }; | ||
62 | |||
63 | usbd@31020000 { | ||
64 | compatible = "nxp,lpc3220-udc"; | ||
65 | reg = <0x31020000 0x300>; | ||
66 | interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>; | ||
67 | status = "disable"; | ||
68 | }; | ||
69 | |||
70 | clcd@31040000 { | ||
71 | compatible = "arm,pl110", "arm,primecell"; | ||
72 | reg = <0x31040000 0x1000>; | ||
73 | interrupts = <0x0e 0>; | ||
74 | status = "disable"; | ||
75 | }; | ||
76 | |||
77 | mac: ethernet@31060000 { | ||
78 | compatible = "nxp,lpc-eth"; | ||
79 | reg = <0x31060000 0x1000>; | ||
80 | interrupts = <0x1d 0>; | ||
81 | }; | ||
82 | |||
83 | apb { | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <1>; | ||
86 | compatible = "simple-bus"; | ||
87 | ranges = <0x20000000 0x20000000 0x30000000>; | ||
88 | |||
89 | ssp0: ssp@20084000 { | ||
90 | compatible = "arm,pl022", "arm,primecell"; | ||
91 | reg = <0x20084000 0x1000>; | ||
92 | interrupts = <0x14 0>; | ||
93 | }; | ||
94 | |||
95 | spi1: spi@20088000 { | ||
96 | compatible = "nxp,lpc3220-spi"; | ||
97 | reg = <0x20088000 0x1000>; | ||
98 | }; | ||
99 | |||
100 | ssp1: ssp@2008c000 { | ||
101 | compatible = "arm,pl022", "arm,primecell"; | ||
102 | reg = <0x2008c000 0x1000>; | ||
103 | interrupts = <0x15 0>; | ||
104 | }; | ||
105 | |||
106 | spi2: spi@20090000 { | ||
107 | compatible = "nxp,lpc3220-spi"; | ||
108 | reg = <0x20090000 0x1000>; | ||
109 | }; | ||
110 | |||
111 | i2s0: i2s@20094000 { | ||
112 | compatible = "nxp,lpc3220-i2s"; | ||
113 | reg = <0x20094000 0x1000>; | ||
114 | }; | ||
115 | |||
116 | sd@20098000 { | ||
117 | compatible = "arm,pl180", "arm,primecell"; | ||
118 | reg = <0x20098000 0x1000>; | ||
119 | interrupts = <0x0f 0>, <0x0d 0>; | ||
120 | }; | ||
121 | |||
122 | i2s1: i2s@2009C000 { | ||
123 | compatible = "nxp,lpc3220-i2s"; | ||
124 | reg = <0x2009C000 0x1000>; | ||
125 | }; | ||
126 | |||
127 | uart3: serial@40080000 { | ||
128 | compatible = "nxp,serial"; | ||
129 | reg = <0x40080000 0x1000>; | ||
130 | }; | ||
131 | |||
132 | uart4: serial@40088000 { | ||
133 | compatible = "nxp,serial"; | ||
134 | reg = <0x40088000 0x1000>; | ||
135 | }; | ||
136 | |||
137 | uart5: serial@40090000 { | ||
138 | compatible = "nxp,serial"; | ||
139 | reg = <0x40090000 0x1000>; | ||
140 | }; | ||
141 | |||
142 | uart6: serial@40098000 { | ||
143 | compatible = "nxp,serial"; | ||
144 | reg = <0x40098000 0x1000>; | ||
145 | }; | ||
146 | |||
147 | i2c1: i2c@400A0000 { | ||
148 | compatible = "nxp,pnx-i2c"; | ||
149 | reg = <0x400A0000 0x100>; | ||
150 | interrupts = <0x33 0>; | ||
151 | #address-cells = <1>; | ||
152 | #size-cells = <0>; | ||
153 | pnx,timeout = <0x64>; | ||
154 | }; | ||
155 | |||
156 | i2c2: i2c@400A8000 { | ||
157 | compatible = "nxp,pnx-i2c"; | ||
158 | reg = <0x400A8000 0x100>; | ||
159 | interrupts = <0x32 0>; | ||
160 | #address-cells = <1>; | ||
161 | #size-cells = <0>; | ||
162 | pnx,timeout = <0x64>; | ||
163 | }; | ||
164 | |||
165 | i2cusb: i2c@31020300 { | ||
166 | compatible = "nxp,pnx-i2c"; | ||
167 | reg = <0x31020300 0x100>; | ||
168 | interrupts = <0x3f 0>; | ||
169 | #address-cells = <1>; | ||
170 | #size-cells = <0>; | ||
171 | pnx,timeout = <0x64>; | ||
172 | }; | ||
173 | }; | ||
174 | |||
175 | fab { | ||
176 | #address-cells = <1>; | ||
177 | #size-cells = <1>; | ||
178 | compatible = "simple-bus"; | ||
179 | ranges = <0x20000000 0x20000000 0x30000000>; | ||
180 | |||
181 | /* | ||
182 | * MIC Interrupt controller includes: | ||
183 | * MIC @40008000 | ||
184 | * SIC1 @4000C000 | ||
185 | * SIC2 @40010000 | ||
186 | */ | ||
187 | mic: interrupt-controller@40008000 { | ||
188 | compatible = "nxp,lpc3220-mic"; | ||
189 | interrupt-controller; | ||
190 | reg = <0x40008000 0xC000>; | ||
191 | #interrupt-cells = <2>; | ||
192 | }; | ||
193 | |||
194 | uart1: serial@40014000 { | ||
195 | compatible = "nxp,serial"; | ||
196 | reg = <0x40014000 0x1000>; | ||
197 | }; | ||
198 | |||
199 | uart2: serial@40018000 { | ||
200 | compatible = "nxp,serial"; | ||
201 | reg = <0x40018000 0x1000>; | ||
202 | }; | ||
203 | |||
204 | uart7: serial@4001C000 { | ||
205 | compatible = "nxp,serial"; | ||
206 | reg = <0x4001C000 0x1000>; | ||
207 | }; | ||
208 | |||
209 | rtc@40024000 { | ||
210 | compatible = "nxp,lpc3220-rtc"; | ||
211 | reg = <0x40024000 0x1000>; | ||
212 | interrupts = <0x34 0>; | ||
213 | }; | ||
214 | |||
215 | gpio: gpio@40028000 { | ||
216 | compatible = "nxp,lpc3220-gpio"; | ||
217 | reg = <0x40028000 0x1000>; | ||
218 | /* create a private address space for enumeration */ | ||
219 | #address-cells = <1>; | ||
220 | #size-cells = <0>; | ||
221 | |||
222 | gpio_p0: gpio-bank@0 { | ||
223 | gpio-controller; | ||
224 | #gpio-cells = <2>; | ||
225 | reg = <0>; | ||
226 | }; | ||
227 | |||
228 | gpio_p1: gpio-bank@1 { | ||
229 | gpio-controller; | ||
230 | #gpio-cells = <2>; | ||
231 | reg = <1>; | ||
232 | }; | ||
233 | |||
234 | gpio_p2: gpio-bank@2 { | ||
235 | gpio-controller; | ||
236 | #gpio-cells = <2>; | ||
237 | reg = <2>; | ||
238 | }; | ||
239 | |||
240 | gpio_p3: gpio-bank@3 { | ||
241 | gpio-controller; | ||
242 | #gpio-cells = <2>; | ||
243 | reg = <3>; | ||
244 | }; | ||
245 | |||
246 | gpi_p3: gpio-bank@4 { | ||
247 | gpio-controller; | ||
248 | #gpio-cells = <2>; | ||
249 | reg = <4>; | ||
250 | }; | ||
251 | |||
252 | gpo_p3: gpio-bank@5 { | ||
253 | gpio-controller; | ||
254 | #gpio-cells = <2>; | ||
255 | reg = <5>; | ||
256 | }; | ||
257 | }; | ||
258 | |||
259 | watchdog@4003C000 { | ||
260 | compatible = "nxp,pnx4008-wdt"; | ||
261 | reg = <0x4003C000 0x1000>; | ||
262 | }; | ||
263 | |||
264 | /* | ||
265 | * TSC vs. ADC: Since those two share the same | ||
266 | * hardware, you need to choose from one of the | ||
267 | * following two and do 'status = "okay";' for one of | ||
268 | * them | ||
269 | */ | ||
270 | |||
271 | adc@40048000 { | ||
272 | compatible = "nxp,lpc3220-adc"; | ||
273 | reg = <0x40048000 0x1000>; | ||
274 | interrupts = <0x27 0>; | ||
275 | status = "disable"; | ||
276 | }; | ||
277 | |||
278 | tsc@40048000 { | ||
279 | compatible = "nxp,lpc3220-tsc"; | ||
280 | reg = <0x40048000 0x1000>; | ||
281 | interrupts = <0x27 0>; | ||
282 | status = "disable"; | ||
283 | }; | ||
284 | |||
285 | key@40050000 { | ||
286 | compatible = "nxp,lpc3220-key"; | ||
287 | reg = <0x40050000 0x1000>; | ||
288 | }; | ||
289 | |||
290 | }; | ||
291 | }; | ||
292 | }; | ||
diff --git a/arch/arm/boot/dts/mmp2-brownstone.dts b/arch/arm/boot/dts/mmp2-brownstone.dts new file mode 100644 index 000000000000..153a4b2d12b5 --- /dev/null +++ b/arch/arm/boot/dts/mmp2-brownstone.dts | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Marvell Technology Group Ltd. | ||
3 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * publishhed by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | /dts-v1/; | ||
11 | /include/ "mmp2.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Marvell MMP2 Aspenite Development Board"; | ||
15 | compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2"; | ||
16 | |||
17 | chosen { | ||
18 | bootargs = "console=ttyS2,38400 root=/dev/nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on"; | ||
19 | }; | ||
20 | |||
21 | memory { | ||
22 | reg = <0x00000000 0x04000000>; | ||
23 | }; | ||
24 | |||
25 | soc { | ||
26 | apb@d4000000 { | ||
27 | uart3: uart@d4018000 { | ||
28 | status = "okay"; | ||
29 | }; | ||
30 | twsi1: i2c@d4011000 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | rtc: rtc@d4010000 { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi new file mode 100644 index 000000000000..80f74e256408 --- /dev/null +++ b/arch/arm/boot/dts/mmp2.dtsi | |||
@@ -0,0 +1,220 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Marvell Technology Group Ltd. | ||
3 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * publishhed by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | /include/ "skeleton.dtsi" | ||
11 | |||
12 | / { | ||
13 | aliases { | ||
14 | serial0 = &uart1; | ||
15 | serial1 = &uart2; | ||
16 | serial2 = &uart3; | ||
17 | serial3 = &uart4; | ||
18 | i2c0 = &twsi1; | ||
19 | i2c1 = &twsi2; | ||
20 | }; | ||
21 | |||
22 | soc { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "simple-bus"; | ||
26 | interrupt-parent = <&intc>; | ||
27 | ranges; | ||
28 | |||
29 | axi@d4200000 { /* AXI */ | ||
30 | compatible = "mrvl,axi-bus", "simple-bus"; | ||
31 | #address-cells = <1>; | ||
32 | #size-cells = <1>; | ||
33 | reg = <0xd4200000 0x00200000>; | ||
34 | ranges; | ||
35 | |||
36 | intc: interrupt-controller@d4282000 { | ||
37 | compatible = "mrvl,mmp2-intc"; | ||
38 | interrupt-controller; | ||
39 | #interrupt-cells = <1>; | ||
40 | reg = <0xd4282000 0x1000>; | ||
41 | mrvl,intc-nr-irqs = <64>; | ||
42 | }; | ||
43 | |||
44 | intcmux4@d4282150 { | ||
45 | compatible = "mrvl,mmp2-mux-intc"; | ||
46 | interrupts = <4>; | ||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <1>; | ||
49 | reg = <0x150 0x4>, <0x168 0x4>; | ||
50 | reg-names = "mux status", "mux mask"; | ||
51 | mrvl,intc-nr-irqs = <2>; | ||
52 | }; | ||
53 | |||
54 | intcmux5: interrupt-controller@d4282154 { | ||
55 | compatible = "mrvl,mmp2-mux-intc"; | ||
56 | interrupts = <5>; | ||
57 | interrupt-controller; | ||
58 | #interrupt-cells = <1>; | ||
59 | reg = <0x154 0x4>, <0x16c 0x4>; | ||
60 | reg-names = "mux status", "mux mask"; | ||
61 | mrvl,intc-nr-irqs = <2>; | ||
62 | mrvl,clr-mfp-irq = <1>; | ||
63 | }; | ||
64 | |||
65 | intcmux9: interrupt-controller@d4282180 { | ||
66 | compatible = "mrvl,mmp2-mux-intc"; | ||
67 | interrupts = <9>; | ||
68 | interrupt-controller; | ||
69 | #interrupt-cells = <1>; | ||
70 | reg = <0x180 0x4>, <0x17c 0x4>; | ||
71 | reg-names = "mux status", "mux mask"; | ||
72 | mrvl,intc-nr-irqs = <3>; | ||
73 | }; | ||
74 | |||
75 | intcmux17: interrupt-controller@d4282158 { | ||
76 | compatible = "mrvl,mmp2-mux-intc"; | ||
77 | interrupts = <17>; | ||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | reg = <0x158 0x4>, <0x170 0x4>; | ||
81 | reg-names = "mux status", "mux mask"; | ||
82 | mrvl,intc-nr-irqs = <5>; | ||
83 | }; | ||
84 | |||
85 | intcmux35: interrupt-controller@d428215c { | ||
86 | compatible = "mrvl,mmp2-mux-intc"; | ||
87 | interrupts = <35>; | ||
88 | interrupt-controller; | ||
89 | #interrupt-cells = <1>; | ||
90 | reg = <0x15c 0x4>, <0x174 0x4>; | ||
91 | reg-names = "mux status", "mux mask"; | ||
92 | mrvl,intc-nr-irqs = <15>; | ||
93 | }; | ||
94 | |||
95 | intcmux51: interrupt-controller@d4282160 { | ||
96 | compatible = "mrvl,mmp2-mux-intc"; | ||
97 | interrupts = <51>; | ||
98 | interrupt-controller; | ||
99 | #interrupt-cells = <1>; | ||
100 | reg = <0x160 0x4>, <0x178 0x4>; | ||
101 | reg-names = "mux status", "mux mask"; | ||
102 | mrvl,intc-nr-irqs = <2>; | ||
103 | }; | ||
104 | |||
105 | intcmux55: interrupt-controller@d4282188 { | ||
106 | compatible = "mrvl,mmp2-mux-intc"; | ||
107 | interrupts = <55>; | ||
108 | interrupt-controller; | ||
109 | #interrupt-cells = <1>; | ||
110 | reg = <0x188 0x4>, <0x184 0x4>; | ||
111 | reg-names = "mux status", "mux mask"; | ||
112 | mrvl,intc-nr-irqs = <2>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | apb@d4000000 { /* APB */ | ||
117 | compatible = "mrvl,apb-bus", "simple-bus"; | ||
118 | #address-cells = <1>; | ||
119 | #size-cells = <1>; | ||
120 | reg = <0xd4000000 0x00200000>; | ||
121 | ranges; | ||
122 | |||
123 | timer0: timer@d4014000 { | ||
124 | compatible = "mrvl,mmp-timer"; | ||
125 | reg = <0xd4014000 0x100>; | ||
126 | interrupts = <13>; | ||
127 | }; | ||
128 | |||
129 | uart1: uart@d4030000 { | ||
130 | compatible = "mrvl,mmp-uart"; | ||
131 | reg = <0xd4030000 0x1000>; | ||
132 | interrupts = <27>; | ||
133 | status = "disabled"; | ||
134 | }; | ||
135 | |||
136 | uart2: uart@d4017000 { | ||
137 | compatible = "mrvl,mmp-uart"; | ||
138 | reg = <0xd4017000 0x1000>; | ||
139 | interrupts = <28>; | ||
140 | status = "disabled"; | ||
141 | }; | ||
142 | |||
143 | uart3: uart@d4018000 { | ||
144 | compatible = "mrvl,mmp-uart"; | ||
145 | reg = <0xd4018000 0x1000>; | ||
146 | interrupts = <24>; | ||
147 | status = "disabled"; | ||
148 | }; | ||
149 | |||
150 | uart4: uart@d4016000 { | ||
151 | compatible = "mrvl,mmp-uart"; | ||
152 | reg = <0xd4016000 0x1000>; | ||
153 | interrupts = <46>; | ||
154 | status = "disabled"; | ||
155 | }; | ||
156 | |||
157 | gpio@d4019000 { | ||
158 | compatible = "mrvl,mmp-gpio"; | ||
159 | #address-cells = <1>; | ||
160 | #size-cells = <1>; | ||
161 | reg = <0xd4019000 0x1000>; | ||
162 | gpio-controller; | ||
163 | #gpio-cells = <2>; | ||
164 | interrupts = <49>; | ||
165 | interrupt-names = "gpio_mux"; | ||
166 | interrupt-controller; | ||
167 | #interrupt-cells = <1>; | ||
168 | ranges; | ||
169 | |||
170 | gcb0: gpio@d4019000 { | ||
171 | reg = <0xd4019000 0x4>; | ||
172 | }; | ||
173 | |||
174 | gcb1: gpio@d4019004 { | ||
175 | reg = <0xd4019004 0x4>; | ||
176 | }; | ||
177 | |||
178 | gcb2: gpio@d4019008 { | ||
179 | reg = <0xd4019008 0x4>; | ||
180 | }; | ||
181 | |||
182 | gcb3: gpio@d4019100 { | ||
183 | reg = <0xd4019100 0x4>; | ||
184 | }; | ||
185 | |||
186 | gcb4: gpio@d4019104 { | ||
187 | reg = <0xd4019104 0x4>; | ||
188 | }; | ||
189 | |||
190 | gcb5: gpio@d4019108 { | ||
191 | reg = <0xd4019108 0x4>; | ||
192 | }; | ||
193 | }; | ||
194 | |||
195 | twsi1: i2c@d4011000 { | ||
196 | compatible = "mrvl,mmp-twsi"; | ||
197 | reg = <0xd4011000 0x1000>; | ||
198 | interrupts = <7>; | ||
199 | mrvl,i2c-fast-mode; | ||
200 | status = "disabled"; | ||
201 | }; | ||
202 | |||
203 | twsi2: i2c@d4025000 { | ||
204 | compatible = "mrvl,mmp-twsi"; | ||
205 | reg = <0xd4025000 0x1000>; | ||
206 | interrupts = <58>; | ||
207 | status = "disabled"; | ||
208 | }; | ||
209 | |||
210 | rtc: rtc@d4010000 { | ||
211 | compatible = "mrvl,mmp-rtc"; | ||
212 | reg = <0xd4010000 0x1000>; | ||
213 | interrupts = <1 0>; | ||
214 | interrupt-names = "rtc 1Hz", "rtc alarm"; | ||
215 | interrupt-parent = <&intcmux5>; | ||
216 | status = "disabled"; | ||
217 | }; | ||
218 | }; | ||
219 | }; | ||
220 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index 9f72cd4cf308..8c756be4d7ad 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts | |||
@@ -18,3 +18,52 @@ | |||
18 | reg = <0x80000000 0x20000000>; /* 512 MB */ | 18 | reg = <0x80000000 0x20000000>; /* 512 MB */ |
19 | }; | 19 | }; |
20 | }; | 20 | }; |
21 | |||
22 | &i2c1 { | ||
23 | clock-frequency = <2600000>; | ||
24 | |||
25 | twl: twl@48 { | ||
26 | reg = <0x48>; | ||
27 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | ||
28 | interrupt-parent = <&intc>; | ||
29 | |||
30 | vsim: regulator@10 { | ||
31 | compatible = "ti,twl4030-vsim"; | ||
32 | regulator-min-microvolt = <1800000>; | ||
33 | regulator-max-microvolt = <3000000>; | ||
34 | }; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | /include/ "twl4030.dtsi" | ||
39 | |||
40 | &i2c2 { | ||
41 | clock-frequency = <400000>; | ||
42 | }; | ||
43 | |||
44 | &i2c3 { | ||
45 | clock-frequency = <100000>; | ||
46 | |||
47 | /* | ||
48 | * Display monitor features are burnt in the EEPROM | ||
49 | * as EDID data. | ||
50 | */ | ||
51 | eeprom@50 { | ||
52 | compatible = "ti,eeprom"; | ||
53 | reg = <0x50>; | ||
54 | }; | ||
55 | }; | ||
56 | |||
57 | &mmc1 { | ||
58 | vmmc-supply = <&vmmc1>; | ||
59 | vmmc_aux-supply = <&vsim>; | ||
60 | ti,bus-width = <8>; | ||
61 | }; | ||
62 | |||
63 | &mmc2 { | ||
64 | status = "disable"; | ||
65 | }; | ||
66 | |||
67 | &mmc3 { | ||
68 | status = "disable"; | ||
69 | }; | ||
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index c6121357c1eb..99474fa5fac4 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -69,6 +69,60 @@ | |||
69 | reg = <0x48200000 0x1000>; | 69 | reg = <0x48200000 0x1000>; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | gpio1: gpio@48310000 { | ||
73 | compatible = "ti,omap3-gpio"; | ||
74 | ti,hwmods = "gpio1"; | ||
75 | gpio-controller; | ||
76 | #gpio-cells = <2>; | ||
77 | interrupt-controller; | ||
78 | #interrupt-cells = <1>; | ||
79 | }; | ||
80 | |||
81 | gpio2: gpio@49050000 { | ||
82 | compatible = "ti,omap3-gpio"; | ||
83 | ti,hwmods = "gpio2"; | ||
84 | gpio-controller; | ||
85 | #gpio-cells = <2>; | ||
86 | interrupt-controller; | ||
87 | #interrupt-cells = <1>; | ||
88 | }; | ||
89 | |||
90 | gpio3: gpio@49052000 { | ||
91 | compatible = "ti,omap3-gpio"; | ||
92 | ti,hwmods = "gpio3"; | ||
93 | gpio-controller; | ||
94 | #gpio-cells = <2>; | ||
95 | interrupt-controller; | ||
96 | #interrupt-cells = <1>; | ||
97 | }; | ||
98 | |||
99 | gpio4: gpio@49054000 { | ||
100 | compatible = "ti,omap3-gpio"; | ||
101 | ti,hwmods = "gpio4"; | ||
102 | gpio-controller; | ||
103 | #gpio-cells = <2>; | ||
104 | interrupt-controller; | ||
105 | #interrupt-cells = <1>; | ||
106 | }; | ||
107 | |||
108 | gpio5: gpio@49056000 { | ||
109 | compatible = "ti,omap3-gpio"; | ||
110 | ti,hwmods = "gpio5"; | ||
111 | gpio-controller; | ||
112 | #gpio-cells = <2>; | ||
113 | interrupt-controller; | ||
114 | #interrupt-cells = <1>; | ||
115 | }; | ||
116 | |||
117 | gpio6: gpio@49058000 { | ||
118 | compatible = "ti,omap3-gpio"; | ||
119 | ti,hwmods = "gpio6"; | ||
120 | gpio-controller; | ||
121 | #gpio-cells = <2>; | ||
122 | interrupt-controller; | ||
123 | #interrupt-cells = <1>; | ||
124 | }; | ||
125 | |||
72 | uart1: serial@4806a000 { | 126 | uart1: serial@4806a000 { |
73 | compatible = "ti,omap3-uart"; | 127 | compatible = "ti,omap3-uart"; |
74 | ti,hwmods = "uart1"; | 128 | ti,hwmods = "uart1"; |
@@ -113,5 +167,53 @@ | |||
113 | #size-cells = <0>; | 167 | #size-cells = <0>; |
114 | ti,hwmods = "i2c3"; | 168 | ti,hwmods = "i2c3"; |
115 | }; | 169 | }; |
170 | |||
171 | mcspi1: spi@48098000 { | ||
172 | compatible = "ti,omap2-mcspi"; | ||
173 | #address-cells = <1>; | ||
174 | #size-cells = <0>; | ||
175 | ti,hwmods = "mcspi1"; | ||
176 | ti,spi-num-cs = <4>; | ||
177 | }; | ||
178 | |||
179 | mcspi2: spi@4809a000 { | ||
180 | compatible = "ti,omap2-mcspi"; | ||
181 | #address-cells = <1>; | ||
182 | #size-cells = <0>; | ||
183 | ti,hwmods = "mcspi2"; | ||
184 | ti,spi-num-cs = <2>; | ||
185 | }; | ||
186 | |||
187 | mcspi3: spi@480b8000 { | ||
188 | compatible = "ti,omap2-mcspi"; | ||
189 | #address-cells = <1>; | ||
190 | #size-cells = <0>; | ||
191 | ti,hwmods = "mcspi3"; | ||
192 | ti,spi-num-cs = <2>; | ||
193 | }; | ||
194 | |||
195 | mcspi4: spi@480ba000 { | ||
196 | compatible = "ti,omap2-mcspi"; | ||
197 | #address-cells = <1>; | ||
198 | #size-cells = <0>; | ||
199 | ti,hwmods = "mcspi4"; | ||
200 | ti,spi-num-cs = <1>; | ||
201 | }; | ||
202 | |||
203 | mmc1: mmc@4809c000 { | ||
204 | compatible = "ti,omap3-hsmmc"; | ||
205 | ti,hwmods = "mmc1"; | ||
206 | ti,dual-volt; | ||
207 | }; | ||
208 | |||
209 | mmc2: mmc@480b4000 { | ||
210 | compatible = "ti,omap3-hsmmc"; | ||
211 | ti,hwmods = "mmc2"; | ||
212 | }; | ||
213 | |||
214 | mmc3: mmc@480ad000 { | ||
215 | compatible = "ti,omap3-hsmmc"; | ||
216 | ti,hwmods = "mmc3"; | ||
217 | }; | ||
116 | }; | 218 | }; |
117 | }; | 219 | }; |
diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts index 9755ad5917f8..e671361bc791 100644 --- a/arch/arm/boot/dts/omap4-panda.dts +++ b/arch/arm/boot/dts/omap4-panda.dts | |||
@@ -17,4 +17,75 @@ | |||
17 | device_type = "memory"; | 17 | device_type = "memory"; |
18 | reg = <0x80000000 0x40000000>; /* 1 GB */ | 18 | reg = <0x80000000 0x40000000>; /* 1 GB */ |
19 | }; | 19 | }; |
20 | |||
21 | leds { | ||
22 | compatible = "gpio-leds"; | ||
23 | heartbeat { | ||
24 | label = "pandaboard::status1"; | ||
25 | gpios = <&gpio1 7 0>; | ||
26 | linux,default-trigger = "heartbeat"; | ||
27 | }; | ||
28 | |||
29 | mmc { | ||
30 | label = "pandaboard::status2"; | ||
31 | gpios = <&gpio1 8 0>; | ||
32 | linux,default-trigger = "mmc0"; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | &i2c1 { | ||
38 | clock-frequency = <400000>; | ||
39 | |||
40 | twl: twl@48 { | ||
41 | reg = <0x48>; | ||
42 | /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ | ||
43 | interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ | ||
44 | interrupt-parent = <&gic>; | ||
45 | }; | ||
46 | }; | ||
47 | |||
48 | /include/ "twl6030.dtsi" | ||
49 | |||
50 | &i2c2 { | ||
51 | clock-frequency = <400000>; | ||
52 | }; | ||
53 | |||
54 | &i2c3 { | ||
55 | clock-frequency = <100000>; | ||
56 | |||
57 | /* | ||
58 | * Display monitor features are burnt in their EEPROM as EDID data. | ||
59 | * The EEPROM is connected as I2C slave device. | ||
60 | */ | ||
61 | eeprom@50 { | ||
62 | compatible = "ti,eeprom"; | ||
63 | reg = <0x50>; | ||
64 | }; | ||
65 | }; | ||
66 | |||
67 | &i2c4 { | ||
68 | clock-frequency = <400000>; | ||
69 | }; | ||
70 | |||
71 | &mmc1 { | ||
72 | vmmc-supply = <&vmmc>; | ||
73 | ti,bus-width = <8>; | ||
74 | }; | ||
75 | |||
76 | &mmc2 { | ||
77 | status = "disable"; | ||
78 | }; | ||
79 | |||
80 | &mmc3 { | ||
81 | status = "disable"; | ||
82 | }; | ||
83 | |||
84 | &mmc4 { | ||
85 | status = "disable"; | ||
86 | }; | ||
87 | |||
88 | &mmc5 { | ||
89 | ti,non-removable; | ||
90 | ti,bus-width = <4>; | ||
20 | }; | 91 | }; |
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 63c6b2b2bf42..e5eeb6f9c6e6 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts | |||
@@ -17,4 +17,144 @@ | |||
17 | device_type = "memory"; | 17 | device_type = "memory"; |
18 | reg = <0x80000000 0x40000000>; /* 1 GB */ | 18 | reg = <0x80000000 0x40000000>; /* 1 GB */ |
19 | }; | 19 | }; |
20 | |||
21 | vdd_eth: fixedregulator@0 { | ||
22 | compatible = "regulator-fixed"; | ||
23 | regulator-name = "VDD_ETH"; | ||
24 | regulator-min-microvolt = <3300000>; | ||
25 | regulator-max-microvolt = <3300000>; | ||
26 | gpio = <&gpio2 16 0>; /* gpio line 48 */ | ||
27 | enable-active-high; | ||
28 | regulator-boot-on; | ||
29 | }; | ||
30 | |||
31 | leds { | ||
32 | compatible = "gpio-leds"; | ||
33 | debug0 { | ||
34 | label = "omap4:green:debug0"; | ||
35 | gpios = <&gpio2 29 0>; /* 61 */ | ||
36 | }; | ||
37 | |||
38 | debug1 { | ||
39 | label = "omap4:green:debug1"; | ||
40 | gpios = <&gpio1 30 0>; /* 30 */ | ||
41 | }; | ||
42 | |||
43 | debug2 { | ||
44 | label = "omap4:green:debug2"; | ||
45 | gpios = <&gpio1 7 0>; /* 7 */ | ||
46 | }; | ||
47 | |||
48 | debug3 { | ||
49 | label = "omap4:green:debug3"; | ||
50 | gpios = <&gpio1 8 0>; /* 8 */ | ||
51 | }; | ||
52 | |||
53 | debug4 { | ||
54 | label = "omap4:green:debug4"; | ||
55 | gpios = <&gpio2 18 0>; /* 50 */ | ||
56 | }; | ||
57 | |||
58 | user1 { | ||
59 | label = "omap4:blue:user"; | ||
60 | gpios = <&gpio6 9 0>; /* 169 */ | ||
61 | }; | ||
62 | |||
63 | user2 { | ||
64 | label = "omap4:red:user"; | ||
65 | gpios = <&gpio6 10 0>; /* 170 */ | ||
66 | }; | ||
67 | |||
68 | user3 { | ||
69 | label = "omap4:green:user"; | ||
70 | gpios = <&gpio5 11 0>; /* 139 */ | ||
71 | }; | ||
72 | }; | ||
73 | }; | ||
74 | |||
75 | &i2c1 { | ||
76 | clock-frequency = <400000>; | ||
77 | |||
78 | twl: twl@48 { | ||
79 | reg = <0x48>; | ||
80 | /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ | ||
81 | interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ | ||
82 | interrupt-parent = <&gic>; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | /include/ "twl6030.dtsi" | ||
87 | |||
88 | &i2c2 { | ||
89 | clock-frequency = <400000>; | ||
90 | }; | ||
91 | |||
92 | &i2c3 { | ||
93 | clock-frequency = <400000>; | ||
94 | |||
95 | /* | ||
96 | * Temperature Sensor | ||
97 | * http://www.ti.com/lit/ds/symlink/tmp105.pdf | ||
98 | */ | ||
99 | tmp105@48 { | ||
100 | compatible = "ti,tmp105"; | ||
101 | reg = <0x48>; | ||
102 | }; | ||
103 | |||
104 | /* | ||
105 | * Ambient Light Sensor | ||
106 | * http://www.rohm.com/products/databook/sensor/pdf/bh1780gli-e.pdf | ||
107 | */ | ||
108 | bh1780@29 { | ||
109 | compatible = "rohm,bh1780"; | ||
110 | reg = <0x29>; | ||
111 | }; | ||
112 | }; | ||
113 | |||
114 | &i2c4 { | ||
115 | clock-frequency = <400000>; | ||
116 | |||
117 | /* | ||
118 | * 3-Axis Digital Compass | ||
119 | * http://www.sparkfun.com/datasheets/Sensors/Magneto/HMC5843.pdf | ||
120 | */ | ||
121 | hmc5843@1e { | ||
122 | compatible = "honeywell,hmc5843"; | ||
123 | reg = <0x1e>; | ||
124 | }; | ||
125 | }; | ||
126 | |||
127 | &mcspi1 { | ||
128 | eth@0 { | ||
129 | compatible = "ks8851"; | ||
130 | spi-max-frequency = <24000000>; | ||
131 | reg = <0>; | ||
132 | interrupt-parent = <&gpio2>; | ||
133 | interrupts = <2>; /* gpio line 34 */ | ||
134 | vdd-supply = <&vdd_eth>; | ||
135 | }; | ||
136 | }; | ||
137 | |||
138 | &mmc1 { | ||
139 | vmmc-supply = <&vmmc>; | ||
140 | ti,bus-width = <8>; | ||
141 | }; | ||
142 | |||
143 | &mmc2 { | ||
144 | vmmc-supply = <&vaux1>; | ||
145 | ti,bus-width = <8>; | ||
146 | ti,non-removable; | ||
147 | }; | ||
148 | |||
149 | &mmc3 { | ||
150 | status = "disable"; | ||
151 | }; | ||
152 | |||
153 | &mmc4 { | ||
154 | status = "disable"; | ||
155 | }; | ||
156 | |||
157 | &mmc5 { | ||
158 | ti,bus-width = <4>; | ||
159 | ti,non-removable; | ||
20 | }; | 160 | }; |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 3d35559e77bc..359c4979c8aa 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
@@ -104,6 +104,60 @@ | |||
104 | <0x48240100 0x0100>; | 104 | <0x48240100 0x0100>; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | gpio1: gpio@4a310000 { | ||
108 | compatible = "ti,omap4-gpio"; | ||
109 | ti,hwmods = "gpio1"; | ||
110 | gpio-controller; | ||
111 | #gpio-cells = <2>; | ||
112 | interrupt-controller; | ||
113 | #interrupt-cells = <1>; | ||
114 | }; | ||
115 | |||
116 | gpio2: gpio@48055000 { | ||
117 | compatible = "ti,omap4-gpio"; | ||
118 | ti,hwmods = "gpio2"; | ||
119 | gpio-controller; | ||
120 | #gpio-cells = <2>; | ||
121 | interrupt-controller; | ||
122 | #interrupt-cells = <1>; | ||
123 | }; | ||
124 | |||
125 | gpio3: gpio@48057000 { | ||
126 | compatible = "ti,omap4-gpio"; | ||
127 | ti,hwmods = "gpio3"; | ||
128 | gpio-controller; | ||
129 | #gpio-cells = <2>; | ||
130 | interrupt-controller; | ||
131 | #interrupt-cells = <1>; | ||
132 | }; | ||
133 | |||
134 | gpio4: gpio@48059000 { | ||
135 | compatible = "ti,omap4-gpio"; | ||
136 | ti,hwmods = "gpio4"; | ||
137 | gpio-controller; | ||
138 | #gpio-cells = <2>; | ||
139 | interrupt-controller; | ||
140 | #interrupt-cells = <1>; | ||
141 | }; | ||
142 | |||
143 | gpio5: gpio@4805b000 { | ||
144 | compatible = "ti,omap4-gpio"; | ||
145 | ti,hwmods = "gpio5"; | ||
146 | gpio-controller; | ||
147 | #gpio-cells = <2>; | ||
148 | interrupt-controller; | ||
149 | #interrupt-cells = <1>; | ||
150 | }; | ||
151 | |||
152 | gpio6: gpio@4805d000 { | ||
153 | compatible = "ti,omap4-gpio"; | ||
154 | ti,hwmods = "gpio6"; | ||
155 | gpio-controller; | ||
156 | #gpio-cells = <2>; | ||
157 | interrupt-controller; | ||
158 | #interrupt-cells = <1>; | ||
159 | }; | ||
160 | |||
107 | uart1: serial@4806a000 { | 161 | uart1: serial@4806a000 { |
108 | compatible = "ti,omap4-uart"; | 162 | compatible = "ti,omap4-uart"; |
109 | ti,hwmods = "uart1"; | 163 | ti,hwmods = "uart1"; |
@@ -155,5 +209,68 @@ | |||
155 | #size-cells = <0>; | 209 | #size-cells = <0>; |
156 | ti,hwmods = "i2c4"; | 210 | ti,hwmods = "i2c4"; |
157 | }; | 211 | }; |
212 | |||
213 | mcspi1: spi@48098000 { | ||
214 | compatible = "ti,omap4-mcspi"; | ||
215 | #address-cells = <1>; | ||
216 | #size-cells = <0>; | ||
217 | ti,hwmods = "mcspi1"; | ||
218 | ti,spi-num-cs = <4>; | ||
219 | }; | ||
220 | |||
221 | mcspi2: spi@4809a000 { | ||
222 | compatible = "ti,omap4-mcspi"; | ||
223 | #address-cells = <1>; | ||
224 | #size-cells = <0>; | ||
225 | ti,hwmods = "mcspi2"; | ||
226 | ti,spi-num-cs = <2>; | ||
227 | }; | ||
228 | |||
229 | mcspi3: spi@480b8000 { | ||
230 | compatible = "ti,omap4-mcspi"; | ||
231 | #address-cells = <1>; | ||
232 | #size-cells = <0>; | ||
233 | ti,hwmods = "mcspi3"; | ||
234 | ti,spi-num-cs = <2>; | ||
235 | }; | ||
236 | |||
237 | mcspi4: spi@480ba000 { | ||
238 | compatible = "ti,omap4-mcspi"; | ||
239 | #address-cells = <1>; | ||
240 | #size-cells = <0>; | ||
241 | ti,hwmods = "mcspi4"; | ||
242 | ti,spi-num-cs = <1>; | ||
243 | }; | ||
244 | |||
245 | mmc1: mmc@4809c000 { | ||
246 | compatible = "ti,omap4-hsmmc"; | ||
247 | ti,hwmods = "mmc1"; | ||
248 | ti,dual-volt; | ||
249 | ti,needs-special-reset; | ||
250 | }; | ||
251 | |||
252 | mmc2: mmc@480b4000 { | ||
253 | compatible = "ti,omap4-hsmmc"; | ||
254 | ti,hwmods = "mmc2"; | ||
255 | ti,needs-special-reset; | ||
256 | }; | ||
257 | |||
258 | mmc3: mmc@480ad000 { | ||
259 | compatible = "ti,omap4-hsmmc"; | ||
260 | ti,hwmods = "mmc3"; | ||
261 | ti,needs-special-reset; | ||
262 | }; | ||
263 | |||
264 | mmc4: mmc@480d1000 { | ||
265 | compatible = "ti,omap4-hsmmc"; | ||
266 | ti,hwmods = "mmc4"; | ||
267 | ti,needs-special-reset; | ||
268 | }; | ||
269 | |||
270 | mmc5: mmc@480d5000 { | ||
271 | compatible = "ti,omap4-hsmmc"; | ||
272 | ti,hwmods = "mmc5"; | ||
273 | ti,needs-special-reset; | ||
274 | }; | ||
158 | }; | 275 | }; |
159 | }; | 276 | }; |
diff --git a/arch/arm/boot/dts/phy3250.dts b/arch/arm/boot/dts/phy3250.dts new file mode 100644 index 000000000000..0167e86314c0 --- /dev/null +++ b/arch/arm/boot/dts/phy3250.dts | |||
@@ -0,0 +1,145 @@ | |||
1 | /* | ||
2 | * PHYTEC phyCORE-LPC3250 board | ||
3 | * | ||
4 | * Copyright 2012 Roland Stigge <stigge@antcom.de> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | /include/ "lpc32xx.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "PHYTEC phyCORE-LPC3250 board based on NXP LPC3250"; | ||
19 | compatible = "phytec,phy3250", "nxp,lpc3250"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | memory { | ||
24 | device_type = "memory"; | ||
25 | reg = <0 0x4000000>; | ||
26 | }; | ||
27 | |||
28 | ahb { | ||
29 | mac: ethernet@31060000 { | ||
30 | phy-mode = "rmii"; | ||
31 | use-iram; | ||
32 | }; | ||
33 | |||
34 | /* Here, choose exactly one from: ohci, usbd */ | ||
35 | ohci@31020000 { | ||
36 | transceiver = <&isp1301>; | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | usbd@31020000 { | ||
42 | transceiver = <&isp1301>; | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | */ | ||
46 | |||
47 | clcd@31040000 { | ||
48 | status = "okay"; | ||
49 | }; | ||
50 | |||
51 | /* 64MB Flash via SLC NAND controller */ | ||
52 | slc: flash@20020000 { | ||
53 | status = "okay"; | ||
54 | #address-cells = <1>; | ||
55 | #size-cells = <1>; | ||
56 | |||
57 | mtd0@00000000 { | ||
58 | label = "phy3250-boot"; | ||
59 | reg = <0x00000000 0x00064000>; | ||
60 | read-only; | ||
61 | }; | ||
62 | |||
63 | mtd1@00064000 { | ||
64 | label = "phy3250-uboot"; | ||
65 | reg = <0x00064000 0x00190000>; | ||
66 | read-only; | ||
67 | }; | ||
68 | |||
69 | mtd2@001f4000 { | ||
70 | label = "phy3250-ubt-prms"; | ||
71 | reg = <0x001f4000 0x00010000>; | ||
72 | }; | ||
73 | |||
74 | mtd3@00204000 { | ||
75 | label = "phy3250-kernel"; | ||
76 | reg = <0x00204000 0x00400000>; | ||
77 | }; | ||
78 | |||
79 | mtd4@00604000 { | ||
80 | label = "phy3250-rootfs"; | ||
81 | reg = <0x00604000 0x039fc000>; | ||
82 | }; | ||
83 | }; | ||
84 | |||
85 | apb { | ||
86 | i2c1: i2c@400A0000 { | ||
87 | clock-frequency = <100000>; | ||
88 | |||
89 | pcf8563: rtc@51 { | ||
90 | compatible = "nxp,pcf8563"; | ||
91 | reg = <0x51>; | ||
92 | }; | ||
93 | |||
94 | uda1380: uda1380@18 { | ||
95 | compatible = "nxp,uda1380"; | ||
96 | reg = <0x18>; | ||
97 | power-gpio = <&gpio 0x59 0>; | ||
98 | reset-gpio = <&gpio 0x51 0>; | ||
99 | dac-clk = "wspll"; | ||
100 | }; | ||
101 | }; | ||
102 | |||
103 | i2c2: i2c@400A8000 { | ||
104 | clock-frequency = <100000>; | ||
105 | }; | ||
106 | |||
107 | i2cusb: i2c@31020300 { | ||
108 | clock-frequency = <100000>; | ||
109 | |||
110 | isp1301: usb-transceiver@2c { | ||
111 | compatible = "nxp,isp1301"; | ||
112 | reg = <0x2c>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | ssp0: ssp@20084000 { | ||
117 | eeprom: at25@0 { | ||
118 | compatible = "atmel,at25"; | ||
119 | }; | ||
120 | }; | ||
121 | }; | ||
122 | |||
123 | fab { | ||
124 | tsc@40048000 { | ||
125 | status = "okay"; | ||
126 | }; | ||
127 | }; | ||
128 | }; | ||
129 | |||
130 | leds { | ||
131 | compatible = "gpio-leds"; | ||
132 | |||
133 | led0 { | ||
134 | gpios = <&gpo_p3 1 1>; /* GPO_P3 1, GPIO 80, active low */ | ||
135 | linux,default-trigger = "heartbeat"; | ||
136 | default-state = "off"; | ||
137 | }; | ||
138 | |||
139 | led1 { | ||
140 | gpios = <&gpo_p3 14 1>; /* GPO_P3 14, GPIO 93, active low */ | ||
141 | linux,default-trigger = "timer"; | ||
142 | default-state = "off"; | ||
143 | }; | ||
144 | }; | ||
145 | }; | ||
diff --git a/arch/arm/boot/dts/pxa168.dtsi b/arch/arm/boot/dts/pxa168.dtsi index d32d5128f225..31a718696080 100644 --- a/arch/arm/boot/dts/pxa168.dtsi +++ b/arch/arm/boot/dts/pxa168.dtsi | |||
@@ -18,13 +18,6 @@ | |||
18 | i2c1 = &twsi2; | 18 | i2c1 = &twsi2; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | intc: intc-interrupt-controller@d4282000 { | ||
22 | compatible = "mrvl,mmp-intc", "mrvl,intc"; | ||
23 | interrupt-controller; | ||
24 | #interrupt-cells = <1>; | ||
25 | reg = <0xd4282000 0x1000>; | ||
26 | }; | ||
27 | |||
28 | soc { | 21 | soc { |
29 | #address-cells = <1>; | 22 | #address-cells = <1>; |
30 | #size-cells = <1>; | 23 | #size-cells = <1>; |
@@ -32,6 +25,23 @@ | |||
32 | interrupt-parent = <&intc>; | 25 | interrupt-parent = <&intc>; |
33 | ranges; | 26 | ranges; |
34 | 27 | ||
28 | axi@d4200000 { /* AXI */ | ||
29 | compatible = "mrvl,axi-bus", "simple-bus"; | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <1>; | ||
32 | reg = <0xd4200000 0x00200000>; | ||
33 | ranges; | ||
34 | |||
35 | intc: interrupt-controller@d4282000 { | ||
36 | compatible = "mrvl,mmp-intc"; | ||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | reg = <0xd4282000 0x1000>; | ||
40 | mrvl,intc-nr-irqs = <64>; | ||
41 | }; | ||
42 | |||
43 | }; | ||
44 | |||
35 | apb@d4000000 { /* APB */ | 45 | apb@d4000000 { /* APB */ |
36 | compatible = "mrvl,apb-bus", "simple-bus"; | 46 | compatible = "mrvl,apb-bus", "simple-bus"; |
37 | #address-cells = <1>; | 47 | #address-cells = <1>; |
@@ -39,40 +49,65 @@ | |||
39 | reg = <0xd4000000 0x00200000>; | 49 | reg = <0xd4000000 0x00200000>; |
40 | ranges; | 50 | ranges; |
41 | 51 | ||
52 | timer0: timer@d4014000 { | ||
53 | compatible = "mrvl,mmp-timer"; | ||
54 | reg = <0xd4014000 0x100>; | ||
55 | interrupts = <13>; | ||
56 | }; | ||
57 | |||
42 | uart1: uart@d4017000 { | 58 | uart1: uart@d4017000 { |
43 | compatible = "mrvl,mmp-uart", "mrvl,pxa-uart"; | 59 | compatible = "mrvl,mmp-uart"; |
44 | reg = <0xd4017000 0x1000>; | 60 | reg = <0xd4017000 0x1000>; |
45 | interrupts = <27>; | 61 | interrupts = <27>; |
46 | status = "disabled"; | 62 | status = "disabled"; |
47 | }; | 63 | }; |
48 | 64 | ||
49 | uart2: uart@d4018000 { | 65 | uart2: uart@d4018000 { |
50 | compatible = "mrvl,mmp-uart", "mrvl,pxa-uart"; | 66 | compatible = "mrvl,mmp-uart"; |
51 | reg = <0xd4018000 0x1000>; | 67 | reg = <0xd4018000 0x1000>; |
52 | interrupts = <28>; | 68 | interrupts = <28>; |
53 | status = "disabled"; | 69 | status = "disabled"; |
54 | }; | 70 | }; |
55 | 71 | ||
56 | uart3: uart@d4026000 { | 72 | uart3: uart@d4026000 { |
57 | compatible = "mrvl,mmp-uart", "mrvl,pxa-uart"; | 73 | compatible = "mrvl,mmp-uart"; |
58 | reg = <0xd4026000 0x1000>; | 74 | reg = <0xd4026000 0x1000>; |
59 | interrupts = <29>; | 75 | interrupts = <29>; |
60 | status = "disabled"; | 76 | status = "disabled"; |
61 | }; | 77 | }; |
62 | 78 | ||
63 | gpio: gpio@d4019000 { | 79 | gpio@d4019000 { |
64 | compatible = "mrvl,mmp-gpio", "mrvl,pxa-gpio"; | 80 | compatible = "mrvl,mmp-gpio"; |
81 | #address-cells = <1>; | ||
82 | #size-cells = <1>; | ||
65 | reg = <0xd4019000 0x1000>; | 83 | reg = <0xd4019000 0x1000>; |
84 | gpio-controller; | ||
85 | #gpio-cells = <2>; | ||
66 | interrupts = <49>; | 86 | interrupts = <49>; |
67 | interrupt-names = "gpio_mux"; | 87 | interrupt-names = "gpio_mux"; |
68 | gpio-controller; | ||
69 | #gpio-cells = <1>; | ||
70 | interrupt-controller; | 88 | interrupt-controller; |
71 | #interrupt-cells = <1>; | 89 | #interrupt-cells = <1>; |
90 | ranges; | ||
91 | |||
92 | gcb0: gpio@d4019000 { | ||
93 | reg = <0xd4019000 0x4>; | ||
94 | }; | ||
95 | |||
96 | gcb1: gpio@d4019004 { | ||
97 | reg = <0xd4019004 0x4>; | ||
98 | }; | ||
99 | |||
100 | gcb2: gpio@d4019008 { | ||
101 | reg = <0xd4019008 0x4>; | ||
102 | }; | ||
103 | |||
104 | gcb3: gpio@d4019100 { | ||
105 | reg = <0xd4019100 0x4>; | ||
106 | }; | ||
72 | }; | 107 | }; |
73 | 108 | ||
74 | twsi1: i2c@d4011000 { | 109 | twsi1: i2c@d4011000 { |
75 | compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c"; | 110 | compatible = "mrvl,mmp-twsi"; |
76 | reg = <0xd4011000 0x1000>; | 111 | reg = <0xd4011000 0x1000>; |
77 | interrupts = <7>; | 112 | interrupts = <7>; |
78 | mrvl,i2c-fast-mode; | 113 | mrvl,i2c-fast-mode; |
@@ -80,7 +115,7 @@ | |||
80 | }; | 115 | }; |
81 | 116 | ||
82 | twsi2: i2c@d4025000 { | 117 | twsi2: i2c@d4025000 { |
83 | compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c"; | 118 | compatible = "mrvl,mmp-twsi"; |
84 | reg = <0xd4025000 0x1000>; | 119 | reg = <0xd4025000 0x1000>; |
85 | interrupts = <58>; | 120 | interrupts = <58>; |
86 | status = "disabled"; | 121 | status = "disabled"; |
diff --git a/arch/arm/boot/dts/pxa910-dkb.dts b/arch/arm/boot/dts/pxa910-dkb.dts new file mode 100644 index 000000000000..e92be5a474e7 --- /dev/null +++ b/arch/arm/boot/dts/pxa910-dkb.dts | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Marvell Technology Group Ltd. | ||
3 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * publishhed by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | /dts-v1/; | ||
11 | /include/ "pxa910.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Marvell PXA910 DKB Development Board"; | ||
15 | compatible = "mrvl,pxa910-dkb", "mrvl,pxa910"; | ||
16 | |||
17 | chosen { | ||
18 | bootargs = "console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on"; | ||
19 | }; | ||
20 | |||
21 | memory { | ||
22 | reg = <0x00000000 0x10000000>; | ||
23 | }; | ||
24 | |||
25 | soc { | ||
26 | apb@d4000000 { | ||
27 | uart1: uart@d4017000 { | ||
28 | status = "okay"; | ||
29 | }; | ||
30 | twsi1: i2c@d4011000 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | rtc: rtc@d4010000 { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
diff --git a/arch/arm/boot/dts/pxa910.dtsi b/arch/arm/boot/dts/pxa910.dtsi new file mode 100644 index 000000000000..aebf32de73b4 --- /dev/null +++ b/arch/arm/boot/dts/pxa910.dtsi | |||
@@ -0,0 +1,140 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Marvell Technology Group Ltd. | ||
3 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * publishhed by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | /include/ "skeleton.dtsi" | ||
11 | |||
12 | / { | ||
13 | aliases { | ||
14 | serial0 = &uart1; | ||
15 | serial1 = &uart2; | ||
16 | serial2 = &uart3; | ||
17 | i2c0 = &twsi1; | ||
18 | i2c1 = &twsi2; | ||
19 | }; | ||
20 | |||
21 | soc { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | compatible = "simple-bus"; | ||
25 | interrupt-parent = <&intc>; | ||
26 | ranges; | ||
27 | |||
28 | axi@d4200000 { /* AXI */ | ||
29 | compatible = "mrvl,axi-bus", "simple-bus"; | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <1>; | ||
32 | reg = <0xd4200000 0x00200000>; | ||
33 | ranges; | ||
34 | |||
35 | intc: interrupt-controller@d4282000 { | ||
36 | compatible = "mrvl,mmp-intc"; | ||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | reg = <0xd4282000 0x1000>; | ||
40 | mrvl,intc-nr-irqs = <64>; | ||
41 | }; | ||
42 | |||
43 | }; | ||
44 | |||
45 | apb@d4000000 { /* APB */ | ||
46 | compatible = "mrvl,apb-bus", "simple-bus"; | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <1>; | ||
49 | reg = <0xd4000000 0x00200000>; | ||
50 | ranges; | ||
51 | |||
52 | timer0: timer@d4014000 { | ||
53 | compatible = "mrvl,mmp-timer"; | ||
54 | reg = <0xd4014000 0x100>; | ||
55 | interrupts = <13>; | ||
56 | }; | ||
57 | |||
58 | timer1: timer@d4016000 { | ||
59 | compatible = "mrvl,mmp-timer"; | ||
60 | reg = <0xd4016000 0x100>; | ||
61 | interrupts = <29>; | ||
62 | status = "disabled"; | ||
63 | }; | ||
64 | |||
65 | uart1: uart@d4017000 { | ||
66 | compatible = "mrvl,mmp-uart"; | ||
67 | reg = <0xd4017000 0x1000>; | ||
68 | interrupts = <27>; | ||
69 | status = "disabled"; | ||
70 | }; | ||
71 | |||
72 | uart2: uart@d4018000 { | ||
73 | compatible = "mrvl,mmp-uart"; | ||
74 | reg = <0xd4018000 0x1000>; | ||
75 | interrupts = <28>; | ||
76 | status = "disabled"; | ||
77 | }; | ||
78 | |||
79 | uart3: uart@d4036000 { | ||
80 | compatible = "mrvl,mmp-uart"; | ||
81 | reg = <0xd4036000 0x1000>; | ||
82 | interrupts = <59>; | ||
83 | status = "disabled"; | ||
84 | }; | ||
85 | |||
86 | gpio@d4019000 { | ||
87 | compatible = "mrvl,mmp-gpio"; | ||
88 | #address-cells = <1>; | ||
89 | #size-cells = <1>; | ||
90 | reg = <0xd4019000 0x1000>; | ||
91 | gpio-controller; | ||
92 | #gpio-cells = <2>; | ||
93 | interrupts = <49>; | ||
94 | interrupt-names = "gpio_mux"; | ||
95 | interrupt-controller; | ||
96 | #interrupt-cells = <1>; | ||
97 | ranges; | ||
98 | |||
99 | gcb0: gpio@d4019000 { | ||
100 | reg = <0xd4019000 0x4>; | ||
101 | }; | ||
102 | |||
103 | gcb1: gpio@d4019004 { | ||
104 | reg = <0xd4019004 0x4>; | ||
105 | }; | ||
106 | |||
107 | gcb2: gpio@d4019008 { | ||
108 | reg = <0xd4019008 0x4>; | ||
109 | }; | ||
110 | |||
111 | gcb3: gpio@d4019100 { | ||
112 | reg = <0xd4019100 0x4>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | twsi1: i2c@d4011000 { | ||
117 | compatible = "mrvl,mmp-twsi"; | ||
118 | reg = <0xd4011000 0x1000>; | ||
119 | interrupts = <7>; | ||
120 | mrvl,i2c-fast-mode; | ||
121 | status = "disabled"; | ||
122 | }; | ||
123 | |||
124 | twsi2: i2c@d4037000 { | ||
125 | compatible = "mrvl,mmp-twsi"; | ||
126 | reg = <0xd4037000 0x1000>; | ||
127 | interrupts = <54>; | ||
128 | status = "disabled"; | ||
129 | }; | ||
130 | |||
131 | rtc: rtc@d4010000 { | ||
132 | compatible = "mrvl,mmp-rtc"; | ||
133 | reg = <0xd4010000 0x1000>; | ||
134 | interrupts = <5 6>; | ||
135 | interrupt-names = "rtc 1Hz", "rtc alarm"; | ||
136 | status = "disabled"; | ||
137 | }; | ||
138 | }; | ||
139 | }; | ||
140 | }; | ||
diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi new file mode 100644 index 000000000000..677fc603f8b3 --- /dev/null +++ b/arch/arm/boot/dts/sh7372.dtsi | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the sh7372 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /include/ "skeleton.dtsi" | ||
12 | |||
13 | / { | ||
14 | compatible = "renesas,sh7372"; | ||
15 | |||
16 | cpus { | ||
17 | cpu@0 { | ||
18 | compatible = "arm,cortex-a8"; | ||
19 | }; | ||
20 | }; | ||
21 | }; | ||
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 359c6d679156..d99dc04f0d91 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts | |||
@@ -30,35 +30,35 @@ | |||
30 | wakeup = <1>; | 30 | wakeup = <1>; |
31 | linux,code = <2>; | 31 | linux,code = <2>; |
32 | label = "userpb"; | 32 | label = "userpb"; |
33 | gpios = <&gpio1 0>; | 33 | gpios = <&gpio1 0 0>; |
34 | }; | 34 | }; |
35 | button@2 { | 35 | button@2 { |
36 | debounce_interval = <50>; | 36 | debounce_interval = <50>; |
37 | wakeup = <1>; | 37 | wakeup = <1>; |
38 | linux,code = <3>; | 38 | linux,code = <3>; |
39 | label = "userpb"; | 39 | label = "extkb1"; |
40 | gpios = <&gpio4 23>; | 40 | gpios = <&gpio4 23 0>; |
41 | }; | 41 | }; |
42 | button@3 { | 42 | button@3 { |
43 | debounce_interval = <50>; | 43 | debounce_interval = <50>; |
44 | wakeup = <1>; | 44 | wakeup = <1>; |
45 | linux,code = <4>; | 45 | linux,code = <4>; |
46 | label = "userpb"; | 46 | label = "extkb2"; |
47 | gpios = <&gpio4 23>; | 47 | gpios = <&gpio4 24 0>; |
48 | }; | 48 | }; |
49 | button@4 { | 49 | button@4 { |
50 | debounce_interval = <50>; | 50 | debounce_interval = <50>; |
51 | wakeup = <1>; | 51 | wakeup = <1>; |
52 | linux,code = <5>; | 52 | linux,code = <5>; |
53 | label = "userpb"; | 53 | label = "extkb3"; |
54 | gpios = <&gpio5 1>; | 54 | gpios = <&gpio5 1 0>; |
55 | }; | 55 | }; |
56 | button@5 { | 56 | button@5 { |
57 | debounce_interval = <50>; | 57 | debounce_interval = <50>; |
58 | wakeup = <1>; | 58 | wakeup = <1>; |
59 | linux,code = <6>; | 59 | linux,code = <6>; |
60 | label = "userpb"; | 60 | label = "extkb4"; |
61 | gpios = <&gpio5 2>; | 61 | gpios = <&gpio5 2 0>; |
62 | }; | 62 | }; |
63 | }; | 63 | }; |
64 | 64 | ||
@@ -73,17 +73,19 @@ | |||
73 | soc-u9500 { | 73 | soc-u9500 { |
74 | 74 | ||
75 | external-bus@50000000 { | 75 | external-bus@50000000 { |
76 | compatible = "simple-bus"; | 76 | status = "okay"; |
77 | reg = <0x50000000 0x10000000>; | 77 | |
78 | #address-cells = <1>; | 78 | ethernet@0 { |
79 | #size-cells = <1>; | 79 | compatible = "smsc,lan9115"; |
80 | ranges; | 80 | reg = <0 0x10000>; |
81 | 81 | interrupts = <12 0x1>; | |
82 | ethernet@50000000 { | ||
83 | compatible = "smsc,9111"; | ||
84 | reg = <0x50000000 0x10000>; | ||
85 | interrupts = <12>; | ||
86 | interrupt-parent = <&gpio4>; | 82 | interrupt-parent = <&gpio4>; |
83 | |||
84 | reg-shift = <1>; | ||
85 | reg-io-width = <2>; | ||
86 | smsc,force-internal-phy; | ||
87 | smsc,irq-active-high; | ||
88 | smsc,irq-push-pull; | ||
87 | }; | 89 | }; |
88 | }; | 90 | }; |
89 | 91 | ||
diff --git a/arch/arm/boot/dts/spear300-evb.dts b/arch/arm/boot/dts/spear300-evb.dts new file mode 100644 index 000000000000..6a79d69775b5 --- /dev/null +++ b/arch/arm/boot/dts/spear300-evb.dts | |||
@@ -0,0 +1,183 @@ | |||
1 | /* | ||
2 | * DTS file for SPEAr300 Evaluation Baord | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | /include/ "spear300.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "ST SPEAr300 Evaluation Board"; | ||
19 | compatible = "st,spear300-evb", "st,spear300"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | memory { | ||
24 | reg = <0 0x40000000>; | ||
25 | }; | ||
26 | |||
27 | ahb { | ||
28 | clcd@60000000 { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | dma@fc400000 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | fsmc: flash@94000000 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | gmac: eth@e0800000 { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | sdhci@70000000 { | ||
45 | int-gpio = <&gpio1 0 0>; | ||
46 | power-gpio = <&gpio1 2 1>; | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | smi: flash@fc000000 { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | spi0: spi@d0100000 { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | ehci@e1800000 { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | ohci@e1900000 { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | ohci@e2100000 { | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | apb { | ||
71 | gpio0: gpio@fc980000 { | ||
72 | status = "okay"; | ||
73 | }; | ||
74 | |||
75 | gpio1: gpio@a9000000 { | ||
76 | status = "okay"; | ||
77 | }; | ||
78 | |||
79 | i2c0: i2c@d0180000 { | ||
80 | status = "okay"; | ||
81 | }; | ||
82 | |||
83 | kbd@a0000000 { | ||
84 | linux,keymap = < 0x00000001 | ||
85 | 0x00010002 | ||
86 | 0x00020003 | ||
87 | 0x00030004 | ||
88 | 0x00040005 | ||
89 | 0x00050006 | ||
90 | 0x00060007 | ||
91 | 0x00070008 | ||
92 | 0x00080009 | ||
93 | 0x0100000a | ||
94 | 0x0101000c | ||
95 | 0x0102000d | ||
96 | 0x0103000e | ||
97 | 0x0104000f | ||
98 | 0x01050010 | ||
99 | 0x01060011 | ||
100 | 0x01070012 | ||
101 | 0x01080013 | ||
102 | 0x02000014 | ||
103 | 0x02010015 | ||
104 | 0x02020016 | ||
105 | 0x02030017 | ||
106 | 0x02040018 | ||
107 | 0x02050019 | ||
108 | 0x0206001a | ||
109 | 0x0207001b | ||
110 | 0x0208001c | ||
111 | 0x0300001d | ||
112 | 0x0301001e | ||
113 | 0x0302001f | ||
114 | 0x03030020 | ||
115 | 0x03040021 | ||
116 | 0x03050022 | ||
117 | 0x03060023 | ||
118 | 0x03070024 | ||
119 | 0x03080025 | ||
120 | 0x04000026 | ||
121 | 0x04010027 | ||
122 | 0x04020028 | ||
123 | 0x04030029 | ||
124 | 0x0404002a | ||
125 | 0x0405002b | ||
126 | 0x0406002c | ||
127 | 0x0407002d | ||
128 | 0x0408002e | ||
129 | 0x0500002f | ||
130 | 0x05010030 | ||
131 | 0x05020031 | ||
132 | 0x05030032 | ||
133 | 0x05040033 | ||
134 | 0x05050034 | ||
135 | 0x05060035 | ||
136 | 0x05070036 | ||
137 | 0x05080037 | ||
138 | 0x06000038 | ||
139 | 0x06010039 | ||
140 | 0x0602003a | ||
141 | 0x0603003b | ||
142 | 0x0604003c | ||
143 | 0x0605003d | ||
144 | 0x0606003e | ||
145 | 0x0607003f | ||
146 | 0x06080040 | ||
147 | 0x07000041 | ||
148 | 0x07010042 | ||
149 | 0x07020043 | ||
150 | 0x07030044 | ||
151 | 0x07040045 | ||
152 | 0x07050046 | ||
153 | 0x07060047 | ||
154 | 0x07070048 | ||
155 | 0x07080049 | ||
156 | 0x0800004a | ||
157 | 0x0801004b | ||
158 | 0x0802004c | ||
159 | 0x0803004d | ||
160 | 0x0804004e | ||
161 | 0x0805004f | ||
162 | 0x08060050 | ||
163 | 0x08070051 | ||
164 | 0x08080052 >; | ||
165 | autorepeat; | ||
166 | st,mode = <0>; | ||
167 | status = "okay"; | ||
168 | }; | ||
169 | |||
170 | rtc@fc900000 { | ||
171 | status = "okay"; | ||
172 | }; | ||
173 | |||
174 | serial@d0000000 { | ||
175 | status = "okay"; | ||
176 | }; | ||
177 | |||
178 | wdt@fc880000 { | ||
179 | status = "okay"; | ||
180 | }; | ||
181 | }; | ||
182 | }; | ||
183 | }; | ||
diff --git a/arch/arm/boot/dts/spear300.dtsi b/arch/arm/boot/dts/spear300.dtsi new file mode 100644 index 000000000000..f9fcbf4f477b --- /dev/null +++ b/arch/arm/boot/dts/spear300.dtsi | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * DTS file for SPEAr300 SoC | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "spear3xx.dtsi" | ||
15 | |||
16 | / { | ||
17 | ahb { | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | compatible = "simple-bus"; | ||
21 | ranges = <0x60000000 0x60000000 0x50000000 | ||
22 | 0xd0000000 0xd0000000 0x30000000>; | ||
23 | |||
24 | clcd@60000000 { | ||
25 | compatible = "arm,clcd-pl110", "arm,primecell"; | ||
26 | reg = <0x60000000 0x1000>; | ||
27 | interrupts = <30>; | ||
28 | status = "disabled"; | ||
29 | }; | ||
30 | |||
31 | fsmc: flash@94000000 { | ||
32 | compatible = "st,spear600-fsmc-nand"; | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <1>; | ||
35 | reg = <0x94000000 0x1000 /* FSMC Register */ | ||
36 | 0x80000000 0x0010>; /* NAND Base */ | ||
37 | reg-names = "fsmc_regs", "nand_data"; | ||
38 | st,ale-off = <0x20000>; | ||
39 | st,cle-off = <0x10000>; | ||
40 | status = "disabled"; | ||
41 | }; | ||
42 | |||
43 | sdhci@70000000 { | ||
44 | compatible = "st,sdhci-spear"; | ||
45 | reg = <0x70000000 0x100>; | ||
46 | interrupts = <1>; | ||
47 | status = "disabled"; | ||
48 | }; | ||
49 | |||
50 | apb { | ||
51 | #address-cells = <1>; | ||
52 | #size-cells = <1>; | ||
53 | compatible = "simple-bus"; | ||
54 | ranges = <0xa0000000 0xa0000000 0x10000000 | ||
55 | 0xd0000000 0xd0000000 0x30000000>; | ||
56 | |||
57 | gpio1: gpio@a9000000 { | ||
58 | #gpio-cells = <2>; | ||
59 | compatible = "arm,pl061", "arm,primecell"; | ||
60 | gpio-controller; | ||
61 | reg = <0xa9000000 0x1000>; | ||
62 | status = "disabled"; | ||
63 | }; | ||
64 | |||
65 | kbd@a0000000 { | ||
66 | compatible = "st,spear300-kbd"; | ||
67 | reg = <0xa0000000 0x1000>; | ||
68 | status = "disabled"; | ||
69 | }; | ||
70 | }; | ||
71 | }; | ||
72 | }; | ||
diff --git a/arch/arm/boot/dts/spear310-evb.dts b/arch/arm/boot/dts/spear310-evb.dts new file mode 100644 index 000000000000..c86af33f700e --- /dev/null +++ b/arch/arm/boot/dts/spear310-evb.dts | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * DTS file for SPEAr310 Evaluation Baord | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | /include/ "spear310.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "ST SPEAr310 Evaluation Board"; | ||
19 | compatible = "st,spear310-evb", "st,spear310"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | memory { | ||
24 | reg = <0 0x40000000>; | ||
25 | }; | ||
26 | |||
27 | ahb { | ||
28 | dma@fc400000 { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | fsmc: flash@44000000 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | gmac: eth@e0800000 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | smi: flash@fc000000 { | ||
41 | status = "okay"; | ||
42 | clock-rate=<50000000>; | ||
43 | |||
44 | flash@f8000000 { | ||
45 | label = "m25p64"; | ||
46 | reg = <0xf8000000 0x800000>; | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <1>; | ||
49 | st,smi-fast-mode; | ||
50 | }; | ||
51 | }; | ||
52 | |||
53 | spi0: spi@d0100000 { | ||
54 | status = "okay"; | ||
55 | }; | ||
56 | |||
57 | ehci@e1800000 { | ||
58 | status = "okay"; | ||
59 | }; | ||
60 | |||
61 | ohci@e1900000 { | ||
62 | status = "okay"; | ||
63 | }; | ||
64 | |||
65 | ohci@e2100000 { | ||
66 | status = "okay"; | ||
67 | }; | ||
68 | |||
69 | apb { | ||
70 | gpio0: gpio@fc980000 { | ||
71 | status = "okay"; | ||
72 | }; | ||
73 | |||
74 | i2c0: i2c@d0180000 { | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | |||
78 | rtc@fc900000 { | ||
79 | status = "okay"; | ||
80 | }; | ||
81 | |||
82 | serial@d0000000 { | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | |||
86 | serial@b2000000 { | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | serial@b2080000 { | ||
91 | status = "okay"; | ||
92 | }; | ||
93 | |||
94 | serial@b2100000 { | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | |||
98 | serial@b2180000 { | ||
99 | status = "okay"; | ||
100 | }; | ||
101 | |||
102 | serial@b2200000 { | ||
103 | status = "okay"; | ||
104 | }; | ||
105 | |||
106 | wdt@fc880000 { | ||
107 | status = "okay"; | ||
108 | }; | ||
109 | }; | ||
110 | }; | ||
111 | }; | ||
diff --git a/arch/arm/boot/dts/spear310.dtsi b/arch/arm/boot/dts/spear310.dtsi new file mode 100644 index 000000000000..dc7fa14da846 --- /dev/null +++ b/arch/arm/boot/dts/spear310.dtsi | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * DTS file for SPEAr310 SoC | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "spear3xx.dtsi" | ||
15 | |||
16 | / { | ||
17 | ahb { | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | compatible = "simple-bus"; | ||
21 | ranges = <0x40000000 0x40000000 0x10000000 | ||
22 | 0xb0000000 0xb0000000 0x10000000 | ||
23 | 0xd0000000 0xd0000000 0x30000000>; | ||
24 | |||
25 | fsmc: flash@44000000 { | ||
26 | compatible = "st,spear600-fsmc-nand"; | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <1>; | ||
29 | reg = <0x44000000 0x1000 /* FSMC Register */ | ||
30 | 0x40000000 0x0010>; /* NAND Base */ | ||
31 | reg-names = "fsmc_regs", "nand_data"; | ||
32 | st,ale-off = <0x10000>; | ||
33 | st,cle-off = <0x20000>; | ||
34 | status = "disabled"; | ||
35 | }; | ||
36 | |||
37 | apb { | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <1>; | ||
40 | compatible = "simple-bus"; | ||
41 | ranges = <0xb0000000 0xb0000000 0x10000000 | ||
42 | 0xd0000000 0xd0000000 0x30000000>; | ||
43 | |||
44 | serial@b2000000 { | ||
45 | compatible = "arm,pl011", "arm,primecell"; | ||
46 | reg = <0xb2000000 0x1000>; | ||
47 | status = "disabled"; | ||
48 | }; | ||
49 | |||
50 | serial@b2080000 { | ||
51 | compatible = "arm,pl011", "arm,primecell"; | ||
52 | reg = <0xb2080000 0x1000>; | ||
53 | status = "disabled"; | ||
54 | }; | ||
55 | |||
56 | serial@b2100000 { | ||
57 | compatible = "arm,pl011", "arm,primecell"; | ||
58 | reg = <0xb2100000 0x1000>; | ||
59 | status = "disabled"; | ||
60 | }; | ||
61 | |||
62 | serial@b2180000 { | ||
63 | compatible = "arm,pl011", "arm,primecell"; | ||
64 | reg = <0xb2180000 0x1000>; | ||
65 | status = "disabled"; | ||
66 | }; | ||
67 | |||
68 | serial@b2200000 { | ||
69 | compatible = "arm,pl011", "arm,primecell"; | ||
70 | reg = <0xb2200000 0x1000>; | ||
71 | status = "disabled"; | ||
72 | }; | ||
73 | }; | ||
74 | }; | ||
75 | }; | ||
diff --git a/arch/arm/boot/dts/spear320-evb.dts b/arch/arm/boot/dts/spear320-evb.dts new file mode 100644 index 000000000000..d43de712e863 --- /dev/null +++ b/arch/arm/boot/dts/spear320-evb.dts | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * DTS file for SPEAr320 Evaluation Baord | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | /include/ "spear320.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "ST SPEAr300 Evaluation Board"; | ||
19 | compatible = "st,spear300-evb", "st,spear300"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | memory { | ||
24 | reg = <0 0x40000000>; | ||
25 | }; | ||
26 | |||
27 | ahb { | ||
28 | clcd@90000000 { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | dma@fc400000 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | fsmc: flash@4c000000 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | gmac: eth@e0800000 { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | sdhci@70000000 { | ||
45 | power-gpio = <&gpio0 2 1>; | ||
46 | power_always_enb; | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | smi: flash@fc000000 { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | spi0: spi@d0100000 { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | spi1: spi@a5000000 { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | spi2: spi@a6000000 { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | ehci@e1800000 { | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | ohci@e1900000 { | ||
71 | status = "okay"; | ||
72 | }; | ||
73 | |||
74 | ohci@e2100000 { | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | |||
78 | apb { | ||
79 | gpio0: gpio@fc980000 { | ||
80 | status = "okay"; | ||
81 | }; | ||
82 | |||
83 | i2c0: i2c@d0180000 { | ||
84 | status = "okay"; | ||
85 | }; | ||
86 | |||
87 | i2c1: i2c@a7000000 { | ||
88 | status = "okay"; | ||
89 | }; | ||
90 | |||
91 | rtc@fc900000 { | ||
92 | status = "okay"; | ||
93 | }; | ||
94 | |||
95 | serial@d0000000 { | ||
96 | status = "okay"; | ||
97 | }; | ||
98 | |||
99 | serial@a3000000 { | ||
100 | status = "okay"; | ||
101 | }; | ||
102 | |||
103 | serial@a4000000 { | ||
104 | status = "okay"; | ||
105 | }; | ||
106 | |||
107 | wdt@fc880000 { | ||
108 | status = "okay"; | ||
109 | }; | ||
110 | }; | ||
111 | }; | ||
112 | }; | ||
diff --git a/arch/arm/boot/dts/spear320.dtsi b/arch/arm/boot/dts/spear320.dtsi new file mode 100644 index 000000000000..9a0267a5a0b7 --- /dev/null +++ b/arch/arm/boot/dts/spear320.dtsi | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * DTS file for SPEAr320 SoC | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "spear3xx.dtsi" | ||
15 | |||
16 | / { | ||
17 | ahb { | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | compatible = "simple-bus"; | ||
21 | ranges = <0x40000000 0x40000000 0x70000000 | ||
22 | 0xd0000000 0xd0000000 0x30000000>; | ||
23 | |||
24 | clcd@90000000 { | ||
25 | compatible = "arm,clcd-pl110", "arm,primecell"; | ||
26 | reg = <0x90000000 0x1000>; | ||
27 | interrupts = <33>; | ||
28 | status = "disabled"; | ||
29 | }; | ||
30 | |||
31 | fsmc: flash@4c000000 { | ||
32 | compatible = "st,spear600-fsmc-nand"; | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <1>; | ||
35 | reg = <0x4c000000 0x1000 /* FSMC Register */ | ||
36 | 0x50000000 0x0010>; /* NAND Base */ | ||
37 | reg-names = "fsmc_regs", "nand_data"; | ||
38 | st,ale-off = <0x20000>; | ||
39 | st,cle-off = <0x10000>; | ||
40 | status = "disabled"; | ||
41 | }; | ||
42 | |||
43 | sdhci@70000000 { | ||
44 | compatible = "st,sdhci-spear"; | ||
45 | reg = <0x70000000 0x100>; | ||
46 | interrupts = <29>; | ||
47 | status = "disabled"; | ||
48 | }; | ||
49 | |||
50 | spi1: spi@a5000000 { | ||
51 | compatible = "arm,pl022", "arm,primecell"; | ||
52 | reg = <0xa5000000 0x1000>; | ||
53 | status = "disabled"; | ||
54 | }; | ||
55 | |||
56 | spi2: spi@a6000000 { | ||
57 | compatible = "arm,pl022", "arm,primecell"; | ||
58 | reg = <0xa6000000 0x1000>; | ||
59 | status = "disabled"; | ||
60 | }; | ||
61 | |||
62 | apb { | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <1>; | ||
65 | compatible = "simple-bus"; | ||
66 | ranges = <0xa0000000 0xa0000000 0x10000000 | ||
67 | 0xd0000000 0xd0000000 0x30000000>; | ||
68 | |||
69 | i2c1: i2c@a7000000 { | ||
70 | #address-cells = <1>; | ||
71 | #size-cells = <0>; | ||
72 | compatible = "snps,designware-i2c"; | ||
73 | reg = <0xa7000000 0x1000>; | ||
74 | status = "disabled"; | ||
75 | }; | ||
76 | |||
77 | serial@a3000000 { | ||
78 | compatible = "arm,pl011", "arm,primecell"; | ||
79 | reg = <0xa3000000 0x1000>; | ||
80 | status = "disabled"; | ||
81 | }; | ||
82 | |||
83 | serial@a4000000 { | ||
84 | compatible = "arm,pl011", "arm,primecell"; | ||
85 | reg = <0xa4000000 0x1000>; | ||
86 | status = "disabled"; | ||
87 | }; | ||
88 | }; | ||
89 | }; | ||
90 | }; | ||
diff --git a/arch/arm/boot/dts/spear3xx.dtsi b/arch/arm/boot/dts/spear3xx.dtsi new file mode 100644 index 000000000000..0ae7c8e86311 --- /dev/null +++ b/arch/arm/boot/dts/spear3xx.dtsi | |||
@@ -0,0 +1,144 @@ | |||
1 | /* | ||
2 | * DTS file for all SPEAr3xx SoCs | ||
3 | * | ||
4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "skeleton.dtsi" | ||
15 | |||
16 | / { | ||
17 | interrupt-parent = <&vic>; | ||
18 | |||
19 | cpus { | ||
20 | cpu@0 { | ||
21 | compatible = "arm,arm926ejs"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | memory { | ||
26 | device_type = "memory"; | ||
27 | reg = <0 0x40000000>; | ||
28 | }; | ||
29 | |||
30 | ahb { | ||
31 | #address-cells = <1>; | ||
32 | #size-cells = <1>; | ||
33 | compatible = "simple-bus"; | ||
34 | ranges = <0xd0000000 0xd0000000 0x30000000>; | ||
35 | |||
36 | vic: interrupt-controller@f1100000 { | ||
37 | compatible = "arm,pl190-vic"; | ||
38 | interrupt-controller; | ||
39 | reg = <0xf1100000 0x1000>; | ||
40 | #interrupt-cells = <1>; | ||
41 | }; | ||
42 | |||
43 | dma@fc400000 { | ||
44 | compatible = "arm,pl080", "arm,primecell"; | ||
45 | reg = <0xfc400000 0x1000>; | ||
46 | interrupt-parent = <&vic>; | ||
47 | interrupts = <8>; | ||
48 | status = "disabled"; | ||
49 | }; | ||
50 | |||
51 | gmac: eth@e0800000 { | ||
52 | compatible = "st,spear600-gmac"; | ||
53 | reg = <0xe0800000 0x8000>; | ||
54 | interrupts = <23 22>; | ||
55 | interrupt-names = "macirq", "eth_wake_irq"; | ||
56 | status = "disabled"; | ||
57 | }; | ||
58 | |||
59 | smi: flash@fc000000 { | ||
60 | compatible = "st,spear600-smi"; | ||
61 | #address-cells = <1>; | ||
62 | #size-cells = <1>; | ||
63 | reg = <0xfc000000 0x1000>; | ||
64 | interrupts = <9>; | ||
65 | status = "disabled"; | ||
66 | }; | ||
67 | |||
68 | spi0: spi@d0100000 { | ||
69 | compatible = "arm,pl022", "arm,primecell"; | ||
70 | reg = <0xd0100000 0x1000>; | ||
71 | interrupts = <20>; | ||
72 | status = "disabled"; | ||
73 | }; | ||
74 | |||
75 | ehci@e1800000 { | ||
76 | compatible = "st,spear600-ehci", "usb-ehci"; | ||
77 | reg = <0xe1800000 0x1000>; | ||
78 | interrupts = <26>; | ||
79 | status = "disabled"; | ||
80 | }; | ||
81 | |||
82 | ohci@e1900000 { | ||
83 | compatible = "st,spear600-ohci", "usb-ohci"; | ||
84 | reg = <0xe1900000 0x1000>; | ||
85 | interrupts = <25>; | ||
86 | status = "disabled"; | ||
87 | }; | ||
88 | |||
89 | ohci@e2100000 { | ||
90 | compatible = "st,spear600-ohci", "usb-ohci"; | ||
91 | reg = <0xe2100000 0x1000>; | ||
92 | interrupts = <27>; | ||
93 | status = "disabled"; | ||
94 | }; | ||
95 | |||
96 | apb { | ||
97 | #address-cells = <1>; | ||
98 | #size-cells = <1>; | ||
99 | compatible = "simple-bus"; | ||
100 | ranges = <0xd0000000 0xd0000000 0x30000000>; | ||
101 | |||
102 | gpio0: gpio@fc980000 { | ||
103 | compatible = "arm,pl061", "arm,primecell"; | ||
104 | reg = <0xfc980000 0x1000>; | ||
105 | interrupts = <11>; | ||
106 | gpio-controller; | ||
107 | #gpio-cells = <2>; | ||
108 | interrupt-controller; | ||
109 | #interrupt-cells = <2>; | ||
110 | status = "disabled"; | ||
111 | }; | ||
112 | |||
113 | i2c0: i2c@d0180000 { | ||
114 | #address-cells = <1>; | ||
115 | #size-cells = <0>; | ||
116 | compatible = "snps,designware-i2c"; | ||
117 | reg = <0xd0180000 0x1000>; | ||
118 | interrupts = <21>; | ||
119 | status = "disabled"; | ||
120 | }; | ||
121 | |||
122 | rtc@fc900000 { | ||
123 | compatible = "st,spear-rtc"; | ||
124 | reg = <0xfc900000 0x1000>; | ||
125 | interrupts = <10>; | ||
126 | status = "disabled"; | ||
127 | }; | ||
128 | |||
129 | serial@d0000000 { | ||
130 | compatible = "arm,pl011", "arm,primecell"; | ||
131 | reg = <0xd0000000 0x1000>; | ||
132 | interrupts = <19>; | ||
133 | status = "disabled"; | ||
134 | }; | ||
135 | |||
136 | wdt@fc880000 { | ||
137 | compatible = "arm,sp805", "arm,primecell"; | ||
138 | reg = <0xfc880000 0x1000>; | ||
139 | interrupts = <12>; | ||
140 | status = "disabled"; | ||
141 | }; | ||
142 | }; | ||
143 | }; | ||
144 | }; | ||
diff --git a/arch/arm/boot/dts/spear600-evb.dts b/arch/arm/boot/dts/spear600-evb.dts index 636292e18c90..790a7a8a5ccd 100644 --- a/arch/arm/boot/dts/spear600-evb.dts +++ b/arch/arm/boot/dts/spear600-evb.dts | |||
@@ -24,6 +24,10 @@ | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | ahb { | 26 | ahb { |
27 | dma@fc400000 { | ||
28 | status = "okay"; | ||
29 | }; | ||
30 | |||
27 | gmac: ethernet@e0800000 { | 31 | gmac: ethernet@e0800000 { |
28 | phy-mode = "gmii"; | 32 | phy-mode = "gmii"; |
29 | status = "okay"; | 33 | status = "okay"; |
diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi index ebe0885a2b98..d777e3a6f178 100644 --- a/arch/arm/boot/dts/spear600.dtsi +++ b/arch/arm/boot/dts/spear600.dtsi | |||
@@ -45,6 +45,14 @@ | |||
45 | #interrupt-cells = <1>; | 45 | #interrupt-cells = <1>; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | dma@fc400000 { | ||
49 | compatible = "arm,pl080", "arm,primecell"; | ||
50 | reg = <0xfc400000 0x1000>; | ||
51 | interrupt-parent = <&vic1>; | ||
52 | interrupts = <10>; | ||
53 | status = "disabled"; | ||
54 | }; | ||
55 | |||
48 | gmac: ethernet@e0800000 { | 56 | gmac: ethernet@e0800000 { |
49 | compatible = "st,spear600-gmac"; | 57 | compatible = "st,spear600-gmac"; |
50 | reg = <0xe0800000 0x8000>; | 58 | reg = <0xe0800000 0x8000>; |
diff --git a/arch/arm/boot/dts/tny_a9260.dts b/arch/arm/boot/dts/tny_a9260.dts new file mode 100644 index 000000000000..367a16dcd5ef --- /dev/null +++ b/arch/arm/boot/dts/tny_a9260.dts | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * tny_a9260.dts - Device Tree file for Caloa TNY A9260 board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9260.dtsi" | ||
10 | /include/ "tny_a9260_common.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "Calao TNY A9260"; | ||
14 | compatible = "calao,tny-a9260", "atmel,at91sam9260", "atmel,at91sam9"; | ||
15 | }; | ||
diff --git a/arch/arm/boot/dts/tny_a9260_common.dtsi b/arch/arm/boot/dts/tny_a9260_common.dtsi new file mode 100644 index 000000000000..0e6d3de2e09e --- /dev/null +++ b/arch/arm/boot/dts/tny_a9260_common.dtsi | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * tny_a9260_common.dtsi - Device Tree file for Caloa TNY A926x board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | / { | ||
10 | chosen { | ||
11 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock6 rw rootfstype=ubifs"; | ||
12 | }; | ||
13 | |||
14 | memory { | ||
15 | reg = <0x20000000 0x4000000>; | ||
16 | }; | ||
17 | |||
18 | clocks { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <1>; | ||
21 | ranges; | ||
22 | |||
23 | main_clock: clock@0 { | ||
24 | compatible = "atmel,osc", "fixed-clock"; | ||
25 | clock-frequency = <12000000>; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | ahb { | ||
30 | apb { | ||
31 | dbgu: serial@fffff200 { | ||
32 | status = "okay"; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | nand0: nand@40000000 { | ||
37 | nand-bus-width = <8>; | ||
38 | nand-ecc-mode = "soft"; | ||
39 | nand-on-flash-bbt; | ||
40 | status = "okay"; | ||
41 | |||
42 | at91bootstrap@0 { | ||
43 | label = "at91bootstrap"; | ||
44 | reg = <0x0 0x20000>; | ||
45 | }; | ||
46 | |||
47 | barebox@20000 { | ||
48 | label = "barebox"; | ||
49 | reg = <0x20000 0x40000>; | ||
50 | }; | ||
51 | |||
52 | bareboxenv@60000 { | ||
53 | label = "bareboxenv"; | ||
54 | reg = <0x60000 0x20000>; | ||
55 | }; | ||
56 | |||
57 | bareboxenv2@80000 { | ||
58 | label = "bareboxenv2"; | ||
59 | reg = <0x80000 0x20000>; | ||
60 | }; | ||
61 | |||
62 | oftree@80000 { | ||
63 | label = "oftree"; | ||
64 | reg = <0xa0000 0x20000>; | ||
65 | }; | ||
66 | |||
67 | kernel@a0000 { | ||
68 | label = "kernel"; | ||
69 | reg = <0xc0000 0x400000>; | ||
70 | }; | ||
71 | |||
72 | rootfs@4a0000 { | ||
73 | label = "rootfs"; | ||
74 | reg = <0x4c0000 0x7800000>; | ||
75 | }; | ||
76 | |||
77 | data@7ca0000 { | ||
78 | label = "data"; | ||
79 | reg = <0x7cc0000 0x8340000>; | ||
80 | }; | ||
81 | }; | ||
82 | }; | ||
83 | }; | ||
diff --git a/arch/arm/boot/dts/tny_a9263.dts b/arch/arm/boot/dts/tny_a9263.dts new file mode 100644 index 000000000000..dee9c571306b --- /dev/null +++ b/arch/arm/boot/dts/tny_a9263.dts | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * usb_a9263.dts - Device Tree file for Caloa USB A9293 board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 only | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9263.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Calao TNY A9263"; | ||
13 | compatible = "atmel,tny-a9263", "atmel,at91sam9263", "atmel,at91sam9"; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; | ||
17 | }; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x20000000 0x4000000>; | ||
21 | }; | ||
22 | |||
23 | clocks { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | ranges; | ||
27 | |||
28 | main_clock: clock@0 { | ||
29 | compatible = "atmel,osc", "fixed-clock"; | ||
30 | clock-frequency = <12000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | ahb { | ||
35 | apb { | ||
36 | dbgu: serial@ffffee00 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | usb1: gadget@fff78000 { | ||
41 | atmel,vbus-gpio = <&pioB 11 0>; | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | nand0: nand@40000000 { | ||
47 | nand-bus-width = <8>; | ||
48 | nand-ecc-mode = "soft"; | ||
49 | nand-on-flash-bbt; | ||
50 | status = "okay"; | ||
51 | |||
52 | at91bootstrap@0 { | ||
53 | label = "at91bootstrap"; | ||
54 | reg = <0x0 0x20000>; | ||
55 | }; | ||
56 | |||
57 | barebox@20000 { | ||
58 | label = "barebox"; | ||
59 | reg = <0x20000 0x40000>; | ||
60 | }; | ||
61 | |||
62 | bareboxenv@60000 { | ||
63 | label = "bareboxenv"; | ||
64 | reg = <0x60000 0x20000>; | ||
65 | }; | ||
66 | |||
67 | bareboxenv2@80000 { | ||
68 | label = "bareboxenv2"; | ||
69 | reg = <0x80000 0x20000>; | ||
70 | }; | ||
71 | |||
72 | oftree@80000 { | ||
73 | label = "oftree"; | ||
74 | reg = <0xa0000 0x20000>; | ||
75 | }; | ||
76 | |||
77 | kernel@a0000 { | ||
78 | label = "kernel"; | ||
79 | reg = <0xc0000 0x400000>; | ||
80 | }; | ||
81 | |||
82 | rootfs@4a0000 { | ||
83 | label = "rootfs"; | ||
84 | reg = <0x4c0000 0x7800000>; | ||
85 | }; | ||
86 | |||
87 | data@7ca0000 { | ||
88 | label = "data"; | ||
89 | reg = <0x7cc0000 0x8340000>; | ||
90 | }; | ||
91 | }; | ||
92 | }; | ||
93 | |||
94 | i2c@0 { | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | }; | ||
diff --git a/arch/arm/boot/dts/tny_a9g20.dts b/arch/arm/boot/dts/tny_a9g20.dts new file mode 100644 index 000000000000..e1ab64c72dba --- /dev/null +++ b/arch/arm/boot/dts/tny_a9g20.dts | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * tny_a9g20.dts - Device Tree file for Caloa TNY A9G20 board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9g20.dtsi" | ||
10 | /include/ "tny_a9260_common.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "Calao TNY A9G20"; | ||
14 | compatible = "calao,tny-a9g20", "atmel,at91sam9g20", "atmel,at91sam9"; | ||
15 | }; | ||
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi new file mode 100644 index 000000000000..22f4d1394ed3 --- /dev/null +++ b/arch/arm/boot/dts/twl4030.dtsi | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * Integrated Power Management Chip | ||
11 | */ | ||
12 | &twl { | ||
13 | compatible = "ti,twl4030"; | ||
14 | interrupt-controller; | ||
15 | #interrupt-cells = <1>; | ||
16 | |||
17 | rtc { | ||
18 | compatible = "ti,twl4030-rtc"; | ||
19 | interrupts = <11>; | ||
20 | }; | ||
21 | |||
22 | vdac: regulator@0 { | ||
23 | compatible = "ti,twl4030-vdac"; | ||
24 | regulator-min-microvolt = <1800000>; | ||
25 | regulator-max-microvolt = <1800000>; | ||
26 | }; | ||
27 | |||
28 | vpll2: regulator@1 { | ||
29 | compatible = "ti,twl4030-vpll2"; | ||
30 | regulator-min-microvolt = <1800000>; | ||
31 | regulator-max-microvolt = <1800000>; | ||
32 | }; | ||
33 | |||
34 | vmmc1: regulator@2 { | ||
35 | compatible = "ti,twl4030-vmmc1"; | ||
36 | regulator-min-microvolt = <1850000>; | ||
37 | regulator-max-microvolt = <3150000>; | ||
38 | }; | ||
39 | |||
40 | twl_gpio: gpio { | ||
41 | compatible = "ti,twl4030-gpio"; | ||
42 | gpio-controller; | ||
43 | #gpio-cells = <2>; | ||
44 | interrupt-controller; | ||
45 | #interrupt-cells = <1>; | ||
46 | }; | ||
47 | }; | ||
diff --git a/arch/arm/boot/dts/twl6030.dtsi b/arch/arm/boot/dts/twl6030.dtsi new file mode 100644 index 000000000000..3b2f3510d7eb --- /dev/null +++ b/arch/arm/boot/dts/twl6030.dtsi | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * Integrated Power Management Chip | ||
11 | * http://www.ti.com/lit/ds/symlink/twl6030.pdf | ||
12 | */ | ||
13 | &twl { | ||
14 | compatible = "ti,twl6030"; | ||
15 | interrupt-controller; | ||
16 | #interrupt-cells = <1>; | ||
17 | |||
18 | rtc { | ||
19 | compatible = "ti,twl4030-rtc"; | ||
20 | interrupts = <11>; | ||
21 | }; | ||
22 | |||
23 | vaux1: regulator@0 { | ||
24 | compatible = "ti,twl6030-vaux1"; | ||
25 | regulator-min-microvolt = <1000000>; | ||
26 | regulator-max-microvolt = <3000000>; | ||
27 | }; | ||
28 | |||
29 | vaux2: regulator@1 { | ||
30 | compatible = "ti,twl6030-vaux2"; | ||
31 | regulator-min-microvolt = <1200000>; | ||
32 | regulator-max-microvolt = <2800000>; | ||
33 | }; | ||
34 | |||
35 | vaux3: regulator@2 { | ||
36 | compatible = "ti,twl6030-vaux3"; | ||
37 | regulator-min-microvolt = <1000000>; | ||
38 | regulator-max-microvolt = <3000000>; | ||
39 | }; | ||
40 | |||
41 | vmmc: regulator@3 { | ||
42 | compatible = "ti,twl6030-vmmc"; | ||
43 | regulator-min-microvolt = <1200000>; | ||
44 | regulator-max-microvolt = <3000000>; | ||
45 | }; | ||
46 | |||
47 | vpp: regulator@4 { | ||
48 | compatible = "ti,twl6030-vpp"; | ||
49 | regulator-min-microvolt = <1800000>; | ||
50 | regulator-max-microvolt = <2500000>; | ||
51 | }; | ||
52 | |||
53 | vusim: regulator@5 { | ||
54 | compatible = "ti,twl6030-vusim"; | ||
55 | regulator-min-microvolt = <1200000>; | ||
56 | regulator-max-microvolt = <2900000>; | ||
57 | }; | ||
58 | |||
59 | vdac: regulator@6 { | ||
60 | compatible = "ti,twl6030-vdac"; | ||
61 | }; | ||
62 | |||
63 | vana: regulator@7 { | ||
64 | compatible = "ti,twl6030-vana"; | ||
65 | }; | ||
66 | |||
67 | vcxio: regulator@8 { | ||
68 | compatible = "ti,twl6030-vcxio"; | ||
69 | }; | ||
70 | |||
71 | vusb: regulator@9 { | ||
72 | compatible = "ti,twl6030-vusb"; | ||
73 | }; | ||
74 | |||
75 | v1v8: regulator@10 { | ||
76 | compatible = "ti,twl6030-v1v8"; | ||
77 | }; | ||
78 | |||
79 | v2v1: regulator@11 { | ||
80 | compatible = "ti,twl6030-v2v1"; | ||
81 | }; | ||
82 | |||
83 | clk32kg: regulator@12 { | ||
84 | compatible = "ti,twl6030-clk32kg"; | ||
85 | }; | ||
86 | }; | ||
diff --git a/arch/arm/boot/dts/usb_a9260.dts b/arch/arm/boot/dts/usb_a9260.dts new file mode 100644 index 000000000000..296216058c11 --- /dev/null +++ b/arch/arm/boot/dts/usb_a9260.dts | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * usb_a9260.dts - Device Tree file for Caloa USB A9260 board | ||
3 | * | ||
4 | * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9260.dtsi" | ||
10 | /include/ "usb_a9260_common.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "Calao USB A9260"; | ||
14 | compatible = "calao,usb-a9260", "atmel,at91sam9260", "atmel,at91sam9"; | ||
15 | |||
16 | chosen { | ||
17 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; | ||
18 | }; | ||
19 | |||
20 | memory { | ||
21 | reg = <0x20000000 0x4000000>; | ||
22 | }; | ||
23 | }; | ||
diff --git a/arch/arm/boot/dts/usb_a9260_common.dtsi b/arch/arm/boot/dts/usb_a9260_common.dtsi new file mode 100644 index 000000000000..e70d229baef5 --- /dev/null +++ b/arch/arm/boot/dts/usb_a9260_common.dtsi | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * usb_a926x.dts - Device Tree file for Caloa USB A926x board | ||
3 | * | ||
4 | * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | / { | ||
10 | clocks { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <1>; | ||
13 | ranges; | ||
14 | |||
15 | main_clock: clock@0 { | ||
16 | compatible = "atmel,osc", "fixed-clock"; | ||
17 | clock-frequency = <12000000>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | ahb { | ||
22 | apb { | ||
23 | dbgu: serial@fffff200 { | ||
24 | status = "okay"; | ||
25 | }; | ||
26 | |||
27 | macb0: ethernet@fffc4000 { | ||
28 | phy-mode = "rmii"; | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | usb1: gadget@fffa4000 { | ||
33 | atmel,vbus-gpio = <&pioC 5 0>; | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | nand0: nand@40000000 { | ||
39 | nand-bus-width = <8>; | ||
40 | nand-ecc-mode = "soft"; | ||
41 | nand-on-flash-bbt; | ||
42 | status = "okay"; | ||
43 | |||
44 | at91bootstrap@0 { | ||
45 | label = "at91bootstrap"; | ||
46 | reg = <0x0 0x20000>; | ||
47 | }; | ||
48 | |||
49 | barebox@20000 { | ||
50 | label = "barebox"; | ||
51 | reg = <0x20000 0x40000>; | ||
52 | }; | ||
53 | |||
54 | bareboxenv@60000 { | ||
55 | label = "bareboxenv"; | ||
56 | reg = <0x60000 0x20000>; | ||
57 | }; | ||
58 | |||
59 | bareboxenv2@80000 { | ||
60 | label = "bareboxenv2"; | ||
61 | reg = <0x80000 0x20000>; | ||
62 | }; | ||
63 | |||
64 | oftree@80000 { | ||
65 | label = "oftree"; | ||
66 | reg = <0xa0000 0x20000>; | ||
67 | }; | ||
68 | |||
69 | kernel@a0000 { | ||
70 | label = "kernel"; | ||
71 | reg = <0xc0000 0x400000>; | ||
72 | }; | ||
73 | |||
74 | rootfs@4a0000 { | ||
75 | label = "rootfs"; | ||
76 | reg = <0x4c0000 0x7800000>; | ||
77 | }; | ||
78 | |||
79 | data@7ca0000 { | ||
80 | label = "data"; | ||
81 | reg = <0x7cc0000 0x8340000>; | ||
82 | }; | ||
83 | }; | ||
84 | |||
85 | usb0: ohci@00500000 { | ||
86 | num-ports = <2>; | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | }; | ||
90 | |||
91 | leds { | ||
92 | compatible = "gpio-leds"; | ||
93 | |||
94 | user_led { | ||
95 | label = "user_led"; | ||
96 | gpios = <&pioB 21 1>; | ||
97 | linux,default-trigger = "heartbeat"; | ||
98 | }; | ||
99 | }; | ||
100 | |||
101 | gpio_keys { | ||
102 | compatible = "gpio-keys"; | ||
103 | #address-cells = <1>; | ||
104 | #size-cells = <0>; | ||
105 | |||
106 | user_pb { | ||
107 | label = "user_pb"; | ||
108 | gpios = <&pioB 10 1>; | ||
109 | linux,code = <28>; | ||
110 | gpio-key,wakeup; | ||
111 | }; | ||
112 | }; | ||
113 | |||
114 | i2c@0 { | ||
115 | status = "okay"; | ||
116 | }; | ||
117 | }; | ||
diff --git a/arch/arm/boot/dts/usb_a9263.dts b/arch/arm/boot/dts/usb_a9263.dts new file mode 100644 index 000000000000..6fe05ccb6203 --- /dev/null +++ b/arch/arm/boot/dts/usb_a9263.dts | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * usb_a9263.dts - Device Tree file for Caloa USB A9293 board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 only | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9263.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Calao USB A9263"; | ||
13 | compatible = "atmel,usb-a9263", "atmel,at91sam9263", "atmel,at91sam9"; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; | ||
17 | }; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x20000000 0x4000000>; | ||
21 | }; | ||
22 | |||
23 | clocks { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | ranges; | ||
27 | |||
28 | main_clock: clock@0 { | ||
29 | compatible = "atmel,osc", "fixed-clock"; | ||
30 | clock-frequency = <12000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | ahb { | ||
35 | apb { | ||
36 | dbgu: serial@ffffee00 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | macb0: ethernet@fffbc000 { | ||
41 | phy-mode = "rmii"; | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | usb1: gadget@fff78000 { | ||
46 | atmel,vbus-gpio = <&pioB 11 0>; | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | }; | ||
51 | |||
52 | nand0: nand@40000000 { | ||
53 | nand-bus-width = <8>; | ||
54 | nand-ecc-mode = "soft"; | ||
55 | nand-on-flash-bbt; | ||
56 | status = "okay"; | ||
57 | |||
58 | at91bootstrap@0 { | ||
59 | label = "at91bootstrap"; | ||
60 | reg = <0x0 0x20000>; | ||
61 | }; | ||
62 | |||
63 | barebox@20000 { | ||
64 | label = "barebox"; | ||
65 | reg = <0x20000 0x40000>; | ||
66 | }; | ||
67 | |||
68 | bareboxenv@60000 { | ||
69 | label = "bareboxenv"; | ||
70 | reg = <0x60000 0x20000>; | ||
71 | }; | ||
72 | |||
73 | bareboxenv2@80000 { | ||
74 | label = "bareboxenv2"; | ||
75 | reg = <0x80000 0x20000>; | ||
76 | }; | ||
77 | |||
78 | oftree@80000 { | ||
79 | label = "oftree"; | ||
80 | reg = <0xa0000 0x20000>; | ||
81 | }; | ||
82 | |||
83 | kernel@a0000 { | ||
84 | label = "kernel"; | ||
85 | reg = <0xc0000 0x400000>; | ||
86 | }; | ||
87 | |||
88 | rootfs@4a0000 { | ||
89 | label = "rootfs"; | ||
90 | reg = <0x4c0000 0x7800000>; | ||
91 | }; | ||
92 | |||
93 | data@7ca0000 { | ||
94 | label = "data"; | ||
95 | reg = <0x7cc0000 0x8340000>; | ||
96 | }; | ||
97 | }; | ||
98 | |||
99 | usb0: ohci@00a00000 { | ||
100 | num-ports = <2>; | ||
101 | status = "okay"; | ||
102 | }; | ||
103 | }; | ||
104 | |||
105 | leds { | ||
106 | compatible = "gpio-leds"; | ||
107 | |||
108 | user_led { | ||
109 | label = "user_led"; | ||
110 | gpios = <&pioB 21 0>; | ||
111 | linux,default-trigger = "heartbeat"; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | gpio_keys { | ||
116 | compatible = "gpio-keys"; | ||
117 | #address-cells = <1>; | ||
118 | #size-cells = <0>; | ||
119 | |||
120 | user_pb { | ||
121 | label = "user_pb"; | ||
122 | gpios = <&pioB 10 1>; | ||
123 | linux,code = <28>; | ||
124 | gpio-key,wakeup; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | i2c@0 { | ||
129 | status = "okay"; | ||
130 | }; | ||
131 | }; | ||
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts index 7c2399c532e5..2dacb16ce4ae 100644 --- a/arch/arm/boot/dts/usb_a9g20.dts +++ b/arch/arm/boot/dts/usb_a9g20.dts | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | /dts-v1/; | 8 | /dts-v1/; |
9 | /include/ "at91sam9g20.dtsi" | 9 | /include/ "at91sam9g20.dtsi" |
10 | /include/ "usb_a9260_common.dtsi" | ||
10 | 11 | ||
11 | / { | 12 | / { |
12 | model = "Calao USB A9G20"; | 13 | model = "Calao USB A9G20"; |
@@ -20,108 +21,7 @@ | |||
20 | reg = <0x20000000 0x4000000>; | 21 | reg = <0x20000000 0x4000000>; |
21 | }; | 22 | }; |
22 | 23 | ||
23 | clocks { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | ranges; | ||
27 | |||
28 | main_clock: clock@0 { | ||
29 | compatible = "atmel,osc", "fixed-clock"; | ||
30 | clock-frequency = <12000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | ahb { | ||
35 | apb { | ||
36 | dbgu: serial@fffff200 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | macb0: ethernet@fffc4000 { | ||
41 | phy-mode = "rmii"; | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | usb1: gadget@fffa4000 { | ||
46 | atmel,vbus-gpio = <&pioC 5 0>; | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | nand0: nand@40000000 { | ||
52 | nand-bus-width = <8>; | ||
53 | nand-ecc-mode = "soft"; | ||
54 | nand-on-flash-bbt; | ||
55 | status = "okay"; | ||
56 | |||
57 | at91bootstrap@0 { | ||
58 | label = "at91bootstrap"; | ||
59 | reg = <0x0 0x20000>; | ||
60 | }; | ||
61 | |||
62 | barebox@20000 { | ||
63 | label = "barebox"; | ||
64 | reg = <0x20000 0x40000>; | ||
65 | }; | ||
66 | |||
67 | bareboxenv@60000 { | ||
68 | label = "bareboxenv"; | ||
69 | reg = <0x60000 0x20000>; | ||
70 | }; | ||
71 | |||
72 | bareboxenv2@80000 { | ||
73 | label = "bareboxenv2"; | ||
74 | reg = <0x80000 0x20000>; | ||
75 | }; | ||
76 | |||
77 | kernel@a0000 { | ||
78 | label = "kernel"; | ||
79 | reg = <0xa0000 0x400000>; | ||
80 | }; | ||
81 | |||
82 | rootfs@4a0000 { | ||
83 | label = "rootfs"; | ||
84 | reg = <0x4a0000 0x7800000>; | ||
85 | }; | ||
86 | |||
87 | data@7ca0000 { | ||
88 | label = "data"; | ||
89 | reg = <0x7ca0000 0x8360000>; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | usb0: ohci@00500000 { | ||
94 | num-ports = <2>; | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | }; | ||
98 | |||
99 | leds { | ||
100 | compatible = "gpio-leds"; | ||
101 | |||
102 | user_led { | ||
103 | label = "user_led"; | ||
104 | gpios = <&pioB 21 1>; | ||
105 | linux,default-trigger = "heartbeat"; | ||
106 | }; | ||
107 | }; | ||
108 | |||
109 | gpio_keys { | ||
110 | compatible = "gpio-keys"; | ||
111 | #address-cells = <1>; | ||
112 | #size-cells = <0>; | ||
113 | |||
114 | user_pb { | ||
115 | label = "user_pb"; | ||
116 | gpios = <&pioB 10 1>; | ||
117 | linux,code = <28>; | ||
118 | gpio-key,wakeup; | ||
119 | }; | ||
120 | }; | ||
121 | |||
122 | i2c@0 { | 24 | i2c@0 { |
123 | status = "okay"; | ||
124 | |||
125 | rv3029c2@56 { | 25 | rv3029c2@56 { |
126 | compatible = "rv3029c2"; | 26 | compatible = "rv3029c2"; |
127 | reg = <0x56>; | 27 | reg = <0x56>; |
diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig index fb2088171ca9..4fa60547494a 100644 --- a/arch/arm/configs/lpc32xx_defconfig +++ b/arch/arm/configs/lpc32xx_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=16 |
6 | CONFIG_SYSFS_DEPRECATED=y | 6 | CONFIG_SYSFS_DEPRECATED=y |
7 | CONFIG_SYSFS_DEPRECATED_V2=y | 7 | CONFIG_SYSFS_DEPRECATED_V2=y |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
@@ -10,6 +10,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y | |||
10 | CONFIG_SYSCTL_SYSCALL=y | 10 | CONFIG_SYSCTL_SYSCALL=y |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EMBEDDED=y |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
13 | CONFIG_JUMP_LABEL=y | ||
13 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
14 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
15 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
@@ -21,6 +22,8 @@ CONFIG_PREEMPT=y | |||
21 | CONFIG_AEABI=y | 22 | CONFIG_AEABI=y |
22 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 23 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
23 | CONFIG_ZBOOT_ROM_BSS=0x0 | 24 | CONFIG_ZBOOT_ROM_BSS=0x0 |
25 | CONFIG_ARM_APPENDED_DTB=y | ||
26 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
24 | CONFIG_CMDLINE="console=ttyS0,115200n81 root=/dev/ram0" | 27 | CONFIG_CMDLINE="console=ttyS0,115200n81 root=/dev/ram0" |
25 | CONFIG_CPU_IDLE=y | 28 | CONFIG_CPU_IDLE=y |
26 | CONFIG_FPE_NWFPE=y | 29 | CONFIG_FPE_NWFPE=y |
@@ -40,7 +43,8 @@ CONFIG_IP_PNP_BOOTP=y | |||
40 | # CONFIG_INET_XFRM_MODE_BEET is not set | 43 | # CONFIG_INET_XFRM_MODE_BEET is not set |
41 | # CONFIG_INET_LRO is not set | 44 | # CONFIG_INET_LRO is not set |
42 | # CONFIG_INET_DIAG is not set | 45 | # CONFIG_INET_DIAG is not set |
43 | # CONFIG_IPV6 is not set | 46 | CONFIG_IPV6=y |
47 | CONFIG_IPV6_PRIVACY=y | ||
44 | # CONFIG_WIRELESS is not set | 48 | # CONFIG_WIRELESS is not set |
45 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 49 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
46 | # CONFIG_FW_LOADER is not set | 50 | # CONFIG_FW_LOADER is not set |
@@ -55,13 +59,24 @@ CONFIG_BLK_DEV_CRYPTOLOOP=y | |||
55 | CONFIG_BLK_DEV_RAM=y | 59 | CONFIG_BLK_DEV_RAM=y |
56 | CONFIG_BLK_DEV_RAM_COUNT=1 | 60 | CONFIG_BLK_DEV_RAM_COUNT=1 |
57 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 61 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
58 | CONFIG_MISC_DEVICES=y | ||
59 | CONFIG_EEPROM_AT25=y | 62 | CONFIG_EEPROM_AT25=y |
60 | CONFIG_SCSI=y | 63 | CONFIG_SCSI=y |
61 | CONFIG_BLK_DEV_SD=y | 64 | CONFIG_BLK_DEV_SD=y |
62 | CONFIG_NETDEVICES=y | 65 | CONFIG_NETDEVICES=y |
63 | CONFIG_MII=y | 66 | CONFIG_MII=y |
64 | CONFIG_PHYLIB=y | 67 | # CONFIG_NET_VENDOR_BROADCOM is not set |
68 | # CONFIG_NET_VENDOR_CHELSIO is not set | ||
69 | # CONFIG_NET_VENDOR_CIRRUS is not set | ||
70 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
71 | # CONFIG_NET_VENDOR_INTEL is not set | ||
72 | # CONFIG_NET_VENDOR_MARVELL is not set | ||
73 | # CONFIG_NET_VENDOR_MICREL is not set | ||
74 | # CONFIG_NET_VENDOR_MICROCHIP is not set | ||
75 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
76 | CONFIG_LPC_ENET=y | ||
77 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
78 | # CONFIG_NET_VENDOR_SMSC is not set | ||
79 | # CONFIG_NET_VENDOR_STMICRO is not set | ||
65 | CONFIG_SMSC_PHY=y | 80 | CONFIG_SMSC_PHY=y |
66 | # CONFIG_WLAN is not set | 81 | # CONFIG_WLAN is not set |
67 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 82 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
@@ -97,16 +112,22 @@ CONFIG_SND_SEQUENCER=y | |||
97 | CONFIG_SND_MIXER_OSS=y | 112 | CONFIG_SND_MIXER_OSS=y |
98 | CONFIG_SND_PCM_OSS=y | 113 | CONFIG_SND_PCM_OSS=y |
99 | CONFIG_SND_SEQUENCER_OSS=y | 114 | CONFIG_SND_SEQUENCER_OSS=y |
100 | CONFIG_SND_DYNAMIC_MINORS=y | 115 | # CONFIG_SND_SUPPORT_OLD_API is not set |
101 | # CONFIG_SND_VERBOSE_PROCFS is not set | 116 | # CONFIG_SND_VERBOSE_PROCFS is not set |
117 | CONFIG_SND_DEBUG=y | ||
118 | CONFIG_SND_DEBUG_VERBOSE=y | ||
102 | # CONFIG_SND_DRIVERS is not set | 119 | # CONFIG_SND_DRIVERS is not set |
103 | # CONFIG_SND_ARM is not set | 120 | # CONFIG_SND_ARM is not set |
104 | # CONFIG_SND_SPI is not set | 121 | # CONFIG_SND_SPI is not set |
105 | CONFIG_SND_SOC=y | 122 | CONFIG_SND_SOC=y |
106 | # CONFIG_HID_SUPPORT is not set | 123 | # CONFIG_HID_SUPPORT is not set |
107 | CONFIG_USB=y | 124 | CONFIG_USB=y |
125 | CONFIG_USB_OHCI_HCD=y | ||
108 | CONFIG_USB_STORAGE=y | 126 | CONFIG_USB_STORAGE=y |
109 | CONFIG_USB_LIBUSUAL=y | 127 | CONFIG_USB_GADGET=y |
128 | CONFIG_USB_LPC32XX=y | ||
129 | CONFIG_USB_MASS_STORAGE=m | ||
130 | CONFIG_USB_G_SERIAL=m | ||
110 | CONFIG_MMC=y | 131 | CONFIG_MMC=y |
111 | # CONFIG_MMC_BLOCK_BOUNCE is not set | 132 | # CONFIG_MMC_BLOCK_BOUNCE is not set |
112 | CONFIG_MMC_ARMMMCI=y | 133 | CONFIG_MMC_ARMMMCI=y |
@@ -114,10 +135,21 @@ CONFIG_NEW_LEDS=y | |||
114 | CONFIG_LEDS_CLASS=y | 135 | CONFIG_LEDS_CLASS=y |
115 | CONFIG_LEDS_GPIO=y | 136 | CONFIG_LEDS_GPIO=y |
116 | CONFIG_LEDS_TRIGGERS=y | 137 | CONFIG_LEDS_TRIGGERS=y |
138 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
117 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 139 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
140 | CONFIG_LEDS_TRIGGER_BACKLIGHT=y | ||
141 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
142 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
118 | CONFIG_RTC_CLASS=y | 143 | CONFIG_RTC_CLASS=y |
119 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | 144 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y |
145 | CONFIG_RTC_DRV_DS1374=y | ||
146 | CONFIG_RTC_DRV_PCF8563=y | ||
120 | CONFIG_RTC_DRV_LPC32XX=y | 147 | CONFIG_RTC_DRV_LPC32XX=y |
148 | CONFIG_DMADEVICES=y | ||
149 | CONFIG_AMBA_PL08X=y | ||
150 | CONFIG_STAGING=y | ||
151 | CONFIG_IIO=y | ||
152 | CONFIG_LPC32XX_ADC=y | ||
121 | CONFIG_EXT2_FS=y | 153 | CONFIG_EXT2_FS=y |
122 | CONFIG_AUTOFS4_FS=y | 154 | CONFIG_AUTOFS4_FS=y |
123 | CONFIG_MSDOS_FS=y | 155 | CONFIG_MSDOS_FS=y |
diff --git a/arch/arm/configs/spear3xx_defconfig b/arch/arm/configs/spear3xx_defconfig index fea7e1f026a3..7ed42912d69a 100644 --- a/arch/arm/configs/spear3xx_defconfig +++ b/arch/arm/configs/spear3xx_defconfig | |||
@@ -2,33 +2,67 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
6 | CONFIG_MODULES=y | 5 | CONFIG_MODULES=y |
7 | CONFIG_MODULE_UNLOAD=y | 6 | CONFIG_MODULE_UNLOAD=y |
8 | CONFIG_MODVERSIONS=y | 7 | CONFIG_MODVERSIONS=y |
8 | CONFIG_PARTITION_ADVANCED=y | ||
9 | CONFIG_PLAT_SPEAR=y | 9 | CONFIG_PLAT_SPEAR=y |
10 | CONFIG_BOARD_SPEAR300_EVB=y | 10 | CONFIG_MACH_SPEAR300=y |
11 | CONFIG_BOARD_SPEAR310_EVB=y | 11 | CONFIG_MACH_SPEAR310=y |
12 | CONFIG_BOARD_SPEAR320_EVB=y | 12 | CONFIG_MACH_SPEAR320=y |
13 | CONFIG_BINFMT_MISC=y | 13 | CONFIG_BINFMT_MISC=y |
14 | CONFIG_NET=y | ||
14 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 15 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
16 | CONFIG_MTD=y | ||
17 | CONFIG_MTD_NAND=y | ||
18 | CONFIG_MTD_NAND_FSMC=y | ||
15 | CONFIG_BLK_DEV_RAM=y | 19 | CONFIG_BLK_DEV_RAM=y |
16 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 20 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
21 | CONFIG_NETDEVICES=y | ||
22 | # CONFIG_NET_VENDOR_BROADCOM is not set | ||
23 | # CONFIG_NET_VENDOR_CIRRUS is not set | ||
24 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
25 | # CONFIG_NET_VENDOR_INTEL is not set | ||
26 | # CONFIG_NET_VENDOR_MICREL is not set | ||
27 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
28 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
29 | # CONFIG_NET_VENDOR_SMSC is not set | ||
30 | CONFIG_STMMAC_ETH=y | ||
31 | # CONFIG_WLAN is not set | ||
17 | CONFIG_INPUT_FF_MEMLESS=y | 32 | CONFIG_INPUT_FF_MEMLESS=y |
18 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 33 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
19 | # CONFIG_INPUT_KEYBOARD is not set | 34 | # CONFIG_KEYBOARD_ATKBD is not set |
35 | CONFIG_KEYBOARD_SPEAR=y | ||
20 | # CONFIG_INPUT_MOUSE is not set | 36 | # CONFIG_INPUT_MOUSE is not set |
37 | # CONFIG_LEGACY_PTYS is not set | ||
21 | CONFIG_SERIAL_AMBA_PL011=y | 38 | CONFIG_SERIAL_AMBA_PL011=y |
22 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | 39 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y |
23 | # CONFIG_LEGACY_PTYS is not set | ||
24 | # CONFIG_HW_RANDOM is not set | 40 | # CONFIG_HW_RANDOM is not set |
25 | CONFIG_RAW_DRIVER=y | 41 | CONFIG_RAW_DRIVER=y |
26 | CONFIG_MAX_RAW_DEVS=8192 | 42 | CONFIG_MAX_RAW_DEVS=8192 |
43 | CONFIG_I2C=y | ||
44 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | ||
45 | CONFIG_SPI=y | ||
46 | CONFIG_SPI_PL022=y | ||
27 | CONFIG_GPIO_SYSFS=y | 47 | CONFIG_GPIO_SYSFS=y |
28 | CONFIG_GPIO_PL061=y | 48 | CONFIG_GPIO_PL061=y |
29 | # CONFIG_HWMON is not set | 49 | # CONFIG_HWMON is not set |
50 | CONFIG_WATCHDOG=y | ||
51 | CONFIG_ARM_SP805_WATCHDOG=y | ||
52 | CONFIG_FB=y | ||
53 | CONFIG_FB_ARMCLCD=y | ||
30 | # CONFIG_HID_SUPPORT is not set | 54 | # CONFIG_HID_SUPPORT is not set |
31 | # CONFIG_USB_SUPPORT is not set | 55 | CONFIG_USB=y |
56 | # CONFIG_USB_DEVICE_CLASS is not set | ||
57 | CONFIG_USB_EHCI_HCD=y | ||
58 | CONFIG_USB_OHCI_HCD=y | ||
59 | CONFIG_MMC=y | ||
60 | CONFIG_MMC_SDHCI=y | ||
61 | CONFIG_MMC_SDHCI_SPEAR=y | ||
62 | CONFIG_RTC_CLASS=y | ||
63 | CONFIG_DMADEVICES=y | ||
64 | CONFIG_AMBA_PL08X=y | ||
65 | CONFIG_DMATEST=m | ||
32 | CONFIG_EXT2_FS=y | 66 | CONFIG_EXT2_FS=y |
33 | CONFIG_EXT2_FS_XATTR=y | 67 | CONFIG_EXT2_FS_XATTR=y |
34 | CONFIG_EXT2_FS_SECURITY=y | 68 | CONFIG_EXT2_FS_SECURITY=y |
@@ -39,8 +73,6 @@ CONFIG_MSDOS_FS=m | |||
39 | CONFIG_VFAT_FS=m | 73 | CONFIG_VFAT_FS=m |
40 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | 74 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" |
41 | CONFIG_TMPFS=y | 75 | CONFIG_TMPFS=y |
42 | CONFIG_PARTITION_ADVANCED=y | ||
43 | CONFIG_NLS=y | ||
44 | CONFIG_NLS_DEFAULT="utf8" | 76 | CONFIG_NLS_DEFAULT="utf8" |
45 | CONFIG_NLS_CODEPAGE_437=y | 77 | CONFIG_NLS_CODEPAGE_437=y |
46 | CONFIG_NLS_ASCII=m | 78 | CONFIG_NLS_ASCII=m |
@@ -48,6 +80,4 @@ CONFIG_MAGIC_SYSRQ=y | |||
48 | CONFIG_DEBUG_FS=y | 80 | CONFIG_DEBUG_FS=y |
49 | CONFIG_DEBUG_KERNEL=y | 81 | CONFIG_DEBUG_KERNEL=y |
50 | CONFIG_DEBUG_SPINLOCK=y | 82 | CONFIG_DEBUG_SPINLOCK=y |
51 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
52 | CONFIG_DEBUG_INFO=y | 83 | CONFIG_DEBUG_INFO=y |
53 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/spear6xx_defconfig b/arch/arm/configs/spear6xx_defconfig index cef2e836afd2..cf94bc73a0e0 100644 --- a/arch/arm/configs/spear6xx_defconfig +++ b/arch/arm/configs/spear6xx_defconfig | |||
@@ -2,29 +2,58 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
6 | CONFIG_MODULES=y | 5 | CONFIG_MODULES=y |
7 | CONFIG_MODULE_UNLOAD=y | 6 | CONFIG_MODULE_UNLOAD=y |
8 | CONFIG_MODVERSIONS=y | 7 | CONFIG_MODVERSIONS=y |
8 | CONFIG_PARTITION_ADVANCED=y | ||
9 | CONFIG_PLAT_SPEAR=y | 9 | CONFIG_PLAT_SPEAR=y |
10 | CONFIG_ARCH_SPEAR6XX=y | 10 | CONFIG_ARCH_SPEAR6XX=y |
11 | CONFIG_BOARD_SPEAR600_EVB=y | 11 | CONFIG_BOARD_SPEAR600_DT=y |
12 | CONFIG_BINFMT_MISC=y | 12 | CONFIG_BINFMT_MISC=y |
13 | CONFIG_NET=y | ||
13 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 14 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
15 | CONFIG_MTD=y | ||
16 | CONFIG_MTD_NAND=y | ||
17 | CONFIG_MTD_NAND_FSMC=y | ||
14 | CONFIG_BLK_DEV_RAM=y | 18 | CONFIG_BLK_DEV_RAM=y |
15 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 19 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
20 | CONFIG_NETDEVICES=y | ||
21 | # CONFIG_NET_VENDOR_BROADCOM is not set | ||
22 | # CONFIG_NET_VENDOR_CIRRUS is not set | ||
23 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
24 | # CONFIG_NET_VENDOR_INTEL is not set | ||
25 | # CONFIG_NET_VENDOR_MICREL is not set | ||
26 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
27 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
28 | # CONFIG_NET_VENDOR_SMSC is not set | ||
29 | CONFIG_STMMAC_ETH=y | ||
30 | # CONFIG_WLAN is not set | ||
16 | CONFIG_INPUT_FF_MEMLESS=y | 31 | CONFIG_INPUT_FF_MEMLESS=y |
17 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 32 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
33 | # CONFIG_INPUT_KEYBOARD is not set | ||
34 | # CONFIG_INPUT_MOUSE is not set | ||
35 | # CONFIG_LEGACY_PTYS is not set | ||
18 | CONFIG_SERIAL_AMBA_PL011=y | 36 | CONFIG_SERIAL_AMBA_PL011=y |
19 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | 37 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y |
20 | # CONFIG_LEGACY_PTYS is not set | ||
21 | CONFIG_RAW_DRIVER=y | 38 | CONFIG_RAW_DRIVER=y |
22 | CONFIG_MAX_RAW_DEVS=8192 | 39 | CONFIG_MAX_RAW_DEVS=8192 |
40 | CONFIG_I2C=y | ||
41 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | ||
42 | CONFIG_SPI=y | ||
43 | CONFIG_SPI_PL022=y | ||
23 | CONFIG_GPIO_SYSFS=y | 44 | CONFIG_GPIO_SYSFS=y |
24 | CONFIG_GPIO_PL061=y | 45 | CONFIG_GPIO_PL061=y |
25 | # CONFIG_HWMON is not set | 46 | # CONFIG_HWMON is not set |
47 | CONFIG_WATCHDOG=y | ||
48 | CONFIG_ARM_SP805_WATCHDOG=y | ||
26 | # CONFIG_HID_SUPPORT is not set | 49 | # CONFIG_HID_SUPPORT is not set |
27 | # CONFIG_USB_SUPPORT is not set | 50 | CONFIG_USB=y |
51 | CONFIG_USB_EHCI_HCD=y | ||
52 | CONFIG_USB_OHCI_HCD=y | ||
53 | CONFIG_RTC_CLASS=y | ||
54 | CONFIG_DMADEVICES=y | ||
55 | CONFIG_AMBA_PL08X=y | ||
56 | CONFIG_DMATEST=m | ||
28 | CONFIG_EXT2_FS=y | 57 | CONFIG_EXT2_FS=y |
29 | CONFIG_EXT2_FS_XATTR=y | 58 | CONFIG_EXT2_FS_XATTR=y |
30 | CONFIG_EXT2_FS_SECURITY=y | 59 | CONFIG_EXT2_FS_SECURITY=y |
@@ -35,8 +64,6 @@ CONFIG_MSDOS_FS=m | |||
35 | CONFIG_VFAT_FS=m | 64 | CONFIG_VFAT_FS=m |
36 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | 65 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" |
37 | CONFIG_TMPFS=y | 66 | CONFIG_TMPFS=y |
38 | CONFIG_PARTITION_ADVANCED=y | ||
39 | CONFIG_NLS=y | ||
40 | CONFIG_NLS_DEFAULT="utf8" | 67 | CONFIG_NLS_DEFAULT="utf8" |
41 | CONFIG_NLS_CODEPAGE_437=y | 68 | CONFIG_NLS_CODEPAGE_437=y |
42 | CONFIG_NLS_ASCII=m | 69 | CONFIG_NLS_ASCII=m |
@@ -44,6 +71,4 @@ CONFIG_MAGIC_SYSRQ=y | |||
44 | CONFIG_DEBUG_FS=y | 71 | CONFIG_DEBUG_FS=y |
45 | CONFIG_DEBUG_KERNEL=y | 72 | CONFIG_DEBUG_KERNEL=y |
46 | CONFIG_DEBUG_SPINLOCK=y | 73 | CONFIG_DEBUG_SPINLOCK=y |
47 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
48 | CONFIG_DEBUG_INFO=y | 74 | CONFIG_DEBUG_INFO=y |
49 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot index 0da66ca4a4f8..c03417ddbf0c 100644 --- a/arch/arm/mach-at91/Makefile.boot +++ b/arch/arm/mach-at91/Makefile.boot | |||
@@ -14,7 +14,19 @@ initrd_phys-y := 0x20410000 | |||
14 | endif | 14 | endif |
15 | 15 | ||
16 | # Keep dtb files sorted alphabetically for each SoC | 16 | # Keep dtb files sorted alphabetically for each SoC |
17 | # sam9260 | ||
18 | dtb-$(CONFIG_MACH_AT91SAM_DT) += ethernut5.dtb | ||
19 | dtb-$(CONFIG_MACH_AT91SAM_DT) += tny_a9260.dtb | ||
20 | dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9260.dtb | ||
21 | # sam9263 | ||
22 | dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9263ek.dtb | ||
23 | dtb-$(CONFIG_MACH_AT91SAM_DT) += tny_a9263.dtb | ||
24 | dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9263.dtb | ||
17 | # sam9g20 | 25 | # sam9g20 |
26 | dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9g20ek.dtb | ||
27 | dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9g20ek_2mmc.dtb | ||
28 | dtb-$(CONFIG_MACH_AT91SAM_DT) += kizbox.dtb | ||
29 | dtb-$(CONFIG_MACH_AT91SAM_DT) += tny_a9g20.dtb | ||
18 | dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9g20.dtb | 30 | dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9g20.dtb |
19 | # sam9g45 | 31 | # sam9g45 |
20 | dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb | 32 | dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index ad00fe91d37d..d556de141114 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -702,25 +702,8 @@ static struct platform_device at91sam9260_tcb1_device = { | |||
702 | .num_resources = ARRAY_SIZE(tcb1_resources), | 702 | .num_resources = ARRAY_SIZE(tcb1_resources), |
703 | }; | 703 | }; |
704 | 704 | ||
705 | #if defined(CONFIG_OF) | ||
706 | static struct of_device_id tcb_ids[] = { | ||
707 | { .compatible = "atmel,at91rm9200-tcb" }, | ||
708 | { /*sentinel*/ } | ||
709 | }; | ||
710 | #endif | ||
711 | |||
712 | static void __init at91_add_device_tc(void) | 705 | static void __init at91_add_device_tc(void) |
713 | { | 706 | { |
714 | #if defined(CONFIG_OF) | ||
715 | struct device_node *np; | ||
716 | |||
717 | np = of_find_matching_node(NULL, tcb_ids); | ||
718 | if (np) { | ||
719 | of_node_put(np); | ||
720 | return; | ||
721 | } | ||
722 | #endif | ||
723 | |||
724 | platform_device_register(&at91sam9260_tcb0_device); | 707 | platform_device_register(&at91sam9260_tcb0_device); |
725 | platform_device_register(&at91sam9260_tcb1_device); | 708 | platform_device_register(&at91sam9260_tcb1_device); |
726 | } | 709 | } |
@@ -1364,6 +1347,9 @@ void __init at91_add_device_cf(struct at91_cf_data * data) {} | |||
1364 | */ | 1347 | */ |
1365 | static int __init at91_add_standard_devices(void) | 1348 | static int __init at91_add_standard_devices(void) |
1366 | { | 1349 | { |
1350 | if (of_have_populated_dt()) | ||
1351 | return 0; | ||
1352 | |||
1367 | at91_add_device_rtt(); | 1353 | at91_add_device_rtt(); |
1368 | at91_add_device_watchdog(); | 1354 | at91_add_device_watchdog(); |
1369 | at91_add_device_tc(); | 1355 | at91_add_device_tc(); |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 7fae36502fbb..ed91c7e9f7c2 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -199,6 +199,16 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
199 | CLKDEV_CON_ID("pioC", &pioCDE_clk), | 199 | CLKDEV_CON_ID("pioC", &pioCDE_clk), |
200 | CLKDEV_CON_ID("pioD", &pioCDE_clk), | 200 | CLKDEV_CON_ID("pioD", &pioCDE_clk), |
201 | CLKDEV_CON_ID("pioE", &pioCDE_clk), | 201 | CLKDEV_CON_ID("pioE", &pioCDE_clk), |
202 | /* more usart lookup table for DT entries */ | ||
203 | CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck), | ||
204 | CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk), | ||
205 | CLKDEV_CON_DEV_ID("usart", "fff90000.serial", &usart1_clk), | ||
206 | CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk), | ||
207 | /* more tc lookup table for DT entries */ | ||
208 | CLKDEV_CON_DEV_ID("t0_clk", "fff7c000.timer", &tcb_clk), | ||
209 | CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk), | ||
210 | CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk), | ||
211 | CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk), | ||
202 | }; | 212 | }; |
203 | 213 | ||
204 | static struct clk_lookup usart_clocks_lookups[] = { | 214 | static struct clk_lookup usart_clocks_lookups[] = { |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index dfe5bc006d5e..175e0009eaa9 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -953,8 +953,25 @@ static struct platform_device at91sam9263_tcb_device = { | |||
953 | .num_resources = ARRAY_SIZE(tcb_resources), | 953 | .num_resources = ARRAY_SIZE(tcb_resources), |
954 | }; | 954 | }; |
955 | 955 | ||
956 | #if defined(CONFIG_OF) | ||
957 | static struct of_device_id tcb_ids[] = { | ||
958 | { .compatible = "atmel,at91rm9200-tcb" }, | ||
959 | { /*sentinel*/ } | ||
960 | }; | ||
961 | #endif | ||
962 | |||
956 | static void __init at91_add_device_tc(void) | 963 | static void __init at91_add_device_tc(void) |
957 | { | 964 | { |
965 | #if defined(CONFIG_OF) | ||
966 | struct device_node *np; | ||
967 | |||
968 | np = of_find_matching_node(NULL, tcb_ids); | ||
969 | if (np) { | ||
970 | of_node_put(np); | ||
971 | return; | ||
972 | } | ||
973 | #endif | ||
974 | |||
958 | platform_device_register(&at91sam9263_tcb_device); | 975 | platform_device_register(&at91sam9263_tcb_device); |
959 | } | 976 | } |
960 | #else | 977 | #else |
@@ -1483,6 +1500,9 @@ void __init at91_add_device_serial(void) {} | |||
1483 | */ | 1500 | */ |
1484 | static int __init at91_add_standard_devices(void) | 1501 | static int __init at91_add_standard_devices(void) |
1485 | { | 1502 | { |
1503 | if (of_have_populated_dt()) | ||
1504 | return 0; | ||
1505 | |||
1486 | at91_add_device_rtt(); | 1506 | at91_add_device_rtt(); |
1487 | at91_add_device_watchdog(); | 1507 | at91_add_device_watchdog(); |
1488 | at91_add_device_tc(); | 1508 | at91_add_device_tc(); |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index db2f88c246ff..35bd42d02195 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -69,15 +69,7 @@ static struct platform_device at_hdmac_device = { | |||
69 | 69 | ||
70 | void __init at91_add_device_hdmac(void) | 70 | void __init at91_add_device_hdmac(void) |
71 | { | 71 | { |
72 | #if defined(CONFIG_OF) | 72 | platform_device_register(&at_hdmac_device); |
73 | struct device_node *of_node = | ||
74 | of_find_node_by_name(NULL, "dma-controller"); | ||
75 | |||
76 | if (of_node) | ||
77 | of_node_put(of_node); | ||
78 | else | ||
79 | #endif | ||
80 | platform_device_register(&at_hdmac_device); | ||
81 | } | 73 | } |
82 | #else | 74 | #else |
83 | void __init at91_add_device_hdmac(void) {} | 75 | void __init at91_add_device_hdmac(void) {} |
@@ -1094,25 +1086,8 @@ static struct platform_device at91sam9g45_tcb1_device = { | |||
1094 | .num_resources = ARRAY_SIZE(tcb1_resources), | 1086 | .num_resources = ARRAY_SIZE(tcb1_resources), |
1095 | }; | 1087 | }; |
1096 | 1088 | ||
1097 | #if defined(CONFIG_OF) | ||
1098 | static struct of_device_id tcb_ids[] = { | ||
1099 | { .compatible = "atmel,at91rm9200-tcb" }, | ||
1100 | { /*sentinel*/ } | ||
1101 | }; | ||
1102 | #endif | ||
1103 | |||
1104 | static void __init at91_add_device_tc(void) | 1089 | static void __init at91_add_device_tc(void) |
1105 | { | 1090 | { |
1106 | #if defined(CONFIG_OF) | ||
1107 | struct device_node *np; | ||
1108 | |||
1109 | np = of_find_matching_node(NULL, tcb_ids); | ||
1110 | if (np) { | ||
1111 | of_node_put(np); | ||
1112 | return; | ||
1113 | } | ||
1114 | #endif | ||
1115 | |||
1116 | platform_device_register(&at91sam9g45_tcb0_device); | 1091 | platform_device_register(&at91sam9g45_tcb0_device); |
1117 | platform_device_register(&at91sam9g45_tcb1_device); | 1092 | platform_device_register(&at91sam9g45_tcb1_device); |
1118 | } | 1093 | } |
@@ -1763,6 +1738,9 @@ void __init at91_add_device_serial(void) {} | |||
1763 | */ | 1738 | */ |
1764 | static int __init at91_add_standard_devices(void) | 1739 | static int __init at91_add_standard_devices(void) |
1765 | { | 1740 | { |
1741 | if (of_have_populated_dt()) | ||
1742 | return 0; | ||
1743 | |||
1766 | at91_add_device_hdmac(); | 1744 | at91_add_device_hdmac(); |
1767 | at91_add_device_rtc(); | 1745 | at91_add_device_rtc(); |
1768 | at91_add_device_rtt(); | 1746 | at91_add_device_rtt(); |
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index 332ecd40bd02..95393fcaf199 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -172,6 +172,10 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
172 | .offset = MTDPART_OFS_NXTBLK, | 172 | .offset = MTDPART_OFS_NXTBLK, |
173 | .size = SZ_128K, | 173 | .size = SZ_128K, |
174 | }, { | 174 | }, { |
175 | .name = "oftree", | ||
176 | .offset = MTDPART_OFS_NXTBLK, | ||
177 | .size = SZ_128K, | ||
178 | }, { | ||
175 | .name = "kernel", | 179 | .name = "kernel", |
176 | .offset = MTDPART_OFS_NXTBLK, | 180 | .offset = MTDPART_OFS_NXTBLK, |
177 | .size = 4 * SZ_1M, | 181 | .size = 4 * SZ_1M, |
diff --git a/arch/arm/mach-lpc32xx/Kconfig b/arch/arm/mach-lpc32xx/Kconfig index 75946ac89ee9..e0b3eee83834 100644 --- a/arch/arm/mach-lpc32xx/Kconfig +++ b/arch/arm/mach-lpc32xx/Kconfig | |||
@@ -29,30 +29,4 @@ config ARCH_LPC32XX_UART6_SELECT | |||
29 | 29 | ||
30 | endmenu | 30 | endmenu |
31 | 31 | ||
32 | menu "LPC32XX chip components" | ||
33 | |||
34 | config ARCH_LPC32XX_IRAM_FOR_NET | ||
35 | bool "Use IRAM for network buffers" | ||
36 | default y | ||
37 | help | ||
38 | Say Y here to use the LPC internal fast IRAM (i.e. 256KB SRAM) as | ||
39 | network buffer. If the total combined required buffer sizes is | ||
40 | larger than the size of IRAM, then SDRAM will be used instead. | ||
41 | |||
42 | This can be enabled safely if the IRAM is not intended for other | ||
43 | uses. | ||
44 | |||
45 | config ARCH_LPC32XX_MII_SUPPORT | ||
46 | bool "Check to enable MII support or leave disabled for RMII support" | ||
47 | help | ||
48 | Say Y here to enable MII support, or N for RMII support. Regardless of | ||
49 | which support is selected, the ethernet interface driver needs to be | ||
50 | selected in the device driver networking section. | ||
51 | |||
52 | The PHY3250 reference board uses RMII, so users of this board should | ||
53 | say N. | ||
54 | |||
55 | endmenu | ||
56 | |||
57 | endif | 32 | endif |
58 | |||
diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index 2fc24ca12054..f6a3ffec1f4b 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c | |||
@@ -1095,49 +1095,42 @@ struct clk *clk_get_parent(struct clk *clk) | |||
1095 | } | 1095 | } |
1096 | EXPORT_SYMBOL(clk_get_parent); | 1096 | EXPORT_SYMBOL(clk_get_parent); |
1097 | 1097 | ||
1098 | #define _REGISTER_CLOCK(d, n, c) \ | ||
1099 | { \ | ||
1100 | .dev_id = (d), \ | ||
1101 | .con_id = (n), \ | ||
1102 | .clk = &(c), \ | ||
1103 | }, | ||
1104 | |||
1105 | static struct clk_lookup lookups[] = { | 1098 | static struct clk_lookup lookups[] = { |
1106 | _REGISTER_CLOCK(NULL, "osc_32KHz", osc_32KHz) | 1099 | CLKDEV_INIT(NULL, "osc_32KHz", &osc_32KHz), |
1107 | _REGISTER_CLOCK(NULL, "osc_pll397", osc_pll397) | 1100 | CLKDEV_INIT(NULL, "osc_pll397", &osc_pll397), |
1108 | _REGISTER_CLOCK(NULL, "osc_main", osc_main) | 1101 | CLKDEV_INIT(NULL, "osc_main", &osc_main), |
1109 | _REGISTER_CLOCK(NULL, "sys_ck", clk_sys) | 1102 | CLKDEV_INIT(NULL, "sys_ck", &clk_sys), |
1110 | _REGISTER_CLOCK(NULL, "arm_pll_ck", clk_armpll) | 1103 | CLKDEV_INIT(NULL, "arm_pll_ck", &clk_armpll), |
1111 | _REGISTER_CLOCK(NULL, "ck_pll5", clk_usbpll) | 1104 | CLKDEV_INIT(NULL, "ck_pll5", &clk_usbpll), |
1112 | _REGISTER_CLOCK(NULL, "hclk_ck", clk_hclk) | 1105 | CLKDEV_INIT(NULL, "hclk_ck", &clk_hclk), |
1113 | _REGISTER_CLOCK(NULL, "pclk_ck", clk_pclk) | 1106 | CLKDEV_INIT(NULL, "pclk_ck", &clk_pclk), |
1114 | _REGISTER_CLOCK(NULL, "timer0_ck", clk_timer0) | 1107 | CLKDEV_INIT(NULL, "timer0_ck", &clk_timer0), |
1115 | _REGISTER_CLOCK(NULL, "timer1_ck", clk_timer1) | 1108 | CLKDEV_INIT(NULL, "timer1_ck", &clk_timer1), |
1116 | _REGISTER_CLOCK(NULL, "timer2_ck", clk_timer2) | 1109 | CLKDEV_INIT(NULL, "timer2_ck", &clk_timer2), |
1117 | _REGISTER_CLOCK(NULL, "timer3_ck", clk_timer3) | 1110 | CLKDEV_INIT(NULL, "timer3_ck", &clk_timer3), |
1118 | _REGISTER_CLOCK(NULL, "vfp9_ck", clk_vfp9) | 1111 | CLKDEV_INIT(NULL, "vfp9_ck", &clk_vfp9), |
1119 | _REGISTER_CLOCK(NULL, "clk_dmac", clk_dma) | 1112 | CLKDEV_INIT("pl08xdmac", NULL, &clk_dma), |
1120 | _REGISTER_CLOCK("pnx4008-watchdog", NULL, clk_wdt) | 1113 | CLKDEV_INIT("4003c000.watchdog", NULL, &clk_wdt), |
1121 | _REGISTER_CLOCK(NULL, "uart3_ck", clk_uart3) | 1114 | CLKDEV_INIT(NULL, "uart3_ck", &clk_uart3), |
1122 | _REGISTER_CLOCK(NULL, "uart4_ck", clk_uart4) | 1115 | CLKDEV_INIT(NULL, "uart4_ck", &clk_uart4), |
1123 | _REGISTER_CLOCK(NULL, "uart5_ck", clk_uart5) | 1116 | CLKDEV_INIT(NULL, "uart5_ck", &clk_uart5), |
1124 | _REGISTER_CLOCK(NULL, "uart6_ck", clk_uart6) | 1117 | CLKDEV_INIT(NULL, "uart6_ck", &clk_uart6), |
1125 | _REGISTER_CLOCK("pnx-i2c.0", NULL, clk_i2c0) | 1118 | CLKDEV_INIT("400a0000.i2c", NULL, &clk_i2c0), |
1126 | _REGISTER_CLOCK("pnx-i2c.1", NULL, clk_i2c1) | 1119 | CLKDEV_INIT("400a8000.i2c", NULL, &clk_i2c1), |
1127 | _REGISTER_CLOCK("pnx-i2c.2", NULL, clk_i2c2) | 1120 | CLKDEV_INIT("31020300.i2c", NULL, &clk_i2c2), |
1128 | _REGISTER_CLOCK("dev:ssp0", NULL, clk_ssp0) | 1121 | CLKDEV_INIT("dev:ssp0", NULL, &clk_ssp0), |
1129 | _REGISTER_CLOCK("dev:ssp1", NULL, clk_ssp1) | 1122 | CLKDEV_INIT("dev:ssp1", NULL, &clk_ssp1), |
1130 | _REGISTER_CLOCK("lpc32xx_keys.0", NULL, clk_kscan) | 1123 | CLKDEV_INIT("lpc32xx_keys.0", NULL, &clk_kscan), |
1131 | _REGISTER_CLOCK("lpc32xx-nand.0", "nand_ck", clk_nand) | 1124 | CLKDEV_INIT("lpc32xx-nand.0", "nand_ck", &clk_nand), |
1132 | _REGISTER_CLOCK("lpc32xx-adc", NULL, clk_adc) | 1125 | CLKDEV_INIT("40048000.adc", NULL, &clk_adc), |
1133 | _REGISTER_CLOCK(NULL, "i2s0_ck", clk_i2s0) | 1126 | CLKDEV_INIT(NULL, "i2s0_ck", &clk_i2s0), |
1134 | _REGISTER_CLOCK(NULL, "i2s1_ck", clk_i2s1) | 1127 | CLKDEV_INIT(NULL, "i2s1_ck", &clk_i2s1), |
1135 | _REGISTER_CLOCK("ts-lpc32xx", NULL, clk_tsc) | 1128 | CLKDEV_INIT("40048000.tsc", NULL, &clk_tsc), |
1136 | _REGISTER_CLOCK("dev:mmc0", NULL, clk_mmc) | 1129 | CLKDEV_INIT("20098000.sd", NULL, &clk_mmc), |
1137 | _REGISTER_CLOCK("lpc-eth.0", NULL, clk_net) | 1130 | CLKDEV_INIT("31060000.ethernet", NULL, &clk_net), |
1138 | _REGISTER_CLOCK("dev:clcd", NULL, clk_lcd) | 1131 | CLKDEV_INIT("dev:clcd", NULL, &clk_lcd), |
1139 | _REGISTER_CLOCK("lpc32xx_udc", "ck_usbd", clk_usbd) | 1132 | CLKDEV_INIT("31020000.usbd", "ck_usbd", &clk_usbd), |
1140 | _REGISTER_CLOCK("lpc32xx_rtc", NULL, clk_rtc) | 1133 | CLKDEV_INIT("lpc32xx_rtc", NULL, &clk_rtc), |
1141 | }; | 1134 | }; |
1142 | 1135 | ||
1143 | static int __init clk_init(void) | 1136 | static int __init clk_init(void) |
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index bbbf063a74c2..5c96057b6d78 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c | |||
@@ -27,186 +27,11 @@ | |||
27 | 27 | ||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | 29 | ||
30 | #include <mach/i2c.h> | ||
31 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
32 | #include <mach/platform.h> | 31 | #include <mach/platform.h> |
33 | #include "common.h" | 32 | #include "common.h" |
34 | 33 | ||
35 | /* | 34 | /* |
36 | * Watchdog timer | ||
37 | */ | ||
38 | static struct resource watchdog_resources[] = { | ||
39 | [0] = { | ||
40 | .start = LPC32XX_WDTIM_BASE, | ||
41 | .end = LPC32XX_WDTIM_BASE + SZ_4K - 1, | ||
42 | .flags = IORESOURCE_MEM, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | struct platform_device lpc32xx_watchdog_device = { | ||
47 | .name = "pnx4008-watchdog", | ||
48 | .id = -1, | ||
49 | .num_resources = ARRAY_SIZE(watchdog_resources), | ||
50 | .resource = watchdog_resources, | ||
51 | }; | ||
52 | |||
53 | /* | ||
54 | * I2C busses | ||
55 | */ | ||
56 | static struct i2c_pnx_data i2c0_data = { | ||
57 | .name = I2C_CHIP_NAME "1", | ||
58 | .base = LPC32XX_I2C1_BASE, | ||
59 | .irq = IRQ_LPC32XX_I2C_1, | ||
60 | }; | ||
61 | |||
62 | static struct i2c_pnx_data i2c1_data = { | ||
63 | .name = I2C_CHIP_NAME "2", | ||
64 | .base = LPC32XX_I2C2_BASE, | ||
65 | .irq = IRQ_LPC32XX_I2C_2, | ||
66 | }; | ||
67 | |||
68 | static struct i2c_pnx_data i2c2_data = { | ||
69 | .name = "USB-I2C", | ||
70 | .base = LPC32XX_OTG_I2C_BASE, | ||
71 | .irq = IRQ_LPC32XX_USB_I2C, | ||
72 | }; | ||
73 | |||
74 | struct platform_device lpc32xx_i2c0_device = { | ||
75 | .name = "pnx-i2c", | ||
76 | .id = 0, | ||
77 | .dev = { | ||
78 | .platform_data = &i2c0_data, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | struct platform_device lpc32xx_i2c1_device = { | ||
83 | .name = "pnx-i2c", | ||
84 | .id = 1, | ||
85 | .dev = { | ||
86 | .platform_data = &i2c1_data, | ||
87 | }, | ||
88 | }; | ||
89 | |||
90 | struct platform_device lpc32xx_i2c2_device = { | ||
91 | .name = "pnx-i2c", | ||
92 | .id = 2, | ||
93 | .dev = { | ||
94 | .platform_data = &i2c2_data, | ||
95 | }, | ||
96 | }; | ||
97 | |||
98 | /* TSC (Touch Screen Controller) */ | ||
99 | |||
100 | static struct resource lpc32xx_tsc_resources[] = { | ||
101 | { | ||
102 | .start = LPC32XX_ADC_BASE, | ||
103 | .end = LPC32XX_ADC_BASE + SZ_4K - 1, | ||
104 | .flags = IORESOURCE_MEM, | ||
105 | }, { | ||
106 | .start = IRQ_LPC32XX_TS_IRQ, | ||
107 | .end = IRQ_LPC32XX_TS_IRQ, | ||
108 | .flags = IORESOURCE_IRQ, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | struct platform_device lpc32xx_tsc_device = { | ||
113 | .name = "ts-lpc32xx", | ||
114 | .id = -1, | ||
115 | .num_resources = ARRAY_SIZE(lpc32xx_tsc_resources), | ||
116 | .resource = lpc32xx_tsc_resources, | ||
117 | }; | ||
118 | |||
119 | /* RTC */ | ||
120 | |||
121 | static struct resource lpc32xx_rtc_resources[] = { | ||
122 | { | ||
123 | .start = LPC32XX_RTC_BASE, | ||
124 | .end = LPC32XX_RTC_BASE + SZ_4K - 1, | ||
125 | .flags = IORESOURCE_MEM, | ||
126 | },{ | ||
127 | .start = IRQ_LPC32XX_RTC, | ||
128 | .end = IRQ_LPC32XX_RTC, | ||
129 | .flags = IORESOURCE_IRQ, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | struct platform_device lpc32xx_rtc_device = { | ||
134 | .name = "rtc-lpc32xx", | ||
135 | .id = -1, | ||
136 | .num_resources = ARRAY_SIZE(lpc32xx_rtc_resources), | ||
137 | .resource = lpc32xx_rtc_resources, | ||
138 | }; | ||
139 | |||
140 | /* | ||
141 | * ADC support | ||
142 | */ | ||
143 | static struct resource adc_resources[] = { | ||
144 | { | ||
145 | .start = LPC32XX_ADC_BASE, | ||
146 | .end = LPC32XX_ADC_BASE + SZ_4K - 1, | ||
147 | .flags = IORESOURCE_MEM, | ||
148 | }, { | ||
149 | .start = IRQ_LPC32XX_TS_IRQ, | ||
150 | .end = IRQ_LPC32XX_TS_IRQ, | ||
151 | .flags = IORESOURCE_IRQ, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | struct platform_device lpc32xx_adc_device = { | ||
156 | .name = "lpc32xx-adc", | ||
157 | .id = -1, | ||
158 | .num_resources = ARRAY_SIZE(adc_resources), | ||
159 | .resource = adc_resources, | ||
160 | }; | ||
161 | |||
162 | /* | ||
163 | * USB support | ||
164 | */ | ||
165 | /* The dmamask must be set for OHCI to work */ | ||
166 | static u64 ohci_dmamask = ~(u32) 0; | ||
167 | static struct resource ohci_resources[] = { | ||
168 | { | ||
169 | .start = IO_ADDRESS(LPC32XX_USB_BASE), | ||
170 | .end = IO_ADDRESS(LPC32XX_USB_BASE + 0x100 - 1), | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }, { | ||
173 | .start = IRQ_LPC32XX_USB_HOST, | ||
174 | .flags = IORESOURCE_IRQ, | ||
175 | }, | ||
176 | }; | ||
177 | struct platform_device lpc32xx_ohci_device = { | ||
178 | .name = "usb-ohci", | ||
179 | .id = -1, | ||
180 | .dev = { | ||
181 | .dma_mask = &ohci_dmamask, | ||
182 | .coherent_dma_mask = 0xFFFFFFFF, | ||
183 | }, | ||
184 | .num_resources = ARRAY_SIZE(ohci_resources), | ||
185 | .resource = ohci_resources, | ||
186 | }; | ||
187 | |||
188 | /* | ||
189 | * Network Support | ||
190 | */ | ||
191 | static struct resource net_resources[] = { | ||
192 | [0] = DEFINE_RES_MEM(LPC32XX_ETHERNET_BASE, SZ_4K), | ||
193 | [1] = DEFINE_RES_MEM(LPC32XX_IRAM_BASE, SZ_128K), | ||
194 | [2] = DEFINE_RES_IRQ(IRQ_LPC32XX_ETHERNET), | ||
195 | }; | ||
196 | |||
197 | static u64 lpc32xx_mac_dma_mask = 0xffffffffUL; | ||
198 | struct platform_device lpc32xx_net_device = { | ||
199 | .name = "lpc-eth", | ||
200 | .id = 0, | ||
201 | .dev = { | ||
202 | .dma_mask = &lpc32xx_mac_dma_mask, | ||
203 | .coherent_dma_mask = 0xffffffffUL, | ||
204 | }, | ||
205 | .num_resources = ARRAY_SIZE(net_resources), | ||
206 | .resource = net_resources, | ||
207 | }; | ||
208 | |||
209 | /* | ||
210 | * Returns the unique ID for the device | 35 | * Returns the unique ID for the device |
211 | */ | 36 | */ |
212 | void lpc32xx_get_uid(u32 devid[4]) | 37 | void lpc32xx_get_uid(u32 devid[4]) |
@@ -398,3 +223,16 @@ void lpc23xx_restart(char mode, const char *cmd) | |||
398 | while (1) | 223 | while (1) |
399 | ; | 224 | ; |
400 | } | 225 | } |
226 | |||
227 | static int __init lpc32xx_display_uid(void) | ||
228 | { | ||
229 | u32 uid[4]; | ||
230 | |||
231 | lpc32xx_get_uid(uid); | ||
232 | |||
233 | printk(KERN_INFO "LPC32XX unique ID: %08x%08x%08x%08x\n", | ||
234 | uid[3], uid[2], uid[1], uid[0]); | ||
235 | |||
236 | return 1; | ||
237 | } | ||
238 | arch_initcall(lpc32xx_display_uid); | ||
diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h index 68e45e8c9486..afeac3b1fae6 100644 --- a/arch/arm/mach-lpc32xx/common.h +++ b/arch/arm/mach-lpc32xx/common.h | |||
@@ -23,26 +23,12 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Arch specific platform device structures | ||
27 | */ | ||
28 | extern struct platform_device lpc32xx_watchdog_device; | ||
29 | extern struct platform_device lpc32xx_i2c0_device; | ||
30 | extern struct platform_device lpc32xx_i2c1_device; | ||
31 | extern struct platform_device lpc32xx_i2c2_device; | ||
32 | extern struct platform_device lpc32xx_tsc_device; | ||
33 | extern struct platform_device lpc32xx_adc_device; | ||
34 | extern struct platform_device lpc32xx_rtc_device; | ||
35 | extern struct platform_device lpc32xx_ohci_device; | ||
36 | extern struct platform_device lpc32xx_net_device; | ||
37 | |||
38 | /* | ||
39 | * Other arch specific structures and functions | 26 | * Other arch specific structures and functions |
40 | */ | 27 | */ |
41 | extern struct sys_timer lpc32xx_timer; | 28 | extern struct sys_timer lpc32xx_timer; |
42 | extern void __init lpc32xx_init_irq(void); | 29 | extern void __init lpc32xx_init_irq(void); |
43 | extern void __init lpc32xx_map_io(void); | 30 | extern void __init lpc32xx_map_io(void); |
44 | extern void __init lpc32xx_serial_init(void); | 31 | extern void __init lpc32xx_serial_init(void); |
45 | extern void __init lpc32xx_gpio_init(void); | ||
46 | extern void lpc23xx_restart(char, const char *); | 32 | extern void lpc23xx_restart(char, const char *); |
47 | 33 | ||
48 | 34 | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/i2c.h b/arch/arm/mach-lpc32xx/include/mach/i2c.h deleted file mode 100644 index 034dc9286bcc..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/i2c.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * PNX4008-specific tweaks for I2C IP3204 block | ||
3 | * | ||
4 | * Author: Vitaly Wool <vwool@ru.mvista.com> | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_I2C_H | ||
13 | #define __ASM_ARCH_I2C_H | ||
14 | |||
15 | enum { | ||
16 | mstatus_tdi = 0x00000001, | ||
17 | mstatus_afi = 0x00000002, | ||
18 | mstatus_nai = 0x00000004, | ||
19 | mstatus_drmi = 0x00000008, | ||
20 | mstatus_active = 0x00000020, | ||
21 | mstatus_scl = 0x00000040, | ||
22 | mstatus_sda = 0x00000080, | ||
23 | mstatus_rff = 0x00000100, | ||
24 | mstatus_rfe = 0x00000200, | ||
25 | mstatus_tff = 0x00000400, | ||
26 | mstatus_tfe = 0x00000800, | ||
27 | }; | ||
28 | |||
29 | enum { | ||
30 | mcntrl_tdie = 0x00000001, | ||
31 | mcntrl_afie = 0x00000002, | ||
32 | mcntrl_naie = 0x00000004, | ||
33 | mcntrl_drmie = 0x00000008, | ||
34 | mcntrl_daie = 0x00000020, | ||
35 | mcntrl_rffie = 0x00000040, | ||
36 | mcntrl_tffie = 0x00000080, | ||
37 | mcntrl_reset = 0x00000100, | ||
38 | mcntrl_cdbmode = 0x00000400, | ||
39 | }; | ||
40 | |||
41 | enum { | ||
42 | rw_bit = 1 << 0, | ||
43 | start_bit = 1 << 8, | ||
44 | stop_bit = 1 << 9, | ||
45 | }; | ||
46 | |||
47 | #define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */ | ||
48 | #define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */ | ||
49 | #define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */ | ||
50 | #define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */ | ||
51 | #define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */ | ||
52 | #define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */ | ||
53 | #define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */ | ||
54 | #define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */ | ||
55 | #define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */ | ||
56 | #define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */ | ||
57 | #define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */ | ||
58 | #define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */ | ||
59 | #define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */ | ||
60 | |||
61 | #define I2C_CHIP_NAME "PNX4008-I2C" | ||
62 | |||
63 | #endif /* __ASM_ARCH_I2C_H */ | ||
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index d080cb1123dd..5b1cc35e6fba 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -22,6 +22,11 @@ | |||
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/of.h> | ||
26 | #include <linux/of_address.h> | ||
27 | #include <linux/of_irq.h> | ||
28 | #include <linux/irqdomain.h> | ||
29 | #include <linux/module.h> | ||
25 | 30 | ||
26 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
27 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
@@ -44,6 +49,9 @@ | |||
44 | #define SIC1_ATR_DEFAULT 0x00026000 | 49 | #define SIC1_ATR_DEFAULT 0x00026000 |
45 | #define SIC2_ATR_DEFAULT 0x00000000 | 50 | #define SIC2_ATR_DEFAULT 0x00000000 |
46 | 51 | ||
52 | static struct irq_domain *lpc32xx_mic_domain; | ||
53 | static struct device_node *lpc32xx_mic_np; | ||
54 | |||
47 | struct lpc32xx_event_group_regs { | 55 | struct lpc32xx_event_group_regs { |
48 | void __iomem *enab_reg; | 56 | void __iomem *enab_reg; |
49 | void __iomem *edge_reg; | 57 | void __iomem *edge_reg; |
@@ -203,7 +211,7 @@ static void lpc32xx_mask_irq(struct irq_data *d) | |||
203 | { | 211 | { |
204 | unsigned int reg, ctrl, mask; | 212 | unsigned int reg, ctrl, mask; |
205 | 213 | ||
206 | get_controller(d->irq, &ctrl, &mask); | 214 | get_controller(d->hwirq, &ctrl, &mask); |
207 | 215 | ||
208 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) & ~mask; | 216 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) & ~mask; |
209 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); | 217 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); |
@@ -213,7 +221,7 @@ static void lpc32xx_unmask_irq(struct irq_data *d) | |||
213 | { | 221 | { |
214 | unsigned int reg, ctrl, mask; | 222 | unsigned int reg, ctrl, mask; |
215 | 223 | ||
216 | get_controller(d->irq, &ctrl, &mask); | 224 | get_controller(d->hwirq, &ctrl, &mask); |
217 | 225 | ||
218 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) | mask; | 226 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) | mask; |
219 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); | 227 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); |
@@ -223,14 +231,14 @@ static void lpc32xx_ack_irq(struct irq_data *d) | |||
223 | { | 231 | { |
224 | unsigned int ctrl, mask; | 232 | unsigned int ctrl, mask; |
225 | 233 | ||
226 | get_controller(d->irq, &ctrl, &mask); | 234 | get_controller(d->hwirq, &ctrl, &mask); |
227 | 235 | ||
228 | __raw_writel(mask, LPC32XX_INTC_RAW_STAT(ctrl)); | 236 | __raw_writel(mask, LPC32XX_INTC_RAW_STAT(ctrl)); |
229 | 237 | ||
230 | /* Also need to clear pending wake event */ | 238 | /* Also need to clear pending wake event */ |
231 | if (lpc32xx_events[d->irq].mask != 0) | 239 | if (lpc32xx_events[d->hwirq].mask != 0) |
232 | __raw_writel(lpc32xx_events[d->irq].mask, | 240 | __raw_writel(lpc32xx_events[d->hwirq].mask, |
233 | lpc32xx_events[d->irq].event_group->rawstat_reg); | 241 | lpc32xx_events[d->hwirq].event_group->rawstat_reg); |
234 | } | 242 | } |
235 | 243 | ||
236 | static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level, | 244 | static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level, |
@@ -274,22 +282,22 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type) | |||
274 | switch (type) { | 282 | switch (type) { |
275 | case IRQ_TYPE_EDGE_RISING: | 283 | case IRQ_TYPE_EDGE_RISING: |
276 | /* Rising edge sensitive */ | 284 | /* Rising edge sensitive */ |
277 | __lpc32xx_set_irq_type(d->irq, 1, 1); | 285 | __lpc32xx_set_irq_type(d->hwirq, 1, 1); |
278 | break; | 286 | break; |
279 | 287 | ||
280 | case IRQ_TYPE_EDGE_FALLING: | 288 | case IRQ_TYPE_EDGE_FALLING: |
281 | /* Falling edge sensitive */ | 289 | /* Falling edge sensitive */ |
282 | __lpc32xx_set_irq_type(d->irq, 0, 1); | 290 | __lpc32xx_set_irq_type(d->hwirq, 0, 1); |
283 | break; | 291 | break; |
284 | 292 | ||
285 | case IRQ_TYPE_LEVEL_LOW: | 293 | case IRQ_TYPE_LEVEL_LOW: |
286 | /* Low level sensitive */ | 294 | /* Low level sensitive */ |
287 | __lpc32xx_set_irq_type(d->irq, 0, 0); | 295 | __lpc32xx_set_irq_type(d->hwirq, 0, 0); |
288 | break; | 296 | break; |
289 | 297 | ||
290 | case IRQ_TYPE_LEVEL_HIGH: | 298 | case IRQ_TYPE_LEVEL_HIGH: |
291 | /* High level sensitive */ | 299 | /* High level sensitive */ |
292 | __lpc32xx_set_irq_type(d->irq, 1, 0); | 300 | __lpc32xx_set_irq_type(d->hwirq, 1, 0); |
293 | break; | 301 | break; |
294 | 302 | ||
295 | /* Other modes are not supported */ | 303 | /* Other modes are not supported */ |
@@ -298,7 +306,7 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type) | |||
298 | } | 306 | } |
299 | 307 | ||
300 | /* Ok to use the level handler for all types */ | 308 | /* Ok to use the level handler for all types */ |
301 | irq_set_handler(d->irq, handle_level_irq); | 309 | irq_set_handler(d->hwirq, handle_level_irq); |
302 | 310 | ||
303 | return 0; | 311 | return 0; |
304 | } | 312 | } |
@@ -307,33 +315,33 @@ static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state) | |||
307 | { | 315 | { |
308 | unsigned long eventreg; | 316 | unsigned long eventreg; |
309 | 317 | ||
310 | if (lpc32xx_events[d->irq].mask != 0) { | 318 | if (lpc32xx_events[d->hwirq].mask != 0) { |
311 | eventreg = __raw_readl(lpc32xx_events[d->irq]. | 319 | eventreg = __raw_readl(lpc32xx_events[d->hwirq]. |
312 | event_group->enab_reg); | 320 | event_group->enab_reg); |
313 | 321 | ||
314 | if (state) | 322 | if (state) |
315 | eventreg |= lpc32xx_events[d->irq].mask; | 323 | eventreg |= lpc32xx_events[d->hwirq].mask; |
316 | else { | 324 | else { |
317 | eventreg &= ~lpc32xx_events[d->irq].mask; | 325 | eventreg &= ~lpc32xx_events[d->hwirq].mask; |
318 | 326 | ||
319 | /* | 327 | /* |
320 | * When disabling the wakeup, clear the latched | 328 | * When disabling the wakeup, clear the latched |
321 | * event | 329 | * event |
322 | */ | 330 | */ |
323 | __raw_writel(lpc32xx_events[d->irq].mask, | 331 | __raw_writel(lpc32xx_events[d->hwirq].mask, |
324 | lpc32xx_events[d->irq]. | 332 | lpc32xx_events[d->hwirq]. |
325 | event_group->rawstat_reg); | 333 | event_group->rawstat_reg); |
326 | } | 334 | } |
327 | 335 | ||
328 | __raw_writel(eventreg, | 336 | __raw_writel(eventreg, |
329 | lpc32xx_events[d->irq].event_group->enab_reg); | 337 | lpc32xx_events[d->hwirq].event_group->enab_reg); |
330 | 338 | ||
331 | return 0; | 339 | return 0; |
332 | } | 340 | } |
333 | 341 | ||
334 | /* Clear event */ | 342 | /* Clear event */ |
335 | __raw_writel(lpc32xx_events[d->irq].mask, | 343 | __raw_writel(lpc32xx_events[d->hwirq].mask, |
336 | lpc32xx_events[d->irq].event_group->rawstat_reg); | 344 | lpc32xx_events[d->hwirq].event_group->rawstat_reg); |
337 | 345 | ||
338 | return -ENODEV; | 346 | return -ENODEV; |
339 | } | 347 | } |
@@ -353,6 +361,7 @@ static void __init lpc32xx_set_default_mappings(unsigned int apr, | |||
353 | } | 361 | } |
354 | 362 | ||
355 | static struct irq_chip lpc32xx_irq_chip = { | 363 | static struct irq_chip lpc32xx_irq_chip = { |
364 | .name = "MIC", | ||
356 | .irq_ack = lpc32xx_ack_irq, | 365 | .irq_ack = lpc32xx_ack_irq, |
357 | .irq_mask = lpc32xx_mask_irq, | 366 | .irq_mask = lpc32xx_mask_irq, |
358 | .irq_unmask = lpc32xx_unmask_irq, | 367 | .irq_unmask = lpc32xx_unmask_irq, |
@@ -386,9 +395,23 @@ static void lpc32xx_sic2_handler(unsigned int irq, struct irq_desc *desc) | |||
386 | } | 395 | } |
387 | } | 396 | } |
388 | 397 | ||
398 | static int __init __lpc32xx_mic_of_init(struct device_node *node, | ||
399 | struct device_node *parent) | ||
400 | { | ||
401 | lpc32xx_mic_np = node; | ||
402 | |||
403 | return 0; | ||
404 | } | ||
405 | |||
406 | static const struct of_device_id mic_of_match[] __initconst = { | ||
407 | { .compatible = "nxp,lpc3220-mic", .data = __lpc32xx_mic_of_init }, | ||
408 | { } | ||
409 | }; | ||
410 | |||
389 | void __init lpc32xx_init_irq(void) | 411 | void __init lpc32xx_init_irq(void) |
390 | { | 412 | { |
391 | unsigned int i; | 413 | unsigned int i; |
414 | int irq_base; | ||
392 | 415 | ||
393 | /* Setup MIC */ | 416 | /* Setup MIC */ |
394 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | 417 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); |
@@ -448,4 +471,19 @@ void __init lpc32xx_init_irq(void) | |||
448 | LPC32XX_CLKPWR_PIN_RS); | 471 | LPC32XX_CLKPWR_PIN_RS); |
449 | __raw_writel(__raw_readl(LPC32XX_CLKPWR_INT_RS), | 472 | __raw_writel(__raw_readl(LPC32XX_CLKPWR_INT_RS), |
450 | LPC32XX_CLKPWR_INT_RS); | 473 | LPC32XX_CLKPWR_INT_RS); |
474 | |||
475 | of_irq_init(mic_of_match); | ||
476 | |||
477 | irq_base = irq_alloc_descs(-1, 0, NR_IRQS, 0); | ||
478 | if (irq_base < 0) { | ||
479 | pr_warn("Cannot allocate irq_descs, assuming pre-allocated\n"); | ||
480 | irq_base = 0; | ||
481 | } | ||
482 | |||
483 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, | ||
484 | irq_base, 0, | ||
485 | &irq_domain_simple_ops, | ||
486 | NULL); | ||
487 | if (!lpc32xx_mic_domain) | ||
488 | panic("Unable to add MIC irq domain\n"); | ||
451 | } | 489 | } |
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index 7f7401ec7487..540106cdb9ec 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-lpc32xx/phy3250.c | 2 | * Platform support for LPC32xx SoC |
3 | * | 3 | * |
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | 4 | * Author: Kevin Wells <kevin.wells@nxp.com> |
5 | * | 5 | * |
6 | * Copyright (C) 2012 Roland Stigge <stigge@antcom.de> | ||
6 | * Copyright (C) 2010 NXP Semiconductors | 7 | * Copyright (C) 2010 NXP Semiconductors |
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
@@ -25,11 +26,16 @@ | |||
25 | #include <linux/device.h> | 26 | #include <linux/device.h> |
26 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
27 | #include <linux/spi/eeprom.h> | 28 | #include <linux/spi/eeprom.h> |
28 | #include <linux/leds.h> | ||
29 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
30 | #include <linux/amba/bus.h> | 30 | #include <linux/amba/bus.h> |
31 | #include <linux/amba/clcd.h> | 31 | #include <linux/amba/clcd.h> |
32 | #include <linux/amba/pl022.h> | 32 | #include <linux/amba/pl022.h> |
33 | #include <linux/of.h> | ||
34 | #include <linux/of_address.h> | ||
35 | #include <linux/of_irq.h> | ||
36 | #include <linux/of_platform.h> | ||
37 | #include <linux/clk.h> | ||
38 | #include <linux/amba/pl08x.h> | ||
33 | 39 | ||
34 | #include <asm/setup.h> | 40 | #include <asm/setup.h> |
35 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
@@ -47,7 +53,6 @@ | |||
47 | #define SPI0_CS_GPIO LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5) | 53 | #define SPI0_CS_GPIO LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5) |
48 | #define LCD_POWER_GPIO LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 0) | 54 | #define LCD_POWER_GPIO LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 0) |
49 | #define BKL_POWER_GPIO LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 4) | 55 | #define BKL_POWER_GPIO LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 4) |
50 | #define LED_GPIO LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 1) | ||
51 | 56 | ||
52 | /* | 57 | /* |
53 | * AMBA LCD controller | 58 | * AMBA LCD controller |
@@ -150,9 +155,6 @@ static struct clcd_board lpc32xx_clcd_data = { | |||
150 | .remove = lpc32xx_clcd_remove, | 155 | .remove = lpc32xx_clcd_remove, |
151 | }; | 156 | }; |
152 | 157 | ||
153 | static AMBA_AHB_DEVICE(lpc32xx_clcd, "dev:clcd", 0, | ||
154 | LPC32XX_LCD_BASE, { IRQ_LPC32XX_LCD }, &lpc32xx_clcd_data); | ||
155 | |||
156 | /* | 158 | /* |
157 | * AMBA SSP (SPI) | 159 | * AMBA SSP (SPI) |
158 | */ | 160 | */ |
@@ -180,8 +182,11 @@ static struct pl022_ssp_controller lpc32xx_ssp0_data = { | |||
180 | .enable_dma = 0, | 182 | .enable_dma = 0, |
181 | }; | 183 | }; |
182 | 184 | ||
183 | static AMBA_APB_DEVICE(lpc32xx_ssp0, "dev:ssp0", 0, | 185 | static struct pl022_ssp_controller lpc32xx_ssp1_data = { |
184 | LPC32XX_SSP0_BASE, { IRQ_LPC32XX_SSP0 }, &lpc32xx_ssp0_data); | 186 | .bus_id = 1, |
187 | .num_chipselect = 1, | ||
188 | .enable_dma = 0, | ||
189 | }; | ||
185 | 190 | ||
186 | /* AT25 driver registration */ | 191 | /* AT25 driver registration */ |
187 | static int __init phy3250_spi_board_register(void) | 192 | static int __init phy3250_spi_board_register(void) |
@@ -221,73 +226,20 @@ static int __init phy3250_spi_board_register(void) | |||
221 | } | 226 | } |
222 | arch_initcall(phy3250_spi_board_register); | 227 | arch_initcall(phy3250_spi_board_register); |
223 | 228 | ||
224 | static struct i2c_board_info __initdata phy3250_i2c_board_info[] = { | 229 | static struct pl08x_platform_data pl08x_pd = { |
225 | { | ||
226 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
227 | }, | ||
228 | }; | ||
229 | |||
230 | static struct gpio_led phy_leds[] = { | ||
231 | { | ||
232 | .name = "led0", | ||
233 | .gpio = LED_GPIO, | ||
234 | .active_low = 1, | ||
235 | .default_trigger = "heartbeat", | ||
236 | }, | ||
237 | }; | ||
238 | |||
239 | static struct gpio_led_platform_data led_data = { | ||
240 | .leds = phy_leds, | ||
241 | .num_leds = ARRAY_SIZE(phy_leds), | ||
242 | }; | ||
243 | |||
244 | static struct platform_device lpc32xx_gpio_led_device = { | ||
245 | .name = "leds-gpio", | ||
246 | .id = -1, | ||
247 | .dev.platform_data = &led_data, | ||
248 | }; | 230 | }; |
249 | 231 | ||
250 | static struct platform_device *phy3250_devs[] __initdata = { | 232 | static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { |
251 | &lpc32xx_rtc_device, | 233 | OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", &lpc32xx_ssp0_data), |
252 | &lpc32xx_tsc_device, | 234 | OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", &lpc32xx_ssp1_data), |
253 | &lpc32xx_i2c0_device, | 235 | OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data), |
254 | &lpc32xx_i2c1_device, | 236 | OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), |
255 | &lpc32xx_i2c2_device, | 237 | { } |
256 | &lpc32xx_watchdog_device, | ||
257 | &lpc32xx_gpio_led_device, | ||
258 | &lpc32xx_adc_device, | ||
259 | &lpc32xx_ohci_device, | ||
260 | &lpc32xx_net_device, | ||
261 | }; | 238 | }; |
262 | 239 | ||
263 | static struct amba_device *amba_devs[] __initdata = { | 240 | static void __init lpc3250_machine_init(void) |
264 | &lpc32xx_clcd_device, | ||
265 | &lpc32xx_ssp0_device, | ||
266 | }; | ||
267 | |||
268 | /* | ||
269 | * Board specific functions | ||
270 | */ | ||
271 | static void __init phy3250_board_init(void) | ||
272 | { | 241 | { |
273 | u32 tmp; | 242 | u32 tmp; |
274 | int i; | ||
275 | |||
276 | lpc32xx_gpio_init(); | ||
277 | |||
278 | /* Register GPIOs used on this board */ | ||
279 | if (gpio_request(SPI0_CS_GPIO, "spi0 cs")) | ||
280 | printk(KERN_ERR "Error requesting gpio %u", | ||
281 | SPI0_CS_GPIO); | ||
282 | else if (gpio_direction_output(SPI0_CS_GPIO, 1)) | ||
283 | printk(KERN_ERR "Error setting gpio %u to output", | ||
284 | SPI0_CS_GPIO); | ||
285 | |||
286 | /* Setup network interface for RMII mode */ | ||
287 | tmp = __raw_readl(LPC32XX_CLKPWR_MACCLK_CTRL); | ||
288 | tmp &= ~LPC32XX_CLKPWR_MACCTRL_PINS_MSK; | ||
289 | tmp |= LPC32XX_CLKPWR_MACCTRL_USE_RMII_PINS; | ||
290 | __raw_writel(tmp, LPC32XX_CLKPWR_MACCLK_CTRL); | ||
291 | 243 | ||
292 | /* Setup SLC NAND controller muxing */ | 244 | /* Setup SLC NAND controller muxing */ |
293 | __raw_writel(LPC32XX_CLKPWR_NANDCLK_SEL_SLC, | 245 | __raw_writel(LPC32XX_CLKPWR_NANDCLK_SEL_SLC, |
@@ -300,6 +252,12 @@ static void __init phy3250_board_init(void) | |||
300 | tmp |= LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_TFT16; | 252 | tmp |= LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_TFT16; |
301 | __raw_writel(tmp, LPC32XX_CLKPWR_LCDCLK_CTRL); | 253 | __raw_writel(tmp, LPC32XX_CLKPWR_LCDCLK_CTRL); |
302 | 254 | ||
255 | /* Set up USB power */ | ||
256 | tmp = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); | ||
257 | tmp |= LPC32XX_CLKPWR_USBCTRL_HCLK_EN | | ||
258 | LPC32XX_CLKPWR_USBCTRL_USBI2C_EN; | ||
259 | __raw_writel(tmp, LPC32XX_CLKPWR_USB_CTRL); | ||
260 | |||
303 | /* Set up I2C pull levels */ | 261 | /* Set up I2C pull levels */ |
304 | tmp = __raw_readl(LPC32XX_CLKPWR_I2C_CLK_CTRL); | 262 | tmp = __raw_readl(LPC32XX_CLKPWR_I2C_CLK_CTRL); |
305 | tmp |= LPC32XX_CLKPWR_I2CCLK_USBI2CHI_DRIVE | | 263 | tmp |= LPC32XX_CLKPWR_I2CCLK_USBI2CHI_DRIVE | |
@@ -321,54 +279,51 @@ static void __init phy3250_board_init(void) | |||
321 | /* | 279 | /* |
322 | * AMBA peripheral clocks need to be enabled prior to AMBA device | 280 | * AMBA peripheral clocks need to be enabled prior to AMBA device |
323 | * detection or a data fault will occur, so enable the clocks | 281 | * detection or a data fault will occur, so enable the clocks |
324 | * here. However, we don't want to enable them if the peripheral | 282 | * here. |
325 | * isn't included in the image | ||
326 | */ | 283 | */ |
327 | #ifdef CONFIG_FB_ARMCLCD | ||
328 | tmp = __raw_readl(LPC32XX_CLKPWR_LCDCLK_CTRL); | 284 | tmp = __raw_readl(LPC32XX_CLKPWR_LCDCLK_CTRL); |
329 | __raw_writel((tmp | LPC32XX_CLKPWR_LCDCTRL_CLK_EN), | 285 | __raw_writel((tmp | LPC32XX_CLKPWR_LCDCTRL_CLK_EN), |
330 | LPC32XX_CLKPWR_LCDCLK_CTRL); | 286 | LPC32XX_CLKPWR_LCDCLK_CTRL); |
331 | #endif | 287 | |
332 | #ifdef CONFIG_SPI_PL022 | ||
333 | tmp = __raw_readl(LPC32XX_CLKPWR_SSP_CLK_CTRL); | 288 | tmp = __raw_readl(LPC32XX_CLKPWR_SSP_CLK_CTRL); |
334 | __raw_writel((tmp | LPC32XX_CLKPWR_SSPCTRL_SSPCLK0_EN), | 289 | __raw_writel((tmp | LPC32XX_CLKPWR_SSPCTRL_SSPCLK0_EN), |
335 | LPC32XX_CLKPWR_SSP_CLK_CTRL); | 290 | LPC32XX_CLKPWR_SSP_CLK_CTRL); |
336 | #endif | ||
337 | 291 | ||
338 | platform_add_devices(phy3250_devs, ARRAY_SIZE(phy3250_devs)); | 292 | tmp = __raw_readl(LPC32XX_CLKPWR_DMA_CLK_CTRL); |
339 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 293 | __raw_writel((tmp | LPC32XX_CLKPWR_DMACLKCTRL_CLK_EN), |
340 | struct amba_device *d = amba_devs[i]; | 294 | LPC32XX_CLKPWR_DMA_CLK_CTRL); |
341 | amba_device_register(d, &iomem_resource); | ||
342 | } | ||
343 | 295 | ||
344 | /* Test clock needed for UDA1380 initial init */ | 296 | /* Test clock needed for UDA1380 initial init */ |
345 | __raw_writel(LPC32XX_CLKPWR_TESTCLK2_SEL_MOSC | | 297 | __raw_writel(LPC32XX_CLKPWR_TESTCLK2_SEL_MOSC | |
346 | LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN, | 298 | LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN, |
347 | LPC32XX_CLKPWR_TEST_CLK_SEL); | 299 | LPC32XX_CLKPWR_TEST_CLK_SEL); |
348 | 300 | ||
349 | i2c_register_board_info(0, phy3250_i2c_board_info, | 301 | of_platform_populate(NULL, of_default_bus_match_table, |
350 | ARRAY_SIZE(phy3250_i2c_board_info)); | 302 | lpc32xx_auxdata_lookup, NULL); |
351 | } | ||
352 | |||
353 | static int __init lpc32xx_display_uid(void) | ||
354 | { | ||
355 | u32 uid[4]; | ||
356 | |||
357 | lpc32xx_get_uid(uid); | ||
358 | |||
359 | printk(KERN_INFO "LPC32XX unique ID: %08x%08x%08x%08x\n", | ||
360 | uid[3], uid[2], uid[1], uid[0]); | ||
361 | 303 | ||
362 | return 1; | 304 | /* Register GPIOs used on this board */ |
305 | if (gpio_request(SPI0_CS_GPIO, "spi0 cs")) | ||
306 | printk(KERN_ERR "Error requesting gpio %u", | ||
307 | SPI0_CS_GPIO); | ||
308 | else if (gpio_direction_output(SPI0_CS_GPIO, 1)) | ||
309 | printk(KERN_ERR "Error setting gpio %u to output", | ||
310 | SPI0_CS_GPIO); | ||
363 | } | 311 | } |
364 | arch_initcall(lpc32xx_display_uid); | ||
365 | 312 | ||
366 | MACHINE_START(PHY3250, "Phytec 3250 board with the LPC3250 Microcontroller") | 313 | static char const *lpc32xx_dt_compat[] __initdata = { |
367 | /* Maintainer: Kevin Wells, NXP Semiconductors */ | 314 | "nxp,lpc3220", |
315 | "nxp,lpc3230", | ||
316 | "nxp,lpc3240", | ||
317 | "nxp,lpc3250", | ||
318 | NULL | ||
319 | }; | ||
320 | |||
321 | DT_MACHINE_START(LPC32XX_DT, "LPC32XX SoC (Flattened Device Tree)") | ||
368 | .atag_offset = 0x100, | 322 | .atag_offset = 0x100, |
369 | .map_io = lpc32xx_map_io, | 323 | .map_io = lpc32xx_map_io, |
370 | .init_irq = lpc32xx_init_irq, | 324 | .init_irq = lpc32xx_init_irq, |
371 | .timer = &lpc32xx_timer, | 325 | .timer = &lpc32xx_timer, |
372 | .init_machine = phy3250_board_init, | 326 | .init_machine = lpc3250_machine_init, |
327 | .dt_compat = lpc32xx_dt_compat, | ||
373 | .restart = lpc23xx_restart, | 328 | .restart = lpc23xx_restart, |
374 | MACHINE_END | 329 | MACHINE_END |
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 5a90b9a3ab6e..ede721628150 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig | |||
@@ -2,16 +2,6 @@ if ARCH_MMP | |||
2 | 2 | ||
3 | menu "Marvell PXA168/910/MMP2 Implmentations" | 3 | menu "Marvell PXA168/910/MMP2 Implmentations" |
4 | 4 | ||
5 | config MACH_MMP_DT | ||
6 | bool "Support MMP2 platforms from device tree" | ||
7 | select CPU_PXA168 | ||
8 | select CPU_PXA910 | ||
9 | select USE_OF | ||
10 | help | ||
11 | Include support for Marvell MMP2 based platforms using | ||
12 | the device tree. Needn't select any other machine while | ||
13 | MACH_MMP_DT is enabled. | ||
14 | |||
15 | config MACH_ASPENITE | 5 | config MACH_ASPENITE |
16 | bool "Marvell's PXA168 Aspenite Development Board" | 6 | bool "Marvell's PXA168 Aspenite Development Board" |
17 | select CPU_PXA168 | 7 | select CPU_PXA168 |
@@ -94,6 +84,25 @@ config MACH_GPLUGD | |||
94 | Say 'Y' here if you want to support the Marvell PXA168-based | 84 | Say 'Y' here if you want to support the Marvell PXA168-based |
95 | GuruPlug Display (gplugD) Board | 85 | GuruPlug Display (gplugD) Board |
96 | 86 | ||
87 | config MACH_MMP_DT | ||
88 | bool "Support MMP (ARMv5) platforms from device tree" | ||
89 | select CPU_PXA168 | ||
90 | select CPU_PXA910 | ||
91 | select USE_OF | ||
92 | help | ||
93 | Include support for Marvell MMP2 based platforms using | ||
94 | the device tree. Needn't select any other machine while | ||
95 | MACH_MMP_DT is enabled. | ||
96 | |||
97 | config MACH_MMP2_DT | ||
98 | bool "Support MMP2 (ARMv7) platforms from device tree" | ||
99 | depends on !CPU_MOHAWK | ||
100 | select CPU_MMP2 | ||
101 | select USE_OF | ||
102 | help | ||
103 | Include support for Marvell MMP2 based platforms using | ||
104 | the device tree. | ||
105 | |||
97 | endmenu | 106 | endmenu |
98 | 107 | ||
99 | config CPU_PXA168 | 108 | config CPU_PXA168 |
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile index 4fc0ff5dc96d..b920b9bfbdb6 100644 --- a/arch/arm/mach-mmp/Makefile +++ b/arch/arm/mach-mmp/Makefile | |||
@@ -2,12 +2,12 @@ | |||
2 | # Makefile for Marvell's PXA168 processors line | 2 | # Makefile for Marvell's PXA168 processors line |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += common.o clock.o devices.o time.o | 5 | obj-y += common.o clock.o devices.o time.o irq.o |
6 | 6 | ||
7 | # SoC support | 7 | # SoC support |
8 | obj-$(CONFIG_CPU_PXA168) += pxa168.o irq-pxa168.o | 8 | obj-$(CONFIG_CPU_PXA168) += pxa168.o |
9 | obj-$(CONFIG_CPU_PXA910) += pxa910.o irq-pxa168.o | 9 | obj-$(CONFIG_CPU_PXA910) += pxa910.o |
10 | obj-$(CONFIG_CPU_MMP2) += mmp2.o irq-mmp2.o sram.o | 10 | obj-$(CONFIG_CPU_MMP2) += mmp2.o sram.o |
11 | 11 | ||
12 | # board support | 12 | # board support |
13 | obj-$(CONFIG_MACH_ASPENITE) += aspenite.o | 13 | obj-$(CONFIG_MACH_ASPENITE) += aspenite.o |
@@ -19,5 +19,6 @@ obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o | |||
19 | obj-$(CONFIG_MACH_FLINT) += flint.o | 19 | obj-$(CONFIG_MACH_FLINT) += flint.o |
20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o | 20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o |
21 | obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o | 21 | obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o |
22 | obj-$(CONFIG_MACH_MMP2_DT) += mmp2-dt.o | ||
22 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o | 23 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o |
23 | obj-$(CONFIG_MACH_GPLUGD) += gplugd.o | 24 | obj-$(CONFIG_MACH_GPLUGD) += gplugd.o |
diff --git a/arch/arm/mach-mmp/include/mach/entry-macro.S b/arch/arm/mach-mmp/include/mach/entry-macro.S index 9cff9e7a2b26..bd152e24e6d7 100644 --- a/arch/arm/mach-mmp/include/mach/entry-macro.S +++ b/arch/arm/mach-mmp/include/mach/entry-macro.S | |||
@@ -6,13 +6,15 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/irq.h> | ||
9 | #include <mach/regs-icu.h> | 10 | #include <mach/regs-icu.h> |
10 | 11 | ||
11 | .macro get_irqnr_preamble, base, tmp | 12 | .macro get_irqnr_preamble, base, tmp |
12 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID | 13 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID |
13 | and \tmp, \tmp, #0xff00 | 14 | and \tmp, \tmp, #0xff00 |
14 | cmp \tmp, #0x5800 | 15 | cmp \tmp, #0x5800 |
15 | ldr \base, =ICU_VIRT_BASE | 16 | ldr \base, =mmp_icu_base |
17 | ldr \base, [\base, #0] | ||
16 | addne \base, \base, #0x10c @ PJ1 AP INT SEL register | 18 | addne \base, \base, #0x10c @ PJ1 AP INT SEL register |
17 | addeq \base, \base, #0x104 @ PJ4 IRQ SEL register | 19 | addeq \base, \base, #0x104 @ PJ4 IRQ SEL register |
18 | .endm | 20 | .endm |
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h index d0e746626a3d..fb492a50a817 100644 --- a/arch/arm/mach-mmp/include/mach/irqs.h +++ b/arch/arm/mach-mmp/include/mach/irqs.h | |||
@@ -125,7 +125,7 @@ | |||
125 | #define IRQ_MMP2_RTC_MUX 5 | 125 | #define IRQ_MMP2_RTC_MUX 5 |
126 | #define IRQ_MMP2_TWSI1 7 | 126 | #define IRQ_MMP2_TWSI1 7 |
127 | #define IRQ_MMP2_GPU 8 | 127 | #define IRQ_MMP2_GPU 8 |
128 | #define IRQ_MMP2_KEYPAD 9 | 128 | #define IRQ_MMP2_KEYPAD_MUX 9 |
129 | #define IRQ_MMP2_ROTARY 10 | 129 | #define IRQ_MMP2_ROTARY 10 |
130 | #define IRQ_MMP2_TRACKBALL 11 | 130 | #define IRQ_MMP2_TRACKBALL 11 |
131 | #define IRQ_MMP2_ONEWIRE 12 | 131 | #define IRQ_MMP2_ONEWIRE 12 |
@@ -163,11 +163,11 @@ | |||
163 | #define IRQ_MMP2_DMA_FIQ 47 | 163 | #define IRQ_MMP2_DMA_FIQ 47 |
164 | #define IRQ_MMP2_DMA_RIQ 48 | 164 | #define IRQ_MMP2_DMA_RIQ 48 |
165 | #define IRQ_MMP2_GPIO 49 | 165 | #define IRQ_MMP2_GPIO 49 |
166 | #define IRQ_MMP2_SSP_MUX 51 | 166 | #define IRQ_MMP2_MIPI_HSI1_MUX 51 |
167 | #define IRQ_MMP2_MMC2 52 | 167 | #define IRQ_MMP2_MMC2 52 |
168 | #define IRQ_MMP2_MMC3 53 | 168 | #define IRQ_MMP2_MMC3 53 |
169 | #define IRQ_MMP2_MMC4 54 | 169 | #define IRQ_MMP2_MMC4 54 |
170 | #define IRQ_MMP2_MIPI_HSI 55 | 170 | #define IRQ_MMP2_MIPI_HSI0_MUX 55 |
171 | #define IRQ_MMP2_MSP 58 | 171 | #define IRQ_MMP2_MSP 58 |
172 | #define IRQ_MMP2_MIPI_SLIM_DMA 59 | 172 | #define IRQ_MMP2_MIPI_SLIM_DMA 59 |
173 | #define IRQ_MMP2_PJ4_FREQ_CHG 60 | 173 | #define IRQ_MMP2_PJ4_FREQ_CHG 60 |
@@ -186,8 +186,14 @@ | |||
186 | #define IRQ_MMP2_RTC_ALARM (IRQ_MMP2_RTC_BASE + 0) | 186 | #define IRQ_MMP2_RTC_ALARM (IRQ_MMP2_RTC_BASE + 0) |
187 | #define IRQ_MMP2_RTC (IRQ_MMP2_RTC_BASE + 1) | 187 | #define IRQ_MMP2_RTC (IRQ_MMP2_RTC_BASE + 1) |
188 | 188 | ||
189 | /* secondary interrupt of INT #9 */ | ||
190 | #define IRQ_MMP2_KEYPAD_BASE (IRQ_MMP2_RTC_BASE + 2) | ||
191 | #define IRQ_MMP2_KPC (IRQ_MMP2_KEYPAD_BASE + 0) | ||
192 | #define IRQ_MMP2_ROTORY (IRQ_MMP2_KEYPAD_BASE + 1) | ||
193 | #define IRQ_MMP2_TBALL (IRQ_MMP2_KEYPAD_BASE + 2) | ||
194 | |||
189 | /* secondary interrupt of INT #17 */ | 195 | /* secondary interrupt of INT #17 */ |
190 | #define IRQ_MMP2_TWSI_BASE (IRQ_MMP2_RTC_BASE + 2) | 196 | #define IRQ_MMP2_TWSI_BASE (IRQ_MMP2_KEYPAD_BASE + 3) |
191 | #define IRQ_MMP2_TWSI2 (IRQ_MMP2_TWSI_BASE + 0) | 197 | #define IRQ_MMP2_TWSI2 (IRQ_MMP2_TWSI_BASE + 0) |
192 | #define IRQ_MMP2_TWSI3 (IRQ_MMP2_TWSI_BASE + 1) | 198 | #define IRQ_MMP2_TWSI3 (IRQ_MMP2_TWSI_BASE + 1) |
193 | #define IRQ_MMP2_TWSI4 (IRQ_MMP2_TWSI_BASE + 2) | 199 | #define IRQ_MMP2_TWSI4 (IRQ_MMP2_TWSI_BASE + 2) |
@@ -212,11 +218,16 @@ | |||
212 | #define IRQ_MMP2_COMMRX (IRQ_MMP2_MISC_BASE + 14) | 218 | #define IRQ_MMP2_COMMRX (IRQ_MMP2_MISC_BASE + 14) |
213 | 219 | ||
214 | /* secondary interrupt of INT #51 */ | 220 | /* secondary interrupt of INT #51 */ |
215 | #define IRQ_MMP2_SSP_BASE (IRQ_MMP2_MISC_BASE + 15) | 221 | #define IRQ_MMP2_MIPI_HSI1_BASE (IRQ_MMP2_MISC_BASE + 15) |
216 | #define IRQ_MMP2_SSP1_SRDY (IRQ_MMP2_SSP_BASE + 0) | 222 | #define IRQ_MMP2_HSI1_CAWAKE (IRQ_MMP2_MIPI_HSI1_BASE + 0) |
217 | #define IRQ_MMP2_SSP3_SRDY (IRQ_MMP2_SSP_BASE + 1) | 223 | #define IRQ_MMP2_MIPI_HSI_INT1 (IRQ_MMP2_MIPI_HSI1_BASE + 1) |
224 | |||
225 | /* secondary interrupt of INT #55 */ | ||
226 | #define IRQ_MMP2_MIPI_HSI0_BASE (IRQ_MMP2_MIPI_HSI1_BASE + 2) | ||
227 | #define IRQ_MMP2_HSI0_CAWAKE (IRQ_MMP2_MIPI_HSI0_BASE + 0) | ||
228 | #define IRQ_MMP2_MIPI_HSI_INT0 (IRQ_MMP2_MIPI_HSI0_BASE + 1) | ||
218 | 229 | ||
219 | #define IRQ_MMP2_MUX_END (IRQ_MMP2_SSP_BASE + 2) | 230 | #define IRQ_MMP2_MUX_END (IRQ_MMP2_MIPI_HSI0_BASE + 2) |
220 | 231 | ||
221 | #define IRQ_GPIO_START 128 | 232 | #define IRQ_GPIO_START 128 |
222 | #define MMP_NR_BUILTIN_GPIO 192 | 233 | #define MMP_NR_BUILTIN_GPIO 192 |
diff --git a/arch/arm/mach-mmp/irq-mmp2.c b/arch/arm/mach-mmp/irq-mmp2.c deleted file mode 100644 index 7895d277421e..000000000000 --- a/arch/arm/mach-mmp/irq-mmp2.c +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/irq-mmp2.c | ||
3 | * | ||
4 | * Generic IRQ handling, GPIO IRQ demultiplexing, etc. | ||
5 | * | ||
6 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
7 | * Copyright: Marvell International Ltd. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/irq.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include <mach/irqs.h> | ||
19 | #include <mach/regs-icu.h> | ||
20 | #include <mach/mmp2.h> | ||
21 | |||
22 | #include "common.h" | ||
23 | |||
24 | static void icu_mask_irq(struct irq_data *d) | ||
25 | { | ||
26 | uint32_t r = __raw_readl(ICU_INT_CONF(d->irq)); | ||
27 | |||
28 | r &= ~ICU_INT_ROUTE_PJ4_IRQ; | ||
29 | __raw_writel(r, ICU_INT_CONF(d->irq)); | ||
30 | } | ||
31 | |||
32 | static void icu_unmask_irq(struct irq_data *d) | ||
33 | { | ||
34 | uint32_t r = __raw_readl(ICU_INT_CONF(d->irq)); | ||
35 | |||
36 | r |= ICU_INT_ROUTE_PJ4_IRQ; | ||
37 | __raw_writel(r, ICU_INT_CONF(d->irq)); | ||
38 | } | ||
39 | |||
40 | static struct irq_chip icu_irq_chip = { | ||
41 | .name = "icu_irq", | ||
42 | .irq_mask = icu_mask_irq, | ||
43 | .irq_mask_ack = icu_mask_irq, | ||
44 | .irq_unmask = icu_unmask_irq, | ||
45 | }; | ||
46 | |||
47 | static void pmic_irq_ack(struct irq_data *d) | ||
48 | { | ||
49 | if (d->irq == IRQ_MMP2_PMIC) | ||
50 | mmp2_clear_pmic_int(); | ||
51 | } | ||
52 | |||
53 | #define SECOND_IRQ_MASK(_name_, irq_base, prefix) \ | ||
54 | static void _name_##_mask_irq(struct irq_data *d) \ | ||
55 | { \ | ||
56 | uint32_t r; \ | ||
57 | r = __raw_readl(prefix##_MASK) | (1 << (d->irq - irq_base)); \ | ||
58 | __raw_writel(r, prefix##_MASK); \ | ||
59 | } | ||
60 | |||
61 | #define SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \ | ||
62 | static void _name_##_unmask_irq(struct irq_data *d) \ | ||
63 | { \ | ||
64 | uint32_t r; \ | ||
65 | r = __raw_readl(prefix##_MASK) & ~(1 << (d->irq - irq_base)); \ | ||
66 | __raw_writel(r, prefix##_MASK); \ | ||
67 | } | ||
68 | |||
69 | #define SECOND_IRQ_DEMUX(_name_, irq_base, prefix) \ | ||
70 | static void _name_##_irq_demux(unsigned int irq, struct irq_desc *desc) \ | ||
71 | { \ | ||
72 | unsigned long status, mask, n; \ | ||
73 | mask = __raw_readl(prefix##_MASK); \ | ||
74 | while (1) { \ | ||
75 | status = __raw_readl(prefix##_STATUS) & ~mask; \ | ||
76 | if (status == 0) \ | ||
77 | break; \ | ||
78 | n = find_first_bit(&status, BITS_PER_LONG); \ | ||
79 | while (n < BITS_PER_LONG) { \ | ||
80 | generic_handle_irq(irq_base + n); \ | ||
81 | n = find_next_bit(&status, BITS_PER_LONG, n+1); \ | ||
82 | } \ | ||
83 | } \ | ||
84 | } | ||
85 | |||
86 | #define SECOND_IRQ_CHIP(_name_, irq_base, prefix) \ | ||
87 | SECOND_IRQ_MASK(_name_, irq_base, prefix) \ | ||
88 | SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \ | ||
89 | SECOND_IRQ_DEMUX(_name_, irq_base, prefix) \ | ||
90 | static struct irq_chip _name_##_irq_chip = { \ | ||
91 | .name = #_name_, \ | ||
92 | .irq_mask = _name_##_mask_irq, \ | ||
93 | .irq_unmask = _name_##_unmask_irq, \ | ||
94 | } | ||
95 | |||
96 | SECOND_IRQ_CHIP(pmic, IRQ_MMP2_PMIC_BASE, MMP2_ICU_INT4); | ||
97 | SECOND_IRQ_CHIP(rtc, IRQ_MMP2_RTC_BASE, MMP2_ICU_INT5); | ||
98 | SECOND_IRQ_CHIP(twsi, IRQ_MMP2_TWSI_BASE, MMP2_ICU_INT17); | ||
99 | SECOND_IRQ_CHIP(misc, IRQ_MMP2_MISC_BASE, MMP2_ICU_INT35); | ||
100 | SECOND_IRQ_CHIP(ssp, IRQ_MMP2_SSP_BASE, MMP2_ICU_INT51); | ||
101 | |||
102 | static void init_mux_irq(struct irq_chip *chip, int start, int num) | ||
103 | { | ||
104 | int irq; | ||
105 | |||
106 | for (irq = start; num > 0; irq++, num--) { | ||
107 | struct irq_data *d = irq_get_irq_data(irq); | ||
108 | |||
109 | /* mask and clear the IRQ */ | ||
110 | chip->irq_mask(d); | ||
111 | if (chip->irq_ack) | ||
112 | chip->irq_ack(d); | ||
113 | |||
114 | irq_set_chip(irq, chip); | ||
115 | set_irq_flags(irq, IRQF_VALID); | ||
116 | irq_set_handler(irq, handle_level_irq); | ||
117 | } | ||
118 | } | ||
119 | |||
120 | void __init mmp2_init_icu(void) | ||
121 | { | ||
122 | int irq; | ||
123 | |||
124 | for (irq = 0; irq < IRQ_MMP2_MUX_BASE; irq++) { | ||
125 | icu_mask_irq(irq_get_irq_data(irq)); | ||
126 | irq_set_chip(irq, &icu_irq_chip); | ||
127 | set_irq_flags(irq, IRQF_VALID); | ||
128 | |||
129 | switch (irq) { | ||
130 | case IRQ_MMP2_PMIC_MUX: | ||
131 | case IRQ_MMP2_RTC_MUX: | ||
132 | case IRQ_MMP2_TWSI_MUX: | ||
133 | case IRQ_MMP2_MISC_MUX: | ||
134 | case IRQ_MMP2_SSP_MUX: | ||
135 | break; | ||
136 | default: | ||
137 | irq_set_handler(irq, handle_level_irq); | ||
138 | break; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /* NOTE: IRQ_MMP2_PMIC requires the PMIC MFPR register | ||
143 | * to be written to clear the interrupt | ||
144 | */ | ||
145 | pmic_irq_chip.irq_ack = pmic_irq_ack; | ||
146 | |||
147 | init_mux_irq(&pmic_irq_chip, IRQ_MMP2_PMIC_BASE, 2); | ||
148 | init_mux_irq(&rtc_irq_chip, IRQ_MMP2_RTC_BASE, 2); | ||
149 | init_mux_irq(&twsi_irq_chip, IRQ_MMP2_TWSI_BASE, 5); | ||
150 | init_mux_irq(&misc_irq_chip, IRQ_MMP2_MISC_BASE, 15); | ||
151 | init_mux_irq(&ssp_irq_chip, IRQ_MMP2_SSP_BASE, 2); | ||
152 | |||
153 | irq_set_chained_handler(IRQ_MMP2_PMIC_MUX, pmic_irq_demux); | ||
154 | irq_set_chained_handler(IRQ_MMP2_RTC_MUX, rtc_irq_demux); | ||
155 | irq_set_chained_handler(IRQ_MMP2_TWSI_MUX, twsi_irq_demux); | ||
156 | irq_set_chained_handler(IRQ_MMP2_MISC_MUX, misc_irq_demux); | ||
157 | irq_set_chained_handler(IRQ_MMP2_SSP_MUX, ssp_irq_demux); | ||
158 | } | ||
diff --git a/arch/arm/mach-mmp/irq-pxa168.c b/arch/arm/mach-mmp/irq-pxa168.c deleted file mode 100644 index 89706a0d08f1..000000000000 --- a/arch/arm/mach-mmp/irq-pxa168.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/irq.c | ||
3 | * | ||
4 | * Generic IRQ handling, GPIO IRQ demultiplexing, etc. | ||
5 | * | ||
6 | * Author: Bin Yang <bin.yang@marvell.com> | ||
7 | * Created: Sep 30, 2008 | ||
8 | * Copyright: Marvell International Ltd. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <mach/regs-icu.h> | ||
20 | |||
21 | #include "common.h" | ||
22 | |||
23 | #define IRQ_ROUTE_TO_AP (ICU_INT_CONF_AP_INT | ICU_INT_CONF_IRQ) | ||
24 | |||
25 | #define PRIORITY_DEFAULT 0x1 | ||
26 | #define PRIORITY_NONE 0x0 /* means IRQ disabled */ | ||
27 | |||
28 | static void icu_mask_irq(struct irq_data *d) | ||
29 | { | ||
30 | __raw_writel(PRIORITY_NONE, ICU_INT_CONF(d->irq)); | ||
31 | } | ||
32 | |||
33 | static void icu_unmask_irq(struct irq_data *d) | ||
34 | { | ||
35 | __raw_writel(IRQ_ROUTE_TO_AP | PRIORITY_DEFAULT, ICU_INT_CONF(d->irq)); | ||
36 | } | ||
37 | |||
38 | static struct irq_chip icu_irq_chip = { | ||
39 | .name = "icu_irq", | ||
40 | .irq_ack = icu_mask_irq, | ||
41 | .irq_mask = icu_mask_irq, | ||
42 | .irq_unmask = icu_unmask_irq, | ||
43 | }; | ||
44 | |||
45 | void __init icu_init_irq(void) | ||
46 | { | ||
47 | int irq; | ||
48 | |||
49 | for (irq = 0; irq < 64; irq++) { | ||
50 | icu_mask_irq(irq_get_irq_data(irq)); | ||
51 | irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); | ||
52 | set_irq_flags(irq, IRQF_VALID); | ||
53 | } | ||
54 | } | ||
diff --git a/arch/arm/mach-mmp/irq.c b/arch/arm/mach-mmp/irq.c new file mode 100644 index 000000000000..3705470c9f1e --- /dev/null +++ b/arch/arm/mach-mmp/irq.c | |||
@@ -0,0 +1,445 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/irq.c | ||
3 | * | ||
4 | * Generic IRQ handling, GPIO IRQ demultiplexing, etc. | ||
5 | * Copyright (C) 2008 - 2012 Marvell Technology Group Ltd. | ||
6 | * | ||
7 | * Author: Bin Yang <bin.yang@marvell.com> | ||
8 | * Haojian Zhuang <haojian.zhuang@gmail.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/module.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/irq.h> | ||
18 | #include <linux/irqdomain.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/ioport.h> | ||
21 | #include <linux/of_address.h> | ||
22 | #include <linux/of_irq.h> | ||
23 | |||
24 | #include <mach/irqs.h> | ||
25 | |||
26 | #include "common.h" | ||
27 | |||
28 | #define MAX_ICU_NR 16 | ||
29 | |||
30 | struct icu_chip_data { | ||
31 | int nr_irqs; | ||
32 | unsigned int virq_base; | ||
33 | unsigned int cascade_irq; | ||
34 | void __iomem *reg_status; | ||
35 | void __iomem *reg_mask; | ||
36 | unsigned int conf_enable; | ||
37 | unsigned int conf_disable; | ||
38 | unsigned int conf_mask; | ||
39 | unsigned int clr_mfp_irq_base; | ||
40 | unsigned int clr_mfp_hwirq; | ||
41 | struct irq_domain *domain; | ||
42 | }; | ||
43 | |||
44 | struct mmp_intc_conf { | ||
45 | unsigned int conf_enable; | ||
46 | unsigned int conf_disable; | ||
47 | unsigned int conf_mask; | ||
48 | }; | ||
49 | |||
50 | void __iomem *mmp_icu_base; | ||
51 | static struct icu_chip_data icu_data[MAX_ICU_NR]; | ||
52 | static int max_icu_nr; | ||
53 | |||
54 | extern void mmp2_clear_pmic_int(void); | ||
55 | |||
56 | static void icu_mask_ack_irq(struct irq_data *d) | ||
57 | { | ||
58 | struct irq_domain *domain = d->domain; | ||
59 | struct icu_chip_data *data = (struct icu_chip_data *)domain->host_data; | ||
60 | int hwirq; | ||
61 | u32 r; | ||
62 | |||
63 | hwirq = d->irq - data->virq_base; | ||
64 | if (data == &icu_data[0]) { | ||
65 | r = readl_relaxed(mmp_icu_base + (hwirq << 2)); | ||
66 | r &= ~data->conf_mask; | ||
67 | r |= data->conf_disable; | ||
68 | writel_relaxed(r, mmp_icu_base + (hwirq << 2)); | ||
69 | } else { | ||
70 | #ifdef CONFIG_CPU_MMP2 | ||
71 | if ((data->virq_base == data->clr_mfp_irq_base) | ||
72 | && (hwirq == data->clr_mfp_hwirq)) | ||
73 | mmp2_clear_pmic_int(); | ||
74 | #endif | ||
75 | r = readl_relaxed(data->reg_mask) | (1 << hwirq); | ||
76 | writel_relaxed(r, data->reg_mask); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | static void icu_mask_irq(struct irq_data *d) | ||
81 | { | ||
82 | struct irq_domain *domain = d->domain; | ||
83 | struct icu_chip_data *data = (struct icu_chip_data *)domain->host_data; | ||
84 | int hwirq; | ||
85 | u32 r; | ||
86 | |||
87 | hwirq = d->irq - data->virq_base; | ||
88 | if (data == &icu_data[0]) { | ||
89 | r = readl_relaxed(mmp_icu_base + (hwirq << 2)); | ||
90 | r &= ~data->conf_mask; | ||
91 | r |= data->conf_disable; | ||
92 | writel_relaxed(r, mmp_icu_base + (hwirq << 2)); | ||
93 | } else { | ||
94 | r = readl_relaxed(data->reg_mask) | (1 << hwirq); | ||
95 | writel_relaxed(r, data->reg_mask); | ||
96 | } | ||
97 | } | ||
98 | |||
99 | static void icu_unmask_irq(struct irq_data *d) | ||
100 | { | ||
101 | struct irq_domain *domain = d->domain; | ||
102 | struct icu_chip_data *data = (struct icu_chip_data *)domain->host_data; | ||
103 | int hwirq; | ||
104 | u32 r; | ||
105 | |||
106 | hwirq = d->irq - data->virq_base; | ||
107 | if (data == &icu_data[0]) { | ||
108 | r = readl_relaxed(mmp_icu_base + (hwirq << 2)); | ||
109 | r &= ~data->conf_mask; | ||
110 | r |= data->conf_enable; | ||
111 | writel_relaxed(r, mmp_icu_base + (hwirq << 2)); | ||
112 | } else { | ||
113 | r = readl_relaxed(data->reg_mask) & ~(1 << hwirq); | ||
114 | writel_relaxed(r, data->reg_mask); | ||
115 | } | ||
116 | } | ||
117 | |||
118 | static struct irq_chip icu_irq_chip = { | ||
119 | .name = "icu_irq", | ||
120 | .irq_mask = icu_mask_irq, | ||
121 | .irq_mask_ack = icu_mask_ack_irq, | ||
122 | .irq_unmask = icu_unmask_irq, | ||
123 | }; | ||
124 | |||
125 | static void icu_mux_irq_demux(unsigned int irq, struct irq_desc *desc) | ||
126 | { | ||
127 | struct irq_domain *domain; | ||
128 | struct icu_chip_data *data; | ||
129 | int i; | ||
130 | unsigned long mask, status, n; | ||
131 | |||
132 | for (i = 1; i < max_icu_nr; i++) { | ||
133 | if (irq == icu_data[i].cascade_irq) { | ||
134 | domain = icu_data[i].domain; | ||
135 | data = (struct icu_chip_data *)domain->host_data; | ||
136 | break; | ||
137 | } | ||
138 | } | ||
139 | if (i >= max_icu_nr) { | ||
140 | pr_err("Spurious irq %d in MMP INTC\n", irq); | ||
141 | return; | ||
142 | } | ||
143 | |||
144 | mask = readl_relaxed(data->reg_mask); | ||
145 | while (1) { | ||
146 | status = readl_relaxed(data->reg_status) & ~mask; | ||
147 | if (status == 0) | ||
148 | break; | ||
149 | n = find_first_bit(&status, BITS_PER_LONG); | ||
150 | while (n < BITS_PER_LONG) { | ||
151 | generic_handle_irq(icu_data[i].virq_base + n); | ||
152 | n = find_next_bit(&status, BITS_PER_LONG, n + 1); | ||
153 | } | ||
154 | } | ||
155 | } | ||
156 | |||
157 | static int mmp_irq_domain_map(struct irq_domain *d, unsigned int irq, | ||
158 | irq_hw_number_t hw) | ||
159 | { | ||
160 | irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); | ||
161 | set_irq_flags(irq, IRQF_VALID); | ||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | static int mmp_irq_domain_xlate(struct irq_domain *d, struct device_node *node, | ||
166 | const u32 *intspec, unsigned int intsize, | ||
167 | unsigned long *out_hwirq, | ||
168 | unsigned int *out_type) | ||
169 | { | ||
170 | *out_hwirq = intspec[0]; | ||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | const struct irq_domain_ops mmp_irq_domain_ops = { | ||
175 | .map = mmp_irq_domain_map, | ||
176 | .xlate = mmp_irq_domain_xlate, | ||
177 | }; | ||
178 | |||
179 | static struct mmp_intc_conf mmp_conf = { | ||
180 | .conf_enable = 0x51, | ||
181 | .conf_disable = 0x0, | ||
182 | .conf_mask = 0x7f, | ||
183 | }; | ||
184 | |||
185 | static struct mmp_intc_conf mmp2_conf = { | ||
186 | .conf_enable = 0x20, | ||
187 | .conf_disable = 0x0, | ||
188 | .conf_mask = 0x7f, | ||
189 | }; | ||
190 | |||
191 | /* MMP (ARMv5) */ | ||
192 | void __init icu_init_irq(void) | ||
193 | { | ||
194 | int irq; | ||
195 | |||
196 | max_icu_nr = 1; | ||
197 | mmp_icu_base = ioremap(0xd4282000, 0x1000); | ||
198 | icu_data[0].conf_enable = mmp_conf.conf_enable; | ||
199 | icu_data[0].conf_disable = mmp_conf.conf_disable; | ||
200 | icu_data[0].conf_mask = mmp_conf.conf_mask; | ||
201 | icu_data[0].nr_irqs = 64; | ||
202 | icu_data[0].virq_base = 0; | ||
203 | icu_data[0].domain = irq_domain_add_legacy(NULL, 64, 0, 0, | ||
204 | &irq_domain_simple_ops, | ||
205 | &icu_data[0]); | ||
206 | for (irq = 0; irq < 64; irq++) { | ||
207 | icu_mask_irq(irq_get_irq_data(irq)); | ||
208 | irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); | ||
209 | set_irq_flags(irq, IRQF_VALID); | ||
210 | } | ||
211 | irq_set_default_host(icu_data[0].domain); | ||
212 | } | ||
213 | |||
214 | /* MMP2 (ARMv7) */ | ||
215 | void __init mmp2_init_icu(void) | ||
216 | { | ||
217 | int irq; | ||
218 | |||
219 | max_icu_nr = 8; | ||
220 | mmp_icu_base = ioremap(0xd4282000, 0x1000); | ||
221 | icu_data[0].conf_enable = mmp2_conf.conf_enable; | ||
222 | icu_data[0].conf_disable = mmp2_conf.conf_disable; | ||
223 | icu_data[0].conf_mask = mmp2_conf.conf_mask; | ||
224 | icu_data[0].nr_irqs = 64; | ||
225 | icu_data[0].virq_base = 0; | ||
226 | icu_data[0].domain = irq_domain_add_legacy(NULL, 64, 0, 0, | ||
227 | &irq_domain_simple_ops, | ||
228 | &icu_data[0]); | ||
229 | icu_data[1].reg_status = mmp_icu_base + 0x150; | ||
230 | icu_data[1].reg_mask = mmp_icu_base + 0x168; | ||
231 | icu_data[1].clr_mfp_irq_base = IRQ_MMP2_PMIC_BASE; | ||
232 | icu_data[1].clr_mfp_hwirq = IRQ_MMP2_PMIC - IRQ_MMP2_PMIC_BASE; | ||
233 | icu_data[1].nr_irqs = 2; | ||
234 | icu_data[1].virq_base = IRQ_MMP2_PMIC_BASE; | ||
235 | icu_data[1].domain = irq_domain_add_legacy(NULL, icu_data[1].nr_irqs, | ||
236 | icu_data[1].virq_base, 0, | ||
237 | &irq_domain_simple_ops, | ||
238 | &icu_data[1]); | ||
239 | icu_data[2].reg_status = mmp_icu_base + 0x154; | ||
240 | icu_data[2].reg_mask = mmp_icu_base + 0x16c; | ||
241 | icu_data[2].nr_irqs = 2; | ||
242 | icu_data[2].virq_base = IRQ_MMP2_RTC_BASE; | ||
243 | icu_data[2].domain = irq_domain_add_legacy(NULL, icu_data[2].nr_irqs, | ||
244 | icu_data[2].virq_base, 0, | ||
245 | &irq_domain_simple_ops, | ||
246 | &icu_data[2]); | ||
247 | icu_data[3].reg_status = mmp_icu_base + 0x180; | ||
248 | icu_data[3].reg_mask = mmp_icu_base + 0x17c; | ||
249 | icu_data[3].nr_irqs = 3; | ||
250 | icu_data[3].virq_base = IRQ_MMP2_KEYPAD_BASE; | ||
251 | icu_data[3].domain = irq_domain_add_legacy(NULL, icu_data[3].nr_irqs, | ||
252 | icu_data[3].virq_base, 0, | ||
253 | &irq_domain_simple_ops, | ||
254 | &icu_data[3]); | ||
255 | icu_data[4].reg_status = mmp_icu_base + 0x158; | ||
256 | icu_data[4].reg_mask = mmp_icu_base + 0x170; | ||
257 | icu_data[4].nr_irqs = 5; | ||
258 | icu_data[4].virq_base = IRQ_MMP2_TWSI_BASE; | ||
259 | icu_data[4].domain = irq_domain_add_legacy(NULL, icu_data[4].nr_irqs, | ||
260 | icu_data[4].virq_base, 0, | ||
261 | &irq_domain_simple_ops, | ||
262 | &icu_data[4]); | ||
263 | icu_data[5].reg_status = mmp_icu_base + 0x15c; | ||
264 | icu_data[5].reg_mask = mmp_icu_base + 0x174; | ||
265 | icu_data[5].nr_irqs = 15; | ||
266 | icu_data[5].virq_base = IRQ_MMP2_MISC_BASE; | ||
267 | icu_data[5].domain = irq_domain_add_legacy(NULL, icu_data[5].nr_irqs, | ||
268 | icu_data[5].virq_base, 0, | ||
269 | &irq_domain_simple_ops, | ||
270 | &icu_data[5]); | ||
271 | icu_data[6].reg_status = mmp_icu_base + 0x160; | ||
272 | icu_data[6].reg_mask = mmp_icu_base + 0x178; | ||
273 | icu_data[6].nr_irqs = 2; | ||
274 | icu_data[6].virq_base = IRQ_MMP2_MIPI_HSI1_BASE; | ||
275 | icu_data[6].domain = irq_domain_add_legacy(NULL, icu_data[6].nr_irqs, | ||
276 | icu_data[6].virq_base, 0, | ||
277 | &irq_domain_simple_ops, | ||
278 | &icu_data[6]); | ||
279 | icu_data[7].reg_status = mmp_icu_base + 0x188; | ||
280 | icu_data[7].reg_mask = mmp_icu_base + 0x184; | ||
281 | icu_data[7].nr_irqs = 2; | ||
282 | icu_data[7].virq_base = IRQ_MMP2_MIPI_HSI0_BASE; | ||
283 | icu_data[7].domain = irq_domain_add_legacy(NULL, icu_data[7].nr_irqs, | ||
284 | icu_data[7].virq_base, 0, | ||
285 | &irq_domain_simple_ops, | ||
286 | &icu_data[7]); | ||
287 | for (irq = 0; irq < IRQ_MMP2_MUX_END; irq++) { | ||
288 | icu_mask_irq(irq_get_irq_data(irq)); | ||
289 | switch (irq) { | ||
290 | case IRQ_MMP2_PMIC_MUX: | ||
291 | case IRQ_MMP2_RTC_MUX: | ||
292 | case IRQ_MMP2_KEYPAD_MUX: | ||
293 | case IRQ_MMP2_TWSI_MUX: | ||
294 | case IRQ_MMP2_MISC_MUX: | ||
295 | case IRQ_MMP2_MIPI_HSI1_MUX: | ||
296 | case IRQ_MMP2_MIPI_HSI0_MUX: | ||
297 | irq_set_chip(irq, &icu_irq_chip); | ||
298 | irq_set_chained_handler(irq, icu_mux_irq_demux); | ||
299 | break; | ||
300 | default: | ||
301 | irq_set_chip_and_handler(irq, &icu_irq_chip, | ||
302 | handle_level_irq); | ||
303 | break; | ||
304 | } | ||
305 | set_irq_flags(irq, IRQF_VALID); | ||
306 | } | ||
307 | irq_set_default_host(icu_data[0].domain); | ||
308 | } | ||
309 | |||
310 | #ifdef CONFIG_OF | ||
311 | static const struct of_device_id intc_ids[] __initconst = { | ||
312 | { .compatible = "mrvl,mmp-intc", .data = &mmp_conf }, | ||
313 | { .compatible = "mrvl,mmp2-intc", .data = &mmp2_conf }, | ||
314 | {} | ||
315 | }; | ||
316 | |||
317 | static const struct of_device_id mmp_mux_irq_match[] __initconst = { | ||
318 | { .compatible = "mrvl,mmp2-mux-intc" }, | ||
319 | {} | ||
320 | }; | ||
321 | |||
322 | int __init mmp2_mux_init(struct device_node *parent) | ||
323 | { | ||
324 | struct device_node *node; | ||
325 | const struct of_device_id *of_id; | ||
326 | struct resource res; | ||
327 | int i, irq_base, ret, irq; | ||
328 | u32 nr_irqs, mfp_irq; | ||
329 | |||
330 | node = parent; | ||
331 | max_icu_nr = 1; | ||
332 | for (i = 1; i < MAX_ICU_NR; i++) { | ||
333 | node = of_find_matching_node(node, mmp_mux_irq_match); | ||
334 | if (!node) | ||
335 | break; | ||
336 | of_id = of_match_node(&mmp_mux_irq_match[0], node); | ||
337 | ret = of_property_read_u32(node, "mrvl,intc-nr-irqs", | ||
338 | &nr_irqs); | ||
339 | if (ret) { | ||
340 | pr_err("Not found mrvl,intc-nr-irqs property\n"); | ||
341 | ret = -EINVAL; | ||
342 | goto err; | ||
343 | } | ||
344 | ret = of_address_to_resource(node, 0, &res); | ||
345 | if (ret < 0) { | ||
346 | pr_err("Not found reg property\n"); | ||
347 | ret = -EINVAL; | ||
348 | goto err; | ||
349 | } | ||
350 | icu_data[i].reg_status = mmp_icu_base + res.start; | ||
351 | ret = of_address_to_resource(node, 1, &res); | ||
352 | if (ret < 0) { | ||
353 | pr_err("Not found reg property\n"); | ||
354 | ret = -EINVAL; | ||
355 | goto err; | ||
356 | } | ||
357 | icu_data[i].reg_mask = mmp_icu_base + res.start; | ||
358 | icu_data[i].cascade_irq = irq_of_parse_and_map(node, 0); | ||
359 | if (!icu_data[i].cascade_irq) { | ||
360 | ret = -EINVAL; | ||
361 | goto err; | ||
362 | } | ||
363 | |||
364 | irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0); | ||
365 | if (irq_base < 0) { | ||
366 | pr_err("Failed to allocate IRQ numbers for mux intc\n"); | ||
367 | ret = irq_base; | ||
368 | goto err; | ||
369 | } | ||
370 | if (!of_property_read_u32(node, "mrvl,clr-mfp-irq", | ||
371 | &mfp_irq)) { | ||
372 | icu_data[i].clr_mfp_irq_base = irq_base; | ||
373 | icu_data[i].clr_mfp_hwirq = mfp_irq; | ||
374 | } | ||
375 | irq_set_chained_handler(icu_data[i].cascade_irq, | ||
376 | icu_mux_irq_demux); | ||
377 | icu_data[i].nr_irqs = nr_irqs; | ||
378 | icu_data[i].virq_base = irq_base; | ||
379 | icu_data[i].domain = irq_domain_add_legacy(node, nr_irqs, | ||
380 | irq_base, 0, | ||
381 | &mmp_irq_domain_ops, | ||
382 | &icu_data[i]); | ||
383 | for (irq = irq_base; irq < irq_base + nr_irqs; irq++) | ||
384 | icu_mask_irq(irq_get_irq_data(irq)); | ||
385 | } | ||
386 | max_icu_nr = i; | ||
387 | return 0; | ||
388 | err: | ||
389 | of_node_put(node); | ||
390 | max_icu_nr = i; | ||
391 | return ret; | ||
392 | } | ||
393 | |||
394 | void __init mmp_dt_irq_init(void) | ||
395 | { | ||
396 | struct device_node *node; | ||
397 | const struct of_device_id *of_id; | ||
398 | struct mmp_intc_conf *conf; | ||
399 | int nr_irqs, irq_base, ret, irq; | ||
400 | |||
401 | node = of_find_matching_node(NULL, intc_ids); | ||
402 | if (!node) { | ||
403 | pr_err("Failed to find interrupt controller in arch-mmp\n"); | ||
404 | return; | ||
405 | } | ||
406 | of_id = of_match_node(intc_ids, node); | ||
407 | conf = of_id->data; | ||
408 | |||
409 | ret = of_property_read_u32(node, "mrvl,intc-nr-irqs", &nr_irqs); | ||
410 | if (ret) { | ||
411 | pr_err("Not found mrvl,intc-nr-irqs property\n"); | ||
412 | return; | ||
413 | } | ||
414 | |||
415 | mmp_icu_base = of_iomap(node, 0); | ||
416 | if (!mmp_icu_base) { | ||
417 | pr_err("Failed to get interrupt controller register\n"); | ||
418 | return; | ||
419 | } | ||
420 | |||
421 | irq_base = irq_alloc_descs(-1, 0, nr_irqs - NR_IRQS_LEGACY, 0); | ||
422 | if (irq_base < 0) { | ||
423 | pr_err("Failed to allocate IRQ numbers\n"); | ||
424 | goto err; | ||
425 | } else if (irq_base != NR_IRQS_LEGACY) { | ||
426 | pr_err("ICU's irqbase should be started from 0\n"); | ||
427 | goto err; | ||
428 | } | ||
429 | icu_data[0].conf_enable = conf->conf_enable; | ||
430 | icu_data[0].conf_disable = conf->conf_disable; | ||
431 | icu_data[0].conf_mask = conf->conf_mask; | ||
432 | icu_data[0].nr_irqs = nr_irqs; | ||
433 | icu_data[0].virq_base = 0; | ||
434 | icu_data[0].domain = irq_domain_add_legacy(node, nr_irqs, 0, 0, | ||
435 | &mmp_irq_domain_ops, | ||
436 | &icu_data[0]); | ||
437 | irq_set_default_host(icu_data[0].domain); | ||
438 | for (irq = 0; irq < nr_irqs; irq++) | ||
439 | icu_mask_irq(irq_get_irq_data(irq)); | ||
440 | mmp2_mux_init(node); | ||
441 | return; | ||
442 | err: | ||
443 | iounmap(mmp_icu_base); | ||
444 | } | ||
445 | #endif | ||
diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c index 67075395e400..033cc31b3c72 100644 --- a/arch/arm/mach-mmp/mmp-dt.c +++ b/arch/arm/mach-mmp/mmp-dt.c | |||
@@ -14,14 +14,19 @@ | |||
14 | #include <linux/of_irq.h> | 14 | #include <linux/of_irq.h> |
15 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/time.h> | ||
17 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
18 | 19 | ||
19 | #include "common.h" | 20 | #include "common.h" |
20 | 21 | ||
21 | extern struct sys_timer pxa168_timer; | 22 | extern void __init mmp_dt_irq_init(void); |
22 | extern void __init icu_init_irq(void); | 23 | extern void __init mmp_dt_init_timer(void); |
23 | 24 | ||
24 | static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = { | 25 | static struct sys_timer mmp_dt_timer = { |
26 | .init = mmp_dt_init_timer, | ||
27 | }; | ||
28 | |||
29 | static const struct of_dev_auxdata pxa168_auxdata_lookup[] __initconst = { | ||
25 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), | 30 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), |
26 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), | 31 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), |
27 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL), | 32 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL), |
@@ -32,44 +37,47 @@ static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = { | |||
32 | {} | 37 | {} |
33 | }; | 38 | }; |
34 | 39 | ||
35 | static int __init mmp_intc_add_irq_domain(struct device_node *np, | 40 | static const struct of_dev_auxdata pxa910_auxdata_lookup[] __initconst = { |
36 | struct device_node *parent) | 41 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), |
37 | { | 42 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), |
38 | irq_domain_add_simple(np, 0); | 43 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4036000, "pxa2xx-uart.2", NULL), |
39 | return 0; | 44 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), |
40 | } | 45 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4037000, "pxa2xx-i2c.1", NULL), |
41 | 46 | OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL), | |
42 | static int __init mmp_gpio_add_irq_domain(struct device_node *np, | 47 | OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), |
43 | struct device_node *parent) | ||
44 | { | ||
45 | irq_domain_add_simple(np, IRQ_GPIO_START); | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | static const struct of_device_id mmp_irq_match[] __initconst = { | ||
50 | { .compatible = "mrvl,mmp-intc", .data = mmp_intc_add_irq_domain, }, | ||
51 | { .compatible = "mrvl,mmp-gpio", .data = mmp_gpio_add_irq_domain, }, | ||
52 | {} | 48 | {} |
53 | }; | 49 | }; |
54 | 50 | ||
55 | static void __init mmp_dt_init(void) | 51 | static void __init pxa168_dt_init(void) |
56 | { | 52 | { |
53 | of_platform_populate(NULL, of_default_bus_match_table, | ||
54 | pxa168_auxdata_lookup, NULL); | ||
55 | } | ||
57 | 56 | ||
58 | of_irq_init(mmp_irq_match); | 57 | static void __init pxa910_dt_init(void) |
59 | 58 | { | |
60 | of_platform_populate(NULL, of_default_bus_match_table, | 59 | of_platform_populate(NULL, of_default_bus_match_table, |
61 | mmp_auxdata_lookup, NULL); | 60 | pxa910_auxdata_lookup, NULL); |
62 | } | 61 | } |
63 | 62 | ||
64 | static const char *pxa168_dt_board_compat[] __initdata = { | 63 | static const char *mmp_dt_board_compat[] __initdata = { |
65 | "mrvl,pxa168-aspenite", | 64 | "mrvl,pxa168-aspenite", |
65 | "mrvl,pxa910-dkb", | ||
66 | NULL, | 66 | NULL, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") | 69 | DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") |
70 | .map_io = mmp_map_io, | 70 | .map_io = mmp_map_io, |
71 | .init_irq = icu_init_irq, | 71 | .init_irq = mmp_dt_irq_init, |
72 | .timer = &pxa168_timer, | 72 | .timer = &mmp_dt_timer, |
73 | .init_machine = mmp_dt_init, | 73 | .init_machine = pxa168_dt_init, |
74 | .dt_compat = pxa168_dt_board_compat, | 74 | .dt_compat = mmp_dt_board_compat, |
75 | MACHINE_END | ||
76 | |||
77 | DT_MACHINE_START(PXA910_DT, "Marvell PXA910 (Device Tree Support)") | ||
78 | .map_io = mmp_map_io, | ||
79 | .init_irq = mmp_dt_irq_init, | ||
80 | .timer = &mmp_dt_timer, | ||
81 | .init_machine = pxa910_dt_init, | ||
82 | .dt_compat = mmp_dt_board_compat, | ||
75 | MACHINE_END | 83 | MACHINE_END |
diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c new file mode 100644 index 000000000000..535a5ed5977b --- /dev/null +++ b/arch/arm/mach-mmp/mmp2-dt.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mmp/mmp2-dt.c | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell Technology Group Ltd. | ||
5 | * Author: Haojian Zhuang <haojian.zhuang@marvell.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * publishhed by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/io.h> | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/irqdomain.h> | ||
15 | #include <linux/of_irq.h> | ||
16 | #include <linux/of_platform.h> | ||
17 | #include <asm/mach/arch.h> | ||
18 | #include <asm/mach/time.h> | ||
19 | #include <mach/irqs.h> | ||
20 | #include <mach/regs-apbc.h> | ||
21 | |||
22 | #include "common.h" | ||
23 | |||
24 | extern void __init mmp_dt_irq_init(void); | ||
25 | extern void __init mmp_dt_init_timer(void); | ||
26 | |||
27 | static struct sys_timer mmp_dt_timer = { | ||
28 | .init = mmp_dt_init_timer, | ||
29 | }; | ||
30 | |||
31 | static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = { | ||
32 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL), | ||
33 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL), | ||
34 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.2", NULL), | ||
35 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4016000, "pxa2xx-uart.3", NULL), | ||
36 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), | ||
37 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL), | ||
38 | OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL), | ||
39 | OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), | ||
40 | {} | ||
41 | }; | ||
42 | |||
43 | static void __init mmp2_dt_init(void) | ||
44 | { | ||
45 | of_platform_populate(NULL, of_default_bus_match_table, | ||
46 | mmp2_auxdata_lookup, NULL); | ||
47 | } | ||
48 | |||
49 | static const char *mmp2_dt_board_compat[] __initdata = { | ||
50 | "mrvl,mmp2-brownstone", | ||
51 | NULL, | ||
52 | }; | ||
53 | |||
54 | DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)") | ||
55 | .map_io = mmp_map_io, | ||
56 | .init_irq = mmp_dt_irq_init, | ||
57 | .timer = &mmp_dt_timer, | ||
58 | .init_machine = mmp2_dt_init, | ||
59 | .dt_compat = mmp2_dt_board_compat, | ||
60 | MACHINE_END | ||
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 71fc4ee4602c..936447c70977 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -25,6 +25,9 @@ | |||
25 | 25 | ||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/of.h> | ||
29 | #include <linux/of_address.h> | ||
30 | #include <linux/of_irq.h> | ||
28 | 31 | ||
29 | #include <asm/sched_clock.h> | 32 | #include <asm/sched_clock.h> |
30 | #include <mach/addr-map.h> | 33 | #include <mach/addr-map.h> |
@@ -41,6 +44,8 @@ | |||
41 | #define MAX_DELTA (0xfffffffe) | 44 | #define MAX_DELTA (0xfffffffe) |
42 | #define MIN_DELTA (16) | 45 | #define MIN_DELTA (16) |
43 | 46 | ||
47 | static void __iomem *mmp_timer_base = TIMERS_VIRT_BASE; | ||
48 | |||
44 | /* | 49 | /* |
45 | * FIXME: the timer needs some delay to stablize the counter capture | 50 | * FIXME: the timer needs some delay to stablize the counter capture |
46 | */ | 51 | */ |
@@ -48,12 +53,12 @@ static inline uint32_t timer_read(void) | |||
48 | { | 53 | { |
49 | int delay = 100; | 54 | int delay = 100; |
50 | 55 | ||
51 | __raw_writel(1, TIMERS_VIRT_BASE + TMR_CVWR(1)); | 56 | __raw_writel(1, mmp_timer_base + TMR_CVWR(1)); |
52 | 57 | ||
53 | while (delay--) | 58 | while (delay--) |
54 | cpu_relax(); | 59 | cpu_relax(); |
55 | 60 | ||
56 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); | 61 | return __raw_readl(mmp_timer_base + TMR_CVWR(1)); |
57 | } | 62 | } |
58 | 63 | ||
59 | static u32 notrace mmp_read_sched_clock(void) | 64 | static u32 notrace mmp_read_sched_clock(void) |
@@ -68,12 +73,12 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
68 | /* | 73 | /* |
69 | * Clear pending interrupt status. | 74 | * Clear pending interrupt status. |
70 | */ | 75 | */ |
71 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_ICR(0)); | 76 | __raw_writel(0x01, mmp_timer_base + TMR_ICR(0)); |
72 | 77 | ||
73 | /* | 78 | /* |
74 | * Disable timer 0. | 79 | * Disable timer 0. |
75 | */ | 80 | */ |
76 | __raw_writel(0x02, TIMERS_VIRT_BASE + TMR_CER); | 81 | __raw_writel(0x02, mmp_timer_base + TMR_CER); |
77 | 82 | ||
78 | c->event_handler(c); | 83 | c->event_handler(c); |
79 | 84 | ||
@@ -90,23 +95,23 @@ static int timer_set_next_event(unsigned long delta, | |||
90 | /* | 95 | /* |
91 | * Disable timer 0. | 96 | * Disable timer 0. |
92 | */ | 97 | */ |
93 | __raw_writel(0x02, TIMERS_VIRT_BASE + TMR_CER); | 98 | __raw_writel(0x02, mmp_timer_base + TMR_CER); |
94 | 99 | ||
95 | /* | 100 | /* |
96 | * Clear and enable timer match 0 interrupt. | 101 | * Clear and enable timer match 0 interrupt. |
97 | */ | 102 | */ |
98 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_ICR(0)); | 103 | __raw_writel(0x01, mmp_timer_base + TMR_ICR(0)); |
99 | __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_IER(0)); | 104 | __raw_writel(0x01, mmp_timer_base + TMR_IER(0)); |
100 | 105 | ||
101 | /* | 106 | /* |
102 | * Setup new clockevent timer value. | 107 | * Setup new clockevent timer value. |
103 | */ | 108 | */ |
104 | __raw_writel(delta - 1, TIMERS_VIRT_BASE + TMR_TN_MM(0, 0)); | 109 | __raw_writel(delta - 1, mmp_timer_base + TMR_TN_MM(0, 0)); |
105 | 110 | ||
106 | /* | 111 | /* |
107 | * Enable timer 0. | 112 | * Enable timer 0. |
108 | */ | 113 | */ |
109 | __raw_writel(0x03, TIMERS_VIRT_BASE + TMR_CER); | 114 | __raw_writel(0x03, mmp_timer_base + TMR_CER); |
110 | 115 | ||
111 | local_irq_restore(flags); | 116 | local_irq_restore(flags); |
112 | 117 | ||
@@ -124,7 +129,7 @@ static void timer_set_mode(enum clock_event_mode mode, | |||
124 | case CLOCK_EVT_MODE_UNUSED: | 129 | case CLOCK_EVT_MODE_UNUSED: |
125 | case CLOCK_EVT_MODE_SHUTDOWN: | 130 | case CLOCK_EVT_MODE_SHUTDOWN: |
126 | /* disable the matching interrupt */ | 131 | /* disable the matching interrupt */ |
127 | __raw_writel(0x00, TIMERS_VIRT_BASE + TMR_IER(0)); | 132 | __raw_writel(0x00, mmp_timer_base + TMR_IER(0)); |
128 | break; | 133 | break; |
129 | case CLOCK_EVT_MODE_RESUME: | 134 | case CLOCK_EVT_MODE_RESUME: |
130 | case CLOCK_EVT_MODE_PERIODIC: | 135 | case CLOCK_EVT_MODE_PERIODIC: |
@@ -157,27 +162,27 @@ static struct clocksource cksrc = { | |||
157 | 162 | ||
158 | static void __init timer_config(void) | 163 | static void __init timer_config(void) |
159 | { | 164 | { |
160 | uint32_t ccr = __raw_readl(TIMERS_VIRT_BASE + TMR_CCR); | 165 | uint32_t ccr = __raw_readl(mmp_timer_base + TMR_CCR); |
161 | 166 | ||
162 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_CER); /* disable */ | 167 | __raw_writel(0x0, mmp_timer_base + TMR_CER); /* disable */ |
163 | 168 | ||
164 | ccr &= (cpu_is_mmp2()) ? (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : | 169 | ccr &= (cpu_is_mmp2()) ? (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : |
165 | (TMR_CCR_CS_0(3) | TMR_CCR_CS_1(3)); | 170 | (TMR_CCR_CS_0(3) | TMR_CCR_CS_1(3)); |
166 | __raw_writel(ccr, TIMERS_VIRT_BASE + TMR_CCR); | 171 | __raw_writel(ccr, mmp_timer_base + TMR_CCR); |
167 | 172 | ||
168 | /* set timer 0 to periodic mode, and timer 1 to free-running mode */ | 173 | /* set timer 0 to periodic mode, and timer 1 to free-running mode */ |
169 | __raw_writel(0x2, TIMERS_VIRT_BASE + TMR_CMR); | 174 | __raw_writel(0x2, mmp_timer_base + TMR_CMR); |
170 | 175 | ||
171 | __raw_writel(0x1, TIMERS_VIRT_BASE + TMR_PLCR(0)); /* periodic */ | 176 | __raw_writel(0x1, mmp_timer_base + TMR_PLCR(0)); /* periodic */ |
172 | __raw_writel(0x7, TIMERS_VIRT_BASE + TMR_ICR(0)); /* clear status */ | 177 | __raw_writel(0x7, mmp_timer_base + TMR_ICR(0)); /* clear status */ |
173 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(0)); | 178 | __raw_writel(0x0, mmp_timer_base + TMR_IER(0)); |
174 | 179 | ||
175 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_PLCR(1)); /* free-running */ | 180 | __raw_writel(0x0, mmp_timer_base + TMR_PLCR(1)); /* free-running */ |
176 | __raw_writel(0x7, TIMERS_VIRT_BASE + TMR_ICR(1)); /* clear status */ | 181 | __raw_writel(0x7, mmp_timer_base + TMR_ICR(1)); /* clear status */ |
177 | __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(1)); | 182 | __raw_writel(0x0, mmp_timer_base + TMR_IER(1)); |
178 | 183 | ||
179 | /* enable timer 1 counter */ | 184 | /* enable timer 1 counter */ |
180 | __raw_writel(0x2, TIMERS_VIRT_BASE + TMR_CER); | 185 | __raw_writel(0x2, mmp_timer_base + TMR_CER); |
181 | } | 186 | } |
182 | 187 | ||
183 | static struct irqaction timer_irq = { | 188 | static struct irqaction timer_irq = { |
@@ -203,3 +208,37 @@ void __init timer_init(int irq) | |||
203 | clocksource_register_hz(&cksrc, CLOCK_TICK_RATE); | 208 | clocksource_register_hz(&cksrc, CLOCK_TICK_RATE); |
204 | clockevents_register_device(&ckevt); | 209 | clockevents_register_device(&ckevt); |
205 | } | 210 | } |
211 | |||
212 | #ifdef CONFIG_OF | ||
213 | static struct of_device_id mmp_timer_dt_ids[] = { | ||
214 | { .compatible = "mrvl,mmp-timer", }, | ||
215 | {} | ||
216 | }; | ||
217 | |||
218 | void __init mmp_dt_init_timer(void) | ||
219 | { | ||
220 | struct device_node *np; | ||
221 | int irq, ret; | ||
222 | |||
223 | np = of_find_matching_node(NULL, mmp_timer_dt_ids); | ||
224 | if (!np) { | ||
225 | ret = -ENODEV; | ||
226 | goto out; | ||
227 | } | ||
228 | |||
229 | irq = irq_of_parse_and_map(np, 0); | ||
230 | if (!irq) { | ||
231 | ret = -EINVAL; | ||
232 | goto out; | ||
233 | } | ||
234 | mmp_timer_base = of_iomap(np, 0); | ||
235 | if (!mmp_timer_base) { | ||
236 | ret = -ENOMEM; | ||
237 | goto out; | ||
238 | } | ||
239 | timer_init(irq); | ||
240 | return; | ||
241 | out: | ||
242 | pr_err("Failed to get timer from device tree with error:%d\n", ret); | ||
243 | } | ||
244 | #endif | ||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 098d183a0086..7302ba7ff1b9 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/of_irq.h> | 15 | #include <linux/of_irq.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/irqdomain.h> | 17 | #include <linux/irqdomain.h> |
18 | #include <linux/i2c/twl.h> | ||
19 | 18 | ||
20 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
21 | #include <asm/hardware/gic.h> | 20 | #include <asm/hardware/gic.h> |
@@ -95,22 +94,6 @@ MACHINE_END | |||
95 | #endif | 94 | #endif |
96 | 95 | ||
97 | #ifdef CONFIG_ARCH_OMAP3 | 96 | #ifdef CONFIG_ARCH_OMAP3 |
98 | static struct twl4030_platform_data beagle_twldata = { | ||
99 | .irq_base = TWL4030_IRQ_BASE, | ||
100 | .irq_end = TWL4030_IRQ_END, | ||
101 | }; | ||
102 | |||
103 | static void __init omap3_i2c_init(void) | ||
104 | { | ||
105 | omap3_pmic_init("twl4030", &beagle_twldata); | ||
106 | } | ||
107 | |||
108 | static void __init omap3_init(void) | ||
109 | { | ||
110 | omap3_i2c_init(); | ||
111 | omap_generic_init(); | ||
112 | } | ||
113 | |||
114 | static const char *omap3_boards_compat[] __initdata = { | 97 | static const char *omap3_boards_compat[] __initdata = { |
115 | "ti,omap3", | 98 | "ti,omap3", |
116 | NULL, | 99 | NULL, |
@@ -122,7 +105,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") | |||
122 | .init_early = omap3430_init_early, | 105 | .init_early = omap3430_init_early, |
123 | .init_irq = omap_init_irq, | 106 | .init_irq = omap_init_irq, |
124 | .handle_irq = omap3_intc_handle_irq, | 107 | .handle_irq = omap3_intc_handle_irq, |
125 | .init_machine = omap3_init, | 108 | .init_machine = omap_generic_init, |
126 | .timer = &omap3_timer, | 109 | .timer = &omap3_timer, |
127 | .dt_compat = omap3_boards_compat, | 110 | .dt_compat = omap3_boards_compat, |
128 | .restart = omap_prcm_restart, | 111 | .restart = omap_prcm_restart, |
@@ -130,22 +113,6 @@ MACHINE_END | |||
130 | #endif | 113 | #endif |
131 | 114 | ||
132 | #ifdef CONFIG_ARCH_OMAP4 | 115 | #ifdef CONFIG_ARCH_OMAP4 |
133 | static struct twl4030_platform_data sdp4430_twldata = { | ||
134 | .irq_base = TWL6030_IRQ_BASE, | ||
135 | .irq_end = TWL6030_IRQ_END, | ||
136 | }; | ||
137 | |||
138 | static void __init omap4_i2c_init(void) | ||
139 | { | ||
140 | omap4_pmic_init("twl6030", &sdp4430_twldata, NULL, 0); | ||
141 | } | ||
142 | |||
143 | static void __init omap4_init(void) | ||
144 | { | ||
145 | omap4_i2c_init(); | ||
146 | omap_generic_init(); | ||
147 | } | ||
148 | |||
149 | static const char *omap4_boards_compat[] __initdata = { | 116 | static const char *omap4_boards_compat[] __initdata = { |
150 | "ti,omap4", | 117 | "ti,omap4", |
151 | NULL, | 118 | NULL, |
@@ -157,7 +124,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)") | |||
157 | .init_early = omap4430_init_early, | 124 | .init_early = omap4430_init_early, |
158 | .init_irq = omap_init_irq, | 125 | .init_irq = omap_init_irq, |
159 | .handle_irq = gic_handle_irq, | 126 | .handle_irq = gic_handle_irq, |
160 | .init_machine = omap4_init, | 127 | .init_machine = omap_generic_init, |
161 | .timer = &omap4_timer, | 128 | .timer = &omap4_timer, |
162 | .dt_compat = omap4_boards_compat, | 129 | .dt_compat = omap4_boards_compat, |
163 | .restart = omap_prcm_restart, | 130 | .restart = omap_prcm_restart, |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index f3953a499286..84fa55b4c8b9 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -700,11 +700,14 @@ static int __init omap2_init_devices(void) | |||
700 | * in alphabetical order so they're easier to sort through. | 700 | * in alphabetical order so they're easier to sort through. |
701 | */ | 701 | */ |
702 | omap_init_audio(); | 702 | omap_init_audio(); |
703 | omap_init_mcpdm(); | ||
704 | omap_init_dmic(); | ||
705 | omap_init_camera(); | 703 | omap_init_camera(); |
706 | omap_init_mbox(); | 704 | omap_init_mbox(); |
707 | omap_init_mcspi(); | 705 | /* If dtb is there, the devices will be created dynamically */ |
706 | if (!of_have_populated_dt()) { | ||
707 | omap_init_dmic(); | ||
708 | omap_init_mcpdm(); | ||
709 | omap_init_mcspi(); | ||
710 | } | ||
708 | omap_init_pmu(); | 711 | omap_init_pmu(); |
709 | omap_hdq_init(); | 712 | omap_hdq_init(); |
710 | omap_init_sti(); | 713 | omap_init_sti(); |
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 064cab03d2bd..a80e093b039f 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/of.h> | ||
23 | 24 | ||
24 | #include <plat/omap_hwmod.h> | 25 | #include <plat/omap_hwmod.h> |
25 | #include <plat/omap_device.h> | 26 | #include <plat/omap_device.h> |
@@ -146,7 +147,10 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
146 | */ | 147 | */ |
147 | static int __init omap2_gpio_init(void) | 148 | static int __init omap2_gpio_init(void) |
148 | { | 149 | { |
149 | return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, | 150 | /* If dtb is there, the devices will be created dynamically */ |
150 | NULL); | 151 | if (of_have_populated_dt()) |
152 | return -ENODEV; | ||
153 | |||
154 | return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL); | ||
151 | } | 155 | } |
152 | postcore_initcall(omap2_gpio_init); | 156 | postcore_initcall(omap2_gpio_init); |
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c index 8103f9644e2d..550cfc2a1f2e 100644 --- a/arch/arm/mach-pnx4008/i2c.c +++ b/arch/arm/mach-pnx4008/i2c.c | |||
@@ -16,48 +16,62 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <mach/platform.h> | 17 | #include <mach/platform.h> |
18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
19 | #include <mach/i2c.h> | ||
20 | 19 | ||
21 | static struct i2c_pnx_data i2c0_data = { | 20 | static struct resource i2c0_resources[] = { |
22 | .name = I2C_CHIP_NAME "0", | 21 | { |
23 | .base = PNX4008_I2C1_BASE, | 22 | .start = PNX4008_I2C1_BASE, |
24 | .irq = I2C_1_INT, | 23 | .end = PNX4008_I2C1_BASE + SZ_4K - 1, |
24 | .flags = IORESOURCE_MEM, | ||
25 | }, { | ||
26 | .start = I2C_1_INT, | ||
27 | .end = I2C_1_INT, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
25 | }; | 30 | }; |
26 | 31 | ||
27 | static struct i2c_pnx_data i2c1_data = { | 32 | static struct resource i2c1_resources[] = { |
28 | .name = I2C_CHIP_NAME "1", | 33 | { |
29 | .base = PNX4008_I2C2_BASE, | 34 | .start = PNX4008_I2C2_BASE, |
30 | .irq = I2C_2_INT, | 35 | .end = PNX4008_I2C2_BASE + SZ_4K - 1, |
36 | .flags = IORESOURCE_MEM, | ||
37 | }, { | ||
38 | .start = I2C_2_INT, | ||
39 | .end = I2C_2_INT, | ||
40 | .flags = IORESOURCE_IRQ, | ||
41 | }, | ||
31 | }; | 42 | }; |
32 | 43 | ||
33 | static struct i2c_pnx_data i2c2_data = { | 44 | static struct resource i2c2_resources[] = { |
34 | .name = "USB-I2C", | 45 | { |
35 | .base = (PNX4008_USB_CONFIG_BASE + 0x300), | 46 | .start = PNX4008_USB_CONFIG_BASE + 0x300, |
36 | .irq = USB_I2C_INT, | 47 | .end = PNX4008_USB_CONFIG_BASE + 0x300 + SZ_4K - 1, |
48 | .flags = IORESOURCE_MEM, | ||
49 | }, { | ||
50 | .start = USB_I2C_INT, | ||
51 | .end = USB_I2C_INT, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | }, | ||
37 | }; | 54 | }; |
38 | 55 | ||
39 | static struct platform_device i2c0_device = { | 56 | static struct platform_device i2c0_device = { |
40 | .name = "pnx-i2c", | 57 | .name = "pnx-i2c.0", |
41 | .id = 0, | 58 | .id = 0, |
42 | .dev = { | 59 | .resource = i2c0_resources, |
43 | .platform_data = &i2c0_data, | 60 | .num_resources = ARRAY_SIZE(i2c0_resources), |
44 | }, | ||
45 | }; | 61 | }; |
46 | 62 | ||
47 | static struct platform_device i2c1_device = { | 63 | static struct platform_device i2c1_device = { |
48 | .name = "pnx-i2c", | 64 | .name = "pnx-i2c.1", |
49 | .id = 1, | 65 | .id = 1, |
50 | .dev = { | 66 | .resource = i2c1_resources, |
51 | .platform_data = &i2c1_data, | 67 | .num_resources = ARRAY_SIZE(i2c1_resources), |
52 | }, | ||
53 | }; | 68 | }; |
54 | 69 | ||
55 | static struct platform_device i2c2_device = { | 70 | static struct platform_device i2c2_device = { |
56 | .name = "pnx-i2c", | 71 | .name = "pnx-i2c.2", |
57 | .id = 2, | 72 | .id = 2, |
58 | .dev = { | 73 | .resource = i2c2_resources, |
59 | .platform_data = &i2c2_data, | 74 | .num_resources = ARRAY_SIZE(i2c2_resources), |
60 | }, | ||
61 | }; | 75 | }; |
62 | 76 | ||
63 | static struct platform_device *devices[] __initdata = { | 77 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-pnx4008/include/mach/i2c.h b/arch/arm/mach-pnx4008/include/mach/i2c.h deleted file mode 100644 index 259ac53abf40..000000000000 --- a/arch/arm/mach-pnx4008/include/mach/i2c.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * PNX4008-specific tweaks for I2C IP3204 block | ||
3 | * | ||
4 | * Author: Vitaly Wool <vwool@ru.mvista.com> | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_I2C_H__ | ||
13 | #define __ASM_ARCH_I2C_H__ | ||
14 | |||
15 | enum { | ||
16 | mstatus_tdi = 0x00000001, | ||
17 | mstatus_afi = 0x00000002, | ||
18 | mstatus_nai = 0x00000004, | ||
19 | mstatus_drmi = 0x00000008, | ||
20 | mstatus_active = 0x00000020, | ||
21 | mstatus_scl = 0x00000040, | ||
22 | mstatus_sda = 0x00000080, | ||
23 | mstatus_rff = 0x00000100, | ||
24 | mstatus_rfe = 0x00000200, | ||
25 | mstatus_tff = 0x00000400, | ||
26 | mstatus_tfe = 0x00000800, | ||
27 | }; | ||
28 | |||
29 | enum { | ||
30 | mcntrl_tdie = 0x00000001, | ||
31 | mcntrl_afie = 0x00000002, | ||
32 | mcntrl_naie = 0x00000004, | ||
33 | mcntrl_drmie = 0x00000008, | ||
34 | mcntrl_daie = 0x00000020, | ||
35 | mcntrl_rffie = 0x00000040, | ||
36 | mcntrl_tffie = 0x00000080, | ||
37 | mcntrl_reset = 0x00000100, | ||
38 | mcntrl_cdbmode = 0x00000400, | ||
39 | }; | ||
40 | |||
41 | enum { | ||
42 | rw_bit = 1 << 0, | ||
43 | start_bit = 1 << 8, | ||
44 | stop_bit = 1 << 9, | ||
45 | }; | ||
46 | |||
47 | #define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */ | ||
48 | #define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */ | ||
49 | #define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */ | ||
50 | #define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */ | ||
51 | #define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */ | ||
52 | #define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */ | ||
53 | #define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */ | ||
54 | #define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */ | ||
55 | #define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */ | ||
56 | #define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */ | ||
57 | #define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */ | ||
58 | #define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */ | ||
59 | #define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */ | ||
60 | |||
61 | #define HCLK_MHZ 13 | ||
62 | #define I2C_CHIP_NAME "PNX4008-I2C" | ||
63 | |||
64 | #endif /* __ASM_ARCH_I2C_H___ */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index c85e6ecda606..ff5f12fd742f 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | extern void shmobile_earlytimer_init(void); | 4 | extern void shmobile_earlytimer_init(void); |
5 | extern struct sys_timer shmobile_timer; | 5 | extern struct sys_timer shmobile_timer; |
6 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, | ||
7 | unsigned int mult, unsigned int div); | ||
6 | struct twd_local_timer; | 8 | struct twd_local_timer; |
7 | extern void shmobile_setup_console(void); | 9 | extern void shmobile_setup_console(void); |
8 | extern void shmobile_secondary_vector(void); | 10 | extern void shmobile_secondary_vector(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/intc.h b/arch/arm/mach-shmobile/include/mach/intc.h index 8b22258c8caa..a5603c76cfe0 100644 --- a/arch/arm/mach-shmobile/include/mach/intc.h +++ b/arch/arm/mach-shmobile/include/mach/intc.h | |||
@@ -142,6 +142,50 @@ static struct intc_desc p ## _desc __initdata = { \ | |||
142 | p ## _sense_registers, p ## _ack_registers) \ | 142 | p ## _sense_registers, p ## _ack_registers) \ |
143 | } | 143 | } |
144 | 144 | ||
145 | #define INTC_IRQ_PINS_16H(p, base, vect, str) \ | ||
146 | \ | ||
147 | static struct resource p ## _resources[] __initdata = { \ | ||
148 | [0] = { \ | ||
149 | .start = base, \ | ||
150 | .end = base + 0x64, \ | ||
151 | .flags = IORESOURCE_MEM, \ | ||
152 | }, \ | ||
153 | }; \ | ||
154 | \ | ||
155 | enum { \ | ||
156 | p ## _UNUSED = 0, \ | ||
157 | INTC_IRQ_PINS_ENUM_16H(p), \ | ||
158 | }; \ | ||
159 | \ | ||
160 | static struct intc_vect p ## _vectors[] __initdata = { \ | ||
161 | INTC_IRQ_PINS_VECT_16H(p, vect), \ | ||
162 | }; \ | ||
163 | \ | ||
164 | static struct intc_mask_reg p ## _mask_registers[] __initdata = { \ | ||
165 | INTC_IRQ_PINS_MASK_16H(p, base), \ | ||
166 | }; \ | ||
167 | \ | ||
168 | static struct intc_prio_reg p ## _prio_registers[] __initdata = { \ | ||
169 | INTC_IRQ_PINS_PRIO_16H(p, base), \ | ||
170 | }; \ | ||
171 | \ | ||
172 | static struct intc_sense_reg p ## _sense_registers[] __initdata = { \ | ||
173 | INTC_IRQ_PINS_SENSE_16H(p, base), \ | ||
174 | }; \ | ||
175 | \ | ||
176 | static struct intc_mask_reg p ## _ack_registers[] __initdata = { \ | ||
177 | INTC_IRQ_PINS_ACK_16H(p, base), \ | ||
178 | }; \ | ||
179 | \ | ||
180 | static struct intc_desc p ## _desc __initdata = { \ | ||
181 | .name = str, \ | ||
182 | .resource = p ## _resources, \ | ||
183 | .num_resources = ARRAY_SIZE(p ## _resources), \ | ||
184 | .hw = INTC_HW_DESC(p ## _vectors, NULL, \ | ||
185 | p ## _mask_registers, p ## _prio_registers, \ | ||
186 | p ## _sense_registers, p ## _ack_registers) \ | ||
187 | } | ||
188 | |||
145 | #define INTC_IRQ_PINS_32(p, base, vect, str) \ | 189 | #define INTC_IRQ_PINS_32(p, base, vect, str) \ |
146 | \ | 190 | \ |
147 | static struct resource p ## _resources[] __initdata = { \ | 191 | static struct resource p ## _resources[] __initdata = { \ |
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h index 4e686cc201fc..06a5da3c3050 100644 --- a/arch/arm/mach-shmobile/include/mach/irqs.h +++ b/arch/arm/mach-shmobile/include/mach/irqs.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #define gic_spi(nr) ((nr) + 32) | 7 | #define gic_spi(nr) ((nr) + 32) |
8 | 8 | ||
9 | /* INTCS */ | 9 | /* INTCS */ |
10 | #define INTCS_VECT_BASE 0x2200 | 10 | #define INTCS_VECT_BASE 0x3400 |
11 | #define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) | 11 | #define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) |
12 | #define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt)) | 12 | #define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt)) |
13 | 13 | ||
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 6447e0af52d4..2587a22842f2 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/module.h> | ||
22 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <linux/sh_intc.h> | 25 | #include <linux/sh_intc.h> |
@@ -305,14 +306,16 @@ static DECLARE_INTC_DESC(intca_desc, "sh7372-intca", | |||
305 | intca_mask_registers, intca_prio_registers, | 306 | intca_mask_registers, intca_prio_registers, |
306 | NULL); | 307 | NULL); |
307 | 308 | ||
308 | INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000, | 309 | INTC_IRQ_PINS_16(intca_irq_pins_lo, 0xe6900000, |
309 | INTC_VECT, "sh7372-intca-irq-pins"); | 310 | INTC_VECT, "sh7372-intca-irq-lo"); |
311 | |||
312 | INTC_IRQ_PINS_16H(intca_irq_pins_hi, 0xe6900000, | ||
313 | INTC_VECT, "sh7372-intca-irq-hi"); | ||
314 | |||
310 | enum { | 315 | enum { |
311 | UNUSED_INTCS = 0, | 316 | UNUSED_INTCS = 0, |
312 | ENABLED_INTCS, | 317 | ENABLED_INTCS, |
313 | 318 | ||
314 | INTCS, | ||
315 | |||
316 | /* interrupt sources INTCS */ | 319 | /* interrupt sources INTCS */ |
317 | 320 | ||
318 | /* IRQ0S - IRQ31S */ | 321 | /* IRQ0S - IRQ31S */ |
@@ -426,8 +429,6 @@ static struct intc_vect intcs_vectors[] = { | |||
426 | INTCS_VECT(CPORTS2R, 0x1a20), | 429 | INTCS_VECT(CPORTS2R, 0x1a20), |
427 | /* CEC */ | 430 | /* CEC */ |
428 | INTCS_VECT(JPU6E, 0x1a80), | 431 | INTCS_VECT(JPU6E, 0x1a80), |
429 | |||
430 | INTC_VECT(INTCS, 0xf80), | ||
431 | }; | 432 | }; |
432 | 433 | ||
433 | static struct intc_group intcs_groups[] __initdata = { | 434 | static struct intc_group intcs_groups[] __initdata = { |
@@ -490,9 +491,6 @@ static struct intc_mask_reg intcs_mask_registers[] = { | |||
490 | { 0xffd5019c, 0xffd501dc, 8, /* IMR7SA3 / IMCR7SA3 */ | 491 | { 0xffd5019c, 0xffd501dc, 8, /* IMR7SA3 / IMCR7SA3 */ |
491 | { MFIS2_INTCS, CPORTS2R, 0, 0, | 492 | { MFIS2_INTCS, CPORTS2R, 0, 0, |
492 | JPU6E, 0, 0, 0 } }, | 493 | JPU6E, 0, 0, 0 } }, |
493 | { 0xffd20104, 0, 16, /* INTAMASK */ | ||
494 | { 0, 0, 0, 0, 0, 0, 0, 0, | ||
495 | 0, 0, 0, 0, 0, 0, 0, INTCS } }, | ||
496 | }; | 494 | }; |
497 | 495 | ||
498 | /* Priority is needed for INTCA to receive the INTCS interrupt */ | 496 | /* Priority is needed for INTCA to receive the INTCS interrupt */ |
@@ -557,18 +555,30 @@ static void __iomem *intcs_ffd5; | |||
557 | void __init sh7372_init_irq(void) | 555 | void __init sh7372_init_irq(void) |
558 | { | 556 | { |
559 | void __iomem *intevtsa; | 557 | void __iomem *intevtsa; |
558 | int n; | ||
560 | 559 | ||
561 | intcs_ffd2 = ioremap_nocache(0xffd20000, PAGE_SIZE); | 560 | intcs_ffd2 = ioremap_nocache(0xffd20000, PAGE_SIZE); |
562 | intevtsa = intcs_ffd2 + 0x100; | 561 | intevtsa = intcs_ffd2 + 0x100; |
563 | intcs_ffd5 = ioremap_nocache(0xffd50000, PAGE_SIZE); | 562 | intcs_ffd5 = ioremap_nocache(0xffd50000, PAGE_SIZE); |
564 | 563 | ||
565 | register_intc_controller(&intca_desc); | 564 | register_intc_controller(&intca_desc); |
566 | register_intc_controller(&intca_irq_pins_desc); | 565 | register_intc_controller(&intca_irq_pins_lo_desc); |
566 | register_intc_controller(&intca_irq_pins_hi_desc); | ||
567 | register_intc_controller(&intcs_desc); | 567 | register_intc_controller(&intcs_desc); |
568 | 568 | ||
569 | /* setup dummy cascade chip for INTCS */ | ||
570 | n = evt2irq(0xf80); | ||
571 | irq_alloc_desc_at(n, numa_node_id()); | ||
572 | irq_set_chip_and_handler_name(n, &dummy_irq_chip, | ||
573 | handle_level_irq, "level"); | ||
574 | set_irq_flags(n, IRQF_VALID); /* yuck */ | ||
575 | |||
569 | /* demux using INTEVTSA */ | 576 | /* demux using INTEVTSA */ |
570 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); | 577 | irq_set_handler_data(n, (void *)intevtsa); |
571 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); | 578 | irq_set_chained_handler(n, intcs_demux); |
579 | |||
580 | /* unmask INTCS in INTAMASK */ | ||
581 | iowrite16(0, intcs_ffd2 + 0x104); | ||
572 | } | 582 | } |
573 | 583 | ||
574 | static unsigned short ffd2[0x200]; | 584 | static unsigned short ffd2[0x200]; |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 2fe8f83ca124..4c7fece5ef92 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/of_platform.h> | ||
25 | #include <linux/uio_driver.h> | 26 | #include <linux/uio_driver.h> |
26 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
27 | #include <linux/input.h> | 28 | #include <linux/input.h> |
@@ -1092,3 +1093,50 @@ void __init sh7372_add_early_devices(void) | |||
1092 | /* override timer setup with soc-specific code */ | 1093 | /* override timer setup with soc-specific code */ |
1093 | shmobile_timer.init = sh7372_earlytimer_init; | 1094 | shmobile_timer.init = sh7372_earlytimer_init; |
1094 | } | 1095 | } |
1096 | |||
1097 | #ifdef CONFIG_USE_OF | ||
1098 | |||
1099 | void __init sh7372_add_early_devices_dt(void) | ||
1100 | { | ||
1101 | shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */ | ||
1102 | |||
1103 | early_platform_add_devices(sh7372_early_devices, | ||
1104 | ARRAY_SIZE(sh7372_early_devices)); | ||
1105 | |||
1106 | /* setup early console here as well */ | ||
1107 | shmobile_setup_console(); | ||
1108 | } | ||
1109 | |||
1110 | static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = { | ||
1111 | { } | ||
1112 | }; | ||
1113 | |||
1114 | void __init sh7372_add_standard_devices_dt(void) | ||
1115 | { | ||
1116 | /* clocks are setup late during boot in the case of DT */ | ||
1117 | sh7372_clock_init(); | ||
1118 | |||
1119 | platform_add_devices(sh7372_early_devices, | ||
1120 | ARRAY_SIZE(sh7372_early_devices)); | ||
1121 | |||
1122 | of_platform_populate(NULL, of_default_bus_match_table, | ||
1123 | sh7372_auxdata_lookup, NULL); | ||
1124 | } | ||
1125 | |||
1126 | static const char *sh7372_boards_compat_dt[] __initdata = { | ||
1127 | "renesas,sh7372", | ||
1128 | NULL, | ||
1129 | }; | ||
1130 | |||
1131 | DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)") | ||
1132 | .map_io = sh7372_map_io, | ||
1133 | .init_early = sh7372_add_early_devices_dt, | ||
1134 | .nr_irqs = NR_IRQS_LEGACY, | ||
1135 | .init_irq = sh7372_init_irq, | ||
1136 | .handle_irq = shmobile_handle_irq_intc, | ||
1137 | .init_machine = sh7372_add_standard_devices_dt, | ||
1138 | .timer = &shmobile_timer, | ||
1139 | .dt_compat = sh7372_boards_compat_dt, | ||
1140 | MACHINE_END | ||
1141 | |||
1142 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 8b79e7917a23..cba39d866687 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -19,9 +19,26 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/delay.h> | ||
22 | #include <asm/mach/time.h> | 23 | #include <asm/mach/time.h> |
23 | #include <asm/smp_twd.h> | 24 | #include <asm/smp_twd.h> |
24 | 25 | ||
26 | void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz, | ||
27 | unsigned int mult, unsigned int div) | ||
28 | { | ||
29 | /* calculate a worst-case loops-per-jiffy value | ||
30 | * based on maximum cpu core mhz setting and the | ||
31 | * __delay() implementation in arch/arm/lib/delay.S | ||
32 | * | ||
33 | * this will result in a longer delay than expected | ||
34 | * when the cpu core runs on lower frequencies. | ||
35 | */ | ||
36 | |||
37 | unsigned int value = (1000000 * mult) / (HZ * div); | ||
38 | |||
39 | lpj_fine = max_cpu_core_mhz * value; | ||
40 | } | ||
41 | |||
25 | static void __init shmobile_late_time_init(void) | 42 | static void __init shmobile_late_time_init(void) |
26 | { | 43 | { |
27 | /* | 44 | /* |
diff --git a/arch/arm/mach-spear3xx/Kconfig b/arch/arm/mach-spear3xx/Kconfig index 2cee6b0de371..d9fe11cb6f16 100644 --- a/arch/arm/mach-spear3xx/Kconfig +++ b/arch/arm/mach-spear3xx/Kconfig | |||
@@ -5,39 +5,19 @@ | |||
5 | if ARCH_SPEAR3XX | 5 | if ARCH_SPEAR3XX |
6 | 6 | ||
7 | menu "SPEAr3xx Implementations" | 7 | menu "SPEAr3xx Implementations" |
8 | config BOARD_SPEAR300_EVB | ||
9 | bool "SPEAr300 Evaluation Board" | ||
10 | select MACH_SPEAR300 | ||
11 | help | ||
12 | Supports ST SPEAr300 Evaluation Board | ||
13 | |||
14 | config BOARD_SPEAR310_EVB | ||
15 | bool "SPEAr310 Evaluation Board" | ||
16 | select MACH_SPEAR310 | ||
17 | help | ||
18 | Supports ST SPEAr310 Evaluation Board | ||
19 | |||
20 | config BOARD_SPEAR320_EVB | ||
21 | bool "SPEAr320 Evaluation Board" | ||
22 | select MACH_SPEAR320 | ||
23 | help | ||
24 | Supports ST SPEAr320 Evaluation Board | ||
25 | |||
26 | endmenu | ||
27 | |||
28 | config MACH_SPEAR300 | 8 | config MACH_SPEAR300 |
29 | bool "SPEAr300" | 9 | bool "SPEAr300 Machine support with Device Tree" |
30 | help | 10 | help |
31 | Supports ST SPEAr300 Machine | 11 | Supports ST SPEAr300 machine configured via the device-tree |
32 | 12 | ||
33 | config MACH_SPEAR310 | 13 | config MACH_SPEAR310 |
34 | bool "SPEAr310" | 14 | bool "SPEAr310 Machine support with Device Tree" |
35 | help | 15 | help |
36 | Supports ST SPEAr310 Machine | 16 | Supports ST SPEAr310 machine configured via the device-tree |
37 | 17 | ||
38 | config MACH_SPEAR320 | 18 | config MACH_SPEAR320 |
39 | bool "SPEAr320" | 19 | bool "SPEAr320 Machine support with Device Tree" |
40 | help | 20 | help |
41 | Supports ST SPEAr320 Machine | 21 | Supports ST SPEAr320 machine configured via the device-tree |
42 | 22 | endmenu | |
43 | endif #ARCH_SPEAR3XX | 23 | endif #ARCH_SPEAR3XX |
diff --git a/arch/arm/mach-spear3xx/Makefile b/arch/arm/mach-spear3xx/Makefile index b24862489704..17b5d83cf2d5 100644 --- a/arch/arm/mach-spear3xx/Makefile +++ b/arch/arm/mach-spear3xx/Makefile | |||
@@ -3,24 +3,13 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # common files | 5 | # common files |
6 | obj-y += spear3xx.o clock.o | 6 | obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o clock.o |
7 | 7 | ||
8 | # spear300 specific files | 8 | # spear300 specific files |
9 | obj-$(CONFIG_MACH_SPEAR300) += spear300.o | 9 | obj-$(CONFIG_MACH_SPEAR300) += spear300.o |
10 | 10 | ||
11 | # spear300 boards files | ||
12 | obj-$(CONFIG_BOARD_SPEAR300_EVB) += spear300_evb.o | ||
13 | |||
14 | |||
15 | # spear310 specific files | 11 | # spear310 specific files |
16 | obj-$(CONFIG_MACH_SPEAR310) += spear310.o | 12 | obj-$(CONFIG_MACH_SPEAR310) += spear310.o |
17 | 13 | ||
18 | # spear310 boards files | ||
19 | obj-$(CONFIG_BOARD_SPEAR310_EVB) += spear310_evb.o | ||
20 | |||
21 | |||
22 | # spear320 specific files | 14 | # spear320 specific files |
23 | obj-$(CONFIG_MACH_SPEAR320) += spear320.o | 15 | obj-$(CONFIG_MACH_SPEAR320) += spear320.o |
24 | |||
25 | # spear320 boards files | ||
26 | obj-$(CONFIG_BOARD_SPEAR320_EVB) += spear320_evb.o | ||
diff --git a/arch/arm/mach-spear3xx/Makefile.boot b/arch/arm/mach-spear3xx/Makefile.boot index 4674a4c221db..d93e2177e6ec 100644 --- a/arch/arm/mach-spear3xx/Makefile.boot +++ b/arch/arm/mach-spear3xx/Makefile.boot | |||
@@ -1,3 +1,7 @@ | |||
1 | zreladdr-y += 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | |||
5 | dtb-$(CONFIG_MACH_SPEAR300) += spear300-evb.dtb | ||
6 | dtb-$(CONFIG_MACH_SPEAR310) += spear310-evb.dtb | ||
7 | dtb-$(CONFIG_MACH_SPEAR320) += spear320-evb.dtb | ||
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c index 6c4841f55223..cd6c11099083 100644 --- a/arch/arm/mach-spear3xx/clock.c +++ b/arch/arm/mach-spear3xx/clock.c | |||
@@ -11,12 +11,112 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/clkdev.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/of_platform.h> | ||
17 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
18 | #include <plat/clock.h> | 20 | #include <plat/clock.h> |
19 | #include <mach/misc_regs.h> | 21 | #include <mach/misc_regs.h> |
22 | #include <mach/spear.h> | ||
23 | |||
24 | #define PLL1_CTR (MISC_BASE + 0x008) | ||
25 | #define PLL1_FRQ (MISC_BASE + 0x00C) | ||
26 | #define PLL1_MOD (MISC_BASE + 0x010) | ||
27 | #define PLL2_CTR (MISC_BASE + 0x014) | ||
28 | /* PLL_CTR register masks */ | ||
29 | #define PLL_ENABLE 2 | ||
30 | #define PLL_MODE_SHIFT 4 | ||
31 | #define PLL_MODE_MASK 0x3 | ||
32 | #define PLL_MODE_NORMAL 0 | ||
33 | #define PLL_MODE_FRACTION 1 | ||
34 | #define PLL_MODE_DITH_DSB 2 | ||
35 | #define PLL_MODE_DITH_SSB 3 | ||
36 | |||
37 | #define PLL2_FRQ (MISC_BASE + 0x018) | ||
38 | /* PLL FRQ register masks */ | ||
39 | #define PLL_DIV_N_SHIFT 0 | ||
40 | #define PLL_DIV_N_MASK 0xFF | ||
41 | #define PLL_DIV_P_SHIFT 8 | ||
42 | #define PLL_DIV_P_MASK 0x7 | ||
43 | #define PLL_NORM_FDBK_M_SHIFT 24 | ||
44 | #define PLL_NORM_FDBK_M_MASK 0xFF | ||
45 | #define PLL_DITH_FDBK_M_SHIFT 16 | ||
46 | #define PLL_DITH_FDBK_M_MASK 0xFFFF | ||
47 | |||
48 | #define PLL2_MOD (MISC_BASE + 0x01C) | ||
49 | #define PLL_CLK_CFG (MISC_BASE + 0x020) | ||
50 | #define CORE_CLK_CFG (MISC_BASE + 0x024) | ||
51 | /* CORE CLK CFG register masks */ | ||
52 | #define PLL_HCLK_RATIO_SHIFT 10 | ||
53 | #define PLL_HCLK_RATIO_MASK 0x3 | ||
54 | #define HCLK_PCLK_RATIO_SHIFT 8 | ||
55 | #define HCLK_PCLK_RATIO_MASK 0x3 | ||
56 | |||
57 | #define PERIP_CLK_CFG (MISC_BASE + 0x028) | ||
58 | /* PERIP_CLK_CFG register masks */ | ||
59 | #define UART_CLK_SHIFT 4 | ||
60 | #define UART_CLK_MASK 0x1 | ||
61 | #define FIRDA_CLK_SHIFT 5 | ||
62 | #define FIRDA_CLK_MASK 0x3 | ||
63 | #define GPT0_CLK_SHIFT 8 | ||
64 | #define GPT1_CLK_SHIFT 11 | ||
65 | #define GPT2_CLK_SHIFT 12 | ||
66 | #define GPT_CLK_MASK 0x1 | ||
67 | #define AUX_CLK_PLL3_VAL 0 | ||
68 | #define AUX_CLK_PLL1_VAL 1 | ||
69 | |||
70 | #define PERIP1_CLK_ENB (MISC_BASE + 0x02C) | ||
71 | /* PERIP1_CLK_ENB register masks */ | ||
72 | #define UART_CLK_ENB 3 | ||
73 | #define SSP_CLK_ENB 5 | ||
74 | #define I2C_CLK_ENB 7 | ||
75 | #define JPEG_CLK_ENB 8 | ||
76 | #define FIRDA_CLK_ENB 10 | ||
77 | #define GPT1_CLK_ENB 11 | ||
78 | #define GPT2_CLK_ENB 12 | ||
79 | #define ADC_CLK_ENB 15 | ||
80 | #define RTC_CLK_ENB 17 | ||
81 | #define GPIO_CLK_ENB 18 | ||
82 | #define DMA_CLK_ENB 19 | ||
83 | #define SMI_CLK_ENB 21 | ||
84 | #define GMAC_CLK_ENB 23 | ||
85 | #define USBD_CLK_ENB 24 | ||
86 | #define USBH_CLK_ENB 25 | ||
87 | #define C3_CLK_ENB 31 | ||
88 | |||
89 | #define RAS_CLK_ENB (MISC_BASE + 0x034) | ||
90 | |||
91 | #define PRSC1_CLK_CFG (MISC_BASE + 0x044) | ||
92 | #define PRSC2_CLK_CFG (MISC_BASE + 0x048) | ||
93 | #define PRSC3_CLK_CFG (MISC_BASE + 0x04C) | ||
94 | /* gpt synthesizer register masks */ | ||
95 | #define GPT_MSCALE_SHIFT 0 | ||
96 | #define GPT_MSCALE_MASK 0xFFF | ||
97 | #define GPT_NSCALE_SHIFT 12 | ||
98 | #define GPT_NSCALE_MASK 0xF | ||
99 | |||
100 | #define AMEM_CLK_CFG (MISC_BASE + 0x050) | ||
101 | #define EXPI_CLK_CFG (MISC_BASE + 0x054) | ||
102 | #define CLCD_CLK_SYNT (MISC_BASE + 0x05C) | ||
103 | #define FIRDA_CLK_SYNT (MISC_BASE + 0x060) | ||
104 | #define UART_CLK_SYNT (MISC_BASE + 0x064) | ||
105 | #define GMAC_CLK_SYNT (MISC_BASE + 0x068) | ||
106 | #define RAS1_CLK_SYNT (MISC_BASE + 0x06C) | ||
107 | #define RAS2_CLK_SYNT (MISC_BASE + 0x070) | ||
108 | #define RAS3_CLK_SYNT (MISC_BASE + 0x074) | ||
109 | #define RAS4_CLK_SYNT (MISC_BASE + 0x078) | ||
110 | /* aux clk synthesiser register masks for irda to ras4 */ | ||
111 | #define AUX_SYNT_ENB 31 | ||
112 | #define AUX_EQ_SEL_SHIFT 30 | ||
113 | #define AUX_EQ_SEL_MASK 1 | ||
114 | #define AUX_EQ1_SEL 0 | ||
115 | #define AUX_EQ2_SEL 1 | ||
116 | #define AUX_XSCALE_SHIFT 16 | ||
117 | #define AUX_XSCALE_MASK 0xFFF | ||
118 | #define AUX_YSCALE_SHIFT 0 | ||
119 | #define AUX_YSCALE_MASK 0xFFF | ||
20 | 120 | ||
21 | /* root clks */ | 121 | /* root clks */ |
22 | /* 32 KHz oscillator clock */ | 122 | /* 32 KHz oscillator clock */ |
@@ -411,6 +511,21 @@ static struct clk usbd_clk = { | |||
411 | .recalc = &follow_parent, | 511 | .recalc = &follow_parent, |
412 | }; | 512 | }; |
413 | 513 | ||
514 | /* clock derived from usbh clk */ | ||
515 | /* usbh0 clock */ | ||
516 | static struct clk usbh0_clk = { | ||
517 | .flags = ALWAYS_ENABLED, | ||
518 | .pclk = &usbh_clk, | ||
519 | .recalc = &follow_parent, | ||
520 | }; | ||
521 | |||
522 | /* usbh1 clock */ | ||
523 | static struct clk usbh1_clk = { | ||
524 | .flags = ALWAYS_ENABLED, | ||
525 | .pclk = &usbh_clk, | ||
526 | .recalc = &follow_parent, | ||
527 | }; | ||
528 | |||
414 | /* clock derived from ahb clk */ | 529 | /* clock derived from ahb clk */ |
415 | /* apb masks structure */ | 530 | /* apb masks structure */ |
416 | static struct bus_clk_masks apb_masks = { | 531 | static struct bus_clk_masks apb_masks = { |
@@ -652,109 +767,126 @@ static struct clk pwm_clk = { | |||
652 | 767 | ||
653 | /* array of all spear 3xx clock lookups */ | 768 | /* array of all spear 3xx clock lookups */ |
654 | static struct clk_lookup spear_clk_lookups[] = { | 769 | static struct clk_lookup spear_clk_lookups[] = { |
655 | { .con_id = "apb_pclk", .clk = &dummy_apb_pclk}, | 770 | CLKDEV_INIT(NULL, "apb_pclk", &dummy_apb_pclk), |
656 | /* root clks */ | 771 | /* root clks */ |
657 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | 772 | CLKDEV_INIT(NULL, "osc_32k_clk", &osc_32k_clk), |
658 | { .con_id = "osc_24m_clk", .clk = &osc_24m_clk}, | 773 | CLKDEV_INIT(NULL, "osc_24m_clk", &osc_24m_clk), |
659 | /* clock derived from 32 KHz osc clk */ | 774 | /* clock derived from 32 KHz osc clk */ |
660 | { .dev_id = "rtc-spear", .clk = &rtc_clk}, | 775 | CLKDEV_INIT("fc900000.rtc", NULL, &rtc_clk), |
661 | /* clock derived from 24 MHz osc clk */ | 776 | /* clock derived from 24 MHz osc clk */ |
662 | { .con_id = "pll1_clk", .clk = &pll1_clk}, | 777 | CLKDEV_INIT(NULL, "pll1_clk", &pll1_clk), |
663 | { .con_id = "pll3_48m_clk", .clk = &pll3_48m_clk}, | 778 | CLKDEV_INIT(NULL, "pll3_48m_clk", &pll3_48m_clk), |
664 | { .dev_id = "wdt", .clk = &wdt_clk}, | 779 | CLKDEV_INIT("fc880000.wdt", NULL, &wdt_clk), |
665 | /* clock derived from pll1 clk */ | 780 | /* clock derived from pll1 clk */ |
666 | { .con_id = "cpu_clk", .clk = &cpu_clk}, | 781 | CLKDEV_INIT(NULL, "cpu_clk", &cpu_clk), |
667 | { .con_id = "ahb_clk", .clk = &ahb_clk}, | 782 | CLKDEV_INIT(NULL, "ahb_clk", &ahb_clk), |
668 | { .con_id = "uart_synth_clk", .clk = &uart_synth_clk}, | 783 | CLKDEV_INIT(NULL, "uart_synth_clk", &uart_synth_clk), |
669 | { .con_id = "firda_synth_clk", .clk = &firda_synth_clk}, | 784 | CLKDEV_INIT(NULL, "firda_synth_clk", &firda_synth_clk), |
670 | { .con_id = "gpt0_synth_clk", .clk = &gpt0_synth_clk}, | 785 | CLKDEV_INIT(NULL, "gpt0_synth_clk", &gpt0_synth_clk), |
671 | { .con_id = "gpt1_synth_clk", .clk = &gpt1_synth_clk}, | 786 | CLKDEV_INIT(NULL, "gpt1_synth_clk", &gpt1_synth_clk), |
672 | { .con_id = "gpt2_synth_clk", .clk = &gpt2_synth_clk}, | 787 | CLKDEV_INIT(NULL, "gpt2_synth_clk", &gpt2_synth_clk), |
673 | { .dev_id = "uart", .clk = &uart_clk}, | 788 | CLKDEV_INIT("d0000000.serial", NULL, &uart_clk), |
674 | { .dev_id = "firda", .clk = &firda_clk}, | 789 | CLKDEV_INIT("firda", NULL, &firda_clk), |
675 | { .dev_id = "gpt0", .clk = &gpt0_clk}, | 790 | CLKDEV_INIT("gpt0", NULL, &gpt0_clk), |
676 | { .dev_id = "gpt1", .clk = &gpt1_clk}, | 791 | CLKDEV_INIT("gpt1", NULL, &gpt1_clk), |
677 | { .dev_id = "gpt2", .clk = &gpt2_clk}, | 792 | CLKDEV_INIT("gpt2", NULL, &gpt2_clk), |
678 | /* clock derived from pll3 clk */ | 793 | /* clock derived from pll3 clk */ |
679 | { .dev_id = "designware_udc", .clk = &usbd_clk}, | 794 | CLKDEV_INIT("designware_udc", NULL, &usbd_clk), |
680 | { .con_id = "usbh_clk", .clk = &usbh_clk}, | 795 | CLKDEV_INIT(NULL, "usbh_clk", &usbh_clk), |
796 | /* clock derived from usbh clk */ | ||
797 | CLKDEV_INIT(NULL, "usbh.0_clk", &usbh0_clk), | ||
798 | CLKDEV_INIT(NULL, "usbh.1_clk", &usbh1_clk), | ||
681 | /* clock derived from ahb clk */ | 799 | /* clock derived from ahb clk */ |
682 | { .con_id = "apb_clk", .clk = &apb_clk}, | 800 | CLKDEV_INIT(NULL, "apb_clk", &apb_clk), |
683 | { .dev_id = "i2c_designware.0", .clk = &i2c_clk}, | 801 | CLKDEV_INIT("d0180000.i2c", NULL, &i2c_clk), |
684 | { .dev_id = "dma", .clk = &dma_clk}, | 802 | CLKDEV_INIT("fc400000.dma", NULL, &dma_clk), |
685 | { .dev_id = "jpeg", .clk = &jpeg_clk}, | 803 | CLKDEV_INIT("jpeg", NULL, &jpeg_clk), |
686 | { .dev_id = "gmac", .clk = &gmac_clk}, | 804 | CLKDEV_INIT("e0800000.eth", NULL, &gmac_clk), |
687 | { .dev_id = "smi", .clk = &smi_clk}, | 805 | CLKDEV_INIT("fc000000.flash", NULL, &smi_clk), |
688 | { .dev_id = "c3", .clk = &c3_clk}, | 806 | CLKDEV_INIT("c3", NULL, &c3_clk), |
689 | /* clock derived from apb clk */ | 807 | /* clock derived from apb clk */ |
690 | { .dev_id = "adc", .clk = &adc_clk}, | 808 | CLKDEV_INIT("adc", NULL, &adc_clk), |
691 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, | 809 | CLKDEV_INIT("d0100000.spi", NULL, &ssp0_clk), |
692 | { .dev_id = "gpio", .clk = &gpio_clk}, | 810 | CLKDEV_INIT("fc980000.gpio", NULL, &gpio_clk), |
693 | }; | 811 | }; |
694 | 812 | ||
695 | /* array of all spear 300 clock lookups */ | 813 | /* array of all spear 300 clock lookups */ |
696 | #ifdef CONFIG_MACH_SPEAR300 | 814 | #ifdef CONFIG_MACH_SPEAR300 |
697 | static struct clk_lookup spear300_clk_lookups[] = { | 815 | static struct clk_lookup spear300_clk_lookups[] = { |
698 | { .dev_id = "clcd", .clk = &clcd_clk}, | 816 | CLKDEV_INIT("60000000.clcd", NULL, &clcd_clk), |
699 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 817 | CLKDEV_INIT("94000000.flash", NULL, &fsmc_clk), |
700 | { .dev_id = "gpio1", .clk = &gpio1_clk}, | 818 | CLKDEV_INIT("a9000000.gpio", NULL, &gpio1_clk), |
701 | { .dev_id = "keyboard", .clk = &kbd_clk}, | 819 | CLKDEV_INIT("a0000000.kbd", NULL, &kbd_clk), |
702 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | 820 | CLKDEV_INIT("70000000.sdhci", NULL, &sdhci_clk), |
703 | }; | 821 | }; |
822 | |||
823 | void __init spear300_clk_init(void) | ||
824 | { | ||
825 | int i; | ||
826 | |||
827 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | ||
828 | clk_register(&spear_clk_lookups[i]); | ||
829 | |||
830 | for (i = 0; i < ARRAY_SIZE(spear300_clk_lookups); i++) | ||
831 | clk_register(&spear300_clk_lookups[i]); | ||
832 | |||
833 | clk_init(); | ||
834 | } | ||
704 | #endif | 835 | #endif |
705 | 836 | ||
706 | /* array of all spear 310 clock lookups */ | 837 | /* array of all spear 310 clock lookups */ |
707 | #ifdef CONFIG_MACH_SPEAR310 | 838 | #ifdef CONFIG_MACH_SPEAR310 |
708 | static struct clk_lookup spear310_clk_lookups[] = { | 839 | static struct clk_lookup spear310_clk_lookups[] = { |
709 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 840 | CLKDEV_INIT("44000000.flash", NULL, &fsmc_clk), |
710 | { .con_id = "emi", .clk = &emi_clk}, | 841 | CLKDEV_INIT(NULL, "emi", &emi_clk), |
711 | { .dev_id = "uart1", .clk = &uart1_clk}, | 842 | CLKDEV_INIT("b2000000.serial", NULL, &uart1_clk), |
712 | { .dev_id = "uart2", .clk = &uart2_clk}, | 843 | CLKDEV_INIT("b2080000.serial", NULL, &uart2_clk), |
713 | { .dev_id = "uart3", .clk = &uart3_clk}, | 844 | CLKDEV_INIT("b2100000.serial", NULL, &uart3_clk), |
714 | { .dev_id = "uart4", .clk = &uart4_clk}, | 845 | CLKDEV_INIT("b2180000.serial", NULL, &uart4_clk), |
715 | { .dev_id = "uart5", .clk = &uart5_clk}, | 846 | CLKDEV_INIT("b2200000.serial", NULL, &uart5_clk), |
716 | }; | 847 | }; |
848 | |||
849 | void __init spear310_clk_init(void) | ||
850 | { | ||
851 | int i; | ||
852 | |||
853 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | ||
854 | clk_register(&spear_clk_lookups[i]); | ||
855 | |||
856 | for (i = 0; i < ARRAY_SIZE(spear310_clk_lookups); i++) | ||
857 | clk_register(&spear310_clk_lookups[i]); | ||
858 | |||
859 | clk_init(); | ||
860 | } | ||
717 | #endif | 861 | #endif |
718 | 862 | ||
719 | /* array of all spear 320 clock lookups */ | 863 | /* array of all spear 320 clock lookups */ |
720 | #ifdef CONFIG_MACH_SPEAR320 | 864 | #ifdef CONFIG_MACH_SPEAR320 |
721 | static struct clk_lookup spear320_clk_lookups[] = { | 865 | static struct clk_lookup spear320_clk_lookups[] = { |
722 | { .dev_id = "clcd", .clk = &clcd_clk}, | 866 | CLKDEV_INIT("90000000.clcd", NULL, &clcd_clk), |
723 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 867 | CLKDEV_INIT("4c000000.flash", NULL, &fsmc_clk), |
724 | { .dev_id = "i2c_designware.1", .clk = &i2c1_clk}, | 868 | CLKDEV_INIT("a7000000.i2c", NULL, &i2c1_clk), |
725 | { .con_id = "emi", .clk = &emi_clk}, | 869 | CLKDEV_INIT(NULL, "emi", &emi_clk), |
726 | { .dev_id = "pwm", .clk = &pwm_clk}, | 870 | CLKDEV_INIT("pwm", NULL, &pwm_clk), |
727 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | 871 | CLKDEV_INIT("70000000.sdhci", NULL, &sdhci_clk), |
728 | { .dev_id = "c_can_platform.0", .clk = &can0_clk}, | 872 | CLKDEV_INIT("c_can_platform.0", NULL, &can0_clk), |
729 | { .dev_id = "c_can_platform.1", .clk = &can1_clk}, | 873 | CLKDEV_INIT("c_can_platform.1", NULL, &can1_clk), |
730 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, | 874 | CLKDEV_INIT("a5000000.spi", NULL, &ssp1_clk), |
731 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, | 875 | CLKDEV_INIT("a6000000.spi", NULL, &ssp2_clk), |
732 | { .dev_id = "uart1", .clk = &uart1_clk}, | 876 | CLKDEV_INIT("a3000000.serial", NULL, &uart1_clk), |
733 | { .dev_id = "uart2", .clk = &uart2_clk}, | 877 | CLKDEV_INIT("a4000000.serial", NULL, &uart2_clk), |
734 | }; | 878 | }; |
735 | #endif | 879 | |
736 | 880 | void __init spear320_clk_init(void) | |
737 | void __init spear3xx_clk_init(void) | ||
738 | { | 881 | { |
739 | int i, cnt; | 882 | int i; |
740 | struct clk_lookup *lookups; | ||
741 | |||
742 | if (machine_is_spear300()) { | ||
743 | cnt = ARRAY_SIZE(spear300_clk_lookups); | ||
744 | lookups = spear300_clk_lookups; | ||
745 | } else if (machine_is_spear310()) { | ||
746 | cnt = ARRAY_SIZE(spear310_clk_lookups); | ||
747 | lookups = spear310_clk_lookups; | ||
748 | } else { | ||
749 | cnt = ARRAY_SIZE(spear320_clk_lookups); | ||
750 | lookups = spear320_clk_lookups; | ||
751 | } | ||
752 | 883 | ||
753 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | 884 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) |
754 | clk_register(&spear_clk_lookups[i]); | 885 | clk_register(&spear_clk_lookups[i]); |
755 | 886 | ||
756 | for (i = 0; i < cnt; i++) | 887 | for (i = 0; i < ARRAY_SIZE(spear320_clk_lookups); i++) |
757 | clk_register(&lookups[i]); | 888 | clk_register(&spear320_clk_lookups[i]); |
758 | 889 | ||
759 | clk_init(); | 890 | clk_init(); |
760 | } | 891 | } |
892 | #endif | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index 14276e5a98d2..e4f4d721cda2 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifndef __MACH_GENERIC_H | 14 | #ifndef __MACH_GENERIC_H |
15 | #define __MACH_GENERIC_H | 15 | #define __MACH_GENERIC_H |
16 | 16 | ||
17 | #include <linux/amba/pl08x.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/amba/bus.h> | 20 | #include <linux/amba/bus.h> |
@@ -21,26 +22,15 @@ | |||
21 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
22 | #include <plat/padmux.h> | 23 | #include <plat/padmux.h> |
23 | 24 | ||
24 | /* spear3xx declarations */ | ||
25 | /* | ||
26 | * Each GPT has 2 timer channels | ||
27 | * Following GPT channels will be used as clock source and clockevent | ||
28 | */ | ||
29 | #define SPEAR_GPT0_BASE SPEAR3XX_ML1_TMR_BASE | ||
30 | #define SPEAR_GPT0_CHAN0_IRQ SPEAR3XX_IRQ_CPU_GPT1_1 | ||
31 | #define SPEAR_GPT0_CHAN1_IRQ SPEAR3XX_IRQ_CPU_GPT1_2 | ||
32 | |||
33 | /* Add spear3xx family device structure declarations here */ | 25 | /* Add spear3xx family device structure declarations here */ |
34 | extern struct amba_device spear3xx_gpio_device; | ||
35 | extern struct amba_device spear3xx_uart_device; | ||
36 | extern struct sys_timer spear3xx_timer; | 26 | extern struct sys_timer spear3xx_timer; |
27 | extern struct pl022_ssp_controller pl022_plat_data; | ||
28 | extern struct pl08x_platform_data pl080_plat_data; | ||
37 | 29 | ||
38 | /* Add spear3xx family function declarations here */ | 30 | /* Add spear3xx family function declarations here */ |
39 | void __init spear3xx_clk_init(void); | 31 | void __init spear_setup_timer(resource_size_t base, int irq); |
40 | void __init spear_setup_timer(void); | ||
41 | void __init spear3xx_map_io(void); | 32 | void __init spear3xx_map_io(void); |
42 | void __init spear3xx_init_irq(void); | 33 | void __init spear3xx_dt_init_irq(void); |
43 | void __init spear3xx_init(void); | ||
44 | 34 | ||
45 | void spear_restart(char, const char *); | 35 | void spear_restart(char, const char *); |
46 | 36 | ||
@@ -99,9 +89,6 @@ extern struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50; | |||
99 | 89 | ||
100 | /* spear300 declarations */ | 90 | /* spear300 declarations */ |
101 | #ifdef CONFIG_MACH_SPEAR300 | 91 | #ifdef CONFIG_MACH_SPEAR300 |
102 | /* Add spear300 machine device structure declarations here */ | ||
103 | extern struct amba_device spear300_gpio1_device; | ||
104 | |||
105 | /* pad mux modes */ | 92 | /* pad mux modes */ |
106 | extern struct pmx_mode spear300_nand_mode; | 93 | extern struct pmx_mode spear300_nand_mode; |
107 | extern struct pmx_mode spear300_nor_mode; | 94 | extern struct pmx_mode spear300_nor_mode; |
@@ -133,16 +120,13 @@ extern struct pmx_dev spear300_pmx_telecom_sdhci_4bit; | |||
133 | extern struct pmx_dev spear300_pmx_telecom_sdhci_8bit; | 120 | extern struct pmx_dev spear300_pmx_telecom_sdhci_8bit; |
134 | extern struct pmx_dev spear300_pmx_gpio1; | 121 | extern struct pmx_dev spear300_pmx_gpio1; |
135 | 122 | ||
136 | /* Add spear300 machine function declarations here */ | 123 | /* Add spear300 machine declarations here */ |
137 | void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | 124 | void __init spear300_clk_init(void); |
138 | u8 pmx_dev_count); | ||
139 | 125 | ||
140 | #endif /* CONFIG_MACH_SPEAR300 */ | 126 | #endif /* CONFIG_MACH_SPEAR300 */ |
141 | 127 | ||
142 | /* spear310 declarations */ | 128 | /* spear310 declarations */ |
143 | #ifdef CONFIG_MACH_SPEAR310 | 129 | #ifdef CONFIG_MACH_SPEAR310 |
144 | /* Add spear310 machine device structure declarations here */ | ||
145 | |||
146 | /* pad mux devices */ | 130 | /* pad mux devices */ |
147 | extern struct pmx_dev spear310_pmx_emi_cs_0_1_4_5; | 131 | extern struct pmx_dev spear310_pmx_emi_cs_0_1_4_5; |
148 | extern struct pmx_dev spear310_pmx_emi_cs_2_3; | 132 | extern struct pmx_dev spear310_pmx_emi_cs_2_3; |
@@ -153,16 +137,13 @@ extern struct pmx_dev spear310_pmx_fsmc; | |||
153 | extern struct pmx_dev spear310_pmx_rs485_0_1; | 137 | extern struct pmx_dev spear310_pmx_rs485_0_1; |
154 | extern struct pmx_dev spear310_pmx_tdm0; | 138 | extern struct pmx_dev spear310_pmx_tdm0; |
155 | 139 | ||
156 | /* Add spear310 machine function declarations here */ | 140 | /* Add spear310 machine declarations here */ |
157 | void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | 141 | void __init spear310_clk_init(void); |
158 | u8 pmx_dev_count); | ||
159 | 142 | ||
160 | #endif /* CONFIG_MACH_SPEAR310 */ | 143 | #endif /* CONFIG_MACH_SPEAR310 */ |
161 | 144 | ||
162 | /* spear320 declarations */ | 145 | /* spear320 declarations */ |
163 | #ifdef CONFIG_MACH_SPEAR320 | 146 | #ifdef CONFIG_MACH_SPEAR320 |
164 | /* Add spear320 machine device structure declarations here */ | ||
165 | |||
166 | /* pad mux modes */ | 147 | /* pad mux modes */ |
167 | extern struct pmx_mode spear320_auto_net_smii_mode; | 148 | extern struct pmx_mode spear320_auto_net_smii_mode; |
168 | extern struct pmx_mode spear320_auto_net_mii_mode; | 149 | extern struct pmx_mode spear320_auto_net_mii_mode; |
@@ -193,9 +174,8 @@ extern struct pmx_dev spear320_pmx_smii0; | |||
193 | extern struct pmx_dev spear320_pmx_smii1; | 174 | extern struct pmx_dev spear320_pmx_smii1; |
194 | extern struct pmx_dev spear320_pmx_i2c1; | 175 | extern struct pmx_dev spear320_pmx_i2c1; |
195 | 176 | ||
196 | /* Add spear320 machine function declarations here */ | 177 | /* Add spear320 machine declarations here */ |
197 | void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | 178 | void __init spear320_clk_init(void); |
198 | u8 pmx_dev_count); | ||
199 | 179 | ||
200 | #endif /* CONFIG_MACH_SPEAR320 */ | 180 | #endif /* CONFIG_MACH_SPEAR320 */ |
201 | 181 | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/hardware.h b/arch/arm/mach-spear3xx/include/mach/hardware.h index 4660c0d8ec0d..40a8c178f10d 100644 --- a/arch/arm/mach-spear3xx/include/mach/hardware.h +++ b/arch/arm/mach-spear3xx/include/mach/hardware.h | |||
@@ -1,23 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * arch/arm/mach-spear3xx/include/mach/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_HARDWARE_H | ||
15 | #define __MACH_HARDWARE_H | ||
16 | |||
17 | #include <plat/hardware.h> | ||
18 | #include <mach/spear.h> | ||
19 | |||
20 | /* Vitual to physical translation of statically mapped space */ | ||
21 | #define IO_ADDRESS(x) (x | 0xF0000000) | ||
22 | |||
23 | #endif /* __MACH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h index 6e265442808e..319620a1afb4 100644 --- a/arch/arm/mach-spear3xx/include/mach/irqs.h +++ b/arch/arm/mach-spear3xx/include/mach/irqs.h | |||
@@ -14,141 +14,15 @@ | |||
14 | #ifndef __MACH_IRQS_H | 14 | #ifndef __MACH_IRQS_H |
15 | #define __MACH_IRQS_H | 15 | #define __MACH_IRQS_H |
16 | 16 | ||
17 | /* SPEAr3xx IRQ definitions */ | 17 | /* FIXME: probe all these from DT */ |
18 | #define SPEAR3XX_IRQ_HW_ACCEL_MOD_0 0 | ||
19 | #define SPEAR3XX_IRQ_INTRCOMM_RAS_ARM 1 | 18 | #define SPEAR3XX_IRQ_INTRCOMM_RAS_ARM 1 |
20 | #define SPEAR3XX_IRQ_CPU_GPT1_1 2 | 19 | #define SPEAR3XX_IRQ_CPU_GPT1_1 2 |
21 | #define SPEAR3XX_IRQ_CPU_GPT1_2 3 | ||
22 | #define SPEAR3XX_IRQ_BASIC_GPT1_1 4 | ||
23 | #define SPEAR3XX_IRQ_BASIC_GPT1_2 5 | ||
24 | #define SPEAR3XX_IRQ_BASIC_GPT2_1 6 | ||
25 | #define SPEAR3XX_IRQ_BASIC_GPT2_2 7 | ||
26 | #define SPEAR3XX_IRQ_BASIC_DMA 8 | ||
27 | #define SPEAR3XX_IRQ_BASIC_SMI 9 | ||
28 | #define SPEAR3XX_IRQ_BASIC_RTC 10 | ||
29 | #define SPEAR3XX_IRQ_BASIC_GPIO 11 | ||
30 | #define SPEAR3XX_IRQ_BASIC_WDT 12 | ||
31 | #define SPEAR3XX_IRQ_DDR_CONTROLLER 13 | ||
32 | #define SPEAR3XX_IRQ_SYS_ERROR 14 | ||
33 | #define SPEAR3XX_IRQ_WAKEUP_RCV 15 | ||
34 | #define SPEAR3XX_IRQ_JPEG 16 | ||
35 | #define SPEAR3XX_IRQ_IRDA 17 | ||
36 | #define SPEAR3XX_IRQ_ADC 18 | ||
37 | #define SPEAR3XX_IRQ_UART 19 | ||
38 | #define SPEAR3XX_IRQ_SSP 20 | ||
39 | #define SPEAR3XX_IRQ_I2C 21 | ||
40 | #define SPEAR3XX_IRQ_MAC_1 22 | ||
41 | #define SPEAR3XX_IRQ_MAC_2 23 | ||
42 | #define SPEAR3XX_IRQ_USB_DEV 24 | ||
43 | #define SPEAR3XX_IRQ_USB_H_OHCI_0 25 | ||
44 | #define SPEAR3XX_IRQ_USB_H_EHCI_0 26 | ||
45 | #define SPEAR3XX_IRQ_USB_H_EHCI_1 SPEAR3XX_IRQ_USB_H_EHCI_0 | ||
46 | #define SPEAR3XX_IRQ_USB_H_OHCI_1 27 | ||
47 | #define SPEAR3XX_IRQ_GEN_RAS_1 28 | 20 | #define SPEAR3XX_IRQ_GEN_RAS_1 28 |
48 | #define SPEAR3XX_IRQ_GEN_RAS_2 29 | 21 | #define SPEAR3XX_IRQ_GEN_RAS_2 29 |
49 | #define SPEAR3XX_IRQ_GEN_RAS_3 30 | 22 | #define SPEAR3XX_IRQ_GEN_RAS_3 30 |
50 | #define SPEAR3XX_IRQ_HW_ACCEL_MOD_1 31 | ||
51 | #define SPEAR3XX_IRQ_VIC_END 32 | 23 | #define SPEAR3XX_IRQ_VIC_END 32 |
52 | |||
53 | #define SPEAR3XX_VIRQ_START SPEAR3XX_IRQ_VIC_END | 24 | #define SPEAR3XX_VIRQ_START SPEAR3XX_IRQ_VIC_END |
54 | 25 | ||
55 | /* SPEAr300 Virtual irq definitions */ | 26 | #define NR_IRQS 160 |
56 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
57 | #define SPEAR300_VIRQ_IT_PERS_S (SPEAR3XX_VIRQ_START + 0) | ||
58 | #define SPEAR300_VIRQ_IT_CHANGE_S (SPEAR3XX_VIRQ_START + 1) | ||
59 | #define SPEAR300_VIRQ_I2S (SPEAR3XX_VIRQ_START + 2) | ||
60 | #define SPEAR300_VIRQ_TDM (SPEAR3XX_VIRQ_START + 3) | ||
61 | #define SPEAR300_VIRQ_CAMERA_L (SPEAR3XX_VIRQ_START + 4) | ||
62 | #define SPEAR300_VIRQ_CAMERA_F (SPEAR3XX_VIRQ_START + 5) | ||
63 | #define SPEAR300_VIRQ_CAMERA_V (SPEAR3XX_VIRQ_START + 6) | ||
64 | #define SPEAR300_VIRQ_KEYBOARD (SPEAR3XX_VIRQ_START + 7) | ||
65 | #define SPEAR300_VIRQ_GPIO1 (SPEAR3XX_VIRQ_START + 8) | ||
66 | |||
67 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
68 | #define SPEAR300_IRQ_CLCD SPEAR3XX_IRQ_GEN_RAS_3 | ||
69 | |||
70 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
71 | #define SPEAR300_IRQ_SDHCI SPEAR3XX_IRQ_INTRCOMM_RAS_ARM | ||
72 | |||
73 | /* SPEAr310 Virtual irq definitions */ | ||
74 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
75 | #define SPEAR310_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 0) | ||
76 | #define SPEAR310_VIRQ_SMII1 (SPEAR3XX_VIRQ_START + 1) | ||
77 | #define SPEAR310_VIRQ_SMII2 (SPEAR3XX_VIRQ_START + 2) | ||
78 | #define SPEAR310_VIRQ_SMII3 (SPEAR3XX_VIRQ_START + 3) | ||
79 | #define SPEAR310_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 4) | ||
80 | #define SPEAR310_VIRQ_WAKEUP_SMII1 (SPEAR3XX_VIRQ_START + 5) | ||
81 | #define SPEAR310_VIRQ_WAKEUP_SMII2 (SPEAR3XX_VIRQ_START + 6) | ||
82 | #define SPEAR310_VIRQ_WAKEUP_SMII3 (SPEAR3XX_VIRQ_START + 7) | ||
83 | |||
84 | /* IRQs sharing IRQ_GEN_RAS_2 */ | ||
85 | #define SPEAR310_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) | ||
86 | #define SPEAR310_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) | ||
87 | #define SPEAR310_VIRQ_UART3 (SPEAR3XX_VIRQ_START + 10) | ||
88 | #define SPEAR310_VIRQ_UART4 (SPEAR3XX_VIRQ_START + 11) | ||
89 | #define SPEAR310_VIRQ_UART5 (SPEAR3XX_VIRQ_START + 12) | ||
90 | |||
91 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
92 | #define SPEAR310_VIRQ_EMI (SPEAR3XX_VIRQ_START + 13) | ||
93 | #define SPEAR310_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 14) | ||
94 | |||
95 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
96 | #define SPEAR310_VIRQ_TDM_HDLC (SPEAR3XX_VIRQ_START + 15) | ||
97 | #define SPEAR310_VIRQ_RS485_0 (SPEAR3XX_VIRQ_START + 16) | ||
98 | #define SPEAR310_VIRQ_RS485_1 (SPEAR3XX_VIRQ_START + 17) | ||
99 | |||
100 | /* SPEAr320 Virtual irq definitions */ | ||
101 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
102 | #define SPEAR320_VIRQ_EMI (SPEAR3XX_VIRQ_START + 0) | ||
103 | #define SPEAR320_VIRQ_CLCD (SPEAR3XX_VIRQ_START + 1) | ||
104 | #define SPEAR320_VIRQ_SPP (SPEAR3XX_VIRQ_START + 2) | ||
105 | |||
106 | /* IRQs sharing IRQ_GEN_RAS_2 */ | ||
107 | #define SPEAR320_IRQ_SDHCI SPEAR3XX_IRQ_GEN_RAS_2 | ||
108 | |||
109 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
110 | #define SPEAR320_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 3) | ||
111 | #define SPEAR320_VIRQ_I2S_PLAY (SPEAR3XX_VIRQ_START + 4) | ||
112 | #define SPEAR320_VIRQ_I2S_REC (SPEAR3XX_VIRQ_START + 5) | ||
113 | |||
114 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
115 | #define SPEAR320_VIRQ_CANU (SPEAR3XX_VIRQ_START + 6) | ||
116 | #define SPEAR320_VIRQ_CANL (SPEAR3XX_VIRQ_START + 7) | ||
117 | #define SPEAR320_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) | ||
118 | #define SPEAR320_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) | ||
119 | #define SPEAR320_VIRQ_SSP1 (SPEAR3XX_VIRQ_START + 10) | ||
120 | #define SPEAR320_VIRQ_SSP2 (SPEAR3XX_VIRQ_START + 11) | ||
121 | #define SPEAR320_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 12) | ||
122 | #define SPEAR320_VIRQ_MII1_SMII1 (SPEAR3XX_VIRQ_START + 13) | ||
123 | #define SPEAR320_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 14) | ||
124 | #define SPEAR320_VIRQ_WAKEUP_MII1_SMII1 (SPEAR3XX_VIRQ_START + 15) | ||
125 | #define SPEAR320_VIRQ_I2C1 (SPEAR3XX_VIRQ_START + 16) | ||
126 | |||
127 | /* | ||
128 | * GPIO pins virtual irqs | ||
129 | * Use the lowest number for the GPIO virtual IRQs base on which subarchs | ||
130 | * we have compiled in | ||
131 | */ | ||
132 | #if defined(CONFIG_MACH_SPEAR310) | ||
133 | #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 18) | ||
134 | #elif defined(CONFIG_MACH_SPEAR320) | ||
135 | #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 17) | ||
136 | #else | ||
137 | #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 9) | ||
138 | #endif | ||
139 | |||
140 | #define SPEAR300_GPIO1_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8) | ||
141 | #define SPEAR3XX_PLGPIO_COUNT 102 | ||
142 | |||
143 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | ||
144 | #define SPEAR3XX_PLGPIO_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8) | ||
145 | #define SPEAR3XX_GPIO_INT_END (SPEAR3XX_PLGPIO_INT_BASE + \ | ||
146 | SPEAR3XX_PLGPIO_COUNT) | ||
147 | #else | ||
148 | #define SPEAR3XX_GPIO_INT_END (SPEAR300_GPIO1_INT_BASE + 8) | ||
149 | #endif | ||
150 | |||
151 | #define SPEAR3XX_VIRQ_END SPEAR3XX_GPIO_INT_END | ||
152 | #define NR_IRQS SPEAR3XX_VIRQ_END | ||
153 | 27 | ||
154 | #endif /* __MACH_IRQS_H */ | 28 | #endif /* __MACH_IRQS_H */ |
diff --git a/arch/arm/mach-spear3xx/include/mach/misc_regs.h b/arch/arm/mach-spear3xx/include/mach/misc_regs.h index 5bd8cd8d4852..e0ab72e61507 100644 --- a/arch/arm/mach-spear3xx/include/mach/misc_regs.h +++ b/arch/arm/mach-spear3xx/include/mach/misc_regs.h | |||
@@ -14,151 +14,7 @@ | |||
14 | #ifndef __MACH_MISC_REGS_H | 14 | #ifndef __MACH_MISC_REGS_H |
15 | #define __MACH_MISC_REGS_H | 15 | #define __MACH_MISC_REGS_H |
16 | 16 | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | #define MISC_BASE IOMEM(VA_SPEAR3XX_ICM3_MISC_REG_BASE) | 17 | #define MISC_BASE IOMEM(VA_SPEAR3XX_ICM3_MISC_REG_BASE) |
20 | |||
21 | #define SOC_CFG_CTR (MISC_BASE + 0x000) | ||
22 | #define DIAG_CFG_CTR (MISC_BASE + 0x004) | ||
23 | #define PLL1_CTR (MISC_BASE + 0x008) | ||
24 | #define PLL1_FRQ (MISC_BASE + 0x00C) | ||
25 | #define PLL1_MOD (MISC_BASE + 0x010) | ||
26 | #define PLL2_CTR (MISC_BASE + 0x014) | ||
27 | /* PLL_CTR register masks */ | ||
28 | #define PLL_ENABLE 2 | ||
29 | #define PLL_MODE_SHIFT 4 | ||
30 | #define PLL_MODE_MASK 0x3 | ||
31 | #define PLL_MODE_NORMAL 0 | ||
32 | #define PLL_MODE_FRACTION 1 | ||
33 | #define PLL_MODE_DITH_DSB 2 | ||
34 | #define PLL_MODE_DITH_SSB 3 | ||
35 | |||
36 | #define PLL2_FRQ (MISC_BASE + 0x018) | ||
37 | /* PLL FRQ register masks */ | ||
38 | #define PLL_DIV_N_SHIFT 0 | ||
39 | #define PLL_DIV_N_MASK 0xFF | ||
40 | #define PLL_DIV_P_SHIFT 8 | ||
41 | #define PLL_DIV_P_MASK 0x7 | ||
42 | #define PLL_NORM_FDBK_M_SHIFT 24 | ||
43 | #define PLL_NORM_FDBK_M_MASK 0xFF | ||
44 | #define PLL_DITH_FDBK_M_SHIFT 16 | ||
45 | #define PLL_DITH_FDBK_M_MASK 0xFFFF | ||
46 | |||
47 | #define PLL2_MOD (MISC_BASE + 0x01C) | ||
48 | #define PLL_CLK_CFG (MISC_BASE + 0x020) | ||
49 | #define CORE_CLK_CFG (MISC_BASE + 0x024) | ||
50 | /* CORE CLK CFG register masks */ | ||
51 | #define PLL_HCLK_RATIO_SHIFT 10 | ||
52 | #define PLL_HCLK_RATIO_MASK 0x3 | ||
53 | #define HCLK_PCLK_RATIO_SHIFT 8 | ||
54 | #define HCLK_PCLK_RATIO_MASK 0x3 | ||
55 | |||
56 | #define PERIP_CLK_CFG (MISC_BASE + 0x028) | ||
57 | /* PERIP_CLK_CFG register masks */ | ||
58 | #define UART_CLK_SHIFT 4 | ||
59 | #define UART_CLK_MASK 0x1 | ||
60 | #define FIRDA_CLK_SHIFT 5 | ||
61 | #define FIRDA_CLK_MASK 0x3 | ||
62 | #define GPT0_CLK_SHIFT 8 | ||
63 | #define GPT1_CLK_SHIFT 11 | ||
64 | #define GPT2_CLK_SHIFT 12 | ||
65 | #define GPT_CLK_MASK 0x1 | ||
66 | #define AUX_CLK_PLL3_VAL 0 | ||
67 | #define AUX_CLK_PLL1_VAL 1 | ||
68 | |||
69 | #define PERIP1_CLK_ENB (MISC_BASE + 0x02C) | ||
70 | /* PERIP1_CLK_ENB register masks */ | ||
71 | #define UART_CLK_ENB 3 | ||
72 | #define SSP_CLK_ENB 5 | ||
73 | #define I2C_CLK_ENB 7 | ||
74 | #define JPEG_CLK_ENB 8 | ||
75 | #define FIRDA_CLK_ENB 10 | ||
76 | #define GPT1_CLK_ENB 11 | ||
77 | #define GPT2_CLK_ENB 12 | ||
78 | #define ADC_CLK_ENB 15 | ||
79 | #define RTC_CLK_ENB 17 | ||
80 | #define GPIO_CLK_ENB 18 | ||
81 | #define DMA_CLK_ENB 19 | ||
82 | #define SMI_CLK_ENB 21 | ||
83 | #define GMAC_CLK_ENB 23 | ||
84 | #define USBD_CLK_ENB 24 | ||
85 | #define USBH_CLK_ENB 25 | ||
86 | #define C3_CLK_ENB 31 | ||
87 | |||
88 | #define SOC_CORE_ID (MISC_BASE + 0x030) | ||
89 | #define RAS_CLK_ENB (MISC_BASE + 0x034) | ||
90 | #define PERIP1_SOF_RST (MISC_BASE + 0x038) | ||
91 | /* PERIP1_SOF_RST register masks */ | ||
92 | #define JPEG_SOF_RST 8 | ||
93 | |||
94 | #define SOC_USER_ID (MISC_BASE + 0x03C) | ||
95 | #define RAS_SOF_RST (MISC_BASE + 0x040) | ||
96 | #define PRSC1_CLK_CFG (MISC_BASE + 0x044) | ||
97 | #define PRSC2_CLK_CFG (MISC_BASE + 0x048) | ||
98 | #define PRSC3_CLK_CFG (MISC_BASE + 0x04C) | ||
99 | /* gpt synthesizer register masks */ | ||
100 | #define GPT_MSCALE_SHIFT 0 | ||
101 | #define GPT_MSCALE_MASK 0xFFF | ||
102 | #define GPT_NSCALE_SHIFT 12 | ||
103 | #define GPT_NSCALE_MASK 0xF | ||
104 | |||
105 | #define AMEM_CLK_CFG (MISC_BASE + 0x050) | ||
106 | #define EXPI_CLK_CFG (MISC_BASE + 0x054) | ||
107 | #define CLCD_CLK_SYNT (MISC_BASE + 0x05C) | ||
108 | #define FIRDA_CLK_SYNT (MISC_BASE + 0x060) | ||
109 | #define UART_CLK_SYNT (MISC_BASE + 0x064) | ||
110 | #define GMAC_CLK_SYNT (MISC_BASE + 0x068) | ||
111 | #define RAS1_CLK_SYNT (MISC_BASE + 0x06C) | ||
112 | #define RAS2_CLK_SYNT (MISC_BASE + 0x070) | ||
113 | #define RAS3_CLK_SYNT (MISC_BASE + 0x074) | ||
114 | #define RAS4_CLK_SYNT (MISC_BASE + 0x078) | ||
115 | /* aux clk synthesiser register masks for irda to ras4 */ | ||
116 | #define AUX_SYNT_ENB 31 | ||
117 | #define AUX_EQ_SEL_SHIFT 30 | ||
118 | #define AUX_EQ_SEL_MASK 1 | ||
119 | #define AUX_EQ1_SEL 0 | ||
120 | #define AUX_EQ2_SEL 1 | ||
121 | #define AUX_XSCALE_SHIFT 16 | ||
122 | #define AUX_XSCALE_MASK 0xFFF | ||
123 | #define AUX_YSCALE_SHIFT 0 | ||
124 | #define AUX_YSCALE_MASK 0xFFF | ||
125 | |||
126 | #define ICM1_ARB_CFG (MISC_BASE + 0x07C) | ||
127 | #define ICM2_ARB_CFG (MISC_BASE + 0x080) | ||
128 | #define ICM3_ARB_CFG (MISC_BASE + 0x084) | ||
129 | #define ICM4_ARB_CFG (MISC_BASE + 0x088) | ||
130 | #define ICM5_ARB_CFG (MISC_BASE + 0x08C) | ||
131 | #define ICM6_ARB_CFG (MISC_BASE + 0x090) | ||
132 | #define ICM7_ARB_CFG (MISC_BASE + 0x094) | ||
133 | #define ICM8_ARB_CFG (MISC_BASE + 0x098) | ||
134 | #define ICM9_ARB_CFG (MISC_BASE + 0x09C) | ||
135 | #define DMA_CHN_CFG (MISC_BASE + 0x0A0) | 18 | #define DMA_CHN_CFG (MISC_BASE + 0x0A0) |
136 | #define USB2_PHY_CFG (MISC_BASE + 0x0A4) | ||
137 | #define GMAC_CFG_CTR (MISC_BASE + 0x0A8) | ||
138 | #define EXPI_CFG_CTR (MISC_BASE + 0x0AC) | ||
139 | #define PRC1_LOCK_CTR (MISC_BASE + 0x0C0) | ||
140 | #define PRC2_LOCK_CTR (MISC_BASE + 0x0C4) | ||
141 | #define PRC3_LOCK_CTR (MISC_BASE + 0x0C8) | ||
142 | #define PRC4_LOCK_CTR (MISC_BASE + 0x0CC) | ||
143 | #define PRC1_IRQ_CTR (MISC_BASE + 0x0D0) | ||
144 | #define PRC2_IRQ_CTR (MISC_BASE + 0x0D4) | ||
145 | #define PRC3_IRQ_CTR (MISC_BASE + 0x0D8) | ||
146 | #define PRC4_IRQ_CTR (MISC_BASE + 0x0DC) | ||
147 | #define PWRDOWN_CFG_CTR (MISC_BASE + 0x0E0) | ||
148 | #define COMPSSTL_1V8_CFG (MISC_BASE + 0x0E4) | ||
149 | #define COMPSSTL_2V5_CFG (MISC_BASE + 0x0E8) | ||
150 | #define COMPCOR_3V3_CFG (MISC_BASE + 0x0EC) | ||
151 | #define SSTLPAD_CFG_CTR (MISC_BASE + 0x0F0) | ||
152 | #define BIST1_CFG_CTR (MISC_BASE + 0x0F4) | ||
153 | #define BIST2_CFG_CTR (MISC_BASE + 0x0F8) | ||
154 | #define BIST3_CFG_CTR (MISC_BASE + 0x0FC) | ||
155 | #define BIST4_CFG_CTR (MISC_BASE + 0x100) | ||
156 | #define BIST5_CFG_CTR (MISC_BASE + 0x104) | ||
157 | #define BIST1_STS_RES (MISC_BASE + 0x108) | ||
158 | #define BIST2_STS_RES (MISC_BASE + 0x10C) | ||
159 | #define BIST3_STS_RES (MISC_BASE + 0x110) | ||
160 | #define BIST4_STS_RES (MISC_BASE + 0x114) | ||
161 | #define BIST5_STS_RES (MISC_BASE + 0x118) | ||
162 | #define SYSERR_CFG_CTR (MISC_BASE + 0x11C) | ||
163 | 19 | ||
164 | #endif /* __MACH_MISC_REGS_H */ | 20 | #endif /* __MACH_MISC_REGS_H */ |
diff --git a/arch/arm/mach-spear3xx/include/mach/spear.h b/arch/arm/mach-spear3xx/include/mach/spear.h index 63fd98356919..6d4dadc67633 100644 --- a/arch/arm/mach-spear3xx/include/mach/spear.h +++ b/arch/arm/mach-spear3xx/include/mach/spear.h | |||
@@ -15,60 +15,27 @@ | |||
15 | #define __MACH_SPEAR3XX_H | 15 | #define __MACH_SPEAR3XX_H |
16 | 16 | ||
17 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
18 | #include <mach/spear300.h> | ||
19 | #include <mach/spear310.h> | ||
20 | #include <mach/spear320.h> | ||
21 | |||
22 | #define SPEAR3XX_ML_SDRAM_BASE UL(0x00000000) | ||
23 | |||
24 | #define SPEAR3XX_ICM9_BASE UL(0xC0000000) | ||
25 | 18 | ||
26 | /* ICM1 - Low speed connection */ | 19 | /* ICM1 - Low speed connection */ |
27 | #define SPEAR3XX_ICM1_2_BASE UL(0xD0000000) | 20 | #define SPEAR3XX_ICM1_2_BASE UL(0xD0000000) |
21 | #define VA_SPEAR3XX_ICM1_2_BASE UL(0xFD000000) | ||
28 | #define SPEAR3XX_ICM1_UART_BASE UL(0xD0000000) | 22 | #define SPEAR3XX_ICM1_UART_BASE UL(0xD0000000) |
29 | #define VA_SPEAR3XX_ICM1_UART_BASE IO_ADDRESS(SPEAR3XX_ICM1_UART_BASE) | 23 | #define VA_SPEAR3XX_ICM1_UART_BASE (VA_SPEAR3XX_ICM1_2_BASE | SPEAR3XX_ICM1_UART_BASE) |
30 | #define SPEAR3XX_ICM1_ADC_BASE UL(0xD0080000) | ||
31 | #define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000) | 24 | #define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000) |
32 | #define SPEAR3XX_ICM1_I2C_BASE UL(0xD0180000) | ||
33 | #define SPEAR3XX_ICM1_JPEG_BASE UL(0xD0800000) | ||
34 | #define SPEAR3XX_ICM1_IRDA_BASE UL(0xD1000000) | ||
35 | #define SPEAR3XX_ICM1_SRAM_BASE UL(0xD2800000) | ||
36 | |||
37 | /* ICM2 - Application Subsystem */ | ||
38 | #define SPEAR3XX_ICM2_HWACCEL0_BASE UL(0xD8800000) | ||
39 | #define SPEAR3XX_ICM2_HWACCEL1_BASE UL(0xD9000000) | ||
40 | |||
41 | /* ICM4 - High Speed Connection */ | ||
42 | #define SPEAR3XX_ICM4_BASE UL(0xE0000000) | ||
43 | #define SPEAR3XX_ICM4_MII_BASE UL(0xE0800000) | ||
44 | #define SPEAR3XX_ICM4_USBD_FIFO_BASE UL(0xE1000000) | ||
45 | #define SPEAR3XX_ICM4_USBD_CSR_BASE UL(0xE1100000) | ||
46 | #define SPEAR3XX_ICM4_USBD_PLDT_BASE UL(0xE1200000) | ||
47 | #define SPEAR3XX_ICM4_USB_EHCI0_1_BASE UL(0xE1800000) | ||
48 | #define SPEAR3XX_ICM4_USB_OHCI0_BASE UL(0xE1900000) | ||
49 | #define SPEAR3XX_ICM4_USB_OHCI1_BASE UL(0xE2100000) | ||
50 | #define SPEAR3XX_ICM4_USB_ARB_BASE UL(0xE2800000) | ||
51 | 25 | ||
52 | /* ML1 - Multi Layer CPU Subsystem */ | 26 | /* ML1 - Multi Layer CPU Subsystem */ |
53 | #define SPEAR3XX_ICM3_ML1_2_BASE UL(0xF0000000) | 27 | #define SPEAR3XX_ICM3_ML1_2_BASE UL(0xF0000000) |
54 | #define SPEAR3XX_ML1_TMR_BASE UL(0xF0000000) | 28 | #define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000) |
55 | #define SPEAR3XX_ML1_VIC_BASE UL(0xF1100000) | 29 | #define SPEAR3XX_CPU_TMR_BASE UL(0xF0000000) |
56 | #define VA_SPEAR3XX_ML1_VIC_BASE IO_ADDRESS(SPEAR3XX_ML1_VIC_BASE) | ||
57 | 30 | ||
58 | /* ICM3 - Basic Subsystem */ | 31 | /* ICM3 - Basic Subsystem */ |
59 | #define SPEAR3XX_ICM3_SMEM_BASE UL(0xF8000000) | ||
60 | #define SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) | 32 | #define SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) |
33 | #define VA_SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) | ||
61 | #define SPEAR3XX_ICM3_DMA_BASE UL(0xFC400000) | 34 | #define SPEAR3XX_ICM3_DMA_BASE UL(0xFC400000) |
62 | #define SPEAR3XX_ICM3_SDRAM_CTRL_BASE UL(0xFC600000) | ||
63 | #define SPEAR3XX_ICM3_TMR0_BASE UL(0xFC800000) | ||
64 | #define SPEAR3XX_ICM3_WDT_BASE UL(0xFC880000) | ||
65 | #define SPEAR3XX_ICM3_RTC_BASE UL(0xFC900000) | ||
66 | #define SPEAR3XX_ICM3_GPIO_BASE UL(0xFC980000) | ||
67 | #define SPEAR3XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000) | 35 | #define SPEAR3XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000) |
68 | #define VA_SPEAR3XX_ICM3_SYS_CTRL_BASE IO_ADDRESS(SPEAR3XX_ICM3_SYS_CTRL_BASE) | 36 | #define VA_SPEAR3XX_ICM3_SYS_CTRL_BASE (VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_SYS_CTRL_BASE) |
69 | #define SPEAR3XX_ICM3_MISC_REG_BASE UL(0xFCA80000) | 37 | #define SPEAR3XX_ICM3_MISC_REG_BASE UL(0xFCA80000) |
70 | #define VA_SPEAR3XX_ICM3_MISC_REG_BASE IO_ADDRESS(SPEAR3XX_ICM3_MISC_REG_BASE) | 38 | #define VA_SPEAR3XX_ICM3_MISC_REG_BASE (VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_MISC_REG_BASE) |
71 | #define SPEAR3XX_ICM3_TMR1_BASE UL(0xFCB00000) | ||
72 | 39 | ||
73 | /* Debug uart for linux, will be used for debug and uncompress messages */ | 40 | /* Debug uart for linux, will be used for debug and uncompress messages */ |
74 | #define SPEAR_DBG_UART_BASE SPEAR3XX_ICM1_UART_BASE | 41 | #define SPEAR_DBG_UART_BASE SPEAR3XX_ICM1_UART_BASE |
diff --git a/arch/arm/mach-spear3xx/include/mach/spear300.h b/arch/arm/mach-spear3xx/include/mach/spear300.h deleted file mode 100644 index 3b6ea0729040..000000000000 --- a/arch/arm/mach-spear3xx/include/mach/spear300.h +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear300.h | ||
3 | * | ||
4 | * SPEAr300 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR300 | ||
15 | |||
16 | #ifndef __MACH_SPEAR300_H | ||
17 | #define __MACH_SPEAR300_H | ||
18 | |||
19 | /* Base address of various IPs */ | ||
20 | #define SPEAR300_TELECOM_BASE UL(0x50000000) | ||
21 | |||
22 | /* Interrupt registers offsets and masks */ | ||
23 | #define SPEAR300_INT_ENB_MASK_REG 0x54 | ||
24 | #define SPEAR300_INT_STS_MASK_REG 0x58 | ||
25 | #define SPEAR300_IT_PERS_S_IRQ_MASK (1 << 0) | ||
26 | #define SPEAR300_IT_CHANGE_S_IRQ_MASK (1 << 1) | ||
27 | #define SPEAR300_I2S_IRQ_MASK (1 << 2) | ||
28 | #define SPEAR300_TDM_IRQ_MASK (1 << 3) | ||
29 | #define SPEAR300_CAMERA_L_IRQ_MASK (1 << 4) | ||
30 | #define SPEAR300_CAMERA_F_IRQ_MASK (1 << 5) | ||
31 | #define SPEAR300_CAMERA_V_IRQ_MASK (1 << 6) | ||
32 | #define SPEAR300_KEYBOARD_IRQ_MASK (1 << 7) | ||
33 | #define SPEAR300_GPIO1_IRQ_MASK (1 << 8) | ||
34 | |||
35 | #define SPEAR300_SHIRQ_RAS1_MASK 0x1FF | ||
36 | |||
37 | #define SPEAR300_CLCD_BASE UL(0x60000000) | ||
38 | #define SPEAR300_SDHCI_BASE UL(0x70000000) | ||
39 | #define SPEAR300_NAND_0_BASE UL(0x80000000) | ||
40 | #define SPEAR300_NAND_1_BASE UL(0x84000000) | ||
41 | #define SPEAR300_NAND_2_BASE UL(0x88000000) | ||
42 | #define SPEAR300_NAND_3_BASE UL(0x8c000000) | ||
43 | #define SPEAR300_NOR_0_BASE UL(0x90000000) | ||
44 | #define SPEAR300_NOR_1_BASE UL(0x91000000) | ||
45 | #define SPEAR300_NOR_2_BASE UL(0x92000000) | ||
46 | #define SPEAR300_NOR_3_BASE UL(0x93000000) | ||
47 | #define SPEAR300_FSMC_BASE UL(0x94000000) | ||
48 | #define SPEAR300_SOC_CONFIG_BASE UL(0x99000000) | ||
49 | #define SPEAR300_KEYBOARD_BASE UL(0xA0000000) | ||
50 | #define SPEAR300_GPIO_BASE UL(0xA9000000) | ||
51 | |||
52 | #endif /* __MACH_SPEAR300_H */ | ||
53 | |||
54 | #endif /* CONFIG_MACH_SPEAR300 */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear310.h b/arch/arm/mach-spear3xx/include/mach/spear310.h deleted file mode 100644 index 1567d0da725f..000000000000 --- a/arch/arm/mach-spear3xx/include/mach/spear310.h +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear310.h | ||
3 | * | ||
4 | * SPEAr310 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR310 | ||
15 | |||
16 | #ifndef __MACH_SPEAR310_H | ||
17 | #define __MACH_SPEAR310_H | ||
18 | |||
19 | #define SPEAR310_NAND_BASE UL(0x40000000) | ||
20 | #define SPEAR310_FSMC_BASE UL(0x44000000) | ||
21 | #define SPEAR310_UART1_BASE UL(0xB2000000) | ||
22 | #define SPEAR310_UART2_BASE UL(0xB2080000) | ||
23 | #define SPEAR310_UART3_BASE UL(0xB2100000) | ||
24 | #define SPEAR310_UART4_BASE UL(0xB2180000) | ||
25 | #define SPEAR310_UART5_BASE UL(0xB2200000) | ||
26 | #define SPEAR310_HDLC_BASE UL(0xB2800000) | ||
27 | #define SPEAR310_RS485_0_BASE UL(0xB3000000) | ||
28 | #define SPEAR310_RS485_1_BASE UL(0xB3800000) | ||
29 | #define SPEAR310_SOC_CONFIG_BASE UL(0xB4000000) | ||
30 | |||
31 | /* Interrupt registers offsets and masks */ | ||
32 | #define SPEAR310_INT_STS_MASK_REG 0x04 | ||
33 | #define SPEAR310_SMII0_IRQ_MASK (1 << 0) | ||
34 | #define SPEAR310_SMII1_IRQ_MASK (1 << 1) | ||
35 | #define SPEAR310_SMII2_IRQ_MASK (1 << 2) | ||
36 | #define SPEAR310_SMII3_IRQ_MASK (1 << 3) | ||
37 | #define SPEAR310_WAKEUP_SMII0_IRQ_MASK (1 << 4) | ||
38 | #define SPEAR310_WAKEUP_SMII1_IRQ_MASK (1 << 5) | ||
39 | #define SPEAR310_WAKEUP_SMII2_IRQ_MASK (1 << 6) | ||
40 | #define SPEAR310_WAKEUP_SMII3_IRQ_MASK (1 << 7) | ||
41 | #define SPEAR310_UART1_IRQ_MASK (1 << 8) | ||
42 | #define SPEAR310_UART2_IRQ_MASK (1 << 9) | ||
43 | #define SPEAR310_UART3_IRQ_MASK (1 << 10) | ||
44 | #define SPEAR310_UART4_IRQ_MASK (1 << 11) | ||
45 | #define SPEAR310_UART5_IRQ_MASK (1 << 12) | ||
46 | #define SPEAR310_EMI_IRQ_MASK (1 << 13) | ||
47 | #define SPEAR310_TDM_HDLC_IRQ_MASK (1 << 14) | ||
48 | #define SPEAR310_RS485_0_IRQ_MASK (1 << 15) | ||
49 | #define SPEAR310_RS485_1_IRQ_MASK (1 << 16) | ||
50 | |||
51 | #define SPEAR310_SHIRQ_RAS1_MASK 0x000FF | ||
52 | #define SPEAR310_SHIRQ_RAS2_MASK 0x01F00 | ||
53 | #define SPEAR310_SHIRQ_RAS3_MASK 0x02000 | ||
54 | #define SPEAR310_SHIRQ_INTRCOMM_RAS_MASK 0x1C000 | ||
55 | |||
56 | #endif /* __MACH_SPEAR310_H */ | ||
57 | |||
58 | #endif /* CONFIG_MACH_SPEAR310 */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear320.h b/arch/arm/mach-spear3xx/include/mach/spear320.h deleted file mode 100644 index 8cfa83fa1296..000000000000 --- a/arch/arm/mach-spear3xx/include/mach/spear320.h +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear320.h | ||
3 | * | ||
4 | * SPEAr320 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR320 | ||
15 | |||
16 | #ifndef __MACH_SPEAR320_H | ||
17 | #define __MACH_SPEAR320_H | ||
18 | |||
19 | #define SPEAR320_EMI_CTRL_BASE UL(0x40000000) | ||
20 | #define SPEAR320_FSMC_BASE UL(0x4C000000) | ||
21 | #define SPEAR320_NAND_BASE UL(0x50000000) | ||
22 | #define SPEAR320_I2S_BASE UL(0x60000000) | ||
23 | #define SPEAR320_SDHCI_BASE UL(0x70000000) | ||
24 | #define SPEAR320_CLCD_BASE UL(0x90000000) | ||
25 | #define SPEAR320_PAR_PORT_BASE UL(0xA0000000) | ||
26 | #define SPEAR320_CAN0_BASE UL(0xA1000000) | ||
27 | #define SPEAR320_CAN1_BASE UL(0xA2000000) | ||
28 | #define SPEAR320_UART1_BASE UL(0xA3000000) | ||
29 | #define SPEAR320_UART2_BASE UL(0xA4000000) | ||
30 | #define SPEAR320_SSP0_BASE UL(0xA5000000) | ||
31 | #define SPEAR320_SSP1_BASE UL(0xA6000000) | ||
32 | #define SPEAR320_I2C_BASE UL(0xA7000000) | ||
33 | #define SPEAR320_PWM_BASE UL(0xA8000000) | ||
34 | #define SPEAR320_SMII0_BASE UL(0xAA000000) | ||
35 | #define SPEAR320_SMII1_BASE UL(0xAB000000) | ||
36 | #define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) | ||
37 | |||
38 | /* Interrupt registers offsets and masks */ | ||
39 | #define SPEAR320_INT_STS_MASK_REG 0x04 | ||
40 | #define SPEAR320_INT_CLR_MASK_REG 0x04 | ||
41 | #define SPEAR320_INT_ENB_MASK_REG 0x08 | ||
42 | #define SPEAR320_GPIO_IRQ_MASK (1 << 0) | ||
43 | #define SPEAR320_I2S_PLAY_IRQ_MASK (1 << 1) | ||
44 | #define SPEAR320_I2S_REC_IRQ_MASK (1 << 2) | ||
45 | #define SPEAR320_EMI_IRQ_MASK (1 << 7) | ||
46 | #define SPEAR320_CLCD_IRQ_MASK (1 << 8) | ||
47 | #define SPEAR320_SPP_IRQ_MASK (1 << 9) | ||
48 | #define SPEAR320_SDHCI_IRQ_MASK (1 << 10) | ||
49 | #define SPEAR320_CAN_U_IRQ_MASK (1 << 11) | ||
50 | #define SPEAR320_CAN_L_IRQ_MASK (1 << 12) | ||
51 | #define SPEAR320_UART1_IRQ_MASK (1 << 13) | ||
52 | #define SPEAR320_UART2_IRQ_MASK (1 << 14) | ||
53 | #define SPEAR320_SSP1_IRQ_MASK (1 << 15) | ||
54 | #define SPEAR320_SSP2_IRQ_MASK (1 << 16) | ||
55 | #define SPEAR320_SMII0_IRQ_MASK (1 << 17) | ||
56 | #define SPEAR320_MII1_SMII1_IRQ_MASK (1 << 18) | ||
57 | #define SPEAR320_WAKEUP_SMII0_IRQ_MASK (1 << 19) | ||
58 | #define SPEAR320_WAKEUP_MII1_SMII1_IRQ_MASK (1 << 20) | ||
59 | #define SPEAR320_I2C1_IRQ_MASK (1 << 21) | ||
60 | |||
61 | #define SPEAR320_SHIRQ_RAS1_MASK 0x000380 | ||
62 | #define SPEAR320_SHIRQ_RAS3_MASK 0x000007 | ||
63 | #define SPEAR320_SHIRQ_INTRCOMM_RAS_MASK 0x3FF800 | ||
64 | |||
65 | #endif /* __MACH_SPEAR320_H */ | ||
66 | |||
67 | #endif /* CONFIG_MACH_SPEAR320 */ | ||
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c index f7db66812abb..febcdd8d4e92 100644 --- a/arch/arm/mach-spear3xx/spear300.c +++ b/arch/arm/mach-spear3xx/spear300.c | |||
@@ -3,21 +3,62 @@ | |||
3 | * | 3 | * |
4 | * SPEAr300 machine source file | 4 | * SPEAr300 machine source file |
5 | * | 5 | * |
6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.kumar@st.com> |
8 | * | 8 | * |
9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #define pr_fmt(fmt) "SPEAr300: " fmt |
15 | #include <linux/amba/pl061.h> | 15 | |
16 | #include <linux/ptrace.h> | 16 | #include <linux/amba/pl08x.h> |
17 | #include <asm/irq.h> | 17 | #include <linux/of_platform.h> |
18 | #include <asm/hardware/vic.h> | ||
19 | #include <asm/mach/arch.h> | ||
18 | #include <plat/shirq.h> | 20 | #include <plat/shirq.h> |
19 | #include <mach/generic.h> | 21 | #include <mach/generic.h> |
20 | #include <mach/hardware.h> | 22 | #include <mach/spear.h> |
23 | |||
24 | /* Base address of various IPs */ | ||
25 | #define SPEAR300_TELECOM_BASE UL(0x50000000) | ||
26 | |||
27 | /* Interrupt registers offsets and masks */ | ||
28 | #define SPEAR300_INT_ENB_MASK_REG 0x54 | ||
29 | #define SPEAR300_INT_STS_MASK_REG 0x58 | ||
30 | #define SPEAR300_IT_PERS_S_IRQ_MASK (1 << 0) | ||
31 | #define SPEAR300_IT_CHANGE_S_IRQ_MASK (1 << 1) | ||
32 | #define SPEAR300_I2S_IRQ_MASK (1 << 2) | ||
33 | #define SPEAR300_TDM_IRQ_MASK (1 << 3) | ||
34 | #define SPEAR300_CAMERA_L_IRQ_MASK (1 << 4) | ||
35 | #define SPEAR300_CAMERA_F_IRQ_MASK (1 << 5) | ||
36 | #define SPEAR300_CAMERA_V_IRQ_MASK (1 << 6) | ||
37 | #define SPEAR300_KEYBOARD_IRQ_MASK (1 << 7) | ||
38 | #define SPEAR300_GPIO1_IRQ_MASK (1 << 8) | ||
39 | |||
40 | #define SPEAR300_SHIRQ_RAS1_MASK 0x1FF | ||
41 | |||
42 | #define SPEAR300_SOC_CONFIG_BASE UL(0x99000000) | ||
43 | |||
44 | |||
45 | /* SPEAr300 Virtual irq definitions */ | ||
46 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
47 | #define SPEAR300_VIRQ_IT_PERS_S (SPEAR3XX_VIRQ_START + 0) | ||
48 | #define SPEAR300_VIRQ_IT_CHANGE_S (SPEAR3XX_VIRQ_START + 1) | ||
49 | #define SPEAR300_VIRQ_I2S (SPEAR3XX_VIRQ_START + 2) | ||
50 | #define SPEAR300_VIRQ_TDM (SPEAR3XX_VIRQ_START + 3) | ||
51 | #define SPEAR300_VIRQ_CAMERA_L (SPEAR3XX_VIRQ_START + 4) | ||
52 | #define SPEAR300_VIRQ_CAMERA_F (SPEAR3XX_VIRQ_START + 5) | ||
53 | #define SPEAR300_VIRQ_CAMERA_V (SPEAR3XX_VIRQ_START + 6) | ||
54 | #define SPEAR300_VIRQ_KEYBOARD (SPEAR3XX_VIRQ_START + 7) | ||
55 | #define SPEAR300_VIRQ_GPIO1 (SPEAR3XX_VIRQ_START + 8) | ||
56 | |||
57 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
58 | #define SPEAR300_IRQ_CLCD SPEAR3XX_IRQ_GEN_RAS_3 | ||
59 | |||
60 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
61 | #define SPEAR300_IRQ_SDHCI SPEAR3XX_IRQ_INTRCOMM_RAS_ARM | ||
21 | 62 | ||
22 | /* pad multiplexing support */ | 63 | /* pad multiplexing support */ |
23 | /* muxing registers */ | 64 | /* muxing registers */ |
@@ -423,45 +464,275 @@ static struct spear_shirq shirq_ras1 = { | |||
423 | }, | 464 | }, |
424 | }; | 465 | }; |
425 | 466 | ||
426 | /* Add spear300 specific devices here */ | 467 | /* padmux devices to enable */ |
427 | /* arm gpio1 device registration */ | 468 | static struct pmx_dev *spear300_evb_pmx_devs[] = { |
428 | static struct pl061_platform_data gpio1_plat_data = { | 469 | /* spear3xx specific devices */ |
429 | .gpio_base = 8, | 470 | &spear3xx_pmx_i2c, |
430 | .irq_base = SPEAR300_GPIO1_INT_BASE, | 471 | &spear3xx_pmx_ssp_cs, |
472 | &spear3xx_pmx_ssp, | ||
473 | &spear3xx_pmx_mii, | ||
474 | &spear3xx_pmx_uart0, | ||
475 | |||
476 | /* spear300 specific devices */ | ||
477 | &spear300_pmx_fsmc_2_chips, | ||
478 | &spear300_pmx_clcd, | ||
479 | &spear300_pmx_telecom_sdhci_4bit, | ||
480 | &spear300_pmx_gpio1, | ||
431 | }; | 481 | }; |
432 | 482 | ||
433 | AMBA_APB_DEVICE(spear300_gpio1, "gpio1", 0, SPEAR300_GPIO_BASE, | 483 | /* DMAC platform data's slave info */ |
434 | {SPEAR300_VIRQ_GPIO1}, &gpio1_plat_data); | 484 | struct pl08x_channel_data spear300_dma_info[] = { |
485 | { | ||
486 | .bus_id = "uart0_rx", | ||
487 | .min_signal = 2, | ||
488 | .max_signal = 2, | ||
489 | .muxval = 0, | ||
490 | .cctl = 0, | ||
491 | .periph_buses = PL08X_AHB1, | ||
492 | }, { | ||
493 | .bus_id = "uart0_tx", | ||
494 | .min_signal = 3, | ||
495 | .max_signal = 3, | ||
496 | .muxval = 0, | ||
497 | .cctl = 0, | ||
498 | .periph_buses = PL08X_AHB1, | ||
499 | }, { | ||
500 | .bus_id = "ssp0_rx", | ||
501 | .min_signal = 8, | ||
502 | .max_signal = 8, | ||
503 | .muxval = 0, | ||
504 | .cctl = 0, | ||
505 | .periph_buses = PL08X_AHB1, | ||
506 | }, { | ||
507 | .bus_id = "ssp0_tx", | ||
508 | .min_signal = 9, | ||
509 | .max_signal = 9, | ||
510 | .muxval = 0, | ||
511 | .cctl = 0, | ||
512 | .periph_buses = PL08X_AHB1, | ||
513 | }, { | ||
514 | .bus_id = "i2c_rx", | ||
515 | .min_signal = 10, | ||
516 | .max_signal = 10, | ||
517 | .muxval = 0, | ||
518 | .cctl = 0, | ||
519 | .periph_buses = PL08X_AHB1, | ||
520 | }, { | ||
521 | .bus_id = "i2c_tx", | ||
522 | .min_signal = 11, | ||
523 | .max_signal = 11, | ||
524 | .muxval = 0, | ||
525 | .cctl = 0, | ||
526 | .periph_buses = PL08X_AHB1, | ||
527 | }, { | ||
528 | .bus_id = "irda", | ||
529 | .min_signal = 12, | ||
530 | .max_signal = 12, | ||
531 | .muxval = 0, | ||
532 | .cctl = 0, | ||
533 | .periph_buses = PL08X_AHB1, | ||
534 | }, { | ||
535 | .bus_id = "adc", | ||
536 | .min_signal = 13, | ||
537 | .max_signal = 13, | ||
538 | .muxval = 0, | ||
539 | .cctl = 0, | ||
540 | .periph_buses = PL08X_AHB1, | ||
541 | }, { | ||
542 | .bus_id = "to_jpeg", | ||
543 | .min_signal = 14, | ||
544 | .max_signal = 14, | ||
545 | .muxval = 0, | ||
546 | .cctl = 0, | ||
547 | .periph_buses = PL08X_AHB1, | ||
548 | }, { | ||
549 | .bus_id = "from_jpeg", | ||
550 | .min_signal = 15, | ||
551 | .max_signal = 15, | ||
552 | .muxval = 0, | ||
553 | .cctl = 0, | ||
554 | .periph_buses = PL08X_AHB1, | ||
555 | }, { | ||
556 | .bus_id = "ras0_rx", | ||
557 | .min_signal = 0, | ||
558 | .max_signal = 0, | ||
559 | .muxval = 1, | ||
560 | .cctl = 0, | ||
561 | .periph_buses = PL08X_AHB1, | ||
562 | }, { | ||
563 | .bus_id = "ras0_tx", | ||
564 | .min_signal = 1, | ||
565 | .max_signal = 1, | ||
566 | .muxval = 1, | ||
567 | .cctl = 0, | ||
568 | .periph_buses = PL08X_AHB1, | ||
569 | }, { | ||
570 | .bus_id = "ras1_rx", | ||
571 | .min_signal = 2, | ||
572 | .max_signal = 2, | ||
573 | .muxval = 1, | ||
574 | .cctl = 0, | ||
575 | .periph_buses = PL08X_AHB1, | ||
576 | }, { | ||
577 | .bus_id = "ras1_tx", | ||
578 | .min_signal = 3, | ||
579 | .max_signal = 3, | ||
580 | .muxval = 1, | ||
581 | .cctl = 0, | ||
582 | .periph_buses = PL08X_AHB1, | ||
583 | }, { | ||
584 | .bus_id = "ras2_rx", | ||
585 | .min_signal = 4, | ||
586 | .max_signal = 4, | ||
587 | .muxval = 1, | ||
588 | .cctl = 0, | ||
589 | .periph_buses = PL08X_AHB1, | ||
590 | }, { | ||
591 | .bus_id = "ras2_tx", | ||
592 | .min_signal = 5, | ||
593 | .max_signal = 5, | ||
594 | .muxval = 1, | ||
595 | .cctl = 0, | ||
596 | .periph_buses = PL08X_AHB1, | ||
597 | }, { | ||
598 | .bus_id = "ras3_rx", | ||
599 | .min_signal = 6, | ||
600 | .max_signal = 6, | ||
601 | .muxval = 1, | ||
602 | .cctl = 0, | ||
603 | .periph_buses = PL08X_AHB1, | ||
604 | }, { | ||
605 | .bus_id = "ras3_tx", | ||
606 | .min_signal = 7, | ||
607 | .max_signal = 7, | ||
608 | .muxval = 1, | ||
609 | .cctl = 0, | ||
610 | .periph_buses = PL08X_AHB1, | ||
611 | }, { | ||
612 | .bus_id = "ras4_rx", | ||
613 | .min_signal = 8, | ||
614 | .max_signal = 8, | ||
615 | .muxval = 1, | ||
616 | .cctl = 0, | ||
617 | .periph_buses = PL08X_AHB1, | ||
618 | }, { | ||
619 | .bus_id = "ras4_tx", | ||
620 | .min_signal = 9, | ||
621 | .max_signal = 9, | ||
622 | .muxval = 1, | ||
623 | .cctl = 0, | ||
624 | .periph_buses = PL08X_AHB1, | ||
625 | }, { | ||
626 | .bus_id = "ras5_rx", | ||
627 | .min_signal = 10, | ||
628 | .max_signal = 10, | ||
629 | .muxval = 1, | ||
630 | .cctl = 0, | ||
631 | .periph_buses = PL08X_AHB1, | ||
632 | }, { | ||
633 | .bus_id = "ras5_tx", | ||
634 | .min_signal = 11, | ||
635 | .max_signal = 11, | ||
636 | .muxval = 1, | ||
637 | .cctl = 0, | ||
638 | .periph_buses = PL08X_AHB1, | ||
639 | }, { | ||
640 | .bus_id = "ras6_rx", | ||
641 | .min_signal = 12, | ||
642 | .max_signal = 12, | ||
643 | .muxval = 1, | ||
644 | .cctl = 0, | ||
645 | .periph_buses = PL08X_AHB1, | ||
646 | }, { | ||
647 | .bus_id = "ras6_tx", | ||
648 | .min_signal = 13, | ||
649 | .max_signal = 13, | ||
650 | .muxval = 1, | ||
651 | .cctl = 0, | ||
652 | .periph_buses = PL08X_AHB1, | ||
653 | }, { | ||
654 | .bus_id = "ras7_rx", | ||
655 | .min_signal = 14, | ||
656 | .max_signal = 14, | ||
657 | .muxval = 1, | ||
658 | .cctl = 0, | ||
659 | .periph_buses = PL08X_AHB1, | ||
660 | }, { | ||
661 | .bus_id = "ras7_tx", | ||
662 | .min_signal = 15, | ||
663 | .max_signal = 15, | ||
664 | .muxval = 1, | ||
665 | .cctl = 0, | ||
666 | .periph_buses = PL08X_AHB1, | ||
667 | }, | ||
668 | }; | ||
435 | 669 | ||
436 | /* spear300 routines */ | 670 | /* Add SPEAr300 auxdata to pass platform data */ |
437 | void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | 671 | static struct of_dev_auxdata spear300_auxdata_lookup[] __initdata = { |
438 | u8 pmx_dev_count) | 672 | OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, |
673 | &pl022_plat_data), | ||
674 | OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, | ||
675 | &pl080_plat_data), | ||
676 | {} | ||
677 | }; | ||
678 | |||
679 | static void __init spear300_dt_init(void) | ||
439 | { | 680 | { |
440 | int ret = 0; | 681 | int ret = -EINVAL; |
682 | |||
683 | pl080_plat_data.slave_channels = spear300_dma_info; | ||
684 | pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear300_dma_info); | ||
441 | 685 | ||
442 | /* call spear3xx family common init function */ | 686 | of_platform_populate(NULL, of_default_bus_match_table, |
443 | spear3xx_init(); | 687 | spear300_auxdata_lookup, NULL); |
444 | 688 | ||
445 | /* shared irq registration */ | 689 | /* shared irq registration */ |
446 | shirq_ras1.regs.base = ioremap(SPEAR300_TELECOM_BASE, SZ_4K); | 690 | shirq_ras1.regs.base = ioremap(SPEAR300_TELECOM_BASE, SZ_4K); |
447 | if (shirq_ras1.regs.base) { | 691 | if (shirq_ras1.regs.base) { |
448 | ret = spear_shirq_register(&shirq_ras1); | 692 | ret = spear_shirq_register(&shirq_ras1); |
449 | if (ret) | 693 | if (ret) |
450 | printk(KERN_ERR "Error registering Shared IRQ\n"); | 694 | pr_err("Error registering Shared IRQ\n"); |
451 | } | 695 | } |
452 | 696 | ||
453 | /* pmx initialization */ | 697 | if (of_machine_is_compatible("st,spear300-evb")) { |
454 | pmx_driver.mode = pmx_mode; | 698 | /* pmx initialization */ |
455 | pmx_driver.devs = pmx_devs; | 699 | pmx_driver.mode = &spear300_photo_frame_mode; |
456 | pmx_driver.devs_count = pmx_dev_count; | 700 | pmx_driver.devs = spear300_evb_pmx_devs; |
701 | pmx_driver.devs_count = ARRAY_SIZE(spear300_evb_pmx_devs); | ||
702 | |||
703 | pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K); | ||
704 | if (pmx_driver.base) { | ||
705 | ret = pmx_register(&pmx_driver); | ||
706 | if (ret) | ||
707 | pr_err("padmux: registration failed. err no: %d\n", | ||
708 | ret); | ||
709 | /* Free Mapping, device selection already done */ | ||
710 | iounmap(pmx_driver.base); | ||
711 | } | ||
457 | 712 | ||
458 | pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K); | ||
459 | if (pmx_driver.base) { | ||
460 | ret = pmx_register(&pmx_driver); | ||
461 | if (ret) | 713 | if (ret) |
462 | printk(KERN_ERR "padmux: registration failed. err no" | 714 | pr_err("Initialization Failed"); |
463 | ": %d\n", ret); | ||
464 | /* Free Mapping, device selection already done */ | ||
465 | iounmap(pmx_driver.base); | ||
466 | } | 715 | } |
467 | } | 716 | } |
717 | |||
718 | static const char * const spear300_dt_board_compat[] = { | ||
719 | "st,spear300", | ||
720 | "st,spear300-evb", | ||
721 | NULL, | ||
722 | }; | ||
723 | |||
724 | static void __init spear300_map_io(void) | ||
725 | { | ||
726 | spear3xx_map_io(); | ||
727 | spear300_clk_init(); | ||
728 | } | ||
729 | |||
730 | DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree") | ||
731 | .map_io = spear300_map_io, | ||
732 | .init_irq = spear3xx_dt_init_irq, | ||
733 | .handle_irq = vic_handle_irq, | ||
734 | .timer = &spear3xx_timer, | ||
735 | .init_machine = spear300_dt_init, | ||
736 | .restart = spear_restart, | ||
737 | .dt_compat = spear300_dt_board_compat, | ||
738 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c deleted file mode 100644 index 3462ab9d6122..000000000000 --- a/arch/arm/mach-spear3xx/spear300_evb.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear300_evb.c | ||
3 | * | ||
4 | * SPEAr300 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach-types.h> | ||
17 | #include <mach/generic.h> | ||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | /* padmux devices to enable */ | ||
21 | static struct pmx_dev *pmx_devs[] = { | ||
22 | /* spear3xx specific devices */ | ||
23 | &spear3xx_pmx_i2c, | ||
24 | &spear3xx_pmx_ssp_cs, | ||
25 | &spear3xx_pmx_ssp, | ||
26 | &spear3xx_pmx_mii, | ||
27 | &spear3xx_pmx_uart0, | ||
28 | |||
29 | /* spear300 specific devices */ | ||
30 | &spear300_pmx_fsmc_2_chips, | ||
31 | &spear300_pmx_clcd, | ||
32 | &spear300_pmx_telecom_sdhci_4bit, | ||
33 | &spear300_pmx_gpio1, | ||
34 | }; | ||
35 | |||
36 | static struct amba_device *amba_devs[] __initdata = { | ||
37 | /* spear3xx specific devices */ | ||
38 | &spear3xx_gpio_device, | ||
39 | &spear3xx_uart_device, | ||
40 | |||
41 | /* spear300 specific devices */ | ||
42 | &spear300_gpio1_device, | ||
43 | }; | ||
44 | |||
45 | static struct platform_device *plat_devs[] __initdata = { | ||
46 | /* spear3xx specific devices */ | ||
47 | |||
48 | /* spear300 specific devices */ | ||
49 | }; | ||
50 | |||
51 | static void __init spear300_evb_init(void) | ||
52 | { | ||
53 | unsigned int i; | ||
54 | |||
55 | /* call spear300 machine init function */ | ||
56 | spear300_init(&spear300_photo_frame_mode, pmx_devs, | ||
57 | ARRAY_SIZE(pmx_devs)); | ||
58 | |||
59 | /* Add Platform Devices */ | ||
60 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
61 | |||
62 | /* Add Amba Devices */ | ||
63 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
64 | amba_device_register(amba_devs[i], &iomem_resource); | ||
65 | } | ||
66 | |||
67 | MACHINE_START(SPEAR300, "ST-SPEAR300-EVB") | ||
68 | .atag_offset = 0x100, | ||
69 | .map_io = spear3xx_map_io, | ||
70 | .init_irq = spear3xx_init_irq, | ||
71 | .handle_irq = vic_handle_irq, | ||
72 | .timer = &spear3xx_timer, | ||
73 | .init_machine = spear300_evb_init, | ||
74 | .restart = spear_restart, | ||
75 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c index febaa6fcfb6a..b26e41566b50 100644 --- a/arch/arm/mach-spear3xx/spear310.c +++ b/arch/arm/mach-spear3xx/spear310.c | |||
@@ -3,19 +3,84 @@ | |||
3 | * | 3 | * |
4 | * SPEAr310 machine source file | 4 | * SPEAr310 machine source file |
5 | * | 5 | * |
6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.kumar@st.com> |
8 | * | 8 | * |
9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/ptrace.h> | 14 | #define pr_fmt(fmt) "SPEAr310: " fmt |
15 | #include <asm/irq.h> | 15 | |
16 | #include <linux/amba/pl08x.h> | ||
17 | #include <linux/amba/serial.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | #include <asm/hardware/vic.h> | ||
20 | #include <asm/mach/arch.h> | ||
16 | #include <plat/shirq.h> | 21 | #include <plat/shirq.h> |
17 | #include <mach/generic.h> | 22 | #include <mach/generic.h> |
18 | #include <mach/hardware.h> | 23 | #include <mach/spear.h> |
24 | |||
25 | #define SPEAR310_UART1_BASE UL(0xB2000000) | ||
26 | #define SPEAR310_UART2_BASE UL(0xB2080000) | ||
27 | #define SPEAR310_UART3_BASE UL(0xB2100000) | ||
28 | #define SPEAR310_UART4_BASE UL(0xB2180000) | ||
29 | #define SPEAR310_UART5_BASE UL(0xB2200000) | ||
30 | #define SPEAR310_SOC_CONFIG_BASE UL(0xB4000000) | ||
31 | |||
32 | /* Interrupt registers offsets and masks */ | ||
33 | #define SPEAR310_INT_STS_MASK_REG 0x04 | ||
34 | #define SPEAR310_SMII0_IRQ_MASK (1 << 0) | ||
35 | #define SPEAR310_SMII1_IRQ_MASK (1 << 1) | ||
36 | #define SPEAR310_SMII2_IRQ_MASK (1 << 2) | ||
37 | #define SPEAR310_SMII3_IRQ_MASK (1 << 3) | ||
38 | #define SPEAR310_WAKEUP_SMII0_IRQ_MASK (1 << 4) | ||
39 | #define SPEAR310_WAKEUP_SMII1_IRQ_MASK (1 << 5) | ||
40 | #define SPEAR310_WAKEUP_SMII2_IRQ_MASK (1 << 6) | ||
41 | #define SPEAR310_WAKEUP_SMII3_IRQ_MASK (1 << 7) | ||
42 | #define SPEAR310_UART1_IRQ_MASK (1 << 8) | ||
43 | #define SPEAR310_UART2_IRQ_MASK (1 << 9) | ||
44 | #define SPEAR310_UART3_IRQ_MASK (1 << 10) | ||
45 | #define SPEAR310_UART4_IRQ_MASK (1 << 11) | ||
46 | #define SPEAR310_UART5_IRQ_MASK (1 << 12) | ||
47 | #define SPEAR310_EMI_IRQ_MASK (1 << 13) | ||
48 | #define SPEAR310_TDM_HDLC_IRQ_MASK (1 << 14) | ||
49 | #define SPEAR310_RS485_0_IRQ_MASK (1 << 15) | ||
50 | #define SPEAR310_RS485_1_IRQ_MASK (1 << 16) | ||
51 | |||
52 | #define SPEAR310_SHIRQ_RAS1_MASK 0x000FF | ||
53 | #define SPEAR310_SHIRQ_RAS2_MASK 0x01F00 | ||
54 | #define SPEAR310_SHIRQ_RAS3_MASK 0x02000 | ||
55 | #define SPEAR310_SHIRQ_INTRCOMM_RAS_MASK 0x1C000 | ||
56 | |||
57 | /* SPEAr310 Virtual irq definitions */ | ||
58 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
59 | #define SPEAR310_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 0) | ||
60 | #define SPEAR310_VIRQ_SMII1 (SPEAR3XX_VIRQ_START + 1) | ||
61 | #define SPEAR310_VIRQ_SMII2 (SPEAR3XX_VIRQ_START + 2) | ||
62 | #define SPEAR310_VIRQ_SMII3 (SPEAR3XX_VIRQ_START + 3) | ||
63 | #define SPEAR310_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 4) | ||
64 | #define SPEAR310_VIRQ_WAKEUP_SMII1 (SPEAR3XX_VIRQ_START + 5) | ||
65 | #define SPEAR310_VIRQ_WAKEUP_SMII2 (SPEAR3XX_VIRQ_START + 6) | ||
66 | #define SPEAR310_VIRQ_WAKEUP_SMII3 (SPEAR3XX_VIRQ_START + 7) | ||
67 | |||
68 | /* IRQs sharing IRQ_GEN_RAS_2 */ | ||
69 | #define SPEAR310_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) | ||
70 | #define SPEAR310_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) | ||
71 | #define SPEAR310_VIRQ_UART3 (SPEAR3XX_VIRQ_START + 10) | ||
72 | #define SPEAR310_VIRQ_UART4 (SPEAR3XX_VIRQ_START + 11) | ||
73 | #define SPEAR310_VIRQ_UART5 (SPEAR3XX_VIRQ_START + 12) | ||
74 | |||
75 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
76 | #define SPEAR310_VIRQ_EMI (SPEAR3XX_VIRQ_START + 13) | ||
77 | #define SPEAR310_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 14) | ||
78 | |||
79 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
80 | #define SPEAR310_VIRQ_TDM_HDLC (SPEAR3XX_VIRQ_START + 15) | ||
81 | #define SPEAR310_VIRQ_RS485_0 (SPEAR3XX_VIRQ_START + 16) | ||
82 | #define SPEAR310_VIRQ_RS485_1 (SPEAR3XX_VIRQ_START + 17) | ||
83 | |||
19 | 84 | ||
20 | /* pad multiplexing support */ | 85 | /* pad multiplexing support */ |
21 | /* muxing registers */ | 86 | /* muxing registers */ |
@@ -255,17 +320,271 @@ static struct spear_shirq shirq_intrcomm_ras = { | |||
255 | }, | 320 | }, |
256 | }; | 321 | }; |
257 | 322 | ||
258 | /* Add spear310 specific devices here */ | 323 | /* padmux devices to enable */ |
324 | static struct pmx_dev *spear310_evb_pmx_devs[] = { | ||
325 | /* spear3xx specific devices */ | ||
326 | &spear3xx_pmx_i2c, | ||
327 | &spear3xx_pmx_ssp, | ||
328 | &spear3xx_pmx_gpio_pin0, | ||
329 | &spear3xx_pmx_gpio_pin1, | ||
330 | &spear3xx_pmx_gpio_pin2, | ||
331 | &spear3xx_pmx_gpio_pin3, | ||
332 | &spear3xx_pmx_gpio_pin4, | ||
333 | &spear3xx_pmx_gpio_pin5, | ||
334 | &spear3xx_pmx_uart0, | ||
335 | |||
336 | /* spear310 specific devices */ | ||
337 | &spear310_pmx_emi_cs_0_1_4_5, | ||
338 | &spear310_pmx_emi_cs_2_3, | ||
339 | &spear310_pmx_uart1, | ||
340 | &spear310_pmx_uart2, | ||
341 | &spear310_pmx_uart3_4_5, | ||
342 | &spear310_pmx_fsmc, | ||
343 | &spear310_pmx_rs485_0_1, | ||
344 | &spear310_pmx_tdm0, | ||
345 | }; | ||
259 | 346 | ||
260 | /* spear310 routines */ | 347 | /* DMAC platform data's slave info */ |
261 | void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | 348 | struct pl08x_channel_data spear310_dma_info[] = { |
262 | u8 pmx_dev_count) | 349 | { |
350 | .bus_id = "uart0_rx", | ||
351 | .min_signal = 2, | ||
352 | .max_signal = 2, | ||
353 | .muxval = 0, | ||
354 | .cctl = 0, | ||
355 | .periph_buses = PL08X_AHB1, | ||
356 | }, { | ||
357 | .bus_id = "uart0_tx", | ||
358 | .min_signal = 3, | ||
359 | .max_signal = 3, | ||
360 | .muxval = 0, | ||
361 | .cctl = 0, | ||
362 | .periph_buses = PL08X_AHB1, | ||
363 | }, { | ||
364 | .bus_id = "ssp0_rx", | ||
365 | .min_signal = 8, | ||
366 | .max_signal = 8, | ||
367 | .muxval = 0, | ||
368 | .cctl = 0, | ||
369 | .periph_buses = PL08X_AHB1, | ||
370 | }, { | ||
371 | .bus_id = "ssp0_tx", | ||
372 | .min_signal = 9, | ||
373 | .max_signal = 9, | ||
374 | .muxval = 0, | ||
375 | .cctl = 0, | ||
376 | .periph_buses = PL08X_AHB1, | ||
377 | }, { | ||
378 | .bus_id = "i2c_rx", | ||
379 | .min_signal = 10, | ||
380 | .max_signal = 10, | ||
381 | .muxval = 0, | ||
382 | .cctl = 0, | ||
383 | .periph_buses = PL08X_AHB1, | ||
384 | }, { | ||
385 | .bus_id = "i2c_tx", | ||
386 | .min_signal = 11, | ||
387 | .max_signal = 11, | ||
388 | .muxval = 0, | ||
389 | .cctl = 0, | ||
390 | .periph_buses = PL08X_AHB1, | ||
391 | }, { | ||
392 | .bus_id = "irda", | ||
393 | .min_signal = 12, | ||
394 | .max_signal = 12, | ||
395 | .muxval = 0, | ||
396 | .cctl = 0, | ||
397 | .periph_buses = PL08X_AHB1, | ||
398 | }, { | ||
399 | .bus_id = "adc", | ||
400 | .min_signal = 13, | ||
401 | .max_signal = 13, | ||
402 | .muxval = 0, | ||
403 | .cctl = 0, | ||
404 | .periph_buses = PL08X_AHB1, | ||
405 | }, { | ||
406 | .bus_id = "to_jpeg", | ||
407 | .min_signal = 14, | ||
408 | .max_signal = 14, | ||
409 | .muxval = 0, | ||
410 | .cctl = 0, | ||
411 | .periph_buses = PL08X_AHB1, | ||
412 | }, { | ||
413 | .bus_id = "from_jpeg", | ||
414 | .min_signal = 15, | ||
415 | .max_signal = 15, | ||
416 | .muxval = 0, | ||
417 | .cctl = 0, | ||
418 | .periph_buses = PL08X_AHB1, | ||
419 | }, { | ||
420 | .bus_id = "uart1_rx", | ||
421 | .min_signal = 0, | ||
422 | .max_signal = 0, | ||
423 | .muxval = 1, | ||
424 | .cctl = 0, | ||
425 | .periph_buses = PL08X_AHB1, | ||
426 | }, { | ||
427 | .bus_id = "uart1_tx", | ||
428 | .min_signal = 1, | ||
429 | .max_signal = 1, | ||
430 | .muxval = 1, | ||
431 | .cctl = 0, | ||
432 | .periph_buses = PL08X_AHB1, | ||
433 | }, { | ||
434 | .bus_id = "uart2_rx", | ||
435 | .min_signal = 2, | ||
436 | .max_signal = 2, | ||
437 | .muxval = 1, | ||
438 | .cctl = 0, | ||
439 | .periph_buses = PL08X_AHB1, | ||
440 | }, { | ||
441 | .bus_id = "uart2_tx", | ||
442 | .min_signal = 3, | ||
443 | .max_signal = 3, | ||
444 | .muxval = 1, | ||
445 | .cctl = 0, | ||
446 | .periph_buses = PL08X_AHB1, | ||
447 | }, { | ||
448 | .bus_id = "uart3_rx", | ||
449 | .min_signal = 4, | ||
450 | .max_signal = 4, | ||
451 | .muxval = 1, | ||
452 | .cctl = 0, | ||
453 | .periph_buses = PL08X_AHB1, | ||
454 | }, { | ||
455 | .bus_id = "uart3_tx", | ||
456 | .min_signal = 5, | ||
457 | .max_signal = 5, | ||
458 | .muxval = 1, | ||
459 | .cctl = 0, | ||
460 | .periph_buses = PL08X_AHB1, | ||
461 | }, { | ||
462 | .bus_id = "uart4_rx", | ||
463 | .min_signal = 6, | ||
464 | .max_signal = 6, | ||
465 | .muxval = 1, | ||
466 | .cctl = 0, | ||
467 | .periph_buses = PL08X_AHB1, | ||
468 | }, { | ||
469 | .bus_id = "uart4_tx", | ||
470 | .min_signal = 7, | ||
471 | .max_signal = 7, | ||
472 | .muxval = 1, | ||
473 | .cctl = 0, | ||
474 | .periph_buses = PL08X_AHB1, | ||
475 | }, { | ||
476 | .bus_id = "uart5_rx", | ||
477 | .min_signal = 8, | ||
478 | .max_signal = 8, | ||
479 | .muxval = 1, | ||
480 | .cctl = 0, | ||
481 | .periph_buses = PL08X_AHB1, | ||
482 | }, { | ||
483 | .bus_id = "uart5_tx", | ||
484 | .min_signal = 9, | ||
485 | .max_signal = 9, | ||
486 | .muxval = 1, | ||
487 | .cctl = 0, | ||
488 | .periph_buses = PL08X_AHB1, | ||
489 | }, { | ||
490 | .bus_id = "ras5_rx", | ||
491 | .min_signal = 10, | ||
492 | .max_signal = 10, | ||
493 | .muxval = 1, | ||
494 | .cctl = 0, | ||
495 | .periph_buses = PL08X_AHB1, | ||
496 | }, { | ||
497 | .bus_id = "ras5_tx", | ||
498 | .min_signal = 11, | ||
499 | .max_signal = 11, | ||
500 | .muxval = 1, | ||
501 | .cctl = 0, | ||
502 | .periph_buses = PL08X_AHB1, | ||
503 | }, { | ||
504 | .bus_id = "ras6_rx", | ||
505 | .min_signal = 12, | ||
506 | .max_signal = 12, | ||
507 | .muxval = 1, | ||
508 | .cctl = 0, | ||
509 | .periph_buses = PL08X_AHB1, | ||
510 | }, { | ||
511 | .bus_id = "ras6_tx", | ||
512 | .min_signal = 13, | ||
513 | .max_signal = 13, | ||
514 | .muxval = 1, | ||
515 | .cctl = 0, | ||
516 | .periph_buses = PL08X_AHB1, | ||
517 | }, { | ||
518 | .bus_id = "ras7_rx", | ||
519 | .min_signal = 14, | ||
520 | .max_signal = 14, | ||
521 | .muxval = 1, | ||
522 | .cctl = 0, | ||
523 | .periph_buses = PL08X_AHB1, | ||
524 | }, { | ||
525 | .bus_id = "ras7_tx", | ||
526 | .min_signal = 15, | ||
527 | .max_signal = 15, | ||
528 | .muxval = 1, | ||
529 | .cctl = 0, | ||
530 | .periph_buses = PL08X_AHB1, | ||
531 | }, | ||
532 | }; | ||
533 | |||
534 | /* uart devices plat data */ | ||
535 | static struct amba_pl011_data spear310_uart_data[] = { | ||
536 | { | ||
537 | .dma_filter = pl08x_filter_id, | ||
538 | .dma_tx_param = "uart1_tx", | ||
539 | .dma_rx_param = "uart1_rx", | ||
540 | }, { | ||
541 | .dma_filter = pl08x_filter_id, | ||
542 | .dma_tx_param = "uart2_tx", | ||
543 | .dma_rx_param = "uart2_rx", | ||
544 | }, { | ||
545 | .dma_filter = pl08x_filter_id, | ||
546 | .dma_tx_param = "uart3_tx", | ||
547 | .dma_rx_param = "uart3_rx", | ||
548 | }, { | ||
549 | .dma_filter = pl08x_filter_id, | ||
550 | .dma_tx_param = "uart4_tx", | ||
551 | .dma_rx_param = "uart4_rx", | ||
552 | }, { | ||
553 | .dma_filter = pl08x_filter_id, | ||
554 | .dma_tx_param = "uart5_tx", | ||
555 | .dma_rx_param = "uart5_rx", | ||
556 | }, | ||
557 | }; | ||
558 | |||
559 | /* Add SPEAr310 auxdata to pass platform data */ | ||
560 | static struct of_dev_auxdata spear310_auxdata_lookup[] __initdata = { | ||
561 | OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, | ||
562 | &pl022_plat_data), | ||
563 | OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, | ||
564 | &pl080_plat_data), | ||
565 | OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART1_BASE, NULL, | ||
566 | &spear310_uart_data[0]), | ||
567 | OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART2_BASE, NULL, | ||
568 | &spear310_uart_data[1]), | ||
569 | OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART3_BASE, NULL, | ||
570 | &spear310_uart_data[2]), | ||
571 | OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART4_BASE, NULL, | ||
572 | &spear310_uart_data[3]), | ||
573 | OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART5_BASE, NULL, | ||
574 | &spear310_uart_data[4]), | ||
575 | {} | ||
576 | }; | ||
577 | |||
578 | static void __init spear310_dt_init(void) | ||
263 | { | 579 | { |
264 | void __iomem *base; | 580 | void __iomem *base; |
265 | int ret = 0; | 581 | int ret = 0; |
266 | 582 | ||
267 | /* call spear3xx family common init function */ | 583 | pl080_plat_data.slave_channels = spear310_dma_info; |
268 | spear3xx_init(); | 584 | pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear310_dma_info); |
585 | |||
586 | of_platform_populate(NULL, of_default_bus_match_table, | ||
587 | spear310_auxdata_lookup, NULL); | ||
269 | 588 | ||
270 | /* shared irq registration */ | 589 | /* shared irq registration */ |
271 | base = ioremap(SPEAR310_SOC_CONFIG_BASE, SZ_4K); | 590 | base = ioremap(SPEAR310_SOC_CONFIG_BASE, SZ_4K); |
@@ -274,35 +593,59 @@ void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | |||
274 | shirq_ras1.regs.base = base; | 593 | shirq_ras1.regs.base = base; |
275 | ret = spear_shirq_register(&shirq_ras1); | 594 | ret = spear_shirq_register(&shirq_ras1); |
276 | if (ret) | 595 | if (ret) |
277 | printk(KERN_ERR "Error registering Shared IRQ 1\n"); | 596 | pr_err("Error registering Shared IRQ 1\n"); |
278 | 597 | ||
279 | /* shirq 2 */ | 598 | /* shirq 2 */ |
280 | shirq_ras2.regs.base = base; | 599 | shirq_ras2.regs.base = base; |
281 | ret = spear_shirq_register(&shirq_ras2); | 600 | ret = spear_shirq_register(&shirq_ras2); |
282 | if (ret) | 601 | if (ret) |
283 | printk(KERN_ERR "Error registering Shared IRQ 2\n"); | 602 | pr_err("Error registering Shared IRQ 2\n"); |
284 | 603 | ||
285 | /* shirq 3 */ | 604 | /* shirq 3 */ |
286 | shirq_ras3.regs.base = base; | 605 | shirq_ras3.regs.base = base; |
287 | ret = spear_shirq_register(&shirq_ras3); | 606 | ret = spear_shirq_register(&shirq_ras3); |
288 | if (ret) | 607 | if (ret) |
289 | printk(KERN_ERR "Error registering Shared IRQ 3\n"); | 608 | pr_err("Error registering Shared IRQ 3\n"); |
290 | 609 | ||
291 | /* shirq 4 */ | 610 | /* shirq 4 */ |
292 | shirq_intrcomm_ras.regs.base = base; | 611 | shirq_intrcomm_ras.regs.base = base; |
293 | ret = spear_shirq_register(&shirq_intrcomm_ras); | 612 | ret = spear_shirq_register(&shirq_intrcomm_ras); |
294 | if (ret) | 613 | if (ret) |
295 | printk(KERN_ERR "Error registering Shared IRQ 4\n"); | 614 | pr_err("Error registering Shared IRQ 4\n"); |
615 | } | ||
616 | |||
617 | if (of_machine_is_compatible("st,spear310-evb")) { | ||
618 | /* pmx initialization */ | ||
619 | pmx_driver.base = base; | ||
620 | pmx_driver.mode = NULL; | ||
621 | pmx_driver.devs = spear310_evb_pmx_devs; | ||
622 | pmx_driver.devs_count = ARRAY_SIZE(spear310_evb_pmx_devs); | ||
623 | |||
624 | ret = pmx_register(&pmx_driver); | ||
625 | if (ret) | ||
626 | pr_err("padmux: registration failed. err no: %d\n", | ||
627 | ret); | ||
296 | } | 628 | } |
629 | } | ||
297 | 630 | ||
298 | /* pmx initialization */ | 631 | static const char * const spear310_dt_board_compat[] = { |
299 | pmx_driver.base = base; | 632 | "st,spear310", |
300 | pmx_driver.mode = pmx_mode; | 633 | "st,spear310-evb", |
301 | pmx_driver.devs = pmx_devs; | 634 | NULL, |
302 | pmx_driver.devs_count = pmx_dev_count; | 635 | }; |
303 | 636 | ||
304 | ret = pmx_register(&pmx_driver); | 637 | static void __init spear310_map_io(void) |
305 | if (ret) | 638 | { |
306 | printk(KERN_ERR "padmux: registration failed. err no: %d\n", | 639 | spear3xx_map_io(); |
307 | ret); | 640 | spear310_clk_init(); |
308 | } | 641 | } |
642 | |||
643 | DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree") | ||
644 | .map_io = spear310_map_io, | ||
645 | .init_irq = spear3xx_dt_init_irq, | ||
646 | .handle_irq = vic_handle_irq, | ||
647 | .timer = &spear3xx_timer, | ||
648 | .init_machine = spear310_dt_init, | ||
649 | .restart = spear_restart, | ||
650 | .dt_compat = spear310_dt_board_compat, | ||
651 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c deleted file mode 100644 index f92c4993f65a..000000000000 --- a/arch/arm/mach-spear3xx/spear310_evb.c +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear310_evb.c | ||
3 | * | ||
4 | * SPEAr310 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach-types.h> | ||
17 | #include <mach/generic.h> | ||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | /* padmux devices to enable */ | ||
21 | static struct pmx_dev *pmx_devs[] = { | ||
22 | /* spear3xx specific devices */ | ||
23 | &spear3xx_pmx_i2c, | ||
24 | &spear3xx_pmx_ssp, | ||
25 | &spear3xx_pmx_gpio_pin0, | ||
26 | &spear3xx_pmx_gpio_pin1, | ||
27 | &spear3xx_pmx_gpio_pin2, | ||
28 | &spear3xx_pmx_gpio_pin3, | ||
29 | &spear3xx_pmx_gpio_pin4, | ||
30 | &spear3xx_pmx_gpio_pin5, | ||
31 | &spear3xx_pmx_uart0, | ||
32 | |||
33 | /* spear310 specific devices */ | ||
34 | &spear310_pmx_emi_cs_0_1_4_5, | ||
35 | &spear310_pmx_emi_cs_2_3, | ||
36 | &spear310_pmx_uart1, | ||
37 | &spear310_pmx_uart2, | ||
38 | &spear310_pmx_uart3_4_5, | ||
39 | &spear310_pmx_fsmc, | ||
40 | &spear310_pmx_rs485_0_1, | ||
41 | &spear310_pmx_tdm0, | ||
42 | }; | ||
43 | |||
44 | static struct amba_device *amba_devs[] __initdata = { | ||
45 | /* spear3xx specific devices */ | ||
46 | &spear3xx_gpio_device, | ||
47 | &spear3xx_uart_device, | ||
48 | |||
49 | /* spear310 specific devices */ | ||
50 | }; | ||
51 | |||
52 | static struct platform_device *plat_devs[] __initdata = { | ||
53 | /* spear3xx specific devices */ | ||
54 | |||
55 | /* spear310 specific devices */ | ||
56 | }; | ||
57 | |||
58 | static void __init spear310_evb_init(void) | ||
59 | { | ||
60 | unsigned int i; | ||
61 | |||
62 | /* call spear310 machine init function */ | ||
63 | spear310_init(NULL, pmx_devs, ARRAY_SIZE(pmx_devs)); | ||
64 | |||
65 | /* Add Platform Devices */ | ||
66 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
67 | |||
68 | /* Add Amba Devices */ | ||
69 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
70 | amba_device_register(amba_devs[i], &iomem_resource); | ||
71 | } | ||
72 | |||
73 | MACHINE_START(SPEAR310, "ST-SPEAR310-EVB") | ||
74 | .atag_offset = 0x100, | ||
75 | .map_io = spear3xx_map_io, | ||
76 | .init_irq = spear3xx_init_irq, | ||
77 | .handle_irq = vic_handle_irq, | ||
78 | .timer = &spear3xx_timer, | ||
79 | .init_machine = spear310_evb_init, | ||
80 | .restart = spear_restart, | ||
81 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index deaaf199612c..2f5979b0c169 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c | |||
@@ -3,19 +3,85 @@ | |||
3 | * | 3 | * |
4 | * SPEAr320 machine source file | 4 | * SPEAr320 machine source file |
5 | * | 5 | * |
6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.kumar@st.com> |
8 | * | 8 | * |
9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/ptrace.h> | 14 | #define pr_fmt(fmt) "SPEAr320: " fmt |
15 | #include <asm/irq.h> | 15 | |
16 | #include <linux/amba/pl022.h> | ||
17 | #include <linux/amba/pl08x.h> | ||
18 | #include <linux/amba/serial.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | #include <asm/hardware/vic.h> | ||
21 | #include <asm/mach/arch.h> | ||
16 | #include <plat/shirq.h> | 22 | #include <plat/shirq.h> |
17 | #include <mach/generic.h> | 23 | #include <mach/generic.h> |
18 | #include <mach/hardware.h> | 24 | #include <mach/spear.h> |
25 | |||
26 | #define SPEAR320_UART1_BASE UL(0xA3000000) | ||
27 | #define SPEAR320_UART2_BASE UL(0xA4000000) | ||
28 | #define SPEAR320_SSP0_BASE UL(0xA5000000) | ||
29 | #define SPEAR320_SSP1_BASE UL(0xA6000000) | ||
30 | #define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) | ||
31 | |||
32 | /* Interrupt registers offsets and masks */ | ||
33 | #define SPEAR320_INT_STS_MASK_REG 0x04 | ||
34 | #define SPEAR320_INT_CLR_MASK_REG 0x04 | ||
35 | #define SPEAR320_INT_ENB_MASK_REG 0x08 | ||
36 | #define SPEAR320_GPIO_IRQ_MASK (1 << 0) | ||
37 | #define SPEAR320_I2S_PLAY_IRQ_MASK (1 << 1) | ||
38 | #define SPEAR320_I2S_REC_IRQ_MASK (1 << 2) | ||
39 | #define SPEAR320_EMI_IRQ_MASK (1 << 7) | ||
40 | #define SPEAR320_CLCD_IRQ_MASK (1 << 8) | ||
41 | #define SPEAR320_SPP_IRQ_MASK (1 << 9) | ||
42 | #define SPEAR320_SDHCI_IRQ_MASK (1 << 10) | ||
43 | #define SPEAR320_CAN_U_IRQ_MASK (1 << 11) | ||
44 | #define SPEAR320_CAN_L_IRQ_MASK (1 << 12) | ||
45 | #define SPEAR320_UART1_IRQ_MASK (1 << 13) | ||
46 | #define SPEAR320_UART2_IRQ_MASK (1 << 14) | ||
47 | #define SPEAR320_SSP1_IRQ_MASK (1 << 15) | ||
48 | #define SPEAR320_SSP2_IRQ_MASK (1 << 16) | ||
49 | #define SPEAR320_SMII0_IRQ_MASK (1 << 17) | ||
50 | #define SPEAR320_MII1_SMII1_IRQ_MASK (1 << 18) | ||
51 | #define SPEAR320_WAKEUP_SMII0_IRQ_MASK (1 << 19) | ||
52 | #define SPEAR320_WAKEUP_MII1_SMII1_IRQ_MASK (1 << 20) | ||
53 | #define SPEAR320_I2C1_IRQ_MASK (1 << 21) | ||
54 | |||
55 | #define SPEAR320_SHIRQ_RAS1_MASK 0x000380 | ||
56 | #define SPEAR320_SHIRQ_RAS3_MASK 0x000007 | ||
57 | #define SPEAR320_SHIRQ_INTRCOMM_RAS_MASK 0x3FF800 | ||
58 | |||
59 | /* SPEAr320 Virtual irq definitions */ | ||
60 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
61 | #define SPEAR320_VIRQ_EMI (SPEAR3XX_VIRQ_START + 0) | ||
62 | #define SPEAR320_VIRQ_CLCD (SPEAR3XX_VIRQ_START + 1) | ||
63 | #define SPEAR320_VIRQ_SPP (SPEAR3XX_VIRQ_START + 2) | ||
64 | |||
65 | /* IRQs sharing IRQ_GEN_RAS_2 */ | ||
66 | #define SPEAR320_IRQ_SDHCI SPEAR3XX_IRQ_GEN_RAS_2 | ||
67 | |||
68 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
69 | #define SPEAR320_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 3) | ||
70 | #define SPEAR320_VIRQ_I2S_PLAY (SPEAR3XX_VIRQ_START + 4) | ||
71 | #define SPEAR320_VIRQ_I2S_REC (SPEAR3XX_VIRQ_START + 5) | ||
72 | |||
73 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
74 | #define SPEAR320_VIRQ_CANU (SPEAR3XX_VIRQ_START + 6) | ||
75 | #define SPEAR320_VIRQ_CANL (SPEAR3XX_VIRQ_START + 7) | ||
76 | #define SPEAR320_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) | ||
77 | #define SPEAR320_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) | ||
78 | #define SPEAR320_VIRQ_SSP1 (SPEAR3XX_VIRQ_START + 10) | ||
79 | #define SPEAR320_VIRQ_SSP2 (SPEAR3XX_VIRQ_START + 11) | ||
80 | #define SPEAR320_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 12) | ||
81 | #define SPEAR320_VIRQ_MII1_SMII1 (SPEAR3XX_VIRQ_START + 13) | ||
82 | #define SPEAR320_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 14) | ||
83 | #define SPEAR320_VIRQ_WAKEUP_MII1_SMII1 (SPEAR3XX_VIRQ_START + 15) | ||
84 | #define SPEAR320_VIRQ_I2C1 (SPEAR3XX_VIRQ_START + 16) | ||
19 | 85 | ||
20 | /* pad multiplexing support */ | 86 | /* pad multiplexing support */ |
21 | /* muxing registers */ | 87 | /* muxing registers */ |
@@ -508,17 +574,271 @@ static struct spear_shirq shirq_intrcomm_ras = { | |||
508 | }, | 574 | }, |
509 | }; | 575 | }; |
510 | 576 | ||
511 | /* Add spear320 specific devices here */ | 577 | /* padmux devices to enable */ |
578 | static struct pmx_dev *spear320_evb_pmx_devs[] = { | ||
579 | /* spear3xx specific devices */ | ||
580 | &spear3xx_pmx_i2c, | ||
581 | &spear3xx_pmx_ssp, | ||
582 | &spear3xx_pmx_mii, | ||
583 | &spear3xx_pmx_uart0, | ||
584 | |||
585 | /* spear320 specific devices */ | ||
586 | &spear320_pmx_fsmc, | ||
587 | &spear320_pmx_sdhci, | ||
588 | &spear320_pmx_i2s, | ||
589 | &spear320_pmx_uart1, | ||
590 | &spear320_pmx_uart2, | ||
591 | &spear320_pmx_can, | ||
592 | &spear320_pmx_pwm0, | ||
593 | &spear320_pmx_pwm1, | ||
594 | &spear320_pmx_pwm2, | ||
595 | &spear320_pmx_mii1, | ||
596 | }; | ||
597 | |||
598 | /* DMAC platform data's slave info */ | ||
599 | struct pl08x_channel_data spear320_dma_info[] = { | ||
600 | { | ||
601 | .bus_id = "uart0_rx", | ||
602 | .min_signal = 2, | ||
603 | .max_signal = 2, | ||
604 | .muxval = 0, | ||
605 | .cctl = 0, | ||
606 | .periph_buses = PL08X_AHB1, | ||
607 | }, { | ||
608 | .bus_id = "uart0_tx", | ||
609 | .min_signal = 3, | ||
610 | .max_signal = 3, | ||
611 | .muxval = 0, | ||
612 | .cctl = 0, | ||
613 | .periph_buses = PL08X_AHB1, | ||
614 | }, { | ||
615 | .bus_id = "ssp0_rx", | ||
616 | .min_signal = 8, | ||
617 | .max_signal = 8, | ||
618 | .muxval = 0, | ||
619 | .cctl = 0, | ||
620 | .periph_buses = PL08X_AHB1, | ||
621 | }, { | ||
622 | .bus_id = "ssp0_tx", | ||
623 | .min_signal = 9, | ||
624 | .max_signal = 9, | ||
625 | .muxval = 0, | ||
626 | .cctl = 0, | ||
627 | .periph_buses = PL08X_AHB1, | ||
628 | }, { | ||
629 | .bus_id = "i2c0_rx", | ||
630 | .min_signal = 10, | ||
631 | .max_signal = 10, | ||
632 | .muxval = 0, | ||
633 | .cctl = 0, | ||
634 | .periph_buses = PL08X_AHB1, | ||
635 | }, { | ||
636 | .bus_id = "i2c0_tx", | ||
637 | .min_signal = 11, | ||
638 | .max_signal = 11, | ||
639 | .muxval = 0, | ||
640 | .cctl = 0, | ||
641 | .periph_buses = PL08X_AHB1, | ||
642 | }, { | ||
643 | .bus_id = "irda", | ||
644 | .min_signal = 12, | ||
645 | .max_signal = 12, | ||
646 | .muxval = 0, | ||
647 | .cctl = 0, | ||
648 | .periph_buses = PL08X_AHB1, | ||
649 | }, { | ||
650 | .bus_id = "adc", | ||
651 | .min_signal = 13, | ||
652 | .max_signal = 13, | ||
653 | .muxval = 0, | ||
654 | .cctl = 0, | ||
655 | .periph_buses = PL08X_AHB1, | ||
656 | }, { | ||
657 | .bus_id = "to_jpeg", | ||
658 | .min_signal = 14, | ||
659 | .max_signal = 14, | ||
660 | .muxval = 0, | ||
661 | .cctl = 0, | ||
662 | .periph_buses = PL08X_AHB1, | ||
663 | }, { | ||
664 | .bus_id = "from_jpeg", | ||
665 | .min_signal = 15, | ||
666 | .max_signal = 15, | ||
667 | .muxval = 0, | ||
668 | .cctl = 0, | ||
669 | .periph_buses = PL08X_AHB1, | ||
670 | }, { | ||
671 | .bus_id = "ssp1_rx", | ||
672 | .min_signal = 0, | ||
673 | .max_signal = 0, | ||
674 | .muxval = 1, | ||
675 | .cctl = 0, | ||
676 | .periph_buses = PL08X_AHB2, | ||
677 | }, { | ||
678 | .bus_id = "ssp1_tx", | ||
679 | .min_signal = 1, | ||
680 | .max_signal = 1, | ||
681 | .muxval = 1, | ||
682 | .cctl = 0, | ||
683 | .periph_buses = PL08X_AHB2, | ||
684 | }, { | ||
685 | .bus_id = "ssp2_rx", | ||
686 | .min_signal = 2, | ||
687 | .max_signal = 2, | ||
688 | .muxval = 1, | ||
689 | .cctl = 0, | ||
690 | .periph_buses = PL08X_AHB2, | ||
691 | }, { | ||
692 | .bus_id = "ssp2_tx", | ||
693 | .min_signal = 3, | ||
694 | .max_signal = 3, | ||
695 | .muxval = 1, | ||
696 | .cctl = 0, | ||
697 | .periph_buses = PL08X_AHB2, | ||
698 | }, { | ||
699 | .bus_id = "uart1_rx", | ||
700 | .min_signal = 4, | ||
701 | .max_signal = 4, | ||
702 | .muxval = 1, | ||
703 | .cctl = 0, | ||
704 | .periph_buses = PL08X_AHB2, | ||
705 | }, { | ||
706 | .bus_id = "uart1_tx", | ||
707 | .min_signal = 5, | ||
708 | .max_signal = 5, | ||
709 | .muxval = 1, | ||
710 | .cctl = 0, | ||
711 | .periph_buses = PL08X_AHB2, | ||
712 | }, { | ||
713 | .bus_id = "uart2_rx", | ||
714 | .min_signal = 6, | ||
715 | .max_signal = 6, | ||
716 | .muxval = 1, | ||
717 | .cctl = 0, | ||
718 | .periph_buses = PL08X_AHB2, | ||
719 | }, { | ||
720 | .bus_id = "uart2_tx", | ||
721 | .min_signal = 7, | ||
722 | .max_signal = 7, | ||
723 | .muxval = 1, | ||
724 | .cctl = 0, | ||
725 | .periph_buses = PL08X_AHB2, | ||
726 | }, { | ||
727 | .bus_id = "i2c1_rx", | ||
728 | .min_signal = 8, | ||
729 | .max_signal = 8, | ||
730 | .muxval = 1, | ||
731 | .cctl = 0, | ||
732 | .periph_buses = PL08X_AHB2, | ||
733 | }, { | ||
734 | .bus_id = "i2c1_tx", | ||
735 | .min_signal = 9, | ||
736 | .max_signal = 9, | ||
737 | .muxval = 1, | ||
738 | .cctl = 0, | ||
739 | .periph_buses = PL08X_AHB2, | ||
740 | }, { | ||
741 | .bus_id = "i2c2_rx", | ||
742 | .min_signal = 10, | ||
743 | .max_signal = 10, | ||
744 | .muxval = 1, | ||
745 | .cctl = 0, | ||
746 | .periph_buses = PL08X_AHB2, | ||
747 | }, { | ||
748 | .bus_id = "i2c2_tx", | ||
749 | .min_signal = 11, | ||
750 | .max_signal = 11, | ||
751 | .muxval = 1, | ||
752 | .cctl = 0, | ||
753 | .periph_buses = PL08X_AHB2, | ||
754 | }, { | ||
755 | .bus_id = "i2s_rx", | ||
756 | .min_signal = 12, | ||
757 | .max_signal = 12, | ||
758 | .muxval = 1, | ||
759 | .cctl = 0, | ||
760 | .periph_buses = PL08X_AHB2, | ||
761 | }, { | ||
762 | .bus_id = "i2s_tx", | ||
763 | .min_signal = 13, | ||
764 | .max_signal = 13, | ||
765 | .muxval = 1, | ||
766 | .cctl = 0, | ||
767 | .periph_buses = PL08X_AHB2, | ||
768 | }, { | ||
769 | .bus_id = "rs485_rx", | ||
770 | .min_signal = 14, | ||
771 | .max_signal = 14, | ||
772 | .muxval = 1, | ||
773 | .cctl = 0, | ||
774 | .periph_buses = PL08X_AHB2, | ||
775 | }, { | ||
776 | .bus_id = "rs485_tx", | ||
777 | .min_signal = 15, | ||
778 | .max_signal = 15, | ||
779 | .muxval = 1, | ||
780 | .cctl = 0, | ||
781 | .periph_buses = PL08X_AHB2, | ||
782 | }, | ||
783 | }; | ||
784 | |||
785 | static struct pl022_ssp_controller spear320_ssp_data[] = { | ||
786 | { | ||
787 | .bus_id = 1, | ||
788 | .enable_dma = 1, | ||
789 | .dma_filter = pl08x_filter_id, | ||
790 | .dma_tx_param = "ssp1_tx", | ||
791 | .dma_rx_param = "ssp1_rx", | ||
792 | .num_chipselect = 2, | ||
793 | }, { | ||
794 | .bus_id = 2, | ||
795 | .enable_dma = 1, | ||
796 | .dma_filter = pl08x_filter_id, | ||
797 | .dma_tx_param = "ssp2_tx", | ||
798 | .dma_rx_param = "ssp2_rx", | ||
799 | .num_chipselect = 2, | ||
800 | } | ||
801 | }; | ||
802 | |||
803 | static struct amba_pl011_data spear320_uart_data[] = { | ||
804 | { | ||
805 | .dma_filter = pl08x_filter_id, | ||
806 | .dma_tx_param = "uart1_tx", | ||
807 | .dma_rx_param = "uart1_rx", | ||
808 | }, { | ||
809 | .dma_filter = pl08x_filter_id, | ||
810 | .dma_tx_param = "uart2_tx", | ||
811 | .dma_rx_param = "uart2_rx", | ||
812 | }, | ||
813 | }; | ||
512 | 814 | ||
513 | /* spear320 routines */ | 815 | /* Add SPEAr310 auxdata to pass platform data */ |
514 | void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | 816 | static struct of_dev_auxdata spear320_auxdata_lookup[] __initdata = { |
515 | u8 pmx_dev_count) | 817 | OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, |
818 | &pl022_plat_data), | ||
819 | OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, | ||
820 | &pl080_plat_data), | ||
821 | OF_DEV_AUXDATA("arm,pl022", SPEAR320_SSP0_BASE, NULL, | ||
822 | &spear320_ssp_data[0]), | ||
823 | OF_DEV_AUXDATA("arm,pl022", SPEAR320_SSP1_BASE, NULL, | ||
824 | &spear320_ssp_data[1]), | ||
825 | OF_DEV_AUXDATA("arm,pl011", SPEAR320_UART1_BASE, NULL, | ||
826 | &spear320_uart_data[0]), | ||
827 | OF_DEV_AUXDATA("arm,pl011", SPEAR320_UART2_BASE, NULL, | ||
828 | &spear320_uart_data[1]), | ||
829 | {} | ||
830 | }; | ||
831 | |||
832 | static void __init spear320_dt_init(void) | ||
516 | { | 833 | { |
517 | void __iomem *base; | 834 | void __iomem *base; |
518 | int ret = 0; | 835 | int ret = 0; |
519 | 836 | ||
520 | /* call spear3xx family common init function */ | 837 | pl080_plat_data.slave_channels = spear320_dma_info; |
521 | spear3xx_init(); | 838 | pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear320_dma_info); |
839 | |||
840 | of_platform_populate(NULL, of_default_bus_match_table, | ||
841 | spear320_auxdata_lookup, NULL); | ||
522 | 842 | ||
523 | /* shared irq registration */ | 843 | /* shared irq registration */ |
524 | base = ioremap(SPEAR320_SOC_CONFIG_BASE, SZ_4K); | 844 | base = ioremap(SPEAR320_SOC_CONFIG_BASE, SZ_4K); |
@@ -527,29 +847,53 @@ void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, | |||
527 | shirq_ras1.regs.base = base; | 847 | shirq_ras1.regs.base = base; |
528 | ret = spear_shirq_register(&shirq_ras1); | 848 | ret = spear_shirq_register(&shirq_ras1); |
529 | if (ret) | 849 | if (ret) |
530 | printk(KERN_ERR "Error registering Shared IRQ 1\n"); | 850 | pr_err("Error registering Shared IRQ 1\n"); |
531 | 851 | ||
532 | /* shirq 3 */ | 852 | /* shirq 3 */ |
533 | shirq_ras3.regs.base = base; | 853 | shirq_ras3.regs.base = base; |
534 | ret = spear_shirq_register(&shirq_ras3); | 854 | ret = spear_shirq_register(&shirq_ras3); |
535 | if (ret) | 855 | if (ret) |
536 | printk(KERN_ERR "Error registering Shared IRQ 3\n"); | 856 | pr_err("Error registering Shared IRQ 3\n"); |
537 | 857 | ||
538 | /* shirq 4 */ | 858 | /* shirq 4 */ |
539 | shirq_intrcomm_ras.regs.base = base; | 859 | shirq_intrcomm_ras.regs.base = base; |
540 | ret = spear_shirq_register(&shirq_intrcomm_ras); | 860 | ret = spear_shirq_register(&shirq_intrcomm_ras); |
541 | if (ret) | 861 | if (ret) |
542 | printk(KERN_ERR "Error registering Shared IRQ 4\n"); | 862 | pr_err("Error registering Shared IRQ 4\n"); |
863 | } | ||
864 | |||
865 | if (of_machine_is_compatible("st,spear320-evb")) { | ||
866 | /* pmx initialization */ | ||
867 | pmx_driver.base = base; | ||
868 | pmx_driver.mode = &spear320_auto_net_mii_mode; | ||
869 | pmx_driver.devs = spear320_evb_pmx_devs; | ||
870 | pmx_driver.devs_count = ARRAY_SIZE(spear320_evb_pmx_devs); | ||
871 | |||
872 | ret = pmx_register(&pmx_driver); | ||
873 | if (ret) | ||
874 | pr_err("padmux: registration failed. err no: %d\n", | ||
875 | ret); | ||
543 | } | 876 | } |
877 | } | ||
544 | 878 | ||
545 | /* pmx initialization */ | 879 | static const char * const spear320_dt_board_compat[] = { |
546 | pmx_driver.base = base; | 880 | "st,spear320", |
547 | pmx_driver.mode = pmx_mode; | 881 | "st,spear320-evb", |
548 | pmx_driver.devs = pmx_devs; | 882 | NULL, |
549 | pmx_driver.devs_count = pmx_dev_count; | 883 | }; |
550 | 884 | ||
551 | ret = pmx_register(&pmx_driver); | 885 | static void __init spear320_map_io(void) |
552 | if (ret) | 886 | { |
553 | printk(KERN_ERR "padmux: registration failed. err no: %d\n", | 887 | spear3xx_map_io(); |
554 | ret); | 888 | spear320_clk_init(); |
555 | } | 889 | } |
890 | |||
891 | DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree") | ||
892 | .map_io = spear320_map_io, | ||
893 | .init_irq = spear3xx_dt_init_irq, | ||
894 | .handle_irq = vic_handle_irq, | ||
895 | .timer = &spear3xx_timer, | ||
896 | .init_machine = spear320_dt_init, | ||
897 | .restart = spear_restart, | ||
898 | .dt_compat = spear320_dt_board_compat, | ||
899 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c deleted file mode 100644 index 105334ab7021..000000000000 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear320_evb.c | ||
3 | * | ||
4 | * SPEAr320 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach-types.h> | ||
17 | #include <mach/generic.h> | ||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | /* padmux devices to enable */ | ||
21 | static struct pmx_dev *pmx_devs[] = { | ||
22 | /* spear3xx specific devices */ | ||
23 | &spear3xx_pmx_i2c, | ||
24 | &spear3xx_pmx_ssp, | ||
25 | &spear3xx_pmx_mii, | ||
26 | &spear3xx_pmx_uart0, | ||
27 | |||
28 | /* spear320 specific devices */ | ||
29 | &spear320_pmx_fsmc, | ||
30 | &spear320_pmx_sdhci, | ||
31 | &spear320_pmx_i2s, | ||
32 | &spear320_pmx_uart1, | ||
33 | &spear320_pmx_uart2, | ||
34 | &spear320_pmx_can, | ||
35 | &spear320_pmx_pwm0, | ||
36 | &spear320_pmx_pwm1, | ||
37 | &spear320_pmx_pwm2, | ||
38 | &spear320_pmx_mii1, | ||
39 | }; | ||
40 | |||
41 | static struct amba_device *amba_devs[] __initdata = { | ||
42 | /* spear3xx specific devices */ | ||
43 | &spear3xx_gpio_device, | ||
44 | &spear3xx_uart_device, | ||
45 | |||
46 | /* spear320 specific devices */ | ||
47 | }; | ||
48 | |||
49 | static struct platform_device *plat_devs[] __initdata = { | ||
50 | /* spear3xx specific devices */ | ||
51 | |||
52 | /* spear320 specific devices */ | ||
53 | }; | ||
54 | |||
55 | static void __init spear320_evb_init(void) | ||
56 | { | ||
57 | unsigned int i; | ||
58 | |||
59 | /* call spear320 machine init function */ | ||
60 | spear320_init(&spear320_auto_net_mii_mode, pmx_devs, | ||
61 | ARRAY_SIZE(pmx_devs)); | ||
62 | |||
63 | /* Add Platform Devices */ | ||
64 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
65 | |||
66 | /* Add Amba Devices */ | ||
67 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
68 | amba_device_register(amba_devs[i], &iomem_resource); | ||
69 | } | ||
70 | |||
71 | MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") | ||
72 | .atag_offset = 0x100, | ||
73 | .map_io = spear3xx_map_io, | ||
74 | .init_irq = spear3xx_init_irq, | ||
75 | .handle_irq = vic_handle_irq, | ||
76 | .timer = &spear3xx_timer, | ||
77 | .init_machine = spear320_evb_init, | ||
78 | .restart = spear_restart, | ||
79 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index b1733c37f209..bbb11efa6056 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c | |||
@@ -3,83 +3,25 @@ | |||
3 | * | 3 | * |
4 | * SPEAr3XX machines common source file | 4 | * SPEAr3XX machines common source file |
5 | * | 5 | * |
6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.kumar@st.com> |
8 | * | 8 | * |
9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #define pr_fmt(fmt) "SPEAr3xx: " fmt |
15 | #include <linux/amba/pl061.h> | 15 | |
16 | #include <linux/ptrace.h> | 16 | #include <linux/amba/pl022.h> |
17 | #include <linux/amba/pl08x.h> | ||
18 | #include <linux/of_irq.h> | ||
17 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <asm/hardware/pl080.h> | ||
18 | #include <asm/hardware/vic.h> | 21 | #include <asm/hardware/vic.h> |
19 | #include <asm/irq.h> | 22 | #include <plat/pl080.h> |
20 | #include <asm/mach/arch.h> | ||
21 | #include <mach/generic.h> | 23 | #include <mach/generic.h> |
22 | #include <mach/hardware.h> | 24 | #include <mach/spear.h> |
23 | |||
24 | /* Add spear3xx machines common devices here */ | ||
25 | /* gpio device registration */ | ||
26 | static struct pl061_platform_data gpio_plat_data = { | ||
27 | .gpio_base = 0, | ||
28 | .irq_base = SPEAR3XX_GPIO_INT_BASE, | ||
29 | }; | ||
30 | |||
31 | AMBA_APB_DEVICE(spear3xx_gpio, "gpio", 0, SPEAR3XX_ICM3_GPIO_BASE, | ||
32 | {SPEAR3XX_IRQ_BASIC_GPIO}, &gpio_plat_data); | ||
33 | |||
34 | /* uart device registration */ | ||
35 | AMBA_APB_DEVICE(spear3xx_uart, "uart", 0, SPEAR3XX_ICM1_UART_BASE, | ||
36 | {SPEAR3XX_IRQ_UART}, NULL); | ||
37 | |||
38 | /* Do spear3xx familiy common initialization part here */ | ||
39 | void __init spear3xx_init(void) | ||
40 | { | ||
41 | /* nothing to do for now */ | ||
42 | } | ||
43 | |||
44 | /* This will initialize vic */ | ||
45 | void __init spear3xx_init_irq(void) | ||
46 | { | ||
47 | vic_init((void __iomem *)VA_SPEAR3XX_ML1_VIC_BASE, 0, ~0, 0); | ||
48 | } | ||
49 | |||
50 | /* Following will create static virtual/physical mappings */ | ||
51 | struct map_desc spear3xx_io_desc[] __initdata = { | ||
52 | { | ||
53 | .virtual = VA_SPEAR3XX_ICM1_UART_BASE, | ||
54 | .pfn = __phys_to_pfn(SPEAR3XX_ICM1_UART_BASE), | ||
55 | .length = SZ_4K, | ||
56 | .type = MT_DEVICE | ||
57 | }, { | ||
58 | .virtual = VA_SPEAR3XX_ML1_VIC_BASE, | ||
59 | .pfn = __phys_to_pfn(SPEAR3XX_ML1_VIC_BASE), | ||
60 | .length = SZ_4K, | ||
61 | .type = MT_DEVICE | ||
62 | }, { | ||
63 | .virtual = VA_SPEAR3XX_ICM3_SYS_CTRL_BASE, | ||
64 | .pfn = __phys_to_pfn(SPEAR3XX_ICM3_SYS_CTRL_BASE), | ||
65 | .length = SZ_4K, | ||
66 | .type = MT_DEVICE | ||
67 | }, { | ||
68 | .virtual = VA_SPEAR3XX_ICM3_MISC_REG_BASE, | ||
69 | .pfn = __phys_to_pfn(SPEAR3XX_ICM3_MISC_REG_BASE), | ||
70 | .length = SZ_4K, | ||
71 | .type = MT_DEVICE | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | /* This will create static memory mapping for selected devices */ | ||
76 | void __init spear3xx_map_io(void) | ||
77 | { | ||
78 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); | ||
79 | |||
80 | /* This will initialize clock framework */ | ||
81 | spear3xx_clk_init(); | ||
82 | } | ||
83 | 25 | ||
84 | /* pad multiplexing support */ | 26 | /* pad multiplexing support */ |
85 | /* devices */ | 27 | /* devices */ |
@@ -506,6 +448,68 @@ struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50 = { | |||
506 | }; | 448 | }; |
507 | #endif /* CONFIG_MACH_SPEAR310 || CONFIG_MACH_SPEAR320 */ | 449 | #endif /* CONFIG_MACH_SPEAR310 || CONFIG_MACH_SPEAR320 */ |
508 | 450 | ||
451 | /* ssp device registration */ | ||
452 | struct pl022_ssp_controller pl022_plat_data = { | ||
453 | .bus_id = 0, | ||
454 | .enable_dma = 1, | ||
455 | .dma_filter = pl08x_filter_id, | ||
456 | .dma_tx_param = "ssp0_tx", | ||
457 | .dma_rx_param = "ssp0_rx", | ||
458 | /* | ||
459 | * This is number of spi devices that can be connected to spi. There are | ||
460 | * two type of chipselects on which slave devices can work. One is chip | ||
461 | * select provided by spi masters other is controlled through external | ||
462 | * gpio's. We can't use chipselect provided from spi master (because as | ||
463 | * soon as FIFO becomes empty, CS is disabled and transfer ends). So | ||
464 | * this number now depends on number of gpios available for spi. each | ||
465 | * slave on each master requires a separate gpio pin. | ||
466 | */ | ||
467 | .num_chipselect = 2, | ||
468 | }; | ||
469 | |||
470 | /* dmac device registration */ | ||
471 | struct pl08x_platform_data pl080_plat_data = { | ||
472 | .memcpy_channel = { | ||
473 | .bus_id = "memcpy", | ||
474 | .cctl = (PL080_BSIZE_16 << PL080_CONTROL_SB_SIZE_SHIFT | \ | ||
475 | PL080_BSIZE_16 << PL080_CONTROL_DB_SIZE_SHIFT | \ | ||
476 | PL080_WIDTH_32BIT << PL080_CONTROL_SWIDTH_SHIFT | \ | ||
477 | PL080_WIDTH_32BIT << PL080_CONTROL_DWIDTH_SHIFT | \ | ||
478 | PL080_CONTROL_PROT_BUFF | PL080_CONTROL_PROT_CACHE | \ | ||
479 | PL080_CONTROL_PROT_SYS), | ||
480 | }, | ||
481 | .lli_buses = PL08X_AHB1, | ||
482 | .mem_buses = PL08X_AHB1, | ||
483 | .get_signal = pl080_get_signal, | ||
484 | .put_signal = pl080_put_signal, | ||
485 | }; | ||
486 | |||
487 | /* | ||
488 | * Following will create 16MB static virtual/physical mappings | ||
489 | * PHYSICAL VIRTUAL | ||
490 | * 0xD0000000 0xFD000000 | ||
491 | * 0xFC000000 0xFC000000 | ||
492 | */ | ||
493 | struct map_desc spear3xx_io_desc[] __initdata = { | ||
494 | { | ||
495 | .virtual = VA_SPEAR3XX_ICM1_2_BASE, | ||
496 | .pfn = __phys_to_pfn(SPEAR3XX_ICM1_2_BASE), | ||
497 | .length = SZ_16M, | ||
498 | .type = MT_DEVICE | ||
499 | }, { | ||
500 | .virtual = VA_SPEAR3XX_ICM3_SMI_CTRL_BASE, | ||
501 | .pfn = __phys_to_pfn(SPEAR3XX_ICM3_SMI_CTRL_BASE), | ||
502 | .length = SZ_16M, | ||
503 | .type = MT_DEVICE | ||
504 | }, | ||
505 | }; | ||
506 | |||
507 | /* This will create static memory mapping for selected devices */ | ||
508 | void __init spear3xx_map_io(void) | ||
509 | { | ||
510 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); | ||
511 | } | ||
512 | |||
509 | static void __init spear3xx_timer_init(void) | 513 | static void __init spear3xx_timer_init(void) |
510 | { | 514 | { |
511 | char pclk_name[] = "pll3_48m_clk"; | 515 | char pclk_name[] = "pll3_48m_clk"; |
@@ -530,9 +534,19 @@ static void __init spear3xx_timer_init(void) | |||
530 | clk_put(gpt_clk); | 534 | clk_put(gpt_clk); |
531 | clk_put(pclk); | 535 | clk_put(pclk); |
532 | 536 | ||
533 | spear_setup_timer(); | 537 | spear_setup_timer(SPEAR3XX_CPU_TMR_BASE, SPEAR3XX_IRQ_CPU_GPT1_1); |
534 | } | 538 | } |
535 | 539 | ||
536 | struct sys_timer spear3xx_timer = { | 540 | struct sys_timer spear3xx_timer = { |
537 | .init = spear3xx_timer_init, | 541 | .init = spear3xx_timer_init, |
538 | }; | 542 | }; |
543 | |||
544 | static const struct of_device_id vic_of_match[] __initconst = { | ||
545 | { .compatible = "arm,pl190-vic", .data = vic_of_init, }, | ||
546 | { /* Sentinel */ } | ||
547 | }; | ||
548 | |||
549 | void __init spear3xx_dt_init_irq(void) | ||
550 | { | ||
551 | of_irq_init(vic_of_match); | ||
552 | } | ||
diff --git a/arch/arm/mach-spear6xx/Makefile.boot b/arch/arm/mach-spear6xx/Makefile.boot index 4674a4c221db..af493da37ab6 100644 --- a/arch/arm/mach-spear6xx/Makefile.boot +++ b/arch/arm/mach-spear6xx/Makefile.boot | |||
@@ -1,3 +1,5 @@ | |||
1 | zreladdr-y += 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | |||
5 | dtb-$(CONFIG_BOARD_SPEAR600_DT) += spear600-evb.dtb | ||
diff --git a/arch/arm/mach-spear6xx/clock.c b/arch/arm/mach-spear6xx/clock.c index a86499a8a15f..bef77d43db87 100644 --- a/arch/arm/mach-spear6xx/clock.c +++ b/arch/arm/mach-spear6xx/clock.c | |||
@@ -16,6 +16,112 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <plat/clock.h> | 17 | #include <plat/clock.h> |
18 | #include <mach/misc_regs.h> | 18 | #include <mach/misc_regs.h> |
19 | #include <mach/spear.h> | ||
20 | |||
21 | #define PLL1_CTR (MISC_BASE + 0x008) | ||
22 | #define PLL1_FRQ (MISC_BASE + 0x00C) | ||
23 | #define PLL1_MOD (MISC_BASE + 0x010) | ||
24 | #define PLL2_CTR (MISC_BASE + 0x014) | ||
25 | /* PLL_CTR register masks */ | ||
26 | #define PLL_ENABLE 2 | ||
27 | #define PLL_MODE_SHIFT 4 | ||
28 | #define PLL_MODE_MASK 0x3 | ||
29 | #define PLL_MODE_NORMAL 0 | ||
30 | #define PLL_MODE_FRACTION 1 | ||
31 | #define PLL_MODE_DITH_DSB 2 | ||
32 | #define PLL_MODE_DITH_SSB 3 | ||
33 | |||
34 | #define PLL2_FRQ (MISC_BASE + 0x018) | ||
35 | /* PLL FRQ register masks */ | ||
36 | #define PLL_DIV_N_SHIFT 0 | ||
37 | #define PLL_DIV_N_MASK 0xFF | ||
38 | #define PLL_DIV_P_SHIFT 8 | ||
39 | #define PLL_DIV_P_MASK 0x7 | ||
40 | #define PLL_NORM_FDBK_M_SHIFT 24 | ||
41 | #define PLL_NORM_FDBK_M_MASK 0xFF | ||
42 | #define PLL_DITH_FDBK_M_SHIFT 16 | ||
43 | #define PLL_DITH_FDBK_M_MASK 0xFFFF | ||
44 | |||
45 | #define PLL2_MOD (MISC_BASE + 0x01C) | ||
46 | #define PLL_CLK_CFG (MISC_BASE + 0x020) | ||
47 | #define CORE_CLK_CFG (MISC_BASE + 0x024) | ||
48 | /* CORE CLK CFG register masks */ | ||
49 | #define PLL_HCLK_RATIO_SHIFT 10 | ||
50 | #define PLL_HCLK_RATIO_MASK 0x3 | ||
51 | #define HCLK_PCLK_RATIO_SHIFT 8 | ||
52 | #define HCLK_PCLK_RATIO_MASK 0x3 | ||
53 | |||
54 | #define PERIP_CLK_CFG (MISC_BASE + 0x028) | ||
55 | /* PERIP_CLK_CFG register masks */ | ||
56 | #define CLCD_CLK_SHIFT 2 | ||
57 | #define CLCD_CLK_MASK 0x3 | ||
58 | #define UART_CLK_SHIFT 4 | ||
59 | #define UART_CLK_MASK 0x1 | ||
60 | #define FIRDA_CLK_SHIFT 5 | ||
61 | #define FIRDA_CLK_MASK 0x3 | ||
62 | #define GPT0_CLK_SHIFT 8 | ||
63 | #define GPT1_CLK_SHIFT 10 | ||
64 | #define GPT2_CLK_SHIFT 11 | ||
65 | #define GPT3_CLK_SHIFT 12 | ||
66 | #define GPT_CLK_MASK 0x1 | ||
67 | #define AUX_CLK_PLL3_VAL 0 | ||
68 | #define AUX_CLK_PLL1_VAL 1 | ||
69 | |||
70 | #define PERIP1_CLK_ENB (MISC_BASE + 0x02C) | ||
71 | /* PERIP1_CLK_ENB register masks */ | ||
72 | #define UART0_CLK_ENB 3 | ||
73 | #define UART1_CLK_ENB 4 | ||
74 | #define SSP0_CLK_ENB 5 | ||
75 | #define SSP1_CLK_ENB 6 | ||
76 | #define I2C_CLK_ENB 7 | ||
77 | #define JPEG_CLK_ENB 8 | ||
78 | #define FSMC_CLK_ENB 9 | ||
79 | #define FIRDA_CLK_ENB 10 | ||
80 | #define GPT2_CLK_ENB 11 | ||
81 | #define GPT3_CLK_ENB 12 | ||
82 | #define GPIO2_CLK_ENB 13 | ||
83 | #define SSP2_CLK_ENB 14 | ||
84 | #define ADC_CLK_ENB 15 | ||
85 | #define GPT1_CLK_ENB 11 | ||
86 | #define RTC_CLK_ENB 17 | ||
87 | #define GPIO1_CLK_ENB 18 | ||
88 | #define DMA_CLK_ENB 19 | ||
89 | #define SMI_CLK_ENB 21 | ||
90 | #define CLCD_CLK_ENB 22 | ||
91 | #define GMAC_CLK_ENB 23 | ||
92 | #define USBD_CLK_ENB 24 | ||
93 | #define USBH0_CLK_ENB 25 | ||
94 | #define USBH1_CLK_ENB 26 | ||
95 | |||
96 | #define PRSC1_CLK_CFG (MISC_BASE + 0x044) | ||
97 | #define PRSC2_CLK_CFG (MISC_BASE + 0x048) | ||
98 | #define PRSC3_CLK_CFG (MISC_BASE + 0x04C) | ||
99 | /* gpt synthesizer register masks */ | ||
100 | #define GPT_MSCALE_SHIFT 0 | ||
101 | #define GPT_MSCALE_MASK 0xFFF | ||
102 | #define GPT_NSCALE_SHIFT 12 | ||
103 | #define GPT_NSCALE_MASK 0xF | ||
104 | |||
105 | #define AMEM_CLK_CFG (MISC_BASE + 0x050) | ||
106 | #define EXPI_CLK_CFG (MISC_BASE + 0x054) | ||
107 | #define CLCD_CLK_SYNT (MISC_BASE + 0x05C) | ||
108 | #define FIRDA_CLK_SYNT (MISC_BASE + 0x060) | ||
109 | #define UART_CLK_SYNT (MISC_BASE + 0x064) | ||
110 | #define GMAC_CLK_SYNT (MISC_BASE + 0x068) | ||
111 | #define RAS1_CLK_SYNT (MISC_BASE + 0x06C) | ||
112 | #define RAS2_CLK_SYNT (MISC_BASE + 0x070) | ||
113 | #define RAS3_CLK_SYNT (MISC_BASE + 0x074) | ||
114 | #define RAS4_CLK_SYNT (MISC_BASE + 0x078) | ||
115 | /* aux clk synthesiser register masks for irda to ras4 */ | ||
116 | #define AUX_SYNT_ENB 31 | ||
117 | #define AUX_EQ_SEL_SHIFT 30 | ||
118 | #define AUX_EQ_SEL_MASK 1 | ||
119 | #define AUX_EQ1_SEL 0 | ||
120 | #define AUX_EQ2_SEL 1 | ||
121 | #define AUX_XSCALE_SHIFT 16 | ||
122 | #define AUX_XSCALE_MASK 0xFFF | ||
123 | #define AUX_YSCALE_SHIFT 0 | ||
124 | #define AUX_YSCALE_MASK 0xFFF | ||
19 | 125 | ||
20 | /* root clks */ | 126 | /* root clks */ |
21 | /* 32 KHz oscillator clock */ | 127 | /* 32 KHz oscillator clock */ |
@@ -623,53 +729,53 @@ static struct clk dummy_apb_pclk; | |||
623 | 729 | ||
624 | /* array of all spear 6xx clock lookups */ | 730 | /* array of all spear 6xx clock lookups */ |
625 | static struct clk_lookup spear_clk_lookups[] = { | 731 | static struct clk_lookup spear_clk_lookups[] = { |
626 | { .con_id = "apb_pclk", .clk = &dummy_apb_pclk}, | 732 | CLKDEV_INIT(NULL, "apb_pclk", &dummy_apb_pclk), |
627 | /* root clks */ | 733 | /* root clks */ |
628 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | 734 | CLKDEV_INIT(NULL, "osc_32k_clk", &osc_32k_clk), |
629 | { .con_id = "osc_30m_clk", .clk = &osc_30m_clk}, | 735 | CLKDEV_INIT(NULL, "osc_30m_clk", &osc_30m_clk), |
630 | /* clock derived from 32 KHz os clk */ | 736 | /* clock derived from 32 KHz os clk */ |
631 | { .dev_id = "rtc-spear", .clk = &rtc_clk}, | 737 | CLKDEV_INIT("rtc-spear", NULL, &rtc_clk), |
632 | /* clock derived from 30 MHz os clk */ | 738 | /* clock derived from 30 MHz os clk */ |
633 | { .con_id = "pll1_clk", .clk = &pll1_clk}, | 739 | CLKDEV_INIT(NULL, "pll1_clk", &pll1_clk), |
634 | { .con_id = "pll3_48m_clk", .clk = &pll3_48m_clk}, | 740 | CLKDEV_INIT(NULL, "pll3_48m_clk", &pll3_48m_clk), |
635 | { .dev_id = "wdt", .clk = &wdt_clk}, | 741 | CLKDEV_INIT("wdt", NULL, &wdt_clk), |
636 | /* clock derived from pll1 clk */ | 742 | /* clock derived from pll1 clk */ |
637 | { .con_id = "cpu_clk", .clk = &cpu_clk}, | 743 | CLKDEV_INIT(NULL, "cpu_clk", &cpu_clk), |
638 | { .con_id = "ahb_clk", .clk = &ahb_clk}, | 744 | CLKDEV_INIT(NULL, "ahb_clk", &ahb_clk), |
639 | { .con_id = "uart_synth_clk", .clk = &uart_synth_clk}, | 745 | CLKDEV_INIT(NULL, "uart_synth_clk", &uart_synth_clk), |
640 | { .con_id = "firda_synth_clk", .clk = &firda_synth_clk}, | 746 | CLKDEV_INIT(NULL, "firda_synth_clk", &firda_synth_clk), |
641 | { .con_id = "clcd_synth_clk", .clk = &clcd_synth_clk}, | 747 | CLKDEV_INIT(NULL, "clcd_synth_clk", &clcd_synth_clk), |
642 | { .con_id = "gpt0_synth_clk", .clk = &gpt0_synth_clk}, | 748 | CLKDEV_INIT(NULL, "gpt0_synth_clk", &gpt0_synth_clk), |
643 | { .con_id = "gpt2_synth_clk", .clk = &gpt2_synth_clk}, | 749 | CLKDEV_INIT(NULL, "gpt2_synth_clk", &gpt2_synth_clk), |
644 | { .con_id = "gpt3_synth_clk", .clk = &gpt3_synth_clk}, | 750 | CLKDEV_INIT(NULL, "gpt3_synth_clk", &gpt3_synth_clk), |
645 | { .dev_id = "d0000000.serial", .clk = &uart0_clk}, | 751 | CLKDEV_INIT("d0000000.serial", NULL, &uart0_clk), |
646 | { .dev_id = "d0080000.serial", .clk = &uart1_clk}, | 752 | CLKDEV_INIT("d0080000.serial", NULL, &uart1_clk), |
647 | { .dev_id = "firda", .clk = &firda_clk}, | 753 | CLKDEV_INIT("firda", NULL, &firda_clk), |
648 | { .dev_id = "clcd", .clk = &clcd_clk}, | 754 | CLKDEV_INIT("clcd", NULL, &clcd_clk), |
649 | { .dev_id = "gpt0", .clk = &gpt0_clk}, | 755 | CLKDEV_INIT("gpt0", NULL, &gpt0_clk), |
650 | { .dev_id = "gpt1", .clk = &gpt1_clk}, | 756 | CLKDEV_INIT("gpt1", NULL, &gpt1_clk), |
651 | { .dev_id = "gpt2", .clk = &gpt2_clk}, | 757 | CLKDEV_INIT("gpt2", NULL, &gpt2_clk), |
652 | { .dev_id = "gpt3", .clk = &gpt3_clk}, | 758 | CLKDEV_INIT("gpt3", NULL, &gpt3_clk), |
653 | /* clock derived from pll3 clk */ | 759 | /* clock derived from pll3 clk */ |
654 | { .dev_id = "designware_udc", .clk = &usbd_clk}, | 760 | CLKDEV_INIT("designware_udc", NULL, &usbd_clk), |
655 | { .con_id = "usbh.0_clk", .clk = &usbh0_clk}, | 761 | CLKDEV_INIT(NULL, "usbh.0_clk", &usbh0_clk), |
656 | { .con_id = "usbh.1_clk", .clk = &usbh1_clk}, | 762 | CLKDEV_INIT(NULL, "usbh.1_clk", &usbh1_clk), |
657 | /* clock derived from ahb clk */ | 763 | /* clock derived from ahb clk */ |
658 | { .con_id = "apb_clk", .clk = &apb_clk}, | 764 | CLKDEV_INIT(NULL, "apb_clk", &apb_clk), |
659 | { .dev_id = "d0200000.i2c", .clk = &i2c_clk}, | 765 | CLKDEV_INIT("d0200000.i2c", NULL, &i2c_clk), |
660 | { .dev_id = "dma", .clk = &dma_clk}, | 766 | CLKDEV_INIT("fc400000.dma", NULL, &dma_clk), |
661 | { .dev_id = "jpeg", .clk = &jpeg_clk}, | 767 | CLKDEV_INIT("jpeg", NULL, &jpeg_clk), |
662 | { .dev_id = "gmac", .clk = &gmac_clk}, | 768 | CLKDEV_INIT("gmac", NULL, &gmac_clk), |
663 | { .dev_id = "smi", .clk = &smi_clk}, | 769 | CLKDEV_INIT("fc000000.flash", NULL, &smi_clk), |
664 | { .dev_id = "fsmc-nand", .clk = &fsmc_clk}, | 770 | CLKDEV_INIT("d1800000.flash", NULL, &fsmc_clk), |
665 | /* clock derived from apb clk */ | 771 | /* clock derived from apb clk */ |
666 | { .dev_id = "adc", .clk = &adc_clk}, | 772 | CLKDEV_INIT("adc", NULL, &adc_clk), |
667 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, | 773 | CLKDEV_INIT("ssp-pl022.0", NULL, &ssp0_clk), |
668 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, | 774 | CLKDEV_INIT("ssp-pl022.1", NULL, &ssp1_clk), |
669 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, | 775 | CLKDEV_INIT("ssp-pl022.2", NULL, &ssp2_clk), |
670 | { .dev_id = "f0100000.gpio", .clk = &gpio0_clk}, | 776 | CLKDEV_INIT("f0100000.gpio", NULL, &gpio0_clk), |
671 | { .dev_id = "fc980000.gpio", .clk = &gpio1_clk}, | 777 | CLKDEV_INIT("fc980000.gpio", NULL, &gpio1_clk), |
672 | { .dev_id = "d8100000.gpio", .clk = &gpio2_clk}, | 778 | CLKDEV_INIT("d8100000.gpio", NULL, &gpio2_clk), |
673 | }; | 779 | }; |
674 | 780 | ||
675 | void __init spear6xx_clk_init(void) | 781 | void __init spear6xx_clk_init(void) |
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h index 116b99301cf5..7167fd331d86 100644 --- a/arch/arm/mach-spear6xx/include/mach/generic.h +++ b/arch/arm/mach-spear6xx/include/mach/generic.h | |||
@@ -15,34 +15,9 @@ | |||
15 | #define __MACH_GENERIC_H | 15 | #define __MACH_GENERIC_H |
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/amba/bus.h> | ||
20 | #include <asm/mach/time.h> | ||
21 | #include <asm/mach/map.h> | ||
22 | |||
23 | /* | ||
24 | * Each GPT has 2 timer channels | ||
25 | * Following GPT channels will be used as clock source and clockevent | ||
26 | */ | ||
27 | #define SPEAR_GPT0_BASE SPEAR6XX_CPU_TMR_BASE | ||
28 | #define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 | ||
29 | #define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 | ||
30 | |||
31 | /* Add spear6xx family device structure declarations here */ | ||
32 | extern struct amba_device gpio_device[]; | ||
33 | extern struct amba_device uart_device[]; | ||
34 | extern struct sys_timer spear6xx_timer; | ||
35 | |||
36 | /* Add spear6xx family function declarations here */ | ||
37 | void __init spear_setup_timer(void); | ||
38 | void __init spear6xx_map_io(void); | ||
39 | void __init spear6xx_init_irq(void); | ||
40 | void __init spear6xx_init(void); | ||
41 | void __init spear600_init(void); | ||
42 | void __init spear6xx_clk_init(void); | ||
43 | 18 | ||
19 | void __init spear_setup_timer(resource_size_t base, int irq); | ||
44 | void spear_restart(char, const char *); | 20 | void spear_restart(char, const char *); |
45 | 21 | void __init spear6xx_clk_init(void); | |
46 | /* Add spear600 machine device structure declarations here */ | ||
47 | 22 | ||
48 | #endif /* __MACH_GENERIC_H */ | 23 | #endif /* __MACH_GENERIC_H */ |
diff --git a/arch/arm/mach-spear6xx/include/mach/hardware.h b/arch/arm/mach-spear6xx/include/mach/hardware.h index 0b3f96ae2848..40a8c178f10d 100644 --- a/arch/arm/mach-spear6xx/include/mach/hardware.h +++ b/arch/arm/mach-spear6xx/include/mach/hardware.h | |||
@@ -1,23 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * arch/arm/mach-spear6xx/include/mach/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_HARDWARE_H | ||
15 | #define __MACH_HARDWARE_H | ||
16 | |||
17 | #include <plat/hardware.h> | ||
18 | #include <mach/spear.h> | ||
19 | |||
20 | /* Vitual to physical translation of statically mapped space */ | ||
21 | #define IO_ADDRESS(x) (x | 0xF0000000) | ||
22 | |||
23 | #endif /* __MACH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/irqs.h b/arch/arm/mach-spear6xx/include/mach/irqs.h index 8f214b03d75d..2b735389e74b 100644 --- a/arch/arm/mach-spear6xx/include/mach/irqs.h +++ b/arch/arm/mach-spear6xx/include/mach/irqs.h | |||
@@ -16,82 +16,13 @@ | |||
16 | 16 | ||
17 | /* IRQ definitions */ | 17 | /* IRQ definitions */ |
18 | /* VIC 1 */ | 18 | /* VIC 1 */ |
19 | #define IRQ_INTRCOMM_SW_IRQ 0 | 19 | /* FIXME: probe this from DT */ |
20 | #define IRQ_INTRCOMM_CPU_1 1 | ||
21 | #define IRQ_INTRCOMM_CPU_2 2 | ||
22 | #define IRQ_INTRCOMM_RAS2A11_1 3 | ||
23 | #define IRQ_INTRCOMM_RAS2A11_2 4 | ||
24 | #define IRQ_INTRCOMM_RAS2A12_1 5 | ||
25 | #define IRQ_INTRCOMM_RAS2A12_2 6 | ||
26 | #define IRQ_GEN_RAS_0 7 | ||
27 | #define IRQ_GEN_RAS_1 8 | ||
28 | #define IRQ_GEN_RAS_2 9 | ||
29 | #define IRQ_GEN_RAS_3 10 | ||
30 | #define IRQ_GEN_RAS_4 11 | ||
31 | #define IRQ_GEN_RAS_5 12 | ||
32 | #define IRQ_GEN_RAS_6 13 | ||
33 | #define IRQ_GEN_RAS_7 14 | ||
34 | #define IRQ_GEN_RAS_8 15 | ||
35 | #define IRQ_CPU_GPT1_1 16 | 20 | #define IRQ_CPU_GPT1_1 16 |
36 | #define IRQ_CPU_GPT1_2 17 | ||
37 | #define IRQ_LOCAL_GPIO 18 | ||
38 | #define IRQ_PLL_UNLOCK 19 | ||
39 | #define IRQ_JPEG 20 | ||
40 | #define IRQ_FSMC 21 | ||
41 | #define IRQ_IRDA 22 | ||
42 | #define IRQ_RESERVED 23 | ||
43 | #define IRQ_UART_0 24 | ||
44 | #define IRQ_UART_1 25 | ||
45 | #define IRQ_SSP_1 26 | ||
46 | #define IRQ_SSP_2 27 | ||
47 | #define IRQ_I2C 28 | ||
48 | #define IRQ_GEN_RAS_9 29 | ||
49 | #define IRQ_GEN_RAS_10 30 | ||
50 | #define IRQ_GEN_RAS_11 31 | ||
51 | |||
52 | /* VIC 2 */ | ||
53 | #define IRQ_APPL_GPT1_1 32 | ||
54 | #define IRQ_APPL_GPT1_2 33 | ||
55 | #define IRQ_APPL_GPT2_1 34 | ||
56 | #define IRQ_APPL_GPT2_2 35 | ||
57 | #define IRQ_APPL_GPIO 36 | ||
58 | #define IRQ_APPL_SSP 37 | ||
59 | #define IRQ_APPL_ADC 38 | ||
60 | #define IRQ_APPL_RESERVED 39 | ||
61 | #define IRQ_AHB_EXP_MASTER 40 | ||
62 | #define IRQ_DDR_CONTROLLER 41 | ||
63 | #define IRQ_BASIC_DMA 42 | ||
64 | #define IRQ_BASIC_RESERVED1 43 | ||
65 | #define IRQ_BASIC_SMI 44 | ||
66 | #define IRQ_BASIC_CLCD 45 | ||
67 | #define IRQ_EXP_AHB_1 46 | ||
68 | #define IRQ_EXP_AHB_2 47 | ||
69 | #define IRQ_BASIC_GPT1_1 48 | ||
70 | #define IRQ_BASIC_GPT1_2 49 | ||
71 | #define IRQ_BASIC_RTC 50 | ||
72 | #define IRQ_BASIC_GPIO 51 | ||
73 | #define IRQ_BASIC_WDT 52 | ||
74 | #define IRQ_BASIC_RESERVED 53 | ||
75 | #define IRQ_AHB_EXP_SLAVE 54 | ||
76 | #define IRQ_GMAC_1 55 | ||
77 | #define IRQ_GMAC_2 56 | ||
78 | #define IRQ_USB_DEV 57 | ||
79 | #define IRQ_USB_H_OHCI_0 58 | ||
80 | #define IRQ_USB_H_EHCI_0 59 | ||
81 | #define IRQ_USB_H_OHCI_1 60 | ||
82 | #define IRQ_USB_H_EHCI_1 61 | ||
83 | #define IRQ_EXP_AHB_3 62 | ||
84 | #define IRQ_EXP_AHB_4 63 | ||
85 | 21 | ||
86 | #define IRQ_VIC_END 64 | 22 | #define IRQ_VIC_END 64 |
87 | 23 | ||
88 | /* GPIO pins virtual irqs */ | 24 | /* GPIO pins virtual irqs */ |
89 | #define SPEAR_GPIO_INT_BASE IRQ_VIC_END | 25 | #define VIRTUAL_IRQS 24 |
90 | #define SPEAR_GPIO0_INT_BASE SPEAR_GPIO_INT_BASE | 26 | #define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) |
91 | #define SPEAR_GPIO1_INT_BASE (SPEAR_GPIO0_INT_BASE + 8) | ||
92 | #define SPEAR_GPIO2_INT_BASE (SPEAR_GPIO1_INT_BASE + 8) | ||
93 | #define SPEAR_GPIO_INT_END (SPEAR_GPIO2_INT_BASE + 8) | ||
94 | #define VIRTUAL_IRQS (SPEAR_GPIO_INT_END - IRQ_VIC_END) | ||
95 | #define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) | ||
96 | 27 | ||
97 | #endif /* __MACH_IRQS_H */ | 28 | #endif /* __MACH_IRQS_H */ |
diff --git a/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/arch/arm/mach-spear6xx/include/mach/misc_regs.h index 68c20a007b0d..2b9aaa6cdd11 100644 --- a/arch/arm/mach-spear6xx/include/mach/misc_regs.h +++ b/arch/arm/mach-spear6xx/include/mach/misc_regs.h | |||
@@ -14,161 +14,7 @@ | |||
14 | #ifndef __MACH_MISC_REGS_H | 14 | #ifndef __MACH_MISC_REGS_H |
15 | #define __MACH_MISC_REGS_H | 15 | #define __MACH_MISC_REGS_H |
16 | 16 | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | #define MISC_BASE IOMEM(VA_SPEAR6XX_ICM3_MISC_REG_BASE) | 17 | #define MISC_BASE IOMEM(VA_SPEAR6XX_ICM3_MISC_REG_BASE) |
20 | |||
21 | #define SOC_CFG_CTR (MISC_BASE + 0x000) | ||
22 | #define DIAG_CFG_CTR (MISC_BASE + 0x004) | ||
23 | #define PLL1_CTR (MISC_BASE + 0x008) | ||
24 | #define PLL1_FRQ (MISC_BASE + 0x00C) | ||
25 | #define PLL1_MOD (MISC_BASE + 0x010) | ||
26 | #define PLL2_CTR (MISC_BASE + 0x014) | ||
27 | /* PLL_CTR register masks */ | ||
28 | #define PLL_ENABLE 2 | ||
29 | #define PLL_MODE_SHIFT 4 | ||
30 | #define PLL_MODE_MASK 0x3 | ||
31 | #define PLL_MODE_NORMAL 0 | ||
32 | #define PLL_MODE_FRACTION 1 | ||
33 | #define PLL_MODE_DITH_DSB 2 | ||
34 | #define PLL_MODE_DITH_SSB 3 | ||
35 | |||
36 | #define PLL2_FRQ (MISC_BASE + 0x018) | ||
37 | /* PLL FRQ register masks */ | ||
38 | #define PLL_DIV_N_SHIFT 0 | ||
39 | #define PLL_DIV_N_MASK 0xFF | ||
40 | #define PLL_DIV_P_SHIFT 8 | ||
41 | #define PLL_DIV_P_MASK 0x7 | ||
42 | #define PLL_NORM_FDBK_M_SHIFT 24 | ||
43 | #define PLL_NORM_FDBK_M_MASK 0xFF | ||
44 | #define PLL_DITH_FDBK_M_SHIFT 16 | ||
45 | #define PLL_DITH_FDBK_M_MASK 0xFFFF | ||
46 | |||
47 | #define PLL2_MOD (MISC_BASE + 0x01C) | ||
48 | #define PLL_CLK_CFG (MISC_BASE + 0x020) | ||
49 | #define CORE_CLK_CFG (MISC_BASE + 0x024) | ||
50 | /* CORE CLK CFG register masks */ | ||
51 | #define PLL_HCLK_RATIO_SHIFT 10 | ||
52 | #define PLL_HCLK_RATIO_MASK 0x3 | ||
53 | #define HCLK_PCLK_RATIO_SHIFT 8 | ||
54 | #define HCLK_PCLK_RATIO_MASK 0x3 | ||
55 | |||
56 | #define PERIP_CLK_CFG (MISC_BASE + 0x028) | ||
57 | /* PERIP_CLK_CFG register masks */ | ||
58 | #define CLCD_CLK_SHIFT 2 | ||
59 | #define CLCD_CLK_MASK 0x3 | ||
60 | #define UART_CLK_SHIFT 4 | ||
61 | #define UART_CLK_MASK 0x1 | ||
62 | #define FIRDA_CLK_SHIFT 5 | ||
63 | #define FIRDA_CLK_MASK 0x3 | ||
64 | #define GPT0_CLK_SHIFT 8 | ||
65 | #define GPT1_CLK_SHIFT 10 | ||
66 | #define GPT2_CLK_SHIFT 11 | ||
67 | #define GPT3_CLK_SHIFT 12 | ||
68 | #define GPT_CLK_MASK 0x1 | ||
69 | #define AUX_CLK_PLL3_VAL 0 | ||
70 | #define AUX_CLK_PLL1_VAL 1 | ||
71 | |||
72 | #define PERIP1_CLK_ENB (MISC_BASE + 0x02C) | ||
73 | /* PERIP1_CLK_ENB register masks */ | ||
74 | #define UART0_CLK_ENB 3 | ||
75 | #define UART1_CLK_ENB 4 | ||
76 | #define SSP0_CLK_ENB 5 | ||
77 | #define SSP1_CLK_ENB 6 | ||
78 | #define I2C_CLK_ENB 7 | ||
79 | #define JPEG_CLK_ENB 8 | ||
80 | #define FSMC_CLK_ENB 9 | ||
81 | #define FIRDA_CLK_ENB 10 | ||
82 | #define GPT2_CLK_ENB 11 | ||
83 | #define GPT3_CLK_ENB 12 | ||
84 | #define GPIO2_CLK_ENB 13 | ||
85 | #define SSP2_CLK_ENB 14 | ||
86 | #define ADC_CLK_ENB 15 | ||
87 | #define GPT1_CLK_ENB 11 | ||
88 | #define RTC_CLK_ENB 17 | ||
89 | #define GPIO1_CLK_ENB 18 | ||
90 | #define DMA_CLK_ENB 19 | ||
91 | #define SMI_CLK_ENB 21 | ||
92 | #define CLCD_CLK_ENB 22 | ||
93 | #define GMAC_CLK_ENB 23 | ||
94 | #define USBD_CLK_ENB 24 | ||
95 | #define USBH0_CLK_ENB 25 | ||
96 | #define USBH1_CLK_ENB 26 | ||
97 | |||
98 | #define SOC_CORE_ID (MISC_BASE + 0x030) | ||
99 | #define RAS_CLK_ENB (MISC_BASE + 0x034) | ||
100 | #define PERIP1_SOF_RST (MISC_BASE + 0x038) | ||
101 | /* PERIP1_SOF_RST register masks */ | ||
102 | #define JPEG_SOF_RST 8 | ||
103 | |||
104 | #define SOC_USER_ID (MISC_BASE + 0x03C) | ||
105 | #define RAS_SOF_RST (MISC_BASE + 0x040) | ||
106 | #define PRSC1_CLK_CFG (MISC_BASE + 0x044) | ||
107 | #define PRSC2_CLK_CFG (MISC_BASE + 0x048) | ||
108 | #define PRSC3_CLK_CFG (MISC_BASE + 0x04C) | ||
109 | /* gpt synthesizer register masks */ | ||
110 | #define GPT_MSCALE_SHIFT 0 | ||
111 | #define GPT_MSCALE_MASK 0xFFF | ||
112 | #define GPT_NSCALE_SHIFT 12 | ||
113 | #define GPT_NSCALE_MASK 0xF | ||
114 | |||
115 | #define AMEM_CLK_CFG (MISC_BASE + 0x050) | ||
116 | #define EXPI_CLK_CFG (MISC_BASE + 0x054) | ||
117 | #define CLCD_CLK_SYNT (MISC_BASE + 0x05C) | ||
118 | #define FIRDA_CLK_SYNT (MISC_BASE + 0x060) | ||
119 | #define UART_CLK_SYNT (MISC_BASE + 0x064) | ||
120 | #define GMAC_CLK_SYNT (MISC_BASE + 0x068) | ||
121 | #define RAS1_CLK_SYNT (MISC_BASE + 0x06C) | ||
122 | #define RAS2_CLK_SYNT (MISC_BASE + 0x070) | ||
123 | #define RAS3_CLK_SYNT (MISC_BASE + 0x074) | ||
124 | #define RAS4_CLK_SYNT (MISC_BASE + 0x078) | ||
125 | /* aux clk synthesiser register masks for irda to ras4 */ | ||
126 | #define AUX_SYNT_ENB 31 | ||
127 | #define AUX_EQ_SEL_SHIFT 30 | ||
128 | #define AUX_EQ_SEL_MASK 1 | ||
129 | #define AUX_EQ1_SEL 0 | ||
130 | #define AUX_EQ2_SEL 1 | ||
131 | #define AUX_XSCALE_SHIFT 16 | ||
132 | #define AUX_XSCALE_MASK 0xFFF | ||
133 | #define AUX_YSCALE_SHIFT 0 | ||
134 | #define AUX_YSCALE_MASK 0xFFF | ||
135 | |||
136 | #define ICM1_ARB_CFG (MISC_BASE + 0x07C) | ||
137 | #define ICM2_ARB_CFG (MISC_BASE + 0x080) | ||
138 | #define ICM3_ARB_CFG (MISC_BASE + 0x084) | ||
139 | #define ICM4_ARB_CFG (MISC_BASE + 0x088) | ||
140 | #define ICM5_ARB_CFG (MISC_BASE + 0x08C) | ||
141 | #define ICM6_ARB_CFG (MISC_BASE + 0x090) | ||
142 | #define ICM7_ARB_CFG (MISC_BASE + 0x094) | ||
143 | #define ICM8_ARB_CFG (MISC_BASE + 0x098) | ||
144 | #define ICM9_ARB_CFG (MISC_BASE + 0x09C) | ||
145 | #define DMA_CHN_CFG (MISC_BASE + 0x0A0) | 18 | #define DMA_CHN_CFG (MISC_BASE + 0x0A0) |
146 | #define USB2_PHY_CFG (MISC_BASE + 0x0A4) | ||
147 | #define GMAC_CFG_CTR (MISC_BASE + 0x0A8) | ||
148 | #define EXPI_CFG_CTR (MISC_BASE + 0x0AC) | ||
149 | #define PRC1_LOCK_CTR (MISC_BASE + 0x0C0) | ||
150 | #define PRC2_LOCK_CTR (MISC_BASE + 0x0C4) | ||
151 | #define PRC3_LOCK_CTR (MISC_BASE + 0x0C8) | ||
152 | #define PRC4_LOCK_CTR (MISC_BASE + 0x0CC) | ||
153 | #define PRC1_IRQ_CTR (MISC_BASE + 0x0D0) | ||
154 | #define PRC2_IRQ_CTR (MISC_BASE + 0x0D4) | ||
155 | #define PRC3_IRQ_CTR (MISC_BASE + 0x0D8) | ||
156 | #define PRC4_IRQ_CTR (MISC_BASE + 0x0DC) | ||
157 | #define PWRDOWN_CFG_CTR (MISC_BASE + 0x0E0) | ||
158 | #define COMPSSTL_1V8_CFG (MISC_BASE + 0x0E4) | ||
159 | #define COMPSSTL_2V5_CFG (MISC_BASE + 0x0E8) | ||
160 | #define COMPCOR_3V3_CFG (MISC_BASE + 0x0EC) | ||
161 | #define SSTLPAD_CFG_CTR (MISC_BASE + 0x0F0) | ||
162 | #define BIST1_CFG_CTR (MISC_BASE + 0x0F4) | ||
163 | #define BIST2_CFG_CTR (MISC_BASE + 0x0F8) | ||
164 | #define BIST3_CFG_CTR (MISC_BASE + 0x0FC) | ||
165 | #define BIST4_CFG_CTR (MISC_BASE + 0x100) | ||
166 | #define BIST5_CFG_CTR (MISC_BASE + 0x104) | ||
167 | #define BIST1_STS_RES (MISC_BASE + 0x108) | ||
168 | #define BIST2_STS_RES (MISC_BASE + 0x10C) | ||
169 | #define BIST3_STS_RES (MISC_BASE + 0x110) | ||
170 | #define BIST4_STS_RES (MISC_BASE + 0x114) | ||
171 | #define BIST5_STS_RES (MISC_BASE + 0x118) | ||
172 | #define SYSERR_CFG_CTR (MISC_BASE + 0x11C) | ||
173 | 19 | ||
174 | #endif /* __MACH_MISC_REGS_H */ | 20 | #endif /* __MACH_MISC_REGS_H */ |
diff --git a/arch/arm/mach-spear6xx/include/mach/spear.h b/arch/arm/mach-spear6xx/include/mach/spear.h index 7fd621532def..d278ed047a53 100644 --- a/arch/arm/mach-spear6xx/include/mach/spear.h +++ b/arch/arm/mach-spear6xx/include/mach/spear.h | |||
@@ -15,69 +15,26 @@ | |||
15 | #define __MACH_SPEAR6XX_H | 15 | #define __MACH_SPEAR6XX_H |
16 | 16 | ||
17 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
18 | #include <mach/spear600.h> | ||
19 | 18 | ||
20 | #define SPEAR6XX_ML_SDRAM_BASE UL(0x00000000) | ||
21 | /* ICM1 - Low speed connection */ | 19 | /* ICM1 - Low speed connection */ |
22 | #define SPEAR6XX_ICM1_BASE UL(0xD0000000) | 20 | #define SPEAR6XX_ICM1_BASE UL(0xD0000000) |
23 | 21 | #define VA_SPEAR6XX_ICM1_BASE UL(0xFD000000) | |
24 | #define SPEAR6XX_ICM1_UART0_BASE UL(0xD0000000) | 22 | #define SPEAR6XX_ICM1_UART0_BASE UL(0xD0000000) |
25 | #define VA_SPEAR6XX_ICM1_UART0_BASE IO_ADDRESS(SPEAR6XX_ICM1_UART0_BASE) | 23 | #define VA_SPEAR6XX_ICM1_UART0_BASE (VA_SPEAR6XX_ICM1_2_BASE | SPEAR6XX_ICM1_UART0_BASE) |
26 | |||
27 | #define SPEAR6XX_ICM1_UART1_BASE UL(0xD0080000) | ||
28 | #define SPEAR6XX_ICM1_SSP0_BASE UL(0xD0100000) | ||
29 | #define SPEAR6XX_ICM1_SSP1_BASE UL(0xD0180000) | ||
30 | #define SPEAR6XX_ICM1_I2C_BASE UL(0xD0200000) | ||
31 | #define SPEAR6XX_ICM1_JPEG_BASE UL(0xD0800000) | ||
32 | #define SPEAR6XX_ICM1_IRDA_BASE UL(0xD1000000) | ||
33 | #define SPEAR6XX_ICM1_FSMC_BASE UL(0xD1800000) | ||
34 | #define SPEAR6XX_ICM1_NAND_BASE UL(0xD2000000) | ||
35 | #define SPEAR6XX_ICM1_SRAM_BASE UL(0xD2800000) | ||
36 | |||
37 | /* ICM2 - Application Subsystem */ | ||
38 | #define SPEAR6XX_ICM2_BASE UL(0xD8000000) | ||
39 | #define SPEAR6XX_ICM2_TMR0_BASE UL(0xD8000000) | ||
40 | #define SPEAR6XX_ICM2_TMR1_BASE UL(0xD8080000) | ||
41 | #define SPEAR6XX_ICM2_GPIO_BASE UL(0xD8100000) | ||
42 | #define SPEAR6XX_ICM2_SSP2_BASE UL(0xD8180000) | ||
43 | #define SPEAR6XX_ICM2_ADC_BASE UL(0xD8200000) | ||
44 | 24 | ||
45 | /* ML-1, 2 - Multi Layer CPU Subsystem */ | 25 | /* ML-1, 2 - Multi Layer CPU Subsystem */ |
46 | #define SPEAR6XX_ML_CPU_BASE UL(0xF0000000) | 26 | #define SPEAR6XX_ML_CPU_BASE UL(0xF0000000) |
27 | #define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000) | ||
47 | #define SPEAR6XX_CPU_TMR_BASE UL(0xF0000000) | 28 | #define SPEAR6XX_CPU_TMR_BASE UL(0xF0000000) |
48 | #define SPEAR6XX_CPU_GPIO_BASE UL(0xF0100000) | ||
49 | #define SPEAR6XX_CPU_VIC_SEC_BASE UL(0xF1000000) | ||
50 | #define VA_SPEAR6XX_CPU_VIC_SEC_BASE IO_ADDRESS(SPEAR6XX_CPU_VIC_SEC_BASE) | ||
51 | #define SPEAR6XX_CPU_VIC_PRI_BASE UL(0xF1100000) | ||
52 | #define VA_SPEAR6XX_CPU_VIC_PRI_BASE IO_ADDRESS(SPEAR6XX_CPU_VIC_PRI_BASE) | ||
53 | 29 | ||
54 | /* ICM3 - Basic Subsystem */ | 30 | /* ICM3 - Basic Subsystem */ |
55 | #define SPEAR6XX_ICM3_BASE UL(0xF8000000) | ||
56 | #define SPEAR6XX_ICM3_SMEM_BASE UL(0xF8000000) | ||
57 | #define SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) | 31 | #define SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) |
58 | #define SPEAR6XX_ICM3_CLCD_BASE UL(0xFC200000) | 32 | #define VA_SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) |
59 | #define SPEAR6XX_ICM3_DMA_BASE UL(0xFC400000) | 33 | #define SPEAR6XX_ICM3_DMA_BASE UL(0xFC400000) |
60 | #define SPEAR6XX_ICM3_SDRAM_CTRL_BASE UL(0xFC600000) | ||
61 | #define SPEAR6XX_ICM3_TMR_BASE UL(0xFC800000) | ||
62 | #define SPEAR6XX_ICM3_WDT_BASE UL(0xFC880000) | ||
63 | #define SPEAR6XX_ICM3_RTC_BASE UL(0xFC900000) | ||
64 | #define SPEAR6XX_ICM3_GPIO_BASE UL(0xFC980000) | ||
65 | #define SPEAR6XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000) | 34 | #define SPEAR6XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000) |
66 | #define VA_SPEAR6XX_ICM3_SYS_CTRL_BASE IO_ADDRESS(SPEAR6XX_ICM3_SYS_CTRL_BASE) | 35 | #define VA_SPEAR6XX_ICM3_SYS_CTRL_BASE (VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_SYS_CTRL_BASE) |
67 | #define SPEAR6XX_ICM3_MISC_REG_BASE UL(0xFCA80000) | 36 | #define SPEAR6XX_ICM3_MISC_REG_BASE UL(0xFCA80000) |
68 | #define VA_SPEAR6XX_ICM3_MISC_REG_BASE IO_ADDRESS(SPEAR6XX_ICM3_MISC_REG_BASE) | 37 | #define VA_SPEAR6XX_ICM3_MISC_REG_BASE (VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_MISC_REG_BASE) |
69 | |||
70 | /* ICM4 - High Speed Connection */ | ||
71 | #define SPEAR6XX_ICM4_BASE UL(0xE0000000) | ||
72 | #define SPEAR6XX_ICM4_GMAC_BASE UL(0xE0800000) | ||
73 | #define SPEAR6XX_ICM4_USBD_FIFO_BASE UL(0xE1000000) | ||
74 | #define SPEAR6XX_ICM4_USBD_CSR_BASE UL(0xE1100000) | ||
75 | #define SPEAR6XX_ICM4_USBD_PLDT_BASE UL(0xE1200000) | ||
76 | #define SPEAR6XX_ICM4_USB_EHCI0_BASE UL(0xE1800000) | ||
77 | #define SPEAR6XX_ICM4_USB_OHCI0_BASE UL(0xE1900000) | ||
78 | #define SPEAR6XX_ICM4_USB_EHCI1_BASE UL(0xE2000000) | ||
79 | #define SPEAR6XX_ICM4_USB_OHCI1_BASE UL(0xE2100000) | ||
80 | #define SPEAR6XX_ICM4_USB_ARB_BASE UL(0xE2800000) | ||
81 | 38 | ||
82 | /* Debug uart for linux, will be used for debug and uncompress messages */ | 39 | /* Debug uart for linux, will be used for debug and uncompress messages */ |
83 | #define SPEAR_DBG_UART_BASE SPEAR6XX_ICM1_UART0_BASE | 40 | #define SPEAR_DBG_UART_BASE SPEAR6XX_ICM1_UART0_BASE |
diff --git a/arch/arm/mach-spear6xx/include/mach/spear600.h b/arch/arm/mach-spear6xx/include/mach/spear600.h deleted file mode 100644 index c068cc50b0fb..000000000000 --- a/arch/arm/mach-spear6xx/include/mach/spear600.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear66xx/include/mach/spear600.h | ||
3 | * | ||
4 | * SPEAr600 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR600 | ||
15 | |||
16 | #ifndef __MACH_SPEAR600_H | ||
17 | #define __MACH_SPEAR600_H | ||
18 | |||
19 | #endif /* __MACH_SPEAR600_H */ | ||
20 | |||
21 | #endif /* CONFIG_MACH_SPEAR600 */ | ||
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c index 2ed8b14c82c8..de194dbb8371 100644 --- a/arch/arm/mach-spear6xx/spear6xx.c +++ b/arch/arm/mach-spear6xx/spear6xx.c | |||
@@ -13,41 +13,404 @@ | |||
13 | * warranty of any kind, whether express or implied. | 13 | * warranty of any kind, whether express or implied. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/amba/pl08x.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/err.h> | ||
16 | #include <linux/of.h> | 19 | #include <linux/of.h> |
17 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
18 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
19 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <asm/hardware/pl080.h> | ||
20 | #include <asm/hardware/vic.h> | 24 | #include <asm/hardware/vic.h> |
21 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/time.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | #include <plat/pl080.h> | ||
22 | #include <mach/generic.h> | 29 | #include <mach/generic.h> |
23 | #include <mach/hardware.h> | 30 | #include <mach/spear.h> |
24 | 31 | ||
25 | /* Following will create static virtual/physical mappings */ | 32 | /* dmac device registration */ |
26 | static struct map_desc spear6xx_io_desc[] __initdata = { | 33 | static struct pl08x_channel_data spear600_dma_info[] = { |
27 | { | 34 | { |
28 | .virtual = VA_SPEAR6XX_ICM1_UART0_BASE, | 35 | .bus_id = "ssp1_rx", |
29 | .pfn = __phys_to_pfn(SPEAR6XX_ICM1_UART0_BASE), | 36 | .min_signal = 0, |
30 | .length = SZ_4K, | 37 | .max_signal = 0, |
31 | .type = MT_DEVICE | 38 | .muxval = 0, |
39 | .cctl = 0, | ||
40 | .periph_buses = PL08X_AHB1, | ||
32 | }, { | 41 | }, { |
33 | .virtual = VA_SPEAR6XX_CPU_VIC_PRI_BASE, | 42 | .bus_id = "ssp1_tx", |
34 | .pfn = __phys_to_pfn(SPEAR6XX_CPU_VIC_PRI_BASE), | 43 | .min_signal = 1, |
35 | .length = SZ_4K, | 44 | .max_signal = 1, |
36 | .type = MT_DEVICE | 45 | .muxval = 0, |
46 | .cctl = 0, | ||
47 | .periph_buses = PL08X_AHB1, | ||
37 | }, { | 48 | }, { |
38 | .virtual = VA_SPEAR6XX_CPU_VIC_SEC_BASE, | 49 | .bus_id = "uart0_rx", |
39 | .pfn = __phys_to_pfn(SPEAR6XX_CPU_VIC_SEC_BASE), | 50 | .min_signal = 2, |
40 | .length = SZ_4K, | 51 | .max_signal = 2, |
41 | .type = MT_DEVICE | 52 | .muxval = 0, |
53 | .cctl = 0, | ||
54 | .periph_buses = PL08X_AHB1, | ||
55 | }, { | ||
56 | .bus_id = "uart0_tx", | ||
57 | .min_signal = 3, | ||
58 | .max_signal = 3, | ||
59 | .muxval = 0, | ||
60 | .cctl = 0, | ||
61 | .periph_buses = PL08X_AHB1, | ||
62 | }, { | ||
63 | .bus_id = "uart1_rx", | ||
64 | .min_signal = 4, | ||
65 | .max_signal = 4, | ||
66 | .muxval = 0, | ||
67 | .cctl = 0, | ||
68 | .periph_buses = PL08X_AHB1, | ||
69 | }, { | ||
70 | .bus_id = "uart1_tx", | ||
71 | .min_signal = 5, | ||
72 | .max_signal = 5, | ||
73 | .muxval = 0, | ||
74 | .cctl = 0, | ||
75 | .periph_buses = PL08X_AHB1, | ||
76 | }, { | ||
77 | .bus_id = "ssp2_rx", | ||
78 | .min_signal = 6, | ||
79 | .max_signal = 6, | ||
80 | .muxval = 0, | ||
81 | .cctl = 0, | ||
82 | .periph_buses = PL08X_AHB2, | ||
83 | }, { | ||
84 | .bus_id = "ssp2_tx", | ||
85 | .min_signal = 7, | ||
86 | .max_signal = 7, | ||
87 | .muxval = 0, | ||
88 | .cctl = 0, | ||
89 | .periph_buses = PL08X_AHB2, | ||
90 | }, { | ||
91 | .bus_id = "ssp0_rx", | ||
92 | .min_signal = 8, | ||
93 | .max_signal = 8, | ||
94 | .muxval = 0, | ||
95 | .cctl = 0, | ||
96 | .periph_buses = PL08X_AHB1, | ||
97 | }, { | ||
98 | .bus_id = "ssp0_tx", | ||
99 | .min_signal = 9, | ||
100 | .max_signal = 9, | ||
101 | .muxval = 0, | ||
102 | .cctl = 0, | ||
103 | .periph_buses = PL08X_AHB1, | ||
104 | }, { | ||
105 | .bus_id = "i2c_rx", | ||
106 | .min_signal = 10, | ||
107 | .max_signal = 10, | ||
108 | .muxval = 0, | ||
109 | .cctl = 0, | ||
110 | .periph_buses = PL08X_AHB1, | ||
111 | }, { | ||
112 | .bus_id = "i2c_tx", | ||
113 | .min_signal = 11, | ||
114 | .max_signal = 11, | ||
115 | .muxval = 0, | ||
116 | .cctl = 0, | ||
117 | .periph_buses = PL08X_AHB1, | ||
118 | }, { | ||
119 | .bus_id = "irda", | ||
120 | .min_signal = 12, | ||
121 | .max_signal = 12, | ||
122 | .muxval = 0, | ||
123 | .cctl = 0, | ||
124 | .periph_buses = PL08X_AHB1, | ||
125 | }, { | ||
126 | .bus_id = "adc", | ||
127 | .min_signal = 13, | ||
128 | .max_signal = 13, | ||
129 | .muxval = 0, | ||
130 | .cctl = 0, | ||
131 | .periph_buses = PL08X_AHB2, | ||
132 | }, { | ||
133 | .bus_id = "to_jpeg", | ||
134 | .min_signal = 14, | ||
135 | .max_signal = 14, | ||
136 | .muxval = 0, | ||
137 | .cctl = 0, | ||
138 | .periph_buses = PL08X_AHB1, | ||
139 | }, { | ||
140 | .bus_id = "from_jpeg", | ||
141 | .min_signal = 15, | ||
142 | .max_signal = 15, | ||
143 | .muxval = 0, | ||
144 | .cctl = 0, | ||
145 | .periph_buses = PL08X_AHB1, | ||
146 | }, { | ||
147 | .bus_id = "ras0_rx", | ||
148 | .min_signal = 0, | ||
149 | .max_signal = 0, | ||
150 | .muxval = 1, | ||
151 | .cctl = 0, | ||
152 | .periph_buses = PL08X_AHB1, | ||
153 | }, { | ||
154 | .bus_id = "ras0_tx", | ||
155 | .min_signal = 1, | ||
156 | .max_signal = 1, | ||
157 | .muxval = 1, | ||
158 | .cctl = 0, | ||
159 | .periph_buses = PL08X_AHB1, | ||
160 | }, { | ||
161 | .bus_id = "ras1_rx", | ||
162 | .min_signal = 2, | ||
163 | .max_signal = 2, | ||
164 | .muxval = 1, | ||
165 | .cctl = 0, | ||
166 | .periph_buses = PL08X_AHB1, | ||
167 | }, { | ||
168 | .bus_id = "ras1_tx", | ||
169 | .min_signal = 3, | ||
170 | .max_signal = 3, | ||
171 | .muxval = 1, | ||
172 | .cctl = 0, | ||
173 | .periph_buses = PL08X_AHB1, | ||
174 | }, { | ||
175 | .bus_id = "ras2_rx", | ||
176 | .min_signal = 4, | ||
177 | .max_signal = 4, | ||
178 | .muxval = 1, | ||
179 | .cctl = 0, | ||
180 | .periph_buses = PL08X_AHB1, | ||
181 | }, { | ||
182 | .bus_id = "ras2_tx", | ||
183 | .min_signal = 5, | ||
184 | .max_signal = 5, | ||
185 | .muxval = 1, | ||
186 | .cctl = 0, | ||
187 | .periph_buses = PL08X_AHB1, | ||
188 | }, { | ||
189 | .bus_id = "ras3_rx", | ||
190 | .min_signal = 6, | ||
191 | .max_signal = 6, | ||
192 | .muxval = 1, | ||
193 | .cctl = 0, | ||
194 | .periph_buses = PL08X_AHB1, | ||
195 | }, { | ||
196 | .bus_id = "ras3_tx", | ||
197 | .min_signal = 7, | ||
198 | .max_signal = 7, | ||
199 | .muxval = 1, | ||
200 | .cctl = 0, | ||
201 | .periph_buses = PL08X_AHB1, | ||
202 | }, { | ||
203 | .bus_id = "ras4_rx", | ||
204 | .min_signal = 8, | ||
205 | .max_signal = 8, | ||
206 | .muxval = 1, | ||
207 | .cctl = 0, | ||
208 | .periph_buses = PL08X_AHB1, | ||
209 | }, { | ||
210 | .bus_id = "ras4_tx", | ||
211 | .min_signal = 9, | ||
212 | .max_signal = 9, | ||
213 | .muxval = 1, | ||
214 | .cctl = 0, | ||
215 | .periph_buses = PL08X_AHB1, | ||
216 | }, { | ||
217 | .bus_id = "ras5_rx", | ||
218 | .min_signal = 10, | ||
219 | .max_signal = 10, | ||
220 | .muxval = 1, | ||
221 | .cctl = 0, | ||
222 | .periph_buses = PL08X_AHB1, | ||
223 | }, { | ||
224 | .bus_id = "ras5_tx", | ||
225 | .min_signal = 11, | ||
226 | .max_signal = 11, | ||
227 | .muxval = 1, | ||
228 | .cctl = 0, | ||
229 | .periph_buses = PL08X_AHB1, | ||
230 | }, { | ||
231 | .bus_id = "ras6_rx", | ||
232 | .min_signal = 12, | ||
233 | .max_signal = 12, | ||
234 | .muxval = 1, | ||
235 | .cctl = 0, | ||
236 | .periph_buses = PL08X_AHB1, | ||
237 | }, { | ||
238 | .bus_id = "ras6_tx", | ||
239 | .min_signal = 13, | ||
240 | .max_signal = 13, | ||
241 | .muxval = 1, | ||
242 | .cctl = 0, | ||
243 | .periph_buses = PL08X_AHB1, | ||
42 | }, { | 244 | }, { |
43 | .virtual = VA_SPEAR6XX_ICM3_SYS_CTRL_BASE, | 245 | .bus_id = "ras7_rx", |
44 | .pfn = __phys_to_pfn(SPEAR6XX_ICM3_SYS_CTRL_BASE), | 246 | .min_signal = 14, |
45 | .length = SZ_4K, | 247 | .max_signal = 14, |
248 | .muxval = 1, | ||
249 | .cctl = 0, | ||
250 | .periph_buses = PL08X_AHB1, | ||
251 | }, { | ||
252 | .bus_id = "ras7_tx", | ||
253 | .min_signal = 15, | ||
254 | .max_signal = 15, | ||
255 | .muxval = 1, | ||
256 | .cctl = 0, | ||
257 | .periph_buses = PL08X_AHB1, | ||
258 | }, { | ||
259 | .bus_id = "ext0_rx", | ||
260 | .min_signal = 0, | ||
261 | .max_signal = 0, | ||
262 | .muxval = 2, | ||
263 | .cctl = 0, | ||
264 | .periph_buses = PL08X_AHB2, | ||
265 | }, { | ||
266 | .bus_id = "ext0_tx", | ||
267 | .min_signal = 1, | ||
268 | .max_signal = 1, | ||
269 | .muxval = 2, | ||
270 | .cctl = 0, | ||
271 | .periph_buses = PL08X_AHB2, | ||
272 | }, { | ||
273 | .bus_id = "ext1_rx", | ||
274 | .min_signal = 2, | ||
275 | .max_signal = 2, | ||
276 | .muxval = 2, | ||
277 | .cctl = 0, | ||
278 | .periph_buses = PL08X_AHB2, | ||
279 | }, { | ||
280 | .bus_id = "ext1_tx", | ||
281 | .min_signal = 3, | ||
282 | .max_signal = 3, | ||
283 | .muxval = 2, | ||
284 | .cctl = 0, | ||
285 | .periph_buses = PL08X_AHB2, | ||
286 | }, { | ||
287 | .bus_id = "ext2_rx", | ||
288 | .min_signal = 4, | ||
289 | .max_signal = 4, | ||
290 | .muxval = 2, | ||
291 | .cctl = 0, | ||
292 | .periph_buses = PL08X_AHB2, | ||
293 | }, { | ||
294 | .bus_id = "ext2_tx", | ||
295 | .min_signal = 5, | ||
296 | .max_signal = 5, | ||
297 | .muxval = 2, | ||
298 | .cctl = 0, | ||
299 | .periph_buses = PL08X_AHB2, | ||
300 | }, { | ||
301 | .bus_id = "ext3_rx", | ||
302 | .min_signal = 6, | ||
303 | .max_signal = 6, | ||
304 | .muxval = 2, | ||
305 | .cctl = 0, | ||
306 | .periph_buses = PL08X_AHB2, | ||
307 | }, { | ||
308 | .bus_id = "ext3_tx", | ||
309 | .min_signal = 7, | ||
310 | .max_signal = 7, | ||
311 | .muxval = 2, | ||
312 | .cctl = 0, | ||
313 | .periph_buses = PL08X_AHB2, | ||
314 | }, { | ||
315 | .bus_id = "ext4_rx", | ||
316 | .min_signal = 8, | ||
317 | .max_signal = 8, | ||
318 | .muxval = 2, | ||
319 | .cctl = 0, | ||
320 | .periph_buses = PL08X_AHB2, | ||
321 | }, { | ||
322 | .bus_id = "ext4_tx", | ||
323 | .min_signal = 9, | ||
324 | .max_signal = 9, | ||
325 | .muxval = 2, | ||
326 | .cctl = 0, | ||
327 | .periph_buses = PL08X_AHB2, | ||
328 | }, { | ||
329 | .bus_id = "ext5_rx", | ||
330 | .min_signal = 10, | ||
331 | .max_signal = 10, | ||
332 | .muxval = 2, | ||
333 | .cctl = 0, | ||
334 | .periph_buses = PL08X_AHB2, | ||
335 | }, { | ||
336 | .bus_id = "ext5_tx", | ||
337 | .min_signal = 11, | ||
338 | .max_signal = 11, | ||
339 | .muxval = 2, | ||
340 | .cctl = 0, | ||
341 | .periph_buses = PL08X_AHB2, | ||
342 | }, { | ||
343 | .bus_id = "ext6_rx", | ||
344 | .min_signal = 12, | ||
345 | .max_signal = 12, | ||
346 | .muxval = 2, | ||
347 | .cctl = 0, | ||
348 | .periph_buses = PL08X_AHB2, | ||
349 | }, { | ||
350 | .bus_id = "ext6_tx", | ||
351 | .min_signal = 13, | ||
352 | .max_signal = 13, | ||
353 | .muxval = 2, | ||
354 | .cctl = 0, | ||
355 | .periph_buses = PL08X_AHB2, | ||
356 | }, { | ||
357 | .bus_id = "ext7_rx", | ||
358 | .min_signal = 14, | ||
359 | .max_signal = 14, | ||
360 | .muxval = 2, | ||
361 | .cctl = 0, | ||
362 | .periph_buses = PL08X_AHB2, | ||
363 | }, { | ||
364 | .bus_id = "ext7_tx", | ||
365 | .min_signal = 15, | ||
366 | .max_signal = 15, | ||
367 | .muxval = 2, | ||
368 | .cctl = 0, | ||
369 | .periph_buses = PL08X_AHB2, | ||
370 | }, | ||
371 | }; | ||
372 | |||
373 | struct pl08x_platform_data pl080_plat_data = { | ||
374 | .memcpy_channel = { | ||
375 | .bus_id = "memcpy", | ||
376 | .cctl = (PL080_BSIZE_16 << PL080_CONTROL_SB_SIZE_SHIFT | \ | ||
377 | PL080_BSIZE_16 << PL080_CONTROL_DB_SIZE_SHIFT | \ | ||
378 | PL080_WIDTH_32BIT << PL080_CONTROL_SWIDTH_SHIFT | \ | ||
379 | PL080_WIDTH_32BIT << PL080_CONTROL_DWIDTH_SHIFT | \ | ||
380 | PL080_CONTROL_PROT_BUFF | PL080_CONTROL_PROT_CACHE | \ | ||
381 | PL080_CONTROL_PROT_SYS), | ||
382 | }, | ||
383 | .lli_buses = PL08X_AHB1, | ||
384 | .mem_buses = PL08X_AHB1, | ||
385 | .get_signal = pl080_get_signal, | ||
386 | .put_signal = pl080_put_signal, | ||
387 | .slave_channels = spear600_dma_info, | ||
388 | .num_slave_channels = ARRAY_SIZE(spear600_dma_info), | ||
389 | }; | ||
390 | |||
391 | /* | ||
392 | * Following will create 16MB static virtual/physical mappings | ||
393 | * PHYSICAL VIRTUAL | ||
394 | * 0xF0000000 0xF0000000 | ||
395 | * 0xF1000000 0xF1000000 | ||
396 | * 0xD0000000 0xFD000000 | ||
397 | * 0xFC000000 0xFC000000 | ||
398 | */ | ||
399 | struct map_desc spear6xx_io_desc[] __initdata = { | ||
400 | { | ||
401 | .virtual = VA_SPEAR6XX_ML_CPU_BASE, | ||
402 | .pfn = __phys_to_pfn(SPEAR6XX_ML_CPU_BASE), | ||
403 | .length = 2 * SZ_16M, | ||
404 | .type = MT_DEVICE | ||
405 | }, { | ||
406 | .virtual = VA_SPEAR6XX_ICM1_BASE, | ||
407 | .pfn = __phys_to_pfn(SPEAR6XX_ICM1_BASE), | ||
408 | .length = SZ_16M, | ||
46 | .type = MT_DEVICE | 409 | .type = MT_DEVICE |
47 | }, { | 410 | }, { |
48 | .virtual = VA_SPEAR6XX_ICM3_MISC_REG_BASE, | 411 | .virtual = VA_SPEAR6XX_ICM3_SMI_CTRL_BASE, |
49 | .pfn = __phys_to_pfn(SPEAR6XX_ICM3_MISC_REG_BASE), | 412 | .pfn = __phys_to_pfn(SPEAR6XX_ICM3_SMI_CTRL_BASE), |
50 | .length = SZ_4K, | 413 | .length = SZ_16M, |
51 | .type = MT_DEVICE | 414 | .type = MT_DEVICE |
52 | }, | 415 | }, |
53 | }; | 416 | }; |
@@ -85,16 +448,24 @@ static void __init spear6xx_timer_init(void) | |||
85 | clk_put(gpt_clk); | 448 | clk_put(gpt_clk); |
86 | clk_put(pclk); | 449 | clk_put(pclk); |
87 | 450 | ||
88 | spear_setup_timer(); | 451 | spear_setup_timer(SPEAR6XX_CPU_TMR_BASE, IRQ_CPU_GPT1_1); |
89 | } | 452 | } |
90 | 453 | ||
91 | struct sys_timer spear6xx_timer = { | 454 | struct sys_timer spear6xx_timer = { |
92 | .init = spear6xx_timer_init, | 455 | .init = spear6xx_timer_init, |
93 | }; | 456 | }; |
94 | 457 | ||
458 | /* Add auxdata to pass platform data */ | ||
459 | struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { | ||
460 | OF_DEV_AUXDATA("arm,pl080", SPEAR6XX_ICM3_DMA_BASE, NULL, | ||
461 | &pl080_plat_data), | ||
462 | {} | ||
463 | }; | ||
464 | |||
95 | static void __init spear600_dt_init(void) | 465 | static void __init spear600_dt_init(void) |
96 | { | 466 | { |
97 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 467 | of_platform_populate(NULL, of_default_bus_match_table, |
468 | spear6xx_auxdata_lookup, NULL); | ||
98 | } | 469 | } |
99 | 470 | ||
100 | static const char *spear600_dt_board_compat[] = { | 471 | static const char *spear600_dt_board_compat[] = { |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 77d03c1fbd04..f8150155a442 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -605,7 +605,6 @@ static void __init mop500_uart_init(struct device *parent) | |||
605 | static struct platform_device *snowball_platform_devs[] __initdata = { | 605 | static struct platform_device *snowball_platform_devs[] __initdata = { |
606 | &snowball_led_dev, | 606 | &snowball_led_dev, |
607 | &snowball_key_dev, | 607 | &snowball_key_dev, |
608 | &snowball_sbnet_dev, | ||
609 | &ab8500_device, | 608 | &ab8500_device, |
610 | }; | 609 | }; |
611 | 610 | ||
@@ -646,7 +645,6 @@ static void __init mop500_init_machine(void) | |||
646 | static void __init snowball_init_machine(void) | 645 | static void __init snowball_init_machine(void) |
647 | { | 646 | { |
648 | struct device *parent = NULL; | 647 | struct device *parent = NULL; |
649 | int i2c0_devs; | ||
650 | int i; | 648 | int i; |
651 | 649 | ||
652 | parent = u8500_init_devices(); | 650 | parent = u8500_init_devices(); |
@@ -664,11 +662,6 @@ static void __init snowball_init_machine(void) | |||
664 | mop500_spi_init(parent); | 662 | mop500_spi_init(parent); |
665 | mop500_uart_init(parent); | 663 | mop500_uart_init(parent); |
666 | 664 | ||
667 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
668 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
669 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
670 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
671 | |||
672 | /* This board has full regulator constraints */ | 665 | /* This board has full regulator constraints */ |
673 | regulator_has_full_constraints(); | 666 | regulator_has_full_constraints(); |
674 | } | 667 | } |
@@ -753,9 +746,10 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
753 | {}, | 746 | {}, |
754 | }; | 747 | }; |
755 | 748 | ||
756 | static const struct of_device_id u8500_soc_node[] = { | 749 | static const struct of_device_id u8500_local_bus_nodes[] = { |
757 | /* only create devices below soc node */ | 750 | /* only create devices below soc node */ |
758 | { .compatible = "stericsson,db8500", }, | 751 | { .compatible = "stericsson,db8500", }, |
752 | { .compatible = "simple-bus"}, | ||
759 | { }, | 753 | { }, |
760 | }; | 754 | }; |
761 | 755 | ||
@@ -766,7 +760,6 @@ static void __init u8500_init_machine(void) | |||
766 | int i; | 760 | int i; |
767 | 761 | ||
768 | parent = u8500_init_devices(); | 762 | parent = u8500_init_devices(); |
769 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
770 | 763 | ||
771 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) | 764 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) |
772 | mop500_platform_devs[i]->dev.parent = parent; | 765 | mop500_platform_devs[i]->dev.parent = parent; |
@@ -774,7 +767,7 @@ static void __init u8500_init_machine(void) | |||
774 | snowball_platform_devs[i]->dev.parent = parent; | 767 | snowball_platform_devs[i]->dev.parent = parent; |
775 | 768 | ||
776 | /* automatically probe child nodes of db8500 device */ | 769 | /* automatically probe child nodes of db8500 device */ |
777 | of_platform_populate(NULL, u8500_soc_node, u8500_auxdata_lookup, parent); | 770 | of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); |
778 | 771 | ||
779 | if (of_machine_is_compatible("st-ericsson,mop500")) { | 772 | if (of_machine_is_compatible("st-ericsson,mop500")) { |
780 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | 773 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; |
@@ -784,6 +777,12 @@ static void __init u8500_init_machine(void) | |||
784 | ARRAY_SIZE(mop500_platform_devs)); | 777 | ARRAY_SIZE(mop500_platform_devs)); |
785 | 778 | ||
786 | mop500_sdi_init(parent); | 779 | mop500_sdi_init(parent); |
780 | |||
781 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
782 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
783 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
784 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
785 | |||
787 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { | 786 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { |
788 | snowball_pins_init(); | 787 | snowball_pins_init(); |
789 | platform_add_devices(snowball_platform_devs, | 788 | platform_add_devices(snowball_platform_devs, |
@@ -797,19 +796,21 @@ static void __init u8500_init_machine(void) | |||
797 | * instead. | 796 | * instead. |
798 | */ | 797 | */ |
799 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; | 798 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; |
800 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | ||
801 | hrefv60_pins_init(); | 799 | hrefv60_pins_init(); |
802 | platform_add_devices(mop500_platform_devs, | 800 | platform_add_devices(mop500_platform_devs, |
803 | ARRAY_SIZE(mop500_platform_devs)); | 801 | ARRAY_SIZE(mop500_platform_devs)); |
804 | 802 | ||
805 | hrefv60_sdi_init(parent); | 803 | hrefv60_sdi_init(parent); |
804 | |||
805 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
806 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | ||
807 | |||
808 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
809 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
810 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
806 | } | 811 | } |
807 | mop500_i2c_init(parent); | 812 | mop500_i2c_init(parent); |
808 | 813 | ||
809 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
810 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
811 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
812 | |||
813 | /* This board has full regulator constraints */ | 814 | /* This board has full regulator constraints */ |
814 | regulator_has_full_constraints(); | 815 | regulator_has_full_constraints(); |
815 | } | 816 | } |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 9bd8163896cf..f44a12ccddf3 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -121,6 +121,12 @@ static struct platform_device *platform_devs[] __initdata = { | |||
121 | &db8500_prcmu_device, | 121 | &db8500_prcmu_device, |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct platform_device *of_platform_devs[] __initdata = { | ||
125 | &u8500_dma40_device, | ||
126 | &db8500_pmu_device, | ||
127 | &db8500_prcmu_device, | ||
128 | }; | ||
129 | |||
124 | static resource_size_t __initdata db8500_gpio_base[] = { | 130 | static resource_size_t __initdata db8500_gpio_base[] = { |
125 | U8500_GPIOBANK0_BASE, | 131 | U8500_GPIOBANK0_BASE, |
126 | U8500_GPIOBANK1_BASE, | 132 | U8500_GPIOBANK1_BASE, |
@@ -199,10 +205,16 @@ struct device * __init u8500_init_devices(void) | |||
199 | platform_device_register_data(parent, | 205 | platform_device_register_data(parent, |
200 | "cpufreq-u8500", -1, NULL, 0); | 206 | "cpufreq-u8500", -1, NULL, 0); |
201 | 207 | ||
202 | for (i = 0; i < ARRAY_SIZE(platform_devs); i++) | 208 | for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++) |
203 | platform_devs[i]->dev.parent = parent; | 209 | of_platform_devs[i]->dev.parent = parent; |
204 | 210 | ||
205 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | 211 | /* |
212 | * Devices to be DT:ed: | ||
213 | * u8500_dma40_device = todo | ||
214 | * db8500_pmu_device = todo | ||
215 | * db8500_prcmu_device = todo | ||
216 | */ | ||
217 | platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs)); | ||
206 | 218 | ||
207 | return parent; | 219 | return parent; |
208 | } | 220 | } |
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index 52e55337aa9b..bd8e110cbcc2 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/clksrc-dbx500-prcmu.h> | 9 | #include <linux/clksrc-dbx500-prcmu.h> |
10 | #include <linux/of.h> | 10 | #include <linux/of.h> |
11 | #include <linux/of_address.h> | ||
11 | 12 | ||
12 | #include <asm/smp_twd.h> | 13 | #include <asm/smp_twd.h> |
13 | 14 | ||
@@ -41,10 +42,17 @@ static void __init ux500_twd_init(void) | |||
41 | #define ux500_twd_init() do { } while(0) | 42 | #define ux500_twd_init() do { } while(0) |
42 | #endif | 43 | #endif |
43 | 44 | ||
45 | const static struct of_device_id prcmu_timer_of_match[] __initconst = { | ||
46 | { .compatible = "stericsson,db8500-prcmu-timer-4", }, | ||
47 | { }, | ||
48 | }; | ||
49 | |||
44 | static void __init ux500_timer_init(void) | 50 | static void __init ux500_timer_init(void) |
45 | { | 51 | { |
46 | void __iomem *mtu_timer_base; | 52 | void __iomem *mtu_timer_base; |
47 | void __iomem *prcmu_timer_base; | 53 | void __iomem *prcmu_timer_base; |
54 | void __iomem *tmp_base; | ||
55 | struct device_node *np; | ||
48 | 56 | ||
49 | if (cpu_is_u8500()) { | 57 | if (cpu_is_u8500()) { |
50 | mtu_timer_base = __io_address(U8500_MTU0_BASE); | 58 | mtu_timer_base = __io_address(U8500_MTU0_BASE); |
@@ -53,6 +61,22 @@ static void __init ux500_timer_init(void) | |||
53 | ux500_unknown_soc(); | 61 | ux500_unknown_soc(); |
54 | } | 62 | } |
55 | 63 | ||
64 | /* TODO: Once MTU has been DT:ed place code above into else. */ | ||
65 | if (of_have_populated_dt()) { | ||
66 | np = of_find_matching_node(NULL, prcmu_timer_of_match); | ||
67 | if (!np) | ||
68 | goto dt_fail; | ||
69 | |||
70 | tmp_base = of_iomap(np, 0); | ||
71 | if (!tmp_base) | ||
72 | goto dt_fail; | ||
73 | |||
74 | prcmu_timer_base = tmp_base; | ||
75 | } | ||
76 | |||
77 | dt_fail: | ||
78 | /* Doing it the old fashioned way. */ | ||
79 | |||
56 | /* | 80 | /* |
57 | * Here we register the timerblocks active in the system. | 81 | * Here we register the timerblocks active in the system. |
58 | * Localtimers (twd) is started when both cpu is up and running. | 82 | * Localtimers (twd) is started when both cpu is up and running. |
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig index 1bb3dbce8810..6c066fcb2979 100644 --- a/arch/arm/plat-spear/Kconfig +++ b/arch/arm/plat-spear/Kconfig | |||
@@ -9,9 +9,10 @@ choice | |||
9 | default ARCH_SPEAR3XX | 9 | default ARCH_SPEAR3XX |
10 | 10 | ||
11 | config ARCH_SPEAR3XX | 11 | config ARCH_SPEAR3XX |
12 | bool "SPEAr3XX" | 12 | bool "ST SPEAr3xx with Device Tree" |
13 | select ARM_VIC | 13 | select ARM_VIC |
14 | select CPU_ARM926T | 14 | select CPU_ARM926T |
15 | select USE_OF | ||
15 | help | 16 | help |
16 | Supports for ARM's SPEAR3XX family | 17 | Supports for ARM's SPEAR3XX family |
17 | 18 | ||
diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile index e0f2e5b9530c..4af6258d0fee 100644 --- a/arch/arm/plat-spear/Makefile +++ b/arch/arm/plat-spear/Makefile | |||
@@ -3,6 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := clock.o restart.o time.o | 6 | obj-y := clock.o restart.o time.o pl080.o |
7 | 7 | ||
8 | obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o | 8 | obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o |
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S index 02b160a1ec9b..ab3de721c5db 100644 --- a/arch/arm/plat-spear/include/plat/debug-macro.S +++ b/arch/arm/plat-spear/include/plat/debug-macro.S | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/amba/serial.h> | 14 | #include <linux/amba/serial.h> |
15 | #include <mach/hardware.h> | 15 | #include <mach/spear.h> |
16 | 16 | ||
17 | .macro addruart, rp, rv, tmp | 17 | .macro addruart, rp, rv, tmp |
18 | mov \rp, #SPEAR_DBG_UART_BASE @ Physical base | 18 | mov \rp, #SPEAR_DBG_UART_BASE @ Physical base |
diff --git a/arch/arm/plat-spear/include/plat/hardware.h b/arch/arm/plat-spear/include/plat/hardware.h deleted file mode 100644 index 70187d763e26..000000000000 --- a/arch/arm/plat-spear/include/plat/hardware.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for SPEAr | ||
5 | * | ||
6 | * Copyright (C) 2010 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_HARDWARE_H | ||
15 | #define __PLAT_HARDWARE_H | ||
16 | |||
17 | #endif /* __PLAT_HARDWARE_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/pl080.h b/arch/arm/plat-spear/include/plat/pl080.h new file mode 100644 index 000000000000..e14a3e4932f9 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/pl080.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/pl080.h | ||
3 | * | ||
4 | * DMAC pl080 definitions for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2012 ST Microelectronics | ||
7 | * Viresh Kumar <viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_PL080_H | ||
15 | #define __PLAT_PL080_H | ||
16 | |||
17 | struct pl08x_dma_chan; | ||
18 | int pl080_get_signal(struct pl08x_dma_chan *ch); | ||
19 | void pl080_put_signal(struct pl08x_dma_chan *ch); | ||
20 | |||
21 | #endif /* __PLAT_PL080_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h index 1bf84527aee4..6dd455bafdfd 100644 --- a/arch/arm/plat-spear/include/plat/uncompress.h +++ b/arch/arm/plat-spear/include/plat/uncompress.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/amba/serial.h> | 15 | #include <linux/amba/serial.h> |
16 | #include <mach/hardware.h> | 16 | #include <mach/spear.h> |
17 | 17 | ||
18 | #ifndef __PLAT_UNCOMPRESS_H | 18 | #ifndef __PLAT_UNCOMPRESS_H |
19 | #define __PLAT_UNCOMPRESS_H | 19 | #define __PLAT_UNCOMPRESS_H |
diff --git a/arch/arm/plat-spear/pl080.c b/arch/arm/plat-spear/pl080.c new file mode 100644 index 000000000000..a56a067717c1 --- /dev/null +++ b/arch/arm/plat-spear/pl080.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/pl080.c | ||
3 | * | ||
4 | * DMAC pl080 definitions for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2012 ST Microelectronics | ||
7 | * Viresh Kumar <viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/amba/pl08x.h> | ||
15 | #include <linux/amba/bus.h> | ||
16 | #include <linux/bug.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/spinlock_types.h> | ||
20 | #include <mach/spear.h> | ||
21 | #include <mach/misc_regs.h> | ||
22 | |||
23 | static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x); | ||
24 | |||
25 | struct { | ||
26 | unsigned char busy; | ||
27 | unsigned char val; | ||
28 | } signals[16] = {{0, 0}, }; | ||
29 | |||
30 | int pl080_get_signal(struct pl08x_dma_chan *ch) | ||
31 | { | ||
32 | const struct pl08x_channel_data *cd = ch->cd; | ||
33 | unsigned int signal = cd->min_signal, val; | ||
34 | unsigned long flags; | ||
35 | |||
36 | spin_lock_irqsave(&lock, flags); | ||
37 | |||
38 | /* Return if signal is already acquired by somebody else */ | ||
39 | if (signals[signal].busy && | ||
40 | (signals[signal].val != cd->muxval)) { | ||
41 | spin_unlock_irqrestore(&lock, flags); | ||
42 | return -EBUSY; | ||
43 | } | ||
44 | |||
45 | /* If acquiring for the first time, configure it */ | ||
46 | if (!signals[signal].busy) { | ||
47 | val = readl(DMA_CHN_CFG); | ||
48 | |||
49 | /* | ||
50 | * Each request line has two bits in DMA_CHN_CFG register. To | ||
51 | * goto the bits of current request line, do left shift of | ||
52 | * value by 2 * signal number. | ||
53 | */ | ||
54 | val &= ~(0x3 << (signal * 2)); | ||
55 | val |= cd->muxval << (signal * 2); | ||
56 | writel(val, DMA_CHN_CFG); | ||
57 | } | ||
58 | |||
59 | signals[signal].busy++; | ||
60 | signals[signal].val = cd->muxval; | ||
61 | spin_unlock_irqrestore(&lock, flags); | ||
62 | |||
63 | return signal; | ||
64 | } | ||
65 | |||
66 | void pl080_put_signal(struct pl08x_dma_chan *ch) | ||
67 | { | ||
68 | const struct pl08x_channel_data *cd = ch->cd; | ||
69 | unsigned long flags; | ||
70 | |||
71 | spin_lock_irqsave(&lock, flags); | ||
72 | |||
73 | /* if signal is not used */ | ||
74 | if (!signals[cd->min_signal].busy) | ||
75 | BUG(); | ||
76 | |||
77 | signals[cd->min_signal].busy--; | ||
78 | |||
79 | spin_unlock_irqrestore(&lock, flags); | ||
80 | } | ||
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c index 16f203e78d89..4471a232713a 100644 --- a/arch/arm/plat-spear/restart.c +++ b/arch/arm/plat-spear/restart.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <asm/system_misc.h> | 14 | #include <asm/system_misc.h> |
15 | #include <asm/hardware/sp810.h> | 15 | #include <asm/hardware/sp810.h> |
16 | #include <mach/hardware.h> | 16 | #include <mach/spear.h> |
17 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
18 | 18 | ||
19 | void spear_restart(char mode, const char *cmd) | 19 | void spear_restart(char mode, const char *cmd) |
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c index abb5bdecd509..a3164d1647fd 100644 --- a/arch/arm/plat-spear/time.c +++ b/arch/arm/plat-spear/time.c | |||
@@ -15,14 +15,13 @@ | |||
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/ioport.h> | ||
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/time.h> | 21 | #include <linux/time.h> |
21 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
22 | #include <asm/mach/time.h> | 23 | #include <asm/mach/time.h> |
23 | #include <mach/generic.h> | 24 | #include <mach/generic.h> |
24 | #include <mach/hardware.h> | ||
25 | #include <mach/irqs.h> | ||
26 | 25 | ||
27 | /* | 26 | /* |
28 | * We would use TIMER0 and TIMER1 as clockevent and clocksource. | 27 | * We would use TIMER0 and TIMER1 as clockevent and clocksource. |
@@ -175,7 +174,7 @@ static struct irqaction spear_timer_irq = { | |||
175 | .handler = spear_timer_interrupt | 174 | .handler = spear_timer_interrupt |
176 | }; | 175 | }; |
177 | 176 | ||
178 | static void __init spear_clockevent_init(void) | 177 | static void __init spear_clockevent_init(int irq) |
179 | { | 178 | { |
180 | u32 tick_rate; | 179 | u32 tick_rate; |
181 | 180 | ||
@@ -195,19 +194,19 @@ static void __init spear_clockevent_init(void) | |||
195 | 194 | ||
196 | clockevents_register_device(&clkevt); | 195 | clockevents_register_device(&clkevt); |
197 | 196 | ||
198 | setup_irq(SPEAR_GPT0_CHAN0_IRQ, &spear_timer_irq); | 197 | setup_irq(irq, &spear_timer_irq); |
199 | } | 198 | } |
200 | 199 | ||
201 | void __init spear_setup_timer(void) | 200 | void __init spear_setup_timer(resource_size_t base, int irq) |
202 | { | 201 | { |
203 | int ret; | 202 | int ret; |
204 | 203 | ||
205 | if (!request_mem_region(SPEAR_GPT0_BASE, SZ_1K, "gpt0")) { | 204 | if (!request_mem_region(base, SZ_1K, "gpt0")) { |
206 | pr_err("%s:cannot get IO addr\n", __func__); | 205 | pr_err("%s:cannot get IO addr\n", __func__); |
207 | return; | 206 | return; |
208 | } | 207 | } |
209 | 208 | ||
210 | gpt_base = (void __iomem *)ioremap(SPEAR_GPT0_BASE, SZ_1K); | 209 | gpt_base = ioremap(base, SZ_1K); |
211 | if (!gpt_base) { | 210 | if (!gpt_base) { |
212 | pr_err("%s:ioremap failed for gpt\n", __func__); | 211 | pr_err("%s:ioremap failed for gpt\n", __func__); |
213 | goto err_mem; | 212 | goto err_mem; |
@@ -225,7 +224,7 @@ void __init spear_setup_timer(void) | |||
225 | goto err_clk; | 224 | goto err_clk; |
226 | } | 225 | } |
227 | 226 | ||
228 | spear_clockevent_init(); | 227 | spear_clockevent_init(irq); |
229 | spear_clocksource_init(); | 228 | spear_clocksource_init(); |
230 | 229 | ||
231 | return; | 230 | return; |
@@ -235,5 +234,5 @@ err_clk: | |||
235 | err_iomap: | 234 | err_iomap: |
236 | iounmap(gpt_base); | 235 | iounmap(gpt_base); |
237 | err_mem: | 236 | err_mem: |
238 | release_mem_region(SPEAR_GPT0_BASE, SZ_1K); | 237 | release_mem_region(base, SZ_1K); |
239 | } | 238 | } |
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index fc3ace3fd4cb..58a6a63a6ece 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c | |||
@@ -11,13 +11,17 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | #include <linux/module.h> | ||
14 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
16 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
17 | #include <linux/gpio-pxa.h> | 18 | #include <linux/gpio-pxa.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/irqdomain.h> | ||
20 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/of.h> | ||
24 | #include <linux/of_device.h> | ||
21 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
22 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
23 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
@@ -56,6 +60,10 @@ | |||
56 | 60 | ||
57 | int pxa_last_gpio; | 61 | int pxa_last_gpio; |
58 | 62 | ||
63 | #ifdef CONFIG_OF | ||
64 | static struct irq_domain *domain; | ||
65 | #endif | ||
66 | |||
59 | struct pxa_gpio_chip { | 67 | struct pxa_gpio_chip { |
60 | struct gpio_chip chip; | 68 | struct gpio_chip chip; |
61 | void __iomem *regbase; | 69 | void __iomem *regbase; |
@@ -81,7 +89,6 @@ enum { | |||
81 | PXA3XX_GPIO, | 89 | PXA3XX_GPIO, |
82 | PXA93X_GPIO, | 90 | PXA93X_GPIO, |
83 | MMP_GPIO = 0x10, | 91 | MMP_GPIO = 0x10, |
84 | MMP2_GPIO, | ||
85 | }; | 92 | }; |
86 | 93 | ||
87 | static DEFINE_SPINLOCK(gpio_lock); | 94 | static DEFINE_SPINLOCK(gpio_lock); |
@@ -475,22 +482,92 @@ static int pxa_gpio_nums(void) | |||
475 | gpio_type = MMP_GPIO; | 482 | gpio_type = MMP_GPIO; |
476 | } else if (cpu_is_mmp2()) { | 483 | } else if (cpu_is_mmp2()) { |
477 | count = 191; | 484 | count = 191; |
478 | gpio_type = MMP2_GPIO; | 485 | gpio_type = MMP_GPIO; |
479 | } | 486 | } |
480 | #endif /* CONFIG_ARCH_MMP */ | 487 | #endif /* CONFIG_ARCH_MMP */ |
481 | return count; | 488 | return count; |
482 | } | 489 | } |
483 | 490 | ||
491 | static struct of_device_id pxa_gpio_dt_ids[] = { | ||
492 | { .compatible = "mrvl,pxa-gpio" }, | ||
493 | { .compatible = "mrvl,mmp-gpio", .data = (void *)MMP_GPIO }, | ||
494 | {} | ||
495 | }; | ||
496 | |||
497 | static int pxa_irq_domain_map(struct irq_domain *d, unsigned int irq, | ||
498 | irq_hw_number_t hw) | ||
499 | { | ||
500 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, | ||
501 | handle_edge_irq); | ||
502 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
503 | return 0; | ||
504 | } | ||
505 | |||
506 | const struct irq_domain_ops pxa_irq_domain_ops = { | ||
507 | .map = pxa_irq_domain_map, | ||
508 | }; | ||
509 | |||
510 | #ifdef CONFIG_OF | ||
511 | static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev) | ||
512 | { | ||
513 | int ret, nr_banks, nr_gpios, irq_base; | ||
514 | struct device_node *prev, *next, *np = pdev->dev.of_node; | ||
515 | const struct of_device_id *of_id = | ||
516 | of_match_device(pxa_gpio_dt_ids, &pdev->dev); | ||
517 | |||
518 | if (!of_id) { | ||
519 | dev_err(&pdev->dev, "Failed to find gpio controller\n"); | ||
520 | return -EFAULT; | ||
521 | } | ||
522 | gpio_type = (int)of_id->data; | ||
523 | |||
524 | next = of_get_next_child(np, NULL); | ||
525 | prev = next; | ||
526 | if (!next) { | ||
527 | dev_err(&pdev->dev, "Failed to find child gpio node\n"); | ||
528 | ret = -EINVAL; | ||
529 | goto err; | ||
530 | } | ||
531 | for (nr_banks = 1; ; nr_banks++) { | ||
532 | next = of_get_next_child(np, prev); | ||
533 | if (!next) | ||
534 | break; | ||
535 | prev = next; | ||
536 | } | ||
537 | of_node_put(prev); | ||
538 | nr_gpios = nr_banks << 5; | ||
539 | pxa_last_gpio = nr_gpios - 1; | ||
540 | |||
541 | irq_base = irq_alloc_descs(-1, 0, nr_gpios, 0); | ||
542 | if (irq_base < 0) { | ||
543 | dev_err(&pdev->dev, "Failed to allocate IRQ numbers\n"); | ||
544 | goto err; | ||
545 | } | ||
546 | domain = irq_domain_add_legacy(np, nr_gpios, irq_base, 0, | ||
547 | &pxa_irq_domain_ops, NULL); | ||
548 | return 0; | ||
549 | err: | ||
550 | iounmap(gpio_reg_base); | ||
551 | return ret; | ||
552 | } | ||
553 | #else | ||
554 | #define pxa_gpio_probe_dt(pdev) (-1) | ||
555 | #endif | ||
556 | |||
484 | static int __devinit pxa_gpio_probe(struct platform_device *pdev) | 557 | static int __devinit pxa_gpio_probe(struct platform_device *pdev) |
485 | { | 558 | { |
486 | struct pxa_gpio_chip *c; | 559 | struct pxa_gpio_chip *c; |
487 | struct resource *res; | 560 | struct resource *res; |
488 | struct clk *clk; | 561 | struct clk *clk; |
489 | struct pxa_gpio_platform_data *info; | 562 | struct pxa_gpio_platform_data *info; |
490 | int gpio, irq, ret; | 563 | int gpio, irq, ret, use_of = 0; |
491 | int irq0 = 0, irq1 = 0, irq_mux, gpio_offset = 0; | 564 | int irq0 = 0, irq1 = 0, irq_mux, gpio_offset = 0; |
492 | 565 | ||
493 | pxa_last_gpio = pxa_gpio_nums(); | 566 | ret = pxa_gpio_probe_dt(pdev); |
567 | if (ret < 0) | ||
568 | pxa_last_gpio = pxa_gpio_nums(); | ||
569 | else | ||
570 | use_of = 1; | ||
494 | if (!pxa_last_gpio) | 571 | if (!pxa_last_gpio) |
495 | return -EINVAL; | 572 | return -EINVAL; |
496 | 573 | ||
@@ -545,25 +622,27 @@ static int __devinit pxa_gpio_probe(struct platform_device *pdev) | |||
545 | writel_relaxed(~0, c->regbase + ED_MASK_OFFSET); | 622 | writel_relaxed(~0, c->regbase + ED_MASK_OFFSET); |
546 | } | 623 | } |
547 | 624 | ||
625 | if (!use_of) { | ||
548 | #ifdef CONFIG_ARCH_PXA | 626 | #ifdef CONFIG_ARCH_PXA |
549 | irq = gpio_to_irq(0); | 627 | irq = gpio_to_irq(0); |
550 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, | 628 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, |
551 | handle_edge_irq); | 629 | handle_edge_irq); |
552 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 630 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
553 | irq_set_chained_handler(IRQ_GPIO0, pxa_gpio_demux_handler); | 631 | irq_set_chained_handler(IRQ_GPIO0, pxa_gpio_demux_handler); |
554 | |||
555 | irq = gpio_to_irq(1); | ||
556 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, | ||
557 | handle_edge_irq); | ||
558 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
559 | irq_set_chained_handler(IRQ_GPIO1, pxa_gpio_demux_handler); | ||
560 | #endif | ||
561 | 632 | ||
562 | for (irq = gpio_to_irq(gpio_offset); | 633 | irq = gpio_to_irq(1); |
563 | irq <= gpio_to_irq(pxa_last_gpio); irq++) { | ||
564 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, | 634 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, |
565 | handle_edge_irq); | 635 | handle_edge_irq); |
566 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 636 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
637 | irq_set_chained_handler(IRQ_GPIO1, pxa_gpio_demux_handler); | ||
638 | #endif | ||
639 | |||
640 | for (irq = gpio_to_irq(gpio_offset); | ||
641 | irq <= gpio_to_irq(pxa_last_gpio); irq++) { | ||
642 | irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, | ||
643 | handle_edge_irq); | ||
644 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
645 | } | ||
567 | } | 646 | } |
568 | 647 | ||
569 | irq_set_chained_handler(irq_mux, pxa_gpio_demux_handler); | 648 | irq_set_chained_handler(irq_mux, pxa_gpio_demux_handler); |
@@ -574,6 +653,7 @@ static struct platform_driver pxa_gpio_driver = { | |||
574 | .probe = pxa_gpio_probe, | 653 | .probe = pxa_gpio_probe, |
575 | .driver = { | 654 | .driver = { |
576 | .name = "pxa-gpio", | 655 | .name = "pxa-gpio", |
656 | .of_match_table = pxa_gpio_dt_ids, | ||
577 | }, | 657 | }, |
578 | }; | 658 | }; |
579 | 659 | ||
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index eb8ad538c79f..99389d2eae51 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c | |||
@@ -23,16 +23,61 @@ | |||
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/of_i2c.h> | ||
27 | |||
28 | #define I2C_PNX_TIMEOUT_DEFAULT 10 /* msec */ | ||
29 | #define I2C_PNX_SPEED_KHZ_DEFAULT 100 | ||
30 | #define I2C_PNX_REGION_SIZE 0x100 | ||
31 | |||
32 | enum { | ||
33 | mstatus_tdi = 0x00000001, | ||
34 | mstatus_afi = 0x00000002, | ||
35 | mstatus_nai = 0x00000004, | ||
36 | mstatus_drmi = 0x00000008, | ||
37 | mstatus_active = 0x00000020, | ||
38 | mstatus_scl = 0x00000040, | ||
39 | mstatus_sda = 0x00000080, | ||
40 | mstatus_rff = 0x00000100, | ||
41 | mstatus_rfe = 0x00000200, | ||
42 | mstatus_tff = 0x00000400, | ||
43 | mstatus_tfe = 0x00000800, | ||
44 | }; | ||
26 | 45 | ||
27 | #include <mach/hardware.h> | 46 | enum { |
28 | #include <mach/i2c.h> | 47 | mcntrl_tdie = 0x00000001, |
48 | mcntrl_afie = 0x00000002, | ||
49 | mcntrl_naie = 0x00000004, | ||
50 | mcntrl_drmie = 0x00000008, | ||
51 | mcntrl_daie = 0x00000020, | ||
52 | mcntrl_rffie = 0x00000040, | ||
53 | mcntrl_tffie = 0x00000080, | ||
54 | mcntrl_reset = 0x00000100, | ||
55 | mcntrl_cdbmode = 0x00000400, | ||
56 | }; | ||
29 | 57 | ||
30 | #define I2C_PNX_TIMEOUT 10 /* msec */ | 58 | enum { |
31 | #define I2C_PNX_SPEED_KHZ 100 | 59 | rw_bit = 1 << 0, |
32 | #define I2C_PNX_REGION_SIZE 0x100 | 60 | start_bit = 1 << 8, |
61 | stop_bit = 1 << 9, | ||
62 | }; | ||
33 | 63 | ||
34 | static inline int wait_timeout(long timeout, struct i2c_pnx_algo_data *data) | 64 | #define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */ |
65 | #define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */ | ||
66 | #define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */ | ||
67 | #define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */ | ||
68 | #define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */ | ||
69 | #define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */ | ||
70 | #define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */ | ||
71 | #define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */ | ||
72 | #define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */ | ||
73 | #define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */ | ||
74 | #define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */ | ||
75 | #define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */ | ||
76 | #define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */ | ||
77 | |||
78 | static inline int wait_timeout(struct i2c_pnx_algo_data *data) | ||
35 | { | 79 | { |
80 | long timeout = data->timeout; | ||
36 | while (timeout > 0 && | 81 | while (timeout > 0 && |
37 | (ioread32(I2C_REG_STS(data)) & mstatus_active)) { | 82 | (ioread32(I2C_REG_STS(data)) & mstatus_active)) { |
38 | mdelay(1); | 83 | mdelay(1); |
@@ -41,8 +86,9 @@ static inline int wait_timeout(long timeout, struct i2c_pnx_algo_data *data) | |||
41 | return (timeout <= 0); | 86 | return (timeout <= 0); |
42 | } | 87 | } |
43 | 88 | ||
44 | static inline int wait_reset(long timeout, struct i2c_pnx_algo_data *data) | 89 | static inline int wait_reset(struct i2c_pnx_algo_data *data) |
45 | { | 90 | { |
91 | long timeout = data->timeout; | ||
46 | while (timeout > 0 && | 92 | while (timeout > 0 && |
47 | (ioread32(I2C_REG_CTL(data)) & mcntrl_reset)) { | 93 | (ioread32(I2C_REG_CTL(data)) & mcntrl_reset)) { |
48 | mdelay(1); | 94 | mdelay(1); |
@@ -54,7 +100,7 @@ static inline int wait_reset(long timeout, struct i2c_pnx_algo_data *data) | |||
54 | static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data) | 100 | static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data) |
55 | { | 101 | { |
56 | struct timer_list *timer = &alg_data->mif.timer; | 102 | struct timer_list *timer = &alg_data->mif.timer; |
57 | unsigned long expires = msecs_to_jiffies(I2C_PNX_TIMEOUT); | 103 | unsigned long expires = msecs_to_jiffies(alg_data->timeout); |
58 | 104 | ||
59 | if (expires <= 1) | 105 | if (expires <= 1) |
60 | expires = 2; | 106 | expires = 2; |
@@ -92,7 +138,7 @@ static int i2c_pnx_start(unsigned char slave_addr, | |||
92 | } | 138 | } |
93 | 139 | ||
94 | /* First, make sure bus is idle */ | 140 | /* First, make sure bus is idle */ |
95 | if (wait_timeout(I2C_PNX_TIMEOUT, alg_data)) { | 141 | if (wait_timeout(alg_data)) { |
96 | /* Somebody else is monopolizing the bus */ | 142 | /* Somebody else is monopolizing the bus */ |
97 | dev_err(&alg_data->adapter.dev, | 143 | dev_err(&alg_data->adapter.dev, |
98 | "%s: Bus busy. Slave addr = %02x, cntrl = %x, stat = %x\n", | 144 | "%s: Bus busy. Slave addr = %02x, cntrl = %x, stat = %x\n", |
@@ -185,7 +231,7 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data) | |||
185 | if (alg_data->mif.len == 0) { | 231 | if (alg_data->mif.len == 0) { |
186 | if (alg_data->last) { | 232 | if (alg_data->last) { |
187 | /* Wait until the STOP is seen. */ | 233 | /* Wait until the STOP is seen. */ |
188 | if (wait_timeout(I2C_PNX_TIMEOUT, alg_data)) | 234 | if (wait_timeout(alg_data)) |
189 | dev_err(&alg_data->adapter.dev, | 235 | dev_err(&alg_data->adapter.dev, |
190 | "The bus is still active after timeout\n"); | 236 | "The bus is still active after timeout\n"); |
191 | } | 237 | } |
@@ -283,7 +329,7 @@ static int i2c_pnx_master_rcv(struct i2c_pnx_algo_data *alg_data) | |||
283 | if (alg_data->mif.len == 0) { | 329 | if (alg_data->mif.len == 0) { |
284 | if (alg_data->last) | 330 | if (alg_data->last) |
285 | /* Wait until the STOP is seen. */ | 331 | /* Wait until the STOP is seen. */ |
286 | if (wait_timeout(I2C_PNX_TIMEOUT, alg_data)) | 332 | if (wait_timeout(alg_data)) |
287 | dev_err(&alg_data->adapter.dev, | 333 | dev_err(&alg_data->adapter.dev, |
288 | "The bus is still active after timeout\n"); | 334 | "The bus is still active after timeout\n"); |
289 | 335 | ||
@@ -399,7 +445,7 @@ static void i2c_pnx_timeout(unsigned long data) | |||
399 | 445 | ||
400 | ctl |= mcntrl_reset; | 446 | ctl |= mcntrl_reset; |
401 | iowrite32(ctl, I2C_REG_CTL(alg_data)); | 447 | iowrite32(ctl, I2C_REG_CTL(alg_data)); |
402 | wait_reset(I2C_PNX_TIMEOUT, alg_data); | 448 | wait_reset(alg_data); |
403 | alg_data->mif.ret = -EIO; | 449 | alg_data->mif.ret = -EIO; |
404 | complete(&alg_data->mif.complete); | 450 | complete(&alg_data->mif.complete); |
405 | } | 451 | } |
@@ -414,18 +460,18 @@ static inline void bus_reset_if_active(struct i2c_pnx_algo_data *alg_data) | |||
414 | alg_data->adapter.name); | 460 | alg_data->adapter.name); |
415 | iowrite32(ioread32(I2C_REG_CTL(alg_data)) | mcntrl_reset, | 461 | iowrite32(ioread32(I2C_REG_CTL(alg_data)) | mcntrl_reset, |
416 | I2C_REG_CTL(alg_data)); | 462 | I2C_REG_CTL(alg_data)); |
417 | wait_reset(I2C_PNX_TIMEOUT, alg_data); | 463 | wait_reset(alg_data); |
418 | } else if (!(stat & mstatus_rfe) || !(stat & mstatus_tfe)) { | 464 | } else if (!(stat & mstatus_rfe) || !(stat & mstatus_tfe)) { |
419 | /* If there is data in the fifo's after transfer, | 465 | /* If there is data in the fifo's after transfer, |
420 | * flush fifo's by reset. | 466 | * flush fifo's by reset. |
421 | */ | 467 | */ |
422 | iowrite32(ioread32(I2C_REG_CTL(alg_data)) | mcntrl_reset, | 468 | iowrite32(ioread32(I2C_REG_CTL(alg_data)) | mcntrl_reset, |
423 | I2C_REG_CTL(alg_data)); | 469 | I2C_REG_CTL(alg_data)); |
424 | wait_reset(I2C_PNX_TIMEOUT, alg_data); | 470 | wait_reset(alg_data); |
425 | } else if (stat & mstatus_nai) { | 471 | } else if (stat & mstatus_nai) { |
426 | iowrite32(ioread32(I2C_REG_CTL(alg_data)) | mcntrl_reset, | 472 | iowrite32(ioread32(I2C_REG_CTL(alg_data)) | mcntrl_reset, |
427 | I2C_REG_CTL(alg_data)); | 473 | I2C_REG_CTL(alg_data)); |
428 | wait_reset(I2C_PNX_TIMEOUT, alg_data); | 474 | wait_reset(alg_data); |
429 | } | 475 | } |
430 | } | 476 | } |
431 | 477 | ||
@@ -568,14 +614,8 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev) | |||
568 | int ret = 0; | 614 | int ret = 0; |
569 | struct i2c_pnx_algo_data *alg_data; | 615 | struct i2c_pnx_algo_data *alg_data; |
570 | unsigned long freq; | 616 | unsigned long freq; |
571 | struct i2c_pnx_data *i2c_pnx = pdev->dev.platform_data; | 617 | struct resource *res; |
572 | 618 | u32 speed = I2C_PNX_SPEED_KHZ_DEFAULT * 1000; | |
573 | if (!i2c_pnx || !i2c_pnx->name) { | ||
574 | dev_err(&pdev->dev, "%s: no platform data supplied\n", | ||
575 | __func__); | ||
576 | ret = -EINVAL; | ||
577 | goto out; | ||
578 | } | ||
579 | 619 | ||
580 | alg_data = kzalloc(sizeof(*alg_data), GFP_KERNEL); | 620 | alg_data = kzalloc(sizeof(*alg_data), GFP_KERNEL); |
581 | if (!alg_data) { | 621 | if (!alg_data) { |
@@ -585,14 +625,27 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev) | |||
585 | 625 | ||
586 | platform_set_drvdata(pdev, alg_data); | 626 | platform_set_drvdata(pdev, alg_data); |
587 | 627 | ||
588 | strlcpy(alg_data->adapter.name, i2c_pnx->name, | ||
589 | sizeof(alg_data->adapter.name)); | ||
590 | alg_data->adapter.dev.parent = &pdev->dev; | 628 | alg_data->adapter.dev.parent = &pdev->dev; |
591 | alg_data->adapter.algo = &pnx_algorithm; | 629 | alg_data->adapter.algo = &pnx_algorithm; |
592 | alg_data->adapter.algo_data = alg_data; | 630 | alg_data->adapter.algo_data = alg_data; |
593 | alg_data->adapter.nr = pdev->id; | 631 | alg_data->adapter.nr = pdev->id; |
594 | alg_data->i2c_pnx = i2c_pnx; | ||
595 | 632 | ||
633 | alg_data->timeout = I2C_PNX_TIMEOUT_DEFAULT; | ||
634 | #ifdef CONFIG_OF | ||
635 | alg_data->adapter.dev.of_node = of_node_get(pdev->dev.of_node); | ||
636 | if (pdev->dev.of_node) { | ||
637 | of_property_read_u32(pdev->dev.of_node, "clock-frequency", | ||
638 | &speed); | ||
639 | /* | ||
640 | * At this point, it is planned to add an OF timeout property. | ||
641 | * As soon as there is a consensus about how to call and handle | ||
642 | * this, sth. like the following can be put here: | ||
643 | * | ||
644 | * of_property_read_u32(pdev->dev.of_node, "timeout", | ||
645 | * &alg_data->timeout); | ||
646 | */ | ||
647 | } | ||
648 | #endif | ||
596 | alg_data->clk = clk_get(&pdev->dev, NULL); | 649 | alg_data->clk = clk_get(&pdev->dev, NULL); |
597 | if (IS_ERR(alg_data->clk)) { | 650 | if (IS_ERR(alg_data->clk)) { |
598 | ret = PTR_ERR(alg_data->clk); | 651 | ret = PTR_ERR(alg_data->clk); |
@@ -603,17 +656,27 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev) | |||
603 | alg_data->mif.timer.function = i2c_pnx_timeout; | 656 | alg_data->mif.timer.function = i2c_pnx_timeout; |
604 | alg_data->mif.timer.data = (unsigned long)alg_data; | 657 | alg_data->mif.timer.data = (unsigned long)alg_data; |
605 | 658 | ||
659 | snprintf(alg_data->adapter.name, sizeof(alg_data->adapter.name), | ||
660 | "%s", pdev->name); | ||
661 | |||
606 | /* Register I/O resource */ | 662 | /* Register I/O resource */ |
607 | if (!request_mem_region(i2c_pnx->base, I2C_PNX_REGION_SIZE, | 663 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
664 | if (!res) { | ||
665 | dev_err(&pdev->dev, "Unable to get mem resource.\n"); | ||
666 | ret = -EBUSY; | ||
667 | goto out_clkget; | ||
668 | } | ||
669 | if (!request_mem_region(res->start, I2C_PNX_REGION_SIZE, | ||
608 | pdev->name)) { | 670 | pdev->name)) { |
609 | dev_err(&pdev->dev, | 671 | dev_err(&pdev->dev, |
610 | "I/O region 0x%08x for I2C already in use.\n", | 672 | "I/O region 0x%08x for I2C already in use.\n", |
611 | i2c_pnx->base); | 673 | res->start); |
612 | ret = -ENODEV; | 674 | ret = -ENOMEM; |
613 | goto out_clkget; | 675 | goto out_clkget; |
614 | } | 676 | } |
615 | 677 | ||
616 | alg_data->ioaddr = ioremap(i2c_pnx->base, I2C_PNX_REGION_SIZE); | 678 | alg_data->base = res->start; |
679 | alg_data->ioaddr = ioremap(res->start, I2C_PNX_REGION_SIZE); | ||
617 | if (!alg_data->ioaddr) { | 680 | if (!alg_data->ioaddr) { |
618 | dev_err(&pdev->dev, "Couldn't ioremap I2C I/O region\n"); | 681 | dev_err(&pdev->dev, "Couldn't ioremap I2C I/O region\n"); |
619 | ret = -ENOMEM; | 682 | ret = -ENOMEM; |
@@ -637,20 +700,25 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev) | |||
637 | * the deglitching filter length. | 700 | * the deglitching filter length. |
638 | */ | 701 | */ |
639 | 702 | ||
640 | tmp = ((freq / 1000) / I2C_PNX_SPEED_KHZ) / 2 - 2; | 703 | tmp = (freq / speed) / 2 - 2; |
641 | if (tmp > 0x3FF) | 704 | if (tmp > 0x3FF) |
642 | tmp = 0x3FF; | 705 | tmp = 0x3FF; |
643 | iowrite32(tmp, I2C_REG_CKH(alg_data)); | 706 | iowrite32(tmp, I2C_REG_CKH(alg_data)); |
644 | iowrite32(tmp, I2C_REG_CKL(alg_data)); | 707 | iowrite32(tmp, I2C_REG_CKL(alg_data)); |
645 | 708 | ||
646 | iowrite32(mcntrl_reset, I2C_REG_CTL(alg_data)); | 709 | iowrite32(mcntrl_reset, I2C_REG_CTL(alg_data)); |
647 | if (wait_reset(I2C_PNX_TIMEOUT, alg_data)) { | 710 | if (wait_reset(alg_data)) { |
648 | ret = -ENODEV; | 711 | ret = -ENODEV; |
649 | goto out_clock; | 712 | goto out_clock; |
650 | } | 713 | } |
651 | init_completion(&alg_data->mif.complete); | 714 | init_completion(&alg_data->mif.complete); |
652 | 715 | ||
653 | ret = request_irq(i2c_pnx->irq, i2c_pnx_interrupt, | 716 | alg_data->irq = platform_get_irq(pdev, 0); |
717 | if (alg_data->irq < 0) { | ||
718 | dev_err(&pdev->dev, "Failed to get IRQ from platform resource\n"); | ||
719 | goto out_irq; | ||
720 | } | ||
721 | ret = request_irq(alg_data->irq, i2c_pnx_interrupt, | ||
654 | 0, pdev->name, alg_data); | 722 | 0, pdev->name, alg_data); |
655 | if (ret) | 723 | if (ret) |
656 | goto out_clock; | 724 | goto out_clock; |
@@ -662,39 +730,39 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev) | |||
662 | goto out_irq; | 730 | goto out_irq; |
663 | } | 731 | } |
664 | 732 | ||
733 | of_i2c_register_devices(&alg_data->adapter); | ||
734 | |||
665 | dev_dbg(&pdev->dev, "%s: Master at %#8x, irq %d.\n", | 735 | dev_dbg(&pdev->dev, "%s: Master at %#8x, irq %d.\n", |
666 | alg_data->adapter.name, i2c_pnx->base, i2c_pnx->irq); | 736 | alg_data->adapter.name, res->start, alg_data->irq); |
667 | 737 | ||
668 | return 0; | 738 | return 0; |
669 | 739 | ||
670 | out_irq: | 740 | out_irq: |
671 | free_irq(i2c_pnx->irq, alg_data); | 741 | free_irq(alg_data->irq, alg_data); |
672 | out_clock: | 742 | out_clock: |
673 | clk_disable(alg_data->clk); | 743 | clk_disable(alg_data->clk); |
674 | out_unmap: | 744 | out_unmap: |
675 | iounmap(alg_data->ioaddr); | 745 | iounmap(alg_data->ioaddr); |
676 | out_release: | 746 | out_release: |
677 | release_mem_region(i2c_pnx->base, I2C_PNX_REGION_SIZE); | 747 | release_mem_region(res->start, I2C_PNX_REGION_SIZE); |
678 | out_clkget: | 748 | out_clkget: |
679 | clk_put(alg_data->clk); | 749 | clk_put(alg_data->clk); |
680 | out_drvdata: | 750 | out_drvdata: |
681 | kfree(alg_data); | 751 | kfree(alg_data); |
682 | err_kzalloc: | 752 | err_kzalloc: |
683 | platform_set_drvdata(pdev, NULL); | 753 | platform_set_drvdata(pdev, NULL); |
684 | out: | ||
685 | return ret; | 754 | return ret; |
686 | } | 755 | } |
687 | 756 | ||
688 | static int __devexit i2c_pnx_remove(struct platform_device *pdev) | 757 | static int __devexit i2c_pnx_remove(struct platform_device *pdev) |
689 | { | 758 | { |
690 | struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev); | 759 | struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev); |
691 | struct i2c_pnx_data *i2c_pnx = alg_data->i2c_pnx; | ||
692 | 760 | ||
693 | free_irq(i2c_pnx->irq, alg_data); | 761 | free_irq(alg_data->irq, alg_data); |
694 | i2c_del_adapter(&alg_data->adapter); | 762 | i2c_del_adapter(&alg_data->adapter); |
695 | clk_disable(alg_data->clk); | 763 | clk_disable(alg_data->clk); |
696 | iounmap(alg_data->ioaddr); | 764 | iounmap(alg_data->ioaddr); |
697 | release_mem_region(i2c_pnx->base, I2C_PNX_REGION_SIZE); | 765 | release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE); |
698 | clk_put(alg_data->clk); | 766 | clk_put(alg_data->clk); |
699 | kfree(alg_data); | 767 | kfree(alg_data); |
700 | platform_set_drvdata(pdev, NULL); | 768 | platform_set_drvdata(pdev, NULL); |
@@ -702,10 +770,19 @@ static int __devexit i2c_pnx_remove(struct platform_device *pdev) | |||
702 | return 0; | 770 | return 0; |
703 | } | 771 | } |
704 | 772 | ||
773 | #ifdef CONFIG_OF | ||
774 | static const struct of_device_id i2c_pnx_of_match[] = { | ||
775 | { .compatible = "nxp,pnx-i2c" }, | ||
776 | { }, | ||
777 | }; | ||
778 | MODULE_DEVICE_TABLE(of, i2c_pnx_of_match); | ||
779 | #endif | ||
780 | |||
705 | static struct platform_driver i2c_pnx_driver = { | 781 | static struct platform_driver i2c_pnx_driver = { |
706 | .driver = { | 782 | .driver = { |
707 | .name = "pnx-i2c", | 783 | .name = "pnx-i2c", |
708 | .owner = THIS_MODULE, | 784 | .owner = THIS_MODULE, |
785 | .of_match_table = of_match_ptr(i2c_pnx_of_match), | ||
709 | }, | 786 | }, |
710 | .probe = i2c_pnx_probe, | 787 | .probe = i2c_pnx_probe, |
711 | .remove = __devexit_p(i2c_pnx_remove), | 788 | .remove = __devexit_p(i2c_pnx_remove), |
diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index d3469d8e3f0d..8d2666fcffd7 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/phy.h> | 41 | #include <linux/phy.h> |
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/of.h> | ||
43 | #include <linux/of_net.h> | 44 | #include <linux/of_net.h> |
44 | #include <linux/types.h> | 45 | #include <linux/types.h> |
45 | 46 | ||
@@ -340,13 +341,17 @@ | |||
340 | */ | 341 | */ |
341 | #define LPC_POWERDOWN_MACAHB (1 << 31) | 342 | #define LPC_POWERDOWN_MACAHB (1 << 31) |
342 | 343 | ||
343 | /* Upon the upcoming introduction of device tree usage in LPC32xx, | 344 | static phy_interface_t lpc_phy_interface_mode(struct device *dev) |
344 | * lpc_phy_interface_mode() and use_iram_for_net() will be extended with a | ||
345 | * device parameter for access to device tree information at runtime, instead | ||
346 | * of defining the values at compile time | ||
347 | */ | ||
348 | static inline phy_interface_t lpc_phy_interface_mode(void) | ||
349 | { | 345 | { |
346 | if (dev && dev->of_node) { | ||
347 | const char *mode = of_get_property(dev->of_node, | ||
348 | "phy-mode", NULL); | ||
349 | if (mode && !strcmp(mode, "mii")) | ||
350 | return PHY_INTERFACE_MODE_MII; | ||
351 | return PHY_INTERFACE_MODE_RMII; | ||
352 | } | ||
353 | |||
354 | /* non-DT */ | ||
350 | #ifdef CONFIG_ARCH_LPC32XX_MII_SUPPORT | 355 | #ifdef CONFIG_ARCH_LPC32XX_MII_SUPPORT |
351 | return PHY_INTERFACE_MODE_MII; | 356 | return PHY_INTERFACE_MODE_MII; |
352 | #else | 357 | #else |
@@ -354,12 +359,16 @@ static inline phy_interface_t lpc_phy_interface_mode(void) | |||
354 | #endif | 359 | #endif |
355 | } | 360 | } |
356 | 361 | ||
357 | static inline int use_iram_for_net(void) | 362 | static bool use_iram_for_net(struct device *dev) |
358 | { | 363 | { |
364 | if (dev && dev->of_node) | ||
365 | return of_property_read_bool(dev->of_node, "use-iram"); | ||
366 | |||
367 | /* non-DT */ | ||
359 | #ifdef CONFIG_ARCH_LPC32XX_IRAM_FOR_NET | 368 | #ifdef CONFIG_ARCH_LPC32XX_IRAM_FOR_NET |
360 | return 1; | 369 | return true; |
361 | #else | 370 | #else |
362 | return 0; | 371 | return false; |
363 | #endif | 372 | #endif |
364 | } | 373 | } |
365 | 374 | ||
@@ -664,7 +673,7 @@ static void __lpc_eth_init(struct netdata_local *pldat) | |||
664 | LPC_ENET_CLRT(pldat->net_base)); | 673 | LPC_ENET_CLRT(pldat->net_base)); |
665 | writel(LPC_IPGR_LOAD_PART2(0x12), LPC_ENET_IPGR(pldat->net_base)); | 674 | writel(LPC_IPGR_LOAD_PART2(0x12), LPC_ENET_IPGR(pldat->net_base)); |
666 | 675 | ||
667 | if (lpc_phy_interface_mode() == PHY_INTERFACE_MODE_MII) | 676 | if (lpc_phy_interface_mode(&pldat->pdev->dev) == PHY_INTERFACE_MODE_MII) |
668 | writel(LPC_COMMAND_PASSRUNTFRAME, | 677 | writel(LPC_COMMAND_PASSRUNTFRAME, |
669 | LPC_ENET_COMMAND(pldat->net_base)); | 678 | LPC_ENET_COMMAND(pldat->net_base)); |
670 | else { | 679 | else { |
@@ -804,12 +813,13 @@ static int lpc_mii_probe(struct net_device *ndev) | |||
804 | } | 813 | } |
805 | 814 | ||
806 | /* Attach to the PHY */ | 815 | /* Attach to the PHY */ |
807 | if (lpc_phy_interface_mode() == PHY_INTERFACE_MODE_MII) | 816 | if (lpc_phy_interface_mode(&pldat->pdev->dev) == PHY_INTERFACE_MODE_MII) |
808 | netdev_info(ndev, "using MII interface\n"); | 817 | netdev_info(ndev, "using MII interface\n"); |
809 | else | 818 | else |
810 | netdev_info(ndev, "using RMII interface\n"); | 819 | netdev_info(ndev, "using RMII interface\n"); |
811 | phydev = phy_connect(ndev, dev_name(&phydev->dev), | 820 | phydev = phy_connect(ndev, dev_name(&phydev->dev), |
812 | &lpc_handle_link_change, 0, lpc_phy_interface_mode()); | 821 | &lpc_handle_link_change, 0, |
822 | lpc_phy_interface_mode(&pldat->pdev->dev)); | ||
813 | 823 | ||
814 | if (IS_ERR(phydev)) { | 824 | if (IS_ERR(phydev)) { |
815 | netdev_err(ndev, "Could not attach to PHY\n"); | 825 | netdev_err(ndev, "Could not attach to PHY\n"); |
@@ -843,7 +853,7 @@ static int lpc_mii_init(struct netdata_local *pldat) | |||
843 | } | 853 | } |
844 | 854 | ||
845 | /* Setup MII mode */ | 855 | /* Setup MII mode */ |
846 | if (lpc_phy_interface_mode() == PHY_INTERFACE_MODE_MII) | 856 | if (lpc_phy_interface_mode(&pldat->pdev->dev) == PHY_INTERFACE_MODE_MII) |
847 | writel(LPC_COMMAND_PASSRUNTFRAME, | 857 | writel(LPC_COMMAND_PASSRUNTFRAME, |
848 | LPC_ENET_COMMAND(pldat->net_base)); | 858 | LPC_ENET_COMMAND(pldat->net_base)); |
849 | else { | 859 | else { |
@@ -1315,18 +1325,26 @@ static const struct net_device_ops lpc_netdev_ops = { | |||
1315 | static int lpc_eth_drv_probe(struct platform_device *pdev) | 1325 | static int lpc_eth_drv_probe(struct platform_device *pdev) |
1316 | { | 1326 | { |
1317 | struct resource *res; | 1327 | struct resource *res; |
1318 | struct resource *dma_res; | ||
1319 | struct net_device *ndev; | 1328 | struct net_device *ndev; |
1320 | struct netdata_local *pldat; | 1329 | struct netdata_local *pldat; |
1321 | struct phy_device *phydev; | 1330 | struct phy_device *phydev; |
1322 | dma_addr_t dma_handle; | 1331 | dma_addr_t dma_handle; |
1323 | int irq, ret; | 1332 | int irq, ret; |
1333 | u32 tmp; | ||
1334 | |||
1335 | /* Setup network interface for RMII or MII mode */ | ||
1336 | tmp = __raw_readl(LPC32XX_CLKPWR_MACCLK_CTRL); | ||
1337 | tmp &= ~LPC32XX_CLKPWR_MACCTRL_PINS_MSK; | ||
1338 | if (lpc_phy_interface_mode(&pdev->dev) == PHY_INTERFACE_MODE_MII) | ||
1339 | tmp |= LPC32XX_CLKPWR_MACCTRL_USE_MII_PINS; | ||
1340 | else | ||
1341 | tmp |= LPC32XX_CLKPWR_MACCTRL_USE_RMII_PINS; | ||
1342 | __raw_writel(tmp, LPC32XX_CLKPWR_MACCLK_CTRL); | ||
1324 | 1343 | ||
1325 | /* Get platform resources */ | 1344 | /* Get platform resources */ |
1326 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1345 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1327 | dma_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | ||
1328 | irq = platform_get_irq(pdev, 0); | 1346 | irq = platform_get_irq(pdev, 0); |
1329 | if ((!res) || (!dma_res) || (irq < 0) || (irq >= NR_IRQS)) { | 1347 | if ((!res) || (irq < 0) || (irq >= NR_IRQS)) { |
1330 | dev_err(&pdev->dev, "error getting resources.\n"); | 1348 | dev_err(&pdev->dev, "error getting resources.\n"); |
1331 | ret = -ENXIO; | 1349 | ret = -ENXIO; |
1332 | goto err_exit; | 1350 | goto err_exit; |
@@ -1389,17 +1407,19 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) | |||
1389 | sizeof(struct txrx_desc_t) + sizeof(struct rx_status_t)); | 1407 | sizeof(struct txrx_desc_t) + sizeof(struct rx_status_t)); |
1390 | pldat->dma_buff_base_v = 0; | 1408 | pldat->dma_buff_base_v = 0; |
1391 | 1409 | ||
1392 | if (use_iram_for_net()) { | 1410 | if (use_iram_for_net(&pldat->pdev->dev)) { |
1393 | dma_handle = dma_res->start; | 1411 | dma_handle = LPC32XX_IRAM_BASE; |
1394 | if (pldat->dma_buff_size <= lpc32xx_return_iram_size()) | 1412 | if (pldat->dma_buff_size <= lpc32xx_return_iram_size()) |
1395 | pldat->dma_buff_base_v = | 1413 | pldat->dma_buff_base_v = |
1396 | io_p2v(dma_res->start); | 1414 | io_p2v(LPC32XX_IRAM_BASE); |
1397 | else | 1415 | else |
1398 | netdev_err(ndev, | 1416 | netdev_err(ndev, |
1399 | "IRAM not big enough for net buffers, using SDRAM instead.\n"); | 1417 | "IRAM not big enough for net buffers, using SDRAM instead.\n"); |
1400 | } | 1418 | } |
1401 | 1419 | ||
1402 | if (pldat->dma_buff_base_v == 0) { | 1420 | if (pldat->dma_buff_base_v == 0) { |
1421 | pldat->pdev->dev.coherent_dma_mask = 0xFFFFFFFF; | ||
1422 | pldat->pdev->dev.dma_mask = &pldat->pdev->dev.coherent_dma_mask; | ||
1403 | pldat->dma_buff_size = PAGE_ALIGN(pldat->dma_buff_size); | 1423 | pldat->dma_buff_size = PAGE_ALIGN(pldat->dma_buff_size); |
1404 | 1424 | ||
1405 | /* Allocate a chunk of memory for the DMA ethernet buffers | 1425 | /* Allocate a chunk of memory for the DMA ethernet buffers |
@@ -1488,7 +1508,7 @@ err_out_unregister_netdev: | |||
1488 | platform_set_drvdata(pdev, NULL); | 1508 | platform_set_drvdata(pdev, NULL); |
1489 | unregister_netdev(ndev); | 1509 | unregister_netdev(ndev); |
1490 | err_out_dma_unmap: | 1510 | err_out_dma_unmap: |
1491 | if (!use_iram_for_net() || | 1511 | if (!use_iram_for_net(&pldat->pdev->dev) || |
1492 | pldat->dma_buff_size > lpc32xx_return_iram_size()) | 1512 | pldat->dma_buff_size > lpc32xx_return_iram_size()) |
1493 | dma_free_coherent(&pldat->pdev->dev, pldat->dma_buff_size, | 1513 | dma_free_coherent(&pldat->pdev->dev, pldat->dma_buff_size, |
1494 | pldat->dma_buff_base_v, | 1514 | pldat->dma_buff_base_v, |
@@ -1515,7 +1535,7 @@ static int lpc_eth_drv_remove(struct platform_device *pdev) | |||
1515 | unregister_netdev(ndev); | 1535 | unregister_netdev(ndev); |
1516 | platform_set_drvdata(pdev, NULL); | 1536 | platform_set_drvdata(pdev, NULL); |
1517 | 1537 | ||
1518 | if (!use_iram_for_net() || | 1538 | if (!use_iram_for_net(&pldat->pdev->dev) || |
1519 | pldat->dma_buff_size > lpc32xx_return_iram_size()) | 1539 | pldat->dma_buff_size > lpc32xx_return_iram_size()) |
1520 | dma_free_coherent(&pldat->pdev->dev, pldat->dma_buff_size, | 1540 | dma_free_coherent(&pldat->pdev->dev, pldat->dma_buff_size, |
1521 | pldat->dma_buff_base_v, | 1541 | pldat->dma_buff_base_v, |
@@ -1584,6 +1604,14 @@ static int lpc_eth_drv_resume(struct platform_device *pdev) | |||
1584 | } | 1604 | } |
1585 | #endif | 1605 | #endif |
1586 | 1606 | ||
1607 | #ifdef CONFIG_OF | ||
1608 | static const struct of_device_id lpc_eth_match[] = { | ||
1609 | { .compatible = "nxp,lpc-eth" }, | ||
1610 | { } | ||
1611 | }; | ||
1612 | MODULE_DEVICE_TABLE(of, lpc_eth_match); | ||
1613 | #endif | ||
1614 | |||
1587 | static struct platform_driver lpc_eth_driver = { | 1615 | static struct platform_driver lpc_eth_driver = { |
1588 | .probe = lpc_eth_drv_probe, | 1616 | .probe = lpc_eth_drv_probe, |
1589 | .remove = __devexit_p(lpc_eth_drv_remove), | 1617 | .remove = __devexit_p(lpc_eth_drv_remove), |
@@ -1593,6 +1621,7 @@ static struct platform_driver lpc_eth_driver = { | |||
1593 | #endif | 1621 | #endif |
1594 | .driver = { | 1622 | .driver = { |
1595 | .name = MODNAME, | 1623 | .name = MODNAME, |
1624 | .of_match_table = of_match_ptr(lpc_eth_match), | ||
1596 | }, | 1625 | }, |
1597 | }; | 1626 | }; |
1598 | 1627 | ||
diff --git a/drivers/of/address.c b/drivers/of/address.c index 66d96f14c274..7e262a6124c5 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #include <linux/device.h> | ||
2 | #include <linux/io.h> | 3 | #include <linux/io.h> |
3 | #include <linux/ioport.h> | 4 | #include <linux/ioport.h> |
4 | #include <linux/module.h> | 5 | #include <linux/module.h> |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index a87124d4d533..1bc74afe7a35 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
@@ -29,14 +29,10 @@ struct i2c_pnx_algo_data { | |||
29 | struct i2c_pnx_mif mif; | 29 | struct i2c_pnx_mif mif; |
30 | int last; | 30 | int last; |
31 | struct clk *clk; | 31 | struct clk *clk; |
32 | struct i2c_pnx_data *i2c_pnx; | ||
33 | struct i2c_adapter adapter; | 32 | struct i2c_adapter adapter; |
34 | }; | 33 | phys_addr_t base; |
35 | 34 | int irq; | |
36 | struct i2c_pnx_data { | 35 | u32 timeout; |
37 | const char *name; | ||
38 | u32 base; | ||
39 | int irq; | ||
40 | }; | 36 | }; |
41 | 37 | ||
42 | #endif /* __I2C_PNX_H__ */ | 38 | #endif /* __I2C_PNX_H__ */ |