diff options
181 files changed, 5355 insertions, 1576 deletions
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt index 16f60b41c147..4949e805f7fc 100644 --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt | |||
| @@ -1,6 +1,43 @@ | |||
| 1 | Atmel AT91 device tree bindings. | 1 | Atmel AT91 device tree bindings. |
| 2 | ================================ | 2 | ================================ |
| 3 | 3 | ||
| 4 | Boards with a SoC of the Atmel AT91 or SMART family shall have the following | ||
| 5 | properties: | ||
| 6 | |||
| 7 | Required root node properties: | ||
| 8 | compatible: must be one of: | ||
| 9 | * "atmel,at91rm9200" | ||
| 10 | |||
| 11 | * "atmel,at91sam9" for SoCs using an ARM926EJ-S core, shall be extended with | ||
| 12 | the specific SoC family or compatible: | ||
| 13 | o "atmel,at91sam9260" | ||
| 14 | o "atmel,at91sam9261" | ||
| 15 | o "atmel,at91sam9263" | ||
| 16 | o "atmel,at91sam9x5" for the 5 series, shall be extended with the specific | ||
| 17 | SoC compatible: | ||
| 18 | - "atmel,at91sam9g15" | ||
| 19 | - "atmel,at91sam9g25" | ||
| 20 | - "atmel,at91sam9g35" | ||
| 21 | - "atmel,at91sam9x25" | ||
| 22 | - "atmel,at91sam9x35" | ||
| 23 | o "atmel,at91sam9g20" | ||
| 24 | o "atmel,at91sam9g45" | ||
| 25 | o "atmel,at91sam9n12" | ||
| 26 | o "atmel,at91sam9rl" | ||
| 27 | * "atmel,sama5" for SoCs using a Cortex-A5, shall be extended with the specific | ||
| 28 | SoC family: | ||
| 29 | o "atmel,sama5d3" shall be extended with the specific SoC compatible: | ||
| 30 | - "atmel,sama5d31" | ||
| 31 | - "atmel,sama5d33" | ||
| 32 | - "atmel,sama5d34" | ||
| 33 | - "atmel,sama5d35" | ||
| 34 | - "atmel,sama5d36" | ||
| 35 | o "atmel,sama5d4" shall be extended with the specific SoC compatible: | ||
| 36 | - "atmel,sama5d41" | ||
| 37 | - "atmel,sama5d42" | ||
| 38 | - "atmel,sama5d43" | ||
| 39 | - "atmel,sama5d44" | ||
| 40 | |||
| 4 | PIT Timer required properties: | 41 | PIT Timer required properties: |
| 5 | - compatible: Should be "atmel,at91sam9260-pit" | 42 | - compatible: Should be "atmel,at91sam9260-pit" |
| 6 | - reg: Should contain registers location and length | 43 | - reg: Should contain registers location and length |
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm63138.txt b/Documentation/devicetree/bindings/arm/bcm/bcm63138.txt new file mode 100644 index 000000000000..bd49987a8812 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/bcm63138.txt | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | Broadcom BCM63138 DSL System-on-a-Chip device tree bindings | ||
| 2 | ----------------------------------------------------------- | ||
| 3 | |||
| 4 | Boards compatible with the BCM63138 DSL System-on-a-Chip should have the | ||
| 5 | following properties: | ||
| 6 | |||
| 7 | Required root node property: | ||
| 8 | |||
| 9 | compatible: should be "brcm,bcm63138" | ||
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt index 934f00025cc4..f717c7b48603 100644 --- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt +++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | |||
| @@ -5,6 +5,11 @@ Hi4511 Board | |||
| 5 | Required root node properties: | 5 | Required root node properties: |
| 6 | - compatible = "hisilicon,hi3620-hi4511"; | 6 | - compatible = "hisilicon,hi3620-hi4511"; |
| 7 | 7 | ||
| 8 | HiP04 D01 Board | ||
| 9 | Required root node properties: | ||
| 10 | - compatible = "hisilicon,hip04-d01"; | ||
| 11 | |||
| 12 | |||
| 8 | Hisilicon system controller | 13 | Hisilicon system controller |
| 9 | 14 | ||
| 10 | Required properties: | 15 | Required properties: |
| @@ -55,3 +60,21 @@ Example: | |||
| 55 | compatible = "hisilicon,pctrl"; | 60 | compatible = "hisilicon,pctrl"; |
| 56 | reg = <0xfca09000 0x1000>; | 61 | reg = <0xfca09000 0x1000>; |
| 57 | }; | 62 | }; |
| 63 | |||
| 64 | ----------------------------------------------------------------------- | ||
| 65 | Fabric: | ||
| 66 | |||
| 67 | Required Properties: | ||
| 68 | - compatible: "hisilicon,hip04-fabric"; | ||
| 69 | - reg: Address and size of Fabric | ||
| 70 | |||
| 71 | ----------------------------------------------------------------------- | ||
| 72 | Bootwrapper boot method (software protocol on SMP): | ||
| 73 | |||
| 74 | Required Properties: | ||
| 75 | - compatible: "hisilicon,hip04-bootwrapper"; | ||
| 76 | - boot-method: Address and size of boot method. | ||
| 77 | [0]: bootwrapper physical address | ||
| 78 | [1]: bootwrapper size | ||
| 79 | [2]: relocation physical address | ||
| 80 | [3]: relocation size | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt index 83f405bde138..763695db2bd9 100644 --- a/Documentation/devicetree/bindings/arm/omap/mpu.txt +++ b/Documentation/devicetree/bindings/arm/omap/mpu.txt | |||
| @@ -10,6 +10,9 @@ Required properties: | |||
| 10 | Should be "ti,omap5-mpu" for OMAP5 | 10 | Should be "ti,omap5-mpu" for OMAP5 |
| 11 | - ti,hwmods: "mpu" | 11 | - ti,hwmods: "mpu" |
| 12 | 12 | ||
| 13 | Optional properties: | ||
| 14 | - sram: Phandle to the ocmcram node | ||
| 15 | |||
| 13 | Examples: | 16 | Examples: |
| 14 | 17 | ||
| 15 | - For an OMAP5 SMP system: | 18 | - For an OMAP5 SMP system: |
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt new file mode 100644 index 000000000000..ccf0adddc820 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | NVIDIA Tegra Flow Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "nvidia,tegra<chip>-flowctrl" | ||
| 5 | - reg: Should contain one register range (address and length) | ||
| 6 | |||
| 7 | Example: | ||
| 8 | |||
| 9 | flow-controller@60007000 { | ||
| 10 | compatible = "nvidia,tegra20-flowctrl"; | ||
| 11 | reg = <0x60007000 0x1000>; | ||
| 12 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt index b3d544ca522a..7a4d4926f44e 100644 --- a/Documentation/devicetree/bindings/clock/at91-clock.txt +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt | |||
| @@ -74,6 +74,9 @@ Required properties: | |||
| 74 | "atmel,at91sam9x5-clk-utmi": | 74 | "atmel,at91sam9x5-clk-utmi": |
| 75 | at91 utmi clock | 75 | at91 utmi clock |
| 76 | 76 | ||
| 77 | "atmel,sama5d4-clk-h32mx": | ||
| 78 | at91 h32mx clock | ||
| 79 | |||
| 77 | Required properties for SCKC node: | 80 | Required properties for SCKC node: |
| 78 | - reg : defines the IO memory reserved for the SCKC. | 81 | - reg : defines the IO memory reserved for the SCKC. |
| 79 | - #size-cells : shall be 0 (reg is used to encode clk id). | 82 | - #size-cells : shall be 0 (reg is used to encode clk id). |
| @@ -447,3 +450,14 @@ For example: | |||
| 447 | #clock-cells = <0>; | 450 | #clock-cells = <0>; |
| 448 | clocks = <&main>; | 451 | clocks = <&main>; |
| 449 | }; | 452 | }; |
| 453 | |||
| 454 | Required properties for 32 bits bus Matrix clock (h32mx clock): | ||
| 455 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 456 | - clocks : shall be the master clock source phandle. | ||
| 457 | |||
| 458 | For example: | ||
| 459 | h32ck: h32mxck { | ||
| 460 | #clock-cells = <0>; | ||
| 461 | compatible = "atmel,sama5d4-clk-h32mx"; | ||
| 462 | clocks = <&mck>; | ||
| 463 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt index 8a92b5fb3540..8f1424f0fa43 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | |||
| @@ -11,9 +11,11 @@ Required Properties: | |||
| 11 | 11 | ||
| 12 | - compatible: Must be one of the following | 12 | - compatible: Must be one of the following |
| 13 | - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks | 13 | - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks |
| 14 | - "renesas,r8a7740-mstp-clocks" for R8A7740 (R-Mobile A1) MSTP gate clocks | ||
| 14 | - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks | 15 | - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks |
| 15 | - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks | 16 | - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks |
| 16 | - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks | 17 | - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks |
| 18 | - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks | ||
| 17 | - "renesas,cpg-mstp-clock" for generic MSTP gate clocks | 19 | - "renesas,cpg-mstp-clock" for generic MSTP gate clocks |
| 18 | - reg: Base address and length of the I/O mapped registers used by the MSTP | 20 | - reg: Base address and length of the I/O mapped registers used by the MSTP |
| 19 | clocks. The first register is the clock control register and is mandatory. | 21 | clocks. The first register is the clock control register and is mandatory. |
diff --git a/Documentation/devicetree/bindings/memory-controllers/synopsys.txt b/Documentation/devicetree/bindings/memory-controllers/synopsys.txt new file mode 100644 index 000000000000..f9c6454146b6 --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/synopsys.txt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | Binding for Synopsys IntelliDDR Multi Protocol Memory Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be 'xlnx,zynq-ddrc-a05' | ||
| 5 | - reg: Base address and size of the controllers memory area | ||
| 6 | |||
| 7 | Example: | ||
| 8 | memory-controller@f8006000 { | ||
| 9 | compatible = "xlnx,zynq-ddrc-a05"; | ||
| 10 | reg = <0xf8006000 0x1000>; | ||
| 11 | }; | ||
diff --git a/MAINTAINERS b/MAINTAINERS index efc5d4bffac6..7c4a2037f7ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -2065,6 +2065,14 @@ F: arch/arm/mach-bcm/bcm_5301x.c | |||
| 2065 | F: arch/arm/boot/dts/bcm5301x.dtsi | 2065 | F: arch/arm/boot/dts/bcm5301x.dtsi |
| 2066 | F: arch/arm/boot/dts/bcm470* | 2066 | F: arch/arm/boot/dts/bcm470* |
| 2067 | 2067 | ||
| 2068 | BROADCOM BCM63XX ARM ARCHITECTURE | ||
| 2069 | M: Florian Fainelli <f.fainelli@gmail.com> | ||
| 2070 | L: linux-arm-kernel@lists.infradead.org | ||
| 2071 | T: git git://git.github.com/brcm/linux.git | ||
| 2072 | S: Maintained | ||
| 2073 | F: arch/arm/mach-bcm/bcm63xx.c | ||
| 2074 | F: arch/arm/include/debug/bcm63xx.S | ||
| 2075 | |||
| 2068 | BROADCOM BCM7XXX ARM ARCHITECTURE | 2076 | BROADCOM BCM7XXX ARM ARCHITECTURE |
| 2069 | M: Marc Carino <marc.ceeeee@gmail.com> | 2077 | M: Marc Carino <marc.ceeeee@gmail.com> |
| 2070 | M: Brian Norris <computersforpeace@gmail.com> | 2078 | M: Brian Norris <computersforpeace@gmail.com> |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 314bdf1163f9..82dfdeac3595 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -387,6 +387,7 @@ config ARCH_CLPS711X | |||
| 387 | select CPU_ARM720T | 387 | select CPU_ARM720T |
| 388 | select GENERIC_CLOCKEVENTS | 388 | select GENERIC_CLOCKEVENTS |
| 389 | select MFD_SYSCON | 389 | select MFD_SYSCON |
| 390 | select SOC_BUS | ||
| 390 | help | 391 | help |
| 391 | Support for Cirrus Logic 711x/721x/731x based boards. | 392 | Support for Cirrus Logic 711x/721x/731x based boards. |
| 392 | 393 | ||
| @@ -890,6 +891,8 @@ source "arch/arm/mach-keystone/Kconfig" | |||
| 890 | 891 | ||
| 891 | source "arch/arm/mach-ks8695/Kconfig" | 892 | source "arch/arm/mach-ks8695/Kconfig" |
| 892 | 893 | ||
| 894 | source "arch/arm/mach-meson/Kconfig" | ||
| 895 | |||
| 893 | source "arch/arm/mach-msm/Kconfig" | 896 | source "arch/arm/mach-msm/Kconfig" |
| 894 | 897 | ||
| 895 | source "arch/arm/mach-moxart/Kconfig" | 898 | source "arch/arm/mach-moxart/Kconfig" |
| @@ -1407,6 +1410,15 @@ config MCPM | |||
| 1407 | for (multi-)cluster based systems, such as big.LITTLE based | 1410 | for (multi-)cluster based systems, such as big.LITTLE based |
| 1408 | systems. | 1411 | systems. |
| 1409 | 1412 | ||
| 1413 | config MCPM_QUAD_CLUSTER | ||
| 1414 | bool | ||
| 1415 | depends on MCPM | ||
| 1416 | help | ||
| 1417 | To avoid wasting resources unnecessarily, MCPM only supports up | ||
| 1418 | to 2 clusters by default. | ||
| 1419 | Platforms with 3 or 4 clusters that use MCPM must select this | ||
| 1420 | option to allow the additional clusters to be managed. | ||
| 1421 | |||
| 1410 | config BIG_LITTLE | 1422 | config BIG_LITTLE |
| 1411 | bool "big.LITTLE support (Experimental)" | 1423 | bool "big.LITTLE support (Experimental)" |
| 1412 | depends on CPU_V7 && SMP | 1424 | depends on CPU_V7 && SMP |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 6a5b4968b46e..03dc4c1a8736 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
| @@ -101,6 +101,10 @@ choice | |||
| 101 | bool "Kernel low-level debugging on 9263 and 9g45" | 101 | bool "Kernel low-level debugging on 9263 and 9g45" |
| 102 | depends on HAVE_AT91_DBGU1 | 102 | depends on HAVE_AT91_DBGU1 |
| 103 | 103 | ||
| 104 | config AT91_DEBUG_LL_DBGU2 | ||
| 105 | bool "Kernel low-level debugging on sama5d4" | ||
| 106 | depends on HAVE_AT91_DBGU2 | ||
| 107 | |||
| 104 | config DEBUG_BCM2835 | 108 | config DEBUG_BCM2835 |
| 105 | bool "Kernel low-level debugging on BCM2835 PL011 UART" | 109 | bool "Kernel low-level debugging on BCM2835 PL011 UART" |
| 106 | depends on ARCH_BCM2835 | 110 | depends on ARCH_BCM2835 |
| @@ -122,6 +126,11 @@ choice | |||
| 122 | mobile SoCs in the Kona family of chips (e.g. bcm28155, | 126 | mobile SoCs in the Kona family of chips (e.g. bcm28155, |
| 123 | bcm11351, etc...) | 127 | bcm11351, etc...) |
| 124 | 128 | ||
| 129 | config DEBUG_BCM63XX | ||
| 130 | bool "Kernel low-level debugging on BCM63XX UART" | ||
| 131 | depends on ARCH_BCM_63XX | ||
| 132 | select DEBUG_UART_BCM63XX | ||
| 133 | |||
| 125 | config DEBUG_BERLIN_UART | 134 | config DEBUG_BERLIN_UART |
| 126 | bool "Marvell Berlin SoC Debug UART" | 135 | bool "Marvell Berlin SoC Debug UART" |
| 127 | depends on ARCH_BERLIN | 136 | depends on ARCH_BERLIN |
| @@ -223,14 +232,6 @@ choice | |||
| 223 | Say Y here if you want kernel low-level debugging support | 232 | Say Y here if you want kernel low-level debugging support |
| 224 | on HI3716 UART. | 233 | on HI3716 UART. |
| 225 | 234 | ||
| 226 | config DEBUG_HIX5HD2_UART | ||
| 227 | bool "Hisilicon Hix5hd2 Debug UART" | ||
| 228 | depends on ARCH_HIX5HD2 | ||
| 229 | select DEBUG_UART_PL01X | ||
| 230 | help | ||
| 231 | Say Y here if you want kernel low-level debugging support | ||
| 232 | on Hix5hd2 UART. | ||
| 233 | |||
| 234 | config DEBUG_HIGHBANK_UART | 235 | config DEBUG_HIGHBANK_UART |
| 235 | bool "Kernel low-level debugging messages via Highbank UART" | 236 | bool "Kernel low-level debugging messages via Highbank UART" |
| 236 | depends on ARCH_HIGHBANK | 237 | depends on ARCH_HIGHBANK |
| @@ -239,6 +240,22 @@ choice | |||
| 239 | Say Y here if you want the debug print routines to direct | 240 | Say Y here if you want the debug print routines to direct |
| 240 | their output to the UART on Highbank based devices. | 241 | their output to the UART on Highbank based devices. |
| 241 | 242 | ||
| 243 | config DEBUG_HIP04_UART | ||
| 244 | bool "Hisilicon HiP04 Debug UART" | ||
| 245 | depends on ARCH_HIP04 | ||
| 246 | select DEBUG_UART_8250 | ||
| 247 | help | ||
| 248 | Say Y here if you want kernel low-level debugging support | ||
| 249 | on HIP04 UART. | ||
| 250 | |||
| 251 | config DEBUG_HIX5HD2_UART | ||
| 252 | bool "Hisilicon Hix5hd2 Debug UART" | ||
| 253 | depends on ARCH_HIX5HD2 | ||
| 254 | select DEBUG_UART_PL01X | ||
| 255 | help | ||
| 256 | Say Y here if you want kernel low-level debugging support | ||
| 257 | on Hix5hd2 UART. | ||
| 258 | |||
| 242 | config DEBUG_IMX1_UART | 259 | config DEBUG_IMX1_UART |
| 243 | bool "i.MX1 Debug UART" | 260 | bool "i.MX1 Debug UART" |
| 244 | depends on SOC_IMX1 | 261 | depends on SOC_IMX1 |
| @@ -348,6 +365,13 @@ choice | |||
| 348 | Say Y here if you want the debug print routines to direct | 365 | Say Y here if you want the debug print routines to direct |
| 349 | their output to UART1 serial port on KEYSTONE2 devices. | 366 | their output to UART1 serial port on KEYSTONE2 devices. |
| 350 | 367 | ||
| 368 | config DEBUG_MESON_UARTAO | ||
| 369 | bool "Kernel low-level debugging via Meson6 UARTAO" | ||
| 370 | depends on ARCH_MESON | ||
| 371 | help | ||
| 372 | Say Y here if you want kernel low-lever debugging support | ||
| 373 | on Amlogic Meson6 based platforms on the UARTAO. | ||
| 374 | |||
| 351 | config DEBUG_MMP_UART2 | 375 | config DEBUG_MMP_UART2 |
| 352 | bool "Kernel low-level debugging message via MMP UART2" | 376 | bool "Kernel low-level debugging message via MMP UART2" |
| 353 | depends on ARCH_MMP | 377 | depends on ARCH_MMP |
| @@ -834,6 +858,14 @@ choice | |||
| 834 | Say Y here if you want kernel low-level debugging support | 858 | Say Y here if you want kernel low-level debugging support |
| 835 | on Ux500 based platforms. | 859 | on Ux500 based platforms. |
| 836 | 860 | ||
| 861 | config DEBUG_MT6589_UART0 | ||
| 862 | bool "Mediatek mt6589 UART0" | ||
| 863 | depends on ARCH_MEDIATEK | ||
| 864 | select DEBUG_UART_8250 | ||
| 865 | help | ||
| 866 | Say Y here if you want kernel low-level debugging support | ||
| 867 | for Mediatek mt6589 based platforms on UART0. | ||
| 868 | |||
| 837 | config DEBUG_VEXPRESS_UART0_DETECT | 869 | config DEBUG_VEXPRESS_UART0_DETECT |
| 838 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" | 870 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" |
| 839 | depends on ARCH_VEXPRESS && CPU_CP15_MMU | 871 | depends on ARCH_VEXPRESS && CPU_CP15_MMU |
| @@ -1011,6 +1043,7 @@ config DEBUG_LL_INCLUDE | |||
| 1011 | string | 1043 | string |
| 1012 | default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 | 1044 | default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 |
| 1013 | default "debug/clps711x.S" if DEBUG_CLPS711X_UART1 || DEBUG_CLPS711X_UART2 | 1045 | default "debug/clps711x.S" if DEBUG_CLPS711X_UART1 || DEBUG_CLPS711X_UART2 |
| 1046 | default "debug/meson.S" if DEBUG_MESON_UARTAO | ||
| 1014 | default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X | 1047 | default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X |
| 1015 | default "debug/exynos.S" if DEBUG_EXYNOS_UART | 1048 | default "debug/exynos.S" if DEBUG_EXYNOS_UART |
| 1016 | default "debug/efm32.S" if DEBUG_LL_UART_EFM32 | 1049 | default "debug/efm32.S" if DEBUG_LL_UART_EFM32 |
| @@ -1038,6 +1071,7 @@ config DEBUG_LL_INCLUDE | |||
| 1038 | default "debug/vf.S" if DEBUG_VF_UART | 1071 | default "debug/vf.S" if DEBUG_VF_UART |
| 1039 | default "debug/vt8500.S" if DEBUG_VT8500_UART0 | 1072 | default "debug/vt8500.S" if DEBUG_VT8500_UART0 |
| 1040 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 | 1073 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 |
| 1074 | default "debug/bcm63xx.S" if DEBUG_UART_BCM63XX | ||
| 1041 | default "mach/debug-macro.S" | 1075 | default "mach/debug-macro.S" |
| 1042 | 1076 | ||
| 1043 | # Compatibility options for PL01x | 1077 | # Compatibility options for PL01x |
| @@ -1057,6 +1091,10 @@ config DEBUG_UART_8250 | |||
| 1057 | ARCH_IOP33X || ARCH_IXP4XX || \ | 1091 | ARCH_IOP33X || ARCH_IXP4XX || \ |
| 1058 | ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC | 1092 | ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC |
| 1059 | 1093 | ||
| 1094 | # Compatibility options for BCM63xx | ||
| 1095 | config DEBUG_UART_BCM63XX | ||
| 1096 | def_bool ARCH_BCM_63XX | ||
| 1097 | |||
| 1060 | config DEBUG_UART_PHYS | 1098 | config DEBUG_UART_PHYS |
| 1061 | hex "Physical base address of debug UART" | 1099 | hex "Physical base address of debug UART" |
| 1062 | default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 | 1100 | default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 |
| @@ -1075,6 +1113,7 @@ config DEBUG_UART_PHYS | |||
| 1075 | default 0x10126000 if DEBUG_RK3X_UART1 | 1113 | default 0x10126000 if DEBUG_RK3X_UART1 |
| 1076 | default 0x101f1000 if ARCH_VERSATILE | 1114 | default 0x101f1000 if ARCH_VERSATILE |
| 1077 | default 0x101fb000 if DEBUG_NOMADIK_UART | 1115 | default 0x101fb000 if DEBUG_NOMADIK_UART |
| 1116 | default 0x11006000 if DEBUG_MT6589_UART0 | ||
| 1078 | default 0x16000000 if ARCH_INTEGRATOR | 1117 | default 0x16000000 if ARCH_INTEGRATOR |
| 1079 | default 0x18000300 if DEBUG_BCM_5301X | 1118 | default 0x18000300 if DEBUG_BCM_5301X |
| 1080 | default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1 | 1119 | default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1 |
| @@ -1093,6 +1132,7 @@ config DEBUG_UART_PHYS | |||
| 1093 | DEBUG_S3C2410_UART1) | 1132 | DEBUG_S3C2410_UART1) |
| 1094 | default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ | 1133 | default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ |
| 1095 | DEBUG_S3C2410_UART2) | 1134 | DEBUG_S3C2410_UART2) |
| 1135 | default 0x78000000 if DEBUG_CNS3XXX | ||
| 1096 | default 0x7c0003f8 if FOOTBRIDGE | 1136 | default 0x7c0003f8 if FOOTBRIDGE |
| 1097 | default 0x78000000 if DEBUG_CNS3XXX | 1137 | default 0x78000000 if DEBUG_CNS3XXX |
| 1098 | default 0x80070000 if DEBUG_IMX23_UART | 1138 | default 0x80070000 if DEBUG_IMX23_UART |
| @@ -1107,9 +1147,11 @@ config DEBUG_UART_PHYS | |||
| 1107 | default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN | 1147 | default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN |
| 1108 | default 0xd0000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX | 1148 | default 0xd0000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX |
| 1109 | default 0xd0012000 if DEBUG_MVEBU_UART | 1149 | default 0xd0012000 if DEBUG_MVEBU_UART |
| 1150 | default 0xc81004c0 if DEBUG_MESON_UARTAO | ||
| 1110 | default 0xd4017000 if DEBUG_MMP_UART2 | 1151 | default 0xd4017000 if DEBUG_MMP_UART2 |
| 1111 | default 0xd4018000 if DEBUG_MMP_UART3 | 1152 | default 0xd4018000 if DEBUG_MMP_UART3 |
| 1112 | default 0xe0000000 if ARCH_SPEAR13XX | 1153 | default 0xe0000000 if ARCH_SPEAR13XX |
| 1154 | default 0xe4007000 if DEBUG_HIP04_UART | ||
| 1113 | default 0xf0000be0 if ARCH_EBSA110 | 1155 | default 0xf0000be0 if ARCH_EBSA110 |
| 1114 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE | 1156 | default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE |
| 1115 | default 0xf1012000 if ARCH_DOVE || ARCH_MV78XX0 || \ | 1157 | default 0xf1012000 if ARCH_DOVE || ARCH_MV78XX0 || \ |
| @@ -1123,11 +1165,13 @@ config DEBUG_UART_PHYS | |||
| 1123 | default 0xffc02000 if DEBUG_SOCFPGA_UART | 1165 | default 0xffc02000 if DEBUG_SOCFPGA_UART |
| 1124 | default 0xffd82340 if ARCH_IOP13XX | 1166 | default 0xffd82340 if ARCH_IOP13XX |
| 1125 | default 0xfff36000 if DEBUG_HIGHBANK_UART | 1167 | default 0xfff36000 if DEBUG_HIGHBANK_UART |
| 1168 | default 0xfffe8600 if DEBUG_UART_BCM63XX | ||
| 1126 | default 0xfffff700 if ARCH_IOP33X | 1169 | default 0xfffff700 if ARCH_IOP33X |
| 1127 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | 1170 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ |
| 1128 | DEBUG_LL_UART_EFM32 || \ | 1171 | DEBUG_LL_UART_EFM32 || \ |
| 1129 | DEBUG_UART_8250 || DEBUG_UART_PL01X || \ | 1172 | DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ |
| 1130 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART | 1173 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ |
| 1174 | DEBUG_UART_BCM63XX | ||
| 1131 | 1175 | ||
| 1132 | config DEBUG_UART_VIRT | 1176 | config DEBUG_UART_VIRT |
| 1133 | hex "Virtual base address of debug UART" | 1177 | hex "Virtual base address of debug UART" |
| @@ -1137,6 +1181,7 @@ config DEBUG_UART_VIRT | |||
| 1137 | default 0xf01fb000 if DEBUG_NOMADIK_UART | 1181 | default 0xf01fb000 if DEBUG_NOMADIK_UART |
| 1138 | default 0xf0201000 if DEBUG_BCM2835 | 1182 | default 0xf0201000 if DEBUG_BCM2835 |
| 1139 | default 0xf1000300 if DEBUG_BCM_5301X | 1183 | default 0xf1000300 if DEBUG_BCM_5301X |
| 1184 | default 0xf1006000 if DEBUG_MT6589_UART0 | ||
| 1140 | default 0xf11f1000 if ARCH_VERSATILE | 1185 | default 0xf11f1000 if ARCH_VERSATILE |
| 1141 | default 0xf1600000 if ARCH_INTEGRATOR | 1186 | default 0xf1600000 if ARCH_INTEGRATOR |
| 1142 | default 0xf1c28000 if DEBUG_SUNXI_UART0 | 1187 | default 0xf1c28000 if DEBUG_SUNXI_UART0 |
| @@ -1152,17 +1197,20 @@ config DEBUG_UART_VIRT | |||
| 1152 | default 0xf7008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ | 1197 | default 0xf7008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ |
| 1153 | DEBUG_S3C2410_UART2) | 1198 | DEBUG_S3C2410_UART2) |
| 1154 | default 0xf7fc9000 if DEBUG_BERLIN_UART | 1199 | default 0xf7fc9000 if DEBUG_BERLIN_UART |
| 1200 | default 0xf8007000 if DEBUG_HIP04_UART | ||
| 1155 | default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 | 1201 | default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 |
| 1156 | default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 | 1202 | default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 |
| 1157 | default 0xfa71e000 if DEBUG_QCOM_UARTDM | 1203 | default 0xfa71e000 if DEBUG_QCOM_UARTDM |
| 1158 | default 0xfb002000 if DEBUG_CNS3XXX | 1204 | default 0xfb002000 if DEBUG_CNS3XXX |
| 1159 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT | 1205 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT |
| 1160 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT | 1206 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT |
| 1207 | default 0xfcfe8600 if DEBUG_UART_BCM63XX | ||
| 1161 | default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX | 1208 | default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX |
| 1162 | default 0xfd000000 if ARCH_SPEAR13XX | 1209 | default 0xfd000000 if ARCH_SPEAR13XX |
| 1163 | default 0xfd012000 if ARCH_MV78XX0 | 1210 | default 0xfd012000 if ARCH_MV78XX0 |
| 1164 | default 0xfde12000 if ARCH_DOVE | 1211 | default 0xfde12000 if ARCH_DOVE |
| 1165 | default 0xfe012000 if ARCH_ORION5X | 1212 | default 0xfe012000 if ARCH_ORION5X |
| 1213 | default 0xf31004c0 if DEBUG_MESON_UARTAO | ||
| 1166 | default 0xfe017000 if DEBUG_MMP_UART2 | 1214 | default 0xfe017000 if DEBUG_MMP_UART2 |
| 1167 | default 0xfe018000 if DEBUG_MMP_UART3 | 1215 | default 0xfe018000 if DEBUG_MMP_UART3 |
| 1168 | default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART | 1216 | default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART |
| @@ -1194,8 +1242,9 @@ config DEBUG_UART_VIRT | |||
| 1194 | default 0xff003000 if DEBUG_U300_UART | 1242 | default 0xff003000 if DEBUG_U300_UART |
| 1195 | default DEBUG_UART_PHYS if !MMU | 1243 | default DEBUG_UART_PHYS if !MMU |
| 1196 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | 1244 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ |
| 1197 | DEBUG_UART_8250 || DEBUG_UART_PL01X || \ | 1245 | DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ |
| 1198 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART | 1246 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ |
| 1247 | DEBUG_UART_BCM63XX | ||
| 1199 | 1248 | ||
| 1200 | config DEBUG_UART_8250_SHIFT | 1249 | config DEBUG_UART_8250_SHIFT |
| 1201 | int "Register offset shift for the 8250 debug UART" | 1250 | int "Register offset shift for the 8250 debug UART" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 12bfc1fa51f0..dceb0441b1a6 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -169,6 +169,7 @@ machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx | |||
| 169 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone | 169 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone |
| 170 | machine-$(CONFIG_ARCH_KS8695) += ks8695 | 170 | machine-$(CONFIG_ARCH_KS8695) += ks8695 |
| 171 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx | 171 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx |
| 172 | machine-$(CONFIG_ARCH_MESON) += meson | ||
| 172 | machine-$(CONFIG_ARCH_MMP) += mmp | 173 | machine-$(CONFIG_ARCH_MMP) += mmp |
| 173 | machine-$(CONFIG_ARCH_MOXART) += moxart | 174 | machine-$(CONFIG_ARCH_MOXART) += moxart |
| 174 | machine-$(CONFIG_ARCH_MSM) += msm | 175 | machine-$(CONFIG_ARCH_MSM) += msm |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e6aa6e77a3ec..d3e687ecfc95 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
| @@ -48,11 +48,14 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb | |||
| 48 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb | 48 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb |
| 49 | dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb | 49 | dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb |
| 50 | dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb | 50 | dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb |
| 51 | # sama5d4 | ||
| 52 | dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb | ||
| 51 | 53 | ||
| 52 | dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb | 54 | dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb |
| 53 | dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb | 55 | dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb |
| 54 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 56 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
| 55 | dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb | 57 | dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb |
| 58 | dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb | ||
| 56 | dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ | 59 | dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ |
| 57 | bcm21664-garnet.dtb | 60 | bcm21664-garnet.dtb |
| 58 | dtb-$(CONFIG_ARCH_BERLIN) += \ | 61 | dtb-$(CONFIG_ARCH_BERLIN) += \ |
| @@ -90,6 +93,7 @@ dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb | |||
| 90 | dtb-$(CONFIG_ARCH_HIX5HD2) += hisi-x5hd2-dkb.dtb | 93 | dtb-$(CONFIG_ARCH_HIX5HD2) += hisi-x5hd2-dkb.dtb |
| 91 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ | 94 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ |
| 92 | ecx-2000.dtb | 95 | ecx-2000.dtb |
| 96 | dtb-$(CONFIG_ARCH_HIP04) += hip04-d01.dtb | ||
| 93 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ | 97 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ |
| 94 | integratorcp.dtb | 98 | integratorcp.dtb |
| 95 | dtb-$(CONFIG_ARCH_KEYSTONE) += k2hk-evm.dtb \ | 99 | dtb-$(CONFIG_ARCH_KEYSTONE) += k2hk-evm.dtb \ |
| @@ -361,7 +365,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \ | |||
| 361 | r8a7740-armadillo800eva.dtb \ | 365 | r8a7740-armadillo800eva.dtb \ |
| 362 | r8a7778-bockw.dtb \ | 366 | r8a7778-bockw.dtb \ |
| 363 | r8a7778-bockw-reference.dtb \ | 367 | r8a7778-bockw-reference.dtb \ |
| 364 | r8a7740-armadillo800eva-reference.dtb \ | ||
| 365 | r8a7779-marzen.dtb \ | 368 | r8a7779-marzen.dtb \ |
| 366 | r8a7791-koelsch.dtb \ | 369 | r8a7791-koelsch.dtb \ |
| 367 | r8a7790-lager.dtb \ | 370 | r8a7790-lager.dtb \ |
| @@ -372,6 +375,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \ | |||
| 372 | sh7372-mackerel.dtb | 375 | sh7372-mackerel.dtb |
| 373 | dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ | 376 | dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ |
| 374 | r7s72100-genmai.dtb \ | 377 | r7s72100-genmai.dtb \ |
| 378 | r8a7740-armadillo800eva.dtb \ | ||
| 375 | r8a7791-henninger.dtb \ | 379 | r8a7791-henninger.dtb \ |
| 376 | r8a7791-koelsch.dtb \ | 380 | r8a7791-koelsch.dtb \ |
| 377 | r8a7790-lager.dtb \ | 381 | r8a7790-lager.dtb \ |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 3a0a161342ba..c8238c467acf 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
| @@ -726,9 +726,8 @@ | |||
| 726 | }; | 726 | }; |
| 727 | 727 | ||
| 728 | ocmcram: ocmcram@40300000 { | 728 | ocmcram: ocmcram@40300000 { |
| 729 | compatible = "ti,am3352-ocmcram"; | 729 | compatible = "mmio-sram"; |
| 730 | reg = <0x40300000 0x10000>; | 730 | reg = <0x40300000 0x10000>; /* 64k */ |
| 731 | ti,hwmods = "ocmcram"; | ||
| 732 | }; | 731 | }; |
| 733 | 732 | ||
| 734 | wkup_m3: wkup_m3@44d00000 { | 733 | wkup_m3: wkup_m3@44d00000 { |
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index 8689949bdba3..24531de979f2 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi | |||
| @@ -885,6 +885,11 @@ | |||
| 885 | clock-names = "fck"; | 885 | clock-names = "fck"; |
| 886 | }; | 886 | }; |
| 887 | }; | 887 | }; |
| 888 | |||
| 889 | ocmcram: ocmcram@40300000 { | ||
| 890 | compatible = "mmio-sram"; | ||
| 891 | reg = <0x40300000 0x40000>; /* 256k */ | ||
| 892 | }; | ||
| 888 | }; | 893 | }; |
| 889 | }; | 894 | }; |
| 890 | 895 | ||
diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts new file mode 100644 index 000000000000..b5b84006469e --- /dev/null +++ b/arch/arm/boot/dts/at91-sama5d4ek.dts | |||
| @@ -0,0 +1,260 @@ | |||
| 1 | /* | ||
| 2 | * at91-sama5d4ek.dts - Device Tree file for SAMA5D4 Evaluation Kit | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Atmel, | ||
| 5 | * 2014 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
| 6 | * | ||
| 7 | * This file is dual-licensed: you can use it either under the terms | ||
| 8 | * of the GPL or the X11 license, at your option. Note that this dual | ||
| 9 | * licensing only applies to this file, and not this project as a | ||
| 10 | * whole. | ||
| 11 | * | ||
| 12 | * a) This library is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License as | ||
| 14 | * published by the Free Software Foundation; either version 2 of the | ||
| 15 | * License, or (at your option) any later version. | ||
| 16 | * | ||
| 17 | * This library is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * Or, alternatively, | ||
| 23 | * | ||
| 24 | * b) Permission is hereby granted, free of charge, to any person | ||
| 25 | * obtaining a copy of this software and associated documentation | ||
| 26 | * files (the "Software"), to deal in the Software without | ||
| 27 | * restriction, including without limitation the rights to use, | ||
| 28 | * copy, modify, merge, publish, distribute, sublicense, and/or | ||
| 29 | * sell copies of the Software, and to permit persons to whom the | ||
| 30 | * Software is furnished to do so, subject to the following | ||
| 31 | * conditions: | ||
| 32 | * | ||
| 33 | * The above copyright notice and this permission notice shall be | ||
| 34 | * included in all copies or substantial portions of the Software. | ||
| 35 | * | ||
| 36 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 37 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
| 38 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 39 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
| 40 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| 41 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| 42 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 43 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 44 | */ | ||
| 45 | /dts-v1/; | ||
| 46 | #include "sama5d4.dtsi" | ||
| 47 | |||
| 48 | / { | ||
| 49 | model = "Atmel SAMA5D4-EK"; | ||
| 50 | compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5"; | ||
| 51 | |||
| 52 | chosen { | ||
| 53 | bootargs = "console=ttyS0,115200 ignore_loglevel earlyprintk"; | ||
| 54 | }; | ||
| 55 | |||
| 56 | memory { | ||
| 57 | reg = <0x20000000 0x20000000>; | ||
| 58 | }; | ||
| 59 | |||
| 60 | clocks { | ||
| 61 | #address-cells = <1>; | ||
| 62 | #size-cells = <1>; | ||
| 63 | ranges; | ||
| 64 | |||
| 65 | main_clock: clock@0 { | ||
| 66 | compatible = "atmel,osc", "fixed-clock"; | ||
| 67 | clock-frequency = <12000000>; | ||
| 68 | }; | ||
| 69 | |||
| 70 | slow_xtal { | ||
| 71 | clock-frequency = <32768>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | main_xtal { | ||
| 75 | clock-frequency = <12000000>; | ||
| 76 | }; | ||
| 77 | }; | ||
| 78 | |||
| 79 | ahb { | ||
| 80 | apb { | ||
| 81 | lcd_bus@f0000000 { | ||
| 82 | status = "okay"; | ||
| 83 | |||
| 84 | lcd@f0000000 { | ||
| 85 | status = "okay"; | ||
| 86 | }; | ||
| 87 | |||
| 88 | lcdovl1@f0000140 { | ||
| 89 | status = "okay"; | ||
| 90 | }; | ||
| 91 | |||
| 92 | lcdovl2@f0000240 { | ||
| 93 | status = "okay"; | ||
| 94 | }; | ||
| 95 | |||
| 96 | lcdheo1@f0000340 { | ||
| 97 | status = "okay"; | ||
| 98 | }; | ||
| 99 | }; | ||
| 100 | |||
| 101 | adc0: adc@fc034000 { | ||
| 102 | /* The vref depends on JP22 of EK. If connect 1-2 then use 3.3V. connect 2-3 use 3.0V */ | ||
| 103 | atmel,adc-vref = <3300>; | ||
| 104 | /*atmel,adc-ts-wires = <4>;*/ /* Set up ADC touch screen */ | ||
| 105 | status = "okay"; /* Enable ADC IIO support */ | ||
| 106 | }; | ||
| 107 | |||
| 108 | mmc0: mmc@f8000000 { | ||
| 109 | pinctrl-names = "default"; | ||
| 110 | pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>; | ||
| 111 | slot@1 { | ||
| 112 | reg = <1>; | ||
| 113 | bus-width = <4>; | ||
| 114 | cd-gpios = <&pioE 5 0>; | ||
| 115 | }; | ||
| 116 | }; | ||
| 117 | |||
| 118 | spi0: spi@f8010000 { | ||
| 119 | cs-gpios = <&pioC 3 0>, <0>, <0>, <0>; | ||
| 120 | status = "okay"; | ||
| 121 | m25p80@0 { | ||
| 122 | compatible = "atmel,at25df321a"; | ||
| 123 | spi-max-frequency = <50000000>; | ||
| 124 | reg = <0>; | ||
| 125 | }; | ||
| 126 | }; | ||
| 127 | |||
| 128 | i2c0: i2c@f8014000 { | ||
| 129 | status = "okay"; | ||
| 130 | }; | ||
| 131 | |||
| 132 | macb0: ethernet@f8020000 { | ||
| 133 | phy-mode = "rmii"; | ||
| 134 | status = "okay"; | ||
| 135 | }; | ||
| 136 | |||
| 137 | mmc1: mmc@fc000000 { | ||
| 138 | pinctrl-names = "default"; | ||
| 139 | pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; | ||
| 140 | status = "okay"; | ||
| 141 | slot@0 { | ||
| 142 | reg = <0>; | ||
| 143 | bus-width = <4>; | ||
| 144 | cd-gpios = <&pioE 6 0>; | ||
| 145 | }; | ||
| 146 | }; | ||
| 147 | |||
| 148 | usart2: serial@fc008000 { | ||
| 149 | status = "okay"; | ||
| 150 | }; | ||
| 151 | |||
| 152 | usart3: serial@fc00c000 { | ||
| 153 | status = "okay"; | ||
| 154 | }; | ||
| 155 | |||
| 156 | usart4: serial@fc010000 { | ||
| 157 | status = "okay"; | ||
| 158 | }; | ||
| 159 | |||
| 160 | watchdog@fc068640 { | ||
| 161 | status = "okay"; | ||
| 162 | }; | ||
| 163 | |||
| 164 | pinctrl@fc06a000 { | ||
| 165 | board { | ||
| 166 | pinctrl_mmc0_cd: mmc0_cd { | ||
| 167 | atmel,pins = | ||
| 168 | <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; | ||
| 169 | }; | ||
| 170 | pinctrl_mmc1_cd: mmc1_cd { | ||
| 171 | atmel,pins = | ||
| 172 | <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; | ||
| 173 | }; | ||
| 174 | pinctrl_usba_vbus: usba_vbus { | ||
| 175 | atmel,pins = | ||
| 176 | <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; | ||
| 177 | }; | ||
| 178 | pinctrl_key_gpio: key_gpio_0 { | ||
| 179 | atmel,pins = | ||
| 180 | <AT91_PIOE 13 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE13 gpio */ | ||
| 181 | }; | ||
| 182 | }; | ||
| 183 | }; | ||
| 184 | }; | ||
| 185 | |||
| 186 | usb0: gadget@00400000 { | ||
| 187 | atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>; | ||
| 188 | pinctrl-names = "default"; | ||
| 189 | pinctrl-0 = <&pinctrl_usba_vbus>; | ||
| 190 | status = "okay"; | ||
| 191 | }; | ||
| 192 | |||
| 193 | usb1: ohci@00500000 { | ||
| 194 | num-ports = <3>; | ||
| 195 | atmel,vbus-gpio = <0 /* &pioE 10 GPIO_ACTIVE_LOW */ | ||
| 196 | &pioE 11 GPIO_ACTIVE_LOW | ||
| 197 | &pioE 12 GPIO_ACTIVE_LOW | ||
| 198 | >; | ||
| 199 | status = "okay"; | ||
| 200 | }; | ||
| 201 | |||
| 202 | usb2: ehci@00600000 { | ||
| 203 | status = "okay"; | ||
| 204 | }; | ||
| 205 | |||
| 206 | nand0: nand@80000000 { | ||
| 207 | nand-bus-width = <8>; | ||
| 208 | nand-ecc-mode = "hw"; | ||
| 209 | nand-on-flash-bbt; | ||
| 210 | atmel,has-pmecc; | ||
| 211 | status = "okay"; | ||
| 212 | |||
| 213 | at91bootstrap@0 { | ||
| 214 | label = "at91bootstrap"; | ||
| 215 | reg = <0x0 0x40000>; | ||
| 216 | }; | ||
| 217 | |||
| 218 | bootloader@40000 { | ||
| 219 | label = "bootloader"; | ||
| 220 | reg = <0x40000 0x80000>; | ||
| 221 | }; | ||
| 222 | |||
| 223 | bootloaderenv@c0000 { | ||
| 224 | label = "bootloader env"; | ||
| 225 | reg = <0xc0000 0xc0000>; | ||
| 226 | }; | ||
| 227 | |||
| 228 | dtb@180000 { | ||
| 229 | label = "device tree"; | ||
| 230 | reg = <0x180000 0x80000>; | ||
| 231 | }; | ||
| 232 | |||
| 233 | kernel@200000 { | ||
| 234 | label = "kernel"; | ||
| 235 | reg = <0x200000 0x600000>; | ||
| 236 | }; | ||
| 237 | |||
| 238 | rootfs@800000 { | ||
| 239 | label = "rootfs"; | ||
| 240 | reg = <0x800000 0x0f800000>; | ||
| 241 | }; | ||
| 242 | }; | ||
| 243 | }; | ||
| 244 | |||
| 245 | gpio_keys { | ||
| 246 | compatible = "gpio-keys"; | ||
| 247 | #address-cells = <1>; | ||
| 248 | #size-cells = <0>; | ||
| 249 | |||
| 250 | pinctrl-names = "default"; | ||
| 251 | pinctrl-0 = <&pinctrl_key_gpio>; | ||
| 252 | |||
| 253 | pb_user1 { | ||
| 254 | label = "pb_user1"; | ||
| 255 | gpios = <&pioE 13 GPIO_ACTIVE_HIGH>; | ||
| 256 | linux,code = <0x100>; | ||
| 257 | gpio-key,wakeup; | ||
| 258 | }; | ||
| 259 | }; | ||
| 260 | }; | ||
diff --git a/arch/arm/boot/dts/bcm63138.dtsi b/arch/arm/boot/dts/bcm63138.dtsi new file mode 100644 index 000000000000..f3bb2dd6269e --- /dev/null +++ b/arch/arm/boot/dts/bcm63138.dtsi | |||
| @@ -0,0 +1,134 @@ | |||
| 1 | /* | ||
| 2 | * Broadcom BCM63138 DSL SoCs Device Tree | ||
| 3 | */ | ||
| 4 | |||
| 5 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
| 6 | #include <dt-bindings/interrupt-controller/irq.h> | ||
| 7 | |||
| 8 | #include "skeleton.dtsi" | ||
| 9 | |||
| 10 | / { | ||
| 11 | compatible = "brcm,bcm63138"; | ||
| 12 | model = "Broadcom BCM63138 DSL SoC"; | ||
| 13 | interrupt-parent = <&gic>; | ||
| 14 | |||
| 15 | aliases { | ||
| 16 | uart0 = &serial0; | ||
| 17 | uart1 = &serial1; | ||
| 18 | }; | ||
| 19 | |||
| 20 | cpus { | ||
| 21 | #address-cells = <1>; | ||
| 22 | #size-cells = <0>; | ||
| 23 | |||
| 24 | cpu@0 { | ||
| 25 | device_type = "cpu"; | ||
| 26 | compatible = "arm,cortex-a9"; | ||
| 27 | next-level-cache = <&L2>; | ||
| 28 | reg = <0>; | ||
| 29 | }; | ||
| 30 | |||
| 31 | cpu@1 { | ||
| 32 | device_type = "cpu"; | ||
| 33 | compatible = "arm,cortex-a9"; | ||
| 34 | next-level-cache = <&L2>; | ||
| 35 | reg = <1>; | ||
| 36 | }; | ||
| 37 | }; | ||
| 38 | |||
| 39 | clocks { | ||
| 40 | #address-cells = <1>; | ||
| 41 | #size-cells = <0>; | ||
| 42 | |||
| 43 | arm_timer_clk: arm_timer_clk { | ||
| 44 | #clock-cells = <0>; | ||
| 45 | compatible = "fixed-clock"; | ||
| 46 | clock-frequency = <500000000>; | ||
| 47 | }; | ||
| 48 | |||
| 49 | periph_clk: periph_clk { | ||
| 50 | #clock-cells = <0>; | ||
| 51 | compatible = "fixed-clock"; | ||
| 52 | clock-frequency = <50000000>; | ||
| 53 | clock-output-names = "periph"; | ||
| 54 | }; | ||
| 55 | }; | ||
| 56 | |||
| 57 | /* ARM bus */ | ||
| 58 | axi@80000000 { | ||
| 59 | compatible = "simple-bus"; | ||
| 60 | ranges = <0 0x80000000 0x784000>; | ||
| 61 | #address-cells = <1>; | ||
| 62 | #size-cells = <1>; | ||
| 63 | |||
| 64 | L2: cache-controller@1d000 { | ||
| 65 | compatible = "arm,pl310-cache"; | ||
| 66 | reg = <0x1d000 0x1000>; | ||
| 67 | cache-unified; | ||
| 68 | cache-level = <2>; | ||
| 69 | cache-sets = <16>; | ||
| 70 | cache-size = <0x80000>; | ||
| 71 | interrupts = <GIC_PPI 0 IRQ_TYPE_LEVEL_HIGH>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | scu: scu@1e000 { | ||
| 75 | compatible = "arm,cortex-a9-scu"; | ||
| 76 | reg = <0x1e000 0x100>; | ||
| 77 | }; | ||
| 78 | |||
| 79 | gic: interrupt-controller@1e100 { | ||
| 80 | compatible = "arm,cortex-a9-gic"; | ||
| 81 | reg = <0x1f000 0x1000 | ||
| 82 | 0x1e100 0x100>; | ||
| 83 | #interrupt-cells = <3>; | ||
| 84 | #address-cells = <0>; | ||
| 85 | interrupt-controller; | ||
| 86 | }; | ||
| 87 | |||
| 88 | global_timer: timer@1e200 { | ||
| 89 | compatible = "arm,cortex-a9-global-timer"; | ||
| 90 | reg = <0x1e200 0x20>; | ||
| 91 | interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; | ||
| 92 | clocks = <&arm_timer_clk>; | ||
| 93 | }; | ||
| 94 | |||
| 95 | local_timer: local-timer@1e600 { | ||
| 96 | compatible = "arm,cortex-a9-twd-timer"; | ||
| 97 | reg = <0x1e600 0x20>; | ||
| 98 | interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; | ||
| 99 | clocks = <&arm_timer_clk>; | ||
| 100 | }; | ||
| 101 | |||
| 102 | twd_watchdog: watchdog@1e620 { | ||
| 103 | compatible = "arm,cortex-a9-twd-wdt"; | ||
| 104 | reg = <0x1e620 0x20>; | ||
| 105 | interupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>; | ||
| 106 | }; | ||
| 107 | }; | ||
| 108 | |||
| 109 | /* Legacy UBUS base */ | ||
| 110 | ubus@fffe8000 { | ||
| 111 | compatible = "simple-bus"; | ||
| 112 | #address-cells = <1>; | ||
| 113 | #size-cells = <1>; | ||
| 114 | ranges = <0 0xfffe8000 0x8100>; | ||
| 115 | |||
| 116 | serial0: serial@600 { | ||
| 117 | compatible = "brcm,bcm6345-uart"; | ||
| 118 | reg = <0x600 0x1b>; | ||
| 119 | interrupts = <GIC_SPI 32 0>; | ||
| 120 | clocks = <&periph_clk>; | ||
| 121 | clock-names = "periph"; | ||
| 122 | status = "disabled"; | ||
| 123 | }; | ||
| 124 | |||
| 125 | serial1: serial@620 { | ||
| 126 | compatible = "brcm,bcm6345-uart"; | ||
| 127 | reg = <0x620 0x1b>; | ||
| 128 | interrupts = <GIC_SPI 33 0>; | ||
| 129 | clocks = <&periph_clk>; | ||
| 130 | clock-names = "periph"; | ||
| 131 | status = "disabled"; | ||
| 132 | }; | ||
| 133 | }; | ||
| 134 | }; | ||
diff --git a/arch/arm/boot/dts/bcm963138dvt.dts b/arch/arm/boot/dts/bcm963138dvt.dts new file mode 100644 index 000000000000..69c93395ecd2 --- /dev/null +++ b/arch/arm/boot/dts/bcm963138dvt.dts | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Broadcom BCM63138 Reference Board DTS | ||
| 3 | */ | ||
| 4 | |||
| 5 | /dts-v1/; | ||
| 6 | |||
| 7 | #include "bcm63138.dtsi" | ||
| 8 | |||
| 9 | / { | ||
| 10 | compatible = "brcm,BCM963138DVT", "brcm,bcm63138"; | ||
| 11 | model = "Broadcom BCM963138DVT"; | ||
| 12 | |||
| 13 | chosen { | ||
| 14 | bootargs = "console=ttyS0,115200"; | ||
| 15 | stdout-path = &serial0; | ||
| 16 | }; | ||
| 17 | |||
| 18 | memory { | ||
| 19 | reg = <0x0 0x08000000>; | ||
| 20 | }; | ||
| 21 | |||
| 22 | }; | ||
| 23 | |||
| 24 | &serial0 { | ||
| 25 | status = "okay"; | ||
| 26 | }; | ||
| 27 | |||
| 28 | &serial1 { | ||
| 29 | status = "okay"; | ||
| 30 | }; | ||
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index d678152db4cb..e09b1afdaef2 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
| @@ -89,6 +89,7 @@ | |||
| 89 | prm: prm@4ae06000 { | 89 | prm: prm@4ae06000 { |
| 90 | compatible = "ti,dra7-prm"; | 90 | compatible = "ti,dra7-prm"; |
| 91 | reg = <0x4ae06000 0x3000>; | 91 | reg = <0x4ae06000 0x3000>; |
| 92 | interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; | ||
| 92 | 93 | ||
| 93 | prm_clocks: clocks { | 94 | prm_clocks: clocks { |
| 94 | #address-cells = <1>; | 95 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/hip04-d01.dts b/arch/arm/boot/dts/hip04-d01.dts new file mode 100644 index 000000000000..40a9e33c2654 --- /dev/null +++ b/arch/arm/boot/dts/hip04-d01.dts | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013-2014 Linaro Ltd. | ||
| 3 | * Author: Haojian Zhuang <haojian.zhuang@linaro.org> | ||
| 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 | |||
| 12 | #include "hip04.dtsi" | ||
| 13 | |||
| 14 | / { | ||
| 15 | /* memory bus is 64-bit */ | ||
| 16 | #address-cells = <2>; | ||
| 17 | #size-cells = <2>; | ||
| 18 | model = "Hisilicon D01 Development Board"; | ||
| 19 | compatible = "hisilicon,hip04-d01"; | ||
| 20 | |||
| 21 | memory@00000000,10000000 { | ||
| 22 | device_type = "memory"; | ||
| 23 | reg = <0x00000000 0x10000000 0x00000000 0xc0000000>, | ||
| 24 | <0x00000004 0xc0000000 0x00000003 0x40000000>; | ||
| 25 | }; | ||
| 26 | |||
| 27 | soc { | ||
| 28 | uart0: uart@4007000 { | ||
| 29 | status = "ok"; | ||
| 30 | }; | ||
| 31 | }; | ||
| 32 | }; | ||
diff --git a/arch/arm/boot/dts/hip04.dtsi b/arch/arm/boot/dts/hip04.dtsi new file mode 100644 index 000000000000..93b6c909e991 --- /dev/null +++ b/arch/arm/boot/dts/hip04.dtsi | |||
| @@ -0,0 +1,267 @@ | |||
| 1 | /* | ||
| 2 | * Hisilicon Ltd. HiP04 SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013-2014 Hisilicon Ltd. | ||
| 5 | * Copyright (C) 2013-2014 Linaro Ltd. | ||
| 6 | * | ||
| 7 | * Author: Haojian Zhuang <haojian.zhuang@linaro.org> | ||
| 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 | / { | ||
| 15 | /* memory bus is 64-bit */ | ||
| 16 | #address-cells = <2>; | ||
| 17 | #size-cells = <2>; | ||
| 18 | |||
| 19 | aliases { | ||
| 20 | serial0 = &uart0; | ||
| 21 | }; | ||
| 22 | |||
| 23 | bootwrapper { | ||
| 24 | compatible = "hisilicon,hip04-bootwrapper"; | ||
| 25 | boot-method = <0x10c00000 0x10000>, <0xe0000100 0x1000>; | ||
| 26 | }; | ||
| 27 | |||
| 28 | cpus { | ||
| 29 | #address-cells = <1>; | ||
| 30 | #size-cells = <0>; | ||
| 31 | |||
| 32 | cpu-map { | ||
| 33 | cluster0 { | ||
| 34 | core0 { | ||
| 35 | cpu = <&CPU0>; | ||
| 36 | }; | ||
| 37 | core1 { | ||
| 38 | cpu = <&CPU1>; | ||
| 39 | }; | ||
| 40 | core2 { | ||
| 41 | cpu = <&CPU2>; | ||
| 42 | }; | ||
| 43 | core3 { | ||
| 44 | cpu = <&CPU3>; | ||
| 45 | }; | ||
| 46 | }; | ||
| 47 | cluster1 { | ||
| 48 | core0 { | ||
| 49 | cpu = <&CPU4>; | ||
| 50 | }; | ||
| 51 | core1 { | ||
| 52 | cpu = <&CPU5>; | ||
| 53 | }; | ||
| 54 | core2 { | ||
| 55 | cpu = <&CPU6>; | ||
| 56 | }; | ||
| 57 | core3 { | ||
| 58 | cpu = <&CPU7>; | ||
| 59 | }; | ||
| 60 | }; | ||
| 61 | cluster2 { | ||
| 62 | core0 { | ||
| 63 | cpu = <&CPU8>; | ||
| 64 | }; | ||
| 65 | core1 { | ||
| 66 | cpu = <&CPU9>; | ||
| 67 | }; | ||
| 68 | core2 { | ||
| 69 | cpu = <&CPU10>; | ||
| 70 | }; | ||
| 71 | core3 { | ||
| 72 | cpu = <&CPU11>; | ||
| 73 | }; | ||
| 74 | }; | ||
| 75 | cluster3 { | ||
| 76 | core0 { | ||
| 77 | cpu = <&CPU12>; | ||
| 78 | }; | ||
| 79 | core1 { | ||
| 80 | cpu = <&CPU13>; | ||
| 81 | }; | ||
| 82 | core2 { | ||
| 83 | cpu = <&CPU14>; | ||
| 84 | }; | ||
| 85 | core3 { | ||
| 86 | cpu = <&CPU15>; | ||
| 87 | }; | ||
| 88 | }; | ||
| 89 | }; | ||
| 90 | CPU0: cpu@0 { | ||
| 91 | device_type = "cpu"; | ||
| 92 | compatible = "arm,cortex-a15"; | ||
| 93 | reg = <0>; | ||
| 94 | }; | ||
| 95 | CPU1: cpu@1 { | ||
| 96 | device_type = "cpu"; | ||
| 97 | compatible = "arm,cortex-a15"; | ||
| 98 | reg = <1>; | ||
| 99 | }; | ||
| 100 | CPU2: cpu@2 { | ||
| 101 | device_type = "cpu"; | ||
| 102 | compatible = "arm,cortex-a15"; | ||
| 103 | reg = <2>; | ||
| 104 | }; | ||
| 105 | CPU3: cpu@3 { | ||
| 106 | device_type = "cpu"; | ||
| 107 | compatible = "arm,cortex-a15"; | ||
| 108 | reg = <3>; | ||
| 109 | }; | ||
| 110 | CPU4: cpu@100 { | ||
| 111 | device_type = "cpu"; | ||
| 112 | compatible = "arm,cortex-a15"; | ||
| 113 | reg = <0x100>; | ||
| 114 | }; | ||
| 115 | CPU5: cpu@101 { | ||
| 116 | device_type = "cpu"; | ||
| 117 | compatible = "arm,cortex-a15"; | ||
| 118 | reg = <0x101>; | ||
| 119 | }; | ||
| 120 | CPU6: cpu@102 { | ||
| 121 | device_type = "cpu"; | ||
| 122 | compatible = "arm,cortex-a15"; | ||
| 123 | reg = <0x102>; | ||
| 124 | }; | ||
| 125 | CPU7: cpu@103 { | ||
| 126 | device_type = "cpu"; | ||
| 127 | compatible = "arm,cortex-a15"; | ||
| 128 | reg = <0x103>; | ||
| 129 | }; | ||
| 130 | CPU8: cpu@200 { | ||
| 131 | device_type = "cpu"; | ||
| 132 | compatible = "arm,cortex-a15"; | ||
| 133 | reg = <0x200>; | ||
| 134 | }; | ||
| 135 | CPU9: cpu@201 { | ||
| 136 | device_type = "cpu"; | ||
| 137 | compatible = "arm,cortex-a15"; | ||
| 138 | reg = <0x201>; | ||
| 139 | }; | ||
| 140 | CPU10: cpu@202 { | ||
| 141 | device_type = "cpu"; | ||
| 142 | compatible = "arm,cortex-a15"; | ||
| 143 | reg = <0x202>; | ||
| 144 | }; | ||
| 145 | CPU11: cpu@203 { | ||
| 146 | device_type = "cpu"; | ||
| 147 | compatible = "arm,cortex-a15"; | ||
| 148 | reg = <0x203>; | ||
| 149 | }; | ||
| 150 | CPU12: cpu@300 { | ||
| 151 | device_type = "cpu"; | ||
| 152 | compatible = "arm,cortex-a15"; | ||
| 153 | reg = <0x300>; | ||
| 154 | }; | ||
| 155 | CPU13: cpu@301 { | ||
| 156 | device_type = "cpu"; | ||
| 157 | compatible = "arm,cortex-a15"; | ||
| 158 | reg = <0x301>; | ||
| 159 | }; | ||
| 160 | CPU14: cpu@302 { | ||
| 161 | device_type = "cpu"; | ||
| 162 | compatible = "arm,cortex-a15"; | ||
| 163 | reg = <0x302>; | ||
| 164 | }; | ||
| 165 | CPU15: cpu@303 { | ||
| 166 | device_type = "cpu"; | ||
| 167 | compatible = "arm,cortex-a15"; | ||
| 168 | reg = <0x303>; | ||
| 169 | }; | ||
| 170 | }; | ||
| 171 | |||
| 172 | timer { | ||
| 173 | compatible = "arm,armv7-timer"; | ||
| 174 | interrupt-parent = <&gic>; | ||
| 175 | interrupts = <1 13 0xf08>, | ||
| 176 | <1 14 0xf08>, | ||
| 177 | <1 11 0xf08>, | ||
| 178 | <1 10 0xf08>; | ||
| 179 | }; | ||
| 180 | |||
| 181 | clk_50m: clk_50m { | ||
| 182 | #clock-cells = <0>; | ||
| 183 | compatible = "fixed-clock"; | ||
| 184 | clock-frequency = <50000000>; | ||
| 185 | }; | ||
| 186 | |||
| 187 | clk_168m: clk_168m { | ||
| 188 | #clock-cells = <0>; | ||
| 189 | compatible = "fixed-clock"; | ||
| 190 | clock-frequency = <168000000>; | ||
| 191 | }; | ||
| 192 | |||
| 193 | soc { | ||
| 194 | /* It's a 32-bit SoC. */ | ||
| 195 | #address-cells = <1>; | ||
| 196 | #size-cells = <1>; | ||
| 197 | compatible = "simple-bus"; | ||
| 198 | interrupt-parent = <&gic>; | ||
| 199 | ranges = <0 0 0xe0000000 0x10000000>; | ||
| 200 | |||
| 201 | gic: interrupt-controller@c01000 { | ||
| 202 | compatible = "hisilicon,hip04-intc"; | ||
| 203 | #interrupt-cells = <3>; | ||
| 204 | #address-cells = <0>; | ||
| 205 | interrupt-controller; | ||
| 206 | interrupts = <1 9 0xf04>; | ||
| 207 | |||
| 208 | reg = <0xc01000 0x1000>, <0xc02000 0x1000>, | ||
| 209 | <0xc04000 0x2000>, <0xc06000 0x2000>; | ||
| 210 | }; | ||
| 211 | |||
| 212 | sysctrl: sysctrl { | ||
| 213 | compatible = "hisilicon,sysctrl"; | ||
| 214 | reg = <0x3e00000 0x00100000>; | ||
| 215 | }; | ||
| 216 | |||
| 217 | fabric: fabric { | ||
| 218 | compatible = "hisilicon,hip04-fabric"; | ||
| 219 | reg = <0x302a000 0x1000>; | ||
| 220 | }; | ||
| 221 | |||
| 222 | dual_timer0: dual_timer@3000000 { | ||
| 223 | compatible = "arm,sp804", "arm,primecell"; | ||
| 224 | reg = <0x3000000 0x1000>; | ||
| 225 | interrupts = <0 224 4>; | ||
| 226 | clocks = <&clk_50m>, <&clk_50m>; | ||
| 227 | clock-names = "apb_pclk"; | ||
| 228 | }; | ||
| 229 | |||
| 230 | arm-pmu { | ||
| 231 | compatible = "arm,cortex-a15-pmu"; | ||
| 232 | interrupts = <0 64 4>, | ||
| 233 | <0 65 4>, | ||
| 234 | <0 66 4>, | ||
| 235 | <0 67 4>, | ||
| 236 | <0 68 4>, | ||
| 237 | <0 69 4>, | ||
| 238 | <0 70 4>, | ||
| 239 | <0 71 4>, | ||
| 240 | <0 72 4>, | ||
| 241 | <0 73 4>, | ||
| 242 | <0 74 4>, | ||
| 243 | <0 75 4>, | ||
| 244 | <0 76 4>, | ||
| 245 | <0 77 4>, | ||
| 246 | <0 78 4>, | ||
| 247 | <0 79 4>; | ||
| 248 | }; | ||
| 249 | |||
| 250 | uart0: uart@4007000 { | ||
| 251 | compatible = "snps,dw-apb-uart"; | ||
| 252 | reg = <0x4007000 0x1000>; | ||
| 253 | interrupts = <0 381 4>; | ||
| 254 | clocks = <&clk_168m>; | ||
| 255 | clock-names = "uartclk"; | ||
| 256 | reg-shift = <2>; | ||
| 257 | status = "disabled"; | ||
| 258 | }; | ||
| 259 | |||
| 260 | sata0: sata@a000000 { | ||
| 261 | compatible = "hisilicon,hisi-ahci"; | ||
| 262 | reg = <0xa000000 0x1000000>; | ||
| 263 | interrupts = <0 372 4>; | ||
| 264 | }; | ||
| 265 | |||
| 266 | }; | ||
| 267 | }; | ||
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 575a49bf968d..3136ed1a04ba 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
| @@ -97,6 +97,7 @@ | |||
| 97 | prm: prm@48306000 { | 97 | prm: prm@48306000 { |
| 98 | compatible = "ti,omap3-prm"; | 98 | compatible = "ti,omap3-prm"; |
| 99 | reg = <0x48306000 0x4000>; | 99 | reg = <0x48306000 0x4000>; |
| 100 | interrupts = <11>; | ||
| 100 | 101 | ||
| 101 | prm_clocks: clocks { | 102 | prm_clocks: clocks { |
| 102 | #address-cells = <1>; | 103 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 69408b53200d..8a944974d72e 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
| @@ -81,6 +81,7 @@ | |||
| 81 | mpu { | 81 | mpu { |
| 82 | compatible = "ti,omap4-mpu"; | 82 | compatible = "ti,omap4-mpu"; |
| 83 | ti,hwmods = "mpu"; | 83 | ti,hwmods = "mpu"; |
| 84 | sram = <&ocmcram>; | ||
| 84 | }; | 85 | }; |
| 85 | 86 | ||
| 86 | dsp { | 87 | dsp { |
| @@ -129,6 +130,7 @@ | |||
| 129 | prm: prm@4a306000 { | 130 | prm: prm@4a306000 { |
| 130 | compatible = "ti,omap4-prm"; | 131 | compatible = "ti,omap4-prm"; |
| 131 | reg = <0x4a306000 0x3000>; | 132 | reg = <0x4a306000 0x3000>; |
| 133 | interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; | ||
| 132 | 134 | ||
| 133 | prm_clocks: clocks { | 135 | prm_clocks: clocks { |
| 134 | #address-cells = <1>; | 136 | #address-cells = <1>; |
| @@ -208,6 +210,11 @@ | |||
| 208 | }; | 210 | }; |
| 209 | }; | 211 | }; |
| 210 | 212 | ||
| 213 | ocmcram: ocmcram@40304000 { | ||
| 214 | compatible = "mmio-sram"; | ||
| 215 | reg = <0x40304000 0xa000>; /* 40k */ | ||
| 216 | }; | ||
| 217 | |||
| 211 | sdma: dma-controller@4a056000 { | 218 | sdma: dma-controller@4a056000 { |
| 212 | compatible = "ti,omap4430-sdma"; | 219 | compatible = "ti,omap4430-sdma"; |
| 213 | reg = <0x4a056000 0x1000>; | 220 | reg = <0x4a056000 0x1000>; |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index fc8df1739f39..4a6091d717b5 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
| @@ -104,8 +104,9 @@ | |||
| 104 | soc { | 104 | soc { |
| 105 | compatible = "ti,omap-infra"; | 105 | compatible = "ti,omap-infra"; |
| 106 | mpu { | 106 | mpu { |
| 107 | compatible = "ti,omap5-mpu"; | 107 | compatible = "ti,omap4-mpu"; |
| 108 | ti,hwmods = "mpu"; | 108 | ti,hwmods = "mpu"; |
| 109 | sram = <&ocmcram>; | ||
| 109 | }; | 110 | }; |
| 110 | }; | 111 | }; |
| 111 | 112 | ||
| @@ -131,6 +132,7 @@ | |||
| 131 | prm: prm@4ae06000 { | 132 | prm: prm@4ae06000 { |
| 132 | compatible = "ti,omap5-prm"; | 133 | compatible = "ti,omap5-prm"; |
| 133 | reg = <0x4ae06000 0x3000>; | 134 | reg = <0x4ae06000 0x3000>; |
| 135 | interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; | ||
| 134 | 136 | ||
| 135 | prm_clocks: clocks { | 137 | prm_clocks: clocks { |
| 136 | #address-cells = <1>; | 138 | #address-cells = <1>; |
| @@ -219,6 +221,11 @@ | |||
| 219 | }; | 221 | }; |
| 220 | }; | 222 | }; |
| 221 | 223 | ||
| 224 | ocmcram: ocmcram@40300000 { | ||
| 225 | compatible = "mmio-sram"; | ||
| 226 | reg = <0x40300000 0x20000>; /* 128k */ | ||
| 227 | }; | ||
| 228 | |||
| 222 | sdma: dma-controller@4a056000 { | 229 | sdma: dma-controller@4a056000 { |
| 223 | compatible = "ti,omap4430-sdma"; | 230 | compatible = "ti,omap4430-sdma"; |
| 224 | reg = <0x4a056000 0x1000>; | 231 | reg = <0x4a056000 0x1000>; |
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts index 20705467f4c9..a3ed23c0a8f5 100644 --- a/arch/arm/boot/dts/r7s72100-genmai.dts +++ b/arch/arm/boot/dts/r7s72100-genmai.dts | |||
| @@ -43,6 +43,10 @@ | |||
| 43 | clock-frequency = <48000000>; | 43 | clock-frequency = <48000000>; |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | &mtu2 { | ||
| 47 | status = "ok"; | ||
| 48 | }; | ||
| 49 | |||
| 46 | &i2c2 { | 50 | &i2c2 { |
| 47 | status = "okay"; | 51 | status = "okay"; |
| 48 | clock-frequency = <400000>; | 52 | clock-frequency = <400000>; |
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi index bdee22541189..801a556e264b 100644 --- a/arch/arm/boot/dts/r7s72100.dtsi +++ b/arch/arm/boot/dts/r7s72100.dtsi | |||
| @@ -229,6 +229,16 @@ | |||
| 229 | status = "disabled"; | 229 | status = "disabled"; |
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | mtu2: timer@fcff0000 { | ||
| 233 | compatible = "renesas,mtu2-r7s72100", "renesas,mtu2"; | ||
| 234 | reg = <0xfcff0000 0x400>; | ||
| 235 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; | ||
| 236 | interrupt-names = "tgi0a"; | ||
| 237 | clocks = <&mstp3_clks R7S72100_CLK_MTU2>; | ||
| 238 | clock-names = "fck"; | ||
| 239 | status = "disabled"; | ||
| 240 | }; | ||
| 241 | |||
| 232 | scif0: serial@e8007000 { | 242 | scif0: serial@e8007000 { |
| 233 | compatible = "renesas,scif-r7s72100", "renesas,scif"; | 243 | compatible = "renesas,scif-r7s72100", "renesas,scif"; |
| 234 | reg = <0xe8007000 64>; | 244 | reg = <0xe8007000 64>; |
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts deleted file mode 100644 index ee9e7d5c97a9..000000000000 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ /dev/null | |||
| @@ -1,283 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Reference Device Tree Source for the armadillo 800 eva board | ||
| 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 | /dts-v1/; | ||
| 12 | #include "r8a7740.dtsi" | ||
| 13 | #include <dt-bindings/gpio/gpio.h> | ||
| 14 | #include <dt-bindings/input/input.h> | ||
| 15 | #include <dt-bindings/interrupt-controller/irq.h> | ||
| 16 | #include <dt-bindings/pwm/pwm.h> | ||
| 17 | |||
| 18 | / { | ||
| 19 | model = "armadillo 800 eva reference"; | ||
| 20 | compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740"; | ||
| 21 | |||
| 22 | aliases { | ||
| 23 | serial1 = &scifa1; | ||
| 24 | }; | ||
| 25 | |||
| 26 | chosen { | ||
| 27 | bootargs = "console=tty0 console=ttySC1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; | ||
| 28 | }; | ||
| 29 | |||
| 30 | memory { | ||
| 31 | device_type = "memory"; | ||
| 32 | reg = <0x40000000 0x20000000>; | ||
| 33 | }; | ||
| 34 | |||
| 35 | reg_3p3v: regulator@0 { | ||
| 36 | compatible = "regulator-fixed"; | ||
| 37 | regulator-name = "fixed-3.3V"; | ||
| 38 | regulator-min-microvolt = <3300000>; | ||
| 39 | regulator-max-microvolt = <3300000>; | ||
| 40 | regulator-always-on; | ||
| 41 | regulator-boot-on; | ||
| 42 | }; | ||
| 43 | |||
| 44 | vcc_sdhi0: regulator@1 { | ||
| 45 | compatible = "regulator-fixed"; | ||
| 46 | |||
| 47 | regulator-name = "SDHI0 Vcc"; | ||
| 48 | regulator-min-microvolt = <3300000>; | ||
| 49 | regulator-max-microvolt = <3300000>; | ||
| 50 | |||
| 51 | gpio = <&pfc 75 GPIO_ACTIVE_HIGH>; | ||
| 52 | enable-active-high; | ||
| 53 | }; | ||
| 54 | |||
| 55 | vccq_sdhi0: regulator@2 { | ||
| 56 | compatible = "regulator-gpio"; | ||
| 57 | |||
| 58 | regulator-name = "SDHI0 VccQ"; | ||
| 59 | regulator-min-microvolt = <1800000>; | ||
| 60 | regulator-max-microvolt = <3300000>; | ||
| 61 | vin-supply = <&vcc_sdhi0>; | ||
| 62 | |||
| 63 | enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>; | ||
| 64 | gpios = <&pfc 17 GPIO_ACTIVE_HIGH>; | ||
| 65 | states = <3300000 0 | ||
| 66 | 1800000 1>; | ||
| 67 | |||
| 68 | enable-active-high; | ||
| 69 | }; | ||
| 70 | |||
| 71 | reg_5p0v: regulator@3 { | ||
| 72 | compatible = "regulator-fixed"; | ||
| 73 | regulator-name = "fixed-5.0V"; | ||
| 74 | regulator-min-microvolt = <5000000>; | ||
| 75 | regulator-max-microvolt = <5000000>; | ||
| 76 | regulator-always-on; | ||
| 77 | regulator-boot-on; | ||
| 78 | }; | ||
| 79 | |||
| 80 | gpio-keys { | ||
| 81 | compatible = "gpio-keys"; | ||
| 82 | |||
| 83 | power-key { | ||
| 84 | gpios = <&pfc 99 GPIO_ACTIVE_LOW>; | ||
| 85 | linux,code = <KEY_POWER>; | ||
| 86 | label = "SW3"; | ||
| 87 | gpio-key,wakeup; | ||
| 88 | }; | ||
| 89 | |||
| 90 | back-key { | ||
| 91 | gpios = <&pfc 100 GPIO_ACTIVE_LOW>; | ||
| 92 | linux,code = <KEY_BACK>; | ||
| 93 | label = "SW4"; | ||
| 94 | }; | ||
| 95 | |||
| 96 | menu-key { | ||
| 97 | gpios = <&pfc 97 GPIO_ACTIVE_LOW>; | ||
| 98 | linux,code = <KEY_MENU>; | ||
| 99 | label = "SW5"; | ||
| 100 | }; | ||
| 101 | |||
| 102 | home-key { | ||
| 103 | gpios = <&pfc 98 GPIO_ACTIVE_LOW>; | ||
| 104 | linux,code = <KEY_HOME>; | ||
| 105 | label = "SW6"; | ||
| 106 | }; | ||
| 107 | }; | ||
| 108 | |||
| 109 | leds { | ||
| 110 | compatible = "gpio-leds"; | ||
| 111 | led3 { | ||
| 112 | gpios = <&pfc 102 GPIO_ACTIVE_HIGH>; | ||
| 113 | label = "LED3"; | ||
| 114 | }; | ||
| 115 | led4 { | ||
| 116 | gpios = <&pfc 111 GPIO_ACTIVE_HIGH>; | ||
| 117 | label = "LED4"; | ||
| 118 | }; | ||
| 119 | led5 { | ||
| 120 | gpios = <&pfc 110 GPIO_ACTIVE_HIGH>; | ||
| 121 | label = "LED5"; | ||
| 122 | }; | ||
| 123 | led6 { | ||
| 124 | gpios = <&pfc 177 GPIO_ACTIVE_HIGH>; | ||
| 125 | label = "LED6"; | ||
| 126 | }; | ||
| 127 | }; | ||
| 128 | |||
| 129 | i2c2: i2c@2 { | ||
| 130 | #address-cells = <1>; | ||
| 131 | #size-cells = <0>; | ||
| 132 | compatible = "i2c-gpio"; | ||
| 133 | gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */ | ||
| 134 | &pfc 91 GPIO_ACTIVE_HIGH /* scl */ | ||
| 135 | >; | ||
| 136 | i2c-gpio,delay-us = <5>; | ||
| 137 | }; | ||
| 138 | |||
| 139 | backlight { | ||
| 140 | compatible = "pwm-backlight"; | ||
| 141 | pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>; | ||
| 142 | brightness-levels = <0 1 2 4 8 16 32 64 128 255>; | ||
| 143 | default-brightness-level = <9>; | ||
| 144 | pinctrl-0 = <&backlight_pins>; | ||
| 145 | pinctrl-names = "default"; | ||
| 146 | power-supply = <®_5p0v>; | ||
| 147 | enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>; | ||
| 148 | }; | ||
| 149 | |||
| 150 | sound { | ||
| 151 | compatible = "simple-audio-card"; | ||
| 152 | |||
| 153 | simple-audio-card,format = "i2s"; | ||
| 154 | |||
| 155 | simple-audio-card,cpu { | ||
| 156 | sound-dai = <&sh_fsi2 0>; | ||
| 157 | bitclock-inversion; | ||
| 158 | }; | ||
| 159 | |||
| 160 | simple-audio-card,codec { | ||
| 161 | sound-dai = <&wm8978>; | ||
| 162 | bitclock-master; | ||
| 163 | frame-master; | ||
| 164 | system-clock-frequency = <12288000>; | ||
| 165 | }; | ||
| 166 | }; | ||
| 167 | }; | ||
| 168 | |||
| 169 | ðer { | ||
| 170 | pinctrl-0 = <ðer_pins>; | ||
| 171 | pinctrl-names = "default"; | ||
| 172 | |||
| 173 | phy-handle = <&phy0>; | ||
| 174 | status = "ok"; | ||
| 175 | |||
| 176 | phy0: ethernet-phy@0 { | ||
| 177 | reg = <0>; | ||
| 178 | }; | ||
| 179 | }; | ||
| 180 | |||
| 181 | &i2c0 { | ||
| 182 | status = "okay"; | ||
| 183 | touchscreen@55 { | ||
| 184 | compatible = "sitronix,st1232"; | ||
| 185 | reg = <0x55>; | ||
| 186 | interrupt-parent = <&irqpin1>; | ||
| 187 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; | ||
| 188 | pinctrl-0 = <&st1232_pins>; | ||
| 189 | pinctrl-names = "default"; | ||
| 190 | gpios = <&pfc 166 GPIO_ACTIVE_LOW>; | ||
| 191 | }; | ||
| 192 | |||
| 193 | wm8978: wm8978@1a { | ||
| 194 | #sound-dai-cells = <0>; | ||
| 195 | compatible = "wlf,wm8978"; | ||
| 196 | reg = <0x1a>; | ||
| 197 | }; | ||
| 198 | }; | ||
| 199 | |||
| 200 | &i2c2 { | ||
| 201 | status = "okay"; | ||
| 202 | rtc@30 { | ||
| 203 | compatible = "sii,s35390a"; | ||
| 204 | reg = <0x30>; | ||
| 205 | }; | ||
| 206 | }; | ||
| 207 | |||
| 208 | &pfc { | ||
| 209 | ether_pins: ether { | ||
| 210 | renesas,groups = "gether_mii", "gether_int"; | ||
| 211 | renesas,function = "gether"; | ||
| 212 | }; | ||
| 213 | |||
| 214 | scifa1_pins: serial1 { | ||
| 215 | renesas,groups = "scifa1_data"; | ||
| 216 | renesas,function = "scifa1"; | ||
| 217 | }; | ||
| 218 | |||
| 219 | st1232_pins: touchscreen { | ||
| 220 | renesas,groups = "intc_irq10"; | ||
| 221 | renesas,function = "intc"; | ||
| 222 | }; | ||
| 223 | |||
| 224 | backlight_pins: backlight { | ||
| 225 | renesas,groups = "tpu0_to2_1"; | ||
| 226 | renesas,function = "tpu0"; | ||
| 227 | }; | ||
| 228 | |||
| 229 | mmc0_pins: mmc0 { | ||
| 230 | renesas,groups = "mmc0_data8_1", "mmc0_ctrl_1"; | ||
| 231 | renesas,function = "mmc0"; | ||
| 232 | }; | ||
| 233 | |||
| 234 | sdhi0_pins: sd0 { | ||
| 235 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp"; | ||
| 236 | renesas,function = "sdhi0"; | ||
| 237 | }; | ||
| 238 | |||
| 239 | fsia_pins: sounda { | ||
| 240 | renesas,groups = "fsia_sclk_in", "fsia_mclk_out", | ||
| 241 | "fsia_data_in_1", "fsia_data_out_0"; | ||
| 242 | renesas,function = "fsia"; | ||
| 243 | }; | ||
| 244 | }; | ||
| 245 | |||
| 246 | &tpu { | ||
| 247 | status = "okay"; | ||
| 248 | }; | ||
| 249 | |||
| 250 | &mmcif0 { | ||
| 251 | pinctrl-0 = <&mmc0_pins>; | ||
| 252 | pinctrl-names = "default"; | ||
| 253 | |||
| 254 | vmmc-supply = <®_3p3v>; | ||
| 255 | bus-width = <8>; | ||
| 256 | non-removable; | ||
| 257 | status = "okay"; | ||
| 258 | }; | ||
| 259 | |||
| 260 | &scifa1 { | ||
| 261 | pinctrl-0 = <&scifa1_pins>; | ||
| 262 | pinctrl-names = "default"; | ||
| 263 | |||
| 264 | status = "okay"; | ||
| 265 | }; | ||
| 266 | |||
| 267 | &sdhi0 { | ||
| 268 | pinctrl-0 = <&sdhi0_pins>; | ||
| 269 | pinctrl-names = "default"; | ||
| 270 | |||
| 271 | vmmc-supply = <&vcc_sdhi0>; | ||
| 272 | vqmmc-supply = <&vccq_sdhi0>; | ||
| 273 | bus-width = <4>; | ||
| 274 | cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>; | ||
| 275 | status = "okay"; | ||
| 276 | }; | ||
| 277 | |||
| 278 | &sh_fsi2 { | ||
| 279 | pinctrl-0 = <&fsia_pins>; | ||
| 280 | pinctrl-names = "default"; | ||
| 281 | |||
| 282 | status = "okay"; | ||
| 283 | }; | ||
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts index a06a11e1a840..effb7b46f131 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts | |||
| @@ -10,10 +10,18 @@ | |||
| 10 | 10 | ||
| 11 | /dts-v1/; | 11 | /dts-v1/; |
| 12 | #include "r8a7740.dtsi" | 12 | #include "r8a7740.dtsi" |
| 13 | #include <dt-bindings/gpio/gpio.h> | ||
| 14 | #include <dt-bindings/input/input.h> | ||
| 15 | #include <dt-bindings/interrupt-controller/irq.h> | ||
| 16 | #include <dt-bindings/pwm/pwm.h> | ||
| 13 | 17 | ||
| 14 | / { | 18 | / { |
| 15 | model = "armadillo 800 eva"; | 19 | model = "armadillo 800 eva"; |
| 16 | compatible = "renesas,armadillo800eva"; | 20 | compatible = "renesas,armadillo800eva", "renesas,r8a7740"; |
| 21 | |||
| 22 | aliases { | ||
| 23 | serial1 = &scifa1; | ||
| 24 | }; | ||
| 17 | 25 | ||
| 18 | chosen { | 26 | chosen { |
| 19 | bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; | 27 | bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; |
| @@ -23,4 +31,270 @@ | |||
| 23 | device_type = "memory"; | 31 | device_type = "memory"; |
| 24 | reg = <0x40000000 0x20000000>; | 32 | reg = <0x40000000 0x20000000>; |
| 25 | }; | 33 | }; |
| 34 | |||
| 35 | reg_3p3v: regulator@0 { | ||
| 36 | compatible = "regulator-fixed"; | ||
| 37 | regulator-name = "fixed-3.3V"; | ||
| 38 | regulator-min-microvolt = <3300000>; | ||
| 39 | regulator-max-microvolt = <3300000>; | ||
| 40 | regulator-always-on; | ||
| 41 | regulator-boot-on; | ||
| 42 | }; | ||
| 43 | |||
| 44 | vcc_sdhi0: regulator@1 { | ||
| 45 | compatible = "regulator-fixed"; | ||
| 46 | |||
| 47 | regulator-name = "SDHI0 Vcc"; | ||
| 48 | regulator-min-microvolt = <3300000>; | ||
| 49 | regulator-max-microvolt = <3300000>; | ||
| 50 | |||
| 51 | gpio = <&pfc 75 GPIO_ACTIVE_HIGH>; | ||
| 52 | enable-active-high; | ||
| 53 | }; | ||
| 54 | |||
| 55 | vccq_sdhi0: regulator@2 { | ||
| 56 | compatible = "regulator-gpio"; | ||
| 57 | |||
| 58 | regulator-name = "SDHI0 VccQ"; | ||
| 59 | regulator-min-microvolt = <1800000>; | ||
| 60 | regulator-max-microvolt = <3300000>; | ||
| 61 | vin-supply = <&vcc_sdhi0>; | ||
| 62 | |||
| 63 | enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>; | ||
| 64 | gpios = <&pfc 17 GPIO_ACTIVE_HIGH>; | ||
| 65 | states = <3300000 0 | ||
| 66 | 1800000 1>; | ||
| 67 | |||
| 68 | enable-active-high; | ||
| 69 | }; | ||
| 70 | |||
| 71 | reg_5p0v: regulator@3 { | ||
| 72 | compatible = "regulator-fixed"; | ||
| 73 | regulator-name = "fixed-5.0V"; | ||
| 74 | regulator-min-microvolt = <5000000>; | ||
| 75 | regulator-max-microvolt = <5000000>; | ||
| 76 | regulator-always-on; | ||
| 77 | regulator-boot-on; | ||
| 78 | }; | ||
| 79 | |||
| 80 | gpio-keys { | ||
| 81 | compatible = "gpio-keys"; | ||
| 82 | |||
| 83 | power-key { | ||
| 84 | gpios = <&pfc 99 GPIO_ACTIVE_LOW>; | ||
| 85 | linux,code = <KEY_POWER>; | ||
| 86 | label = "SW3"; | ||
| 87 | gpio-key,wakeup; | ||
| 88 | }; | ||
| 89 | |||
| 90 | back-key { | ||
| 91 | gpios = <&pfc 100 GPIO_ACTIVE_LOW>; | ||
| 92 | linux,code = <KEY_BACK>; | ||
| 93 | label = "SW4"; | ||
| 94 | }; | ||
| 95 | |||
| 96 | menu-key { | ||
| 97 | gpios = <&pfc 97 GPIO_ACTIVE_LOW>; | ||
| 98 | linux,code = <KEY_MENU>; | ||
| 99 | label = "SW5"; | ||
| 100 | }; | ||
| 101 | |||
| 102 | home-key { | ||
| 103 | gpios = <&pfc 98 GPIO_ACTIVE_LOW>; | ||
| 104 | linux,code = <KEY_HOME>; | ||
| 105 | label = "SW6"; | ||
| 106 | }; | ||
| 107 | }; | ||
| 108 | |||
| 109 | leds { | ||
| 110 | compatible = "gpio-leds"; | ||
| 111 | led3 { | ||
| 112 | gpios = <&pfc 102 GPIO_ACTIVE_HIGH>; | ||
| 113 | label = "LED3"; | ||
| 114 | }; | ||
| 115 | led4 { | ||
| 116 | gpios = <&pfc 111 GPIO_ACTIVE_HIGH>; | ||
| 117 | label = "LED4"; | ||
| 118 | }; | ||
| 119 | led5 { | ||
| 120 | gpios = <&pfc 110 GPIO_ACTIVE_HIGH>; | ||
| 121 | label = "LED5"; | ||
| 122 | }; | ||
| 123 | led6 { | ||
| 124 | gpios = <&pfc 177 GPIO_ACTIVE_HIGH>; | ||
| 125 | label = "LED6"; | ||
| 126 | }; | ||
| 127 | }; | ||
| 128 | |||
| 129 | i2c2: i2c@2 { | ||
| 130 | #address-cells = <1>; | ||
| 131 | #size-cells = <0>; | ||
| 132 | compatible = "i2c-gpio"; | ||
| 133 | gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */ | ||
| 134 | &pfc 91 GPIO_ACTIVE_HIGH /* scl */ | ||
| 135 | >; | ||
| 136 | i2c-gpio,delay-us = <5>; | ||
| 137 | }; | ||
| 138 | |||
| 139 | backlight { | ||
| 140 | compatible = "pwm-backlight"; | ||
| 141 | pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>; | ||
| 142 | brightness-levels = <0 1 2 4 8 16 32 64 128 255>; | ||
| 143 | default-brightness-level = <9>; | ||
| 144 | pinctrl-0 = <&backlight_pins>; | ||
| 145 | pinctrl-names = "default"; | ||
| 146 | power-supply = <®_5p0v>; | ||
| 147 | enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>; | ||
| 148 | }; | ||
| 149 | |||
| 150 | sound { | ||
| 151 | compatible = "simple-audio-card"; | ||
| 152 | |||
| 153 | simple-audio-card,format = "i2s"; | ||
| 154 | |||
| 155 | simple-audio-card,cpu { | ||
| 156 | sound-dai = <&sh_fsi2 0>; | ||
| 157 | bitclock-inversion; | ||
| 158 | }; | ||
| 159 | |||
| 160 | simple-audio-card,codec { | ||
| 161 | sound-dai = <&wm8978>; | ||
| 162 | bitclock-master; | ||
| 163 | frame-master; | ||
| 164 | system-clock-frequency = <12288000>; | ||
| 165 | }; | ||
| 166 | }; | ||
| 167 | }; | ||
| 168 | |||
| 169 | ðer { | ||
| 170 | pinctrl-0 = <ðer_pins>; | ||
| 171 | pinctrl-names = "default"; | ||
| 172 | |||
| 173 | phy-handle = <&phy0>; | ||
| 174 | status = "ok"; | ||
| 175 | |||
| 176 | phy0: ethernet-phy@0 { | ||
| 177 | reg = <0>; | ||
| 178 | }; | ||
| 179 | }; | ||
| 180 | |||
| 181 | &extal1_clk { | ||
| 182 | clock-frequency = <25000000>; | ||
| 183 | }; | ||
| 184 | &extal2_clk { | ||
| 185 | clock-frequency = <48000000>; | ||
| 186 | }; | ||
| 187 | &fsibck_clk { | ||
| 188 | clock-frequency = <12288000>; | ||
| 189 | }; | ||
| 190 | &cpg_clocks { | ||
| 191 | renesas,mode = <0x05>; /* MD_CK0 | MD_CK2 */ | ||
| 192 | }; | ||
| 193 | |||
| 194 | &cmt1 { | ||
| 195 | status = "ok"; | ||
| 196 | }; | ||
| 197 | |||
| 198 | &i2c0 { | ||
| 199 | status = "okay"; | ||
| 200 | touchscreen@55 { | ||
| 201 | compatible = "sitronix,st1232"; | ||
| 202 | reg = <0x55>; | ||
| 203 | interrupt-parent = <&irqpin1>; | ||
| 204 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; | ||
| 205 | pinctrl-0 = <&st1232_pins>; | ||
| 206 | pinctrl-names = "default"; | ||
| 207 | gpios = <&pfc 166 GPIO_ACTIVE_LOW>; | ||
| 208 | }; | ||
| 209 | |||
| 210 | wm8978: wm8978@1a { | ||
| 211 | #sound-dai-cells = <0>; | ||
| 212 | compatible = "wlf,wm8978"; | ||
| 213 | reg = <0x1a>; | ||
| 214 | }; | ||
| 215 | }; | ||
| 216 | |||
| 217 | &i2c2 { | ||
| 218 | status = "okay"; | ||
| 219 | rtc@30 { | ||
| 220 | compatible = "sii,s35390a"; | ||
| 221 | reg = <0x30>; | ||
| 222 | }; | ||
| 223 | }; | ||
| 224 | |||
| 225 | &pfc { | ||
| 226 | ether_pins: ether { | ||
| 227 | renesas,groups = "gether_mii", "gether_int"; | ||
| 228 | renesas,function = "gether"; | ||
| 229 | }; | ||
| 230 | |||
| 231 | scifa1_pins: serial1 { | ||
| 232 | renesas,groups = "scifa1_data"; | ||
| 233 | renesas,function = "scifa1"; | ||
| 234 | }; | ||
| 235 | |||
| 236 | st1232_pins: touchscreen { | ||
| 237 | renesas,groups = "intc_irq10"; | ||
| 238 | renesas,function = "intc"; | ||
| 239 | }; | ||
| 240 | |||
| 241 | backlight_pins: backlight { | ||
| 242 | renesas,groups = "tpu0_to2_1"; | ||
| 243 | renesas,function = "tpu0"; | ||
| 244 | }; | ||
| 245 | |||
| 246 | mmc0_pins: mmc0 { | ||
| 247 | renesas,groups = "mmc0_data8_1", "mmc0_ctrl_1"; | ||
| 248 | renesas,function = "mmc0"; | ||
| 249 | }; | ||
| 250 | |||
| 251 | sdhi0_pins: sd0 { | ||
| 252 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp"; | ||
| 253 | renesas,function = "sdhi0"; | ||
| 254 | }; | ||
| 255 | |||
| 256 | fsia_pins: sounda { | ||
| 257 | renesas,groups = "fsia_sclk_in", "fsia_mclk_out", | ||
| 258 | "fsia_data_in_1", "fsia_data_out_0"; | ||
| 259 | renesas,function = "fsia"; | ||
| 260 | }; | ||
| 261 | }; | ||
| 262 | |||
| 263 | &tpu { | ||
| 264 | status = "okay"; | ||
| 265 | }; | ||
| 266 | |||
| 267 | &mmcif0 { | ||
| 268 | pinctrl-0 = <&mmc0_pins>; | ||
| 269 | pinctrl-names = "default"; | ||
| 270 | |||
| 271 | vmmc-supply = <®_3p3v>; | ||
| 272 | bus-width = <8>; | ||
| 273 | non-removable; | ||
| 274 | status = "okay"; | ||
| 275 | }; | ||
| 276 | |||
| 277 | &scifa1 { | ||
| 278 | pinctrl-0 = <&scifa1_pins>; | ||
| 279 | pinctrl-names = "default"; | ||
| 280 | |||
| 281 | status = "okay"; | ||
| 282 | }; | ||
| 283 | |||
| 284 | &sdhi0 { | ||
| 285 | pinctrl-0 = <&sdhi0_pins>; | ||
| 286 | pinctrl-names = "default"; | ||
| 287 | |||
| 288 | vmmc-supply = <&vcc_sdhi0>; | ||
| 289 | vqmmc-supply = <&vccq_sdhi0>; | ||
| 290 | bus-width = <4>; | ||
| 291 | cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>; | ||
| 292 | status = "okay"; | ||
| 293 | }; | ||
| 294 | |||
| 295 | &sh_fsi2 { | ||
| 296 | pinctrl-0 = <&fsia_pins>; | ||
| 297 | pinctrl-names = "default"; | ||
| 298 | |||
| 299 | status = "okay"; | ||
| 26 | }; | 300 | }; |
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index bda18fb3d9e5..d46c213a17ad 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | /include/ "skeleton.dtsi" | 11 | /include/ "skeleton.dtsi" |
| 12 | 12 | ||
| 13 | #include <dt-bindings/clock/r8a7740-clock.h> | ||
| 13 | #include <dt-bindings/interrupt-controller/irq.h> | 14 | #include <dt-bindings/interrupt-controller/irq.h> |
| 14 | 15 | ||
| 15 | / { | 16 | / { |
| @@ -40,6 +41,18 @@ | |||
| 40 | interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>; | 41 | interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>; |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 44 | cmt1: timer@e6138000 { | ||
| 45 | compatible = "renesas,cmt-48-r8a7740", "renesas,cmt-48"; | ||
| 46 | reg = <0xe6138000 0x170>; | ||
| 47 | interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>; | ||
| 48 | clocks = <&mstp3_clks R8A7740_CLK_CMT1>; | ||
| 49 | clock-names = "fck"; | ||
| 50 | |||
| 51 | renesas,channels-mask = <0x3f>; | ||
| 52 | |||
| 53 | status = "disabled"; | ||
| 54 | }; | ||
| 55 | |||
| 43 | /* irqpin0: IRQ0 - IRQ7 */ | 56 | /* irqpin0: IRQ0 - IRQ7 */ |
| 44 | irqpin0: irqpin@e6900000 { | 57 | irqpin0: irqpin@e6900000 { |
| 45 | compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; | 58 | compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; |
| @@ -125,7 +138,7 @@ | |||
| 125 | reg = <0xe9a00000 0x800>, | 138 | reg = <0xe9a00000 0x800>, |
| 126 | <0xe9a01800 0x800>; | 139 | <0xe9a01800 0x800>; |
| 127 | interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>; | 140 | interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>; |
| 128 | /* clocks = <&mstp3_clks R8A7740_CLK_GETHER>; */ | 141 | clocks = <&mstp3_clks R8A7740_CLK_GETHER>; |
| 129 | phy-mode = "mii"; | 142 | phy-mode = "mii"; |
| 130 | #address-cells = <1>; | 143 | #address-cells = <1>; |
| 131 | #size-cells = <0>; | 144 | #size-cells = <0>; |
| @@ -141,6 +154,7 @@ | |||
| 141 | 0 202 IRQ_TYPE_LEVEL_HIGH | 154 | 0 202 IRQ_TYPE_LEVEL_HIGH |
| 142 | 0 203 IRQ_TYPE_LEVEL_HIGH | 155 | 0 203 IRQ_TYPE_LEVEL_HIGH |
| 143 | 0 204 IRQ_TYPE_LEVEL_HIGH>; | 156 | 0 204 IRQ_TYPE_LEVEL_HIGH>; |
| 157 | clocks = <&mstp1_clks R8A7740_CLK_IIC0>; | ||
| 144 | status = "disabled"; | 158 | status = "disabled"; |
| 145 | }; | 159 | }; |
| 146 | 160 | ||
| @@ -153,6 +167,7 @@ | |||
| 153 | 0 71 IRQ_TYPE_LEVEL_HIGH | 167 | 0 71 IRQ_TYPE_LEVEL_HIGH |
| 154 | 0 72 IRQ_TYPE_LEVEL_HIGH | 168 | 0 72 IRQ_TYPE_LEVEL_HIGH |
| 155 | 0 73 IRQ_TYPE_LEVEL_HIGH>; | 169 | 0 73 IRQ_TYPE_LEVEL_HIGH>; |
| 170 | clocks = <&mstp3_clks R8A7740_CLK_IIC1>; | ||
| 156 | status = "disabled"; | 171 | status = "disabled"; |
| 157 | }; | 172 | }; |
| 158 | 173 | ||
| @@ -160,6 +175,8 @@ | |||
| 160 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 175 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 161 | reg = <0xe6c40000 0x100>; | 176 | reg = <0xe6c40000 0x100>; |
| 162 | interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; | 177 | interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; |
| 178 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA0>; | ||
| 179 | clock-names = "sci_ick"; | ||
| 163 | status = "disabled"; | 180 | status = "disabled"; |
| 164 | }; | 181 | }; |
| 165 | 182 | ||
| @@ -167,6 +184,8 @@ | |||
| 167 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 184 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 168 | reg = <0xe6c50000 0x100>; | 185 | reg = <0xe6c50000 0x100>; |
| 169 | interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>; | 186 | interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>; |
| 187 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA1>; | ||
| 188 | clock-names = "sci_ick"; | ||
| 170 | status = "disabled"; | 189 | status = "disabled"; |
| 171 | }; | 190 | }; |
| 172 | 191 | ||
| @@ -174,6 +193,8 @@ | |||
| 174 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 193 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 175 | reg = <0xe6c60000 0x100>; | 194 | reg = <0xe6c60000 0x100>; |
| 176 | interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; | 195 | interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; |
| 196 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA0>; | ||
| 197 | clock-names = "sci_ick"; | ||
| 177 | status = "disabled"; | 198 | status = "disabled"; |
| 178 | }; | 199 | }; |
| 179 | 200 | ||
| @@ -181,6 +202,8 @@ | |||
| 181 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 202 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 182 | reg = <0xe6c70000 0x100>; | 203 | reg = <0xe6c70000 0x100>; |
| 183 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; | 204 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; |
| 205 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA3>; | ||
| 206 | clock-names = "sci_ick"; | ||
| 184 | status = "disabled"; | 207 | status = "disabled"; |
| 185 | }; | 208 | }; |
| 186 | 209 | ||
| @@ -188,6 +211,8 @@ | |||
| 188 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 211 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 189 | reg = <0xe6c80000 0x100>; | 212 | reg = <0xe6c80000 0x100>; |
| 190 | interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; | 213 | interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; |
| 214 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA4>; | ||
| 215 | clock-names = "sci_ick"; | ||
| 191 | status = "disabled"; | 216 | status = "disabled"; |
| 192 | }; | 217 | }; |
| 193 | 218 | ||
| @@ -195,6 +220,8 @@ | |||
| 195 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 220 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 196 | reg = <0xe6cb0000 0x100>; | 221 | reg = <0xe6cb0000 0x100>; |
| 197 | interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; | 222 | interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; |
| 223 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA5>; | ||
| 224 | clock-names = "sci_ick"; | ||
| 198 | status = "disabled"; | 225 | status = "disabled"; |
| 199 | }; | 226 | }; |
| 200 | 227 | ||
| @@ -202,6 +229,8 @@ | |||
| 202 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 229 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 203 | reg = <0xe6cc0000 0x100>; | 230 | reg = <0xe6cc0000 0x100>; |
| 204 | interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; | 231 | interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; |
| 232 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA6>; | ||
| 233 | clock-names = "sci_ick"; | ||
| 205 | status = "disabled"; | 234 | status = "disabled"; |
| 206 | }; | 235 | }; |
| 207 | 236 | ||
| @@ -209,6 +238,8 @@ | |||
| 209 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; | 238 | compatible = "renesas,scifa-r8a7740", "renesas,scifa"; |
| 210 | reg = <0xe6cd0000 0x100>; | 239 | reg = <0xe6cd0000 0x100>; |
| 211 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; | 240 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; |
| 241 | clocks = <&mstp2_clks R8A7740_CLK_SCIFA7>; | ||
| 242 | clock-names = "sci_ick"; | ||
| 212 | status = "disabled"; | 243 | status = "disabled"; |
| 213 | }; | 244 | }; |
| 214 | 245 | ||
| @@ -216,6 +247,8 @@ | |||
| 216 | compatible = "renesas,scifb-r8a7740", "renesas,scifb"; | 247 | compatible = "renesas,scifb-r8a7740", "renesas,scifb"; |
| 217 | reg = <0xe6c30000 0x100>; | 248 | reg = <0xe6c30000 0x100>; |
| 218 | interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; | 249 | interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; |
| 250 | clocks = <&mstp2_clks R8A7740_CLK_SCIFB>; | ||
| 251 | clock-names = "sci_ick"; | ||
| 219 | status = "disabled"; | 252 | status = "disabled"; |
| 220 | }; | 253 | }; |
| 221 | 254 | ||
| @@ -239,6 +272,7 @@ | |||
| 239 | tpu: pwm@e6600000 { | 272 | tpu: pwm@e6600000 { |
| 240 | compatible = "renesas,tpu-r8a7740", "renesas,tpu"; | 273 | compatible = "renesas,tpu-r8a7740", "renesas,tpu"; |
| 241 | reg = <0xe6600000 0x100>; | 274 | reg = <0xe6600000 0x100>; |
| 275 | clocks = <&mstp3_clks R8A7740_CLK_TPU0>; | ||
| 242 | status = "disabled"; | 276 | status = "disabled"; |
| 243 | #pwm-cells = <3>; | 277 | #pwm-cells = <3>; |
| 244 | }; | 278 | }; |
| @@ -248,6 +282,7 @@ | |||
| 248 | reg = <0xe6bd0000 0x100>; | 282 | reg = <0xe6bd0000 0x100>; |
| 249 | interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH | 283 | interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH |
| 250 | 0 57 IRQ_TYPE_LEVEL_HIGH>; | 284 | 0 57 IRQ_TYPE_LEVEL_HIGH>; |
| 285 | clocks = <&mstp3_clks R8A7740_CLK_MMC>; | ||
| 251 | status = "disabled"; | 286 | status = "disabled"; |
| 252 | }; | 287 | }; |
| 253 | 288 | ||
| @@ -257,6 +292,7 @@ | |||
| 257 | interrupts = <0 117 IRQ_TYPE_LEVEL_HIGH | 292 | interrupts = <0 117 IRQ_TYPE_LEVEL_HIGH |
| 258 | 0 118 IRQ_TYPE_LEVEL_HIGH | 293 | 0 118 IRQ_TYPE_LEVEL_HIGH |
| 259 | 0 119 IRQ_TYPE_LEVEL_HIGH>; | 294 | 0 119 IRQ_TYPE_LEVEL_HIGH>; |
| 295 | clocks = <&mstp3_clks R8A7740_CLK_SDHI0>; | ||
| 260 | cap-sd-highspeed; | 296 | cap-sd-highspeed; |
| 261 | cap-sdio-irq; | 297 | cap-sdio-irq; |
| 262 | status = "disabled"; | 298 | status = "disabled"; |
| @@ -268,6 +304,7 @@ | |||
| 268 | interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH | 304 | interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH |
| 269 | 0 122 IRQ_TYPE_LEVEL_HIGH | 305 | 0 122 IRQ_TYPE_LEVEL_HIGH |
| 270 | 0 123 IRQ_TYPE_LEVEL_HIGH>; | 306 | 0 123 IRQ_TYPE_LEVEL_HIGH>; |
| 307 | clocks = <&mstp3_clks R8A7740_CLK_SDHI1>; | ||
| 271 | cap-sd-highspeed; | 308 | cap-sd-highspeed; |
| 272 | cap-sdio-irq; | 309 | cap-sdio-irq; |
| 273 | status = "disabled"; | 310 | status = "disabled"; |
| @@ -279,6 +316,7 @@ | |||
| 279 | interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH | 316 | interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH |
| 280 | 0 126 IRQ_TYPE_LEVEL_HIGH | 317 | 0 126 IRQ_TYPE_LEVEL_HIGH |
| 281 | 0 127 IRQ_TYPE_LEVEL_HIGH>; | 318 | 0 127 IRQ_TYPE_LEVEL_HIGH>; |
| 319 | clocks = <&mstp4_clks R8A7740_CLK_SDHI2>; | ||
| 282 | cap-sd-highspeed; | 320 | cap-sd-highspeed; |
| 283 | cap-sdio-irq; | 321 | cap-sdio-irq; |
| 284 | status = "disabled"; | 322 | status = "disabled"; |
| @@ -289,6 +327,186 @@ | |||
| 289 | compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2"; | 327 | compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2"; |
| 290 | reg = <0xfe1f0000 0x400>; | 328 | reg = <0xfe1f0000 0x400>; |
| 291 | interrupts = <0 9 0x4>; | 329 | interrupts = <0 9 0x4>; |
| 330 | clocks = <&mstp3_clks R8A7740_CLK_FSI>; | ||
| 292 | status = "disabled"; | 331 | status = "disabled"; |
| 293 | }; | 332 | }; |
| 333 | |||
| 334 | clocks { | ||
| 335 | #address-cells = <1>; | ||
| 336 | #size-cells = <1>; | ||
| 337 | ranges; | ||
| 338 | |||
| 339 | /* External root clock */ | ||
| 340 | extalr_clk: extalr_clk { | ||
| 341 | compatible = "fixed-clock"; | ||
| 342 | #clock-cells = <0>; | ||
| 343 | clock-frequency = <32768>; | ||
| 344 | clock-output-names = "extalr"; | ||
| 345 | }; | ||
| 346 | extal1_clk: extal1_clk { | ||
| 347 | compatible = "fixed-clock"; | ||
| 348 | #clock-cells = <0>; | ||
| 349 | clock-frequency = <0>; | ||
| 350 | clock-output-names = "extal1"; | ||
| 351 | }; | ||
| 352 | extal2_clk: extal2_clk { | ||
| 353 | compatible = "fixed-clock"; | ||
| 354 | #clock-cells = <0>; | ||
| 355 | clock-frequency = <0>; | ||
| 356 | clock-output-names = "extal2"; | ||
| 357 | }; | ||
| 358 | dv_clk: dv_clk { | ||
| 359 | compatible = "fixed-clock"; | ||
| 360 | #clock-cells = <0>; | ||
| 361 | clock-frequency = <27000000>; | ||
| 362 | clock-output-names = "dv"; | ||
| 363 | }; | ||
| 364 | fsiack_clk: fsiack_clk { | ||
| 365 | compatible = "fixed-clock"; | ||
| 366 | #clock-cells = <0>; | ||
| 367 | clock-frequency = <0>; | ||
| 368 | clock-output-names = "fsiack"; | ||
| 369 | }; | ||
| 370 | fsibck_clk: fsibck_clk { | ||
| 371 | compatible = "fixed-clock"; | ||
| 372 | #clock-cells = <0>; | ||
| 373 | clock-frequency = <0>; | ||
| 374 | clock-output-names = "fsibck"; | ||
| 375 | }; | ||
| 376 | |||
| 377 | /* Special CPG clocks */ | ||
| 378 | cpg_clocks: cpg_clocks@e6150000 { | ||
| 379 | compatible = "renesas,r8a7740-cpg-clocks"; | ||
| 380 | reg = <0xe6150000 0x10000>; | ||
| 381 | clocks = <&extal1_clk>, <&extalr_clk>; | ||
| 382 | #clock-cells = <1>; | ||
| 383 | clock-output-names = "system", "pllc0", "pllc1", | ||
| 384 | "pllc2", "r", | ||
| 385 | "usb24s", | ||
| 386 | "i", "zg", "b", "m1", "hp", | ||
| 387 | "hpp", "usbp", "s", "zb", "m3", | ||
| 388 | "cp"; | ||
| 389 | }; | ||
| 390 | |||
| 391 | /* Variable factor clocks (DIV6) */ | ||
| 392 | sub_clk: sub_clk@e6150080 { | ||
| 393 | compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock"; | ||
| 394 | reg = <0xe6150080 4>; | ||
| 395 | clocks = <&pllc1_div2_clk>; | ||
| 396 | #clock-cells = <0>; | ||
| 397 | clock-output-names = "sub"; | ||
| 398 | }; | ||
| 399 | |||
| 400 | /* Fixed factor clocks */ | ||
| 401 | pllc1_div2_clk: pllc1_div2_clk { | ||
| 402 | compatible = "fixed-factor-clock"; | ||
| 403 | clocks = <&cpg_clocks R8A7740_CLK_PLLC1>; | ||
| 404 | #clock-cells = <0>; | ||
| 405 | clock-div = <2>; | ||
| 406 | clock-mult = <1>; | ||
| 407 | clock-output-names = "pllc1_div2"; | ||
| 408 | }; | ||
| 409 | extal1_div2_clk: extal1_div2_clk { | ||
| 410 | compatible = "fixed-factor-clock"; | ||
| 411 | clocks = <&extal1_clk>; | ||
| 412 | #clock-cells = <0>; | ||
| 413 | clock-div = <2>; | ||
| 414 | clock-mult = <1>; | ||
| 415 | clock-output-names = "extal1_div2"; | ||
| 416 | }; | ||
| 417 | |||
| 418 | /* Gate clocks */ | ||
| 419 | subck_clks: subck_clks@e6150080 { | ||
| 420 | compatible = "renesas,r8a7740-mstp-clocks", "renesas,cpg-mstp-clocks"; | ||
| 421 | reg = <0xe6150080 4>; | ||
| 422 | clocks = <&sub_clk>, <&sub_clk>; | ||
| 423 | #clock-cells = <1>; | ||
| 424 | renesas,clock-indices = < | ||
| 425 | R8A7740_CLK_SUBCK R8A7740_CLK_SUBCK2 | ||
| 426 | >; | ||
| 427 | clock-output-names = | ||
| 428 | "subck", "subck2"; | ||
| 429 | }; | ||
| 430 | mstp1_clks: mstp1_clks@e6150134 { | ||
| 431 | compatible = "renesas,r8a7740-mstp-clocks", "renesas,cpg-mstp-clocks"; | ||
| 432 | reg = <0xe6150134 4>, <0xe6150038 4>; | ||
| 433 | clocks = <&cpg_clocks R8A7740_CLK_S>, | ||
| 434 | <&cpg_clocks R8A7740_CLK_S>, <&sub_clk>, | ||
| 435 | <&cpg_clocks R8A7740_CLK_B>, | ||
| 436 | <&sub_clk>, <&sub_clk>, | ||
| 437 | <&cpg_clocks R8A7740_CLK_B>; | ||
| 438 | #clock-cells = <1>; | ||
| 439 | renesas,clock-indices = < | ||
| 440 | R8A7740_CLK_CEU21 R8A7740_CLK_CEU20 R8A7740_CLK_TMU0 | ||
| 441 | R8A7740_CLK_LCDC1 R8A7740_CLK_IIC0 R8A7740_CLK_TMU1 | ||
| 442 | R8A7740_CLK_LCDC0 | ||
| 443 | >; | ||
| 444 | clock-output-names = | ||
| 445 | "ceu21", "ceu20", "tmu0", "lcdc1", "iic0", | ||
| 446 | "tmu1", "lcdc0"; | ||
| 447 | }; | ||
| 448 | mstp2_clks: mstp2_clks@e6150138 { | ||
| 449 | compatible = "renesas,r8a7740-mstp-clocks", "renesas,cpg-mstp-clocks"; | ||
| 450 | reg = <0xe6150138 4>, <0xe6150040 4>; | ||
| 451 | clocks = <&sub_clk>, <&sub_clk>, | ||
| 452 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 453 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 454 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 455 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 456 | <&sub_clk>, <&sub_clk>, <&sub_clk>, | ||
| 457 | <&sub_clk>, <&sub_clk>, <&sub_clk>, | ||
| 458 | <&sub_clk>; | ||
| 459 | #clock-cells = <1>; | ||
| 460 | renesas,clock-indices = < | ||
| 461 | R8A7740_CLK_SCIFA6 R8A7740_CLK_SCIFA7 | ||
| 462 | R8A7740_CLK_DMAC1 R8A7740_CLK_DMAC2 | ||
| 463 | R8A7740_CLK_DMAC3 R8A7740_CLK_USBDMAC | ||
| 464 | R8A7740_CLK_SCIFA5 R8A7740_CLK_SCIFB | ||
| 465 | R8A7740_CLK_SCIFA0 R8A7740_CLK_SCIFA1 | ||
| 466 | R8A7740_CLK_SCIFA2 R8A7740_CLK_SCIFA3 | ||
| 467 | R8A7740_CLK_SCIFA4 | ||
| 468 | >; | ||
| 469 | clock-output-names = | ||
| 470 | "scifa6", "scifa7", "dmac1", "dmac2", "dmac3", | ||
| 471 | "usbdmac", "scifa5", "scifb", "scifa0", "scifa1", | ||
| 472 | "scifa2", "scifa3", "scifa4"; | ||
| 473 | }; | ||
| 474 | mstp3_clks: mstp3_clks@e615013c { | ||
| 475 | compatible = "renesas,r8a7740-mstp-clocks", "renesas,cpg-mstp-clocks"; | ||
| 476 | reg = <0xe615013c 4>, <0xe6150048 4>; | ||
| 477 | clocks = <&cpg_clocks R8A7740_CLK_R>, | ||
| 478 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 479 | <&sub_clk>, | ||
| 480 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 481 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 482 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 483 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 484 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 485 | <&cpg_clocks R8A7740_CLK_HP>; | ||
| 486 | #clock-cells = <1>; | ||
| 487 | renesas,clock-indices = < | ||
| 488 | R8A7740_CLK_CMT1 R8A7740_CLK_FSI R8A7740_CLK_IIC1 | ||
| 489 | R8A7740_CLK_USBF R8A7740_CLK_SDHI0 R8A7740_CLK_SDHI1 | ||
| 490 | R8A7740_CLK_MMC R8A7740_CLK_GETHER R8A7740_CLK_TPU0 | ||
| 491 | >; | ||
| 492 | clock-output-names = | ||
| 493 | "cmt1", "fsi", "iic1", "usbf", "sdhi0", "sdhi1", | ||
| 494 | "mmc", "gether", "tpu0"; | ||
| 495 | }; | ||
| 496 | mstp4_clks: mstp4_clks@e6150140 { | ||
| 497 | compatible = "renesas,r8a7740-mstp-clocks", "renesas,cpg-mstp-clocks"; | ||
| 498 | reg = <0xe6150140 4>, <0xe615004c 4>; | ||
| 499 | clocks = <&cpg_clocks R8A7740_CLK_HP>, | ||
| 500 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 501 | <&cpg_clocks R8A7740_CLK_HP>, | ||
| 502 | <&cpg_clocks R8A7740_CLK_HP>; | ||
| 503 | #clock-cells = <1>; | ||
| 504 | renesas,clock-indices = < | ||
| 505 | R8A7740_CLK_USBH R8A7740_CLK_SDHI2 | ||
| 506 | R8A7740_CLK_USBFUNC R8A7740_CLK_USBPHY | ||
| 507 | >; | ||
| 508 | clock-output-names = | ||
| 509 | "usbhost", "sdhi2", "usbfunc", "usphy"; | ||
| 510 | }; | ||
| 511 | }; | ||
| 294 | }; | 512 | }; |
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi index ecfdf4b01b5a..315ec62cb96b 100644 --- a/arch/arm/boot/dts/r8a7778.dtsi +++ b/arch/arm/boot/dts/r8a7778.dtsi | |||
| @@ -23,8 +23,14 @@ | |||
| 23 | interrupt-parent = <&gic>; | 23 | interrupt-parent = <&gic>; |
| 24 | 24 | ||
| 25 | cpus { | 25 | cpus { |
| 26 | #address-cells = <1>; | ||
| 27 | #size-cells = <0>; | ||
| 28 | |||
| 26 | cpu@0 { | 29 | cpu@0 { |
| 30 | device_type = "cpu"; | ||
| 27 | compatible = "arm,cortex-a9"; | 31 | compatible = "arm,cortex-a9"; |
| 32 | reg = <0>; | ||
| 33 | clock-frequency = <800000000>; | ||
| 28 | }; | 34 | }; |
| 29 | }; | 35 | }; |
| 30 | 36 | ||
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts index 5745555df943..c160404e4d40 100644 --- a/arch/arm/boot/dts/r8a7779-marzen.dts +++ b/arch/arm/boot/dts/r8a7779-marzen.dts | |||
| @@ -78,6 +78,10 @@ | |||
| 78 | clock-frequency = <31250000>; | 78 | clock-frequency = <31250000>; |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | &tmu0 { | ||
| 82 | status = "okay"; | ||
| 83 | }; | ||
| 84 | |||
| 81 | &pfc { | 85 | &pfc { |
| 82 | lan0_pins: lan0 { | 86 | lan0_pins: lan0 { |
| 83 | intc { | 87 | intc { |
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index 58d0d952d60e..72891e5f0f1b 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi | |||
| @@ -266,6 +266,48 @@ | |||
| 266 | reg = <0xffc48000 0x38>; | 266 | reg = <0xffc48000 0x38>; |
| 267 | }; | 267 | }; |
| 268 | 268 | ||
| 269 | tmu0: timer@ffd80000 { | ||
| 270 | compatible = "renesas,tmu-r8a7779", "renesas,tmu"; | ||
| 271 | reg = <0xffd80000 0x30>; | ||
| 272 | interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, | ||
| 273 | <0 33 IRQ_TYPE_LEVEL_HIGH>, | ||
| 274 | <0 34 IRQ_TYPE_LEVEL_HIGH>; | ||
| 275 | clocks = <&mstp0_clks R8A7779_CLK_TMU0>; | ||
| 276 | clock-names = "fck"; | ||
| 277 | |||
| 278 | #renesas,channels = <3>; | ||
| 279 | |||
| 280 | status = "disabled"; | ||
| 281 | }; | ||
| 282 | |||
| 283 | tmu1: timer@ffd81000 { | ||
| 284 | compatible = "renesas,tmu-r8a7779", "renesas,tmu"; | ||
| 285 | reg = <0xffd81000 0x30>; | ||
| 286 | interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>, | ||
| 287 | <0 37 IRQ_TYPE_LEVEL_HIGH>, | ||
| 288 | <0 38 IRQ_TYPE_LEVEL_HIGH>; | ||
| 289 | clocks = <&mstp0_clks R8A7779_CLK_TMU1>; | ||
| 290 | clock-names = "fck"; | ||
| 291 | |||
| 292 | #renesas,channels = <3>; | ||
| 293 | |||
| 294 | status = "disabled"; | ||
| 295 | }; | ||
| 296 | |||
| 297 | tmu2: timer@ffd82000 { | ||
| 298 | compatible = "renesas,tmu-r8a7779", "renesas,tmu"; | ||
| 299 | reg = <0xffd82000 0x30>; | ||
| 300 | interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>, | ||
| 301 | <0 41 IRQ_TYPE_LEVEL_HIGH>, | ||
| 302 | <0 42 IRQ_TYPE_LEVEL_HIGH>; | ||
| 303 | clocks = <&mstp0_clks R8A7779_CLK_TMU2>; | ||
| 304 | clock-names = "fck"; | ||
| 305 | |||
| 306 | #renesas,channels = <3>; | ||
| 307 | |||
| 308 | status = "disabled"; | ||
| 309 | }; | ||
| 310 | |||
| 269 | sata: sata@fc600000 { | 311 | sata: sata@fc600000 { |
| 270 | compatible = "renesas,rcar-sata"; | 312 | compatible = "renesas,rcar-sata"; |
| 271 | reg = <0xfc600000 0x2000>; | 313 | reg = <0xfc600000 0x2000>; |
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 856b4236b674..7853c2c15ce6 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts | |||
| @@ -252,6 +252,10 @@ | |||
| 252 | }; | 252 | }; |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | &cmt0 { | ||
| 256 | status = "ok"; | ||
| 257 | }; | ||
| 258 | |||
| 255 | &mmcif1 { | 259 | &mmcif1 { |
| 256 | pinctrl-0 = <&mmc1_pins>; | 260 | pinctrl-0 = <&mmc1_pins>; |
| 257 | pinctrl-names = "default"; | 261 | pinctrl-names = "default"; |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index d9ddecbb859c..aa146d2d1022 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
| @@ -206,6 +206,38 @@ | |||
| 206 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; | 206 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
| 209 | cmt0: timer@ffca0000 { | ||
| 210 | compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2"; | ||
| 211 | reg = <0 0xffca0000 0 0x1004>; | ||
| 212 | interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, | ||
| 213 | <0 143 IRQ_TYPE_LEVEL_HIGH>; | ||
| 214 | clocks = <&mstp1_clks R8A7790_CLK_CMT0>; | ||
| 215 | clock-names = "fck"; | ||
| 216 | |||
| 217 | renesas,channels-mask = <0x60>; | ||
| 218 | |||
| 219 | status = "disabled"; | ||
| 220 | }; | ||
| 221 | |||
| 222 | cmt1: timer@e6130000 { | ||
| 223 | compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2"; | ||
| 224 | reg = <0 0xe6130000 0 0x1004>; | ||
| 225 | interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, | ||
| 226 | <0 121 IRQ_TYPE_LEVEL_HIGH>, | ||
| 227 | <0 122 IRQ_TYPE_LEVEL_HIGH>, | ||
| 228 | <0 123 IRQ_TYPE_LEVEL_HIGH>, | ||
| 229 | <0 124 IRQ_TYPE_LEVEL_HIGH>, | ||
| 230 | <0 125 IRQ_TYPE_LEVEL_HIGH>, | ||
| 231 | <0 126 IRQ_TYPE_LEVEL_HIGH>, | ||
| 232 | <0 127 IRQ_TYPE_LEVEL_HIGH>; | ||
| 233 | clocks = <&mstp3_clks R8A7790_CLK_CMT1>; | ||
| 234 | clock-names = "fck"; | ||
| 235 | |||
| 236 | renesas,channels-mask = <0xff>; | ||
| 237 | |||
| 238 | status = "disabled"; | ||
| 239 | }; | ||
| 240 | |||
| 209 | irqc0: interrupt-controller@e61c0000 { | 241 | irqc0: interrupt-controller@e61c0000 { |
| 210 | compatible = "renesas,irqc-r8a7790", "renesas,irqc"; | 242 | compatible = "renesas,irqc-r8a7790", "renesas,irqc"; |
| 211 | #interrupt-cells = <2>; | 243 | #interrupt-cells = <2>; |
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index be59014474b2..740308e09457 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts | |||
| @@ -302,6 +302,10 @@ | |||
| 302 | }; | 302 | }; |
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | &cmt0 { | ||
| 306 | status = "ok"; | ||
| 307 | }; | ||
| 308 | |||
| 305 | &sata0 { | 309 | &sata0 { |
| 306 | status = "okay"; | 310 | status = "okay"; |
| 307 | }; | 311 | }; |
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 0d82a4b3c650..e270f38d827f 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi | |||
| @@ -189,6 +189,38 @@ | |||
| 189 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; | 189 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
| 190 | }; | 190 | }; |
| 191 | 191 | ||
| 192 | cmt0: timer@ffca0000 { | ||
| 193 | compatible = "renesas,cmt-48-r8a7791", "renesas,cmt-48-gen2"; | ||
| 194 | reg = <0 0xffca0000 0 0x1004>; | ||
| 195 | interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, | ||
| 196 | <0 143 IRQ_TYPE_LEVEL_HIGH>; | ||
| 197 | clocks = <&mstp1_clks R8A7791_CLK_CMT0>; | ||
| 198 | clock-names = "fck"; | ||
| 199 | |||
| 200 | renesas,channels-mask = <0x60>; | ||
| 201 | |||
| 202 | status = "disabled"; | ||
| 203 | }; | ||
| 204 | |||
| 205 | cmt1: timer@e6130000 { | ||
| 206 | compatible = "renesas,cmt-48-r8a7791", "renesas,cmt-48-gen2"; | ||
| 207 | reg = <0 0xe6130000 0 0x1004>; | ||
| 208 | interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, | ||
| 209 | <0 121 IRQ_TYPE_LEVEL_HIGH>, | ||
| 210 | <0 122 IRQ_TYPE_LEVEL_HIGH>, | ||
| 211 | <0 123 IRQ_TYPE_LEVEL_HIGH>, | ||
| 212 | <0 124 IRQ_TYPE_LEVEL_HIGH>, | ||
| 213 | <0 125 IRQ_TYPE_LEVEL_HIGH>, | ||
| 214 | <0 126 IRQ_TYPE_LEVEL_HIGH>, | ||
| 215 | <0 127 IRQ_TYPE_LEVEL_HIGH>; | ||
| 216 | clocks = <&mstp3_clks R8A7791_CLK_CMT1>; | ||
| 217 | clock-names = "fck"; | ||
| 218 | |||
| 219 | renesas,channels-mask = <0xff>; | ||
| 220 | |||
| 221 | status = "disabled"; | ||
| 222 | }; | ||
| 223 | |||
| 192 | irqc0: interrupt-controller@e61c0000 { | 224 | irqc0: interrupt-controller@e61c0000 { |
| 193 | compatible = "renesas,irqc-r8a7791", "renesas,irqc"; | 225 | compatible = "renesas,irqc-r8a7791", "renesas,irqc"; |
| 194 | #interrupt-cells = <2>; | 226 | #interrupt-cells = <2>; |
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi new file mode 100644 index 000000000000..e0157b0f075c --- /dev/null +++ b/arch/arm/boot/dts/sama5d4.dtsi | |||
| @@ -0,0 +1,1240 @@ | |||
| 1 | /* | ||
| 2 | * sama5d4.dtsi - Device Tree Include file for SAMA5D4 family SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Atmel, | ||
| 5 | * 2014 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
| 6 | * | ||
| 7 | * This file is dual-licensed: you can use it either under the terms | ||
| 8 | * of the GPL or the X11 license, at your option. Note that this dual | ||
| 9 | * licensing only applies to this file, and not this project as a | ||
| 10 | * whole. | ||
| 11 | * | ||
| 12 | * a) This library is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License as | ||
| 14 | * published by the Free Software Foundation; either version 2 of the | ||
| 15 | * License, or (at your option) any later version. | ||
| 16 | * | ||
| 17 | * This library is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * Or, alternatively, | ||
| 23 | * | ||
| 24 | * b) Permission is hereby granted, free of charge, to any person | ||
| 25 | * obtaining a copy of this software and associated documentation | ||
| 26 | * files (the "Software"), to deal in the Software without | ||
| 27 | * restriction, including without limitation the rights to use, | ||
| 28 | * copy, modify, merge, publish, distribute, sublicense, and/or | ||
| 29 | * sell copies of the Software, and to permit persons to whom the | ||
| 30 | * Software is furnished to do so, subject to the following | ||
| 31 | * conditions: | ||
| 32 | * | ||
| 33 | * The above copyright notice and this permission notice shall be | ||
| 34 | * included in all copies or substantial portions of the Software. | ||
| 35 | * | ||
| 36 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 37 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
| 38 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 39 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
| 40 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| 41 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| 42 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 43 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 44 | */ | ||
| 45 | |||
| 46 | #include "skeleton.dtsi" | ||
| 47 | #include <dt-bindings/clock/at91.h> | ||
| 48 | #include <dt-bindings/pinctrl/at91.h> | ||
| 49 | #include <dt-bindings/interrupt-controller/irq.h> | ||
| 50 | #include <dt-bindings/gpio/gpio.h> | ||
| 51 | |||
| 52 | / { | ||
| 53 | model = "Atmel SAMA5D4 family SoC"; | ||
| 54 | compatible = "atmel,sama5d4"; | ||
| 55 | interrupt-parent = <&aic>; | ||
| 56 | |||
| 57 | aliases { | ||
| 58 | serial0 = &usart3; | ||
| 59 | serial1 = &usart4; | ||
| 60 | serial2 = &usart2; | ||
| 61 | gpio0 = &pioA; | ||
| 62 | gpio1 = &pioB; | ||
| 63 | gpio2 = &pioC; | ||
| 64 | gpio4 = &pioE; | ||
| 65 | tcb0 = &tcb0; | ||
| 66 | tcb1 = &tcb1; | ||
| 67 | i2c2 = &i2c2; | ||
| 68 | }; | ||
| 69 | cpus { | ||
| 70 | #address-cells = <1>; | ||
| 71 | #size-cells = <0>; | ||
| 72 | |||
| 73 | cpu@0 { | ||
| 74 | device_type = "cpu"; | ||
| 75 | compatible = "arm,cortex-a5"; | ||
| 76 | reg = <0>; | ||
| 77 | next-level-cache = <&L2>; | ||
| 78 | }; | ||
| 79 | }; | ||
| 80 | |||
| 81 | memory { | ||
| 82 | reg = <0x20000000 0x20000000>; | ||
| 83 | }; | ||
| 84 | |||
| 85 | clocks { | ||
| 86 | slow_xtal: slow_xtal { | ||
| 87 | compatible = "fixed-clock"; | ||
| 88 | #clock-cells = <0>; | ||
| 89 | clock-frequency = <0>; | ||
| 90 | }; | ||
| 91 | |||
| 92 | main_xtal: main_xtal { | ||
| 93 | compatible = "fixed-clock"; | ||
| 94 | #clock-cells = <0>; | ||
| 95 | clock-frequency = <0>; | ||
| 96 | }; | ||
| 97 | |||
| 98 | adc_op_clk: adc_op_clk{ | ||
| 99 | compatible = "fixed-clock"; | ||
| 100 | #clock-cells = <0>; | ||
| 101 | clock-frequency = <1000000>; | ||
| 102 | }; | ||
| 103 | }; | ||
| 104 | |||
| 105 | ahb { | ||
| 106 | compatible = "simple-bus"; | ||
| 107 | #address-cells = <1>; | ||
| 108 | #size-cells = <1>; | ||
| 109 | ranges; | ||
| 110 | |||
| 111 | usb0: gadget@00400000 { | ||
| 112 | #address-cells = <1>; | ||
| 113 | #size-cells = <0>; | ||
| 114 | compatible = "atmel,at91sam9rl-udc"; | ||
| 115 | reg = <0x00400000 0x100000 | ||
| 116 | 0xfc02c000 0x4000>; | ||
| 117 | interrupts = <47 IRQ_TYPE_LEVEL_HIGH 2>; | ||
| 118 | clocks = <&udphs_clk>, <&utmi>; | ||
| 119 | clock-names = "pclk", "hclk"; | ||
| 120 | status = "disabled"; | ||
| 121 | |||
| 122 | ep0 { | ||
| 123 | reg = <0>; | ||
| 124 | atmel,fifo-size = <64>; | ||
| 125 | atmel,nb-banks = <1>; | ||
| 126 | }; | ||
| 127 | |||
| 128 | ep1 { | ||
| 129 | reg = <1>; | ||
| 130 | atmel,fifo-size = <1024>; | ||
| 131 | atmel,nb-banks = <3>; | ||
| 132 | atmel,can-dma; | ||
| 133 | atmel,can-isoc; | ||
| 134 | }; | ||
| 135 | |||
| 136 | ep2 { | ||
| 137 | reg = <2>; | ||
| 138 | atmel,fifo-size = <1024>; | ||
| 139 | atmel,nb-banks = <3>; | ||
| 140 | atmel,can-dma; | ||
| 141 | atmel,can-isoc; | ||
| 142 | }; | ||
| 143 | |||
| 144 | ep3 { | ||
| 145 | reg = <3>; | ||
| 146 | atmel,fifo-size = <1024>; | ||
| 147 | atmel,nb-banks = <2>; | ||
| 148 | atmel,can-dma; | ||
| 149 | atmel,can-isoc; | ||
| 150 | }; | ||
| 151 | |||
| 152 | ep4 { | ||
| 153 | reg = <4>; | ||
| 154 | atmel,fifo-size = <1024>; | ||
| 155 | atmel,nb-banks = <2>; | ||
| 156 | atmel,can-dma; | ||
| 157 | atmel,can-isoc; | ||
| 158 | }; | ||
| 159 | |||
| 160 | ep5 { | ||
| 161 | reg = <5>; | ||
| 162 | atmel,fifo-size = <1024>; | ||
| 163 | atmel,nb-banks = <2>; | ||
| 164 | atmel,can-dma; | ||
| 165 | atmel,can-isoc; | ||
| 166 | }; | ||
| 167 | |||
| 168 | ep6 { | ||
| 169 | reg = <6>; | ||
| 170 | atmel,fifo-size = <1024>; | ||
| 171 | atmel,nb-banks = <2>; | ||
| 172 | atmel,can-dma; | ||
| 173 | atmel,can-isoc; | ||
| 174 | }; | ||
| 175 | |||
| 176 | ep7 { | ||
| 177 | reg = <7>; | ||
| 178 | atmel,fifo-size = <1024>; | ||
| 179 | atmel,nb-banks = <2>; | ||
| 180 | atmel,can-dma; | ||
| 181 | atmel,can-isoc; | ||
| 182 | }; | ||
| 183 | |||
| 184 | ep8 { | ||
| 185 | reg = <8>; | ||
| 186 | atmel,fifo-size = <1024>; | ||
| 187 | atmel,nb-banks = <2>; | ||
| 188 | atmel,can-isoc; | ||
| 189 | }; | ||
| 190 | |||
| 191 | ep9 { | ||
| 192 | reg = <9>; | ||
| 193 | atmel,fifo-size = <1024>; | ||
| 194 | atmel,nb-banks = <2>; | ||
| 195 | atmel,can-isoc; | ||
| 196 | }; | ||
| 197 | |||
| 198 | ep10 { | ||
| 199 | reg = <10>; | ||
| 200 | atmel,fifo-size = <1024>; | ||
| 201 | atmel,nb-banks = <2>; | ||
| 202 | atmel,can-isoc; | ||
| 203 | }; | ||
| 204 | |||
| 205 | ep11 { | ||
| 206 | reg = <11>; | ||
| 207 | atmel,fifo-size = <1024>; | ||
| 208 | atmel,nb-banks = <2>; | ||
| 209 | atmel,can-isoc; | ||
| 210 | }; | ||
| 211 | |||
| 212 | ep12 { | ||
| 213 | reg = <12>; | ||
| 214 | atmel,fifo-size = <1024>; | ||
| 215 | atmel,nb-banks = <2>; | ||
| 216 | atmel,can-isoc; | ||
| 217 | }; | ||
| 218 | |||
| 219 | ep13 { | ||
| 220 | reg = <13>; | ||
| 221 | atmel,fifo-size = <1024>; | ||
| 222 | atmel,nb-banks = <2>; | ||
| 223 | atmel,can-isoc; | ||
| 224 | }; | ||
| 225 | |||
| 226 | ep14 { | ||
| 227 | reg = <14>; | ||
| 228 | atmel,fifo-size = <1024>; | ||
| 229 | atmel,nb-banks = <2>; | ||
| 230 | atmel,can-isoc; | ||
| 231 | }; | ||
| 232 | |||
| 233 | ep15 { | ||
| 234 | reg = <15>; | ||
| 235 | atmel,fifo-size = <1024>; | ||
| 236 | atmel,nb-banks = <2>; | ||
| 237 | atmel,can-isoc; | ||
| 238 | }; | ||
| 239 | }; | ||
| 240 | |||
| 241 | usb1: ohci@00500000 { | ||
| 242 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
| 243 | reg = <0x00500000 0x100000>; | ||
| 244 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>; | ||
| 245 | clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, | ||
| 246 | <&uhpck>; | ||
| 247 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; | ||
| 248 | status = "disabled"; | ||
| 249 | }; | ||
| 250 | |||
| 251 | usb2: ehci@00600000 { | ||
| 252 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | ||
| 253 | reg = <0x00600000 0x100000>; | ||
| 254 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>; | ||
| 255 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | ||
| 256 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | ||
| 257 | status = "disabled"; | ||
| 258 | }; | ||
| 259 | |||
| 260 | L2: cache-controller@00a00000 { | ||
| 261 | compatible = "arm,pl310-cache"; | ||
| 262 | reg = <0x00a00000 0x1000>; | ||
| 263 | interrupts = <67 IRQ_TYPE_LEVEL_HIGH 4>; | ||
| 264 | cache-unified; | ||
| 265 | cache-level = <2>; | ||
| 266 | }; | ||
| 267 | |||
| 268 | nand0: nand@80000000 { | ||
| 269 | compatible = "atmel,at91rm9200-nand"; | ||
| 270 | #address-cells = <1>; | ||
| 271 | #size-cells = <1>; | ||
| 272 | ranges; | ||
| 273 | reg = < 0x80000000 0x08000000 /* EBI CS3 */ | ||
| 274 | 0xfc05c070 0x00000490 /* SMC PMECC regs */ | ||
| 275 | 0xfc05c500 0x00000100 /* SMC PMECC Error Location regs */ | ||
| 276 | >; | ||
| 277 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 6>; | ||
| 278 | atmel,nand-addr-offset = <21>; | ||
| 279 | atmel,nand-cmd-offset = <22>; | ||
| 280 | atmel,nand-has-dma; | ||
| 281 | pinctrl-names = "default"; | ||
| 282 | pinctrl-0 = <&pinctrl_nand>; | ||
| 283 | status = "disabled"; | ||
| 284 | |||
| 285 | nfc@90000000 { | ||
| 286 | compatible = "atmel,sama5d3-nfc"; | ||
| 287 | #address-cells = <1>; | ||
| 288 | #size-cells = <1>; | ||
| 289 | reg = < | ||
| 290 | 0x90000000 0x10000000 /* NFC Command Registers */ | ||
| 291 | 0xfc05c000 0x00000070 /* NFC HSMC regs */ | ||
| 292 | 0x00100000 0x00100000 /* NFC SRAM banks */ | ||
| 293 | >; | ||
| 294 | clocks = <&hsmc_clk>; | ||
| 295 | atmel,write-by-sram; | ||
| 296 | }; | ||
| 297 | }; | ||
| 298 | |||
| 299 | apb { | ||
| 300 | compatible = "simple-bus"; | ||
| 301 | #address-cells = <1>; | ||
| 302 | #size-cells = <1>; | ||
| 303 | ranges; | ||
| 304 | |||
| 305 | ramc0: ramc@f0010000 { | ||
| 306 | compatible = "atmel,sama5d3-ddramc"; | ||
| 307 | reg = <0xf0010000 0x200>; | ||
| 308 | clocks = <&ddrck>, <&mpddr_clk>; | ||
| 309 | clock-names = "ddrck", "mpddr"; | ||
| 310 | }; | ||
| 311 | |||
| 312 | pmc: pmc@f0018000 { | ||
| 313 | compatible = "atmel,sama5d3-pmc"; | ||
| 314 | reg = <0xf0018000 0x120>; | ||
| 315 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; | ||
| 316 | interrupt-controller; | ||
| 317 | #address-cells = <1>; | ||
| 318 | #size-cells = <0>; | ||
| 319 | #interrupt-cells = <1>; | ||
| 320 | |||
| 321 | main_rc_osc: main_rc_osc { | ||
| 322 | compatible = "atmel,at91sam9x5-clk-main-rc-osc"; | ||
| 323 | #clock-cells = <0>; | ||
| 324 | interrupt-parent = <&pmc>; | ||
| 325 | interrupts = <AT91_PMC_MOSCRCS>; | ||
| 326 | clock-frequency = <12000000>; | ||
| 327 | clock-accuracy = <100000000>; | ||
| 328 | }; | ||
| 329 | |||
| 330 | main_osc: main_osc { | ||
| 331 | compatible = "atmel,at91rm9200-clk-main-osc"; | ||
| 332 | #clock-cells = <0>; | ||
| 333 | interrupt-parent = <&pmc>; | ||
| 334 | interrupts = <AT91_PMC_MOSCS>; | ||
| 335 | clocks = <&main_xtal>; | ||
| 336 | }; | ||
| 337 | |||
| 338 | main: mainck { | ||
| 339 | compatible = "atmel,at91sam9x5-clk-main"; | ||
| 340 | #clock-cells = <0>; | ||
| 341 | interrupt-parent = <&pmc>; | ||
| 342 | interrupts = <AT91_PMC_MOSCSELS>; | ||
| 343 | clocks = <&main_rc_osc &main_osc>; | ||
| 344 | }; | ||
| 345 | |||
| 346 | plla: pllack { | ||
| 347 | compatible = "atmel,sama5d3-clk-pll"; | ||
| 348 | #clock-cells = <0>; | ||
| 349 | interrupt-parent = <&pmc>; | ||
| 350 | interrupts = <AT91_PMC_LOCKA>; | ||
| 351 | clocks = <&main>; | ||
| 352 | reg = <0>; | ||
| 353 | atmel,clk-input-range = <12000000 12000000>; | ||
| 354 | #atmel,pll-clk-output-range-cells = <4>; | ||
| 355 | atmel,pll-clk-output-ranges = <600000000 1200000000 0 0>; | ||
| 356 | }; | ||
| 357 | |||
| 358 | plladiv: plladivck { | ||
| 359 | compatible = "atmel,at91sam9x5-clk-plldiv"; | ||
| 360 | #clock-cells = <0>; | ||
| 361 | clocks = <&plla>; | ||
| 362 | }; | ||
| 363 | |||
| 364 | utmi: utmick { | ||
| 365 | compatible = "atmel,at91sam9x5-clk-utmi"; | ||
| 366 | #clock-cells = <0>; | ||
| 367 | interrupt-parent = <&pmc>; | ||
| 368 | interrupts = <AT91_PMC_LOCKU>; | ||
| 369 | clocks = <&main>; | ||
| 370 | }; | ||
| 371 | |||
| 372 | mck: masterck { | ||
| 373 | compatible = "atmel,at91sam9x5-clk-master"; | ||
| 374 | #clock-cells = <0>; | ||
| 375 | interrupt-parent = <&pmc>; | ||
| 376 | interrupts = <AT91_PMC_MCKRDY>; | ||
| 377 | clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>; | ||
| 378 | atmel,clk-output-range = <125000000 177000000>; | ||
| 379 | atmel,clk-divisors = <1 2 4 3>; | ||
| 380 | }; | ||
| 381 | |||
| 382 | h32ck: h32mxck { | ||
| 383 | #clock-cells = <0>; | ||
| 384 | compatible = "atmel,sama5d4-clk-h32mx"; | ||
| 385 | clocks = <&mck>; | ||
| 386 | }; | ||
| 387 | |||
| 388 | usb: usbck { | ||
| 389 | compatible = "atmel,at91sam9x5-clk-usb"; | ||
| 390 | #clock-cells = <0>; | ||
| 391 | clocks = <&plladiv>, <&utmi>; | ||
| 392 | }; | ||
| 393 | |||
| 394 | prog: progck { | ||
| 395 | compatible = "atmel,at91sam9x5-clk-programmable"; | ||
| 396 | #address-cells = <1>; | ||
| 397 | #size-cells = <0>; | ||
| 398 | interrupt-parent = <&pmc>; | ||
| 399 | clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>; | ||
| 400 | |||
| 401 | prog0: prog0 { | ||
| 402 | #clock-cells = <0>; | ||
| 403 | reg = <0>; | ||
| 404 | interrupts = <AT91_PMC_PCKRDY(0)>; | ||
| 405 | }; | ||
| 406 | |||
| 407 | prog1: prog1 { | ||
| 408 | #clock-cells = <0>; | ||
| 409 | reg = <1>; | ||
| 410 | interrupts = <AT91_PMC_PCKRDY(1)>; | ||
| 411 | }; | ||
| 412 | |||
| 413 | prog2: prog2 { | ||
| 414 | #clock-cells = <0>; | ||
| 415 | reg = <2>; | ||
| 416 | interrupts = <AT91_PMC_PCKRDY(2)>; | ||
| 417 | }; | ||
| 418 | }; | ||
| 419 | |||
| 420 | smd: smdclk { | ||
| 421 | compatible = "atmel,at91sam9x5-clk-smd"; | ||
| 422 | #clock-cells = <0>; | ||
| 423 | clocks = <&plladiv>, <&utmi>; | ||
| 424 | }; | ||
| 425 | |||
| 426 | systemck { | ||
| 427 | compatible = "atmel,at91rm9200-clk-system"; | ||
| 428 | #address-cells = <1>; | ||
| 429 | #size-cells = <0>; | ||
| 430 | |||
| 431 | ddrck: ddrck { | ||
| 432 | #clock-cells = <0>; | ||
| 433 | reg = <2>; | ||
| 434 | clocks = <&mck>; | ||
| 435 | }; | ||
| 436 | |||
| 437 | lcdck: lcdck { | ||
| 438 | #clock-cells = <0>; | ||
| 439 | reg = <4>; | ||
| 440 | clocks = <&smd>; | ||
| 441 | }; | ||
| 442 | |||
| 443 | smdck: smdck { | ||
| 444 | #clock-cells = <0>; | ||
| 445 | reg = <4>; | ||
| 446 | clocks = <&smd>; | ||
| 447 | }; | ||
| 448 | |||
| 449 | uhpck: uhpck { | ||
| 450 | #clock-cells = <0>; | ||
| 451 | reg = <6>; | ||
| 452 | clocks = <&usb>; | ||
| 453 | }; | ||
| 454 | |||
| 455 | udpck: udpck { | ||
| 456 | #clock-cells = <0>; | ||
| 457 | reg = <7>; | ||
| 458 | clocks = <&usb>; | ||
| 459 | }; | ||
| 460 | |||
| 461 | pck0: pck0 { | ||
| 462 | #clock-cells = <0>; | ||
| 463 | reg = <8>; | ||
| 464 | clocks = <&prog0>; | ||
| 465 | }; | ||
| 466 | |||
| 467 | pck1: pck1 { | ||
| 468 | #clock-cells = <0>; | ||
| 469 | reg = <9>; | ||
| 470 | clocks = <&prog1>; | ||
| 471 | }; | ||
| 472 | |||
| 473 | pck2: pck2 { | ||
| 474 | #clock-cells = <0>; | ||
| 475 | reg = <10>; | ||
| 476 | clocks = <&prog2>; | ||
| 477 | }; | ||
| 478 | }; | ||
| 479 | |||
| 480 | periph32ck { | ||
| 481 | compatible = "atmel,at91sam9x5-clk-peripheral"; | ||
| 482 | #address-cells = <1>; | ||
| 483 | #size-cells = <0>; | ||
| 484 | clocks = <&h32ck>; | ||
| 485 | |||
| 486 | pioD_clk: pioD_clk { | ||
| 487 | #clock-cells = <0>; | ||
| 488 | reg = <5>; | ||
| 489 | }; | ||
| 490 | |||
| 491 | usart0_clk: usart0_clk { | ||
| 492 | #clock-cells = <0>; | ||
| 493 | reg = <6>; | ||
| 494 | }; | ||
| 495 | |||
| 496 | usart1_clk: usart1_clk { | ||
| 497 | #clock-cells = <0>; | ||
| 498 | reg = <7>; | ||
| 499 | }; | ||
| 500 | |||
| 501 | icm_clk: icm_clk { | ||
| 502 | #clock-cells = <0>; | ||
| 503 | reg = <9>; | ||
| 504 | }; | ||
| 505 | |||
| 506 | aes_clk: aes_clk { | ||
| 507 | #clock-cells = <0>; | ||
| 508 | reg = <12>; | ||
| 509 | }; | ||
| 510 | |||
| 511 | tdes_clk: tdes_clk { | ||
| 512 | #clock-cells = <0>; | ||
| 513 | reg = <14>; | ||
| 514 | }; | ||
| 515 | |||
| 516 | sha_clk: sha_clk { | ||
| 517 | #clock-cells = <0>; | ||
| 518 | reg = <15>; | ||
| 519 | }; | ||
| 520 | |||
| 521 | matrix1_clk: matrix1_clk { | ||
| 522 | #clock-cells = <0>; | ||
| 523 | reg = <17>; | ||
| 524 | }; | ||
| 525 | |||
| 526 | hsmc_clk: hsmc_clk { | ||
| 527 | #clock-cells = <0>; | ||
| 528 | reg = <22>; | ||
| 529 | }; | ||
| 530 | |||
| 531 | pioA_clk: pioA_clk { | ||
| 532 | #clock-cells = <0>; | ||
| 533 | reg = <23>; | ||
| 534 | }; | ||
| 535 | |||
| 536 | pioB_clk: pioB_clk { | ||
| 537 | #clock-cells = <0>; | ||
| 538 | reg = <24>; | ||
| 539 | }; | ||
| 540 | |||
| 541 | pioC_clk: pioC_clk { | ||
| 542 | #clock-cells = <0>; | ||
| 543 | reg = <25>; | ||
| 544 | }; | ||
| 545 | |||
| 546 | pioE_clk: pioE_clk { | ||
| 547 | #clock-cells = <0>; | ||
| 548 | reg = <26>; | ||
| 549 | }; | ||
| 550 | |||
| 551 | uart0_clk: uart0_clk { | ||
| 552 | #clock-cells = <0>; | ||
| 553 | reg = <27>; | ||
| 554 | }; | ||
| 555 | |||
| 556 | uart1_clk: uart1_clk { | ||
| 557 | #clock-cells = <0>; | ||
| 558 | reg = <28>; | ||
| 559 | }; | ||
| 560 | |||
| 561 | usart2_clk: usart2_clk { | ||
| 562 | #clock-cells = <0>; | ||
| 563 | reg = <29>; | ||
| 564 | }; | ||
| 565 | |||
| 566 | usart3_clk: usart3_clk { | ||
| 567 | #clock-cells = <0>; | ||
| 568 | reg = <30>; | ||
| 569 | }; | ||
| 570 | |||
| 571 | usart4_clk: usart4_clk { | ||
| 572 | #clock-cells = <0>; | ||
| 573 | reg = <31>; | ||
| 574 | }; | ||
| 575 | |||
| 576 | twi0_clk: twi0_clk { | ||
| 577 | reg = <32>; | ||
| 578 | #clock-cells = <0>; | ||
| 579 | }; | ||
| 580 | |||
| 581 | twi1_clk: twi1_clk { | ||
| 582 | #clock-cells = <0>; | ||
| 583 | reg = <33>; | ||
| 584 | }; | ||
| 585 | |||
| 586 | twi2_clk: twi2_clk { | ||
| 587 | #clock-cells = <0>; | ||
| 588 | reg = <34>; | ||
| 589 | }; | ||
| 590 | |||
| 591 | mci0_clk: mci0_clk { | ||
| 592 | #clock-cells = <0>; | ||
| 593 | reg = <35>; | ||
| 594 | }; | ||
| 595 | |||
| 596 | mci1_clk: mci1_clk { | ||
| 597 | #clock-cells = <0>; | ||
| 598 | reg = <36>; | ||
| 599 | }; | ||
| 600 | |||
| 601 | spi0_clk: spi0_clk { | ||
| 602 | #clock-cells = <0>; | ||
| 603 | reg = <37>; | ||
| 604 | }; | ||
| 605 | |||
| 606 | spi1_clk: spi1_clk { | ||
| 607 | #clock-cells = <0>; | ||
| 608 | reg = <38>; | ||
| 609 | }; | ||
| 610 | |||
| 611 | spi2_clk: spi2_clk { | ||
| 612 | #clock-cells = <0>; | ||
| 613 | reg = <39>; | ||
| 614 | }; | ||
| 615 | |||
| 616 | tcb0_clk: tcb0_clk { | ||
| 617 | #clock-cells = <0>; | ||
| 618 | reg = <40>; | ||
| 619 | }; | ||
| 620 | |||
| 621 | tcb1_clk: tcb1_clk { | ||
| 622 | #clock-cells = <0>; | ||
| 623 | reg = <41>; | ||
| 624 | }; | ||
| 625 | |||
| 626 | tcb2_clk: tcb2_clk { | ||
| 627 | #clock-cells = <0>; | ||
| 628 | reg = <42>; | ||
| 629 | }; | ||
| 630 | |||
| 631 | pwm_clk: pwm_clk { | ||
| 632 | #clock-cells = <0>; | ||
| 633 | reg = <43>; | ||
| 634 | }; | ||
| 635 | |||
| 636 | adc_clk: adc_clk { | ||
| 637 | #clock-cells = <0>; | ||
| 638 | reg = <44>; | ||
| 639 | }; | ||
| 640 | |||
| 641 | dbgu_clk: dbgu_clk { | ||
| 642 | #clock-cells = <0>; | ||
| 643 | reg = <45>; | ||
| 644 | }; | ||
| 645 | |||
| 646 | uhphs_clk: uhphs_clk { | ||
| 647 | #clock-cells = <0>; | ||
| 648 | reg = <46>; | ||
| 649 | }; | ||
| 650 | |||
| 651 | udphs_clk: udphs_clk { | ||
| 652 | #clock-cells = <0>; | ||
| 653 | reg = <47>; | ||
| 654 | }; | ||
| 655 | |||
| 656 | ssc0_clk: ssc0_clk { | ||
| 657 | #clock-cells = <0>; | ||
| 658 | reg = <48>; | ||
| 659 | }; | ||
| 660 | |||
| 661 | ssc1_clk: ssc1_clk { | ||
| 662 | #clock-cells = <0>; | ||
| 663 | reg = <49>; | ||
| 664 | }; | ||
| 665 | |||
| 666 | trng_clk: trng_clk { | ||
| 667 | #clock-cells = <0>; | ||
| 668 | reg = <53>; | ||
| 669 | }; | ||
| 670 | |||
| 671 | macb0_clk: macb0_clk { | ||
| 672 | #clock-cells = <0>; | ||
| 673 | reg = <54>; | ||
| 674 | }; | ||
| 675 | |||
| 676 | macb1_clk: macb1_clk { | ||
| 677 | #clock-cells = <0>; | ||
| 678 | reg = <55>; | ||
| 679 | }; | ||
| 680 | |||
| 681 | fuse_clk: fuse_clk { | ||
| 682 | #clock-cells = <0>; | ||
| 683 | reg = <57>; | ||
| 684 | }; | ||
| 685 | |||
| 686 | securam_clk: securam_clk { | ||
| 687 | #clock-cells = <0>; | ||
| 688 | reg = <59>; | ||
| 689 | }; | ||
| 690 | |||
| 691 | smd_clk: smd_clk { | ||
| 692 | #clock-cells = <0>; | ||
| 693 | reg = <61>; | ||
| 694 | }; | ||
| 695 | |||
| 696 | twi3_clk: twi3_clk { | ||
| 697 | #clock-cells = <0>; | ||
| 698 | reg = <62>; | ||
| 699 | }; | ||
| 700 | |||
| 701 | catb_clk: catb_clk { | ||
| 702 | #clock-cells = <0>; | ||
| 703 | reg = <63>; | ||
| 704 | }; | ||
| 705 | }; | ||
| 706 | |||
| 707 | periph64ck { | ||
| 708 | compatible = "atmel,at91sam9x5-clk-peripheral"; | ||
| 709 | #address-cells = <1>; | ||
| 710 | #size-cells = <0>; | ||
| 711 | clocks = <&mck>; | ||
| 712 | |||
| 713 | dma0_clk: dma0_clk { | ||
| 714 | #clock-cells = <0>; | ||
| 715 | reg = <8>; | ||
| 716 | }; | ||
| 717 | |||
| 718 | cpkcc_clk: cpkcc_clk { | ||
| 719 | #clock-cells = <0>; | ||
| 720 | reg = <10>; | ||
| 721 | }; | ||
| 722 | |||
| 723 | aesb_clk: aesb_clk { | ||
| 724 | #clock-cells = <0>; | ||
| 725 | reg = <13>; | ||
| 726 | }; | ||
| 727 | |||
| 728 | mpddr_clk: mpddr_clk { | ||
| 729 | #clock-cells = <0>; | ||
| 730 | reg = <16>; | ||
| 731 | }; | ||
| 732 | |||
| 733 | matrix0_clk: matrix0_clk { | ||
| 734 | #clock-cells = <0>; | ||
| 735 | reg = <18>; | ||
| 736 | }; | ||
| 737 | |||
| 738 | vdec_clk: vdec_clk { | ||
| 739 | #clock-cells = <0>; | ||
| 740 | reg = <19>; | ||
| 741 | }; | ||
| 742 | |||
| 743 | dma1_clk: dma1_clk { | ||
| 744 | #clock-cells = <0>; | ||
| 745 | reg = <50>; | ||
| 746 | }; | ||
| 747 | |||
| 748 | lcd_clk: lcd_clk { | ||
| 749 | #clock-cells = <0>; | ||
| 750 | reg = <51>; | ||
| 751 | }; | ||
| 752 | |||
| 753 | isi_clk: isi_clk { | ||
| 754 | #clock-cells = <0>; | ||
| 755 | reg = <52>; | ||
| 756 | }; | ||
| 757 | }; | ||
| 758 | }; | ||
| 759 | |||
| 760 | mmc0: mmc@f8000000 { | ||
| 761 | compatible = "atmel,hsmci"; | ||
| 762 | reg = <0xf8000000 0x600>; | ||
| 763 | interrupts = <35 IRQ_TYPE_LEVEL_HIGH 0>; | ||
| 764 | pinctrl-names = "default"; | ||
| 765 | pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3>; | ||
| 766 | status = "disabled"; | ||
| 767 | #address-cells = <1>; | ||
| 768 | #size-cells = <0>; | ||
| 769 | clocks = <&mci0_clk>; | ||
| 770 | clock-names = "mci_clk"; | ||
| 771 | }; | ||
| 772 | |||
| 773 | spi0: spi@f8010000 { | ||
| 774 | #address-cells = <1>; | ||
| 775 | #size-cells = <0>; | ||
| 776 | compatible = "atmel,at91rm9200-spi"; | ||
| 777 | reg = <0xf8010000 0x100>; | ||
| 778 | interrupts = <37 IRQ_TYPE_LEVEL_HIGH 3>; | ||
| 779 | pinctrl-names = "default"; | ||
| 780 | pinctrl-0 = <&pinctrl_spi0>; | ||
| 781 | clocks = <&spi0_clk>; | ||
| 782 | clock-names = "spi_clk"; | ||
| 783 | status = "disabled"; | ||
| 784 | }; | ||
| 785 | |||
| 786 | i2c0: i2c@f8014000 { | ||
| 787 | compatible = "atmel,at91sam9x5-i2c"; | ||
| 788 | reg = <0xf8014000 0x4000>; | ||
| 789 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 6>; | ||
| 790 | pinctrl-names = "default"; | ||
| 791 | pinctrl-0 = <&pinctrl_i2c0>; | ||
| 792 | #address-cells = <1>; | ||
| 793 | #size-cells = <0>; | ||
| 794 | clocks = <&twi0_clk>; | ||
| 795 | status = "disabled"; | ||
| 796 | }; | ||
| 797 | |||
| 798 | tcb0: timer@f801c000 { | ||
| 799 | compatible = "atmel,at91sam9x5-tcb"; | ||
| 800 | reg = <0xf801c000 0x100>; | ||
| 801 | interrupts = <40 IRQ_TYPE_LEVEL_HIGH 0>; | ||
| 802 | clocks = <&tcb0_clk>; | ||
| 803 | clock-names = "t0_clk"; | ||
| 804 | }; | ||
| 805 | |||
| 806 | macb0: ethernet@f8020000 { | ||
| 807 | compatible = "atmel,sama5d4-gem"; | ||
| 808 | reg = <0xf8020000 0x100>; | ||
| 809 | interrupts = <54 IRQ_TYPE_LEVEL_HIGH 3>; | ||
| 810 | pinctrl-names = "default"; | ||
| 811 | pinctrl-0 = <&pinctrl_macb0_rmii>; | ||
| 812 | clocks = <&macb0_clk>, <&macb0_clk>; | ||
| 813 | clock-names = "hclk", "pclk"; | ||
| 814 | status = "disabled"; | ||
| 815 | }; | ||
| 816 | |||
| 817 | i2c2: i2c@f8024000 { | ||
| 818 | compatible = "atmel,at91sam9x5-i2c"; | ||
| 819 | reg = <0xf8024000 0x4000>; | ||
| 820 | interrupts = <34 4 6>; | ||
| 821 | pinctrl-names = "default"; | ||
| 822 | pinctrl-0 = <&pinctrl_i2c2>; | ||
| 823 | #address-cells = <1>; | ||
| 824 | #size-cells = <0>; | ||
| 825 | clocks = <&twi2_clk>; | ||
| 826 | status = "disabled"; | ||
| 827 | }; | ||
| 828 | |||
| 829 | mmc1: mmc@fc000000 { | ||
| 830 | compatible = "atmel,hsmci"; | ||
| 831 | reg = <0xfc000000 0x600>; | ||
| 832 | interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; | ||
| 833 | pinctrl-names = "default"; | ||
| 834 | pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>; | ||
| 835 | status = "disabled"; | ||
| 836 | #address-cells = <1>; | ||
| 837 | #size-cells = <0>; | ||
| 838 | clocks = <&mci1_clk>; | ||
| 839 | clock-names = "mci_clk"; | ||
| 840 | }; | ||
| 841 | |||
| 842 | usart2: serial@fc008000 { | ||
| 843 | compatible = "atmel,at91sam9260-usart"; | ||
| 844 | reg = <0xfc008000 0x100>; | ||
| 845 | interrupts = <29 IRQ_TYPE_LEVEL_HIGH 5>; | ||
| 846 | pinctrl-names = "default"; | ||
| 847 | pinctrl-0 = <&pinctrl_usart2 &pinctrl_usart2_rts &pinctrl_usart2_cts>; | ||
| 848 | clocks = <&usart2_clk>; | ||
| 849 | clock-names = "usart"; | ||
| 850 | status = "disabled"; | ||
| 851 | }; | ||
| 852 | |||
| 853 | usart3: serial@fc00c000 { | ||
| 854 | compatible = "atmel,at91sam9260-usart"; | ||
| 855 | reg = <0xfc00c000 0x100>; | ||
| 856 | interrupts = <30 IRQ_TYPE_LEVEL_HIGH 5>; | ||
| 857 | pinctrl-names = "default"; | ||
| 858 | pinctrl-0 = <&pinctrl_usart3>; | ||
| 859 | clocks = <&usart3_clk>; | ||
| 860 | clock-names = "usart"; | ||
| 861 | status = "disabled"; | ||
| 862 | }; | ||
| 863 | |||
| 864 | usart4: serial@fc010000 { | ||
| 865 | compatible = "atmel,at91sam9260-usart"; | ||
| 866 | reg = <0xfc010000 0x100>; | ||
| 867 | interrupts = <31 IRQ_TYPE_LEVEL_HIGH 5>; | ||
| 868 | pinctrl-names = "default"; | ||
| 869 | pinctrl-0 = <&pinctrl_usart4>; | ||
| 870 | clocks = <&usart4_clk>; | ||
| 871 | clock-names = "usart"; | ||
| 872 | status = "disabled"; | ||
| 873 | }; | ||
| 874 | |||
| 875 | tcb1: timer@fc020000 { | ||
| 876 | compatible = "atmel,at91sam9x5-tcb"; | ||
| 877 | reg = <0xfc020000 0x100>; | ||
| 878 | interrupts = <41 IRQ_TYPE_LEVEL_HIGH 0>; | ||
| 879 | clocks = <&tcb1_clk>; | ||
| 880 | clock-names = "t0_clk"; | ||
| 881 | }; | ||
| 882 | |||
| 883 | adc0: adc@fc034000 { | ||
| 884 | compatible = "atmel,at91sam9x5-adc"; | ||
| 885 | reg = <0xfc034000 0x100>; | ||
| 886 | interrupts = <44 IRQ_TYPE_LEVEL_HIGH 5>; | ||
| 887 | pinctrl-names = "default"; | ||
| 888 | pinctrl-0 = < | ||
| 889 | /* external trigger is conflict with USBA_VBUS */ | ||
| 890 | &pinctrl_adc0_ad0 | ||
| 891 | &pinctrl_adc0_ad1 | ||
| 892 | &pinctrl_adc0_ad2 | ||
| 893 | &pinctrl_adc0_ad3 | ||
| 894 | &pinctrl_adc0_ad4 | ||
| 895 | >; | ||
| 896 | clocks = <&adc_clk>, | ||
| 897 | <&adc_op_clk>; | ||
| 898 | clock-names = "adc_clk", "adc_op_clk"; | ||
| 899 | atmel,adc-channels-used = <0x01f>; | ||
| 900 | atmel,adc-startup-time = <40>; | ||
| 901 | atmel,adc-use-external; | ||
| 902 | atmel,adc-vref = <3000>; | ||
| 903 | atmel,adc-res = <8 10>; | ||
| 904 | atmel,adc-sample-hold-time = <11>; | ||
| 905 | atmel,adc-res-names = "lowres", "highres"; | ||
| 906 | atmel,adc-ts-pressure-threshold = <10000>; | ||
| 907 | status = "disabled"; | ||
| 908 | |||
| 909 | trigger@0 { | ||
| 910 | trigger-name = "external-rising"; | ||
| 911 | trigger-value = <0x1>; | ||
| 912 | trigger-external; | ||
| 913 | }; | ||
| 914 | trigger@1 { | ||
| 915 | trigger-name = "external-falling"; | ||
| 916 | trigger-value = <0x2>; | ||
| 917 | trigger-external; | ||
| 918 | }; | ||
| 919 | trigger@2 { | ||
| 920 | trigger-name = "external-any"; | ||
| 921 | trigger-value = <0x3>; | ||
| 922 | trigger-external; | ||
| 923 | }; | ||
| 924 | trigger@3 { | ||
| 925 | trigger-name = "continuous"; | ||
| 926 | trigger-value = <0x6>; | ||
| 927 | }; | ||
| 928 | }; | ||
| 929 | |||
| 930 | rstc@fc068600 { | ||
| 931 | compatible = "atmel,at91sam9g45-rstc"; | ||
| 932 | reg = <0xfc068600 0x10>; | ||
| 933 | }; | ||
| 934 | |||
| 935 | shdwc@fc068610 { | ||
| 936 | compatible = "atmel,at91sam9x5-shdwc"; | ||
| 937 | reg = <0xfc068610 0x10>; | ||
| 938 | }; | ||
| 939 | |||
| 940 | pit: timer@fc068630 { | ||
| 941 | compatible = "atmel,at91sam9260-pit"; | ||
| 942 | reg = <0xfc068630 0xf>; | ||
| 943 | interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>; | ||
| 944 | clocks = <&h32ck>; | ||
| 945 | }; | ||
| 946 | |||
| 947 | watchdog@fc068640 { | ||
| 948 | compatible = "atmel,at91sam9260-wdt"; | ||
| 949 | reg = <0xfc068640 0x10>; | ||
| 950 | status = "disabled"; | ||
| 951 | }; | ||
| 952 | |||
| 953 | sckc@fc068650 { | ||
| 954 | compatible = "atmel,at91sam9x5-sckc"; | ||
| 955 | reg = <0xfc068650 0x4>; | ||
| 956 | |||
| 957 | slow_rc_osc: slow_rc_osc { | ||
| 958 | compatible = "atmel,at91sam9x5-clk-slow-rc-osc"; | ||
| 959 | #clock-cells = <0>; | ||
| 960 | clock-frequency = <32768>; | ||
| 961 | clock-accuracy = <250000000>; | ||
| 962 | atmel,startup-time-usec = <75>; | ||
| 963 | }; | ||
| 964 | |||
| 965 | slow_osc: slow_osc { | ||
| 966 | compatible = "atmel,at91sam9x5-clk-slow-osc"; | ||
| 967 | #clock-cells = <0>; | ||
| 968 | clocks = <&slow_xtal>; | ||
| 969 | atmel,startup-time-usec = <1200000>; | ||
| 970 | }; | ||
| 971 | |||
| 972 | clk32k: slowck { | ||
| 973 | compatible = "atmel,at91sam9x5-clk-slow"; | ||
| 974 | #clock-cells = <0>; | ||
| 975 | clocks = <&slow_rc_osc &slow_osc>; | ||
| 976 | }; | ||
| 977 | }; | ||
| 978 | |||
| 979 | rtc@fc0686b0 { | ||
| 980 | compatible = "atmel,at91rm9200-rtc"; | ||
| 981 | reg = <0xfc0686b0 0x30>; | ||
| 982 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; | ||
| 983 | }; | ||
| 984 | |||
| 985 | dbgu: serial@fc069000 { | ||
| 986 | compatible = "atmel,at91sam9260-usart"; | ||
| 987 | reg = <0xfc069000 0x200>; | ||
| 988 | interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; | ||
| 989 | pinctrl-names = "default"; | ||
| 990 | pinctrl-0 = <&pinctrl_dbgu>; | ||
| 991 | clocks = <&dbgu_clk>; | ||
| 992 | clock-names = "usart"; | ||
| 993 | status = "disabled"; | ||
| 994 | }; | ||
| 995 | |||
| 996 | |||
| 997 | pinctrl@fc06a000 { | ||
| 998 | #address-cells = <1>; | ||
| 999 | #size-cells = <1>; | ||
| 1000 | compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus"; | ||
| 1001 | ranges = <0xfc06a000 0xfc06a000 0x4000>; | ||
| 1002 | /* WARNING: revisit as pin spec has changed */ | ||
| 1003 | atmel,mux-mask = < | ||
| 1004 | /* A B C */ | ||
| 1005 | 0xffffffff 0x3ffcfe7c 0x1c010101 /* pioA */ | ||
| 1006 | 0x7fffffff 0xfffccc3a 0x3f00cc3a /* pioB */ | ||
| 1007 | 0xffffffff 0x3ff83fff 0xff00ffff /* pioC */ | ||
| 1008 | 0x00000000 0x00000000 0x00000000 /* pioD */ | ||
| 1009 | 0xffffffff 0x7fffffff 0x76fff1bf /* pioE */ | ||
| 1010 | >; | ||
| 1011 | |||
| 1012 | pioA: gpio@fc06a000 { | ||
| 1013 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
| 1014 | reg = <0xfc06a000 0x100>; | ||
| 1015 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH 1>; | ||
| 1016 | #gpio-cells = <2>; | ||
| 1017 | gpio-controller; | ||
| 1018 | interrupt-controller; | ||
| 1019 | #interrupt-cells = <2>; | ||
| 1020 | clocks = <&pioA_clk>; | ||
| 1021 | }; | ||
| 1022 | |||
| 1023 | pioB: gpio@fc06b000 { | ||
| 1024 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
| 1025 | reg = <0xfc06b000 0x100>; | ||
| 1026 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH 1>; | ||
| 1027 | #gpio-cells = <2>; | ||
| 1028 | gpio-controller; | ||
| 1029 | interrupt-controller; | ||
| 1030 | #interrupt-cells = <2>; | ||
| 1031 | clocks = <&pioB_clk>; | ||
| 1032 | }; | ||
| 1033 | |||
| 1034 | pioC: gpio@fc06c000 { | ||
| 1035 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
| 1036 | reg = <0xfc06c000 0x100>; | ||
| 1037 | interrupts = <25 IRQ_TYPE_LEVEL_HIGH 1>; | ||
| 1038 | #gpio-cells = <2>; | ||
| 1039 | gpio-controller; | ||
| 1040 | interrupt-controller; | ||
| 1041 | #interrupt-cells = <2>; | ||
| 1042 | clocks = <&pioC_clk>; | ||
| 1043 | }; | ||
| 1044 | |||
| 1045 | pioE: gpio@fc06d000 { | ||
| 1046 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
| 1047 | reg = <0xfc06d000 0x100>; | ||
| 1048 | interrupts = <26 IRQ_TYPE_LEVEL_HIGH 1>; | ||
| 1049 | #gpio-cells = <2>; | ||
| 1050 | gpio-controller; | ||
| 1051 | interrupt-controller; | ||
| 1052 | #interrupt-cells = <2>; | ||
| 1053 | clocks = <&pioE_clk>; | ||
| 1054 | }; | ||
| 1055 | |||
| 1056 | /* pinctrl pin settings */ | ||
| 1057 | adc0 { | ||
| 1058 | pinctrl_adc0_adtrg: adc0_adtrg { | ||
| 1059 | atmel,pins = | ||
| 1060 | <AT91_PIOE 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* conflicts with USBA_VBUS */ | ||
| 1061 | }; | ||
| 1062 | pinctrl_adc0_ad0: adc0_ad0 { | ||
| 1063 | atmel,pins = | ||
| 1064 | <AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; | ||
| 1065 | }; | ||
| 1066 | pinctrl_adc0_ad1: adc0_ad1 { | ||
| 1067 | atmel,pins = | ||
| 1068 | <AT91_PIOC 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; | ||
| 1069 | }; | ||
| 1070 | pinctrl_adc0_ad2: adc0_ad2 { | ||
| 1071 | atmel,pins = | ||
| 1072 | <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; | ||
| 1073 | }; | ||
| 1074 | pinctrl_adc0_ad3: adc0_ad3 { | ||
| 1075 | atmel,pins = | ||
| 1076 | <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; | ||
| 1077 | }; | ||
| 1078 | pinctrl_adc0_ad4: adc0_ad4 { | ||
| 1079 | atmel,pins = | ||
| 1080 | <AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; | ||
| 1081 | }; | ||
| 1082 | }; | ||
| 1083 | |||
| 1084 | dbgu { | ||
| 1085 | pinctrl_dbgu: dbgu-0 { | ||
| 1086 | atmel,pins = | ||
| 1087 | <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>, /* conflicts with D14 and TDI */ | ||
| 1088 | <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* conflicts with D15 and TDO */ | ||
| 1089 | }; | ||
| 1090 | }; | ||
| 1091 | |||
| 1092 | i2c0 { | ||
| 1093 | pinctrl_i2c0: i2c0-0 { | ||
| 1094 | atmel,pins = | ||
| 1095 | <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE | ||
| 1096 | AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; | ||
| 1097 | }; | ||
| 1098 | }; | ||
| 1099 | |||
| 1100 | i2c2 { | ||
| 1101 | pinctrl_i2c2: i2c2-0 { | ||
| 1102 | atmel,pins = | ||
| 1103 | <AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* TWD2, conflicts with RD0 and PWML1 */ | ||
| 1104 | AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* TWCK2, conflicts with RF0 */ | ||
| 1105 | }; | ||
| 1106 | }; | ||
| 1107 | |||
| 1108 | macb0 { | ||
| 1109 | pinctrl_macb0_rmii: macb0_rmii-0 { | ||
| 1110 | atmel,pins = | ||
| 1111 | <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_TX0 */ | ||
| 1112 | AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_TX1 */ | ||
| 1113 | AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_RX0 */ | ||
| 1114 | AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_RX1 */ | ||
| 1115 | AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_RXDV */ | ||
| 1116 | AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_RXER */ | ||
| 1117 | AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_TXEN */ | ||
| 1118 | AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_TXCK */ | ||
| 1119 | AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_MDC */ | ||
| 1120 | AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* G0_MDIO */ | ||
| 1121 | >; | ||
| 1122 | }; | ||
| 1123 | }; | ||
| 1124 | |||
| 1125 | mmc0 { | ||
| 1126 | pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 { | ||
| 1127 | atmel,pins = | ||
| 1128 | <AT91_PIOC 4 AT91_PERIPH_B AT91_PINCTRL_NONE /* MCI0_CK, conflict with PCK1(ISI_MCK) */ | ||
| 1129 | AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_CDB, conflict with NAND_D0 */ | ||
| 1130 | AT91_PIOC 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB0, conflict with NAND_D1 */ | ||
| 1131 | >; | ||
| 1132 | }; | ||
| 1133 | pinctrl_mmc0_dat1_3: mmc0_dat1_3 { | ||
| 1134 | atmel,pins = | ||
| 1135 | <AT91_PIOC 7 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB1, conflict with NAND_D2 */ | ||
| 1136 | AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB2, conflict with NAND_D3 */ | ||
| 1137 | AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB3, conflict with NAND_D4 */ | ||
| 1138 | >; | ||
| 1139 | }; | ||
| 1140 | }; | ||
| 1141 | |||
| 1142 | mmc1 { | ||
| 1143 | pinctrl_mmc1_clk_cmd_dat0: mmc1_clk_cmd_dat0 { | ||
| 1144 | atmel,pins = | ||
| 1145 | <AT91_PIOE 18 AT91_PERIPH_C AT91_PINCTRL_NONE /* MCI1_CK */ | ||
| 1146 | AT91_PIOE 19 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* MCI1_CDA */ | ||
| 1147 | AT91_PIOE 20 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* MCI1_DA0 */ | ||
| 1148 | >; | ||
| 1149 | }; | ||
| 1150 | pinctrl_mmc1_dat1_3: mmc1_dat1_3 { | ||
| 1151 | atmel,pins = | ||
| 1152 | <AT91_PIOE 21 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* MCI1_DA1 */ | ||
| 1153 | AT91_PIOE 22 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* MCI1_DA2 */ | ||
| 1154 | AT91_PIOE 23 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* MCI1_DA3 */ | ||
| 1155 | >; | ||
| 1156 | }; | ||
| 1157 | }; | ||
| 1158 | |||
| 1159 | nand0 { | ||
| 1160 | pinctrl_nand: nand-0 { | ||
| 1161 | atmel,pins = | ||
| 1162 | <AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC13 periph A Read Enable */ | ||
| 1163 | AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC14 periph A Write Enable */ | ||
| 1164 | |||
| 1165 | AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC17 ALE */ | ||
| 1166 | AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC18 CLE */ | ||
| 1167 | |||
| 1168 | AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC15 NCS3/Chip Enable */ | ||
| 1169 | AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC16 NANDRDY */ | ||
| 1170 | AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC5 Data bit 0 */ | ||
| 1171 | AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC6 Data bit 1 */ | ||
| 1172 | AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC7 Data bit 2 */ | ||
| 1173 | AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC8 Data bit 3 */ | ||
| 1174 | AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC9 Data bit 4 */ | ||
| 1175 | AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC10 Data bit 5 */ | ||
| 1176 | AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC11 periph A Data bit 6 */ | ||
| 1177 | AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC12 periph A Data bit 7 */ | ||
| 1178 | }; | ||
| 1179 | }; | ||
| 1180 | |||
| 1181 | spi0 { | ||
| 1182 | pinctrl_spi0: spi0-0 { | ||
| 1183 | atmel,pins = | ||
| 1184 | <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* SPI0_MISO */ | ||
| 1185 | AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* SPI0_MOSI */ | ||
| 1186 | AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* SPI0_SPCK */ | ||
| 1187 | >; | ||
| 1188 | }; | ||
| 1189 | }; | ||
| 1190 | |||
| 1191 | usart2 { | ||
| 1192 | pinctrl_usart2: usart2-0 { | ||
| 1193 | atmel,pins = | ||
| 1194 | <AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE /* RXD - conflicts with G0_CRS, ISI_HSYNC */ | ||
| 1195 | AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* TXD - conflicts with G0_COL, PCK2 */ | ||
| 1196 | >; | ||
| 1197 | }; | ||
| 1198 | pinctrl_usart2_rts: usart2_rts-0 { | ||
| 1199 | atmel,pins = <AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with G0_RX3, PWMH1 */ | ||
| 1200 | }; | ||
| 1201 | pinctrl_usart2_cts: usart2_cts-0 { | ||
| 1202 | atmel,pins = <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with G0_TXER, ISI_VSYNC */ | ||
| 1203 | }; | ||
| 1204 | }; | ||
| 1205 | |||
| 1206 | usart3 { | ||
| 1207 | pinctrl_usart3: usart3-0 { | ||
| 1208 | atmel,pins = | ||
| 1209 | <AT91_PIOE 16 AT91_PERIPH_B AT91_PINCTRL_NONE /* RXD */ | ||
| 1210 | AT91_PIOE 17 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* TXD */ | ||
| 1211 | >; | ||
| 1212 | }; | ||
| 1213 | }; | ||
| 1214 | |||
| 1215 | usart4 { | ||
| 1216 | pinctrl_usart4: usart4-0 { | ||
| 1217 | atmel,pins = | ||
| 1218 | <AT91_PIOE 26 AT91_PERIPH_B AT91_PINCTRL_NONE /* RXD */ | ||
| 1219 | AT91_PIOE 27 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* TXD */ | ||
| 1220 | >; | ||
| 1221 | }; | ||
| 1222 | pinctrl_usart4_rts: usart4_rts-0 { | ||
| 1223 | atmel,pins = <AT91_PIOE 28 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with NWAIT, A19 */ | ||
| 1224 | }; | ||
| 1225 | pinctrl_usart4_cts: usart4_cts-0 { | ||
| 1226 | atmel,pins = <AT91_PIOE 0 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with A0/NBS0, MCI0_CDB */ | ||
| 1227 | }; | ||
| 1228 | }; | ||
| 1229 | }; | ||
| 1230 | |||
| 1231 | aic: interrupt-controller@fc06e000 { | ||
| 1232 | #interrupt-cells = <3>; | ||
| 1233 | compatible = "atmel,sama5d4-aic"; | ||
| 1234 | interrupt-controller; | ||
| 1235 | reg = <0xfc06e000 0x200>; | ||
| 1236 | atmel,external-irqs = <56>; | ||
| 1237 | }; | ||
| 1238 | }; | ||
| 1239 | }; | ||
| 1240 | }; | ||
diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi index 249f65be2a50..f863a10cb1b2 100644 --- a/arch/arm/boot/dts/sh7372.dtsi +++ b/arch/arm/boot/dts/sh7372.dtsi | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | compatible = "arm,cortex-a8"; | 21 | compatible = "arm,cortex-a8"; |
| 22 | device_type = "cpu"; | 22 | device_type = "cpu"; |
| 23 | reg = <0x0>; | 23 | reg = <0x0>; |
| 24 | clock-frequency = <800000000>; | ||
| 24 | }; | 25 | }; |
| 25 | }; | 26 | }; |
| 26 | 27 | ||
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index 18662aec2ec4..99659db97e89 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | |||
| @@ -173,6 +173,10 @@ | |||
| 173 | }; | 173 | }; |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | &cmt1 { | ||
| 177 | status = "ok"; | ||
| 178 | }; | ||
| 179 | |||
| 176 | &i2c0 { | 180 | &i2c0 { |
| 177 | status = "okay"; | 181 | status = "okay"; |
| 178 | as3711@40 { | 182 | as3711@40 { |
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index 910b79079d5a..d7f52cf31350 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi | |||
| @@ -23,11 +23,13 @@ | |||
| 23 | device_type = "cpu"; | 23 | device_type = "cpu"; |
| 24 | compatible = "arm,cortex-a9"; | 24 | compatible = "arm,cortex-a9"; |
| 25 | reg = <0>; | 25 | reg = <0>; |
| 26 | clock-frequency = <1196000000>; | ||
| 26 | }; | 27 | }; |
| 27 | cpu@1 { | 28 | cpu@1 { |
| 28 | device_type = "cpu"; | 29 | device_type = "cpu"; |
| 29 | compatible = "arm,cortex-a9"; | 30 | compatible = "arm,cortex-a9"; |
| 30 | reg = <1>; | 31 | reg = <1>; |
| 32 | clock-frequency = <1196000000>; | ||
| 31 | }; | 33 | }; |
| 32 | }; | 34 | }; |
| 33 | 35 | ||
| @@ -45,6 +47,16 @@ | |||
| 45 | <0 56 IRQ_TYPE_LEVEL_HIGH>; | 47 | <0 56 IRQ_TYPE_LEVEL_HIGH>; |
| 46 | }; | 48 | }; |
| 47 | 49 | ||
| 50 | cmt1: timer@e6138000 { | ||
| 51 | compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48"; | ||
| 52 | reg = <0xe6138000 0x200>; | ||
| 53 | interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>; | ||
| 54 | |||
| 55 | renesas,channels-mask = <0x3f>; | ||
| 56 | |||
| 57 | status = "disabled"; | ||
| 58 | }; | ||
| 59 | |||
| 48 | irqpin0: irqpin@e6900000 { | 60 | irqpin0: irqpin@e6900000 { |
| 49 | compatible = "renesas,intc-irqpin-sh73a0", "renesas,intc-irqpin"; | 61 | compatible = "renesas,intc-irqpin-sh73a0", "renesas,intc-irqpin"; |
| 50 | #interrupt-cells = <2>; | 62 | #interrupt-cells = <2>; |
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi index 6cc83d4c6c76..587cadcf7001 100644 --- a/arch/arm/boot/dts/zynq-7000.dtsi +++ b/arch/arm/boot/dts/zynq-7000.dtsi | |||
| @@ -146,6 +146,11 @@ | |||
| 146 | cache-level = <2>; | 146 | cache-level = <2>; |
| 147 | }; | 147 | }; |
| 148 | 148 | ||
| 149 | memory-controller@f8006000 { | ||
| 150 | compatible = "xlnx,zynq-ddrc-a05"; | ||
| 151 | reg = <0xf8006000 0x1000>; | ||
| 152 | } ; | ||
| 153 | |||
| 149 | uart0: serial@e0000000 { | 154 | uart0: serial@e0000000 { |
| 150 | compatible = "xlnx,xuartps", "cdns,uart-r1p8"; | 155 | compatible = "xlnx,xuartps", "cdns,uart-r1p8"; |
| 151 | status = "disabled"; | 156 | status = "disabled"; |
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig index 0facf9da047c..fc105c9178cc 100644 --- a/arch/arm/configs/clps711x_defconfig +++ b/arch/arm/configs/clps711x_defconfig | |||
| @@ -68,8 +68,8 @@ CONFIG_GPIO_GENERIC_PLATFORM=y | |||
| 68 | # CONFIG_HWMON is not set | 68 | # CONFIG_HWMON is not set |
| 69 | CONFIG_FB=y | 69 | CONFIG_FB=y |
| 70 | CONFIG_FB_CLPS711X=y | 70 | CONFIG_FB_CLPS711X=y |
| 71 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 72 | CONFIG_LCD_PLATFORM=y | 71 | CONFIG_LCD_PLATFORM=y |
| 72 | CONFIG_BACKLIGHT_PWM=y | ||
| 73 | # CONFIG_USB_SUPPORT is not set | 73 | # CONFIG_USB_SUPPORT is not set |
| 74 | CONFIG_NEW_LEDS=y | 74 | CONFIG_NEW_LEDS=y |
| 75 | CONFIG_LEDS_CLASS=y | 75 | CONFIG_LEDS_CLASS=y |
| @@ -77,6 +77,8 @@ CONFIG_LEDS_GPIO=y | |||
| 77 | CONFIG_LEDS_TRIGGERS=y | 77 | CONFIG_LEDS_TRIGGERS=y |
| 78 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 78 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
| 79 | # CONFIG_IOMMU_SUPPORT is not set | 79 | # CONFIG_IOMMU_SUPPORT is not set |
| 80 | CONFIG_PWM=y | ||
| 81 | CONFIG_PWM_CLPS711X=y | ||
| 80 | CONFIG_EXT2_FS=y | 82 | CONFIG_EXT2_FS=y |
| 81 | CONFIG_CRAMFS=y | 83 | CONFIG_CRAMFS=y |
| 82 | CONFIG_MINIX_FS=y | 84 | CONFIG_MINIX_FS=y |
diff --git a/arch/arm/configs/hi3xxx_defconfig b/arch/arm/configs/hisi_defconfig index 9630687e7d07..1772505caeba 100644 --- a/arch/arm/configs/hi3xxx_defconfig +++ b/arch/arm/configs/hisi_defconfig | |||
| @@ -6,10 +6,15 @@ CONFIG_RD_LZMA=y | |||
| 6 | CONFIG_ARCH_HISI=y | 6 | CONFIG_ARCH_HISI=y |
| 7 | CONFIG_ARCH_HI3xxx=y | 7 | CONFIG_ARCH_HI3xxx=y |
| 8 | CONFIG_ARCH_HIX5HD2=y | 8 | CONFIG_ARCH_HIX5HD2=y |
| 9 | CONFIG_ARCH_HIP04=y | ||
| 9 | CONFIG_SMP=y | 10 | CONFIG_SMP=y |
| 11 | CONFIG_NR_CPUS=16 | ||
| 10 | CONFIG_PREEMPT=y | 12 | CONFIG_PREEMPT=y |
| 11 | CONFIG_AEABI=y | 13 | CONFIG_AEABI=y |
| 14 | CONFIG_HIGHMEM=y | ||
| 12 | CONFIG_ARM_APPENDED_DTB=y | 15 | CONFIG_ARM_APPENDED_DTB=y |
| 16 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
| 17 | CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y | ||
| 13 | CONFIG_NET=y | 18 | CONFIG_NET=y |
| 14 | CONFIG_UNIX=y | 19 | CONFIG_UNIX=y |
| 15 | CONFIG_INET=y | 20 | CONFIG_INET=y |
| @@ -21,6 +26,12 @@ CONFIG_BLK_DEV_SD=y | |||
| 21 | CONFIG_ATA=y | 26 | CONFIG_ATA=y |
| 22 | CONFIG_SATA_AHCI_PLATFORM=y | 27 | CONFIG_SATA_AHCI_PLATFORM=y |
| 23 | CONFIG_NETDEVICES=y | 28 | CONFIG_NETDEVICES=y |
| 29 | CONFIG_SERIAL_8250=y | ||
| 30 | CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y | ||
| 31 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 32 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
| 33 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
| 34 | CONFIG_SERIAL_8250_DW=y | ||
| 24 | CONFIG_SERIAL_AMBA_PL011=y | 35 | CONFIG_SERIAL_AMBA_PL011=y |
| 25 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | 36 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y |
| 26 | CONFIG_SERIAL_OF_PLATFORM=y | 37 | CONFIG_SERIAL_OF_PLATFORM=y |
| @@ -56,3 +67,5 @@ CONFIG_PRINTK_TIME=y | |||
| 56 | CONFIG_DEBUG_FS=y | 67 | CONFIG_DEBUG_FS=y |
| 57 | CONFIG_DEBUG_KERNEL=y | 68 | CONFIG_DEBUG_KERNEL=y |
| 58 | CONFIG_LOCKUP_DETECTOR=y | 69 | CONFIG_LOCKUP_DETECTOR=y |
| 70 | CONFIG_VFP=y | ||
| 71 | CONFIG_VFPv3=y | ||
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index a3fb8662ff6c..e688741c89aa 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig | |||
| @@ -21,7 +21,6 @@ CONFIG_ARCH_MULTI_V4T=y | |||
| 21 | CONFIG_ARCH_MULTI_V5=y | 21 | CONFIG_ARCH_MULTI_V5=y |
| 22 | # CONFIG_ARCH_MULTI_V7 is not set | 22 | # CONFIG_ARCH_MULTI_V7 is not set |
| 23 | CONFIG_ARCH_MXC=y | 23 | CONFIG_ARCH_MXC=y |
| 24 | CONFIG_MXC_IRQ_PRIOR=y | ||
| 25 | CONFIG_MACH_SCB9328=y | 24 | CONFIG_MACH_SCB9328=y |
| 26 | CONFIG_MACH_APF9328=y | 25 | CONFIG_MACH_APF9328=y |
| 27 | CONFIG_MACH_MX21ADS=y | 26 | CONFIG_MACH_MX21ADS=y |
| @@ -38,8 +37,6 @@ CONFIG_PREEMPT=y | |||
| 38 | CONFIG_AEABI=y | 37 | CONFIG_AEABI=y |
| 39 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 38 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
| 40 | CONFIG_ZBOOT_ROM_BSS=0x0 | 39 | CONFIG_ZBOOT_ROM_BSS=0x0 |
| 41 | CONFIG_FPE_NWFPE=y | ||
| 42 | CONFIG_FPE_NWFPE_XP=y | ||
| 43 | CONFIG_PM_DEBUG=y | 40 | CONFIG_PM_DEBUG=y |
| 44 | CONFIG_NET=y | 41 | CONFIG_NET=y |
| 45 | CONFIG_PACKET=y | 42 | CONFIG_PACKET=y |
| @@ -58,6 +55,7 @@ CONFIG_NETFILTER=y | |||
| 58 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 55 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
| 59 | CONFIG_DEVTMPFS=y | 56 | CONFIG_DEVTMPFS=y |
| 60 | CONFIG_DEVTMPFS_MOUNT=y | 57 | CONFIG_DEVTMPFS_MOUNT=y |
| 58 | CONFIG_IMX_WEIM=y | ||
| 61 | CONFIG_MTD=y | 59 | CONFIG_MTD=y |
| 62 | CONFIG_MTD_CMDLINE_PARTS=y | 60 | CONFIG_MTD_CMDLINE_PARTS=y |
| 63 | CONFIG_MTD_BLOCK=y | 61 | CONFIG_MTD_BLOCK=y |
| @@ -73,8 +71,8 @@ CONFIG_MTD_NAND_MXC=y | |||
| 73 | CONFIG_MTD_UBI=y | 71 | CONFIG_MTD_UBI=y |
| 74 | CONFIG_EEPROM_AT24=y | 72 | CONFIG_EEPROM_AT24=y |
| 75 | CONFIG_EEPROM_AT25=y | 73 | CONFIG_EEPROM_AT25=y |
| 76 | CONFIG_ATA=y | ||
| 77 | CONFIG_BLK_DEV_SD=y | 74 | CONFIG_BLK_DEV_SD=y |
| 75 | CONFIG_ATA=y | ||
| 78 | CONFIG_PATA_IMX=y | 76 | CONFIG_PATA_IMX=y |
| 79 | CONFIG_NETDEVICES=y | 77 | CONFIG_NETDEVICES=y |
| 80 | CONFIG_CS89x0=y | 78 | CONFIG_CS89x0=y |
| @@ -97,10 +95,8 @@ CONFIG_SERIAL_8250=m | |||
| 97 | CONFIG_SERIAL_IMX=y | 95 | CONFIG_SERIAL_IMX=y |
| 98 | CONFIG_SERIAL_IMX_CONSOLE=y | 96 | CONFIG_SERIAL_IMX_CONSOLE=y |
| 99 | # CONFIG_HW_RANDOM is not set | 97 | # CONFIG_HW_RANDOM is not set |
| 100 | CONFIG_I2C=y | ||
| 101 | CONFIG_I2C_CHARDEV=y | 98 | CONFIG_I2C_CHARDEV=y |
| 102 | CONFIG_I2C_IMX=y | 99 | CONFIG_I2C_IMX=y |
| 103 | CONFIG_SPI=y | ||
| 104 | CONFIG_SPI_IMX=y | 100 | CONFIG_SPI_IMX=y |
| 105 | CONFIG_SPI_SPIDEV=y | 101 | CONFIG_SPI_SPIDEV=y |
| 106 | CONFIG_GPIO_SYSFS=y | 102 | CONFIG_GPIO_SYSFS=y |
| @@ -127,10 +123,7 @@ CONFIG_VIDEO_CODA=y | |||
| 127 | CONFIG_SOC_CAMERA_OV2640=y | 123 | CONFIG_SOC_CAMERA_OV2640=y |
| 128 | CONFIG_FB=y | 124 | CONFIG_FB=y |
| 129 | CONFIG_FB_IMX=y | 125 | CONFIG_FB_IMX=y |
| 130 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 131 | CONFIG_LCD_CLASS_DEVICE=y | ||
| 132 | CONFIG_LCD_L4F00242T03=y | 126 | CONFIG_LCD_L4F00242T03=y |
| 133 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
| 134 | CONFIG_FRAMEBUFFER_CONSOLE=y | 127 | CONFIG_FRAMEBUFFER_CONSOLE=y |
| 135 | CONFIG_LOGO=y | 128 | CONFIG_LOGO=y |
| 136 | CONFIG_SOUND=y | 129 | CONFIG_SOUND=y |
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 16cfec4385c8..8fca6e276b69 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
| @@ -32,8 +32,8 @@ CONFIG_MACH_IMX35_DT=y | |||
| 32 | CONFIG_MACH_PCM043=y | 32 | CONFIG_MACH_PCM043=y |
| 33 | CONFIG_MACH_MX35_3DS=y | 33 | CONFIG_MACH_MX35_3DS=y |
| 34 | CONFIG_MACH_VPR200=y | 34 | CONFIG_MACH_VPR200=y |
| 35 | CONFIG_SOC_IMX51=y | ||
| 36 | CONFIG_SOC_IMX50=y | 35 | CONFIG_SOC_IMX50=y |
| 36 | CONFIG_SOC_IMX51=y | ||
| 37 | CONFIG_SOC_IMX53=y | 37 | CONFIG_SOC_IMX53=y |
| 38 | CONFIG_SOC_IMX6Q=y | 38 | CONFIG_SOC_IMX6Q=y |
| 39 | CONFIG_SOC_IMX6SL=y | 39 | CONFIG_SOC_IMX6SL=y |
| @@ -105,7 +105,6 @@ CONFIG_EEPROM_AT24=y | |||
| 105 | CONFIG_EEPROM_AT25=y | 105 | CONFIG_EEPROM_AT25=y |
| 106 | # CONFIG_SCSI_PROC_FS is not set | 106 | # CONFIG_SCSI_PROC_FS is not set |
| 107 | CONFIG_BLK_DEV_SD=y | 107 | CONFIG_BLK_DEV_SD=y |
| 108 | CONFIG_SCSI_MULTI_LUN=y | ||
| 109 | CONFIG_SCSI_CONSTANTS=y | 108 | CONFIG_SCSI_CONSTANTS=y |
| 110 | CONFIG_SCSI_LOGGING=y | 109 | CONFIG_SCSI_LOGGING=y |
| 111 | CONFIG_SCSI_SCAN_ASYNC=y | 110 | CONFIG_SCSI_SCAN_ASYNC=y |
| @@ -153,14 +152,12 @@ CONFIG_SERIAL_IMX_CONSOLE=y | |||
| 153 | CONFIG_SERIAL_FSL_LPUART=y | 152 | CONFIG_SERIAL_FSL_LPUART=y |
| 154 | CONFIG_SERIAL_FSL_LPUART_CONSOLE=y | 153 | CONFIG_SERIAL_FSL_LPUART_CONSOLE=y |
| 155 | CONFIG_HW_RANDOM=y | 154 | CONFIG_HW_RANDOM=y |
| 156 | CONFIG_HW_RANDOM_MXC_RNGA=y | ||
| 157 | # CONFIG_I2C_COMPAT is not set | 155 | # CONFIG_I2C_COMPAT is not set |
| 158 | CONFIG_I2C_CHARDEV=y | 156 | CONFIG_I2C_CHARDEV=y |
| 159 | # CONFIG_I2C_HELPER_AUTO is not set | 157 | # CONFIG_I2C_HELPER_AUTO is not set |
| 160 | CONFIG_I2C_ALGOPCF=m | 158 | CONFIG_I2C_ALGOPCF=m |
| 161 | CONFIG_I2C_ALGOPCA=m | 159 | CONFIG_I2C_ALGOPCA=m |
| 162 | CONFIG_I2C_IMX=y | 160 | CONFIG_I2C_IMX=y |
| 163 | CONFIG_SPI=y | ||
| 164 | CONFIG_SPI_IMX=y | 161 | CONFIG_SPI_IMX=y |
| 165 | CONFIG_GPIO_SYSFS=y | 162 | CONFIG_GPIO_SYSFS=y |
| 166 | CONFIG_GPIO_MC9S08DZ60=y | 163 | CONFIG_GPIO_MC9S08DZ60=y |
| @@ -198,7 +195,6 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y | |||
| 198 | CONFIG_LCD_CLASS_DEVICE=y | 195 | CONFIG_LCD_CLASS_DEVICE=y |
| 199 | CONFIG_LCD_L4F00242T03=y | 196 | CONFIG_LCD_L4F00242T03=y |
| 200 | CONFIG_LCD_PLATFORM=y | 197 | CONFIG_LCD_PLATFORM=y |
| 201 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
| 202 | CONFIG_BACKLIGHT_PWM=y | 198 | CONFIG_BACKLIGHT_PWM=y |
| 203 | CONFIG_BACKLIGHT_GPIO=y | 199 | CONFIG_BACKLIGHT_GPIO=y |
| 204 | CONFIG_FRAMEBUFFER_CONSOLE=y | 200 | CONFIG_FRAMEBUFFER_CONSOLE=y |
| @@ -206,6 +202,7 @@ CONFIG_LOGO=y | |||
| 206 | CONFIG_SOUND=y | 202 | CONFIG_SOUND=y |
| 207 | CONFIG_SND=y | 203 | CONFIG_SND=y |
| 208 | CONFIG_SND_SOC=y | 204 | CONFIG_SND_SOC=y |
| 205 | CONFIG_SND_SOC_FSL_SAI=y | ||
| 209 | CONFIG_SND_IMX_SOC=y | 206 | CONFIG_SND_IMX_SOC=y |
| 210 | CONFIG_SND_SOC_PHYCORE_AC97=y | 207 | CONFIG_SND_SOC_PHYCORE_AC97=y |
| 211 | CONFIG_SND_SOC_EUKREA_TLV320=y | 208 | CONFIG_SND_SOC_EUKREA_TLV320=y |
| @@ -213,6 +210,7 @@ CONFIG_SND_SOC_IMX_WM8962=y | |||
| 213 | CONFIG_SND_SOC_IMX_SGTL5000=y | 210 | CONFIG_SND_SOC_IMX_SGTL5000=y |
| 214 | CONFIG_SND_SOC_IMX_SPDIF=y | 211 | CONFIG_SND_SOC_IMX_SPDIF=y |
| 215 | CONFIG_SND_SOC_IMX_MC13783=y | 212 | CONFIG_SND_SOC_IMX_MC13783=y |
| 213 | CONFIG_SND_SIMPLE_CARD=y | ||
| 216 | CONFIG_USB=y | 214 | CONFIG_USB=y |
| 217 | CONFIG_USB_EHCI_HCD=y | 215 | CONFIG_USB_EHCI_HCD=y |
| 218 | CONFIG_USB_EHCI_MXC=y | 216 | CONFIG_USB_EHCI_MXC=y |
| @@ -240,6 +238,7 @@ CONFIG_LEDS_TRIGGER_BACKLIGHT=y | |||
| 240 | CONFIG_LEDS_TRIGGER_GPIO=y | 238 | CONFIG_LEDS_TRIGGER_GPIO=y |
| 241 | CONFIG_RTC_CLASS=y | 239 | CONFIG_RTC_CLASS=y |
| 242 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | 240 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y |
| 241 | CONFIG_RTC_DRV_ISL1208=y | ||
| 243 | CONFIG_RTC_DRV_PCF8563=y | 242 | CONFIG_RTC_DRV_PCF8563=y |
| 244 | CONFIG_RTC_DRV_MC13XXX=y | 243 | CONFIG_RTC_DRV_MC13XXX=y |
| 245 | CONFIG_RTC_DRV_MXC=y | 244 | CONFIG_RTC_DRV_MXC=y |
| @@ -254,7 +253,6 @@ CONFIG_DRM_IMX_FB_HELPER=y | |||
| 254 | CONFIG_DRM_IMX_PARALLEL_DISPLAY=y | 253 | CONFIG_DRM_IMX_PARALLEL_DISPLAY=y |
| 255 | CONFIG_DRM_IMX_TVE=y | 254 | CONFIG_DRM_IMX_TVE=y |
| 256 | CONFIG_DRM_IMX_LDB=y | 255 | CONFIG_DRM_IMX_LDB=y |
| 257 | CONFIG_DRM_IMX_IPUV3_CORE=y | ||
| 258 | CONFIG_DRM_IMX_IPUV3=y | 256 | CONFIG_DRM_IMX_IPUV3=y |
| 259 | CONFIG_DRM_IMX_HDMI=y | 257 | CONFIG_DRM_IMX_HDMI=y |
| 260 | # CONFIG_IOMMU_SUPPORT is not set | 258 | # CONFIG_IOMMU_SUPPORT is not set |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 5fb95fb758d9..691117bc7e2b 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
| @@ -28,6 +28,7 @@ CONFIG_ARCH_HIGHBANK=y | |||
| 28 | CONFIG_ARCH_HISI=y | 28 | CONFIG_ARCH_HISI=y |
| 29 | CONFIG_ARCH_HI3xxx=y | 29 | CONFIG_ARCH_HI3xxx=y |
| 30 | CONFIG_ARCH_HIX5HD2=y | 30 | CONFIG_ARCH_HIX5HD2=y |
| 31 | CONFIG_ARCH_HIP04=y | ||
| 31 | CONFIG_ARCH_KEYSTONE=y | 32 | CONFIG_ARCH_KEYSTONE=y |
| 32 | CONFIG_ARCH_MXC=y | 33 | CONFIG_ARCH_MXC=y |
| 33 | CONFIG_SOC_IMX51=y | 34 | CONFIG_SOC_IMX51=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index f650f00e8cee..69c7bed3c634 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
| @@ -1,11 +1,28 @@ | |||
| 1 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 2 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
| 3 | CONFIG_FHANDLE=y | ||
| 4 | CONFIG_AUDIT=y | ||
| 3 | CONFIG_NO_HZ=y | 5 | CONFIG_NO_HZ=y |
| 4 | CONFIG_HIGH_RES_TIMERS=y | 6 | CONFIG_HIGH_RES_TIMERS=y |
| 5 | CONFIG_BSD_PROCESS_ACCT=y | 7 | CONFIG_BSD_PROCESS_ACCT=y |
| 6 | CONFIG_IKCONFIG=y | 8 | CONFIG_IKCONFIG=y |
| 7 | CONFIG_IKCONFIG_PROC=y | 9 | CONFIG_IKCONFIG_PROC=y |
| 8 | CONFIG_LOG_BUF_SHIFT=16 | 10 | CONFIG_LOG_BUF_SHIFT=16 |
| 11 | CONFIG_CGROUPS=y | ||
| 12 | CONFIG_CGROUP_FREEZER=y | ||
| 13 | CONFIG_CGROUP_DEVICE=y | ||
| 14 | CONFIG_CPUSETS=y | ||
| 15 | CONFIG_CGROUP_CPUACCT=y | ||
| 16 | CONFIG_RESOURCE_COUNTERS=y | ||
| 17 | CONFIG_MEMCG=y | ||
| 18 | CONFIG_MEMCG_SWAP=y | ||
| 19 | CONFIG_MEMCG_KMEM=y | ||
| 20 | CONFIG_CGROUP_PERF=y | ||
| 21 | CONFIG_CGROUP_SCHED=y | ||
| 22 | CONFIG_CFS_BANDWIDTH=y | ||
| 23 | CONFIG_RT_GROUP_SCHED=y | ||
| 24 | CONFIG_BLK_CGROUP=y | ||
| 25 | CONFIG_NAMESPACES=y | ||
| 9 | CONFIG_BLK_DEV_INITRD=y | 26 | CONFIG_BLK_DEV_INITRD=y |
| 10 | CONFIG_EXPERT=y | 27 | CONFIG_EXPERT=y |
| 11 | CONFIG_SLAB=y | 28 | CONFIG_SLAB=y |
| @@ -32,19 +49,26 @@ CONFIG_SOC_OMAP5=y | |||
| 32 | CONFIG_SOC_AM33XX=y | 49 | CONFIG_SOC_AM33XX=y |
| 33 | CONFIG_SOC_AM43XX=y | 50 | CONFIG_SOC_AM43XX=y |
| 34 | CONFIG_SOC_DRA7XX=y | 51 | CONFIG_SOC_DRA7XX=y |
| 35 | CONFIG_CACHE_L2X0=y | ||
| 36 | CONFIG_ARM_THUMBEE=y | 52 | CONFIG_ARM_THUMBEE=y |
| 37 | CONFIG_ARM_ERRATA_411920=y | 53 | CONFIG_ARM_ERRATA_411920=y |
| 38 | CONFIG_SMP=y | 54 | CONFIG_SMP=y |
| 39 | CONFIG_NR_CPUS=2 | 55 | CONFIG_NR_CPUS=2 |
| 40 | CONFIG_CMA=y | 56 | CONFIG_CMA=y |
| 57 | CONFIG_SECCOMP=y | ||
| 41 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 58 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
| 42 | CONFIG_ZBOOT_ROM_BSS=0x0 | 59 | CONFIG_ZBOOT_ROM_BSS=0x0 |
| 43 | CONFIG_ARM_APPENDED_DTB=y | 60 | CONFIG_ARM_APPENDED_DTB=y |
| 44 | CONFIG_ARM_ATAG_DTB_COMPAT=y | 61 | CONFIG_ARM_ATAG_DTB_COMPAT=y |
| 45 | CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" | 62 | CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" |
| 46 | CONFIG_KEXEC=y | 63 | CONFIG_KEXEC=y |
| 47 | CONFIG_FPE_NWFPE=y | 64 | CONFIG_CPU_FREQ=y |
| 65 | CONFIG_CPU_FREQ_STAT_DETAILS=y | ||
| 66 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | ||
| 67 | CONFIG_CPU_FREQ_GOV_POWERSAVE=y | ||
| 68 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | ||
| 69 | CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y | ||
| 70 | CONFIG_GENERIC_CPUFREQ_CPU0=y | ||
| 71 | # CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set | ||
| 48 | CONFIG_CPU_IDLE=y | 72 | CONFIG_CPU_IDLE=y |
| 49 | CONFIG_BINFMT_MISC=y | 73 | CONFIG_BINFMT_MISC=y |
| 50 | CONFIG_PM_DEBUG=y | 74 | CONFIG_PM_DEBUG=y |
| @@ -61,7 +85,7 @@ CONFIG_IP_PNP_DHCP=y | |||
| 61 | CONFIG_IP_PNP_BOOTP=y | 85 | CONFIG_IP_PNP_BOOTP=y |
| 62 | CONFIG_IP_PNP_RARP=y | 86 | CONFIG_IP_PNP_RARP=y |
| 63 | # CONFIG_INET_LRO is not set | 87 | # CONFIG_INET_LRO is not set |
| 64 | # CONFIG_IPV6 is not set | 88 | CONFIG_IPV6=y |
| 65 | CONFIG_NETFILTER=y | 89 | CONFIG_NETFILTER=y |
| 66 | CONFIG_CAN=m | 90 | CONFIG_CAN=m |
| 67 | CONFIG_CAN_C_CAN=m | 91 | CONFIG_CAN_C_CAN=m |
| @@ -75,9 +99,6 @@ CONFIG_BT_HCIBCM203X=m | |||
| 75 | CONFIG_BT_HCIBPA10X=m | 99 | CONFIG_BT_HCIBPA10X=m |
| 76 | CONFIG_CFG80211=m | 100 | CONFIG_CFG80211=m |
| 77 | CONFIG_MAC80211=m | 101 | CONFIG_MAC80211=m |
| 78 | CONFIG_MAC80211_RC_PID=y | ||
| 79 | CONFIG_MAC80211_RC_DEFAULT_PID=y | ||
| 80 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 81 | CONFIG_DEVTMPFS=y | 102 | CONFIG_DEVTMPFS=y |
| 82 | CONFIG_DEVTMPFS_MOUNT=y | 103 | CONFIG_DEVTMPFS_MOUNT=y |
| 83 | CONFIG_DMA_CMA=y | 104 | CONFIG_DMA_CMA=y |
| @@ -101,9 +122,9 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 | |||
| 101 | CONFIG_SENSORS_TSL2550=m | 122 | CONFIG_SENSORS_TSL2550=m |
| 102 | CONFIG_BMP085_I2C=m | 123 | CONFIG_BMP085_I2C=m |
| 103 | CONFIG_SENSORS_LIS3_I2C=m | 124 | CONFIG_SENSORS_LIS3_I2C=m |
| 125 | CONFIG_SRAM=y | ||
| 104 | CONFIG_SCSI=y | 126 | CONFIG_SCSI=y |
| 105 | CONFIG_BLK_DEV_SD=y | 127 | CONFIG_BLK_DEV_SD=y |
| 106 | CONFIG_SCSI_MULTI_LUN=y | ||
| 107 | CONFIG_SCSI_SCAN_ASYNC=y | 128 | CONFIG_SCSI_SCAN_ASYNC=y |
| 108 | CONFIG_MD=y | 129 | CONFIG_MD=y |
| 109 | CONFIG_NETDEVICES=y | 130 | CONFIG_NETDEVICES=y |
| @@ -138,7 +159,9 @@ CONFIG_KEYBOARD_GPIO=y | |||
| 138 | CONFIG_KEYBOARD_MATRIX=m | 159 | CONFIG_KEYBOARD_MATRIX=m |
| 139 | CONFIG_KEYBOARD_TWL4030=y | 160 | CONFIG_KEYBOARD_TWL4030=y |
| 140 | CONFIG_INPUT_TOUCHSCREEN=y | 161 | CONFIG_INPUT_TOUCHSCREEN=y |
| 141 | CONFIG_TOUCHSCREEN_ADS7846=y | 162 | CONFIG_TOUCHSCREEN_ADS7846=m |
| 163 | CONFIG_TOUCHSCREEN_TSC2005=m | ||
| 164 | CONFIG_TOUCHSCREEN_TSC2007=m | ||
| 142 | CONFIG_INPUT_MISC=y | 165 | CONFIG_INPUT_MISC=y |
| 143 | CONFIG_INPUT_TWL4030_PWRBUTTON=y | 166 | CONFIG_INPUT_TWL4030_PWRBUTTON=y |
| 144 | # CONFIG_LEGACY_PTYS is not set | 167 | # CONFIG_LEGACY_PTYS is not set |
| @@ -162,7 +185,13 @@ CONFIG_DEBUG_GPIO=y | |||
| 162 | CONFIG_GPIO_SYSFS=y | 185 | CONFIG_GPIO_SYSFS=y |
| 163 | CONFIG_GPIO_TWL4030=y | 186 | CONFIG_GPIO_TWL4030=y |
| 164 | CONFIG_W1=y | 187 | CONFIG_W1=y |
| 165 | CONFIG_POWER_SUPPLY=y | 188 | CONFIG_BATTERY_BQ27x00=m |
| 189 | CONFIG_CHARGER_ISP1704=m | ||
| 190 | CONFIG_CHARGER_TWL4030=m | ||
| 191 | CONFIG_CHARGER_BQ2415X=m | ||
| 192 | CONFIG_CHARGER_BQ24190=m | ||
| 193 | CONFIG_CHARGER_BQ24735=m | ||
| 194 | CONFIG_POWER_RESET=y | ||
| 166 | CONFIG_POWER_AVS=y | 195 | CONFIG_POWER_AVS=y |
| 167 | CONFIG_SENSORS_LM75=m | 196 | CONFIG_SENSORS_LM75=m |
| 168 | CONFIG_THERMAL=y | 197 | CONFIG_THERMAL=y |
| @@ -183,8 +212,8 @@ CONFIG_MFD_TPS65217=y | |||
| 183 | CONFIG_MFD_TPS65218=y | 212 | CONFIG_MFD_TPS65218=y |
| 184 | CONFIG_MFD_TPS65910=y | 213 | CONFIG_MFD_TPS65910=y |
| 185 | CONFIG_TWL6040_CORE=y | 214 | CONFIG_TWL6040_CORE=y |
| 186 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | ||
| 187 | CONFIG_REGULATOR_PALMAS=y | 215 | CONFIG_REGULATOR_PALMAS=y |
| 216 | CONFIG_REGULATOR_PBIAS=y | ||
| 188 | CONFIG_REGULATOR_TI_ABB=y | 217 | CONFIG_REGULATOR_TI_ABB=y |
| 189 | CONFIG_REGULATOR_TPS65023=y | 218 | CONFIG_REGULATOR_TPS65023=y |
| 190 | CONFIG_REGULATOR_TPS6507X=y | 219 | CONFIG_REGULATOR_TPS6507X=y |
| @@ -192,12 +221,12 @@ CONFIG_REGULATOR_TPS65217=y | |||
| 192 | CONFIG_REGULATOR_TPS65218=y | 221 | CONFIG_REGULATOR_TPS65218=y |
| 193 | CONFIG_REGULATOR_TPS65910=y | 222 | CONFIG_REGULATOR_TPS65910=y |
| 194 | CONFIG_REGULATOR_TWL4030=y | 223 | CONFIG_REGULATOR_TWL4030=y |
| 195 | CONFIG_REGULATOR_PBIAS=y | ||
| 196 | CONFIG_FB=y | 224 | CONFIG_FB=y |
| 197 | CONFIG_FIRMWARE_EDID=y | 225 | CONFIG_FIRMWARE_EDID=y |
| 198 | CONFIG_FB_MODE_HELPERS=y | 226 | CONFIG_FB_MODE_HELPERS=y |
| 199 | CONFIG_FB_TILEBLITTING=y | 227 | CONFIG_FB_TILEBLITTING=y |
| 200 | CONFIG_OMAP2_DSS=m | 228 | CONFIG_OMAP2_DSS=m |
| 229 | CONFIG_OMAP5_DSS_HDMI=y | ||
| 201 | CONFIG_OMAP2_DSS_SDI=y | 230 | CONFIG_OMAP2_DSS_SDI=y |
| 202 | CONFIG_OMAP2_DSS_DSI=y | 231 | CONFIG_OMAP2_DSS_DSI=y |
| 203 | CONFIG_FB_OMAP2=m | 232 | CONFIG_FB_OMAP2=m |
| @@ -205,11 +234,25 @@ CONFIG_DISPLAY_ENCODER_TFP410=m | |||
| 205 | CONFIG_DISPLAY_ENCODER_TPD12S015=m | 234 | CONFIG_DISPLAY_ENCODER_TPD12S015=m |
| 206 | CONFIG_DISPLAY_CONNECTOR_DVI=m | 235 | CONFIG_DISPLAY_CONNECTOR_DVI=m |
| 207 | CONFIG_DISPLAY_CONNECTOR_HDMI=m | 236 | CONFIG_DISPLAY_CONNECTOR_HDMI=m |
| 237 | CONFIG_DISPLAY_CONNECTOR_ANALOG_TV=m | ||
| 208 | CONFIG_DISPLAY_PANEL_DPI=m | 238 | CONFIG_DISPLAY_PANEL_DPI=m |
| 239 | CONFIG_DISPLAY_PANEL_DSI_CM=m | ||
| 240 | CONFIG_DISPLAY_PANEL_SONY_ACX565AKM=m | ||
| 241 | CONFIG_DISPLAY_PANEL_LGPHILIPS_LB035Q02=m | ||
| 242 | CONFIG_DISPLAY_PANEL_SHARP_LS037V7DW01=m | ||
| 243 | CONFIG_DISPLAY_PANEL_TPO_TD028TTEC1=m | ||
| 244 | CONFIG_DISPLAY_PANEL_TPO_TD043MTEA1=m | ||
| 245 | CONFIG_DISPLAY_PANEL_NEC_NL8048HL11=m | ||
| 209 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 246 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
| 210 | CONFIG_LCD_CLASS_DEVICE=y | 247 | CONFIG_LCD_CLASS_DEVICE=y |
| 211 | CONFIG_LCD_PLATFORM=y | 248 | CONFIG_LCD_PLATFORM=y |
| 249 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
| 250 | CONFIG_BACKLIGHT_GENERIC=m | ||
| 251 | CONFIG_BACKLIGHT_PWM=m | ||
| 252 | CONFIG_BACKLIGHT_PANDORA=m | ||
| 253 | CONFIG_BACKLIGHT_GPIO=m | ||
| 212 | CONFIG_FRAMEBUFFER_CONSOLE=y | 254 | CONFIG_FRAMEBUFFER_CONSOLE=y |
| 255 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
| 213 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | 256 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y |
| 214 | CONFIG_LOGO=y | 257 | CONFIG_LOGO=y |
| 215 | CONFIG_SOUND=m | 258 | CONFIG_SOUND=m |
| @@ -221,8 +264,6 @@ CONFIG_SND_DEBUG=y | |||
| 221 | CONFIG_SND_USB_AUDIO=m | 264 | CONFIG_SND_USB_AUDIO=m |
| 222 | CONFIG_SND_SOC=m | 265 | CONFIG_SND_SOC=m |
| 223 | CONFIG_SND_OMAP_SOC=m | 266 | CONFIG_SND_OMAP_SOC=m |
| 224 | CONFIG_SND_AM33XX_SOC_EVM=m | ||
| 225 | CONFIG_SND_DAVINCI_SOC=m | ||
| 226 | CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m | 267 | CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m |
| 227 | CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m | 268 | CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m |
| 228 | CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m | 269 | CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m |
| @@ -233,9 +274,6 @@ CONFIG_USB_WDM=y | |||
| 233 | CONFIG_USB_STORAGE=y | 274 | CONFIG_USB_STORAGE=y |
| 234 | CONFIG_USB_DWC3=m | 275 | CONFIG_USB_DWC3=m |
| 235 | CONFIG_USB_TEST=y | 276 | CONFIG_USB_TEST=y |
| 236 | CONFIG_NOP_USB_XCEIV=y | ||
| 237 | CONFIG_OMAP_USB2=y | ||
| 238 | CONFIG_TI_PIPE3=y | ||
| 239 | CONFIG_AM335X_PHY_USB=y | 277 | CONFIG_AM335X_PHY_USB=y |
| 240 | CONFIG_USB_GADGET=y | 278 | CONFIG_USB_GADGET=y |
| 241 | CONFIG_USB_GADGET_DEBUG=y | 279 | CONFIG_USB_GADGET_DEBUG=y |
| @@ -243,7 +281,6 @@ CONFIG_USB_GADGET_DEBUG_FILES=y | |||
| 243 | CONFIG_USB_GADGET_DEBUG_FS=y | 281 | CONFIG_USB_GADGET_DEBUG_FS=y |
| 244 | CONFIG_USB_ZERO=m | 282 | CONFIG_USB_ZERO=m |
| 245 | CONFIG_MMC=y | 283 | CONFIG_MMC=y |
| 246 | CONFIG_MMC_UNSAFE_RESUME=y | ||
| 247 | CONFIG_SDIO_UART=y | 284 | CONFIG_SDIO_UART=y |
| 248 | CONFIG_MMC_OMAP=y | 285 | CONFIG_MMC_OMAP=y |
| 249 | CONFIG_MMC_OMAP_HS=y | 286 | CONFIG_MMC_OMAP_HS=y |
| @@ -267,15 +304,23 @@ CONFIG_TI_EDMA=y | |||
| 267 | CONFIG_DMA_OMAP=y | 304 | CONFIG_DMA_OMAP=y |
| 268 | CONFIG_EXTCON=y | 305 | CONFIG_EXTCON=y |
| 269 | CONFIG_EXTCON_PALMAS=y | 306 | CONFIG_EXTCON_PALMAS=y |
| 307 | CONFIG_PWM=y | ||
| 308 | CONFIG_PWM_TWL=y | ||
| 309 | CONFIG_PWM_TWL_LED=y | ||
| 310 | CONFIG_OMAP_USB2=y | ||
| 311 | CONFIG_TI_PIPE3=y | ||
| 270 | CONFIG_EXT2_FS=y | 312 | CONFIG_EXT2_FS=y |
| 271 | CONFIG_EXT3_FS=y | 313 | CONFIG_EXT3_FS=y |
| 272 | # CONFIG_EXT3_FS_XATTR is not set | 314 | # CONFIG_EXT3_FS_XATTR is not set |
| 273 | CONFIG_EXT4_FS=y | 315 | CONFIG_EXT4_FS=y |
| 316 | CONFIG_FANOTIFY=y | ||
| 274 | CONFIG_QUOTA=y | 317 | CONFIG_QUOTA=y |
| 275 | CONFIG_QFMT_V2=y | 318 | CONFIG_QFMT_V2=y |
| 319 | CONFIG_AUTOFS4_FS=y | ||
| 276 | CONFIG_MSDOS_FS=y | 320 | CONFIG_MSDOS_FS=y |
| 277 | CONFIG_VFAT_FS=y | 321 | CONFIG_VFAT_FS=y |
| 278 | CONFIG_TMPFS=y | 322 | CONFIG_TMPFS=y |
| 323 | CONFIG_TMPFS_POSIX_ACL=y | ||
| 279 | CONFIG_JFFS2_FS=y | 324 | CONFIG_JFFS2_FS=y |
| 280 | CONFIG_JFFS2_SUMMARY=y | 325 | CONFIG_JFFS2_SUMMARY=y |
| 281 | CONFIG_JFFS2_FS_XATTR=y | 326 | CONFIG_JFFS2_FS_XATTR=y |
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 4414990521d3..12007282b557 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig | |||
| @@ -19,6 +19,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y | |||
| 19 | CONFIG_ARCH_AT91=y | 19 | CONFIG_ARCH_AT91=y |
| 20 | CONFIG_SOC_SAM_V7=y | 20 | CONFIG_SOC_SAM_V7=y |
| 21 | CONFIG_SOC_SAMA5D3=y | 21 | CONFIG_SOC_SAMA5D3=y |
| 22 | CONFIG_SOC_SAMA5D4=y | ||
| 22 | CONFIG_MACH_SAMA5_DT=y | 23 | CONFIG_MACH_SAMA5_DT=y |
| 23 | CONFIG_AEABI=y | 24 | CONFIG_AEABI=y |
| 24 | # CONFIG_OABI_COMPAT is not set | 25 | # CONFIG_OABI_COMPAT is not set |
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index 57ff7f2a3084..d428e386c88e 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h | |||
| @@ -20,7 +20,12 @@ | |||
| 20 | * to consider dynamic allocation. | 20 | * to consider dynamic allocation. |
| 21 | */ | 21 | */ |
| 22 | #define MAX_CPUS_PER_CLUSTER 4 | 22 | #define MAX_CPUS_PER_CLUSTER 4 |
| 23 | |||
| 24 | #ifdef CONFIG_MCPM_QUAD_CLUSTER | ||
| 25 | #define MAX_NR_CLUSTERS 4 | ||
| 26 | #else | ||
| 23 | #define MAX_NR_CLUSTERS 2 | 27 | #define MAX_NR_CLUSTERS 2 |
| 28 | #endif | ||
| 24 | 29 | ||
| 25 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
| 26 | 31 | ||
diff --git a/arch/arm/include/debug/bcm63xx.S b/arch/arm/include/debug/bcm63xx.S new file mode 100644 index 000000000000..e7164d570f44 --- /dev/null +++ b/arch/arm/include/debug/bcm63xx.S | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * Broadcom BCM63xx low-level UART debug | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Broadcom Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <linux/serial_bcm63xx.h> | ||
| 12 | |||
| 13 | .macro addruart, rp, rv, tmp | ||
| 14 | ldr \rp, =CONFIG_DEBUG_UART_PHYS | ||
| 15 | ldr \rv, =CONFIG_DEBUG_UART_VIRT | ||
| 16 | .endm | ||
| 17 | |||
| 18 | .macro senduart, rd, rx | ||
| 19 | /* word access do not work */ | ||
| 20 | strb \rd, [\rx, #UART_FIFO_REG] | ||
| 21 | .endm | ||
| 22 | |||
| 23 | .macro waituart, rd, rx | ||
| 24 | 1001: ldr \rd, [\rx, #UART_IR_REG] | ||
| 25 | tst \rd, #(1 << UART_IR_TXEMPTY) | ||
| 26 | beq 1001b | ||
| 27 | .endm | ||
| 28 | |||
| 29 | .macro busyuart, rd, rx | ||
| 30 | 1002: ldr \rd, [\rx, #UART_IR_REG] | ||
| 31 | tst \rd, #(1 << UART_IR_TXTRESH) | ||
| 32 | beq 1002b | ||
| 33 | .endm | ||
diff --git a/arch/arm/include/debug/meson.S b/arch/arm/include/debug/meson.S new file mode 100644 index 000000000000..1bae99bf6f11 --- /dev/null +++ b/arch/arm/include/debug/meson.S | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Carlo Caione | ||
| 3 | * Carlo Caione <carlo@caione.org> | ||
| 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 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #define MESON_AO_UART_WFIFO 0x0 | ||
| 11 | #define MESON_AO_UART_STATUS 0xc | ||
| 12 | |||
| 13 | #define MESON_AO_UART_TX_FIFO_EMPTY (1 << 22) | ||
| 14 | #define MESON_AO_UART_TX_FIFO_FULL (1 << 21) | ||
| 15 | |||
| 16 | .macro addruart, rp, rv, tmp | ||
| 17 | ldr \rp, =(CONFIG_DEBUG_UART_PHYS) @ physical | ||
| 18 | ldr \rv, =(CONFIG_DEBUG_UART_VIRT) @ virtual | ||
| 19 | .endm | ||
| 20 | |||
| 21 | .macro senduart,rd,rx | ||
| 22 | str \rd, [\rx, #MESON_AO_UART_WFIFO] | ||
| 23 | .endm | ||
| 24 | |||
| 25 | .macro busyuart,rd,rx | ||
| 26 | 1002: ldr \rd, [\rx, #MESON_AO_UART_STATUS] | ||
| 27 | tst \rd, #MESON_AO_UART_TX_FIFO_EMPTY | ||
| 28 | beq 1002b | ||
| 29 | .endm | ||
| 30 | |||
| 31 | .macro waituart,rd,rx | ||
| 32 | 1001: ldr \rd, [\rx, #MESON_AO_UART_STATUS] | ||
| 33 | tst \rd, #MESON_AO_UART_TX_FIFO_FULL | ||
| 34 | bne 1001b | ||
| 35 | .endm | ||
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index dd28e1fedbdc..1947a09e5a3f 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
| @@ -12,6 +12,9 @@ config HAVE_AT91_DBGU0 | |||
| 12 | config HAVE_AT91_DBGU1 | 12 | config HAVE_AT91_DBGU1 |
| 13 | bool | 13 | bool |
| 14 | 14 | ||
| 15 | config HAVE_AT91_DBGU2 | ||
| 16 | bool | ||
| 17 | |||
| 15 | config AT91_USE_OLD_CLK | 18 | config AT91_USE_OLD_CLK |
| 16 | bool | 19 | bool |
| 17 | 20 | ||
| @@ -47,6 +50,9 @@ config AT91_SAM9_TIME | |||
| 47 | config HAVE_AT91_SMD | 50 | config HAVE_AT91_SMD |
| 48 | bool | 51 | bool |
| 49 | 52 | ||
| 53 | config HAVE_AT91_H32MX | ||
| 54 | bool | ||
| 55 | |||
| 50 | config SOC_AT91SAM9 | 56 | config SOC_AT91SAM9 |
| 51 | bool | 57 | bool |
| 52 | select AT91_SAM9_TIME | 58 | select AT91_SAM9_TIME |
| @@ -105,6 +111,21 @@ config SOC_SAMA5D3 | |||
| 105 | help | 111 | help |
| 106 | Select this if you are using one of Atmel's SAMA5D3 family SoC. | 112 | Select this if you are using one of Atmel's SAMA5D3 family SoC. |
| 107 | This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. | 113 | This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. |
| 114 | |||
| 115 | config SOC_SAMA5D4 | ||
| 116 | bool "SAMA5D4 family" | ||
| 117 | select SOC_SAMA5 | ||
| 118 | select HAVE_AT91_DBGU2 | ||
| 119 | select CLKSRC_MMIO | ||
| 120 | select CACHE_L2X0 | ||
| 121 | select CACHE_PL310 | ||
| 122 | select HAVE_FB_ATMEL | ||
| 123 | select HAVE_AT91_UTMI | ||
| 124 | select HAVE_AT91_SMD | ||
| 125 | select HAVE_AT91_USB_CLK | ||
| 126 | select HAVE_AT91_H32MX | ||
| 127 | help | ||
| 128 | Select this if you are using one of Atmel's SAMA5D4 family SoC. | ||
| 108 | endif | 129 | endif |
| 109 | 130 | ||
| 110 | if SOC_SAM_V4_V5 | 131 | if SOC_SAM_V4_V5 |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 40946f4e8921..603365e44ed5 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
| @@ -24,6 +24,7 @@ obj-$(CONFIG_SOC_AT91SAM9N12) += at91sam9n12.o | |||
| 24 | obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o | 24 | obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o |
| 25 | obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o | 25 | obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o |
| 26 | obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o | 26 | obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o |
| 27 | obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o | ||
| 27 | 28 | ||
| 28 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o | 29 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o |
| 29 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o | 30 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o |
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index d6fe04bcaabd..4cc84e8a3289 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c | |||
| @@ -62,7 +62,7 @@ static void __init sama5_dt_device_init(void) | |||
| 62 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 62 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | static const char *sama5_dt_board_compat[] __initdata = { | 65 | static const char *sama5_dt_board_compat[] __initconst = { |
| 66 | "atmel,sama5", | 66 | "atmel,sama5", |
| 67 | NULL | 67 | NULL |
| 68 | }; | 68 | }; |
| @@ -75,3 +75,17 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") | |||
| 75 | .init_machine = sama5_dt_device_init, | 75 | .init_machine = sama5_dt_device_init, |
| 76 | .dt_compat = sama5_dt_board_compat, | 76 | .dt_compat = sama5_dt_board_compat, |
| 77 | MACHINE_END | 77 | MACHINE_END |
| 78 | |||
| 79 | static const char *sama5_alt_dt_board_compat[] __initconst = { | ||
| 80 | "atmel,sama5d4", | ||
| 81 | NULL | ||
| 82 | }; | ||
| 83 | |||
| 84 | DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5 (Device Tree)") | ||
| 85 | /* Maintainer: Atmel */ | ||
| 86 | .map_io = at91_alt_map_io, | ||
| 87 | .init_early = at91_dt_initialize, | ||
| 88 | .init_machine = sama5_dt_device_init, | ||
| 89 | .dt_compat = sama5_alt_dt_board_compat, | ||
| 90 | .l2c_aux_mask = ~0UL, | ||
| 91 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 631fa3b8c16d..cddf1e51c50e 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | /* Map io */ | 15 | /* Map io */ |
| 16 | extern void __init at91_map_io(void); | 16 | extern void __init at91_map_io(void); |
| 17 | extern void __init at91_alt_map_io(void); | ||
| 17 | extern void __init at91_init_sram(int bank, unsigned long base, | 18 | extern void __init at91_init_sram(int bank, unsigned long base, |
| 18 | unsigned int length); | 19 | unsigned int length); |
| 19 | 20 | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 86c71debab5b..b27e9ca65653 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define ARCH_ID_AT91M40807 0x14080745 | 36 | #define ARCH_ID_AT91M40807 0x14080745 |
| 37 | #define ARCH_ID_AT91R40008 0x44000840 | 37 | #define ARCH_ID_AT91R40008 0x44000840 |
| 38 | 38 | ||
| 39 | #define ARCH_ID_SAMA5D3 0x8A5C07C0 | 39 | #define ARCH_ID_SAMA5 0x8A5C07C0 |
| 40 | 40 | ||
| 41 | #define ARCH_EXID_AT91SAM9M11 0x00000001 | 41 | #define ARCH_EXID_AT91SAM9M11 0x00000001 |
| 42 | #define ARCH_EXID_AT91SAM9M10 0x00000002 | 42 | #define ARCH_EXID_AT91SAM9M10 0x00000002 |
| @@ -49,12 +49,19 @@ | |||
| 49 | #define ARCH_EXID_AT91SAM9G25 0x00000003 | 49 | #define ARCH_EXID_AT91SAM9G25 0x00000003 |
| 50 | #define ARCH_EXID_AT91SAM9X25 0x00000004 | 50 | #define ARCH_EXID_AT91SAM9X25 0x00000004 |
| 51 | 51 | ||
| 52 | #define ARCH_EXID_SAMA5D3 0x00004300 | ||
| 52 | #define ARCH_EXID_SAMA5D31 0x00444300 | 53 | #define ARCH_EXID_SAMA5D31 0x00444300 |
| 53 | #define ARCH_EXID_SAMA5D33 0x00414300 | 54 | #define ARCH_EXID_SAMA5D33 0x00414300 |
| 54 | #define ARCH_EXID_SAMA5D34 0x00414301 | 55 | #define ARCH_EXID_SAMA5D34 0x00414301 |
| 55 | #define ARCH_EXID_SAMA5D35 0x00584300 | 56 | #define ARCH_EXID_SAMA5D35 0x00584300 |
| 56 | #define ARCH_EXID_SAMA5D36 0x00004301 | 57 | #define ARCH_EXID_SAMA5D36 0x00004301 |
| 57 | 58 | ||
| 59 | #define ARCH_EXID_SAMA5D4 0x00000007 | ||
| 60 | #define ARCH_EXID_SAMA5D41 0x00000001 | ||
| 61 | #define ARCH_EXID_SAMA5D42 0x00000002 | ||
| 62 | #define ARCH_EXID_SAMA5D43 0x00000003 | ||
| 63 | #define ARCH_EXID_SAMA5D44 0x00000004 | ||
| 64 | |||
| 58 | #define ARCH_FAMILY_AT91X92 0x09200000 | 65 | #define ARCH_FAMILY_AT91X92 0x09200000 |
| 59 | #define ARCH_FAMILY_AT91SAM9 0x01900000 | 66 | #define ARCH_FAMILY_AT91SAM9 0x01900000 |
| 60 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 | 67 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 |
| @@ -86,6 +93,9 @@ enum at91_soc_type { | |||
| 86 | /* SAMA5D3 */ | 93 | /* SAMA5D3 */ |
| 87 | AT91_SOC_SAMA5D3, | 94 | AT91_SOC_SAMA5D3, |
| 88 | 95 | ||
| 96 | /* SAMA5D4 */ | ||
| 97 | AT91_SOC_SAMA5D4, | ||
| 98 | |||
| 89 | /* Unknown type */ | 99 | /* Unknown type */ |
| 90 | AT91_SOC_UNKNOWN, | 100 | AT91_SOC_UNKNOWN, |
| 91 | }; | 101 | }; |
| @@ -108,6 +118,10 @@ enum at91_soc_subtype { | |||
| 108 | AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34, | 118 | AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34, |
| 109 | AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36, | 119 | AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36, |
| 110 | 120 | ||
| 121 | /* SAMA5D4 */ | ||
| 122 | AT91_SOC_SAMA5D41, AT91_SOC_SAMA5D42, AT91_SOC_SAMA5D43, | ||
| 123 | AT91_SOC_SAMA5D44, | ||
| 124 | |||
| 111 | /* No subtype for this SoC */ | 125 | /* No subtype for this SoC */ |
| 112 | AT91_SOC_SUBTYPE_NONE, | 126 | AT91_SOC_SUBTYPE_NONE, |
| 113 | 127 | ||
| @@ -211,6 +225,12 @@ static inline int at91_soc_is_detected(void) | |||
| 211 | #define cpu_is_sama5d3() (0) | 225 | #define cpu_is_sama5d3() (0) |
| 212 | #endif | 226 | #endif |
| 213 | 227 | ||
| 228 | #ifdef CONFIG_SOC_SAMA5D4 | ||
| 229 | #define cpu_is_sama5d4() (at91_soc_initdata.type == AT91_SOC_SAMA5D4) | ||
| 230 | #else | ||
| 231 | #define cpu_is_sama5d4() (0) | ||
| 232 | #endif | ||
| 233 | |||
| 214 | /* | 234 | /* |
| 215 | * Since this is ARM, we will never run on any AVR32 CPU. But these | 235 | * Since this is ARM, we will never run on any AVR32 CPU. But these |
| 216 | * definitions may reduce clutter in common drivers. | 236 | * definitions may reduce clutter in common drivers. |
diff --git a/arch/arm/mach-at91/include/mach/debug-macro.S b/arch/arm/mach-at91/include/mach/debug-macro.S index c6bb9e2d9baa..2103a90f2261 100644 --- a/arch/arm/mach-at91/include/mach/debug-macro.S +++ b/arch/arm/mach-at91/include/mach/debug-macro.S | |||
| @@ -16,8 +16,11 @@ | |||
| 16 | 16 | ||
| 17 | #if defined(CONFIG_AT91_DEBUG_LL_DBGU0) | 17 | #if defined(CONFIG_AT91_DEBUG_LL_DBGU0) |
| 18 | #define AT91_DBGU AT91_BASE_DBGU0 | 18 | #define AT91_DBGU AT91_BASE_DBGU0 |
| 19 | #else | 19 | #elif defined(CONFIG_AT91_DEBUG_LL_DBGU1) |
| 20 | #define AT91_DBGU AT91_BASE_DBGU1 | 20 | #define AT91_DBGU AT91_BASE_DBGU1 |
| 21 | #else | ||
| 22 | /* On sama5d4, use USART3 as low level serial console */ | ||
| 23 | #define AT91_DBGU SAMA5D4_BASE_USART3 | ||
| 21 | #endif | 24 | #endif |
| 22 | 25 | ||
| 23 | .macro addruart, rp, rv, tmp | 26 | .macro addruart, rp, rv, tmp |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index 56338245653a..c13797352688 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
| @@ -19,8 +19,10 @@ | |||
| 19 | /* DBGU base */ | 19 | /* DBGU base */ |
| 20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ | 20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ |
| 21 | #define AT91_BASE_DBGU0 0xfffff200 | 21 | #define AT91_BASE_DBGU0 0xfffff200 |
| 22 | /* 9263, 9g45 */ | 22 | /* 9263, 9g45, sama5d3 */ |
| 23 | #define AT91_BASE_DBGU1 0xffffee00 | 23 | #define AT91_BASE_DBGU1 0xffffee00 |
| 24 | /* sama5d4 */ | ||
| 25 | #define AT91_BASE_DBGU2 0xfc069000 | ||
| 24 | 26 | ||
| 25 | #if defined(CONFIG_ARCH_AT91X40) | 27 | #if defined(CONFIG_ARCH_AT91X40) |
| 26 | #include <mach/at91x40.h> | 28 | #include <mach/at91x40.h> |
| @@ -34,6 +36,7 @@ | |||
| 34 | #include <mach/at91sam9x5.h> | 36 | #include <mach/at91sam9x5.h> |
| 35 | #include <mach/at91sam9n12.h> | 37 | #include <mach/at91sam9n12.h> |
| 36 | #include <mach/sama5d3.h> | 38 | #include <mach/sama5d3.h> |
| 39 | #include <mach/sama5d4.h> | ||
| 37 | 40 | ||
| 38 | /* | 41 | /* |
| 39 | * On all at91 except rm9200 and x40 have the System Controller starts | 42 | * On all at91 except rm9200 and x40 have the System Controller starts |
| @@ -47,9 +50,15 @@ | |||
| 47 | * and map the same memory space | 50 | * and map the same memory space |
| 48 | */ | 51 | */ |
| 49 | #define AT91_BASE_SYS 0xffffc000 | 52 | #define AT91_BASE_SYS 0xffffc000 |
| 53 | |||
| 50 | #endif | 54 | #endif |
| 51 | 55 | ||
| 52 | /* | 56 | /* |
| 57 | * On sama5d4 there is no system controller, we map some needed peripherals | ||
| 58 | */ | ||
| 59 | #define AT91_ALT_BASE_SYS 0xfc069000 | ||
| 60 | |||
| 61 | /* | ||
| 53 | * On all at91 have the Advanced Interrupt Controller starts at address | 62 | * On all at91 have the Advanced Interrupt Controller starts at address |
| 54 | * 0xfffff000 and the Power Management Controller starts at 0xfffffc00 | 63 | * 0xfffff000 and the Power Management Controller starts at 0xfffffc00 |
| 55 | */ | 64 | */ |
| @@ -69,23 +78,35 @@ | |||
| 69 | */ | 78 | */ |
| 70 | #define AT91_IO_PHYS_BASE 0xFFF78000 | 79 | #define AT91_IO_PHYS_BASE 0xFFF78000 |
| 71 | #define AT91_IO_VIRT_BASE IOMEM(0xFF000000 - AT91_IO_SIZE) | 80 | #define AT91_IO_VIRT_BASE IOMEM(0xFF000000 - AT91_IO_SIZE) |
| 81 | |||
| 82 | /* | ||
| 83 | * On sama5d4, remap the peripherals from address 0xFC069000 .. 0xFC06F000 | ||
| 84 | * to 0xFB069000 .. 0xFB06F000. (24Kb) | ||
| 85 | */ | ||
| 86 | #define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS | ||
| 87 | #define AT91_ALT_IO_VIRT_BASE IOMEM(0xFB069000) | ||
| 72 | #else | 88 | #else |
| 73 | /* | 89 | /* |
| 74 | * Identity mapping for the non MMU case. | 90 | * Identity mapping for the non MMU case. |
| 75 | */ | 91 | */ |
| 76 | #define AT91_IO_PHYS_BASE AT91_BASE_SYS | 92 | #define AT91_IO_PHYS_BASE AT91_BASE_SYS |
| 77 | #define AT91_IO_VIRT_BASE IOMEM(AT91_IO_PHYS_BASE) | 93 | #define AT91_IO_VIRT_BASE IOMEM(AT91_IO_PHYS_BASE) |
| 94 | |||
| 95 | #define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS | ||
| 96 | #define AT91_ALT_IO_VIRT_BASE IOMEM(AT91_ALT_BASE_SYS) | ||
| 78 | #endif | 97 | #endif |
| 79 | 98 | ||
| 80 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | 99 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) |
| 81 | 100 | ||
| 82 | /* Convert a physical IO address to virtual IO address */ | 101 | /* Convert a physical IO address to virtual IO address */ |
| 83 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) | 102 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) |
| 103 | #define AT91_ALT_IO_P2V(x) ((x) - AT91_ALT_IO_PHYS_BASE + AT91_ALT_IO_VIRT_BASE) | ||
| 84 | 104 | ||
| 85 | /* | 105 | /* |
| 86 | * Virtual to Physical Address mapping for IO devices. | 106 | * Virtual to Physical Address mapping for IO devices. |
| 87 | */ | 107 | */ |
| 88 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) | 108 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) |
| 109 | #define AT91_ALT_VA_BASE_SYS AT91_ALT_IO_P2V(AT91_ALT_BASE_SYS) | ||
| 89 | 110 | ||
| 90 | /* Internal SRAM is mapped below the IO devices */ | 111 | /* Internal SRAM is mapped below the IO devices */ |
| 91 | #define AT91_SRAM_MAX SZ_1M | 112 | #define AT91_SRAM_MAX SZ_1M |
diff --git a/arch/arm/mach-at91/include/mach/sama5d4.h b/arch/arm/mach-at91/include/mach/sama5d4.h new file mode 100644 index 000000000000..f256a45d9854 --- /dev/null +++ b/arch/arm/mach-at91/include/mach/sama5d4.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * Chip-specific header file for the SAMA5D4 family | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Atmel Corporation, | ||
| 5 | * Nicolas Ferre <nicolas.ferre@atmel.com> | ||
| 6 | * | ||
| 7 | * Common definitions. | ||
| 8 | * Based on SAMA5D4 datasheet. | ||
| 9 | * | ||
| 10 | * Licensed under GPLv2 or later. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef SAMA5D4_H | ||
| 14 | #define SAMA5D4_H | ||
| 15 | |||
| 16 | /* | ||
| 17 | * User Peripheral physical base addresses. | ||
| 18 | */ | ||
| 19 | #define SAMA5D4_BASE_USART3 0xfc00c000 /* (USART3 non-secure) Base Address */ | ||
| 20 | #define SAMA5D4_BASE_PMC 0xf0018000 /* (PMC) Base Address */ | ||
| 21 | #define SAMA5D4_BASE_MPDDRC 0xf0010000 /* (MPDDRC) Base Address */ | ||
| 22 | #define SAMA5D4_BASE_PIOD 0xfc068000 /* (PIOD) Base Address */ | ||
| 23 | |||
| 24 | /* Some other peripherals */ | ||
| 25 | #define SAMA5D4_BASE_SYS2 SAMA5D4_BASE_PIOD | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Internal Memory. | ||
| 29 | */ | ||
| 30 | #define SAMA5D4_NS_SRAM_BASE 0x00210000 /* Internal SRAM base address Non-Secure */ | ||
| 31 | #define SAMA5D4_NS_SRAM_SIZE (64 * SZ_1K) /* Internal SRAM size Non-Secure part (64Kb) */ | ||
| 32 | |||
| 33 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h index 4bb644f8e87c..acb2d890ad7e 100644 --- a/arch/arm/mach-at91/include/mach/uncompress.h +++ b/arch/arm/mach-at91/include/mach/uncompress.h | |||
| @@ -94,7 +94,7 @@ static const u32 uarts_sam9x5[] = { | |||
| 94 | 0, | 94 | 0, |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | static const u32 uarts_sama5[] = { | 97 | static const u32 uarts_sama5d3[] = { |
| 98 | AT91_BASE_DBGU1, | 98 | AT91_BASE_DBGU1, |
| 99 | SAMA5D3_BASE_USART0, | 99 | SAMA5D3_BASE_USART0, |
| 100 | SAMA5D3_BASE_USART1, | 100 | SAMA5D3_BASE_USART1, |
| @@ -103,6 +103,12 @@ static const u32 uarts_sama5[] = { | |||
| 103 | 0, | 103 | 0, |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | static const u32 uarts_sama5d4[] = { | ||
| 107 | AT91_BASE_DBGU2, | ||
| 108 | SAMA5D4_BASE_USART3, | ||
| 109 | 0, | ||
| 110 | }; | ||
| 111 | |||
| 106 | static inline const u32* decomp_soc_detect(void __iomem *dbgu_base) | 112 | static inline const u32* decomp_soc_detect(void __iomem *dbgu_base) |
| 107 | { | 113 | { |
| 108 | u32 cidr, socid; | 114 | u32 cidr, socid; |
| @@ -134,8 +140,14 @@ static inline const u32* decomp_soc_detect(void __iomem *dbgu_base) | |||
| 134 | case ARCH_ID_AT91SAM9X5: | 140 | case ARCH_ID_AT91SAM9X5: |
| 135 | return uarts_sam9x5; | 141 | return uarts_sam9x5; |
| 136 | 142 | ||
| 137 | case ARCH_ID_SAMA5D3: | 143 | case ARCH_ID_SAMA5: |
| 138 | return uarts_sama5; | 144 | cidr = __raw_readl(dbgu_base + AT91_DBGU_EXID); |
| 145 | if (cidr & ARCH_EXID_SAMA5D3) | ||
| 146 | return uarts_sama5d3; | ||
| 147 | else if (cidr & ARCH_EXID_SAMA5D4) | ||
| 148 | return uarts_sama5d4; | ||
| 149 | |||
| 150 | break; | ||
| 139 | } | 151 | } |
| 140 | 152 | ||
| 141 | /* at91sam9g10 */ | 153 | /* at91sam9g10 */ |
| @@ -156,9 +168,10 @@ static inline void arch_decomp_setup(void) | |||
| 156 | const u32* usarts; | 168 | const u32* usarts; |
| 157 | 169 | ||
| 158 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0); | 170 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0); |
| 159 | |||
| 160 | if (!usarts) | 171 | if (!usarts) |
| 161 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1); | 172 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1); |
| 173 | if (!usarts) | ||
| 174 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU2); | ||
| 162 | if (!usarts) { | 175 | if (!usarts) { |
| 163 | at91_uart = NULL; | 176 | at91_uart = NULL; |
| 164 | return; | 177 | return; |
diff --git a/arch/arm/mach-at91/sama5d4.c b/arch/arm/mach-at91/sama5d4.c new file mode 100644 index 000000000000..7638509639f4 --- /dev/null +++ b/arch/arm/mach-at91/sama5d4.c | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | /* | ||
| 2 | * Chip-specific setup code for the SAMA5D4 family | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Atmel Corporation, | ||
| 5 | * Nicolas Ferre <nicolas.ferre@atmel.com> | ||
| 6 | * | ||
| 7 | * Licensed under GPLv2 or later. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/module.h> | ||
| 11 | #include <linux/dma-mapping.h> | ||
| 12 | #include <linux/clk/at91_pmc.h> | ||
| 13 | |||
| 14 | #include <asm/irq.h> | ||
| 15 | #include <asm/mach/arch.h> | ||
| 16 | #include <asm/mach/map.h> | ||
| 17 | #include <mach/sama5d4.h> | ||
| 18 | #include <mach/cpu.h> | ||
| 19 | #include <mach/hardware.h> | ||
| 20 | |||
| 21 | #include "soc.h" | ||
| 22 | #include "generic.h" | ||
| 23 | #include "sam9_smc.h" | ||
| 24 | |||
| 25 | /* -------------------------------------------------------------------- | ||
| 26 | * Processor initialization | ||
| 27 | * -------------------------------------------------------------------- */ | ||
| 28 | static struct map_desc at91_io_desc[] __initdata = { | ||
| 29 | { | ||
| 30 | .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_MPDDRC), | ||
| 31 | .pfn = __phys_to_pfn(SAMA5D4_BASE_MPDDRC), | ||
| 32 | .length = SZ_512, | ||
| 33 | .type = MT_DEVICE, | ||
| 34 | }, | ||
| 35 | { | ||
| 36 | .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_PMC), | ||
| 37 | .pfn = __phys_to_pfn(SAMA5D4_BASE_PMC), | ||
| 38 | .length = SZ_512, | ||
| 39 | .type = MT_DEVICE, | ||
| 40 | }, | ||
| 41 | { /* On sama5d4, we use USART3 as serial console */ | ||
| 42 | .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_USART3), | ||
| 43 | .pfn = __phys_to_pfn(SAMA5D4_BASE_USART3), | ||
| 44 | .length = SZ_256, | ||
| 45 | .type = MT_DEVICE, | ||
| 46 | }, | ||
| 47 | { /* A bunch of peripheral with fine grained IO space */ | ||
| 48 | .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_SYS2), | ||
| 49 | .pfn = __phys_to_pfn(SAMA5D4_BASE_SYS2), | ||
| 50 | .length = SZ_2K, | ||
| 51 | .type = MT_DEVICE, | ||
| 52 | }, | ||
| 53 | }; | ||
| 54 | |||
| 55 | |||
| 56 | static void __init sama5d4_map_io(void) | ||
| 57 | { | ||
| 58 | iotable_init(at91_io_desc, ARRAY_SIZE(at91_io_desc)); | ||
| 59 | at91_init_sram(0, SAMA5D4_NS_SRAM_BASE, SAMA5D4_NS_SRAM_SIZE); | ||
| 60 | } | ||
| 61 | |||
| 62 | AT91_SOC_START(sama5d4) | ||
| 63 | .map_io = sama5d4_map_io, | ||
| 64 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 0bf893a574f9..ebe7fdca9e83 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
| @@ -97,6 +97,13 @@ static struct map_desc at91_io_desc __initdata __maybe_unused = { | |||
| 97 | .type = MT_DEVICE, | 97 | .type = MT_DEVICE, |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | static struct map_desc at91_alt_io_desc __initdata __maybe_unused = { | ||
| 101 | .virtual = (unsigned long)AT91_ALT_VA_BASE_SYS, | ||
| 102 | .pfn = __phys_to_pfn(AT91_ALT_BASE_SYS), | ||
| 103 | .length = 24 * SZ_1K, | ||
| 104 | .type = MT_DEVICE, | ||
| 105 | }; | ||
| 106 | |||
| 100 | static void __init soc_detect(u32 dbgu_base) | 107 | static void __init soc_detect(u32 dbgu_base) |
| 101 | { | 108 | { |
| 102 | u32 cidr, socid; | 109 | u32 cidr, socid; |
| @@ -159,9 +166,12 @@ static void __init soc_detect(u32 dbgu_base) | |||
| 159 | at91_boot_soc = at91sam9n12_soc; | 166 | at91_boot_soc = at91sam9n12_soc; |
| 160 | break; | 167 | break; |
| 161 | 168 | ||
| 162 | case ARCH_ID_SAMA5D3: | 169 | case ARCH_ID_SAMA5: |
| 163 | at91_soc_initdata.type = AT91_SOC_SAMA5D3; | 170 | at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); |
| 164 | at91_boot_soc = sama5d3_soc; | 171 | if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) { |
| 172 | at91_soc_initdata.type = AT91_SOC_SAMA5D3; | ||
| 173 | at91_boot_soc = sama5d3_soc; | ||
| 174 | } | ||
| 165 | break; | 175 | break; |
| 166 | } | 176 | } |
| 167 | 177 | ||
| @@ -184,7 +194,8 @@ static void __init soc_detect(u32 dbgu_base) | |||
| 184 | at91_soc_initdata.cidr = cidr; | 194 | at91_soc_initdata.cidr = cidr; |
| 185 | 195 | ||
| 186 | /* sub version of soc */ | 196 | /* sub version of soc */ |
| 187 | at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); | 197 | if (!at91_soc_initdata.exid) |
| 198 | at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); | ||
| 188 | 199 | ||
| 189 | if (at91_soc_initdata.type == AT91_SOC_SAM9G45) { | 200 | if (at91_soc_initdata.type == AT91_SOC_SAM9G45) { |
| 190 | switch (at91_soc_initdata.exid) { | 201 | switch (at91_soc_initdata.exid) { |
| @@ -241,6 +252,54 @@ static void __init soc_detect(u32 dbgu_base) | |||
| 241 | } | 252 | } |
| 242 | } | 253 | } |
| 243 | 254 | ||
| 255 | static void __init alt_soc_detect(u32 dbgu_base) | ||
| 256 | { | ||
| 257 | u32 cidr, socid; | ||
| 258 | |||
| 259 | /* SoC ID */ | ||
| 260 | cidr = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_CIDR); | ||
| 261 | socid = cidr & ~AT91_CIDR_VERSION; | ||
| 262 | |||
| 263 | switch (socid) { | ||
| 264 | case ARCH_ID_SAMA5: | ||
| 265 | at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID); | ||
| 266 | if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) { | ||
| 267 | at91_soc_initdata.type = AT91_SOC_SAMA5D3; | ||
| 268 | at91_boot_soc = sama5d3_soc; | ||
| 269 | } else if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D4) { | ||
| 270 | at91_soc_initdata.type = AT91_SOC_SAMA5D4; | ||
| 271 | at91_boot_soc = sama5d4_soc; | ||
| 272 | } | ||
| 273 | break; | ||
| 274 | } | ||
| 275 | |||
| 276 | if (!at91_soc_is_detected()) | ||
| 277 | return; | ||
| 278 | |||
| 279 | at91_soc_initdata.cidr = cidr; | ||
| 280 | |||
| 281 | /* sub version of soc */ | ||
| 282 | if (!at91_soc_initdata.exid) | ||
| 283 | at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID); | ||
| 284 | |||
| 285 | if (at91_soc_initdata.type == AT91_SOC_SAMA5D4) { | ||
| 286 | switch (at91_soc_initdata.exid) { | ||
| 287 | case ARCH_EXID_SAMA5D41: | ||
| 288 | at91_soc_initdata.subtype = AT91_SOC_SAMA5D41; | ||
| 289 | break; | ||
| 290 | case ARCH_EXID_SAMA5D42: | ||
| 291 | at91_soc_initdata.subtype = AT91_SOC_SAMA5D42; | ||
| 292 | break; | ||
| 293 | case ARCH_EXID_SAMA5D43: | ||
| 294 | at91_soc_initdata.subtype = AT91_SOC_SAMA5D43; | ||
| 295 | break; | ||
| 296 | case ARCH_EXID_SAMA5D44: | ||
| 297 | at91_soc_initdata.subtype = AT91_SOC_SAMA5D44; | ||
| 298 | break; | ||
| 299 | } | ||
| 300 | } | ||
| 301 | } | ||
| 302 | |||
| 244 | static const char *soc_name[] = { | 303 | static const char *soc_name[] = { |
| 245 | [AT91_SOC_RM9200] = "at91rm9200", | 304 | [AT91_SOC_RM9200] = "at91rm9200", |
| 246 | [AT91_SOC_SAM9260] = "at91sam9260", | 305 | [AT91_SOC_SAM9260] = "at91sam9260", |
| @@ -253,6 +312,7 @@ static const char *soc_name[] = { | |||
| 253 | [AT91_SOC_SAM9X5] = "at91sam9x5", | 312 | [AT91_SOC_SAM9X5] = "at91sam9x5", |
| 254 | [AT91_SOC_SAM9N12] = "at91sam9n12", | 313 | [AT91_SOC_SAM9N12] = "at91sam9n12", |
| 255 | [AT91_SOC_SAMA5D3] = "sama5d3", | 314 | [AT91_SOC_SAMA5D3] = "sama5d3", |
| 315 | [AT91_SOC_SAMA5D4] = "sama5d4", | ||
| 256 | [AT91_SOC_UNKNOWN] = "Unknown", | 316 | [AT91_SOC_UNKNOWN] = "Unknown", |
| 257 | }; | 317 | }; |
| 258 | 318 | ||
| @@ -280,6 +340,10 @@ static const char *soc_subtype_name[] = { | |||
| 280 | [AT91_SOC_SAMA5D34] = "sama5d34", | 340 | [AT91_SOC_SAMA5D34] = "sama5d34", |
| 281 | [AT91_SOC_SAMA5D35] = "sama5d35", | 341 | [AT91_SOC_SAMA5D35] = "sama5d35", |
| 282 | [AT91_SOC_SAMA5D36] = "sama5d36", | 342 | [AT91_SOC_SAMA5D36] = "sama5d36", |
| 343 | [AT91_SOC_SAMA5D41] = "sama5d41", | ||
| 344 | [AT91_SOC_SAMA5D42] = "sama5d42", | ||
| 345 | [AT91_SOC_SAMA5D43] = "sama5d43", | ||
| 346 | [AT91_SOC_SAMA5D44] = "sama5d44", | ||
| 283 | [AT91_SOC_SUBTYPE_NONE] = "None", | 347 | [AT91_SOC_SUBTYPE_NONE] = "None", |
| 284 | [AT91_SOC_SUBTYPE_UNKNOWN] = "Unknown", | 348 | [AT91_SOC_SUBTYPE_UNKNOWN] = "Unknown", |
| 285 | }; | 349 | }; |
| @@ -342,6 +406,31 @@ void __init at91_ioremap_rstc(u32 base_addr) | |||
| 342 | panic("Impossible to ioremap at91_rstc_base\n"); | 406 | panic("Impossible to ioremap at91_rstc_base\n"); |
| 343 | } | 407 | } |
| 344 | 408 | ||
| 409 | void __init at91_alt_map_io(void) | ||
| 410 | { | ||
| 411 | /* Map peripherals */ | ||
| 412 | iotable_init(&at91_alt_io_desc, 1); | ||
| 413 | |||
| 414 | at91_soc_initdata.type = AT91_SOC_UNKNOWN; | ||
| 415 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_UNKNOWN; | ||
| 416 | |||
| 417 | alt_soc_detect(AT91_BASE_DBGU2); | ||
| 418 | if (!at91_soc_is_detected()) | ||
| 419 | panic("AT91: Impossible to detect the SOC type"); | ||
| 420 | |||
| 421 | pr_info("AT91: Detected soc type: %s\n", | ||
| 422 | at91_get_soc_type(&at91_soc_initdata)); | ||
| 423 | if (at91_soc_initdata.subtype != AT91_SOC_SUBTYPE_NONE) | ||
| 424 | pr_info("AT91: Detected soc subtype: %s\n", | ||
| 425 | at91_get_soc_subtype(&at91_soc_initdata)); | ||
| 426 | |||
| 427 | if (!at91_soc_is_enabled()) | ||
| 428 | panic("AT91: Soc not enabled"); | ||
| 429 | |||
| 430 | if (at91_boot_soc.map_io) | ||
| 431 | at91_boot_soc.map_io(); | ||
| 432 | } | ||
| 433 | |||
| 345 | void __iomem *at91_matrix_base; | 434 | void __iomem *at91_matrix_base; |
| 346 | EXPORT_SYMBOL_GPL(at91_matrix_base); | 435 | EXPORT_SYMBOL_GPL(at91_matrix_base); |
| 347 | 436 | ||
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index a1e1482c6da8..8ecaee67f953 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
| @@ -24,6 +24,7 @@ extern struct at91_init_soc at91sam9rl_soc; | |||
| 24 | extern struct at91_init_soc at91sam9x5_soc; | 24 | extern struct at91_init_soc at91sam9x5_soc; |
| 25 | extern struct at91_init_soc at91sam9n12_soc; | 25 | extern struct at91_init_soc at91sam9n12_soc; |
| 26 | extern struct at91_init_soc sama5d3_soc; | 26 | extern struct at91_init_soc sama5d3_soc; |
| 27 | extern struct at91_init_soc sama5d4_soc; | ||
| 27 | 28 | ||
| 28 | #define AT91_SOC_START(_name) \ | 29 | #define AT91_SOC_START(_name) \ |
| 29 | struct at91_init_soc __initdata _name##_soc \ | 30 | struct at91_init_soc __initdata _name##_soc \ |
| @@ -74,3 +75,7 @@ static inline int at91_soc_is_enabled(void) | |||
| 74 | #if !defined(CONFIG_SOC_SAMA5D3) | 75 | #if !defined(CONFIG_SOC_SAMA5D3) |
| 75 | #define sama5d3_soc at91_boot_soc | 76 | #define sama5d3_soc at91_boot_soc |
| 76 | #endif | 77 | #endif |
| 78 | |||
| 79 | #if !defined(CONFIG_SOC_SAMA5D4) | ||
| 80 | #define sama5d4_soc at91_boot_soc | ||
| 81 | #endif | ||
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index fc938005ad39..2abad742516d 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig | |||
| @@ -99,6 +99,23 @@ config ARCH_BCM_5301X | |||
| 99 | different SoC or with the older BCM47XX and BCM53XX based | 99 | different SoC or with the older BCM47XX and BCM53XX based |
| 100 | network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx | 100 | network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx |
| 101 | 101 | ||
| 102 | config ARCH_BCM_63XX | ||
| 103 | bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7 | ||
| 104 | depends on MMU | ||
| 105 | select ARM_ERRATA_754322 | ||
| 106 | select ARM_ERRATA_764369 if SMP | ||
| 107 | select ARM_GIC | ||
| 108 | select ARM_GLOBAL_TIMER | ||
| 109 | select CACHE_L2X0 | ||
| 110 | select HAVE_ARM_ARCH_TIMER | ||
| 111 | select HAVE_ARM_TWD if SMP | ||
| 112 | select HAVE_ARM_SCU if SMP | ||
| 113 | select HAVE_SMP | ||
| 114 | help | ||
| 115 | This enables support for systems based on Broadcom DSL SoCs. | ||
| 116 | It currently supports the 'BCM63XX' ARM-based family, which includes | ||
| 117 | the BCM63138 variant. | ||
| 118 | |||
| 102 | config ARCH_BRCMSTB | 119 | config ARCH_BRCMSTB |
| 103 | bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7 | 120 | bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7 |
| 104 | depends on MMU | 121 | depends on MMU |
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index b19a39652545..300ae4b79ae6 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile | |||
| @@ -34,6 +34,9 @@ obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o | |||
| 34 | # BCM5301X | 34 | # BCM5301X |
| 35 | obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o | 35 | obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o |
| 36 | 36 | ||
| 37 | # BCM63XXx | ||
| 38 | obj-$(CONFIG_ARCH_BCM_63XX) := bcm63xx.o | ||
| 39 | |||
| 37 | ifeq ($(CONFIG_ARCH_BRCMSTB),y) | 40 | ifeq ($(CONFIG_ARCH_BRCMSTB),y) |
| 38 | obj-y += brcmstb.o | 41 | obj-y += brcmstb.o |
| 39 | endif | 42 | endif |
diff --git a/arch/arm/mach-bcm/bcm63xx.c b/arch/arm/mach-bcm/bcm63xx.c new file mode 100644 index 000000000000..c4c66ae51308 --- /dev/null +++ b/arch/arm/mach-bcm/bcm63xx.c | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Broadcom Corporation | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License as | ||
| 6 | * published by the Free Software Foundation version 2. | ||
| 7 | * | ||
| 8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 9 | * kind, whether express or implied; without even the implied warranty | ||
| 10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/of_platform.h> | ||
| 15 | |||
| 16 | #include <asm/mach/arch.h> | ||
| 17 | |||
| 18 | static const char * const bcm63xx_dt_compat[] = { | ||
| 19 | "brcm,bcm63138", | ||
| 20 | NULL | ||
| 21 | }; | ||
| 22 | |||
| 23 | DT_MACHINE_START(BCM63XXX_DT, "BCM63xx DSL SoC") | ||
| 24 | .dt_compat = bcm63xx_dt_compat, | ||
| 25 | .l2c_aux_val = 0, | ||
| 26 | .l2c_aux_mask = ~0, | ||
| 27 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c index fdf54d40909a..f33979784f38 100644 --- a/arch/arm/mach-clps711x/board-edb7211.c +++ b/arch/arm/mach-clps711x/board-edb7211.c | |||
| @@ -14,8 +14,9 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/i2c-gpio.h> | 15 | #include <linux/i2c-gpio.h> |
| 16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/backlight.h> | ||
| 18 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/pwm.h> | ||
| 19 | #include <linux/pwm_backlight.h> | ||
| 19 | #include <linux/memblock.h> | 20 | #include <linux/memblock.h> |
| 20 | 21 | ||
| 21 | #include <linux/mtd/physmap.h> | 22 | #include <linux/mtd/physmap.h> |
| @@ -108,23 +109,23 @@ static struct plat_lcd_data edb7211_lcd_power_pdata = { | |||
| 108 | .set_power = edb7211_lcd_power_set, | 109 | .set_power = edb7211_lcd_power_set, |
| 109 | }; | 110 | }; |
| 110 | 111 | ||
| 111 | static void edb7211_lcd_backlight_set_intensity(int intensity) | 112 | static struct pwm_lookup edb7211_pwm_lookup[] = { |
| 112 | { | 113 | PWM_LOOKUP("clps711x-pwm", 0, "pwm-backlight.0", NULL, |
| 113 | gpio_set_value(EDB7211_LCDBL, !!intensity); | 114 | 0, PWM_POLARITY_NORMAL), |
| 114 | clps_writel((clps_readl(PMPCON) & 0xf0ff) | (intensity << 8), PMPCON); | 115 | }; |
| 115 | } | ||
| 116 | 116 | ||
| 117 | static struct generic_bl_info edb7211_lcd_backlight_pdata = { | 117 | static struct platform_pwm_backlight_data pwm_bl_pdata = { |
| 118 | .name = "lcd-backlight.0", | 118 | .dft_brightness = 0x01, |
| 119 | .default_intensity = 0x01, | 119 | .max_brightness = 0x0f, |
| 120 | .max_intensity = 0x0f, | 120 | .enable_gpio = EDB7211_LCDBL, |
| 121 | .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | ||
| 122 | }; | 121 | }; |
| 123 | 122 | ||
| 123 | static struct resource clps711x_pwm_res = | ||
| 124 | DEFINE_RES_MEM(CLPS711X_PHYS_BASE + PMPCON, SZ_4); | ||
| 125 | |||
| 124 | static struct gpio edb7211_gpios[] __initconst = { | 126 | static struct gpio edb7211_gpios[] __initconst = { |
| 125 | { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, | 127 | { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, |
| 126 | { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, | 128 | { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, |
| 127 | { EDB7211_LCDBL, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT" }, | ||
| 128 | }; | 129 | }; |
| 129 | 130 | ||
| 130 | /* Reserve screen memory region at the start of main system memory. */ | 131 | /* Reserve screen memory region at the start of main system memory. */ |
| @@ -153,12 +154,18 @@ static void __init edb7211_init_late(void) | |||
| 153 | gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); | 154 | gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); |
| 154 | 155 | ||
| 155 | platform_device_register(&edb7211_flash_pdev); | 156 | platform_device_register(&edb7211_flash_pdev); |
| 157 | |||
| 156 | platform_device_register_data(NULL, "platform-lcd", 0, | 158 | platform_device_register_data(NULL, "platform-lcd", 0, |
| 157 | &edb7211_lcd_power_pdata, | 159 | &edb7211_lcd_power_pdata, |
| 158 | sizeof(edb7211_lcd_power_pdata)); | 160 | sizeof(edb7211_lcd_power_pdata)); |
| 159 | platform_device_register_data(NULL, "generic-bl", 0, | 161 | |
| 160 | &edb7211_lcd_backlight_pdata, | 162 | platform_device_register_simple("clps711x-pwm", PLATFORM_DEVID_NONE, |
| 161 | sizeof(edb7211_lcd_backlight_pdata)); | 163 | &clps711x_pwm_res, 1); |
| 164 | pwm_add_table(edb7211_pwm_lookup, ARRAY_SIZE(edb7211_pwm_lookup)); | ||
| 165 | |||
| 166 | platform_device_register_data(&platform_bus, "pwm-backlight", 0, | ||
| 167 | &pwm_bl_pdata, sizeof(pwm_bl_pdata)); | ||
| 168 | |||
| 162 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | 169 | platform_device_register_simple("video-clps711x", 0, NULL, 0); |
| 163 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | 170 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, |
| 164 | ARRAY_SIZE(edb7211_cs8900_resource)); | 171 | ARRAY_SIZE(edb7211_cs8900_resource)); |
diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c index 0c689d3a6710..77a9617c216d 100644 --- a/arch/arm/mach-clps711x/devices.c +++ b/arch/arm/mach-clps711x/devices.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * CLPS711X common devices definitions | 2 | * CLPS711X common devices definitions |
| 3 | * | 3 | * |
| 4 | * Author: Alexander Shiyan <shc_work@mail.ru>, 2013 | 4 | * Author: Alexander Shiyan <shc_work@mail.ru>, 2013-2014 |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
| @@ -9,8 +9,15 @@ | |||
| 9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/io.h> | ||
| 13 | #include <linux/of_fdt.h> | ||
| 12 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
| 15 | #include <linux/random.h> | ||
| 13 | #include <linux/sizes.h> | 16 | #include <linux/sizes.h> |
| 17 | #include <linux/slab.h> | ||
| 18 | #include <linux/sys_soc.h> | ||
| 19 | |||
| 20 | #include <asm/system_info.h> | ||
| 14 | 21 | ||
| 15 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
| 16 | 23 | ||
| @@ -90,10 +97,53 @@ static void __init clps711x_add_uart(void) | |||
| 90 | ARRAY_SIZE(clps711x_uart2_res)); | 97 | ARRAY_SIZE(clps711x_uart2_res)); |
| 91 | }; | 98 | }; |
| 92 | 99 | ||
| 100 | static void __init clps711x_soc_init(void) | ||
| 101 | { | ||
| 102 | struct soc_device_attribute *soc_dev_attr; | ||
| 103 | struct soc_device *soc_dev; | ||
| 104 | void __iomem *base; | ||
| 105 | u32 id[5]; | ||
| 106 | |||
| 107 | base = ioremap(CLPS711X_PHYS_BASE, SZ_32K); | ||
| 108 | if (!base) | ||
| 109 | return; | ||
| 110 | |||
| 111 | id[0] = readl(base + UNIQID); | ||
| 112 | id[1] = readl(base + RANDID0); | ||
| 113 | id[2] = readl(base + RANDID1); | ||
| 114 | id[3] = readl(base + RANDID2); | ||
| 115 | id[4] = readl(base + RANDID3); | ||
| 116 | system_rev = SYSFLG1_VERID(readl(base + SYSFLG1)); | ||
| 117 | |||
| 118 | add_device_randomness(id, sizeof(id)); | ||
| 119 | |||
| 120 | system_serial_low = id[0]; | ||
| 121 | |||
| 122 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | ||
| 123 | if (!soc_dev_attr) | ||
| 124 | goto out_unmap; | ||
| 125 | |||
| 126 | soc_dev_attr->machine = of_flat_dt_get_machine_name(); | ||
| 127 | soc_dev_attr->family = "Cirrus Logic CLPS711X"; | ||
| 128 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", system_rev); | ||
| 129 | soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%08x", id[0]); | ||
| 130 | |||
| 131 | soc_dev = soc_device_register(soc_dev_attr); | ||
| 132 | if (IS_ERR(soc_dev)) { | ||
| 133 | kfree(soc_dev_attr->revision); | ||
| 134 | kfree(soc_dev_attr->soc_id); | ||
| 135 | kfree(soc_dev_attr); | ||
| 136 | } | ||
| 137 | |||
| 138 | out_unmap: | ||
| 139 | iounmap(base); | ||
| 140 | } | ||
| 141 | |||
| 93 | void __init clps711x_devices_init(void) | 142 | void __init clps711x_devices_init(void) |
| 94 | { | 143 | { |
| 95 | clps711x_add_cpuidle(); | 144 | clps711x_add_cpuidle(); |
| 96 | clps711x_add_gpio(); | 145 | clps711x_add_gpio(); |
| 97 | clps711x_add_syscon(); | 146 | clps711x_add_syscon(); |
| 98 | clps711x_add_uart(); | 147 | clps711x_add_uart(); |
| 148 | clps711x_soc_init(); | ||
| 99 | } | 149 | } |
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index 984882943f77..cd19433f76d3 100644 --- a/arch/arm/mach-hisi/Kconfig +++ b/arch/arm/mach-hisi/Kconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | config ARCH_HISI | 1 | config ARCH_HISI |
| 2 | bool "Hisilicon SoC Support" | 2 | bool "Hisilicon SoC Support" |
| 3 | depends on ARCH_MULTIPLATFORM | 3 | depends on ARCH_MULTI_V7 |
| 4 | select ARM_AMBA | 4 | select ARM_AMBA |
| 5 | select ARM_GIC | 5 | select ARM_GIC |
| 6 | select ARM_TIMER_SP804 | 6 | select ARM_TIMER_SP804 |
| @@ -22,6 +22,15 @@ config ARCH_HI3xxx | |||
| 22 | help | 22 | help |
| 23 | Support for Hisilicon Hi36xx SoC family | 23 | Support for Hisilicon Hi36xx SoC family |
| 24 | 24 | ||
| 25 | config ARCH_HIP04 | ||
| 26 | bool "Hisilicon HiP04 Cortex A15 family" if ARCH_MULTI_V7 | ||
| 27 | select ARM_ERRATA_798181 if SMP | ||
| 28 | select HAVE_ARM_ARCH_TIMER | ||
| 29 | select MCPM if SMP | ||
| 30 | select MCPM_QUAD_CLUSTER if SMP | ||
| 31 | help | ||
| 32 | Support for Hisilicon HiP04 SoC family | ||
| 33 | |||
| 25 | config ARCH_HIX5HD2 | 34 | config ARCH_HIX5HD2 |
| 26 | bool "Hisilicon X5HD2 family" if ARCH_MULTI_V7 | 35 | bool "Hisilicon X5HD2 family" if ARCH_MULTI_V7 |
| 27 | select CACHE_L2X0 | 36 | select CACHE_L2X0 |
diff --git a/arch/arm/mach-hisi/Makefile b/arch/arm/mach-hisi/Makefile index ee2506b9cde3..6b7b3033de0b 100644 --- a/arch/arm/mach-hisi/Makefile +++ b/arch/arm/mach-hisi/Makefile | |||
| @@ -2,5 +2,8 @@ | |||
| 2 | # Makefile for Hisilicon processors family | 2 | # Makefile for Hisilicon processors family |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | CFLAGS_platmcpm.o := -march=armv7-a | ||
| 6 | |||
| 5 | obj-y += hisilicon.o | 7 | obj-y += hisilicon.o |
| 8 | obj-$(CONFIG_MCPM) += platmcpm.o | ||
| 6 | obj-$(CONFIG_SMP) += platsmp.o hotplug.o headsmp.o | 9 | obj-$(CONFIG_SMP) += platsmp.o hotplug.o headsmp.o |
diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c index 7cda6dda3cd0..7744c351bbfd 100644 --- a/arch/arm/mach-hisi/hisilicon.c +++ b/arch/arm/mach-hisi/hisilicon.c | |||
| @@ -63,3 +63,12 @@ static const char *hix5hd2_compat[] __initconst = { | |||
| 63 | DT_MACHINE_START(HIX5HD2_DT, "Hisilicon HIX5HD2 (Flattened Device Tree)") | 63 | DT_MACHINE_START(HIX5HD2_DT, "Hisilicon HIX5HD2 (Flattened Device Tree)") |
| 64 | .dt_compat = hix5hd2_compat, | 64 | .dt_compat = hix5hd2_compat, |
| 65 | MACHINE_END | 65 | MACHINE_END |
| 66 | |||
| 67 | static const char *hip04_compat[] __initconst = { | ||
| 68 | "hisilicon,hip04-d01", | ||
| 69 | NULL, | ||
| 70 | }; | ||
| 71 | |||
| 72 | DT_MACHINE_START(HIP04, "Hisilicon HiP04 (Flattened Device Tree)") | ||
| 73 | .dt_compat = hip04_compat, | ||
| 74 | MACHINE_END | ||
diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c new file mode 100644 index 000000000000..280f3f14f77c --- /dev/null +++ b/arch/arm/mach-hisi/platmcpm.c | |||
| @@ -0,0 +1,386 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013-2014 Linaro Ltd. | ||
| 3 | * Copyright (c) 2013-2014 Hisilicon Limited. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <linux/delay.h> | ||
| 10 | #include <linux/io.h> | ||
| 11 | #include <linux/memblock.h> | ||
| 12 | #include <linux/of_address.h> | ||
| 13 | |||
| 14 | #include <asm/cputype.h> | ||
| 15 | #include <asm/cp15.h> | ||
| 16 | #include <asm/mcpm.h> | ||
| 17 | |||
| 18 | #include "core.h" | ||
| 19 | |||
| 20 | /* bits definition in SC_CPU_RESET_REQ[x]/SC_CPU_RESET_DREQ[x] | ||
| 21 | * 1 -- unreset; 0 -- reset | ||
| 22 | */ | ||
| 23 | #define CORE_RESET_BIT(x) (1 << x) | ||
| 24 | #define NEON_RESET_BIT(x) (1 << (x + 4)) | ||
| 25 | #define CORE_DEBUG_RESET_BIT(x) (1 << (x + 9)) | ||
| 26 | #define CLUSTER_L2_RESET_BIT (1 << 8) | ||
| 27 | #define CLUSTER_DEBUG_RESET_BIT (1 << 13) | ||
| 28 | |||
| 29 | /* | ||
| 30 | * bits definition in SC_CPU_RESET_STATUS[x] | ||
| 31 | * 1 -- reset status; 0 -- unreset status | ||
| 32 | */ | ||
| 33 | #define CORE_RESET_STATUS(x) (1 << x) | ||
| 34 | #define NEON_RESET_STATUS(x) (1 << (x + 4)) | ||
| 35 | #define CORE_DEBUG_RESET_STATUS(x) (1 << (x + 9)) | ||
| 36 | #define CLUSTER_L2_RESET_STATUS (1 << 8) | ||
| 37 | #define CLUSTER_DEBUG_RESET_STATUS (1 << 13) | ||
| 38 | #define CORE_WFI_STATUS(x) (1 << (x + 16)) | ||
| 39 | #define CORE_WFE_STATUS(x) (1 << (x + 20)) | ||
| 40 | #define CORE_DEBUG_ACK(x) (1 << (x + 24)) | ||
| 41 | |||
| 42 | #define SC_CPU_RESET_REQ(x) (0x520 + (x << 3)) /* reset */ | ||
| 43 | #define SC_CPU_RESET_DREQ(x) (0x524 + (x << 3)) /* unreset */ | ||
| 44 | #define SC_CPU_RESET_STATUS(x) (0x1520 + (x << 3)) | ||
| 45 | |||
| 46 | #define FAB_SF_MODE 0x0c | ||
| 47 | #define FAB_SF_INVLD 0x10 | ||
| 48 | |||
| 49 | /* bits definition in FB_SF_INVLD */ | ||
| 50 | #define FB_SF_INVLD_START (1 << 8) | ||
| 51 | |||
| 52 | #define HIP04_MAX_CLUSTERS 4 | ||
| 53 | #define HIP04_MAX_CPUS_PER_CLUSTER 4 | ||
| 54 | |||
| 55 | #define POLL_MSEC 10 | ||
| 56 | #define TIMEOUT_MSEC 1000 | ||
| 57 | |||
| 58 | static void __iomem *sysctrl, *fabric; | ||
| 59 | static int hip04_cpu_table[HIP04_MAX_CLUSTERS][HIP04_MAX_CPUS_PER_CLUSTER]; | ||
| 60 | static DEFINE_SPINLOCK(boot_lock); | ||
| 61 | static u32 fabric_phys_addr; | ||
| 62 | /* | ||
| 63 | * [0]: bootwrapper physical address | ||
| 64 | * [1]: bootwrapper size | ||
| 65 | * [2]: relocation address | ||
| 66 | * [3]: relocation size | ||
| 67 | */ | ||
| 68 | static u32 hip04_boot_method[4]; | ||
| 69 | |||
| 70 | static bool hip04_cluster_is_down(unsigned int cluster) | ||
| 71 | { | ||
| 72 | int i; | ||
| 73 | |||
| 74 | for (i = 0; i < HIP04_MAX_CPUS_PER_CLUSTER; i++) | ||
| 75 | if (hip04_cpu_table[cluster][i]) | ||
| 76 | return false; | ||
| 77 | return true; | ||
| 78 | } | ||
| 79 | |||
| 80 | static void hip04_set_snoop_filter(unsigned int cluster, unsigned int on) | ||
| 81 | { | ||
| 82 | unsigned long data; | ||
| 83 | |||
| 84 | if (!fabric) | ||
| 85 | BUG(); | ||
| 86 | data = readl_relaxed(fabric + FAB_SF_MODE); | ||
| 87 | if (on) | ||
| 88 | data |= 1 << cluster; | ||
| 89 | else | ||
| 90 | data &= ~(1 << cluster); | ||
| 91 | writel_relaxed(data, fabric + FAB_SF_MODE); | ||
| 92 | do { | ||
| 93 | cpu_relax(); | ||
| 94 | } while (data != readl_relaxed(fabric + FAB_SF_MODE)); | ||
| 95 | } | ||
| 96 | |||
| 97 | static int hip04_mcpm_power_up(unsigned int cpu, unsigned int cluster) | ||
| 98 | { | ||
| 99 | unsigned long data; | ||
| 100 | void __iomem *sys_dreq, *sys_status; | ||
| 101 | |||
| 102 | if (!sysctrl) | ||
| 103 | return -ENODEV; | ||
| 104 | if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER) | ||
| 105 | return -EINVAL; | ||
| 106 | |||
| 107 | spin_lock_irq(&boot_lock); | ||
| 108 | |||
| 109 | if (hip04_cpu_table[cluster][cpu]) | ||
| 110 | goto out; | ||
| 111 | |||
| 112 | sys_dreq = sysctrl + SC_CPU_RESET_DREQ(cluster); | ||
| 113 | sys_status = sysctrl + SC_CPU_RESET_STATUS(cluster); | ||
| 114 | if (hip04_cluster_is_down(cluster)) { | ||
| 115 | data = CLUSTER_DEBUG_RESET_BIT; | ||
| 116 | writel_relaxed(data, sys_dreq); | ||
| 117 | do { | ||
| 118 | cpu_relax(); | ||
| 119 | data = readl_relaxed(sys_status); | ||
| 120 | } while (data & CLUSTER_DEBUG_RESET_STATUS); | ||
| 121 | } | ||
| 122 | |||
| 123 | data = CORE_RESET_BIT(cpu) | NEON_RESET_BIT(cpu) | \ | ||
| 124 | CORE_DEBUG_RESET_BIT(cpu); | ||
| 125 | writel_relaxed(data, sys_dreq); | ||
| 126 | do { | ||
| 127 | cpu_relax(); | ||
| 128 | } while (data == readl_relaxed(sys_status)); | ||
| 129 | /* | ||
| 130 | * We may fail to power up core again without this delay. | ||
| 131 | * It's not mentioned in document. It's found by test. | ||
| 132 | */ | ||
| 133 | udelay(20); | ||
| 134 | out: | ||
| 135 | hip04_cpu_table[cluster][cpu]++; | ||
| 136 | spin_unlock_irq(&boot_lock); | ||
| 137 | |||
| 138 | return 0; | ||
| 139 | } | ||
| 140 | |||
| 141 | static void hip04_mcpm_power_down(void) | ||
| 142 | { | ||
| 143 | unsigned int mpidr, cpu, cluster; | ||
| 144 | bool skip_wfi = false, last_man = false; | ||
| 145 | |||
| 146 | mpidr = read_cpuid_mpidr(); | ||
| 147 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
| 148 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
| 149 | |||
| 150 | __mcpm_cpu_going_down(cpu, cluster); | ||
| 151 | |||
| 152 | spin_lock(&boot_lock); | ||
| 153 | BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP); | ||
| 154 | hip04_cpu_table[cluster][cpu]--; | ||
| 155 | if (hip04_cpu_table[cluster][cpu] == 1) { | ||
| 156 | /* A power_up request went ahead of us. */ | ||
| 157 | skip_wfi = true; | ||
| 158 | } else if (hip04_cpu_table[cluster][cpu] > 1) { | ||
| 159 | pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu); | ||
| 160 | BUG(); | ||
| 161 | } | ||
| 162 | |||
| 163 | last_man = hip04_cluster_is_down(cluster); | ||
| 164 | if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) { | ||
| 165 | spin_unlock(&boot_lock); | ||
| 166 | /* Since it's Cortex A15, disable L2 prefetching. */ | ||
| 167 | asm volatile( | ||
| 168 | "mcr p15, 1, %0, c15, c0, 3 \n\t" | ||
| 169 | "isb \n\t" | ||
| 170 | "dsb " | ||
| 171 | : : "r" (0x400) ); | ||
| 172 | v7_exit_coherency_flush(all); | ||
| 173 | hip04_set_snoop_filter(cluster, 0); | ||
| 174 | __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN); | ||
| 175 | } else { | ||
| 176 | spin_unlock(&boot_lock); | ||
| 177 | v7_exit_coherency_flush(louis); | ||
| 178 | } | ||
| 179 | |||
| 180 | __mcpm_cpu_down(cpu, cluster); | ||
| 181 | |||
| 182 | if (!skip_wfi) | ||
| 183 | wfi(); | ||
| 184 | } | ||
| 185 | |||
| 186 | static int hip04_mcpm_wait_for_powerdown(unsigned int cpu, unsigned int cluster) | ||
| 187 | { | ||
| 188 | unsigned int data, tries, count; | ||
| 189 | int ret = -ETIMEDOUT; | ||
| 190 | |||
| 191 | BUG_ON(cluster >= HIP04_MAX_CLUSTERS || | ||
| 192 | cpu >= HIP04_MAX_CPUS_PER_CLUSTER); | ||
| 193 | |||
| 194 | count = TIMEOUT_MSEC / POLL_MSEC; | ||
| 195 | spin_lock_irq(&boot_lock); | ||
| 196 | for (tries = 0; tries < count; tries++) { | ||
| 197 | if (hip04_cpu_table[cluster][cpu]) { | ||
| 198 | ret = -EBUSY; | ||
| 199 | goto err; | ||
| 200 | } | ||
| 201 | cpu_relax(); | ||
| 202 | data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); | ||
| 203 | if (data & CORE_WFI_STATUS(cpu)) | ||
| 204 | break; | ||
| 205 | spin_unlock_irq(&boot_lock); | ||
| 206 | /* Wait for clean L2 when the whole cluster is down. */ | ||
| 207 | msleep(POLL_MSEC); | ||
| 208 | spin_lock_irq(&boot_lock); | ||
| 209 | } | ||
| 210 | if (tries >= count) | ||
| 211 | goto err; | ||
| 212 | data = CORE_RESET_BIT(cpu) | NEON_RESET_BIT(cpu) | \ | ||
| 213 | CORE_DEBUG_RESET_BIT(cpu); | ||
| 214 | writel_relaxed(data, sysctrl + SC_CPU_RESET_REQ(cluster)); | ||
| 215 | for (tries = 0; tries < count; tries++) { | ||
| 216 | cpu_relax(); | ||
| 217 | data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); | ||
| 218 | if (data & CORE_RESET_STATUS(cpu)) | ||
| 219 | break; | ||
| 220 | } | ||
| 221 | if (tries >= count) | ||
| 222 | goto err; | ||
| 223 | spin_unlock_irq(&boot_lock); | ||
| 224 | return 0; | ||
| 225 | err: | ||
| 226 | spin_unlock_irq(&boot_lock); | ||
| 227 | return ret; | ||
| 228 | } | ||
| 229 | |||
| 230 | static void hip04_mcpm_powered_up(void) | ||
| 231 | { | ||
| 232 | unsigned int mpidr, cpu, cluster; | ||
| 233 | |||
| 234 | mpidr = read_cpuid_mpidr(); | ||
| 235 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
| 236 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
| 237 | |||
| 238 | spin_lock(&boot_lock); | ||
| 239 | if (!hip04_cpu_table[cluster][cpu]) | ||
| 240 | hip04_cpu_table[cluster][cpu] = 1; | ||
| 241 | spin_unlock(&boot_lock); | ||
| 242 | } | ||
| 243 | |||
| 244 | static void __naked hip04_mcpm_power_up_setup(unsigned int affinity_level) | ||
| 245 | { | ||
| 246 | asm volatile (" \n" | ||
| 247 | " cmp r0, #0 \n" | ||
| 248 | " bxeq lr \n" | ||
| 249 | /* calculate fabric phys address */ | ||
| 250 | " adr r2, 2f \n" | ||
| 251 | " ldmia r2, {r1, r3} \n" | ||
| 252 | " sub r0, r2, r1 \n" | ||
| 253 | " ldr r2, [r0, r3] \n" | ||
| 254 | /* get cluster id from MPIDR */ | ||
| 255 | " mrc p15, 0, r0, c0, c0, 5 \n" | ||
| 256 | " ubfx r1, r0, #8, #8 \n" | ||
| 257 | /* 1 << cluster id */ | ||
| 258 | " mov r0, #1 \n" | ||
| 259 | " mov r3, r0, lsl r1 \n" | ||
| 260 | " ldr r0, [r2, #"__stringify(FAB_SF_MODE)"] \n" | ||
| 261 | " tst r0, r3 \n" | ||
| 262 | " bxne lr \n" | ||
| 263 | " orr r1, r0, r3 \n" | ||
| 264 | " str r1, [r2, #"__stringify(FAB_SF_MODE)"] \n" | ||
| 265 | "1: ldr r0, [r2, #"__stringify(FAB_SF_MODE)"] \n" | ||
| 266 | " tst r0, r3 \n" | ||
| 267 | " beq 1b \n" | ||
| 268 | " bx lr \n" | ||
| 269 | |||
| 270 | " .align 2 \n" | ||
| 271 | "2: .word . \n" | ||
| 272 | " .word fabric_phys_addr \n" | ||
| 273 | ); | ||
| 274 | } | ||
| 275 | |||
| 276 | static const struct mcpm_platform_ops hip04_mcpm_ops = { | ||
| 277 | .power_up = hip04_mcpm_power_up, | ||
| 278 | .power_down = hip04_mcpm_power_down, | ||
| 279 | .wait_for_powerdown = hip04_mcpm_wait_for_powerdown, | ||
| 280 | .powered_up = hip04_mcpm_powered_up, | ||
| 281 | }; | ||
| 282 | |||
| 283 | static bool __init hip04_cpu_table_init(void) | ||
| 284 | { | ||
| 285 | unsigned int mpidr, cpu, cluster; | ||
| 286 | |||
| 287 | mpidr = read_cpuid_mpidr(); | ||
| 288 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
| 289 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
| 290 | |||
| 291 | if (cluster >= HIP04_MAX_CLUSTERS || | ||
| 292 | cpu >= HIP04_MAX_CPUS_PER_CLUSTER) { | ||
| 293 | pr_err("%s: boot CPU is out of bound!\n", __func__); | ||
| 294 | return false; | ||
| 295 | } | ||
| 296 | hip04_set_snoop_filter(cluster, 1); | ||
| 297 | hip04_cpu_table[cluster][cpu] = 1; | ||
| 298 | return true; | ||
| 299 | } | ||
| 300 | |||
| 301 | static int __init hip04_mcpm_init(void) | ||
| 302 | { | ||
| 303 | struct device_node *np, *np_sctl, *np_fab; | ||
| 304 | struct resource fab_res; | ||
| 305 | void __iomem *relocation; | ||
| 306 | int ret = -ENODEV; | ||
| 307 | |||
| 308 | np = of_find_compatible_node(NULL, NULL, "hisilicon,hip04-bootwrapper"); | ||
| 309 | if (!np) | ||
| 310 | goto err; | ||
| 311 | ret = of_property_read_u32_array(np, "boot-method", | ||
| 312 | &hip04_boot_method[0], 4); | ||
| 313 | if (ret) | ||
| 314 | goto err; | ||
| 315 | np_sctl = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); | ||
| 316 | if (!np_sctl) | ||
| 317 | goto err; | ||
| 318 | np_fab = of_find_compatible_node(NULL, NULL, "hisilicon,hip04-fabric"); | ||
| 319 | if (!np_fab) | ||
| 320 | goto err; | ||
| 321 | |||
| 322 | ret = memblock_reserve(hip04_boot_method[0], hip04_boot_method[1]); | ||
| 323 | if (ret) | ||
| 324 | goto err; | ||
| 325 | |||
| 326 | relocation = ioremap(hip04_boot_method[2], hip04_boot_method[3]); | ||
| 327 | if (!relocation) { | ||
| 328 | pr_err("failed to map relocation space\n"); | ||
| 329 | ret = -ENOMEM; | ||
| 330 | goto err_reloc; | ||
| 331 | } | ||
| 332 | sysctrl = of_iomap(np_sctl, 0); | ||
| 333 | if (!sysctrl) { | ||
| 334 | pr_err("failed to get sysctrl base\n"); | ||
| 335 | ret = -ENOMEM; | ||
| 336 | goto err_sysctrl; | ||
| 337 | } | ||
| 338 | ret = of_address_to_resource(np_fab, 0, &fab_res); | ||
| 339 | if (ret) { | ||
| 340 | pr_err("failed to get fabric base phys\n"); | ||
| 341 | goto err_fabric; | ||
| 342 | } | ||
| 343 | fabric_phys_addr = fab_res.start; | ||
| 344 | sync_cache_w(&fabric_phys_addr); | ||
| 345 | fabric = of_iomap(np_fab, 0); | ||
| 346 | if (!fabric) { | ||
| 347 | pr_err("failed to get fabric base\n"); | ||
| 348 | ret = -ENOMEM; | ||
| 349 | goto err_fabric; | ||
| 350 | } | ||
| 351 | |||
| 352 | if (!hip04_cpu_table_init()) { | ||
| 353 | ret = -EINVAL; | ||
| 354 | goto err_table; | ||
| 355 | } | ||
| 356 | ret = mcpm_platform_register(&hip04_mcpm_ops); | ||
| 357 | if (ret) { | ||
| 358 | goto err_table; | ||
| 359 | } | ||
| 360 | |||
| 361 | /* | ||
| 362 | * Fill the instruction address that is used after secondary core | ||
| 363 | * out of reset. | ||
| 364 | */ | ||
| 365 | writel_relaxed(hip04_boot_method[0], relocation); | ||
| 366 | writel_relaxed(0xa5a5a5a5, relocation + 4); /* magic number */ | ||
| 367 | writel_relaxed(virt_to_phys(mcpm_entry_point), relocation + 8); | ||
| 368 | writel_relaxed(0, relocation + 12); | ||
| 369 | iounmap(relocation); | ||
| 370 | |||
| 371 | mcpm_sync_init(hip04_mcpm_power_up_setup); | ||
| 372 | mcpm_smp_set_ops(); | ||
| 373 | pr_info("HiP04 MCPM initialized\n"); | ||
| 374 | return ret; | ||
| 375 | err_table: | ||
| 376 | iounmap(fabric); | ||
| 377 | err_fabric: | ||
| 378 | iounmap(sysctrl); | ||
| 379 | err_sysctrl: | ||
| 380 | iounmap(relocation); | ||
| 381 | err_reloc: | ||
| 382 | memblock_free(hip04_boot_method[0], hip04_boot_method[1]); | ||
| 383 | err: | ||
| 384 | return ret; | ||
| 385 | } | ||
| 386 | early_initcall(hip04_mcpm_init); | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 4e9b4f63d42b..11b2957f792b 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
| @@ -69,6 +69,7 @@ config SOC_IMX1 | |||
| 69 | select CPU_ARM920T | 69 | select CPU_ARM920T |
| 70 | select IMX_HAVE_IOMUX_V1 | 70 | select IMX_HAVE_IOMUX_V1 |
| 71 | select MXC_AVIC | 71 | select MXC_AVIC |
| 72 | select PINCTRL_IMX1 | ||
| 72 | 73 | ||
| 73 | config SOC_IMX21 | 74 | config SOC_IMX21 |
| 74 | bool | 75 | bool |
| @@ -124,6 +125,13 @@ config MACH_APF9328 | |||
| 124 | help | 125 | help |
| 125 | Say Yes here if you are using the Armadeus APF9328 development board | 126 | Say Yes here if you are using the Armadeus APF9328 development board |
| 126 | 127 | ||
| 128 | config MACH_IMX1_DT | ||
| 129 | bool "Support i.MX1 platforms from device tree" | ||
| 130 | select SOC_IMX1 | ||
| 131 | help | ||
| 132 | Include support for Freescale i.MX1 based platforms | ||
| 133 | using the device tree for discovery. | ||
| 134 | |||
| 127 | endif | 135 | endif |
| 128 | 136 | ||
| 129 | if ARCH_MULTI_V5 | 137 | if ARCH_MULTI_V5 |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 4147729775d2..6e4fcd8339cd 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
| @@ -16,7 +16,8 @@ obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o clk-imx51-imx53.o $(imx5-pm-y) | |||
| 16 | 16 | ||
| 17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ | 17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ |
| 18 | clk-pfd.o clk-busy.o clk.o \ | 18 | clk-pfd.o clk-busy.o clk.o \ |
| 19 | clk-fixup-div.o clk-fixup-mux.o | 19 | clk-fixup-div.o clk-fixup-mux.o \ |
| 20 | clk-gate-exclusive.o | ||
| 20 | 21 | ||
| 21 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o | 22 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o |
| 22 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | 23 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o |
| @@ -43,6 +44,7 @@ endif | |||
| 43 | # i.MX1 based machines | 44 | # i.MX1 based machines |
| 44 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o | 45 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o |
| 45 | obj-$(CONFIG_MACH_APF9328) += mach-apf9328.o | 46 | obj-$(CONFIG_MACH_APF9328) += mach-apf9328.o |
| 47 | obj-$(CONFIG_MACH_IMX1_DT) += imx1-dt.o | ||
| 46 | 48 | ||
| 47 | # i.MX21 based machines | 49 | # i.MX21 based machines |
| 48 | obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o | 50 | obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o |
diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c index 4a40bbb46183..8259a625a920 100644 --- a/arch/arm/mach-imx/anatop.c +++ b/arch/arm/mach-imx/anatop.c | |||
| @@ -104,6 +104,19 @@ void __init imx_init_revision_from_anatop(void) | |||
| 104 | case 2: | 104 | case 2: |
| 105 | revision = IMX_CHIP_REVISION_1_2; | 105 | revision = IMX_CHIP_REVISION_1_2; |
| 106 | break; | 106 | break; |
| 107 | case 3: | ||
| 108 | revision = IMX_CHIP_REVISION_1_3; | ||
| 109 | break; | ||
| 110 | case 4: | ||
| 111 | revision = IMX_CHIP_REVISION_1_4; | ||
| 112 | break; | ||
| 113 | case 5: | ||
| 114 | /* | ||
| 115 | * i.MX6DQ TO1.5 is defined as Rev 1.3 in Data Sheet, marked | ||
| 116 | * as 'D' in Part Number last character. | ||
| 117 | */ | ||
| 118 | revision = IMX_CHIP_REVISION_1_5; | ||
| 119 | break; | ||
| 107 | default: | 120 | default: |
| 108 | revision = IMX_CHIP_REVISION_UNKNOWN; | 121 | revision = IMX_CHIP_REVISION_UNKNOWN; |
| 109 | } | 122 | } |
diff --git a/arch/arm/mach-imx/clk-gate-exclusive.c b/arch/arm/mach-imx/clk-gate-exclusive.c new file mode 100644 index 000000000000..c12f5f2e04dc --- /dev/null +++ b/arch/arm/mach-imx/clk-gate-exclusive.c | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2014 Freescale Semiconductor, Inc. | ||
| 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 | #include <linux/clk-provider.h> | ||
| 10 | #include <linux/err.h> | ||
| 11 | #include <linux/io.h> | ||
| 12 | #include <linux/slab.h> | ||
| 13 | #include "clk.h" | ||
| 14 | |||
| 15 | /** | ||
| 16 | * struct clk_gate_exclusive - i.MX specific gate clock which is mutually | ||
| 17 | * exclusive with other gate clocks | ||
| 18 | * | ||
| 19 | * @gate: the parent class | ||
| 20 | * @exclusive_mask: mask of gate bits which are mutually exclusive to this | ||
| 21 | * gate clock | ||
| 22 | * | ||
| 23 | * The imx exclusive gate clock is a subclass of basic clk_gate | ||
| 24 | * with an addtional mask to indicate which other gate bits in the same | ||
| 25 | * register is mutually exclusive to this gate clock. | ||
| 26 | */ | ||
| 27 | struct clk_gate_exclusive { | ||
| 28 | struct clk_gate gate; | ||
| 29 | u32 exclusive_mask; | ||
| 30 | }; | ||
| 31 | |||
| 32 | static int clk_gate_exclusive_enable(struct clk_hw *hw) | ||
| 33 | { | ||
| 34 | struct clk_gate *gate = container_of(hw, struct clk_gate, hw); | ||
| 35 | struct clk_gate_exclusive *exgate = container_of(gate, | ||
| 36 | struct clk_gate_exclusive, gate); | ||
| 37 | u32 val = readl(gate->reg); | ||
| 38 | |||
| 39 | if (val & exgate->exclusive_mask) | ||
| 40 | return -EBUSY; | ||
| 41 | |||
| 42 | return clk_gate_ops.enable(hw); | ||
| 43 | } | ||
| 44 | |||
| 45 | static void clk_gate_exclusive_disable(struct clk_hw *hw) | ||
| 46 | { | ||
| 47 | clk_gate_ops.disable(hw); | ||
| 48 | } | ||
| 49 | |||
| 50 | static int clk_gate_exclusive_is_enabled(struct clk_hw *hw) | ||
| 51 | { | ||
| 52 | return clk_gate_ops.is_enabled(hw); | ||
| 53 | } | ||
| 54 | |||
| 55 | static const struct clk_ops clk_gate_exclusive_ops = { | ||
| 56 | .enable = clk_gate_exclusive_enable, | ||
| 57 | .disable = clk_gate_exclusive_disable, | ||
| 58 | .is_enabled = clk_gate_exclusive_is_enabled, | ||
| 59 | }; | ||
| 60 | |||
| 61 | struct clk *imx_clk_gate_exclusive(const char *name, const char *parent, | ||
| 62 | void __iomem *reg, u8 shift, u32 exclusive_mask) | ||
| 63 | { | ||
| 64 | struct clk_gate_exclusive *exgate; | ||
| 65 | struct clk_gate *gate; | ||
| 66 | struct clk *clk; | ||
| 67 | struct clk_init_data init; | ||
| 68 | |||
| 69 | if (exclusive_mask == 0) | ||
| 70 | return ERR_PTR(-EINVAL); | ||
| 71 | |||
| 72 | exgate = kzalloc(sizeof(*exgate), GFP_KERNEL); | ||
| 73 | if (!exgate) | ||
| 74 | return ERR_PTR(-ENOMEM); | ||
| 75 | gate = &exgate->gate; | ||
| 76 | |||
| 77 | init.name = name; | ||
| 78 | init.ops = &clk_gate_exclusive_ops; | ||
| 79 | init.flags = CLK_SET_RATE_PARENT; | ||
| 80 | init.parent_names = parent ? &parent : NULL; | ||
| 81 | init.num_parents = parent ? 1 : 0; | ||
| 82 | |||
| 83 | gate->reg = reg; | ||
| 84 | gate->bit_idx = shift; | ||
| 85 | gate->lock = &imx_ccm_lock; | ||
| 86 | gate->hw.init = &init; | ||
| 87 | exgate->exclusive_mask = exclusive_mask; | ||
| 88 | |||
| 89 | clk = clk_register(NULL, &gate->hw); | ||
| 90 | if (IS_ERR(clk)) | ||
| 91 | kfree(exgate); | ||
| 92 | |||
| 93 | return clk; | ||
| 94 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 29d412975aff..1412daf4a714 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
| @@ -64,7 +64,7 @@ static const char *cko2_sels[] = { | |||
| 64 | "ipu2", "vdo_axi", "osc", "gpu2d_core", | 64 | "ipu2", "vdo_axi", "osc", "gpu2d_core", |
| 65 | "gpu3d_core", "usdhc2", "ssi1", "ssi2", | 65 | "gpu3d_core", "usdhc2", "ssi1", "ssi2", |
| 66 | "ssi3", "gpu3d_shader", "vpu_axi", "can_root", | 66 | "ssi3", "gpu3d_shader", "vpu_axi", "can_root", |
| 67 | "ldb_di0", "ldb_di1", "esai", "eim_slow", | 67 | "ldb_di0", "ldb_di1", "esai_extal", "eim_slow", |
| 68 | "uart_serial", "spdif", "asrc", "hsi_tx", | 68 | "uart_serial", "spdif", "asrc", "hsi_tx", |
| 69 | }; | 69 | }; |
| 70 | static const char *cko_sels[] = { "cko1", "cko2", }; | 70 | static const char *cko_sels[] = { "cko1", "cko2", }; |
| @@ -73,6 +73,14 @@ static const char *lvds_sels[] = { | |||
| 73 | "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", | 73 | "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", |
| 74 | "pcie_ref_125m", "sata_ref_100m", | 74 | "pcie_ref_125m", "sata_ref_100m", |
| 75 | }; | 75 | }; |
| 76 | static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", }; | ||
| 77 | static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", }; | ||
| 78 | static const char *pll2_bypass_sels[] = { "pll2", "pll2_bypass_src", }; | ||
| 79 | static const char *pll3_bypass_sels[] = { "pll3", "pll3_bypass_src", }; | ||
| 80 | static const char *pll4_bypass_sels[] = { "pll4", "pll4_bypass_src", }; | ||
| 81 | static const char *pll5_bypass_sels[] = { "pll5", "pll5_bypass_src", }; | ||
| 82 | static const char *pll6_bypass_sels[] = { "pll6", "pll6_bypass_src", }; | ||
| 83 | static const char *pll7_bypass_sels[] = { "pll7", "pll7_bypass_src", }; | ||
| 76 | 84 | ||
| 77 | static struct clk *clk[IMX6QDL_CLK_END]; | 85 | static struct clk *clk[IMX6QDL_CLK_END]; |
| 78 | static struct clk_onecell_data clk_data; | 86 | static struct clk_onecell_data clk_data; |
| @@ -107,6 +115,10 @@ static struct clk_div_table video_div_table[] = { | |||
| 107 | }; | 115 | }; |
| 108 | 116 | ||
| 109 | static unsigned int share_count_esai; | 117 | static unsigned int share_count_esai; |
| 118 | static unsigned int share_count_asrc; | ||
| 119 | static unsigned int share_count_ssi1; | ||
| 120 | static unsigned int share_count_ssi2; | ||
| 121 | static unsigned int share_count_ssi3; | ||
| 110 | 122 | ||
| 111 | static void __init imx6q_clocks_init(struct device_node *ccm_node) | 123 | static void __init imx6q_clocks_init(struct device_node *ccm_node) |
| 112 | { | 124 | { |
| @@ -119,6 +131,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 119 | clk[IMX6QDL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); | 131 | clk[IMX6QDL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); |
| 120 | clk[IMX6QDL_CLK_CKIH] = imx_obtain_fixed_clock("ckih1", 0); | 132 | clk[IMX6QDL_CLK_CKIH] = imx_obtain_fixed_clock("ckih1", 0); |
| 121 | clk[IMX6QDL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); | 133 | clk[IMX6QDL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); |
| 134 | /* Clock source from external clock via CLK1/2 PADs */ | ||
| 135 | clk[IMX6QDL_CLK_ANACLK1] = imx_obtain_fixed_clock("anaclk1", 0); | ||
| 136 | clk[IMX6QDL_CLK_ANACLK2] = imx_obtain_fixed_clock("anaclk2", 0); | ||
| 122 | 137 | ||
| 123 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); | 138 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); |
| 124 | base = of_iomap(np, 0); | 139 | base = of_iomap(np, 0); |
| @@ -132,14 +147,47 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 132 | video_div_table[2].div = 1; | 147 | video_div_table[2].div = 1; |
| 133 | }; | 148 | }; |
| 134 | 149 | ||
| 135 | /* type name parent_name base div_mask */ | 150 | clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 136 | clk[IMX6QDL_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); | 151 | clk[IMX6QDL_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 137 | clk[IMX6QDL_CLK_PLL2_BUS] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); | 152 | clk[IMX6QDL_PLL3_BYPASS_SRC] = imx_clk_mux("pll3_bypass_src", base + 0x10, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 138 | clk[IMX6QDL_CLK_PLL3_USB_OTG] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); | 153 | clk[IMX6QDL_PLL4_BYPASS_SRC] = imx_clk_mux("pll4_bypass_src", base + 0x70, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 139 | clk[IMX6QDL_CLK_PLL4_AUDIO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); | 154 | clk[IMX6QDL_PLL5_BYPASS_SRC] = imx_clk_mux("pll5_bypass_src", base + 0xa0, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 140 | clk[IMX6QDL_CLK_PLL5_VIDEO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); | 155 | clk[IMX6QDL_PLL6_BYPASS_SRC] = imx_clk_mux("pll6_bypass_src", base + 0xe0, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 141 | clk[IMX6QDL_CLK_PLL6_ENET] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); | 156 | clk[IMX6QDL_PLL7_BYPASS_SRC] = imx_clk_mux("pll7_bypass_src", base + 0x20, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 142 | clk[IMX6QDL_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); | 157 | |
| 158 | /* type name parent_name base div_mask */ | ||
| 159 | clk[IMX6QDL_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1", "pll1_bypass_src", base + 0x00, 0x7f); | ||
| 160 | clk[IMX6QDL_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "pll2_bypass_src", base + 0x30, 0x1); | ||
| 161 | clk[IMX6QDL_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3", "pll3_bypass_src", base + 0x10, 0x3); | ||
| 162 | clk[IMX6QDL_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4", "pll4_bypass_src", base + 0x70, 0x7f); | ||
| 163 | clk[IMX6QDL_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5", "pll5_bypass_src", base + 0xa0, 0x7f); | ||
| 164 | clk[IMX6QDL_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6", "pll6_bypass_src", base + 0xe0, 0x3); | ||
| 165 | clk[IMX6QDL_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7", "pll7_bypass_src", base + 0x20, 0x3); | ||
| 166 | |||
| 167 | clk[IMX6QDL_PLL1_BYPASS] = imx_clk_mux_flags("pll1_bypass", base + 0x00, 16, 1, pll1_bypass_sels, ARRAY_SIZE(pll1_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 168 | clk[IMX6QDL_PLL2_BYPASS] = imx_clk_mux_flags("pll2_bypass", base + 0x30, 16, 1, pll2_bypass_sels, ARRAY_SIZE(pll2_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 169 | clk[IMX6QDL_PLL3_BYPASS] = imx_clk_mux_flags("pll3_bypass", base + 0x10, 16, 1, pll3_bypass_sels, ARRAY_SIZE(pll3_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 170 | clk[IMX6QDL_PLL4_BYPASS] = imx_clk_mux_flags("pll4_bypass", base + 0x70, 16, 1, pll4_bypass_sels, ARRAY_SIZE(pll4_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 171 | clk[IMX6QDL_PLL5_BYPASS] = imx_clk_mux_flags("pll5_bypass", base + 0xa0, 16, 1, pll5_bypass_sels, ARRAY_SIZE(pll5_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 172 | clk[IMX6QDL_PLL6_BYPASS] = imx_clk_mux_flags("pll6_bypass", base + 0xe0, 16, 1, pll6_bypass_sels, ARRAY_SIZE(pll6_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 173 | clk[IMX6QDL_PLL7_BYPASS] = imx_clk_mux_flags("pll7_bypass", base + 0x20, 16, 1, pll7_bypass_sels, ARRAY_SIZE(pll7_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 174 | |||
| 175 | /* Do not bypass PLLs initially */ | ||
| 176 | clk_set_parent(clk[IMX6QDL_PLL1_BYPASS], clk[IMX6QDL_CLK_PLL1]); | ||
| 177 | clk_set_parent(clk[IMX6QDL_PLL2_BYPASS], clk[IMX6QDL_CLK_PLL2]); | ||
| 178 | clk_set_parent(clk[IMX6QDL_PLL3_BYPASS], clk[IMX6QDL_CLK_PLL3]); | ||
| 179 | clk_set_parent(clk[IMX6QDL_PLL4_BYPASS], clk[IMX6QDL_CLK_PLL4]); | ||
| 180 | clk_set_parent(clk[IMX6QDL_PLL5_BYPASS], clk[IMX6QDL_CLK_PLL5]); | ||
| 181 | clk_set_parent(clk[IMX6QDL_PLL6_BYPASS], clk[IMX6QDL_CLK_PLL6]); | ||
| 182 | clk_set_parent(clk[IMX6QDL_PLL7_BYPASS], clk[IMX6QDL_CLK_PLL7]); | ||
| 183 | |||
| 184 | clk[IMX6QDL_CLK_PLL1_SYS] = imx_clk_gate("pll1_sys", "pll1_bypass", base + 0x00, 13); | ||
| 185 | clk[IMX6QDL_CLK_PLL2_BUS] = imx_clk_gate("pll2_bus", "pll2_bypass", base + 0x30, 13); | ||
| 186 | clk[IMX6QDL_CLK_PLL3_USB_OTG] = imx_clk_gate("pll3_usb_otg", "pll3_bypass", base + 0x10, 13); | ||
| 187 | clk[IMX6QDL_CLK_PLL4_AUDIO] = imx_clk_gate("pll4_audio", "pll4_bypass", base + 0x70, 13); | ||
| 188 | clk[IMX6QDL_CLK_PLL5_VIDEO] = imx_clk_gate("pll5_video", "pll5_bypass", base + 0xa0, 13); | ||
| 189 | clk[IMX6QDL_CLK_PLL6_ENET] = imx_clk_gate("pll6_enet", "pll6_bypass", base + 0xe0, 13); | ||
| 190 | clk[IMX6QDL_CLK_PLL7_USB_HOST] = imx_clk_gate("pll7_usb_host", "pll7_bypass", base + 0x20, 13); | ||
| 143 | 191 | ||
| 144 | /* | 192 | /* |
| 145 | * Bit 20 is the reserved and read-only bit, we do this only for: | 193 | * Bit 20 is the reserved and read-only bit, we do this only for: |
| @@ -176,8 +224,11 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 176 | * the "output_enable" bit as a gate, even though it's really just | 224 | * the "output_enable" bit as a gate, even though it's really just |
| 177 | * enabling clock output. | 225 | * enabling clock output. |
| 178 | */ | 226 | */ |
| 179 | clk[IMX6QDL_CLK_LVDS1_GATE] = imx_clk_gate("lvds1_gate", "lvds1_sel", base + 0x160, 10); | 227 | clk[IMX6QDL_CLK_LVDS1_GATE] = imx_clk_gate_exclusive("lvds1_gate", "lvds1_sel", base + 0x160, 10, BIT(12)); |
| 180 | clk[IMX6QDL_CLK_LVDS2_GATE] = imx_clk_gate("lvds2_gate", "lvds2_sel", base + 0x160, 11); | 228 | clk[IMX6QDL_CLK_LVDS2_GATE] = imx_clk_gate_exclusive("lvds2_gate", "lvds2_sel", base + 0x160, 11, BIT(13)); |
| 229 | |||
| 230 | clk[IMX6QDL_CLK_LVDS1_IN] = imx_clk_gate_exclusive("lvds1_in", "anaclk1", base + 0x160, 12, BIT(10)); | ||
| 231 | clk[IMX6QDL_CLK_LVDS2_IN] = imx_clk_gate_exclusive("lvds2_in", "anaclk2", base + 0x160, 13, BIT(11)); | ||
| 181 | 232 | ||
| 182 | /* name parent_name reg idx */ | 233 | /* name parent_name reg idx */ |
| 183 | clk[IMX6QDL_CLK_PLL2_PFD0_352M] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | 234 | clk[IMX6QDL_CLK_PLL2_PFD0_352M] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); |
| @@ -194,6 +245,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 194 | clk[IMX6QDL_CLK_PLL3_80M] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6); | 245 | clk[IMX6QDL_CLK_PLL3_80M] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6); |
| 195 | clk[IMX6QDL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); | 246 | clk[IMX6QDL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); |
| 196 | clk[IMX6QDL_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2); | 247 | clk[IMX6QDL_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2); |
| 248 | clk[IMX6QDL_CLK_GPT_3M] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8); | ||
| 197 | if (cpu_is_imx6dl()) { | 249 | if (cpu_is_imx6dl()) { |
| 198 | clk[IMX6QDL_CLK_GPU2D_AXI] = imx_clk_fixed_factor("gpu2d_axi", "mmdc_ch0_axi_podf", 1, 1); | 250 | clk[IMX6QDL_CLK_GPU2D_AXI] = imx_clk_fixed_factor("gpu2d_axi", "mmdc_ch0_axi_podf", 1, 1); |
| 199 | clk[IMX6QDL_CLK_GPU3D_AXI] = imx_clk_fixed_factor("gpu3d_axi", "mmdc_ch0_axi_podf", 1, 1); | 251 | clk[IMX6QDL_CLK_GPU3D_AXI] = imx_clk_fixed_factor("gpu3d_axi", "mmdc_ch0_axi_podf", 1, 1); |
| @@ -317,7 +369,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 317 | 369 | ||
| 318 | /* name parent_name reg shift */ | 370 | /* name parent_name reg shift */ |
| 319 | clk[IMX6QDL_CLK_APBH_DMA] = imx_clk_gate2("apbh_dma", "usdhc3", base + 0x68, 4); | 371 | clk[IMX6QDL_CLK_APBH_DMA] = imx_clk_gate2("apbh_dma", "usdhc3", base + 0x68, 4); |
| 320 | clk[IMX6QDL_CLK_ASRC] = imx_clk_gate2("asrc", "asrc_podf", base + 0x68, 6); | 372 | clk[IMX6QDL_CLK_ASRC] = imx_clk_gate2_shared("asrc", "asrc_podf", base + 0x68, 6, &share_count_asrc); |
| 373 | clk[IMX6QDL_CLK_ASRC_IPG] = imx_clk_gate2_shared("asrc_ipg", "ahb", base + 0x68, 6, &share_count_asrc); | ||
| 374 | clk[IMX6QDL_CLK_ASRC_MEM] = imx_clk_gate2_shared("asrc_mem", "ahb", base + 0x68, 6, &share_count_asrc); | ||
| 321 | clk[IMX6QDL_CLK_CAN1_IPG] = imx_clk_gate2("can1_ipg", "ipg", base + 0x68, 14); | 375 | clk[IMX6QDL_CLK_CAN1_IPG] = imx_clk_gate2("can1_ipg", "ipg", base + 0x68, 14); |
| 322 | clk[IMX6QDL_CLK_CAN1_SERIAL] = imx_clk_gate2("can1_serial", "can_root", base + 0x68, 16); | 376 | clk[IMX6QDL_CLK_CAN1_SERIAL] = imx_clk_gate2("can1_serial", "can_root", base + 0x68, 16); |
| 323 | clk[IMX6QDL_CLK_CAN2_IPG] = imx_clk_gate2("can2_ipg", "ipg", base + 0x68, 18); | 377 | clk[IMX6QDL_CLK_CAN2_IPG] = imx_clk_gate2("can2_ipg", "ipg", base + 0x68, 18); |
| @@ -331,8 +385,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 331 | else | 385 | else |
| 332 | clk[IMX6Q_CLK_ECSPI5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); | 386 | clk[IMX6Q_CLK_ECSPI5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); |
| 333 | clk[IMX6QDL_CLK_ENET] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); | 387 | clk[IMX6QDL_CLK_ENET] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); |
| 334 | clk[IMX6QDL_CLK_ESAI] = imx_clk_gate2_shared("esai", "esai_podf", base + 0x6c, 16, &share_count_esai); | 388 | clk[IMX6QDL_CLK_ESAI_EXTAL] = imx_clk_gate2_shared("esai_extal", "esai_podf", base + 0x6c, 16, &share_count_esai); |
| 335 | clk[IMX6QDL_CLK_ESAI_AHB] = imx_clk_gate2_shared("esai_ahb", "ahb", base + 0x6c, 16, &share_count_esai); | 389 | clk[IMX6QDL_CLK_ESAI_IPG] = imx_clk_gate2_shared("esai_ipg", "ipg", base + 0x6c, 16, &share_count_esai); |
| 390 | clk[IMX6QDL_CLK_ESAI_MEM] = imx_clk_gate2_shared("esai_mem", "ahb", base + 0x6c, 16, &share_count_esai); | ||
| 336 | clk[IMX6QDL_CLK_GPT_IPG] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); | 391 | clk[IMX6QDL_CLK_GPT_IPG] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); |
| 337 | clk[IMX6QDL_CLK_GPT_IPG_PER] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); | 392 | clk[IMX6QDL_CLK_GPT_IPG_PER] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); |
| 338 | if (cpu_is_imx6dl()) | 393 | if (cpu_is_imx6dl()) |
| @@ -388,9 +443,12 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 388 | clk[IMX6QDL_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); | 443 | clk[IMX6QDL_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); |
| 389 | clk[IMX6QDL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | 444 | clk[IMX6QDL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
| 390 | clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); | 445 | clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); |
| 391 | clk[IMX6QDL_CLK_SSI1_IPG] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); | 446 | clk[IMX6QDL_CLK_SSI1_IPG] = imx_clk_gate2_shared("ssi1_ipg", "ipg", base + 0x7c, 18, &share_count_ssi1); |
| 392 | clk[IMX6QDL_CLK_SSI2_IPG] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); | 447 | clk[IMX6QDL_CLK_SSI2_IPG] = imx_clk_gate2_shared("ssi2_ipg", "ipg", base + 0x7c, 20, &share_count_ssi2); |
| 393 | clk[IMX6QDL_CLK_SSI3_IPG] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); | 448 | clk[IMX6QDL_CLK_SSI3_IPG] = imx_clk_gate2_shared("ssi3_ipg", "ipg", base + 0x7c, 22, &share_count_ssi3); |
| 449 | clk[IMX6QDL_CLK_SSI1] = imx_clk_gate2_shared("ssi1", "ssi1_podf", base + 0x7c, 18, &share_count_ssi1); | ||
| 450 | clk[IMX6QDL_CLK_SSI2] = imx_clk_gate2_shared("ssi2", "ssi2_podf", base + 0x7c, 20, &share_count_ssi2); | ||
| 451 | clk[IMX6QDL_CLK_SSI3] = imx_clk_gate2_shared("ssi3", "ssi3_podf", base + 0x7c, 22, &share_count_ssi3); | ||
| 394 | clk[IMX6QDL_CLK_UART_IPG] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); | 452 | clk[IMX6QDL_CLK_UART_IPG] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); |
| 395 | clk[IMX6QDL_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); | 453 | clk[IMX6QDL_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); |
| 396 | clk[IMX6QDL_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); | 454 | clk[IMX6QDL_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); |
| @@ -404,6 +462,13 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
| 404 | clk[IMX6QDL_CLK_CKO1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); | 462 | clk[IMX6QDL_CLK_CKO1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); |
| 405 | clk[IMX6QDL_CLK_CKO2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); | 463 | clk[IMX6QDL_CLK_CKO2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); |
| 406 | 464 | ||
| 465 | /* | ||
| 466 | * The gpt_3m clock is not available on i.MX6Q TO1.0. Let's point it | ||
| 467 | * to clock gpt_ipg_per to ease the gpt driver code. | ||
| 468 | */ | ||
| 469 | if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) | ||
| 470 | clk[IMX6QDL_CLK_GPT_3M] = clk[IMX6QDL_CLK_GPT_IPG_PER]; | ||
| 471 | |||
| 407 | imx_check_clocks(clk, ARRAY_SIZE(clk)); | 472 | imx_check_clocks(clk, ARRAY_SIZE(clk)); |
| 408 | 473 | ||
| 409 | clk_data.clks = clk; | 474 | clk_data.clks = clk; |
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c index fef46faf692f..e982ebe10814 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c | |||
| @@ -43,11 +43,13 @@ static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", "dummy", | |||
| 43 | static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", }; | 43 | static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", }; |
| 44 | static const char *periph_sels[] = { "pre_periph_sel", "periph_clk2_podf", }; | 44 | static const char *periph_sels[] = { "pre_periph_sel", "periph_clk2_podf", }; |
| 45 | static const char *periph2_sels[] = { "pre_periph2_sel", "periph2_clk2_podf", }; | 45 | static const char *periph2_sels[] = { "pre_periph2_sel", "periph2_clk2_podf", }; |
| 46 | static const char *csi_lcdif_sels[] = { "mmdc", "pll2_pfd2", "pll3_120m", "pll3_pfd1", }; | 46 | static const char *csi_sels[] = { "osc", "pll2_pfd2", "pll3_120m", "pll3_pfd1", }; |
| 47 | static const char *lcdif_axi_sels[] = { "pll2_bus", "pll2_pfd2", "pll3_usb_otg", "pll3_pfd1", }; | ||
| 47 | static const char *usdhc_sels[] = { "pll2_pfd2", "pll2_pfd0", }; | 48 | static const char *usdhc_sels[] = { "pll2_pfd2", "pll2_pfd0", }; |
| 48 | static const char *ssi_sels[] = { "pll3_pfd2", "pll3_pfd3", "pll4_audio_div", "dummy", }; | 49 | static const char *ssi_sels[] = { "pll3_pfd2", "pll3_pfd3", "pll4_audio_div", "dummy", }; |
| 49 | static const char *perclk_sels[] = { "ipg", "osc", }; | 50 | static const char *perclk_sels[] = { "ipg", "osc", }; |
| 50 | static const char *epdc_pxp_sels[] = { "mmdc", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd2", "pll3_pfd1", }; | 51 | static const char *pxp_axi_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd2", "pll3_pfd3", }; |
| 52 | static const char *epdc_axi_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd2", "pll3_pfd2", }; | ||
| 51 | static const char *gpu2d_ovg_sels[] = { "pll3_pfd1", "pll3_usb_otg", "pll2_bus", "pll2_pfd2", }; | 53 | static const char *gpu2d_ovg_sels[] = { "pll3_pfd1", "pll3_usb_otg", "pll2_bus", "pll2_pfd2", }; |
| 52 | static const char *gpu2d_sels[] = { "pll2_pfd2", "pll3_usb_otg", "pll3_pfd1", "pll2_bus", }; | 54 | static const char *gpu2d_sels[] = { "pll2_pfd2", "pll3_usb_otg", "pll3_pfd1", "pll2_bus", }; |
| 53 | static const char *lcdif_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll3_pfd0", "pll3_pfd1", }; | 55 | static const char *lcdif_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll3_pfd0", "pll3_pfd1", }; |
| @@ -55,6 +57,20 @@ static const char *epdc_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_d | |||
| 55 | static const char *audio_sels[] = { "pll4_audio_div", "pll3_pfd2", "pll3_pfd3", "pll3_usb_otg", }; | 57 | static const char *audio_sels[] = { "pll4_audio_div", "pll3_pfd2", "pll3_pfd3", "pll3_usb_otg", }; |
| 56 | static const char *ecspi_sels[] = { "pll3_60m", "osc", }; | 58 | static const char *ecspi_sels[] = { "pll3_60m", "osc", }; |
| 57 | static const char *uart_sels[] = { "pll3_80m", "osc", }; | 59 | static const char *uart_sels[] = { "pll3_80m", "osc", }; |
| 60 | static const char *lvds_sels[] = { | ||
| 61 | "pll1_sys", "pll2_bus", "pll2_pfd0", "pll2_pfd1", "pll2_pfd2", "dummy", "pll4_audio", "pll5_video", | ||
| 62 | "dummy", "enet_ref", "dummy", "dummy", "pll3_usb_otg", "pll7_usb_host", "pll3_pfd0", "pll3_pfd1", | ||
| 63 | "pll3_pfd2", "pll3_pfd3", "osc", "dummy", "dummy", "dummy", "dummy", "dummy", | ||
| 64 | "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", | ||
| 65 | }; | ||
| 66 | static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", }; | ||
| 67 | static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", }; | ||
| 68 | static const char *pll2_bypass_sels[] = { "pll2", "pll2_bypass_src", }; | ||
| 69 | static const char *pll3_bypass_sels[] = { "pll3", "pll3_bypass_src", }; | ||
| 70 | static const char *pll4_bypass_sels[] = { "pll4", "pll4_bypass_src", }; | ||
| 71 | static const char *pll5_bypass_sels[] = { "pll5", "pll5_bypass_src", }; | ||
| 72 | static const char *pll6_bypass_sels[] = { "pll6", "pll6_bypass_src", }; | ||
| 73 | static const char *pll7_bypass_sels[] = { "pll7", "pll7_bypass_src", }; | ||
| 58 | 74 | ||
| 59 | static struct clk_div_table clk_enet_ref_table[] = { | 75 | static struct clk_div_table clk_enet_ref_table[] = { |
| 60 | { .val = 0, .div = 20, }, | 76 | { .val = 0, .div = 20, }, |
| @@ -79,6 +95,10 @@ static struct clk_div_table video_div_table[] = { | |||
| 79 | { } | 95 | { } |
| 80 | }; | 96 | }; |
| 81 | 97 | ||
| 98 | static unsigned int share_count_ssi1; | ||
| 99 | static unsigned int share_count_ssi2; | ||
| 100 | static unsigned int share_count_ssi3; | ||
| 101 | |||
| 82 | static struct clk *clks[IMX6SL_CLK_END]; | 102 | static struct clk *clks[IMX6SL_CLK_END]; |
| 83 | static struct clk_onecell_data clk_data; | 103 | static struct clk_onecell_data clk_data; |
| 84 | static void __iomem *ccm_base; | 104 | static void __iomem *ccm_base; |
| @@ -175,20 +195,59 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
| 175 | clks[IMX6SL_CLK_DUMMY] = imx_clk_fixed("dummy", 0); | 195 | clks[IMX6SL_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
| 176 | clks[IMX6SL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); | 196 | clks[IMX6SL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); |
| 177 | clks[IMX6SL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); | 197 | clks[IMX6SL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); |
| 198 | /* Clock source from external clock via CLK1 PAD */ | ||
| 199 | clks[IMX6SL_CLK_ANACLK1] = imx_obtain_fixed_clock("anaclk1", 0); | ||
| 178 | 200 | ||
| 179 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-anatop"); | 201 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-anatop"); |
| 180 | base = of_iomap(np, 0); | 202 | base = of_iomap(np, 0); |
| 181 | WARN_ON(!base); | 203 | WARN_ON(!base); |
| 182 | anatop_base = base; | 204 | anatop_base = base; |
| 183 | 205 | ||
| 184 | /* type name parent base div_mask */ | 206 | clks[IMX6SL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 185 | clks[IMX6SL_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); | 207 | clks[IMX6SL_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 186 | clks[IMX6SL_CLK_PLL2_BUS] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); | 208 | clks[IMX6SL_PLL3_BYPASS_SRC] = imx_clk_mux("pll3_bypass_src", base + 0x10, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 187 | clks[IMX6SL_CLK_PLL3_USB_OTG] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); | 209 | clks[IMX6SL_PLL4_BYPASS_SRC] = imx_clk_mux("pll4_bypass_src", base + 0x70, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 188 | clks[IMX6SL_CLK_PLL4_AUDIO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); | 210 | clks[IMX6SL_PLL5_BYPASS_SRC] = imx_clk_mux("pll5_bypass_src", base + 0xa0, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 189 | clks[IMX6SL_CLK_PLL5_VIDEO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); | 211 | clks[IMX6SL_PLL6_BYPASS_SRC] = imx_clk_mux("pll6_bypass_src", base + 0xe0, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 190 | clks[IMX6SL_CLK_PLL6_ENET] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); | 212 | clks[IMX6SL_PLL7_BYPASS_SRC] = imx_clk_mux("pll7_bypass_src", base + 0x20, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 191 | clks[IMX6SL_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host", "osc", base + 0x20, 0x3); | 213 | |
| 214 | /* type name parent_name base div_mask */ | ||
| 215 | clks[IMX6SL_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1", "pll1_bypass_src", base + 0x00, 0x7f); | ||
| 216 | clks[IMX6SL_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "pll2_bypass_src", base + 0x30, 0x1); | ||
| 217 | clks[IMX6SL_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3", "pll3_bypass_src", base + 0x10, 0x3); | ||
| 218 | clks[IMX6SL_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4", "pll4_bypass_src", base + 0x70, 0x7f); | ||
| 219 | clks[IMX6SL_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5", "pll5_bypass_src", base + 0xa0, 0x7f); | ||
| 220 | clks[IMX6SL_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6", "pll6_bypass_src", base + 0xe0, 0x3); | ||
| 221 | clks[IMX6SL_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7", "pll7_bypass_src", base + 0x20, 0x3); | ||
| 222 | |||
| 223 | clks[IMX6SL_PLL1_BYPASS] = imx_clk_mux_flags("pll1_bypass", base + 0x00, 16, 1, pll1_bypass_sels, ARRAY_SIZE(pll1_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 224 | clks[IMX6SL_PLL2_BYPASS] = imx_clk_mux_flags("pll2_bypass", base + 0x30, 16, 1, pll2_bypass_sels, ARRAY_SIZE(pll2_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 225 | clks[IMX6SL_PLL3_BYPASS] = imx_clk_mux_flags("pll3_bypass", base + 0x10, 16, 1, pll3_bypass_sels, ARRAY_SIZE(pll3_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 226 | clks[IMX6SL_PLL4_BYPASS] = imx_clk_mux_flags("pll4_bypass", base + 0x70, 16, 1, pll4_bypass_sels, ARRAY_SIZE(pll4_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 227 | clks[IMX6SL_PLL5_BYPASS] = imx_clk_mux_flags("pll5_bypass", base + 0xa0, 16, 1, pll5_bypass_sels, ARRAY_SIZE(pll5_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 228 | clks[IMX6SL_PLL6_BYPASS] = imx_clk_mux_flags("pll6_bypass", base + 0xe0, 16, 1, pll6_bypass_sels, ARRAY_SIZE(pll6_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 229 | clks[IMX6SL_PLL7_BYPASS] = imx_clk_mux_flags("pll7_bypass", base + 0x20, 16, 1, pll7_bypass_sels, ARRAY_SIZE(pll7_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 230 | |||
| 231 | /* Do not bypass PLLs initially */ | ||
| 232 | clk_set_parent(clks[IMX6SL_PLL1_BYPASS], clks[IMX6SL_CLK_PLL1]); | ||
| 233 | clk_set_parent(clks[IMX6SL_PLL2_BYPASS], clks[IMX6SL_CLK_PLL2]); | ||
| 234 | clk_set_parent(clks[IMX6SL_PLL3_BYPASS], clks[IMX6SL_CLK_PLL3]); | ||
| 235 | clk_set_parent(clks[IMX6SL_PLL4_BYPASS], clks[IMX6SL_CLK_PLL4]); | ||
| 236 | clk_set_parent(clks[IMX6SL_PLL5_BYPASS], clks[IMX6SL_CLK_PLL5]); | ||
| 237 | clk_set_parent(clks[IMX6SL_PLL6_BYPASS], clks[IMX6SL_CLK_PLL6]); | ||
| 238 | clk_set_parent(clks[IMX6SL_PLL7_BYPASS], clks[IMX6SL_CLK_PLL7]); | ||
| 239 | |||
| 240 | clks[IMX6SL_CLK_PLL1_SYS] = imx_clk_gate("pll1_sys", "pll1_bypass", base + 0x00, 13); | ||
| 241 | clks[IMX6SL_CLK_PLL2_BUS] = imx_clk_gate("pll2_bus", "pll2_bypass", base + 0x30, 13); | ||
| 242 | clks[IMX6SL_CLK_PLL3_USB_OTG] = imx_clk_gate("pll3_usb_otg", "pll3_bypass", base + 0x10, 13); | ||
| 243 | clks[IMX6SL_CLK_PLL4_AUDIO] = imx_clk_gate("pll4_audio", "pll4_bypass", base + 0x70, 13); | ||
| 244 | clks[IMX6SL_CLK_PLL5_VIDEO] = imx_clk_gate("pll5_video", "pll5_bypass", base + 0xa0, 13); | ||
| 245 | clks[IMX6SL_CLK_PLL6_ENET] = imx_clk_gate("pll6_enet", "pll6_bypass", base + 0xe0, 13); | ||
| 246 | clks[IMX6SL_CLK_PLL7_USB_HOST] = imx_clk_gate("pll7_usb_host", "pll7_bypass", base + 0x20, 13); | ||
| 247 | |||
| 248 | clks[IMX6SL_CLK_LVDS1_SEL] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); | ||
| 249 | clks[IMX6SL_CLK_LVDS1_OUT] = imx_clk_gate_exclusive("lvds1_out", "lvds1_sel", base + 0x160, 10, BIT(12)); | ||
| 250 | clks[IMX6SL_CLK_LVDS1_IN] = imx_clk_gate_exclusive("lvds1_in", "anaclk1", base + 0x160, 12, BIT(10)); | ||
| 192 | 251 | ||
| 193 | /* | 252 | /* |
| 194 | * usbphy1 and usbphy2 are implemented as dummy gates using reserve | 253 | * usbphy1 and usbphy2 are implemented as dummy gates using reserve |
| @@ -241,8 +300,8 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
| 241 | clks[IMX6SL_CLK_PRE_PERIPH_SEL] = imx_clk_mux("pre_periph_sel", base + 0x18, 18, 2, pre_periph_sels, ARRAY_SIZE(pre_periph_sels)); | 300 | clks[IMX6SL_CLK_PRE_PERIPH_SEL] = imx_clk_mux("pre_periph_sel", base + 0x18, 18, 2, pre_periph_sels, ARRAY_SIZE(pre_periph_sels)); |
| 242 | clks[IMX6SL_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels)); | 301 | clks[IMX6SL_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels)); |
| 243 | clks[IMX6SL_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | 302 | clks[IMX6SL_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); |
| 244 | clks[IMX6SL_CLK_CSI_SEL] = imx_clk_mux("csi_sel", base + 0x3c, 9, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels)); | 303 | clks[IMX6SL_CLK_CSI_SEL] = imx_clk_mux("csi_sel", base + 0x3c, 9, 2, csi_sels, ARRAY_SIZE(csi_sels)); |
| 245 | clks[IMX6SL_CLK_LCDIF_AXI_SEL] = imx_clk_mux("lcdif_axi_sel", base + 0x3c, 14, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels)); | 304 | clks[IMX6SL_CLK_LCDIF_AXI_SEL] = imx_clk_mux("lcdif_axi_sel", base + 0x3c, 14, 2, lcdif_axi_sels, ARRAY_SIZE(lcdif_axi_sels)); |
| 246 | clks[IMX6SL_CLK_USDHC1_SEL] = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 305 | clks[IMX6SL_CLK_USDHC1_SEL] = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
| 247 | clks[IMX6SL_CLK_USDHC2_SEL] = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 306 | clks[IMX6SL_CLK_USDHC2_SEL] = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
| 248 | clks[IMX6SL_CLK_USDHC3_SEL] = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); | 307 | clks[IMX6SL_CLK_USDHC3_SEL] = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
| @@ -251,8 +310,8 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
| 251 | clks[IMX6SL_CLK_SSI2_SEL] = imx_clk_fixup_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); | 310 | clks[IMX6SL_CLK_SSI2_SEL] = imx_clk_fixup_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
| 252 | clks[IMX6SL_CLK_SSI3_SEL] = imx_clk_fixup_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); | 311 | clks[IMX6SL_CLK_SSI3_SEL] = imx_clk_fixup_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
| 253 | clks[IMX6SL_CLK_PERCLK_SEL] = imx_clk_fixup_mux("perclk_sel", base + 0x1c, 6, 1, perclk_sels, ARRAY_SIZE(perclk_sels), imx_cscmr1_fixup); | 312 | clks[IMX6SL_CLK_PERCLK_SEL] = imx_clk_fixup_mux("perclk_sel", base + 0x1c, 6, 1, perclk_sels, ARRAY_SIZE(perclk_sels), imx_cscmr1_fixup); |
| 254 | clks[IMX6SL_CLK_PXP_AXI_SEL] = imx_clk_mux("pxp_axi_sel", base + 0x34, 6, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels)); | 313 | clks[IMX6SL_CLK_PXP_AXI_SEL] = imx_clk_mux("pxp_axi_sel", base + 0x34, 6, 3, pxp_axi_sels, ARRAY_SIZE(pxp_axi_sels)); |
| 255 | clks[IMX6SL_CLK_EPDC_AXI_SEL] = imx_clk_mux("epdc_axi_sel", base + 0x34, 15, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels)); | 314 | clks[IMX6SL_CLK_EPDC_AXI_SEL] = imx_clk_mux("epdc_axi_sel", base + 0x34, 15, 3, epdc_axi_sels, ARRAY_SIZE(epdc_axi_sels)); |
| 256 | clks[IMX6SL_CLK_GPU2D_OVG_SEL] = imx_clk_mux("gpu2d_ovg_sel", base + 0x18, 4, 2, gpu2d_ovg_sels, ARRAY_SIZE(gpu2d_ovg_sels)); | 315 | clks[IMX6SL_CLK_GPU2D_OVG_SEL] = imx_clk_mux("gpu2d_ovg_sel", base + 0x18, 4, 2, gpu2d_ovg_sels, ARRAY_SIZE(gpu2d_ovg_sels)); |
| 257 | clks[IMX6SL_CLK_GPU2D_SEL] = imx_clk_mux("gpu2d_sel", base + 0x18, 8, 2, gpu2d_sels, ARRAY_SIZE(gpu2d_sels)); | 316 | clks[IMX6SL_CLK_GPU2D_SEL] = imx_clk_mux("gpu2d_sel", base + 0x18, 8, 2, gpu2d_sels, ARRAY_SIZE(gpu2d_sels)); |
| 258 | clks[IMX6SL_CLK_LCDIF_PIX_SEL] = imx_clk_mux("lcdif_pix_sel", base + 0x38, 6, 3, lcdif_pix_sels, ARRAY_SIZE(lcdif_pix_sels)); | 317 | clks[IMX6SL_CLK_LCDIF_PIX_SEL] = imx_clk_mux("lcdif_pix_sel", base + 0x38, 6, 3, lcdif_pix_sels, ARRAY_SIZE(lcdif_pix_sels)); |
| @@ -337,9 +396,12 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
| 337 | clks[IMX6SL_CLK_SDMA] = imx_clk_gate2("sdma", "ipg", base + 0x7c, 6); | 396 | clks[IMX6SL_CLK_SDMA] = imx_clk_gate2("sdma", "ipg", base + 0x7c, 6); |
| 338 | clks[IMX6SL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | 397 | clks[IMX6SL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
| 339 | clks[IMX6SL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif0_podf", base + 0x7c, 14); | 398 | clks[IMX6SL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif0_podf", base + 0x7c, 14); |
| 340 | clks[IMX6SL_CLK_SSI1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18); | 399 | clks[IMX6SL_CLK_SSI1_IPG] = imx_clk_gate2_shared("ssi1_ipg", "ipg", base + 0x7c, 18, &share_count_ssi1); |
| 341 | clks[IMX6SL_CLK_SSI2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20); | 400 | clks[IMX6SL_CLK_SSI2_IPG] = imx_clk_gate2_shared("ssi2_ipg", "ipg", base + 0x7c, 20, &share_count_ssi2); |
| 342 | clks[IMX6SL_CLK_SSI3] = imx_clk_gate2("ssi3", "ssi3_podf", base + 0x7c, 22); | 401 | clks[IMX6SL_CLK_SSI3_IPG] = imx_clk_gate2_shared("ssi3_ipg", "ipg", base + 0x7c, 22, &share_count_ssi3); |
| 402 | clks[IMX6SL_CLK_SSI1] = imx_clk_gate2_shared("ssi1", "ssi1_podf", base + 0x7c, 18, &share_count_ssi1); | ||
| 403 | clks[IMX6SL_CLK_SSI2] = imx_clk_gate2_shared("ssi2", "ssi2_podf", base + 0x7c, 20, &share_count_ssi2); | ||
| 404 | clks[IMX6SL_CLK_SSI3] = imx_clk_gate2_shared("ssi3", "ssi3_podf", base + 0x7c, 22, &share_count_ssi3); | ||
| 343 | clks[IMX6SL_CLK_UART] = imx_clk_gate2("uart", "ipg", base + 0x7c, 24); | 405 | clks[IMX6SL_CLK_UART] = imx_clk_gate2("uart", "ipg", base + 0x7c, 24); |
| 344 | clks[IMX6SL_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_root", base + 0x7c, 26); | 406 | clks[IMX6SL_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_root", base + 0x7c, 26); |
| 345 | clks[IMX6SL_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); | 407 | clks[IMX6SL_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); |
| @@ -375,6 +437,13 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
| 375 | /* Audio-related clocks configuration */ | 437 | /* Audio-related clocks configuration */ |
| 376 | clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]); | 438 | clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]); |
| 377 | 439 | ||
| 440 | /* set PLL5 video as lcdif pix parent clock */ | ||
| 441 | clk_set_parent(clks[IMX6SL_CLK_LCDIF_PIX_SEL], | ||
| 442 | clks[IMX6SL_CLK_PLL5_VIDEO_DIV]); | ||
| 443 | |||
| 444 | clk_set_parent(clks[IMX6SL_CLK_LCDIF_AXI_SEL], | ||
| 445 | clks[IMX6SL_CLK_PLL2_PFD2]); | ||
| 446 | |||
| 378 | /* Set initial power mode */ | 447 | /* Set initial power mode */ |
| 379 | imx6q_set_lpm(WAIT_CLOCKED); | 448 | imx6q_set_lpm(WAIT_CLOCKED); |
| 380 | } | 449 | } |
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c index ecde72bdfe88..17354a11356f 100644 --- a/arch/arm/mach-imx/clk-imx6sx.c +++ b/arch/arm/mach-imx/clk-imx6sx.c | |||
| @@ -81,6 +81,14 @@ static const char *lvds_sels[] = { | |||
| 81 | "arm", "pll1_sys", "dummy", "dummy", "dummy", "dummy", "dummy", "pll5_video_div", | 81 | "arm", "pll1_sys", "dummy", "dummy", "dummy", "dummy", "dummy", "pll5_video_div", |
| 82 | "dummy", "dummy", "pcie_ref_125m", "dummy", "usbphy1", "usbphy2", | 82 | "dummy", "dummy", "pcie_ref_125m", "dummy", "usbphy1", "usbphy2", |
| 83 | }; | 83 | }; |
| 84 | static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", }; | ||
| 85 | static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", }; | ||
| 86 | static const char *pll2_bypass_sels[] = { "pll2", "pll2_bypass_src", }; | ||
| 87 | static const char *pll3_bypass_sels[] = { "pll3", "pll3_bypass_src", }; | ||
| 88 | static const char *pll4_bypass_sels[] = { "pll4", "pll4_bypass_src", }; | ||
| 89 | static const char *pll5_bypass_sels[] = { "pll5", "pll5_bypass_src", }; | ||
| 90 | static const char *pll6_bypass_sels[] = { "pll6", "pll6_bypass_src", }; | ||
| 91 | static const char *pll7_bypass_sels[] = { "pll7", "pll7_bypass_src", }; | ||
| 84 | 92 | ||
| 85 | static struct clk *clks[IMX6SX_CLK_CLK_END]; | 93 | static struct clk *clks[IMX6SX_CLK_CLK_END]; |
| 86 | static struct clk_onecell_data clk_data; | 94 | static struct clk_onecell_data clk_data; |
| @@ -143,18 +151,54 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
| 143 | clks[IMX6SX_CLK_IPP_DI0] = of_clk_get_by_name(ccm_node, "ipp_di0"); | 151 | clks[IMX6SX_CLK_IPP_DI0] = of_clk_get_by_name(ccm_node, "ipp_di0"); |
| 144 | clks[IMX6SX_CLK_IPP_DI1] = of_clk_get_by_name(ccm_node, "ipp_di1"); | 152 | clks[IMX6SX_CLK_IPP_DI1] = of_clk_get_by_name(ccm_node, "ipp_di1"); |
| 145 | 153 | ||
| 154 | /* Clock source from external clock via CLK1 PAD */ | ||
| 155 | clks[IMX6SX_CLK_ANACLK1] = imx_obtain_fixed_clock("anaclk1", 0); | ||
| 156 | |||
| 146 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop"); | 157 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop"); |
| 147 | base = of_iomap(np, 0); | 158 | base = of_iomap(np, 0); |
| 148 | WARN_ON(!base); | 159 | WARN_ON(!base); |
| 149 | 160 | ||
| 150 | /* type name parent_name base div_mask */ | 161 | clks[IMX6SX_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 151 | clks[IMX6SX_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); | 162 | clks[IMX6SX_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 152 | clks[IMX6SX_CLK_PLL2_BUS] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); | 163 | clks[IMX6SX_PLL3_BYPASS_SRC] = imx_clk_mux("pll3_bypass_src", base + 0x10, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 153 | clks[IMX6SX_CLK_PLL3_USB_OTG] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); | 164 | clks[IMX6SX_PLL4_BYPASS_SRC] = imx_clk_mux("pll4_bypass_src", base + 0x70, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 154 | clks[IMX6SX_CLK_PLL4_AUDIO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); | 165 | clks[IMX6SX_PLL5_BYPASS_SRC] = imx_clk_mux("pll5_bypass_src", base + 0xa0, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 155 | clks[IMX6SX_CLK_PLL5_VIDEO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); | 166 | clks[IMX6SX_PLL6_BYPASS_SRC] = imx_clk_mux("pll6_bypass_src", base + 0xe0, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 156 | clks[IMX6SX_CLK_PLL6_ENET] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); | 167 | clks[IMX6SX_PLL7_BYPASS_SRC] = imx_clk_mux("pll7_bypass_src", base + 0x20, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 157 | clks[IMX6SX_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host", "osc", base + 0x20, 0x3); | 168 | |
| 169 | /* type name parent_name base div_mask */ | ||
| 170 | clks[IMX6SX_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1", "pll1_bypass_src", base + 0x00, 0x7f); | ||
| 171 | clks[IMX6SX_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "pll2_bypass_src", base + 0x30, 0x1); | ||
| 172 | clks[IMX6SX_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3", "pll3_bypass_src", base + 0x10, 0x3); | ||
| 173 | clks[IMX6SX_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4", "pll4_bypass_src", base + 0x70, 0x7f); | ||
| 174 | clks[IMX6SX_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5", "pll5_bypass_src", base + 0xa0, 0x7f); | ||
| 175 | clks[IMX6SX_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6", "pll6_bypass_src", base + 0xe0, 0x3); | ||
| 176 | clks[IMX6SX_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7", "pll7_bypass_src", base + 0x20, 0x3); | ||
| 177 | |||
| 178 | clks[IMX6SX_PLL1_BYPASS] = imx_clk_mux_flags("pll1_bypass", base + 0x00, 16, 1, pll1_bypass_sels, ARRAY_SIZE(pll1_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 179 | clks[IMX6SX_PLL2_BYPASS] = imx_clk_mux_flags("pll2_bypass", base + 0x30, 16, 1, pll2_bypass_sels, ARRAY_SIZE(pll2_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 180 | clks[IMX6SX_PLL3_BYPASS] = imx_clk_mux_flags("pll3_bypass", base + 0x10, 16, 1, pll3_bypass_sels, ARRAY_SIZE(pll3_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 181 | clks[IMX6SX_PLL4_BYPASS] = imx_clk_mux_flags("pll4_bypass", base + 0x70, 16, 1, pll4_bypass_sels, ARRAY_SIZE(pll4_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 182 | clks[IMX6SX_PLL5_BYPASS] = imx_clk_mux_flags("pll5_bypass", base + 0xa0, 16, 1, pll5_bypass_sels, ARRAY_SIZE(pll5_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 183 | clks[IMX6SX_PLL6_BYPASS] = imx_clk_mux_flags("pll6_bypass", base + 0xe0, 16, 1, pll6_bypass_sels, ARRAY_SIZE(pll6_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 184 | clks[IMX6SX_PLL7_BYPASS] = imx_clk_mux_flags("pll7_bypass", base + 0x20, 16, 1, pll7_bypass_sels, ARRAY_SIZE(pll7_bypass_sels), CLK_SET_RATE_PARENT); | ||
| 185 | |||
| 186 | /* Do not bypass PLLs initially */ | ||
| 187 | clk_set_parent(clks[IMX6SX_PLL1_BYPASS], clks[IMX6SX_CLK_PLL1]); | ||
| 188 | clk_set_parent(clks[IMX6SX_PLL2_BYPASS], clks[IMX6SX_CLK_PLL2]); | ||
| 189 | clk_set_parent(clks[IMX6SX_PLL3_BYPASS], clks[IMX6SX_CLK_PLL3]); | ||
| 190 | clk_set_parent(clks[IMX6SX_PLL4_BYPASS], clks[IMX6SX_CLK_PLL4]); | ||
| 191 | clk_set_parent(clks[IMX6SX_PLL5_BYPASS], clks[IMX6SX_CLK_PLL5]); | ||
| 192 | clk_set_parent(clks[IMX6SX_PLL6_BYPASS], clks[IMX6SX_CLK_PLL6]); | ||
| 193 | clk_set_parent(clks[IMX6SX_PLL7_BYPASS], clks[IMX6SX_CLK_PLL7]); | ||
| 194 | |||
| 195 | clks[IMX6SX_CLK_PLL1_SYS] = imx_clk_gate("pll1_sys", "pll1_bypass", base + 0x00, 13); | ||
| 196 | clks[IMX6SX_CLK_PLL2_BUS] = imx_clk_gate("pll2_bus", "pll2_bypass", base + 0x30, 13); | ||
| 197 | clks[IMX6SX_CLK_PLL3_USB_OTG] = imx_clk_gate("pll3_usb_otg", "pll3_bypass", base + 0x10, 13); | ||
| 198 | clks[IMX6SX_CLK_PLL4_AUDIO] = imx_clk_gate("pll4_audio", "pll4_bypass", base + 0x70, 13); | ||
| 199 | clks[IMX6SX_CLK_PLL5_VIDEO] = imx_clk_gate("pll5_video", "pll5_bypass", base + 0xa0, 13); | ||
| 200 | clks[IMX6SX_CLK_PLL6_ENET] = imx_clk_gate("pll6_enet", "pll6_bypass", base + 0xe0, 13); | ||
| 201 | clks[IMX6SX_CLK_PLL7_USB_HOST] = imx_clk_gate("pll7_usb_host", "pll7_bypass", base + 0x20, 13); | ||
| 158 | 202 | ||
| 159 | /* | 203 | /* |
| 160 | * Bit 20 is the reserved and read-only bit, we do this only for: | 204 | * Bit 20 is the reserved and read-only bit, we do this only for: |
| @@ -176,7 +220,8 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) | |||
| 176 | clks[IMX6SX_CLK_PCIE_REF] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 5); | 220 | clks[IMX6SX_CLK_PCIE_REF] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 5); |
| 177 | clks[IMX6SX_CLK_PCIE_REF_125M] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); | 221 | clks[IMX6SX_CLK_PCIE_REF_125M] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); |
| 178 | 222 | ||
| 179 | clks[IMX6SX_CLK_LVDS1_OUT] = imx_clk_gate("lvds1_out", "lvds1_sel", base + 0x160, 10); | 223 | clks[IMX6SX_CLK_LVDS1_OUT] = imx_clk_gate_exclusive("lvds1_out", "lvds1_sel", base + 0x160, 10, BIT(12)); |
| 224 | clks[IMX6SX_CLK_LVDS1_IN] = imx_clk_gate_exclusive("lvds1_in", "anaclk1", base + 0x160, 12, BIT(10)); | ||
| 180 | 225 | ||
| 181 | clks[IMX6SX_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, | 226 | clks[IMX6SX_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, |
| 182 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, | 227 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, |
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c index 61364050fccd..57de74da0acf 100644 --- a/arch/arm/mach-imx/clk-pllv3.c +++ b/arch/arm/mach-imx/clk-pllv3.c | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | #define PLL_DENOM_OFFSET 0x20 | 23 | #define PLL_DENOM_OFFSET 0x20 |
| 24 | 24 | ||
| 25 | #define BM_PLL_POWER (0x1 << 12) | 25 | #define BM_PLL_POWER (0x1 << 12) |
| 26 | #define BM_PLL_ENABLE (0x1 << 13) | ||
| 27 | #define BM_PLL_BYPASS (0x1 << 16) | ||
| 28 | #define BM_PLL_LOCK (0x1 << 31) | 26 | #define BM_PLL_LOCK (0x1 << 31) |
| 29 | 27 | ||
| 30 | /** | 28 | /** |
| @@ -84,10 +82,6 @@ static int clk_pllv3_prepare(struct clk_hw *hw) | |||
| 84 | if (ret) | 82 | if (ret) |
| 85 | return ret; | 83 | return ret; |
| 86 | 84 | ||
| 87 | val = readl_relaxed(pll->base); | ||
| 88 | val &= ~BM_PLL_BYPASS; | ||
| 89 | writel_relaxed(val, pll->base); | ||
| 90 | |||
| 91 | return 0; | 85 | return 0; |
| 92 | } | 86 | } |
| 93 | 87 | ||
| @@ -97,7 +91,6 @@ static void clk_pllv3_unprepare(struct clk_hw *hw) | |||
| 97 | u32 val; | 91 | u32 val; |
| 98 | 92 | ||
| 99 | val = readl_relaxed(pll->base); | 93 | val = readl_relaxed(pll->base); |
| 100 | val |= BM_PLL_BYPASS; | ||
| 101 | if (pll->powerup_set) | 94 | if (pll->powerup_set) |
| 102 | val &= ~BM_PLL_POWER; | 95 | val &= ~BM_PLL_POWER; |
| 103 | else | 96 | else |
| @@ -105,28 +98,6 @@ static void clk_pllv3_unprepare(struct clk_hw *hw) | |||
| 105 | writel_relaxed(val, pll->base); | 98 | writel_relaxed(val, pll->base); |
| 106 | } | 99 | } |
| 107 | 100 | ||
| 108 | static int clk_pllv3_enable(struct clk_hw *hw) | ||
| 109 | { | ||
| 110 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
| 111 | u32 val; | ||
| 112 | |||
| 113 | val = readl_relaxed(pll->base); | ||
| 114 | val |= BM_PLL_ENABLE; | ||
| 115 | writel_relaxed(val, pll->base); | ||
| 116 | |||
| 117 | return 0; | ||
| 118 | } | ||
| 119 | |||
| 120 | static void clk_pllv3_disable(struct clk_hw *hw) | ||
| 121 | { | ||
| 122 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
| 123 | u32 val; | ||
| 124 | |||
| 125 | val = readl_relaxed(pll->base); | ||
| 126 | val &= ~BM_PLL_ENABLE; | ||
| 127 | writel_relaxed(val, pll->base); | ||
| 128 | } | ||
| 129 | |||
| 130 | static unsigned long clk_pllv3_recalc_rate(struct clk_hw *hw, | 101 | static unsigned long clk_pllv3_recalc_rate(struct clk_hw *hw, |
| 131 | unsigned long parent_rate) | 102 | unsigned long parent_rate) |
| 132 | { | 103 | { |
| @@ -169,8 +140,6 @@ static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, | |||
| 169 | static const struct clk_ops clk_pllv3_ops = { | 140 | static const struct clk_ops clk_pllv3_ops = { |
| 170 | .prepare = clk_pllv3_prepare, | 141 | .prepare = clk_pllv3_prepare, |
| 171 | .unprepare = clk_pllv3_unprepare, | 142 | .unprepare = clk_pllv3_unprepare, |
| 172 | .enable = clk_pllv3_enable, | ||
| 173 | .disable = clk_pllv3_disable, | ||
| 174 | .recalc_rate = clk_pllv3_recalc_rate, | 143 | .recalc_rate = clk_pllv3_recalc_rate, |
| 175 | .round_rate = clk_pllv3_round_rate, | 144 | .round_rate = clk_pllv3_round_rate, |
| 176 | .set_rate = clk_pllv3_set_rate, | 145 | .set_rate = clk_pllv3_set_rate, |
| @@ -225,8 +194,6 @@ static int clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate, | |||
| 225 | static const struct clk_ops clk_pllv3_sys_ops = { | 194 | static const struct clk_ops clk_pllv3_sys_ops = { |
| 226 | .prepare = clk_pllv3_prepare, | 195 | .prepare = clk_pllv3_prepare, |
| 227 | .unprepare = clk_pllv3_unprepare, | 196 | .unprepare = clk_pllv3_unprepare, |
| 228 | .enable = clk_pllv3_enable, | ||
| 229 | .disable = clk_pllv3_disable, | ||
| 230 | .recalc_rate = clk_pllv3_sys_recalc_rate, | 197 | .recalc_rate = clk_pllv3_sys_recalc_rate, |
| 231 | .round_rate = clk_pllv3_sys_round_rate, | 198 | .round_rate = clk_pllv3_sys_round_rate, |
| 232 | .set_rate = clk_pllv3_sys_set_rate, | 199 | .set_rate = clk_pllv3_sys_set_rate, |
| @@ -299,8 +266,6 @@ static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate, | |||
| 299 | static const struct clk_ops clk_pllv3_av_ops = { | 266 | static const struct clk_ops clk_pllv3_av_ops = { |
| 300 | .prepare = clk_pllv3_prepare, | 267 | .prepare = clk_pllv3_prepare, |
| 301 | .unprepare = clk_pllv3_unprepare, | 268 | .unprepare = clk_pllv3_unprepare, |
| 302 | .enable = clk_pllv3_enable, | ||
| 303 | .disable = clk_pllv3_disable, | ||
| 304 | .recalc_rate = clk_pllv3_av_recalc_rate, | 269 | .recalc_rate = clk_pllv3_av_recalc_rate, |
| 305 | .round_rate = clk_pllv3_av_round_rate, | 270 | .round_rate = clk_pllv3_av_round_rate, |
| 306 | .set_rate = clk_pllv3_av_set_rate, | 271 | .set_rate = clk_pllv3_av_set_rate, |
| @@ -315,8 +280,6 @@ static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, | |||
| 315 | static const struct clk_ops clk_pllv3_enet_ops = { | 280 | static const struct clk_ops clk_pllv3_enet_ops = { |
| 316 | .prepare = clk_pllv3_prepare, | 281 | .prepare = clk_pllv3_prepare, |
| 317 | .unprepare = clk_pllv3_unprepare, | 282 | .unprepare = clk_pllv3_unprepare, |
| 318 | .enable = clk_pllv3_enable, | ||
| 319 | .disable = clk_pllv3_disable, | ||
| 320 | .recalc_rate = clk_pllv3_enet_recalc_rate, | 283 | .recalc_rate = clk_pllv3_enet_recalc_rate, |
| 321 | }; | 284 | }; |
| 322 | 285 | ||
diff --git a/arch/arm/mach-imx/clk-vf610.c b/arch/arm/mach-imx/clk-vf610.c index f60d6d569ce3..a17818475050 100644 --- a/arch/arm/mach-imx/clk-vf610.c +++ b/arch/arm/mach-imx/clk-vf610.c | |||
| @@ -58,6 +58,8 @@ | |||
| 58 | #define PFD_PLL1_BASE (anatop_base + 0x2b0) | 58 | #define PFD_PLL1_BASE (anatop_base + 0x2b0) |
| 59 | #define PFD_PLL2_BASE (anatop_base + 0x100) | 59 | #define PFD_PLL2_BASE (anatop_base + 0x100) |
| 60 | #define PFD_PLL3_BASE (anatop_base + 0xf0) | 60 | #define PFD_PLL3_BASE (anatop_base + 0xf0) |
| 61 | #define PLL3_CTRL (anatop_base + 0x10) | ||
| 62 | #define PLL7_CTRL (anatop_base + 0x20) | ||
| 61 | 63 | ||
| 62 | static void __iomem *anatop_base; | 64 | static void __iomem *anatop_base; |
| 63 | static void __iomem *ccm_base; | 65 | static void __iomem *ccm_base; |
| @@ -98,9 +100,15 @@ static struct clk_div_table pll4_main_div_table[] = { | |||
| 98 | static struct clk *clk[VF610_CLK_END]; | 100 | static struct clk *clk[VF610_CLK_END]; |
| 99 | static struct clk_onecell_data clk_data; | 101 | static struct clk_onecell_data clk_data; |
| 100 | 102 | ||
| 103 | static unsigned int const clks_init_on[] __initconst = { | ||
| 104 | VF610_CLK_SYS_BUS, | ||
| 105 | VF610_CLK_DDR_SEL, | ||
| 106 | }; | ||
| 107 | |||
| 101 | static void __init vf610_clocks_init(struct device_node *ccm_node) | 108 | static void __init vf610_clocks_init(struct device_node *ccm_node) |
| 102 | { | 109 | { |
| 103 | struct device_node *np; | 110 | struct device_node *np; |
| 111 | int i; | ||
| 104 | 112 | ||
| 105 | clk[VF610_CLK_DUMMY] = imx_clk_fixed("dummy", 0); | 113 | clk[VF610_CLK_DUMMY] = imx_clk_fixed("dummy", 0); |
| 106 | clk[VF610_CLK_SIRC_128K] = imx_clk_fixed("sirc_128k", 128000); | 114 | clk[VF610_CLK_SIRC_128K] = imx_clk_fixed("sirc_128k", 128000); |
| @@ -148,6 +156,9 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 148 | clk[VF610_CLK_PLL5_MAIN] = imx_clk_fixed_factor("pll5_main", "fast_clk_sel", 125, 6); | 156 | clk[VF610_CLK_PLL5_MAIN] = imx_clk_fixed_factor("pll5_main", "fast_clk_sel", 125, 6); |
| 149 | /* pll6: default 960Mhz */ | 157 | /* pll6: default 960Mhz */ |
| 150 | clk[VF610_CLK_PLL6_MAIN] = imx_clk_fixed_factor("pll6_main", "fast_clk_sel", 40, 1); | 158 | clk[VF610_CLK_PLL6_MAIN] = imx_clk_fixed_factor("pll6_main", "fast_clk_sel", 40, 1); |
| 159 | /* pll7: USB1 PLL at 480MHz */ | ||
| 160 | clk[VF610_CLK_PLL7_MAIN] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_main", "fast_clk_sel", PLL7_CTRL, 0x2); | ||
| 161 | |||
| 151 | clk[VF610_CLK_PLL1_PFD_SEL] = imx_clk_mux("pll1_pfd_sel", CCM_CCSR, 16, 3, pll1_sels, 5); | 162 | clk[VF610_CLK_PLL1_PFD_SEL] = imx_clk_mux("pll1_pfd_sel", CCM_CCSR, 16, 3, pll1_sels, 5); |
| 152 | clk[VF610_CLK_PLL2_PFD_SEL] = imx_clk_mux("pll2_pfd_sel", CCM_CCSR, 19, 3, pll2_sels, 5); | 163 | clk[VF610_CLK_PLL2_PFD_SEL] = imx_clk_mux("pll2_pfd_sel", CCM_CCSR, 19, 3, pll2_sels, 5); |
| 153 | clk[VF610_CLK_SYS_SEL] = imx_clk_mux("sys_sel", CCM_CCSR, 0, 3, sys_sels, ARRAY_SIZE(sys_sels)); | 164 | clk[VF610_CLK_SYS_SEL] = imx_clk_mux("sys_sel", CCM_CCSR, 0, 3, sys_sels, ARRAY_SIZE(sys_sels)); |
| @@ -160,8 +171,11 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 160 | clk[VF610_CLK_PLL4_MAIN_DIV] = clk_register_divider_table(NULL, "pll4_main_div", "pll4_main", 0, CCM_CACRR, 6, 3, 0, pll4_main_div_table, &imx_ccm_lock); | 171 | clk[VF610_CLK_PLL4_MAIN_DIV] = clk_register_divider_table(NULL, "pll4_main_div", "pll4_main", 0, CCM_CACRR, 6, 3, 0, pll4_main_div_table, &imx_ccm_lock); |
| 161 | clk[VF610_CLK_PLL6_MAIN_DIV] = imx_clk_divider("pll6_main_div", "pll6_main", CCM_CACRR, 21, 1); | 172 | clk[VF610_CLK_PLL6_MAIN_DIV] = imx_clk_divider("pll6_main_div", "pll6_main", CCM_CACRR, 21, 1); |
| 162 | 173 | ||
| 163 | clk[VF610_CLK_USBC0] = imx_clk_gate2("usbc0", "pll3_main", CCM_CCGR1, CCM_CCGRx_CGn(4)); | 174 | clk[VF610_CLK_USBPHY0] = imx_clk_gate("usbphy0", "pll3_main", PLL3_CTRL, 6); |
| 164 | clk[VF610_CLK_USBC1] = imx_clk_gate2("usbc1", "pll3_main", CCM_CCGR7, CCM_CCGRx_CGn(4)); | 175 | clk[VF610_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll7_main", PLL7_CTRL, 6); |
| 176 | |||
| 177 | clk[VF610_CLK_USBC0] = imx_clk_gate2("usbc0", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(4)); | ||
| 178 | clk[VF610_CLK_USBC1] = imx_clk_gate2("usbc1", "ipg_bus", CCM_CCGR7, CCM_CCGRx_CGn(4)); | ||
| 165 | 179 | ||
| 166 | clk[VF610_CLK_QSPI0_SEL] = imx_clk_mux("qspi0_sel", CCM_CSCMR1, 22, 2, qspi_sels, 4); | 180 | clk[VF610_CLK_QSPI0_SEL] = imx_clk_mux("qspi0_sel", CCM_CSCMR1, 22, 2, qspi_sels, 4); |
| 167 | clk[VF610_CLK_QSPI0_EN] = imx_clk_gate("qspi0_en", "qspi0_sel", CCM_CSCDR3, 4); | 181 | clk[VF610_CLK_QSPI0_EN] = imx_clk_gate("qspi0_en", "qspi0_sel", CCM_CSCDR3, 4); |
| @@ -322,6 +336,9 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 322 | clk_set_parent(clk[VF610_CLK_SAI2_SEL], clk[VF610_CLK_AUDIO_EXT]); | 336 | clk_set_parent(clk[VF610_CLK_SAI2_SEL], clk[VF610_CLK_AUDIO_EXT]); |
| 323 | clk_set_parent(clk[VF610_CLK_SAI3_SEL], clk[VF610_CLK_AUDIO_EXT]); | 337 | clk_set_parent(clk[VF610_CLK_SAI3_SEL], clk[VF610_CLK_AUDIO_EXT]); |
| 324 | 338 | ||
| 339 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | ||
| 340 | clk_prepare_enable(clk[clks_init_on[i]]); | ||
| 341 | |||
| 325 | /* Add the clocks to provider list */ | 342 | /* Add the clocks to provider list */ |
| 326 | clk_data.clks = clk; | 343 | clk_data.clks = clk; |
| 327 | clk_data.clk_num = ARRAY_SIZE(clk); | 344 | clk_data.clk_num = ARRAY_SIZE(clk); |
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index d5ba76fee115..4cdf8b6a74e8 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h | |||
| @@ -36,6 +36,9 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, | |||
| 36 | struct clk * imx_obtain_fixed_clock( | 36 | struct clk * imx_obtain_fixed_clock( |
| 37 | const char *name, unsigned long rate); | 37 | const char *name, unsigned long rate); |
| 38 | 38 | ||
| 39 | struct clk *imx_clk_gate_exclusive(const char *name, const char *parent, | ||
| 40 | void __iomem *reg, u8 shift, u32 exclusive_mask); | ||
| 41 | |||
| 39 | static inline struct clk *imx_clk_gate2(const char *name, const char *parent, | 42 | static inline struct clk *imx_clk_gate2(const char *name, const char *parent, |
| 40 | void __iomem *reg, u8 shift) | 43 | void __iomem *reg, u8 shift) |
| 41 | { | 44 | { |
diff --git a/arch/arm/mach-imx/imx1-dt.c b/arch/arm/mach-imx/imx1-dt.c new file mode 100644 index 000000000000..6f915b0961c4 --- /dev/null +++ b/arch/arm/mach-imx/imx1-dt.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> | ||
| 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 as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/of_platform.h> | ||
| 11 | #include <asm/mach/arch.h> | ||
| 12 | |||
| 13 | #include "common.h" | ||
| 14 | |||
| 15 | static const char * const imx1_dt_board_compat[] __initconst = { | ||
| 16 | "fsl,imx1", | ||
| 17 | NULL | ||
| 18 | }; | ||
| 19 | |||
| 20 | DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)") | ||
| 21 | .map_io = mx1_map_io, | ||
| 22 | .init_early = imx1_init_early, | ||
| 23 | .init_irq = mx1_init_irq, | ||
| 24 | .dt_compat = imx1_dt_board_compat, | ||
| 25 | .restart = mxc_restart, | ||
| 26 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index a7e9bd26a552..f2060523ba48 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
| @@ -537,7 +537,7 @@ static void __init armadillo5x0_init(void) | |||
| 537 | gpio_free(ARMADILLO5X0_RTC_GPIO); | 537 | gpio_free(ARMADILLO5X0_RTC_GPIO); |
| 538 | } | 538 | } |
| 539 | if (armadillo5x0_i2c_rtc.irq == 0) | 539 | if (armadillo5x0_i2c_rtc.irq == 0) |
| 540 | pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); | 540 | pr_warn("armadillo5x0_init: failed to get RTC IRQ\n"); |
| 541 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); | 541 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); |
| 542 | 542 | ||
| 543 | /* USB */ | 543 | /* USB */ |
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 673a734165ba..3de3b7369aef 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c | |||
| @@ -42,6 +42,9 @@ static void __init imx6sx_init_irq(void) | |||
| 42 | static void __init imx6sx_init_late(void) | 42 | static void __init imx6sx_init_late(void) |
| 43 | { | 43 | { |
| 44 | imx6q_cpuidle_init(); | 44 | imx6q_cpuidle_init(); |
| 45 | |||
| 46 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) | ||
| 47 | platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0); | ||
| 45 | } | 48 | } |
| 46 | 49 | ||
| 47 | static const char * const imx6sx_dt_compat[] __initconst = { | 50 | static const char * const imx6sx_dt_compat[] __initconst = { |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 453f41a2c5a9..65a0dc06a97c 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
| @@ -307,7 +307,7 @@ static int mx31_3ds_sdhc1_init(struct device *dev, | |||
| 307 | ret = gpio_request_array(mx31_3ds_sdhc1_gpios, | 307 | ret = gpio_request_array(mx31_3ds_sdhc1_gpios, |
| 308 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); | 308 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); |
| 309 | if (ret) { | 309 | if (ret) { |
| 310 | pr_warning("Unable to request the SD/MMC GPIOs.\n"); | 310 | pr_warn("Unable to request the SD/MMC GPIOs.\n"); |
| 311 | return ret; | 311 | return ret; |
| 312 | } | 312 | } |
| 313 | 313 | ||
| @@ -316,7 +316,7 @@ static int mx31_3ds_sdhc1_init(struct device *dev, | |||
| 316 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | 316 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
| 317 | "sdhc1-detect", data); | 317 | "sdhc1-detect", data); |
| 318 | if (ret) { | 318 | if (ret) { |
| 319 | pr_warning("Unable to request the SD/MMC card-detect IRQ.\n"); | 319 | pr_warn("Unable to request the SD/MMC card-detect IRQ.\n"); |
| 320 | goto gpio_free; | 320 | goto gpio_free; |
| 321 | } | 321 | } |
| 322 | 322 | ||
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 57eac6f45fab..4822a1738de4 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
| @@ -270,7 +270,7 @@ static void __init mx31lite_init(void) | |||
| 270 | /* SMSC9117 IRQ pin */ | 270 | /* SMSC9117 IRQ pin */ |
| 271 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); | 271 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); |
| 272 | if (ret) | 272 | if (ret) |
| 273 | pr_warning("could not get LAN irq gpio\n"); | 273 | pr_warn("could not get LAN irq gpio\n"); |
| 274 | else { | 274 | else { |
| 275 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | 275 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); |
| 276 | smsc911x_resources[1].start = | 276 | smsc911x_resources[1].start = |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 8eb1570f7851..6d879417db49 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
| @@ -58,7 +58,7 @@ static int __init pcm037_variant_setup(char *str) | |||
| 58 | if (!strcmp("eet", str)) | 58 | if (!strcmp("eet", str)) |
| 59 | pcm037_instance = PCM037_EET; | 59 | pcm037_instance = PCM037_EET; |
| 60 | else if (strcmp("pcm970", str)) | 60 | else if (strcmp("pcm970", str)) |
| 61 | pr_warning("Unknown pcm037 baseboard variant %s\n", str); | 61 | pr_warn("Unknown pcm037 baseboard variant %s\n", str); |
| 62 | 62 | ||
| 63 | return 1; | 63 | return 1; |
| 64 | } | 64 | } |
| @@ -624,7 +624,7 @@ static void __init pcm037_init(void) | |||
| 624 | /* LAN9217 IRQ pin */ | 624 | /* LAN9217 IRQ pin */ |
| 625 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); | 625 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); |
| 626 | if (ret) | 626 | if (ret) |
| 627 | pr_warning("could not get LAN irq gpio\n"); | 627 | pr_warn("could not get LAN irq gpio\n"); |
| 628 | else { | 628 | else { |
| 629 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | 629 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); |
| 630 | smsc911x_resources[1].start = | 630 | smsc911x_resources[1].start = |
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index a39b69ef4301..17a41ca65acf 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h | |||
| @@ -43,6 +43,8 @@ | |||
| 43 | #define IMX_CHIP_REVISION_1_1 0x11 | 43 | #define IMX_CHIP_REVISION_1_1 0x11 |
| 44 | #define IMX_CHIP_REVISION_1_2 0x12 | 44 | #define IMX_CHIP_REVISION_1_2 0x12 |
| 45 | #define IMX_CHIP_REVISION_1_3 0x13 | 45 | #define IMX_CHIP_REVISION_1_3 0x13 |
| 46 | #define IMX_CHIP_REVISION_1_4 0x14 | ||
| 47 | #define IMX_CHIP_REVISION_1_5 0x15 | ||
| 46 | #define IMX_CHIP_REVISION_2_0 0x20 | 48 | #define IMX_CHIP_REVISION_2_0 0x20 |
| 47 | #define IMX_CHIP_REVISION_2_1 0x21 | 49 | #define IMX_CHIP_REVISION_2_1 0x21 |
| 48 | #define IMX_CHIP_REVISION_2_2 0x22 | 50 | #define IMX_CHIP_REVISION_2_2 0x22 |
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index bf92e5a351c0..15d18e198303 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c | |||
| @@ -60,17 +60,22 @@ | |||
| 60 | #define MX2_TSTAT_CAPT (1 << 1) | 60 | #define MX2_TSTAT_CAPT (1 << 1) |
| 61 | #define MX2_TSTAT_COMP (1 << 0) | 61 | #define MX2_TSTAT_COMP (1 << 0) |
| 62 | 62 | ||
| 63 | /* MX31, MX35, MX25, MX5 */ | 63 | /* MX31, MX35, MX25, MX5, MX6 */ |
| 64 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ | 64 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ |
| 65 | #define V2_TCTL_CLK_IPG (1 << 6) | 65 | #define V2_TCTL_CLK_IPG (1 << 6) |
| 66 | #define V2_TCTL_CLK_PER (2 << 6) | 66 | #define V2_TCTL_CLK_PER (2 << 6) |
| 67 | #define V2_TCTL_CLK_OSC_DIV8 (5 << 6) | ||
| 67 | #define V2_TCTL_FRR (1 << 9) | 68 | #define V2_TCTL_FRR (1 << 9) |
| 69 | #define V2_TCTL_24MEN (1 << 10) | ||
| 70 | #define V2_TPRER_PRE24M 12 | ||
| 68 | #define V2_IR 0x0c | 71 | #define V2_IR 0x0c |
| 69 | #define V2_TSTAT 0x08 | 72 | #define V2_TSTAT 0x08 |
| 70 | #define V2_TSTAT_OF1 (1 << 0) | 73 | #define V2_TSTAT_OF1 (1 << 0) |
| 71 | #define V2_TCN 0x24 | 74 | #define V2_TCN 0x24 |
| 72 | #define V2_TCMP 0x10 | 75 | #define V2_TCMP 0x10 |
| 73 | 76 | ||
| 77 | #define V2_TIMER_RATE_OSC_DIV8 3000000 | ||
| 78 | |||
| 74 | #define timer_is_v1() (cpu_is_mx1() || cpu_is_mx21() || cpu_is_mx27()) | 79 | #define timer_is_v1() (cpu_is_mx1() || cpu_is_mx21() || cpu_is_mx27()) |
| 75 | #define timer_is_v2() (!timer_is_v1()) | 80 | #define timer_is_v2() (!timer_is_v1()) |
| 76 | 81 | ||
| @@ -312,10 +317,22 @@ static void __init _mxc_timer_init(int irq, | |||
| 312 | __raw_writel(0, timer_base + MXC_TCTL); | 317 | __raw_writel(0, timer_base + MXC_TCTL); |
| 313 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ | 318 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ |
| 314 | 319 | ||
| 315 | if (timer_is_v2()) | 320 | if (timer_is_v2()) { |
| 316 | tctl_val = V2_TCTL_CLK_PER | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; | 321 | tctl_val = V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; |
| 317 | else | 322 | if (clk_get_rate(clk_per) == V2_TIMER_RATE_OSC_DIV8) { |
| 323 | tctl_val |= V2_TCTL_CLK_OSC_DIV8; | ||
| 324 | if (cpu_is_imx6dl() || cpu_is_imx6sx()) { | ||
| 325 | /* 24 / 8 = 3 MHz */ | ||
| 326 | __raw_writel(7 << V2_TPRER_PRE24M, | ||
| 327 | timer_base + MXC_TPRER); | ||
| 328 | tctl_val |= V2_TCTL_24MEN; | ||
| 329 | } | ||
| 330 | } else { | ||
| 331 | tctl_val |= V2_TCTL_CLK_PER; | ||
| 332 | } | ||
| 333 | } else { | ||
| 318 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; | 334 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; |
| 335 | } | ||
| 319 | 336 | ||
| 320 | __raw_writel(tctl_val, timer_base + MXC_TCTL); | 337 | __raw_writel(tctl_val, timer_base + MXC_TCTL); |
| 321 | 338 | ||
| @@ -349,9 +366,13 @@ static void __init mxc_timer_init_dt(struct device_node *np) | |||
| 349 | WARN_ON(!timer_base); | 366 | WARN_ON(!timer_base); |
| 350 | irq = irq_of_parse_and_map(np, 0); | 367 | irq = irq_of_parse_and_map(np, 0); |
| 351 | 368 | ||
| 352 | clk_per = of_clk_get_by_name(np, "per"); | ||
| 353 | clk_ipg = of_clk_get_by_name(np, "ipg"); | 369 | clk_ipg = of_clk_get_by_name(np, "ipg"); |
| 354 | 370 | ||
| 371 | /* Try osc_per first, and fall back to per otherwise */ | ||
| 372 | clk_per = of_clk_get_by_name(np, "osc_per"); | ||
| 373 | if (IS_ERR(clk_per)) | ||
| 374 | clk_per = of_clk_get_by_name(np, "per"); | ||
| 375 | |||
| 355 | _mxc_timer_init(irq, clk_per, clk_ipg); | 376 | _mxc_timer_init(irq, clk_per, clk_ipg); |
| 356 | } | 377 | } |
| 357 | CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt); | 378 | CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt); |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 3ce880729cff..38b0da300dd5 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
| @@ -20,10 +20,13 @@ | |||
| 20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
| 21 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
| 22 | #include <linux/amba/clcd.h> | 22 | #include <linux/amba/clcd.h> |
| 23 | #include <linux/amba/mmci.h> | ||
| 24 | #include <linux/amba/pl061.h> | ||
| 23 | #include <linux/io.h> | 25 | #include <linux/io.h> |
| 24 | #include <linux/platform_data/clk-integrator.h> | 26 | #include <linux/platform_data/clk-integrator.h> |
| 25 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 26 | #include <linux/irqchip/arm-vic.h> | 28 | #include <linux/irqchip/arm-vic.h> |
| 29 | #include <linux/gpio/machine.h> | ||
| 27 | 30 | ||
| 28 | #include <asm/sizes.h> | 31 | #include <asm/sizes.h> |
| 29 | #include "lm.h" | 32 | #include "lm.h" |
| @@ -52,6 +55,13 @@ void impd1_tweak_control(struct device *dev, u32 mask, u32 val) | |||
| 52 | EXPORT_SYMBOL(impd1_tweak_control); | 55 | EXPORT_SYMBOL(impd1_tweak_control); |
| 53 | 56 | ||
| 54 | /* | 57 | /* |
| 58 | * MMC support | ||
| 59 | */ | ||
| 60 | static struct mmci_platform_data mmc_data = { | ||
| 61 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | ||
| 62 | }; | ||
| 63 | |||
| 64 | /* | ||
| 55 | * CLCD support | 65 | * CLCD support |
| 56 | */ | 66 | */ |
| 57 | #define PANEL PROSPECTOR | 67 | #define PANEL PROSPECTOR |
| @@ -291,6 +301,7 @@ static struct impd1_device impd1_devs[] = { | |||
| 291 | .offset = 0x00700000, | 301 | .offset = 0x00700000, |
| 292 | .irq = { 7, 8 }, | 302 | .irq = { 7, 8 }, |
| 293 | .id = 0x00041181, | 303 | .id = 0x00041181, |
| 304 | .platform_data = &mmc_data, | ||
| 294 | }, { | 305 | }, { |
| 295 | .offset = 0x00800000, | 306 | .offset = 0x00800000, |
| 296 | .irq = { 9 }, | 307 | .irq = { 9 }, |
| @@ -372,6 +383,43 @@ static int __init_refok impd1_probe(struct lm_device *dev) | |||
| 372 | 383 | ||
| 373 | pc_base = dev->resource.start + idev->offset; | 384 | pc_base = dev->resource.start + idev->offset; |
| 374 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | 385 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
| 386 | |||
| 387 | /* Add GPIO descriptor lookup table for the PL061 block */ | ||
| 388 | if (idev->offset == 0x00400000) { | ||
| 389 | struct gpiod_lookup_table *lookup; | ||
| 390 | char *chipname; | ||
| 391 | char *mmciname; | ||
| 392 | |||
| 393 | lookup = devm_kzalloc(&dev->dev, | ||
| 394 | sizeof(*lookup) + 3 * sizeof(struct gpiod_lookup), | ||
| 395 | GFP_KERNEL); | ||
| 396 | chipname = devm_kstrdup(&dev->dev, devname, GFP_KERNEL); | ||
| 397 | mmciname = kasprintf(GFP_KERNEL, "lm%x:00700", dev->id); | ||
| 398 | lookup->dev_id = mmciname; | ||
| 399 | /* | ||
| 400 | * Offsets on GPIO block 1: | ||
| 401 | * 3 = MMC WP (write protect) | ||
| 402 | * 4 = MMC CD (card detect) | ||
| 403 | * | ||
| 404 | * Offsets on GPIO block 2: | ||
| 405 | * 0 = Up key | ||
| 406 | * 1 = Down key | ||
| 407 | * 2 = Left key | ||
| 408 | * 3 = Right key | ||
| 409 | * 4 = Key lower left | ||
| 410 | * 5 = Key lower right | ||
| 411 | */ | ||
| 412 | /* We need the two MMCI GPIO entries */ | ||
| 413 | lookup->table[0].chip_label = chipname; | ||
| 414 | lookup->table[0].chip_hwnum = 3; | ||
| 415 | lookup->table[0].con_id = "wp"; | ||
| 416 | lookup->table[1].chip_label = chipname; | ||
| 417 | lookup->table[1].chip_hwnum = 4; | ||
| 418 | lookup->table[1].con_id = "cd"; | ||
| 419 | lookup->table[1].flags = GPIO_ACTIVE_LOW; | ||
| 420 | gpiod_add_lookup_table(lookup); | ||
| 421 | } | ||
| 422 | |||
| 375 | d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K, | 423 | d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K, |
| 376 | irq1, irq2, | 424 | irq1, irq2, |
| 377 | idev->platform_data, idev->id, | 425 | idev->platform_data, idev->id, |
diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig new file mode 100644 index 000000000000..2c1154e1794a --- /dev/null +++ b/arch/arm/mach-meson/Kconfig | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | menuconfig ARCH_MESON | ||
| 2 | bool "Amlogic Meson SoCs" if ARCH_MULTI_V7 | ||
| 3 | select GENERIC_IRQ_CHIP | ||
| 4 | select ARM_GIC | ||
| 5 | |||
| 6 | if ARCH_MESON | ||
| 7 | |||
| 8 | config MACH_MESON6 | ||
| 9 | bool "Amlogic Meson6 (8726MX) SoCs support" | ||
| 10 | default ARCH_MESON | ||
| 11 | select MESON6_TIMER | ||
| 12 | |||
| 13 | endif | ||
diff --git a/arch/arm/mach-meson/Makefile b/arch/arm/mach-meson/Makefile new file mode 100644 index 000000000000..9d7380eeeedd --- /dev/null +++ b/arch/arm/mach-meson/Makefile | |||
| @@ -0,0 +1 @@ | |||
| obj-$(CONFIG_ARCH_MESON) += meson.o | |||
diff --git a/arch/arm/mach-meson/meson.c b/arch/arm/mach-meson/meson.c new file mode 100644 index 000000000000..5ee064f5a89f --- /dev/null +++ b/arch/arm/mach-meson/meson.c | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Carlo Caione <carlo@caione.org> | ||
| 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 as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/of_platform.h> | ||
| 17 | #include <asm/mach/arch.h> | ||
| 18 | |||
| 19 | static const char * const m6_common_board_compat[] = { | ||
| 20 | "amlogic,meson6", | ||
| 21 | NULL, | ||
| 22 | }; | ||
| 23 | |||
| 24 | DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform") | ||
| 25 | .dt_compat = m6_common_board_compat, | ||
| 26 | MACHINE_END | ||
| 27 | |||
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 08d4167cc7c5..75212c064b31 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
| @@ -22,7 +22,6 @@ config ARCH_OMAP4 | |||
| 22 | bool "TI OMAP4" | 22 | bool "TI OMAP4" |
| 23 | depends on ARCH_MULTI_V7 | 23 | depends on ARCH_MULTI_V7 |
| 24 | select ARCH_OMAP2PLUS | 24 | select ARCH_OMAP2PLUS |
| 25 | select ARCH_HAS_OPP | ||
| 26 | select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP | 25 | select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP |
| 27 | select ARM_CPU_SUSPEND if PM | 26 | select ARM_CPU_SUSPEND if PM |
| 28 | select ARM_ERRATA_720789 | 27 | select ARM_ERRATA_720789 |
| @@ -41,7 +40,6 @@ config SOC_OMAP5 | |||
| 41 | bool "TI OMAP5" | 40 | bool "TI OMAP5" |
| 42 | depends on ARCH_MULTI_V7 | 41 | depends on ARCH_MULTI_V7 |
| 43 | select ARCH_OMAP2PLUS | 42 | select ARCH_OMAP2PLUS |
| 44 | select ARCH_HAS_OPP | ||
| 45 | select ARM_CPU_SUSPEND if PM | 43 | select ARM_CPU_SUSPEND if PM |
| 46 | select ARM_GIC | 44 | select ARM_GIC |
| 47 | select HAVE_ARM_SCU if SMP | 45 | select HAVE_ARM_SCU if SMP |
| @@ -53,14 +51,12 @@ config SOC_AM33XX | |||
| 53 | bool "TI AM33XX" | 51 | bool "TI AM33XX" |
| 54 | depends on ARCH_MULTI_V7 | 52 | depends on ARCH_MULTI_V7 |
| 55 | select ARCH_OMAP2PLUS | 53 | select ARCH_OMAP2PLUS |
| 56 | select ARCH_HAS_OPP | ||
| 57 | select ARM_CPU_SUSPEND if PM | 54 | select ARM_CPU_SUSPEND if PM |
| 58 | 55 | ||
| 59 | config SOC_AM43XX | 56 | config SOC_AM43XX |
| 60 | bool "TI AM43x" | 57 | bool "TI AM43x" |
| 61 | depends on ARCH_MULTI_V7 | 58 | depends on ARCH_MULTI_V7 |
| 62 | select ARCH_OMAP2PLUS | 59 | select ARCH_OMAP2PLUS |
| 63 | select ARCH_HAS_OPP | ||
| 64 | select ARM_GIC | 60 | select ARM_GIC |
| 65 | select MACH_OMAP_GENERIC | 61 | select MACH_OMAP_GENERIC |
| 66 | select MIGHT_HAVE_CACHE_L2X0 | 62 | select MIGHT_HAVE_CACHE_L2X0 |
| @@ -69,7 +65,6 @@ config SOC_DRA7XX | |||
| 69 | bool "TI DRA7XX" | 65 | bool "TI DRA7XX" |
| 70 | depends on ARCH_MULTI_V7 | 66 | depends on ARCH_MULTI_V7 |
| 71 | select ARCH_OMAP2PLUS | 67 | select ARCH_OMAP2PLUS |
| 72 | select ARCH_HAS_OPP | ||
| 73 | select ARM_CPU_SUSPEND if PM | 68 | select ARM_CPU_SUSPEND if PM |
| 74 | select ARM_GIC | 69 | select ARM_GIC |
| 75 | select HAVE_ARM_ARCH_TIMER | 70 | select HAVE_ARM_ARCH_TIMER |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 69bbcba8842f..d9dd99c6aa28 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
| @@ -87,9 +87,10 @@ ifeq ($(CONFIG_PM),y) | |||
| 87 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o | 87 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o |
| 88 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o | 88 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o |
| 89 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o | 89 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o |
| 90 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o | 90 | omap-4-5-pm-common = pm44xx.o omap-mpuss-lowpower.o |
| 91 | obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o | 91 | obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-pm-common) |
| 92 | obj-$(CONFIG_SOC_DRA7XX) += omap-mpuss-lowpower.o | 92 | obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-pm-common) |
| 93 | obj-$(CONFIG_SOC_DRA7XX) += $(omap-4-5-pm-common) | ||
| 93 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 94 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
| 94 | 95 | ||
| 95 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o | 96 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o |
| @@ -102,7 +103,10 @@ endif | |||
| 102 | 103 | ||
| 103 | ifeq ($(CONFIG_CPU_IDLE),y) | 104 | ifeq ($(CONFIG_CPU_IDLE),y) |
| 104 | obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o | 105 | obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o |
| 105 | obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o | 106 | omap-4-5-idle-common = cpuidle44xx.o |
| 107 | obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-idle-common) | ||
| 108 | obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-idle-common) | ||
| 109 | obj-$(CONFIG_SOC_DRA7XX) += $(omap-4-5-idle-common) | ||
| 106 | endif | 110 | endif |
| 107 | 111 | ||
| 108 | # PRCM | 112 | # PRCM |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 79664411e794..98fe235f6670 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
| @@ -60,7 +60,7 @@ static inline int omap3_pm_init(void) | |||
| 60 | } | 60 | } |
| 61 | #endif | 61 | #endif |
| 62 | 62 | ||
| 63 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) | 63 | #if defined(CONFIG_PM) && (defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX)) |
| 64 | int omap4_pm_init(void); | 64 | int omap4_pm_init(void); |
| 65 | int omap4_pm_init_early(void); | 65 | int omap4_pm_init_early(void); |
| 66 | #else | 66 | #else |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 5d0667c119f6..b8ad045bcb8d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
| @@ -231,15 +231,6 @@ static struct map_desc omap44xx_io_desc[] __initdata = { | |||
| 231 | .length = L4_PER_44XX_SIZE, | 231 | .length = L4_PER_44XX_SIZE, |
| 232 | .type = MT_DEVICE, | 232 | .type = MT_DEVICE, |
| 233 | }, | 233 | }, |
| 234 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
| 235 | { | ||
| 236 | .virtual = OMAP4_SRAM_VA, | ||
| 237 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), | ||
| 238 | .length = PAGE_SIZE, | ||
| 239 | .type = MT_MEMORY_RW_SO, | ||
| 240 | }, | ||
| 241 | #endif | ||
| 242 | |||
| 243 | }; | 234 | }; |
| 244 | #endif | 235 | #endif |
| 245 | 236 | ||
| @@ -269,14 +260,6 @@ static struct map_desc omap54xx_io_desc[] __initdata = { | |||
| 269 | .length = L4_PER_54XX_SIZE, | 260 | .length = L4_PER_54XX_SIZE, |
| 270 | .type = MT_DEVICE, | 261 | .type = MT_DEVICE, |
| 271 | }, | 262 | }, |
| 272 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
| 273 | { | ||
| 274 | .virtual = OMAP4_SRAM_VA, | ||
| 275 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), | ||
| 276 | .length = PAGE_SIZE, | ||
| 277 | .type = MT_MEMORY_RW_SO, | ||
| 278 | }, | ||
| 279 | #endif | ||
| 280 | }; | 263 | }; |
| 281 | #endif | 264 | #endif |
| 282 | 265 | ||
| @@ -667,6 +650,7 @@ void __init omap5_init_early(void) | |||
| 667 | omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE), | 650 | omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE), |
| 668 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE)); | 651 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE)); |
| 669 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); | 652 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); |
| 653 | omap4_pm_init_early(); | ||
| 670 | omap_prm_base_init(); | 654 | omap_prm_base_init(); |
| 671 | omap_cm_base_init(); | 655 | omap_cm_base_init(); |
| 672 | omap44xx_prm_init(); | 656 | omap44xx_prm_init(); |
| @@ -682,6 +666,8 @@ void __init omap5_init_early(void) | |||
| 682 | void __init omap5_init_late(void) | 666 | void __init omap5_init_late(void) |
| 683 | { | 667 | { |
| 684 | omap_common_late_init(); | 668 | omap_common_late_init(); |
| 669 | omap4_pm_init(); | ||
| 670 | omap2_clk_enable_autoidle_all(); | ||
| 685 | } | 671 | } |
| 686 | #endif | 672 | #endif |
| 687 | 673 | ||
| @@ -695,6 +681,7 @@ void __init dra7xx_init_early(void) | |||
| 695 | omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(DRA7XX_CM_CORE_AON_BASE), | 681 | omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(DRA7XX_CM_CORE_AON_BASE), |
| 696 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE)); | 682 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE)); |
| 697 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); | 683 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); |
| 684 | omap4_pm_init_early(); | ||
| 698 | omap_prm_base_init(); | 685 | omap_prm_base_init(); |
| 699 | omap_cm_base_init(); | 686 | omap_cm_base_init(); |
| 700 | omap44xx_prm_init(); | 687 | omap44xx_prm_init(); |
| @@ -709,6 +696,8 @@ void __init dra7xx_init_early(void) | |||
| 709 | void __init dra7xx_init_late(void) | 696 | void __init dra7xx_init_late(void) |
| 710 | { | 697 | { |
| 711 | omap_common_late_init(); | 698 | omap_common_late_init(); |
| 699 | omap4_pm_init(); | ||
| 700 | omap2_clk_enable_autoidle_all(); | ||
| 712 | } | 701 | } |
| 713 | #endif | 702 | #endif |
| 714 | 703 | ||
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index e9cdacfe1923..6944ae3674e8 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | #include "omap4-sar-layout.h" | 56 | #include "omap4-sar-layout.h" |
| 57 | #include "pm.h" | 57 | #include "pm.h" |
| 58 | #include "prcm_mpu44xx.h" | 58 | #include "prcm_mpu44xx.h" |
| 59 | #include "prcm_mpu54xx.h" | ||
| 59 | #include "prminst44xx.h" | 60 | #include "prminst44xx.h" |
| 60 | #include "prcm44xx.h" | 61 | #include "prcm44xx.h" |
| 61 | #include "prm44xx.h" | 62 | #include "prm44xx.h" |
| @@ -68,7 +69,6 @@ struct omap4_cpu_pm_info { | |||
| 68 | void __iomem *scu_sar_addr; | 69 | void __iomem *scu_sar_addr; |
| 69 | void __iomem *wkup_sar_addr; | 70 | void __iomem *wkup_sar_addr; |
| 70 | void __iomem *l2x0_sar_addr; | 71 | void __iomem *l2x0_sar_addr; |
| 71 | void (*secondary_startup)(void); | ||
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | /** | 74 | /** |
| @@ -76,6 +76,7 @@ struct omap4_cpu_pm_info { | |||
| 76 | * @finish_suspend: CPU suspend finisher function pointer | 76 | * @finish_suspend: CPU suspend finisher function pointer |
| 77 | * @resume: CPU resume function pointer | 77 | * @resume: CPU resume function pointer |
| 78 | * @scu_prepare: CPU Snoop Control program function pointer | 78 | * @scu_prepare: CPU Snoop Control program function pointer |
| 79 | * @hotplug_restart: CPU restart function pointer | ||
| 79 | * | 80 | * |
| 80 | * Structure holds functions pointer for CPU low power operations like | 81 | * Structure holds functions pointer for CPU low power operations like |
| 81 | * suspend, resume and scu programming. | 82 | * suspend, resume and scu programming. |
| @@ -84,11 +85,13 @@ struct cpu_pm_ops { | |||
| 84 | int (*finish_suspend)(unsigned long cpu_state); | 85 | int (*finish_suspend)(unsigned long cpu_state); |
| 85 | void (*resume)(void); | 86 | void (*resume)(void); |
| 86 | void (*scu_prepare)(unsigned int cpu_id, unsigned int cpu_state); | 87 | void (*scu_prepare)(unsigned int cpu_id, unsigned int cpu_state); |
| 88 | void (*hotplug_restart)(void); | ||
| 87 | }; | 89 | }; |
| 88 | 90 | ||
| 89 | static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); | 91 | static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); |
| 90 | static struct powerdomain *mpuss_pd; | 92 | static struct powerdomain *mpuss_pd; |
| 91 | static void __iomem *sar_base; | 93 | static void __iomem *sar_base; |
| 94 | static u32 cpu_context_offset; | ||
| 92 | 95 | ||
| 93 | static int default_finish_suspend(unsigned long cpu_state) | 96 | static int default_finish_suspend(unsigned long cpu_state) |
| 94 | { | 97 | { |
| @@ -106,6 +109,7 @@ struct cpu_pm_ops omap_pm_ops = { | |||
| 106 | .finish_suspend = default_finish_suspend, | 109 | .finish_suspend = default_finish_suspend, |
| 107 | .resume = dummy_cpu_resume, | 110 | .resume = dummy_cpu_resume, |
| 108 | .scu_prepare = dummy_scu_prepare, | 111 | .scu_prepare = dummy_scu_prepare, |
| 112 | .hotplug_restart = dummy_cpu_resume, | ||
| 109 | }; | 113 | }; |
| 110 | 114 | ||
| 111 | /* | 115 | /* |
| @@ -116,7 +120,8 @@ static inline void set_cpu_wakeup_addr(unsigned int cpu_id, u32 addr) | |||
| 116 | { | 120 | { |
| 117 | struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); | 121 | struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); |
| 118 | 122 | ||
| 119 | writel_relaxed(addr, pm_info->wkup_sar_addr); | 123 | if (pm_info->wkup_sar_addr) |
| 124 | writel_relaxed(addr, pm_info->wkup_sar_addr); | ||
| 120 | } | 125 | } |
| 121 | 126 | ||
| 122 | /* | 127 | /* |
| @@ -141,7 +146,8 @@ static void scu_pwrst_prepare(unsigned int cpu_id, unsigned int cpu_state) | |||
| 141 | break; | 146 | break; |
| 142 | } | 147 | } |
| 143 | 148 | ||
| 144 | writel_relaxed(scu_pwr_st, pm_info->scu_sar_addr); | 149 | if (pm_info->scu_sar_addr) |
| 150 | writel_relaxed(scu_pwr_st, pm_info->scu_sar_addr); | ||
| 145 | } | 151 | } |
| 146 | 152 | ||
| 147 | /* Helper functions for MPUSS OSWR */ | 153 | /* Helper functions for MPUSS OSWR */ |
| @@ -161,14 +167,14 @@ static inline void cpu_clear_prev_logic_pwrst(unsigned int cpu_id) | |||
| 161 | 167 | ||
| 162 | if (cpu_id) { | 168 | if (cpu_id) { |
| 163 | reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU1_INST, | 169 | reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU1_INST, |
| 164 | OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET); | 170 | cpu_context_offset); |
| 165 | omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU1_INST, | 171 | omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU1_INST, |
| 166 | OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET); | 172 | cpu_context_offset); |
| 167 | } else { | 173 | } else { |
| 168 | reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU0_INST, | 174 | reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU0_INST, |
| 169 | OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET); | 175 | cpu_context_offset); |
| 170 | omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU0_INST, | 176 | omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU0_INST, |
| 171 | OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET); | 177 | cpu_context_offset); |
| 172 | } | 178 | } |
| 173 | } | 179 | } |
| 174 | 180 | ||
| @@ -179,7 +185,8 @@ static void l2x0_pwrst_prepare(unsigned int cpu_id, unsigned int save_state) | |||
| 179 | { | 185 | { |
| 180 | struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); | 186 | struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); |
| 181 | 187 | ||
| 182 | writel_relaxed(save_state, pm_info->l2x0_sar_addr); | 188 | if (pm_info->l2x0_sar_addr) |
| 189 | writel_relaxed(save_state, pm_info->l2x0_sar_addr); | ||
| 183 | } | 190 | } |
| 184 | 191 | ||
| 185 | /* | 192 | /* |
| @@ -189,10 +196,14 @@ static void l2x0_pwrst_prepare(unsigned int cpu_id, unsigned int save_state) | |||
| 189 | #ifdef CONFIG_CACHE_L2X0 | 196 | #ifdef CONFIG_CACHE_L2X0 |
| 190 | static void __init save_l2x0_context(void) | 197 | static void __init save_l2x0_context(void) |
| 191 | { | 198 | { |
| 192 | writel_relaxed(l2x0_saved_regs.aux_ctrl, | 199 | void __iomem *l2x0_base = omap4_get_l2cache_base(); |
| 193 | sar_base + L2X0_AUXCTRL_OFFSET); | 200 | |
| 194 | writel_relaxed(l2x0_saved_regs.prefetch_ctrl, | 201 | if (l2x0_base && sar_base) { |
| 195 | sar_base + L2X0_PREFETCH_CTRL_OFFSET); | 202 | writel_relaxed(l2x0_saved_regs.aux_ctrl, |
| 203 | sar_base + L2X0_AUXCTRL_OFFSET); | ||
| 204 | writel_relaxed(l2x0_saved_regs.prefetch_ctrl, | ||
| 205 | sar_base + L2X0_PREFETCH_CTRL_OFFSET); | ||
| 206 | } | ||
| 196 | } | 207 | } |
| 197 | #else | 208 | #else |
| 198 | static void __init save_l2x0_context(void) | 209 | static void __init save_l2x0_context(void) |
| @@ -231,6 +242,10 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state) | |||
| 231 | save_state = 1; | 242 | save_state = 1; |
| 232 | break; | 243 | break; |
| 233 | case PWRDM_POWER_RET: | 244 | case PWRDM_POWER_RET: |
| 245 | if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) { | ||
| 246 | save_state = 0; | ||
| 247 | break; | ||
| 248 | } | ||
| 234 | default: | 249 | default: |
| 235 | /* | 250 | /* |
| 236 | * CPUx CSWR is invalid hardware state. Also CPUx OSWR | 251 | * CPUx CSWR is invalid hardware state. Also CPUx OSWR |
| @@ -307,7 +322,7 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) | |||
| 307 | 322 | ||
| 308 | pwrdm_clear_all_prev_pwrst(pm_info->pwrdm); | 323 | pwrdm_clear_all_prev_pwrst(pm_info->pwrdm); |
| 309 | pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); | 324 | pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); |
| 310 | set_cpu_wakeup_addr(cpu, virt_to_phys(pm_info->secondary_startup)); | 325 | set_cpu_wakeup_addr(cpu, virt_to_phys(omap_pm_ops.hotplug_restart)); |
| 311 | omap_pm_ops.scu_prepare(cpu, power_state); | 326 | omap_pm_ops.scu_prepare(cpu, power_state); |
| 312 | 327 | ||
| 313 | /* | 328 | /* |
| @@ -323,6 +338,21 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) | |||
| 323 | 338 | ||
| 324 | 339 | ||
| 325 | /* | 340 | /* |
| 341 | * Enable Mercury Fast HG retention mode by default. | ||
| 342 | */ | ||
| 343 | static void enable_mercury_retention_mode(void) | ||
| 344 | { | ||
| 345 | u32 reg; | ||
| 346 | |||
| 347 | reg = omap4_prcm_mpu_read_inst_reg(OMAP54XX_PRCM_MPU_DEVICE_INST, | ||
| 348 | OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); | ||
| 349 | /* Enable HG_EN, HG_RAMPUP = fast mode */ | ||
| 350 | reg |= BIT(24) | BIT(25); | ||
| 351 | omap4_prcm_mpu_write_inst_reg(reg, OMAP54XX_PRCM_MPU_DEVICE_INST, | ||
| 352 | OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); | ||
| 353 | } | ||
| 354 | |||
| 355 | /* | ||
| 326 | * Initialise OMAP4 MPUSS | 356 | * Initialise OMAP4 MPUSS |
| 327 | */ | 357 | */ |
| 328 | int __init omap4_mpuss_init(void) | 358 | int __init omap4_mpuss_init(void) |
| @@ -334,13 +364,17 @@ int __init omap4_mpuss_init(void) | |||
| 334 | return -ENODEV; | 364 | return -ENODEV; |
| 335 | } | 365 | } |
| 336 | 366 | ||
| 337 | sar_base = omap4_get_sar_ram_base(); | 367 | if (cpu_is_omap44xx()) |
| 368 | sar_base = omap4_get_sar_ram_base(); | ||
| 338 | 369 | ||
| 339 | /* Initilaise per CPU PM information */ | 370 | /* Initilaise per CPU PM information */ |
| 340 | pm_info = &per_cpu(omap4_pm_info, 0x0); | 371 | pm_info = &per_cpu(omap4_pm_info, 0x0); |
| 341 | pm_info->scu_sar_addr = sar_base + SCU_OFFSET0; | 372 | if (sar_base) { |
| 342 | pm_info->wkup_sar_addr = sar_base + CPU0_WAKEUP_NS_PA_ADDR_OFFSET; | 373 | pm_info->scu_sar_addr = sar_base + SCU_OFFSET0; |
| 343 | pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET0; | 374 | pm_info->wkup_sar_addr = sar_base + |
| 375 | CPU0_WAKEUP_NS_PA_ADDR_OFFSET; | ||
| 376 | pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET0; | ||
| 377 | } | ||
| 344 | pm_info->pwrdm = pwrdm_lookup("cpu0_pwrdm"); | 378 | pm_info->pwrdm = pwrdm_lookup("cpu0_pwrdm"); |
| 345 | if (!pm_info->pwrdm) { | 379 | if (!pm_info->pwrdm) { |
| 346 | pr_err("Lookup failed for CPU0 pwrdm\n"); | 380 | pr_err("Lookup failed for CPU0 pwrdm\n"); |
| @@ -355,13 +389,12 @@ int __init omap4_mpuss_init(void) | |||
| 355 | pwrdm_set_next_pwrst(pm_info->pwrdm, PWRDM_POWER_ON); | 389 | pwrdm_set_next_pwrst(pm_info->pwrdm, PWRDM_POWER_ON); |
| 356 | 390 | ||
| 357 | pm_info = &per_cpu(omap4_pm_info, 0x1); | 391 | pm_info = &per_cpu(omap4_pm_info, 0x1); |
| 358 | pm_info->scu_sar_addr = sar_base + SCU_OFFSET1; | 392 | if (sar_base) { |
| 359 | pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET; | 393 | pm_info->scu_sar_addr = sar_base + SCU_OFFSET1; |
| 360 | pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; | 394 | pm_info->wkup_sar_addr = sar_base + |
| 361 | if (cpu_is_omap446x()) | 395 | CPU1_WAKEUP_NS_PA_ADDR_OFFSET; |
| 362 | pm_info->secondary_startup = omap4460_secondary_startup; | 396 | pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; |
| 363 | else | 397 | } |
| 364 | pm_info->secondary_startup = omap4_secondary_startup; | ||
| 365 | 398 | ||
| 366 | pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm"); | 399 | pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm"); |
| 367 | if (!pm_info->pwrdm) { | 400 | if (!pm_info->pwrdm) { |
| @@ -384,20 +417,27 @@ int __init omap4_mpuss_init(void) | |||
| 384 | pwrdm_clear_all_prev_pwrst(mpuss_pd); | 417 | pwrdm_clear_all_prev_pwrst(mpuss_pd); |
| 385 | mpuss_clear_prev_logic_pwrst(); | 418 | mpuss_clear_prev_logic_pwrst(); |
| 386 | 419 | ||
| 387 | /* Save device type on scratchpad for low level code to use */ | 420 | if (sar_base) { |
| 388 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) | 421 | /* Save device type on scratchpad for low level code to use */ |
| 389 | writel_relaxed(1, sar_base + OMAP_TYPE_OFFSET); | 422 | writel_relaxed((omap_type() != OMAP2_DEVICE_TYPE_GP) ? 1 : 0, |
| 390 | else | 423 | sar_base + OMAP_TYPE_OFFSET); |
| 391 | writel_relaxed(0, sar_base + OMAP_TYPE_OFFSET); | 424 | save_l2x0_context(); |
| 392 | 425 | } | |
| 393 | save_l2x0_context(); | ||
| 394 | 426 | ||
| 395 | if (cpu_is_omap44xx()) { | 427 | if (cpu_is_omap44xx()) { |
| 396 | omap_pm_ops.finish_suspend = omap4_finish_suspend; | 428 | omap_pm_ops.finish_suspend = omap4_finish_suspend; |
| 397 | omap_pm_ops.resume = omap4_cpu_resume; | 429 | omap_pm_ops.resume = omap4_cpu_resume; |
| 398 | omap_pm_ops.scu_prepare = scu_pwrst_prepare; | 430 | omap_pm_ops.scu_prepare = scu_pwrst_prepare; |
| 431 | omap_pm_ops.hotplug_restart = omap4_secondary_startup; | ||
| 432 | cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET; | ||
| 433 | } else if (soc_is_omap54xx() || soc_is_dra7xx()) { | ||
| 434 | cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET; | ||
| 435 | enable_mercury_retention_mode(); | ||
| 399 | } | 436 | } |
| 400 | 437 | ||
| 438 | if (cpu_is_omap446x()) | ||
| 439 | omap_pm_ops.hotplug_restart = omap4460_secondary_startup; | ||
| 440 | |||
| 401 | return 0; | 441 | return 0; |
| 402 | } | 442 | } |
| 403 | 443 | ||
diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h index 3e97c6c8ecf1..dec2b05d184b 100644 --- a/arch/arm/mach-omap2/omap-secure.h +++ b/arch/arm/mach-omap2/omap-secure.h | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #define OMAP4_MON_L2X0_PREFETCH_INDEX 0x113 | 45 | #define OMAP4_MON_L2X0_PREFETCH_INDEX 0x113 |
| 46 | 46 | ||
| 47 | #define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX 0x109 | 47 | #define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX 0x109 |
| 48 | #define OMAP5_MON_AMBA_IF_INDEX 0x108 | ||
| 48 | 49 | ||
| 49 | /* Secure PPA(Primary Protected Application) APIs */ | 50 | /* Secure PPA(Primary Protected Application) APIs */ |
| 50 | #define OMAP4_PPA_L2_POR_INDEX 0x23 | 51 | #define OMAP4_PPA_L2_POR_INDEX 0x23 |
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c index 37843a7d3639..f961c46453b9 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include "soc.h" | 32 | #include "soc.h" |
| 33 | #include "omap4-sar-layout.h" | 33 | #include "omap4-sar-layout.h" |
| 34 | #include "common.h" | 34 | #include "common.h" |
| 35 | #include "pm.h" | ||
| 35 | 36 | ||
| 36 | #define AM43XX_NR_REG_BANKS 7 | 37 | #define AM43XX_NR_REG_BANKS 7 |
| 37 | #define AM43XX_IRQS 224 | 38 | #define AM43XX_IRQS 224 |
| @@ -381,7 +382,7 @@ static struct notifier_block irq_notifier_block = { | |||
| 381 | static void __init irq_pm_init(void) | 382 | static void __init irq_pm_init(void) |
| 382 | { | 383 | { |
| 383 | /* FIXME: Remove this when MPU OSWR support is added */ | 384 | /* FIXME: Remove this when MPU OSWR support is added */ |
| 384 | if (!soc_is_omap54xx()) | 385 | if (!IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) |
| 385 | cpu_pm_register_notifier(&irq_notifier_block); | 386 | cpu_pm_register_notifier(&irq_notifier_block); |
| 386 | } | 387 | } |
| 387 | #else | 388 | #else |
| @@ -406,6 +407,7 @@ int __init omap_wakeupgen_init(void) | |||
| 406 | { | 407 | { |
| 407 | int i; | 408 | int i; |
| 408 | unsigned int boot_cpu = smp_processor_id(); | 409 | unsigned int boot_cpu = smp_processor_id(); |
| 410 | u32 val; | ||
| 409 | 411 | ||
| 410 | /* Not supported on OMAP4 ES1.0 silicon */ | 412 | /* Not supported on OMAP4 ES1.0 silicon */ |
| 411 | if (omap_rev() == OMAP4430_REV_ES1_0) { | 413 | if (omap_rev() == OMAP4430_REV_ES1_0) { |
| @@ -451,6 +453,22 @@ int __init omap_wakeupgen_init(void) | |||
| 451 | for (i = 0; i < max_irqs; i++) | 453 | for (i = 0; i < max_irqs; i++) |
| 452 | irq_target_cpu[i] = boot_cpu; | 454 | irq_target_cpu[i] = boot_cpu; |
| 453 | 455 | ||
| 456 | /* | ||
| 457 | * Enables OMAP5 ES2 PM Mode using ES2_PM_MODE in AMBA_IF_MODE | ||
| 458 | * 0x0: ES1 behavior, CPU cores would enter and exit OFF mode together. | ||
| 459 | * 0x1: ES2 behavior, CPU cores are allowed to enter/exit OFF mode | ||
| 460 | * independently. | ||
| 461 | * This needs to be set one time thanks to always ON domain. | ||
| 462 | * | ||
| 463 | * We do not support ES1 behavior anymore. OMAP5 is assumed to be | ||
| 464 | * ES2.0, and the same is applicable for DRA7. | ||
| 465 | */ | ||
| 466 | if (soc_is_omap54xx() || soc_is_dra7xx()) { | ||
| 467 | val = __raw_readl(wakeupgen_base + OMAP_AMBA_IF_MODE); | ||
| 468 | val |= BIT(5); | ||
| 469 | omap_smc1(OMAP5_MON_AMBA_IF_INDEX, val); | ||
| 470 | } | ||
| 471 | |||
| 454 | irq_hotplug_init(); | 472 | irq_hotplug_init(); |
| 455 | irq_pm_init(); | 473 | irq_pm_init(); |
| 456 | 474 | ||
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.h b/arch/arm/mach-omap2/omap-wakeupgen.h index b0fd16f5c391..b3c8eccfae79 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.h +++ b/arch/arm/mach-omap2/omap-wakeupgen.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #define OMAP_WKG_ENB_E_1 0x420 | 27 | #define OMAP_WKG_ENB_E_1 0x420 |
| 28 | #define OMAP_AUX_CORE_BOOT_0 0x800 | 28 | #define OMAP_AUX_CORE_BOOT_0 0x800 |
| 29 | #define OMAP_AUX_CORE_BOOT_1 0x804 | 29 | #define OMAP_AUX_CORE_BOOT_1 0x804 |
| 30 | #define OMAP_AMBA_IF_MODE 0x80c | ||
| 30 | #define OMAP_PTMSYNCREQ_MASK 0xc00 | 31 | #define OMAP_PTMSYNCREQ_MASK 0xc00 |
| 31 | #define OMAP_PTMSYNCREQ_EN 0xc04 | 32 | #define OMAP_PTMSYNCREQ_EN 0xc04 |
| 32 | #define OMAP_TIMESTAMPCYCLELO 0xc08 | 33 | #define OMAP_TIMESTAMPCYCLELO 0xc08 |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index a0fe747634c1..16b20cedc38d 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/irqchip/irq-crossbar.h> | 25 | #include <linux/irqchip/irq-crossbar.h> |
| 26 | #include <linux/of_address.h> | 26 | #include <linux/of_address.h> |
| 27 | #include <linux/reboot.h> | 27 | #include <linux/reboot.h> |
| 28 | #include <linux/genalloc.h> | ||
| 28 | 29 | ||
| 29 | #include <asm/hardware/cache-l2x0.h> | 30 | #include <asm/hardware/cache-l2x0.h> |
| 30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
| @@ -71,6 +72,26 @@ void omap_bus_sync(void) | |||
| 71 | } | 72 | } |
| 72 | EXPORT_SYMBOL(omap_bus_sync); | 73 | EXPORT_SYMBOL(omap_bus_sync); |
| 73 | 74 | ||
| 75 | static int __init omap4_sram_init(void) | ||
| 76 | { | ||
| 77 | struct device_node *np; | ||
| 78 | struct gen_pool *sram_pool; | ||
| 79 | |||
| 80 | np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu"); | ||
| 81 | if (!np) | ||
| 82 | pr_warn("%s:Unable to allocate sram needed to handle errata I688\n", | ||
| 83 | __func__); | ||
| 84 | sram_pool = of_get_named_gen_pool(np, "sram", 0); | ||
| 85 | if (!sram_pool) | ||
| 86 | pr_warn("%s:Unable to get sram pool needed to handle errata I688\n", | ||
| 87 | __func__); | ||
| 88 | else | ||
| 89 | sram_sync = (void *)gen_pool_alloc(sram_pool, PAGE_SIZE); | ||
| 90 | |||
| 91 | return 0; | ||
| 92 | } | ||
| 93 | omap_arch_initcall(omap4_sram_init); | ||
| 94 | |||
| 74 | /* Steal one page physical memory for barrier implementation */ | 95 | /* Steal one page physical memory for barrier implementation */ |
| 75 | int __init omap_barrier_reserve_memblock(void) | 96 | int __init omap_barrier_reserve_memblock(void) |
| 76 | { | 97 | { |
| @@ -91,7 +112,6 @@ void __init omap_barriers_init(void) | |||
| 91 | dram_io_desc[0].type = MT_MEMORY_RW_SO; | 112 | dram_io_desc[0].type = MT_MEMORY_RW_SO; |
| 92 | iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc)); | 113 | iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc)); |
| 93 | dram_sync = (void __iomem *) dram_io_desc[0].virtual; | 114 | dram_sync = (void __iomem *) dram_io_desc[0].virtual; |
| 94 | sram_sync = (void __iomem *) OMAP4_SRAM_VA; | ||
| 95 | 115 | ||
| 96 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", | 116 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", |
| 97 | (long long) paddr, dram_io_desc[0].virtual); | 117 | (long long) paddr, dram_io_desc[0].virtual); |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index faa65833a0d4..716247ed9e0c 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -2185,7 +2185,7 @@ static int _enable(struct omap_hwmod *oh) | |||
| 2185 | oh->mux->pads_dynamic))) { | 2185 | oh->mux->pads_dynamic))) { |
| 2186 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); | 2186 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); |
| 2187 | _reconfigure_io_chain(); | 2187 | _reconfigure_io_chain(); |
| 2188 | } else if (oh->flags & HWMOD_FORCE_MSTANDBY) { | 2188 | } else if (oh->flags & HWMOD_RECONFIG_IO_CHAIN) { |
| 2189 | _reconfigure_io_chain(); | 2189 | _reconfigure_io_chain(); |
| 2190 | } | 2190 | } |
| 2191 | 2191 | ||
| @@ -2293,7 +2293,7 @@ static int _idle(struct omap_hwmod *oh) | |||
| 2293 | if (oh->mux && oh->mux->pads_dynamic) { | 2293 | if (oh->mux && oh->mux->pads_dynamic) { |
| 2294 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE); | 2294 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE); |
| 2295 | _reconfigure_io_chain(); | 2295 | _reconfigure_io_chain(); |
| 2296 | } else if (oh->flags & HWMOD_FORCE_MSTANDBY) { | 2296 | } else if (oh->flags & HWMOD_RECONFIG_IO_CHAIN) { |
| 2297 | _reconfigure_io_chain(); | 2297 | _reconfigure_io_chain(); |
| 2298 | } | 2298 | } |
| 2299 | 2299 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index 0f97d635ff90..512f809a3f4d 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
| @@ -514,6 +514,9 @@ struct omap_hwmod_omap4_prcm { | |||
| 514 | * HWMOD_SWSUP_SIDLE_ACT: omap_hwmod code should manually bring the module | 514 | * HWMOD_SWSUP_SIDLE_ACT: omap_hwmod code should manually bring the module |
| 515 | * out of idle, but rely on smart-idle to the put it back in idle, | 515 | * out of idle, but rely on smart-idle to the put it back in idle, |
| 516 | * so the wakeups are still functional (Only known case for now is UART) | 516 | * so the wakeups are still functional (Only known case for now is UART) |
| 517 | * HWMOD_RECONFIG_IO_CHAIN: omap_hwmod code needs to reconfigure wake-up | ||
| 518 | * events by calling _reconfigure_io_chain() when a device is enabled | ||
| 519 | * or idled. | ||
| 517 | */ | 520 | */ |
| 518 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 521 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
| 519 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 522 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
| @@ -528,6 +531,7 @@ struct omap_hwmod_omap4_prcm { | |||
| 528 | #define HWMOD_BLOCK_WFI (1 << 10) | 531 | #define HWMOD_BLOCK_WFI (1 << 10) |
| 529 | #define HWMOD_FORCE_MSTANDBY (1 << 11) | 532 | #define HWMOD_FORCE_MSTANDBY (1 << 11) |
| 530 | #define HWMOD_SWSUP_SIDLE_ACT (1 << 12) | 533 | #define HWMOD_SWSUP_SIDLE_ACT (1 << 12) |
| 534 | #define HWMOD_RECONFIG_IO_CHAIN (1 << 13) | ||
| 531 | 535 | ||
| 532 | /* | 536 | /* |
| 533 | * omap_hwmod._int_flags definitions | 537 | * omap_hwmod._int_flags definitions |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index e9516b454e76..2a78b093c0ce 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -490,7 +490,7 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = { | |||
| 490 | .mpu_irqs = omap2_uart1_mpu_irqs, | 490 | .mpu_irqs = omap2_uart1_mpu_irqs, |
| 491 | .sdma_reqs = omap2_uart1_sdma_reqs, | 491 | .sdma_reqs = omap2_uart1_sdma_reqs, |
| 492 | .main_clk = "uart1_fck", | 492 | .main_clk = "uart1_fck", |
| 493 | .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT, | 493 | .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE, |
| 494 | .prcm = { | 494 | .prcm = { |
| 495 | .omap2 = { | 495 | .omap2 = { |
| 496 | .module_offs = CORE_MOD, | 496 | .module_offs = CORE_MOD, |
| @@ -509,7 +509,7 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = { | |||
| 509 | .mpu_irqs = omap2_uart2_mpu_irqs, | 509 | .mpu_irqs = omap2_uart2_mpu_irqs, |
| 510 | .sdma_reqs = omap2_uart2_sdma_reqs, | 510 | .sdma_reqs = omap2_uart2_sdma_reqs, |
| 511 | .main_clk = "uart2_fck", | 511 | .main_clk = "uart2_fck", |
| 512 | .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT, | 512 | .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE, |
| 513 | .prcm = { | 513 | .prcm = { |
| 514 | .omap2 = { | 514 | .omap2 = { |
| 515 | .module_offs = CORE_MOD, | 515 | .module_offs = CORE_MOD, |
| @@ -529,7 +529,7 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = { | |||
| 529 | .sdma_reqs = omap2_uart3_sdma_reqs, | 529 | .sdma_reqs = omap2_uart3_sdma_reqs, |
| 530 | .main_clk = "uart3_fck", | 530 | .main_clk = "uart3_fck", |
| 531 | .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS | | 531 | .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS | |
| 532 | HWMOD_SWSUP_SIDLE_ACT, | 532 | HWMOD_SWSUP_SIDLE, |
| 533 | .prcm = { | 533 | .prcm = { |
| 534 | .omap2 = { | 534 | .omap2 = { |
| 535 | .module_offs = OMAP3430_PER_MOD, | 535 | .module_offs = OMAP3430_PER_MOD, |
| @@ -559,7 +559,7 @@ static struct omap_hwmod omap36xx_uart4_hwmod = { | |||
| 559 | .mpu_irqs = uart4_mpu_irqs, | 559 | .mpu_irqs = uart4_mpu_irqs, |
| 560 | .sdma_reqs = uart4_sdma_reqs, | 560 | .sdma_reqs = uart4_sdma_reqs, |
| 561 | .main_clk = "uart4_fck", | 561 | .main_clk = "uart4_fck", |
| 562 | .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT, | 562 | .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE, |
| 563 | .prcm = { | 563 | .prcm = { |
| 564 | .omap2 = { | 564 | .omap2 = { |
| 565 | .module_offs = OMAP3430_PER_MOD, | 565 | .module_offs = OMAP3430_PER_MOD, |
| @@ -1730,8 +1730,8 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { | |||
| 1730 | * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY | 1730 | * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY |
| 1731 | * signal when MIDLEMODE is set to force-idle. | 1731 | * signal when MIDLEMODE is set to force-idle. |
| 1732 | */ | 1732 | */ |
| 1733 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | 1733 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | |
| 1734 | | HWMOD_FORCE_MSTANDBY, | 1734 | HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN, |
| 1735 | }; | 1735 | }; |
| 1736 | 1736 | ||
| 1737 | /* usb_otg_hs */ | 1737 | /* usb_otg_hs */ |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index b3d3d30ffba0..0a5e6e053b8c 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
| @@ -352,6 +352,16 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | |||
| 352 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), | 352 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), |
| 353 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), | 353 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), |
| 354 | #endif | 354 | #endif |
| 355 | #ifdef CONFIG_SOC_OMAP5 | ||
| 356 | OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata), | ||
| 357 | OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata), | ||
| 358 | #endif | ||
| 359 | #ifdef CONFIG_SOC_DRA7XX | ||
| 360 | OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata), | ||
| 361 | #endif | ||
| 362 | #ifdef CONFIG_SOC_AM43XX | ||
| 363 | OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata), | ||
| 364 | #endif | ||
| 355 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) | 365 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) |
| 356 | OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu", | 366 | OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu", |
| 357 | &omap4_iommu_pdata), | 367 | &omap4_iommu_pdata), |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index e150102d6c06..425bfcd67db6 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
| @@ -101,6 +101,7 @@ static inline void enable_omap3630_toggle_l2_on_restore(void) { } | |||
| 101 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ | 101 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ |
| 102 | 102 | ||
| 103 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) | 103 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) |
| 104 | #define PM_OMAP4_CPU_OSWR_DISABLE (1 << 1) | ||
| 104 | 105 | ||
| 105 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) | 106 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) |
| 106 | extern u16 pm44xx_errata; | 107 | extern u16 pm44xx_errata; |
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 0bfce38a744a..503097c72b82 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c | |||
| @@ -37,6 +37,8 @@ struct power_state { | |||
| 37 | struct list_head node; | 37 | struct list_head node; |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | static u32 cpu_suspend_state = PWRDM_POWER_OFF; | ||
| 41 | |||
| 40 | static LIST_HEAD(pwrst_list); | 42 | static LIST_HEAD(pwrst_list); |
| 41 | 43 | ||
| 42 | #ifdef CONFIG_SUSPEND | 44 | #ifdef CONFIG_SUSPEND |
| @@ -67,7 +69,7 @@ static int omap4_pm_suspend(void) | |||
| 67 | * domain CSWR is not supported by hardware. | 69 | * domain CSWR is not supported by hardware. |
| 68 | * More details can be found in OMAP4430 TRM section 4.3.4.2. | 70 | * More details can be found in OMAP4430 TRM section 4.3.4.2. |
| 69 | */ | 71 | */ |
| 70 | omap4_enter_lowpower(cpu_id, PWRDM_POWER_OFF); | 72 | omap4_enter_lowpower(cpu_id, cpu_suspend_state); |
| 71 | 73 | ||
| 72 | /* Restore next powerdomain state */ | 74 | /* Restore next powerdomain state */ |
| 73 | list_for_each_entry(pwrst, &pwrst_list, node) { | 75 | list_for_each_entry(pwrst, &pwrst_list, node) { |
| @@ -113,8 +115,11 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
| 113 | * through hotplug path and CPU0 explicitly programmed | 115 | * through hotplug path and CPU0 explicitly programmed |
| 114 | * further down in the code path | 116 | * further down in the code path |
| 115 | */ | 117 | */ |
| 116 | if (!strncmp(pwrdm->name, "cpu", 3)) | 118 | if (!strncmp(pwrdm->name, "cpu", 3)) { |
| 119 | if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) | ||
| 120 | cpu_suspend_state = PWRDM_POWER_RET; | ||
| 117 | return 0; | 121 | return 0; |
| 122 | } | ||
| 118 | 123 | ||
| 119 | pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC); | 124 | pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC); |
| 120 | if (!pwrst) | 125 | if (!pwrst) |
| @@ -208,6 +213,32 @@ static inline int omap4_init_static_deps(void) | |||
| 208 | } | 213 | } |
| 209 | 214 | ||
| 210 | /** | 215 | /** |
| 216 | * omap5_dra7_init_static_deps - Init static clkdm dependencies on OMAP5 and | ||
| 217 | * DRA7 | ||
| 218 | * | ||
| 219 | * The dynamic dependency between MPUSS -> EMIF is broken and has | ||
| 220 | * not worked as expected. The hardware recommendation is to | ||
| 221 | * enable static dependencies for these to avoid system | ||
| 222 | * lock ups or random crashes. | ||
| 223 | */ | ||
| 224 | static inline int omap5_dra7_init_static_deps(void) | ||
| 225 | { | ||
| 226 | struct clockdomain *mpuss_clkdm, *emif_clkdm; | ||
| 227 | int ret; | ||
| 228 | |||
| 229 | mpuss_clkdm = clkdm_lookup("mpu_clkdm"); | ||
| 230 | emif_clkdm = clkdm_lookup("emif_clkdm"); | ||
| 231 | if (!mpuss_clkdm || !emif_clkdm) | ||
| 232 | return -EINVAL; | ||
| 233 | |||
| 234 | ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm); | ||
| 235 | if (ret) | ||
| 236 | pr_err("Failed to add MPUSS -> EMIF wakeup dependency\n"); | ||
| 237 | |||
| 238 | return ret; | ||
| 239 | } | ||
| 240 | |||
| 241 | /** | ||
| 211 | * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices | 242 | * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices |
| 212 | * | 243 | * |
| 213 | * Initializes basic stuff for power management functionality. | 244 | * Initializes basic stuff for power management functionality. |
| @@ -217,6 +248,9 @@ int __init omap4_pm_init_early(void) | |||
| 217 | if (cpu_is_omap446x()) | 248 | if (cpu_is_omap446x()) |
| 218 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | 249 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; |
| 219 | 250 | ||
| 251 | if (soc_is_omap54xx() || soc_is_dra7xx()) | ||
| 252 | pm44xx_errata |= PM_OMAP4_CPU_OSWR_DISABLE; | ||
| 253 | |||
| 220 | return 0; | 254 | return 0; |
| 221 | } | 255 | } |
| 222 | 256 | ||
| @@ -244,10 +278,14 @@ int __init omap4_pm_init(void) | |||
| 244 | goto err2; | 278 | goto err2; |
| 245 | } | 279 | } |
| 246 | 280 | ||
| 247 | if (cpu_is_omap44xx()) { | 281 | if (cpu_is_omap44xx()) |
| 248 | ret = omap4_init_static_deps(); | 282 | ret = omap4_init_static_deps(); |
| 249 | if (ret) | 283 | else if (soc_is_omap54xx() || soc_is_dra7xx()) |
| 250 | goto err2; | 284 | ret = omap5_dra7_init_static_deps(); |
| 285 | |||
| 286 | if (ret) { | ||
| 287 | pr_err("Failed to initialise static dependencies.\n"); | ||
| 288 | goto err2; | ||
| 251 | } | 289 | } |
| 252 | 290 | ||
| 253 | ret = omap4_mpuss_init(); | 291 | ret = omap4_mpuss_init(); |
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 372de3edf4a5..ff08da385a2d 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
| 18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
| 19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
| 20 | #include <linux/of_irq.h> | ||
| 20 | 21 | ||
| 21 | #include "soc.h" | 22 | #include "soc.h" |
| 22 | #include "common.h" | 23 | #include "common.h" |
| @@ -673,6 +674,11 @@ int __init omap3xxx_prm_init(void) | |||
| 673 | return prm_register(&omap3xxx_prm_ll_data); | 674 | return prm_register(&omap3xxx_prm_ll_data); |
| 674 | } | 675 | } |
| 675 | 676 | ||
| 677 | static struct of_device_id omap3_prm_dt_match_table[] = { | ||
| 678 | { .compatible = "ti,omap3-prm" }, | ||
| 679 | { } | ||
| 680 | }; | ||
| 681 | |||
| 676 | static int omap3xxx_prm_late_init(void) | 682 | static int omap3xxx_prm_late_init(void) |
| 677 | { | 683 | { |
| 678 | int ret; | 684 | int ret; |
| @@ -687,6 +693,18 @@ static int omap3xxx_prm_late_init(void) | |||
| 687 | omap3_prcm_irq_setup.reconfigure_io_chain = | 693 | omap3_prcm_irq_setup.reconfigure_io_chain = |
| 688 | omap3430_pre_es3_1_reconfigure_io_chain; | 694 | omap3430_pre_es3_1_reconfigure_io_chain; |
| 689 | 695 | ||
| 696 | if (of_have_populated_dt()) { | ||
| 697 | struct device_node *np; | ||
| 698 | int irq_num; | ||
| 699 | |||
| 700 | np = of_find_matching_node(NULL, omap3_prm_dt_match_table); | ||
| 701 | if (np) { | ||
| 702 | irq_num = of_irq_get(np, 0); | ||
| 703 | if (irq_num >= 0) | ||
| 704 | omap3_prcm_irq_setup.irq = irq_num; | ||
| 705 | } | ||
| 706 | } | ||
| 707 | |||
| 690 | omap3xxx_prm_enable_io_wakeup(); | 708 | omap3xxx_prm_enable_io_wakeup(); |
| 691 | ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); | 709 | ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); |
| 692 | if (!ret) | 710 | if (!ret) |
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index a7f6ea27180a..0958d070d3db 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/of_irq.h> | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | #include "soc.h" | 23 | #include "soc.h" |
| @@ -32,7 +33,6 @@ | |||
| 32 | /* Static data */ | 33 | /* Static data */ |
| 33 | 34 | ||
| 34 | static const struct omap_prcm_irq omap4_prcm_irqs[] = { | 35 | static const struct omap_prcm_irq omap4_prcm_irqs[] = { |
| 35 | OMAP_PRCM_IRQ("wkup", 0, 0), | ||
| 36 | OMAP_PRCM_IRQ("io", 9, 1), | 36 | OMAP_PRCM_IRQ("io", 9, 1), |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| @@ -154,21 +154,36 @@ void omap4_prm_vp_clear_txdone(u8 vp_id) | |||
| 154 | 154 | ||
| 155 | u32 omap4_prm_vcvp_read(u8 offset) | 155 | u32 omap4_prm_vcvp_read(u8 offset) |
| 156 | { | 156 | { |
| 157 | s32 inst = omap4_prmst_get_prm_dev_inst(); | ||
| 158 | |||
| 159 | if (inst == PRM_INSTANCE_UNKNOWN) | ||
| 160 | return 0; | ||
| 161 | |||
| 157 | return omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, | 162 | return omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, |
| 158 | OMAP4430_PRM_DEVICE_INST, offset); | 163 | inst, offset); |
| 159 | } | 164 | } |
| 160 | 165 | ||
| 161 | void omap4_prm_vcvp_write(u32 val, u8 offset) | 166 | void omap4_prm_vcvp_write(u32 val, u8 offset) |
| 162 | { | 167 | { |
| 168 | s32 inst = omap4_prmst_get_prm_dev_inst(); | ||
| 169 | |||
| 170 | if (inst == PRM_INSTANCE_UNKNOWN) | ||
| 171 | return; | ||
| 172 | |||
| 163 | omap4_prminst_write_inst_reg(val, OMAP4430_PRM_PARTITION, | 173 | omap4_prminst_write_inst_reg(val, OMAP4430_PRM_PARTITION, |
| 164 | OMAP4430_PRM_DEVICE_INST, offset); | 174 | inst, offset); |
| 165 | } | 175 | } |
| 166 | 176 | ||
| 167 | u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset) | 177 | u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset) |
| 168 | { | 178 | { |
| 179 | s32 inst = omap4_prmst_get_prm_dev_inst(); | ||
| 180 | |||
| 181 | if (inst == PRM_INSTANCE_UNKNOWN) | ||
| 182 | return 0; | ||
| 183 | |||
| 169 | return omap4_prminst_rmw_inst_reg_bits(mask, bits, | 184 | return omap4_prminst_rmw_inst_reg_bits(mask, bits, |
| 170 | OMAP4430_PRM_PARTITION, | 185 | OMAP4430_PRM_PARTITION, |
| 171 | OMAP4430_PRM_DEVICE_INST, | 186 | inst, |
| 172 | offset); | 187 | offset); |
| 173 | } | 188 | } |
| 174 | 189 | ||
| @@ -275,14 +290,18 @@ void omap44xx_prm_restore_irqen(u32 *saved_mask) | |||
| 275 | void omap44xx_prm_reconfigure_io_chain(void) | 290 | void omap44xx_prm_reconfigure_io_chain(void) |
| 276 | { | 291 | { |
| 277 | int i = 0; | 292 | int i = 0; |
| 293 | s32 inst = omap4_prmst_get_prm_dev_inst(); | ||
| 294 | |||
| 295 | if (inst == PRM_INSTANCE_UNKNOWN) | ||
| 296 | return; | ||
| 278 | 297 | ||
| 279 | /* Trigger WUCLKIN enable */ | 298 | /* Trigger WUCLKIN enable */ |
| 280 | omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, | 299 | omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, |
| 281 | OMAP4430_WUCLK_CTRL_MASK, | 300 | OMAP4430_WUCLK_CTRL_MASK, |
| 282 | OMAP4430_PRM_DEVICE_INST, | 301 | inst, |
| 283 | OMAP4_PRM_IO_PMCTRL_OFFSET); | 302 | OMAP4_PRM_IO_PMCTRL_OFFSET); |
| 284 | omap_test_timeout( | 303 | omap_test_timeout( |
| 285 | (((omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, | 304 | (((omap4_prm_read_inst_reg(inst, |
| 286 | OMAP4_PRM_IO_PMCTRL_OFFSET) & | 305 | OMAP4_PRM_IO_PMCTRL_OFFSET) & |
| 287 | OMAP4430_WUCLK_STATUS_MASK) >> | 306 | OMAP4430_WUCLK_STATUS_MASK) >> |
| 288 | OMAP4430_WUCLK_STATUS_SHIFT) == 1), | 307 | OMAP4430_WUCLK_STATUS_SHIFT) == 1), |
| @@ -292,10 +311,10 @@ void omap44xx_prm_reconfigure_io_chain(void) | |||
| 292 | 311 | ||
| 293 | /* Trigger WUCLKIN disable */ | 312 | /* Trigger WUCLKIN disable */ |
| 294 | omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0, | 313 | omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0, |
| 295 | OMAP4430_PRM_DEVICE_INST, | 314 | inst, |
| 296 | OMAP4_PRM_IO_PMCTRL_OFFSET); | 315 | OMAP4_PRM_IO_PMCTRL_OFFSET); |
| 297 | omap_test_timeout( | 316 | omap_test_timeout( |
| 298 | (((omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, | 317 | (((omap4_prm_read_inst_reg(inst, |
| 299 | OMAP4_PRM_IO_PMCTRL_OFFSET) & | 318 | OMAP4_PRM_IO_PMCTRL_OFFSET) & |
| 300 | OMAP4430_WUCLK_STATUS_MASK) >> | 319 | OMAP4430_WUCLK_STATUS_MASK) >> |
| 301 | OMAP4430_WUCLK_STATUS_SHIFT) == 0), | 320 | OMAP4430_WUCLK_STATUS_SHIFT) == 0), |
| @@ -316,9 +335,14 @@ void omap44xx_prm_reconfigure_io_chain(void) | |||
| 316 | */ | 335 | */ |
| 317 | static void __init omap44xx_prm_enable_io_wakeup(void) | 336 | static void __init omap44xx_prm_enable_io_wakeup(void) |
| 318 | { | 337 | { |
| 338 | s32 inst = omap4_prmst_get_prm_dev_inst(); | ||
| 339 | |||
| 340 | if (inst == PRM_INSTANCE_UNKNOWN) | ||
| 341 | return; | ||
| 342 | |||
| 319 | omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK, | 343 | omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK, |
| 320 | OMAP4430_GLOBAL_WUEN_MASK, | 344 | OMAP4430_GLOBAL_WUEN_MASK, |
| 321 | OMAP4430_PRM_DEVICE_INST, | 345 | inst, |
| 322 | OMAP4_PRM_IO_PMCTRL_OFFSET); | 346 | OMAP4_PRM_IO_PMCTRL_OFFSET); |
| 323 | } | 347 | } |
| 324 | 348 | ||
| @@ -333,8 +357,13 @@ static u32 omap44xx_prm_read_reset_sources(void) | |||
| 333 | struct prm_reset_src_map *p; | 357 | struct prm_reset_src_map *p; |
| 334 | u32 r = 0; | 358 | u32 r = 0; |
| 335 | u32 v; | 359 | u32 v; |
| 360 | s32 inst = omap4_prmst_get_prm_dev_inst(); | ||
| 336 | 361 | ||
| 337 | v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, | 362 | if (inst == PRM_INSTANCE_UNKNOWN) |
| 363 | return 0; | ||
| 364 | |||
| 365 | |||
| 366 | v = omap4_prm_read_inst_reg(inst, | ||
| 338 | OMAP4_RM_RSTST); | 367 | OMAP4_RM_RSTST); |
| 339 | 368 | ||
| 340 | p = omap44xx_prm_reset_src_map; | 369 | p = omap44xx_prm_reset_src_map; |
| @@ -664,17 +693,56 @@ static struct prm_ll_data omap44xx_prm_ll_data = { | |||
| 664 | 693 | ||
| 665 | int __init omap44xx_prm_init(void) | 694 | int __init omap44xx_prm_init(void) |
| 666 | { | 695 | { |
| 667 | if (cpu_is_omap44xx()) | 696 | if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) |
| 668 | prm_features |= PRM_HAS_IO_WAKEUP; | 697 | prm_features |= PRM_HAS_IO_WAKEUP; |
| 669 | 698 | ||
| 670 | return prm_register(&omap44xx_prm_ll_data); | 699 | return prm_register(&omap44xx_prm_ll_data); |
| 671 | } | 700 | } |
| 672 | 701 | ||
| 702 | static struct of_device_id omap_prm_dt_match_table[] = { | ||
| 703 | { .compatible = "ti,omap4-prm" }, | ||
| 704 | { .compatible = "ti,omap5-prm" }, | ||
| 705 | { .compatible = "ti,dra7-prm" }, | ||
| 706 | { } | ||
| 707 | }; | ||
| 708 | |||
| 673 | static int omap44xx_prm_late_init(void) | 709 | static int omap44xx_prm_late_init(void) |
| 674 | { | 710 | { |
| 711 | struct device_node *np; | ||
| 712 | int irq_num; | ||
| 713 | |||
| 675 | if (!(prm_features & PRM_HAS_IO_WAKEUP)) | 714 | if (!(prm_features & PRM_HAS_IO_WAKEUP)) |
| 676 | return 0; | 715 | return 0; |
| 677 | 716 | ||
| 717 | /* OMAP4+ is DT only now */ | ||
| 718 | if (!of_have_populated_dt()) | ||
| 719 | return 0; | ||
| 720 | |||
| 721 | np = of_find_matching_node(NULL, omap_prm_dt_match_table); | ||
| 722 | |||
| 723 | if (!np) { | ||
| 724 | /* Default loaded up with OMAP4 values */ | ||
| 725 | if (!cpu_is_omap44xx()) | ||
| 726 | return 0; | ||
| 727 | } else { | ||
| 728 | irq_num = of_irq_get(np, 0); | ||
| 729 | /* | ||
| 730 | * Already have OMAP4 IRQ num. For all other platforms, we need | ||
| 731 | * IRQ numbers from DT | ||
| 732 | */ | ||
| 733 | if (irq_num < 0 && !cpu_is_omap44xx()) { | ||
| 734 | if (irq_num == -EPROBE_DEFER) | ||
| 735 | return irq_num; | ||
| 736 | |||
| 737 | /* Have nothing to do */ | ||
| 738 | return 0; | ||
| 739 | } | ||
| 740 | |||
| 741 | /* Once OMAP4 DT is filled as well */ | ||
| 742 | if (irq_num >= 0) | ||
| 743 | omap4_prcm_irq_setup.irq = irq_num; | ||
| 744 | } | ||
| 745 | |||
| 678 | omap44xx_prm_enable_io_wakeup(); | 746 | omap44xx_prm_enable_io_wakeup(); |
| 679 | 747 | ||
| 680 | return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup); | 748 | return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup); |
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c index 69f0dd08629c..225e0258d76d 100644 --- a/arch/arm/mach-omap2/prminst44xx.c +++ b/arch/arm/mach-omap2/prminst44xx.c | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | 31 | ||
| 32 | static void __iomem *_prm_bases[OMAP4_MAX_PRCM_PARTITIONS]; | 32 | static void __iomem *_prm_bases[OMAP4_MAX_PRCM_PARTITIONS]; |
| 33 | 33 | ||
| 34 | static s32 prm_dev_inst = PRM_INSTANCE_UNKNOWN; | ||
| 35 | |||
| 34 | /** | 36 | /** |
| 35 | * omap_prm_base_init - Populates the prm partitions | 37 | * omap_prm_base_init - Populates the prm partitions |
| 36 | * | 38 | * |
| @@ -43,6 +45,24 @@ void omap_prm_base_init(void) | |||
| 43 | _prm_bases[OMAP4430_PRCM_MPU_PARTITION] = prcm_mpu_base; | 45 | _prm_bases[OMAP4430_PRCM_MPU_PARTITION] = prcm_mpu_base; |
| 44 | } | 46 | } |
| 45 | 47 | ||
| 48 | s32 omap4_prmst_get_prm_dev_inst(void) | ||
| 49 | { | ||
| 50 | if (prm_dev_inst != PRM_INSTANCE_UNKNOWN) | ||
| 51 | return prm_dev_inst; | ||
| 52 | |||
| 53 | /* This cannot be done way early at boot.. as things are not setup */ | ||
| 54 | if (cpu_is_omap44xx()) | ||
| 55 | prm_dev_inst = OMAP4430_PRM_DEVICE_INST; | ||
| 56 | else if (soc_is_omap54xx()) | ||
| 57 | prm_dev_inst = OMAP54XX_PRM_DEVICE_INST; | ||
| 58 | else if (soc_is_dra7xx()) | ||
| 59 | prm_dev_inst = DRA7XX_PRM_DEVICE_INST; | ||
| 60 | else if (soc_is_am43xx()) | ||
| 61 | prm_dev_inst = AM43XX_PRM_DEVICE_INST; | ||
| 62 | |||
| 63 | return prm_dev_inst; | ||
| 64 | } | ||
| 65 | |||
| 46 | /* Read a register in a PRM instance */ | 66 | /* Read a register in a PRM instance */ |
| 47 | u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx) | 67 | u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx) |
| 48 | { | 68 | { |
| @@ -169,28 +189,18 @@ int omap4_prminst_deassert_hardreset(u8 shift, u8 part, s16 inst, | |||
| 169 | void omap4_prminst_global_warm_sw_reset(void) | 189 | void omap4_prminst_global_warm_sw_reset(void) |
| 170 | { | 190 | { |
| 171 | u32 v; | 191 | u32 v; |
| 172 | s16 dev_inst; | 192 | s32 inst = omap4_prmst_get_prm_dev_inst(); |
| 173 | 193 | ||
| 174 | if (cpu_is_omap44xx()) | 194 | if (inst == PRM_INSTANCE_UNKNOWN) |
| 175 | dev_inst = OMAP4430_PRM_DEVICE_INST; | ||
| 176 | else if (soc_is_omap54xx()) | ||
| 177 | dev_inst = OMAP54XX_PRM_DEVICE_INST; | ||
| 178 | else if (soc_is_dra7xx()) | ||
| 179 | dev_inst = DRA7XX_PRM_DEVICE_INST; | ||
| 180 | else if (soc_is_am43xx()) | ||
| 181 | dev_inst = AM43XX_PRM_DEVICE_INST; | ||
| 182 | else | ||
| 183 | return; | 195 | return; |
| 184 | 196 | ||
| 185 | v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, dev_inst, | 197 | v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, inst, |
| 186 | OMAP4_PRM_RSTCTRL_OFFSET); | 198 | OMAP4_PRM_RSTCTRL_OFFSET); |
| 187 | v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK; | 199 | v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK; |
| 188 | omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION, | 200 | omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION, |
| 189 | dev_inst, | 201 | inst, OMAP4_PRM_RSTCTRL_OFFSET); |
| 190 | OMAP4_PRM_RSTCTRL_OFFSET); | ||
| 191 | 202 | ||
| 192 | /* OCP barrier */ | 203 | /* OCP barrier */ |
| 193 | v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, | 204 | v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, |
| 194 | dev_inst, | 205 | inst, OMAP4_PRM_RSTCTRL_OFFSET); |
| 195 | OMAP4_PRM_RSTCTRL_OFFSET); | ||
| 196 | } | 206 | } |
diff --git a/arch/arm/mach-omap2/prminst44xx.h b/arch/arm/mach-omap2/prminst44xx.h index a2ede2d65481..583aa3774571 100644 --- a/arch/arm/mach-omap2/prminst44xx.h +++ b/arch/arm/mach-omap2/prminst44xx.h | |||
| @@ -12,6 +12,9 @@ | |||
| 12 | #ifndef __ARCH_ASM_MACH_OMAP2_PRMINST44XX_H | 12 | #ifndef __ARCH_ASM_MACH_OMAP2_PRMINST44XX_H |
| 13 | #define __ARCH_ASM_MACH_OMAP2_PRMINST44XX_H | 13 | #define __ARCH_ASM_MACH_OMAP2_PRMINST44XX_H |
| 14 | 14 | ||
| 15 | #define PRM_INSTANCE_UNKNOWN -1 | ||
| 16 | extern s32 omap4_prmst_get_prm_dev_inst(void); | ||
| 17 | |||
| 15 | /* | 18 | /* |
| 16 | * In an ideal world, we would not export these low-level functions, | 19 | * In an ideal world, we would not export these low-level functions, |
| 17 | * but this will probably take some time to fix properly | 20 | * but this will probably take some time to fix properly |
diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c index ddf1818af228..cd488b80ba36 100644 --- a/arch/arm/mach-omap2/sram.c +++ b/arch/arm/mach-omap2/sram.c | |||
| @@ -32,12 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) | 33 | #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) |
| 34 | #define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000) | 34 | #define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000) |
| 35 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
| 36 | #define OMAP4_SRAM_PUB_PA OMAP4_SRAM_PA | ||
| 37 | #else | ||
| 38 | #define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) | ||
| 39 | #endif | ||
| 40 | #define OMAP5_SRAM_PA 0x40300000 | ||
| 41 | 35 | ||
| 42 | #define SRAM_BOOTLOADER_SZ 0x00 | 36 | #define SRAM_BOOTLOADER_SZ 0x00 |
| 43 | 37 | ||
| @@ -105,32 +99,14 @@ static void __init omap_detect_sram(void) | |||
| 105 | } else { | 99 | } else { |
| 106 | omap_sram_size = 0x8000; /* 32K */ | 100 | omap_sram_size = 0x8000; /* 32K */ |
| 107 | } | 101 | } |
| 108 | } else if (cpu_is_omap44xx()) { | ||
| 109 | omap_sram_start = OMAP4_SRAM_PUB_PA; | ||
| 110 | omap_sram_size = 0xa000; /* 40K */ | ||
| 111 | } else if (soc_is_omap54xx()) { | ||
| 112 | omap_sram_start = OMAP5_SRAM_PA; | ||
| 113 | omap_sram_size = SZ_128K; /* 128KB */ | ||
| 114 | } else { | 102 | } else { |
| 115 | omap_sram_start = OMAP2_SRAM_PUB_PA; | 103 | omap_sram_start = OMAP2_SRAM_PUB_PA; |
| 116 | omap_sram_size = 0x800; /* 2K */ | 104 | omap_sram_size = 0x800; /* 2K */ |
| 117 | } | 105 | } |
| 118 | } else { | 106 | } else { |
| 119 | if (soc_is_am33xx()) { | 107 | if (cpu_is_omap34xx()) { |
| 120 | omap_sram_start = AM33XX_SRAM_PA; | ||
| 121 | omap_sram_size = 0x10000; /* 64K */ | ||
| 122 | } else if (soc_is_am43xx()) { | ||
| 123 | omap_sram_start = AM33XX_SRAM_PA; | ||
| 124 | omap_sram_size = SZ_256K; | ||
| 125 | } else if (cpu_is_omap34xx()) { | ||
| 126 | omap_sram_start = OMAP3_SRAM_PA; | 108 | omap_sram_start = OMAP3_SRAM_PA; |
| 127 | omap_sram_size = 0x10000; /* 64K */ | 109 | omap_sram_size = 0x10000; /* 64K */ |
| 128 | } else if (cpu_is_omap44xx()) { | ||
| 129 | omap_sram_start = OMAP4_SRAM_PA; | ||
| 130 | omap_sram_size = 0xe000; /* 56K */ | ||
| 131 | } else if (soc_is_omap54xx()) { | ||
| 132 | omap_sram_start = OMAP5_SRAM_PA; | ||
| 133 | omap_sram_size = SZ_128K; /* 128KB */ | ||
| 134 | } else { | 110 | } else { |
| 135 | omap_sram_start = OMAP2_SRAM_PA; | 111 | omap_sram_start = OMAP2_SRAM_PA; |
| 136 | if (cpu_is_omap242x()) | 112 | if (cpu_is_omap242x()) |
| @@ -148,12 +124,6 @@ static void __init omap2_map_sram(void) | |||
| 148 | { | 124 | { |
| 149 | int cached = 1; | 125 | int cached = 1; |
| 150 | 126 | ||
| 151 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
| 152 | if (cpu_is_omap44xx()) { | ||
| 153 | omap_sram_start += PAGE_SIZE; | ||
| 154 | omap_sram_size -= SZ_16K; | ||
| 155 | } | ||
| 156 | #endif | ||
| 157 | if (cpu_is_omap34xx()) { | 127 | if (cpu_is_omap34xx()) { |
| 158 | /* | 128 | /* |
| 159 | * SRAM must be marked as non-cached on OMAP3 since the | 129 | * SRAM must be marked as non-cached on OMAP3 since the |
| @@ -285,11 +255,6 @@ static inline int omap34xx_sram_init(void) | |||
| 285 | } | 255 | } |
| 286 | #endif /* CONFIG_ARCH_OMAP3 */ | 256 | #endif /* CONFIG_ARCH_OMAP3 */ |
| 287 | 257 | ||
| 288 | static inline int am33xx_sram_init(void) | ||
| 289 | { | ||
| 290 | return 0; | ||
| 291 | } | ||
| 292 | |||
| 293 | int __init omap_sram_init(void) | 258 | int __init omap_sram_init(void) |
| 294 | { | 259 | { |
| 295 | omap_detect_sram(); | 260 | omap_detect_sram(); |
| @@ -299,8 +264,6 @@ int __init omap_sram_init(void) | |||
| 299 | omap242x_sram_init(); | 264 | omap242x_sram_init(); |
| 300 | else if (cpu_is_omap2430()) | 265 | else if (cpu_is_omap2430()) |
| 301 | omap243x_sram_init(); | 266 | omap243x_sram_init(); |
| 302 | else if (soc_is_am33xx()) | ||
| 303 | am33xx_sram_init(); | ||
| 304 | else if (cpu_is_omap34xx()) | 267 | else if (cpu_is_omap34xx()) |
| 305 | omap34xx_sram_init(); | 268 | omap34xx_sram_init(); |
| 306 | 269 | ||
diff --git a/arch/arm/mach-omap2/sram.h b/arch/arm/mach-omap2/sram.h index ca7277c2a9ee..948d3edefc38 100644 --- a/arch/arm/mach-omap2/sram.h +++ b/arch/arm/mach-omap2/sram.h | |||
| @@ -74,10 +74,3 @@ static inline void omap_push_sram_idle(void) {} | |||
| 74 | */ | 74 | */ |
| 75 | #define OMAP2_SRAM_PA 0x40200000 | 75 | #define OMAP2_SRAM_PA 0x40200000 |
| 76 | #define OMAP3_SRAM_PA 0x40200000 | 76 | #define OMAP3_SRAM_PA 0x40200000 |
| 77 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
| 78 | #define OMAP4_SRAM_PA 0x40304000 | ||
| 79 | #define OMAP4_SRAM_VA 0xfe404000 | ||
| 80 | #else | ||
| 81 | #define OMAP4_SRAM_PA 0x40300000 | ||
| 82 | #endif | ||
| 83 | #define AM33XX_SRAM_PA 0x40300000 | ||
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 666094315ab1..ac7b3eabbd85 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
| @@ -1071,9 +1071,47 @@ static struct resource pxa3xx_resource_ssp4[] = { | |||
| 1071 | }, | 1071 | }, |
| 1072 | }; | 1072 | }; |
| 1073 | 1073 | ||
| 1074 | /* | ||
| 1075 | * PXA3xx SSP is basically equivalent to PXA27x. | ||
| 1076 | * However, we need to register the device by the correct name in order to | ||
| 1077 | * make the driver set the correct internal type, hence we provide specific | ||
| 1078 | * platform_devices for each of them. | ||
| 1079 | */ | ||
| 1080 | struct platform_device pxa3xx_device_ssp1 = { | ||
| 1081 | .name = "pxa3xx-ssp", | ||
| 1082 | .id = 0, | ||
| 1083 | .dev = { | ||
| 1084 | .dma_mask = &pxa27x_ssp1_dma_mask, | ||
| 1085 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 1086 | }, | ||
| 1087 | .resource = pxa27x_resource_ssp1, | ||
| 1088 | .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1), | ||
| 1089 | }; | ||
| 1090 | |||
| 1091 | struct platform_device pxa3xx_device_ssp2 = { | ||
| 1092 | .name = "pxa3xx-ssp", | ||
| 1093 | .id = 1, | ||
| 1094 | .dev = { | ||
| 1095 | .dma_mask = &pxa27x_ssp2_dma_mask, | ||
| 1096 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 1097 | }, | ||
| 1098 | .resource = pxa27x_resource_ssp2, | ||
| 1099 | .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2), | ||
| 1100 | }; | ||
| 1101 | |||
| 1102 | struct platform_device pxa3xx_device_ssp3 = { | ||
| 1103 | .name = "pxa3xx-ssp", | ||
| 1104 | .id = 2, | ||
| 1105 | .dev = { | ||
| 1106 | .dma_mask = &pxa27x_ssp3_dma_mask, | ||
| 1107 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 1108 | }, | ||
| 1109 | .resource = pxa27x_resource_ssp3, | ||
| 1110 | .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), | ||
| 1111 | }; | ||
| 1112 | |||
| 1074 | struct platform_device pxa3xx_device_ssp4 = { | 1113 | struct platform_device pxa3xx_device_ssp4 = { |
| 1075 | /* PXA3xx SSP is basically equivalent to PXA27x */ | 1114 | .name = "pxa3xx-ssp", |
| 1076 | .name = "pxa27x-ssp", | ||
| 1077 | .id = 3, | 1115 | .id = 3, |
| 1078 | .dev = { | 1116 | .dev = { |
| 1079 | .dma_mask = &pxa3xx_ssp4_dma_mask, | 1117 | .dma_mask = &pxa3xx_ssp4_dma_mask, |
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index 0f3fd0d65b12..4a13c32fb705 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h | |||
| @@ -27,6 +27,9 @@ extern struct platform_device pxa25x_device_assp; | |||
| 27 | extern struct platform_device pxa27x_device_ssp1; | 27 | extern struct platform_device pxa27x_device_ssp1; |
| 28 | extern struct platform_device pxa27x_device_ssp2; | 28 | extern struct platform_device pxa27x_device_ssp2; |
| 29 | extern struct platform_device pxa27x_device_ssp3; | 29 | extern struct platform_device pxa27x_device_ssp3; |
| 30 | extern struct platform_device pxa3xx_device_ssp1; | ||
| 31 | extern struct platform_device pxa3xx_device_ssp2; | ||
| 32 | extern struct platform_device pxa3xx_device_ssp3; | ||
| 30 | extern struct platform_device pxa3xx_device_ssp4; | 33 | extern struct platform_device pxa3xx_device_ssp4; |
| 31 | 34 | ||
| 32 | extern struct platform_device pxa25x_device_pwm0; | 35 | extern struct platform_device pxa25x_device_pwm0; |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 593ccd35ca97..edcbd9c0bcb2 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -84,10 +84,10 @@ static struct clk_lookup pxa3xx_clkregs[] = { | |||
| 84 | INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL), | 84 | INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL), |
| 85 | INIT_CLKREG(&clk_pxa3xx_u2d, "pxa3xx-u2d", NULL), | 85 | INIT_CLKREG(&clk_pxa3xx_u2d, "pxa3xx-u2d", NULL), |
| 86 | INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL), | 86 | INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL), |
| 87 | INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa27x-ssp.0", NULL), | 87 | INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa3xx-ssp.0", NULL), |
| 88 | INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa27x-ssp.1", NULL), | 88 | INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa3xx-ssp.1", NULL), |
| 89 | INIT_CLKREG(&clk_pxa3xx_ssp3, "pxa27x-ssp.2", NULL), | 89 | INIT_CLKREG(&clk_pxa3xx_ssp3, "pxa3xx-ssp.2", NULL), |
| 90 | INIT_CLKREG(&clk_pxa3xx_ssp4, "pxa27x-ssp.3", NULL), | 90 | INIT_CLKREG(&clk_pxa3xx_ssp4, "pxa3xx-ssp.3", NULL), |
| 91 | INIT_CLKREG(&clk_pxa3xx_pwm0, "pxa27x-pwm.0", NULL), | 91 | INIT_CLKREG(&clk_pxa3xx_pwm0, "pxa27x-pwm.0", NULL), |
| 92 | INIT_CLKREG(&clk_pxa3xx_pwm1, "pxa27x-pwm.1", NULL), | 92 | INIT_CLKREG(&clk_pxa3xx_pwm1, "pxa27x-pwm.1", NULL), |
| 93 | INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL), | 93 | INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL), |
| @@ -452,9 +452,9 @@ static struct platform_device *devices[] __initdata = { | |||
| 452 | &pxa_device_asoc_platform, | 452 | &pxa_device_asoc_platform, |
| 453 | &sa1100_device_rtc, | 453 | &sa1100_device_rtc, |
| 454 | &pxa_device_rtc, | 454 | &pxa_device_rtc, |
| 455 | &pxa27x_device_ssp1, | 455 | &pxa3xx_device_ssp1, |
| 456 | &pxa27x_device_ssp2, | 456 | &pxa3xx_device_ssp2, |
| 457 | &pxa27x_device_ssp3, | 457 | &pxa3xx_device_ssp3, |
| 458 | &pxa3xx_device_ssp4, | 458 | &pxa3xx_device_ssp4, |
| 459 | &pxa27x_device_pwm0, | 459 | &pxa27x_device_pwm0, |
| 460 | &pxa27x_device_pwm1, | 460 | &pxa27x_device_pwm1, |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index efc49dabbf2f..21f457b56c01 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
| @@ -50,6 +50,11 @@ config ARCH_R7S72100 | |||
| 50 | bool "RZ/A1H (R7S72100)" | 50 | bool "RZ/A1H (R7S72100)" |
| 51 | select SYS_SUPPORTS_SH_MTU2 | 51 | select SYS_SUPPORTS_SH_MTU2 |
| 52 | 52 | ||
| 53 | config ARCH_R8A7740 | ||
| 54 | bool "R-Mobile A1 (R8A77400)" | ||
| 55 | select ARCH_RMOBILE | ||
| 56 | select RENESAS_INTC_IRQPIN | ||
| 57 | |||
| 53 | config ARCH_R8A7779 | 58 | config ARCH_R8A7779 |
| 54 | bool "R-Car H1 (R8A77790)" | 59 | bool "R-Car H1 (R8A77790)" |
| 55 | select ARCH_RCAR_GEN1 | 60 | select ARCH_RCAR_GEN1 |
| @@ -62,11 +67,11 @@ config ARCH_R8A7791 | |||
| 62 | bool "R-Car M2-W (R8A77910)" | 67 | bool "R-Car M2-W (R8A77910)" |
| 63 | select ARCH_RCAR_GEN2 | 68 | select ARCH_RCAR_GEN2 |
| 64 | 69 | ||
| 65 | comment "Renesas ARM SoCs Board Type" | 70 | config ARCH_R8A7794 |
| 71 | bool "R-Car E2 (R8A77940)" | ||
| 72 | select ARCH_RCAR_GEN2 | ||
| 66 | 73 | ||
| 67 | config MACH_GENMAI | 74 | comment "Renesas ARM SoCs Board Type" |
| 68 | bool "Genmai board" | ||
| 69 | depends on ARCH_R7S72100 | ||
| 70 | 75 | ||
| 71 | config MACH_KOELSCH | 76 | config MACH_KOELSCH |
| 72 | bool "Koelsch board" | 77 | bool "Koelsch board" |
| @@ -148,14 +153,6 @@ config ARCH_R8A7791 | |||
| 148 | select MIGHT_HAVE_PCI | 153 | select MIGHT_HAVE_PCI |
| 149 | select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE | 154 | select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE |
| 150 | 155 | ||
| 151 | config ARCH_R7S72100 | ||
| 152 | bool "RZ/A1H (R7S72100)" | ||
| 153 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
| 154 | select ARM_GIC | ||
| 155 | select CPU_V7 | ||
| 156 | select SH_CLK_CPG | ||
| 157 | select SYS_SUPPORTS_SH_MTU2 | ||
| 158 | |||
| 159 | comment "Renesas ARM SoCs Board Type" | 156 | comment "Renesas ARM SoCs Board Type" |
| 160 | 157 | ||
| 161 | config MACH_APE6EVM | 158 | config MACH_APE6EVM |
| @@ -194,21 +191,6 @@ config MACH_ARMADILLO800EVA | |||
| 194 | select SND_SOC_WM8978 if SND_SIMPLE_CARD | 191 | select SND_SOC_WM8978 if SND_SIMPLE_CARD |
| 195 | select USE_OF | 192 | select USE_OF |
| 196 | 193 | ||
| 197 | config MACH_ARMADILLO800EVA_REFERENCE | ||
| 198 | bool "Armadillo-800 EVA board - Reference Device Tree Implementation" | ||
| 199 | depends on ARCH_R8A7740 | ||
| 200 | select ARCH_REQUIRE_GPIOLIB | ||
| 201 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
| 202 | select SMSC_PHY if SH_ETH | ||
| 203 | select SND_SOC_WM8978 if SND_SIMPLE_CARD | ||
| 204 | select USE_OF | ||
| 205 | ---help--- | ||
| 206 | Use reference implementation of Armadillo800 EVA board support | ||
| 207 | which makes greater use of device tree at the expense | ||
| 208 | of not supporting a number of devices. | ||
| 209 | |||
| 210 | This is intended to aid developers | ||
| 211 | |||
| 212 | config MACH_BOCKW | 194 | config MACH_BOCKW |
| 213 | bool "BOCK-W platform" | 195 | bool "BOCK-W platform" |
| 214 | depends on ARCH_R8A7778 | 196 | depends on ARCH_R8A7778 |
| @@ -231,11 +213,6 @@ config MACH_BOCKW_REFERENCE | |||
| 231 | 213 | ||
| 232 | This is intended to aid developers | 214 | This is intended to aid developers |
| 233 | 215 | ||
| 234 | config MACH_GENMAI | ||
| 235 | bool "Genmai board" | ||
| 236 | depends on ARCH_R7S72100 | ||
| 237 | select USE_OF | ||
| 238 | |||
| 239 | config MACH_MARZEN | 216 | config MACH_MARZEN |
| 240 | bool "MARZEN board" | 217 | bool "MARZEN board" |
| 241 | depends on ARCH_R8A7779 | 218 | depends on ARCH_R8A7779 |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 7b259ce60beb..e20f2786ec72 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
| @@ -2,8 +2,6 @@ | |||
| 2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/include | ||
| 6 | |||
| 7 | # Common objects | 5 | # Common objects |
| 8 | obj-y := timer.o console.o | 6 | obj-y := timer.o console.o |
| 9 | 7 | ||
| @@ -16,6 +14,7 @@ obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o | |||
| 16 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o | 14 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o |
| 17 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o | 15 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o |
| 18 | obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o pm-r8a7791.o | 16 | obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o pm-r8a7791.o |
| 17 | obj-$(CONFIG_ARCH_R8A7794) += setup-r8a7794.o | ||
| 19 | obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o | 18 | obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o |
| 20 | obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o | 19 | obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o |
| 21 | 20 | ||
| @@ -30,7 +29,6 @@ obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o | |||
| 30 | obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o | 29 | obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o |
| 31 | obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o | 30 | obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o |
| 32 | obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o | 31 | obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o |
| 33 | obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o | ||
| 34 | endif | 32 | endif |
| 35 | 33 | ||
| 36 | # CPU reset vector handling objects | 34 | # CPU reset vector handling objects |
| @@ -59,7 +57,6 @@ obj-$(CONFIG_ARCH_SH7372) += entry-intc.o sleep-sh7372.o | |||
| 59 | 57 | ||
| 60 | # Board objects | 58 | # Board objects |
| 61 | ifdef CONFIG_ARCH_SHMOBILE_MULTI | 59 | ifdef CONFIG_ARCH_SHMOBILE_MULTI |
| 62 | obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o | ||
| 63 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o | 60 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o |
| 64 | obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o | 61 | obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o |
| 65 | obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o | 62 | obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o |
| @@ -69,11 +66,9 @@ obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o | |||
| 69 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o | 66 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o |
| 70 | obj-$(CONFIG_MACH_BOCKW) += board-bockw.o | 67 | obj-$(CONFIG_MACH_BOCKW) += board-bockw.o |
| 71 | obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o | 68 | obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o |
| 72 | obj-$(CONFIG_MACH_GENMAI) += board-genmai.o | ||
| 73 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o | 69 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o |
| 74 | obj-$(CONFIG_MACH_LAGER) += board-lager.o | 70 | obj-$(CONFIG_MACH_LAGER) += board-lager.o |
| 75 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 71 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
| 76 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | ||
| 77 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o | 72 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o |
| 78 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o | 73 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o |
| 79 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o | 74 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index ebf97d4bcfd8..de9a23852fc8 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
| @@ -3,10 +3,8 @@ loadaddr-y := | |||
| 3 | loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 | 3 | loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 |
| 4 | loadaddr-$(CONFIG_MACH_APE6EVM_REFERENCE) += 0x40008000 | 4 | loadaddr-$(CONFIG_MACH_APE6EVM_REFERENCE) += 0x40008000 |
| 5 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 | 5 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 |
| 6 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 | ||
| 7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 | 6 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 |
| 8 | loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 | 7 | loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 |
| 9 | loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000 | ||
| 10 | loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 | 8 | loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 |
| 11 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 | 9 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 |
| 12 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | 10 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 |
diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c index 2f7723e5fe91..a6503d8c77de 100644 --- a/arch/arm/mach-shmobile/board-ape6evm-reference.c +++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c | |||
| @@ -50,7 +50,6 @@ static void __init ape6evm_add_standard_devices(void) | |||
| 50 | 50 | ||
| 51 | r8a73a4_add_dt_devices(); | 51 | r8a73a4_add_dt_devices(); |
| 52 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 52 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 53 | platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); | ||
| 54 | } | 53 | } |
| 55 | 54 | ||
| 56 | static const char *ape6evm_boards_compat_dt[] __initdata = { | 55 | static const char *ape6evm_boards_compat_dt[] __initdata = { |
| @@ -59,7 +58,8 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { | |||
| 59 | }; | 58 | }; |
| 60 | 59 | ||
| 61 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") | 60 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") |
| 62 | .init_early = r8a73a4_init_early, | 61 | .init_early = shmobile_init_delay, |
| 63 | .init_machine = ape6evm_add_standard_devices, | 62 | .init_machine = ape6evm_add_standard_devices, |
| 63 | .init_late = shmobile_init_late, | ||
| 64 | .dt_compat = ape6evm_boards_compat_dt, | 64 | .dt_compat = ape6evm_boards_compat_dt, |
| 65 | MACHINE_END | 65 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 1585b8830b13..b222f68d55b7 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
| @@ -283,7 +283,8 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { | |||
| 283 | }; | 283 | }; |
| 284 | 284 | ||
| 285 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") | 285 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") |
| 286 | .init_early = r8a73a4_init_early, | 286 | .init_early = shmobile_init_delay, |
| 287 | .init_machine = ape6evm_add_standard_devices, | 287 | .init_machine = ape6evm_add_standard_devices, |
| 288 | .init_late = shmobile_init_late, | ||
| 288 | .dt_compat = ape6evm_boards_compat_dt, | 289 | .dt_compat = ape6evm_boards_compat_dt, |
| 289 | MACHINE_END | 290 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c deleted file mode 100644 index 84bc6cb6d5aa..000000000000 --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c +++ /dev/null | |||
| @@ -1,198 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * armadillo 800 eva board support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
| 5 | * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 as published by | ||
| 9 | * the Free Software Foundation; version 2 of the License. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/clk.h> | ||
| 23 | #include <linux/err.h> | ||
| 24 | #include <linux/kernel.h> | ||
| 25 | #include <linux/gpio.h> | ||
| 26 | #include <linux/io.h> | ||
| 27 | |||
| 28 | #include <asm/mach/arch.h> | ||
| 29 | #include <asm/hardware/cache-l2x0.h> | ||
| 30 | |||
| 31 | #include "common.h" | ||
| 32 | #include "r8a7740.h" | ||
| 33 | |||
| 34 | /* | ||
| 35 | * CON1 Camera Module | ||
| 36 | * CON2 Extension Bus | ||
| 37 | * CON3 HDMI Output | ||
| 38 | * CON4 Composite Video Output | ||
| 39 | * CON5 H-UDI JTAG | ||
| 40 | * CON6 ARM JTAG | ||
| 41 | * CON7 SD1 | ||
| 42 | * CON8 SD2 | ||
| 43 | * CON9 RTC BackUp | ||
| 44 | * CON10 Monaural Mic Input | ||
| 45 | * CON11 Stereo Headphone Output | ||
| 46 | * CON12 Audio Line Output(L) | ||
| 47 | * CON13 Audio Line Output(R) | ||
| 48 | * CON14 AWL13 Module | ||
| 49 | * CON15 Extension | ||
| 50 | * CON16 LCD1 | ||
| 51 | * CON17 LCD2 | ||
| 52 | * CON19 Power Input | ||
| 53 | * CON20 USB1 | ||
| 54 | * CON21 USB2 | ||
| 55 | * CON22 Serial | ||
| 56 | * CON23 LAN | ||
| 57 | * CON24 USB3 | ||
| 58 | * LED1 Camera LED (Yellow) | ||
| 59 | * LED2 Power LED (Green) | ||
| 60 | * LED3-LED6 User LED (Yellow) | ||
| 61 | * LED7 LAN link LED (Green) | ||
| 62 | * LED8 LAN activity LED (Yellow) | ||
| 63 | */ | ||
| 64 | |||
| 65 | /* | ||
| 66 | * DipSwitch | ||
| 67 | * | ||
| 68 | * SW1 | ||
| 69 | * | ||
| 70 | * -12345678-+---------------+---------------------------- | ||
| 71 | * 1 | boot | hermit | ||
| 72 | * 0 | boot | OS auto boot | ||
| 73 | * -12345678-+---------------+---------------------------- | ||
| 74 | * 00 | boot device | eMMC | ||
| 75 | * 10 | boot device | SDHI0 (CON7) | ||
| 76 | * 01 | boot device | - | ||
| 77 | * 11 | boot device | Extension Buss (CS0) | ||
| 78 | * -12345678-+---------------+---------------------------- | ||
| 79 | * 0 | Extension Bus | D8-D15 disable, eMMC enable | ||
| 80 | * 1 | Extension Bus | D8-D15 enable, eMMC disable | ||
| 81 | * -12345678-+---------------+---------------------------- | ||
| 82 | * 0 | SDHI1 | COM8 disable, COM14 enable | ||
| 83 | * 1 | SDHI1 | COM8 enable, COM14 disable | ||
| 84 | * -12345678-+---------------+---------------------------- | ||
| 85 | * 0 | USB0 | COM20 enable, COM24 disable | ||
| 86 | * 1 | USB0 | COM20 disable, COM24 enable | ||
| 87 | * -12345678-+---------------+---------------------------- | ||
| 88 | * 00 | JTAG | SH-X2 | ||
| 89 | * 10 | JTAG | ARM | ||
| 90 | * 01 | JTAG | - | ||
| 91 | * 11 | JTAG | Boundary Scan | ||
| 92 | *-----------+---------------+---------------------------- | ||
| 93 | */ | ||
| 94 | |||
| 95 | /* | ||
| 96 | * FSI-WM8978 | ||
| 97 | * | ||
| 98 | * this command is required when playback. | ||
| 99 | * | ||
| 100 | * # amixer set "Headphone" 50 | ||
| 101 | * | ||
| 102 | * this command is required when capture. | ||
| 103 | * | ||
| 104 | * # amixer set "Input PGA" 15 | ||
| 105 | * # amixer set "Left Input Mixer MicP" on | ||
| 106 | * # amixer set "Left Input Mixer MicN" on | ||
| 107 | * # amixer set "Right Input Mixer MicN" on | ||
| 108 | * # amixer set "Right Input Mixer MicP" on | ||
| 109 | */ | ||
| 110 | |||
| 111 | /* | ||
| 112 | * USB function | ||
| 113 | * | ||
| 114 | * When you use USB Function, | ||
| 115 | * set SW1.6 ON, and connect cable to CN24. | ||
| 116 | * | ||
| 117 | * USBF needs workaround on R8A7740 chip. | ||
| 118 | * These are a little bit complex. | ||
| 119 | * see | ||
| 120 | * usbhsf_power_ctrl() | ||
| 121 | */ | ||
| 122 | |||
| 123 | static void __init eva_clock_init(void) | ||
| 124 | { | ||
| 125 | struct clk *system = clk_get(NULL, "system_clk"); | ||
| 126 | struct clk *xtal1 = clk_get(NULL, "extal1"); | ||
| 127 | struct clk *usb24s = clk_get(NULL, "usb24s"); | ||
| 128 | struct clk *fsibck = clk_get(NULL, "fsibck"); | ||
| 129 | |||
| 130 | if (IS_ERR(system) || | ||
| 131 | IS_ERR(xtal1) || | ||
| 132 | IS_ERR(usb24s) || | ||
| 133 | IS_ERR(fsibck)) { | ||
| 134 | pr_err("armadillo800eva board clock init failed\n"); | ||
| 135 | goto clock_error; | ||
| 136 | } | ||
| 137 | |||
| 138 | /* armadillo 800 eva extal1 is 24MHz */ | ||
| 139 | clk_set_rate(xtal1, 24000000); | ||
| 140 | |||
| 141 | /* usb24s use extal1 (= system) clock (= 24MHz) */ | ||
| 142 | clk_set_parent(usb24s, system); | ||
| 143 | |||
| 144 | /* FSIBCK is 12.288MHz, and it is parent of FSI-B */ | ||
| 145 | clk_set_rate(fsibck, 12288000); | ||
| 146 | |||
| 147 | clock_error: | ||
| 148 | if (!IS_ERR(system)) | ||
| 149 | clk_put(system); | ||
| 150 | if (!IS_ERR(xtal1)) | ||
| 151 | clk_put(xtal1); | ||
| 152 | if (!IS_ERR(usb24s)) | ||
| 153 | clk_put(usb24s); | ||
| 154 | if (!IS_ERR(fsibck)) | ||
| 155 | clk_put(fsibck); | ||
| 156 | } | ||
| 157 | |||
| 158 | /* | ||
| 159 | * board init | ||
| 160 | */ | ||
| 161 | static void __init eva_init(void) | ||
| 162 | { | ||
| 163 | r8a7740_clock_init(MD_CK0 | MD_CK2); | ||
| 164 | eva_clock_init(); | ||
| 165 | |||
| 166 | r8a7740_meram_workaround(); | ||
| 167 | |||
| 168 | #ifdef CONFIG_CACHE_L2X0 | ||
| 169 | /* Shared attribute override enable, 32K*8way */ | ||
| 170 | l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff); | ||
| 171 | #endif | ||
| 172 | |||
| 173 | r8a7740_add_standard_devices_dt(); | ||
| 174 | |||
| 175 | r8a7740_pm_init(); | ||
| 176 | } | ||
| 177 | |||
| 178 | #define RESCNT2 IOMEM(0xe6188020) | ||
| 179 | static void eva_restart(enum reboot_mode mode, const char *cmd) | ||
| 180 | { | ||
| 181 | /* Do soft power on reset */ | ||
| 182 | writel(1 << 31, RESCNT2); | ||
| 183 | } | ||
| 184 | |||
| 185 | static const char *eva_boards_compat_dt[] __initdata = { | ||
| 186 | "renesas,armadillo800eva-reference", | ||
| 187 | NULL, | ||
| 188 | }; | ||
| 189 | |||
| 190 | DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference") | ||
| 191 | .map_io = r8a7740_map_io, | ||
| 192 | .init_early = shmobile_init_delay, | ||
| 193 | .init_irq = r8a7740_init_irq_of, | ||
| 194 | .init_machine = eva_init, | ||
| 195 | .init_late = shmobile_init_late, | ||
| 196 | .dt_compat = eva_boards_compat_dt, | ||
| 197 | .restart = eva_restart, | ||
| 198 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index ba840cd333b9..79c47847f200 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c | |||
| @@ -80,8 +80,9 @@ static const char *bockw_boards_compat_dt[] __initdata = { | |||
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | DT_MACHINE_START(BOCKW_DT, "bockw") | 82 | DT_MACHINE_START(BOCKW_DT, "bockw") |
| 83 | .init_early = r8a7778_init_delay, | 83 | .init_early = shmobile_init_delay, |
| 84 | .init_irq = r8a7778_init_irq_dt, | 84 | .init_irq = r8a7778_init_irq_dt, |
| 85 | .init_machine = bockw_init, | 85 | .init_machine = bockw_init, |
| 86 | .init_late = shmobile_init_late, | ||
| 86 | .dt_compat = bockw_boards_compat_dt, | 87 | .dt_compat = bockw_boards_compat_dt, |
| 87 | MACHINE_END | 88 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 8a83eb39d3f1..1cf2c75dacfb 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
| @@ -733,7 +733,7 @@ static const char *bockw_boards_compat_dt[] __initdata = { | |||
| 733 | }; | 733 | }; |
| 734 | 734 | ||
| 735 | DT_MACHINE_START(BOCKW_DT, "bockw") | 735 | DT_MACHINE_START(BOCKW_DT, "bockw") |
| 736 | .init_early = r8a7778_init_delay, | 736 | .init_early = shmobile_init_delay, |
| 737 | .init_irq = r8a7778_init_irq_dt, | 737 | .init_irq = r8a7778_init_irq_dt, |
| 738 | .init_machine = bockw_init, | 738 | .init_machine = bockw_init, |
| 739 | .dt_compat = bockw_boards_compat_dt, | 739 | .dt_compat = bockw_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c deleted file mode 100644 index e5448f7b868a..000000000000 --- a/arch/arm/mach-shmobile/board-genmai-reference.c +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Genmai board support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
| 5 | * Copyright (C) 2013 Magnus Damm | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; version 2 of the License. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/kernel.h> | ||
| 22 | #include <linux/of_platform.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | |||
| 27 | #include "clock.h" | ||
| 28 | #include "common.h" | ||
| 29 | #include "r7s72100.h" | ||
| 30 | |||
| 31 | /* | ||
| 32 | * This is a really crude hack to provide clkdev support to platform | ||
| 33 | * devices until they get moved to DT. | ||
| 34 | */ | ||
| 35 | static const struct clk_name clk_names[] = { | ||
| 36 | { "mtu2", "fck", "sh-mtu2" }, | ||
| 37 | }; | ||
| 38 | |||
| 39 | static void __init genmai_add_standard_devices(void) | ||
| 40 | { | ||
| 41 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true); | ||
| 42 | r7s72100_add_dt_devices(); | ||
| 43 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
| 44 | } | ||
| 45 | |||
| 46 | static const char * const genmai_boards_compat_dt[] __initconst = { | ||
| 47 | "renesas,genmai", | ||
| 48 | NULL, | ||
| 49 | }; | ||
| 50 | |||
| 51 | DT_MACHINE_START(GENMAI_DT, "genmai") | ||
| 52 | .init_early = shmobile_init_delay, | ||
| 53 | .init_machine = genmai_add_standard_devices, | ||
| 54 | .dt_compat = genmai_boards_compat_dt, | ||
| 55 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c deleted file mode 100644 index 7bf2d8057535..000000000000 --- a/arch/arm/mach-shmobile/board-genmai.c +++ /dev/null | |||
| @@ -1,161 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Genmai board support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013-2014 Renesas Solutions Corp. | ||
| 5 | * Copyright (C) 2013 Magnus Damm | ||
| 6 | * Copyright (C) 2014 Cogent Embedded, Inc. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; version 2 of the License. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/kernel.h> | ||
| 23 | #include <linux/platform_device.h> | ||
| 24 | #include <linux/serial_sci.h> | ||
| 25 | #include <linux/sh_eth.h> | ||
| 26 | #include <linux/spi/rspi.h> | ||
| 27 | #include <linux/spi/spi.h> | ||
| 28 | |||
| 29 | #include <asm/mach-types.h> | ||
| 30 | #include <asm/mach/arch.h> | ||
| 31 | |||
| 32 | #include "common.h" | ||
| 33 | #include "irqs.h" | ||
| 34 | #include "r7s72100.h" | ||
| 35 | |||
| 36 | /* Ether */ | ||
| 37 | static const struct sh_eth_plat_data ether_pdata __initconst = { | ||
| 38 | .phy = 0x00, /* PD60610 */ | ||
| 39 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
| 40 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
| 41 | .no_ether_link = 1 | ||
| 42 | }; | ||
| 43 | |||
| 44 | static const struct resource ether_resources[] __initconst = { | ||
| 45 | DEFINE_RES_MEM(0xe8203000, 0x800), | ||
| 46 | DEFINE_RES_MEM(0xe8204800, 0x200), | ||
| 47 | DEFINE_RES_IRQ(gic_iid(359)), | ||
| 48 | }; | ||
| 49 | |||
| 50 | static const struct platform_device_info ether_info __initconst = { | ||
| 51 | .name = "r7s72100-ether", | ||
| 52 | .id = -1, | ||
| 53 | .res = ether_resources, | ||
| 54 | .num_res = ARRAY_SIZE(ether_resources), | ||
| 55 | .data = ðer_pdata, | ||
| 56 | .size_data = sizeof(ether_pdata), | ||
| 57 | .dma_mask = DMA_BIT_MASK(32), | ||
| 58 | }; | ||
| 59 | |||
| 60 | /* RSPI */ | ||
| 61 | #define RSPI_RESOURCE(idx, baseaddr, irq) \ | ||
| 62 | static const struct resource rspi##idx##_resources[] __initconst = { \ | ||
| 63 | DEFINE_RES_MEM(baseaddr, 0x24), \ | ||
| 64 | DEFINE_RES_IRQ_NAMED(irq, "error"), \ | ||
| 65 | DEFINE_RES_IRQ_NAMED(irq + 1, "rx"), \ | ||
| 66 | DEFINE_RES_IRQ_NAMED(irq + 2, "tx"), \ | ||
| 67 | } | ||
| 68 | |||
| 69 | RSPI_RESOURCE(0, 0xe800c800, gic_iid(270)); | ||
| 70 | RSPI_RESOURCE(1, 0xe800d000, gic_iid(273)); | ||
| 71 | RSPI_RESOURCE(2, 0xe800d800, gic_iid(276)); | ||
| 72 | RSPI_RESOURCE(3, 0xe800e000, gic_iid(279)); | ||
| 73 | RSPI_RESOURCE(4, 0xe800e800, gic_iid(282)); | ||
| 74 | |||
| 75 | static const struct rspi_plat_data rspi_pdata __initconst = { | ||
| 76 | .num_chipselect = 1, | ||
| 77 | }; | ||
| 78 | |||
| 79 | #define r7s72100_register_rspi(idx) \ | ||
| 80 | platform_device_register_resndata(NULL, "rspi-rz", idx, \ | ||
| 81 | rspi##idx##_resources, \ | ||
| 82 | ARRAY_SIZE(rspi##idx##_resources), \ | ||
| 83 | &rspi_pdata, sizeof(rspi_pdata)) | ||
| 84 | |||
| 85 | static const struct spi_board_info spi_info[] __initconst = { | ||
| 86 | { | ||
| 87 | .modalias = "wm8978", | ||
| 88 | .max_speed_hz = 5000000, | ||
| 89 | .bus_num = 4, | ||
| 90 | .chip_select = 0, | ||
| 91 | }, | ||
| 92 | }; | ||
| 93 | |||
| 94 | /* SCIF */ | ||
| 95 | #define R7S72100_SCIF(index, baseaddr, irq) \ | ||
| 96 | static const struct plat_sci_port scif##index##_platform_data = { \ | ||
| 97 | .type = PORT_SCIF, \ | ||
| 98 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \ | ||
| 99 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ | ||
| 100 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \ | ||
| 101 | SCSCR_REIE, \ | ||
| 102 | }; \ | ||
| 103 | \ | ||
| 104 | static struct resource scif##index##_resources[] = { \ | ||
| 105 | DEFINE_RES_MEM(baseaddr, 0x100), \ | ||
| 106 | DEFINE_RES_IRQ(irq + 1), \ | ||
| 107 | DEFINE_RES_IRQ(irq + 2), \ | ||
| 108 | DEFINE_RES_IRQ(irq + 3), \ | ||
| 109 | DEFINE_RES_IRQ(irq), \ | ||
| 110 | } \ | ||
| 111 | |||
| 112 | R7S72100_SCIF(0, 0xe8007000, gic_iid(221)); | ||
| 113 | R7S72100_SCIF(1, 0xe8007800, gic_iid(225)); | ||
| 114 | R7S72100_SCIF(2, 0xe8008000, gic_iid(229)); | ||
| 115 | R7S72100_SCIF(3, 0xe8008800, gic_iid(233)); | ||
| 116 | R7S72100_SCIF(4, 0xe8009000, gic_iid(237)); | ||
| 117 | R7S72100_SCIF(5, 0xe8009800, gic_iid(241)); | ||
| 118 | R7S72100_SCIF(6, 0xe800a000, gic_iid(245)); | ||
| 119 | R7S72100_SCIF(7, 0xe800a800, gic_iid(249)); | ||
| 120 | |||
| 121 | #define r7s72100_register_scif(index) \ | ||
| 122 | platform_device_register_resndata(NULL, "sh-sci", index, \ | ||
| 123 | scif##index##_resources, \ | ||
| 124 | ARRAY_SIZE(scif##index##_resources), \ | ||
| 125 | &scif##index##_platform_data, \ | ||
| 126 | sizeof(scif##index##_platform_data)) | ||
| 127 | |||
| 128 | static void __init genmai_add_standard_devices(void) | ||
| 129 | { | ||
| 130 | r7s72100_clock_init(); | ||
| 131 | r7s72100_add_dt_devices(); | ||
| 132 | |||
| 133 | platform_device_register_full(ðer_info); | ||
| 134 | |||
| 135 | r7s72100_register_rspi(0); | ||
| 136 | r7s72100_register_rspi(1); | ||
| 137 | r7s72100_register_rspi(2); | ||
| 138 | r7s72100_register_rspi(3); | ||
| 139 | r7s72100_register_rspi(4); | ||
| 140 | spi_register_board_info(spi_info, ARRAY_SIZE(spi_info)); | ||
| 141 | |||
| 142 | r7s72100_register_scif(0); | ||
| 143 | r7s72100_register_scif(1); | ||
| 144 | r7s72100_register_scif(2); | ||
| 145 | r7s72100_register_scif(3); | ||
| 146 | r7s72100_register_scif(4); | ||
| 147 | r7s72100_register_scif(5); | ||
| 148 | r7s72100_register_scif(6); | ||
| 149 | r7s72100_register_scif(7); | ||
| 150 | } | ||
| 151 | |||
| 152 | static const char * const genmai_boards_compat_dt[] __initconst = { | ||
| 153 | "renesas,genmai", | ||
| 154 | NULL, | ||
| 155 | }; | ||
| 156 | |||
| 157 | DT_MACHINE_START(GENMAI_DT, "genmai") | ||
| 158 | .init_early = shmobile_init_delay, | ||
| 159 | .init_machine = genmai_add_standard_devices, | ||
| 160 | .dt_compat = genmai_boards_compat_dt, | ||
| 161 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 3ff88c138896..9db5e6774fb7 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c | |||
| @@ -88,7 +88,6 @@ static void __init koelsch_add_du_device(void) | |||
| 88 | * devices until they get moved to DT. | 88 | * devices until they get moved to DT. |
| 89 | */ | 89 | */ |
| 90 | static const struct clk_name clk_names[] __initconst = { | 90 | static const struct clk_name clk_names[] __initconst = { |
| 91 | { "cmt0", "fck", "sh-cmt-48-gen2.0" }, | ||
| 92 | { "du0", "du.0", "rcar-du-r8a7791" }, | 91 | { "du0", "du.0", "rcar-du-r8a7791" }, |
| 93 | { "du1", "du.1", "rcar-du-r8a7791" }, | 92 | { "du1", "du.1", "rcar-du-r8a7791" }, |
| 94 | { "lvds0", "lvds.0", "rcar-du-r8a7791" }, | 93 | { "lvds0", "lvds.0", "rcar-du-r8a7791" }, |
| @@ -97,7 +96,6 @@ static const struct clk_name clk_names[] __initconst = { | |||
| 97 | static void __init koelsch_add_standard_devices(void) | 96 | static void __init koelsch_add_standard_devices(void) |
| 98 | { | 97 | { |
| 99 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | 98 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); |
| 100 | r8a7791_add_dt_devices(); | ||
| 101 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 99 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 102 | 100 | ||
| 103 | koelsch_add_du_device(); | 101 | koelsch_add_du_device(); |
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index 5d2621f202d1..d9cdf9a97e23 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c | |||
| @@ -51,8 +51,8 @@ static const char *kzm9g_boards_compat_dt[] __initdata = { | |||
| 51 | DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") | 51 | DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") |
| 52 | .smp = smp_ops(sh73a0_smp_ops), | 52 | .smp = smp_ops(sh73a0_smp_ops), |
| 53 | .map_io = sh73a0_map_io, | 53 | .map_io = sh73a0_map_io, |
| 54 | .init_early = sh73a0_init_delay, | 54 | .init_early = shmobile_init_delay, |
| 55 | .nr_irqs = NR_IRQS_LEGACY, | ||
| 56 | .init_machine = kzm_init, | 55 | .init_machine = kzm_init, |
| 56 | .init_late = shmobile_init_late, | ||
| 57 | .dt_compat = kzm9g_boards_compat_dt, | 57 | .dt_compat = kzm9g_boards_compat_dt, |
| 58 | MACHINE_END | 58 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index f8bc7f8f86ad..77e36fa0b142 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | #include <video/sh_mobile_lcdc.h> | 50 | #include <video/sh_mobile_lcdc.h> |
| 51 | 51 | ||
| 52 | #include "common.h" | 52 | #include "common.h" |
| 53 | #include "intc.h" | ||
| 53 | #include "irqs.h" | 54 | #include "irqs.h" |
| 54 | #include "sh73a0.h" | 55 | #include "sh73a0.h" |
| 55 | 56 | ||
| @@ -910,7 +911,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g") | |||
| 910 | .smp = smp_ops(sh73a0_smp_ops), | 911 | .smp = smp_ops(sh73a0_smp_ops), |
| 911 | .map_io = sh73a0_map_io, | 912 | .map_io = sh73a0_map_io, |
| 912 | .init_early = sh73a0_add_early_devices, | 913 | .init_early = sh73a0_add_early_devices, |
| 913 | .nr_irqs = NR_IRQS_LEGACY, | ||
| 914 | .init_irq = sh73a0_init_irq, | 914 | .init_irq = sh73a0_init_irq, |
| 915 | .init_machine = kzm_init, | 915 | .init_machine = kzm_init, |
| 916 | .init_late = shmobile_init_late, | 916 | .init_late = shmobile_init_late, |
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 41c808e56005..2a05c02bec39 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
| @@ -92,7 +92,6 @@ static void __init lager_add_du_device(void) | |||
| 92 | * devices until they get moved to DT. | 92 | * devices until they get moved to DT. |
| 93 | */ | 93 | */ |
| 94 | static const struct clk_name clk_names[] __initconst = { | 94 | static const struct clk_name clk_names[] __initconst = { |
| 95 | { "cmt0", "fck", "sh-cmt-48-gen2.0" }, | ||
| 96 | { "du0", "du.0", "rcar-du-r8a7790" }, | 95 | { "du0", "du.0", "rcar-du-r8a7790" }, |
| 97 | { "du1", "du.1", "rcar-du-r8a7790" }, | 96 | { "du1", "du.1", "rcar-du-r8a7790" }, |
| 98 | { "du2", "du.2", "rcar-du-r8a7790" }, | 97 | { "du2", "du.2", "rcar-du-r8a7790" }, |
| @@ -103,7 +102,6 @@ static const struct clk_name clk_names[] __initconst = { | |||
| 103 | static void __init lager_add_standard_devices(void) | 102 | static void __init lager_add_standard_devices(void) |
| 104 | { | 103 | { |
| 105 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | 104 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); |
| 106 | r8a7790_add_dt_devices(); | ||
| 107 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 105 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 108 | 106 | ||
| 109 | lager_add_du_device(); | 107 | lager_add_du_device(); |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index d47b2623267b..ca5d34b92aa7 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
| @@ -63,6 +63,7 @@ | |||
| 63 | #include <asm/mach-types.h> | 63 | #include <asm/mach-types.h> |
| 64 | 64 | ||
| 65 | #include "common.h" | 65 | #include "common.h" |
| 66 | #include "intc.h" | ||
| 66 | #include "irqs.h" | 67 | #include "irqs.h" |
| 67 | #include "pm-rmobile.h" | 68 | #include "pm-rmobile.h" |
| 68 | #include "sh-gpio.h" | 69 | #include "sh-gpio.h" |
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index 21b3e1ca2261..38d9cdd26587 100644 --- a/arch/arm/mach-shmobile/board-marzen-reference.c +++ b/arch/arm/mach-shmobile/board-marzen-reference.c | |||
| @@ -37,18 +37,8 @@ static void __init marzen_init_timer(void) | |||
| 37 | clocksource_of_init(); | 37 | clocksource_of_init(); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | /* | ||
| 41 | * This is a really crude hack to provide clkdev support to platform | ||
| 42 | * devices until they get moved to DT. | ||
| 43 | */ | ||
| 44 | static const struct clk_name clk_names[] __initconst = { | ||
| 45 | { "tmu0", "fck", "sh-tmu.0" }, | ||
| 46 | }; | ||
| 47 | |||
| 48 | static void __init marzen_init(void) | 40 | static void __init marzen_init(void) |
| 49 | { | 41 | { |
| 50 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | ||
| 51 | r8a7779_add_standard_devices_dt(); | ||
| 52 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 42 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 53 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ | 43 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ |
| 54 | } | 44 | } |
| @@ -64,8 +54,8 @@ DT_MACHINE_START(MARZEN, "marzen") | |||
| 64 | .map_io = r8a7779_map_io, | 54 | .map_io = r8a7779_map_io, |
| 65 | .init_early = shmobile_init_delay, | 55 | .init_early = shmobile_init_delay, |
| 66 | .init_time = marzen_init_timer, | 56 | .init_time = marzen_init_timer, |
| 67 | .nr_irqs = NR_IRQS_LEGACY, | ||
| 68 | .init_irq = r8a7779_init_irq_dt, | 57 | .init_irq = r8a7779_init_irq_dt, |
| 69 | .init_machine = marzen_init, | 58 | .init_machine = marzen_init, |
| 59 | .init_late = shmobile_init_late, | ||
| 70 | .dt_compat = marzen_boards_compat_dt, | 60 | .dt_compat = marzen_boards_compat_dt, |
| 71 | MACHINE_END | 61 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c deleted file mode 100644 index 3eb2ec401e0c..000000000000 --- a/arch/arm/mach-shmobile/clock-r7s72100.c +++ /dev/null | |||
| @@ -1,231 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * r7a72100 clock framework support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
| 5 | * Copyright (C) 2012 Phil Edworthy | ||
| 6 | * Copyright (C) 2011 Magnus Damm | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; version 2 of the License. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | */ | ||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/io.h> | ||
| 20 | #include <linux/sh_clk.h> | ||
| 21 | #include <linux/clkdev.h> | ||
| 22 | |||
| 23 | #include "common.h" | ||
| 24 | #include "r7s72100.h" | ||
| 25 | |||
| 26 | /* Frequency Control Registers */ | ||
| 27 | #define FRQCR 0xfcfe0010 | ||
| 28 | #define FRQCR2 0xfcfe0014 | ||
| 29 | /* Standby Control Registers */ | ||
| 30 | #define STBCR3 0xfcfe0420 | ||
| 31 | #define STBCR4 0xfcfe0424 | ||
| 32 | #define STBCR7 0xfcfe0430 | ||
| 33 | #define STBCR9 0xfcfe0438 | ||
| 34 | #define STBCR10 0xfcfe043c | ||
| 35 | |||
| 36 | #define PLL_RATE 30 | ||
| 37 | |||
| 38 | static struct clk_mapping cpg_mapping = { | ||
| 39 | .phys = 0xfcfe0000, | ||
| 40 | .len = 0x1000, | ||
| 41 | }; | ||
| 42 | |||
| 43 | /* Fixed 32 KHz root clock for RTC */ | ||
| 44 | static struct clk r_clk = { | ||
| 45 | .rate = 32768, | ||
| 46 | }; | ||
| 47 | |||
| 48 | /* | ||
| 49 | * Default rate for the root input clock, reset this with clk_set_rate() | ||
| 50 | * from the platform code. | ||
| 51 | */ | ||
| 52 | static struct clk extal_clk = { | ||
| 53 | .rate = 13330000, | ||
| 54 | .mapping = &cpg_mapping, | ||
| 55 | }; | ||
| 56 | |||
| 57 | static unsigned long pll_recalc(struct clk *clk) | ||
| 58 | { | ||
| 59 | return clk->parent->rate * PLL_RATE; | ||
| 60 | } | ||
| 61 | |||
| 62 | static struct sh_clk_ops pll_clk_ops = { | ||
| 63 | .recalc = pll_recalc, | ||
| 64 | }; | ||
| 65 | |||
| 66 | static struct clk pll_clk = { | ||
| 67 | .ops = &pll_clk_ops, | ||
| 68 | .parent = &extal_clk, | ||
| 69 | .flags = CLK_ENABLE_ON_INIT, | ||
| 70 | }; | ||
| 71 | |||
| 72 | static unsigned long bus_recalc(struct clk *clk) | ||
| 73 | { | ||
| 74 | return clk->parent->rate / 3; | ||
| 75 | } | ||
| 76 | |||
| 77 | static struct sh_clk_ops bus_clk_ops = { | ||
| 78 | .recalc = bus_recalc, | ||
| 79 | }; | ||
| 80 | |||
| 81 | static struct clk bus_clk = { | ||
| 82 | .ops = &bus_clk_ops, | ||
| 83 | .parent = &pll_clk, | ||
| 84 | .flags = CLK_ENABLE_ON_INIT, | ||
| 85 | }; | ||
| 86 | |||
| 87 | static unsigned long peripheral0_recalc(struct clk *clk) | ||
| 88 | { | ||
| 89 | return clk->parent->rate / 12; | ||
| 90 | } | ||
| 91 | |||
| 92 | static struct sh_clk_ops peripheral0_clk_ops = { | ||
| 93 | .recalc = peripheral0_recalc, | ||
| 94 | }; | ||
| 95 | |||
| 96 | static struct clk peripheral0_clk = { | ||
| 97 | .ops = &peripheral0_clk_ops, | ||
| 98 | .parent = &pll_clk, | ||
| 99 | .flags = CLK_ENABLE_ON_INIT, | ||
| 100 | }; | ||
| 101 | |||
| 102 | static unsigned long peripheral1_recalc(struct clk *clk) | ||
| 103 | { | ||
| 104 | return clk->parent->rate / 6; | ||
| 105 | } | ||
| 106 | |||
| 107 | static struct sh_clk_ops peripheral1_clk_ops = { | ||
| 108 | .recalc = peripheral1_recalc, | ||
| 109 | }; | ||
| 110 | |||
| 111 | static struct clk peripheral1_clk = { | ||
| 112 | .ops = &peripheral1_clk_ops, | ||
| 113 | .parent = &pll_clk, | ||
| 114 | .flags = CLK_ENABLE_ON_INIT, | ||
| 115 | }; | ||
| 116 | |||
| 117 | struct clk *main_clks[] = { | ||
| 118 | &r_clk, | ||
| 119 | &extal_clk, | ||
| 120 | &pll_clk, | ||
| 121 | &bus_clk, | ||
| 122 | &peripheral0_clk, | ||
| 123 | &peripheral1_clk, | ||
| 124 | }; | ||
| 125 | |||
| 126 | static int div2[] = { 1, 3, 0, 3 }; /* 1, 2/3, reserve, 1/3 */ | ||
| 127 | static int multipliers[] = { 1, 2, 1, 1 }; | ||
| 128 | |||
| 129 | static struct clk_div_mult_table div4_div_mult_table = { | ||
| 130 | .divisors = div2, | ||
| 131 | .nr_divisors = ARRAY_SIZE(div2), | ||
| 132 | .multipliers = multipliers, | ||
| 133 | .nr_multipliers = ARRAY_SIZE(multipliers), | ||
| 134 | }; | ||
| 135 | |||
| 136 | static struct clk_div4_table div4_table = { | ||
| 137 | .div_mult_table = &div4_div_mult_table, | ||
| 138 | }; | ||
| 139 | |||
| 140 | enum { DIV4_I, | ||
| 141 | DIV4_NR }; | ||
| 142 | |||
| 143 | #define DIV4(_reg, _bit, _mask, _flags) \ | ||
| 144 | SH_CLK_DIV4(&pll_clk, _reg, _bit, _mask, _flags) | ||
| 145 | |||
| 146 | /* The mask field specifies the div2 entries that are valid */ | ||
| 147 | struct clk div4_clks[DIV4_NR] = { | ||
| 148 | [DIV4_I] = DIV4(FRQCR, 8, 0xB, CLK_ENABLE_REG_16BIT | ||
| 149 | | CLK_ENABLE_ON_INIT), | ||
| 150 | }; | ||
| 151 | |||
| 152 | enum { | ||
| 153 | MSTP107, MSTP106, MSTP105, MSTP104, MSTP103, | ||
| 154 | MSTP97, MSTP96, MSTP95, MSTP94, | ||
| 155 | MSTP74, | ||
| 156 | MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40, | ||
| 157 | MSTP33, MSTP_NR | ||
| 158 | }; | ||
| 159 | |||
| 160 | static struct clk mstp_clks[MSTP_NR] = { | ||
| 161 | [MSTP107] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 7, 0), /* RSPI0 */ | ||
| 162 | [MSTP106] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 6, 0), /* RSPI1 */ | ||
| 163 | [MSTP105] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 5, 0), /* RSPI2 */ | ||
| 164 | [MSTP104] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 4, 0), /* RSPI3 */ | ||
| 165 | [MSTP103] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 3, 0), /* RSPI4 */ | ||
| 166 | [MSTP97] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 7, 0), /* RIIC0 */ | ||
| 167 | [MSTP96] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 6, 0), /* RIIC1 */ | ||
| 168 | [MSTP95] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 5, 0), /* RIIC2 */ | ||
| 169 | [MSTP94] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 4, 0), /* RIIC3 */ | ||
| 170 | [MSTP74] = SH_CLK_MSTP8(&peripheral1_clk, STBCR7, 4, 0), /* Ether */ | ||
| 171 | [MSTP47] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 7, 0), /* SCIF0 */ | ||
| 172 | [MSTP46] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 6, 0), /* SCIF1 */ | ||
| 173 | [MSTP45] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 5, 0), /* SCIF2 */ | ||
| 174 | [MSTP44] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 4, 0), /* SCIF3 */ | ||
| 175 | [MSTP43] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 3, 0), /* SCIF4 */ | ||
| 176 | [MSTP42] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 2, 0), /* SCIF5 */ | ||
| 177 | [MSTP41] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 1, 0), /* SCIF6 */ | ||
| 178 | [MSTP40] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 0, 0), /* SCIF7 */ | ||
| 179 | [MSTP33] = SH_CLK_MSTP8(&peripheral0_clk, STBCR3, 3, 0), /* MTU2 */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | static struct clk_lookup lookups[] = { | ||
| 183 | /* main clocks */ | ||
| 184 | CLKDEV_CON_ID("rclk", &r_clk), | ||
| 185 | CLKDEV_CON_ID("extal", &extal_clk), | ||
| 186 | CLKDEV_CON_ID("pll_clk", &pll_clk), | ||
| 187 | CLKDEV_CON_ID("peripheral_clk", &peripheral1_clk), | ||
| 188 | |||
| 189 | /* DIV4 clocks */ | ||
| 190 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), | ||
| 191 | |||
| 192 | /* MSTP clocks */ | ||
| 193 | CLKDEV_DEV_ID("rspi-rz.0", &mstp_clks[MSTP107]), | ||
| 194 | CLKDEV_DEV_ID("rspi-rz.1", &mstp_clks[MSTP106]), | ||
| 195 | CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]), | ||
| 196 | CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]), | ||
| 197 | CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]), | ||
| 198 | CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]), | ||
| 199 | |||
| 200 | /* ICK */ | ||
| 201 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), | ||
| 202 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), | ||
| 203 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), | ||
| 204 | CLKDEV_ICK_ID("sci_fck", "sh-sci.3", &mstp_clks[MSTP44]), | ||
| 205 | CLKDEV_ICK_ID("sci_fck", "sh-sci.4", &mstp_clks[MSTP43]), | ||
| 206 | CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), | ||
| 207 | CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), | ||
| 208 | CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), | ||
| 209 | CLKDEV_ICK_ID("fck", "sh-mtu2", &mstp_clks[MSTP33]), | ||
| 210 | }; | ||
| 211 | |||
| 212 | void __init r7s72100_clock_init(void) | ||
| 213 | { | ||
| 214 | int k, ret = 0; | ||
| 215 | |||
| 216 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | ||
| 217 | ret = clk_register(main_clks[k]); | ||
| 218 | |||
| 219 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
| 220 | |||
| 221 | if (!ret) | ||
| 222 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | ||
| 223 | |||
| 224 | if (!ret) | ||
| 225 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | ||
| 226 | |||
| 227 | if (!ret) | ||
| 228 | shmobile_clk_init(); | ||
| 229 | else | ||
| 230 | panic("failed to setup rza1 clocks\n"); | ||
| 231 | } | ||
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h index 98056081f0da..72087c79ad7b 100644 --- a/arch/arm/mach-shmobile/common.h +++ b/arch/arm/mach-shmobile/common.h | |||
| @@ -2,8 +2,6 @@ | |||
| 2 | #define __ARCH_MACH_COMMON_H | 2 | #define __ARCH_MACH_COMMON_H |
| 3 | 3 | ||
| 4 | extern void shmobile_earlytimer_init(void); | 4 | extern void shmobile_earlytimer_init(void); |
| 5 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, | ||
| 6 | unsigned int mult, unsigned int div); | ||
| 7 | extern void shmobile_init_delay(void); | 5 | extern void shmobile_init_delay(void); |
| 8 | struct twd_local_timer; | 6 | struct twd_local_timer; |
| 9 | extern void shmobile_setup_console(void); | 7 | extern void shmobile_setup_console(void); |
diff --git a/arch/arm/mach-shmobile/dma-register.h b/arch/arm/mach-shmobile/dma-register.h index 97c40bd9b94f..52a2f66e600f 100644 --- a/arch/arm/mach-shmobile/dma-register.h +++ b/arch/arm/mach-shmobile/dma-register.h | |||
| @@ -52,8 +52,8 @@ static const unsigned int dma_ts_shift[] = { | |||
| 52 | ((((i) & TS_LOW_BIT) << TS_LOW_SHIFT) |\ | 52 | ((((i) & TS_LOW_BIT) << TS_LOW_SHIFT) |\ |
| 53 | (((i) & TS_HI_BIT) << TS_HI_SHIFT)) | 53 | (((i) & TS_HI_BIT) << TS_HI_SHIFT)) |
| 54 | 54 | ||
| 55 | #define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL((xmit_sz))) | 55 | #define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | RS_ERS | TS_INDEX2VAL((xmit_sz))) |
| 56 | #define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL((xmit_sz))) | 56 | #define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | RS_ERS | TS_INDEX2VAL((xmit_sz))) |
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | /* | 59 | /* |
diff --git a/arch/arm/mach-shmobile/intc.h b/arch/arm/mach-shmobile/intc.h index a5603c76cfe0..40b2ad4ca5b4 100644 --- a/arch/arm/mach-shmobile/intc.h +++ b/arch/arm/mach-shmobile/intc.h | |||
| @@ -287,4 +287,9 @@ static struct intc_desc p ## _desc __initdata = { \ | |||
| 287 | p ## _sense_registers, NULL), \ | 287 | p ## _sense_registers, NULL), \ |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | /* INTCS */ | ||
| 291 | #define INTCS_VECT_BASE 0x3400 | ||
| 292 | #define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) | ||
| 293 | #define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt)) | ||
| 294 | |||
| 290 | #endif /* __ASM_MACH_INTC_H */ | 295 | #endif /* __ASM_MACH_INTC_H */ |
diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h index 4ff2d2aa94f0..3070f6d887eb 100644 --- a/arch/arm/mach-shmobile/irqs.h +++ b/arch/arm/mach-shmobile/irqs.h | |||
| @@ -1,18 +1,12 @@ | |||
| 1 | #ifndef __SHMOBILE_IRQS_H | 1 | #ifndef __SHMOBILE_IRQS_H |
| 2 | #define __SHMOBILE_IRQS_H | 2 | #define __SHMOBILE_IRQS_H |
| 3 | 3 | ||
| 4 | #include <linux/sh_intc.h> | 4 | #include "include/mach/irqs.h" |
| 5 | #include <mach/irqs.h> | ||
| 6 | 5 | ||
| 7 | /* GIC */ | 6 | /* GIC */ |
| 8 | #define gic_spi(nr) ((nr) + 32) | 7 | #define gic_spi(nr) ((nr) + 32) |
| 9 | #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */ | 8 | #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */ |
| 10 | 9 | ||
| 11 | /* INTCS */ | ||
| 12 | #define INTCS_VECT_BASE 0x3400 | ||
| 13 | #define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) | ||
| 14 | #define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt)) | ||
| 15 | |||
| 16 | /* GPIO IRQ */ | 10 | /* GPIO IRQ */ |
| 17 | #define _GPIO_IRQ_BASE 2500 | 11 | #define _GPIO_IRQ_BASE 2500 |
| 18 | #define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x)) | 12 | #define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x)) |
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c index 3d507149a6c4..e3f146448237 100644 --- a/arch/arm/mach-shmobile/pm-r8a7740.c +++ b/arch/arm/mach-shmobile/pm-r8a7740.c | |||
| @@ -13,12 +13,12 @@ | |||
| 13 | #include "common.h" | 13 | #include "common.h" |
| 14 | #include "pm-rmobile.h" | 14 | #include "pm-rmobile.h" |
| 15 | 15 | ||
| 16 | #ifdef CONFIG_PM | 16 | #if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) |
| 17 | static int r8a7740_pd_a4s_suspend(void) | 17 | static int r8a7740_pd_a4s_suspend(void) |
| 18 | { | 18 | { |
| 19 | /* | 19 | /* |
| 20 | * The A4S domain contains the CPU core and therefore it should | 20 | * The A4S domain contains the CPU core and therefore it should |
| 21 | * only be turned off if the CPU is in use. | 21 | * only be turned off if the CPU is not in use. |
| 22 | */ | 22 | */ |
| 23 | return -EBUSY; | 23 | return -EBUSY; |
| 24 | } | 24 | } |
| @@ -56,8 +56,7 @@ void __init r8a7740_init_pm_domains(void) | |||
| 56 | rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains)); | 56 | rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains)); |
| 57 | pm_genpd_add_subdomain_names("A4S", "A3SP"); | 57 | pm_genpd_add_subdomain_names("A4S", "A3SP"); |
| 58 | } | 58 | } |
| 59 | 59 | #endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ | |
| 60 | #endif /* CONFIG_PM */ | ||
| 61 | 60 | ||
| 62 | #ifdef CONFIG_SUSPEND | 61 | #ifdef CONFIG_SUSPEND |
| 63 | static int r8a7740_enter_suspend(suspend_state_t suspend_state) | 62 | static int r8a7740_enter_suspend(suspend_state_t suspend_state) |
diff --git a/arch/arm/mach-shmobile/r7s72100.h b/arch/arm/mach-shmobile/r7s72100.h deleted file mode 100644 index efb723c88dd0..000000000000 --- a/arch/arm/mach-shmobile/r7s72100.h +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | #ifndef __ASM_R7S72100_H__ | ||
| 2 | #define __ASM_R7S72100_H__ | ||
| 3 | |||
| 4 | void r7s72100_add_dt_devices(void); | ||
| 5 | void r7s72100_clock_init(void); | ||
| 6 | |||
| 7 | #endif /* __ASM_R7S72100_H__ */ | ||
diff --git a/arch/arm/mach-shmobile/r8a73a4.h b/arch/arm/mach-shmobile/r8a73a4.h index ce8bdd1d8a8a..5fafd6fcedf7 100644 --- a/arch/arm/mach-shmobile/r8a73a4.h +++ b/arch/arm/mach-shmobile/r8a73a4.h | |||
| @@ -14,6 +14,5 @@ void r8a73a4_add_standard_devices(void); | |||
| 14 | void r8a73a4_add_dt_devices(void); | 14 | void r8a73a4_add_dt_devices(void); |
| 15 | void r8a73a4_clock_init(void); | 15 | void r8a73a4_clock_init(void); |
| 16 | void r8a73a4_pinmux_init(void); | 16 | void r8a73a4_pinmux_init(void); |
| 17 | void r8a73a4_init_early(void); | ||
| 18 | 17 | ||
| 19 | #endif /* __ASM_R8A73A4_H__ */ | 18 | #endif /* __ASM_R8A73A4_H__ */ |
diff --git a/arch/arm/mach-shmobile/r8a7740.h b/arch/arm/mach-shmobile/r8a7740.h index 1d1a5fd78b6b..f369b4b0863d 100644 --- a/arch/arm/mach-shmobile/r8a7740.h +++ b/arch/arm/mach-shmobile/r8a7740.h | |||
| @@ -49,15 +49,14 @@ extern void r8a7740_init_irq_of(void); | |||
| 49 | extern void r8a7740_map_io(void); | 49 | extern void r8a7740_map_io(void); |
| 50 | extern void r8a7740_add_early_devices(void); | 50 | extern void r8a7740_add_early_devices(void); |
| 51 | extern void r8a7740_add_standard_devices(void); | 51 | extern void r8a7740_add_standard_devices(void); |
| 52 | extern void r8a7740_add_standard_devices_dt(void); | ||
| 53 | extern void r8a7740_clock_init(u8 md_ck); | 52 | extern void r8a7740_clock_init(u8 md_ck); |
| 54 | extern void r8a7740_pinmux_init(void); | 53 | extern void r8a7740_pinmux_init(void); |
| 55 | extern void r8a7740_pm_init(void); | 54 | extern void r8a7740_pm_init(void); |
| 56 | 55 | ||
| 57 | #ifdef CONFIG_PM | 56 | #if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) |
| 58 | extern void __init r8a7740_init_pm_domains(void); | 57 | extern void __init r8a7740_init_pm_domains(void); |
| 59 | #else | 58 | #else |
| 60 | static inline void r8a7740_init_pm_domains(void) {} | 59 | static inline void r8a7740_init_pm_domains(void) {} |
| 61 | #endif /* CONFIG_PM */ | 60 | #endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ |
| 62 | 61 | ||
| 63 | #endif /* __ASM_R8A7740_H__ */ | 62 | #endif /* __ASM_R8A7740_H__ */ |
diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h index 5415c719dc19..19f97046dd70 100644 --- a/arch/arm/mach-shmobile/r8a7779.h +++ b/arch/arm/mach-shmobile/r8a7779.h | |||
| @@ -17,7 +17,6 @@ extern void r8a7779_map_io(void); | |||
| 17 | extern void r8a7779_earlytimer_init(void); | 17 | extern void r8a7779_earlytimer_init(void); |
| 18 | extern void r8a7779_add_early_devices(void); | 18 | extern void r8a7779_add_early_devices(void); |
| 19 | extern void r8a7779_add_standard_devices(void); | 19 | extern void r8a7779_add_standard_devices(void); |
| 20 | extern void r8a7779_add_standard_devices_dt(void); | ||
| 21 | extern void r8a7779_init_late(void); | 20 | extern void r8a7779_init_late(void); |
| 22 | extern u32 r8a7779_read_mode_pins(void); | 21 | extern u32 r8a7779_read_mode_pins(void); |
| 23 | extern void r8a7779_clock_init(void); | 22 | extern void r8a7779_clock_init(void); |
diff --git a/arch/arm/mach-shmobile/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h index 459827f1369b..388f0514d931 100644 --- a/arch/arm/mach-shmobile/r8a7790.h +++ b/arch/arm/mach-shmobile/r8a7790.h | |||
| @@ -27,7 +27,6 @@ enum { | |||
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | void r8a7790_add_standard_devices(void); | 29 | void r8a7790_add_standard_devices(void); |
| 30 | void r8a7790_add_dt_devices(void); | ||
| 31 | void r8a7790_clock_init(void); | 30 | void r8a7790_clock_init(void); |
| 32 | void r8a7790_pinmux_init(void); | 31 | void r8a7790_pinmux_init(void); |
| 33 | void r8a7790_pm_init(void); | 32 | void r8a7790_pm_init(void); |
diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h index 86eae7bceb6f..c1bf7abefa5a 100644 --- a/arch/arm/mach-shmobile/r8a7791.h +++ b/arch/arm/mach-shmobile/r8a7791.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define __ASM_R8A7791_H__ | 2 | #define __ASM_R8A7791_H__ |
| 3 | 3 | ||
| 4 | void r8a7791_add_standard_devices(void); | 4 | void r8a7791_add_standard_devices(void); |
| 5 | void r8a7791_add_dt_devices(void); | ||
| 6 | void r8a7791_clock_init(void); | 5 | void r8a7791_clock_init(void); |
| 7 | void r8a7791_pinmux_init(void); | 6 | void r8a7791_pinmux_init(void); |
| 8 | void r8a7791_pm_init(void); | 7 | void r8a7791_pm_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index f3b3b14ba972..4122104359f9 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c | |||
| @@ -18,34 +18,12 @@ | |||
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include <linux/irq.h> | ||
| 22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 23 | #include <linux/of_platform.h> | ||
| 24 | #include <linux/sh_timer.h> | ||
| 25 | 22 | ||
| 26 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
| 27 | 24 | ||
| 28 | #include "common.h" | 25 | #include "common.h" |
| 29 | #include "irqs.h" | ||
| 30 | #include "r7s72100.h" | ||
| 31 | 26 | ||
| 32 | static struct resource mtu2_resources[] __initdata = { | ||
| 33 | DEFINE_RES_MEM(0xfcff0000, 0x400), | ||
| 34 | DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"), | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define r7s72100_register_mtu2() \ | ||
| 38 | platform_device_register_resndata(NULL, "sh-mtu2", \ | ||
| 39 | -1, mtu2_resources, \ | ||
| 40 | ARRAY_SIZE(mtu2_resources), \ | ||
| 41 | NULL, 0) | ||
| 42 | |||
| 43 | void __init r7s72100_add_dt_devices(void) | ||
| 44 | { | ||
| 45 | r7s72100_register_mtu2(); | ||
| 46 | } | ||
| 47 | |||
| 48 | #ifdef CONFIG_USE_OF | ||
| 49 | static const char *r7s72100_boards_compat_dt[] __initdata = { | 27 | static const char *r7s72100_boards_compat_dt[] __initdata = { |
| 50 | "renesas,r7s72100", | 28 | "renesas,r7s72100", |
| 51 | NULL, | 29 | NULL, |
| @@ -53,6 +31,6 @@ static const char *r7s72100_boards_compat_dt[] __initdata = { | |||
| 53 | 31 | ||
| 54 | DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)") | 32 | DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)") |
| 55 | .init_early = shmobile_init_delay, | 33 | .init_early = shmobile_init_delay, |
| 34 | .init_late = shmobile_init_late, | ||
| 56 | .dt_compat = r7s72100_boards_compat_dt, | 35 | .dt_compat = r7s72100_boards_compat_dt, |
| 57 | MACHINE_END | 36 | MACHINE_END |
| 58 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index 6683072a9d98..53f40b70680d 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
| @@ -295,13 +295,6 @@ void __init r8a73a4_add_standard_devices(void) | |||
| 295 | r8a73a4_register_dmac(); | 295 | r8a73a4_register_dmac(); |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | void __init r8a73a4_init_early(void) | ||
| 299 | { | ||
| 300 | #ifndef CONFIG_ARM_ARCH_TIMER | ||
| 301 | shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */ | ||
| 302 | #endif | ||
| 303 | } | ||
| 304 | |||
| 305 | #ifdef CONFIG_USE_OF | 298 | #ifdef CONFIG_USE_OF |
| 306 | 299 | ||
| 307 | static const char *r8a73a4_boards_compat_dt[] __initdata = { | 300 | static const char *r8a73a4_boards_compat_dt[] __initdata = { |
| @@ -310,7 +303,8 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = { | |||
| 310 | }; | 303 | }; |
| 311 | 304 | ||
| 312 | DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") | 305 | DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") |
| 313 | .init_early = r8a73a4_init_early, | 306 | .init_early = shmobile_init_delay, |
| 307 | .init_late = shmobile_init_late, | ||
| 314 | .dt_compat = r8a73a4_boards_compat_dt, | 308 | .dt_compat = r8a73a4_boards_compat_dt, |
| 315 | MACHINE_END | 309 | MACHINE_END |
| 316 | #endif /* CONFIG_USE_OF */ | 310 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 30df532fcaa0..8894e1b7ab0e 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
| 37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
| 38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
| 39 | #include <asm/hardware/cache-l2x0.h> | ||
| 39 | 40 | ||
| 40 | #include "common.h" | 41 | #include "common.h" |
| 41 | #include "dma-register.h" | 42 | #include "dma-register.h" |
| @@ -311,10 +312,6 @@ static struct platform_device ipmmu_device = { | |||
| 311 | .num_resources = ARRAY_SIZE(ipmmu_resources), | 312 | .num_resources = ARRAY_SIZE(ipmmu_resources), |
| 312 | }; | 313 | }; |
| 313 | 314 | ||
| 314 | static struct platform_device *r8a7740_devices_dt[] __initdata = { | ||
| 315 | &cmt1_device, | ||
| 316 | }; | ||
| 317 | |||
| 318 | static struct platform_device *r8a7740_early_devices[] __initdata = { | 315 | static struct platform_device *r8a7740_early_devices[] __initdata = { |
| 319 | &scif0_device, | 316 | &scif0_device, |
| 320 | &scif1_device, | 317 | &scif1_device, |
| @@ -331,6 +328,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { | |||
| 331 | &irqpin3_device, | 328 | &irqpin3_device, |
| 332 | &tmu0_device, | 329 | &tmu0_device, |
| 333 | &ipmmu_device, | 330 | &ipmmu_device, |
| 331 | &cmt1_device, | ||
| 334 | }; | 332 | }; |
| 335 | 333 | ||
| 336 | /* DMA */ | 334 | /* DMA */ |
| @@ -769,8 +767,6 @@ void __init r8a7740_add_standard_devices(void) | |||
| 769 | /* add devices */ | 767 | /* add devices */ |
| 770 | platform_add_devices(r8a7740_early_devices, | 768 | platform_add_devices(r8a7740_early_devices, |
| 771 | ARRAY_SIZE(r8a7740_early_devices)); | 769 | ARRAY_SIZE(r8a7740_early_devices)); |
| 772 | platform_add_devices(r8a7740_devices_dt, | ||
| 773 | ARRAY_SIZE(r8a7740_devices_dt)); | ||
| 774 | platform_add_devices(r8a7740_late_devices, | 770 | platform_add_devices(r8a7740_late_devices, |
| 775 | ARRAY_SIZE(r8a7740_late_devices)); | 771 | ARRAY_SIZE(r8a7740_late_devices)); |
| 776 | 772 | ||
| @@ -783,8 +779,6 @@ void __init r8a7740_add_early_devices(void) | |||
| 783 | { | 779 | { |
| 784 | early_platform_add_devices(r8a7740_early_devices, | 780 | early_platform_add_devices(r8a7740_early_devices, |
| 785 | ARRAY_SIZE(r8a7740_early_devices)); | 781 | ARRAY_SIZE(r8a7740_early_devices)); |
| 786 | early_platform_add_devices(r8a7740_devices_dt, | ||
| 787 | ARRAY_SIZE(r8a7740_devices_dt)); | ||
| 788 | 782 | ||
| 789 | /* setup early console here as well */ | 783 | /* setup early console here as well */ |
| 790 | shmobile_setup_console(); | 784 | shmobile_setup_console(); |
| @@ -792,13 +786,6 @@ void __init r8a7740_add_early_devices(void) | |||
| 792 | 786 | ||
| 793 | #ifdef CONFIG_USE_OF | 787 | #ifdef CONFIG_USE_OF |
| 794 | 788 | ||
| 795 | void __init r8a7740_add_standard_devices_dt(void) | ||
| 796 | { | ||
| 797 | platform_add_devices(r8a7740_devices_dt, | ||
| 798 | ARRAY_SIZE(r8a7740_devices_dt)); | ||
| 799 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
| 800 | } | ||
| 801 | |||
| 802 | void __init r8a7740_init_irq_of(void) | 789 | void __init r8a7740_init_irq_of(void) |
| 803 | { | 790 | { |
| 804 | void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); | 791 | void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); |
| @@ -831,8 +818,20 @@ void __init r8a7740_init_irq_of(void) | |||
| 831 | 818 | ||
| 832 | static void __init r8a7740_generic_init(void) | 819 | static void __init r8a7740_generic_init(void) |
| 833 | { | 820 | { |
| 834 | r8a7740_clock_init(0); | 821 | r8a7740_meram_workaround(); |
| 835 | r8a7740_add_standard_devices_dt(); | 822 | |
| 823 | #ifdef CONFIG_CACHE_L2X0 | ||
| 824 | /* Shared attribute override enable, 32K*8way */ | ||
| 825 | l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff); | ||
| 826 | #endif | ||
| 827 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
| 828 | } | ||
| 829 | |||
| 830 | #define RESCNT2 IOMEM(0xe6188020) | ||
| 831 | static void r8a7740_restart(enum reboot_mode mode, const char *cmd) | ||
| 832 | { | ||
| 833 | /* Do soft power on reset */ | ||
| 834 | writel(1 << 31, RESCNT2); | ||
| 836 | } | 835 | } |
| 837 | 836 | ||
| 838 | static const char *r8a7740_boards_compat_dt[] __initdata = { | 837 | static const char *r8a7740_boards_compat_dt[] __initdata = { |
| @@ -847,6 +846,7 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)") | |||
| 847 | .init_machine = r8a7740_generic_init, | 846 | .init_machine = r8a7740_generic_init, |
| 848 | .init_late = shmobile_init_late, | 847 | .init_late = shmobile_init_late, |
| 849 | .dt_compat = r8a7740_boards_compat_dt, | 848 | .dt_compat = r8a7740_boards_compat_dt, |
| 849 | .restart = r8a7740_restart, | ||
| 850 | MACHINE_END | 850 | MACHINE_END |
| 851 | 851 | ||
| 852 | #endif /* CONFIG_USE_OF */ | 852 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index f00a488dcf43..85fe016d6a87 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
| @@ -520,6 +520,7 @@ void __init r8a7778_add_standard_devices(void) | |||
| 520 | 520 | ||
| 521 | void __init r8a7778_init_late(void) | 521 | void __init r8a7778_init_late(void) |
| 522 | { | 522 | { |
| 523 | shmobile_init_late(); | ||
| 523 | platform_device_register_full(&ehci_info); | 524 | platform_device_register_full(&ehci_info); |
| 524 | platform_device_register_full(&ohci_info); | 525 | platform_device_register_full(&ohci_info); |
| 525 | } | 526 | } |
| @@ -573,7 +574,7 @@ void __init r8a7778_init_irq_extpin(int irlm) | |||
| 573 | 574 | ||
| 574 | void __init r8a7778_init_delay(void) | 575 | void __init r8a7778_init_delay(void) |
| 575 | { | 576 | { |
| 576 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ | 577 | shmobile_init_delay(); |
| 577 | } | 578 | } |
| 578 | 579 | ||
| 579 | #ifdef CONFIG_USE_OF | 580 | #ifdef CONFIG_USE_OF |
| @@ -609,8 +610,8 @@ static const char *r8a7778_compat_dt[] __initdata = { | |||
| 609 | DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") | 610 | DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") |
| 610 | .init_early = r8a7778_init_delay, | 611 | .init_early = r8a7778_init_delay, |
| 611 | .init_irq = r8a7778_init_irq_dt, | 612 | .init_irq = r8a7778_init_irq_dt, |
| 613 | .init_late = shmobile_init_late, | ||
| 612 | .dt_compat = r8a7778_compat_dt, | 614 | .dt_compat = r8a7778_compat_dt, |
| 613 | .init_late = r8a7778_init_late, | ||
| 614 | MACHINE_END | 615 | MACHINE_END |
| 615 | 616 | ||
| 616 | #endif /* CONFIG_USE_OF */ | 617 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 236c1befb9e3..136078ab9407 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
| @@ -641,7 +641,7 @@ static void __init r8a7779_register_hpb_dmae(void) | |||
| 641 | sizeof(dma_platform_data)); | 641 | sizeof(dma_platform_data)); |
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | static struct platform_device *r8a7779_devices_dt[] __initdata = { | 644 | static struct platform_device *r8a7779_early_devices[] __initdata = { |
| 645 | &tmu0_device, | 645 | &tmu0_device, |
| 646 | }; | 646 | }; |
| 647 | 647 | ||
| @@ -669,8 +669,8 @@ void __init r8a7779_add_standard_devices(void) | |||
| 669 | 669 | ||
| 670 | r8a7779_init_pm_domains(); | 670 | r8a7779_init_pm_domains(); |
| 671 | 671 | ||
| 672 | platform_add_devices(r8a7779_devices_dt, | 672 | platform_add_devices(r8a7779_early_devices, |
| 673 | ARRAY_SIZE(r8a7779_devices_dt)); | 673 | ARRAY_SIZE(r8a7779_early_devices)); |
| 674 | platform_add_devices(r8a7779_standard_devices, | 674 | platform_add_devices(r8a7779_standard_devices, |
| 675 | ARRAY_SIZE(r8a7779_standard_devices)); | 675 | ARRAY_SIZE(r8a7779_standard_devices)); |
| 676 | r8a7779_register_hpb_dmae(); | 676 | r8a7779_register_hpb_dmae(); |
| @@ -678,8 +678,8 @@ void __init r8a7779_add_standard_devices(void) | |||
| 678 | 678 | ||
| 679 | void __init r8a7779_add_early_devices(void) | 679 | void __init r8a7779_add_early_devices(void) |
| 680 | { | 680 | { |
| 681 | early_platform_add_devices(r8a7779_devices_dt, | 681 | early_platform_add_devices(r8a7779_early_devices, |
| 682 | ARRAY_SIZE(r8a7779_devices_dt)); | 682 | ARRAY_SIZE(r8a7779_early_devices)); |
| 683 | 683 | ||
| 684 | /* Early serial console setup is not included here due to | 684 | /* Early serial console setup is not included here due to |
| 685 | * memory map collisions. The SCIF serial ports in r8a7779 | 685 | * memory map collisions. The SCIF serial ports in r8a7779 |
| @@ -739,12 +739,6 @@ void __init r8a7779_init_irq_dt(void) | |||
| 739 | __raw_writel(0x003fee3f, INT2SMSKCR4); | 739 | __raw_writel(0x003fee3f, INT2SMSKCR4); |
| 740 | } | 740 | } |
| 741 | 741 | ||
| 742 | void __init r8a7779_add_standard_devices_dt(void) | ||
| 743 | { | ||
| 744 | platform_add_devices(r8a7779_devices_dt, | ||
| 745 | ARRAY_SIZE(r8a7779_devices_dt)); | ||
| 746 | } | ||
| 747 | |||
| 748 | #define MODEMR 0xffcc0020 | 742 | #define MODEMR 0xffcc0020 |
| 749 | 743 | ||
| 750 | u32 __init r8a7779_read_mode_pins(void) | 744 | u32 __init r8a7779_read_mode_pins(void) |
| @@ -771,10 +765,8 @@ static const char *r8a7779_compat_dt[] __initdata = { | |||
| 771 | DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") | 765 | DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") |
| 772 | .map_io = r8a7779_map_io, | 766 | .map_io = r8a7779_map_io, |
| 773 | .init_early = shmobile_init_delay, | 767 | .init_early = shmobile_init_delay, |
| 774 | .nr_irqs = NR_IRQS_LEGACY, | ||
| 775 | .init_irq = r8a7779_init_irq_dt, | 768 | .init_irq = r8a7779_init_irq_dt, |
| 776 | .init_machine = r8a7779_add_standard_devices_dt, | 769 | .init_late = shmobile_init_late, |
| 777 | .init_late = r8a7779_init_late, | ||
| 778 | .dt_compat = r8a7779_compat_dt, | 770 | .dt_compat = r8a7779_compat_dt, |
| 779 | MACHINE_END | 771 | MACHINE_END |
| 780 | #endif /* CONFIG_USE_OF */ | 772 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 0c12b01bb9e3..877fdeb985d0 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
| @@ -282,11 +282,6 @@ static struct resource cmt0_resources[] = { | |||
| 282 | &cmt##idx##_platform_data, \ | 282 | &cmt##idx##_platform_data, \ |
| 283 | sizeof(struct sh_timer_config)) | 283 | sizeof(struct sh_timer_config)) |
| 284 | 284 | ||
| 285 | void __init r8a7790_add_dt_devices(void) | ||
| 286 | { | ||
| 287 | r8a7790_register_cmt(0); | ||
| 288 | } | ||
| 289 | |||
| 290 | void __init r8a7790_add_standard_devices(void) | 285 | void __init r8a7790_add_standard_devices(void) |
| 291 | { | 286 | { |
| 292 | r8a7790_register_scif(0); | 287 | r8a7790_register_scif(0); |
| @@ -299,7 +294,7 @@ void __init r8a7790_add_standard_devices(void) | |||
| 299 | r8a7790_register_scif(7); | 294 | r8a7790_register_scif(7); |
| 300 | r8a7790_register_scif(8); | 295 | r8a7790_register_scif(8); |
| 301 | r8a7790_register_scif(9); | 296 | r8a7790_register_scif(9); |
| 302 | r8a7790_add_dt_devices(); | 297 | r8a7790_register_cmt(0); |
| 303 | r8a7790_register_irqc(0); | 298 | r8a7790_register_irqc(0); |
| 304 | r8a7790_register_thermal(); | 299 | r8a7790_register_thermal(); |
| 305 | r8a7790_register_i2c(0); | 300 | r8a7790_register_i2c(0); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index d47d8b16a43f..35d78639244f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
| @@ -182,11 +182,6 @@ static const struct resource thermal_resources[] __initconst = { | |||
| 182 | thermal_resources, \ | 182 | thermal_resources, \ |
| 183 | ARRAY_SIZE(thermal_resources)) | 183 | ARRAY_SIZE(thermal_resources)) |
| 184 | 184 | ||
| 185 | void __init r8a7791_add_dt_devices(void) | ||
| 186 | { | ||
| 187 | r8a7791_register_cmt(0); | ||
| 188 | } | ||
| 189 | |||
| 190 | void __init r8a7791_add_standard_devices(void) | 185 | void __init r8a7791_add_standard_devices(void) |
| 191 | { | 186 | { |
| 192 | r8a7791_register_scif(0); | 187 | r8a7791_register_scif(0); |
| @@ -204,7 +199,7 @@ void __init r8a7791_add_standard_devices(void) | |||
| 204 | r8a7791_register_scif(12); | 199 | r8a7791_register_scif(12); |
| 205 | r8a7791_register_scif(13); | 200 | r8a7791_register_scif(13); |
| 206 | r8a7791_register_scif(14); | 201 | r8a7791_register_scif(14); |
| 207 | r8a7791_add_dt_devices(); | 202 | r8a7791_register_cmt(0); |
| 208 | r8a7791_register_irqc(0); | 203 | r8a7791_register_irqc(0); |
| 209 | r8a7791_register_thermal(); | 204 | r8a7791_register_thermal(); |
| 210 | } | 205 | } |
diff --git a/arch/arm/mach-shmobile/setup-r8a7794.c b/arch/arm/mach-shmobile/setup-r8a7794.c new file mode 100644 index 000000000000..d2b093033132 --- /dev/null +++ b/arch/arm/mach-shmobile/setup-r8a7794.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * r8a7794 processor support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Renesas Electronics Corporation | ||
| 5 | * Copyright (C) 2014 Ulrich Hecht | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; version 2 of the License. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/of_platform.h> | ||
| 18 | #include "common.h" | ||
| 19 | #include "rcar-gen2.h" | ||
| 20 | #include <asm/mach/arch.h> | ||
| 21 | |||
| 22 | static const char * const r8a7794_boards_compat_dt[] __initconst = { | ||
| 23 | "renesas,r8a7794", | ||
| 24 | NULL, | ||
| 25 | }; | ||
| 26 | |||
| 27 | DT_MACHINE_START(R8A7794_DT, "Generic R8A7794 (Flattened Device Tree)") | ||
| 28 | .init_early = shmobile_init_delay, | ||
| 29 | .init_late = shmobile_init_late, | ||
| 30 | .init_time = rcar_gen2_timer_init, | ||
| 31 | .reserve = rcar_gen2_reserve, | ||
| 32 | .dt_compat = r8a7794_boards_compat_dt, | ||
| 33 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index a04fa5fd00fd..d646c8d12423 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | #include "common.h" | 42 | #include "common.h" |
| 43 | #include "dma-register.h" | 43 | #include "dma-register.h" |
| 44 | #include "intc.h" | ||
| 44 | #include "irqs.h" | 45 | #include "irqs.h" |
| 45 | #include "pm-rmobile.h" | 46 | #include "pm-rmobile.h" |
| 46 | #include "sh7372.h" | 47 | #include "sh7372.h" |
| @@ -984,7 +985,7 @@ void __init sh7372_add_early_devices(void) | |||
| 984 | 985 | ||
| 985 | void __init sh7372_add_early_devices_dt(void) | 986 | void __init sh7372_add_early_devices_dt(void) |
| 986 | { | 987 | { |
| 987 | shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */ | 988 | shmobile_init_delay(); |
| 988 | 989 | ||
| 989 | sh7372_add_early_devices(); | 990 | sh7372_add_early_devices(); |
| 990 | } | 991 | } |
| @@ -1008,7 +1009,6 @@ static const char *sh7372_boards_compat_dt[] __initdata = { | |||
| 1008 | DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)") | 1009 | DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)") |
| 1009 | .map_io = sh7372_map_io, | 1010 | .map_io = sh7372_map_io, |
| 1010 | .init_early = sh7372_add_early_devices_dt, | 1011 | .init_early = sh7372_add_early_devices_dt, |
| 1011 | .nr_irqs = NR_IRQS_LEGACY, | ||
| 1012 | .init_irq = sh7372_init_irq, | 1012 | .init_irq = sh7372_init_irq, |
| 1013 | .handle_irq = shmobile_handle_irq_intc, | 1013 | .handle_irq = shmobile_handle_irq_intc, |
| 1014 | .init_machine = sh7372_add_standard_devices_dt, | 1014 | .init_machine = sh7372_add_standard_devices_dt, |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 2c802ae9b241..b7bd8e509668 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | #include "common.h" | 41 | #include "common.h" |
| 42 | #include "dma-register.h" | 42 | #include "dma-register.h" |
| 43 | #include "intc.h" | ||
| 43 | #include "irqs.h" | 44 | #include "irqs.h" |
| 44 | #include "sh73a0.h" | 45 | #include "sh73a0.h" |
| 45 | 46 | ||
| @@ -696,10 +697,6 @@ static struct platform_device irqpin3_device = { | |||
| 696 | }, | 697 | }, |
| 697 | }; | 698 | }; |
| 698 | 699 | ||
| 699 | static struct platform_device *sh73a0_devices_dt[] __initdata = { | ||
| 700 | &cmt1_device, | ||
| 701 | }; | ||
| 702 | |||
| 703 | static struct platform_device *sh73a0_early_devices[] __initdata = { | 700 | static struct platform_device *sh73a0_early_devices[] __initdata = { |
| 704 | &scif0_device, | 701 | &scif0_device, |
| 705 | &scif1_device, | 702 | &scif1_device, |
| @@ -712,6 +709,7 @@ static struct platform_device *sh73a0_early_devices[] __initdata = { | |||
| 712 | &scif8_device, | 709 | &scif8_device, |
| 713 | &tmu0_device, | 710 | &tmu0_device, |
| 714 | &ipmmu_device, | 711 | &ipmmu_device, |
| 712 | &cmt1_device, | ||
| 715 | }; | 713 | }; |
| 716 | 714 | ||
| 717 | static struct platform_device *sh73a0_late_devices[] __initdata = { | 715 | static struct platform_device *sh73a0_late_devices[] __initdata = { |
| @@ -736,8 +734,6 @@ void __init sh73a0_add_standard_devices(void) | |||
| 736 | /* Clear software reset bit on SY-DMAC module */ | 734 | /* Clear software reset bit on SY-DMAC module */ |
| 737 | __raw_writel(__raw_readl(SRCR2) & ~(1 << 18), SRCR2); | 735 | __raw_writel(__raw_readl(SRCR2) & ~(1 << 18), SRCR2); |
| 738 | 736 | ||
| 739 | platform_add_devices(sh73a0_devices_dt, | ||
| 740 | ARRAY_SIZE(sh73a0_devices_dt)); | ||
| 741 | platform_add_devices(sh73a0_early_devices, | 737 | platform_add_devices(sh73a0_early_devices, |
| 742 | ARRAY_SIZE(sh73a0_early_devices)); | 738 | ARRAY_SIZE(sh73a0_early_devices)); |
| 743 | platform_add_devices(sh73a0_late_devices, | 739 | platform_add_devices(sh73a0_late_devices, |
| @@ -746,7 +742,7 @@ void __init sh73a0_add_standard_devices(void) | |||
| 746 | 742 | ||
| 747 | void __init sh73a0_init_delay(void) | 743 | void __init sh73a0_init_delay(void) |
| 748 | { | 744 | { |
| 749 | shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */ | 745 | shmobile_init_delay(); |
| 750 | } | 746 | } |
| 751 | 747 | ||
| 752 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | 748 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ |
| @@ -762,8 +758,6 @@ void __init sh73a0_earlytimer_init(void) | |||
| 762 | 758 | ||
| 763 | void __init sh73a0_add_early_devices(void) | 759 | void __init sh73a0_add_early_devices(void) |
| 764 | { | 760 | { |
| 765 | early_platform_add_devices(sh73a0_devices_dt, | ||
| 766 | ARRAY_SIZE(sh73a0_devices_dt)); | ||
| 767 | early_platform_add_devices(sh73a0_early_devices, | 761 | early_platform_add_devices(sh73a0_early_devices, |
| 768 | ARRAY_SIZE(sh73a0_early_devices)); | 762 | ARRAY_SIZE(sh73a0_early_devices)); |
| 769 | 763 | ||
| @@ -775,17 +769,10 @@ void __init sh73a0_add_early_devices(void) | |||
| 775 | 769 | ||
| 776 | void __init sh73a0_add_standard_devices_dt(void) | 770 | void __init sh73a0_add_standard_devices_dt(void) |
| 777 | { | 771 | { |
| 778 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; | ||
| 779 | |||
| 780 | /* clocks are setup late during boot in the case of DT */ | 772 | /* clocks are setup late during boot in the case of DT */ |
| 781 | sh73a0_clock_init(); | 773 | sh73a0_clock_init(); |
| 782 | 774 | ||
| 783 | platform_add_devices(sh73a0_devices_dt, | ||
| 784 | ARRAY_SIZE(sh73a0_devices_dt)); | ||
| 785 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 775 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 786 | |||
| 787 | /* Instantiate cpufreq-cpu0 */ | ||
| 788 | platform_device_register_full(&devinfo); | ||
| 789 | } | 776 | } |
| 790 | 777 | ||
| 791 | static const char *sh73a0_boards_compat_dt[] __initdata = { | 778 | static const char *sh73a0_boards_compat_dt[] __initdata = { |
| @@ -797,8 +784,8 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") | |||
| 797 | .smp = smp_ops(sh73a0_smp_ops), | 784 | .smp = smp_ops(sh73a0_smp_ops), |
| 798 | .map_io = sh73a0_map_io, | 785 | .map_io = sh73a0_map_io, |
| 799 | .init_early = sh73a0_init_delay, | 786 | .init_early = sh73a0_init_delay, |
| 800 | .nr_irqs = NR_IRQS_LEGACY, | ||
| 801 | .init_machine = sh73a0_add_standard_devices_dt, | 787 | .init_machine = sh73a0_add_standard_devices_dt, |
| 788 | .init_late = shmobile_init_late, | ||
| 802 | .dt_compat = sh73a0_boards_compat_dt, | 789 | .dt_compat = sh73a0_boards_compat_dt, |
| 803 | MACHINE_END | 790 | MACHINE_END |
| 804 | #endif /* CONFIG_USE_OF */ | 791 | #endif /* CONFIG_USE_OF */ |
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 942efdc82a62..87c6be1e79bd 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
| @@ -23,8 +23,8 @@ | |||
| 23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
| 24 | #include <linux/of_address.h> | 24 | #include <linux/of_address.h> |
| 25 | 25 | ||
| 26 | void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, | 26 | static void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, |
| 27 | unsigned int mult, unsigned int div) | 27 | unsigned int mult, unsigned int div) |
| 28 | { | 28 | { |
| 29 | /* calculate a worst-case loops-per-jiffy value | 29 | /* calculate a worst-case loops-per-jiffy value |
| 30 | * based on maximum cpu core hz setting and the | 30 | * based on maximum cpu core hz setting and the |
| @@ -40,27 +40,10 @@ void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz, | |||
| 40 | preset_lpj = max_cpu_core_hz / value; | 40 | preset_lpj = max_cpu_core_hz / value; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz, | ||
| 44 | unsigned int mult, unsigned int div) | ||
| 45 | { | ||
| 46 | /* calculate a worst-case loops-per-jiffy value | ||
| 47 | * based on maximum cpu core mhz setting and the | ||
| 48 | * __delay() implementation in arch/arm/lib/delay.S | ||
| 49 | * | ||
| 50 | * this will result in a longer delay than expected | ||
| 51 | * when the cpu core runs on lower frequencies. | ||
| 52 | */ | ||
| 53 | |||
| 54 | unsigned int value = (1000000 * mult) / (HZ * div); | ||
| 55 | |||
| 56 | if (!preset_lpj) | ||
| 57 | preset_lpj = max_cpu_core_mhz * value; | ||
| 58 | } | ||
| 59 | |||
| 60 | void __init shmobile_init_delay(void) | 43 | void __init shmobile_init_delay(void) |
| 61 | { | 44 | { |
| 62 | struct device_node *np, *cpus; | 45 | struct device_node *np, *cpus; |
| 63 | bool is_a8_a9 = false; | 46 | bool is_a7_a8_a9 = false; |
| 64 | bool is_a15 = false; | 47 | bool is_a15 = false; |
| 65 | u32 max_freq = 0; | 48 | u32 max_freq = 0; |
| 66 | 49 | ||
| @@ -74,9 +57,10 @@ void __init shmobile_init_delay(void) | |||
| 74 | if (!of_property_read_u32(np, "clock-frequency", &freq)) | 57 | if (!of_property_read_u32(np, "clock-frequency", &freq)) |
| 75 | max_freq = max(max_freq, freq); | 58 | max_freq = max(max_freq, freq); |
| 76 | 59 | ||
| 77 | if (of_device_is_compatible(np, "arm,cortex-a8") || | 60 | if (of_device_is_compatible(np, "arm,cortex-a7") || |
| 61 | of_device_is_compatible(np, "arm,cortex-a8") || | ||
| 78 | of_device_is_compatible(np, "arm,cortex-a9")) | 62 | of_device_is_compatible(np, "arm,cortex-a9")) |
| 79 | is_a8_a9 = true; | 63 | is_a7_a8_a9 = true; |
| 80 | else if (of_device_is_compatible(np, "arm,cortex-a15")) | 64 | else if (of_device_is_compatible(np, "arm,cortex-a15")) |
| 81 | is_a15 = true; | 65 | is_a15 = true; |
| 82 | } | 66 | } |
| @@ -86,7 +70,7 @@ void __init shmobile_init_delay(void) | |||
| 86 | if (!max_freq) | 70 | if (!max_freq) |
| 87 | return; | 71 | return; |
| 88 | 72 | ||
| 89 | if (is_a8_a9) | 73 | if (is_a7_a8_a9) |
| 90 | shmobile_setup_delay_hz(max_freq, 1, 3); | 74 | shmobile_setup_delay_hz(max_freq, 1, 3); |
| 91 | else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) | 75 | else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) |
| 92 | shmobile_setup_delay_hz(max_freq, 2, 4); | 76 | shmobile_setup_delay_hz(max_freq, 2, 4); |
diff --git a/arch/arm/mach-tegra/flowctrl.c b/arch/arm/mach-tegra/flowctrl.c index ec55d1de1b55..475e783992fd 100644 --- a/arch/arm/mach-tegra/flowctrl.c +++ b/arch/arm/mach-tegra/flowctrl.c | |||
| @@ -22,11 +22,12 @@ | |||
| 22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
| 25 | #include <linux/of.h> | ||
| 26 | #include <linux/of_address.h> | ||
| 25 | 27 | ||
| 26 | #include <soc/tegra/fuse.h> | 28 | #include <soc/tegra/fuse.h> |
| 27 | 29 | ||
| 28 | #include "flowctrl.h" | 30 | #include "flowctrl.h" |
| 29 | #include "iomap.h" | ||
| 30 | 31 | ||
| 31 | static u8 flowctrl_offset_halt_cpu[] = { | 32 | static u8 flowctrl_offset_halt_cpu[] = { |
| 32 | FLOW_CTRL_HALT_CPU0_EVENTS, | 33 | FLOW_CTRL_HALT_CPU0_EVENTS, |
| @@ -42,23 +43,22 @@ static u8 flowctrl_offset_cpu_csr[] = { | |||
| 42 | FLOW_CTRL_CPU1_CSR + 16, | 43 | FLOW_CTRL_CPU1_CSR + 16, |
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 46 | static void __iomem *tegra_flowctrl_base; | ||
| 47 | |||
| 45 | static void flowctrl_update(u8 offset, u32 value) | 48 | static void flowctrl_update(u8 offset, u32 value) |
| 46 | { | 49 | { |
| 47 | void __iomem *addr = IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + offset; | 50 | writel(value, tegra_flowctrl_base + offset); |
| 48 | |||
| 49 | writel(value, addr); | ||
| 50 | 51 | ||
| 51 | /* ensure the update has reached the flow controller */ | 52 | /* ensure the update has reached the flow controller */ |
| 52 | wmb(); | 53 | wmb(); |
| 53 | readl_relaxed(addr); | 54 | readl_relaxed(tegra_flowctrl_base + offset); |
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | u32 flowctrl_read_cpu_csr(unsigned int cpuid) | 57 | u32 flowctrl_read_cpu_csr(unsigned int cpuid) |
| 57 | { | 58 | { |
| 58 | u8 offset = flowctrl_offset_cpu_csr[cpuid]; | 59 | u8 offset = flowctrl_offset_cpu_csr[cpuid]; |
| 59 | void __iomem *addr = IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + offset; | ||
| 60 | 60 | ||
| 61 | return readl(addr); | 61 | return readl(tegra_flowctrl_base + offset); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) | 64 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) |
| @@ -139,3 +139,33 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid) | |||
| 139 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event */ | 139 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event */ |
| 140 | flowctrl_write_cpu_csr(cpuid, reg); | 140 | flowctrl_write_cpu_csr(cpuid, reg); |
| 141 | } | 141 | } |
| 142 | |||
| 143 | static const struct of_device_id matches[] __initconst = { | ||
| 144 | { .compatible = "nvidia,tegra124-flowctrl" }, | ||
| 145 | { .compatible = "nvidia,tegra114-flowctrl" }, | ||
| 146 | { .compatible = "nvidia,tegra30-flowctrl" }, | ||
| 147 | { .compatible = "nvidia,tegra20-flowctrl" }, | ||
| 148 | { } | ||
| 149 | }; | ||
| 150 | |||
| 151 | void __init tegra_flowctrl_init(void) | ||
| 152 | { | ||
| 153 | /* hardcoded fallback if device tree node is missing */ | ||
| 154 | unsigned long base = 0x60007000; | ||
| 155 | unsigned long size = SZ_4K; | ||
| 156 | struct device_node *np; | ||
| 157 | |||
| 158 | np = of_find_matching_node(NULL, matches); | ||
| 159 | if (np) { | ||
| 160 | struct resource res; | ||
| 161 | |||
| 162 | if (of_address_to_resource(np, 0, &res) == 0) { | ||
| 163 | size = resource_size(&res); | ||
| 164 | base = res.start; | ||
| 165 | } | ||
| 166 | |||
| 167 | of_node_put(np); | ||
| 168 | } | ||
| 169 | |||
| 170 | tegra_flowctrl_base = ioremap_nocache(base, size); | ||
| 171 | } | ||
diff --git a/arch/arm/mach-tegra/flowctrl.h b/arch/arm/mach-tegra/flowctrl.h index c89aac60a143..73a9c5016c1a 100644 --- a/arch/arm/mach-tegra/flowctrl.h +++ b/arch/arm/mach-tegra/flowctrl.h | |||
| @@ -59,6 +59,8 @@ void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); | |||
| 59 | 59 | ||
| 60 | void flowctrl_cpu_suspend_enter(unsigned int cpuid); | 60 | void flowctrl_cpu_suspend_enter(unsigned int cpuid); |
| 61 | void flowctrl_cpu_suspend_exit(unsigned int cpuid); | 61 | void flowctrl_cpu_suspend_exit(unsigned int cpuid); |
| 62 | |||
| 63 | void tegra_flowctrl_init(void); | ||
| 62 | #endif | 64 | #endif |
| 63 | 65 | ||
| 64 | #endif | 66 | #endif |
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 5ef5173dec83..ef016af1c9e7 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #include "board.h" | 48 | #include "board.h" |
| 49 | #include "common.h" | 49 | #include "common.h" |
| 50 | #include "cpuidle.h" | 50 | #include "cpuidle.h" |
| 51 | #include "flowctrl.h" | ||
| 51 | #include "iomap.h" | 52 | #include "iomap.h" |
| 52 | #include "irq.h" | 53 | #include "irq.h" |
| 53 | #include "pm.h" | 54 | #include "pm.h" |
| @@ -74,6 +75,7 @@ static void __init tegra_init_early(void) | |||
| 74 | { | 75 | { |
| 75 | of_register_trusted_foundations(); | 76 | of_register_trusted_foundations(); |
| 76 | tegra_cpu_reset_handler_init(); | 77 | tegra_cpu_reset_handler_init(); |
| 78 | tegra_flowctrl_init(); | ||
| 77 | } | 79 | } |
| 78 | 80 | ||
| 79 | static void __init tegra_dt_init_irq(void) | 81 | static void __init tegra_dt_init_irq(void) |
diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile index 1b25d92ebf22..c85fb3f7d5cd 100644 --- a/arch/arm/mach-zynq/Makefile +++ b/arch/arm/mach-zynq/Makefile | |||
| @@ -3,8 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | # Common support | 5 | # Common support |
| 6 | obj-y := common.o slcr.o | 6 | obj-y := common.o slcr.o pm.o |
| 7 | CFLAGS_REMOVE_hotplug.o =-march=armv6k | 7 | CFLAGS_REMOVE_hotplug.o =-march=armv6k |
| 8 | CFLAGS_hotplug.o =-Wa,-march=armv7-a -mcpu=cortex-a9 | 8 | CFLAGS_hotplug.o =-Wa,-march=armv7-a -mcpu=cortex-a9 |
| 9 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | ||
| 10 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 9 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 31a6fa40ba37..613c476872eb 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
| @@ -98,6 +98,12 @@ static int __init zynq_get_revision(void) | |||
| 98 | return revision; | 98 | return revision; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | static void __init zynq_init_late(void) | ||
| 102 | { | ||
| 103 | zynq_core_pm_init(); | ||
| 104 | zynq_pm_late_init(); | ||
| 105 | } | ||
| 106 | |||
| 101 | /** | 107 | /** |
| 102 | * zynq_init_machine - System specific initialization, intended to be | 108 | * zynq_init_machine - System specific initialization, intended to be |
| 103 | * called from board specific initialization. | 109 | * called from board specific initialization. |
| @@ -198,12 +204,13 @@ static const char * const zynq_dt_match[] = { | |||
| 198 | 204 | ||
| 199 | DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | 205 | DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") |
| 200 | /* 64KB way size, 8-way associativity, parity disabled */ | 206 | /* 64KB way size, 8-way associativity, parity disabled */ |
| 201 | .l2c_aux_val = 0x02000000, | 207 | .l2c_aux_val = 0x00000000, |
| 202 | .l2c_aux_mask = 0xf0ffffff, | 208 | .l2c_aux_mask = 0xffffffff, |
| 203 | .smp = smp_ops(zynq_smp_ops), | 209 | .smp = smp_ops(zynq_smp_ops), |
| 204 | .map_io = zynq_map_io, | 210 | .map_io = zynq_map_io, |
| 205 | .init_irq = zynq_irq_init, | 211 | .init_irq = zynq_irq_init, |
| 206 | .init_machine = zynq_init_machine, | 212 | .init_machine = zynq_init_machine, |
| 213 | .init_late = zynq_init_late, | ||
| 207 | .init_time = zynq_timer_init, | 214 | .init_time = zynq_timer_init, |
| 208 | .dt_compat = zynq_dt_match, | 215 | .dt_compat = zynq_dt_match, |
| 209 | .reserve = zynq_memory_init, | 216 | .reserve = zynq_memory_init, |
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h index f652f0a884a6..2bc71273c73c 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h | |||
| @@ -24,6 +24,8 @@ extern int zynq_early_slcr_init(void); | |||
| 24 | extern void zynq_slcr_system_reset(void); | 24 | extern void zynq_slcr_system_reset(void); |
| 25 | extern void zynq_slcr_cpu_stop(int cpu); | 25 | extern void zynq_slcr_cpu_stop(int cpu); |
| 26 | extern void zynq_slcr_cpu_start(int cpu); | 26 | extern void zynq_slcr_cpu_start(int cpu); |
| 27 | extern bool zynq_slcr_cpu_state_read(int cpu); | ||
| 28 | extern void zynq_slcr_cpu_state_write(int cpu, bool die); | ||
| 27 | extern u32 zynq_slcr_get_device_id(void); | 29 | extern u32 zynq_slcr_get_device_id(void); |
| 28 | 30 | ||
| 29 | #ifdef CONFIG_SMP | 31 | #ifdef CONFIG_SMP |
| @@ -37,7 +39,17 @@ extern struct smp_operations zynq_smp_ops __initdata; | |||
| 37 | 39 | ||
| 38 | extern void __iomem *zynq_scu_base; | 40 | extern void __iomem *zynq_scu_base; |
| 39 | 41 | ||
| 40 | /* Hotplug */ | 42 | void zynq_pm_late_init(void); |
| 41 | extern void zynq_platform_cpu_die(unsigned int cpu); | 43 | |
| 44 | static inline void zynq_core_pm_init(void) | ||
| 45 | { | ||
| 46 | /* A9 clock gating */ | ||
| 47 | asm volatile ("mrc p15, 0, r12, c15, c0, 0\n" | ||
| 48 | "orr r12, r12, #1\n" | ||
| 49 | "mcr p15, 0, r12, c15, c0, 0\n" | ||
| 50 | : /* no outputs */ | ||
| 51 | : /* no inputs */ | ||
| 52 | : "r12"); | ||
| 53 | } | ||
| 42 | 54 | ||
| 43 | #endif | 55 | #endif |
diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c index 5052c70326e4..b685c89f11e4 100644 --- a/arch/arm/mach-zynq/hotplug.c +++ b/arch/arm/mach-zynq/hotplug.c | |||
| @@ -10,50 +10,5 @@ | |||
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | */ | 12 | */ |
| 13 | #include <linux/kernel.h> | 13 | #include <asm/proc-fns.h> |
| 14 | #include <linux/errno.h> | ||
| 15 | #include <linux/smp.h> | ||
| 16 | 14 | ||
| 17 | #include <asm/cacheflush.h> | ||
| 18 | #include <asm/cp15.h> | ||
| 19 | #include "common.h" | ||
| 20 | |||
| 21 | static inline void zynq_cpu_enter_lowpower(void) | ||
| 22 | { | ||
| 23 | unsigned int v; | ||
| 24 | |||
| 25 | flush_cache_all(); | ||
| 26 | asm volatile( | ||
| 27 | " mcr p15, 0, %1, c7, c5, 0\n" | ||
| 28 | " dsb\n" | ||
| 29 | /* | ||
| 30 | * Turn off coherency | ||
| 31 | */ | ||
| 32 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
| 33 | " bic %0, %0, #0x40\n" | ||
| 34 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
| 35 | " mrc p15, 0, %0, c1, c0, 0\n" | ||
| 36 | " bic %0, %0, %2\n" | ||
| 37 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
| 38 | : "=&r" (v) | ||
| 39 | : "r" (0), "Ir" (CR_C) | ||
| 40 | : "cc"); | ||
| 41 | } | ||
| 42 | |||
| 43 | /* | ||
| 44 | * platform-specific code to shutdown a CPU | ||
| 45 | * | ||
| 46 | * Called with IRQs disabled | ||
| 47 | */ | ||
| 48 | void zynq_platform_cpu_die(unsigned int cpu) | ||
| 49 | { | ||
| 50 | zynq_cpu_enter_lowpower(); | ||
| 51 | |||
| 52 | /* | ||
| 53 | * there is no power-control hardware on this platform, so all | ||
| 54 | * we can do is put the core into WFI; this is safe as the calling | ||
| 55 | * code will have already disabled interrupts | ||
| 56 | */ | ||
| 57 | for (;;) | ||
| 58 | cpu_do_idle(); | ||
| 59 | } | ||
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c index abc82ef085c1..52d768ff7857 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c | |||
| @@ -112,20 +112,59 @@ static void __init zynq_smp_prepare_cpus(unsigned int max_cpus) | |||
| 112 | scu_enable(zynq_scu_base); | 112 | scu_enable(zynq_scu_base); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | /** | ||
| 116 | * zynq_secondary_init - Initialize secondary CPU cores | ||
| 117 | * @cpu: CPU that is initialized | ||
| 118 | * | ||
| 119 | * This function is in the hotplug path. Don't move it into the | ||
| 120 | * init section!! | ||
| 121 | */ | ||
| 122 | static void zynq_secondary_init(unsigned int cpu) | ||
| 123 | { | ||
| 124 | zynq_core_pm_init(); | ||
| 125 | } | ||
| 126 | |||
| 115 | #ifdef CONFIG_HOTPLUG_CPU | 127 | #ifdef CONFIG_HOTPLUG_CPU |
| 116 | static int zynq_cpu_kill(unsigned cpu) | 128 | static int zynq_cpu_kill(unsigned cpu) |
| 117 | { | 129 | { |
| 130 | unsigned long timeout = jiffies + msecs_to_jiffies(50); | ||
| 131 | |||
| 132 | while (zynq_slcr_cpu_state_read(cpu)) | ||
| 133 | if (time_after(jiffies, timeout)) | ||
| 134 | return 0; | ||
| 135 | |||
| 118 | zynq_slcr_cpu_stop(cpu); | 136 | zynq_slcr_cpu_stop(cpu); |
| 119 | return 1; | 137 | return 1; |
| 120 | } | 138 | } |
| 139 | |||
| 140 | /** | ||
| 141 | * zynq_cpu_die - Let a CPU core die | ||
| 142 | * @cpu: Dying CPU | ||
| 143 | * | ||
| 144 | * Platform-specific code to shutdown a CPU. | ||
| 145 | * Called with IRQs disabled on the dying CPU. | ||
| 146 | */ | ||
| 147 | static void zynq_cpu_die(unsigned int cpu) | ||
| 148 | { | ||
| 149 | zynq_slcr_cpu_state_write(cpu, true); | ||
| 150 | |||
| 151 | /* | ||
| 152 | * there is no power-control hardware on this platform, so all | ||
| 153 | * we can do is put the core into WFI; this is safe as the calling | ||
| 154 | * code will have already disabled interrupts | ||
| 155 | */ | ||
| 156 | for (;;) | ||
| 157 | cpu_do_idle(); | ||
| 158 | } | ||
| 121 | #endif | 159 | #endif |
| 122 | 160 | ||
| 123 | struct smp_operations zynq_smp_ops __initdata = { | 161 | struct smp_operations zynq_smp_ops __initdata = { |
| 124 | .smp_init_cpus = zynq_smp_init_cpus, | 162 | .smp_init_cpus = zynq_smp_init_cpus, |
| 125 | .smp_prepare_cpus = zynq_smp_prepare_cpus, | 163 | .smp_prepare_cpus = zynq_smp_prepare_cpus, |
| 126 | .smp_boot_secondary = zynq_boot_secondary, | 164 | .smp_boot_secondary = zynq_boot_secondary, |
| 165 | .smp_secondary_init = zynq_secondary_init, | ||
| 127 | #ifdef CONFIG_HOTPLUG_CPU | 166 | #ifdef CONFIG_HOTPLUG_CPU |
| 128 | .cpu_die = zynq_platform_cpu_die, | 167 | .cpu_die = zynq_cpu_die, |
| 129 | .cpu_kill = zynq_cpu_kill, | 168 | .cpu_kill = zynq_cpu_kill, |
| 130 | #endif | 169 | #endif |
| 131 | }; | 170 | }; |
diff --git a/arch/arm/mach-zynq/pm.c b/arch/arm/mach-zynq/pm.c new file mode 100644 index 000000000000..911fcf865be8 --- /dev/null +++ b/arch/arm/mach-zynq/pm.c | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* | ||
| 2 | * Zynq power management | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 - 2014 Xilinx | ||
| 5 | * | ||
| 6 | * Sören Brinkmann <soren.brinkmann@xilinx.com> | ||
| 7 | * | ||
| 8 | * This program is free software: you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation, either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/io.h> | ||
| 23 | #include <linux/of_address.h> | ||
| 24 | #include <linux/of_device.h> | ||
| 25 | #include "common.h" | ||
| 26 | |||
| 27 | /* register offsets */ | ||
| 28 | #define DDRC_CTRL_REG1_OFFS 0x60 | ||
| 29 | #define DDRC_DRAM_PARAM_REG3_OFFS 0x20 | ||
| 30 | |||
| 31 | /* bitfields */ | ||
| 32 | #define DDRC_CLOCKSTOP_MASK BIT(23) | ||
| 33 | #define DDRC_SELFREFRESH_MASK BIT(12) | ||
| 34 | |||
| 35 | static void __iomem *ddrc_base; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * zynq_pm_ioremap() - Create IO mappings | ||
| 39 | * @comp: DT compatible string | ||
| 40 | * Return: Pointer to the mapped memory or NULL. | ||
| 41 | * | ||
| 42 | * Remap the memory region for a compatible DT node. | ||
| 43 | */ | ||
| 44 | static void __iomem *zynq_pm_ioremap(const char *comp) | ||
| 45 | { | ||
| 46 | struct device_node *np; | ||
| 47 | void __iomem *base = NULL; | ||
| 48 | |||
| 49 | np = of_find_compatible_node(NULL, NULL, comp); | ||
| 50 | if (np) { | ||
| 51 | base = of_iomap(np, 0); | ||
| 52 | of_node_put(np); | ||
| 53 | } else { | ||
| 54 | pr_warn("%s: no compatible node found for '%s'\n", __func__, | ||
| 55 | comp); | ||
| 56 | } | ||
| 57 | |||
| 58 | return base; | ||
| 59 | } | ||
| 60 | |||
| 61 | /** | ||
| 62 | * zynq_pm_late_init() - Power management init | ||
| 63 | * | ||
| 64 | * Initialization of power management related featurs and infrastructure. | ||
| 65 | */ | ||
| 66 | void __init zynq_pm_late_init(void) | ||
| 67 | { | ||
| 68 | u32 reg; | ||
| 69 | |||
| 70 | ddrc_base = zynq_pm_ioremap("xlnx,zynq-ddrc-a05"); | ||
| 71 | if (!ddrc_base) { | ||
| 72 | pr_warn("%s: Unable to map DDRC IO memory.\n", __func__); | ||
| 73 | } else { | ||
| 74 | /* | ||
| 75 | * Enable DDRC clock stop feature. The HW takes care of | ||
| 76 | * entering/exiting the correct mode depending | ||
| 77 | * on activity state. | ||
| 78 | */ | ||
| 79 | reg = readl(ddrc_base + DDRC_DRAM_PARAM_REG3_OFFS); | ||
| 80 | reg |= DDRC_CLOCKSTOP_MASK; | ||
| 81 | writel(reg, ddrc_base + DDRC_DRAM_PARAM_REG3_OFFS); | ||
| 82 | } | ||
| 83 | } | ||
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index c43a2d16e223..d4cb50cf97c0 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c | |||
| @@ -138,6 +138,8 @@ void zynq_slcr_cpu_start(int cpu) | |||
| 138 | zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); | 138 | zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); |
| 139 | reg &= ~(SLCR_A9_CPU_CLKSTOP << cpu); | 139 | reg &= ~(SLCR_A9_CPU_CLKSTOP << cpu); |
| 140 | zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); | 140 | zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); |
| 141 | |||
| 142 | zynq_slcr_cpu_state_write(cpu, false); | ||
| 141 | } | 143 | } |
| 142 | 144 | ||
| 143 | /** | 145 | /** |
| @@ -154,8 +156,47 @@ void zynq_slcr_cpu_stop(int cpu) | |||
| 154 | } | 156 | } |
| 155 | 157 | ||
| 156 | /** | 158 | /** |
| 157 | * zynq_slcr_init - Regular slcr driver init | 159 | * zynq_slcr_cpu_state - Read/write cpu state |
| 160 | * @cpu: cpu number | ||
| 158 | * | 161 | * |
| 162 | * SLCR_REBOOT_STATUS save upper 2 bits (31/30 cpu states for cpu0 and cpu1) | ||
| 163 | * 0 means cpu is running, 1 cpu is going to die. | ||
| 164 | * | ||
| 165 | * Return: true if cpu is running, false if cpu is going to die | ||
| 166 | */ | ||
| 167 | bool zynq_slcr_cpu_state_read(int cpu) | ||
| 168 | { | ||
| 169 | u32 state; | ||
| 170 | |||
| 171 | state = readl(zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET); | ||
| 172 | state &= 1 << (31 - cpu); | ||
| 173 | |||
| 174 | return !state; | ||
| 175 | } | ||
| 176 | |||
| 177 | /** | ||
| 178 | * zynq_slcr_cpu_state - Read/write cpu state | ||
| 179 | * @cpu: cpu number | ||
| 180 | * @die: cpu state - true if cpu is going to die | ||
| 181 | * | ||
| 182 | * SLCR_REBOOT_STATUS save upper 2 bits (31/30 cpu states for cpu0 and cpu1) | ||
| 183 | * 0 means cpu is running, 1 cpu is going to die. | ||
| 184 | */ | ||
| 185 | void zynq_slcr_cpu_state_write(int cpu, bool die) | ||
| 186 | { | ||
| 187 | u32 state, mask; | ||
| 188 | |||
| 189 | state = readl(zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET); | ||
| 190 | mask = 1 << (31 - cpu); | ||
| 191 | if (die) | ||
| 192 | state |= mask; | ||
| 193 | else | ||
| 194 | state &= ~mask; | ||
| 195 | writel(state, zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET); | ||
| 196 | } | ||
| 197 | |||
| 198 | /** | ||
| 199 | * zynq_slcr_init - Regular slcr driver init | ||
| 159 | * Return: 0 on success, negative errno otherwise. | 200 | * Return: 0 on success, negative errno otherwise. |
| 160 | * | 201 | * |
| 161 | * Called early during boot from platform code to remap SLCR area. | 202 | * Called early during boot from platform code to remap SLCR area. |
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index 3ea02903d75a..1f5ee17a10e8 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c | |||
| @@ -258,6 +258,7 @@ static const struct platform_device_id ssp_id_table[] = { | |||
| 258 | { "pxa25x-ssp", PXA25x_SSP }, | 258 | { "pxa25x-ssp", PXA25x_SSP }, |
| 259 | { "pxa25x-nssp", PXA25x_NSSP }, | 259 | { "pxa25x-nssp", PXA25x_NSSP }, |
| 260 | { "pxa27x-ssp", PXA27x_SSP }, | 260 | { "pxa27x-ssp", PXA27x_SSP }, |
| 261 | { "pxa3xx-ssp", PXA3xx_SSP }, | ||
| 261 | { "pxa168-ssp", PXA168_SSP }, | 262 | { "pxa168-ssp", PXA168_SSP }, |
| 262 | { "pxa910-ssp", PXA910_SSP }, | 263 | { "pxa910-ssp", PXA910_SSP }, |
| 263 | { }, | 264 | { }, |
diff --git a/drivers/clk/at91/Makefile b/drivers/clk/at91/Makefile index 4998aee59267..89a48a7bd5df 100644 --- a/drivers/clk/at91/Makefile +++ b/drivers/clk/at91/Makefile | |||
| @@ -9,3 +9,4 @@ obj-y += clk-system.o clk-peripheral.o clk-programmable.o | |||
| 9 | obj-$(CONFIG_HAVE_AT91_UTMI) += clk-utmi.o | 9 | obj-$(CONFIG_HAVE_AT91_UTMI) += clk-utmi.o |
| 10 | obj-$(CONFIG_HAVE_AT91_USB_CLK) += clk-usb.o | 10 | obj-$(CONFIG_HAVE_AT91_USB_CLK) += clk-usb.o |
| 11 | obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o | 11 | obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o |
| 12 | obj-$(CONFIG_HAVE_AT91_H32MX) += clk-h32mx.o | ||
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c new file mode 100644 index 000000000000..152dcb3f7b5f --- /dev/null +++ b/drivers/clk/at91/clk-h32mx.c | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | * clk-h32mx.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Atmel | ||
| 5 | * | ||
| 6 | * Alexandre Belloni <alexandre.belloni@free-electrons.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/clk-provider.h> | ||
| 16 | #include <linux/clkdev.h> | ||
| 17 | #include <linux/clk/at91_pmc.h> | ||
| 18 | #include <linux/delay.h> | ||
| 19 | #include <linux/of.h> | ||
| 20 | #include <linux/of_address.h> | ||
| 21 | #include <linux/of_irq.h> | ||
| 22 | #include <linux/io.h> | ||
| 23 | #include <linux/interrupt.h> | ||
| 24 | #include <linux/irq.h> | ||
| 25 | #include <linux/sched.h> | ||
| 26 | #include <linux/wait.h> | ||
| 27 | |||
| 28 | #include "pmc.h" | ||
| 29 | |||
| 30 | #define H32MX_MAX_FREQ 90000000 | ||
| 31 | |||
| 32 | struct clk_sama5d4_h32mx { | ||
| 33 | struct clk_hw hw; | ||
| 34 | struct at91_pmc *pmc; | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define to_clk_sama5d4_h32mx(hw) container_of(hw, struct clk_sama5d4_h32mx, hw) | ||
| 38 | |||
| 39 | static unsigned long clk_sama5d4_h32mx_recalc_rate(struct clk_hw *hw, | ||
| 40 | unsigned long parent_rate) | ||
| 41 | { | ||
| 42 | struct clk_sama5d4_h32mx *h32mxclk = to_clk_sama5d4_h32mx(hw); | ||
| 43 | |||
| 44 | if (pmc_read(h32mxclk->pmc, AT91_PMC_MCKR) & AT91_PMC_H32MXDIV) | ||
| 45 | return parent_rate / 2; | ||
| 46 | |||
| 47 | if (parent_rate > H32MX_MAX_FREQ) | ||
| 48 | pr_warn("H32MX clock is too fast\n"); | ||
| 49 | return parent_rate; | ||
| 50 | } | ||
| 51 | |||
| 52 | static long clk_sama5d4_h32mx_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 53 | unsigned long *parent_rate) | ||
| 54 | { | ||
| 55 | unsigned long div; | ||
| 56 | |||
| 57 | if (rate > *parent_rate) | ||
| 58 | return *parent_rate; | ||
| 59 | div = *parent_rate / 2; | ||
| 60 | if (rate < div) | ||
| 61 | return div; | ||
| 62 | |||
| 63 | if (rate - div < *parent_rate - rate) | ||
| 64 | return div; | ||
| 65 | |||
| 66 | return *parent_rate; | ||
| 67 | } | ||
| 68 | |||
| 69 | static int clk_sama5d4_h32mx_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 70 | unsigned long parent_rate) | ||
| 71 | { | ||
| 72 | struct clk_sama5d4_h32mx *h32mxclk = to_clk_sama5d4_h32mx(hw); | ||
| 73 | struct at91_pmc *pmc = h32mxclk->pmc; | ||
| 74 | u32 tmp; | ||
| 75 | |||
| 76 | if (parent_rate != rate && (parent_rate / 2) != rate) | ||
| 77 | return -EINVAL; | ||
| 78 | |||
| 79 | pmc_lock(pmc); | ||
| 80 | tmp = pmc_read(pmc, AT91_PMC_MCKR) & ~AT91_PMC_H32MXDIV; | ||
| 81 | if ((parent_rate / 2) == rate) | ||
| 82 | tmp |= AT91_PMC_H32MXDIV; | ||
| 83 | pmc_write(pmc, AT91_PMC_MCKR, tmp); | ||
| 84 | pmc_unlock(pmc); | ||
| 85 | |||
| 86 | return 0; | ||
| 87 | } | ||
| 88 | |||
| 89 | static const struct clk_ops h32mx_ops = { | ||
| 90 | .recalc_rate = clk_sama5d4_h32mx_recalc_rate, | ||
| 91 | .round_rate = clk_sama5d4_h32mx_round_rate, | ||
| 92 | .set_rate = clk_sama5d4_h32mx_set_rate, | ||
| 93 | }; | ||
| 94 | |||
| 95 | void __init of_sama5d4_clk_h32mx_setup(struct device_node *np, | ||
| 96 | struct at91_pmc *pmc) | ||
| 97 | { | ||
| 98 | struct clk_sama5d4_h32mx *h32mxclk; | ||
| 99 | struct clk_init_data init; | ||
| 100 | const char *parent_name; | ||
| 101 | struct clk *clk; | ||
| 102 | |||
| 103 | h32mxclk = kzalloc(sizeof(*h32mxclk), GFP_KERNEL); | ||
| 104 | if (!h32mxclk) | ||
| 105 | return; | ||
| 106 | |||
| 107 | parent_name = of_clk_get_parent_name(np, 0); | ||
| 108 | |||
| 109 | init.name = np->name; | ||
| 110 | init.ops = &h32mx_ops; | ||
| 111 | init.parent_names = parent_name ? &parent_name : NULL; | ||
| 112 | init.num_parents = parent_name ? 1 : 0; | ||
| 113 | init.flags = CLK_SET_RATE_GATE; | ||
| 114 | |||
| 115 | h32mxclk->hw.init = &init; | ||
| 116 | h32mxclk->pmc = pmc; | ||
| 117 | |||
| 118 | clk = clk_register(NULL, &h32mxclk->hw); | ||
| 119 | if (!clk) | ||
| 120 | return; | ||
| 121 | |||
| 122 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
| 123 | } | ||
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index 524196bb35a5..386999b4f8eb 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c | |||
| @@ -337,6 +337,12 @@ static const struct of_device_id pmc_clk_ids[] __initconst = { | |||
| 337 | .data = of_at91sam9x5_clk_smd_setup, | 337 | .data = of_at91sam9x5_clk_smd_setup, |
| 338 | }, | 338 | }, |
| 339 | #endif | 339 | #endif |
| 340 | #if defined(CONFIG_HAVE_AT91_H32MX) | ||
| 341 | { | ||
| 342 | .compatible = "atmel,sama5d4-clk-h32mx", | ||
| 343 | .data = of_sama5d4_clk_h32mx_setup, | ||
| 344 | }, | ||
| 345 | #endif | ||
| 340 | { /*sentinel*/ } | 346 | { /*sentinel*/ } |
| 341 | }; | 347 | }; |
| 342 | 348 | ||
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index 6c7625976113..52d2041fa3f6 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h | |||
| @@ -120,4 +120,9 @@ extern void __init of_at91sam9x5_clk_smd_setup(struct device_node *np, | |||
| 120 | struct at91_pmc *pmc); | 120 | struct at91_pmc *pmc); |
| 121 | #endif | 121 | #endif |
| 122 | 122 | ||
| 123 | #if defined(CONFIG_HAVE_AT91_SMD) | ||
| 124 | extern void __init of_sama5d4_clk_h32mx_setup(struct device_node *np, | ||
| 125 | struct at91_pmc *pmc); | ||
| 126 | #endif | ||
| 127 | |||
| 123 | #endif /* __PMC_H_ */ | 128 | #endif /* __PMC_H_ */ |
diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile index e0029237827a..531d4f6c7050 100644 --- a/drivers/clk/shmobile/Makefile +++ b/drivers/clk/shmobile/Makefile | |||
| @@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_R8A7740) += clk-r8a7740.o | |||
| 4 | obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o | 4 | obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o |
| 5 | obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o | 5 | obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o |
| 6 | obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o | 6 | obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o |
| 7 | obj-$(CONFIG_ARCH_R8A7794) += clk-rcar-gen2.o | ||
| 7 | obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o | 8 | obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o |
| 8 | obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-mstp.o | 9 | obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-mstp.o |
| 9 | # for emply built-in.o | 10 | # for emply built-in.o |
diff --git a/drivers/cpuidle/cpuidle-zynq.c b/drivers/cpuidle/cpuidle-zynq.c index aded75928028..c61b8b2a7c77 100644 --- a/drivers/cpuidle/cpuidle-zynq.c +++ b/drivers/cpuidle/cpuidle-zynq.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
| 29 | #include <linux/cpu_pm.h> | ||
| 30 | #include <linux/cpuidle.h> | 29 | #include <linux/cpuidle.h> |
| 31 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
| 32 | #include <asm/proc-fns.h> | 31 | #include <asm/proc-fns.h> |
| @@ -38,15 +37,9 @@ | |||
| 38 | static int zynq_enter_idle(struct cpuidle_device *dev, | 37 | static int zynq_enter_idle(struct cpuidle_device *dev, |
| 39 | struct cpuidle_driver *drv, int index) | 38 | struct cpuidle_driver *drv, int index) |
| 40 | { | 39 | { |
| 41 | /* Devices must be stopped here */ | ||
| 42 | cpu_pm_enter(); | ||
| 43 | |||
| 44 | /* Add code for DDR self refresh start */ | 40 | /* Add code for DDR self refresh start */ |
| 45 | cpu_do_idle(); | 41 | cpu_do_idle(); |
| 46 | 42 | ||
| 47 | /* Add code for DDR self refresh stop */ | ||
| 48 | cpu_pm_exit(); | ||
| 49 | |||
| 50 | return index; | 43 | return index; |
| 51 | } | 44 | } |
| 52 | 45 | ||
| @@ -59,8 +52,7 @@ static struct cpuidle_driver zynq_idle_driver = { | |||
| 59 | .enter = zynq_enter_idle, | 52 | .enter = zynq_enter_idle, |
| 60 | .exit_latency = 10, | 53 | .exit_latency = 10, |
| 61 | .target_residency = 10000, | 54 | .target_residency = 10000, |
| 62 | .flags = CPUIDLE_FLAG_TIME_VALID | | 55 | .flags = CPUIDLE_FLAG_TIME_VALID, |
| 63 | CPUIDLE_FLAG_TIMER_STOP, | ||
| 64 | .name = "RAM_SR", | 56 | .name = "RAM_SR", |
| 65 | .desc = "WFI and RAM Self Refresh", | 57 | .desc = "WFI and RAM Self Refresh", |
| 66 | }, | 58 | }, |
diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index 654151e24288..ddaef8620b2c 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h | |||
| @@ -128,7 +128,7 @@ | |||
| 128 | #define IMX6Q_CLK_ECSPI5 116 | 128 | #define IMX6Q_CLK_ECSPI5 116 |
| 129 | #define IMX6DL_CLK_I2C4 116 | 129 | #define IMX6DL_CLK_I2C4 116 |
| 130 | #define IMX6QDL_CLK_ENET 117 | 130 | #define IMX6QDL_CLK_ENET 117 |
| 131 | #define IMX6QDL_CLK_ESAI 118 | 131 | #define IMX6QDL_CLK_ESAI_EXTAL 118 |
| 132 | #define IMX6QDL_CLK_GPT_IPG 119 | 132 | #define IMX6QDL_CLK_GPT_IPG 119 |
| 133 | #define IMX6QDL_CLK_GPT_IPG_PER 120 | 133 | #define IMX6QDL_CLK_GPT_IPG_PER 120 |
| 134 | #define IMX6QDL_CLK_GPU2D_CORE 121 | 134 | #define IMX6QDL_CLK_GPU2D_CORE 121 |
| @@ -218,7 +218,36 @@ | |||
| 218 | #define IMX6QDL_CLK_LVDS2_SEL 205 | 218 | #define IMX6QDL_CLK_LVDS2_SEL 205 |
| 219 | #define IMX6QDL_CLK_LVDS1_GATE 206 | 219 | #define IMX6QDL_CLK_LVDS1_GATE 206 |
| 220 | #define IMX6QDL_CLK_LVDS2_GATE 207 | 220 | #define IMX6QDL_CLK_LVDS2_GATE 207 |
| 221 | #define IMX6QDL_CLK_ESAI_AHB 208 | 221 | #define IMX6QDL_CLK_ESAI_IPG 208 |
| 222 | #define IMX6QDL_CLK_END 209 | 222 | #define IMX6QDL_CLK_ESAI_MEM 209 |
| 223 | #define IMX6QDL_CLK_ASRC_IPG 210 | ||
| 224 | #define IMX6QDL_CLK_ASRC_MEM 211 | ||
| 225 | #define IMX6QDL_CLK_LVDS1_IN 212 | ||
| 226 | #define IMX6QDL_CLK_LVDS2_IN 213 | ||
| 227 | #define IMX6QDL_CLK_ANACLK1 214 | ||
| 228 | #define IMX6QDL_CLK_ANACLK2 215 | ||
| 229 | #define IMX6QDL_PLL1_BYPASS_SRC 216 | ||
| 230 | #define IMX6QDL_PLL2_BYPASS_SRC 217 | ||
| 231 | #define IMX6QDL_PLL3_BYPASS_SRC 218 | ||
| 232 | #define IMX6QDL_PLL4_BYPASS_SRC 219 | ||
| 233 | #define IMX6QDL_PLL5_BYPASS_SRC 220 | ||
| 234 | #define IMX6QDL_PLL6_BYPASS_SRC 221 | ||
| 235 | #define IMX6QDL_PLL7_BYPASS_SRC 222 | ||
| 236 | #define IMX6QDL_CLK_PLL1 223 | ||
| 237 | #define IMX6QDL_CLK_PLL2 224 | ||
| 238 | #define IMX6QDL_CLK_PLL3 225 | ||
| 239 | #define IMX6QDL_CLK_PLL4 226 | ||
| 240 | #define IMX6QDL_CLK_PLL5 227 | ||
| 241 | #define IMX6QDL_CLK_PLL6 228 | ||
| 242 | #define IMX6QDL_CLK_PLL7 229 | ||
| 243 | #define IMX6QDL_PLL1_BYPASS 230 | ||
| 244 | #define IMX6QDL_PLL2_BYPASS 231 | ||
| 245 | #define IMX6QDL_PLL3_BYPASS 232 | ||
| 246 | #define IMX6QDL_PLL4_BYPASS 233 | ||
| 247 | #define IMX6QDL_PLL5_BYPASS 234 | ||
| 248 | #define IMX6QDL_PLL6_BYPASS 235 | ||
| 249 | #define IMX6QDL_PLL7_BYPASS 236 | ||
| 250 | #define IMX6QDL_CLK_GPT_3M 237 | ||
| 251 | #define IMX6QDL_CLK_END 238 | ||
| 223 | 252 | ||
| 224 | #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ | 253 | #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ |
diff --git a/include/dt-bindings/clock/imx6sl-clock.h b/include/dt-bindings/clock/imx6sl-clock.h index b91dd462ba85..9ce4e421096f 100644 --- a/include/dt-bindings/clock/imx6sl-clock.h +++ b/include/dt-bindings/clock/imx6sl-clock.h | |||
| @@ -146,6 +146,34 @@ | |||
| 146 | #define IMX6SL_CLK_PLL4_AUDIO_DIV 133 | 146 | #define IMX6SL_CLK_PLL4_AUDIO_DIV 133 |
| 147 | #define IMX6SL_CLK_SPBA 134 | 147 | #define IMX6SL_CLK_SPBA 134 |
| 148 | #define IMX6SL_CLK_ENET 135 | 148 | #define IMX6SL_CLK_ENET 135 |
| 149 | #define IMX6SL_CLK_END 136 | 149 | #define IMX6SL_CLK_LVDS1_SEL 136 |
| 150 | #define IMX6SL_CLK_LVDS1_OUT 137 | ||
| 151 | #define IMX6SL_CLK_LVDS1_IN 138 | ||
| 152 | #define IMX6SL_CLK_ANACLK1 139 | ||
| 153 | #define IMX6SL_PLL1_BYPASS_SRC 140 | ||
| 154 | #define IMX6SL_PLL2_BYPASS_SRC 141 | ||
| 155 | #define IMX6SL_PLL3_BYPASS_SRC 142 | ||
| 156 | #define IMX6SL_PLL4_BYPASS_SRC 143 | ||
| 157 | #define IMX6SL_PLL5_BYPASS_SRC 144 | ||
| 158 | #define IMX6SL_PLL6_BYPASS_SRC 145 | ||
| 159 | #define IMX6SL_PLL7_BYPASS_SRC 146 | ||
| 160 | #define IMX6SL_CLK_PLL1 147 | ||
| 161 | #define IMX6SL_CLK_PLL2 148 | ||
| 162 | #define IMX6SL_CLK_PLL3 149 | ||
| 163 | #define IMX6SL_CLK_PLL4 150 | ||
| 164 | #define IMX6SL_CLK_PLL5 151 | ||
| 165 | #define IMX6SL_CLK_PLL6 152 | ||
| 166 | #define IMX6SL_CLK_PLL7 153 | ||
| 167 | #define IMX6SL_PLL1_BYPASS 154 | ||
| 168 | #define IMX6SL_PLL2_BYPASS 155 | ||
| 169 | #define IMX6SL_PLL3_BYPASS 156 | ||
| 170 | #define IMX6SL_PLL4_BYPASS 157 | ||
| 171 | #define IMX6SL_PLL5_BYPASS 158 | ||
| 172 | #define IMX6SL_PLL6_BYPASS 159 | ||
| 173 | #define IMX6SL_PLL7_BYPASS 160 | ||
| 174 | #define IMX6SL_CLK_SSI1_IPG 161 | ||
| 175 | #define IMX6SL_CLK_SSI2_IPG 162 | ||
| 176 | #define IMX6SL_CLK_SSI3_IPG 163 | ||
| 177 | #define IMX6SL_CLK_END 164 | ||
| 150 | 178 | ||
| 151 | #endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */ | 179 | #endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */ |
diff --git a/include/dt-bindings/clock/imx6sx-clock.h b/include/dt-bindings/clock/imx6sx-clock.h index 421d8bb76f2f..995709119ec5 100644 --- a/include/dt-bindings/clock/imx6sx-clock.h +++ b/include/dt-bindings/clock/imx6sx-clock.h | |||
| @@ -251,6 +251,29 @@ | |||
| 251 | #define IMX6SX_CLK_SAI2_IPG 238 | 251 | #define IMX6SX_CLK_SAI2_IPG 238 |
| 252 | #define IMX6SX_CLK_ESAI_IPG 239 | 252 | #define IMX6SX_CLK_ESAI_IPG 239 |
| 253 | #define IMX6SX_CLK_ESAI_MEM 240 | 253 | #define IMX6SX_CLK_ESAI_MEM 240 |
| 254 | #define IMX6SX_CLK_CLK_END 241 | 254 | #define IMX6SX_CLK_LVDS1_IN 241 |
| 255 | #define IMX6SX_CLK_ANACLK1 242 | ||
| 256 | #define IMX6SX_PLL1_BYPASS_SRC 243 | ||
| 257 | #define IMX6SX_PLL2_BYPASS_SRC 244 | ||
| 258 | #define IMX6SX_PLL3_BYPASS_SRC 245 | ||
| 259 | #define IMX6SX_PLL4_BYPASS_SRC 246 | ||
| 260 | #define IMX6SX_PLL5_BYPASS_SRC 247 | ||
| 261 | #define IMX6SX_PLL6_BYPASS_SRC 248 | ||
| 262 | #define IMX6SX_PLL7_BYPASS_SRC 249 | ||
| 263 | #define IMX6SX_CLK_PLL1 250 | ||
| 264 | #define IMX6SX_CLK_PLL2 251 | ||
| 265 | #define IMX6SX_CLK_PLL3 252 | ||
| 266 | #define IMX6SX_CLK_PLL4 253 | ||
| 267 | #define IMX6SX_CLK_PLL5 254 | ||
| 268 | #define IMX6SX_CLK_PLL6 255 | ||
| 269 | #define IMX6SX_CLK_PLL7 256 | ||
| 270 | #define IMX6SX_PLL1_BYPASS 257 | ||
| 271 | #define IMX6SX_PLL2_BYPASS 258 | ||
| 272 | #define IMX6SX_PLL3_BYPASS 259 | ||
| 273 | #define IMX6SX_PLL4_BYPASS 260 | ||
| 274 | #define IMX6SX_PLL5_BYPASS 261 | ||
| 275 | #define IMX6SX_PLL6_BYPASS 262 | ||
| 276 | #define IMX6SX_PLL7_BYPASS 263 | ||
| 277 | #define IMX6SX_CLK_CLK_END 264 | ||
| 255 | 278 | ||
| 256 | #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ | 279 | #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ |
diff --git a/include/dt-bindings/clock/r8a7740-clock.h b/include/dt-bindings/clock/r8a7740-clock.h new file mode 100644 index 000000000000..f6b4b0fe7a43 --- /dev/null +++ b/include/dt-bindings/clock/r8a7740-clock.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2014 Ulrich Hecht | ||
| 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 as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __DT_BINDINGS_CLOCK_R8A7740_H__ | ||
| 11 | #define __DT_BINDINGS_CLOCK_R8A7740_H__ | ||
| 12 | |||
| 13 | /* CPG */ | ||
| 14 | #define R8A7740_CLK_SYSTEM 0 | ||
| 15 | #define R8A7740_CLK_PLLC0 1 | ||
| 16 | #define R8A7740_CLK_PLLC1 2 | ||
| 17 | #define R8A7740_CLK_PLLC2 3 | ||
| 18 | #define R8A7740_CLK_R 4 | ||
| 19 | #define R8A7740_CLK_USB24S 5 | ||
| 20 | #define R8A7740_CLK_I 6 | ||
| 21 | #define R8A7740_CLK_ZG 7 | ||
| 22 | #define R8A7740_CLK_B 8 | ||
| 23 | #define R8A7740_CLK_M1 9 | ||
| 24 | #define R8A7740_CLK_HP 10 | ||
| 25 | #define R8A7740_CLK_HPP 11 | ||
| 26 | #define R8A7740_CLK_USBP 12 | ||
| 27 | #define R8A7740_CLK_S 13 | ||
| 28 | #define R8A7740_CLK_ZB 14 | ||
| 29 | #define R8A7740_CLK_M3 15 | ||
| 30 | #define R8A7740_CLK_CP 16 | ||
| 31 | |||
| 32 | /* MSTP1 */ | ||
| 33 | #define R8A7740_CLK_CEU21 28 | ||
| 34 | #define R8A7740_CLK_CEU20 27 | ||
| 35 | #define R8A7740_CLK_TMU0 25 | ||
| 36 | #define R8A7740_CLK_LCDC1 17 | ||
| 37 | #define R8A7740_CLK_IIC0 16 | ||
| 38 | #define R8A7740_CLK_TMU1 11 | ||
| 39 | #define R8A7740_CLK_LCDC0 0 | ||
| 40 | |||
| 41 | /* MSTP2 */ | ||
| 42 | #define R8A7740_CLK_SCIFA6 30 | ||
| 43 | #define R8A7740_CLK_SCIFA7 22 | ||
| 44 | #define R8A7740_CLK_DMAC1 18 | ||
| 45 | #define R8A7740_CLK_DMAC2 17 | ||
| 46 | #define R8A7740_CLK_DMAC3 16 | ||
| 47 | #define R8A7740_CLK_USBDMAC 14 | ||
| 48 | #define R8A7740_CLK_SCIFA5 7 | ||
| 49 | #define R8A7740_CLK_SCIFB 6 | ||
| 50 | #define R8A7740_CLK_SCIFA0 4 | ||
| 51 | #define R8A7740_CLK_SCIFA1 3 | ||
| 52 | #define R8A7740_CLK_SCIFA2 2 | ||
| 53 | #define R8A7740_CLK_SCIFA3 1 | ||
| 54 | #define R8A7740_CLK_SCIFA4 0 | ||
| 55 | |||
| 56 | /* MSTP3 */ | ||
| 57 | #define R8A7740_CLK_CMT1 29 | ||
| 58 | #define R8A7740_CLK_FSI 28 | ||
| 59 | #define R8A7740_CLK_IIC1 23 | ||
| 60 | #define R8A7740_CLK_USBF 20 | ||
| 61 | #define R8A7740_CLK_SDHI0 14 | ||
| 62 | #define R8A7740_CLK_SDHI1 13 | ||
| 63 | #define R8A7740_CLK_MMC 12 | ||
| 64 | #define R8A7740_CLK_GETHER 9 | ||
| 65 | #define R8A7740_CLK_TPU0 4 | ||
| 66 | |||
| 67 | /* MSTP4 */ | ||
| 68 | #define R8A7740_CLK_USBH 16 | ||
| 69 | #define R8A7740_CLK_SDHI2 15 | ||
| 70 | #define R8A7740_CLK_USBFUNC 7 | ||
| 71 | #define R8A7740_CLK_USBPHY 6 | ||
| 72 | |||
| 73 | /* SUBCK* */ | ||
| 74 | #define R8A7740_CLK_SUBCK 9 | ||
| 75 | #define R8A7740_CLK_SUBCK2 10 | ||
| 76 | |||
| 77 | #endif /* __DT_BINDINGS_CLOCK_R8A7740_H__ */ | ||
diff --git a/include/dt-bindings/clock/vf610-clock.h b/include/dt-bindings/clock/vf610-clock.h index 00953d9484cb..d6b56b21539b 100644 --- a/include/dt-bindings/clock/vf610-clock.h +++ b/include/dt-bindings/clock/vf610-clock.h | |||
| @@ -166,6 +166,9 @@ | |||
| 166 | #define VF610_CLK_DMAMUX3 153 | 166 | #define VF610_CLK_DMAMUX3 153 |
| 167 | #define VF610_CLK_FLEXCAN0_EN 154 | 167 | #define VF610_CLK_FLEXCAN0_EN 154 |
| 168 | #define VF610_CLK_FLEXCAN1_EN 155 | 168 | #define VF610_CLK_FLEXCAN1_EN 155 |
| 169 | #define VF610_CLK_END 156 | 169 | #define VF610_CLK_PLL7_MAIN 156 |
| 170 | #define VF610_CLK_USBPHY0 157 | ||
| 171 | #define VF610_CLK_USBPHY1 158 | ||
| 172 | #define VF610_CLK_END 159 | ||
| 170 | 173 | ||
| 171 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ | 174 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ |
diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h index de4268d4987a..c8e3b3d1eded 100644 --- a/include/linux/clk/at91_pmc.h +++ b/include/linux/clk/at91_pmc.h | |||
| @@ -125,6 +125,7 @@ extern void __iomem *at91_pmc_base; | |||
| 125 | #define AT91_PMC_PLLADIV2 (1 << 12) /* PLLA divisor by 2 [some SAM9 only] */ | 125 | #define AT91_PMC_PLLADIV2 (1 << 12) /* PLLA divisor by 2 [some SAM9 only] */ |
| 126 | #define AT91_PMC_PLLADIV2_OFF (0 << 12) | 126 | #define AT91_PMC_PLLADIV2_OFF (0 << 12) |
| 127 | #define AT91_PMC_PLLADIV2_ON (1 << 12) | 127 | #define AT91_PMC_PLLADIV2_ON (1 << 12) |
| 128 | #define AT91_PMC_H32MXDIV BIT(24) | ||
| 128 | 129 | ||
| 129 | #define AT91_PMC_USB 0x38 /* USB Clock Register [some SAM9 only] */ | 130 | #define AT91_PMC_USB 0x38 /* USB Clock Register [some SAM9 only] */ |
| 130 | #define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */ | 131 | #define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */ |
diff --git a/include/linux/platform_data/tegra_emc.h b/include/linux/platform_data/tegra_emc.h deleted file mode 100644 index df67505e98f8..000000000000 --- a/include/linux/platform_data/tegra_emc.h +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Google, Inc. | ||
| 3 | * | ||
| 4 | * Author: | ||
| 5 | * Colin Cross <ccross@android.com> | ||
| 6 | * Olof Johansson <olof@lixom.net> | ||
| 7 | * | ||
| 8 | * This software is licensed under the terms of the GNU General Public | ||
| 9 | * License version 2, as published by the Free Software Foundation, and | ||
| 10 | * may be copied, distributed, and modified under those terms. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __TEGRA_EMC_H_ | ||
| 20 | #define __TEGRA_EMC_H_ | ||
| 21 | |||
| 22 | #define TEGRA_EMC_NUM_REGS 46 | ||
| 23 | |||
| 24 | struct tegra_emc_table { | ||
| 25 | unsigned long rate; | ||
| 26 | u32 regs[TEGRA_EMC_NUM_REGS]; | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct tegra_emc_pdata { | ||
| 30 | int num_tables; | ||
| 31 | struct tegra_emc_table *tables; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #endif | ||
