Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC platform updates from Olof Johansson:
"This branch contains part 1 of the platform updates for 3.10. Among
the highlights:

- Support for the new Atmel Cortex-A5 based platforms (SAMA5D3)
- New support for CSR SiRFatlas6 SoCs
- A handful of updates for NVidia T114 (a.k.a. Tegra 4)
- A bunch of updates for the shmobile platforms
- A handful of updates for davinci
- A few updates for Qualcomm MSM
- Plus a handful of other patches, defconfig updates, etc."

* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (135 commits)
ARM: tegra: pm: fix build error w/o PM_SLEEP
ARM: davinci: ensure global variables are declared
ARM: davinci: sram.c: fix incorrect type in assignment
ARM: davinci: da8xx dt: make file local symbols static
ARM: davinci: da8xx: add remoteproc support
ARM: socfpga: Upgrade clk driver for socfpga to make use of dts clock entries
ARM: socfpga: Add clock entries into device tree
ARM: socfpga: Enable soft reset
ARM: EXYNOS: replace cpumask by the corresponding macro
ARM: EXYNOS: handle properly the return values
ARM: EXYNOS: factor out the idle states
ARM: OMAP4: Enable fix for Cortex-A9 erratas
ARM: OMAP2+: Export SoC information to userspace
ARM: OMAP2+: SoC name and revision unification
ARM: OMAP2+: Move common part of late init into common function
ARM: tegra: pm: remove duplicated include from pm.c
ARM: davinci: da850: override mmc DT node device name
ARM: davinci: da850: add mmc DT entries
mmc: davinci_mmc: add DT support
ARM: SAMSUNG: check processor type before cache restoration in resume
...

+6040 -857
+11
Documentation/devicetree/bindings/arm/altera/socfpga-clk-manager.txt
··· 1 + Altera SOCFPGA Clock Manager 2 + 3 + Required properties: 4 + - compatible : "altr,clk-mgr" 5 + - reg : Should contain base address and length for Clock Manager 6 + 7 + Example: 8 + clkmgr@ffd04000 { 9 + compatible = "altr,clk-mgr"; 10 + reg = <0xffd04000 0x1000>; 11 + };
+19
Documentation/devicetree/bindings/arm/bcm/bcm,kona-timer.txt
··· 1 + Broadcom Kona Family timer 2 + ----------------------------------------------------- 3 + This timer is used in the following Broadcom SoCs: 4 + BCM11130, BCM11140, BCM11351, BCM28145, BCM28155 5 + 6 + Required properties: 7 + - compatible : "bcm,kona-timer" 8 + - reg : Register range for the timer 9 + - interrupts : interrupt for the timer 10 + - clock-frequency: frequency that the clock operates 11 + 12 + Example: 13 + timer@35006000 { 14 + compatible = "bcm,kona-timer"; 15 + reg = <0x35006000 0x1000>; 16 + interrupts = <0x0 7 0x4>; 17 + clock-frequency = <32768>; 18 + }; 19 +
+20 -21
Documentation/devicetree/bindings/arm/msm/timer.txt
··· 3 3 Properties: 4 4 5 5 - compatible : Should at least contain "qcom,msm-timer". More specific 6 - properties such as "qcom,msm-gpt" and "qcom,msm-dgt" specify a general 7 - purpose timer and a debug timer respectively. 6 + properties specify which subsystem the timers are paired with. 8 7 9 - - interrupts : Interrupt indicating a match event. 8 + "qcom,kpss-timer" - krait subsystem 9 + "qcom,scss-timer" - scorpion subsystem 10 10 11 - - reg : Specifies the base address of the timer registers. The second region 12 - specifies an optional register used to configure the clock divider. 11 + - interrupts : Interrupts for the the debug timer, the first general purpose 12 + timer, and optionally a second general purpose timer in that 13 + order. 13 14 14 - - clock-frequency : The frequency of the timer in Hz. 15 + - reg : Specifies the base address of the timer registers. 16 + 17 + - clock-frequency : The frequency of the debug timer and the general purpose 18 + timer(s) in Hz in that order. 15 19 16 20 Optional: 17 21 18 22 - cpu-offset : per-cpu offset used when the timer is accessed without the 19 - CPU remapping facilities. The offset is cpu-offset * cpu-nr. 23 + CPU remapping facilities. The offset is 24 + cpu-offset + (0x10000 * cpu-nr). 20 25 21 26 Example: 22 27 23 - timer@200a004 { 24 - compatible = "qcom,msm-gpt", "qcom,msm-timer"; 25 - interrupts = <1 2 0x301>; 26 - reg = <0x0200a004 0x10>; 27 - clock-frequency = <32768>; 28 - cpu-offset = <0x40000>; 29 - }; 30 - 31 - timer@200a024 { 32 - compatible = "qcom,msm-dgt", "qcom,msm-timer"; 33 - interrupts = <1 3 0x301>; 34 - reg = <0x0200a024 0x10>, 35 - <0x0200a034 0x4>; 36 - clock-frequency = <6750000>; 28 + timer@200a000 { 29 + compatible = "qcom,scss-timer", "qcom,msm-timer"; 30 + interrupts = <1 1 0x301>, 31 + <1 2 0x301>, 32 + <1 3 0x301>; 33 + reg = <0x0200a000 0x100>; 34 + clock-frequency = <19200000>, 35 + <32768>; 37 36 cpu-offset = <0x40000>; 38 37 };
+66 -1
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
··· 1 1 NVIDIA Tegra Power Management Controller (PMC) 2 2 3 - Properties: 3 + The PMC block interacts with an external Power Management Unit. The PMC 4 + mostly controls the entry and exit of the system from different sleep 5 + modes. It provides power-gating controllers for SoC and CPU power-islands. 6 + 7 + Required properties: 4 8 - name : Should be pmc 5 9 - compatible : Should contain "nvidia,tegra<chip>-pmc". 6 10 - reg : Offset and length of the register set for the device 11 + - clocks : Must contain an entry for each entry in clock-names. 12 + - clock-names : Must include the following entries: 13 + "pclk" (The Tegra clock of that name), 14 + "clk32k_in" (The 32KHz clock input to Tegra). 15 + 16 + Optional properties: 7 17 - nvidia,invert-interrupt : If present, inverts the PMU interrupt signal. 8 18 The PMU is an external Power Management Unit, whose interrupt output 9 19 signal is fed into the PMC. This signal is optionally inverted, and then 10 20 fed into the ARM GIC. The PMC is not involved in the detection or 11 21 handling of this interrupt signal, merely its inversion. 22 + - nvidia,suspend-mode : The suspend mode that the platform should use. 23 + Valid values are 0, 1 and 2: 24 + 0 (LP0): CPU + Core voltage off and DRAM in self-refresh 25 + 1 (LP1): CPU voltage off and DRAM in self-refresh 26 + 2 (LP2): CPU voltage off 27 + - nvidia,core-power-req-active-high : Boolean, core power request active-high 28 + - nvidia,sys-clock-req-active-high : Boolean, system clock request active-high 29 + - nvidia,combined-power-req : Boolean, combined power request for CPU & Core 30 + - nvidia,cpu-pwr-good-en : Boolean, CPU power good signal (from PMIC to PMC) 31 + is enabled. 32 + 33 + Required properties when nvidia,suspend-mode is specified: 34 + - nvidia,cpu-pwr-good-time : CPU power good time in uS. 35 + - nvidia,cpu-pwr-off-time : CPU power off time in uS. 36 + - nvidia,core-pwr-good-time : <Oscillator-stable-time Power-stable-time> 37 + Core power good time in uS. 38 + - nvidia,core-pwr-off-time : Core power off time in uS. 39 + 40 + Required properties when nvidia,suspend-mode=<0>: 41 + - nvidia,lp0-vec : <start length> Starting address and length of LP0 vector 42 + The LP0 vector contains the warm boot code that is executed by AVP when 43 + resuming from the LP0 state. The AVP (Audio-Video Processor) is an ARM7 44 + processor and always being the first boot processor when chip is power on 45 + or resume from deep sleep mode. When the system is resumed from the deep 46 + sleep mode, the warm boot code will restore some PLLs, clocks and then 47 + bring up CPU0 for resuming the system. 12 48 13 49 Example: 14 50 51 + / SoC dts including file 15 52 pmc@7000f400 { 16 53 compatible = "nvidia,tegra20-pmc"; 17 54 reg = <0x7000e400 0x400>; 55 + clocks = <&tegra_car 110>, <&clk32k_in>; 56 + clock-names = "pclk", "clk32k_in"; 18 57 nvidia,invert-interrupt; 58 + nvidia,suspend-mode = <1>; 59 + nvidia,cpu-pwr-good-time = <2000>; 60 + nvidia,cpu-pwr-off-time = <100>; 61 + nvidia,core-pwr-good-time = <3845 3845>; 62 + nvidia,core-pwr-off-time = <458>; 63 + nvidia,core-power-req-active-high; 64 + nvidia,sys-clock-req-active-high; 65 + nvidia,lp0-vec = <0xbdffd000 0x2000>; 66 + }; 67 + 68 + / Tegra board dts file 69 + { 70 + ... 71 + clocks { 72 + compatible = "simple-bus"; 73 + #address-cells = <1>; 74 + #size-cells = <0>; 75 + 76 + clk32k_in: clock { 77 + compatible = "fixed-clock"; 78 + reg=<0>; 79 + #clock-cells = <0>; 80 + clock-frequency = <32768>; 81 + }; 82 + }; 83 + ... 19 84 };
+18
Documentation/devicetree/bindings/clock/altr_socfpga.txt
··· 1 + Device Tree Clock bindings for Altera's SoCFPGA platform 2 + 3 + This binding uses the common clock binding[1]. 4 + 5 + [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 6 + 7 + Required properties: 8 + - compatible : shall be one of the following: 9 + "altr,socfpga-pll-clock" - for a PLL clock 10 + "altr,socfpga-perip-clock" - The peripheral clock divided from the 11 + PLL clock. 12 + - reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. 13 + - clocks : shall be the input parent clock phandle for the clock. This is 14 + either an oscillator or a pll output. 15 + - #clock-cells : from common clock binding, shall be set to 0. 16 + 17 + Optional properties: 18 + - fixed-divider : If clocks have a fixed divider value, use this property.
+33
Documentation/devicetree/bindings/mmc/davinci_mmc.txt
··· 1 + * TI Highspeed MMC host controller for DaVinci 2 + 3 + The Highspeed MMC Host Controller on TI DaVinci family 4 + provides an interface for MMC, SD and SDIO types of memory cards. 5 + 6 + This file documents the properties used by the davinci_mmc driver. 7 + 8 + Required properties: 9 + - compatible: 10 + Should be "ti,da830-mmc": for da830, da850, dm365 11 + Should be "ti,dm355-mmc": for dm355, dm644x 12 + 13 + Optional properties: 14 + - bus-width: Number of data lines, can be <1>, <4>, or <8>, default <1> 15 + - max-frequency: Maximum operating clock frequency, default 25MHz. 16 + - dmas: List of DMA specifiers with the controller specific format 17 + as described in the generic DMA client binding. A tx and rx 18 + specifier is required. 19 + - dma-names: RX and TX DMA request names. These strings correspond 20 + 1:1 with the DMA specifiers listed in dmas. 21 + 22 + Example: 23 + mmc0: mmc@1c40000 { 24 + compatible = "ti,da830-mmc", 25 + reg = <0x40000 0x1000>; 26 + interrupts = <16>; 27 + status = "okay"; 28 + bus-width = <4>; 29 + max-frequency = <50000000>; 30 + dmas = <&edma 16 31 + &edma 17>; 32 + dma-names = "rx", "tx"; 33 + };
+6
Documentation/kernel-parameters.txt
··· 45 45 AX25 Appropriate AX.25 support is enabled. 46 46 BLACKFIN Blackfin architecture is enabled. 47 47 CLK Common clock infrastructure is enabled. 48 + CMA Contiguous Memory Area support is enabled. 48 49 DRM Direct Rendering Management support is enabled. 49 50 DYNAMIC_DEBUG Build in debug messages and enable them at runtime 50 51 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled ··· 2724 2723 rootwait [KNL] Wait (indefinitely) for root device to show up. 2725 2724 Useful for devices that are detected asynchronously 2726 2725 (e.g. USB and MMC devices). 2726 + 2727 + rproc_mem=nn[KMG][@address] 2728 + [KNL,ARM,CMA] Remoteproc physical memory block. 2729 + Memory area to be used by remote processor image, 2730 + managed by CMA. 2727 2731 2728 2732 rw [KNL] Mount root device read-write on boot 2729 2733
+2 -1
arch/arm/Kconfig
··· 671 671 select HAVE_CLK 672 672 select HAVE_SMP 673 673 select MIGHT_HAVE_CACHE_L2X0 674 + select SOC_BUS 674 675 select SPARSE_IRQ 675 676 select USE_OF 676 677 help ··· 1667 1666 int 1668 1667 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA 1669 1668 default 512 if SOC_OMAP5 1670 - default 355 if ARCH_U8500 1669 + default 392 if ARCH_U8500 1671 1670 default 288 if ARCH_VT8500 || ARCH_SUNXI 1672 1671 default 264 if MACH_H4700 1673 1672 default 0
+5
arch/arm/boot/dts/Makefile
··· 33 33 dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb 34 34 dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb 35 35 dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb 36 + # sama5d3 37 + dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb 38 + dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb 39 + dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb 40 + dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb 36 41 37 42 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb 38 43 dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb
+78
arch/arm/boot/dts/atlas6-evb.dts
··· 1 + /* 2 + * DTS file for CSR SiRFatlas6 Evaluation Board 3 + * 4 + * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company. 5 + * 6 + * Licensed under GPLv2 or later. 7 + */ 8 + 9 + /dts-v1/; 10 + 11 + /include/ "atlas6.dtsi" 12 + 13 + / { 14 + model = "CSR SiRFatlas6 Evaluation Board"; 15 + compatible = "sirf,atlas6-cb", "sirf,atlas6"; 16 + 17 + memory { 18 + reg = <0x00000000 0x20000000>; 19 + }; 20 + 21 + axi { 22 + peri-iobg { 23 + uart@b0060000 { 24 + pinctrl-names = "default"; 25 + pinctrl-0 = <&uart1_pins_a>; 26 + }; 27 + spi@b00d0000 { 28 + status = "okay"; 29 + pinctrl-names = "default"; 30 + pinctrl-0 = <&spi0_pins_a>; 31 + spi@0 { 32 + compatible = "spidev"; 33 + reg = <0>; 34 + spi-max-frequency = <1000000>; 35 + }; 36 + }; 37 + spi@b0170000 { 38 + pinctrl-names = "default"; 39 + pinctrl-0 = <&spi1_pins_a>; 40 + }; 41 + i2c0: i2c@b00e0000 { 42 + status = "okay"; 43 + pinctrl-names = "default"; 44 + pinctrl-0 = <&i2c0_pins_a>; 45 + lcd@40 { 46 + compatible = "sirf,lcd"; 47 + reg = <0x40>; 48 + }; 49 + }; 50 + 51 + }; 52 + disp-iobg { 53 + lcd@90010000 { 54 + status = "okay"; 55 + pinctrl-names = "default"; 56 + pinctrl-0 = <&lcd_24pins_a>; 57 + }; 58 + }; 59 + }; 60 + display: display@0 { 61 + panels { 62 + panel0: panel@0 { 63 + panel-name = "Innolux TFT"; 64 + hactive = <800>; 65 + vactive = <480>; 66 + left_margin = <20>; 67 + right_margin = <234>; 68 + upper_margin = <3>; 69 + lower_margin = <41>; 70 + hsync_len = <3>; 71 + vsync_len = <2>; 72 + pixclock = <33264000>; 73 + sync = <3>; 74 + timing = <0x88>; 75 + }; 76 + }; 77 + }; 78 + };
+668
arch/arm/boot/dts/atlas6.dtsi
··· 1 + /* 2 + * DTS file for CSR SiRFatlas6 SoC 3 + * 4 + * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company. 5 + * 6 + * Licensed under GPLv2 or later. 7 + */ 8 + 9 + /include/ "skeleton.dtsi" 10 + / { 11 + compatible = "sirf,atlas6"; 12 + #address-cells = <1>; 13 + #size-cells = <1>; 14 + interrupt-parent = <&intc>; 15 + 16 + cpus { 17 + #address-cells = <1>; 18 + #size-cells = <0>; 19 + 20 + cpu@0 { 21 + reg = <0x0>; 22 + d-cache-line-size = <32>; 23 + i-cache-line-size = <32>; 24 + d-cache-size = <32768>; 25 + i-cache-size = <32768>; 26 + /* from bootloader */ 27 + timebase-frequency = <0>; 28 + bus-frequency = <0>; 29 + clock-frequency = <0>; 30 + }; 31 + }; 32 + 33 + axi { 34 + compatible = "simple-bus"; 35 + #address-cells = <1>; 36 + #size-cells = <1>; 37 + ranges = <0x40000000 0x40000000 0x80000000>; 38 + 39 + intc: interrupt-controller@80020000 { 40 + #interrupt-cells = <1>; 41 + interrupt-controller; 42 + compatible = "sirf,prima2-intc"; 43 + reg = <0x80020000 0x1000>; 44 + }; 45 + 46 + sys-iobg { 47 + compatible = "simple-bus"; 48 + #address-cells = <1>; 49 + #size-cells = <1>; 50 + ranges = <0x88000000 0x88000000 0x40000>; 51 + 52 + clks: clock-controller@88000000 { 53 + compatible = "sirf,atlas6-clkc"; 54 + reg = <0x88000000 0x1000>; 55 + interrupts = <3>; 56 + #clock-cells = <1>; 57 + }; 58 + 59 + reset-controller@88010000 { 60 + compatible = "sirf,prima2-rstc"; 61 + reg = <0x88010000 0x1000>; 62 + }; 63 + 64 + rsc-controller@88020000 { 65 + compatible = "sirf,prima2-rsc"; 66 + reg = <0x88020000 0x1000>; 67 + }; 68 + }; 69 + 70 + mem-iobg { 71 + compatible = "simple-bus"; 72 + #address-cells = <1>; 73 + #size-cells = <1>; 74 + ranges = <0x90000000 0x90000000 0x10000>; 75 + 76 + memory-controller@90000000 { 77 + compatible = "sirf,prima2-memc"; 78 + reg = <0x90000000 0x10000>; 79 + interrupts = <27>; 80 + clocks = <&clks 5>; 81 + }; 82 + }; 83 + 84 + disp-iobg { 85 + compatible = "simple-bus"; 86 + #address-cells = <1>; 87 + #size-cells = <1>; 88 + ranges = <0x90010000 0x90010000 0x30000>; 89 + 90 + lcd@90010000 { 91 + compatible = "sirf,prima2-lcd"; 92 + reg = <0x90010000 0x20000>; 93 + interrupts = <30>; 94 + clocks = <&clks 34>; 95 + display=<&display>; 96 + /* later transfer to pwm */ 97 + bl-gpio = <&gpio 7 0>; 98 + default-panel = <&panel0>; 99 + }; 100 + 101 + vpp@90020000 { 102 + compatible = "sirf,prima2-vpp"; 103 + reg = <0x90020000 0x10000>; 104 + interrupts = <31>; 105 + clocks = <&clks 35>; 106 + }; 107 + }; 108 + 109 + graphics-iobg { 110 + compatible = "simple-bus"; 111 + #address-cells = <1>; 112 + #size-cells = <1>; 113 + ranges = <0x98000000 0x98000000 0x8000000>; 114 + 115 + graphics@98000000 { 116 + compatible = "powervr,sgx510"; 117 + reg = <0x98000000 0x8000000>; 118 + interrupts = <6>; 119 + clocks = <&clks 32>; 120 + }; 121 + }; 122 + 123 + dsp-iobg { 124 + compatible = "simple-bus"; 125 + #address-cells = <1>; 126 + #size-cells = <1>; 127 + ranges = <0xa8000000 0xa8000000 0x2000000>; 128 + 129 + dspif@a8000000 { 130 + compatible = "sirf,prima2-dspif"; 131 + reg = <0xa8000000 0x10000>; 132 + interrupts = <9>; 133 + }; 134 + 135 + gps@a8010000 { 136 + compatible = "sirf,prima2-gps"; 137 + reg = <0xa8010000 0x10000>; 138 + interrupts = <7>; 139 + clocks = <&clks 9>; 140 + }; 141 + 142 + dsp@a9000000 { 143 + compatible = "sirf,prima2-dsp"; 144 + reg = <0xa9000000 0x1000000>; 145 + interrupts = <8>; 146 + clocks = <&clks 8>; 147 + }; 148 + }; 149 + 150 + peri-iobg { 151 + compatible = "simple-bus"; 152 + #address-cells = <1>; 153 + #size-cells = <1>; 154 + ranges = <0xb0000000 0xb0000000 0x180000>, 155 + <0x56000000 0x56000000 0x1b00000>; 156 + 157 + timer@b0020000 { 158 + compatible = "sirf,prima2-tick"; 159 + reg = <0xb0020000 0x1000>; 160 + interrupts = <0>; 161 + }; 162 + 163 + nand@b0030000 { 164 + compatible = "sirf,prima2-nand"; 165 + reg = <0xb0030000 0x10000>; 166 + interrupts = <41>; 167 + clocks = <&clks 26>; 168 + }; 169 + 170 + audio@b0040000 { 171 + compatible = "sirf,prima2-audio"; 172 + reg = <0xb0040000 0x10000>; 173 + interrupts = <35>; 174 + clocks = <&clks 27>; 175 + }; 176 + 177 + uart0: uart@b0050000 { 178 + cell-index = <0>; 179 + compatible = "sirf,prima2-uart"; 180 + reg = <0xb0050000 0x1000>; 181 + interrupts = <17>; 182 + fifosize = <128>; 183 + clocks = <&clks 13>; 184 + }; 185 + 186 + uart1: uart@b0060000 { 187 + cell-index = <1>; 188 + compatible = "sirf,prima2-uart"; 189 + reg = <0xb0060000 0x1000>; 190 + interrupts = <18>; 191 + fifosize = <32>; 192 + clocks = <&clks 14>; 193 + }; 194 + 195 + uart2: uart@b0070000 { 196 + cell-index = <2>; 197 + compatible = "sirf,prima2-uart"; 198 + reg = <0xb0070000 0x1000>; 199 + interrupts = <19>; 200 + fifosize = <128>; 201 + clocks = <&clks 15>; 202 + }; 203 + 204 + usp0: usp@b0080000 { 205 + cell-index = <0>; 206 + compatible = "sirf,prima2-usp"; 207 + reg = <0xb0080000 0x10000>; 208 + interrupts = <20>; 209 + clocks = <&clks 28>; 210 + }; 211 + 212 + usp1: usp@b0090000 { 213 + cell-index = <1>; 214 + compatible = "sirf,prima2-usp"; 215 + reg = <0xb0090000 0x10000>; 216 + interrupts = <21>; 217 + clocks = <&clks 29>; 218 + }; 219 + 220 + dmac0: dma-controller@b00b0000 { 221 + cell-index = <0>; 222 + compatible = "sirf,prima2-dmac"; 223 + reg = <0xb00b0000 0x10000>; 224 + interrupts = <12>; 225 + clocks = <&clks 24>; 226 + }; 227 + 228 + dmac1: dma-controller@b0160000 { 229 + cell-index = <1>; 230 + compatible = "sirf,prima2-dmac"; 231 + reg = <0xb0160000 0x10000>; 232 + interrupts = <13>; 233 + clocks = <&clks 25>; 234 + }; 235 + 236 + vip@b00C0000 { 237 + compatible = "sirf,prima2-vip"; 238 + reg = <0xb00C0000 0x10000>; 239 + clocks = <&clks 31>; 240 + }; 241 + 242 + spi0: spi@b00d0000 { 243 + cell-index = <0>; 244 + compatible = "sirf,prima2-spi"; 245 + reg = <0xb00d0000 0x10000>; 246 + interrupts = <15>; 247 + sirf,spi-num-chipselects = <1>; 248 + cs-gpios = <&gpio 0 0>; 249 + sirf,spi-dma-rx-channel = <25>; 250 + sirf,spi-dma-tx-channel = <20>; 251 + #address-cells = <1>; 252 + #size-cells = <0>; 253 + clocks = <&clks 19>; 254 + status = "disabled"; 255 + }; 256 + 257 + spi1: spi@b0170000 { 258 + cell-index = <1>; 259 + compatible = "sirf,prima2-spi"; 260 + reg = <0xb0170000 0x10000>; 261 + interrupts = <16>; 262 + clocks = <&clks 20>; 263 + status = "disabled"; 264 + }; 265 + 266 + i2c0: i2c@b00e0000 { 267 + cell-index = <0>; 268 + compatible = "sirf,prima2-i2c"; 269 + reg = <0xb00e0000 0x10000>; 270 + interrupts = <24>; 271 + #address-cells = <1>; 272 + #size-cells = <0>; 273 + clocks = <&clks 17>; 274 + }; 275 + 276 + i2c1: i2c@b00f0000 { 277 + cell-index = <1>; 278 + compatible = "sirf,prima2-i2c"; 279 + reg = <0xb00f0000 0x10000>; 280 + interrupts = <25>; 281 + #address-cells = <1>; 282 + #size-cells = <0>; 283 + clocks = <&clks 18>; 284 + }; 285 + 286 + tsc@b0110000 { 287 + compatible = "sirf,prima2-tsc"; 288 + reg = <0xb0110000 0x10000>; 289 + interrupts = <33>; 290 + clocks = <&clks 16>; 291 + }; 292 + 293 + gpio: pinctrl@b0120000 { 294 + #gpio-cells = <2>; 295 + #interrupt-cells = <2>; 296 + compatible = "sirf,atlas6-pinctrl"; 297 + reg = <0xb0120000 0x10000>; 298 + interrupts = <43 44 45 46 47>; 299 + gpio-controller; 300 + interrupt-controller; 301 + 302 + lcd_16pins_a: lcd0@0 { 303 + lcd { 304 + sirf,pins = "lcd_16bitsgrp"; 305 + sirf,function = "lcd_16bits"; 306 + }; 307 + }; 308 + lcd_18pins_a: lcd0@1 { 309 + lcd { 310 + sirf,pins = "lcd_18bitsgrp"; 311 + sirf,function = "lcd_18bits"; 312 + }; 313 + }; 314 + lcd_24pins_a: lcd0@2 { 315 + lcd { 316 + sirf,pins = "lcd_24bitsgrp"; 317 + sirf,function = "lcd_24bits"; 318 + }; 319 + }; 320 + lcdrom_pins_a: lcdrom0@0 { 321 + lcd { 322 + sirf,pins = "lcdromgrp"; 323 + sirf,function = "lcdrom"; 324 + }; 325 + }; 326 + uart0_pins_a: uart0@0 { 327 + uart { 328 + sirf,pins = "uart0grp"; 329 + sirf,function = "uart0"; 330 + }; 331 + }; 332 + uart1_pins_a: uart1@0 { 333 + uart { 334 + sirf,pins = "uart1grp"; 335 + sirf,function = "uart1"; 336 + }; 337 + }; 338 + uart2_pins_a: uart2@0 { 339 + uart { 340 + sirf,pins = "uart2grp"; 341 + sirf,function = "uart2"; 342 + }; 343 + }; 344 + uart2_noflow_pins_a: uart2@1 { 345 + uart { 346 + sirf,pins = "uart2_nostreamctrlgrp"; 347 + sirf,function = "uart2_nostreamctrl"; 348 + }; 349 + }; 350 + spi0_pins_a: spi0@0 { 351 + spi { 352 + sirf,pins = "spi0grp"; 353 + sirf,function = "spi0"; 354 + }; 355 + }; 356 + spi1_pins_a: spi1@0 { 357 + spi { 358 + sirf,pins = "spi1grp"; 359 + sirf,function = "spi1"; 360 + }; 361 + }; 362 + i2c0_pins_a: i2c0@0 { 363 + i2c { 364 + sirf,pins = "i2c0grp"; 365 + sirf,function = "i2c0"; 366 + }; 367 + }; 368 + i2c1_pins_a: i2c1@0 { 369 + i2c { 370 + sirf,pins = "i2c1grp"; 371 + sirf,function = "i2c1"; 372 + }; 373 + }; 374 + pwm0_pins_a: pwm0@0 { 375 + pwm { 376 + sirf,pins = "pwm0grp"; 377 + sirf,function = "pwm0"; 378 + }; 379 + }; 380 + pwm1_pins_a: pwm1@0 { 381 + pwm { 382 + sirf,pins = "pwm1grp"; 383 + sirf,function = "pwm1"; 384 + }; 385 + }; 386 + pwm2_pins_a: pwm2@0 { 387 + pwm { 388 + sirf,pins = "pwm2grp"; 389 + sirf,function = "pwm2"; 390 + }; 391 + }; 392 + pwm3_pins_a: pwm3@0 { 393 + pwm { 394 + sirf,pins = "pwm3grp"; 395 + sirf,function = "pwm3"; 396 + }; 397 + }; 398 + pwm4_pins_a: pwm4@0 { 399 + pwm { 400 + sirf,pins = "pwm4grp"; 401 + sirf,function = "pwm4"; 402 + }; 403 + }; 404 + gps_pins_a: gps@0 { 405 + gps { 406 + sirf,pins = "gpsgrp"; 407 + sirf,function = "gps"; 408 + }; 409 + }; 410 + vip_pins_a: vip@0 { 411 + vip { 412 + sirf,pins = "vipgrp"; 413 + sirf,function = "vip"; 414 + }; 415 + }; 416 + sdmmc0_pins_a: sdmmc0@0 { 417 + sdmmc0 { 418 + sirf,pins = "sdmmc0grp"; 419 + sirf,function = "sdmmc0"; 420 + }; 421 + }; 422 + sdmmc1_pins_a: sdmmc1@0 { 423 + sdmmc1 { 424 + sirf,pins = "sdmmc1grp"; 425 + sirf,function = "sdmmc1"; 426 + }; 427 + }; 428 + sdmmc2_pins_a: sdmmc2@0 { 429 + sdmmc2 { 430 + sirf,pins = "sdmmc2grp"; 431 + sirf,function = "sdmmc2"; 432 + }; 433 + }; 434 + sdmmc2_nowp_pins_a: sdmmc2_nowp@0 { 435 + sdmmc2_nowp { 436 + sirf,pins = "sdmmc2_nowpgrp"; 437 + sirf,function = "sdmmc2_nowp"; 438 + }; 439 + }; 440 + sdmmc3_pins_a: sdmmc3@0 { 441 + sdmmc3 { 442 + sirf,pins = "sdmmc3grp"; 443 + sirf,function = "sdmmc3"; 444 + }; 445 + }; 446 + sdmmc5_pins_a: sdmmc5@0 { 447 + sdmmc5 { 448 + sirf,pins = "sdmmc5grp"; 449 + sirf,function = "sdmmc5"; 450 + }; 451 + }; 452 + i2s_pins_a: i2s@0 { 453 + i2s { 454 + sirf,pins = "i2sgrp"; 455 + sirf,function = "i2s"; 456 + }; 457 + }; 458 + i2s_no_din_pins_a: i2s_no_din@0 { 459 + i2s_no_din { 460 + sirf,pins = "i2s_no_dingrp"; 461 + sirf,function = "i2s_no_din"; 462 + }; 463 + }; 464 + i2s_6chn_pins_a: i2s_6chn@0 { 465 + i2s_6chn { 466 + sirf,pins = "i2s_6chngrp"; 467 + sirf,function = "i2s_6chn"; 468 + }; 469 + }; 470 + ac97_pins_a: ac97@0 { 471 + ac97 { 472 + sirf,pins = "ac97grp"; 473 + sirf,function = "ac97"; 474 + }; 475 + }; 476 + nand_pins_a: nand@0 { 477 + nand { 478 + sirf,pins = "nandgrp"; 479 + sirf,function = "nand"; 480 + }; 481 + }; 482 + usp0_pins_a: usp0@0 { 483 + usp0 { 484 + sirf,pins = "usp0grp"; 485 + sirf,function = "usp0"; 486 + }; 487 + }; 488 + usp1_pins_a: usp1@0 { 489 + usp1 { 490 + sirf,pins = "usp1grp"; 491 + sirf,function = "usp1"; 492 + }; 493 + }; 494 + usb0_upli_drvbus_pins_a: usb0_upli_drvbus@0 { 495 + usb0_upli_drvbus { 496 + sirf,pins = "usb0_upli_drvbusgrp"; 497 + sirf,function = "usb0_upli_drvbus"; 498 + }; 499 + }; 500 + usb1_utmi_drvbus_pins_a: usb1_utmi_drvbus@0 { 501 + usb1_utmi_drvbus { 502 + sirf,pins = "usb1_utmi_drvbusgrp"; 503 + sirf,function = "usb1_utmi_drvbus"; 504 + }; 505 + }; 506 + warm_rst_pins_a: warm_rst@0 { 507 + warm_rst { 508 + sirf,pins = "warm_rstgrp"; 509 + sirf,function = "warm_rst"; 510 + }; 511 + }; 512 + pulse_count_pins_a: pulse_count@0 { 513 + pulse_count { 514 + sirf,pins = "pulse_countgrp"; 515 + sirf,function = "pulse_count"; 516 + }; 517 + }; 518 + cko0_rst_pins_a: cko0_rst@0 { 519 + cko0_rst { 520 + sirf,pins = "cko0_rstgrp"; 521 + sirf,function = "cko0_rst"; 522 + }; 523 + }; 524 + cko1_rst_pins_a: cko1_rst@0 { 525 + cko1_rst { 526 + sirf,pins = "cko1_rstgrp"; 527 + sirf,function = "cko1_rst"; 528 + }; 529 + }; 530 + }; 531 + 532 + pwm@b0130000 { 533 + compatible = "sirf,prima2-pwm"; 534 + reg = <0xb0130000 0x10000>; 535 + clocks = <&clks 21>; 536 + }; 537 + 538 + efusesys@b0140000 { 539 + compatible = "sirf,prima2-efuse"; 540 + reg = <0xb0140000 0x10000>; 541 + clocks = <&clks 22>; 542 + }; 543 + 544 + pulsec@b0150000 { 545 + compatible = "sirf,prima2-pulsec"; 546 + reg = <0xb0150000 0x10000>; 547 + interrupts = <48>; 548 + clocks = <&clks 23>; 549 + }; 550 + 551 + pci-iobg { 552 + compatible = "sirf,prima2-pciiobg", "simple-bus"; 553 + #address-cells = <1>; 554 + #size-cells = <1>; 555 + ranges = <0x56000000 0x56000000 0x1b00000>; 556 + 557 + sd0: sdhci@56000000 { 558 + cell-index = <0>; 559 + compatible = "sirf,prima2-sdhc"; 560 + reg = <0x56000000 0x100000>; 561 + interrupts = <38>; 562 + bus-width = <8>; 563 + clocks = <&clks 36>; 564 + }; 565 + 566 + sd1: sdhci@56100000 { 567 + cell-index = <1>; 568 + compatible = "sirf,prima2-sdhc"; 569 + reg = <0x56100000 0x100000>; 570 + interrupts = <38>; 571 + status = "disabled"; 572 + clocks = <&clks 36>; 573 + }; 574 + 575 + sd2: sdhci@56200000 { 576 + cell-index = <2>; 577 + compatible = "sirf,prima2-sdhc"; 578 + reg = <0x56200000 0x100000>; 579 + interrupts = <23>; 580 + status = "disabled"; 581 + clocks = <&clks 37>; 582 + }; 583 + 584 + sd3: sdhci@56300000 { 585 + cell-index = <3>; 586 + compatible = "sirf,prima2-sdhc"; 587 + reg = <0x56300000 0x100000>; 588 + interrupts = <23>; 589 + status = "disabled"; 590 + clocks = <&clks 37>; 591 + }; 592 + 593 + sd5: sdhci@56500000 { 594 + cell-index = <5>; 595 + compatible = "sirf,prima2-sdhc"; 596 + reg = <0x56500000 0x100000>; 597 + interrupts = <39>; 598 + status = "disabled"; 599 + clocks = <&clks 38>; 600 + }; 601 + 602 + pci-copy@57900000 { 603 + compatible = "sirf,prima2-pcicp"; 604 + reg = <0x57900000 0x100000>; 605 + interrupts = <40>; 606 + }; 607 + 608 + rom-interface@57a00000 { 609 + compatible = "sirf,prima2-romif"; 610 + reg = <0x57a00000 0x100000>; 611 + }; 612 + }; 613 + }; 614 + 615 + rtc-iobg { 616 + compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus"; 617 + #address-cells = <1>; 618 + #size-cells = <1>; 619 + reg = <0x80030000 0x10000>; 620 + 621 + gpsrtc@1000 { 622 + compatible = "sirf,prima2-gpsrtc"; 623 + reg = <0x1000 0x1000>; 624 + interrupts = <55 56 57>; 625 + }; 626 + 627 + sysrtc@2000 { 628 + compatible = "sirf,prima2-sysrtc"; 629 + reg = <0x2000 0x1000>; 630 + interrupts = <52 53 54>; 631 + }; 632 + 633 + pwrc@3000 { 634 + compatible = "sirf,prima2-pwrc"; 635 + reg = <0x3000 0x1000>; 636 + interrupts = <32>; 637 + }; 638 + }; 639 + 640 + uus-iobg { 641 + compatible = "simple-bus"; 642 + #address-cells = <1>; 643 + #size-cells = <1>; 644 + ranges = <0xb8000000 0xb8000000 0x40000>; 645 + 646 + usb0: usb@b00e0000 { 647 + compatible = "chipidea,ci13611a-prima2"; 648 + reg = <0xb8000000 0x10000>; 649 + interrupts = <10>; 650 + clocks = <&clks 40>; 651 + }; 652 + 653 + usb1: usb@b00f0000 { 654 + compatible = "chipidea,ci13611a-prima2"; 655 + reg = <0xb8010000 0x10000>; 656 + interrupts = <11>; 657 + clocks = <&clks 41>; 658 + }; 659 + 660 + security@b00f0000 { 661 + compatible = "sirf,prima2-security"; 662 + reg = <0xb8030000 0x10000>; 663 + interrupts = <42>; 664 + clocks = <&clks 7>; 665 + }; 666 + }; 667 + }; 668 + };
+8
arch/arm/boot/dts/bcm11351.dtsi
··· 47 47 cache-unified; 48 48 cache-level = <2>; 49 49 }; 50 + 51 + timer@35006000 { 52 + compatible = "bcm,kona-timer"; 53 + reg = <0x35006000 0x1000>; 54 + interrupts = <0x0 7 0x4>; 55 + clock-frequency = <32768>; 56 + }; 57 + 50 58 };
+70
arch/arm/boot/dts/da850-evm.dts
··· 35 35 clock-frequency = <100000>; 36 36 pinctrl-names = "default"; 37 37 pinctrl-0 = <&i2c0_pins>; 38 + 39 + tps: tps@48 { 40 + reg = <0x48>; 41 + }; 38 42 }; 39 43 wdt: wdt@1c21000 { 40 44 status = "okay"; 45 + }; 46 + mmc0: mmc@1c40000 { 47 + max-frequency = <50000000>; 48 + bus-width = <4>; 49 + status = "okay"; 50 + pinctrl-names = "default"; 51 + pinctrl-0 = <&mmc0_pins>; 41 52 }; 42 53 }; 43 54 nand_cs3@62000000 { 44 55 status = "okay"; 45 56 pinctrl-names = "default"; 46 57 pinctrl-0 = <&nand_cs3_pins>; 58 + }; 59 + vbat: fixedregulator@0 { 60 + compatible = "regulator-fixed"; 61 + regulator-name = "vbat"; 62 + regulator-min-microvolt = <5000000>; 63 + regulator-max-microvolt = <5000000>; 64 + regulator-boot-on; 65 + }; 66 + }; 67 + 68 + /include/ "tps6507x.dtsi" 69 + 70 + &tps { 71 + vdcdc1_2-supply = <&vbat>; 72 + vdcdc3-supply = <&vbat>; 73 + vldo1_2-supply = <&vbat>; 74 + 75 + regulators { 76 + vdcdc1_reg: regulator@0 { 77 + regulator-name = "VDCDC1_3.3V"; 78 + regulator-min-microvolt = <3150000>; 79 + regulator-max-microvolt = <3450000>; 80 + regulator-always-on; 81 + regulator-boot-on; 82 + }; 83 + 84 + vdcdc2_reg: regulator@1 { 85 + regulator-name = "VDCDC2_3.3V"; 86 + regulator-min-microvolt = <1710000>; 87 + regulator-max-microvolt = <3450000>; 88 + regulator-always-on; 89 + regulator-boot-on; 90 + ti,defdcdc_default = <1>; 91 + }; 92 + 93 + vdcdc3_reg: regulator@2 { 94 + regulator-name = "VDCDC3_1.2V"; 95 + regulator-min-microvolt = <950000>; 96 + regulator-max-microvolt = <1350000>; 97 + regulator-always-on; 98 + regulator-boot-on; 99 + ti,defdcdc_default = <1>; 100 + }; 101 + 102 + ldo1_reg: regulator@3 { 103 + regulator-name = "LDO1_1.8V"; 104 + regulator-min-microvolt = <1710000>; 105 + regulator-max-microvolt = <1890000>; 106 + regulator-always-on; 107 + regulator-boot-on; 108 + }; 109 + 110 + ldo2_reg: regulator@4 { 111 + regulator-name = "LDO2_1.2V"; 112 + regulator-min-microvolt = <1140000>; 113 + regulator-max-microvolt = <1320000>; 114 + regulator-always-on; 115 + regulator-boot-on; 116 + }; 47 117 }; 48 118 };
+15
arch/arm/boot/dts/da850.dtsi
··· 62 62 0x10 0x00002200 0x0000ff00 63 63 >; 64 64 }; 65 + mmc0_pins: pinmux_mmc_pins { 66 + pinctrl-single,bits = < 67 + /* MMCSD0_DAT[3] MMCSD0_DAT[2] 68 + * MMCSD0_DAT[1] MMCSD0_DAT[0] 69 + * MMCSD0_CMD MMCSD0_CLK 70 + */ 71 + 0x28 0x00222222 0x00ffffff 72 + >; 73 + }; 65 74 }; 66 75 serial0: serial@1c42000 { 67 76 compatible = "ns16550a"; ··· 114 105 wdt: wdt@1c21000 { 115 106 compatible = "ti,davinci-wdt"; 116 107 reg = <0x21000 0x1000>; 108 + status = "disabled"; 109 + }; 110 + mmc0: mmc@1c40000 { 111 + compatible = "ti,da830-mmc"; 112 + reg = <0x40000 0x1000>; 113 + interrupts = <16>; 117 114 status = "disabled"; 118 115 }; 119 116 };
+7 -13
arch/arm/boot/dts/msm8660-surf.dts
··· 16 16 }; 17 17 18 18 timer@2000004 { 19 - compatible = "qcom,msm-gpt", "qcom,msm-timer"; 20 - interrupts = <1 1 0x301>; 21 - reg = <0x02000004 0x10>; 22 - clock-frequency = <32768>; 23 - cpu-offset = <0x40000>; 24 - }; 25 - 26 - timer@2000024 { 27 - compatible = "qcom,msm-dgt", "qcom,msm-timer"; 28 - interrupts = <1 0 0x301>; 29 - reg = <0x02000024 0x10>, 30 - <0x02000034 0x4>; 31 - clock-frequency = <6750000>; 19 + compatible = "qcom,scss-timer", "qcom,msm-timer"; 20 + interrupts = <1 0 0x301>, 21 + <1 1 0x301>, 22 + <1 2 0x301>; 23 + reg = <0x02000000 0x100>; 24 + clock-frequency = <27000000>, 25 + <32768>; 32 26 cpu-offset = <0x40000>; 33 27 }; 34 28
+8 -14
arch/arm/boot/dts/msm8960-cdp.dts
··· 15 15 < 0x02002000 0x1000 >; 16 16 }; 17 17 18 - timer@200a004 { 19 - compatible = "qcom,msm-gpt", "qcom,msm-timer"; 20 - interrupts = <1 2 0x301>; 21 - reg = <0x0200a004 0x10>; 22 - clock-frequency = <32768>; 23 - cpu-offset = <0x80000>; 24 - }; 25 - 26 - timer@200a024 { 27 - compatible = "qcom,msm-dgt", "qcom,msm-timer"; 28 - interrupts = <1 1 0x301>; 29 - reg = <0x0200a024 0x10>, 30 - <0x0200a034 0x4>; 31 - clock-frequency = <6750000>; 18 + timer@200a000 { 19 + compatible = "qcom,kpss-timer", "qcom,msm-timer"; 20 + interrupts = <1 1 0x301>, 21 + <1 2 0x301>, 22 + <1 3 0x301>; 23 + reg = <0x0200a000 0x100>; 24 + clock-frequency = <27000000>, 25 + <32768>; 32 26 cpu-offset = <0x80000>; 33 27 }; 34 28
+98
arch/arm/boot/dts/r8a7779.dtsi
··· 1 + /* 2 + * Device Tree Source for Renesas r8a7779 3 + * 4 + * Copyright (C) 2013 Renesas Solutions Corp. 5 + * Copyright (C) 2013 Simon Horman 6 + * 7 + * This file is licensed under the terms of the GNU General Public License 8 + * version 2. This program is licensed "as is" without any warranty of any 9 + * kind, whether express or implied. 10 + */ 11 + 12 + /include/ "skeleton.dtsi" 13 + 14 + / { 15 + compatible = "renesas,r8a7779"; 16 + 17 + cpus { 18 + #address-cells = <1>; 19 + #size-cells = <0>; 20 + 21 + cpu@0 { 22 + device_type = "cpu"; 23 + compatible = "arm,cortex-a9"; 24 + reg = <0>; 25 + }; 26 + cpu@1 { 27 + device_type = "cpu"; 28 + compatible = "arm,cortex-a9"; 29 + reg = <1>; 30 + }; 31 + cpu@2 { 32 + device_type = "cpu"; 33 + compatible = "arm,cortex-a9"; 34 + reg = <2>; 35 + }; 36 + cpu@3 { 37 + device_type = "cpu"; 38 + compatible = "arm,cortex-a9"; 39 + reg = <3>; 40 + }; 41 + }; 42 + 43 + gic: interrupt-controller@f0001000 { 44 + compatible = "arm,cortex-a9-gic"; 45 + #interrupt-cells = <3>; 46 + interrupt-controller; 47 + reg = <0xf0001000 0x1000>, 48 + <0xf0000100 0x100>; 49 + }; 50 + 51 + i2c0: i2c@0xffc70000 { 52 + #address-cells = <1>; 53 + #size-cells = <0>; 54 + compatible = "renesas,rmobile-iic"; 55 + reg = <0xffc70000 0x1000>; 56 + interrupt-parent = <&gic>; 57 + interrupts = <0 79 0x4>; 58 + }; 59 + 60 + i2c1: i2c@0xffc71000 { 61 + #address-cells = <1>; 62 + #size-cells = <0>; 63 + compatible = "renesas,rmobile-iic"; 64 + reg = <0xffc71000 0x1000>; 65 + interrupt-parent = <&gic>; 66 + interrupts = <0 82 0x4>; 67 + }; 68 + 69 + i2c2: i2c@0xffc72000 { 70 + #address-cells = <1>; 71 + #size-cells = <0>; 72 + compatible = "renesas,rmobile-iic"; 73 + reg = <0xffc72000 0x1000>; 74 + interrupt-parent = <&gic>; 75 + interrupts = <0 80 0x4>; 76 + }; 77 + 78 + i2c3: i2c@0xffc73000 { 79 + #address-cells = <1>; 80 + #size-cells = <0>; 81 + compatible = "renesas,rmobile-iic"; 82 + reg = <0xffc73000 0x1000>; 83 + interrupt-parent = <&gic>; 84 + interrupts = <0 81 0x4>; 85 + }; 86 + 87 + thermal@ffc48000 { 88 + compatible = "renesas,rcar-thermal"; 89 + reg = <0xffc48000 0x38>; 90 + }; 91 + 92 + sata: sata@fc600000 { 93 + compatible = "renesas,rcar-sata"; 94 + reg = <0xfc600000 0x2000>; 95 + interrupt-parent = <&gic>; 96 + interrupts = <0 100 0x4>; 97 + }; 98 + };
+1031
arch/arm/boot/dts/sama5d3.dtsi
··· 1 + /* 2 + * sama5d3.dtsi - Device Tree Include file for SAMA5D3 family SoC 3 + * applies to SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35 SoC 4 + * 5 + * Copyright (C) 2013 Atmel, 6 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 7 + * 8 + * Licensed under GPLv2 or later. 9 + */ 10 + 11 + /include/ "skeleton.dtsi" 12 + 13 + / { 14 + model = "Atmel SAMA5D3 family SoC"; 15 + compatible = "atmel,sama5d3", "atmel,sama5"; 16 + interrupt-parent = <&aic>; 17 + 18 + aliases { 19 + serial0 = &dbgu; 20 + serial1 = &usart0; 21 + serial2 = &usart1; 22 + serial3 = &usart2; 23 + serial4 = &usart3; 24 + gpio0 = &pioA; 25 + gpio1 = &pioB; 26 + gpio2 = &pioC; 27 + gpio3 = &pioD; 28 + gpio4 = &pioE; 29 + tcb0 = &tcb0; 30 + tcb1 = &tcb1; 31 + i2c0 = &i2c0; 32 + i2c1 = &i2c1; 33 + i2c2 = &i2c2; 34 + ssc0 = &ssc0; 35 + ssc1 = &ssc1; 36 + }; 37 + cpus { 38 + cpu@0 { 39 + compatible = "arm,cortex-a5"; 40 + }; 41 + }; 42 + 43 + memory { 44 + reg = <0x20000000 0x8000000>; 45 + }; 46 + 47 + ahb { 48 + compatible = "simple-bus"; 49 + #address-cells = <1>; 50 + #size-cells = <1>; 51 + ranges; 52 + 53 + apb { 54 + compatible = "simple-bus"; 55 + #address-cells = <1>; 56 + #size-cells = <1>; 57 + ranges; 58 + 59 + mmc0: mmc@f0000000 { 60 + compatible = "atmel,hsmci"; 61 + reg = <0xf0000000 0x600>; 62 + interrupts = <21 4 0>; 63 + pinctrl-names = "default"; 64 + pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>; 65 + status = "disabled"; 66 + #address-cells = <1>; 67 + #size-cells = <0>; 68 + }; 69 + 70 + spi0: spi@f0004000 { 71 + #address-cells = <1>; 72 + #size-cells = <0>; 73 + compatible = "atmel,at91sam9x5-spi"; 74 + reg = <0xf0004000 0x100>; 75 + interrupts = <24 4 3>; 76 + cs-gpios = <&pioD 13 0 77 + &pioD 14 0 /* conflicts with SCK0 and CANRX0 */ 78 + &pioD 15 0 /* conflicts with CTS0 and CANTX0 */ 79 + &pioD 16 0 /* conflicts with RTS0 and PWMFI3 */ 80 + >; 81 + pinctrl-names = "default"; 82 + pinctrl-0 = <&pinctrl_spi0>; 83 + status = "disabled"; 84 + }; 85 + 86 + ssc0: ssc@f0008000 { 87 + compatible = "atmel,at91sam9g45-ssc"; 88 + reg = <0xf0008000 0x4000>; 89 + interrupts = <38 4 4>; 90 + pinctrl-names = "default"; 91 + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 92 + status = "disabled"; 93 + }; 94 + 95 + can0: can@f000c000 { 96 + compatible = "atmel,at91sam9x5-can"; 97 + reg = <0xf000c000 0x300>; 98 + interrupts = <40 4 3>; 99 + pinctrl-names = "default"; 100 + pinctrl-0 = <&pinctrl_can0_rx_tx>; 101 + status = "disabled"; 102 + }; 103 + 104 + tcb0: timer@f0010000 { 105 + compatible = "atmel,at91sam9x5-tcb"; 106 + reg = <0xf0010000 0x100>; 107 + interrupts = <26 4 0>; 108 + }; 109 + 110 + i2c0: i2c@f0014000 { 111 + compatible = "atmel,at91sam9x5-i2c"; 112 + reg = <0xf0014000 0x4000>; 113 + interrupts = <18 4 6>; 114 + pinctrl-names = "default"; 115 + pinctrl-0 = <&pinctrl_i2c0>; 116 + #address-cells = <1>; 117 + #size-cells = <0>; 118 + status = "disabled"; 119 + }; 120 + 121 + i2c1: i2c@f0018000 { 122 + compatible = "atmel,at91sam9x5-i2c"; 123 + reg = <0xf0018000 0x4000>; 124 + interrupts = <19 4 6>; 125 + pinctrl-names = "default"; 126 + pinctrl-0 = <&pinctrl_i2c1>; 127 + #address-cells = <1>; 128 + #size-cells = <0>; 129 + status = "disabled"; 130 + }; 131 + 132 + usart0: serial@f001c000 { 133 + compatible = "atmel,at91sam9260-usart"; 134 + reg = <0xf001c000 0x100>; 135 + interrupts = <12 4 5>; 136 + pinctrl-names = "default"; 137 + pinctrl-0 = <&pinctrl_usart0>; 138 + status = "disabled"; 139 + }; 140 + 141 + usart1: serial@f0020000 { 142 + compatible = "atmel,at91sam9260-usart"; 143 + reg = <0xf0020000 0x100>; 144 + interrupts = <13 4 5>; 145 + pinctrl-names = "default"; 146 + pinctrl-0 = <&pinctrl_usart1>; 147 + status = "disabled"; 148 + }; 149 + 150 + macb0: ethernet@f0028000 { 151 + compatible = "cnds,pc302-gem", "cdns,gem"; 152 + reg = <0xf0028000 0x100>; 153 + interrupts = <34 4 3>; 154 + pinctrl-names = "default"; 155 + pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>; 156 + status = "disabled"; 157 + }; 158 + 159 + isi: isi@f0034000 { 160 + compatible = "atmel,at91sam9g45-isi"; 161 + reg = <0xf0034000 0x4000>; 162 + interrupts = <37 4 5>; 163 + status = "disabled"; 164 + }; 165 + 166 + mmc1: mmc@f8000000 { 167 + compatible = "atmel,hsmci"; 168 + reg = <0xf8000000 0x600>; 169 + interrupts = <22 4 0>; 170 + pinctrl-names = "default"; 171 + pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>; 172 + status = "disabled"; 173 + #address-cells = <1>; 174 + #size-cells = <0>; 175 + }; 176 + 177 + mmc2: mmc@f8004000 { 178 + compatible = "atmel,hsmci"; 179 + reg = <0xf8004000 0x600>; 180 + interrupts = <23 4 0>; 181 + pinctrl-names = "default"; 182 + pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>; 183 + status = "disabled"; 184 + #address-cells = <1>; 185 + #size-cells = <0>; 186 + }; 187 + 188 + spi1: spi@f8008000 { 189 + #address-cells = <1>; 190 + #size-cells = <0>; 191 + compatible = "atmel,at91sam9x5-spi"; 192 + reg = <0xf8008000 0x100>; 193 + interrupts = <25 4 3>; 194 + cs-gpios = <&pioC 25 0 195 + &pioC 26 0 /* conflitcs with TWD1 and ISI_D11 */ 196 + &pioC 27 0 /* conflitcs with TWCK1 and ISI_D10 */ 197 + &pioC 28 0 /* conflitcs with PWMFI0 and ISI_D9 */ 198 + >; 199 + pinctrl-names = "default"; 200 + pinctrl-0 = <&pinctrl_spi1>; 201 + status = "disabled"; 202 + }; 203 + 204 + ssc1: ssc@f800c000 { 205 + compatible = "atmel,at91sam9g45-ssc"; 206 + reg = <0xf800c000 0x4000>; 207 + interrupts = <39 4 4>; 208 + pinctrl-names = "default"; 209 + pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 210 + status = "disabled"; 211 + }; 212 + 213 + can1: can@f8010000 { 214 + compatible = "atmel,at91sam9x5-can"; 215 + reg = <0xf8010000 0x300>; 216 + interrupts = <41 4 3>; 217 + pinctrl-names = "default"; 218 + pinctrl-0 = <&pinctrl_can1_rx_tx>; 219 + }; 220 + 221 + tcb1: timer@f8014000 { 222 + compatible = "atmel,at91sam9x5-tcb"; 223 + reg = <0xf8014000 0x100>; 224 + interrupts = <27 4 0>; 225 + }; 226 + 227 + adc0: adc@f8018000 { 228 + compatible = "atmel,at91sam9260-adc"; 229 + reg = <0xf8018000 0x100>; 230 + interrupts = <29 4 5>; 231 + pinctrl-names = "default"; 232 + pinctrl-0 = < 233 + &pinctrl_adc0_adtrg 234 + &pinctrl_adc0_ad0 235 + &pinctrl_adc0_ad1 236 + &pinctrl_adc0_ad2 237 + &pinctrl_adc0_ad3 238 + &pinctrl_adc0_ad4 239 + &pinctrl_adc0_ad5 240 + &pinctrl_adc0_ad6 241 + &pinctrl_adc0_ad7 242 + &pinctrl_adc0_ad8 243 + &pinctrl_adc0_ad9 244 + &pinctrl_adc0_ad10 245 + &pinctrl_adc0_ad11 246 + >; 247 + atmel,adc-channel-base = <0x50>; 248 + atmel,adc-channels-used = <0xfff>; 249 + atmel,adc-drdy-mask = <0x1000000>; 250 + atmel,adc-num-channels = <12>; 251 + atmel,adc-startup-time = <40>; 252 + atmel,adc-status-register = <0x30>; 253 + atmel,adc-trigger-register = <0xc0>; 254 + atmel,adc-use-external; 255 + atmel,adc-vref = <3000>; 256 + atmel,adc-res = <10 12>; 257 + atmel,adc-res-names = "lowres", "highres"; 258 + status = "disabled"; 259 + 260 + trigger@0 { 261 + trigger-name = "external-rising"; 262 + trigger-value = <0x1>; 263 + trigger-external; 264 + }; 265 + trigger@1 { 266 + trigger-name = "external-falling"; 267 + trigger-value = <0x2>; 268 + trigger-external; 269 + }; 270 + trigger@2 { 271 + trigger-name = "external-any"; 272 + trigger-value = <0x3>; 273 + trigger-external; 274 + }; 275 + trigger@3 { 276 + trigger-name = "continuous"; 277 + trigger-value = <0x6>; 278 + }; 279 + }; 280 + 281 + tsadcc: tsadcc@f8018000 { 282 + compatible = "atmel,at91sam9x5-tsadcc"; 283 + reg = <0xf8018000 0x4000>; 284 + interrupts = <29 4 5>; 285 + atmel,tsadcc_clock = <300000>; 286 + atmel,filtering_average = <0x03>; 287 + atmel,pendet_debounce = <0x08>; 288 + atmel,pendet_sensitivity = <0x02>; 289 + atmel,ts_sample_hold_time = <0x0a>; 290 + status = "disabled"; 291 + }; 292 + 293 + i2c2: i2c@f801c000 { 294 + compatible = "atmel,at91sam9x5-i2c"; 295 + reg = <0xf801c000 0x4000>; 296 + interrupts = <20 4 6>; 297 + #address-cells = <1>; 298 + #size-cells = <0>; 299 + status = "disabled"; 300 + }; 301 + 302 + usart2: serial@f8020000 { 303 + compatible = "atmel,at91sam9260-usart"; 304 + reg = <0xf8020000 0x100>; 305 + interrupts = <14 4 5>; 306 + pinctrl-names = "default"; 307 + pinctrl-0 = <&pinctrl_usart2>; 308 + status = "disabled"; 309 + }; 310 + 311 + usart3: serial@f8024000 { 312 + compatible = "atmel,at91sam9260-usart"; 313 + reg = <0xf8024000 0x100>; 314 + interrupts = <15 4 5>; 315 + pinctrl-names = "default"; 316 + pinctrl-0 = <&pinctrl_usart3>; 317 + status = "disabled"; 318 + }; 319 + 320 + macb1: ethernet@f802c000 { 321 + compatible = "cdns,at32ap7000-macb", "cdns,macb"; 322 + reg = <0xf802c000 0x100>; 323 + interrupts = <35 4 3>; 324 + pinctrl-names = "default"; 325 + pinctrl-0 = <&pinctrl_macb1_rmii>; 326 + status = "disabled"; 327 + }; 328 + 329 + sha@f8034000 { 330 + compatible = "atmel,sam9g46-sha"; 331 + reg = <0xf8034000 0x100>; 332 + interrupts = <42 4 0>; 333 + }; 334 + 335 + aes@f8038000 { 336 + compatible = "atmel,sam9g46-aes"; 337 + reg = <0xf8038000 0x100>; 338 + interrupts = <43 4 0>; 339 + }; 340 + 341 + tdes@f803c000 { 342 + compatible = "atmel,sam9g46-tdes"; 343 + reg = <0xf803c000 0x100>; 344 + interrupts = <44 4 0>; 345 + }; 346 + 347 + dma0: dma-controller@ffffe600 { 348 + compatible = "atmel,at91sam9g45-dma"; 349 + reg = <0xffffe600 0x200>; 350 + interrupts = <30 4 0>; 351 + #dma-cells = <1>; 352 + }; 353 + 354 + dma1: dma-controller@ffffe800 { 355 + compatible = "atmel,at91sam9g45-dma"; 356 + reg = <0xffffe800 0x200>; 357 + interrupts = <31 4 0>; 358 + #dma-cells = <1>; 359 + }; 360 + 361 + ramc0: ramc@ffffea00 { 362 + compatible = "atmel,at91sam9g45-ddramc"; 363 + reg = <0xffffea00 0x200>; 364 + }; 365 + 366 + dbgu: serial@ffffee00 { 367 + compatible = "atmel,at91sam9260-usart"; 368 + reg = <0xffffee00 0x200>; 369 + interrupts = <2 4 7>; 370 + pinctrl-names = "default"; 371 + pinctrl-0 = <&pinctrl_dbgu>; 372 + status = "disabled"; 373 + }; 374 + 375 + aic: interrupt-controller@fffff000 { 376 + #interrupt-cells = <3>; 377 + compatible = "atmel,sama5d3-aic"; 378 + interrupt-controller; 379 + reg = <0xfffff000 0x200>; 380 + atmel,external-irqs = <47>; 381 + }; 382 + 383 + pinctrl@fffff200 { 384 + #address-cells = <1>; 385 + #size-cells = <1>; 386 + compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus"; 387 + ranges = <0xfffff200 0xfffff200 0xa00>; 388 + atmel,mux-mask = < 389 + /* A B C */ 390 + 0xffffffff 0xc0fc0000 0xc0ff0000 /* pioA */ 391 + 0xffffffff 0x0ff8ffff 0x00000000 /* pioB */ 392 + 0xffffffff 0xbc00f1ff 0x7c00fc00 /* pioC */ 393 + 0xffffffff 0xc001c0e0 0x0001c1e0 /* pioD */ 394 + 0xffffffff 0xbf9f8000 0x18000000 /* pioE */ 395 + >; 396 + 397 + /* shared pinctrl settings */ 398 + adc0 { 399 + pinctrl_adc0_adtrg: adc0_adtrg { 400 + atmel,pins = 401 + <3 19 0x1 0x0>; /* PD19 periph A ADTRG */ 402 + }; 403 + pinctrl_adc0_ad0: adc0_ad0 { 404 + atmel,pins = 405 + <3 20 0x1 0x0>; /* PD20 periph A AD0 */ 406 + }; 407 + pinctrl_adc0_ad1: adc0_ad1 { 408 + atmel,pins = 409 + <3 21 0x1 0x0>; /* PD21 periph A AD1 */ 410 + }; 411 + pinctrl_adc0_ad2: adc0_ad2 { 412 + atmel,pins = 413 + <3 22 0x1 0x0>; /* PD22 periph A AD2 */ 414 + }; 415 + pinctrl_adc0_ad3: adc0_ad3 { 416 + atmel,pins = 417 + <3 23 0x1 0x0>; /* PD23 periph A AD3 */ 418 + }; 419 + pinctrl_adc0_ad4: adc0_ad4 { 420 + atmel,pins = 421 + <3 24 0x1 0x0>; /* PD24 periph A AD4 */ 422 + }; 423 + pinctrl_adc0_ad5: adc0_ad5 { 424 + atmel,pins = 425 + <3 25 0x1 0x0>; /* PD25 periph A AD5 */ 426 + }; 427 + pinctrl_adc0_ad6: adc0_ad6 { 428 + atmel,pins = 429 + <3 26 0x1 0x0>; /* PD26 periph A AD6 */ 430 + }; 431 + pinctrl_adc0_ad7: adc0_ad7 { 432 + atmel,pins = 433 + <3 27 0x1 0x0>; /* PD27 periph A AD7 */ 434 + }; 435 + pinctrl_adc0_ad8: adc0_ad8 { 436 + atmel,pins = 437 + <3 28 0x1 0x0>; /* PD28 periph A AD8 */ 438 + }; 439 + pinctrl_adc0_ad9: adc0_ad9 { 440 + atmel,pins = 441 + <3 29 0x1 0x0>; /* PD29 periph A AD9 */ 442 + }; 443 + pinctrl_adc0_ad10: adc0_ad10 { 444 + atmel,pins = 445 + <3 30 0x1 0x0>; /* PD30 periph A AD10, conflicts with PCK0 */ 446 + }; 447 + pinctrl_adc0_ad11: adc0_ad11 { 448 + atmel,pins = 449 + <3 31 0x1 0x0>; /* PD31 periph A AD11, conflicts with PCK1 */ 450 + }; 451 + }; 452 + 453 + can0 { 454 + pinctrl_can0_rx_tx: can0_rx_tx { 455 + atmel,pins = 456 + <3 14 0x3 0x0 /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */ 457 + 3 15 0x3 0x0>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */ 458 + }; 459 + }; 460 + 461 + can1 { 462 + pinctrl_can1_rx_tx: can1_rx_tx { 463 + atmel,pins = 464 + <1 14 0x2 0x0 /* PB14 periph B RX, conflicts with GCRS */ 465 + 1 15 0x2 0x0>; /* PB15 periph B TX, conflicts with GCOL */ 466 + }; 467 + }; 468 + 469 + dbgu { 470 + pinctrl_dbgu: dbgu-0 { 471 + atmel,pins = 472 + <1 30 0x1 0x0 /* PB30 periph A */ 473 + 1 31 0x1 0x1>; /* PB31 periph A with pullup */ 474 + }; 475 + }; 476 + 477 + i2c0 { 478 + pinctrl_i2c0: i2c0-0 { 479 + atmel,pins = 480 + <0 30 0x1 0x0 /* PA30 periph A TWD0 pin, conflicts with URXD1, ISI_VSYNC */ 481 + 0 31 0x1 0x0>; /* PA31 periph A TWCK0 pin, conflicts with UTXD1, ISI_HSYNC */ 482 + }; 483 + }; 484 + 485 + i2c1 { 486 + pinctrl_i2c1: i2c1-0 { 487 + atmel,pins = 488 + <2 26 0x2 0x0 /* PC26 periph B TWD1 pin, conflicts with SPI1_NPCS1, ISI_D11 */ 489 + 2 27 0x2 0x0>; /* PC27 periph B TWCK1 pin, conflicts with SPI1_NPCS2, ISI_D10 */ 490 + }; 491 + }; 492 + 493 + isi { 494 + pinctrl_isi: isi-0 { 495 + atmel,pins = 496 + <0 16 0x3 0x0 /* PA16 periph C ISI_D0, conflicts with LCDDAT16 */ 497 + 0 17 0x3 0x0 /* PA17 periph C ISI_D1, conflicts with LCDDAT17 */ 498 + 0 18 0x3 0x0 /* PA18 periph C ISI_D2, conflicts with LCDDAT18, TWD2 */ 499 + 0 19 0x3 0x0 /* PA19 periph C ISI_D3, conflicts with LCDDAT19, TWCK2 */ 500 + 0 20 0x3 0x0 /* PA20 periph C ISI_D4, conflicts with LCDDAT20, PWMH0 */ 501 + 0 21 0x3 0x0 /* PA21 periph C ISI_D5, conflicts with LCDDAT21, PWML0 */ 502 + 0 22 0x3 0x0 /* PA22 periph C ISI_D6, conflicts with LCDDAT22, PWMH1 */ 503 + 0 23 0x3 0x0 /* PA23 periph C ISI_D7, conflicts with LCDDAT23, PWML1 */ 504 + 2 30 0x3 0x0 /* PC30 periph C ISI_PCK, conflicts with UTXD0 */ 505 + 0 31 0x3 0x0 /* PA31 periph C ISI_HSYNC, conflicts with TWCK0, UTXD1 */ 506 + 0 30 0x3 0x0 /* PA30 periph C ISI_VSYNC, conflicts with TWD0, URXD1 */ 507 + 2 29 0x3 0x0 /* PC29 periph C ISI_PD8, conflicts with URXD0, PWMFI2 */ 508 + 2 28 0x3 0x0>; /* PC28 periph C ISI_PD9, conflicts with SPI1_NPCS3, PWMFI0 */ 509 + }; 510 + pinctrl_isi_pck_as_mck: isi_pck_as_mck-0 { 511 + atmel,pins = 512 + <3 31 0x2 0x0>; /* PD31 periph B ISI_MCK */ 513 + }; 514 + }; 515 + 516 + lcd { 517 + pinctrl_lcd: lcd-0 { 518 + atmel,pins = 519 + <0 24 0x1 0x0 /* PA24 periph A LCDPWM */ 520 + 0 26 0x1 0x0 /* PA26 periph A LCDVSYNC */ 521 + 0 27 0x1 0x0 /* PA27 periph A LCDHSYNC */ 522 + 0 25 0x1 0x0 /* PA25 periph A LCDDISP */ 523 + 0 29 0x1 0x0 /* PA29 periph A LCDDEN */ 524 + 0 28 0x1 0x0 /* PA28 periph A LCDPCK */ 525 + 0 0 0x1 0x0 /* PA0 periph A LCDD0 pin */ 526 + 0 1 0x1 0x0 /* PA1 periph A LCDD1 pin */ 527 + 0 2 0x1 0x0 /* PA2 periph A LCDD2 pin */ 528 + 0 3 0x1 0x0 /* PA3 periph A LCDD3 pin */ 529 + 0 4 0x1 0x0 /* PA4 periph A LCDD4 pin */ 530 + 0 5 0x1 0x0 /* PA5 periph A LCDD5 pin */ 531 + 0 6 0x1 0x0 /* PA6 periph A LCDD6 pin */ 532 + 0 7 0x1 0x0 /* PA7 periph A LCDD7 pin */ 533 + 0 8 0x1 0x0 /* PA8 periph A LCDD8 pin */ 534 + 0 9 0x1 0x0 /* PA9 periph A LCDD9 pin */ 535 + 0 10 0x1 0x0 /* PA10 periph A LCDD10 pin */ 536 + 0 11 0x1 0x0 /* PA11 periph A LCDD11 pin */ 537 + 0 12 0x1 0x0 /* PA12 periph A LCDD12 pin */ 538 + 0 13 0x1 0x0 /* PA13 periph A LCDD13 pin */ 539 + 0 14 0x1 0x0 /* PA14 periph A LCDD14 pin */ 540 + 0 15 0x1 0x0 /* PA15 periph A LCDD15 pin */ 541 + 2 14 0x3 0x0 /* PC14 periph C LCDD16 pin */ 542 + 2 13 0x3 0x0 /* PC13 periph C LCDD17 pin */ 543 + 2 12 0x3 0x0 /* PC12 periph C LCDD18 pin */ 544 + 2 11 0x3 0x0 /* PC11 periph C LCDD19 pin */ 545 + 2 10 0x3 0x0 /* PC10 periph C LCDD20 pin */ 546 + 2 15 0x3 0x0 /* PC15 periph C LCDD21 pin */ 547 + 4 27 0x3 0x0 /* PE27 periph C LCDD22 pin */ 548 + 4 28 0x3 0x0>; /* PE28 periph C LCDD23 pin */ 549 + }; 550 + }; 551 + 552 + macb0 { 553 + pinctrl_macb0_data_rgmii: macb0_data_rgmii { 554 + atmel,pins = 555 + <1 0 0x1 0x0 /* PB0 periph A GTX0, conflicts with PWMH0 */ 556 + 1 1 0x1 0x0 /* PB1 periph A GTX1, conflicts with PWML0 */ 557 + 1 2 0x1 0x0 /* PB2 periph A GTX2, conflicts with TK1 */ 558 + 1 3 0x1 0x0 /* PB3 periph A GTX3, conflicts with TF1 */ 559 + 1 4 0x1 0x0 /* PB4 periph A GRX0, conflicts with PWMH1 */ 560 + 1 5 0x1 0x0 /* PB5 periph A GRX1, conflicts with PWML1 */ 561 + 1 6 0x1 0x0 /* PB6 periph A GRX2, conflicts with TD1 */ 562 + 1 7 0x1 0x0>; /* PB7 periph A GRX3, conflicts with RK1 */ 563 + }; 564 + pinctrl_macb0_data_gmii: macb0_data_gmii { 565 + atmel,pins = 566 + <1 19 0x2 0x0 /* PB19 periph B GTX4, conflicts with MCI1_CDA */ 567 + 1 20 0x2 0x0 /* PB20 periph B GTX5, conflicts with MCI1_DA0 */ 568 + 1 21 0x2 0x0 /* PB21 periph B GTX6, conflicts with MCI1_DA1 */ 569 + 1 22 0x2 0x0 /* PB22 periph B GTX7, conflicts with MCI1_DA2 */ 570 + 1 23 0x2 0x0 /* PB23 periph B GRX4, conflicts with MCI1_DA3 */ 571 + 1 24 0x2 0x0 /* PB24 periph B GRX5, conflicts with MCI1_CK */ 572 + 1 25 0x2 0x0 /* PB25 periph B GRX6, conflicts with SCK1 */ 573 + 1 26 0x2 0x0>; /* PB26 periph B GRX7, conflicts with CTS1 */ 574 + }; 575 + pinctrl_macb0_signal_rgmii: macb0_signal_rgmii { 576 + atmel,pins = 577 + <1 8 0x1 0x0 /* PB8 periph A GTXCK, conflicts with PWMH2 */ 578 + 1 9 0x1 0x0 /* PB9 periph A GTXEN, conflicts with PWML2 */ 579 + 1 11 0x1 0x0 /* PB11 periph A GRXCK, conflicts with RD1 */ 580 + 1 13 0x1 0x0 /* PB13 periph A GRXER, conflicts with PWML3 */ 581 + 1 16 0x1 0x0 /* PB16 periph A GMDC */ 582 + 1 17 0x1 0x0 /* PB17 periph A GMDIO */ 583 + 1 18 0x1 0x0>; /* PB18 periph A G125CK */ 584 + }; 585 + pinctrl_macb0_signal_gmii: macb0_signal_gmii { 586 + atmel,pins = 587 + <1 9 0x1 0x0 /* PB9 periph A GTXEN, conflicts with PWML2 */ 588 + 1 10 0x1 0x0 /* PB10 periph A GTXER, conflicts with RF1 */ 589 + 1 11 0x1 0x0 /* PB11 periph A GRXCK, conflicts with RD1 */ 590 + 1 12 0x1 0x0 /* PB12 periph A GRXDV, conflicts with PWMH3 */ 591 + 1 13 0x1 0x0 /* PB13 periph A GRXER, conflicts with PWML3 */ 592 + 1 14 0x1 0x0 /* PB14 periph A GCRS, conflicts with CANRX1 */ 593 + 1 15 0x1 0x0 /* PB15 periph A GCOL, conflicts with CANTX1 */ 594 + 1 16 0x1 0x0 /* PB16 periph A GMDC */ 595 + 1 17 0x1 0x0 /* PB17 periph A GMDIO */ 596 + 1 27 0x2 0x0>; /* PB27 periph B G125CKO */ 597 + }; 598 + 599 + }; 600 + 601 + macb1 { 602 + pinctrl_macb1_rmii: macb1_rmii-0 { 603 + atmel,pins = 604 + <2 0 0x1 0x0 /* PC0 periph A ETX0, conflicts with TIOA3 */ 605 + 2 1 0x1 0x0 /* PC1 periph A ETX1, conflicts with TIOB3 */ 606 + 2 2 0x1 0x0 /* PC2 periph A ERX0, conflicts with TCLK3 */ 607 + 2 3 0x1 0x0 /* PC3 periph A ERX1, conflicts with TIOA4 */ 608 + 2 4 0x1 0x0 /* PC4 periph A ETXEN, conflicts with TIOB4 */ 609 + 2 5 0x1 0x0 /* PC5 periph A ECRSDV,conflicts with TCLK4 */ 610 + 2 6 0x1 0x0 /* PC6 periph A ERXER, conflicts with TIOA5 */ 611 + 2 7 0x1 0x0 /* PC7 periph A EREFCK, conflicts with TIOB5 */ 612 + 2 8 0x1 0x0 /* PC8 periph A EMDC, conflicts with TCLK5 */ 613 + 2 9 0x1 0x0>; /* PC9 periph A EMDIO */ 614 + }; 615 + }; 616 + 617 + mmc0 { 618 + pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 { 619 + atmel,pins = 620 + <3 9 0x1 0x0 /* PD9 periph A MCI0_CK */ 621 + 3 0 0x1 0x1 /* PD0 periph A MCI0_CDA with pullup */ 622 + 3 1 0x1 0x1>; /* PD1 periph A MCI0_DA0 with pullup */ 623 + }; 624 + pinctrl_mmc0_dat1_3: mmc0_dat1_3 { 625 + atmel,pins = 626 + <3 2 0x1 0x1 /* PD2 periph A MCI0_DA1 with pullup */ 627 + 3 3 0x1 0x1 /* PD3 periph A MCI0_DA2 with pullup */ 628 + 3 4 0x1 0x1>; /* PD4 periph A MCI0_DA3 with pullup */ 629 + }; 630 + pinctrl_mmc0_dat4_7: mmc0_dat4_7 { 631 + atmel,pins = 632 + <3 5 0x1 0x1 /* PD5 periph A MCI0_DA4 with pullup, conflicts with TIOA0, PWMH2 */ 633 + 3 6 0x1 0x1 /* PD6 periph A MCI0_DA5 with pullup, conflicts with TIOB0, PWML2 */ 634 + 3 7 0x1 0x1 /* PD7 periph A MCI0_DA6 with pullup, conlicts with TCLK0, PWMH3 */ 635 + 3 8 0x1 0x1>; /* PD8 periph A MCI0_DA7 with pullup, conflicts with PWML3 */ 636 + }; 637 + }; 638 + 639 + mmc1 { 640 + pinctrl_mmc1_clk_cmd_dat0: mmc1_clk_cmd_dat0 { 641 + atmel,pins = 642 + <1 24 0x1 0x0 /* PB24 periph A MCI1_CK, conflicts with GRX5 */ 643 + 1 19 0x1 0x1 /* PB19 periph A MCI1_CDA with pullup, conflicts with GTX4 */ 644 + 1 20 0x1 0x1>; /* PB20 periph A MCI1_DA0 with pullup, conflicts with GTX5 */ 645 + }; 646 + pinctrl_mmc1_dat1_3: mmc1_dat1_3 { 647 + atmel,pins = 648 + <1 21 0x1 0x1 /* PB21 periph A MCI1_DA1 with pullup, conflicts with GTX6 */ 649 + 1 22 0x1 0x1 /* PB22 periph A MCI1_DA2 with pullup, conflicts with GTX7 */ 650 + 1 23 0x1 0x1>; /* PB23 periph A MCI1_DA3 with pullup, conflicts with GRX4 */ 651 + }; 652 + }; 653 + 654 + mmc2 { 655 + pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 { 656 + atmel,pins = 657 + <2 15 0x1 0x0 /* PC15 periph A MCI2_CK, conflicts with PCK2 */ 658 + 2 10 0x1 0x1 /* PC10 periph A MCI2_CDA with pullup */ 659 + 2 11 0x1 0x1>; /* PC11 periph A MCI2_DA0 with pullup */ 660 + }; 661 + pinctrl_mmc2_dat1_3: mmc2_dat1_3 { 662 + atmel,pins = 663 + <2 12 0x1 0x0 /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */ 664 + 2 13 0x1 0x0 /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */ 665 + 2 14 0x1 0x0>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */ 666 + }; 667 + }; 668 + 669 + nand0 { 670 + pinctrl_nand0_ale_cle: nand0_ale_cle-0 { 671 + atmel,pins = 672 + <4 21 0x1 0x1 /* PE21 periph A with pullup */ 673 + 4 22 0x1 0x1>; /* PE22 periph A with pullup */ 674 + }; 675 + }; 676 + 677 + pioA: gpio@fffff200 { 678 + compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 679 + reg = <0xfffff200 0x100>; 680 + interrupts = <6 4 1>; 681 + #gpio-cells = <2>; 682 + gpio-controller; 683 + interrupt-controller; 684 + #interrupt-cells = <2>; 685 + }; 686 + 687 + pioB: gpio@fffff400 { 688 + compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 689 + reg = <0xfffff400 0x100>; 690 + interrupts = <7 4 1>; 691 + #gpio-cells = <2>; 692 + gpio-controller; 693 + interrupt-controller; 694 + #interrupt-cells = <2>; 695 + }; 696 + 697 + pioC: gpio@fffff600 { 698 + compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 699 + reg = <0xfffff600 0x100>; 700 + interrupts = <8 4 1>; 701 + #gpio-cells = <2>; 702 + gpio-controller; 703 + interrupt-controller; 704 + #interrupt-cells = <2>; 705 + }; 706 + 707 + pioD: gpio@fffff800 { 708 + compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 709 + reg = <0xfffff800 0x100>; 710 + interrupts = <9 4 1>; 711 + #gpio-cells = <2>; 712 + gpio-controller; 713 + interrupt-controller; 714 + #interrupt-cells = <2>; 715 + }; 716 + 717 + pioE: gpio@fffffa00 { 718 + compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 719 + reg = <0xfffffa00 0x100>; 720 + interrupts = <10 4 1>; 721 + #gpio-cells = <2>; 722 + gpio-controller; 723 + interrupt-controller; 724 + #interrupt-cells = <2>; 725 + }; 726 + 727 + spi0 { 728 + pinctrl_spi0: spi0-0 { 729 + atmel,pins = 730 + <3 10 0x1 0x0 /* PD10 periph A SPI0_MISO pin */ 731 + 3 11 0x1 0x0 /* PD11 periph A SPI0_MOSI pin */ 732 + 3 12 0x1 0x0 /* PD12 periph A SPI0_SPCK pin */ 733 + 3 13 0x0 0x0>; /* PD13 GPIO SPI0_NPCS0 pin */ 734 + }; 735 + }; 736 + 737 + spi1 { 738 + pinctrl_spi1: spi1-0 { 739 + atmel,pins = 740 + <2 22 0x1 0x0 /* PC22 periph A SPI1_MISO pin */ 741 + 2 23 0x1 0x0 /* PC23 periph A SPI1_MOSI pin */ 742 + 2 24 0x1 0x0 /* PC24 periph A SPI1_SPCK pin */ 743 + 2 25 0x0 0x0>; /* PC25 GPIO SPI1_NPCS0 pin */ 744 + }; 745 + }; 746 + 747 + ssc0 { 748 + pinctrl_ssc0_tx: ssc0_tx { 749 + atmel,pins = 750 + <2 16 0x1 0x0 /* PC16 periph A TK0 */ 751 + 2 17 0x1 0x0 /* PC17 periph A TF0 */ 752 + 2 18 0x1 0x0>; /* PC18 periph A TD0 */ 753 + }; 754 + 755 + pinctrl_ssc0_rx: ssc0_rx { 756 + atmel,pins = 757 + <2 19 0x1 0x0 /* PC19 periph A RK0 */ 758 + 2 20 0x1 0x0 /* PC20 periph A RF0 */ 759 + 2 21 0x1 0x0>; /* PC21 periph A RD0 */ 760 + }; 761 + }; 762 + 763 + ssc1 { 764 + pinctrl_ssc1_tx: ssc1_tx { 765 + atmel,pins = 766 + <1 2 0x2 0x0 /* PB2 periph B TK1, conflicts with GTX2 */ 767 + 1 3 0x2 0x0 /* PB3 periph B TF1, conflicts with GTX3 */ 768 + 1 6 0x2 0x0>; /* PB6 periph B TD1, conflicts with TD1 */ 769 + }; 770 + 771 + pinctrl_ssc1_rx: ssc1_rx { 772 + atmel,pins = 773 + <1 7 0x2 0x0 /* PB7 periph B RK1, conflicts with EREFCK */ 774 + 1 10 0x2 0x0 /* PB10 periph B RF1, conflicts with GTXER */ 775 + 1 11 0x2 0x0>; /* PB11 periph B RD1, conflicts with GRXCK */ 776 + }; 777 + }; 778 + 779 + uart0 { 780 + pinctrl_uart0: uart0-0 { 781 + atmel,pins = 782 + <2 29 0x1 0x0 /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */ 783 + 2 30 0x1 0x1>; /* PC30 periph A with pullup, conflicts with ISI_PCK */ 784 + }; 785 + }; 786 + 787 + uart1 { 788 + pinctrl_uart1: uart1-0 { 789 + atmel,pins = 790 + <0 30 0x2 0x0 /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */ 791 + 0 31 0x2 0x1>; /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */ 792 + }; 793 + }; 794 + 795 + usart0 { 796 + pinctrl_usart0: usart0-0 { 797 + atmel,pins = 798 + <3 17 0x1 0x0 /* PD17 periph A */ 799 + 3 18 0x1 0x1>; /* PD18 periph A with pullup */ 800 + }; 801 + 802 + pinctrl_usart0_rts_cts: usart0_rts_cts-0 { 803 + atmel,pins = 804 + <3 15 0x1 0x0 /* PD15 periph A, conflicts with SPI0_NPCS2, CANTX0 */ 805 + 3 16 0x1 0x0>; /* PD16 periph A, conflicts with SPI0_NPCS3, PWMFI3 */ 806 + }; 807 + }; 808 + 809 + usart1 { 810 + pinctrl_usart1: usart1-0 { 811 + atmel,pins = 812 + <1 28 0x1 0x0 /* PB28 periph A */ 813 + 1 29 0x1 0x1>; /* PB29 periph A with pullup */ 814 + }; 815 + 816 + pinctrl_usart1_rts_cts: usart1_rts_cts-0 { 817 + atmel,pins = 818 + <1 26 0x1 0x0 /* PB26 periph A, conflicts with GRX7 */ 819 + 1 27 0x1 0x0>; /* PB27 periph A, conflicts with G125CKO */ 820 + }; 821 + }; 822 + 823 + usart2 { 824 + pinctrl_usart2: usart2-0 { 825 + atmel,pins = 826 + <4 25 0x2 0x0 /* PE25 periph B, conflicts with A25 */ 827 + 4 26 0x2 0x1>; /* PE26 periph B with pullup, conflicts NCS0 */ 828 + }; 829 + 830 + pinctrl_usart2_rts_cts: usart2_rts_cts-0 { 831 + atmel,pins = 832 + <4 23 0x2 0x0 /* PE23 periph B, conflicts with A23 */ 833 + 4 24 0x2 0x0>; /* PE24 periph B, conflicts with A24 */ 834 + }; 835 + }; 836 + 837 + usart3 { 838 + pinctrl_usart3: usart3-0 { 839 + atmel,pins = 840 + <4 18 0x2 0x0 /* PE18 periph B, conflicts with A18 */ 841 + 4 19 0x2 0x1>; /* PE19 periph B with pullup, conflicts with A19 */ 842 + }; 843 + 844 + pinctrl_usart3_rts_cts: usart3_rts_cts-0 { 845 + atmel,pins = 846 + <4 16 0x2 0x0 /* PE16 periph B, conflicts with A16 */ 847 + 4 17 0x2 0x0>; /* PE17 periph B, conflicts with A17 */ 848 + }; 849 + }; 850 + }; 851 + 852 + pmc: pmc@fffffc00 { 853 + compatible = "atmel,at91rm9200-pmc"; 854 + reg = <0xfffffc00 0x120>; 855 + }; 856 + 857 + rstc@fffffe00 { 858 + compatible = "atmel,at91sam9g45-rstc"; 859 + reg = <0xfffffe00 0x10>; 860 + }; 861 + 862 + pit: timer@fffffe30 { 863 + compatible = "atmel,at91sam9260-pit"; 864 + reg = <0xfffffe30 0xf>; 865 + interrupts = <3 4 5>; 866 + }; 867 + 868 + watchdog@fffffe40 { 869 + compatible = "atmel,at91sam9260-wdt"; 870 + reg = <0xfffffe40 0x10>; 871 + status = "disabled"; 872 + }; 873 + 874 + rtc@fffffeb0 { 875 + compatible = "atmel,at91rm9200-rtc"; 876 + reg = <0xfffffeb0 0x30>; 877 + interrupts = <1 4 7>; 878 + }; 879 + }; 880 + 881 + usb0: gadget@00500000 { 882 + #address-cells = <1>; 883 + #size-cells = <0>; 884 + compatible = "atmel,at91sam9rl-udc"; 885 + reg = <0x00500000 0x100000 886 + 0xf8030000 0x4000>; 887 + interrupts = <33 4 2>; 888 + status = "disabled"; 889 + 890 + ep0 { 891 + reg = <0>; 892 + atmel,fifo-size = <64>; 893 + atmel,nb-banks = <1>; 894 + }; 895 + 896 + ep1 { 897 + reg = <1>; 898 + atmel,fifo-size = <1024>; 899 + atmel,nb-banks = <3>; 900 + atmel,can-dma; 901 + atmel,can-isoc; 902 + }; 903 + 904 + ep2 { 905 + reg = <2>; 906 + atmel,fifo-size = <1024>; 907 + atmel,nb-banks = <3>; 908 + atmel,can-dma; 909 + atmel,can-isoc; 910 + }; 911 + 912 + ep3 { 913 + reg = <3>; 914 + atmel,fifo-size = <1024>; 915 + atmel,nb-banks = <2>; 916 + atmel,can-dma; 917 + }; 918 + 919 + ep4 { 920 + reg = <4>; 921 + atmel,fifo-size = <1024>; 922 + atmel,nb-banks = <2>; 923 + atmel,can-dma; 924 + }; 925 + 926 + ep5 { 927 + reg = <5>; 928 + atmel,fifo-size = <1024>; 929 + atmel,nb-banks = <2>; 930 + atmel,can-dma; 931 + }; 932 + 933 + ep6 { 934 + reg = <6>; 935 + atmel,fifo-size = <1024>; 936 + atmel,nb-banks = <2>; 937 + atmel,can-dma; 938 + }; 939 + 940 + ep7 { 941 + reg = <7>; 942 + atmel,fifo-size = <1024>; 943 + atmel,nb-banks = <2>; 944 + atmel,can-dma; 945 + }; 946 + 947 + ep8 { 948 + reg = <8>; 949 + atmel,fifo-size = <1024>; 950 + atmel,nb-banks = <2>; 951 + }; 952 + 953 + ep9 { 954 + reg = <9>; 955 + atmel,fifo-size = <1024>; 956 + atmel,nb-banks = <2>; 957 + }; 958 + 959 + ep10 { 960 + reg = <10>; 961 + atmel,fifo-size = <1024>; 962 + atmel,nb-banks = <2>; 963 + }; 964 + 965 + ep11 { 966 + reg = <11>; 967 + atmel,fifo-size = <1024>; 968 + atmel,nb-banks = <2>; 969 + }; 970 + 971 + ep12 { 972 + reg = <12>; 973 + atmel,fifo-size = <1024>; 974 + atmel,nb-banks = <2>; 975 + }; 976 + 977 + ep13 { 978 + reg = <13>; 979 + atmel,fifo-size = <1024>; 980 + atmel,nb-banks = <2>; 981 + }; 982 + 983 + ep14 { 984 + reg = <14>; 985 + atmel,fifo-size = <1024>; 986 + atmel,nb-banks = <2>; 987 + }; 988 + 989 + ep15 { 990 + reg = <15>; 991 + atmel,fifo-size = <1024>; 992 + atmel,nb-banks = <2>; 993 + }; 994 + }; 995 + 996 + usb1: ohci@00600000 { 997 + compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 998 + reg = <0x00600000 0x100000>; 999 + interrupts = <32 4 2>; 1000 + status = "disabled"; 1001 + }; 1002 + 1003 + usb2: ehci@00700000 { 1004 + compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 1005 + reg = <0x00700000 0x100000>; 1006 + interrupts = <32 4 2>; 1007 + status = "disabled"; 1008 + }; 1009 + 1010 + nand0: nand@60000000 { 1011 + compatible = "atmel,at91rm9200-nand"; 1012 + #address-cells = <1>; 1013 + #size-cells = <1>; 1014 + reg = < 0x60000000 0x01000000 /* EBI CS3 */ 1015 + 0xffffc070 0x00000490 /* SMC PMECC regs */ 1016 + 0xffffc500 0x00000100 /* SMC PMECC Error Location regs */ 1017 + 0x00100000 0x00100000 /* ROM code */ 1018 + 0x70000000 0x10000000 /* NFC Command Registers */ 1019 + 0xffffc000 0x00000070 /* NFC HSMC regs */ 1020 + 0x00200000 0x00100000 /* NFC SRAM banks */ 1021 + >; 1022 + interrupts = <5 4 6>; 1023 + atmel,nand-addr-offset = <21>; 1024 + atmel,nand-cmd-offset = <22>; 1025 + pinctrl-names = "default"; 1026 + pinctrl-0 = <&pinctrl_nand0_ale_cle>; 1027 + atmel,pmecc-lookup-table-offset = <0x10000 0x18000>; 1028 + status = "disabled"; 1029 + }; 1030 + }; 1031 + };
+51
arch/arm/boot/dts/sama5d31ek.dts
··· 1 + /* 2 + * sama5d31ek.dts - Device Tree file for SAMA5D31-EK board 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + /dts-v1/; 10 + /include/ "sama5d3xmb.dtsi" 11 + /include/ "sama5d3xdm.dtsi" 12 + 13 + / { 14 + model = "Atmel SAMA5D31-EK"; 15 + compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 16 + 17 + ahb { 18 + apb { 19 + spi0: spi@f0004000 { 20 + status = "okay"; 21 + }; 22 + 23 + ssc0: ssc@f0008000 { 24 + status = "okay"; 25 + }; 26 + 27 + i2c0: i2c@f0014000 { 28 + status = "okay"; 29 + }; 30 + 31 + i2c1: i2c@f0018000 { 32 + status = "okay"; 33 + }; 34 + 35 + macb1: ethernet@f802c000 { 36 + status = "okay"; 37 + }; 38 + }; 39 + }; 40 + 41 + leds { 42 + d3 { 43 + label = "d3"; 44 + gpios = <&pioE 24 0>; 45 + }; 46 + }; 47 + 48 + sound { 49 + status = "okay"; 50 + }; 51 + };
+44
arch/arm/boot/dts/sama5d33ek.dts
··· 1 + /* 2 + * sama5d33ek.dts - Device Tree file for SAMA5D33-EK board 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + /dts-v1/; 10 + /include/ "sama5d3xmb.dtsi" 11 + /include/ "sama5d3xdm.dtsi" 12 + 13 + / { 14 + model = "Atmel SAMA5D33-EK"; 15 + compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 16 + 17 + ahb { 18 + apb { 19 + spi0: spi@f0004000 { 20 + status = "okay"; 21 + }; 22 + 23 + ssc0: ssc@f0008000 { 24 + status = "okay"; 25 + }; 26 + 27 + i2c0: i2c@f0014000 { 28 + status = "okay"; 29 + }; 30 + 31 + i2c1: i2c@f0018000 { 32 + status = "okay"; 33 + }; 34 + 35 + macb0: ethernet@f0028000 { 36 + status = "okay"; 37 + }; 38 + }; 39 + }; 40 + 41 + sound { 42 + status = "okay"; 43 + }; 44 + };
+61
arch/arm/boot/dts/sama5d34ek.dts
··· 1 + /* 2 + * sama5d34ek.dts - Device Tree file for SAMA5D34-EK board 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + /dts-v1/; 10 + /include/ "sama5d3xmb.dtsi" 11 + /include/ "sama5d3xdm.dtsi" 12 + 13 + / { 14 + model = "Atmel SAMA5D34-EK"; 15 + compatible = "atmel,sama5d34ek", "atmel,sama5ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 16 + 17 + ahb { 18 + apb { 19 + spi0: spi@f0004000 { 20 + status = "okay"; 21 + }; 22 + 23 + ssc0: ssc@f0008000 { 24 + status = "okay"; 25 + }; 26 + 27 + can0: can@f000c000 { 28 + status = "okay"; 29 + }; 30 + 31 + i2c0: i2c@f0014000 { 32 + status = "okay"; 33 + }; 34 + 35 + i2c1: i2c@f0018000 { 36 + status = "okay"; 37 + 38 + 24c256@50 { 39 + compatible = "24c256"; 40 + reg = <0x50>; 41 + pagesize = <64>; 42 + }; 43 + }; 44 + 45 + macb0: ethernet@f0028000 { 46 + status = "okay"; 47 + }; 48 + }; 49 + }; 50 + 51 + leds { 52 + d3 { 53 + label = "d3"; 54 + gpios = <&pioE 24 0>; 55 + }; 56 + }; 57 + 58 + sound { 59 + status = "okay"; 60 + }; 61 + };
+56
arch/arm/boot/dts/sama5d35ek.dts
··· 1 + /* 2 + * sama5d35ek.dts - Device Tree file for SAMA5D35-EK board 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + /dts-v1/; 10 + /include/ "sama5d3xmb.dtsi" 11 + 12 + / { 13 + model = "Atmel SAMA5D35-EK"; 14 + compatible = "atmel,sama5d35ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 15 + 16 + ahb { 17 + apb { 18 + spi0: spi@f0004000 { 19 + status = "okay"; 20 + }; 21 + 22 + can0: can@f000c000 { 23 + status = "okay"; 24 + }; 25 + 26 + i2c1: i2c@f0018000 { 27 + status = "okay"; 28 + }; 29 + 30 + macb0: ethernet@f0028000 { 31 + status = "okay"; 32 + }; 33 + 34 + isi: isi@f0034000 { 35 + status = "okay"; 36 + }; 37 + 38 + macb1: ethernet@f802c000 { 39 + status = "okay"; 40 + }; 41 + }; 42 + }; 43 + 44 + gpio_keys { 45 + compatible = "gpio-keys"; 46 + #address-cells = <1>; 47 + #size-cells = <0>; 48 + 49 + pb_user1 { 50 + label = "pb_user1"; 51 + gpios = <&pioE 27 0>; 52 + linux,code = <0x100>; 53 + gpio-key,wakeup; 54 + }; 55 + }; 56 + };
+91
arch/arm/boot/dts/sama5d3xcm.dtsi
··· 1 + /* 2 + * sama5d3xcm.dtsi - Device Tree Include file for SAMA5D3x CPU Module 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + /include/ "sama5d3.dtsi" 10 + 11 + / { 12 + compatible = "atmel,samad3xcm", "atmel,sama5d3", "atmel,sama5"; 13 + 14 + chosen { 15 + bootargs = "console=ttyS0,115200 rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs"; 16 + }; 17 + 18 + memory { 19 + reg = <0x20000000 0x20000000>; 20 + }; 21 + 22 + clocks { 23 + #address-cells = <1>; 24 + #size-cells = <1>; 25 + ranges; 26 + 27 + main_clock: clock@0 { 28 + compatible = "atmel,osc", "fixed-clock"; 29 + clock-frequency = <12000000>; 30 + }; 31 + }; 32 + 33 + ahb { 34 + apb { 35 + macb0: ethernet@f0028000 { 36 + phy-mode = "rgmii"; 37 + }; 38 + }; 39 + 40 + nand0: nand@60000000 { 41 + nand-bus-width = <8>; 42 + nand-ecc-mode = "hw"; 43 + atmel,has-pmecc; 44 + atmel,pmecc-cap = <4>; 45 + atmel,pmecc-sector-size = <512>; 46 + atmel,has-nfc; 47 + atmel,use-nfc-sram; 48 + nand-on-flash-bbt; 49 + status = "okay"; 50 + 51 + at91bootstrap@0 { 52 + label = "at91bootstrap"; 53 + reg = <0x0 0x40000>; 54 + }; 55 + 56 + bootloader@40000 { 57 + label = "bootloader"; 58 + reg = <0x40000 0x80000>; 59 + }; 60 + 61 + bootloaderenv@c0000 { 62 + label = "bootloader env"; 63 + reg = <0xc0000 0xc0000>; 64 + }; 65 + 66 + dtb@180000 { 67 + label = "device tree"; 68 + reg = <0x180000 0x80000>; 69 + }; 70 + 71 + kernel@200000 { 72 + label = "kernel"; 73 + reg = <0x200000 0x600000>; 74 + }; 75 + 76 + rootfs@800000 { 77 + label = "rootfs"; 78 + reg = <0x800000 0x0f800000>; 79 + }; 80 + }; 81 + }; 82 + 83 + leds { 84 + compatible = "gpio-leds"; 85 + 86 + d2 { 87 + label = "d2"; 88 + gpios = <&pioE 25 1>; /* PE25, conflicts with A25, RXD2 */ 89 + }; 90 + }; 91 + };
+42
arch/arm/boot/dts/sama5d3xdm.dtsi
··· 1 + /* 2 + * sama5d3dm.dtsi - Device Tree file for SAMA5 display module 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + 10 + / { 11 + ahb { 12 + apb { 13 + i2c1: i2c@f0018000 { 14 + qt1070: keyboard@1b { 15 + compatible = "qt1070"; 16 + reg = <0x1b>; 17 + interrupt-parent = <&pioE>; 18 + interrupts = <31 0x0>; 19 + pinctrl-names = "default"; 20 + pinctrl-0 = <&pinctrl_qt1070_irq>; 21 + }; 22 + }; 23 + 24 + adc0: adc@f8018000 { 25 + status = "disabled"; 26 + }; 27 + 28 + tsadcc: tsadcc@f8018000 { 29 + status = "okay"; 30 + }; 31 + 32 + pinctrl@fffff200 { 33 + board { 34 + pinctrl_qt1070_irq: qt1070_irq { 35 + atmel,pins = 36 + <4 31 0x0 0x5>; /* PE31 GPIO with pull up deglith */ 37 + }; 38 + }; 39 + }; 40 + }; 41 + }; 42 + };
+166
arch/arm/boot/dts/sama5d3xmb.dtsi
··· 1 + /* 2 + * sama5d3xmb.dts - Device Tree file for SAMA5D3x mother board 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + /include/ "sama5d3xcm.dtsi" 10 + 11 + / { 12 + compatible = "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 13 + 14 + ahb { 15 + apb { 16 + mmc0: mmc@f0000000 { 17 + pinctrl-names = "default"; 18 + pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>; 19 + status = "okay"; 20 + slot@0 { 21 + reg = <0>; 22 + bus-width = <4>; 23 + cd-gpios = <&pioD 17 0>; 24 + }; 25 + }; 26 + 27 + spi0: spi@f0004000 { 28 + m25p80@0 { 29 + compatible = "atmel,at25df321a"; 30 + spi-max-frequency = <50000000>; 31 + reg = <0>; 32 + }; 33 + }; 34 + 35 + /* 36 + * i2c0 conflicts with ISI: 37 + * disable it to allow the use of ISI 38 + * can not enable audio when i2c0 disabled 39 + */ 40 + i2c0: i2c@f0014000 { 41 + wm8904: wm8904@1a { 42 + compatible = "wm8904"; 43 + reg = <0x1a>; 44 + }; 45 + }; 46 + 47 + usart1: serial@f0020000 { 48 + pinctrl-names = "default"; 49 + pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>; 50 + status = "okay"; 51 + }; 52 + 53 + isi: isi@f0034000 { 54 + pinctrl-names = "default"; 55 + pinctrl-0 = <&pinctrl_isi &pinctrl_isi_pck_as_mck &pinctrl_isi_power &pinctrl_isi_reset>; 56 + }; 57 + 58 + mmc1: mmc@f8000000 { 59 + pinctrl-names = "default"; 60 + pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; 61 + status = "okay"; 62 + slot@0 { 63 + reg = <0>; 64 + bus-width = <4>; 65 + cd-gpios = <&pioD 18 0>; 66 + }; 67 + }; 68 + 69 + adc0: adc@f8018000 { 70 + pinctrl-names = "default"; 71 + pinctrl-0 = < 72 + &pinctrl_adc0_adtrg 73 + &pinctrl_adc0_ad0 74 + &pinctrl_adc0_ad1 75 + &pinctrl_adc0_ad2 76 + &pinctrl_adc0_ad3 77 + &pinctrl_adc0_ad4 78 + >; 79 + status = "okay"; 80 + }; 81 + 82 + macb1: ethernet@f802c000 { 83 + phy-mode = "rmii"; 84 + }; 85 + 86 + pinctrl@fffff200 { 87 + board { 88 + pinctrl_mmc0_cd: mmc0_cd { 89 + atmel,pins = 90 + <3 17 0x0 0x5>; /* PD17 GPIO with pullup deglitch */ 91 + }; 92 + 93 + pinctrl_mmc1_cd: mmc1_cd { 94 + atmel,pins = 95 + <3 18 0x0 0x5>; /* PD18 GPIO with pullup deglitch */ 96 + }; 97 + 98 + pinctrl_pck0_as_audio_mck: pck0_as_audio_mck { 99 + atmel,pins = 100 + <3 30 0x2 0x0>; /* PD30 periph B */ 101 + }; 102 + 103 + pinctrl_isi_reset: isi_reset-0 { 104 + atmel,pins = 105 + <4 24 0x0 0x0>; /* PE24 gpio */ 106 + }; 107 + 108 + pinctrl_isi_power: isi_power-0 { 109 + atmel,pins = 110 + <4 29 0x0 0x0>; /* PE29 gpio */ 111 + }; 112 + 113 + pinctrl_usba_vbus: usba_vbus { 114 + atmel,pins = 115 + <3 29 0x0 0x4>; /* PD29 GPIO with deglitch */ 116 + }; 117 + }; 118 + }; 119 + 120 + dbgu: serial@ffffee00 { 121 + status = "okay"; 122 + }; 123 + 124 + watchdog@fffffe40 { 125 + status = "okay"; 126 + }; 127 + }; 128 + 129 + usb0: gadget@00500000 { 130 + atmel,vbus-gpio = <&pioD 29 0>; 131 + pinctrl-names = "default"; 132 + pinctrl-0 = <&pinctrl_usba_vbus>; 133 + status = "okay"; 134 + }; 135 + 136 + usb1: ohci@00600000 { 137 + num-ports = <3>; 138 + atmel,vbus-gpio = <&pioD 25 0 139 + &pioD 26 1 140 + &pioD 27 1 141 + >; 142 + status = "okay"; 143 + }; 144 + 145 + usb2: ehci@00700000 { 146 + status = "okay"; 147 + }; 148 + }; 149 + 150 + sound { 151 + compatible = "atmel,sama5d3ek-wm8904"; 152 + pinctrl-names = "default"; 153 + pinctrl-0 = <&pinctrl_pck0_as_audio_mck>; 154 + 155 + atmel,model = "wm8904 @ SAMA5D3EK"; 156 + atmel,audio-routing = 157 + "Headphone Jack", "HPOUTL", 158 + "Headphone Jack", "HPOUTR", 159 + "IN2L", "Line In Jack", 160 + "IN2R", "Line In Jack", 161 + "IN1L", "Mic"; 162 + 163 + atmel,ssc-controller = <&ssc0>; 164 + atmel,audio-codec = <&wm8904>; 165 + }; 166 + };
+157
arch/arm/boot/dts/socfpga.dtsi
··· 81 81 }; 82 82 }; 83 83 84 + clkmgr@ffd04000 { 85 + compatible = "altr,clk-mgr"; 86 + reg = <0xffd04000 0x1000>; 87 + 88 + clocks { 89 + #address-cells = <1>; 90 + #size-cells = <0>; 91 + 92 + osc: osc1 { 93 + #clock-cells = <0>; 94 + compatible = "fixed-clock"; 95 + }; 96 + 97 + main_pll: main_pll { 98 + #address-cells = <1>; 99 + #size-cells = <0>; 100 + #clock-cells = <0>; 101 + compatible = "altr,socfpga-pll-clock"; 102 + clocks = <&osc>; 103 + reg = <0x40>; 104 + 105 + mpuclk: mpuclk { 106 + #clock-cells = <0>; 107 + compatible = "altr,socfpga-perip-clk"; 108 + clocks = <&main_pll>; 109 + fixed-divider = <2>; 110 + reg = <0x48>; 111 + }; 112 + 113 + mainclk: mainclk { 114 + #clock-cells = <0>; 115 + compatible = "altr,socfpga-perip-clk"; 116 + clocks = <&main_pll>; 117 + fixed-divider = <4>; 118 + reg = <0x4C>; 119 + }; 120 + 121 + dbg_base_clk: dbg_base_clk { 122 + #clock-cells = <0>; 123 + compatible = "altr,socfpga-perip-clk"; 124 + clocks = <&main_pll>; 125 + fixed-divider = <4>; 126 + reg = <0x50>; 127 + }; 128 + 129 + main_qspi_clk: main_qspi_clk { 130 + #clock-cells = <0>; 131 + compatible = "altr,socfpga-perip-clk"; 132 + clocks = <&main_pll>; 133 + reg = <0x54>; 134 + }; 135 + 136 + main_nand_sdmmc_clk: main_nand_sdmmc_clk { 137 + #clock-cells = <0>; 138 + compatible = "altr,socfpga-perip-clk"; 139 + clocks = <&main_pll>; 140 + reg = <0x58>; 141 + }; 142 + 143 + cfg_s2f_usr0_clk: cfg_s2f_usr0_clk { 144 + #clock-cells = <0>; 145 + compatible = "altr,socfpga-perip-clk"; 146 + clocks = <&main_pll>; 147 + reg = <0x5C>; 148 + }; 149 + }; 150 + 151 + periph_pll: periph_pll { 152 + #address-cells = <1>; 153 + #size-cells = <0>; 154 + #clock-cells = <0>; 155 + compatible = "altr,socfpga-pll-clock"; 156 + clocks = <&osc>; 157 + reg = <0x80>; 158 + 159 + emac0_clk: emac0_clk { 160 + #clock-cells = <0>; 161 + compatible = "altr,socfpga-perip-clk"; 162 + clocks = <&periph_pll>; 163 + reg = <0x88>; 164 + }; 165 + 166 + emac1_clk: emac1_clk { 167 + #clock-cells = <0>; 168 + compatible = "altr,socfpga-perip-clk"; 169 + clocks = <&periph_pll>; 170 + reg = <0x8C>; 171 + }; 172 + 173 + per_qspi_clk: per_qsi_clk { 174 + #clock-cells = <0>; 175 + compatible = "altr,socfpga-perip-clk"; 176 + clocks = <&periph_pll>; 177 + reg = <0x90>; 178 + }; 179 + 180 + per_nand_mmc_clk: per_nand_mmc_clk { 181 + #clock-cells = <0>; 182 + compatible = "altr,socfpga-perip-clk"; 183 + clocks = <&periph_pll>; 184 + reg = <0x94>; 185 + }; 186 + 187 + per_base_clk: per_base_clk { 188 + #clock-cells = <0>; 189 + compatible = "altr,socfpga-perip-clk"; 190 + clocks = <&periph_pll>; 191 + reg = <0x98>; 192 + }; 193 + 194 + s2f_usr1_clk: s2f_usr1_clk { 195 + #clock-cells = <0>; 196 + compatible = "altr,socfpga-perip-clk"; 197 + clocks = <&periph_pll>; 198 + reg = <0x9C>; 199 + }; 200 + }; 201 + 202 + sdram_pll: sdram_pll { 203 + #address-cells = <1>; 204 + #size-cells = <0>; 205 + #clock-cells = <0>; 206 + compatible = "altr,socfpga-pll-clock"; 207 + clocks = <&osc>; 208 + reg = <0xC0>; 209 + 210 + ddr_dqs_clk: ddr_dqs_clk { 211 + #clock-cells = <0>; 212 + compatible = "altr,socfpga-perip-clk"; 213 + clocks = <&sdram_pll>; 214 + reg = <0xC8>; 215 + }; 216 + 217 + ddr_2x_dqs_clk: ddr_2x_dqs_clk { 218 + #clock-cells = <0>; 219 + compatible = "altr,socfpga-perip-clk"; 220 + clocks = <&sdram_pll>; 221 + reg = <0xCC>; 222 + }; 223 + 224 + ddr_dq_clk: ddr_dq_clk { 225 + #clock-cells = <0>; 226 + compatible = "altr,socfpga-perip-clk"; 227 + clocks = <&sdram_pll>; 228 + reg = <0xD0>; 229 + }; 230 + 231 + s2f_usr2_clk: s2f_usr2_clk { 232 + #clock-cells = <0>; 233 + compatible = "altr,socfpga-perip-clk"; 234 + clocks = <&sdram_pll>; 235 + reg = <0xD4>; 236 + }; 237 + }; 238 + }; 239 + }; 240 + 84 241 gmac0: stmmac@ff700000 { 85 242 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; 86 243 reg = <0xff700000 0x2000>;
+8
arch/arm/boot/dts/socfpga_cyclone5.dts
··· 33 33 }; 34 34 35 35 soc { 36 + clkmgr@ffd04000 { 37 + clocks { 38 + osc1 { 39 + clock-frequency = <25000000>; 40 + }; 41 + }; 42 + }; 43 + 36 44 timer0@ffc08000 { 37 45 clock-frequency = <100000000>; 38 46 };
+8
arch/arm/boot/dts/socfpga_vt.dts
··· 33 33 }; 34 34 35 35 soc { 36 + clkmgr@ffd04000 { 37 + clocks { 38 + osc1 { 39 + clock-frequency = <10000000>; 40 + }; 41 + }; 42 + }; 43 + 36 44 timer0@ffc08000 { 37 45 clock-frequency = <7000000>; 38 46 };
+13
arch/arm/boot/dts/tegra114-dalmore.dts
··· 18 18 pmc { 19 19 nvidia,invert-interrupt; 20 20 }; 21 + 22 + clocks { 23 + compatible = "simple-bus"; 24 + #address-cells = <1>; 25 + #size-cells = <0>; 26 + 27 + clk32k_in: clock { 28 + compatible = "fixed-clock"; 29 + reg=<0>; 30 + #clock-cells = <0>; 31 + clock-frequency = <32768>; 32 + }; 33 + }; 21 34 };
+13
arch/arm/boot/dts/tegra114-pluto.dts
··· 18 18 pmc { 19 19 nvidia,invert-interrupt; 20 20 }; 21 + 22 + clocks { 23 + compatible = "simple-bus"; 24 + #address-cells = <1>; 25 + #size-cells = <0>; 26 + 27 + clk32k_in: clock { 28 + compatible = "fixed-clock"; 29 + reg=<0>; 30 + #clock-cells = <0>; 31 + clock-frequency = <32768>; 32 + }; 33 + }; 21 34 };
+2
arch/arm/boot/dts/tegra114.dtsi
··· 101 101 pmc { 102 102 compatible = "nvidia,tegra114-pmc"; 103 103 reg = <0x7000e400 0x400>; 104 + clocks = <&tegra_car 261>, <&clk32k_in>; 105 + clock-names = "pclk", "clk32k_in"; 104 106 }; 105 107 106 108 iommu {
+13
arch/arm/boot/dts/tegra20-colibri-512.dtsi
··· 447 447 cd-gpios = <&gpio 23 1>; /* gpio PC7 */ 448 448 }; 449 449 450 + clocks { 451 + compatible = "simple-bus"; 452 + #address-cells = <1>; 453 + #size-cells = <0>; 454 + 455 + clk32k_in: clock { 456 + compatible = "fixed-clock"; 457 + reg=<0>; 458 + #clock-cells = <0>; 459 + clock-frequency = <32768>; 460 + }; 461 + }; 462 + 450 463 sound { 451 464 compatible = "nvidia,tegra-audio-wm9712-colibri_t20", 452 465 "nvidia,tegra-audio-wm9712";
+13
arch/arm/boot/dts/tegra20-harmony.dts
··· 451 451 bus-width = <8>; 452 452 }; 453 453 454 + clocks { 455 + compatible = "simple-bus"; 456 + #address-cells = <1>; 457 + #size-cells = <0>; 458 + 459 + clk32k_in: clock { 460 + compatible = "fixed-clock"; 461 + reg=<0>; 462 + #clock-cells = <0>; 463 + clock-frequency = <32768>; 464 + }; 465 + }; 466 + 454 467 kbc { 455 468 status = "okay"; 456 469 nvidia,debounce-delay-ms = <2>;
+13
arch/arm/boot/dts/tegra20-paz00.dts
··· 447 447 bus-width = <8>; 448 448 }; 449 449 450 + clocks { 451 + compatible = "simple-bus"; 452 + #address-cells = <1>; 453 + #size-cells = <0>; 454 + 455 + clk32k_in: clock { 456 + compatible = "fixed-clock"; 457 + reg=<0>; 458 + #clock-cells = <0>; 459 + clock-frequency = <32768>; 460 + }; 461 + }; 462 + 450 463 gpio-keys { 451 464 compatible = "gpio-keys"; 452 465
+13
arch/arm/boot/dts/tegra20-seaboard.dts
··· 595 595 bus-width = <8>; 596 596 }; 597 597 598 + clocks { 599 + compatible = "simple-bus"; 600 + #address-cells = <1>; 601 + #size-cells = <0>; 602 + 603 + clk32k_in: clock { 604 + compatible = "fixed-clock"; 605 + reg=<0>; 606 + #clock-cells = <0>; 607 + clock-frequency = <32768>; 608 + }; 609 + }; 610 + 598 611 gpio-keys { 599 612 compatible = "gpio-keys"; 600 613
+13
arch/arm/boot/dts/tegra20-tamonten.dtsi
··· 471 471 status = "okay"; 472 472 }; 473 473 474 + clocks { 475 + compatible = "simple-bus"; 476 + #address-cells = <1>; 477 + #size-cells = <0>; 478 + 479 + clk32k_in: clock { 480 + compatible = "fixed-clock"; 481 + reg=<0>; 482 + #clock-cells = <0>; 483 + clock-frequency = <32768>; 484 + }; 485 + }; 486 + 474 487 regulators { 475 488 compatible = "simple-bus"; 476 489
+13
arch/arm/boot/dts/tegra20-trimslice.dts
··· 330 330 bus-width = <4>; 331 331 }; 332 332 333 + clocks { 334 + compatible = "simple-bus"; 335 + #address-cells = <1>; 336 + #size-cells = <0>; 337 + 338 + clk32k_in: clock { 339 + compatible = "fixed-clock"; 340 + reg=<0>; 341 + #clock-cells = <0>; 342 + clock-frequency = <32768>; 343 + }; 344 + }; 345 + 333 346 poweroff { 334 347 compatible = "gpio-poweroff"; 335 348 gpios = <&gpio 191 1>; /* gpio PX7, active low */
+13
arch/arm/boot/dts/tegra20-ventana.dts
··· 531 531 bus-width = <8>; 532 532 }; 533 533 534 + clocks { 535 + compatible = "simple-bus"; 536 + #address-cells = <1>; 537 + #size-cells = <0>; 538 + 539 + clk32k_in: clock { 540 + compatible = "fixed-clock"; 541 + reg=<0>; 542 + #clock-cells = <0>; 543 + clock-frequency = <32768>; 544 + }; 545 + }; 546 + 534 547 regulators { 535 548 compatible = "simple-bus"; 536 549 #address-cells = <1>;
+13
arch/arm/boot/dts/tegra20-whistler.dts
··· 520 520 bus-width = <8>; 521 521 }; 522 522 523 + clocks { 524 + compatible = "simple-bus"; 525 + #address-cells = <1>; 526 + #size-cells = <0>; 527 + 528 + clk32k_in: clock { 529 + compatible = "fixed-clock"; 530 + reg=<0>; 531 + #clock-cells = <0>; 532 + clock-frequency = <32768>; 533 + }; 534 + }; 535 + 523 536 kbc { 524 537 status = "okay"; 525 538 nvidia,debounce-delay-ms = <20>;
+2
arch/arm/boot/dts/tegra20.dtsi
··· 418 418 pmc { 419 419 compatible = "nvidia,tegra20-pmc"; 420 420 reg = <0x7000e400 0x400>; 421 + clocks = <&tegra_car 110>, <&clk32k_in>; 422 + clock-names = "pclk", "clk32k_in"; 421 423 }; 422 424 423 425 memory-controller@7000f000 {
+13
arch/arm/boot/dts/tegra30-beaver.dts
··· 268 268 bus-width = <8>; 269 269 }; 270 270 271 + clocks { 272 + compatible = "simple-bus"; 273 + #address-cells = <1>; 274 + #size-cells = <0>; 275 + 276 + clk32k_in: clock { 277 + compatible = "fixed-clock"; 278 + reg=<0>; 279 + #clock-cells = <0>; 280 + clock-frequency = <32768>; 281 + }; 282 + }; 283 + 271 284 regulators { 272 285 compatible = "simple-bus"; 273 286 #address-cells = <1>;
+13
arch/arm/boot/dts/tegra30-cardhu.dtsi
··· 322 322 bus-width = <8>; 323 323 }; 324 324 325 + clocks { 326 + compatible = "simple-bus"; 327 + #address-cells = <1>; 328 + #size-cells = <0>; 329 + 330 + clk32k_in: clock { 331 + compatible = "fixed-clock"; 332 + reg=<0>; 333 + #clock-cells = <0>; 334 + clock-frequency = <32768>; 335 + }; 336 + }; 337 + 325 338 regulators { 326 339 compatible = "simple-bus"; 327 340 #address-cells = <1>;
+2
arch/arm/boot/dts/tegra30.dtsi
··· 427 427 pmc { 428 428 compatible = "nvidia,tegra30-pmc"; 429 429 reg = <0x7000e400 0x400>; 430 + clocks = <&tegra_car 218>, <&clk32k_in>; 431 + clock-names = "pclk", "clk32k_in"; 430 432 }; 431 433 432 434 memory-controller {
+47
arch/arm/boot/dts/tps6507x.dtsi
··· 1 + /* 2 + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + */ 8 + 9 + /* 10 + * Integrated Power Management Chip 11 + * http://www.ti.com/lit/ds/symlink/tps65070.pdf 12 + */ 13 + 14 + &tps { 15 + compatible = "ti,tps6507x"; 16 + 17 + regulators { 18 + #address-cells = <1>; 19 + #size-cells = <0>; 20 + 21 + vdcdc1_reg: regulator@0 { 22 + reg = <0>; 23 + regulator-compatible = "VDCDC1"; 24 + }; 25 + 26 + vdcdc2_reg: regulator@1 { 27 + reg = <1>; 28 + regulator-compatible = "VDCDC2"; 29 + }; 30 + 31 + vdcdc3_reg: regulator@2 { 32 + reg = <2>; 33 + regulator-compatible = "VDCDC3"; 34 + }; 35 + 36 + ldo1_reg: regulator@3 { 37 + reg = <3>; 38 + regulator-compatible = "LDO1"; 39 + }; 40 + 41 + ldo2_reg: regulator@4 { 42 + reg = <4>; 43 + regulator-compatible = "LDO2"; 44 + }; 45 + 46 + }; 47 + };
+95
arch/arm/configs/ape6evm_defconfig
··· 1 + CONFIG_SYSVIPC=y 2 + CONFIG_POSIX_MQUEUE=y 3 + CONFIG_NO_HZ=y 4 + CONFIG_HIGH_RES_TIMERS=y 5 + CONFIG_BSD_PROCESS_ACCT=y 6 + CONFIG_IKCONFIG=y 7 + CONFIG_IKCONFIG_PROC=y 8 + CONFIG_LOG_BUF_SHIFT=16 9 + CONFIG_CGROUPS=y 10 + CONFIG_CGROUP_SCHED=y 11 + CONFIG_KALLSYMS_ALL=y 12 + CONFIG_EMBEDDED=y 13 + CONFIG_PERF_EVENTS=y 14 + CONFIG_SLAB=y 15 + # CONFIG_BLOCK is not set 16 + CONFIG_ARCH_SHMOBILE=y 17 + CONFIG_ARCH_R8A73A4=y 18 + CONFIG_MACH_APE6EVM=y 19 + # CONFIG_ARM_THUMB is not set 20 + CONFIG_CPU_BPREDICT_DISABLE=y 21 + CONFIG_PL310_ERRATA_588369=y 22 + CONFIG_ARM_ERRATA_754322=y 23 + CONFIG_SMP=y 24 + CONFIG_SCHED_MC=y 25 + CONFIG_HAVE_ARM_ARCH_TIMER=y 26 + CONFIG_NR_CPUS=8 27 + CONFIG_AEABI=y 28 + CONFIG_HIGHMEM=y 29 + CONFIG_HIGHPTE=y 30 + # CONFIG_HW_PERF_EVENTS is not set 31 + # CONFIG_COMPACTION is not set 32 + # CONFIG_CROSS_MEMORY_ATTACH is not set 33 + CONFIG_ARM_APPENDED_DTB=y 34 + CONFIG_VFP=y 35 + CONFIG_NEON=y 36 + CONFIG_BINFMT_MISC=y 37 + CONFIG_NET=y 38 + CONFIG_PACKET=y 39 + CONFIG_UNIX=y 40 + CONFIG_XFRM_USER=y 41 + CONFIG_NET_KEY=y 42 + CONFIG_NET_KEY_MIGRATE=y 43 + CONFIG_INET=y 44 + CONFIG_IP_MULTICAST=y 45 + CONFIG_IP_PNP=y 46 + CONFIG_IP_PNP_DHCP=y 47 + # CONFIG_INET_LRO is not set 48 + # CONFIG_IPV6_SIT is not set 49 + CONFIG_NETFILTER=y 50 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 51 + # CONFIG_FW_LOADER_USER_HELPER is not set 52 + CONFIG_NETDEVICES=y 53 + # CONFIG_NET_CADENCE is not set 54 + CONFIG_SMC91X=y 55 + CONFIG_SMSC911X=y 56 + # CONFIG_INPUT_MOUSEDEV is not set 57 + # CONFIG_INPUT_KEYBOARD is not set 58 + # CONFIG_INPUT_MOUSE is not set 59 + # CONFIG_SERIO is not set 60 + CONFIG_SERIAL_NONSTANDARD=y 61 + CONFIG_SERIAL_SH_SCI=y 62 + CONFIG_SERIAL_SH_SCI_NR_UARTS=12 63 + CONFIG_SERIAL_SH_SCI_CONSOLE=y 64 + CONFIG_GPIO_SH_PFC=y 65 + CONFIG_GPIOLIB=y 66 + # CONFIG_HWMON is not set 67 + CONFIG_THERMAL=y 68 + CONFIG_RCAR_THERMAL=y 69 + CONFIG_REGULATOR=y 70 + CONFIG_REGULATOR_FIXED_VOLTAGE=y 71 + CONFIG_REGULATOR_GPIO=y 72 + # CONFIG_HID is not set 73 + # CONFIG_USB_SUPPORT is not set 74 + # CONFIG_IOMMU_SUPPORT is not set 75 + # CONFIG_DNOTIFY is not set 76 + CONFIG_TMPFS=y 77 + # CONFIG_MISC_FILESYSTEMS is not set 78 + CONFIG_NFS_FS=y 79 + CONFIG_NFS_V3_ACL=y 80 + CONFIG_NFS_V4=y 81 + CONFIG_NFS_V4_1=y 82 + CONFIG_ROOT_NFS=y 83 + CONFIG_MAGIC_SYSRQ=y 84 + CONFIG_ENABLE_DEFAULT_TRACERS=y 85 + CONFIG_CRYPTO_CBC=y 86 + CONFIG_CRYPTO_ECB=y 87 + CONFIG_CRYPTO_MD5=y 88 + CONFIG_CRYPTO_MICHAEL_MIC=y 89 + CONFIG_CRYPTO_TWOFISH=y 90 + CONFIG_CRC_CCITT=y 91 + CONFIG_CRC16=y 92 + CONFIG_CRC_T10DIF=y 93 + CONFIG_CRC_ITU_T=y 94 + CONFIG_CRC7=y 95 + CONFIG_LIBCRC32C=y
+7 -1
arch/arm/configs/armadillo800eva_defconfig
··· 20 20 CONFIG_MACH_ARMADILLO800EVA=y 21 21 # CONFIG_SH_TIMER_TMU is not set 22 22 CONFIG_ARM_THUMB=y 23 - CONFIG_CPU_BPREDICT_DISABLE=y 24 23 CONFIG_CACHE_L2X0=y 25 24 CONFIG_ARM_ERRATA_430973=y 26 25 CONFIG_ARM_ERRATA_458693=y 27 26 CONFIG_ARM_ERRATA_460075=y 27 + CONFIG_PL310_ERRATA_588369=y 28 28 CONFIG_ARM_ERRATA_720789=y 29 + CONFIG_PL310_ERRATA_727915=y 29 30 CONFIG_ARM_ERRATA_743622=y 30 31 CONFIG_ARM_ERRATA_751472=y 32 + CONFIG_PL310_ERRATA_753970=y 31 33 CONFIG_ARM_ERRATA_754322=y 34 + CONFIG_PL310_ERRATA_769419=y 35 + CONFIG_ARM_ERRATA_775420=y 32 36 CONFIG_AEABI=y 33 37 # CONFIG_OABI_COMPAT is not set 34 38 CONFIG_FORCE_MAX_ZONEORDER=13 ··· 41 37 CONFIG_ARM_APPENDED_DTB=y 42 38 CONFIG_KEXEC=y 43 39 CONFIG_VFP=y 40 + CONFIG_NEON=y 44 41 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 45 42 CONFIG_PM_RUNTIME=y 46 43 CONFIG_NET=y ··· 93 88 CONFIG_I2C_GPIO=y 94 89 CONFIG_I2C_SH_MOBILE=y 95 90 # CONFIG_HWMON is not set 91 + CONFIG_REGULATOR=y 96 92 CONFIG_MEDIA_SUPPORT=y 97 93 CONFIG_VIDEO_DEV=y 98 94 CONFIG_MEDIA_CAMERA_SUPPORT=y
+4 -5
arch/arm/configs/bcm2835_defconfig
··· 59 59 CONFIG_SERIAL_AMBA_PL011=y 60 60 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 61 61 CONFIG_TTY_PRINTK=y 62 - # CONFIG_HW_RANDOM is not set 62 + CONFIG_HW_RANDOM=y 63 + CONFIG_HW_RANDOM_BCM2835=y 63 64 CONFIG_I2C=y 64 65 CONFIG_I2C_CHARDEV=y 65 66 CONFIG_I2C_BCM2835=y 67 + CONFIG_SPI=y 68 + CONFIG_SPI_BCM2835=y 66 69 CONFIG_GPIO_SYSFS=y 67 70 # CONFIG_HWMON is not set 68 71 # CONFIG_USB_SUPPORT is not set ··· 111 108 CONFIG_STRICT_DEVMEM=y 112 109 CONFIG_DEBUG_LL=y 113 110 CONFIG_EARLY_PRINTK=y 114 - # CONFIG_XZ_DEC_X86 is not set 115 - # CONFIG_XZ_DEC_POWERPC is not set 116 - # CONFIG_XZ_DEC_IA64 is not set 117 111 # CONFIG_XZ_DEC_ARM is not set 118 112 # CONFIG_XZ_DEC_ARMTHUMB is not set 119 - # CONFIG_XZ_DEC_SPARC is not set
-2
arch/arm/configs/kzm9g_defconfig
··· 33 33 CONFIG_HIGH_RES_TIMERS=y 34 34 CONFIG_SMP=y 35 35 CONFIG_SCHED_MC=y 36 - CONFIG_PREEMPT=y 37 36 CONFIG_AEABI=y 38 37 # CONFIG_OABI_COMPAT is not set 39 38 CONFIG_HIGHMEM=y ··· 85 86 CONFIG_GPIO_PCF857X=y 86 87 # CONFIG_HWMON is not set 87 88 CONFIG_REGULATOR=y 88 - CONFIG_REGULATOR_DUMMY=y 89 89 CONFIG_FB=y 90 90 CONFIG_FB_SH_MOBILE_LCDC=y 91 91 CONFIG_FRAMEBUFFER_CONSOLE=y
+17 -4
arch/arm/configs/lpc32xx_defconfig
··· 1 - CONFIG_EXPERIMENTAL=y 2 1 CONFIG_SYSVIPC=y 3 2 CONFIG_NO_HZ=y 4 3 CONFIG_HIGH_RES_TIMERS=y ··· 17 18 # CONFIG_BLK_DEV_BSG is not set 18 19 CONFIG_PARTITION_ADVANCED=y 19 20 CONFIG_ARCH_LPC32XX=y 21 + CONFIG_GPIO_PCA953X=y 20 22 CONFIG_KEYBOARD_GPIO_POLLED=y 21 23 CONFIG_PREEMPT=y 22 24 CONFIG_AEABI=y ··· 48 48 CONFIG_IPV6_PRIVACY=y 49 49 # CONFIG_WIRELESS is not set 50 50 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 51 + CONFIG_DEVTMPFS=y 52 + CONFIG_DEVTMPFS_MOUNT=y 51 53 # CONFIG_FW_LOADER is not set 52 54 CONFIG_MTD=y 53 55 CONFIG_MTD_CMDLINE_PARTS=y ··· 57 55 CONFIG_MTD_BLOCK=y 58 56 CONFIG_MTD_M25P80=y 59 57 CONFIG_MTD_NAND=y 60 - CONFIG_MTD_NAND_MUSEUM_IDS=y 61 58 CONFIG_MTD_NAND_SLC_LPC32XX=y 62 59 CONFIG_MTD_NAND_MLC_LPC32XX=y 63 60 CONFIG_BLK_DEV_LOOP=y ··· 71 70 CONFIG_NETDEVICES=y 72 71 CONFIG_MII=y 73 72 # CONFIG_NET_VENDOR_BROADCOM is not set 74 - # CONFIG_NET_VENDOR_CHELSIO is not set 75 73 # CONFIG_NET_VENDOR_CIRRUS is not set 76 74 # CONFIG_NET_VENDOR_FARADAY is not set 77 75 # CONFIG_NET_VENDOR_INTEL is not set ··· 84 84 # CONFIG_NET_VENDOR_STMICRO is not set 85 85 CONFIG_SMSC_PHY=y 86 86 # CONFIG_WLAN is not set 87 - CONFIG_INPUT_MATRIXKMAP=y 88 87 # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 89 88 CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 90 89 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 ··· 107 108 CONFIG_SPI=y 108 109 CONFIG_SPI_PL022=y 109 110 CONFIG_GPIO_SYSFS=y 111 + CONFIG_GPIO_GENERIC_PLATFORM=y 112 + CONFIG_GPIO_EM=y 113 + CONFIG_GPIO_PL061=y 114 + CONFIG_GPIO_MAX7300=y 115 + CONFIG_GPIO_MAX732X=y 116 + CONFIG_GPIO_PCF857X=y 117 + CONFIG_GPIO_SX150X=y 118 + CONFIG_GPIO_ADP5588=y 119 + CONFIG_GPIO_ADNP=y 120 + CONFIG_GPIO_MAX7301=y 121 + CONFIG_GPIO_MCP23S08=y 122 + CONFIG_GPIO_MC33880=y 123 + CONFIG_GPIO_74X164=y 110 124 CONFIG_SENSORS_DS620=y 111 125 CONFIG_SENSORS_MAX6639=y 112 126 CONFIG_WATCHDOG=y ··· 156 144 CONFIG_MMC=y 157 145 # CONFIG_MMC_BLOCK_BOUNCE is not set 158 146 CONFIG_MMC_ARMMMCI=y 147 + CONFIG_MMC_SPI=y 159 148 CONFIG_NEW_LEDS=y 160 149 CONFIG_LEDS_CLASS=y 161 150 CONFIG_LEDS_PCA9532=y
+4
arch/arm/configs/mackerel_defconfig
··· 75 75 CONFIG_I2C_SH_MOBILE=y 76 76 # CONFIG_HWMON is not set 77 77 # CONFIG_MFD_SUPPORT is not set 78 + CONFIG_REGULATOR=y 78 79 CONFIG_FB=y 79 80 CONFIG_FB_MODE_HELPERS=y 80 81 CONFIG_FB_SH_MOBILE_LCDC=y ··· 95 94 CONFIG_USB_STORAGE=y 96 95 CONFIG_USB_GADGET=y 97 96 CONFIG_USB_RENESAS_USBHS_UDC=y 97 + CONFIG_MMC=y 98 + CONFIG_MMC_SDHI=y 99 + CONFIG_MMC_SH_MMCIF=y 98 100 CONFIG_DMADEVICES=y 99 101 CONFIG_SH_DMAE=y 100 102 CONFIG_EXT2_FS=y
+8
arch/arm/configs/marzen_defconfig
··· 49 49 # CONFIG_FW_LOADER is not set 50 50 CONFIG_SCSI=y 51 51 CONFIG_BLK_DEV_SD=y 52 + CONFIG_ATA=y 53 + CONFIG_ATA_SFF=y 54 + CONFIG_ATA_BMDMA=y 55 + CONFIG_SATA_RCAR=y 52 56 CONFIG_NETDEVICES=y 53 57 # CONFIG_NET_VENDOR_BROADCOM is not set 54 58 # CONFIG_NET_VENDOR_FARADAY is not set ··· 79 75 CONFIG_SPI=y 80 76 CONFIG_SPI_SH_HSPI=y 81 77 CONFIG_GPIO_SYSFS=y 78 + CONFIG_GPIO_RCAR=y 82 79 # CONFIG_HWMON is not set 83 80 CONFIG_THERMAL=y 84 81 CONFIG_RCAR_THERMAL=y ··· 93 88 CONFIG_USB_OHCI_HCD_PLATFORM=y 94 89 CONFIG_USB_EHCI_HCD_PLATFORM=y 95 90 CONFIG_USB_STORAGE=y 91 + CONFIG_NEW_LEDS=y 92 + CONFIG_LEDS_CLASS=y 93 + CONFIG_LEDS_GPIO=y 96 94 CONFIG_UIO=y 97 95 CONFIG_UIO_PDRV_GENIRQ=y 98 96 # CONFIG_IOMMU_SUPPORT is not set
+4 -1
arch/arm/configs/mxs_defconfig
··· 75 75 CONFIG_MICREL_PHY=y 76 76 # CONFIG_WLAN is not set 77 77 # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 78 - CONFIG_INPUT_EVDEV=m 78 + CONFIG_INPUT_EVDEV=y 79 79 # CONFIG_INPUT_KEYBOARD is not set 80 80 # CONFIG_INPUT_MOUSE is not set 81 81 CONFIG_INPUT_TOUCHSCREEN=y ··· 99 99 CONFIG_DEBUG_GPIO=y 100 100 CONFIG_GPIO_SYSFS=y 101 101 # CONFIG_HWMON is not set 102 + CONFIG_WATCHDOG=y 103 + CONFIG_STMP3XXX_RTC_WATCHDOG=y 102 104 CONFIG_REGULATOR=y 103 105 CONFIG_REGULATOR_FIXED_VOLTAGE=y 104 106 CONFIG_FB=y ··· 125 123 CONFIG_USB_PHY=y 126 124 CONFIG_USB_MXS_PHY=y 127 125 CONFIG_MMC=y 126 + CONFIG_MMC_UNSAFE_RESUME=y 128 127 CONFIG_MMC_MXS=y 129 128 CONFIG_NEW_LEDS=y 130 129 CONFIG_LEDS_CLASS=y
+181
arch/arm/configs/sama5_defconfig
··· 1 + # CONFIG_LOCALVERSION_AUTO is not set 2 + # CONFIG_SWAP is not set 3 + CONFIG_SYSVIPC=y 4 + CONFIG_IRQ_DOMAIN_DEBUG=y 5 + CONFIG_LOG_BUF_SHIFT=14 6 + CONFIG_SYSFS_DEPRECATED=y 7 + CONFIG_SYSFS_DEPRECATED_V2=y 8 + CONFIG_BLK_DEV_INITRD=y 9 + CONFIG_EMBEDDED=y 10 + CONFIG_SLAB=y 11 + CONFIG_MODULES=y 12 + CONFIG_MODULE_FORCE_LOAD=y 13 + CONFIG_MODULE_UNLOAD=y 14 + CONFIG_MODULE_FORCE_UNLOAD=y 15 + # CONFIG_LBDAF is not set 16 + # CONFIG_BLK_DEV_BSG is not set 17 + # CONFIG_IOSCHED_DEADLINE is not set 18 + # CONFIG_IOSCHED_CFQ is not set 19 + CONFIG_ARCH_AT91=y 20 + CONFIG_SOC_SAM_V7=y 21 + CONFIG_SOC_SAMA5D3=y 22 + CONFIG_MACH_SAMA5_DT=y 23 + CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 24 + CONFIG_AEABI=y 25 + # CONFIG_OABI_COMPAT is not set 26 + CONFIG_UACCESS_WITH_MEMCPY=y 27 + CONFIG_ZBOOT_ROM_TEXT=0x0 28 + CONFIG_ZBOOT_ROM_BSS=0x0 29 + CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" 30 + CONFIG_AUTO_ZRELADDR=y 31 + CONFIG_VFP=y 32 + # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 33 + CONFIG_PM_RUNTIME=y 34 + CONFIG_PM_DEBUG=y 35 + CONFIG_PM_ADVANCED_DEBUG=y 36 + CONFIG_NET=y 37 + CONFIG_PACKET=y 38 + CONFIG_UNIX=y 39 + CONFIG_INET=y 40 + CONFIG_IP_MULTICAST=y 41 + CONFIG_IP_PNP=y 42 + # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 43 + # CONFIG_INET_XFRM_MODE_TUNNEL is not set 44 + # CONFIG_INET_XFRM_MODE_BEET is not set 45 + # CONFIG_INET_LRO is not set 46 + # CONFIG_INET_DIAG is not set 47 + CONFIG_IPV6=y 48 + # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set 49 + # CONFIG_INET6_XFRM_MODE_TUNNEL is not set 50 + # CONFIG_INET6_XFRM_MODE_BEET is not set 51 + CONFIG_IPV6_SIT_6RD=y 52 + CONFIG_CAN=y 53 + CONFIG_CAN_AT91=y 54 + CONFIG_CFG80211=y 55 + CONFIG_MAC80211=y 56 + CONFIG_MAC80211_LEDS=y 57 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 58 + CONFIG_DEVTMPFS=y 59 + CONFIG_DEVTMPFS_MOUNT=y 60 + # CONFIG_STANDALONE is not set 61 + # CONFIG_PREVENT_FIRMWARE_BUILD is not set 62 + CONFIG_MTD=y 63 + CONFIG_MTD_CMDLINE_PARTS=y 64 + CONFIG_MTD_CHAR=y 65 + CONFIG_MTD_BLOCK=y 66 + CONFIG_MTD_CFI=y 67 + CONFIG_MTD_M25P80=y 68 + CONFIG_MTD_NAND=y 69 + CONFIG_MTD_NAND_ATMEL=y 70 + CONFIG_MTD_UBI=y 71 + CONFIG_BLK_DEV_LOOP=y 72 + CONFIG_BLK_DEV_RAM=y 73 + CONFIG_BLK_DEV_RAM_COUNT=4 74 + CONFIG_BLK_DEV_RAM_SIZE=8192 75 + CONFIG_ATMEL_TCLIB=y 76 + CONFIG_ATMEL_SSC=y 77 + CONFIG_EEPROM_AT24=y 78 + CONFIG_SCSI=y 79 + CONFIG_BLK_DEV_SD=y 80 + CONFIG_SCSI_MULTI_LUN=y 81 + # CONFIG_SCSI_LOWLEVEL is not set 82 + CONFIG_NETDEVICES=y 83 + CONFIG_MII=y 84 + CONFIG_MACB=y 85 + # CONFIG_NET_VENDOR_BROADCOM is not set 86 + # CONFIG_NET_VENDOR_CIRRUS is not set 87 + # CONFIG_NET_VENDOR_FARADAY is not set 88 + # CONFIG_NET_VENDOR_INTEL is not set 89 + # CONFIG_NET_VENDOR_MARVELL is not set 90 + # CONFIG_NET_VENDOR_MICREL is not set 91 + # CONFIG_NET_VENDOR_MICROCHIP is not set 92 + # CONFIG_NET_VENDOR_NATSEMI is not set 93 + # CONFIG_NET_VENDOR_SEEQ is not set 94 + # CONFIG_NET_VENDOR_SMSC is not set 95 + # CONFIG_NET_VENDOR_STMICRO is not set 96 + # CONFIG_NET_VENDOR_WIZNET is not set 97 + CONFIG_MICREL_PHY=y 98 + # CONFIG_WLAN is not set 99 + # CONFIG_INPUT_MOUSEDEV is not set 100 + CONFIG_INPUT_EVDEV=y 101 + # CONFIG_KEYBOARD_ATKBD is not set 102 + CONFIG_KEYBOARD_QT1070=y 103 + CONFIG_KEYBOARD_GPIO=y 104 + # CONFIG_INPUT_MOUSE is not set 105 + CONFIG_INPUT_TOUCHSCREEN=y 106 + CONFIG_TOUCHSCREEN_ATMEL_MXT=y 107 + CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y 108 + # CONFIG_SERIO is not set 109 + CONFIG_LEGACY_PTY_COUNT=4 110 + CONFIG_SERIAL_ATMEL=y 111 + CONFIG_SERIAL_ATMEL_CONSOLE=y 112 + CONFIG_HW_RANDOM=y 113 + CONFIG_I2C=y 114 + CONFIG_I2C_CHARDEV=y 115 + CONFIG_I2C_AT91=y 116 + CONFIG_I2C_GPIO=y 117 + CONFIG_SPI=y 118 + CONFIG_SPI_ATMEL=y 119 + CONFIG_SPI_GPIO=y 120 + CONFIG_GPIO_SYSFS=y 121 + # CONFIG_HWMON is not set 122 + CONFIG_SSB=m 123 + CONFIG_FB=y 124 + CONFIG_BACKLIGHT_LCD_SUPPORT=y 125 + # CONFIG_LCD_CLASS_DEVICE is not set 126 + CONFIG_BACKLIGHT_CLASS_DEVICE=y 127 + # CONFIG_BACKLIGHT_GENERIC is not set 128 + CONFIG_FRAMEBUFFER_CONSOLE=y 129 + # CONFIG_HID_GENERIC is not set 130 + CONFIG_USB=y 131 + CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 132 + CONFIG_USB_EHCI_HCD=y 133 + CONFIG_USB_OHCI_HCD=y 134 + CONFIG_USB_ACM=y 135 + CONFIG_USB_STORAGE=y 136 + CONFIG_USB_GADGET=y 137 + CONFIG_USB_AT91=y 138 + CONFIG_USB_MASS_STORAGE=m 139 + CONFIG_MMC=y 140 + # CONFIG_MMC_BLOCK_BOUNCE is not set 141 + CONFIG_MMC_ATMELMCI=y 142 + CONFIG_NEW_LEDS=y 143 + CONFIG_LEDS_CLASS=y 144 + CONFIG_LEDS_GPIO=y 145 + CONFIG_LEDS_TRIGGER_TIMER=y 146 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 147 + CONFIG_LEDS_TRIGGER_GPIO=y 148 + CONFIG_RTC_CLASS=y 149 + CONFIG_RTC_DRV_AT91RM9200=y 150 + CONFIG_DMADEVICES=y 151 + # CONFIG_IOMMU_SUPPORT is not set 152 + CONFIG_IIO=y 153 + CONFIG_AT91_ADC=y 154 + CONFIG_EXT2_FS=y 155 + CONFIG_FANOTIFY=y 156 + CONFIG_VFAT_FS=y 157 + CONFIG_TMPFS=y 158 + CONFIG_JFFS2_FS=y 159 + CONFIG_JFFS2_SUMMARY=y 160 + CONFIG_UBIFS_FS=y 161 + CONFIG_NFS_FS=y 162 + CONFIG_ROOT_NFS=y 163 + CONFIG_NLS_CODEPAGE_437=y 164 + CONFIG_NLS_CODEPAGE_850=y 165 + CONFIG_NLS_ISO8859_1=y 166 + CONFIG_STRIP_ASM_SYMS=y 167 + CONFIG_DEBUG_FS=y 168 + # CONFIG_SCHED_DEBUG is not set 169 + CONFIG_DEBUG_MEMORY_INIT=y 170 + # CONFIG_FTRACE is not set 171 + CONFIG_DEBUG_USER=y 172 + CONFIG_DEBUG_LL=y 173 + CONFIG_EARLY_PRINTK=y 174 + # CONFIG_CRYPTO_ANSI_CPRNG is not set 175 + CONFIG_CRYPTO_USER_API_HASH=m 176 + CONFIG_CRYPTO_USER_API_SKCIPHER=m 177 + CONFIG_CRYPTO_DEV_ATMEL_AES=y 178 + CONFIG_CRYPTO_DEV_ATMEL_TDES=y 179 + CONFIG_CRYPTO_DEV_ATMEL_SHA=y 180 + CONFIG_CRC_CCITT=m 181 + CONFIG_CRC_ITU_T=m
+10 -8
arch/arm/configs/tegra_defconfig
··· 1 - CONFIG_EXPERIMENTAL=y 2 1 CONFIG_NO_HZ=y 3 2 CONFIG_HIGH_RES_TIMERS=y 4 3 CONFIG_IKCONFIG=y ··· 19 20 CONFIG_MODULE_FORCE_UNLOAD=y 20 21 # CONFIG_BLK_DEV_BSG is not set 21 22 CONFIG_PARTITION_ADVANCED=y 22 - CONFIG_EFI_PARTITION=y 23 23 # CONFIG_IOSCHED_DEADLINE is not set 24 24 # CONFIG_IOSCHED_CFQ is not set 25 25 CONFIG_ARCH_TEGRA=y 26 26 CONFIG_GPIO_PCA953X=y 27 27 CONFIG_ARCH_TEGRA_2x_SOC=y 28 28 CONFIG_ARCH_TEGRA_3x_SOC=y 29 + CONFIG_ARCH_TEGRA_114_SOC=y 29 30 CONFIG_TEGRA_PCI=y 30 - CONFIG_TEGRA_DEBUG_UART_AUTO_ODMDATA=y 31 31 CONFIG_TEGRA_EMC_SCALING_ENABLE=y 32 32 CONFIG_SMP=y 33 33 CONFIG_PREEMPT=y ··· 35 37 CONFIG_HIGHMEM=y 36 38 CONFIG_ZBOOT_ROM_TEXT=0x0 37 39 CONFIG_ZBOOT_ROM_BSS=0x0 38 - CONFIG_AUTO_ZRELADDR=y 39 40 CONFIG_KEXEC=y 41 + CONFIG_AUTO_ZRELADDR=y 40 42 CONFIG_CPU_FREQ=y 41 43 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y 42 44 CONFIG_CPU_IDLE=y ··· 106 108 CONFIG_RT2800USB=m 107 109 CONFIG_INPUT_EVDEV=y 108 110 CONFIG_KEYBOARD_TEGRA=y 111 + CONFIG_KEYBOARD_GPIO=y 109 112 CONFIG_INPUT_MISC=y 110 113 CONFIG_INPUT_MPU3050=y 111 114 # CONFIG_LEGACY_PTYS is not set ··· 116 117 CONFIG_SERIAL_TEGRA=y 117 118 CONFIG_SERIAL_OF_PLATFORM=y 118 119 # CONFIG_HW_RANDOM is not set 119 - CONFIG_I2C=y 120 120 # CONFIG_I2C_COMPAT is not set 121 121 CONFIG_I2C_MUX=y 122 122 CONFIG_I2C_MUX_PINCTRL=y ··· 124 126 CONFIG_SPI_TEGRA20_SFLASH=y 125 127 CONFIG_SPI_TEGRA20_SLINK=y 126 128 CONFIG_GPIO_PCA953X_IRQ=y 129 + CONFIG_GPIO_PALMAS=y 127 130 CONFIG_GPIO_TPS6586X=y 128 131 CONFIG_GPIO_TPS65910=y 129 132 CONFIG_POWER_SUPPLY=y ··· 135 136 CONFIG_MFD_TPS6586X=y 136 137 CONFIG_MFD_TPS65910=y 137 138 CONFIG_MFD_MAX8907=y 139 + CONFIG_MFD_TPS65090=y 140 + CONFIG_MFD_PALMAS=y 138 141 CONFIG_REGULATOR=y 139 142 CONFIG_REGULATOR_FIXED_VOLTAGE=y 140 143 CONFIG_REGULATOR_VIRTUAL_CONSUMER=y 141 144 CONFIG_REGULATOR_GPIO=y 142 145 CONFIG_REGULATOR_MAX8907=y 146 + CONFIG_REGULATOR_PALMAS=y 147 + CONFIG_REGULATOR_TPS51632=y 143 148 CONFIG_REGULATOR_TPS62360=y 149 + CONFIG_REGULATOR_TPS65090=y 144 150 CONFIG_REGULATOR_TPS6586X=y 145 151 CONFIG_REGULATOR_TPS65910=y 146 152 CONFIG_MEDIA_SUPPORT=y ··· 191 187 CONFIG_LEDS_TRIGGERS=y 192 188 CONFIG_LEDS_TRIGGER_GPIO=y 193 189 CONFIG_RTC_CLASS=y 194 - CONFIG_RTC_INTF_SYSFS=y 195 - CONFIG_RTC_INTF_PROC=y 196 - CONFIG_RTC_INTF_DEV=y 197 190 CONFIG_RTC_DRV_MAX8907=y 191 + CONFIG_RTC_DRV_PALMAS=y 198 192 CONFIG_RTC_DRV_TPS6586X=y 199 193 CONFIG_RTC_DRV_TPS65910=y 200 194 CONFIG_RTC_DRV_EM3027=y
+3 -1
arch/arm/configs/u8500_defconfig
··· 5 5 CONFIG_KALLSYMS_ALL=y 6 6 CONFIG_MODULES=y 7 7 CONFIG_MODULE_UNLOAD=y 8 - # CONFIG_LBDAF is not set 9 8 # CONFIG_BLK_DEV_BSG is not set 10 9 CONFIG_ARCH_U8500=y 11 10 CONFIG_MACH_HREFV60=y ··· 89 90 CONFIG_LEDS_LM3530=y 90 91 CONFIG_LEDS_LP5521=y 91 92 CONFIG_LEDS_GPIO=y 93 + CONFIG_LEDS_TRIGGERS=y 94 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 92 95 CONFIG_RTC_CLASS=y 93 96 CONFIG_RTC_DRV_AB8500=y 94 97 CONFIG_RTC_DRV_PL031=y ··· 104 103 CONFIG_EXT2_FS_POSIX_ACL=y 105 104 CONFIG_EXT2_FS_SECURITY=y 106 105 CONFIG_EXT3_FS=y 106 + CONFIG_EXT4_FS=y 107 107 CONFIG_VFAT_FS=y 108 108 CONFIG_TMPFS=y 109 109 CONFIG_TMPFS_POSIX_ACL=y
+55 -4
arch/arm/mach-at91/Kconfig
··· 6 6 config HAVE_AT91_DBGU1 7 7 bool 8 8 9 + config AT91_PMC_UNIT 10 + bool 11 + default !ARCH_AT91X40 12 + 9 13 config AT91_SAM9_ALT_RESET 10 14 bool 11 15 default !ARCH_AT91X40 ··· 18 14 bool 19 15 default !ARCH_AT91X40 20 16 17 + config AT91_SAM9_TIME 18 + bool 19 + 21 20 config SOC_AT91SAM9 22 21 bool 22 + select AT91_SAM9_TIME 23 23 select CPU_ARM926T 24 + select GENERIC_CLOCKEVENTS 25 + select MULTI_IRQ_HANDLER 26 + select SPARSE_IRQ 27 + 28 + config SOC_SAMA5 29 + bool 30 + select AT91_SAM9_TIME 31 + select CPU_V7 24 32 select GENERIC_CLOCKEVENTS 25 33 select MULTI_IRQ_HANDLER 26 34 select SPARSE_IRQ 27 35 28 36 menu "Atmel AT91 System-on-Chip" 29 37 38 + choice 39 + 40 + prompt "Core type" 41 + 42 + config SOC_SAM_V4_V5 43 + bool "ARM7/ARM9" 44 + help 45 + Select this if you are using one of Atmel's AT91SAM9, AT91RM9200 46 + or AT91X40 SoC. 47 + 48 + config SOC_SAM_V7 49 + bool "Cortex A5" 50 + help 51 + Select this if you are using one of Atmel's SAMA5D3 SoC. 52 + 53 + endchoice 54 + 30 55 comment "Atmel AT91 Processor" 31 56 57 + if SOC_SAM_V7 58 + config SOC_SAMA5D3 59 + bool "SAMA5D3 family" 60 + depends on SOC_SAM_V7 61 + select SOC_SAMA5 62 + select HAVE_FB_ATMEL 63 + select HAVE_AT91_DBGU1 64 + help 65 + Select this if you are using one of Atmel's SAMA5D3 family SoC. 66 + This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35. 67 + endif 68 + 69 + if SOC_SAM_V4_V5 32 70 config SOC_AT91RM9200 33 71 bool "AT91RM9200" 34 72 select CPU_ARM920T ··· 136 90 help 137 91 Select this if you are using Atmel's AT91SAM9N12 SoC. 138 92 139 - config AT91_PMC_UNIT 140 - bool 141 - default !ARCH_AT91X40 142 - 143 93 # ---------------------------------------------------------- 144 94 145 95 source arch/arm/mach-at91/Kconfig.non_dt 96 + endif # SOC_SAM_V4_V5 146 97 147 98 comment "Generic Board Type" 148 99 ··· 154 111 config MACH_AT91SAM9_DT 155 112 bool "Atmel AT91SAM Evaluation Kits with device-tree support" 156 113 depends on SOC_AT91SAM9 114 + select USE_OF 115 + help 116 + Select this if you want to experiment device-tree with 117 + an Atmel Evaluation Kit. 118 + 119 + config MACH_SAMA5_DT 120 + bool "Atmel SAMA5 Evaluation Kits with device-tree support" 121 + depends on SOC_SAMA5 157 122 select USE_OF 158 123 help 159 124 Select this if you want to experiment device-tree with
+6 -1
arch/arm/mach-at91/Makefile
··· 10 10 obj-$(CONFIG_AT91_PMC_UNIT) += clock.o 11 11 obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o 12 12 obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o 13 - obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o 13 + obj-$(CONFIG_AT91_SAM9_TIME) += at91sam926x_time.o 14 + obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o 14 15 15 16 # CPU-specific support 16 17 obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o ··· 22 21 obj-$(CONFIG_SOC_AT91SAM9N12) += at91sam9n12.o 23 22 obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o 24 23 obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o 24 + obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o 25 25 26 26 obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o 27 27 obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o ··· 91 89 # AT91SAM board with device-tree 92 90 obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o 93 91 obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o 92 + 93 + # SAMA5 board with device-tree 94 + obj-$(CONFIG_MACH_SAMA5_DT) += board-dt-sama5.o 94 95 95 96 # AT91X40 board-specific support 96 97 obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o
+1 -1
arch/arm/mach-at91/at91rm9200.c
··· 385 385 0 /* Advanced Interrupt Controller (IRQ6) */ 386 386 }; 387 387 388 - AT91_SOC_START(rm9200) 388 + AT91_SOC_START(at91rm9200) 389 389 .map_io = at91rm9200_map_io, 390 390 .default_irq_priority = at91rm9200_default_irq_priority, 391 391 .ioremap_registers = at91rm9200_ioremap_registers,
+1 -1
arch/arm/mach-at91/at91sam9260.c
··· 397 397 0, /* Advanced Interrupt Controller */ 398 398 }; 399 399 400 - AT91_SOC_START(sam9260) 400 + AT91_SOC_START(at91sam9260) 401 401 .map_io = at91sam9260_map_io, 402 402 .default_irq_priority = at91sam9260_default_irq_priority, 403 403 .ioremap_registers = at91sam9260_ioremap_registers,
+1 -1
arch/arm/mach-at91/at91sam9261.c
··· 337 337 0, /* Advanced Interrupt Controller */ 338 338 }; 339 339 340 - AT91_SOC_START(sam9261) 340 + AT91_SOC_START(at91sam9261) 341 341 .map_io = at91sam9261_map_io, 342 342 .default_irq_priority = at91sam9261_default_irq_priority, 343 343 .ioremap_registers = at91sam9261_ioremap_registers,
+1 -1
arch/arm/mach-at91/at91sam9263.c
··· 374 374 0, /* Advanced Interrupt Controller (IRQ1) */ 375 375 }; 376 376 377 - AT91_SOC_START(sam9263) 377 + AT91_SOC_START(at91sam9263) 378 378 .map_io = at91sam9263_map_io, 379 379 .default_irq_priority = at91sam9263_default_irq_priority, 380 380 .ioremap_registers = at91sam9263_ioremap_registers,
+1 -1
arch/arm/mach-at91/at91sam9g45.c
··· 420 420 0, /* Advanced Interrupt Controller (IRQ0) */ 421 421 }; 422 422 423 - AT91_SOC_START(sam9g45) 423 + AT91_SOC_START(at91sam9g45) 424 424 .map_io = at91sam9g45_map_io, 425 425 .default_irq_priority = at91sam9g45_default_irq_priority, 426 426 .ioremap_registers = at91sam9g45_ioremap_registers,
+1 -1
arch/arm/mach-at91/at91sam9n12.c
··· 228 228 at91_extern_irq = (1 << AT91SAM9N12_ID_IRQ0); 229 229 } 230 230 231 - AT91_SOC_START(sam9n12) 231 + AT91_SOC_START(at91sam9n12) 232 232 .map_io = at91sam9n12_map_io, 233 233 .register_clocks = at91sam9n12_register_clocks, 234 234 .init = at91sam9n12_initialize,
+1 -1
arch/arm/mach-at91/at91sam9rl.c
··· 340 340 0, /* Advanced Interrupt Controller */ 341 341 }; 342 342 343 - AT91_SOC_START(sam9rl) 343 + AT91_SOC_START(at91sam9rl) 344 344 .map_io = at91sam9rl_map_io, 345 345 .default_irq_priority = at91sam9rl_default_irq_priority, 346 346 .ioremap_registers = at91sam9rl_ioremap_registers,
+1 -1
arch/arm/mach-at91/at91sam9x5.c
··· 322 322 * Interrupt initialization 323 323 * -------------------------------------------------------------------- */ 324 324 325 - AT91_SOC_START(sam9x5) 325 + AT91_SOC_START(at91sam9x5) 326 326 .map_io = at91sam9x5_map_io, 327 327 .register_clocks = at91sam9x5_register_clocks, 328 328 AT91_SOC_END
+86
arch/arm/mach-at91/board-dt-sama5.c
··· 1 + /* 2 + * Setup code for SAMA5 Evaluation Kits with Device Tree support 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + 10 + #include <linux/types.h> 11 + #include <linux/init.h> 12 + #include <linux/module.h> 13 + #include <linux/gpio.h> 14 + #include <linux/micrel_phy.h> 15 + #include <linux/of.h> 16 + #include <linux/of_irq.h> 17 + #include <linux/of_platform.h> 18 + #include <linux/phy.h> 19 + 20 + #include <asm/setup.h> 21 + #include <asm/irq.h> 22 + #include <asm/mach/arch.h> 23 + #include <asm/mach/map.h> 24 + #include <asm/mach/irq.h> 25 + 26 + #include "at91_aic.h" 27 + #include "generic.h" 28 + 29 + 30 + static const struct of_device_id irq_of_match[] __initconst = { 31 + 32 + { .compatible = "atmel,sama5d3-aic", .data = at91_aic5_of_init }, 33 + { /*sentinel*/ } 34 + }; 35 + 36 + static void __init at91_dt_init_irq(void) 37 + { 38 + of_irq_init(irq_of_match); 39 + } 40 + 41 + static int ksz9021rn_phy_fixup(struct phy_device *phy) 42 + { 43 + int value; 44 + 45 + #define GMII_RCCPSR 260 46 + #define GMII_RRDPSR 261 47 + #define GMII_ERCR 11 48 + #define GMII_ERDWR 12 49 + 50 + /* Set delay values */ 51 + value = GMII_RCCPSR | 0x8000; 52 + phy_write(phy, GMII_ERCR, value); 53 + value = 0xF2F4; 54 + phy_write(phy, GMII_ERDWR, value); 55 + value = GMII_RRDPSR | 0x8000; 56 + phy_write(phy, GMII_ERCR, value); 57 + value = 0x2222; 58 + phy_write(phy, GMII_ERDWR, value); 59 + 60 + return 0; 61 + } 62 + 63 + static void __init sama5_dt_device_init(void) 64 + { 65 + if (of_machine_is_compatible("atmel,sama5d3xcm")) 66 + phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, 67 + ksz9021rn_phy_fixup); 68 + 69 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 70 + } 71 + 72 + static const char *sama5_dt_board_compat[] __initdata = { 73 + "atmel,sama5", 74 + NULL 75 + }; 76 + 77 + DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") 78 + /* Maintainer: Atmel */ 79 + .init_time = at91sam926x_pit_init, 80 + .map_io = at91_map_io, 81 + .handle_irq = at91_aic5_handle_irq, 82 + .init_early = at91_dt_initialize, 83 + .init_irq = at91_dt_init_irq, 84 + .init_machine = sama5_dt_device_init, 85 + .dt_compat = sama5_dt_board_compat, 86 + MACHINE_END
+88 -29
arch/arm/mach-at91/clock.c
··· 54 54 */ 55 55 #define cpu_has_utmi() ( cpu_is_at91sam9rl() \ 56 56 || cpu_is_at91sam9g45() \ 57 - || cpu_is_at91sam9x5()) 57 + || cpu_is_at91sam9x5() \ 58 + || cpu_is_sama5d3()) 59 + 60 + #define cpu_has_1056M_plla() (cpu_is_sama5d3()) 58 61 59 62 #define cpu_has_800M_plla() ( cpu_is_at91sam9g20() \ 60 63 || cpu_is_at91sam9g45() \ ··· 78 75 || cpu_is_at91sam9n12())) 79 76 80 77 #define cpu_has_upll() (cpu_is_at91sam9g45() \ 81 - || cpu_is_at91sam9x5()) 78 + || cpu_is_at91sam9x5() \ 79 + || cpu_is_sama5d3()) 82 80 83 81 /* USB host HS & FS */ 84 82 #define cpu_has_uhp() (!cpu_is_at91sam9rl()) ··· 87 83 /* USB device FS only */ 88 84 #define cpu_has_udpfs() (!(cpu_is_at91sam9rl() \ 89 85 || cpu_is_at91sam9g45() \ 90 - || cpu_is_at91sam9x5())) 86 + || cpu_is_at91sam9x5() \ 87 + || cpu_is_sama5d3())) 91 88 92 89 #define cpu_has_plladiv2() (cpu_is_at91sam9g45() \ 93 90 || cpu_is_at91sam9x5() \ 94 - || cpu_is_at91sam9n12()) 91 + || cpu_is_at91sam9n12() \ 92 + || cpu_is_sama5d3()) 95 93 96 94 #define cpu_has_mdiv3() (cpu_is_at91sam9g45() \ 97 95 || cpu_is_at91sam9x5() \ 98 - || cpu_is_at91sam9n12()) 96 + || cpu_is_at91sam9n12() \ 97 + || cpu_is_sama5d3()) 99 98 100 99 #define cpu_has_alt_prescaler() (cpu_is_at91sam9x5() \ 101 - || cpu_is_at91sam9n12()) 100 + || cpu_is_at91sam9n12() \ 101 + || cpu_is_sama5d3()) 102 102 103 103 static LIST_HEAD(clocks); 104 104 static DEFINE_SPINLOCK(clk_lock); ··· 218 210 219 211 static void pmc_periph_mode(struct clk *clk, int is_on) 220 212 { 221 - if (is_on) 222 - at91_pmc_write(AT91_PMC_PCER, clk->pmc_mask); 223 - else 224 - at91_pmc_write(AT91_PMC_PCDR, clk->pmc_mask); 213 + u32 regval = 0; 214 + 215 + /* 216 + * With sama5d3 devices, we are managing clock division so we have to 217 + * use the Peripheral Control Register introduced from at91sam9x5 218 + * devices. 219 + */ 220 + if (cpu_is_sama5d3()) { 221 + regval |= AT91_PMC_PCR_CMD; /* write command */ 222 + regval |= clk->pid & AT91_PMC_PCR_PID; /* peripheral selection */ 223 + regval |= AT91_PMC_PCR_DIV(clk->div); 224 + if (is_on) 225 + regval |= AT91_PMC_PCR_EN; /* enable clock */ 226 + at91_pmc_write(AT91_PMC_PCR, regval); 227 + } else { 228 + if (is_on) 229 + at91_pmc_write(AT91_PMC_PCER, clk->pmc_mask); 230 + else 231 + at91_pmc_write(AT91_PMC_PCDR, clk->pmc_mask); 232 + } 225 233 } 226 234 227 235 static struct clk __init *at91_css_to_clk(unsigned long css) ··· 467 443 468 444 static int at91_clk_show(struct seq_file *s, void *unused) 469 445 { 470 - u32 scsr, pcsr, uckr = 0, sr; 446 + u32 scsr, pcsr, pcsr1 = 0, uckr = 0, sr; 471 447 struct clk *clk; 472 448 473 449 scsr = at91_pmc_read(AT91_PMC_SCSR); 474 450 pcsr = at91_pmc_read(AT91_PMC_PCSR); 451 + if (cpu_is_sama5d3()) 452 + pcsr1 = at91_pmc_read(AT91_PMC_PCSR1); 475 453 sr = at91_pmc_read(AT91_PMC_SR); 476 454 seq_printf(s, "SCSR = %8x\n", scsr); 477 455 seq_printf(s, "PCSR = %8x\n", pcsr); 456 + if (cpu_is_sama5d3()) 457 + seq_printf(s, "PCSR1 = %8x\n", pcsr1); 478 458 seq_printf(s, "MOR = %8x\n", at91_pmc_read(AT91_CKGR_MOR)); 479 459 seq_printf(s, "MCFR = %8x\n", at91_pmc_read(AT91_CKGR_MCFR)); 480 460 seq_printf(s, "PLLA = %8x\n", at91_pmc_read(AT91_CKGR_PLLAR)); ··· 498 470 list_for_each_entry(clk, &clocks, node) { 499 471 char *state; 500 472 501 - if (clk->mode == pmc_sys_mode) 473 + if (clk->mode == pmc_sys_mode) { 502 474 state = (scsr & clk->pmc_mask) ? "on" : "off"; 503 - else if (clk->mode == pmc_periph_mode) 504 - state = (pcsr & clk->pmc_mask) ? "on" : "off"; 505 - else if (clk->mode == pmc_uckr_mode) 506 - state = (uckr & clk->pmc_mask) ? "on" : "off"; 507 - else if (clk->pmc_mask) 508 - state = (sr & clk->pmc_mask) ? "on" : "off"; 509 - else if (clk == &clk32k || clk == &main_clk) 510 - state = "on"; 511 - else 512 - state = ""; 475 + } else if (clk->mode == pmc_periph_mode) { 476 + if (cpu_is_sama5d3()) { 477 + u32 pmc_mask = 1 << (clk->pid % 32); 513 478 514 - seq_printf(s, "%-10s users=%2d %-3s %9ld Hz %s\n", 479 + if (clk->pid > 31) 480 + state = (pcsr1 & pmc_mask) ? "on" : "off"; 481 + else 482 + state = (pcsr & pmc_mask) ? "on" : "off"; 483 + } else { 484 + state = (pcsr & clk->pmc_mask) ? "on" : "off"; 485 + } 486 + } else if (clk->mode == pmc_uckr_mode) { 487 + state = (uckr & clk->pmc_mask) ? "on" : "off"; 488 + } else if (clk->pmc_mask) { 489 + state = (sr & clk->pmc_mask) ? "on" : "off"; 490 + } else if (clk == &clk32k || clk == &main_clk) { 491 + state = "on"; 492 + } else { 493 + state = ""; 494 + } 495 + 496 + seq_printf(s, "%-10s users=%2d %-3s %9lu Hz %s\n", 515 497 clk->name, clk->users, state, clk_get_rate(clk), 516 498 clk->parent ? clk->parent->name : ""); 517 499 } ··· 568 530 if (clk_is_peripheral(clk)) { 569 531 if (!clk->parent) 570 532 clk->parent = &mck; 533 + if (cpu_is_sama5d3()) 534 + clk->rate_hz = DIV_ROUND_UP(clk->parent->rate_hz, 535 + 1 << clk->div); 571 536 clk->mode = pmc_periph_mode; 572 537 } 573 538 else if (clk_is_sys(clk)) { ··· 596 555 unsigned mul, div; 597 556 598 557 div = reg & 0xff; 599 - mul = (reg >> 16) & 0x7ff; 558 + if (cpu_is_sama5d3()) 559 + mul = AT91_PMC3_MUL_GET(reg); 560 + else 561 + mul = AT91_PMC_MUL_GET(reg); 562 + 600 563 if (div && mul) { 601 564 freq /= div; 602 565 freq *= mul + 1; ··· 751 706 752 707 /* report if PLLA is more than mildly overclocked */ 753 708 plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_pmc_read(AT91_CKGR_PLLAR)); 754 - if (cpu_has_300M_plla()) { 755 - if (plla.rate_hz > 300000000) 709 + if (cpu_has_1056M_plla()) { 710 + if (plla.rate_hz > 1056000000) 756 711 pll_overclock = true; 757 712 } else if (cpu_has_800M_plla()) { 758 713 if (plla.rate_hz > 800000000) 714 + pll_overclock = true; 715 + } else if (cpu_has_300M_plla()) { 716 + if (plla.rate_hz > 300000000) 759 717 pll_overclock = true; 760 718 } else if (cpu_has_240M_plla()) { 761 719 if (plla.rate_hz > 240000000) ··· 920 872 static int __init at91_clock_reset(void) 921 873 { 922 874 unsigned long pcdr = 0; 875 + unsigned long pcdr1 = 0; 923 876 unsigned long scdr = 0; 924 877 struct clk *clk; 925 878 ··· 928 879 if (clk->users > 0) 929 880 continue; 930 881 931 - if (clk->mode == pmc_periph_mode) 932 - pcdr |= clk->pmc_mask; 882 + if (clk->mode == pmc_periph_mode) { 883 + if (cpu_is_sama5d3()) { 884 + u32 pmc_mask = 1 << (clk->pid % 32); 885 + 886 + if (clk->pid > 31) 887 + pcdr1 |= pmc_mask; 888 + else 889 + pcdr |= pmc_mask; 890 + } else 891 + pcdr |= clk->pmc_mask; 892 + } 933 893 934 894 if (clk->mode == pmc_sys_mode) 935 895 scdr |= clk->pmc_mask; ··· 946 888 pr_debug("Clocks: disable unused %s\n", clk->name); 947 889 } 948 890 949 - at91_pmc_write(AT91_PMC_PCDR, pcdr); 950 891 at91_pmc_write(AT91_PMC_SCDR, scdr); 892 + if (cpu_is_sama5d3()) 893 + at91_pmc_write(AT91_PMC_PCDR1, pcdr1); 951 894 952 895 return 0; 953 896 }
+2
arch/arm/mach-at91/clock.h
··· 20 20 const char *name; /* unique clock name */ 21 21 struct clk_lookup cl; 22 22 unsigned long rate_hz; 23 + unsigned div; /* parent clock divider */ 23 24 struct clk *parent; 25 + unsigned pid; /* peripheral ID */ 24 26 u32 pmc_mask; 25 27 void (*mode)(struct clk *, int); 26 28 unsigned id:3; /* PCK0..4, or 32k/main/a/b */
+14 -4
arch/arm/mach-at91/include/mach/at91_pmc.h
··· 75 75 #define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */ 76 76 #define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */ 77 77 #define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */ 78 + #define AT91_PMC_MUL_GET(n) ((n) >> 16 & 0x7ff) 79 + #define AT91_PMC3_MUL (0x7f << 18) /* PLL Multiplier [SAMA5 only] */ 80 + #define AT91_PMC3_MUL_GET(n) ((n) >> 18 & 0x7f) 78 81 #define AT91_PMC_USBDIV (3 << 28) /* USB Divisor (PLLB only) */ 79 82 #define AT91_PMC_USBDIV_1 (0 << 28) 80 83 #define AT91_PMC_USBDIV_2 (1 << 28) ··· 170 167 #define AT91_PMC_WPVS (0x1 << 0) /* Write Protect Violation Status */ 171 168 #define AT91_PMC_WPVSRC (0xffff << 8) /* Write Protect Violation Source */ 172 169 173 - #define AT91_PMC_PCR 0x10c /* Peripheral Control Register [some SAM9] */ 170 + #define AT91_PMC_PCER1 0x100 /* Peripheral Clock Enable Register 1 [SAMA5 only]*/ 171 + #define AT91_PMC_PCDR1 0x104 /* Peripheral Clock Enable Register 1 */ 172 + #define AT91_PMC_PCSR1 0x108 /* Peripheral Clock Enable Register 1 */ 173 + 174 + #define AT91_PMC_PCR 0x10c /* Peripheral Control Register [some SAM9 and SAMA5] */ 174 175 #define AT91_PMC_PCR_PID (0x3f << 0) /* Peripheral ID */ 175 - #define AT91_PMC_PCR_CMD (0x1 << 12) /* Command */ 176 - #define AT91_PMC_PCR_DIV (0x3 << 16) /* Divisor Value */ 177 - #define AT91_PMC_PCRDIV(n) (((n) << 16) & AT91_PMC_PCR_DIV) 176 + #define AT91_PMC_PCR_CMD (0x1 << 12) /* Command (read=0, write=1) */ 177 + #define AT91_PMC_PCR_DIV(n) ((n) << 16) /* Divisor Value */ 178 + #define AT91_PMC_PCR_DIV0 0x0 /* Peripheral clock is MCK */ 179 + #define AT91_PMC_PCR_DIV2 0x2 /* Peripheral clock is MCK/2 */ 180 + #define AT91_PMC_PCR_DIV4 0x4 /* Peripheral clock is MCK/4 */ 181 + #define AT91_PMC_PCR_DIV8 0x8 /* Peripheral clock is MCK/8 */ 178 182 #define AT91_PMC_PCR_EN (0x1 << 28) /* Enable */ 179 183 180 184 #endif
+20
arch/arm/mach-at91/include/mach/cpu.h
··· 36 36 #define ARCH_ID_AT91M40807 0x14080745 37 37 #define ARCH_ID_AT91R40008 0x44000840 38 38 39 + #define ARCH_ID_SAMA5D3 0x8A5C07C0 40 + 39 41 #define ARCH_EXID_AT91SAM9M11 0x00000001 40 42 #define ARCH_EXID_AT91SAM9M10 0x00000002 41 43 #define ARCH_EXID_AT91SAM9G46 0x00000003 ··· 48 46 #define ARCH_EXID_AT91SAM9X35 0x00000002 49 47 #define ARCH_EXID_AT91SAM9G25 0x00000003 50 48 #define ARCH_EXID_AT91SAM9X25 0x00000004 49 + 50 + #define ARCH_EXID_SAMA5D31 0x00444300 51 + #define ARCH_EXID_SAMA5D33 0x00414300 52 + #define ARCH_EXID_SAMA5D34 0x00414301 53 + #define ARCH_EXID_SAMA5D35 0x00584300 51 54 52 55 #define ARCH_FAMILY_AT91X92 0x09200000 53 56 #define ARCH_FAMILY_AT91SAM9 0x01900000 ··· 82 75 /* SAM9N12 */ 83 76 AT91_SOC_SAM9N12, 84 77 78 + /* SAMA5D3 */ 79 + AT91_SOC_SAMA5D3, 80 + 85 81 /* Unknown type */ 86 82 AT91_SOC_NONE 87 83 }; ··· 102 92 /* SAM9X5 */ 103 93 AT91_SOC_SAM9G15, AT91_SOC_SAM9G35, AT91_SOC_SAM9X35, 104 94 AT91_SOC_SAM9G25, AT91_SOC_SAM9X25, 95 + 96 + /* SAMA5D3 */ 97 + AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34, 98 + AT91_SOC_SAMA5D35, 105 99 106 100 /* Unknown subtype */ 107 101 AT91_SOC_SUBTYPE_NONE ··· 199 185 #define cpu_is_at91sam9n12() (at91_soc_initdata.type == AT91_SOC_SAM9N12) 200 186 #else 201 187 #define cpu_is_at91sam9n12() (0) 188 + #endif 189 + 190 + #ifdef CONFIG_SOC_SAMA5D3 191 + #define cpu_is_sama5d3() (at91_soc_initdata.type == AT91_SOC_SAMA5D3) 192 + #else 193 + #define cpu_is_sama5d3() (0) 202 194 #endif 203 195 204 196 /*
+73
arch/arm/mach-at91/include/mach/sama5d3.h
··· 1 + /* 2 + * Chip-specific header file for the SAMA5D3 family 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Common definitions. 8 + * Based on SAMA5D3 datasheet. 9 + * 10 + * Licensed under GPLv2 or later. 11 + */ 12 + 13 + #ifndef SAMA5D3_H 14 + #define SAMA5D3_H 15 + 16 + /* 17 + * Peripheral identifiers/interrupts. 18 + */ 19 + #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ 20 + #define AT91_ID_SYS 1 /* System Peripherals */ 21 + #define SAMA5D3_ID_DBGU 2 /* debug Unit (usually no special interrupt line) */ 22 + #define AT91_ID_PIT 3 /* PIT */ 23 + #define SAMA5D3_ID_WDT 4 /* Watchdog Timer Interrupt */ 24 + #define SAMA5D3_ID_HSMC 5 /* Static Memory Controller */ 25 + #define SAMA5D3_ID_PIOA 6 /* PIOA */ 26 + #define SAMA5D3_ID_PIOB 7 /* PIOB */ 27 + #define SAMA5D3_ID_PIOC 8 /* PIOC */ 28 + #define SAMA5D3_ID_PIOD 9 /* PIOD */ 29 + #define SAMA5D3_ID_PIOE 10 /* PIOE */ 30 + #define SAMA5D3_ID_SMD 11 /* SMD Soft Modem */ 31 + #define SAMA5D3_ID_USART0 12 /* USART0 */ 32 + #define SAMA5D3_ID_USART1 13 /* USART1 */ 33 + #define SAMA5D3_ID_USART2 14 /* USART2 */ 34 + #define SAMA5D3_ID_USART3 15 /* USART3 */ 35 + #define SAMA5D3_ID_UART0 16 /* UART 0 */ 36 + #define SAMA5D3_ID_UART1 17 /* UART 1 */ 37 + #define SAMA5D3_ID_TWI0 18 /* Two-Wire Interface 0 */ 38 + #define SAMA5D3_ID_TWI1 19 /* Two-Wire Interface 1 */ 39 + #define SAMA5D3_ID_TWI2 20 /* Two-Wire Interface 2 */ 40 + #define SAMA5D3_ID_HSMCI0 21 /* MCI */ 41 + #define SAMA5D3_ID_HSMCI1 22 /* MCI */ 42 + #define SAMA5D3_ID_HSMCI2 23 /* MCI */ 43 + #define SAMA5D3_ID_SPI0 24 /* Serial Peripheral Interface 0 */ 44 + #define SAMA5D3_ID_SPI1 25 /* Serial Peripheral Interface 1 */ 45 + #define SAMA5D3_ID_TC0 26 /* Timer Counter 0 */ 46 + #define SAMA5D3_ID_TC1 27 /* Timer Counter 2 */ 47 + #define SAMA5D3_ID_PWM 28 /* Pulse Width Modulation Controller */ 48 + #define SAMA5D3_ID_ADC 29 /* Touch Screen ADC Controller */ 49 + #define SAMA5D3_ID_DMA0 30 /* DMA Controller 0 */ 50 + #define SAMA5D3_ID_DMA1 31 /* DMA Controller 1 */ 51 + #define SAMA5D3_ID_UHPHS 32 /* USB Host High Speed */ 52 + #define SAMA5D3_ID_UDPHS 33 /* USB Device High Speed */ 53 + #define SAMA5D3_ID_GMAC 34 /* Gigabit Ethernet MAC */ 54 + #define SAMA5D3_ID_EMAC 35 /* Ethernet MAC */ 55 + #define SAMA5D3_ID_LCDC 36 /* LCD Controller */ 56 + #define SAMA5D3_ID_ISI 37 /* Image Sensor Interface */ 57 + #define SAMA5D3_ID_SSC0 38 /* Synchronous Serial Controller 0 */ 58 + #define SAMA5D3_ID_SSC1 39 /* Synchronous Serial Controller 1 */ 59 + #define SAMA5D3_ID_CAN0 40 /* CAN Controller 0 */ 60 + #define SAMA5D3_ID_CAN1 41 /* CAN Controller 1 */ 61 + #define SAMA5D3_ID_SHA 42 /* Secure Hash Algorithm */ 62 + #define SAMA5D3_ID_AES 43 /* Advanced Encryption Standard */ 63 + #define SAMA5D3_ID_TDES 44 /* Triple Data Encryption Standard */ 64 + #define SAMA5D3_ID_TRNG 45 /* True Random Generator Number */ 65 + #define SAMA5D3_ID_IRQ0 47 /* Advanced Interrupt Controller (IRQ0) */ 66 + 67 + /* 68 + * Internal Memory 69 + */ 70 + #define SAMA5D3_SRAM_BASE 0x00300000 /* Internal SRAM base address */ 71 + #define SAMA5D3_SRAM_SIZE (128 * SZ_1K) /* Internal SRAM size (128Kb) */ 72 + 73 + #endif
+377
arch/arm/mach-at91/sama5d3.c
··· 1 + /* 2 + * Chip-specific setup code for the SAMA5D3 family 3 + * 4 + * Copyright (C) 2013 Atmel, 5 + * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> 6 + * 7 + * Licensed under GPLv2 or later. 8 + */ 9 + 10 + #include <linux/module.h> 11 + #include <linux/dma-mapping.h> 12 + 13 + #include <asm/irq.h> 14 + #include <asm/mach/arch.h> 15 + #include <asm/mach/map.h> 16 + #include <mach/sama5d3.h> 17 + #include <mach/at91_pmc.h> 18 + #include <mach/cpu.h> 19 + 20 + #include "soc.h" 21 + #include "generic.h" 22 + #include "clock.h" 23 + #include "sam9_smc.h" 24 + 25 + /* -------------------------------------------------------------------- 26 + * Clocks 27 + * -------------------------------------------------------------------- */ 28 + 29 + /* 30 + * The peripheral clocks. 31 + */ 32 + 33 + static struct clk pioA_clk = { 34 + .name = "pioA_clk", 35 + .pid = SAMA5D3_ID_PIOA, 36 + .type = CLK_TYPE_PERIPHERAL, 37 + }; 38 + static struct clk pioB_clk = { 39 + .name = "pioB_clk", 40 + .pid = SAMA5D3_ID_PIOB, 41 + .type = CLK_TYPE_PERIPHERAL, 42 + }; 43 + static struct clk pioC_clk = { 44 + .name = "pioC_clk", 45 + .pid = SAMA5D3_ID_PIOC, 46 + .type = CLK_TYPE_PERIPHERAL, 47 + }; 48 + static struct clk pioD_clk = { 49 + .name = "pioD_clk", 50 + .pid = SAMA5D3_ID_PIOD, 51 + .type = CLK_TYPE_PERIPHERAL, 52 + }; 53 + static struct clk pioE_clk = { 54 + .name = "pioE_clk", 55 + .pid = SAMA5D3_ID_PIOE, 56 + .type = CLK_TYPE_PERIPHERAL, 57 + }; 58 + static struct clk usart0_clk = { 59 + .name = "usart0_clk", 60 + .pid = SAMA5D3_ID_USART0, 61 + .type = CLK_TYPE_PERIPHERAL, 62 + .div = AT91_PMC_PCR_DIV2, 63 + }; 64 + static struct clk usart1_clk = { 65 + .name = "usart1_clk", 66 + .pid = SAMA5D3_ID_USART1, 67 + .type = CLK_TYPE_PERIPHERAL, 68 + .div = AT91_PMC_PCR_DIV2, 69 + }; 70 + static struct clk usart2_clk = { 71 + .name = "usart2_clk", 72 + .pid = SAMA5D3_ID_USART2, 73 + .type = CLK_TYPE_PERIPHERAL, 74 + .div = AT91_PMC_PCR_DIV2, 75 + }; 76 + static struct clk usart3_clk = { 77 + .name = "usart3_clk", 78 + .pid = SAMA5D3_ID_USART3, 79 + .type = CLK_TYPE_PERIPHERAL, 80 + .div = AT91_PMC_PCR_DIV2, 81 + }; 82 + static struct clk uart0_clk = { 83 + .name = "uart0_clk", 84 + .pid = SAMA5D3_ID_UART0, 85 + .type = CLK_TYPE_PERIPHERAL, 86 + .div = AT91_PMC_PCR_DIV2, 87 + }; 88 + static struct clk uart1_clk = { 89 + .name = "uart1_clk", 90 + .pid = SAMA5D3_ID_UART1, 91 + .type = CLK_TYPE_PERIPHERAL, 92 + .div = AT91_PMC_PCR_DIV2, 93 + }; 94 + static struct clk twi0_clk = { 95 + .name = "twi0_clk", 96 + .pid = SAMA5D3_ID_TWI0, 97 + .type = CLK_TYPE_PERIPHERAL, 98 + .div = AT91_PMC_PCR_DIV2, 99 + }; 100 + static struct clk twi1_clk = { 101 + .name = "twi1_clk", 102 + .pid = SAMA5D3_ID_TWI1, 103 + .type = CLK_TYPE_PERIPHERAL, 104 + .div = AT91_PMC_PCR_DIV2, 105 + }; 106 + static struct clk twi2_clk = { 107 + .name = "twi2_clk", 108 + .pid = SAMA5D3_ID_TWI2, 109 + .type = CLK_TYPE_PERIPHERAL, 110 + .div = AT91_PMC_PCR_DIV2, 111 + }; 112 + static struct clk mmc0_clk = { 113 + .name = "mci0_clk", 114 + .pid = SAMA5D3_ID_HSMCI0, 115 + .type = CLK_TYPE_PERIPHERAL, 116 + }; 117 + static struct clk mmc1_clk = { 118 + .name = "mci1_clk", 119 + .pid = SAMA5D3_ID_HSMCI1, 120 + .type = CLK_TYPE_PERIPHERAL, 121 + }; 122 + static struct clk mmc2_clk = { 123 + .name = "mci2_clk", 124 + .pid = SAMA5D3_ID_HSMCI2, 125 + .type = CLK_TYPE_PERIPHERAL, 126 + }; 127 + static struct clk spi0_clk = { 128 + .name = "spi0_clk", 129 + .pid = SAMA5D3_ID_SPI0, 130 + .type = CLK_TYPE_PERIPHERAL, 131 + }; 132 + static struct clk spi1_clk = { 133 + .name = "spi1_clk", 134 + .pid = SAMA5D3_ID_SPI1, 135 + .type = CLK_TYPE_PERIPHERAL, 136 + }; 137 + static struct clk tcb0_clk = { 138 + .name = "tcb0_clk", 139 + .pid = SAMA5D3_ID_TC0, 140 + .type = CLK_TYPE_PERIPHERAL, 141 + .div = AT91_PMC_PCR_DIV2, 142 + }; 143 + static struct clk tcb1_clk = { 144 + .name = "tcb1_clk", 145 + .pid = SAMA5D3_ID_TC1, 146 + .type = CLK_TYPE_PERIPHERAL, 147 + .div = AT91_PMC_PCR_DIV2, 148 + }; 149 + static struct clk adc_clk = { 150 + .name = "adc_clk", 151 + .pid = SAMA5D3_ID_ADC, 152 + .type = CLK_TYPE_PERIPHERAL, 153 + .div = AT91_PMC_PCR_DIV2, 154 + }; 155 + static struct clk adc_op_clk = { 156 + .name = "adc_op_clk", 157 + .type = CLK_TYPE_PERIPHERAL, 158 + .rate_hz = 5000000, 159 + }; 160 + static struct clk dma0_clk = { 161 + .name = "dma0_clk", 162 + .pid = SAMA5D3_ID_DMA0, 163 + .type = CLK_TYPE_PERIPHERAL, 164 + }; 165 + static struct clk dma1_clk = { 166 + .name = "dma1_clk", 167 + .pid = SAMA5D3_ID_DMA1, 168 + .type = CLK_TYPE_PERIPHERAL, 169 + }; 170 + static struct clk uhphs_clk = { 171 + .name = "uhphs", 172 + .pid = SAMA5D3_ID_UHPHS, 173 + .type = CLK_TYPE_PERIPHERAL, 174 + }; 175 + static struct clk udphs_clk = { 176 + .name = "udphs_clk", 177 + .pid = SAMA5D3_ID_UDPHS, 178 + .type = CLK_TYPE_PERIPHERAL, 179 + }; 180 + /* gmac only for sama5d33, sama5d34, sama5d35 */ 181 + static struct clk macb0_clk = { 182 + .name = "macb0_clk", 183 + .pid = SAMA5D3_ID_GMAC, 184 + .type = CLK_TYPE_PERIPHERAL, 185 + }; 186 + /* emac only for sama5d31, sama5d35 */ 187 + static struct clk macb1_clk = { 188 + .name = "macb1_clk", 189 + .pid = SAMA5D3_ID_EMAC, 190 + .type = CLK_TYPE_PERIPHERAL, 191 + }; 192 + /* lcd only for sama5d31, sama5d33, sama5d34 */ 193 + static struct clk lcdc_clk = { 194 + .name = "lcdc_clk", 195 + .pid = SAMA5D3_ID_LCDC, 196 + .type = CLK_TYPE_PERIPHERAL, 197 + }; 198 + /* isi only for sama5d33, sama5d35 */ 199 + static struct clk isi_clk = { 200 + .name = "isi_clk", 201 + .pid = SAMA5D3_ID_ISI, 202 + .type = CLK_TYPE_PERIPHERAL, 203 + }; 204 + static struct clk can0_clk = { 205 + .name = "can0_clk", 206 + .pid = SAMA5D3_ID_CAN0, 207 + .type = CLK_TYPE_PERIPHERAL, 208 + .div = AT91_PMC_PCR_DIV2, 209 + }; 210 + static struct clk can1_clk = { 211 + .name = "can1_clk", 212 + .pid = SAMA5D3_ID_CAN1, 213 + .type = CLK_TYPE_PERIPHERAL, 214 + .div = AT91_PMC_PCR_DIV2, 215 + }; 216 + static struct clk ssc0_clk = { 217 + .name = "ssc0_clk", 218 + .pid = SAMA5D3_ID_SSC0, 219 + .type = CLK_TYPE_PERIPHERAL, 220 + .div = AT91_PMC_PCR_DIV2, 221 + }; 222 + static struct clk ssc1_clk = { 223 + .name = "ssc1_clk", 224 + .pid = SAMA5D3_ID_SSC1, 225 + .type = CLK_TYPE_PERIPHERAL, 226 + .div = AT91_PMC_PCR_DIV2, 227 + }; 228 + static struct clk sha_clk = { 229 + .name = "sha_clk", 230 + .pid = SAMA5D3_ID_SHA, 231 + .type = CLK_TYPE_PERIPHERAL, 232 + .div = AT91_PMC_PCR_DIV8, 233 + }; 234 + static struct clk aes_clk = { 235 + .name = "aes_clk", 236 + .pid = SAMA5D3_ID_AES, 237 + .type = CLK_TYPE_PERIPHERAL, 238 + }; 239 + static struct clk tdes_clk = { 240 + .name = "tdes_clk", 241 + .pid = SAMA5D3_ID_TDES, 242 + .type = CLK_TYPE_PERIPHERAL, 243 + }; 244 + 245 + static struct clk *periph_clocks[] __initdata = { 246 + &pioA_clk, 247 + &pioB_clk, 248 + &pioC_clk, 249 + &pioD_clk, 250 + &pioE_clk, 251 + &usart0_clk, 252 + &usart1_clk, 253 + &usart2_clk, 254 + &usart3_clk, 255 + &uart0_clk, 256 + &uart1_clk, 257 + &twi0_clk, 258 + &twi1_clk, 259 + &twi2_clk, 260 + &mmc0_clk, 261 + &mmc1_clk, 262 + &mmc2_clk, 263 + &spi0_clk, 264 + &spi1_clk, 265 + &tcb0_clk, 266 + &tcb1_clk, 267 + &adc_clk, 268 + &adc_op_clk, 269 + &dma0_clk, 270 + &dma1_clk, 271 + &uhphs_clk, 272 + &udphs_clk, 273 + &macb0_clk, 274 + &macb1_clk, 275 + &lcdc_clk, 276 + &isi_clk, 277 + &can0_clk, 278 + &can1_clk, 279 + &ssc0_clk, 280 + &ssc1_clk, 281 + &sha_clk, 282 + &aes_clk, 283 + &tdes_clk, 284 + }; 285 + 286 + static struct clk pck0 = { 287 + .name = "pck0", 288 + .pmc_mask = AT91_PMC_PCK0, 289 + .type = CLK_TYPE_PROGRAMMABLE, 290 + .id = 0, 291 + }; 292 + 293 + static struct clk pck1 = { 294 + .name = "pck1", 295 + .pmc_mask = AT91_PMC_PCK1, 296 + .type = CLK_TYPE_PROGRAMMABLE, 297 + .id = 1, 298 + }; 299 + 300 + static struct clk pck2 = { 301 + .name = "pck2", 302 + .pmc_mask = AT91_PMC_PCK2, 303 + .type = CLK_TYPE_PROGRAMMABLE, 304 + .id = 2, 305 + }; 306 + 307 + static struct clk_lookup periph_clocks_lookups[] = { 308 + /* lookup table for DT entries */ 309 + CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck), 310 + CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk), 311 + CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk), 312 + CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioC_clk), 313 + CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioD_clk), 314 + CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioE_clk), 315 + CLKDEV_CON_DEV_ID("usart", "f001c000.serial", &usart0_clk), 316 + CLKDEV_CON_DEV_ID("usart", "f0020000.serial", &usart1_clk), 317 + CLKDEV_CON_DEV_ID("usart", "f8020000.serial", &usart2_clk), 318 + CLKDEV_CON_DEV_ID("usart", "f8024000.serial", &usart3_clk), 319 + CLKDEV_CON_DEV_ID(NULL, "f0014000.i2c", &twi0_clk), 320 + CLKDEV_CON_DEV_ID(NULL, "f0018000.i2c", &twi1_clk), 321 + CLKDEV_CON_DEV_ID(NULL, "f801c000.i2c", &twi2_clk), 322 + CLKDEV_CON_DEV_ID("mci_clk", "f0000000.mmc", &mmc0_clk), 323 + CLKDEV_CON_DEV_ID("mci_clk", "f8000000.mmc", &mmc1_clk), 324 + CLKDEV_CON_DEV_ID("mci_clk", "f8004000.mmc", &mmc2_clk), 325 + CLKDEV_CON_DEV_ID("spi_clk", "f0004000.spi", &spi0_clk), 326 + CLKDEV_CON_DEV_ID("spi_clk", "f8008000.spi", &spi1_clk), 327 + CLKDEV_CON_DEV_ID("t0_clk", "f0010000.timer", &tcb0_clk), 328 + CLKDEV_CON_DEV_ID("t0_clk", "f8014000.timer", &tcb1_clk), 329 + CLKDEV_CON_DEV_ID("tsc_clk", "f8018000.tsadcc", &adc_clk), 330 + CLKDEV_CON_DEV_ID("dma_clk", "ffffe600.dma-controller", &dma0_clk), 331 + CLKDEV_CON_DEV_ID("dma_clk", "ffffe800.dma-controller", &dma1_clk), 332 + CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk), 333 + CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk), 334 + CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk), 335 + CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk), 336 + CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk), 337 + CLKDEV_CON_DEV_ID("hclk", "f0028000.ethernet", &macb0_clk), 338 + CLKDEV_CON_DEV_ID("pclk", "f0028000.ethernet", &macb0_clk), 339 + CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb1_clk), 340 + CLKDEV_CON_DEV_ID("pclk", "f802c000.ethernet", &macb1_clk), 341 + CLKDEV_CON_DEV_ID("pclk", "f0008000.ssc", &ssc0_clk), 342 + CLKDEV_CON_DEV_ID("pclk", "f000c000.ssc", &ssc1_clk), 343 + CLKDEV_CON_DEV_ID("can_clk", "f000c000.can", &can0_clk), 344 + CLKDEV_CON_DEV_ID("can_clk", "f8010000.can", &can1_clk), 345 + CLKDEV_CON_DEV_ID("sha_clk", "f8034000.sha", &sha_clk), 346 + CLKDEV_CON_DEV_ID("aes_clk", "f8038000.aes", &aes_clk), 347 + CLKDEV_CON_DEV_ID("tdes_clk", "f803c000.tdes", &tdes_clk), 348 + }; 349 + 350 + static void __init sama5d3_register_clocks(void) 351 + { 352 + int i; 353 + 354 + for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 355 + clk_register(periph_clocks[i]); 356 + 357 + clkdev_add_table(periph_clocks_lookups, 358 + ARRAY_SIZE(periph_clocks_lookups)); 359 + 360 + clk_register(&pck0); 361 + clk_register(&pck1); 362 + clk_register(&pck2); 363 + } 364 + 365 + /* -------------------------------------------------------------------- 366 + * AT91SAM9x5 processor initialization 367 + * -------------------------------------------------------------------- */ 368 + 369 + static void __init sama5d3_map_io(void) 370 + { 371 + at91_init_sram(0, SAMA5D3_SRAM_BASE, SAMA5D3_SRAM_SIZE); 372 + } 373 + 374 + AT91_SOC_START(sama5d3) 375 + .map_io = sama5d3_map_io, 376 + .register_clocks = sama5d3_register_clocks, 377 + AT91_SOC_END
+27
arch/arm/mach-at91/setup.c
··· 151 151 at91_soc_initdata.type = AT91_SOC_SAM9N12; 152 152 at91_boot_soc = at91sam9n12_soc; 153 153 break; 154 + 155 + case ARCH_ID_SAMA5D3: 156 + at91_soc_initdata.type = AT91_SOC_SAMA5D3; 157 + at91_boot_soc = sama5d3_soc; 158 + break; 154 159 } 155 160 156 161 /* at91sam9g10 */ ··· 211 206 break; 212 207 } 213 208 } 209 + 210 + if (at91_soc_initdata.type == AT91_SOC_SAMA5D3) { 211 + switch (at91_soc_initdata.exid) { 212 + case ARCH_EXID_SAMA5D31: 213 + at91_soc_initdata.subtype = AT91_SOC_SAMA5D31; 214 + break; 215 + case ARCH_EXID_SAMA5D33: 216 + at91_soc_initdata.subtype = AT91_SOC_SAMA5D33; 217 + break; 218 + case ARCH_EXID_SAMA5D34: 219 + at91_soc_initdata.subtype = AT91_SOC_SAMA5D34; 220 + break; 221 + case ARCH_EXID_SAMA5D35: 222 + at91_soc_initdata.subtype = AT91_SOC_SAMA5D35; 223 + break; 224 + } 225 + } 214 226 } 215 227 216 228 static const char *soc_name[] = { ··· 241 219 [AT91_SOC_SAM9RL] = "at91sam9rl", 242 220 [AT91_SOC_SAM9X5] = "at91sam9x5", 243 221 [AT91_SOC_SAM9N12] = "at91sam9n12", 222 + [AT91_SOC_SAMA5D3] = "sama5d3", 244 223 [AT91_SOC_NONE] = "Unknown" 245 224 }; 246 225 ··· 264 241 [AT91_SOC_SAM9X35] = "at91sam9x35", 265 242 [AT91_SOC_SAM9G25] = "at91sam9g25", 266 243 [AT91_SOC_SAM9X25] = "at91sam9x25", 244 + [AT91_SOC_SAMA5D31] = "sama5d31", 245 + [AT91_SOC_SAMA5D33] = "sama5d33", 246 + [AT91_SOC_SAMA5D34] = "sama5d34", 247 + [AT91_SOC_SAMA5D35] = "sama5d35", 267 248 [AT91_SOC_SUBTYPE_NONE] = "Unknown" 268 249 }; 269 250
+6 -1
arch/arm/mach-at91/soc.h
··· 22 22 extern struct at91_init_soc at91sam9rl_soc; 23 23 extern struct at91_init_soc at91sam9x5_soc; 24 24 extern struct at91_init_soc at91sam9n12_soc; 25 + extern struct at91_init_soc sama5d3_soc; 25 26 26 27 #define AT91_SOC_START(_name) \ 27 - struct at91_init_soc __initdata at91##_name##_soc \ 28 + struct at91_init_soc __initdata _name##_soc \ 28 29 __used \ 29 30 = { \ 30 31 .builtin = 1, \ ··· 68 67 69 68 #if !defined(CONFIG_SOC_AT91SAM9N12) 70 69 #define at91sam9n12_soc at91_boot_soc 70 + #endif 71 + 72 + #if !defined(CONFIG_SOC_SAMA5D3) 73 + #define sama5d3_soc at91_boot_soc 71 74 #endif
-1
arch/arm/mach-davinci/board-da830-evm.c
··· 246 246 .wires = 8, 247 247 .max_freq = 50000000, 248 248 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 249 - .version = MMC_CTLR_VERSION_2, 250 249 }; 251 250 252 251 static inline void da830_evm_init_mmc(void)
-2
arch/arm/mach-davinci/board-da850-evm.c
··· 802 802 .wires = 4, 803 803 .max_freq = 50000000, 804 804 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 805 - .version = MMC_CTLR_VERSION_2, 806 805 }; 807 806 808 807 static const short da850_evm_mmcsd0_pins[] __initconst = { ··· 1371 1372 .max_freq = 25000000, 1372 1373 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_NONREMOVABLE | 1373 1374 MMC_CAP_POWER_OFF_CARD, 1374 - .version = MMC_CTLR_VERSION_2, 1375 1375 }; 1376 1376 1377 1377 static const short da850_wl12xx_pins[] __initconst = {
-1
arch/arm/mach-davinci/board-dm355-evm.c
··· 345 345 .wires = 4, 346 346 .max_freq = 50000000, 347 347 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 348 - .version = MMC_CTLR_VERSION_1, 349 348 }; 350 349 351 350 /* Don't connect anything to J10 unless you're only using USB host
-1
arch/arm/mach-davinci/board-dm365-evm.c
··· 255 255 .wires = 4, 256 256 .max_freq = 50000000, 257 257 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 258 - .version = MMC_CTLR_VERSION_2, 259 258 }; 260 259 261 260 static void dm365evm_emac_configure(void)
-1
arch/arm/mach-davinci/board-dm644x-evm.c
··· 570 570 .get_cd = dm6444evm_mmc_get_cd, 571 571 .get_ro = dm6444evm_mmc_get_ro, 572 572 .wires = 4, 573 - .version = MMC_CTLR_VERSION_1 574 573 }; 575 574 576 575 static struct i2c_board_info __initdata i2c_info[] = {
-1
arch/arm/mach-davinci/board-neuros-osd2.c
··· 164 164 165 165 static struct davinci_mmc_config davinci_ntosd2_mmc_config = { 166 166 .wires = 4, 167 - .version = MMC_CTLR_VERSION_1 168 167 }; 169 168 170 169
-1
arch/arm/mach-davinci/board-omapl138-hawk.c
··· 136 136 .wires = 4, 137 137 .max_freq = 50000000, 138 138 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 139 - .version = MMC_CTLR_VERSION_2, 140 139 }; 141 140 142 141 static __init void omapl138_hawk_mmc_init(void)
-1
arch/arm/mach-davinci/board-tnetv107x-evm.c
··· 85 85 .wires = 4, 86 86 .max_freq = 50000000, 87 87 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 88 - .version = MMC_CTLR_VERSION_1, 89 88 }; 90 89 91 90 static const short sdio1_pins[] __initconst = {
+14 -7
arch/arm/mach-davinci/clock.c
··· 35 35 { 36 36 if (clk->parent) 37 37 __clk_enable(clk->parent); 38 - if (clk->usecount++ == 0 && (clk->flags & CLK_PSC)) 39 - davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc, 40 - true, clk->flags); 38 + if (clk->usecount++ == 0) { 39 + if (clk->flags & CLK_PSC) 40 + davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc, 41 + true, clk->flags); 42 + else if (clk->clk_enable) 43 + clk->clk_enable(clk); 44 + } 41 45 } 42 46 43 47 static void __clk_disable(struct clk *clk) 44 48 { 45 49 if (WARN_ON(clk->usecount == 0)) 46 50 return; 47 - if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) && 48 - (clk->flags & CLK_PSC)) 49 - davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc, 50 - false, clk->flags); 51 + if (--clk->usecount == 0) { 52 + if (!(clk->flags & CLK_PLL) && (clk->flags & CLK_PSC)) 53 + davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc, 54 + false, clk->flags); 55 + else if (clk->clk_disable) 56 + clk->clk_disable(clk); 57 + } 51 58 if (clk->parent) 52 59 __clk_disable(clk->parent); 53 60 }
+2
arch/arm/mach-davinci/clock.h
··· 104 104 int (*set_rate) (struct clk *clk, unsigned long rate); 105 105 int (*round_rate) (struct clk *clk, unsigned long rate); 106 106 int (*reset) (struct clk *clk, bool reset); 107 + void (*clk_enable) (struct clk *clk); 108 + void (*clk_disable) (struct clk *clk); 107 109 }; 108 110 109 111 /* Clock flags: SoC-specific flags start at BIT(16) */
+1 -1
arch/arm/mach-davinci/da830.c
··· 394 394 CLK(NULL, "tpcc", &tpcc_clk), 395 395 CLK(NULL, "tptc0", &tptc0_clk), 396 396 CLK(NULL, "tptc1", &tptc1_clk), 397 - CLK("davinci_mmc.0", NULL, &mmcsd_clk), 397 + CLK("da830-mmc.0", NULL, &mmcsd_clk), 398 398 CLK(NULL, "uart0", &uart0_clk), 399 399 CLK(NULL, "uart1", &uart1_clk), 400 400 CLK(NULL, "uart2", &uart2_clk),
+48 -2
arch/arm/mach-davinci/da850.c
··· 383 383 .flags = PSC_LRST | PSC_FORCE, 384 384 }; 385 385 386 + static struct clk ehrpwm_clk = { 387 + .name = "ehrpwm", 388 + .parent = &pll0_sysclk2, 389 + .lpsc = DA8XX_LPSC1_PWM, 390 + .gpsc = 1, 391 + .flags = DA850_CLK_ASYNC3, 392 + }; 393 + 394 + #define DA8XX_EHRPWM_TBCLKSYNC BIT(12) 395 + 396 + static void ehrpwm_tblck_enable(struct clk *clk) 397 + { 398 + u32 val; 399 + 400 + val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG)); 401 + val |= DA8XX_EHRPWM_TBCLKSYNC; 402 + writel(val, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG)); 403 + } 404 + 405 + static void ehrpwm_tblck_disable(struct clk *clk) 406 + { 407 + u32 val; 408 + 409 + val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG)); 410 + val &= ~DA8XX_EHRPWM_TBCLKSYNC; 411 + writel(val, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG)); 412 + } 413 + 414 + static struct clk ehrpwm_tbclk = { 415 + .name = "ehrpwm_tbclk", 416 + .parent = &ehrpwm_clk, 417 + .clk_enable = ehrpwm_tblck_enable, 418 + .clk_disable = ehrpwm_tblck_disable, 419 + }; 420 + 421 + static struct clk ecap_clk = { 422 + .name = "ecap", 423 + .parent = &pll0_sysclk2, 424 + .lpsc = DA8XX_LPSC1_ECAP, 425 + .gpsc = 1, 426 + .flags = DA850_CLK_ASYNC3, 427 + }; 428 + 386 429 static struct clk_lookup da850_clks[] = { 387 430 CLK(NULL, "ref", &ref_clk), 388 431 CLK(NULL, "pll0", &pll0_clk), ··· 463 420 CLK("davinci_emac.1", NULL, &emac_clk), 464 421 CLK("davinci-mcasp.0", NULL, &mcasp_clk), 465 422 CLK("da8xx_lcdc.0", "fck", &lcdc_clk), 466 - CLK("davinci_mmc.0", NULL, &mmcsd0_clk), 467 - CLK("davinci_mmc.1", NULL, &mmcsd1_clk), 423 + CLK("da830-mmc.0", NULL, &mmcsd0_clk), 424 + CLK("da830-mmc.1", NULL, &mmcsd1_clk), 468 425 CLK(NULL, "aemif", &aemif_clk), 469 426 CLK(NULL, "usb11", &usb11_clk), 470 427 CLK(NULL, "usb20", &usb20_clk), ··· 473 430 CLK("vpif", NULL, &vpif_clk), 474 431 CLK("ahci", NULL, &sata_clk), 475 432 CLK("davinci-rproc.0", NULL, &dsp_clk), 433 + CLK("ehrpwm", "fck", &ehrpwm_clk), 434 + CLK("ehrpwm", "tbclk", &ehrpwm_tbclk), 435 + CLK("ecap", "fck", &ecap_clk), 476 436 CLK(NULL, NULL, NULL), 477 437 }; 478 438
+3 -2
arch/arm/mach-davinci/da8xx-dt.c
··· 20 20 21 21 #define DA8XX_NUM_UARTS 3 22 22 23 - void __init da8xx_uart_clk_enable(void) 23 + static void __init da8xx_uart_clk_enable(void) 24 24 { 25 25 int i; 26 26 for (i = 0; i < DA8XX_NUM_UARTS; i++) ··· 37 37 of_irq_init(da8xx_irq_match); 38 38 } 39 39 40 - struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { 40 + static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { 41 41 OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL), 42 42 OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL), 43 + OF_DEV_AUXDATA("ti,da830-mmc", 0x01c40000, "da830-mmc.0", NULL), 43 44 {} 44 45 }; 45 46
+89 -3
arch/arm/mach-davinci/devices-da8xx.c
··· 12 12 */ 13 13 #include <linux/init.h> 14 14 #include <linux/platform_device.h> 15 - #include <linux/dma-mapping.h> 15 + #include <linux/dma-contiguous.h> 16 16 #include <linux/serial_8250.h> 17 17 #include <linux/ahci_platform.h> 18 18 #include <linux/clk.h> ··· 664 664 }; 665 665 666 666 static struct platform_device da8xx_mmcsd0_device = { 667 - .name = "davinci_mmc", 667 + .name = "da830-mmc", 668 668 .id = 0, 669 669 .num_resources = ARRAY_SIZE(da8xx_mmcsd0_resources), 670 670 .resource = da8xx_mmcsd0_resources, ··· 701 701 }; 702 702 703 703 static struct platform_device da850_mmcsd1_device = { 704 - .name = "davinci_mmc", 704 + .name = "da830-mmc", 705 705 .id = 1, 706 706 .num_resources = ARRAY_SIZE(da850_mmcsd1_resources), 707 707 .resource = da850_mmcsd1_resources, ··· 713 713 return platform_device_register(&da850_mmcsd1_device); 714 714 } 715 715 #endif 716 + 717 + static struct resource da8xx_rproc_resources[] = { 718 + { /* DSP boot address */ 719 + .start = DA8XX_SYSCFG0_BASE + DA8XX_HOST1CFG_REG, 720 + .end = DA8XX_SYSCFG0_BASE + DA8XX_HOST1CFG_REG + 3, 721 + .flags = IORESOURCE_MEM, 722 + }, 723 + { /* DSP interrupt registers */ 724 + .start = DA8XX_SYSCFG0_BASE + DA8XX_CHIPSIG_REG, 725 + .end = DA8XX_SYSCFG0_BASE + DA8XX_CHIPSIG_REG + 7, 726 + .flags = IORESOURCE_MEM, 727 + }, 728 + { /* dsp irq */ 729 + .start = IRQ_DA8XX_CHIPINT0, 730 + .end = IRQ_DA8XX_CHIPINT0, 731 + .flags = IORESOURCE_IRQ, 732 + }, 733 + }; 734 + 735 + static struct platform_device da8xx_dsp = { 736 + .name = "davinci-rproc", 737 + .dev = { 738 + .coherent_dma_mask = DMA_BIT_MASK(32), 739 + }, 740 + .num_resources = ARRAY_SIZE(da8xx_rproc_resources), 741 + .resource = da8xx_rproc_resources, 742 + }; 743 + 744 + #if IS_ENABLED(CONFIG_DA8XX_REMOTEPROC) 745 + 746 + static phys_addr_t rproc_base __initdata; 747 + static unsigned long rproc_size __initdata; 748 + 749 + static int __init early_rproc_mem(char *p) 750 + { 751 + char *endp; 752 + 753 + if (p == NULL) 754 + return 0; 755 + 756 + rproc_size = memparse(p, &endp); 757 + if (*endp == '@') 758 + rproc_base = memparse(endp + 1, NULL); 759 + 760 + return 0; 761 + } 762 + early_param("rproc_mem", early_rproc_mem); 763 + 764 + void __init da8xx_rproc_reserve_cma(void) 765 + { 766 + int ret; 767 + 768 + if (!rproc_base || !rproc_size) { 769 + pr_err("%s: 'rproc_mem=nn@address' badly specified\n" 770 + " 'nn' and 'address' must both be non-zero\n", 771 + __func__); 772 + 773 + return; 774 + } 775 + 776 + pr_info("%s: reserving 0x%lx @ 0x%lx...\n", 777 + __func__, rproc_size, (unsigned long)rproc_base); 778 + 779 + ret = dma_declare_contiguous(&da8xx_dsp.dev, rproc_size, rproc_base, 0); 780 + if (ret) 781 + pr_err("%s: dma_declare_contiguous failed %d\n", __func__, ret); 782 + } 783 + 784 + #else 785 + 786 + void __init da8xx_rproc_reserve_cma(void) 787 + { 788 + } 789 + 790 + #endif 791 + 792 + int __init da8xx_register_rproc(void) 793 + { 794 + int ret; 795 + 796 + ret = platform_device_register(&da8xx_dsp); 797 + if (ret) 798 + pr_err("%s: can't register DSP device: %d\n", __func__, ret); 799 + 800 + return ret; 801 + }; 716 802 717 803 static struct resource da8xx_rtc_resources[] = { 718 804 {
+2 -2
arch/arm/mach-davinci/devices-tnetv107x.c
··· 218 218 219 219 static struct platform_device mmc_devices[2] = { 220 220 { 221 - .name = "davinci_mmc", 221 + .name = "dm6441-mmc", 222 222 .id = 0, 223 223 .dev = { 224 224 .dma_mask = &mmc0_dma_mask, ··· 228 228 .resource = mmc0_resources 229 229 }, 230 230 { 231 - .name = "davinci_mmc", 231 + .name = "dm6441-mmc", 232 232 .id = 1, 233 233 .dev = { 234 234 .dma_mask = &mmc1_dma_mask,
+4 -2
arch/arm/mach-davinci/devices.c
··· 150 150 }; 151 151 152 152 static struct platform_device davinci_mmcsd0_device = { 153 - .name = "davinci_mmc", 153 + .name = "dm6441-mmc", 154 154 .id = 0, 155 155 .dev = { 156 156 .dma_mask = &mmcsd0_dma_mask, ··· 187 187 }; 188 188 189 189 static struct platform_device davinci_mmcsd1_device = { 190 - .name = "davinci_mmc", 190 + .name = "dm6441-mmc", 191 191 .id = 1, 192 192 .dev = { 193 193 .dma_mask = &mmcsd1_dma_mask, ··· 235 235 mmcsd1_resources[0].end = DM365_MMCSD1_BASE + 236 236 SZ_4K - 1; 237 237 mmcsd1_resources[2].start = IRQ_DM365_SDIOINT1; 238 + davinci_mmcsd1_device.name = "da830-mmc"; 238 239 } else 239 240 break; 240 241 ··· 257 256 mmcsd0_resources[0].end = DM365_MMCSD0_BASE + 258 257 SZ_4K - 1; 259 258 mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0; 259 + davinci_mmcsd0_device.name = "da830-mmc"; 260 260 } else if (cpu_is_davinci_dm644x()) { 261 261 /* REVISIT: should this be in board-init code? */ 262 262 /* Power-on 3.3V IO cells */
+2 -2
arch/arm/mach-davinci/dm355.c
··· 363 363 CLK("i2c_davinci.1", NULL, &i2c_clk), 364 364 CLK("davinci-mcbsp.0", NULL, &asp0_clk), 365 365 CLK("davinci-mcbsp.1", NULL, &asp1_clk), 366 - CLK("davinci_mmc.0", NULL, &mmcsd0_clk), 367 - CLK("davinci_mmc.1", NULL, &mmcsd1_clk), 366 + CLK("dm6441-mmc.0", NULL, &mmcsd0_clk), 367 + CLK("dm6441-mmc.1", NULL, &mmcsd1_clk), 368 368 CLK("spi_davinci.0", NULL, &spi0_clk), 369 369 CLK("spi_davinci.1", NULL, &spi1_clk), 370 370 CLK("spi_davinci.2", NULL, &spi2_clk),
+2 -2
arch/arm/mach-davinci/dm365.c
··· 458 458 CLK(NULL, "uart0", &uart0_clk), 459 459 CLK(NULL, "uart1", &uart1_clk), 460 460 CLK("i2c_davinci.1", NULL, &i2c_clk), 461 - CLK("davinci_mmc.0", NULL, &mmcsd0_clk), 462 - CLK("davinci_mmc.1", NULL, &mmcsd1_clk), 461 + CLK("da830-mmc.0", NULL, &mmcsd0_clk), 462 + CLK("da830-mmc.1", NULL, &mmcsd1_clk), 463 463 CLK("spi_davinci.0", NULL, &spi0_clk), 464 464 CLK("spi_davinci.1", NULL, &spi1_clk), 465 465 CLK("spi_davinci.2", NULL, &spi2_clk),
+1 -1
arch/arm/mach-davinci/dm644x.c
··· 310 310 CLK("i2c_davinci.1", NULL, &i2c_clk), 311 311 CLK("palm_bk3710", NULL, &ide_clk), 312 312 CLK("davinci-mcbsp", NULL, &asp_clk), 313 - CLK("davinci_mmc.0", NULL, &mmcsd_clk), 313 + CLK("dm6441-mmc.0", NULL, &mmcsd_clk), 314 314 CLK(NULL, "spi", &spi_clk), 315 315 CLK(NULL, "gpio", &gpio_clk), 316 316 CLK(NULL, "usb", &usb_clk),
+5
arch/arm/mach-davinci/include/mach/da8xx.h
··· 54 54 #define DA8XX_SYSCFG0_BASE (IO_PHYS + 0x14000) 55 55 #define DA8XX_SYSCFG0_VIRT(x) (da8xx_syscfg0_base + (x)) 56 56 #define DA8XX_JTAG_ID_REG 0x18 57 + #define DA8XX_HOST1CFG_REG 0x44 58 + #define DA8XX_CHIPSIG_REG 0x174 57 59 #define DA8XX_CFGCHIP0_REG 0x17c 60 + #define DA8XX_CFGCHIP1_REG 0x180 58 61 #define DA8XX_CFGCHIP2_REG 0x184 59 62 #define DA8XX_CFGCHIP3_REG 0x188 60 63 ··· 107 104 int __init da850_register_vpif_capture 108 105 (struct vpif_capture_config *capture_config); 109 106 void da8xx_restart(char mode, const char *cmd); 107 + void da8xx_rproc_reserve_cma(void); 108 + int da8xx_register_rproc(void); 110 109 111 110 extern struct platform_device da8xx_serial_device; 112 111 extern struct emac_platform_data da8xx_emac_pdata;
-2
arch/arm/mach-davinci/include/mach/debug-macro.S
··· 24 24 25 25 #if defined(CONFIG_DEBUG_DAVINCI_DMx_UART0) 26 26 #define UART_BASE DAVINCI_UART0_BASE 27 - #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART0) 28 - #define UART_BASE DA8XX_UART0_BASE 29 27 #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART1) 30 28 #define UART_BASE DA8XX_UART1_BASE 31 29 #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART2)
+1
arch/arm/mach-davinci/pm.c
··· 19 19 #include <asm/delay.h> 20 20 #include <asm/io.h> 21 21 22 + #include <mach/common.h> 22 23 #include <mach/da8xx.h> 23 24 #include <mach/sram.h> 24 25 #include <mach/pm.h>
+2 -2
arch/arm/mach-davinci/sram.c
··· 62 62 phys_addr_t phys = davinci_soc_info.sram_dma; 63 63 unsigned len = davinci_soc_info.sram_len; 64 64 int status = 0; 65 - void *addr; 65 + void __iomem *addr; 66 66 67 67 if (len) { 68 68 len = min_t(unsigned, len, SRAM_SIZE); ··· 75 75 addr = ioremap(phys, len); 76 76 if (!addr) 77 77 return -ENOMEM; 78 - status = gen_pool_add_virt(sram_pool, (unsigned)addr, 78 + status = gen_pool_add_virt(sram_pool, (unsigned long) addr, 79 79 phys, len, -1); 80 80 if (status < 0) 81 81 iounmap(addr);
+2 -2
arch/arm/mach-davinci/tnetv107x.c
··· 272 272 CLK("tnetv107x-keypad.0", NULL, &clk_keypad), 273 273 CLK(NULL, "clk_gpio", &clk_gpio), 274 274 CLK(NULL, "clk_mdio", &clk_mdio), 275 - CLK("davinci_mmc.0", NULL, &clk_sdio0), 275 + CLK("dm6441-mmc.0", NULL, &clk_sdio0), 276 276 CLK(NULL, "uart0", &clk_uart0), 277 277 CLK(NULL, "uart1", &clk_uart1), 278 278 CLK(NULL, "timer0", &clk_timer0), ··· 292 292 CLK(NULL, "clk_system", &clk_system), 293 293 CLK(NULL, "clk_imcop", &clk_imcop), 294 294 CLK(NULL, "clk_spare", &clk_spare), 295 - CLK("davinci_mmc.1", NULL, &clk_sdio1), 295 + CLK("dm6441-mmc.1", NULL, &clk_sdio1), 296 296 CLK(NULL, "clk_ddr2_vrst", &clk_ddr2_vrst), 297 297 CLK(NULL, "clk_ddr2_vctl_rst", &clk_ddr2_vctl_rst), 298 298 CLK(NULL, NULL, NULL),
+1
arch/arm/mach-davinci/usb.c
··· 10 10 #include <mach/common.h> 11 11 #include <mach/irqs.h> 12 12 #include <mach/cputype.h> 13 + #include <mach/da8xx.h> 13 14 #include <linux/platform_data/usb-davinci.h> 14 15 15 16 #define DAVINCI_USB_OTG_BASE 0x01c64000
+2
arch/arm/mach-exynos/common.c
··· 463 463 * uses GIC instead of VIC. 464 464 */ 465 465 s5p_init_irq(NULL, 0); 466 + 467 + gic_arch_extn.irq_set_wake = s3c_irq_wake; 466 468 } 467 469 468 470 void __init exynos5_init_irq(void)
+26 -32
arch/arm/mach-exynos/cpuidle.c
··· 41 41 struct cpuidle_driver *drv, 42 42 int index); 43 43 44 - static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { 45 - [0] = ARM_CPUIDLE_WFI_STATE, 46 - [1] = { 47 - .enter = exynos4_enter_lowpower, 48 - .exit_latency = 300, 49 - .target_residency = 100000, 50 - .flags = CPUIDLE_FLAG_TIME_VALID, 51 - .name = "C1", 52 - .desc = "ARM power down", 53 - }, 54 - }; 55 - 56 44 static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); 57 45 58 46 static struct cpuidle_driver exynos4_idle_driver = { 59 47 .name = "exynos4_idle", 60 48 .owner = THIS_MODULE, 49 + .states = { 50 + [0] = ARM_CPUIDLE_WFI_STATE, 51 + [1] = { 52 + .enter = exynos4_enter_lowpower, 53 + .exit_latency = 300, 54 + .target_residency = 100000, 55 + .flags = CPUIDLE_FLAG_TIME_VALID, 56 + .name = "C1", 57 + .desc = "ARM power down", 58 + }, 59 + }, 60 + .state_count = 2, 61 + .safe_state_index = 0, 61 62 }; 62 63 63 64 /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ ··· 193 192 194 193 static int __init exynos4_init_cpuidle(void) 195 194 { 196 - int i, max_cpuidle_state, cpu_id; 195 + int cpu_id, ret; 197 196 struct cpuidle_device *device; 198 - struct cpuidle_driver *drv = &exynos4_idle_driver; 199 197 200 198 if (soc_is_exynos5250()) 201 199 exynos5_core_down_clk(); 202 200 203 - /* Setup cpuidle driver */ 204 - drv->state_count = (sizeof(exynos4_cpuidle_set) / 205 - sizeof(struct cpuidle_state)); 206 - max_cpuidle_state = drv->state_count; 207 - for (i = 0; i < max_cpuidle_state; i++) { 208 - memcpy(&drv->states[i], &exynos4_cpuidle_set[i], 209 - sizeof(struct cpuidle_state)); 201 + ret = cpuidle_register_driver(&exynos4_idle_driver); 202 + if (ret) { 203 + printk(KERN_ERR "CPUidle failed to register driver\n"); 204 + return ret; 210 205 } 211 - drv->safe_state_index = 0; 212 - cpuidle_register_driver(&exynos4_idle_driver); 213 206 214 - for_each_cpu(cpu_id, cpu_online_mask) { 207 + for_each_online_cpu(cpu_id) { 215 208 device = &per_cpu(exynos4_cpuidle_device, cpu_id); 216 209 device->cpu = cpu_id; 217 210 218 - if (cpu_id == 0) 219 - device->state_count = (sizeof(exynos4_cpuidle_set) / 220 - sizeof(struct cpuidle_state)); 221 - else 222 - device->state_count = 1; /* Support IDLE only */ 211 + /* Support IDLE only */ 212 + if (cpu_id != 0) 213 + device->state_count = 1; 223 214 224 - if (cpuidle_register_device(device)) { 225 - printk(KERN_ERR "CPUidle register device failed\n,"); 226 - return -EIO; 215 + ret = cpuidle_register_device(device); 216 + if (ret) { 217 + printk(KERN_ERR "CPUidle register device failed\n"); 218 + return ret; 227 219 } 228 220 } 229 221
+2 -7
arch/arm/mach-exynos/include/mach/pm-core.h
··· 27 27 28 28 static inline void s3c_pm_arch_prepare_irqs(void) 29 29 { 30 - unsigned int tmp; 31 - tmp = __raw_readl(S5P_WAKEUP_MASK); 32 - tmp &= ~(1 << 31); 33 - __raw_writel(tmp, S5P_WAKEUP_MASK); 34 - 35 - __raw_writel(s3c_irqwake_intmask, S5P_WAKEUP_MASK); 36 - __raw_writel(s3c_irqwake_eintmask & 0xFFFFFFFE, S5P_EINT_WAKEUP_MASK); 30 + __raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK); 31 + __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); 37 32 } 38 33 39 34 static inline void s3c_pm_arch_stop_clocks(void)
+51 -59
arch/arm/mach-msm/timer.c
··· 30 30 31 31 #include "common.h" 32 32 33 - #define TIMER_MATCH_VAL 0x0000 34 - #define TIMER_COUNT_VAL 0x0004 35 - #define TIMER_ENABLE 0x0008 36 - #define TIMER_ENABLE_CLR_ON_MATCH_EN BIT(1) 37 - #define TIMER_ENABLE_EN BIT(0) 38 - #define TIMER_CLEAR 0x000C 39 - #define DGT_CLK_CTL_DIV_4 0x3 33 + #define TIMER_MATCH_VAL 0x0000 34 + #define TIMER_COUNT_VAL 0x0004 35 + #define TIMER_ENABLE 0x0008 36 + #define TIMER_ENABLE_CLR_ON_MATCH_EN BIT(1) 37 + #define TIMER_ENABLE_EN BIT(0) 38 + #define TIMER_CLEAR 0x000C 39 + #define DGT_CLK_CTL 0x10 40 + #define DGT_CLK_CTL_DIV_4 0x3 41 + #define TIMER_STS_GPT0_CLR_PEND BIT(10) 40 42 41 43 #define GPT_HZ 32768 42 44 43 45 #define MSM_DGT_SHIFT 5 44 46 45 47 static void __iomem *event_base; 48 + static void __iomem *sts_base; 46 49 47 50 static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) 48 51 { ··· 70 67 71 68 writel_relaxed(ctrl, event_base + TIMER_CLEAR); 72 69 writel_relaxed(cycles, event_base + TIMER_MATCH_VAL); 70 + 71 + if (sts_base) 72 + while (readl_relaxed(sts_base) & TIMER_STS_GPT0_CLR_PEND) 73 + cpu_relax(); 74 + 73 75 writel_relaxed(ctrl | TIMER_ENABLE_EN, event_base + TIMER_ENABLE); 74 76 return 0; 75 77 } ··· 145 137 if (!smp_processor_id()) 146 138 return 0; 147 139 148 - writel_relaxed(0, event_base + TIMER_ENABLE); 149 - writel_relaxed(0, event_base + TIMER_CLEAR); 150 - writel_relaxed(~0, event_base + TIMER_MATCH_VAL); 151 140 evt->irq = msm_clockevent.irq; 152 141 evt->name = "local_timer"; 153 142 evt->features = msm_clockevent.features; ··· 182 177 struct clocksource *cs = &msm_clocksource; 183 178 int res; 184 179 185 - writel_relaxed(0, event_base + TIMER_ENABLE); 186 - writel_relaxed(0, event_base + TIMER_CLEAR); 187 - writel_relaxed(~0, event_base + TIMER_MATCH_VAL); 188 180 ce->cpumask = cpumask_of(0); 189 181 ce->irq = irq; 190 182 ··· 219 217 } 220 218 221 219 #ifdef CONFIG_OF 222 - static const struct of_device_id msm_dgt_match[] __initconst = { 223 - { .compatible = "qcom,msm-dgt" }, 224 - { }, 225 - }; 226 - 227 - static const struct of_device_id msm_gpt_match[] __initconst = { 228 - { .compatible = "qcom,msm-gpt" }, 220 + static const struct of_device_id msm_timer_match[] __initconst = { 221 + { .compatible = "qcom,kpss-timer" }, 222 + { .compatible = "qcom,scss-timer" }, 229 223 { }, 230 224 }; 231 225 ··· 232 234 int irq; 233 235 struct resource res; 234 236 u32 percpu_offset; 235 - void __iomem *dgt_clk_ctl; 237 + void __iomem *base; 238 + void __iomem *cpu0_base; 236 239 237 - np = of_find_matching_node(NULL, msm_gpt_match); 240 + np = of_find_matching_node(NULL, msm_timer_match); 238 241 if (!np) { 239 - pr_err("Can't find GPT DT node\n"); 242 + pr_err("Can't find msm timer DT node\n"); 240 243 return; 241 244 } 242 245 243 - event_base = of_iomap(np, 0); 244 - if (!event_base) { 246 + base = of_iomap(np, 0); 247 + if (!base) { 245 248 pr_err("Failed to map event base\n"); 246 249 return; 247 250 } 248 251 249 - irq = irq_of_parse_and_map(np, 0); 252 + /* We use GPT0 for the clockevent */ 253 + irq = irq_of_parse_and_map(np, 1); 250 254 if (irq <= 0) { 251 255 pr_err("Can't get irq\n"); 252 256 return; 253 257 } 254 - of_node_put(np); 255 258 256 - np = of_find_matching_node(NULL, msm_dgt_match); 257 - if (!np) { 258 - pr_err("Can't find DGT DT node\n"); 259 - return; 260 - } 261 - 259 + /* We use CPU0's DGT for the clocksource */ 262 260 if (of_property_read_u32(np, "cpu-offset", &percpu_offset)) 263 261 percpu_offset = 0; 264 262 ··· 263 269 return; 264 270 } 265 271 266 - source_base = ioremap(res.start + percpu_offset, resource_size(&res)); 267 - if (!source_base) { 272 + cpu0_base = ioremap(res.start + percpu_offset, resource_size(&res)); 273 + if (!cpu0_base) { 268 274 pr_err("Failed to map source base\n"); 269 275 return; 270 - } 271 - 272 - if (!of_address_to_resource(np, 1, &res)) { 273 - dgt_clk_ctl = ioremap(res.start + percpu_offset, 274 - resource_size(&res)); 275 - if (!dgt_clk_ctl) { 276 - pr_err("Failed to map DGT control base\n"); 277 - return; 278 - } 279 - writel_relaxed(DGT_CLK_CTL_DIV_4, dgt_clk_ctl); 280 - iounmap(dgt_clk_ctl); 281 276 } 282 277 283 278 if (of_property_read_u32(np, "clock-frequency", &freq)) { ··· 275 292 } 276 293 of_node_put(np); 277 294 295 + event_base = base + 0x4; 296 + sts_base = base + 0x88; 297 + source_base = cpu0_base + 0x24; 298 + freq /= 4; 299 + writel_relaxed(DGT_CLK_CTL_DIV_4, source_base + DGT_CLK_CTL); 300 + 278 301 msm_timer_init(freq, 32, irq, !!percpu_offset); 279 302 } 280 303 #endif 281 304 282 - static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) 305 + static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source, 306 + u32 sts) 283 307 { 284 - event_base = ioremap(event, SZ_64); 285 - if (!event_base) { 286 - pr_err("Failed to map event base\n"); 287 - return 1; 308 + void __iomem *base; 309 + 310 + base = ioremap(addr, SZ_256); 311 + if (!base) { 312 + pr_err("Failed to map timer base\n"); 313 + return -ENOMEM; 288 314 } 289 - source_base = ioremap(source, SZ_64); 290 - if (!source_base) { 291 - pr_err("Failed to map source base\n"); 292 - return 1; 293 - } 315 + event_base = base + event; 316 + source_base = base + source; 317 + if (sts) 318 + sts_base = base + sts; 319 + 294 320 return 0; 295 321 } 296 322 ··· 307 315 { 308 316 struct clocksource *cs = &msm_clocksource; 309 317 310 - if (msm_timer_map(0xc0100000, 0xc0100010)) 318 + if (msm_timer_map(0xc0100000, 0x0, 0x10, 0x0)) 311 319 return; 312 320 cs->read = msm_read_timer_count_shift; 313 321 cs->mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)); ··· 318 326 319 327 void __init msm7x30_timer_init(void) 320 328 { 321 - if (msm_timer_map(0xc0100004, 0xc0100024)) 329 + if (msm_timer_map(0xc0100000, 0x4, 0x24, 0x80)) 322 330 return; 323 331 msm_timer_init(24576000 / 4, 32, 1, false); 324 332 } 325 333 326 334 void __init qsd8x50_timer_init(void) 327 335 { 328 - if (msm_timer_map(0xAC100000, 0xAC100010)) 336 + if (msm_timer_map(0xAC100000, 0x0, 0x10, 0x34)) 329 337 return; 330 338 msm_timer_init(19200000 / 4, 32, 7, false); 331 339 }
+2
arch/arm/mach-mxs/Kconfig
··· 3 3 config SOC_IMX23 4 4 bool 5 5 select ARM_AMBA 6 + select ARM_CPU_SUSPEND if PM 6 7 select CPU_ARM926T 7 8 select HAVE_PWM 8 9 select PINCTRL_IMX23 ··· 11 10 config SOC_IMX28 12 11 bool 13 12 select ARM_AMBA 13 + select ARM_CPU_SUSPEND if PM 14 14 select CPU_ARM926T 15 15 select HAVE_CAN_FLEXCAN if CAN 16 16 select HAVE_PWM
+3
arch/arm/mach-omap2/Kconfig
··· 15 15 select OMAP_DM_TIMER 16 16 select PINCTRL 17 17 select PROC_DEVICETREE if PROC_FS 18 + select SOC_BUS 18 19 select SPARSE_IRQ 19 20 select USE_OF 20 21 help ··· 100 99 select PM_RUNTIME if CPU_IDLE 101 100 select USB_ARCH_HAS_EHCI if USB_SUPPORT 102 101 select COMMON_CLK 102 + select ARM_ERRATA_754322 103 + select ARM_ERRATA_775420 103 104 104 105 config SOC_OMAP5 105 106 bool "TI OMAP5"
+3 -1
arch/arm/mach-omap2/cclock2430_data.c
··· 1978 1978 CLK(NULL, "sdrc_ick", &sdrc_ick), 1979 1979 CLK(NULL, "des_ick", &des_ick), 1980 1980 CLK("omap-sham", "ick", &sha_ick), 1981 - CLK("omap_rng", "ick", &rng_ick), 1981 + CLK(NULL, "sha_ick", &sha_ick), 1982 + CLK("omap_rng", "ick", &rng_ick), 1982 1983 CLK(NULL, "rng_ick", &rng_ick), 1983 1984 CLK("omap-aes", "ick", &aes_ick), 1985 + CLK(NULL, "aes_ick", &aes_ick), 1984 1986 CLK(NULL, "pka_ick", &pka_ick), 1985 1987 CLK(NULL, "usb_fck", &usb_fck), 1986 1988 CLK("musb-omap2430", "ick", &usbhs_ick),
+10
arch/arm/mach-omap2/cclock33xx_data.c
··· 413 413 DEFINE_STRUCT_CLK_HW_OMAP(smartreflex1_fck, NULL); 414 414 DEFINE_STRUCT_CLK(smartreflex1_fck, dpll_core_ck_parents, clk_ops_null); 415 415 416 + static struct clk sha0_fck; 417 + DEFINE_STRUCT_CLK_HW_OMAP(sha0_fck, NULL); 418 + DEFINE_STRUCT_CLK(sha0_fck, dpll_core_ck_parents, clk_ops_null); 419 + 420 + static struct clk aes0_fck; 421 + DEFINE_STRUCT_CLK_HW_OMAP(aes0_fck, NULL); 422 + DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null); 423 + 416 424 /* 417 425 * Modules clock nodes 418 426 * ··· 886 878 CLK(NULL, "mmu_fck", &mmu_fck), 887 879 CLK(NULL, "smartreflex0_fck", &smartreflex0_fck), 888 880 CLK(NULL, "smartreflex1_fck", &smartreflex1_fck), 881 + CLK(NULL, "sha0_fck", &sha0_fck), 882 + CLK(NULL, "aes0_fck", &aes0_fck), 889 883 CLK(NULL, "timer1_fck", &timer1_fck), 890 884 CLK(NULL, "timer2_fck", &timer2_fck), 891 885 CLK(NULL, "timer3_fck", &timer3_fck),
+2
arch/arm/mach-omap2/cclock3xxx_data.c
··· 3471 3471 CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck), 3472 3472 CLK(NULL, "init_60m_fclk", &dummy_ck), 3473 3473 CLK(NULL, "gpt1_fck", &gpt1_fck), 3474 + CLK(NULL, "aes2_ick", &aes2_ick), 3474 3475 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck), 3475 3476 CLK(NULL, "gpio1_dbck", &gpio1_dbck), 3477 + CLK(NULL, "sha12_ick", &sha12_ick), 3476 3478 CLK(NULL, "wdt2_fck", &wdt2_fck), 3477 3479 CLK("omap_wdt", "ick", &wdt2_ick), 3478 3480 CLK(NULL, "wdt2_ick", &wdt2_ick),
+8
arch/arm/mach-omap2/common.h
··· 110 110 void ti81xx_init_late(void); 111 111 int omap2_common_pm_late_init(void); 112 112 113 + #ifdef CONFIG_SOC_BUS 114 + void omap_soc_device_init(void); 115 + #else 116 + static inline void omap_soc_device_init(void) 117 + { 118 + } 119 + #endif 120 + 113 121 #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) 114 122 void omap2xxx_restart(char mode, const char *cmd); 115 123 #else
+22 -131
arch/arm/mach-omap2/devices.c
··· 504 504 WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n"); 505 505 } 506 506 507 - #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) 508 - 509 - #ifdef CONFIG_ARCH_OMAP2 510 - static struct resource omap2_sham_resources[] = { 511 - { 512 - .start = OMAP24XX_SEC_SHA1MD5_BASE, 513 - .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64, 514 - .flags = IORESOURCE_MEM, 515 - }, 516 - { 517 - .start = 51 + OMAP_INTC_START, 518 - .flags = IORESOURCE_IRQ, 519 - } 520 - }; 521 - static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources); 522 - #else 523 - #define omap2_sham_resources NULL 524 - #define omap2_sham_resources_sz 0 525 - #endif 526 - 527 - #ifdef CONFIG_ARCH_OMAP3 528 - static struct resource omap3_sham_resources[] = { 529 - { 530 - .start = OMAP34XX_SEC_SHA1MD5_BASE, 531 - .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64, 532 - .flags = IORESOURCE_MEM, 533 - }, 534 - { 535 - .start = 49 + OMAP_INTC_START, 536 - .flags = IORESOURCE_IRQ, 537 - }, 538 - { 539 - .start = OMAP34XX_DMA_SHA1MD5_RX, 540 - .flags = IORESOURCE_DMA, 541 - } 542 - }; 543 - static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources); 544 - #else 545 - #define omap3_sham_resources NULL 546 - #define omap3_sham_resources_sz 0 547 - #endif 548 - 549 - static struct platform_device sham_device = { 550 - .name = "omap-sham", 551 - .id = -1, 552 - }; 553 - 554 - static void omap_init_sham(void) 507 + static void __init omap_init_sham(void) 555 508 { 556 - if (cpu_is_omap24xx()) { 557 - sham_device.resource = omap2_sham_resources; 558 - sham_device.num_resources = omap2_sham_resources_sz; 559 - } else if (cpu_is_omap34xx()) { 560 - sham_device.resource = omap3_sham_resources; 561 - sham_device.num_resources = omap3_sham_resources_sz; 562 - } else { 563 - pr_err("%s: platform not supported\n", __func__); 509 + struct omap_hwmod *oh; 510 + struct platform_device *pdev; 511 + 512 + oh = omap_hwmod_lookup("sham"); 513 + if (!oh) 564 514 return; 565 - } 566 - platform_device_register(&sham_device); 567 - } 568 - #else 569 - static inline void omap_init_sham(void) { } 570 - #endif 571 515 572 - #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) 573 - 574 - #ifdef CONFIG_ARCH_OMAP2 575 - static struct resource omap2_aes_resources[] = { 576 - { 577 - .start = OMAP24XX_SEC_AES_BASE, 578 - .end = OMAP24XX_SEC_AES_BASE + 0x4C, 579 - .flags = IORESOURCE_MEM, 580 - }, 581 - { 582 - .start = OMAP24XX_DMA_AES_TX, 583 - .flags = IORESOURCE_DMA, 584 - }, 585 - { 586 - .start = OMAP24XX_DMA_AES_RX, 587 - .flags = IORESOURCE_DMA, 588 - } 589 - }; 590 - static int omap2_aes_resources_sz = ARRAY_SIZE(omap2_aes_resources); 591 - #else 592 - #define omap2_aes_resources NULL 593 - #define omap2_aes_resources_sz 0 594 - #endif 595 - 596 - #ifdef CONFIG_ARCH_OMAP3 597 - static struct resource omap3_aes_resources[] = { 598 - { 599 - .start = OMAP34XX_SEC_AES_BASE, 600 - .end = OMAP34XX_SEC_AES_BASE + 0x4C, 601 - .flags = IORESOURCE_MEM, 602 - }, 603 - { 604 - .start = OMAP34XX_DMA_AES2_TX, 605 - .flags = IORESOURCE_DMA, 606 - }, 607 - { 608 - .start = OMAP34XX_DMA_AES2_RX, 609 - .flags = IORESOURCE_DMA, 610 - } 611 - }; 612 - static int omap3_aes_resources_sz = ARRAY_SIZE(omap3_aes_resources); 613 - #else 614 - #define omap3_aes_resources NULL 615 - #define omap3_aes_resources_sz 0 616 - #endif 617 - 618 - static struct platform_device aes_device = { 619 - .name = "omap-aes", 620 - .id = -1, 621 - }; 622 - 623 - static void omap_init_aes(void) 624 - { 625 - if (cpu_is_omap24xx()) { 626 - aes_device.resource = omap2_aes_resources; 627 - aes_device.num_resources = omap2_aes_resources_sz; 628 - } else if (cpu_is_omap34xx()) { 629 - aes_device.resource = omap3_aes_resources; 630 - aes_device.num_resources = omap3_aes_resources_sz; 631 - } else { 632 - pr_err("%s: platform not supported\n", __func__); 633 - return; 634 - } 635 - platform_device_register(&aes_device); 516 + pdev = omap_device_build("omap-sham", -1, oh, NULL, 0); 517 + WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n"); 636 518 } 637 519 638 - #else 639 - static inline void omap_init_aes(void) { } 640 - #endif 520 + static void __init omap_init_aes(void) 521 + { 522 + struct omap_hwmod *oh; 523 + struct platform_device *pdev; 524 + 525 + oh = omap_hwmod_lookup("aes"); 526 + if (!oh) 527 + return; 528 + 529 + pdev = omap_device_build("omap-aes", -1, oh, NULL, 0); 530 + WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n"); 531 + } 641 532 642 533 /*-------------------------------------------------------------------------*/ 643 534 ··· 655 764 omap_init_dmic(); 656 765 omap_init_mcpdm(); 657 766 omap_init_mcspi(); 767 + omap_init_sham(); 768 + omap_init_aes(); 658 769 } 659 770 omap_init_sti(); 660 771 omap_init_rng(); 661 - omap_init_sham(); 662 - omap_init_aes(); 663 772 omap_init_vout(); 664 773 omap_init_ocp2scp(); 665 774
+87 -8
arch/arm/mach-omap2/id.c
··· 18 18 #include <linux/kernel.h> 19 19 #include <linux/init.h> 20 20 #include <linux/io.h> 21 + #include <linux/slab.h> 22 + 23 + #ifdef CONFIG_SOC_BUS 24 + #include <linux/sys_soc.h> 25 + #endif 21 26 22 27 #include <asm/cputype.h> 23 28 ··· 36 31 #define OMAP4_SILICON_TYPE_STANDARD 0x01 37 32 #define OMAP4_SILICON_TYPE_PERFORMANCE 0x02 38 33 34 + #define OMAP_SOC_MAX_NAME_LENGTH 16 35 + 39 36 static unsigned int omap_revision; 40 - static const char *cpu_rev; 37 + static char soc_name[OMAP_SOC_MAX_NAME_LENGTH]; 38 + static char soc_rev[OMAP_SOC_MAX_NAME_LENGTH]; 41 39 u32 omap_features; 42 40 43 41 unsigned int omap_rev(void) ··· 177 169 j = i; 178 170 } 179 171 180 - pr_info("OMAP%04x", omap_rev() >> 16); 172 + sprintf(soc_name, "OMAP%04x", omap_rev() >> 16); 173 + sprintf(soc_rev, "ES%x", (omap_rev() >> 12) & 0xf); 174 + 175 + pr_info("%s", soc_name); 181 176 if ((omap_rev() >> 8) & 0x0f) 182 - pr_info("ES%x", (omap_rev() >> 12) & 0xf); 177 + pr_info("%s", soc_rev); 183 178 pr_info("\n"); 184 179 } 185 180 ··· 222 211 cpu_name = "OMAP3503"; 223 212 } 224 213 214 + sprintf(soc_name, "%s", cpu_name); 215 + 225 216 /* Print verbose information */ 226 - pr_info("%s ES%s (", cpu_name, cpu_rev); 217 + pr_info("%s %s (", soc_name, soc_rev); 227 218 228 219 OMAP3_SHOW_FEATURE(l2cache); 229 220 OMAP3_SHOW_FEATURE(iva); ··· 304 291 305 292 void __init omap3xxx_check_revision(void) 306 293 { 294 + const char *cpu_rev; 307 295 u32 cpuid, idcode; 308 296 u16 hawkeye; 309 297 u8 rev; ··· 452 438 cpu_rev = "1.2"; 453 439 pr_warn("Warning: unknown chip type; assuming OMAP3630ES1.2\n"); 454 440 } 441 + sprintf(soc_rev, "ES%s", cpu_rev); 455 442 } 456 443 457 444 void __init omap4xxx_check_revision(void) ··· 527 512 omap_revision = OMAP4430_REV_ES2_3; 528 513 } 529 514 530 - pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16, 531 - ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); 515 + sprintf(soc_name, "OMAP%04x", omap_rev() >> 16); 516 + sprintf(soc_rev, "ES%d.%d", (omap_rev() >> 12) & 0xf, 517 + (omap_rev() >> 8) & 0xf); 518 + pr_info("%s %s\n", soc_name, soc_rev); 532 519 } 533 520 534 521 void __init omap5xxx_check_revision(void) ··· 570 553 omap_revision = OMAP5430_REV_ES2_0; 571 554 } 572 555 573 - pr_info("OMAP%04x ES%d.0\n", 574 - omap_rev() >> 16, ((omap_rev() >> 12) & 0xf)); 556 + sprintf(soc_name, "OMAP%04x", omap_rev() >> 16); 557 + sprintf(soc_rev, "ES%d.0", (omap_rev() >> 12) & 0xf); 558 + 559 + pr_info("%s %s\n", soc_name, soc_rev); 575 560 } 576 561 577 562 /* ··· 594 575 else 595 576 tap_prod_id = 0x0208; 596 577 } 578 + 579 + #ifdef CONFIG_SOC_BUS 580 + 581 + static const char const *omap_types[] = { 582 + [OMAP2_DEVICE_TYPE_TEST] = "TST", 583 + [OMAP2_DEVICE_TYPE_EMU] = "EMU", 584 + [OMAP2_DEVICE_TYPE_SEC] = "HS", 585 + [OMAP2_DEVICE_TYPE_GP] = "GP", 586 + [OMAP2_DEVICE_TYPE_BAD] = "BAD", 587 + }; 588 + 589 + static const char * __init omap_get_family(void) 590 + { 591 + if (cpu_is_omap24xx()) 592 + return kasprintf(GFP_KERNEL, "OMAP2"); 593 + else if (cpu_is_omap34xx()) 594 + return kasprintf(GFP_KERNEL, "OMAP3"); 595 + else if (cpu_is_omap44xx()) 596 + return kasprintf(GFP_KERNEL, "OMAP4"); 597 + else if (soc_is_omap54xx()) 598 + return kasprintf(GFP_KERNEL, "OMAP5"); 599 + else 600 + return kasprintf(GFP_KERNEL, "Unknown"); 601 + } 602 + 603 + static ssize_t omap_get_type(struct device *dev, 604 + struct device_attribute *attr, 605 + char *buf) 606 + { 607 + return sprintf(buf, "%s\n", omap_types[omap_type()]); 608 + } 609 + 610 + static struct device_attribute omap_soc_attr = 611 + __ATTR(type, S_IRUGO, omap_get_type, NULL); 612 + 613 + void __init omap_soc_device_init(void) 614 + { 615 + struct device *parent; 616 + struct soc_device *soc_dev; 617 + struct soc_device_attribute *soc_dev_attr; 618 + 619 + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); 620 + if (!soc_dev_attr) 621 + return; 622 + 623 + soc_dev_attr->machine = soc_name; 624 + soc_dev_attr->family = omap_get_family(); 625 + soc_dev_attr->revision = soc_rev; 626 + 627 + soc_dev = soc_device_register(soc_dev_attr); 628 + if (IS_ERR_OR_NULL(soc_dev)) { 629 + kfree(soc_dev_attr); 630 + return; 631 + } 632 + 633 + parent = soc_device_to_device(soc_dev); 634 + if (!IS_ERR_OR_NULL(parent)) 635 + device_create_file(parent, &omap_soc_attr); 636 + } 637 + #endif /* CONFIG_SOC_BUS */
+16 -18
arch/arm/mach-omap2/io.c
··· 394 394 omap_pm_if_early_init(); 395 395 } 396 396 397 + static void __init omap_common_late_init(void) 398 + { 399 + omap_mux_late_init(); 400 + omap2_common_pm_late_init(); 401 + omap_soc_device_init(); 402 + } 403 + 397 404 #ifdef CONFIG_SOC_OMAP2420 398 405 void __init omap2420_init_early(void) 399 406 { ··· 424 417 425 418 void __init omap2420_init_late(void) 426 419 { 427 - omap_mux_late_init(); 428 - omap2_common_pm_late_init(); 420 + omap_common_late_init(); 429 421 omap2_pm_init(); 430 422 omap2_clk_enable_autoidle_all(); 431 423 } ··· 453 447 454 448 void __init omap2430_init_late(void) 455 449 { 456 - omap_mux_late_init(); 457 - omap2_common_pm_late_init(); 450 + omap_common_late_init(); 458 451 omap2_pm_init(); 459 452 omap2_clk_enable_autoidle_all(); 460 453 } ··· 525 520 526 521 void __init omap3_init_late(void) 527 522 { 528 - omap_mux_late_init(); 529 - omap2_common_pm_late_init(); 523 + omap_common_late_init(); 530 524 omap3_pm_init(); 531 525 omap2_clk_enable_autoidle_all(); 532 526 } 533 527 534 528 void __init omap3430_init_late(void) 535 529 { 536 - omap_mux_late_init(); 537 - omap2_common_pm_late_init(); 530 + omap_common_late_init(); 538 531 omap3_pm_init(); 539 532 omap2_clk_enable_autoidle_all(); 540 533 } 541 534 542 535 void __init omap35xx_init_late(void) 543 536 { 544 - omap_mux_late_init(); 545 - omap2_common_pm_late_init(); 537 + omap_common_late_init(); 546 538 omap3_pm_init(); 547 539 omap2_clk_enable_autoidle_all(); 548 540 } 549 541 550 542 void __init omap3630_init_late(void) 551 543 { 552 - omap_mux_late_init(); 553 - omap2_common_pm_late_init(); 544 + omap_common_late_init(); 554 545 omap3_pm_init(); 555 546 omap2_clk_enable_autoidle_all(); 556 547 } 557 548 558 549 void __init am35xx_init_late(void) 559 550 { 560 - omap_mux_late_init(); 561 - omap2_common_pm_late_init(); 551 + omap_common_late_init(); 562 552 omap3_pm_init(); 563 553 omap2_clk_enable_autoidle_all(); 564 554 } 565 555 566 556 void __init ti81xx_init_late(void) 567 557 { 568 - omap_mux_late_init(); 569 - omap2_common_pm_late_init(); 558 + omap_common_late_init(); 570 559 omap3_pm_init(); 571 560 omap2_clk_enable_autoidle_all(); 572 561 } ··· 612 613 613 614 void __init omap4430_init_late(void) 614 615 { 615 - omap_mux_late_init(); 616 - omap2_common_pm_late_init(); 616 + omap_common_late_init(); 617 617 omap4_pm_init(); 618 618 omap2_clk_enable_autoidle_all(); 619 619 }
+2
arch/arm/mach-omap2/omap_hwmod_2420_data.c
··· 610 610 &omap2420_l4_core__mcbsp2, 611 611 &omap2420_l4_core__msdi1, 612 612 &omap2xxx_l4_core__rng, 613 + &omap2xxx_l4_core__sham, 614 + &omap2xxx_l4_core__aes, 613 615 &omap2420_l4_core__hdq1w, 614 616 &omap2420_l4_wkup__counter_32k, 615 617 &omap2420_l3__gpmc,
+2
arch/arm/mach-omap2/omap_hwmod_2430_data.c
··· 963 963 &omap2430_l4_core__mcbsp5, 964 964 &omap2430_l4_core__hdq1w, 965 965 &omap2xxx_l4_core__rng, 966 + &omap2xxx_l4_core__sham, 967 + &omap2xxx_l4_core__aes, 966 968 &omap2430_l4_wkup__counter_32k, 967 969 &omap2430_l3__gpmc, 968 970 NULL,
+36
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
··· 138 138 { } 139 139 }; 140 140 141 + static struct omap_hwmod_addr_space omap2xxx_sham_addrs[] = { 142 + { 143 + .pa_start = 0x480a4000, 144 + .pa_end = 0x480a4000 + 0x64 - 1, 145 + .flags = ADDR_TYPE_RT 146 + }, 147 + { } 148 + }; 149 + 150 + static struct omap_hwmod_addr_space omap2xxx_aes_addrs[] = { 151 + { 152 + .pa_start = 0x480a6000, 153 + .pa_end = 0x480a6000 + 0x50 - 1, 154 + .flags = ADDR_TYPE_RT 155 + }, 156 + { } 157 + }; 158 + 141 159 /* 142 160 * Common interconnect data 143 161 */ ··· 405 387 .slave = &omap2xxx_rng_hwmod, 406 388 .clk = "rng_ick", 407 389 .addr = omap2_rng_addr_space, 390 + .user = OCP_USER_MPU | OCP_USER_SDMA, 391 + }; 392 + 393 + /* l4 core -> sham interface */ 394 + struct omap_hwmod_ocp_if omap2xxx_l4_core__sham = { 395 + .master = &omap2xxx_l4_core_hwmod, 396 + .slave = &omap2xxx_sham_hwmod, 397 + .clk = "sha_ick", 398 + .addr = omap2xxx_sham_addrs, 399 + .user = OCP_USER_MPU | OCP_USER_SDMA, 400 + }; 401 + 402 + /* l4 core -> aes interface */ 403 + struct omap_hwmod_ocp_if omap2xxx_l4_core__aes = { 404 + .master = &omap2xxx_l4_core_hwmod, 405 + .slave = &omap2xxx_aes_hwmod, 406 + .clk = "aes_ick", 407 + .addr = omap2xxx_aes_addrs, 408 408 .user = OCP_USER_MPU | OCP_USER_SDMA, 409 409 };
+81
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
··· 864 864 .flags = HWMOD_INIT_NO_RESET, 865 865 .class = &omap2_rng_hwmod_class, 866 866 }; 867 + 868 + /* SHAM */ 869 + 870 + static struct omap_hwmod_class_sysconfig omap2_sham_sysc = { 871 + .rev_offs = 0x5c, 872 + .sysc_offs = 0x60, 873 + .syss_offs = 0x64, 874 + .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | 875 + SYSS_HAS_RESET_STATUS), 876 + .sysc_fields = &omap_hwmod_sysc_type1, 877 + }; 878 + 879 + static struct omap_hwmod_class omap2xxx_sham_class = { 880 + .name = "sham", 881 + .sysc = &omap2_sham_sysc, 882 + }; 883 + 884 + static struct omap_hwmod_irq_info omap2_sham_mpu_irqs[] = { 885 + { .irq = 51 + OMAP_INTC_START, }, 886 + { .irq = -1 } 887 + }; 888 + 889 + static struct omap_hwmod_dma_info omap2_sham_sdma_chs[] = { 890 + { .name = "rx", .dma_req = 13 }, 891 + { .dma_req = -1 } 892 + }; 893 + 894 + struct omap_hwmod omap2xxx_sham_hwmod = { 895 + .name = "sham", 896 + .mpu_irqs = omap2_sham_mpu_irqs, 897 + .sdma_reqs = omap2_sham_sdma_chs, 898 + .main_clk = "l4_ck", 899 + .prcm = { 900 + .omap2 = { 901 + .module_offs = CORE_MOD, 902 + .prcm_reg_id = 4, 903 + .module_bit = OMAP24XX_EN_SHA_SHIFT, 904 + .idlest_reg_id = 4, 905 + .idlest_idle_bit = OMAP24XX_ST_SHA_SHIFT, 906 + }, 907 + }, 908 + .class = &omap2xxx_sham_class, 909 + }; 910 + 911 + /* AES */ 912 + 913 + static struct omap_hwmod_class_sysconfig omap2_aes_sysc = { 914 + .rev_offs = 0x44, 915 + .sysc_offs = 0x48, 916 + .syss_offs = 0x4c, 917 + .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | 918 + SYSS_HAS_RESET_STATUS), 919 + .sysc_fields = &omap_hwmod_sysc_type1, 920 + }; 921 + 922 + static struct omap_hwmod_class omap2xxx_aes_class = { 923 + .name = "aes", 924 + .sysc = &omap2_aes_sysc, 925 + }; 926 + 927 + static struct omap_hwmod_dma_info omap2_aes_sdma_chs[] = { 928 + { .name = "tx", .dma_req = 9 }, 929 + { .name = "rx", .dma_req = 10 }, 930 + { .dma_req = -1 } 931 + }; 932 + 933 + struct omap_hwmod omap2xxx_aes_hwmod = { 934 + .name = "aes", 935 + .sdma_reqs = omap2_aes_sdma_chs, 936 + .main_clk = "l4_ck", 937 + .prcm = { 938 + .omap2 = { 939 + .module_offs = CORE_MOD, 940 + .prcm_reg_id = 4, 941 + .module_bit = OMAP24XX_EN_AES_SHIFT, 942 + .idlest_reg_id = 4, 943 + .idlest_idle_bit = OMAP24XX_ST_AES_SHIFT, 944 + }, 945 + }, 946 + .class = &omap2xxx_aes_class, 947 + };
+78 -14
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
··· 418 418 * - clkdiv32k 419 419 * - debugss 420 420 * - ocp watch point 421 - * - aes0 422 - * - sha0 423 421 */ 424 422 #if 0 425 423 /* ··· 498 500 }, 499 501 }, 500 502 }; 503 + #endif 501 504 502 505 /* 503 - * 'aes' class 506 + * 'aes0' class 504 507 */ 505 - static struct omap_hwmod_class am33xx_aes_hwmod_class = { 506 - .name = "aes", 508 + static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = { 509 + .rev_offs = 0x80, 510 + .sysc_offs = 0x84, 511 + .syss_offs = 0x88, 512 + .sysc_flags = SYSS_HAS_RESET_STATUS, 513 + }; 514 + 515 + static struct omap_hwmod_class am33xx_aes0_hwmod_class = { 516 + .name = "aes0", 517 + .sysc = &am33xx_aes0_sysc, 507 518 }; 508 519 509 520 static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = { 510 - { .irq = 102 + OMAP_INTC_START, }, 521 + { .irq = 103 + OMAP_INTC_START, }, 511 522 { .irq = -1 }, 512 523 }; 513 524 525 + static struct omap_hwmod_dma_info am33xx_aes0_edma_reqs[] = { 526 + { .name = "tx", .dma_req = 6, }, 527 + { .name = "rx", .dma_req = 5, }, 528 + { .dma_req = -1 } 529 + }; 530 + 514 531 static struct omap_hwmod am33xx_aes0_hwmod = { 515 - .name = "aes0", 516 - .class = &am33xx_aes_hwmod_class, 532 + .name = "aes", 533 + .class = &am33xx_aes0_hwmod_class, 517 534 .clkdm_name = "l3_clkdm", 518 535 .mpu_irqs = am33xx_aes0_irqs, 519 - .main_clk = "l3_gclk", 536 + .sdma_reqs = am33xx_aes0_edma_reqs, 537 + .main_clk = "aes0_fck", 520 538 .prcm = { 521 539 .omap4 = { 522 540 .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET, ··· 541 527 }, 542 528 }; 543 529 544 - /* sha0 */ 530 + /* sha0 HIB2 (the 'P' (public) device) */ 531 + static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = { 532 + .rev_offs = 0x100, 533 + .sysc_offs = 0x110, 534 + .syss_offs = 0x114, 535 + .sysc_flags = SYSS_HAS_RESET_STATUS, 536 + }; 537 + 545 538 static struct omap_hwmod_class am33xx_sha0_hwmod_class = { 546 539 .name = "sha0", 540 + .sysc = &am33xx_sha0_sysc, 547 541 }; 548 542 549 543 static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = { 550 - { .irq = 108 + OMAP_INTC_START, }, 544 + { .irq = 109 + OMAP_INTC_START, }, 551 545 { .irq = -1 }, 552 546 }; 553 547 548 + static struct omap_hwmod_dma_info am33xx_sha0_edma_reqs[] = { 549 + { .name = "rx", .dma_req = 36, }, 550 + { .dma_req = -1 } 551 + }; 552 + 554 553 static struct omap_hwmod am33xx_sha0_hwmod = { 555 - .name = "sha0", 554 + .name = "sham", 556 555 .class = &am33xx_sha0_hwmod_class, 557 556 .clkdm_name = "l3_clkdm", 558 557 .mpu_irqs = am33xx_sha0_irqs, 558 + .sdma_reqs = am33xx_sha0_edma_reqs, 559 559 .main_clk = "l3_gclk", 560 560 .prcm = { 561 561 .omap4 = { ··· 578 550 }, 579 551 }, 580 552 }; 581 - 582 - #endif 583 553 584 554 /* ocmcram */ 585 555 static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = { ··· 3475 3449 .user = OCP_USER_MPU | OCP_USER_SDMA, 3476 3450 }; 3477 3451 3452 + /* l3 main -> sha0 HIB2 */ 3453 + static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = { 3454 + { 3455 + .pa_start = 0x53100000, 3456 + .pa_end = 0x53100000 + SZ_512 - 1, 3457 + .flags = ADDR_TYPE_RT 3458 + }, 3459 + { } 3460 + }; 3461 + 3462 + static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = { 3463 + .master = &am33xx_l3_main_hwmod, 3464 + .slave = &am33xx_sha0_hwmod, 3465 + .clk = "sha0_fck", 3466 + .addr = am33xx_sha0_addrs, 3467 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3468 + }; 3469 + 3470 + /* l3 main -> AES0 HIB2 */ 3471 + static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = { 3472 + { 3473 + .pa_start = 0x53500000, 3474 + .pa_end = 0x53500000 + SZ_1M - 1, 3475 + .flags = ADDR_TYPE_RT 3476 + }, 3477 + { } 3478 + }; 3479 + 3480 + static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = { 3481 + .master = &am33xx_l3_main_hwmod, 3482 + .slave = &am33xx_aes0_hwmod, 3483 + .clk = "aes0_fck", 3484 + .addr = am33xx_aes0_addrs, 3485 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3486 + }; 3487 + 3478 3488 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { 3479 3489 &am33xx_l4_fw__emif_fw, 3480 3490 &am33xx_l3_main__emif, ··· 3591 3529 &am33xx_l3_s__usbss, 3592 3530 &am33xx_l4_hs__cpgmac0, 3593 3531 &am33xx_cpgmac0__mdio, 3532 + &am33xx_l3_main__sha0, 3533 + &am33xx_l3_main__aes0, 3594 3534 NULL, 3595 3535 }; 3596 3536
+163 -9
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 3550 3550 .user = OCP_USER_MPU | OCP_USER_SDMA, 3551 3551 }; 3552 3552 3553 + /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */ 3554 + static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = { 3555 + .sidle_shift = 4, 3556 + .srst_shift = 1, 3557 + .autoidle_shift = 0, 3558 + }; 3559 + 3560 + static struct omap_hwmod_class_sysconfig omap3_sham_sysc = { 3561 + .rev_offs = 0x5c, 3562 + .sysc_offs = 0x60, 3563 + .syss_offs = 0x64, 3564 + .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 3565 + SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), 3566 + .sysc_fields = &omap3_sham_sysc_fields, 3567 + }; 3568 + 3569 + static struct omap_hwmod_class omap3xxx_sham_class = { 3570 + .name = "sham", 3571 + .sysc = &omap3_sham_sysc, 3572 + }; 3573 + 3574 + static struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = { 3575 + { .irq = 49 + OMAP_INTC_START, }, 3576 + { .irq = -1 } 3577 + }; 3578 + 3579 + static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = { 3580 + { .name = "rx", .dma_req = OMAP34XX_DMA_SHA1MD5_RX, }, 3581 + { .dma_req = -1 } 3582 + }; 3583 + 3584 + static struct omap_hwmod omap3xxx_sham_hwmod = { 3585 + .name = "sham", 3586 + .mpu_irqs = omap3_sham_mpu_irqs, 3587 + .sdma_reqs = omap3_sham_sdma_reqs, 3588 + .main_clk = "sha12_ick", 3589 + .prcm = { 3590 + .omap2 = { 3591 + .module_offs = CORE_MOD, 3592 + .prcm_reg_id = 1, 3593 + .module_bit = OMAP3430_EN_SHA12_SHIFT, 3594 + .idlest_reg_id = 1, 3595 + .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT, 3596 + }, 3597 + }, 3598 + .class = &omap3xxx_sham_class, 3599 + }; 3600 + 3601 + static struct omap_hwmod_addr_space omap3xxx_sham_addrs[] = { 3602 + { 3603 + .pa_start = 0x480c3000, 3604 + .pa_end = 0x480c3000 + 0x64 - 1, 3605 + .flags = ADDR_TYPE_RT 3606 + }, 3607 + { } 3608 + }; 3609 + 3610 + static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = { 3611 + .master = &omap3xxx_l4_core_hwmod, 3612 + .slave = &omap3xxx_sham_hwmod, 3613 + .clk = "sha12_ick", 3614 + .addr = omap3xxx_sham_addrs, 3615 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3616 + }; 3617 + 3618 + /* l4_core -> AES */ 3619 + static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = { 3620 + .sidle_shift = 6, 3621 + .srst_shift = 1, 3622 + .autoidle_shift = 0, 3623 + }; 3624 + 3625 + static struct omap_hwmod_class_sysconfig omap3_aes_sysc = { 3626 + .rev_offs = 0x44, 3627 + .sysc_offs = 0x48, 3628 + .syss_offs = 0x4c, 3629 + .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 3630 + SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), 3631 + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), 3632 + .sysc_fields = &omap3xxx_aes_sysc_fields, 3633 + }; 3634 + 3635 + static struct omap_hwmod_class omap3xxx_aes_class = { 3636 + .name = "aes", 3637 + .sysc = &omap3_aes_sysc, 3638 + }; 3639 + 3640 + static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = { 3641 + { .name = "tx", .dma_req = OMAP34XX_DMA_AES2_TX, }, 3642 + { .name = "rx", .dma_req = OMAP34XX_DMA_AES2_RX, }, 3643 + { .dma_req = -1 } 3644 + }; 3645 + 3646 + static struct omap_hwmod omap3xxx_aes_hwmod = { 3647 + .name = "aes", 3648 + .sdma_reqs = omap3_aes_sdma_reqs, 3649 + .main_clk = "aes2_ick", 3650 + .prcm = { 3651 + .omap2 = { 3652 + .module_offs = CORE_MOD, 3653 + .prcm_reg_id = 1, 3654 + .module_bit = OMAP3430_EN_AES2_SHIFT, 3655 + .idlest_reg_id = 1, 3656 + .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT, 3657 + }, 3658 + }, 3659 + .class = &omap3xxx_aes_class, 3660 + }; 3661 + 3662 + static struct omap_hwmod_addr_space omap3xxx_aes_addrs[] = { 3663 + { 3664 + .pa_start = 0x480c5000, 3665 + .pa_end = 0x480c5000 + 0x50 - 1, 3666 + .flags = ADDR_TYPE_RT 3667 + }, 3668 + { } 3669 + }; 3670 + 3671 + static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = { 3672 + .master = &omap3xxx_l4_core_hwmod, 3673 + .slave = &omap3xxx_aes_hwmod, 3674 + .clk = "aes2_ick", 3675 + .addr = omap3xxx_aes_addrs, 3676 + .user = OCP_USER_MPU | OCP_USER_SDMA, 3677 + }; 3678 + 3553 3679 static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { 3554 3680 &omap3xxx_l3_main__l4_core, 3555 3681 &omap3xxx_l3_main__l4_per, ··· 3727 3601 }; 3728 3602 3729 3603 /* GP-only hwmod links */ 3730 - static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = { 3604 + static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = { 3731 3605 &omap3xxx_l4_sec__timer12, 3606 + &omap3xxx_l4_core__sham, 3607 + &omap3xxx_l4_core__aes, 3608 + NULL 3609 + }; 3610 + 3611 + static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = { 3612 + &omap3xxx_l4_sec__timer12, 3613 + &omap3xxx_l4_core__sham, 3614 + &omap3xxx_l4_core__aes, 3615 + NULL 3616 + }; 3617 + 3618 + static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = { 3619 + &omap3xxx_l4_sec__timer12, 3620 + /* 3621 + * Apparently the SHA/MD5 and AES accelerator IP blocks are 3622 + * only present on some AM35xx chips, and no one knows which 3623 + * ones. See 3624 + * http://www.spinics.net/lists/arm-kernel/msg215466.html So 3625 + * if you need these IP blocks on an AM35xx, try uncommenting 3626 + * the following lines. 3627 + */ 3628 + /* &omap3xxx_l4_core__sham, */ 3629 + /* &omap3xxx_l4_core__aes, */ 3732 3630 NULL 3733 3631 }; 3734 3632 ··· 3859 3709 int __init omap3xxx_hwmod_init(void) 3860 3710 { 3861 3711 int r; 3862 - struct omap_hwmod_ocp_if **h = NULL; 3712 + struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL; 3863 3713 unsigned int rev; 3864 3714 3865 3715 omap_hwmod_init(); ··· 3868 3718 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs); 3869 3719 if (r < 0) 3870 3720 return r; 3871 - 3872 - /* Register GP-only hwmod links. */ 3873 - if (omap_type() == OMAP2_DEVICE_TYPE_GP) { 3874 - r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs); 3875 - if (r < 0) 3876 - return r; 3877 - } 3878 3721 3879 3722 rev = omap_rev(); 3880 3723 ··· 3880 3737 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || 3881 3738 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { 3882 3739 h = omap34xx_hwmod_ocp_ifs; 3740 + h_gp = omap34xx_gp_hwmod_ocp_ifs; 3883 3741 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) { 3884 3742 h = am35xx_hwmod_ocp_ifs; 3743 + h_gp = am35xx_gp_hwmod_ocp_ifs; 3885 3744 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || 3886 3745 rev == OMAP3630_REV_ES1_2) { 3887 3746 h = omap36xx_hwmod_ocp_ifs; 3747 + h_gp = omap36xx_gp_hwmod_ocp_ifs; 3888 3748 } else { 3889 3749 WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); 3890 3750 return -EINVAL; ··· 3896 3750 r = omap_hwmod_register_links(h); 3897 3751 if (r < 0) 3898 3752 return r; 3753 + 3754 + /* Register GP-only hwmod links. */ 3755 + if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) { 3756 + r = omap_hwmod_register_links(h_gp); 3757 + if (r < 0) 3758 + return r; 3759 + } 3760 + 3899 3761 3900 3762 /* 3901 3763 * Register hwmod links specific to certain ES levels of a
+4
arch/arm/mach-omap2/omap_hwmod_common_data.h
··· 78 78 extern struct omap_hwmod omap2xxx_counter_32k_hwmod; 79 79 extern struct omap_hwmod omap2xxx_gpmc_hwmod; 80 80 extern struct omap_hwmod omap2xxx_rng_hwmod; 81 + extern struct omap_hwmod omap2xxx_sham_hwmod; 82 + extern struct omap_hwmod omap2xxx_aes_hwmod; 81 83 82 84 /* Common interface data across OMAP2xxx */ 83 85 extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; ··· 107 105 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi; 108 106 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc; 109 107 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__rng; 108 + extern struct omap_hwmod_ocp_if omap2xxx_l4_core__sham; 109 + extern struct omap_hwmod_ocp_if omap2xxx_l4_core__aes; 110 110 111 111 /* Common IP block data */ 112 112 extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
+9 -1
arch/arm/mach-prima2/Kconfig
··· 1 1 if ARCH_SIRF 2 2 3 - menu "CSR SiRF primaII/Marco/Polo Specific Features" 3 + menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" 4 + 5 + config ARCH_ATLAS6 6 + bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform" 7 + default y 8 + select CPU_V7 9 + select SIRF_IRQ 10 + help 11 + Support for CSR SiRFSoC ARM Cortex A9 Platform 4 12 5 13 config ARCH_PRIMA2 6 14 bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
+21
arch/arm/mach-prima2/common.c
··· 37 37 sirfsoc_map_scu(); 38 38 } 39 39 40 + #ifdef CONFIG_ARCH_ATLAS6 41 + static const char *atlas6_dt_match[] __initdata = { 42 + "sirf,atlas6", 43 + NULL 44 + }; 45 + 46 + DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") 47 + /* Maintainer: Barry Song <baohua.song@csr.com> */ 48 + .map_io = sirfsoc_map_io, 49 + .init_irq = sirfsoc_of_irq_init, 50 + .init_time = sirfsoc_prima2_timer_init, 51 + #ifdef CONFIG_MULTI_IRQ_HANDLER 52 + .handle_irq = sirfsoc_handle_irq, 53 + #endif 54 + .init_machine = sirfsoc_mach_init, 55 + .init_late = sirfsoc_init_late, 56 + .dt_compat = atlas6_dt_match, 57 + .restart = sirfsoc_restart, 58 + MACHINE_END 59 + #endif 60 + 40 61 #ifdef CONFIG_ARCH_PRIMA2 41 62 static const char *prima2_dt_match[] __initdata = { 42 63 "sirf,prima2",
+1
arch/arm/mach-s3c64xx/dma.c
··· 509 509 chan->client = client; 510 510 chan->in_use = 1; 511 511 chan->peripheral = channel; 512 + chan->flags = 0; 512 513 513 514 local_irq_restore(flags); 514 515
+1
arch/arm/mach-s3c64xx/mach-crag6410-module.c
··· 210 210 .gpio_base = CODEC_GPIO_BASE, 211 211 .irq_active_high = true, 212 212 .micd_pol_gpio = CODEC_GPIO_BASE + 4, 213 + .micd_rate = 6, 213 214 .gpio_defaults = { 214 215 [2] = 0x10000, /* AIF3TXLRCLK */ 215 216 [3] = 0x4, /* OPCLK */
+3 -4
arch/arm/mach-shmobile/Makefile
··· 14 14 15 15 # SMP objects 16 16 smp-y := platsmp.o headsmp.o 17 - smp-$(CONFIG_HOTPLUG_CPU) += hotplug.o 18 - smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-sh73a0.o 19 - smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o 20 - smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o 17 + smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o 18 + smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o 19 + smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o 21 20 22 21 # IRQ objects 23 22 obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
+13
arch/arm/mach-shmobile/clock-r8a7740.c
··· 593 593 CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), 594 594 595 595 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), 596 + CLKDEV_DEV_ID("e6c80000.sci", &mstp_clks[MSTP200]), 596 597 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), 598 + CLKDEV_DEV_ID("e6c70000.sci", &mstp_clks[MSTP201]), 597 599 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), 600 + CLKDEV_DEV_ID("e6c60000.sci", &mstp_clks[MSTP202]), 598 601 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), 602 + CLKDEV_DEV_ID("e6c50000.sci", &mstp_clks[MSTP203]), 599 603 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), 604 + CLKDEV_DEV_ID("e6c40000.sci", &mstp_clks[MSTP204]), 600 605 CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), 606 + CLKDEV_DEV_ID("e6c30000.sci", &mstp_clks[MSTP206]), 601 607 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), 608 + CLKDEV_DEV_ID("e6cb0000.sci", &mstp_clks[MSTP207]), 602 609 CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), 603 610 CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), 604 611 CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), 605 612 CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), 606 613 CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP222]), 614 + CLKDEV_DEV_ID("e6cd0000.sci", &mstp_clks[MSTP222]), 607 615 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]), 616 + CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]), 608 617 609 618 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), 610 619 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), 611 620 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), 612 621 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]), 613 622 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), 623 + CLKDEV_DEV_ID("e6850000.sdhi", &mstp_clks[MSTP314]), 614 624 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), 625 + CLKDEV_DEV_ID("e6860000.sdhi", &mstp_clks[MSTP313]), 615 626 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]), 627 + CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), 616 628 CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP309]), 617 629 618 630 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), 631 + CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), 619 632 620 633 /* ICK */ 621 634 CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]),
+7 -1
arch/arm/mach-shmobile/clock-r8a7779.c
··· 87 87 }; 88 88 89 89 enum { MSTP323, MSTP322, MSTP321, MSTP320, 90 - MSTP101, MSTP100, 90 + MSTP115, 91 + MSTP103, MSTP101, MSTP100, 91 92 MSTP030, 92 93 MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, 93 94 MSTP016, MSTP015, MSTP014, ··· 100 99 [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ 101 100 [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ 102 101 [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ 102 + [MSTP115] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 15, 0), /* SATA */ 103 + [MSTP103] = SH_CLK_MSTP32(&div4_clks[DIV4_S], MSTPCR1, 3, 0), /* DU */ 103 104 [MSTP101] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 1, 0), /* USB2 */ 104 105 [MSTP100] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 0, 0), /* USB0/1 */ 105 106 [MSTP030] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 30, 0), /* I2C0 */ ··· 159 156 CLKDEV_CON_ID("peripheral_clk", &div4_clks[DIV4_P]), 160 157 161 158 /* MSTP32 clocks */ 159 + CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */ 160 + CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */ 162 161 CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */ 163 162 CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ 164 163 CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ ··· 185 180 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ 186 181 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ 187 182 CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ 183 + CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */ 188 184 }; 189 185 190 186 void __init r8a7779_clock_init(void)
+5 -2
arch/arm/mach-shmobile/clock-sh73a0.c
··· 265 265 266 266 static struct clk div4_clks[DIV4_NR] = { 267 267 [DIV4_I] = DIV4(FRQCRA, 20, 0xdff, CLK_ENABLE_ON_INIT), 268 - [DIV4_ZG] = DIV4(FRQCRA, 16, 0xd7f, CLK_ENABLE_ON_INIT), 268 + [DIV4_ZG] = SH_CLK_DIV4(&pll0_clk, FRQCRA, 16, 0xd7f, CLK_ENABLE_ON_INIT), 269 269 [DIV4_M3] = DIV4(FRQCRA, 12, 0x1dff, CLK_ENABLE_ON_INIT), 270 270 [DIV4_B] = DIV4(FRQCRA, 8, 0xdff, CLK_ENABLE_ON_INIT), 271 271 [DIV4_M1] = DIV4(FRQCRA, 4, 0x1dff, 0), 272 272 [DIV4_M2] = DIV4(FRQCRA, 0, 0x1dff, 0), 273 - [DIV4_Z] = DIV4(FRQCRB, 24, 0x97f, 0), 273 + [DIV4_Z] = SH_CLK_DIV4(&pll0_clk, FRQCRB, 24, 0x97f, 0), 274 274 [DIV4_ZTR] = DIV4(FRQCRB, 20, 0xdff, 0), 275 275 [DIV4_ZT] = DIV4(FRQCRB, 16, 0xdff, 0), 276 276 [DIV4_ZX] = DIV4(FRQCRB, 12, 0xdff, 0), ··· 581 581 CLKDEV_DEV_ID("e6822000.i2c", &mstp_clks[MSTP323]), /* I2C1 */ 582 582 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP322]), /* USB */ 583 583 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ 584 + CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), /* SDHI0 */ 584 585 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ 586 + CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), /* SDHI1 */ 585 587 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ 586 588 CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMCIF0 */ 587 589 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */ 590 + CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP311]), /* SDHI2 */ 588 591 CLKDEV_DEV_ID("leds-renesas-tpu.12", &mstp_clks[MSTP303]), /* TPU1 */ 589 592 CLKDEV_DEV_ID("leds-renesas-tpu.21", &mstp_clks[MSTP302]), /* TPU2 */ 590 593 CLKDEV_DEV_ID("leds-renesas-tpu.30", &mstp_clks[MSTP301]), /* TPU3 */
+11 -4
arch/arm/mach-shmobile/headsmp-sh73a0.S arch/arm/mach-shmobile/headsmp-scu.S
··· 1 1 /* 2 - * SMP support for SoC sh73a0 2 + * Shared SCU setup for mach-shmobile 3 3 * 4 4 * Copyright (C) 2012 Bastian Hecht 5 5 * ··· 35 35 * the physical address as the MMU is still turned off. 36 36 */ 37 37 .align 12 38 - ENTRY(sh73a0_secondary_vector) 38 + ENTRY(shmobile_secondary_vector_scu) 39 39 mrc p15, 0, r0, c0, c0, 5 @ read MIPDR 40 40 and r0, r0, #3 @ mask out cpu ID 41 41 lsl r0, r0, #3 @ we will shift by cpu_id * 8 bits 42 - mov r1, #0xf0000000 @ SCU base address 42 + ldr r1, 2f 43 + ldr r1, [r1] @ SCU base address 43 44 ldr r2, [r1, #8] @ SCU Power Status Register 44 45 mov r3, #3 45 46 bic r2, r2, r3, lsl r0 @ Clear bits of our CPU (Run Mode) ··· 48 47 49 48 ldr pc, 1f 50 49 1: .long shmobile_invalidate_start - PAGE_OFFSET + PLAT_PHYS_OFFSET 51 - ENDPROC(sh73a0_secondary_vector) 50 + 2: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET 51 + ENDPROC(shmobile_secondary_vector_scu) 52 + 53 + .text 54 + .globl shmobile_scu_base 55 + shmobile_scu_base: 56 + .space 4
-68
arch/arm/mach-shmobile/hotplug.c
··· 1 - /* 2 - * SMP support for R-Mobile / SH-Mobile 3 - * 4 - * Copyright (C) 2010 Magnus Damm 5 - * 6 - * Based on realview, Copyright (C) 2002 ARM Ltd, All Rights Reserved 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 version 2 as 10 - * published by the Free Software Foundation. 11 - */ 12 - #include <linux/kernel.h> 13 - #include <linux/errno.h> 14 - #include <linux/smp.h> 15 - #include <linux/cpumask.h> 16 - #include <linux/delay.h> 17 - #include <linux/of.h> 18 - #include <mach/common.h> 19 - #include <mach/r8a7779.h> 20 - #include <mach/emev2.h> 21 - #include <asm/cacheflush.h> 22 - #include <asm/mach-types.h> 23 - 24 - static cpumask_t dead_cpus; 25 - 26 - void shmobile_cpu_die(unsigned int cpu) 27 - { 28 - /* hardware shutdown code running on the CPU that is being offlined */ 29 - flush_cache_all(); 30 - dsb(); 31 - 32 - /* notify platform_cpu_kill() that hardware shutdown is finished */ 33 - cpumask_set_cpu(cpu, &dead_cpus); 34 - 35 - /* wait for SoC code in platform_cpu_kill() to shut off CPU core 36 - * power. CPU bring up starts from the reset vector. 37 - */ 38 - while (1) { 39 - /* 40 - * here's the WFI 41 - */ 42 - asm(".word 0xe320f003\n" 43 - : 44 - : 45 - : "memory", "cc"); 46 - } 47 - } 48 - 49 - int shmobile_cpu_disable(unsigned int cpu) 50 - { 51 - cpumask_clear_cpu(cpu, &dead_cpus); 52 - /* 53 - * we don't allow CPU 0 to be shutdown (it is still too special 54 - * e.g. clock tick interrupts) 55 - */ 56 - return cpu == 0 ? -EPERM : 0; 57 - } 58 - 59 - int shmobile_cpu_disable_any(unsigned int cpu) 60 - { 61 - cpumask_clear_cpu(cpu, &dead_cpus); 62 - return 0; 63 - } 64 - 65 - int shmobile_cpu_is_dead(unsigned int cpu) 66 - { 67 - return cpumask_test_cpu(cpu, &dead_cpus); 68 - }
+7 -14
arch/arm/mach-shmobile/include/mach/common.h
··· 8 8 struct twd_local_timer; 9 9 extern void shmobile_setup_console(void); 10 10 extern void shmobile_secondary_vector(void); 11 + extern void shmobile_secondary_vector_scu(void); 11 12 struct clk; 12 13 extern int shmobile_clk_init(void); 13 14 extern void shmobile_handle_irq_intc(struct pt_regs *); ··· 31 30 extern struct clk sh7372_extal1_clk; 32 31 extern struct clk sh7372_extal2_clk; 33 32 33 + extern void sh73a0_init_delay(void); 34 34 extern void sh73a0_init_irq(void); 35 35 extern void sh73a0_init_irq_dt(void); 36 36 extern void sh73a0_map_io(void); 37 37 extern void sh73a0_earlytimer_init(void); 38 38 extern void sh73a0_add_early_devices(void); 39 - extern void sh73a0_add_early_devices_dt(void); 40 39 extern void sh73a0_add_standard_devices(void); 41 40 extern void sh73a0_add_standard_devices_dt(void); 42 41 extern void sh73a0_clock_init(void); 43 42 extern void sh73a0_pinmux_init(void); 44 43 extern void sh73a0_pm_init(void); 45 - extern void sh73a0_secondary_vector(void); 46 44 extern struct clk sh73a0_extal1_clk; 47 45 extern struct clk sh73a0_extal2_clk; 48 46 extern struct clk sh73a0_extcki_clk; 49 47 extern struct clk sh73a0_extalr_clk; 50 48 49 + extern void r8a7740_meram_workaround(void); 51 50 extern void r8a7740_init_irq(void); 52 51 extern void r8a7740_map_io(void); 53 52 extern void r8a7740_add_early_devices(void); ··· 56 55 extern void r8a7740_pinmux_init(void); 57 56 extern void r8a7740_pm_init(void); 58 57 58 + extern void r8a7779_init_delay(void); 59 59 extern void r8a7779_init_irq(void); 60 + extern void r8a7779_init_irq_dt(void); 60 61 extern void r8a7779_map_io(void); 61 62 extern void r8a7779_earlytimer_init(void); 62 63 extern void r8a7779_add_early_devices(void); 63 64 extern void r8a7779_add_standard_devices(void); 65 + extern void r8a7779_add_standard_devices_dt(void); 64 66 extern void r8a7779_clock_init(void); 65 67 extern void r8a7779_pinmux_init(void); 66 68 extern void r8a7779_pm_init(void); 67 - extern void r8a7740_meram_workaround(void); 68 - 69 69 extern void r8a7779_register_twd(void); 70 70 71 71 #ifdef CONFIG_SUSPEND ··· 81 79 static inline int shmobile_cpuidle_init(void) { return 0; } 82 80 #endif 83 81 84 - extern void shmobile_cpu_die(unsigned int cpu); 85 - extern int shmobile_cpu_disable(unsigned int cpu); 86 - extern int shmobile_cpu_disable_any(unsigned int cpu); 87 - 88 - #ifdef CONFIG_HOTPLUG_CPU 89 - extern int shmobile_cpu_is_dead(unsigned int cpu); 90 - #else 91 - static inline int shmobile_cpu_is_dead(unsigned int cpu) { return 1; } 92 - #endif 93 - 82 + extern void __iomem *shmobile_scu_base; 94 83 extern void shmobile_smp_init_cpus(unsigned int ncores); 95 84 96 85 static inline void __init shmobile_init_late(void)
+1
arch/arm/mach-shmobile/include/mach/irqs.h
··· 5 5 6 6 /* GIC */ 7 7 #define gic_spi(nr) ((nr) + 32) 8 + #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */ 8 9 9 10 /* INTCS */ 10 11 #define INTCS_VECT_BASE 0x3400
+21 -6
arch/arm/mach-shmobile/intc-r8a7779.c
··· 24 24 #include <linux/io.h> 25 25 #include <linux/irqchip/arm-gic.h> 26 26 #include <mach/common.h> 27 + #include <linux/irqchip.h> 27 28 #include <mach/intc.h> 28 29 #include <mach/r8a7779.h> 29 30 #include <asm/mach-types.h> ··· 44 43 return 0; /* always allow wakeup */ 45 44 } 46 45 47 - void __init r8a7779_init_irq(void) 46 + static void __init r8a7779_init_irq_common(void) 48 47 { 49 - void __iomem *gic_dist_base = IOMEM(0xf0001000); 50 - void __iomem *gic_cpu_base = IOMEM(0xf0000100); 51 - 52 - /* use GIC to handle interrupts */ 53 - gic_init(0, 29, gic_dist_base, gic_cpu_base); 54 48 gic_arch_extn.irq_set_wake = r8a7779_set_wake; 55 49 56 50 /* route all interrupts to ARM */ ··· 59 63 __raw_writel(0xbffffffc, INT2SMSKCR3); 60 64 __raw_writel(0x003fee3f, INT2SMSKCR4); 61 65 } 66 + 67 + void __init r8a7779_init_irq(void) 68 + { 69 + void __iomem *gic_dist_base = IOMEM(0xf0001000); 70 + void __iomem *gic_cpu_base = IOMEM(0xf0000100); 71 + 72 + /* use GIC to handle interrupts */ 73 + gic_init(0, 29, gic_dist_base, gic_cpu_base); 74 + 75 + r8a7779_init_irq_common(); 76 + } 77 + 78 + #ifdef CONFIG_OF 79 + void __init r8a7779_init_irq_dt(void) 80 + { 81 + irqchip_init(); 82 + r8a7779_init_irq_common(); 83 + } 84 + #endif
-8
arch/arm/mach-shmobile/intc-sh73a0.c
··· 460 460 sh73a0_pint1_cascade.handler = sh73a0_pint1_demux; 461 461 setup_irq(gic_spi(34), &sh73a0_pint1_cascade); 462 462 } 463 - 464 - #ifdef CONFIG_OF 465 - void __init sh73a0_init_irq_dt(void) 466 - { 467 - irqchip_init(); 468 - gic_arch_extn.irq_set_wake = sh73a0_set_wake; 469 - } 470 - #endif
+2 -2
arch/arm/mach-shmobile/setup-emev2.c
··· 404 404 ARRAY_SIZE(emev2_late_devices)); 405 405 } 406 406 407 - void __init emev2_init_delay(void) 407 + static void __init emev2_init_delay(void) 408 408 { 409 409 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ 410 410 } ··· 439 439 { } 440 440 }; 441 441 442 - void __init emev2_add_standard_devices_dt(void) 442 + static void __init emev2_add_standard_devices_dt(void) 443 443 { 444 444 of_platform_populate(NULL, of_default_bus_match_table, 445 445 emev2_auxdata_lookup, NULL);
+84 -20
arch/arm/mach-shmobile/setup-r8a7779.c
··· 21 21 #include <linux/init.h> 22 22 #include <linux/interrupt.h> 23 23 #include <linux/irq.h> 24 + #include <linux/of_platform.h> 24 25 #include <linux/platform_device.h> 25 26 #include <linux/delay.h> 26 27 #include <linux/input.h> ··· 29 28 #include <linux/serial_sci.h> 30 29 #include <linux/sh_intc.h> 31 30 #include <linux/sh_timer.h> 31 + #include <linux/dma-mapping.h> 32 32 #include <mach/hardware.h> 33 33 #include <mach/irqs.h> 34 34 #include <mach/r8a7779.h> ··· 93 91 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 94 92 .scbrr_algo_id = SCBRR_ALGO_2, 95 93 .type = PORT_SCIF, 96 - .irqs = SCIx_IRQ_MUXED(gic_spi(88)), 94 + .irqs = SCIx_IRQ_MUXED(gic_iid(0x78)), 97 95 }; 98 96 99 97 static struct platform_device scif0_device = { ··· 110 108 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 111 109 .scbrr_algo_id = SCBRR_ALGO_2, 112 110 .type = PORT_SCIF, 113 - .irqs = SCIx_IRQ_MUXED(gic_spi(89)), 111 + .irqs = SCIx_IRQ_MUXED(gic_iid(0x79)), 114 112 }; 115 113 116 114 static struct platform_device scif1_device = { ··· 127 125 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 128 126 .scbrr_algo_id = SCBRR_ALGO_2, 129 127 .type = PORT_SCIF, 130 - .irqs = SCIx_IRQ_MUXED(gic_spi(90)), 128 + .irqs = SCIx_IRQ_MUXED(gic_iid(0x7a)), 131 129 }; 132 130 133 131 static struct platform_device scif2_device = { ··· 144 142 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 145 143 .scbrr_algo_id = SCBRR_ALGO_2, 146 144 .type = PORT_SCIF, 147 - .irqs = SCIx_IRQ_MUXED(gic_spi(91)), 145 + .irqs = SCIx_IRQ_MUXED(gic_iid(0x7b)), 148 146 }; 149 147 150 148 static struct platform_device scif3_device = { ··· 161 159 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 162 160 .scbrr_algo_id = SCBRR_ALGO_2, 163 161 .type = PORT_SCIF, 164 - .irqs = SCIx_IRQ_MUXED(gic_spi(92)), 162 + .irqs = SCIx_IRQ_MUXED(gic_iid(0x7c)), 165 163 }; 166 164 167 165 static struct platform_device scif4_device = { ··· 178 176 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, 179 177 .scbrr_algo_id = SCBRR_ALGO_2, 180 178 .type = PORT_SCIF, 181 - .irqs = SCIx_IRQ_MUXED(gic_spi(93)), 179 + .irqs = SCIx_IRQ_MUXED(gic_iid(0x7d)), 182 180 }; 183 181 184 182 static struct platform_device scif5_device = { ··· 205 203 .flags = IORESOURCE_MEM, 206 204 }, 207 205 [1] = { 208 - .start = gic_spi(32), 206 + .start = gic_iid(0x40), 209 207 .flags = IORESOURCE_IRQ, 210 208 }, 211 209 }; ··· 235 233 .flags = IORESOURCE_MEM, 236 234 }, 237 235 [1] = { 238 - .start = gic_spi(33), 236 + .start = gic_iid(0x41), 239 237 .flags = IORESOURCE_IRQ, 240 238 }, 241 239 }; ··· 257 255 .end = 0xffc70fff, 258 256 .flags = IORESOURCE_MEM, 259 257 }, { 260 - .start = gic_spi(79), 258 + .start = gic_iid(0x6f), 261 259 .flags = IORESOURCE_IRQ, 262 260 }, 263 261 }; ··· 275 273 .end = 0xffc71fff, 276 274 .flags = IORESOURCE_MEM, 277 275 }, { 278 - .start = gic_spi(82), 276 + .start = gic_iid(0x72), 279 277 .flags = IORESOURCE_IRQ, 280 278 }, 281 279 }; ··· 293 291 .end = 0xffc72fff, 294 292 .flags = IORESOURCE_MEM, 295 293 }, { 296 - .start = gic_spi(80), 294 + .start = gic_iid(0x70), 297 295 .flags = IORESOURCE_IRQ, 298 296 }, 299 297 }; ··· 311 309 .end = 0xffc73fff, 312 310 .flags = IORESOURCE_MEM, 313 311 }, { 314 - .start = gic_spi(81), 312 + .start = gic_iid(0x71), 315 313 .flags = IORESOURCE_IRQ, 316 314 }, 317 315 }; ··· 323 321 .num_resources = ARRAY_SIZE(rcar_i2c3_res), 324 322 }; 325 323 326 - static struct platform_device *r8a7779_early_devices[] __initdata = { 324 + static struct resource sata_resources[] = { 325 + [0] = { 326 + .name = "rcar-sata", 327 + .start = 0xfc600000, 328 + .end = 0xfc601fff, 329 + .flags = IORESOURCE_MEM, 330 + }, 331 + [1] = { 332 + .start = gic_iid(0x84), 333 + .flags = IORESOURCE_IRQ, 334 + }, 335 + }; 336 + 337 + static struct platform_device sata_device = { 338 + .name = "sata_rcar", 339 + .id = -1, 340 + .resource = sata_resources, 341 + .num_resources = ARRAY_SIZE(sata_resources), 342 + .dev = { 343 + .dma_mask = &sata_device.dev.coherent_dma_mask, 344 + .coherent_dma_mask = DMA_BIT_MASK(32), 345 + }, 346 + }; 347 + 348 + static struct platform_device *r8a7779_devices_dt[] __initdata = { 327 349 &scif0_device, 328 350 &scif1_device, 329 351 &scif2_device, ··· 356 330 &scif5_device, 357 331 &tmu00_device, 358 332 &tmu01_device, 333 + }; 334 + 335 + static struct platform_device *r8a7779_late_devices[] __initdata = { 359 336 &i2c0_device, 360 337 &i2c1_device, 361 338 &i2c2_device, 362 339 &i2c3_device, 363 - }; 364 - 365 - static struct platform_device *r8a7779_late_devices[] __initdata = { 340 + &sata_device, 366 341 }; 367 342 368 343 void __init r8a7779_add_standard_devices(void) ··· 376 349 377 350 r8a7779_init_pm_domains(); 378 351 379 - platform_add_devices(r8a7779_early_devices, 380 - ARRAY_SIZE(r8a7779_early_devices)); 352 + platform_add_devices(r8a7779_devices_dt, 353 + ARRAY_SIZE(r8a7779_devices_dt)); 381 354 platform_add_devices(r8a7779_late_devices, 382 355 ARRAY_SIZE(r8a7779_late_devices)); 383 356 } ··· 394 367 395 368 void __init r8a7779_add_early_devices(void) 396 369 { 397 - early_platform_add_devices(r8a7779_early_devices, 398 - ARRAY_SIZE(r8a7779_early_devices)); 370 + early_platform_add_devices(r8a7779_devices_dt, 371 + ARRAY_SIZE(r8a7779_devices_dt)); 399 372 400 373 /* Early serial console setup is not included here due to 401 374 * memory map collisions. The SCIF serial ports in r8a7779 ··· 413 386 * command line in case of the marzen board. 414 387 */ 415 388 } 389 + 390 + #ifdef CONFIG_USE_OF 391 + void __init r8a7779_init_delay(void) 392 + { 393 + shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ 394 + } 395 + 396 + static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = { 397 + {}, 398 + }; 399 + 400 + void __init r8a7779_add_standard_devices_dt(void) 401 + { 402 + /* clocks are setup late during boot in the case of DT */ 403 + r8a7779_clock_init(); 404 + 405 + platform_add_devices(r8a7779_devices_dt, 406 + ARRAY_SIZE(r8a7779_devices_dt)); 407 + of_platform_populate(NULL, of_default_bus_match_table, 408 + r8a7779_auxdata_lookup, NULL); 409 + } 410 + 411 + static const char *r8a7779_compat_dt[] __initdata = { 412 + "renesas,r8a7779", 413 + NULL, 414 + }; 415 + 416 + DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") 417 + .map_io = r8a7779_map_io, 418 + .init_early = r8a7779_init_delay, 419 + .nr_irqs = NR_IRQS_LEGACY, 420 + .init_irq = r8a7779_init_irq_dt, 421 + .init_machine = r8a7779_add_standard_devices_dt, 422 + .init_time = shmobile_timer_init, 423 + .dt_compat = r8a7779_compat_dt, 424 + MACHINE_END 425 + #endif /* CONFIG_USE_OF */
+12 -24
arch/arm/mach-shmobile/setup-sh73a0.c
··· 22 22 #include <linux/init.h> 23 23 #include <linux/interrupt.h> 24 24 #include <linux/irq.h> 25 + #include <linux/irqchip.h> 25 26 #include <linux/platform_device.h> 26 27 #include <linux/of_platform.h> 27 28 #include <linux/delay.h> ··· 811 810 .num_resources = ARRAY_SIZE(ipmmu_resources), 812 811 }; 813 812 814 - static struct platform_device *sh73a0_early_devices_dt[] __initdata = { 813 + static struct platform_device *sh73a0_devices_dt[] __initdata = { 815 814 &scif0_device, 816 815 &scif1_device, 817 816 &scif2_device, ··· 848 847 /* Clear software reset bit on SY-DMAC module */ 849 848 __raw_writel(__raw_readl(SRCR2) & ~(1 << 18), SRCR2); 850 849 851 - platform_add_devices(sh73a0_early_devices_dt, 852 - ARRAY_SIZE(sh73a0_early_devices_dt)); 850 + platform_add_devices(sh73a0_devices_dt, 851 + ARRAY_SIZE(sh73a0_devices_dt)); 853 852 platform_add_devices(sh73a0_early_devices, 854 853 ARRAY_SIZE(sh73a0_early_devices)); 855 854 platform_add_devices(sh73a0_late_devices, ··· 868 867 869 868 void __init sh73a0_add_early_devices(void) 870 869 { 871 - early_platform_add_devices(sh73a0_early_devices_dt, 872 - ARRAY_SIZE(sh73a0_early_devices_dt)); 870 + early_platform_add_devices(sh73a0_devices_dt, 871 + ARRAY_SIZE(sh73a0_devices_dt)); 873 872 early_platform_add_devices(sh73a0_early_devices, 874 873 ARRAY_SIZE(sh73a0_early_devices)); 875 874 ··· 879 878 880 879 #ifdef CONFIG_USE_OF 881 880 882 - /* Please note that the clock initialisation shcheme used in 883 - * sh73a0_add_early_devices_dt() and sh73a0_add_standard_devices_dt() 884 - * does not work with SMP as there is a yet to be resolved lock-up in 885 - * workqueue initialisation. 886 - * 887 - * CONFIG_SMP should be disabled when using this code. 888 - */ 889 - 890 - void __init sh73a0_add_early_devices_dt(void) 881 + void __init sh73a0_init_delay(void) 891 882 { 892 883 shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */ 893 - 894 - early_platform_add_devices(sh73a0_early_devices_dt, 895 - ARRAY_SIZE(sh73a0_early_devices_dt)); 896 - 897 - /* setup early console here as well */ 898 - shmobile_setup_console(); 899 884 } 900 885 901 886 static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { ··· 893 906 /* clocks are setup late during boot in the case of DT */ 894 907 sh73a0_clock_init(); 895 908 896 - platform_add_devices(sh73a0_early_devices_dt, 897 - ARRAY_SIZE(sh73a0_early_devices_dt)); 909 + platform_add_devices(sh73a0_devices_dt, 910 + ARRAY_SIZE(sh73a0_devices_dt)); 898 911 of_platform_populate(NULL, of_default_bus_match_table, 899 912 sh73a0_auxdata_lookup, NULL); 900 913 } ··· 905 918 }; 906 919 907 920 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") 921 + .smp = smp_ops(sh73a0_smp_ops), 908 922 .map_io = sh73a0_map_io, 909 - .init_early = sh73a0_add_early_devices_dt, 923 + .init_early = sh73a0_init_delay, 910 924 .nr_irqs = NR_IRQS_LEGACY, 911 - .init_irq = sh73a0_init_irq_dt, 925 + .init_irq = irqchip_init, 912 926 .init_machine = sh73a0_add_standard_devices_dt, 913 927 .init_time = shmobile_timer_init, 914 928 .dt_compat = sh73a0_boards_compat_dt,
+13 -73
arch/arm/mach-shmobile/smp-emev2.c
··· 27 27 #include <mach/emev2.h> 28 28 #include <asm/smp_plat.h> 29 29 #include <asm/smp_scu.h> 30 - #include <asm/cacheflush.h> 31 30 32 31 #define EMEV2_SCU_BASE 0x1e000000 33 32 34 - static DEFINE_SPINLOCK(scu_lock); 35 - static void __iomem *scu_base; 36 - 37 - static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) 38 - { 39 - unsigned long tmp; 40 - 41 - /* we assume this code is running on a different cpu 42 - * than the one that is changing coherency setting */ 43 - spin_lock(&scu_lock); 44 - tmp = readl(scu_base + 8); 45 - tmp &= ~clr; 46 - tmp |= set; 47 - writel(tmp, scu_base + 8); 48 - spin_unlock(&scu_lock); 49 - 50 - } 51 - 52 - static unsigned int __init emev2_get_core_count(void) 53 - { 54 - if (!scu_base) { 55 - scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); 56 - emev2_clock_init(); /* need ioremapped SMU */ 57 - } 58 - 59 - WARN_ON_ONCE(!scu_base); 60 - 61 - return scu_base ? scu_get_core_count(scu_base) : 1; 62 - } 63 - 64 - static int emev2_platform_cpu_kill(unsigned int cpu) 65 - { 66 - return 0; /* not supported yet */ 67 - } 68 - 69 - static int __maybe_unused emev2_cpu_kill(unsigned int cpu) 70 - { 71 - int k; 72 - 73 - /* this function is running on another CPU than the offline target, 74 - * here we need wait for shutdown code in platform_cpu_die() to 75 - * finish before asking SoC-specific code to power off the CPU core. 76 - */ 77 - for (k = 0; k < 1000; k++) { 78 - if (shmobile_cpu_is_dead(cpu)) 79 - return emev2_platform_cpu_kill(cpu); 80 - mdelay(1); 81 - } 82 - 83 - return 0; 84 - } 85 - 86 - 87 33 static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) 88 34 { 89 - cpu = cpu_logical_map(cpu); 90 - 91 - /* enable cache coherency */ 92 - modify_scu_cpu_psr(0, 3 << (cpu * 8)); 93 - 94 - /* Tell ROM loader about our vector (in headsmp.S) */ 95 - emev2_set_boot_vector(__pa(shmobile_secondary_vector)); 96 - 97 - arch_send_wakeup_ipi_mask(cpumask_of(cpu)); 35 + arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu))); 98 36 return 0; 99 37 } 100 38 101 39 static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) 102 40 { 103 - int cpu = cpu_logical_map(0); 41 + scu_enable(shmobile_scu_base); 104 42 105 - scu_enable(scu_base); 43 + /* Tell ROM loader about our vector (in headsmp-scu.S) */ 44 + emev2_set_boot_vector(__pa(shmobile_secondary_vector_scu)); 106 45 107 - /* enable cache coherency on CPU0 */ 108 - modify_scu_cpu_psr(0, 3 << (cpu * 8)); 46 + /* enable cache coherency on booting CPU */ 47 + scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 109 48 } 110 49 111 50 static void __init emev2_smp_init_cpus(void) 112 51 { 113 - unsigned int ncores = emev2_get_core_count(); 52 + unsigned int ncores; 53 + 54 + /* setup EMEV2 specific SCU base */ 55 + shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); 56 + emev2_clock_init(); /* need ioremapped SMU */ 57 + 58 + ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1; 114 59 115 60 shmobile_smp_init_cpus(ncores); 116 61 } ··· 64 119 .smp_init_cpus = emev2_smp_init_cpus, 65 120 .smp_prepare_cpus = emev2_smp_prepare_cpus, 66 121 .smp_boot_secondary = emev2_boot_secondary, 67 - #ifdef CONFIG_HOTPLUG_CPU 68 - .cpu_kill = emev2_cpu_kill, 69 - .cpu_die = shmobile_cpu_die, 70 - .cpu_disable = shmobile_cpu_disable, 71 - #endif 72 122 };
+62 -67
arch/arm/mach-shmobile/smp-r8a7779.c
··· 25 25 #include <linux/delay.h> 26 26 #include <mach/common.h> 27 27 #include <mach/r8a7779.h> 28 + #include <asm/cacheflush.h> 28 29 #include <asm/smp_plat.h> 29 30 #include <asm/smp_scu.h> 30 31 #include <asm/smp_twd.h> 31 32 32 33 #define AVECR IOMEM(0xfe700040) 34 + #define R8A7779_SCU_BASE 0xf0000000 33 35 34 36 static struct r8a7779_pm_ch r8a7779_ch_cpu1 = { 35 37 .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */ ··· 57 55 [3] = &r8a7779_ch_cpu3, 58 56 }; 59 57 60 - static void __iomem *scu_base_addr(void) 61 - { 62 - return (void __iomem *)0xf0000000; 63 - } 64 - 65 - static DEFINE_SPINLOCK(scu_lock); 66 - static unsigned long tmp; 67 - 68 58 #ifdef CONFIG_HAVE_ARM_TWD 69 - static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); 70 - 59 + static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, R8A7779_SCU_BASE + 0x600, 29); 71 60 void __init r8a7779_register_twd(void) 72 61 { 73 62 twd_local_timer_register(&twd_local_timer); 74 63 } 75 64 #endif 76 - 77 - static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) 78 - { 79 - void __iomem *scu_base = scu_base_addr(); 80 - 81 - spin_lock(&scu_lock); 82 - tmp = __raw_readl(scu_base + 8); 83 - tmp &= ~clr; 84 - tmp |= set; 85 - spin_unlock(&scu_lock); 86 - 87 - /* disable cache coherency after releasing the lock */ 88 - __raw_writel(tmp, scu_base + 8); 89 - } 90 - 91 - static unsigned int __init r8a7779_get_core_count(void) 92 - { 93 - void __iomem *scu_base = scu_base_addr(); 94 - 95 - return scu_get_core_count(scu_base); 96 - } 97 65 98 66 static int r8a7779_platform_cpu_kill(unsigned int cpu) 99 67 { ··· 71 99 int ret = -EIO; 72 100 73 101 cpu = cpu_logical_map(cpu); 74 - 75 - /* disable cache coherency */ 76 - modify_scu_cpu_psr(3 << (cpu * 8), 0); 77 102 78 103 if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) 79 104 ch = r8a7779_ch_cpu[cpu]; ··· 81 112 return ret ? ret : 1; 82 113 } 83 114 84 - static int __maybe_unused r8a7779_cpu_kill(unsigned int cpu) 85 - { 86 - int k; 87 - 88 - /* this function is running on another CPU than the offline target, 89 - * here we need wait for shutdown code in platform_cpu_die() to 90 - * finish before asking SoC-specific code to power off the CPU core. 91 - */ 92 - for (k = 0; k < 1000; k++) { 93 - if (shmobile_cpu_is_dead(cpu)) 94 - return r8a7779_platform_cpu_kill(cpu); 95 - 96 - mdelay(1); 97 - } 98 - 99 - return 0; 100 - } 101 - 102 - 103 115 static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle) 104 116 { 105 117 struct r8a7779_pm_ch *ch = NULL; 106 118 int ret = -EIO; 107 119 108 120 cpu = cpu_logical_map(cpu); 109 - 110 - /* enable cache coherency */ 111 - modify_scu_cpu_psr(0, 3 << (cpu * 8)); 112 121 113 122 if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) 114 123 ch = r8a7779_ch_cpu[cpu]; ··· 99 152 100 153 static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) 101 154 { 102 - int cpu = cpu_logical_map(0); 155 + scu_enable(shmobile_scu_base); 103 156 104 - scu_enable(scu_base_addr()); 157 + /* Map the reset vector (in headsmp-scu.S) */ 158 + __raw_writel(__pa(shmobile_secondary_vector_scu), AVECR); 105 159 106 - /* Map the reset vector (in headsmp.S) */ 107 - __raw_writel(__pa(shmobile_secondary_vector), AVECR); 108 - 109 - /* enable cache coherency on CPU0 */ 110 - modify_scu_cpu_psr(0, 3 << (cpu * 8)); 160 + /* enable cache coherency on booting CPU */ 161 + scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 111 162 112 163 r8a7779_pm_init(); 113 164 ··· 117 172 118 173 static void __init r8a7779_smp_init_cpus(void) 119 174 { 120 - unsigned int ncores = r8a7779_get_core_count(); 175 + /* setup r8a7779 specific SCU base */ 176 + shmobile_scu_base = IOMEM(R8A7779_SCU_BASE); 121 177 122 - shmobile_smp_init_cpus(ncores); 178 + shmobile_smp_init_cpus(scu_get_core_count(shmobile_scu_base)); 123 179 } 180 + 181 + #ifdef CONFIG_HOTPLUG_CPU 182 + static int r8a7779_scu_psr_core_disabled(int cpu) 183 + { 184 + unsigned long mask = 3 << (cpu * 8); 185 + 186 + if ((__raw_readl(shmobile_scu_base + 8) & mask) == mask) 187 + return 1; 188 + 189 + return 0; 190 + } 191 + 192 + static int r8a7779_cpu_kill(unsigned int cpu) 193 + { 194 + int k; 195 + 196 + /* this function is running on another CPU than the offline target, 197 + * here we need wait for shutdown code in platform_cpu_die() to 198 + * finish before asking SoC-specific code to power off the CPU core. 199 + */ 200 + for (k = 0; k < 1000; k++) { 201 + if (r8a7779_scu_psr_core_disabled(cpu)) 202 + return r8a7779_platform_cpu_kill(cpu); 203 + 204 + mdelay(1); 205 + } 206 + 207 + return 0; 208 + } 209 + 210 + static void r8a7779_cpu_die(unsigned int cpu) 211 + { 212 + dsb(); 213 + flush_cache_all(); 214 + 215 + /* disable cache coherency */ 216 + scu_power_mode(shmobile_scu_base, SCU_PM_POWEROFF); 217 + 218 + /* Endless loop until power off from r8a7779_cpu_kill() */ 219 + while (1) 220 + cpu_do_idle(); 221 + } 222 + 223 + static int r8a7779_cpu_disable(unsigned int cpu) 224 + { 225 + /* only CPU1->3 have power domains, do not allow hotplug of CPU0 */ 226 + return cpu == 0 ? -EPERM : 0; 227 + } 228 + #endif /* CONFIG_HOTPLUG_CPU */ 124 229 125 230 struct smp_operations r8a7779_smp_ops __initdata = { 126 231 .smp_init_cpus = r8a7779_smp_init_cpus, ··· 178 183 .smp_boot_secondary = r8a7779_boot_secondary, 179 184 #ifdef CONFIG_HOTPLUG_CPU 180 185 .cpu_kill = r8a7779_cpu_kill, 181 - .cpu_die = shmobile_cpu_die, 182 - .cpu_disable = shmobile_cpu_disable, 186 + .cpu_die = r8a7779_cpu_die, 187 + .cpu_disable = r8a7779_cpu_disable, 183 188 #endif 184 189 };
+16 -20
arch/arm/mach-shmobile/smp-sh73a0.c
··· 38 38 39 39 #define PSTR_SHUTDOWN_MODE 3 40 40 41 - static void __iomem *scu_base_addr(void) 42 - { 43 - return (void __iomem *)0xf0000000; 44 - } 41 + #define SH73A0_SCU_BASE 0xf0000000 45 42 46 43 #ifdef CONFIG_HAVE_ARM_TWD 47 - static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); 44 + static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, SH73A0_SCU_BASE + 0x600, 29); 48 45 void __init sh73a0_register_twd(void) 49 46 { 50 47 twd_local_timer_register(&twd_local_timer); 51 48 } 52 49 #endif 53 - 54 - static unsigned int __init sh73a0_get_core_count(void) 55 - { 56 - void __iomem *scu_base = scu_base_addr(); 57 - 58 - return scu_get_core_count(scu_base); 59 - } 60 50 61 51 static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle) 62 52 { ··· 62 72 63 73 static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) 64 74 { 65 - scu_enable(scu_base_addr()); 75 + scu_enable(shmobile_scu_base); 66 76 67 - /* Map the reset vector (in headsmp-sh73a0.S) */ 77 + /* Map the reset vector (in headsmp-scu.S) */ 68 78 __raw_writel(0, APARMBAREA); /* 4k */ 69 - __raw_writel(__pa(sh73a0_secondary_vector), SBAR); 79 + __raw_writel(__pa(shmobile_secondary_vector_scu), SBAR); 70 80 71 81 /* enable cache coherency on booting CPU */ 72 - scu_power_mode(scu_base_addr(), SCU_PM_NORMAL); 82 + scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 73 83 } 74 84 75 85 static void __init sh73a0_smp_init_cpus(void) 76 86 { 77 - unsigned int ncores = sh73a0_get_core_count(); 87 + /* setup sh73a0 specific SCU base */ 88 + shmobile_scu_base = IOMEM(SH73A0_SCU_BASE); 78 89 79 - shmobile_smp_init_cpus(ncores); 90 + shmobile_smp_init_cpus(scu_get_core_count(shmobile_scu_base)); 80 91 } 81 92 82 93 #ifdef CONFIG_HOTPLUG_CPU ··· 113 122 flush_cache_all(); 114 123 115 124 /* Set power off mode. This takes the CPU out of the MP cluster */ 116 - scu_power_mode(scu_base_addr(), SCU_PM_POWEROFF); 125 + scu_power_mode(shmobile_scu_base, SCU_PM_POWEROFF); 117 126 118 127 /* Enter shutdown mode */ 119 128 cpu_do_idle(); 129 + } 130 + 131 + static int sh73a0_cpu_disable(unsigned int cpu) 132 + { 133 + return 0; /* CPU0 and CPU1 supported */ 120 134 } 121 135 #endif /* CONFIG_HOTPLUG_CPU */ 122 136 ··· 132 136 #ifdef CONFIG_HOTPLUG_CPU 133 137 .cpu_kill = sh73a0_cpu_kill, 134 138 .cpu_die = sh73a0_cpu_die, 135 - .cpu_disable = shmobile_cpu_disable_any, 139 + .cpu_disable = sh73a0_cpu_disable, 136 140 #endif 137 141 };
+11
arch/arm/mach-socfpga/core.h
··· 20 20 #ifndef __MACH_CORE_H 21 21 #define __MACH_CORE_H 22 22 23 + #define SOCFPGA_RSTMGR_CTRL 0x04 24 + #define SOCFPGA_RSTMGR_MODPERRST 0x14 25 + #define SOCFPGA_RSTMGR_BRGMODRST 0x1c 26 + 27 + /* System Manager bits */ 28 + #define RSTMGR_CTRL_SWCOLDRSTREQ 0x1 /* Cold Reset */ 29 + #define RSTMGR_CTRL_SWWARMRSTREQ 0x2 /* Warm Reset */ 30 + 23 31 extern void socfpga_secondary_startup(void); 24 32 extern void __iomem *socfpga_scu_base_addr; 25 33 26 34 extern void socfpga_init_clocks(void); 27 35 extern void socfpga_sysmgr_init(void); 36 + 37 + extern void __iomem *sys_manager_base_addr; 38 + extern void __iomem *rst_manager_base_addr; 28 39 29 40 extern struct smp_operations socfpga_smp_ops; 30 41 extern char secondary_trampoline, secondary_trampoline_end;
-3
arch/arm/mach-socfpga/platsmp.c
··· 29 29 30 30 #include "core.h" 31 31 32 - extern void __iomem *sys_manager_base_addr; 33 - extern void __iomem *rst_manager_base_addr; 34 - 35 32 static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle) 36 33 { 37 34 int trampoline_size = &secondary_trampoline_end - &secondary_trampoline;
+15 -1
arch/arm/mach-socfpga/socfpga.c
··· 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 17 #include <linux/dw_apb_timer.h> 18 + #include <linux/clk-provider.h> 18 19 #include <linux/irqchip.h> 19 20 #include <linux/of_address.h> 20 21 #include <linux/of_irq.h> ··· 30 29 void __iomem *socfpga_scu_base_addr = ((void __iomem *)(SOCFPGA_SCU_VIRT_BASE)); 31 30 void __iomem *sys_manager_base_addr; 32 31 void __iomem *rst_manager_base_addr; 32 + void __iomem *clk_mgr_base_addr; 33 33 unsigned long cpu1start_addr; 34 34 35 35 static struct map_desc scu_io_desc __initdata = { ··· 79 77 80 78 np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); 81 79 rst_manager_base_addr = of_iomap(np, 0); 80 + 81 + np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr"); 82 + clk_mgr_base_addr = of_iomap(np, 0); 82 83 } 83 84 84 85 static void __init socfpga_init_irq(void) ··· 92 87 93 88 static void socfpga_cyclone5_restart(char mode, const char *cmd) 94 89 { 95 - /* TODO: */ 90 + u32 temp; 91 + 92 + temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); 93 + 94 + if (mode == 'h') 95 + temp |= RSTMGR_CTRL_SWCOLDRSTREQ; 96 + else 97 + temp |= RSTMGR_CTRL_SWWARMRSTREQ; 98 + writel(temp, rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); 96 99 } 97 100 98 101 static void __init socfpga_cyclone5_init(void) 99 102 { 100 103 l2x0_of_init(0, ~0UL); 101 104 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 105 + of_clk_init(NULL); 102 106 socfpga_init_clocks(); 103 107 } 104 108
+1
arch/arm/mach-tegra/Makefile
··· 27 27 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 28 28 obj-$(CONFIG_TEGRA_PCI) += pcie.o 29 29 30 + obj-$(CONFIG_ARCH_TEGRA_114_SOC) += tegra114_speedo.o 30 31 ifeq ($(CONFIG_CPU_IDLE),y) 31 32 obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o 32 33 endif
+4 -1
arch/arm/mach-tegra/common.c
··· 33 33 #include "common.h" 34 34 #include "fuse.h" 35 35 #include "iomap.h" 36 + #include "irq.h" 36 37 #include "pmc.h" 37 38 #include "apbio.h" 38 39 #include "sleep.h" ··· 62 61 void __init tegra_dt_init_irq(void) 63 62 { 64 63 tegra_clocks_init(); 64 + tegra_pmc_init(); 65 65 tegra_init_irq(); 66 66 irqchip_init(); 67 + tegra_legacy_irq_syscore_init(); 67 68 } 68 69 #endif 69 70 ··· 103 100 tegra_apb_io_init(); 104 101 tegra_init_fuse(); 105 102 tegra_init_cache(); 106 - tegra_pmc_init(); 107 103 tegra_powergate_init(); 108 104 tegra_hotplug_init(); 109 105 } 110 106 111 107 void __init tegra_init_late(void) 112 108 { 109 + tegra_init_suspend(); 113 110 tegra_powergate_debugfs_init(); 114 111 }
+1 -5
arch/arm/mach-tegra/cpuidle-tegra20.c
··· 131 131 struct cpuidle_driver *drv, 132 132 int index) 133 133 { 134 - struct cpuidle_state *state = &drv->states[index]; 135 - u32 cpu_on_time = state->exit_latency; 136 - u32 cpu_off_time = state->target_residency - state->exit_latency; 137 - 138 134 while (tegra20_cpu_is_resettable_soon()) 139 135 cpu_relax(); 140 136 ··· 139 143 140 144 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); 141 145 142 - tegra_idle_lp2_last(cpu_on_time, cpu_off_time); 146 + tegra_idle_lp2_last(); 143 147 144 148 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); 145 149
+1 -5
arch/arm/mach-tegra/cpuidle-tegra30.c
··· 69 69 struct cpuidle_driver *drv, 70 70 int index) 71 71 { 72 - struct cpuidle_state *state = &drv->states[index]; 73 - u32 cpu_on_time = state->exit_latency; 74 - u32 cpu_off_time = state->target_residency - state->exit_latency; 75 - 76 72 /* All CPUs entering LP2 is not working. 77 73 * Don't let CPU0 enter LP2 when any secondary CPU is online. 78 74 */ ··· 79 83 80 84 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); 81 85 82 - tegra_idle_lp2_last(cpu_on_time, cpu_off_time); 86 + tegra_idle_lp2_last(); 83 87 84 88 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); 85 89
+4
arch/arm/mach-tegra/fuse.c
··· 2 2 * arch/arm/mach-tegra/fuse.c 3 3 * 4 4 * Copyright (C) 2010 Google, Inc. 5 + * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. 5 6 * 6 7 * Author: 7 8 * Colin Cross <ccross@android.com> ··· 137 136 case TEGRA30: 138 137 tegra_fuse_spare_bit = TEGRA30_FUSE_SPARE_BIT; 139 138 tegra_init_speedo_data = &tegra30_init_speedo_data; 139 + break; 140 + case TEGRA114: 141 + tegra_init_speedo_data = &tegra114_init_speedo_data; 140 142 break; 141 143 default: 142 144 pr_warn("Tegra: unknown chip id %d\n", tegra_chip_id);
+7
arch/arm/mach-tegra/fuse.h
··· 1 1 /* 2 2 * Copyright (C) 2010 Google, Inc. 3 + * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. 3 4 * 4 5 * Author: 5 6 * Colin Cross <ccross@android.com> ··· 65 64 void tegra30_init_speedo_data(void); 66 65 #else 67 66 static inline void tegra30_init_speedo_data(void) {} 67 + #endif 68 + 69 + #ifdef CONFIG_ARCH_TEGRA_114_SOC 70 + void tegra114_init_speedo_data(void); 71 + #else 72 + static inline void tegra114_init_speedo_data(void) {} 68 73 #endif 69 74 70 75 #endif
+95 -1
arch/arm/mach-tegra/irq.c
··· 4 4 * Author: 5 5 * Colin Cross <ccross@android.com> 6 6 * 7 - * Copyright (C) 2010, NVIDIA Corporation 7 + * Copyright (C) 2010,2013, NVIDIA Corporation 8 8 * 9 9 * This software is licensed under the terms of the GNU General Public 10 10 * License version 2, as published by the Free Software Foundation, and ··· 23 23 #include <linux/io.h> 24 24 #include <linux/of.h> 25 25 #include <linux/irqchip/arm-gic.h> 26 + #include <linux/syscore_ops.h> 26 27 27 28 #include "board.h" 28 29 #include "iomap.h" ··· 44 43 #define ICTLR_COP_IEP_CLASS 0x3c 45 44 46 45 #define FIRST_LEGACY_IRQ 32 46 + #define TEGRA_MAX_NUM_ICTLRS 5 47 47 48 48 #define SGI_MASK 0xFFFF 49 49 ··· 57 55 IO_ADDRESS(TEGRA_QUATERNARY_ICTLR_BASE), 58 56 IO_ADDRESS(TEGRA_QUINARY_ICTLR_BASE), 59 57 }; 58 + 59 + #ifdef CONFIG_PM_SLEEP 60 + static u32 cop_ier[TEGRA_MAX_NUM_ICTLRS]; 61 + static u32 cop_iep[TEGRA_MAX_NUM_ICTLRS]; 62 + static u32 cpu_ier[TEGRA_MAX_NUM_ICTLRS]; 63 + static u32 cpu_iep[TEGRA_MAX_NUM_ICTLRS]; 64 + 65 + static u32 ictlr_wake_mask[TEGRA_MAX_NUM_ICTLRS]; 66 + #endif 60 67 61 68 bool tegra_pending_sgi(void) 62 69 { ··· 136 125 return 1; 137 126 } 138 127 128 + #ifdef CONFIG_PM_SLEEP 129 + static int tegra_set_wake(struct irq_data *d, unsigned int enable) 130 + { 131 + u32 irq = d->irq; 132 + u32 index, mask; 133 + 134 + if (irq < FIRST_LEGACY_IRQ || 135 + irq >= FIRST_LEGACY_IRQ + num_ictlrs * 32) 136 + return -EINVAL; 137 + 138 + index = ((irq - FIRST_LEGACY_IRQ) / 32); 139 + mask = BIT((irq - FIRST_LEGACY_IRQ) % 32); 140 + if (enable) 141 + ictlr_wake_mask[index] |= mask; 142 + else 143 + ictlr_wake_mask[index] &= ~mask; 144 + 145 + return 0; 146 + } 147 + 148 + static int tegra_legacy_irq_suspend(void) 149 + { 150 + unsigned long flags; 151 + int i; 152 + 153 + local_irq_save(flags); 154 + for (i = 0; i < num_ictlrs; i++) { 155 + void __iomem *ictlr = ictlr_reg_base[i]; 156 + /* Save interrupt state */ 157 + cpu_ier[i] = readl_relaxed(ictlr + ICTLR_CPU_IER); 158 + cpu_iep[i] = readl_relaxed(ictlr + ICTLR_CPU_IEP_CLASS); 159 + cop_ier[i] = readl_relaxed(ictlr + ICTLR_COP_IER); 160 + cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS); 161 + 162 + /* Disable COP interrupts */ 163 + writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); 164 + 165 + /* Disable CPU interrupts */ 166 + writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); 167 + 168 + /* Enable the wakeup sources of ictlr */ 169 + writel_relaxed(ictlr_wake_mask[i], ictlr + ICTLR_CPU_IER_SET); 170 + } 171 + local_irq_restore(flags); 172 + 173 + return 0; 174 + } 175 + 176 + static void tegra_legacy_irq_resume(void) 177 + { 178 + unsigned long flags; 179 + int i; 180 + 181 + local_irq_save(flags); 182 + for (i = 0; i < num_ictlrs; i++) { 183 + void __iomem *ictlr = ictlr_reg_base[i]; 184 + writel_relaxed(cpu_iep[i], ictlr + ICTLR_CPU_IEP_CLASS); 185 + writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); 186 + writel_relaxed(cpu_ier[i], ictlr + ICTLR_CPU_IER_SET); 187 + writel_relaxed(cop_iep[i], ictlr + ICTLR_COP_IEP_CLASS); 188 + writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); 189 + writel_relaxed(cop_ier[i], ictlr + ICTLR_COP_IER_SET); 190 + } 191 + local_irq_restore(flags); 192 + } 193 + 194 + static struct syscore_ops tegra_legacy_irq_syscore_ops = { 195 + .suspend = tegra_legacy_irq_suspend, 196 + .resume = tegra_legacy_irq_resume, 197 + }; 198 + 199 + int tegra_legacy_irq_syscore_init(void) 200 + { 201 + register_syscore_ops(&tegra_legacy_irq_syscore_ops); 202 + 203 + return 0; 204 + } 205 + #else 206 + #define tegra_set_wake NULL 207 + #endif 208 + 139 209 void __init tegra_init_irq(void) 140 210 { 141 211 int i; ··· 242 150 gic_arch_extn.irq_mask = tegra_mask; 243 151 gic_arch_extn.irq_unmask = tegra_unmask; 244 152 gic_arch_extn.irq_retrigger = tegra_retrigger; 153 + gic_arch_extn.irq_set_wake = tegra_set_wake; 154 + gic_arch_extn.flags = IRQCHIP_MASK_ON_SUSPEND; 245 155 246 156 /* 247 157 * Check if there is a devicetree present, since the GIC will be
+6
arch/arm/mach-tegra/irq.h
··· 19 19 20 20 bool tegra_pending_sgi(void); 21 21 22 + #ifdef CONFIG_PM_SLEEP 23 + int tegra_legacy_irq_syscore_init(void); 24 + #else 25 + static inline int tegra_legacy_irq_syscore_init(void) { return 0; } 26 + #endif 27 + 22 28 #endif
+8
arch/arm/mach-tegra/platsmp.c
··· 138 138 return 0; 139 139 } 140 140 141 + static int tegra114_boot_secondary(unsigned int cpu, struct task_struct *idle) 142 + { 143 + cpu = cpu_logical_map(cpu); 144 + return tegra_pmc_cpu_power_on(cpu); 145 + } 146 + 141 147 static int __cpuinit tegra_boot_secondary(unsigned int cpu, 142 148 struct task_struct *idle) 143 149 { ··· 151 145 return tegra20_boot_secondary(cpu, idle); 152 146 if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30) 153 147 return tegra30_boot_secondary(cpu, idle); 148 + if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_chip_id == TEGRA114) 149 + return tegra114_boot_secondary(cpu, idle); 154 150 155 151 return -EINVAL; 156 152 }
+81 -50
arch/arm/mach-tegra/pm.c
··· 22 22 #include <linux/cpumask.h> 23 23 #include <linux/delay.h> 24 24 #include <linux/cpu_pm.h> 25 - #include <linux/clk.h> 25 + #include <linux/suspend.h> 26 26 #include <linux/err.h> 27 27 #include <linux/clk/tegra.h> 28 28 ··· 37 37 #include "reset.h" 38 38 #include "flowctrl.h" 39 39 #include "fuse.h" 40 + #include "pmc.h" 40 41 #include "sleep.h" 41 - 42 - #define TEGRA_POWER_CPU_PWRREQ_OE (1 << 16) /* CPU pwr req enable */ 43 - 44 - #define PMC_CTRL 0x0 45 - #define PMC_CPUPWRGOOD_TIMER 0xc8 46 - #define PMC_CPUPWROFF_TIMER 0xcc 47 42 48 43 #ifdef CONFIG_PM_SLEEP 49 44 static DEFINE_SPINLOCK(tegra_lp2_lock); 50 - static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); 51 - static struct clk *tegra_pclk; 52 45 void (*tegra_tear_down_cpu)(void); 53 - 54 - static void set_power_timers(unsigned long us_on, unsigned long us_off) 55 - { 56 - unsigned long long ticks; 57 - unsigned long long pclk; 58 - unsigned long rate; 59 - static unsigned long tegra_last_pclk; 60 - 61 - if (tegra_pclk == NULL) { 62 - tegra_pclk = clk_get_sys(NULL, "pclk"); 63 - WARN_ON(IS_ERR(tegra_pclk)); 64 - } 65 - 66 - rate = clk_get_rate(tegra_pclk); 67 - 68 - if (WARN_ON_ONCE(rate <= 0)) 69 - pclk = 100000000; 70 - else 71 - pclk = rate; 72 - 73 - if ((rate != tegra_last_pclk)) { 74 - ticks = (us_on * pclk) + 999999ull; 75 - do_div(ticks, 1000000); 76 - writel((unsigned long)ticks, pmc + PMC_CPUPWRGOOD_TIMER); 77 - 78 - ticks = (us_off * pclk) + 999999ull; 79 - do_div(ticks, 1000000); 80 - writel((unsigned long)ticks, pmc + PMC_CPUPWROFF_TIMER); 81 - wmb(); 82 - } 83 - tegra_last_pclk = pclk; 84 - } 85 46 86 47 /* 87 48 * restore_cpu_complex ··· 139 178 return 0; 140 179 } 141 180 142 - void tegra_idle_lp2_last(u32 cpu_on_time, u32 cpu_off_time) 181 + void tegra_idle_lp2_last(void) 143 182 { 144 - u32 mode; 145 - 146 - /* Only the last cpu down does the final suspend steps */ 147 - mode = readl(pmc + PMC_CTRL); 148 - mode |= TEGRA_POWER_CPU_PWRREQ_OE; 149 - writel(mode, pmc + PMC_CTRL); 150 - 151 - set_power_timers(cpu_on_time, cpu_off_time); 183 + tegra_pmc_pm_set(TEGRA_SUSPEND_LP2); 152 184 153 185 cpu_cluster_pm_enter(); 154 186 suspend_cpu_complex(); ··· 150 196 151 197 restore_cpu_complex(); 152 198 cpu_cluster_pm_exit(); 199 + } 200 + 201 + enum tegra_suspend_mode tegra_pm_validate_suspend_mode( 202 + enum tegra_suspend_mode mode) 203 + { 204 + /* Tegra114 didn't support any suspending mode yet. */ 205 + if (tegra_chip_id == TEGRA114) 206 + return TEGRA_SUSPEND_NONE; 207 + 208 + /* 209 + * The Tegra devices only support suspending to LP2 currently. 210 + */ 211 + if (mode > TEGRA_SUSPEND_LP2) 212 + return TEGRA_SUSPEND_LP2; 213 + 214 + return mode; 215 + } 216 + 217 + static const char *lp_state[TEGRA_MAX_SUSPEND_MODE] = { 218 + [TEGRA_SUSPEND_NONE] = "none", 219 + [TEGRA_SUSPEND_LP2] = "LP2", 220 + [TEGRA_SUSPEND_LP1] = "LP1", 221 + [TEGRA_SUSPEND_LP0] = "LP0", 222 + }; 223 + 224 + static int __cpuinit tegra_suspend_enter(suspend_state_t state) 225 + { 226 + enum tegra_suspend_mode mode = tegra_pmc_get_suspend_mode(); 227 + 228 + if (WARN_ON(mode < TEGRA_SUSPEND_NONE || 229 + mode >= TEGRA_MAX_SUSPEND_MODE)) 230 + return -EINVAL; 231 + 232 + pr_info("Entering suspend state %s\n", lp_state[mode]); 233 + 234 + tegra_pmc_pm_set(mode); 235 + 236 + local_fiq_disable(); 237 + 238 + suspend_cpu_complex(); 239 + switch (mode) { 240 + case TEGRA_SUSPEND_LP2: 241 + tegra_set_cpu_in_lp2(0); 242 + break; 243 + default: 244 + break; 245 + } 246 + 247 + cpu_suspend(PHYS_OFFSET - PAGE_OFFSET, &tegra_sleep_cpu); 248 + 249 + switch (mode) { 250 + case TEGRA_SUSPEND_LP2: 251 + tegra_clear_cpu_in_lp2(0); 252 + break; 253 + default: 254 + break; 255 + } 256 + restore_cpu_complex(); 257 + 258 + local_fiq_enable(); 259 + 260 + return 0; 261 + } 262 + 263 + static const struct platform_suspend_ops tegra_suspend_ops = { 264 + .valid = suspend_valid_only_mem, 265 + .enter = tegra_suspend_enter, 266 + }; 267 + 268 + void __init tegra_init_suspend(void) 269 + { 270 + if (tegra_pmc_get_suspend_mode() == TEGRA_SUSPEND_NONE) 271 + return; 272 + 273 + tegra_pmc_suspend_init(); 274 + 275 + suspend_set_ops(&tegra_suspend_ops); 153 276 } 154 277 #endif
+16 -1
arch/arm/mach-tegra/pm.h
··· 21 21 #ifndef _MACH_TEGRA_PM_H_ 22 22 #define _MACH_TEGRA_PM_H_ 23 23 24 + #include "pmc.h" 25 + 24 26 extern unsigned long l2x0_saved_regs_addr; 25 27 26 28 void save_cpu_arch_register(void); ··· 31 29 void tegra_clear_cpu_in_lp2(int phy_cpu_id); 32 30 bool tegra_set_cpu_in_lp2(int phy_cpu_id); 33 31 34 - void tegra_idle_lp2_last(u32 cpu_on_time, u32 cpu_off_time); 32 + void tegra_idle_lp2_last(void); 35 33 extern void (*tegra_tear_down_cpu)(void); 34 + 35 + #ifdef CONFIG_PM_SLEEP 36 + enum tegra_suspend_mode tegra_pm_validate_suspend_mode( 37 + enum tegra_suspend_mode mode); 38 + void tegra_init_suspend(void); 39 + #else 40 + static inline enum tegra_suspend_mode tegra_pm_validate_suspend_mode( 41 + enum tegra_suspend_mode mode) 42 + { 43 + return TEGRA_SUSPEND_NONE; 44 + } 45 + static inline void tegra_init_suspend(void) {} 46 + #endif 36 47 37 48 #endif /* _MACH_TEGRA_PM_H_ */
+162
arch/arm/mach-tegra/pmc.c
··· 16 16 */ 17 17 18 18 #include <linux/kernel.h> 19 + #include <linux/clk.h> 19 20 #include <linux/io.h> 20 21 #include <linux/of.h> 21 22 #include <linux/of_address.h> 23 + 24 + #include "fuse.h" 25 + #include "pm.h" 26 + #include "pmc.h" 27 + #include "sleep.h" 28 + 29 + #define TEGRA_POWER_EFFECT_LP0 (1 << 14) /* LP0 when CPU pwr gated */ 30 + #define TEGRA_POWER_CPU_PWRREQ_POLARITY (1 << 15) /* CPU pwr req polarity */ 31 + #define TEGRA_POWER_CPU_PWRREQ_OE (1 << 16) /* CPU pwr req enable */ 22 32 23 33 #define PMC_CTRL 0x0 24 34 #define PMC_CTRL_INTR_LOW (1 << 17) ··· 36 26 #define PMC_PWRGATE_TOGGLE_START (1 << 8) 37 27 #define PMC_REMOVE_CLAMPING 0x34 38 28 #define PMC_PWRGATE_STATUS 0x38 29 + 30 + #define PMC_CPUPWRGOOD_TIMER 0xc8 31 + #define PMC_CPUPWROFF_TIMER 0xcc 39 32 40 33 #define TEGRA_POWERGATE_PCIE 3 41 34 #define TEGRA_POWERGATE_VDEC 4 ··· 56 43 57 44 static void __iomem *tegra_pmc_base; 58 45 static bool tegra_pmc_invert_interrupt; 46 + static struct clk *tegra_pclk; 47 + 48 + struct pmc_pm_data { 49 + u32 cpu_good_time; /* CPU power good time in uS */ 50 + u32 cpu_off_time; /* CPU power off time in uS */ 51 + u32 core_osc_time; /* Core power good osc time in uS */ 52 + u32 core_pmu_time; /* Core power good pmu time in uS */ 53 + u32 core_off_time; /* Core power off time in uS */ 54 + bool corereq_high; /* Core power request active-high */ 55 + bool sysclkreq_high; /* System clock request active-high */ 56 + bool combined_req; /* Combined pwr req for CPU & Core */ 57 + bool cpu_pwr_good_en; /* CPU power good signal is enabled */ 58 + u32 lp0_vec_phy_addr; /* The phy addr of LP0 warm boot code */ 59 + u32 lp0_vec_size; /* The size of LP0 warm boot code */ 60 + enum tegra_suspend_mode suspend_mode; 61 + }; 62 + static struct pmc_pm_data pmc_pm_data; 59 63 60 64 static inline u32 tegra_pmc_readl(u32 reg) 61 65 { ··· 163 133 return tegra_pmc_powergate_remove_clamping(id); 164 134 } 165 135 136 + #ifdef CONFIG_PM_SLEEP 137 + static void set_power_timers(u32 us_on, u32 us_off, unsigned long rate) 138 + { 139 + unsigned long long ticks; 140 + unsigned long long pclk; 141 + static unsigned long tegra_last_pclk; 142 + 143 + if (WARN_ON_ONCE(rate <= 0)) 144 + pclk = 100000000; 145 + else 146 + pclk = rate; 147 + 148 + if ((rate != tegra_last_pclk)) { 149 + ticks = (us_on * pclk) + 999999ull; 150 + do_div(ticks, 1000000); 151 + tegra_pmc_writel((unsigned long)ticks, PMC_CPUPWRGOOD_TIMER); 152 + 153 + ticks = (us_off * pclk) + 999999ull; 154 + do_div(ticks, 1000000); 155 + tegra_pmc_writel((unsigned long)ticks, PMC_CPUPWROFF_TIMER); 156 + wmb(); 157 + } 158 + tegra_last_pclk = pclk; 159 + } 160 + 161 + enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void) 162 + { 163 + return pmc_pm_data.suspend_mode; 164 + } 165 + 166 + void tegra_pmc_pm_set(enum tegra_suspend_mode mode) 167 + { 168 + u32 reg; 169 + unsigned long rate = 0; 170 + 171 + reg = tegra_pmc_readl(PMC_CTRL); 172 + reg |= TEGRA_POWER_CPU_PWRREQ_OE; 173 + reg &= ~TEGRA_POWER_EFFECT_LP0; 174 + 175 + switch (mode) { 176 + case TEGRA_SUSPEND_LP2: 177 + rate = clk_get_rate(tegra_pclk); 178 + break; 179 + default: 180 + break; 181 + } 182 + 183 + set_power_timers(pmc_pm_data.cpu_good_time, pmc_pm_data.cpu_off_time, 184 + rate); 185 + 186 + tegra_pmc_writel(reg, PMC_CTRL); 187 + } 188 + 189 + void tegra_pmc_suspend_init(void) 190 + { 191 + u32 reg; 192 + 193 + /* Always enable CPU power request */ 194 + reg = tegra_pmc_readl(PMC_CTRL); 195 + reg |= TEGRA_POWER_CPU_PWRREQ_OE; 196 + tegra_pmc_writel(reg, PMC_CTRL); 197 + } 198 + #endif 199 + 166 200 static const struct of_device_id matches[] __initconst = { 167 201 { .compatible = "nvidia,tegra114-pmc" }, 168 202 { .compatible = "nvidia,tegra30-pmc" }, ··· 237 143 static void tegra_pmc_parse_dt(void) 238 144 { 239 145 struct device_node *np; 146 + u32 prop; 147 + enum tegra_suspend_mode suspend_mode; 148 + u32 core_good_time[2] = {0, 0}; 149 + u32 lp0_vec[2] = {0, 0}; 240 150 241 151 np = of_find_matching_node(NULL, matches); 242 152 BUG_ON(!np); ··· 249 151 250 152 tegra_pmc_invert_interrupt = of_property_read_bool(np, 251 153 "nvidia,invert-interrupt"); 154 + tegra_pclk = of_clk_get_by_name(np, "pclk"); 155 + WARN_ON(IS_ERR(tegra_pclk)); 156 + 157 + /* Grabbing the power management configurations */ 158 + if (of_property_read_u32(np, "nvidia,suspend-mode", &prop)) { 159 + suspend_mode = TEGRA_SUSPEND_NONE; 160 + } else { 161 + switch (prop) { 162 + case 0: 163 + suspend_mode = TEGRA_SUSPEND_LP0; 164 + break; 165 + case 1: 166 + suspend_mode = TEGRA_SUSPEND_LP1; 167 + break; 168 + case 2: 169 + suspend_mode = TEGRA_SUSPEND_LP2; 170 + break; 171 + default: 172 + suspend_mode = TEGRA_SUSPEND_NONE; 173 + break; 174 + } 175 + } 176 + suspend_mode = tegra_pm_validate_suspend_mode(suspend_mode); 177 + 178 + if (of_property_read_u32(np, "nvidia,cpu-pwr-good-time", &prop)) 179 + suspend_mode = TEGRA_SUSPEND_NONE; 180 + pmc_pm_data.cpu_good_time = prop; 181 + 182 + if (of_property_read_u32(np, "nvidia,cpu-pwr-off-time", &prop)) 183 + suspend_mode = TEGRA_SUSPEND_NONE; 184 + pmc_pm_data.cpu_off_time = prop; 185 + 186 + if (of_property_read_u32_array(np, "nvidia,core-pwr-good-time", 187 + core_good_time, ARRAY_SIZE(core_good_time))) 188 + suspend_mode = TEGRA_SUSPEND_NONE; 189 + pmc_pm_data.core_osc_time = core_good_time[0]; 190 + pmc_pm_data.core_pmu_time = core_good_time[1]; 191 + 192 + if (of_property_read_u32(np, "nvidia,core-pwr-off-time", 193 + &prop)) 194 + suspend_mode = TEGRA_SUSPEND_NONE; 195 + pmc_pm_data.core_off_time = prop; 196 + 197 + pmc_pm_data.corereq_high = of_property_read_bool(np, 198 + "nvidia,core-power-req-active-high"); 199 + 200 + pmc_pm_data.sysclkreq_high = of_property_read_bool(np, 201 + "nvidia,sys-clock-req-active-high"); 202 + 203 + pmc_pm_data.combined_req = of_property_read_bool(np, 204 + "nvidia,combined-power-req"); 205 + 206 + pmc_pm_data.cpu_pwr_good_en = of_property_read_bool(np, 207 + "nvidia,cpu-pwr-good-en"); 208 + 209 + if (of_property_read_u32_array(np, "nvidia,lp0-vec", lp0_vec, 210 + ARRAY_SIZE(lp0_vec))) 211 + if (suspend_mode == TEGRA_SUSPEND_LP0) 212 + suspend_mode = TEGRA_SUSPEND_LP1; 213 + 214 + pmc_pm_data.lp0_vec_phy_addr = lp0_vec[0]; 215 + pmc_pm_data.lp0_vec_size = lp0_vec[1]; 216 + 217 + pmc_pm_data.suspend_mode = suspend_mode; 252 218 } 253 219 254 220 void __init tegra_pmc_init(void)
+14
arch/arm/mach-tegra/pmc.h
··· 18 18 #ifndef __MACH_TEGRA_PMC_H 19 19 #define __MACH_TEGRA_PMC_H 20 20 21 + enum tegra_suspend_mode { 22 + TEGRA_SUSPEND_NONE = 0, 23 + TEGRA_SUSPEND_LP2, /* CPU voltage off */ 24 + TEGRA_SUSPEND_LP1, /* CPU voltage off, DRAM self-refresh */ 25 + TEGRA_SUSPEND_LP0, /* CPU + core voltage off, DRAM self-refresh */ 26 + TEGRA_MAX_SUSPEND_MODE, 27 + }; 28 + 29 + #ifdef CONFIG_PM_SLEEP 30 + enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void); 31 + void tegra_pmc_pm_set(enum tegra_suspend_mode mode); 32 + void tegra_pmc_suspend_init(void); 33 + #endif 34 + 21 35 bool tegra_pmc_cpu_is_powered(int cpuid); 22 36 int tegra_pmc_cpu_power_on(int cpuid); 23 37 int tegra_pmc_cpu_remove_clamping(int cpuid);
+28 -1
arch/arm/mach-tegra/tegra.c
··· 33 33 #include <linux/io.h> 34 34 #include <linux/i2c.h> 35 35 #include <linux/i2c-tegra.h> 36 + #include <linux/slab.h> 37 + #include <linux/sys_soc.h> 36 38 #include <linux/usb/tegra_usb_phy.h> 37 39 38 40 #include <asm/mach-types.h> ··· 44 42 45 43 #include "board.h" 46 44 #include "common.h" 45 + #include "fuse.h" 47 46 #include "iomap.h" 48 47 49 48 static struct tegra_ehci_platform_data tegra_ehci1_pdata = { ··· 83 80 84 81 static void __init tegra_dt_init(void) 85 82 { 83 + struct soc_device_attribute *soc_dev_attr; 84 + struct soc_device *soc_dev; 85 + struct device *parent = NULL; 86 + 87 + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); 88 + if (!soc_dev_attr) 89 + goto out; 90 + 91 + soc_dev_attr->family = kasprintf(GFP_KERNEL, "Tegra"); 92 + soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d", tegra_revision); 93 + soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%d", tegra_chip_id); 94 + 95 + soc_dev = soc_device_register(soc_dev_attr); 96 + if (IS_ERR(soc_dev)) { 97 + kfree(soc_dev_attr->family); 98 + kfree(soc_dev_attr->revision); 99 + kfree(soc_dev_attr->soc_id); 100 + kfree(soc_dev_attr); 101 + goto out; 102 + } 103 + 104 + parent = soc_device_to_device(soc_dev); 105 + 86 106 /* 87 107 * Finished with the static registrations now; fill in the missing 88 108 * devices 89 109 */ 110 + out: 90 111 of_platform_populate(NULL, of_default_bus_match_table, 91 - tegra20_auxdata_lookup, NULL); 112 + tegra20_auxdata_lookup, parent); 92 113 } 93 114 94 115 static void __init trimslice_init(void)
+104
arch/arm/mach-tegra/tegra114_speedo.c
··· 1 + /* 2 + * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. 3 + * 4 + * This program is free software; you can redistribute it and/or modify it 5 + * under the terms and conditions of the GNU General Public License, 6 + * version 2, as published by the Free Software Foundation. 7 + * 8 + * This program is distributed in the hope it will be useful, but WITHOUT 9 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 11 + * more details. 12 + * 13 + * You should have received a copy of the GNU General Public License 14 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 + */ 16 + 17 + #include <linux/kernel.h> 18 + #include <linux/bug.h> 19 + 20 + #include "fuse.h" 21 + 22 + #define CORE_PROCESS_CORNERS_NUM 2 23 + #define CPU_PROCESS_CORNERS_NUM 2 24 + 25 + enum { 26 + THRESHOLD_INDEX_0, 27 + THRESHOLD_INDEX_1, 28 + THRESHOLD_INDEX_COUNT, 29 + }; 30 + 31 + static const u32 core_process_speedos[][CORE_PROCESS_CORNERS_NUM] = { 32 + {1123, UINT_MAX}, 33 + {0, UINT_MAX}, 34 + }; 35 + 36 + static const u32 cpu_process_speedos[][CPU_PROCESS_CORNERS_NUM] = { 37 + {1695, UINT_MAX}, 38 + {0, UINT_MAX}, 39 + }; 40 + 41 + static void rev_sku_to_speedo_ids(int rev, int sku, int *threshold) 42 + { 43 + u32 tmp; 44 + 45 + switch (sku) { 46 + case 0x00: 47 + case 0x10: 48 + case 0x05: 49 + case 0x06: 50 + tegra_cpu_speedo_id = 1; 51 + tegra_soc_speedo_id = 0; 52 + *threshold = THRESHOLD_INDEX_0; 53 + break; 54 + 55 + case 0x03: 56 + case 0x04: 57 + tegra_cpu_speedo_id = 2; 58 + tegra_soc_speedo_id = 1; 59 + *threshold = THRESHOLD_INDEX_1; 60 + break; 61 + 62 + default: 63 + pr_err("Tegra114 Unknown SKU %d\n", sku); 64 + tegra_cpu_speedo_id = 0; 65 + tegra_soc_speedo_id = 0; 66 + *threshold = THRESHOLD_INDEX_0; 67 + break; 68 + } 69 + 70 + if (rev == TEGRA_REVISION_A01) { 71 + tmp = tegra_fuse_readl(0x270) << 1; 72 + tmp |= tegra_fuse_readl(0x26c); 73 + if (!tmp) 74 + tegra_cpu_speedo_id = 0; 75 + } 76 + } 77 + 78 + void tegra114_init_speedo_data(void) 79 + { 80 + u32 cpu_speedo_val; 81 + u32 core_speedo_val; 82 + int threshold; 83 + int i; 84 + 85 + BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != 86 + THRESHOLD_INDEX_COUNT); 87 + BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != 88 + THRESHOLD_INDEX_COUNT); 89 + 90 + rev_sku_to_speedo_ids(tegra_revision, tegra_sku_id, &threshold); 91 + 92 + cpu_speedo_val = tegra_fuse_readl(0x12c) + 1024; 93 + core_speedo_val = tegra_fuse_readl(0x134); 94 + 95 + for (i = 0; i < CPU_PROCESS_CORNERS_NUM; i++) 96 + if (cpu_speedo_val < cpu_process_speedos[threshold][i]) 97 + break; 98 + tegra_cpu_process_id = i; 99 + 100 + for (i = 0; i < CORE_PROCESS_CORNERS_NUM; i++) 101 + if (core_speedo_val < core_process_speedos[threshold][i]) 102 + break; 103 + tegra_core_process_id = i; 104 + }
+2 -2
arch/arm/mach-ux500/cache-l2x0.c
··· 47 47 /* Unlock before init */ 48 48 ux500_l2x0_unlock(); 49 49 50 - /* DB9540's L2 has 128KB way size */ 51 - if (cpu_is_u9540()) 50 + /* DBx540's L2 has 128KB way size */ 51 + if (cpu_is_ux540_family()) 52 52 /* 128KB way size */ 53 53 aux_val |= (0x4 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT); 54 54 else
+9
arch/arm/plat-samsung/s5p-sleep.S
··· 25 25 #include <asm/asm-offsets.h> 26 26 #include <asm/hardware/cache-l2x0.h> 27 27 28 + #define CPU_MASK 0xff0ffff0 29 + #define CPU_CORTEX_A9 0x410fc090 30 + 28 31 /* 29 32 * The following code is located into the .data section. This is to 30 33 * allow l2x0_regs_phys to be accessed with a relative load while we ··· 54 51 55 52 ENTRY(s3c_cpu_resume) 56 53 #ifdef CONFIG_CACHE_L2X0 54 + mrc p15, 0, r0, c0, c0, 0 55 + ldr r1, =CPU_MASK 56 + and r0, r0, r1 57 + ldr r1, =CPU_CORTEX_A9 58 + cmp r0, r1 59 + bne resume_l2on 57 60 adr r0, l2x0_regs_phys 58 61 ldr r0, [r0] 59 62 ldr r1, [r0, #L2X0_R_PHY_BASE]
+3
arch/arm/plat-samsung/setup-mipiphy.c
··· 8 8 * published by the Free Software Foundation. 9 9 */ 10 10 11 + #include <linux/export.h> 11 12 #include <linux/kernel.h> 12 13 #include <linux/platform_device.h> 13 14 #include <linux/io.h> ··· 51 50 { 52 51 return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN); 53 52 } 53 + EXPORT_SYMBOL(s5p_csis_phy_enable); 54 54 55 55 int s5p_dsim_phy_enable(struct platform_device *pdev, bool on) 56 56 { 57 57 return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN); 58 58 } 59 + EXPORT_SYMBOL(s5p_dsim_phy_enable);
+147 -26
drivers/clk/socfpga/clk.c
··· 1 1 /* 2 - * Copyright (C) 2012 Altera Corporation <www.altera.com> 2 + * Copyright 2011-2012 Calxeda, Inc. 3 + * Copyright (C) 2012-2013 Altera Corporation <www.altera.com> 3 4 * 4 5 * This program is free software; you can redistribute it and/or modify 5 6 * it under the terms of the GNU General Public License as published by ··· 12 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 12 * GNU General Public License for more details. 14 13 * 14 + * Based from clk-highbank.c 15 + * 15 16 * You should have received a copy of the GNU General Public License 16 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 */ 18 19 #include <linux/clk.h> 19 20 #include <linux/clkdev.h> 20 21 #include <linux/clk-provider.h> 22 + #include <linux/io.h> 23 + #include <linux/of.h> 21 24 22 - #define SOCFPGA_OSC1_CLK 10000000 23 - #define SOCFPGA_MPU_CLK 800000000 24 - #define SOCFPGA_MAIN_QSPI_CLK 432000000 25 - #define SOCFPGA_MAIN_NAND_SDMMC_CLK 250000000 26 - #define SOCFPGA_S2F_USR_CLK 125000000 25 + /* Clock Manager offsets */ 26 + #define CLKMGR_CTRL 0x0 27 + #define CLKMGR_BYPASS 0x4 28 + 29 + /* Clock bypass bits */ 30 + #define MAINPLL_BYPASS (1<<0) 31 + #define SDRAMPLL_BYPASS (1<<1) 32 + #define SDRAMPLL_SRC_BYPASS (1<<2) 33 + #define PERPLL_BYPASS (1<<3) 34 + #define PERPLL_SRC_BYPASS (1<<4) 35 + 36 + #define SOCFPGA_PLL_BG_PWRDWN 0 37 + #define SOCFPGA_PLL_EXT_ENA 1 38 + #define SOCFPGA_PLL_PWR_DOWN 2 39 + #define SOCFPGA_PLL_DIVF_MASK 0x0000FFF8 40 + #define SOCFPGA_PLL_DIVF_SHIFT 3 41 + #define SOCFPGA_PLL_DIVQ_MASK 0x003F0000 42 + #define SOCFPGA_PLL_DIVQ_SHIFT 16 43 + 44 + extern void __iomem *clk_mgr_base_addr; 45 + 46 + struct socfpga_clk { 47 + struct clk_gate hw; 48 + char *parent_name; 49 + char *clk_name; 50 + u32 fixed_div; 51 + }; 52 + #define to_socfpga_clk(p) container_of(p, struct socfpga_clk, hw.hw) 53 + 54 + static unsigned long clk_pll_recalc_rate(struct clk_hw *hwclk, 55 + unsigned long parent_rate) 56 + { 57 + struct socfpga_clk *socfpgaclk = to_socfpga_clk(hwclk); 58 + unsigned long divf, divq, vco_freq, reg; 59 + unsigned long bypass; 60 + 61 + reg = readl(socfpgaclk->hw.reg); 62 + bypass = readl(clk_mgr_base_addr + CLKMGR_BYPASS); 63 + if (bypass & MAINPLL_BYPASS) 64 + return parent_rate; 65 + 66 + divf = (reg & SOCFPGA_PLL_DIVF_MASK) >> SOCFPGA_PLL_DIVF_SHIFT; 67 + divq = (reg & SOCFPGA_PLL_DIVQ_MASK) >> SOCFPGA_PLL_DIVQ_SHIFT; 68 + vco_freq = parent_rate * (divf + 1); 69 + return vco_freq / (1 + divq); 70 + } 71 + 72 + 73 + static struct clk_ops clk_pll_ops = { 74 + .recalc_rate = clk_pll_recalc_rate, 75 + }; 76 + 77 + static unsigned long clk_periclk_recalc_rate(struct clk_hw *hwclk, 78 + unsigned long parent_rate) 79 + { 80 + struct socfpga_clk *socfpgaclk = to_socfpga_clk(hwclk); 81 + u32 div; 82 + 83 + if (socfpgaclk->fixed_div) 84 + div = socfpgaclk->fixed_div; 85 + else 86 + div = ((readl(socfpgaclk->hw.reg) & 0x1ff) + 1); 87 + 88 + return parent_rate / div; 89 + } 90 + 91 + static const struct clk_ops periclk_ops = { 92 + .recalc_rate = clk_periclk_recalc_rate, 93 + }; 94 + 95 + static __init struct clk *socfpga_clk_init(struct device_node *node, 96 + const struct clk_ops *ops) 97 + { 98 + u32 reg; 99 + struct clk *clk; 100 + struct socfpga_clk *socfpga_clk; 101 + const char *clk_name = node->name; 102 + const char *parent_name; 103 + struct clk_init_data init; 104 + int rc; 105 + u32 fixed_div; 106 + 107 + rc = of_property_read_u32(node, "reg", &reg); 108 + if (WARN_ON(rc)) 109 + return NULL; 110 + 111 + socfpga_clk = kzalloc(sizeof(*socfpga_clk), GFP_KERNEL); 112 + if (WARN_ON(!socfpga_clk)) 113 + return NULL; 114 + 115 + socfpga_clk->hw.reg = clk_mgr_base_addr + reg; 116 + 117 + rc = of_property_read_u32(node, "fixed-divider", &fixed_div); 118 + if (rc) 119 + socfpga_clk->fixed_div = 0; 120 + else 121 + socfpga_clk->fixed_div = fixed_div; 122 + 123 + of_property_read_string(node, "clock-output-names", &clk_name); 124 + 125 + init.name = clk_name; 126 + init.ops = ops; 127 + init.flags = 0; 128 + parent_name = of_clk_get_parent_name(node, 0); 129 + init.parent_names = &parent_name; 130 + init.num_parents = 1; 131 + 132 + socfpga_clk->hw.hw.init = &init; 133 + 134 + if (strcmp(clk_name, "main_pll") || strcmp(clk_name, "periph_pll") || 135 + strcmp(clk_name, "sdram_pll")) { 136 + socfpga_clk->hw.bit_idx = SOCFPGA_PLL_EXT_ENA; 137 + clk_pll_ops.enable = clk_gate_ops.enable; 138 + clk_pll_ops.disable = clk_gate_ops.disable; 139 + } 140 + 141 + clk = clk_register(NULL, &socfpga_clk->hw.hw); 142 + if (WARN_ON(IS_ERR(clk))) { 143 + kfree(socfpga_clk); 144 + return NULL; 145 + } 146 + rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); 147 + return clk; 148 + } 149 + 150 + static void __init socfpga_pll_init(struct device_node *node) 151 + { 152 + socfpga_clk_init(node, &clk_pll_ops); 153 + } 154 + CLK_OF_DECLARE(socfpga_pll, "altr,socfpga-pll-clock", socfpga_pll_init); 155 + 156 + static void __init socfpga_periph_init(struct device_node *node) 157 + { 158 + socfpga_clk_init(node, &periclk_ops); 159 + } 160 + CLK_OF_DECLARE(socfpga_periph, "altr,socfpga-perip-clk", socfpga_periph_init); 27 161 28 162 void __init socfpga_init_clocks(void) 29 163 { 30 164 struct clk *clk; 165 + int ret; 31 166 32 - clk = clk_register_fixed_rate(NULL, "osc1_clk", NULL, CLK_IS_ROOT, SOCFPGA_OSC1_CLK); 33 - clk_register_clkdev(clk, "osc1_clk", NULL); 34 - 35 - clk = clk_register_fixed_rate(NULL, "mpu_clk", NULL, CLK_IS_ROOT, SOCFPGA_MPU_CLK); 36 - clk_register_clkdev(clk, "mpu_clk", NULL); 37 - 38 - clk = clk_register_fixed_rate(NULL, "main_clk", NULL, CLK_IS_ROOT, SOCFPGA_MPU_CLK/2); 39 - clk_register_clkdev(clk, "main_clk", NULL); 40 - 41 - clk = clk_register_fixed_rate(NULL, "dbg_base_clk", NULL, CLK_IS_ROOT, SOCFPGA_MPU_CLK/2); 42 - clk_register_clkdev(clk, "dbg_base_clk", NULL); 43 - 44 - clk = clk_register_fixed_rate(NULL, "main_qspi_clk", NULL, CLK_IS_ROOT, SOCFPGA_MAIN_QSPI_CLK); 45 - clk_register_clkdev(clk, "main_qspi_clk", NULL); 46 - 47 - clk = clk_register_fixed_rate(NULL, "main_nand_sdmmc_clk", NULL, CLK_IS_ROOT, SOCFPGA_MAIN_NAND_SDMMC_CLK); 48 - clk_register_clkdev(clk, "main_nand_sdmmc_clk", NULL); 49 - 50 - clk = clk_register_fixed_rate(NULL, "s2f_usr_clk", NULL, CLK_IS_ROOT, SOCFPGA_S2F_USR_CLK); 51 - clk_register_clkdev(clk, "s2f_usr_clk", NULL); 167 + clk = clk_register_fixed_factor(NULL, "smp_twd", "mpuclk", 0, 1, 4); 168 + ret = clk_register_clkdev(clk, NULL, "smp_twd"); 169 + if (ret) 170 + pr_err("smp_twd alias not registered\n"); 52 171 }
+19 -2
drivers/gpio/gpio-tegra.c
··· 71 71 u32 oe[4]; 72 72 u32 int_enb[4]; 73 73 u32 int_lvl[4]; 74 + u32 wake_enb[4]; 74 75 #endif 75 76 }; 76 77 ··· 333 332 bank->oe[p] = tegra_gpio_readl(GPIO_OE(gpio)); 334 333 bank->int_enb[p] = tegra_gpio_readl(GPIO_INT_ENB(gpio)); 335 334 bank->int_lvl[p] = tegra_gpio_readl(GPIO_INT_LVL(gpio)); 335 + 336 + /* Enable gpio irq for wake up source */ 337 + tegra_gpio_writel(bank->wake_enb[p], 338 + GPIO_INT_ENB(gpio)); 336 339 } 337 340 } 338 341 local_irq_restore(flags); 339 342 return 0; 340 343 } 341 344 342 - static int tegra_gpio_wake_enable(struct irq_data *d, unsigned int enable) 345 + static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable) 343 346 { 344 347 struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d); 348 + int gpio = d->hwirq; 349 + u32 port, bit, mask; 350 + 351 + port = GPIO_PORT(gpio); 352 + bit = GPIO_BIT(gpio); 353 + mask = BIT(bit); 354 + 355 + if (enable) 356 + bank->wake_enb[port] |= mask; 357 + else 358 + bank->wake_enb[port] &= ~mask; 359 + 345 360 return irq_set_irq_wake(bank->irq, enable); 346 361 } 347 362 #endif ··· 369 352 .irq_unmask = tegra_gpio_irq_unmask, 370 353 .irq_set_type = tegra_gpio_irq_set_type, 371 354 #ifdef CONFIG_PM_SLEEP 372 - .irq_set_wake = tegra_gpio_wake_enable, 355 + .irq_set_wake = tegra_gpio_irq_set_wake, 373 356 #endif 374 357 }; 375 358
+83 -5
drivers/mmc/host/davinci_mmc.c
··· 34 34 #include <linux/dma-mapping.h> 35 35 #include <linux/edma.h> 36 36 #include <linux/mmc/mmc.h> 37 + #include <linux/of.h> 38 + #include <linux/of_device.h> 37 39 38 40 #include <linux/platform_data/mmc-davinci.h> 39 41 ··· 524 522 dma_cap_set(DMA_SLAVE, mask); 525 523 526 524 host->dma_tx = 527 - dma_request_channel(mask, edma_filter_fn, &host->txdma); 525 + dma_request_slave_channel_compat(mask, edma_filter_fn, 526 + &host->txdma, mmc_dev(host->mmc), "tx"); 528 527 if (!host->dma_tx) { 529 528 dev_err(mmc_dev(host->mmc), "Can't get dma_tx channel\n"); 530 529 return -ENODEV; 531 530 } 532 531 533 532 host->dma_rx = 534 - dma_request_channel(mask, edma_filter_fn, &host->rxdma); 533 + dma_request_slave_channel_compat(mask, edma_filter_fn, 534 + &host->rxdma, mmc_dev(host->mmc), "rx"); 535 535 if (!host->dma_rx) { 536 536 dev_err(mmc_dev(host->mmc), "Can't get dma_rx channel\n"); 537 537 r = -ENODEV; ··· 1161 1157 mmc_davinci_reset_ctrl(host, 0); 1162 1158 } 1163 1159 1160 + static struct platform_device_id davinci_mmc_devtype[] = { 1161 + { 1162 + .name = "dm6441-mmc", 1163 + .driver_data = MMC_CTLR_VERSION_1, 1164 + }, { 1165 + .name = "da830-mmc", 1166 + .driver_data = MMC_CTLR_VERSION_2, 1167 + }, 1168 + {}, 1169 + }; 1170 + MODULE_DEVICE_TABLE(platform, davinci_mmc_devtype); 1171 + 1172 + static const struct of_device_id davinci_mmc_dt_ids[] = { 1173 + { 1174 + .compatible = "ti,dm6441-mmc", 1175 + .data = &davinci_mmc_devtype[MMC_CTLR_VERSION_1], 1176 + }, 1177 + { 1178 + .compatible = "ti,da830-mmc", 1179 + .data = &davinci_mmc_devtype[MMC_CTLR_VERSION_2], 1180 + }, 1181 + {}, 1182 + }; 1183 + MODULE_DEVICE_TABLE(of, davinci_mmc_dt_ids); 1184 + 1185 + static struct davinci_mmc_config 1186 + *mmc_parse_pdata(struct platform_device *pdev) 1187 + { 1188 + struct device_node *np; 1189 + struct davinci_mmc_config *pdata = pdev->dev.platform_data; 1190 + const struct of_device_id *match = 1191 + of_match_device(of_match_ptr(davinci_mmc_dt_ids), &pdev->dev); 1192 + u32 data; 1193 + 1194 + np = pdev->dev.of_node; 1195 + if (!np) 1196 + return pdata; 1197 + 1198 + pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 1199 + if (!pdata) { 1200 + dev_err(&pdev->dev, "Failed to allocate memory for struct davinci_mmc_config\n"); 1201 + goto nodata; 1202 + } 1203 + 1204 + if (match) 1205 + pdev->id_entry = match->data; 1206 + 1207 + if (of_property_read_u32(np, "max-frequency", &pdata->max_freq)) 1208 + dev_info(&pdev->dev, "'max-frequency' property not specified, defaulting to 25MHz\n"); 1209 + 1210 + of_property_read_u32(np, "bus-width", &data); 1211 + switch (data) { 1212 + case 1: 1213 + case 4: 1214 + case 8: 1215 + pdata->wires = data; 1216 + break; 1217 + default: 1218 + pdata->wires = 1; 1219 + dev_info(&pdev->dev, "Unsupported buswidth, defaulting to 1 bit\n"); 1220 + } 1221 + nodata: 1222 + return pdata; 1223 + } 1224 + 1164 1225 static int __init davinci_mmcsd_probe(struct platform_device *pdev) 1165 1226 { 1166 - struct davinci_mmc_config *pdata = pdev->dev.platform_data; 1227 + struct davinci_mmc_config *pdata = NULL; 1167 1228 struct mmc_davinci_host *host = NULL; 1168 1229 struct mmc_host *mmc = NULL; 1169 1230 struct resource *r, *mem = NULL; 1170 1231 int ret = 0, irq = 0; 1171 1232 size_t mem_size; 1233 + const struct platform_device_id *id_entry; 1172 1234 1173 - /* REVISIT: when we're fully converted, fail if pdata is NULL */ 1235 + pdata = mmc_parse_pdata(pdev); 1236 + if (pdata == NULL) { 1237 + dev_err(&pdev->dev, "Couldn't get platform data\n"); 1238 + return -ENOENT; 1239 + } 1174 1240 1175 1241 ret = -ENODEV; 1176 1242 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); ··· 1311 1237 if (pdata && (pdata->wires == 8)) 1312 1238 mmc->caps |= (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA); 1313 1239 1314 - host->version = pdata->version; 1240 + id_entry = platform_get_device_id(pdev); 1241 + if (id_entry) 1242 + host->version = id_entry->driver_data; 1315 1243 1316 1244 mmc->ops = &mmc_davinci_ops; 1317 1245 mmc->f_min = 312500; ··· 1482 1406 .name = "davinci_mmc", 1483 1407 .owner = THIS_MODULE, 1484 1408 .pm = davinci_mmcsd_pm_ops, 1409 + .of_match_table = of_match_ptr(davinci_mmc_dt_ids), 1485 1410 }, 1486 1411 .remove = __exit_p(davinci_mmcsd_remove), 1412 + .id_table = davinci_mmc_devtype, 1487 1413 }; 1488 1414 1489 1415 static int __init davinci_mmcsd_init(void)
-3
include/linux/platform_data/mmc-davinci.h
··· 23 23 /* any additional host capabilities: OR'd in to mmc->f_caps */ 24 24 u32 caps; 25 25 26 - /* Version of the MMC/SD controller */ 27 - u8 version; 28 - 29 26 /* Number of sg segments */ 30 27 u8 nr_sg; 31 28 };