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

Merge branch 'next/dt-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt

From Kukjin Kim:

Here is Samsung DT for v3.8 and this is including DT for EXYNOS4X12
SoC, SMDK4412 board, pinctrl for exynos4x12, TMU, MFC, SATA and SATA
PHY.

As I commented on [4/7], this branch merged pinctrl/samsung to support
pinctrl for exynos4x12 without useless merge conflicts.

* 'next/dt-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (32 commits)
ARM: EXYNOS: DT Support for SATA and SATA PHY
ARM: dts: Remove broken-voltage property from sdhci node for exynos4210-trats
ARM: dts: Add node for touchscreen for exynos4210-trats
ARM: dts: Add node for touchscreen voltage regulator for exynos4210-trats
ARM: dts: Add node for i2c3 bus for exynos4210-trats
ARM: dts: Add nodes for GPIO keys available on Trats
ARM: dts: Update for pinctrl-samsung driver for exynos4210-trats
ARM: dts: Add nodes for pin controllers for exynos4x12
pinctrl: samsung: Add support for EXYNOS4X12
gpio: samsung: Skip registration if pinctrl driver is present on EXYNOS4X12
ARM: EXYNOS: Skip wakeup-int setup if pinctrl driver is used on EXYNOS4X12
ARM: dts: add board dts file for EXYNOS4412 based SMDK board
ARM: dts: Add support for EXYNOS4X12 SoCs
ARM: EXYNOS: Add devicetree node for TMU driver for exynos5
ARM: EXYNOS: Add devicetree node for TMU driver for exynos4
ARM: EXYNOS: Add MFC device tree support
ARM: dts: Enable serial controllers on Origen and SMDKV310
Documentation: Update samsung-pinctrl device tree bindings documentation
pinctrl: samsung: Add GPIO to IRQ translation
pinctrl: exynos: Set pin function to EINT in irq_set_type of wake-up EINT
...

Add/add conflicts in:
arch/arm/boot/dts/exynos5250-smdk5250.dts
arch/arm/boot/dts/exynos5250.dtsi
arch/arm/mach-exynos/mach-exynos5-dt.c

Signed-off-by: Olof Johansson <olof@lixom.net>

+2317 -702
+14
Documentation/devicetree/bindings/ata/exynos-sata-phy.txt
··· 1 + * Samsung SATA PHY Controller 2 + 3 + SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers. 4 + Each SATA PHY controller should have its own node. 5 + 6 + Required properties: 7 + - compatible : compatible list, contains "samsung,exynos5-sata-phy" 8 + - reg : <registers mapping> 9 + 10 + Example: 11 + sata@ffe07000 { 12 + compatible = "samsung,exynos5-sata-phy"; 13 + reg = <0xffe07000 0x1000>; 14 + };
+17
Documentation/devicetree/bindings/ata/exynos-sata.txt
··· 1 + * Samsung AHCI SATA Controller 2 + 3 + SATA nodes are defined to describe on-chip Serial ATA controllers. 4 + Each SATA controller should have its own node. 5 + 6 + Required properties: 7 + - compatible : compatible list, contains "samsung,exynos5-sata" 8 + - interrupts : <interrupt mapping for SATA IRQ> 9 + - reg : <registers mapping> 10 + - samsung,sata-freq : <frequency in MHz> 11 + 12 + Example: 13 + sata@ffe08000 { 14 + compatible = "samsung,exynos5-sata"; 15 + reg = <0xffe08000 0x1000>; 16 + interrupts = <115>; 17 + };
+23
Documentation/devicetree/bindings/media/s5p-mfc.txt
··· 1 + * Samsung Multi Format Codec (MFC) 2 + 3 + Multi Format Codec (MFC) is the IP present in Samsung SoCs which 4 + supports high resolution decoding and encoding functionalities. 5 + The MFC device driver is a v4l2 driver which can encode/decode 6 + video raw/elementary streams and has support for all popular 7 + video codecs. 8 + 9 + Required properties: 10 + - compatible : value should be either one among the following 11 + (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs 12 + (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs 13 + 14 + - reg : Physical base address of the IP registers and length of memory 15 + mapped region. 16 + 17 + - interrupts : MFC interrupt number to the CPU. 18 + 19 + - samsung,mfc-r : Base address of the first memory bank used by MFC 20 + for DMA contiguous memory allocation and its size. 21 + 22 + - samsung,mfc-l : Base address of the second memory bank used by MFC 23 + for DMA contiguous memory allocation and its size.
+94 -25
Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
··· 8 8 Required Properties: 9 9 - compatible: should be one of the following. 10 10 - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. 11 + - "samsung,pinctrl-exynos4x12": for Exynos4x12 compatible pin-controller. 11 12 - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. 12 13 13 14 - reg: Base address of the pin controller hardware module and length of 14 15 the address space it occupies. 15 16 16 - - interrupts: interrupt specifier for the controller. The format and value of 17 - the interrupt specifier depends on the interrupt parent for the controller. 17 + - Pin banks as child nodes: Pin banks of the controller are represented by child 18 + nodes of the controller node. Bank name is taken from name of the node. Each 19 + bank node must contain following properties: 20 + 21 + - gpio-controller: identifies the node as a gpio controller and pin bank. 22 + - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO 23 + binding is used, the amount of cells must be specified as 2. See generic 24 + GPIO binding documentation for description of particular cells. 18 25 19 26 - Pin mux/config groups as child nodes: The pin mux (selecting pin function 20 27 mode) and pin config (pull up/down, driver strength) settings are represented ··· 79 72 A. External GPIO Interrupts: For supporting external gpio interrupts, the 80 73 following properties should be specified in the pin-controller device node. 81 74 82 - - interrupt-controller: identifies the controller node as interrupt-parent. 83 - - #interrupt-cells: the value of this property should be 2. 84 - - First Cell: represents the external gpio interrupt number local to the 85 - external gpio interrupt space of the controller. 86 - - Second Cell: flags to identify the type of the interrupt 87 - - 1 = rising edge triggered 88 - - 2 = falling edge triggered 89 - - 3 = rising and falling edge triggered 90 - - 4 = high level triggered 91 - - 8 = low level triggered 75 + - interrupt-parent: phandle of the interrupt parent to which the external 76 + GPIO interrupts are forwarded to. 77 + - interrupts: interrupt specifier for the controller. The format and value of 78 + the interrupt specifier depends on the interrupt parent for the controller. 79 + 80 + In addition, following properties must be present in node of every bank 81 + of pins supporting GPIO interrupts: 82 + 83 + - interrupt-controller: identifies the controller node as interrupt-parent. 84 + - #interrupt-cells: the value of this property should be 2. 85 + - First Cell: represents the external gpio interrupt number local to the 86 + external gpio interrupt space of the controller. 87 + - Second Cell: flags to identify the type of the interrupt 88 + - 1 = rising edge triggered 89 + - 2 = falling edge triggered 90 + - 3 = rising and falling edge triggered 91 + - 4 = high level triggered 92 + - 8 = low level triggered 92 93 93 94 B. External Wakeup Interrupts: For supporting external wakeup interrupts, a 94 95 child node representing the external wakeup interrupt controller should be ··· 109 94 found on Samsung Exynos4210 SoC. 110 95 - interrupt-parent: phandle of the interrupt parent to which the external 111 96 wakeup interrupts are forwarded to. 97 + - interrupts: interrupt used by multiplexed wakeup interrupts. 98 + 99 + In addition, following properties must be present in node of every bank 100 + of pins supporting wake-up interrupts: 101 + 112 102 - interrupt-controller: identifies the node as interrupt-parent. 113 103 - #interrupt-cells: the value of this property should be 2 114 104 - First Cell: represents the external wakeup interrupt number local to ··· 125 105 - 4 = high level triggered 126 106 - 8 = low level triggered 127 107 108 + Node of every bank of pins supporting direct wake-up interrupts (without 109 + multiplexing) must contain following properties: 110 + 111 + - interrupt-parent: phandle of the interrupt parent to which the external 112 + wakeup interrupts are forwarded to. 113 + - interrupts: interrupts of the interrupt parent which are used for external 114 + wakeup interrupts from pins of the bank, must contain interrupts for all 115 + pins of the bank. 116 + 128 117 Aliases: 129 118 130 119 All the pin controller nodes should be represented in the aliases node using 131 120 the following format 'pinctrl{n}' where n is a unique number for the alias. 121 + 122 + Example: A pin-controller node with pin banks: 123 + 124 + pinctrl_0: pinctrl@11400000 { 125 + compatible = "samsung,pinctrl-exynos4210"; 126 + reg = <0x11400000 0x1000>; 127 + interrupts = <0 47 0>; 128 + 129 + /* ... */ 130 + 131 + /* Pin bank without external interrupts */ 132 + gpy0: gpy0 { 133 + gpio-controller; 134 + #gpio-cells = <2>; 135 + }; 136 + 137 + /* ... */ 138 + 139 + /* Pin bank with external GPIO or muxed wake-up interrupts */ 140 + gpj0: gpj0 { 141 + gpio-controller; 142 + #gpio-cells = <2>; 143 + 144 + interrupt-controller; 145 + #interrupt-cells = <2>; 146 + }; 147 + 148 + /* ... */ 149 + 150 + /* Pin bank with external direct wake-up interrupts */ 151 + gpx0: gpx0 { 152 + gpio-controller; 153 + #gpio-cells = <2>; 154 + 155 + interrupt-controller; 156 + interrupt-parent = <&gic>; 157 + interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, 158 + <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; 159 + #interrupt-cells = <2>; 160 + }; 161 + 162 + /* ... */ 163 + }; 132 164 133 165 Example 1: A pin-controller node with pin groups. 134 166 ··· 188 116 compatible = "samsung,pinctrl-exynos4210"; 189 117 reg = <0x11400000 0x1000>; 190 118 interrupts = <0 47 0>; 119 + 120 + /* ... */ 191 121 192 122 uart0_data: uart0-data { 193 123 samsung,pins = "gpa0-0", "gpa0-1"; ··· 232 158 pinctrl_1: pinctrl@11000000 { 233 159 compatible = "samsung,pinctrl-exynos4210"; 234 160 reg = <0x11000000 0x1000>; 235 - interrupts = <0 46 0>; 236 - interrupt-controller; 237 - #interrupt-cells = <2>; 161 + interrupts = <0 46 0> 238 162 239 - wakup_eint: wakeup-interrupt-controller { 163 + /* ... */ 164 + 165 + wakeup-interrupt-controller { 240 166 compatible = "samsung,exynos4210-wakeup-eint"; 241 167 interrupt-parent = <&gic>; 242 - interrupt-controller; 243 - #interrupt-cells = <2>; 244 - interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, 245 - <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, 246 - <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, 247 - <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, 248 - <0 32 0>; 168 + interrupts = <0 32 0>; 249 169 }; 250 170 }; 251 171 ··· 258 190 259 191 static int s3c24xx_serial_probe(struct platform_device *pdev) { 260 192 struct pinctrl *pinctrl; 261 - ... 262 - ... 193 + 194 + /* ... */ 195 + 263 196 pinctrl = devm_pinctrl_get_select_default(&pdev->dev); 264 197 }
+1
arch/arm/boot/dts/Makefile
··· 25 25 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ 26 26 exynos4210-smdkv310.dtb \ 27 27 exynos4210-trats.dtb \ 28 + exynos4412-smdk4412.dtb \ 28 29 exynos5250-smdk5250.dtb 29 30 dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb 30 31 dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
+16
arch/arm/boot/dts/exynos4210-origen.dts
··· 57 57 status = "okay"; 58 58 }; 59 59 60 + serial@13800000 { 61 + status = "okay"; 62 + }; 63 + 64 + serial@13810000 { 65 + status = "okay"; 66 + }; 67 + 68 + serial@13820000 { 69 + status = "okay"; 70 + }; 71 + 72 + serial@13830000 { 73 + status = "okay"; 74 + }; 75 + 60 76 gpio_keys { 61 77 compatible = "gpio-keys"; 62 78 #address-cells = <1>;
+278
arch/arm/boot/dts/exynos4210-pinctrl.dtsi
··· 16 16 17 17 / { 18 18 pinctrl@11400000 { 19 + gpa0: gpa0 { 20 + gpio-controller; 21 + #gpio-cells = <2>; 22 + 23 + interrupt-controller; 24 + #interrupt-cells = <2>; 25 + }; 26 + 27 + gpa1: gpa1 { 28 + gpio-controller; 29 + #gpio-cells = <2>; 30 + 31 + interrupt-controller; 32 + #interrupt-cells = <2>; 33 + }; 34 + 35 + gpb: gpb { 36 + gpio-controller; 37 + #gpio-cells = <2>; 38 + 39 + interrupt-controller; 40 + #interrupt-cells = <2>; 41 + }; 42 + 43 + gpc0: gpc0 { 44 + gpio-controller; 45 + #gpio-cells = <2>; 46 + 47 + interrupt-controller; 48 + #interrupt-cells = <2>; 49 + }; 50 + 51 + gpc1: gpc1 { 52 + gpio-controller; 53 + #gpio-cells = <2>; 54 + 55 + interrupt-controller; 56 + #interrupt-cells = <2>; 57 + }; 58 + 59 + gpd0: gpd0 { 60 + gpio-controller; 61 + #gpio-cells = <2>; 62 + 63 + interrupt-controller; 64 + #interrupt-cells = <2>; 65 + }; 66 + 67 + gpd1: gpd1 { 68 + gpio-controller; 69 + #gpio-cells = <2>; 70 + 71 + interrupt-controller; 72 + #interrupt-cells = <2>; 73 + }; 74 + 75 + gpe0: gpe0 { 76 + gpio-controller; 77 + #gpio-cells = <2>; 78 + 79 + interrupt-controller; 80 + #interrupt-cells = <2>; 81 + }; 82 + 83 + gpe1: gpe1 { 84 + gpio-controller; 85 + #gpio-cells = <2>; 86 + 87 + interrupt-controller; 88 + #interrupt-cells = <2>; 89 + }; 90 + 91 + gpe2: gpe2 { 92 + gpio-controller; 93 + #gpio-cells = <2>; 94 + 95 + interrupt-controller; 96 + #interrupt-cells = <2>; 97 + }; 98 + 99 + gpe3: gpe3 { 100 + gpio-controller; 101 + #gpio-cells = <2>; 102 + 103 + interrupt-controller; 104 + #interrupt-cells = <2>; 105 + }; 106 + 107 + gpe4: gpe4 { 108 + gpio-controller; 109 + #gpio-cells = <2>; 110 + 111 + interrupt-controller; 112 + #interrupt-cells = <2>; 113 + }; 114 + 115 + gpf0: gpf0 { 116 + gpio-controller; 117 + #gpio-cells = <2>; 118 + 119 + interrupt-controller; 120 + #interrupt-cells = <2>; 121 + }; 122 + 123 + gpf1: gpf1 { 124 + gpio-controller; 125 + #gpio-cells = <2>; 126 + 127 + interrupt-controller; 128 + #interrupt-cells = <2>; 129 + }; 130 + 131 + gpf2: gpf2 { 132 + gpio-controller; 133 + #gpio-cells = <2>; 134 + 135 + interrupt-controller; 136 + #interrupt-cells = <2>; 137 + }; 138 + 139 + gpf3: gpf3 { 140 + gpio-controller; 141 + #gpio-cells = <2>; 142 + 143 + interrupt-controller; 144 + #interrupt-cells = <2>; 145 + }; 146 + 19 147 uart0_data: uart0-data { 20 148 samsung,pins = "gpa0-0", "gpa0-1"; 21 149 samsung,pin-function = <0x2>; ··· 333 205 }; 334 206 335 207 pinctrl@11000000 { 208 + gpj0: gpj0 { 209 + gpio-controller; 210 + #gpio-cells = <2>; 211 + 212 + interrupt-controller; 213 + #interrupt-cells = <2>; 214 + }; 215 + 216 + gpj1: gpj1 { 217 + gpio-controller; 218 + #gpio-cells = <2>; 219 + 220 + interrupt-controller; 221 + #interrupt-cells = <2>; 222 + }; 223 + 224 + gpk0: gpk0 { 225 + gpio-controller; 226 + #gpio-cells = <2>; 227 + 228 + interrupt-controller; 229 + #interrupt-cells = <2>; 230 + }; 231 + 232 + gpk1: gpk1 { 233 + gpio-controller; 234 + #gpio-cells = <2>; 235 + 236 + interrupt-controller; 237 + #interrupt-cells = <2>; 238 + }; 239 + 240 + gpk2: gpk2 { 241 + gpio-controller; 242 + #gpio-cells = <2>; 243 + 244 + interrupt-controller; 245 + #interrupt-cells = <2>; 246 + }; 247 + 248 + gpk3: gpk3 { 249 + gpio-controller; 250 + #gpio-cells = <2>; 251 + 252 + interrupt-controller; 253 + #interrupt-cells = <2>; 254 + }; 255 + 256 + gpl0: gpl0 { 257 + gpio-controller; 258 + #gpio-cells = <2>; 259 + 260 + interrupt-controller; 261 + #interrupt-cells = <2>; 262 + }; 263 + 264 + gpl1: gpl1 { 265 + gpio-controller; 266 + #gpio-cells = <2>; 267 + 268 + interrupt-controller; 269 + #interrupt-cells = <2>; 270 + }; 271 + 272 + gpl2: gpl2 { 273 + gpio-controller; 274 + #gpio-cells = <2>; 275 + 276 + interrupt-controller; 277 + #interrupt-cells = <2>; 278 + }; 279 + 280 + gpy0: gpy0 { 281 + gpio-controller; 282 + #gpio-cells = <2>; 283 + }; 284 + 285 + gpy1: gpy1 { 286 + gpio-controller; 287 + #gpio-cells = <2>; 288 + }; 289 + 290 + gpy2: gpy2 { 291 + gpio-controller; 292 + #gpio-cells = <2>; 293 + }; 294 + 295 + gpy3: gpy3 { 296 + gpio-controller; 297 + #gpio-cells = <2>; 298 + }; 299 + 300 + gpy4: gpy4 { 301 + gpio-controller; 302 + #gpio-cells = <2>; 303 + }; 304 + 305 + gpy5: gpy5 { 306 + gpio-controller; 307 + #gpio-cells = <2>; 308 + }; 309 + 310 + gpy6: gpy6 { 311 + gpio-controller; 312 + #gpio-cells = <2>; 313 + }; 314 + 315 + gpx0: gpx0 { 316 + gpio-controller; 317 + #gpio-cells = <2>; 318 + 319 + interrupt-controller; 320 + interrupt-parent = <&gic>; 321 + interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, 322 + <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; 323 + #interrupt-cells = <2>; 324 + }; 325 + 326 + gpx1: gpx1 { 327 + gpio-controller; 328 + #gpio-cells = <2>; 329 + 330 + interrupt-controller; 331 + interrupt-parent = <&gic>; 332 + interrupts = <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, 333 + <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; 334 + #interrupt-cells = <2>; 335 + }; 336 + 337 + gpx2: gpx2 { 338 + gpio-controller; 339 + #gpio-cells = <2>; 340 + 341 + interrupt-controller; 342 + #interrupt-cells = <2>; 343 + }; 344 + 345 + gpx3: gpx3 { 346 + gpio-controller; 347 + #gpio-cells = <2>; 348 + 349 + interrupt-controller; 350 + #interrupt-cells = <2>; 351 + }; 352 + 336 353 sd0_clk: sd0-clk { 337 354 samsung,pins = "gpk0-0"; 338 355 samsung,pin-function = <2>; ··· 711 438 }; 712 439 713 440 pinctrl@03860000 { 441 + gpz: gpz { 442 + gpio-controller; 443 + #gpio-cells = <2>; 444 + }; 445 + 714 446 i2s0_bus: i2s0-bus { 715 447 samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", 716 448 "gpz-4", "gpz-5", "gpz-6";
+16
arch/arm/boot/dts/exynos4210-smdkv310.dts
··· 43 43 status = "okay"; 44 44 }; 45 45 46 + serial@13800000 { 47 + status = "okay"; 48 + }; 49 + 50 + serial@13810000 { 51 + status = "okay"; 52 + }; 53 + 54 + serial@13820000 { 55 + status = "okay"; 56 + }; 57 + 58 + serial@13830000 { 59 + status = "okay"; 60 + }; 61 + 46 62 keypad@100A0000 { 47 63 samsung,keypad-num-rows = <2>; 48 64 samsung,keypad-num-columns = <8>;
+70 -17
arch/arm/boot/dts/exynos4210-trats.dts
··· 35 35 regulator-name = "VMEM_VDD_2.8V"; 36 36 regulator-min-microvolt = <2800000>; 37 37 regulator-max-microvolt = <2800000>; 38 - gpio = <&gpk0 2 1 0 0>; 38 + gpio = <&gpk0 2 0>; 39 39 enable-active-high; 40 40 }; 41 41 42 42 sdhci_emmc: sdhci@12510000 { 43 43 bus-width = <8>; 44 44 non-removable; 45 - broken-voltage; 46 - gpios = <&gpk0 0 2 0 3>, 47 - <&gpk0 1 2 0 3>, 48 - <&gpk0 3 2 2 3>, 49 - <&gpk0 4 2 2 3>, 50 - <&gpk0 5 2 2 3>, 51 - <&gpk0 6 2 2 3>, 52 - <&gpk1 3 3 3 3>, 53 - <&gpk1 4 3 3 3>, 54 - <&gpk1 5 3 3 3>, 55 - <&gpk1 6 3 3 3>; 45 + pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus8>; 46 + pinctrl-names = "default"; 56 47 vmmc-supply = <&vemmc_reg>; 57 48 status = "okay"; 58 49 }; ··· 64 73 status = "okay"; 65 74 }; 66 75 76 + gpio-keys { 77 + compatible = "gpio-keys"; 78 + 79 + vol-down-key { 80 + gpios = <&gpx2 1 1>; 81 + linux,code = <114>; 82 + label = "volume down"; 83 + debounce-interval = <10>; 84 + }; 85 + 86 + vol-up-key { 87 + gpios = <&gpx2 0 1>; 88 + linux,code = <115>; 89 + label = "volume up"; 90 + debounce-interval = <10>; 91 + }; 92 + 93 + power-key { 94 + gpios = <&gpx2 7 1>; 95 + linux,code = <116>; 96 + label = "power"; 97 + debounce-interval = <10>; 98 + gpio-key,wakeup; 99 + }; 100 + 101 + ok-key { 102 + gpios = <&gpx3 5 1>; 103 + linux,code = <352>; 104 + label = "ok"; 105 + debounce-interval = <10>; 106 + }; 107 + }; 108 + 109 + tsp_reg: voltage-regulator { 110 + compatible = "regulator-fixed"; 111 + regulator-name = "TSP_FIXED_VOLTAGES"; 112 + regulator-min-microvolt = <2800000>; 113 + regulator-max-microvolt = <2800000>; 114 + gpio = <&gpl0 3 0>; 115 + enable-active-high; 116 + }; 117 + 118 + i2c@13890000 { 119 + samsung,i2c-sda-delay = <100>; 120 + samsung,i2c-slave-addr = <0x10>; 121 + samsung,i2c-max-bus-freq = <400000>; 122 + pinctrl-0 = <&i2c3_bus>; 123 + pinctrl-names = "default"; 124 + status = "okay"; 125 + 126 + mms114-touchscreen@48 { 127 + compatible = "melfas,mms114"; 128 + reg = <0x48>; 129 + interrupt-parent = <&gpx0>; 130 + interrupts = <4 2>; 131 + x-size = <720>; 132 + y-size = <1280>; 133 + avdd-supply = <&tsp_reg>; 134 + vdd-supply = <&tsp_reg>; 135 + }; 136 + }; 137 + 67 138 i2c@138B0000 { 68 139 samsung,i2c-sda-delay = <100>; 69 140 samsung,i2c-slave-addr = <0x10>; 70 141 samsung,i2c-max-bus-freq = <100000>; 71 - gpios = <&gpb 6 3 3 0>, 72 - <&gpb 7 3 3 0>; 142 + pinctrl-0 = <&i2c5_bus>; 143 + pinctrl-names = "default"; 73 144 status = "okay"; 74 145 75 146 max8997_pmic@66 { ··· 146 93 max8997,pmic-ignore-gpiodvs-side-effect; 147 94 max8997,pmic-buck125-default-dvs-idx = <0>; 148 95 149 - max8997,pmic-buck125-dvs-gpios = <&gpx0 5 1 0 0>, 150 - <&gpx0 6 1 0 0>, 151 - <&gpl0 0 1 0 0>; 96 + max8997,pmic-buck125-dvs-gpios = <&gpx0 5 0>, 97 + <&gpx0 6 0>, 98 + <&gpl0 0 0>; 152 99 153 100 max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>, 154 101 <1250000>, <1200000>,
+6 -238
arch/arm/boot/dts/exynos4210.dtsi
··· 46 46 compatible = "samsung,pinctrl-exynos4210"; 47 47 reg = <0x11400000 0x1000>; 48 48 interrupts = <0 47 0>; 49 - interrupt-controller; 50 - #interrupt-cells = <2>; 51 49 }; 52 50 53 51 pinctrl_1: pinctrl@11000000 { 54 52 compatible = "samsung,pinctrl-exynos4210"; 55 53 reg = <0x11000000 0x1000>; 56 54 interrupts = <0 46 0>; 57 - interrupt-controller; 58 - #interrupt-cells = <2>; 59 55 60 56 wakup_eint: wakeup-interrupt-controller { 61 57 compatible = "samsung,exynos4210-wakeup-eint"; 62 58 interrupt-parent = <&gic>; 63 - interrupt-controller; 64 - #interrupt-cells = <2>; 65 - interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, 66 - <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, 67 - <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, 68 - <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, 69 - <0 32 0>; 59 + interrupts = <0 32 0>; 70 60 }; 71 61 }; 72 62 ··· 65 75 reg = <0x03860000 0x1000>; 66 76 }; 67 77 68 - gpio-controllers { 69 - #address-cells = <1>; 70 - #size-cells = <1>; 71 - gpio-controller; 72 - ranges; 73 - 74 - gpa0: gpio-controller@11400000 { 75 - compatible = "samsung,exynos4-gpio"; 76 - reg = <0x11400000 0x20>; 77 - #gpio-cells = <4>; 78 - }; 79 - 80 - gpa1: gpio-controller@11400020 { 81 - compatible = "samsung,exynos4-gpio"; 82 - reg = <0x11400020 0x20>; 83 - #gpio-cells = <4>; 84 - }; 85 - 86 - gpb: gpio-controller@11400040 { 87 - compatible = "samsung,exynos4-gpio"; 88 - reg = <0x11400040 0x20>; 89 - #gpio-cells = <4>; 90 - }; 91 - 92 - gpc0: gpio-controller@11400060 { 93 - compatible = "samsung,exynos4-gpio"; 94 - reg = <0x11400060 0x20>; 95 - #gpio-cells = <4>; 96 - }; 97 - 98 - gpc1: gpio-controller@11400080 { 99 - compatible = "samsung,exynos4-gpio"; 100 - reg = <0x11400080 0x20>; 101 - #gpio-cells = <4>; 102 - }; 103 - 104 - gpd0: gpio-controller@114000A0 { 105 - compatible = "samsung,exynos4-gpio"; 106 - reg = <0x114000A0 0x20>; 107 - #gpio-cells = <4>; 108 - }; 109 - 110 - gpd1: gpio-controller@114000C0 { 111 - compatible = "samsung,exynos4-gpio"; 112 - reg = <0x114000C0 0x20>; 113 - #gpio-cells = <4>; 114 - }; 115 - 116 - gpe0: gpio-controller@114000E0 { 117 - compatible = "samsung,exynos4-gpio"; 118 - reg = <0x114000E0 0x20>; 119 - #gpio-cells = <4>; 120 - }; 121 - 122 - gpe1: gpio-controller@11400100 { 123 - compatible = "samsung,exynos4-gpio"; 124 - reg = <0x11400100 0x20>; 125 - #gpio-cells = <4>; 126 - }; 127 - 128 - gpe2: gpio-controller@11400120 { 129 - compatible = "samsung,exynos4-gpio"; 130 - reg = <0x11400120 0x20>; 131 - #gpio-cells = <4>; 132 - }; 133 - 134 - gpe3: gpio-controller@11400140 { 135 - compatible = "samsung,exynos4-gpio"; 136 - reg = <0x11400140 0x20>; 137 - #gpio-cells = <4>; 138 - }; 139 - 140 - gpe4: gpio-controller@11400160 { 141 - compatible = "samsung,exynos4-gpio"; 142 - reg = <0x11400160 0x20>; 143 - #gpio-cells = <4>; 144 - }; 145 - 146 - gpf0: gpio-controller@11400180 { 147 - compatible = "samsung,exynos4-gpio"; 148 - reg = <0x11400180 0x20>; 149 - #gpio-cells = <4>; 150 - }; 151 - 152 - gpf1: gpio-controller@114001A0 { 153 - compatible = "samsung,exynos4-gpio"; 154 - reg = <0x114001A0 0x20>; 155 - #gpio-cells = <4>; 156 - }; 157 - 158 - gpf2: gpio-controller@114001C0 { 159 - compatible = "samsung,exynos4-gpio"; 160 - reg = <0x114001C0 0x20>; 161 - #gpio-cells = <4>; 162 - }; 163 - 164 - gpf3: gpio-controller@114001E0 { 165 - compatible = "samsung,exynos4-gpio"; 166 - reg = <0x114001E0 0x20>; 167 - #gpio-cells = <4>; 168 - }; 169 - 170 - gpj0: gpio-controller@11000000 { 171 - compatible = "samsung,exynos4-gpio"; 172 - reg = <0x11000000 0x20>; 173 - #gpio-cells = <4>; 174 - }; 175 - 176 - gpj1: gpio-controller@11000020 { 177 - compatible = "samsung,exynos4-gpio"; 178 - reg = <0x11000020 0x20>; 179 - #gpio-cells = <4>; 180 - }; 181 - 182 - gpk0: gpio-controller@11000040 { 183 - compatible = "samsung,exynos4-gpio"; 184 - reg = <0x11000040 0x20>; 185 - #gpio-cells = <4>; 186 - }; 187 - 188 - gpk1: gpio-controller@11000060 { 189 - compatible = "samsung,exynos4-gpio"; 190 - reg = <0x11000060 0x20>; 191 - #gpio-cells = <4>; 192 - }; 193 - 194 - gpk2: gpio-controller@11000080 { 195 - compatible = "samsung,exynos4-gpio"; 196 - reg = <0x11000080 0x20>; 197 - #gpio-cells = <4>; 198 - }; 199 - 200 - gpk3: gpio-controller@110000A0 { 201 - compatible = "samsung,exynos4-gpio"; 202 - reg = <0x110000A0 0x20>; 203 - #gpio-cells = <4>; 204 - }; 205 - 206 - gpl0: gpio-controller@110000C0 { 207 - compatible = "samsung,exynos4-gpio"; 208 - reg = <0x110000C0 0x20>; 209 - #gpio-cells = <4>; 210 - }; 211 - 212 - gpl1: gpio-controller@110000E0 { 213 - compatible = "samsung,exynos4-gpio"; 214 - reg = <0x110000E0 0x20>; 215 - #gpio-cells = <4>; 216 - }; 217 - 218 - gpl2: gpio-controller@11000100 { 219 - compatible = "samsung,exynos4-gpio"; 220 - reg = <0x11000100 0x20>; 221 - #gpio-cells = <4>; 222 - }; 223 - 224 - gpy0: gpio-controller@11000120 { 225 - compatible = "samsung,exynos4-gpio"; 226 - reg = <0x11000120 0x20>; 227 - #gpio-cells = <4>; 228 - }; 229 - 230 - gpy1: gpio-controller@11000140 { 231 - compatible = "samsung,exynos4-gpio"; 232 - reg = <0x11000140 0x20>; 233 - #gpio-cells = <4>; 234 - }; 235 - 236 - gpy2: gpio-controller@11000160 { 237 - compatible = "samsung,exynos4-gpio"; 238 - reg = <0x11000160 0x20>; 239 - #gpio-cells = <4>; 240 - }; 241 - 242 - gpy3: gpio-controller@11000180 { 243 - compatible = "samsung,exynos4-gpio"; 244 - reg = <0x11000180 0x20>; 245 - #gpio-cells = <4>; 246 - }; 247 - 248 - gpy4: gpio-controller@110001A0 { 249 - compatible = "samsung,exynos4-gpio"; 250 - reg = <0x110001A0 0x20>; 251 - #gpio-cells = <4>; 252 - }; 253 - 254 - gpy5: gpio-controller@110001C0 { 255 - compatible = "samsung,exynos4-gpio"; 256 - reg = <0x110001C0 0x20>; 257 - #gpio-cells = <4>; 258 - }; 259 - 260 - gpy6: gpio-controller@110001E0 { 261 - compatible = "samsung,exynos4-gpio"; 262 - reg = <0x110001E0 0x20>; 263 - #gpio-cells = <4>; 264 - }; 265 - 266 - gpx0: gpio-controller@11000C00 { 267 - compatible = "samsung,exynos4-gpio"; 268 - reg = <0x11000C00 0x20>; 269 - #gpio-cells = <4>; 270 - }; 271 - 272 - gpx1: gpio-controller@11000C20 { 273 - compatible = "samsung,exynos4-gpio"; 274 - reg = <0x11000C20 0x20>; 275 - #gpio-cells = <4>; 276 - }; 277 - 278 - gpx2: gpio-controller@11000C40 { 279 - compatible = "samsung,exynos4-gpio"; 280 - reg = <0x11000C40 0x20>; 281 - #gpio-cells = <4>; 282 - }; 283 - 284 - gpx3: gpio-controller@11000C60 { 285 - compatible = "samsung,exynos4-gpio"; 286 - reg = <0x11000C60 0x20>; 287 - #gpio-cells = <4>; 288 - }; 289 - 290 - gpz: gpio-controller@03860000 { 291 - compatible = "samsung,exynos4-gpio"; 292 - reg = <0x03860000 0x20>; 293 - #gpio-cells = <4>; 294 - }; 78 + tmu@100C0000 { 79 + compatible = "samsung,exynos4210-tmu"; 80 + interrupt-parent = <&combiner>; 81 + reg = <0x100C0000 0x100>; 82 + interrupts = <2 4>; 295 83 }; 296 84 };
+28
arch/arm/boot/dts/exynos4212.dtsi
··· 1 + /* 2 + * Samsung's Exynos4212 SoC device tree source 3 + * 4 + * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 + * 7 + * Samsung's Exynos4212 SoC device nodes are listed in this file. Exynos4212 8 + * based board files can include this file and provide values for board specfic 9 + * bindings. 10 + * 11 + * Note: This file does not include device nodes for all the controllers in 12 + * Exynos4212 SoC. As device tree coverage for Exynos4212 increases, additional 13 + * nodes can be added to this file. 14 + * 15 + * This program is free software; you can redistribute it and/or modify 16 + * it under the terms of the GNU General Public License version 2 as 17 + * published by the Free Software Foundation. 18 + */ 19 + 20 + /include/ "exynos4x12.dtsi" 21 + 22 + / { 23 + compatible = "samsung,exynos4212"; 24 + 25 + gic:interrupt-controller@10490000 { 26 + cpu-offset = <0x8000>; 27 + }; 28 + };
+45
arch/arm/boot/dts/exynos4412-smdk4412.dts
··· 1 + /* 2 + * Samsung's Exynos4412 based SMDK board device tree source 3 + * 4 + * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 + * 7 + * Device tree source file for Samsung's SMDK4412 board which is based on 8 + * Samsung's Exynos4412 SoC. 9 + * 10 + * This program is free software; you can redistribute it and/or modify 11 + * it under the terms of the GNU General Public License version 2 as 12 + * published by the Free Software Foundation. 13 + */ 14 + 15 + /dts-v1/; 16 + /include/ "exynos4412.dtsi" 17 + 18 + / { 19 + model = "Samsung SMDK evaluation board based on Exynos4412"; 20 + compatible = "samsung,smdk4412", "samsung,exynos4412"; 21 + 22 + memory { 23 + reg = <0x40000000 0x40000000>; 24 + }; 25 + 26 + chosen { 27 + bootargs ="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc"; 28 + }; 29 + 30 + serial@13800000 { 31 + status = "okay"; 32 + }; 33 + 34 + serial@13810000 { 35 + status = "okay"; 36 + }; 37 + 38 + serial@13820000 { 39 + status = "okay"; 40 + }; 41 + 42 + serial@13830000 { 43 + status = "okay"; 44 + }; 45 + };
+28
arch/arm/boot/dts/exynos4412.dtsi
··· 1 + /* 2 + * Samsung's Exynos4412 SoC device tree source 3 + * 4 + * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 + * 7 + * Samsung's Exynos4412 SoC device nodes are listed in this file. Exynos4412 8 + * based board files can include this file and provide values for board specfic 9 + * bindings. 10 + * 11 + * Note: This file does not include device nodes for all the controllers in 12 + * Exynos4412 SoC. As device tree coverage for Exynos4412 increases, additional 13 + * nodes can be added to this file. 14 + * 15 + * This program is free software; you can redistribute it and/or modify 16 + * it under the terms of the GNU General Public License version 2 as 17 + * published by the Free Software Foundation. 18 + */ 19 + 20 + /include/ "exynos4x12.dtsi" 21 + 22 + / { 23 + compatible = "samsung,exynos4412"; 24 + 25 + gic:interrupt-controller@10490000 { 26 + cpu-offset = <0x4000>; 27 + }; 28 + };
+965
arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
··· 1 + /* 2 + * Samsung's Exynos4x12 SoCs pin-mux and pin-config device tree source 3 + * 4 + * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 + * 7 + * Samsung's Exynos4x12 SoCs pin-mux and pin-config optiosn are listed as device 8 + * tree nodes are listed in this file. 9 + * 10 + * This program is free software; you can redistribute it and/or modify 11 + * it under the terms of the GNU General Public License version 2 as 12 + * published by the Free Software Foundation. 13 + */ 14 + 15 + / { 16 + pinctrl@11400000 { 17 + gpa0: gpa0 { 18 + gpio-controller; 19 + #gpio-cells = <2>; 20 + 21 + interrupt-controller; 22 + #interrupt-cells = <2>; 23 + }; 24 + 25 + gpa1: gpa1 { 26 + gpio-controller; 27 + #gpio-cells = <2>; 28 + 29 + interrupt-controller; 30 + #interrupt-cells = <2>; 31 + }; 32 + 33 + gpb: gpb { 34 + gpio-controller; 35 + #gpio-cells = <2>; 36 + 37 + interrupt-controller; 38 + #interrupt-cells = <2>; 39 + }; 40 + 41 + gpc0: gpc0 { 42 + gpio-controller; 43 + #gpio-cells = <2>; 44 + 45 + interrupt-controller; 46 + #interrupt-cells = <2>; 47 + }; 48 + 49 + gpc1: gpc1 { 50 + gpio-controller; 51 + #gpio-cells = <2>; 52 + 53 + interrupt-controller; 54 + #interrupt-cells = <2>; 55 + }; 56 + 57 + gpd0: gpd0 { 58 + gpio-controller; 59 + #gpio-cells = <2>; 60 + 61 + interrupt-controller; 62 + #interrupt-cells = <2>; 63 + }; 64 + 65 + gpd1: gpd1 { 66 + gpio-controller; 67 + #gpio-cells = <2>; 68 + 69 + interrupt-controller; 70 + #interrupt-cells = <2>; 71 + }; 72 + 73 + gpf0: gpf0 { 74 + gpio-controller; 75 + #gpio-cells = <2>; 76 + 77 + interrupt-controller; 78 + #interrupt-cells = <2>; 79 + }; 80 + 81 + gpf1: gpf1 { 82 + gpio-controller; 83 + #gpio-cells = <2>; 84 + 85 + interrupt-controller; 86 + #interrupt-cells = <2>; 87 + }; 88 + 89 + gpf2: gpf2 { 90 + gpio-controller; 91 + #gpio-cells = <2>; 92 + 93 + interrupt-controller; 94 + #interrupt-cells = <2>; 95 + }; 96 + 97 + gpf3: gpf3 { 98 + gpio-controller; 99 + #gpio-cells = <2>; 100 + 101 + interrupt-controller; 102 + #interrupt-cells = <2>; 103 + }; 104 + 105 + gpj0: gpj0 { 106 + gpio-controller; 107 + #gpio-cells = <2>; 108 + 109 + interrupt-controller; 110 + #interrupt-cells = <2>; 111 + }; 112 + 113 + gpj1: gpj1 { 114 + gpio-controller; 115 + #gpio-cells = <2>; 116 + 117 + interrupt-controller; 118 + #interrupt-cells = <2>; 119 + }; 120 + 121 + uart0_data: uart0-data { 122 + samsung,pins = "gpa0-0", "gpa0-1"; 123 + samsung,pin-function = <0x2>; 124 + samsung,pin-pud = <0>; 125 + samsung,pin-drv = <0>; 126 + }; 127 + 128 + uart0_fctl: uart0-fctl { 129 + samsung,pins = "gpa0-2", "gpa0-3"; 130 + samsung,pin-function = <2>; 131 + samsung,pin-pud = <0>; 132 + samsung,pin-drv = <0>; 133 + }; 134 + 135 + uart1_data: uart1-data { 136 + samsung,pins = "gpa0-4", "gpa0-5"; 137 + samsung,pin-function = <2>; 138 + samsung,pin-pud = <0>; 139 + samsung,pin-drv = <0>; 140 + }; 141 + 142 + uart1_fctl: uart1-fctl { 143 + samsung,pins = "gpa0-6", "gpa0-7"; 144 + samsung,pin-function = <2>; 145 + samsung,pin-pud = <0>; 146 + samsung,pin-drv = <0>; 147 + }; 148 + 149 + i2c2_bus: i2c2-bus { 150 + samsung,pins = "gpa0-6", "gpa0-7"; 151 + samsung,pin-function = <3>; 152 + samsung,pin-pud = <3>; 153 + samsung,pin-drv = <0>; 154 + }; 155 + 156 + uart2_data: uart2-data { 157 + samsung,pins = "gpa1-0", "gpa1-1"; 158 + samsung,pin-function = <2>; 159 + samsung,pin-pud = <0>; 160 + samsung,pin-drv = <0>; 161 + }; 162 + 163 + uart2_fctl: uart2-fctl { 164 + samsung,pins = "gpa1-2", "gpa1-3"; 165 + samsung,pin-function = <2>; 166 + samsung,pin-pud = <0>; 167 + samsung,pin-drv = <0>; 168 + }; 169 + 170 + uart_audio_a: uart-audio-a { 171 + samsung,pins = "gpa1-0", "gpa1-1"; 172 + samsung,pin-function = <4>; 173 + samsung,pin-pud = <0>; 174 + samsung,pin-drv = <0>; 175 + }; 176 + 177 + i2c3_bus: i2c3-bus { 178 + samsung,pins = "gpa1-2", "gpa1-3"; 179 + samsung,pin-function = <3>; 180 + samsung,pin-pud = <3>; 181 + samsung,pin-drv = <0>; 182 + }; 183 + 184 + uart3_data: uart3-data { 185 + samsung,pins = "gpa1-4", "gpa1-5"; 186 + samsung,pin-function = <2>; 187 + samsung,pin-pud = <0>; 188 + samsung,pin-drv = <0>; 189 + }; 190 + 191 + uart_audio_b: uart-audio-b { 192 + samsung,pins = "gpa1-4", "gpa1-5"; 193 + samsung,pin-function = <4>; 194 + samsung,pin-pud = <0>; 195 + samsung,pin-drv = <0>; 196 + }; 197 + 198 + spi0_bus: spi0-bus { 199 + samsung,pins = "gpb-0", "gpb-2", "gpb-3"; 200 + samsung,pin-function = <2>; 201 + samsung,pin-pud = <3>; 202 + samsung,pin-drv = <0>; 203 + }; 204 + 205 + i2c4_bus: i2c4-bus { 206 + samsung,pins = "gpb-0", "gpb-1"; 207 + samsung,pin-function = <3>; 208 + samsung,pin-pud = <3>; 209 + samsung,pin-drv = <0>; 210 + }; 211 + 212 + spi1_bus: spi1-bus { 213 + samsung,pins = "gpb-4", "gpb-6", "gpb-7"; 214 + samsung,pin-function = <2>; 215 + samsung,pin-pud = <3>; 216 + samsung,pin-drv = <0>; 217 + }; 218 + 219 + i2c5_bus: i2c5-bus { 220 + samsung,pins = "gpb-2", "gpb-3"; 221 + samsung,pin-function = <3>; 222 + samsung,pin-pud = <3>; 223 + samsung,pin-drv = <0>; 224 + }; 225 + 226 + i2s1_bus: i2s1-bus { 227 + samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", 228 + "gpc0-4"; 229 + samsung,pin-function = <2>; 230 + samsung,pin-pud = <0>; 231 + samsung,pin-drv = <0>; 232 + }; 233 + 234 + pcm1_bus: pcm1-bus { 235 + samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", 236 + "gpc0-4"; 237 + samsung,pin-function = <3>; 238 + samsung,pin-pud = <0>; 239 + samsung,pin-drv = <0>; 240 + }; 241 + 242 + ac97_bus: ac97-bus { 243 + samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", 244 + "gpc0-4"; 245 + samsung,pin-function = <4>; 246 + samsung,pin-pud = <0>; 247 + samsung,pin-drv = <0>; 248 + }; 249 + 250 + i2s2_bus: i2s2-bus { 251 + samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", 252 + "gpc1-4"; 253 + samsung,pin-function = <2>; 254 + samsung,pin-pud = <0>; 255 + samsung,pin-drv = <0>; 256 + }; 257 + 258 + pcm2_bus: pcm2-bus { 259 + samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", 260 + "gpc1-4"; 261 + samsung,pin-function = <3>; 262 + samsung,pin-pud = <0>; 263 + samsung,pin-drv = <0>; 264 + }; 265 + 266 + spdif_bus: spdif-bus { 267 + samsung,pins = "gpc1-0", "gpc1-1"; 268 + samsung,pin-function = <4>; 269 + samsung,pin-pud = <0>; 270 + samsung,pin-drv = <0>; 271 + }; 272 + 273 + i2c6_bus: i2c6-bus { 274 + samsung,pins = "gpc1-3", "gpc1-4"; 275 + samsung,pin-function = <4>; 276 + samsung,pin-pud = <3>; 277 + samsung,pin-drv = <0>; 278 + }; 279 + 280 + spi2_bus: spi2-bus { 281 + samsung,pins = "gpc1-1", "gpc1-3", "gpc1-4"; 282 + samsung,pin-function = <5>; 283 + samsung,pin-pud = <3>; 284 + samsung,pin-drv = <0>; 285 + }; 286 + 287 + pwm0_out: pwm0-out { 288 + samsung,pins = "gpd0-0"; 289 + samsung,pin-function = <2>; 290 + samsung,pin-pud = <0>; 291 + samsung,pin-drv = <0>; 292 + }; 293 + 294 + pwm1_out: pwm1-out { 295 + samsung,pins = "gpd0-1"; 296 + samsung,pin-function = <2>; 297 + samsung,pin-pud = <0>; 298 + samsung,pin-drv = <0>; 299 + }; 300 + 301 + lcd_ctrl: lcd-ctrl { 302 + samsung,pins = "gpd0-0", "gpd0-1"; 303 + samsung,pin-function = <3>; 304 + samsung,pin-pud = <0>; 305 + samsung,pin-drv = <0>; 306 + }; 307 + 308 + i2c7_bus: i2c7-bus { 309 + samsung,pins = "gpd0-2", "gpd0-3"; 310 + samsung,pin-function = <3>; 311 + samsung,pin-pud = <3>; 312 + samsung,pin-drv = <0>; 313 + }; 314 + 315 + pwm2_out: pwm2-out { 316 + samsung,pins = "gpd0-2"; 317 + samsung,pin-function = <2>; 318 + samsung,pin-pud = <0>; 319 + samsung,pin-drv = <0>; 320 + }; 321 + 322 + pwm3_out: pwm3-out { 323 + samsung,pins = "gpd0-3"; 324 + samsung,pin-function = <2>; 325 + samsung,pin-pud = <0>; 326 + samsung,pin-drv = <0>; 327 + }; 328 + 329 + i2c0_bus: i2c0-bus { 330 + samsung,pins = "gpd1-0", "gpd1-1"; 331 + samsung,pin-function = <2>; 332 + samsung,pin-pud = <3>; 333 + samsung,pin-drv = <0>; 334 + }; 335 + 336 + mipi0_clk: mipi0-clk { 337 + samsung,pins = "gpd1-0", "gpd1-1"; 338 + samsung,pin-function = <3>; 339 + samsung,pin-pud = <0>; 340 + samsung,pin-drv = <0>; 341 + }; 342 + 343 + i2c1_bus: i2c1-bus { 344 + samsung,pins = "gpd1-2", "gpd1-3"; 345 + samsung,pin-function = <2>; 346 + samsung,pin-pud = <3>; 347 + samsung,pin-drv = <0>; 348 + }; 349 + 350 + mipi1_clk: mipi1-clk { 351 + samsung,pins = "gpd1-2", "gpd1-3"; 352 + samsung,pin-function = <3>; 353 + samsung,pin-pud = <0>; 354 + samsung,pin-drv = <0>; 355 + }; 356 + 357 + lcd_clk: lcd-clk { 358 + samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3"; 359 + samsung,pin-function = <2>; 360 + samsung,pin-pud = <0>; 361 + samsung,pin-drv = <0>; 362 + }; 363 + 364 + lcd_data16: lcd-data-width16 { 365 + samsung,pins = "gpf0-7", "gpf1-0", "gpf1-1", "gpf1-2", 366 + "gpf1-3", "gpf1-6", "gpf1-7", "gpf2-0", 367 + "gpf2-1", "gpf2-2", "gpf2-3", "gpf2-7", 368 + "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3"; 369 + samsung,pin-function = <2>; 370 + samsung,pin-pud = <0>; 371 + samsung,pin-drv = <0>; 372 + }; 373 + 374 + lcd_data18: lcd-data-width18 { 375 + samsung,pins = "gpf0-6", "gpf0-7", "gpf1-0", "gpf1-1", 376 + "gpf1-2", "gpf1-3", "gpf1-6", "gpf1-7", 377 + "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3", 378 + "gpf2-6", "gpf2-7", "gpf3-0", "gpf3-1", 379 + "gpf3-2", "gpf3-3"; 380 + samsung,pin-function = <2>; 381 + samsung,pin-pud = <0>; 382 + samsung,pin-drv = <0>; 383 + }; 384 + 385 + lcd_data24: lcd-data-width24 { 386 + samsung,pins = "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7", 387 + "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3", 388 + "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7", 389 + "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3", 390 + "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7", 391 + "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3"; 392 + samsung,pin-function = <2>; 393 + samsung,pin-pud = <0>; 394 + samsung,pin-drv = <0>; 395 + }; 396 + 397 + lcd_ldi: lcd-ldi { 398 + samsung,pins = "gpf3-4"; 399 + samsung,pin-function = <2>; 400 + samsung,pin-pud = <0>; 401 + samsung,pin-drv = <0>; 402 + }; 403 + 404 + cam_port_a: cam-port-a { 405 + samsung,pins = "gpj0-0", "gpj0-1", "gpj0-2", "gpj0-3", 406 + "gpj0-4", "gpj0-5", "gpj0-6", "gpj0-7", 407 + "gpj1-0", "gpj1-1", "gpj1-2", "gpj1-3", 408 + "gpj1-4"; 409 + samsung,pin-function = <2>; 410 + samsung,pin-pud = <3>; 411 + samsung,pin-drv = <0>; 412 + }; 413 + }; 414 + 415 + pinctrl@11000000 { 416 + gpk0: gpk0 { 417 + gpio-controller; 418 + #gpio-cells = <2>; 419 + 420 + interrupt-controller; 421 + #interrupt-cells = <2>; 422 + }; 423 + 424 + gpk1: gpk1 { 425 + gpio-controller; 426 + #gpio-cells = <2>; 427 + 428 + interrupt-controller; 429 + #interrupt-cells = <2>; 430 + }; 431 + 432 + gpk2: gpk2 { 433 + gpio-controller; 434 + #gpio-cells = <2>; 435 + 436 + interrupt-controller; 437 + #interrupt-cells = <2>; 438 + }; 439 + 440 + gpk3: gpk3 { 441 + gpio-controller; 442 + #gpio-cells = <2>; 443 + 444 + interrupt-controller; 445 + #interrupt-cells = <2>; 446 + }; 447 + 448 + gpl0: gpl0 { 449 + gpio-controller; 450 + #gpio-cells = <2>; 451 + 452 + interrupt-controller; 453 + #interrupt-cells = <2>; 454 + }; 455 + 456 + gpl1: gpl1 { 457 + gpio-controller; 458 + #gpio-cells = <2>; 459 + 460 + interrupt-controller; 461 + #interrupt-cells = <2>; 462 + }; 463 + 464 + gpl2: gpl2 { 465 + gpio-controller; 466 + #gpio-cells = <2>; 467 + 468 + interrupt-controller; 469 + #interrupt-cells = <2>; 470 + }; 471 + 472 + gpm0: gpm0 { 473 + gpio-controller; 474 + #gpio-cells = <2>; 475 + 476 + interrupt-controller; 477 + #interrupt-cells = <2>; 478 + }; 479 + 480 + gpm1: gpm1 { 481 + gpio-controller; 482 + #gpio-cells = <2>; 483 + 484 + interrupt-controller; 485 + #interrupt-cells = <2>; 486 + }; 487 + 488 + gpm2: gpm2 { 489 + gpio-controller; 490 + #gpio-cells = <2>; 491 + 492 + interrupt-controller; 493 + #interrupt-cells = <2>; 494 + }; 495 + 496 + gpm3: gpm3 { 497 + gpio-controller; 498 + #gpio-cells = <2>; 499 + 500 + interrupt-controller; 501 + #interrupt-cells = <2>; 502 + }; 503 + 504 + gpm4: gpm4 { 505 + gpio-controller; 506 + #gpio-cells = <2>; 507 + 508 + interrupt-controller; 509 + #interrupt-cells = <2>; 510 + }; 511 + 512 + gpy0: gpy0 { 513 + gpio-controller; 514 + #gpio-cells = <2>; 515 + }; 516 + 517 + gpy1: gpy1 { 518 + gpio-controller; 519 + #gpio-cells = <2>; 520 + }; 521 + 522 + gpy2: gpy2 { 523 + gpio-controller; 524 + #gpio-cells = <2>; 525 + }; 526 + 527 + gpy3: gpy3 { 528 + gpio-controller; 529 + #gpio-cells = <2>; 530 + }; 531 + 532 + gpy4: gpy4 { 533 + gpio-controller; 534 + #gpio-cells = <2>; 535 + }; 536 + 537 + gpy5: gpy5 { 538 + gpio-controller; 539 + #gpio-cells = <2>; 540 + }; 541 + 542 + gpy6: gpy6 { 543 + gpio-controller; 544 + #gpio-cells = <2>; 545 + }; 546 + 547 + gpx0: gpx0 { 548 + gpio-controller; 549 + #gpio-cells = <2>; 550 + 551 + interrupt-controller; 552 + interrupt-parent = <&gic>; 553 + interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, 554 + <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; 555 + #interrupt-cells = <2>; 556 + }; 557 + 558 + gpx1: gpx1 { 559 + gpio-controller; 560 + #gpio-cells = <2>; 561 + 562 + interrupt-controller; 563 + interrupt-parent = <&gic>; 564 + interrupts = <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, 565 + <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; 566 + #interrupt-cells = <2>; 567 + }; 568 + 569 + gpx2: gpx2 { 570 + gpio-controller; 571 + #gpio-cells = <2>; 572 + 573 + interrupt-controller; 574 + #interrupt-cells = <2>; 575 + }; 576 + 577 + gpx3: gpx3 { 578 + gpio-controller; 579 + #gpio-cells = <2>; 580 + 581 + interrupt-controller; 582 + #interrupt-cells = <2>; 583 + }; 584 + 585 + sd0_clk: sd0-clk { 586 + samsung,pins = "gpk0-0"; 587 + samsung,pin-function = <2>; 588 + samsung,pin-pud = <0>; 589 + samsung,pin-drv = <0>; 590 + }; 591 + 592 + sd0_cmd: sd0-cmd { 593 + samsung,pins = "gpk0-1"; 594 + samsung,pin-function = <2>; 595 + samsung,pin-pud = <0>; 596 + samsung,pin-drv = <0>; 597 + }; 598 + 599 + sd0_cd: sd0-cd { 600 + samsung,pins = "gpk0-2"; 601 + samsung,pin-function = <2>; 602 + samsung,pin-pud = <3>; 603 + samsung,pin-drv = <0>; 604 + }; 605 + 606 + sd0_bus1: sd0-bus-width1 { 607 + samsung,pins = "gpk0-3"; 608 + samsung,pin-function = <2>; 609 + samsung,pin-pud = <3>; 610 + samsung,pin-drv = <0>; 611 + }; 612 + 613 + sd0_bus4: sd0-bus-width4 { 614 + samsung,pins = "gpk0-3", "gpk0-4", "gpk0-5", "gpk0-6"; 615 + samsung,pin-function = <2>; 616 + samsung,pin-pud = <3>; 617 + samsung,pin-drv = <0>; 618 + }; 619 + 620 + sd0_bus8: sd0-bus-width8 { 621 + samsung,pins = "gpk1-3", "gpk1-4", "gpk1-5", "gpk1-6"; 622 + samsung,pin-function = <3>; 623 + samsung,pin-pud = <3>; 624 + samsung,pin-drv = <0>; 625 + }; 626 + 627 + sd4_clk: sd4-clk { 628 + samsung,pins = "gpk0-0"; 629 + samsung,pin-function = <3>; 630 + samsung,pin-pud = <0>; 631 + samsung,pin-drv = <0>; 632 + }; 633 + 634 + sd4_cmd: sd4-cmd { 635 + samsung,pins = "gpk0-1"; 636 + samsung,pin-function = <3>; 637 + samsung,pin-pud = <0>; 638 + samsung,pin-drv = <0>; 639 + }; 640 + 641 + sd4_cd: sd4-cd { 642 + samsung,pins = "gpk0-2"; 643 + samsung,pin-function = <3>; 644 + samsung,pin-pud = <3>; 645 + samsung,pin-drv = <0>; 646 + }; 647 + 648 + sd4_bus1: sd4-bus-width1 { 649 + samsung,pins = "gpk0-3"; 650 + samsung,pin-function = <3>; 651 + samsung,pin-pud = <3>; 652 + samsung,pin-drv = <0>; 653 + }; 654 + 655 + sd4_bus4: sd4-bus-width4 { 656 + samsung,pins = "gpk0-3", "gpk0-4", "gpk0-5", "gpk0-6"; 657 + samsung,pin-function = <3>; 658 + samsung,pin-pud = <3>; 659 + samsung,pin-drv = <0>; 660 + }; 661 + 662 + sd4_bus8: sd4-bus-width8 { 663 + samsung,pins = "gpk1-3", "gpk1-4", "gpk1-5", "gpk1-6"; 664 + samsung,pin-function = <3>; 665 + samsung,pin-pud = <4>; 666 + samsung,pin-drv = <0>; 667 + }; 668 + 669 + sd1_clk: sd1-clk { 670 + samsung,pins = "gpk1-0"; 671 + samsung,pin-function = <2>; 672 + samsung,pin-pud = <0>; 673 + samsung,pin-drv = <0>; 674 + }; 675 + 676 + sd1_cmd: sd1-cmd { 677 + samsung,pins = "gpk1-1"; 678 + samsung,pin-function = <2>; 679 + samsung,pin-pud = <0>; 680 + samsung,pin-drv = <0>; 681 + }; 682 + 683 + sd1_cd: sd1-cd { 684 + samsung,pins = "gpk1-2"; 685 + samsung,pin-function = <2>; 686 + samsung,pin-pud = <3>; 687 + samsung,pin-drv = <0>; 688 + }; 689 + 690 + sd1_bus1: sd1-bus-width1 { 691 + samsung,pins = "gpk1-3"; 692 + samsung,pin-function = <2>; 693 + samsung,pin-pud = <3>; 694 + samsung,pin-drv = <0>; 695 + }; 696 + 697 + sd1_bus4: sd1-bus-width4 { 698 + samsung,pins = "gpk1-3", "gpk1-4", "gpk1-5", "gpk1-6"; 699 + samsung,pin-function = <2>; 700 + samsung,pin-pud = <3>; 701 + samsung,pin-drv = <0>; 702 + }; 703 + 704 + sd2_clk: sd2-clk { 705 + samsung,pins = "gpk2-0"; 706 + samsung,pin-function = <2>; 707 + samsung,pin-pud = <0>; 708 + samsung,pin-drv = <0>; 709 + }; 710 + 711 + sd2_cmd: sd2-cmd { 712 + samsung,pins = "gpk2-1"; 713 + samsung,pin-function = <2>; 714 + samsung,pin-pud = <0>; 715 + samsung,pin-drv = <0>; 716 + }; 717 + 718 + sd2_cd: sd2-cd { 719 + samsung,pins = "gpk2-2"; 720 + samsung,pin-function = <2>; 721 + samsung,pin-pud = <3>; 722 + samsung,pin-drv = <0>; 723 + }; 724 + 725 + sd2_bus1: sd2-bus-width1 { 726 + samsung,pins = "gpk2-3"; 727 + samsung,pin-function = <2>; 728 + samsung,pin-pud = <3>; 729 + samsung,pin-drv = <0>; 730 + }; 731 + 732 + sd2_bus4: sd2-bus-width4 { 733 + samsung,pins = "gpk2-3", "gpk2-4", "gpk2-5", "gpk2-6"; 734 + samsung,pin-function = <2>; 735 + samsung,pin-pud = <3>; 736 + samsung,pin-drv = <0>; 737 + }; 738 + 739 + sd2_bus8: sd2-bus-width8 { 740 + samsung,pins = "gpk3-3", "gpk3-4", "gpk3-5", "gpk3-6"; 741 + samsung,pin-function = <3>; 742 + samsung,pin-pud = <3>; 743 + samsung,pin-drv = <0>; 744 + }; 745 + 746 + sd3_clk: sd3-clk { 747 + samsung,pins = "gpk3-0"; 748 + samsung,pin-function = <2>; 749 + samsung,pin-pud = <0>; 750 + samsung,pin-drv = <0>; 751 + }; 752 + 753 + sd3_cmd: sd3-cmd { 754 + samsung,pins = "gpk3-1"; 755 + samsung,pin-function = <2>; 756 + samsung,pin-pud = <0>; 757 + samsung,pin-drv = <0>; 758 + }; 759 + 760 + sd3_cd: sd3-cd { 761 + samsung,pins = "gpk3-2"; 762 + samsung,pin-function = <2>; 763 + samsung,pin-pud = <3>; 764 + samsung,pin-drv = <0>; 765 + }; 766 + 767 + sd3_bus1: sd3-bus-width1 { 768 + samsung,pins = "gpk3-3"; 769 + samsung,pin-function = <2>; 770 + samsung,pin-pud = <3>; 771 + samsung,pin-drv = <0>; 772 + }; 773 + 774 + sd3_bus4: sd3-bus-width4 { 775 + samsung,pins = "gpk3-3", "gpk3-4", "gpk3-5", "gpk3-6"; 776 + samsung,pin-function = <2>; 777 + samsung,pin-pud = <3>; 778 + samsung,pin-drv = <0>; 779 + }; 780 + 781 + keypad_col0: keypad-col0 { 782 + samsung,pins = "gpl2-0"; 783 + samsung,pin-function = <3>; 784 + samsung,pin-pud = <0>; 785 + samsung,pin-drv = <0>; 786 + }; 787 + 788 + keypad_col1: keypad-col1 { 789 + samsung,pins = "gpl2-1"; 790 + samsung,pin-function = <3>; 791 + samsung,pin-pud = <0>; 792 + samsung,pin-drv = <0>; 793 + }; 794 + 795 + keypad_col2: keypad-col2 { 796 + samsung,pins = "gpl2-2"; 797 + samsung,pin-function = <3>; 798 + samsung,pin-pud = <0>; 799 + samsung,pin-drv = <0>; 800 + }; 801 + 802 + keypad_col3: keypad-col3 { 803 + samsung,pins = "gpl2-3"; 804 + samsung,pin-function = <3>; 805 + samsung,pin-pud = <0>; 806 + samsung,pin-drv = <0>; 807 + }; 808 + 809 + keypad_col4: keypad-col4 { 810 + samsung,pins = "gpl2-4"; 811 + samsung,pin-function = <3>; 812 + samsung,pin-pud = <0>; 813 + samsung,pin-drv = <0>; 814 + }; 815 + 816 + keypad_col5: keypad-col5 { 817 + samsung,pins = "gpl2-5"; 818 + samsung,pin-function = <3>; 819 + samsung,pin-pud = <0>; 820 + samsung,pin-drv = <0>; 821 + }; 822 + 823 + keypad_col6: keypad-col6 { 824 + samsung,pins = "gpl2-6"; 825 + samsung,pin-function = <3>; 826 + samsung,pin-pud = <0>; 827 + samsung,pin-drv = <0>; 828 + }; 829 + 830 + keypad_col7: keypad-col7 { 831 + samsung,pins = "gpl2-7"; 832 + samsung,pin-function = <3>; 833 + samsung,pin-pud = <0>; 834 + samsung,pin-drv = <0>; 835 + }; 836 + 837 + cam_port_b: cam-port-b { 838 + samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3", 839 + "gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7", 840 + "gpm1-0", "gpm1-1", "gpm2-0", "gpm2-1", 841 + "gpm2-2"; 842 + samsung,pin-function = <3>; 843 + samsung,pin-pud = <3>; 844 + samsung,pin-drv = <0>; 845 + }; 846 + 847 + eint0: ext-int0 { 848 + samsung,pins = "gpx0-0"; 849 + samsung,pin-function = <0xf>; 850 + samsung,pin-pud = <0>; 851 + samsung,pin-drv = <0>; 852 + }; 853 + 854 + eint8: ext-int8 { 855 + samsung,pins = "gpx1-0"; 856 + samsung,pin-function = <0xf>; 857 + samsung,pin-pud = <0>; 858 + samsung,pin-drv = <0>; 859 + }; 860 + 861 + eint15: ext-int15 { 862 + samsung,pins = "gpx1-7"; 863 + samsung,pin-function = <0xf>; 864 + samsung,pin-pud = <0>; 865 + samsung,pin-drv = <0>; 866 + }; 867 + 868 + eint16: ext-int16 { 869 + samsung,pins = "gpx2-0"; 870 + samsung,pin-function = <0xf>; 871 + samsung,pin-pud = <0>; 872 + samsung,pin-drv = <0>; 873 + }; 874 + 875 + eint31: ext-int31 { 876 + samsung,pins = "gpx3-7"; 877 + samsung,pin-function = <0xf>; 878 + samsung,pin-pud = <0>; 879 + samsung,pin-drv = <0>; 880 + }; 881 + }; 882 + 883 + pinctrl@03860000 { 884 + gpz: gpz { 885 + gpio-controller; 886 + #gpio-cells = <2>; 887 + 888 + interrupt-controller; 889 + #interrupt-cells = <2>; 890 + }; 891 + 892 + i2s0_bus: i2s0-bus { 893 + samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", 894 + "gpz-4", "gpz-5", "gpz-6"; 895 + samsung,pin-function = <0x2>; 896 + samsung,pin-pud = <0>; 897 + samsung,pin-drv = <0>; 898 + }; 899 + 900 + pcm0_bus: pcm0-bus { 901 + samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", 902 + "gpz-4"; 903 + samsung,pin-function = <0x3>; 904 + samsung,pin-pud = <0>; 905 + samsung,pin-drv = <0>; 906 + }; 907 + }; 908 + 909 + pinctrl@106E0000 { 910 + gpv0: gpv0 { 911 + gpio-controller; 912 + #gpio-cells = <2>; 913 + 914 + interrupt-controller; 915 + #interrupt-cells = <2>; 916 + }; 917 + 918 + gpv1: gpv1 { 919 + gpio-controller; 920 + #gpio-cells = <2>; 921 + 922 + interrupt-controller; 923 + #interrupt-cells = <2>; 924 + }; 925 + 926 + gpv2: gpv2 { 927 + gpio-controller; 928 + #gpio-cells = <2>; 929 + 930 + interrupt-controller; 931 + #interrupt-cells = <2>; 932 + }; 933 + 934 + gpv3: gpv3 { 935 + gpio-controller; 936 + #gpio-cells = <2>; 937 + 938 + interrupt-controller; 939 + #interrupt-cells = <2>; 940 + }; 941 + 942 + gpv4: gpv4 { 943 + gpio-controller; 944 + #gpio-cells = <2>; 945 + 946 + interrupt-controller; 947 + #interrupt-cells = <2>; 948 + }; 949 + 950 + c2c_bus: c2c-bus { 951 + samsung,pins = "gpv0-0", "gpv0-1", "gpv0-2", "gpv0-3", 952 + "gpv0-4", "gpv0-5", "gpv0-6", "gpv0-7", 953 + "gpv1-0", "gpv1-1", "gpv1-2", "gpv1-3", 954 + "gpv1-4", "gpv1-5", "gpv1-6", "gpv1-7", 955 + "gpv2-0", "gpv2-1", "gpv2-2", "gpv2-3", 956 + "gpv2-4", "gpv2-5", "gpv2-6", "gpv2-7", 957 + "gpv3-0", "gpv3-1", "gpv3-2", "gpv3-3", 958 + "gpv3-4", "gpv3-5", "gpv3-6", "gpv3-7", 959 + "gpv4-0", "gpv4-1"; 960 + samsung,pin-function = <0x2>; 961 + samsung,pin-pud = <0>; 962 + samsung,pin-drv = <0>; 963 + }; 964 + }; 965 + };
+69
arch/arm/boot/dts/exynos4x12.dtsi
··· 1 + /* 2 + * Samsung's Exynos4x12 SoCs device tree source 3 + * 4 + * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 + * 7 + * Samsung's Exynos4x12 SoCs device nodes are listed in this file. Exynos4x12 8 + * based board files can include this file and provide values for board specfic 9 + * bindings. 10 + * 11 + * Note: This file does not include device nodes for all the controllers in 12 + * Exynos4x12 SoC. As device tree coverage for Exynos4x12 increases, additional 13 + * nodes can be added to this file. 14 + * 15 + * This program is free software; you can redistribute it and/or modify 16 + * it under the terms of the GNU General Public License version 2 as 17 + * published by the Free Software Foundation. 18 + */ 19 + 20 + /include/ "exynos4.dtsi" 21 + /include/ "exynos4x12-pinctrl.dtsi" 22 + 23 + / { 24 + aliases { 25 + pinctrl0 = &pinctrl_0; 26 + pinctrl1 = &pinctrl_1; 27 + pinctrl2 = &pinctrl_2; 28 + pinctrl3 = &pinctrl_3; 29 + }; 30 + 31 + combiner:interrupt-controller@10440000 { 32 + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, 33 + <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, 34 + <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>, 35 + <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>, 36 + <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>; 37 + }; 38 + 39 + pinctrl_0: pinctrl@11400000 { 40 + compatible = "samsung,pinctrl-exynos4x12"; 41 + reg = <0x11400000 0x1000>; 42 + interrupts = <0 47 0>; 43 + }; 44 + 45 + pinctrl_1: pinctrl@11000000 { 46 + compatible = "samsung,pinctrl-exynos4x12"; 47 + reg = <0x11000000 0x1000>; 48 + interrupts = <0 46 0>; 49 + 50 + wakup_eint: wakeup-interrupt-controller { 51 + compatible = "samsung,exynos4210-wakeup-eint"; 52 + interrupt-parent = <&gic>; 53 + interrupts = <0 32 0>; 54 + }; 55 + }; 56 + 57 + pinctrl_2: pinctrl@03860000 { 58 + compatible = "samsung,pinctrl-exynos4x12"; 59 + reg = <0x03860000 0x1000>; 60 + interrupt-parent = <&combiner>; 61 + interrupts = <10 0>; 62 + }; 63 + 64 + pinctrl_3: pinctrl@106E0000 { 65 + compatible = "samsung,pinctrl-exynos4x12"; 66 + reg = <0x106E0000 0x1000>; 67 + interrupts = <0 72 0>; 68 + }; 69 + };
+20
arch/arm/boot/dts/exynos5250-smdk5250.dts
··· 55 55 }; 56 56 }; 57 57 58 + i2c@121D0000 { 59 + samsung,i2c-sda-delay = <100>; 60 + samsung,i2c-max-bus-freq = <40000>; 61 + samsung,i2c-slave-addr = <0x38>; 62 + 63 + sata-phy { 64 + compatible = "samsung,sata-phy"; 65 + reg = <0x38>; 66 + }; 67 + }; 68 + 69 + sata@122F0000 { 70 + samsung,sata-freq = <66>; 71 + }; 72 + 58 73 i2c@12C80000 { 59 74 samsung,i2c-sda-delay = <100>; 60 75 samsung,i2c-max-bus-freq = <66000>; ··· 202 187 203 188 hdmi { 204 189 hpd-gpio = <&gpx3 7 0xf 1 3>; 190 + }; 191 + 192 + codec@11000000 { 193 + samsung,mfc-r = <0x43000000 0x800000>; 194 + samsung,mfc-l = <0x51000000 0x800000>; 205 195 }; 206 196 };
+30
arch/arm/boot/dts/exynos5250.dtsi
··· 62 62 interrupts = <0 42 0>; 63 63 }; 64 64 65 + codec@11000000 { 66 + compatible = "samsung,mfc-v6"; 67 + reg = <0x11000000 0x10000>; 68 + interrupts = <0 96 0>; 69 + }; 70 + 65 71 rtc { 66 72 compatible = "samsung,s3c6410-rtc"; 67 73 reg = <0x101E0000 0x100>; 68 74 interrupts = <0 43 0>, <0 44 0>; 75 + }; 76 + 77 + tmu@10060000 { 78 + compatible = "samsung,exynos5250-tmu"; 79 + reg = <0x10060000 0x100>; 80 + interrupts = <0 65 0>; 69 81 }; 70 82 71 83 serial@12C00000 { ··· 102 90 compatible = "samsung,exynos4210-uart"; 103 91 reg = <0x12C30000 0x100>; 104 92 interrupts = <0 54 0>; 93 + }; 94 + 95 + sata@122F0000 { 96 + compatible = "samsung,exynos5-sata-ahci"; 97 + reg = <0x122F0000 0x1ff>; 98 + interrupts = <0 115 0>; 99 + }; 100 + 101 + sata-phy@12170000 { 102 + compatible = "samsung,exynos5-sata-phy"; 103 + reg = <0x12170000 0x1ff>; 105 104 }; 106 105 107 106 i2c@12C60000 { ··· 185 162 interrupts = <0 64 0>; 186 163 #address-cells = <1>; 187 164 #size-cells = <0>; 165 + }; 166 + 167 + i2c@121D0000 { 168 + compatible = "samsung,exynos5-sata-phy-i2c"; 169 + reg = <0x121D0000 0x100>; 170 + #address-cells = <1>; 171 + #size-cells = <0>; 188 172 }; 189 173 190 174 spi_0: spi@12d20000 {
+1
arch/arm/mach-exynos/Kconfig
··· 63 63 depends on ARCH_EXYNOS5 64 64 select S5P_PM if PM 65 65 select S5P_SLEEP if PM 66 + select S5P_DEV_MFC 66 67 select SAMSUNG_DMADEV 67 68 help 68 69 Enable EXYNOS5250 SoC support
+4
arch/arm/mach-exynos/clock-exynos4.c
··· 576 576 .enable = exynos4_clk_ip_peril_ctrl, 577 577 .ctrlbit = (1 << 15), 578 578 }, { 579 + .name = "tmu_apbif", 580 + .enable = exynos4_clk_ip_perir_ctrl, 581 + .ctrlbit = (1 << 17), 582 + }, { 579 583 .name = "keypad", 580 584 .enable = exynos4_clk_ip_perir_ctrl, 581 585 .ctrlbit = (1 << 16),
+6 -1
arch/arm/mach-exynos/clock-exynos5.c
··· 621 621 .enable = exynos5_clk_ip_peric_ctrl, 622 622 .ctrlbit = (1 << 24), 623 623 }, { 624 + .name = "tmu_apbif", 625 + .parent = &exynos5_clk_aclk_66.clk, 626 + .enable = exynos5_clk_ip_peris_ctrl, 627 + .ctrlbit = (1 << 21), 628 + }, { 624 629 .name = "rtc", 625 630 .parent = &exynos5_clk_aclk_66.clk, 626 631 .enable = exynos5_clk_ip_peris_ctrl, ··· 674 669 .ctrlbit = (1 << 25), 675 670 }, { 676 671 .name = "mfc", 677 - .devname = "s5p-mfc", 672 + .devname = "s5p-mfc-v6", 678 673 .enable = exynos5_clk_ip_mfc_ctrl, 679 674 .ctrlbit = (1 << 0), 680 675 }, {
+5 -2
arch/arm/mach-exynos/common.c
··· 997 997 * platforms switch over to using the pinctrl driver, the wakeup 998 998 * interrupt support code here can be completely removed. 999 999 */ 1000 + static const struct of_device_id exynos_pinctrl_ids[] = { 1001 + { .compatible = "samsung,pinctrl-exynos4210", }, 1002 + { .compatible = "samsung,pinctrl-exynos4x12", }, 1003 + }; 1000 1004 struct device_node *pctrl_np, *wkup_np; 1001 - const char *pctrl_compat = "samsung,pinctrl-exynos4210"; 1002 1005 const char *wkup_compat = "samsung,exynos4210-wakeup-eint"; 1003 1006 1004 - for_each_compatible_node(pctrl_np, NULL, pctrl_compat) { 1007 + for_each_matching_node(pctrl_np, exynos_pinctrl_ids) { 1005 1008 if (of_device_is_available(pctrl_np)) { 1006 1009 wkup_np = of_find_compatible_node(pctrl_np, NULL, 1007 1010 wkup_compat);
+3
arch/arm/mach-exynos/include/mach/irqs.h
··· 136 136 #define EXYNOS4_IRQ_TSI IRQ_SPI(115) 137 137 #define EXYNOS4_IRQ_SATA IRQ_SPI(116) 138 138 139 + #define EXYNOS4_IRQ_TMU_TRIG0 COMBINER_IRQ(2, 4) 140 + #define EXYNOS4_IRQ_TMU_TRIG1 COMBINER_IRQ(3, 4) 141 + 139 142 #define EXYNOS4_IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(4, 0) 140 143 #define EXYNOS4_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(4, 1) 141 144 #define EXYNOS4_IRQ_SYSMMU_FIMC0_0 COMBINER_IRQ(4, 2)
+2
arch/arm/mach-exynos/include/mach/map.h
··· 88 88 #define EXYNOS4_PA_TWD 0x10500600 89 89 #define EXYNOS4_PA_L2CC 0x10502000 90 90 91 + #define EXYNOS4_PA_TMU 0x100C0000 92 + 91 93 #define EXYNOS4_PA_MDMA0 0x10810000 92 94 #define EXYNOS4_PA_MDMA1 0x12850000 93 95 #define EXYNOS4_PA_PDMA0 0x12680000
+4
arch/arm/mach-exynos/mach-exynos4-dt.c
··· 77 77 "exynos4210-spi.2", NULL), 78 78 OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), 79 79 OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), 80 + OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU, 81 + "exynos-tmu", NULL), 80 82 {}, 81 83 }; 82 84 ··· 96 94 97 95 static char const *exynos4_dt_compat[] __initdata = { 98 96 "samsung,exynos4210", 97 + "samsung,exynos4212", 98 + "samsung,exynos4412", 99 99 NULL 100 100 }; 101 101
+24
arch/arm/mach-exynos/mach-exynos5-dt.c
··· 11 11 12 12 #include <linux/of_platform.h> 13 13 #include <linux/serial_core.h> 14 + #include <linux/memblock.h> 15 + #include <linux/of_fdt.h> 14 16 15 17 #include <asm/mach/arch.h> 16 18 #include <asm/hardware/gic.h> ··· 20 18 21 19 #include <plat/cpu.h> 22 20 #include <plat/regs-serial.h> 21 + #include <plat/mfc.h> 23 22 24 23 #include "common.h" 25 24 ··· 68 65 "exynos4210-spi.1", NULL), 69 66 OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS5_PA_SPI2, 70 67 "exynos4210-spi.2", NULL), 68 + OF_DEV_AUXDATA("samsung,exynos5-sata-ahci", 0x122F0000, 69 + "exynos5-sata", NULL), 70 + OF_DEV_AUXDATA("samsung,exynos5-sata-phy", 0x12170000, 71 + "exynos5-sata-phy", NULL), 72 + OF_DEV_AUXDATA("samsung,exynos5-sata-phy-i2c", 0x121D0000, 73 + "exynos5-sata-phy-i2c", NULL), 71 74 OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL), 72 75 OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL), 73 76 OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL), ··· 89 80 "exynos5-hdmi", NULL), 90 81 OF_DEV_AUXDATA("samsung,exynos5-mixer", 0x14450000, 91 82 "exynos5-mixer", NULL), 83 + OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL), 84 + OF_DEV_AUXDATA("samsung,exynos5250-tmu", 0x10060000, 85 + "exynos-tmu", NULL), 92 86 {}, 93 87 }; 94 88 ··· 112 100 NULL 113 101 }; 114 102 103 + static void __init exynos5_reserve(void) 104 + { 105 + struct s5p_mfc_dt_meminfo mfc_mem; 106 + 107 + /* Reserve memory for MFC only if it's available */ 108 + mfc_mem.compatible = "samsung,mfc-v6"; 109 + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) 110 + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, 111 + mfc_mem.lsize); 112 + } 113 + 115 114 DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") 116 115 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 117 116 .init_irq = exynos5_init_irq, ··· 134 111 .timer = &exynos4_timer, 135 112 .dt_compat = exynos5250_dt_compat, 136 113 .restart = exynos5_restart, 114 + .reserve = exynos5_reserve, 137 115 MACHINE_END
+1
arch/arm/plat-samsung/devs.c
··· 933 933 .coherent_dma_mask = DMA_BIT_MASK(32), 934 934 }, 935 935 }; 936 + 936 937 #endif /* CONFIG_S5P_DEV_MFC */ 937 938 938 939 /* MIPI CSIS */
+11
arch/arm/plat-samsung/include/plat/mfc.h
··· 10 10 #ifndef __PLAT_SAMSUNG_MFC_H 11 11 #define __PLAT_SAMSUNG_MFC_H __FILE__ 12 12 13 + struct s5p_mfc_dt_meminfo { 14 + unsigned long loff; 15 + unsigned long lsize; 16 + unsigned long roff; 17 + unsigned long rsize; 18 + char *compatible; 19 + }; 20 + 13 21 /** 14 22 * s5p_mfc_reserve_mem - function to early reserve memory for MFC driver 15 23 * @rbase: base address for MFC 'right' memory interface ··· 31 23 */ 32 24 void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, 33 25 phys_addr_t lbase, unsigned int lsize); 26 + 27 + int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, 28 + int depth, void *data); 34 29 35 30 #endif /* __PLAT_SAMSUNG_MFC_H */
+34
arch/arm/plat-samsung/s5p-dev-mfc.c
··· 14 14 #include <linux/dma-mapping.h> 15 15 #include <linux/memblock.h> 16 16 #include <linux/ioport.h> 17 + #include <linux/of_fdt.h> 18 + #include <linux/of.h> 17 19 18 20 #include <mach/map.h> 19 21 #include <plat/devs.h> ··· 71 69 return 0; 72 70 } 73 71 device_initcall(s5p_mfc_memory_init); 72 + 73 + #ifdef CONFIG_OF 74 + int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, 75 + int depth, void *data) 76 + { 77 + __be32 *prop; 78 + unsigned long len; 79 + struct s5p_mfc_dt_meminfo *mfc_mem = data; 80 + 81 + if (!data) 82 + return 0; 83 + 84 + if (!of_flat_dt_is_compatible(node, mfc_mem->compatible)) 85 + return 0; 86 + 87 + prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len); 88 + if (!prop || (len != 2 * sizeof(unsigned long))) 89 + return 0; 90 + 91 + mfc_mem->loff = be32_to_cpu(prop[0]); 92 + mfc_mem->lsize = be32_to_cpu(prop[1]); 93 + 94 + prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len); 95 + if (!prop || (len != 2 * sizeof(unsigned long))) 96 + return 0; 97 + 98 + mfc_mem->roff = be32_to_cpu(prop[0]); 99 + mfc_mem->rsize = be32_to_cpu(prop[1]); 100 + 101 + return 1; 102 + } 103 + #endif
+22 -21
drivers/gpio/gpio-samsung.c
··· 2797 2797 int group = 0; 2798 2798 void __iomem *gpx_base; 2799 2799 2800 - #ifdef CONFIG_PINCTRL_SAMSUNG 2801 - /* 2802 - * This gpio driver includes support for device tree support and 2803 - * there are platforms using it. In order to maintain 2804 - * compatibility with those platforms, and to allow non-dt 2805 - * Exynos4210 platforms to use this gpiolib support, a check 2806 - * is added to find out if there is a active pin-controller 2807 - * driver support available. If it is available, this gpiolib 2808 - * support is ignored and the gpiolib support available in 2809 - * pin-controller driver is used. This is a temporary check and 2810 - * will go away when all of the Exynos4210 platforms have 2811 - * switched to using device tree and the pin-ctrl driver. 2812 - */ 2813 - struct device_node *pctrl_np; 2814 - const char *pctrl_compat = "samsung,pinctrl-exynos4210"; 2815 - pctrl_np = of_find_compatible_node(NULL, NULL, pctrl_compat); 2816 - if (pctrl_np) 2817 - if (of_device_is_available(pctrl_np)) 2818 - return; 2819 - #endif 2820 - 2821 2800 /* gpio part1 */ 2822 2801 gpio_base1 = ioremap(EXYNOS4_PA_GPIO1, SZ_4K); 2823 2802 if (gpio_base1 == NULL) { ··· 3010 3031 struct samsung_gpio_chip *chip; 3011 3032 int i, nr_chips; 3012 3033 int group = 0; 3034 + 3035 + #ifdef CONFIG_PINCTRL_SAMSUNG 3036 + /* 3037 + * This gpio driver includes support for device tree support and there 3038 + * are platforms using it. In order to maintain compatibility with those 3039 + * platforms, and to allow non-dt Exynos4210 platforms to use this 3040 + * gpiolib support, a check is added to find out if there is a active 3041 + * pin-controller driver support available. If it is available, this 3042 + * gpiolib support is ignored and the gpiolib support available in 3043 + * pin-controller driver is used. This is a temporary check and will go 3044 + * away when all of the Exynos4210 platforms have switched to using 3045 + * device tree and the pin-ctrl driver. 3046 + */ 3047 + struct device_node *pctrl_np; 3048 + static const struct of_device_id exynos_pinctrl_ids[] = { 3049 + { .compatible = "samsung,pinctrl-exynos4210", }, 3050 + { .compatible = "samsung,pinctrl-exynos4x12", }, 3051 + }; 3052 + for_each_matching_node(pctrl_np, exynos_pinctrl_ids) 3053 + if (pctrl_np && of_device_is_available(pctrl_np)) 3054 + return -ENODEV; 3055 + #endif 3013 3056 3014 3057 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs)); 3015 3058
+288 -189
drivers/pinctrl/pinctrl-exynos.c
··· 40 40 41 41 static void exynos_gpio_irq_unmask(struct irq_data *irqd) 42 42 { 43 - struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; 44 - struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); 45 - unsigned long reg_mask = d->ctrl->geint_mask + edata->eint_offset; 43 + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 44 + struct samsung_pinctrl_drv_data *d = bank->drvdata; 45 + unsigned long reg_mask = d->ctrl->geint_mask + bank->eint_offset; 46 46 unsigned long mask; 47 47 48 48 mask = readl(d->virt_base + reg_mask); 49 - mask &= ~(1 << edata->pin); 49 + mask &= ~(1 << irqd->hwirq); 50 50 writel(mask, d->virt_base + reg_mask); 51 51 } 52 52 53 53 static void exynos_gpio_irq_mask(struct irq_data *irqd) 54 54 { 55 - struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; 56 - struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); 57 - unsigned long reg_mask = d->ctrl->geint_mask + edata->eint_offset; 55 + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 56 + struct samsung_pinctrl_drv_data *d = bank->drvdata; 57 + unsigned long reg_mask = d->ctrl->geint_mask + bank->eint_offset; 58 58 unsigned long mask; 59 59 60 60 mask = readl(d->virt_base + reg_mask); 61 - mask |= 1 << edata->pin; 61 + mask |= 1 << irqd->hwirq; 62 62 writel(mask, d->virt_base + reg_mask); 63 63 } 64 64 65 65 static void exynos_gpio_irq_ack(struct irq_data *irqd) 66 66 { 67 - struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; 68 - struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); 69 - unsigned long reg_pend = d->ctrl->geint_pend + edata->eint_offset; 67 + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 68 + struct samsung_pinctrl_drv_data *d = bank->drvdata; 69 + unsigned long reg_pend = d->ctrl->geint_pend + bank->eint_offset; 70 70 71 - writel(1 << edata->pin, d->virt_base + reg_pend); 71 + writel(1 << irqd->hwirq, d->virt_base + reg_pend); 72 72 } 73 73 74 74 static int exynos_gpio_irq_set_type(struct irq_data *irqd, unsigned int type) 75 75 { 76 - struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; 76 + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 77 + struct samsung_pinctrl_drv_data *d = bank->drvdata; 77 78 struct samsung_pin_ctrl *ctrl = d->ctrl; 78 - struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); 79 - struct samsung_pin_bank *bank = edata->bank; 80 - unsigned int shift = EXYNOS_EINT_CON_LEN * edata->pin; 79 + unsigned int pin = irqd->hwirq; 80 + unsigned int shift = EXYNOS_EINT_CON_LEN * pin; 81 81 unsigned int con, trig_type; 82 - unsigned long reg_con = ctrl->geint_con + edata->eint_offset; 82 + unsigned long reg_con = ctrl->geint_con + bank->eint_offset; 83 83 unsigned int mask; 84 84 85 85 switch (type) { ··· 114 114 writel(con, d->virt_base + reg_con); 115 115 116 116 reg_con = bank->pctl_offset; 117 - shift = edata->pin * bank->func_width; 117 + shift = pin * bank->func_width; 118 118 mask = (1 << bank->func_width) - 1; 119 119 120 120 con = readl(d->virt_base + reg_con); ··· 136 136 .irq_set_type = exynos_gpio_irq_set_type, 137 137 }; 138 138 139 - /* 140 - * given a controller-local external gpio interrupt number, prepare the handler 141 - * data for it. 142 - */ 143 - static struct exynos_geint_data *exynos_get_eint_data(irq_hw_number_t hw, 144 - struct samsung_pinctrl_drv_data *d) 145 - { 146 - struct samsung_pin_bank *bank = d->ctrl->pin_banks; 147 - struct exynos_geint_data *eint_data; 148 - unsigned int nr_banks = d->ctrl->nr_banks, idx; 149 - unsigned int irq_base = 0, eint_offset = 0; 150 - 151 - if (hw >= d->ctrl->nr_gint) { 152 - dev_err(d->dev, "unsupported ext-gpio interrupt\n"); 153 - return NULL; 154 - } 155 - 156 - for (idx = 0; idx < nr_banks; idx++, bank++) { 157 - if (bank->eint_type != EINT_TYPE_GPIO) 158 - continue; 159 - if ((hw >= irq_base) && (hw < (irq_base + bank->nr_pins))) 160 - break; 161 - irq_base += bank->nr_pins; 162 - eint_offset += 4; 163 - } 164 - 165 - if (idx == nr_banks) { 166 - dev_err(d->dev, "pin bank not found for ext-gpio interrupt\n"); 167 - return NULL; 168 - } 169 - 170 - eint_data = devm_kzalloc(d->dev, sizeof(*eint_data), GFP_KERNEL); 171 - if (!eint_data) { 172 - dev_err(d->dev, "no memory for eint-gpio data\n"); 173 - return NULL; 174 - } 175 - 176 - eint_data->bank = bank; 177 - eint_data->pin = hw - irq_base; 178 - eint_data->eint_offset = eint_offset; 179 - return eint_data; 180 - } 181 - 182 139 static int exynos_gpio_irq_map(struct irq_domain *h, unsigned int virq, 183 140 irq_hw_number_t hw) 184 141 { 185 - struct samsung_pinctrl_drv_data *d = h->host_data; 186 - struct exynos_geint_data *eint_data; 142 + struct samsung_pin_bank *b = h->host_data; 187 143 188 - eint_data = exynos_get_eint_data(hw, d); 189 - if (!eint_data) 190 - return -EINVAL; 191 - 192 - irq_set_handler_data(virq, eint_data); 193 - irq_set_chip_data(virq, h->host_data); 144 + irq_set_chip_data(virq, b); 194 145 irq_set_chip_and_handler(virq, &exynos_gpio_irq_chip, 195 146 handle_level_irq); 196 147 set_irq_flags(virq, IRQF_VALID); 197 148 return 0; 198 - } 199 - 200 - static void exynos_gpio_irq_unmap(struct irq_domain *h, unsigned int virq) 201 - { 202 - struct samsung_pinctrl_drv_data *d = h->host_data; 203 - struct exynos_geint_data *eint_data; 204 - 205 - eint_data = irq_get_handler_data(virq); 206 - devm_kfree(d->dev, eint_data); 207 149 } 208 150 209 151 /* ··· 153 211 */ 154 212 static const struct irq_domain_ops exynos_gpio_irqd_ops = { 155 213 .map = exynos_gpio_irq_map, 156 - .unmap = exynos_gpio_irq_unmap, 157 214 .xlate = irq_domain_xlate_twocell, 158 215 }; 159 216 ··· 171 230 return IRQ_HANDLED; 172 231 bank += (group - 1); 173 232 174 - virq = irq_linear_revmap(d->gpio_irqd, bank->irq_base + pin); 233 + virq = irq_linear_revmap(bank->irq_domain, pin); 175 234 if (!virq) 176 235 return IRQ_NONE; 177 236 generic_handle_irq(virq); ··· 184 243 */ 185 244 static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) 186 245 { 246 + struct samsung_pin_bank *bank; 187 247 struct device *dev = d->dev; 188 248 unsigned int ret; 249 + unsigned int i; 189 250 190 251 if (!d->irq) { 191 252 dev_err(dev, "irq number not available\n"); ··· 201 258 return -ENXIO; 202 259 } 203 260 204 - d->gpio_irqd = irq_domain_add_linear(dev->of_node, d->ctrl->nr_gint, 205 - &exynos_gpio_irqd_ops, d); 206 - if (!d->gpio_irqd) { 207 - dev_err(dev, "gpio irq domain allocation failed\n"); 208 - return -ENXIO; 261 + bank = d->ctrl->pin_banks; 262 + for (i = 0; i < d->ctrl->nr_banks; ++i, ++bank) { 263 + if (bank->eint_type != EINT_TYPE_GPIO) 264 + continue; 265 + bank->irq_domain = irq_domain_add_linear(bank->of_node, 266 + bank->nr_pins, &exynos_gpio_irqd_ops, bank); 267 + if (!bank->irq_domain) { 268 + dev_err(dev, "gpio irq domain add failed\n"); 269 + return -ENXIO; 270 + } 209 271 } 210 272 211 273 return 0; ··· 218 270 219 271 static void exynos_wkup_irq_unmask(struct irq_data *irqd) 220 272 { 221 - struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); 222 - unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; 223 - unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); 224 - unsigned long reg_mask = d->ctrl->weint_mask + (bank << 2); 273 + struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd); 274 + struct samsung_pinctrl_drv_data *d = b->drvdata; 275 + unsigned long reg_mask = d->ctrl->weint_mask + b->eint_offset; 225 276 unsigned long mask; 226 277 227 278 mask = readl(d->virt_base + reg_mask); 228 - mask &= ~(1 << pin); 279 + mask &= ~(1 << irqd->hwirq); 229 280 writel(mask, d->virt_base + reg_mask); 230 281 } 231 282 232 283 static void exynos_wkup_irq_mask(struct irq_data *irqd) 233 284 { 234 - struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); 235 - unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; 236 - unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); 237 - unsigned long reg_mask = d->ctrl->weint_mask + (bank << 2); 285 + struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd); 286 + struct samsung_pinctrl_drv_data *d = b->drvdata; 287 + unsigned long reg_mask = d->ctrl->weint_mask + b->eint_offset; 238 288 unsigned long mask; 239 289 240 290 mask = readl(d->virt_base + reg_mask); 241 - mask |= 1 << pin; 291 + mask |= 1 << irqd->hwirq; 242 292 writel(mask, d->virt_base + reg_mask); 243 293 } 244 294 245 295 static void exynos_wkup_irq_ack(struct irq_data *irqd) 246 296 { 247 - struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); 248 - unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; 249 - unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); 250 - unsigned long pend = d->ctrl->weint_pend + (bank << 2); 297 + struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd); 298 + struct samsung_pinctrl_drv_data *d = b->drvdata; 299 + unsigned long pend = d->ctrl->weint_pend + b->eint_offset; 251 300 252 - writel(1 << pin, d->virt_base + pend); 301 + writel(1 << irqd->hwirq, d->virt_base + pend); 253 302 } 254 303 255 304 static int exynos_wkup_irq_set_type(struct irq_data *irqd, unsigned int type) 256 305 { 257 - struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); 258 - unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; 259 - unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); 260 - unsigned long reg_con = d->ctrl->weint_con + (bank << 2); 306 + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 307 + struct samsung_pinctrl_drv_data *d = bank->drvdata; 308 + unsigned int pin = irqd->hwirq; 309 + unsigned long reg_con = d->ctrl->weint_con + bank->eint_offset; 261 310 unsigned long shift = EXYNOS_EINT_CON_LEN * pin; 262 311 unsigned long con, trig_type; 312 + unsigned int mask; 263 313 264 314 switch (type) { 265 315 case IRQ_TYPE_EDGE_RISING: ··· 289 343 con &= ~(EXYNOS_EINT_CON_MASK << shift); 290 344 con |= trig_type << shift; 291 345 writel(con, d->virt_base + reg_con); 346 + 347 + reg_con = bank->pctl_offset; 348 + shift = pin * bank->func_width; 349 + mask = (1 << bank->func_width) - 1; 350 + 351 + con = readl(d->virt_base + reg_con); 352 + con &= ~(mask << shift); 353 + con |= EXYNOS_EINT_FUNC << shift; 354 + writel(con, d->virt_base + reg_con); 355 + 292 356 return 0; 293 357 } 294 358 ··· 317 361 static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) 318 362 { 319 363 struct exynos_weint_data *eintd = irq_get_handler_data(irq); 364 + struct samsung_pin_bank *bank = eintd->bank; 320 365 struct irq_chip *chip = irq_get_chip(irq); 321 366 int eint_irq; 322 367 ··· 327 370 if (chip->irq_ack) 328 371 chip->irq_ack(&desc->irq_data); 329 372 330 - eint_irq = irq_linear_revmap(eintd->domain, eintd->irq); 373 + eint_irq = irq_linear_revmap(bank->irq_domain, eintd->irq); 331 374 generic_handle_irq(eint_irq); 332 375 chip->irq_unmask(&desc->irq_data); 333 376 chained_irq_exit(chip, desc); 334 377 } 335 378 336 - static inline void exynos_irq_demux_eint(int irq_base, unsigned long pend, 337 - struct irq_domain *domain) 379 + static inline void exynos_irq_demux_eint(unsigned long pend, 380 + struct irq_domain *domain) 338 381 { 339 382 unsigned int irq; 340 383 341 384 while (pend) { 342 385 irq = fls(pend) - 1; 343 - generic_handle_irq(irq_find_mapping(domain, irq_base + irq)); 386 + generic_handle_irq(irq_find_mapping(domain, irq)); 344 387 pend &= ~(1 << irq); 345 388 } 346 389 } ··· 349 392 static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) 350 393 { 351 394 struct irq_chip *chip = irq_get_chip(irq); 352 - struct exynos_weint_data *eintd = irq_get_handler_data(irq); 353 - struct samsung_pinctrl_drv_data *d = eintd->domain->host_data; 395 + struct exynos_muxed_weint_data *eintd = irq_get_handler_data(irq); 396 + struct samsung_pinctrl_drv_data *d = eintd->banks[0]->drvdata; 397 + struct samsung_pin_ctrl *ctrl = d->ctrl; 354 398 unsigned long pend; 355 399 unsigned long mask; 400 + int i; 356 401 357 402 chained_irq_enter(chip, desc); 358 - pend = readl(d->virt_base + d->ctrl->weint_pend + 0x8); 359 - mask = readl(d->virt_base + d->ctrl->weint_mask + 0x8); 360 - exynos_irq_demux_eint(16, pend & ~mask, eintd->domain); 361 - pend = readl(d->virt_base + d->ctrl->weint_pend + 0xC); 362 - mask = readl(d->virt_base + d->ctrl->weint_mask + 0xC); 363 - exynos_irq_demux_eint(24, pend & ~mask, eintd->domain); 403 + 404 + for (i = 0; i < eintd->nr_banks; ++i) { 405 + struct samsung_pin_bank *b = eintd->banks[i]; 406 + pend = readl(d->virt_base + ctrl->weint_pend + b->eint_offset); 407 + mask = readl(d->virt_base + ctrl->weint_mask + b->eint_offset); 408 + exynos_irq_demux_eint(pend & ~mask, b->irq_domain); 409 + } 410 + 364 411 chained_irq_exit(chip, desc); 365 412 } 366 413 ··· 394 433 struct device *dev = d->dev; 395 434 struct device_node *wkup_np = NULL; 396 435 struct device_node *np; 436 + struct samsung_pin_bank *bank; 397 437 struct exynos_weint_data *weint_data; 438 + struct exynos_muxed_weint_data *muxed_data; 439 + unsigned int muxed_banks = 0; 440 + unsigned int i; 398 441 int idx, irq; 399 442 400 443 for_each_child_of_node(dev->of_node, np) { ··· 410 445 if (!wkup_np) 411 446 return -ENODEV; 412 447 413 - d->wkup_irqd = irq_domain_add_linear(wkup_np, d->ctrl->nr_wint, 414 - &exynos_wkup_irqd_ops, d); 415 - if (!d->wkup_irqd) { 416 - dev_err(dev, "wakeup irq domain allocation failed\n"); 417 - return -ENXIO; 448 + bank = d->ctrl->pin_banks; 449 + for (i = 0; i < d->ctrl->nr_banks; ++i, ++bank) { 450 + if (bank->eint_type != EINT_TYPE_WKUP) 451 + continue; 452 + 453 + bank->irq_domain = irq_domain_add_linear(bank->of_node, 454 + bank->nr_pins, &exynos_wkup_irqd_ops, bank); 455 + if (!bank->irq_domain) { 456 + dev_err(dev, "wkup irq domain add failed\n"); 457 + return -ENXIO; 458 + } 459 + 460 + if (!of_find_property(bank->of_node, "interrupts", NULL)) { 461 + bank->eint_type = EINT_TYPE_WKUP_MUX; 462 + ++muxed_banks; 463 + continue; 464 + } 465 + 466 + weint_data = devm_kzalloc(dev, bank->nr_pins 467 + * sizeof(*weint_data), GFP_KERNEL); 468 + if (!weint_data) { 469 + dev_err(dev, "could not allocate memory for weint_data\n"); 470 + return -ENOMEM; 471 + } 472 + 473 + for (idx = 0; idx < bank->nr_pins; ++idx) { 474 + irq = irq_of_parse_and_map(bank->of_node, idx); 475 + if (!irq) { 476 + dev_err(dev, "irq number for eint-%s-%d not found\n", 477 + bank->name, idx); 478 + continue; 479 + } 480 + weint_data[idx].irq = idx; 481 + weint_data[idx].bank = bank; 482 + irq_set_handler_data(irq, &weint_data[idx]); 483 + irq_set_chained_handler(irq, exynos_irq_eint0_15); 484 + } 418 485 } 419 486 420 - weint_data = devm_kzalloc(dev, sizeof(*weint_data) * 17, GFP_KERNEL); 421 - if (!weint_data) { 422 - dev_err(dev, "could not allocate memory for weint_data\n"); 487 + if (!muxed_banks) 488 + return 0; 489 + 490 + irq = irq_of_parse_and_map(wkup_np, 0); 491 + if (!irq) { 492 + dev_err(dev, "irq number for muxed EINTs not found\n"); 493 + return 0; 494 + } 495 + 496 + muxed_data = devm_kzalloc(dev, sizeof(*muxed_data) 497 + + muxed_banks*sizeof(struct samsung_pin_bank *), GFP_KERNEL); 498 + if (!muxed_data) { 499 + dev_err(dev, "could not allocate memory for muxed_data\n"); 423 500 return -ENOMEM; 424 501 } 425 502 426 - irq = irq_of_parse_and_map(wkup_np, 16); 427 - if (irq) { 428 - weint_data[16].domain = d->wkup_irqd; 429 - irq_set_chained_handler(irq, exynos_irq_demux_eint16_31); 430 - irq_set_handler_data(irq, &weint_data[16]); 431 - } else { 432 - dev_err(dev, "irq number for EINT16-32 not found\n"); 433 - } 503 + irq_set_chained_handler(irq, exynos_irq_demux_eint16_31); 504 + irq_set_handler_data(irq, muxed_data); 434 505 435 - for (idx = 0; idx < 16; idx++) { 436 - weint_data[idx].domain = d->wkup_irqd; 437 - weint_data[idx].irq = idx; 506 + bank = d->ctrl->pin_banks; 507 + idx = 0; 508 + for (i = 0; i < d->ctrl->nr_banks; ++i, ++bank) { 509 + if (bank->eint_type != EINT_TYPE_WKUP_MUX) 510 + continue; 438 511 439 - irq = irq_of_parse_and_map(wkup_np, idx); 440 - if (irq) { 441 - irq_set_handler_data(irq, &weint_data[idx]); 442 - irq_set_chained_handler(irq, exynos_irq_eint0_15); 443 - } else { 444 - dev_err(dev, "irq number for eint-%x not found\n", idx); 445 - } 512 + muxed_data->banks[idx++] = bank; 446 513 } 514 + muxed_data->nr_banks = muxed_banks; 515 + 447 516 return 0; 448 517 } 449 518 450 519 /* pin banks of exynos4210 pin-controller 0 */ 451 520 static struct samsung_pin_bank exynos4210_pin_banks0[] = { 452 - EXYNOS_PIN_BANK_EINTG(0x000, EXYNOS4210_GPIO_A0, "gpa0"), 453 - EXYNOS_PIN_BANK_EINTG(0x020, EXYNOS4210_GPIO_A1, "gpa1"), 454 - EXYNOS_PIN_BANK_EINTG(0x040, EXYNOS4210_GPIO_B, "gpb"), 455 - EXYNOS_PIN_BANK_EINTG(0x060, EXYNOS4210_GPIO_C0, "gpc0"), 456 - EXYNOS_PIN_BANK_EINTG(0x080, EXYNOS4210_GPIO_C1, "gpc1"), 457 - EXYNOS_PIN_BANK_EINTG(0x0A0, EXYNOS4210_GPIO_D0, "gpd0"), 458 - EXYNOS_PIN_BANK_EINTG(0x0C0, EXYNOS4210_GPIO_D1, "gpd1"), 459 - EXYNOS_PIN_BANK_EINTG(0x0E0, EXYNOS4210_GPIO_E0, "gpe0"), 460 - EXYNOS_PIN_BANK_EINTG(0x100, EXYNOS4210_GPIO_E1, "gpe1"), 461 - EXYNOS_PIN_BANK_EINTG(0x120, EXYNOS4210_GPIO_E2, "gpe2"), 462 - EXYNOS_PIN_BANK_EINTG(0x140, EXYNOS4210_GPIO_E3, "gpe3"), 463 - EXYNOS_PIN_BANK_EINTG(0x160, EXYNOS4210_GPIO_E4, "gpe4"), 464 - EXYNOS_PIN_BANK_EINTG(0x180, EXYNOS4210_GPIO_F0, "gpf0"), 465 - EXYNOS_PIN_BANK_EINTG(0x1A0, EXYNOS4210_GPIO_F1, "gpf1"), 466 - EXYNOS_PIN_BANK_EINTG(0x1C0, EXYNOS4210_GPIO_F2, "gpf2"), 467 - EXYNOS_PIN_BANK_EINTG(0x1E0, EXYNOS4210_GPIO_F3, "gpf3"), 521 + EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 522 + EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 523 + EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), 524 + EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), 525 + EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), 526 + EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), 527 + EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), 528 + EXYNOS_PIN_BANK_EINTG(5, 0x0E0, "gpe0", 0x1c), 529 + EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20), 530 + EXYNOS_PIN_BANK_EINTG(6, 0x120, "gpe2", 0x24), 531 + EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpe3", 0x28), 532 + EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpe4", 0x2c), 533 + EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), 534 + EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), 535 + EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), 536 + EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), 468 537 }; 469 538 470 539 /* pin banks of exynos4210 pin-controller 1 */ 471 540 static struct samsung_pin_bank exynos4210_pin_banks1[] = { 472 - EXYNOS_PIN_BANK_EINTG(0x000, EXYNOS4210_GPIO_J0, "gpj0"), 473 - EXYNOS_PIN_BANK_EINTG(0x020, EXYNOS4210_GPIO_J1, "gpj1"), 474 - EXYNOS_PIN_BANK_EINTG(0x040, EXYNOS4210_GPIO_K0, "gpk0"), 475 - EXYNOS_PIN_BANK_EINTG(0x060, EXYNOS4210_GPIO_K1, "gpk1"), 476 - EXYNOS_PIN_BANK_EINTG(0x080, EXYNOS4210_GPIO_K2, "gpk2"), 477 - EXYNOS_PIN_BANK_EINTG(0x0A0, EXYNOS4210_GPIO_K3, "gpk3"), 478 - EXYNOS_PIN_BANK_EINTG(0x0C0, EXYNOS4210_GPIO_L0, "gpl0"), 479 - EXYNOS_PIN_BANK_EINTG(0x0E0, EXYNOS4210_GPIO_L1, "gpl1"), 480 - EXYNOS_PIN_BANK_EINTG(0x100, EXYNOS4210_GPIO_L2, "gpl2"), 481 - EXYNOS_PIN_BANK_EINTN(0x120, EXYNOS4210_GPIO_Y0, "gpy0"), 482 - EXYNOS_PIN_BANK_EINTN(0x140, EXYNOS4210_GPIO_Y1, "gpy1"), 483 - EXYNOS_PIN_BANK_EINTN(0x160, EXYNOS4210_GPIO_Y2, "gpy2"), 484 - EXYNOS_PIN_BANK_EINTN(0x180, EXYNOS4210_GPIO_Y3, "gpy3"), 485 - EXYNOS_PIN_BANK_EINTN(0x1A0, EXYNOS4210_GPIO_Y4, "gpy4"), 486 - EXYNOS_PIN_BANK_EINTN(0x1C0, EXYNOS4210_GPIO_Y5, "gpy5"), 487 - EXYNOS_PIN_BANK_EINTN(0x1E0, EXYNOS4210_GPIO_Y6, "gpy6"), 488 - EXYNOS_PIN_BANK_EINTN(0xC00, EXYNOS4210_GPIO_X0, "gpx0"), 489 - EXYNOS_PIN_BANK_EINTN(0xC20, EXYNOS4210_GPIO_X1, "gpx1"), 490 - EXYNOS_PIN_BANK_EINTN(0xC40, EXYNOS4210_GPIO_X2, "gpx2"), 491 - EXYNOS_PIN_BANK_EINTN(0xC60, EXYNOS4210_GPIO_X3, "gpx3"), 541 + EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpj0", 0x00), 542 + EXYNOS_PIN_BANK_EINTG(5, 0x020, "gpj1", 0x04), 543 + EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), 544 + EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), 545 + EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), 546 + EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), 547 + EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpl0", 0x18), 548 + EXYNOS_PIN_BANK_EINTG(3, 0x0E0, "gpl1", 0x1c), 549 + EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), 550 + EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), 551 + EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), 552 + EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), 553 + EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), 554 + EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), 555 + EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), 556 + EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), 557 + EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 558 + EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 559 + EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 560 + EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 492 561 }; 493 562 494 563 /* pin banks of exynos4210 pin-controller 2 */ 495 564 static struct samsung_pin_bank exynos4210_pin_banks2[] = { 496 - EXYNOS_PIN_BANK_EINTN(0x000, EXYNOS4210_GPIO_Z, "gpz"), 565 + EXYNOS_PIN_BANK_EINTN(7, 0x000, "gpz"), 497 566 }; 498 567 499 568 /* ··· 539 540 /* pin-controller instance 0 data */ 540 541 .pin_banks = exynos4210_pin_banks0, 541 542 .nr_banks = ARRAY_SIZE(exynos4210_pin_banks0), 542 - .base = EXYNOS4210_GPIO_A0_START, 543 - .nr_pins = EXYNOS4210_GPIOA_NR_PINS, 544 - .nr_gint = EXYNOS4210_GPIOA_NR_GINT, 545 543 .geint_con = EXYNOS_GPIO_ECON_OFFSET, 546 544 .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, 547 545 .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, ··· 549 553 /* pin-controller instance 1 data */ 550 554 .pin_banks = exynos4210_pin_banks1, 551 555 .nr_banks = ARRAY_SIZE(exynos4210_pin_banks1), 552 - .base = EXYNOS4210_GPIOA_NR_PINS, 553 - .nr_pins = EXYNOS4210_GPIOB_NR_PINS, 554 - .nr_gint = EXYNOS4210_GPIOB_NR_GINT, 555 - .nr_wint = 32, 556 556 .geint_con = EXYNOS_GPIO_ECON_OFFSET, 557 557 .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, 558 558 .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, ··· 563 571 /* pin-controller instance 2 data */ 564 572 .pin_banks = exynos4210_pin_banks2, 565 573 .nr_banks = ARRAY_SIZE(exynos4210_pin_banks2), 566 - .base = EXYNOS4210_GPIOA_NR_PINS + 567 - EXYNOS4210_GPIOB_NR_PINS, 568 - .nr_pins = EXYNOS4210_GPIOC_NR_PINS, 569 574 .label = "exynos4210-gpio-ctrl2", 575 + }, 576 + }; 577 + 578 + /* pin banks of exynos4x12 pin-controller 0 */ 579 + static struct samsung_pin_bank exynos4x12_pin_banks0[] = { 580 + EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 581 + EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), 582 + EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), 583 + EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), 584 + EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), 585 + EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), 586 + EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), 587 + EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), 588 + EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), 589 + EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), 590 + EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), 591 + EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x40), 592 + EXYNOS_PIN_BANK_EINTG(5, 0x260, "gpj1", 0x44), 593 + }; 594 + 595 + /* pin banks of exynos4x12 pin-controller 1 */ 596 + static struct samsung_pin_bank exynos4x12_pin_banks1[] = { 597 + EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), 598 + EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), 599 + EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), 600 + EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), 601 + EXYNOS_PIN_BANK_EINTG(7, 0x0C0, "gpl0", 0x18), 602 + EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpl1", 0x1c), 603 + EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), 604 + EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24), 605 + EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28), 606 + EXYNOS_PIN_BANK_EINTG(5, 0x2A0, "gpm2", 0x2c), 607 + EXYNOS_PIN_BANK_EINTG(8, 0x2C0, "gpm3", 0x30), 608 + EXYNOS_PIN_BANK_EINTG(8, 0x2E0, "gpm4", 0x34), 609 + EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), 610 + EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), 611 + EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), 612 + EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), 613 + EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), 614 + EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), 615 + EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), 616 + EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), 617 + EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), 618 + EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), 619 + EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), 620 + }; 621 + 622 + /* pin banks of exynos4x12 pin-controller 2 */ 623 + static struct samsung_pin_bank exynos4x12_pin_banks2[] = { 624 + EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), 625 + }; 626 + 627 + /* pin banks of exynos4x12 pin-controller 3 */ 628 + static struct samsung_pin_bank exynos4x12_pin_banks3[] = { 629 + EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00), 630 + EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04), 631 + EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpv2", 0x08), 632 + EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv3", 0x0c), 633 + EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpv4", 0x10), 634 + }; 635 + 636 + /* 637 + * Samsung pinctrl driver data for Exynos4x12 SoC. Exynos4x12 SoC includes 638 + * four gpio/pin-mux/pinconfig controllers. 639 + */ 640 + struct samsung_pin_ctrl exynos4x12_pin_ctrl[] = { 641 + { 642 + /* pin-controller instance 0 data */ 643 + .pin_banks = exynos4x12_pin_banks0, 644 + .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks0), 645 + .geint_con = EXYNOS_GPIO_ECON_OFFSET, 646 + .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, 647 + .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, 648 + .svc = EXYNOS_SVC_OFFSET, 649 + .eint_gpio_init = exynos_eint_gpio_init, 650 + .label = "exynos4x12-gpio-ctrl0", 651 + }, { 652 + /* pin-controller instance 1 data */ 653 + .pin_banks = exynos4x12_pin_banks1, 654 + .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks1), 655 + .geint_con = EXYNOS_GPIO_ECON_OFFSET, 656 + .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, 657 + .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, 658 + .weint_con = EXYNOS_WKUP_ECON_OFFSET, 659 + .weint_mask = EXYNOS_WKUP_EMASK_OFFSET, 660 + .weint_pend = EXYNOS_WKUP_EPEND_OFFSET, 661 + .svc = EXYNOS_SVC_OFFSET, 662 + .eint_gpio_init = exynos_eint_gpio_init, 663 + .eint_wkup_init = exynos_eint_wkup_init, 664 + .label = "exynos4x12-gpio-ctrl1", 665 + }, { 666 + /* pin-controller instance 2 data */ 667 + .pin_banks = exynos4x12_pin_banks2, 668 + .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks2), 669 + .geint_con = EXYNOS_GPIO_ECON_OFFSET, 670 + .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, 671 + .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, 672 + .svc = EXYNOS_SVC_OFFSET, 673 + .eint_gpio_init = exynos_eint_gpio_init, 674 + .label = "exynos4x12-gpio-ctrl2", 675 + }, { 676 + /* pin-controller instance 3 data */ 677 + .pin_banks = exynos4x12_pin_banks3, 678 + .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks3), 679 + .geint_con = EXYNOS_GPIO_ECON_OFFSET, 680 + .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, 681 + .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, 682 + .svc = EXYNOS_SVC_OFFSET, 683 + .eint_gpio_init = exynos_eint_gpio_init, 684 + .label = "exynos4x12-gpio-ctrl3", 570 685 }, 571 686 };
+30 -140
drivers/pinctrl/pinctrl-exynos.h
··· 17 17 * (at your option) any later version. 18 18 */ 19 19 20 - #define EXYNOS_GPIO_START(__gpio) ((__gpio##_START) + (__gpio##_NR)) 21 - 22 - #define EXYNOS4210_GPIO_A0_NR (8) 23 - #define EXYNOS4210_GPIO_A1_NR (6) 24 - #define EXYNOS4210_GPIO_B_NR (8) 25 - #define EXYNOS4210_GPIO_C0_NR (5) 26 - #define EXYNOS4210_GPIO_C1_NR (5) 27 - #define EXYNOS4210_GPIO_D0_NR (4) 28 - #define EXYNOS4210_GPIO_D1_NR (4) 29 - #define EXYNOS4210_GPIO_E0_NR (5) 30 - #define EXYNOS4210_GPIO_E1_NR (8) 31 - #define EXYNOS4210_GPIO_E2_NR (6) 32 - #define EXYNOS4210_GPIO_E3_NR (8) 33 - #define EXYNOS4210_GPIO_E4_NR (8) 34 - #define EXYNOS4210_GPIO_F0_NR (8) 35 - #define EXYNOS4210_GPIO_F1_NR (8) 36 - #define EXYNOS4210_GPIO_F2_NR (8) 37 - #define EXYNOS4210_GPIO_F3_NR (6) 38 - #define EXYNOS4210_GPIO_J0_NR (8) 39 - #define EXYNOS4210_GPIO_J1_NR (5) 40 - #define EXYNOS4210_GPIO_K0_NR (7) 41 - #define EXYNOS4210_GPIO_K1_NR (7) 42 - #define EXYNOS4210_GPIO_K2_NR (7) 43 - #define EXYNOS4210_GPIO_K3_NR (7) 44 - #define EXYNOS4210_GPIO_L0_NR (8) 45 - #define EXYNOS4210_GPIO_L1_NR (3) 46 - #define EXYNOS4210_GPIO_L2_NR (8) 47 - #define EXYNOS4210_GPIO_Y0_NR (6) 48 - #define EXYNOS4210_GPIO_Y1_NR (4) 49 - #define EXYNOS4210_GPIO_Y2_NR (6) 50 - #define EXYNOS4210_GPIO_Y3_NR (8) 51 - #define EXYNOS4210_GPIO_Y4_NR (8) 52 - #define EXYNOS4210_GPIO_Y5_NR (8) 53 - #define EXYNOS4210_GPIO_Y6_NR (8) 54 - #define EXYNOS4210_GPIO_X0_NR (8) 55 - #define EXYNOS4210_GPIO_X1_NR (8) 56 - #define EXYNOS4210_GPIO_X2_NR (8) 57 - #define EXYNOS4210_GPIO_X3_NR (8) 58 - #define EXYNOS4210_GPIO_Z_NR (7) 59 - 60 - enum exynos4210_gpio_xa_start { 61 - EXYNOS4210_GPIO_A0_START = 0, 62 - EXYNOS4210_GPIO_A1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_A0), 63 - EXYNOS4210_GPIO_B_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_A1), 64 - EXYNOS4210_GPIO_C0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_B), 65 - EXYNOS4210_GPIO_C1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_C0), 66 - EXYNOS4210_GPIO_D0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_C1), 67 - EXYNOS4210_GPIO_D1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_D0), 68 - EXYNOS4210_GPIO_E0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_D1), 69 - EXYNOS4210_GPIO_E1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E0), 70 - EXYNOS4210_GPIO_E2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E1), 71 - EXYNOS4210_GPIO_E3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E2), 72 - EXYNOS4210_GPIO_E4_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E3), 73 - EXYNOS4210_GPIO_F0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E4), 74 - EXYNOS4210_GPIO_F1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_F0), 75 - EXYNOS4210_GPIO_F2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_F1), 76 - EXYNOS4210_GPIO_F3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_F2), 77 - }; 78 - 79 - enum exynos4210_gpio_xb_start { 80 - EXYNOS4210_GPIO_J0_START = 0, 81 - EXYNOS4210_GPIO_J1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_J0), 82 - EXYNOS4210_GPIO_K0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_J1), 83 - EXYNOS4210_GPIO_K1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K0), 84 - EXYNOS4210_GPIO_K2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K1), 85 - EXYNOS4210_GPIO_K3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K2), 86 - EXYNOS4210_GPIO_L0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K3), 87 - EXYNOS4210_GPIO_L1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_L0), 88 - EXYNOS4210_GPIO_L2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_L1), 89 - EXYNOS4210_GPIO_Y0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_L2), 90 - EXYNOS4210_GPIO_Y1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y0), 91 - EXYNOS4210_GPIO_Y2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y1), 92 - EXYNOS4210_GPIO_Y3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y2), 93 - EXYNOS4210_GPIO_Y4_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y3), 94 - EXYNOS4210_GPIO_Y5_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y4), 95 - EXYNOS4210_GPIO_Y6_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y5), 96 - EXYNOS4210_GPIO_X0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y6), 97 - EXYNOS4210_GPIO_X1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_X0), 98 - EXYNOS4210_GPIO_X2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_X1), 99 - EXYNOS4210_GPIO_X3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_X2), 100 - }; 101 - 102 - enum exynos4210_gpio_xc_start { 103 - EXYNOS4210_GPIO_Z_START = 0, 104 - }; 105 - 106 - #define EXYNOS4210_GPIO_A0_IRQ EXYNOS4210_GPIO_A0_START 107 - #define EXYNOS4210_GPIO_A1_IRQ EXYNOS4210_GPIO_A1_START 108 - #define EXYNOS4210_GPIO_B_IRQ EXYNOS4210_GPIO_B_START 109 - #define EXYNOS4210_GPIO_C0_IRQ EXYNOS4210_GPIO_C0_START 110 - #define EXYNOS4210_GPIO_C1_IRQ EXYNOS4210_GPIO_C1_START 111 - #define EXYNOS4210_GPIO_D0_IRQ EXYNOS4210_GPIO_D0_START 112 - #define EXYNOS4210_GPIO_D1_IRQ EXYNOS4210_GPIO_D1_START 113 - #define EXYNOS4210_GPIO_E0_IRQ EXYNOS4210_GPIO_E0_START 114 - #define EXYNOS4210_GPIO_E1_IRQ EXYNOS4210_GPIO_E1_START 115 - #define EXYNOS4210_GPIO_E2_IRQ EXYNOS4210_GPIO_E2_START 116 - #define EXYNOS4210_GPIO_E3_IRQ EXYNOS4210_GPIO_E3_START 117 - #define EXYNOS4210_GPIO_E4_IRQ EXYNOS4210_GPIO_E4_START 118 - #define EXYNOS4210_GPIO_F0_IRQ EXYNOS4210_GPIO_F0_START 119 - #define EXYNOS4210_GPIO_F1_IRQ EXYNOS4210_GPIO_F1_START 120 - #define EXYNOS4210_GPIO_F2_IRQ EXYNOS4210_GPIO_F2_START 121 - #define EXYNOS4210_GPIO_F3_IRQ EXYNOS4210_GPIO_F3_START 122 - #define EXYNOS4210_GPIO_J0_IRQ EXYNOS4210_GPIO_J0_START 123 - #define EXYNOS4210_GPIO_J1_IRQ EXYNOS4210_GPIO_J1_START 124 - #define EXYNOS4210_GPIO_K0_IRQ EXYNOS4210_GPIO_K0_START 125 - #define EXYNOS4210_GPIO_K1_IRQ EXYNOS4210_GPIO_K1_START 126 - #define EXYNOS4210_GPIO_K2_IRQ EXYNOS4210_GPIO_K2_START 127 - #define EXYNOS4210_GPIO_K3_IRQ EXYNOS4210_GPIO_K3_START 128 - #define EXYNOS4210_GPIO_L0_IRQ EXYNOS4210_GPIO_L0_START 129 - #define EXYNOS4210_GPIO_L1_IRQ EXYNOS4210_GPIO_L1_START 130 - #define EXYNOS4210_GPIO_L2_IRQ EXYNOS4210_GPIO_L2_START 131 - #define EXYNOS4210_GPIO_Z_IRQ EXYNOS4210_GPIO_Z_START 132 - 133 - #define EXYNOS4210_GPIOA_NR_PINS EXYNOS_GPIO_START(EXYNOS4210_GPIO_F3) 134 - #define EXYNOS4210_GPIOA_NR_GINT EXYNOS_GPIO_START(EXYNOS4210_GPIO_F3) 135 - #define EXYNOS4210_GPIOB_NR_PINS EXYNOS_GPIO_START(EXYNOS4210_GPIO_X3) 136 - #define EXYNOS4210_GPIOB_NR_GINT EXYNOS_GPIO_START(EXYNOS4210_GPIO_L2) 137 - #define EXYNOS4210_GPIOC_NR_PINS EXYNOS_GPIO_START(EXYNOS4210_GPIO_Z) 138 - 139 20 /* External GPIO and wakeup interrupt related definitions */ 140 21 #define EXYNOS_GPIO_ECON_OFFSET 0x700 141 22 #define EXYNOS_GPIO_EMASK_OFFSET 0x900 ··· 46 165 #define EXYNOS_EINT_MAX_PER_BANK 8 47 166 #define EXYNOS_EINT_NR_WKUP_EINT 48 167 49 - #define EXYNOS_PIN_BANK_EINTN(reg, __gpio, id) \ 168 + #define EXYNOS_PIN_BANK_EINTN(pins, reg, id) \ 50 169 { \ 51 170 .pctl_offset = reg, \ 52 - .pin_base = (__gpio##_START), \ 53 - .nr_pins = (__gpio##_NR), \ 171 + .nr_pins = pins, \ 54 172 .func_width = 4, \ 55 173 .pud_width = 2, \ 56 174 .drv_width = 2, \ ··· 59 179 .name = id \ 60 180 } 61 181 62 - #define EXYNOS_PIN_BANK_EINTG(reg, __gpio, id) \ 182 + #define EXYNOS_PIN_BANK_EINTG(pins, reg, id, offs) \ 63 183 { \ 64 184 .pctl_offset = reg, \ 65 - .pin_base = (__gpio##_START), \ 66 - .nr_pins = (__gpio##_NR), \ 185 + .nr_pins = pins, \ 67 186 .func_width = 4, \ 68 187 .pud_width = 2, \ 69 188 .drv_width = 2, \ 70 189 .conpdn_width = 2, \ 71 190 .pudpdn_width = 2, \ 72 191 .eint_type = EINT_TYPE_GPIO, \ 73 - .irq_base = (__gpio##_IRQ), \ 192 + .eint_offset = offs, \ 193 + .name = id \ 194 + } 195 + 196 + #define EXYNOS_PIN_BANK_EINTW(pins, reg, id, offs) \ 197 + { \ 198 + .pctl_offset = reg, \ 199 + .nr_pins = pins, \ 200 + .func_width = 4, \ 201 + .pud_width = 2, \ 202 + .drv_width = 2, \ 203 + .eint_type = EINT_TYPE_WKUP, \ 204 + .eint_offset = offs, \ 74 205 .name = id \ 75 206 } 76 207 77 208 /** 78 - * struct exynos_geint_data: gpio eint specific data for irq_chip callbacks. 79 - * @bank: pin bank from which this gpio interrupt originates. 80 - * @pin: pin number within the bank. 81 - * @eint_offset: offset to be added to the con/pend/mask register bank base. 209 + * struct exynos_weint_data: irq specific data for all the wakeup interrupts 210 + * generated by the external wakeup interrupt controller. 211 + * @irq: interrupt number within the domain. 212 + * @bank: bank responsible for this interrupt 82 213 */ 83 - struct exynos_geint_data { 84 - struct samsung_pin_bank *bank; 85 - u32 pin; 86 - u32 eint_offset; 214 + struct exynos_weint_data { 215 + unsigned int irq; 216 + struct samsung_pin_bank *bank; 87 217 }; 88 218 89 219 /** 90 - * struct exynos_weint_data: irq specific data for all the wakeup interrupts 220 + * struct exynos_muxed_weint_data: irq specific data for muxed wakeup interrupts 91 221 * generated by the external wakeup interrupt controller. 92 - * @domain: irq domain representing the external wakeup interrupts 93 - * @irq: interrupt number within the domain. 222 + * @nr_banks: count of banks being part of the mux 223 + * @banks: array of banks being part of the mux 94 224 */ 95 - struct exynos_weint_data { 96 - struct irq_domain *domain; 97 - u32 irq; 225 + struct exynos_muxed_weint_data { 226 + unsigned int nr_banks; 227 + struct samsung_pin_bank *banks[]; 98 228 };
+146 -55
drivers/pinctrl/pinctrl-samsung.c
··· 26 26 #include <linux/slab.h> 27 27 #include <linux/err.h> 28 28 #include <linux/gpio.h> 29 + #include <linux/irqdomain.h> 29 30 30 31 #include "core.h" 31 32 #include "pinctrl-samsung.h" ··· 46 45 { "samsung,pin-con-pdn", PINCFG_TYPE_CON_PDN }, 47 46 { "samsung,pin-pud-pdn", PINCFG_TYPE_PUD_PDN }, 48 47 }; 48 + 49 + static unsigned int pin_base = 0; 50 + 51 + static inline struct samsung_pin_bank *gc_to_pin_bank(struct gpio_chip *gc) 52 + { 53 + return container_of(gc, struct samsung_pin_bank, gpio_chip); 54 + } 49 55 50 56 /* check if the selector is a valid pin group selector */ 51 57 static int samsung_get_group_count(struct pinctrl_dev *pctldev) ··· 258 250 * given a pin number that is local to a pin controller, find out the pin bank 259 251 * and the register base of the pin bank. 260 252 */ 261 - static void pin_to_reg_bank(struct gpio_chip *gc, unsigned pin, 262 - void __iomem **reg, u32 *offset, 253 + static void pin_to_reg_bank(struct samsung_pinctrl_drv_data *drvdata, 254 + unsigned pin, void __iomem **reg, u32 *offset, 263 255 struct samsung_pin_bank **bank) 264 256 { 265 - struct samsung_pinctrl_drv_data *drvdata; 266 257 struct samsung_pin_bank *b; 267 258 268 - drvdata = dev_get_drvdata(gc->dev); 269 259 b = drvdata->ctrl->pin_banks; 270 260 271 261 while ((pin >= b->pin_base) && ··· 298 292 * pin function number in the config register. 299 293 */ 300 294 for (cnt = 0; cnt < drvdata->pin_groups[group].num_pins; cnt++) { 301 - pin_to_reg_bank(drvdata->gc, pins[cnt] - drvdata->ctrl->base, 295 + pin_to_reg_bank(drvdata, pins[cnt] - drvdata->ctrl->base, 302 296 &reg, &pin_offset, &bank); 303 297 mask = (1 << bank->func_width) - 1; 304 298 shift = pin_offset * bank->func_width; ··· 335 329 struct pinctrl_gpio_range *range, unsigned offset, bool input) 336 330 { 337 331 struct samsung_pin_bank *bank; 332 + struct samsung_pinctrl_drv_data *drvdata; 338 333 void __iomem *reg; 339 334 u32 data, pin_offset, mask, shift; 340 335 341 - pin_to_reg_bank(range->gc, offset, &reg, &pin_offset, &bank); 336 + bank = gc_to_pin_bank(range->gc); 337 + drvdata = pinctrl_dev_get_drvdata(pctldev); 338 + 339 + pin_offset = offset - bank->pin_base; 340 + reg = drvdata->virt_base + bank->pctl_offset; 341 + 342 342 mask = (1 << bank->func_width) - 1; 343 343 shift = pin_offset * bank->func_width; 344 344 ··· 378 366 u32 cfg_value, cfg_reg; 379 367 380 368 drvdata = pinctrl_dev_get_drvdata(pctldev); 381 - pin_to_reg_bank(drvdata->gc, pin - drvdata->ctrl->base, &reg_base, 369 + pin_to_reg_bank(drvdata, pin - drvdata->ctrl->base, &reg_base, 382 370 &pin_offset, &bank); 383 371 384 372 switch (cfg_type) { ··· 402 390 WARN_ON(1); 403 391 return -EINVAL; 404 392 } 393 + 394 + if (!width) 395 + return -EINVAL; 405 396 406 397 mask = (1 << width) - 1; 407 398 shift = pin_offset * width; ··· 478 463 /* gpiolib gpio_set callback function */ 479 464 static void samsung_gpio_set(struct gpio_chip *gc, unsigned offset, int value) 480 465 { 466 + struct samsung_pin_bank *bank = gc_to_pin_bank(gc); 481 467 void __iomem *reg; 482 - u32 pin_offset, data; 468 + u32 data; 483 469 484 - pin_to_reg_bank(gc, offset, &reg, &pin_offset, NULL); 470 + reg = bank->drvdata->virt_base + bank->pctl_offset; 471 + 485 472 data = readl(reg + DAT_REG); 486 - data &= ~(1 << pin_offset); 473 + data &= ~(1 << offset); 487 474 if (value) 488 - data |= 1 << pin_offset; 475 + data |= 1 << offset; 489 476 writel(data, reg + DAT_REG); 490 477 } 491 478 ··· 495 478 static int samsung_gpio_get(struct gpio_chip *gc, unsigned offset) 496 479 { 497 480 void __iomem *reg; 498 - u32 pin_offset, data; 481 + u32 data; 482 + struct samsung_pin_bank *bank = gc_to_pin_bank(gc); 499 483 500 - pin_to_reg_bank(gc, offset, &reg, &pin_offset, NULL); 484 + reg = bank->drvdata->virt_base + bank->pctl_offset; 485 + 501 486 data = readl(reg + DAT_REG); 502 - data >>= pin_offset; 487 + data >>= offset; 503 488 data &= 1; 504 489 return data; 505 490 } ··· 526 507 { 527 508 samsung_gpio_set(gc, offset, value); 528 509 return pinctrl_gpio_direction_output(gc->base + offset); 510 + } 511 + 512 + /* 513 + * gpiolib gpio_to_irq callback function. Creates a mapping between a GPIO pin 514 + * and a virtual IRQ, if not already present. 515 + */ 516 + static int samsung_gpio_to_irq(struct gpio_chip *gc, unsigned offset) 517 + { 518 + struct samsung_pin_bank *bank = gc_to_pin_bank(gc); 519 + unsigned int virq; 520 + 521 + if (!bank->irq_domain) 522 + return -ENXIO; 523 + 524 + virq = irq_create_mapping(bank->irq_domain, offset); 525 + 526 + return (virq) ? : -ENXIO; 529 527 } 530 528 531 529 /* ··· 633 597 */ 634 598 for_each_child_of_node(dev_np, cfg_np) { 635 599 u32 function; 636 - if (of_find_property(cfg_np, "interrupt-controller", NULL)) 600 + if (!of_find_property(cfg_np, "samsung,pins", NULL)) 637 601 continue; 638 602 639 603 ret = samsung_pinctrl_parse_dt_pins(pdev, cfg_np, ··· 748 712 return -EINVAL; 749 713 } 750 714 751 - drvdata->grange.name = "samsung-pctrl-gpio-range"; 752 - drvdata->grange.id = 0; 753 - drvdata->grange.base = drvdata->ctrl->base; 754 - drvdata->grange.npins = drvdata->ctrl->nr_pins; 755 - drvdata->grange.gc = drvdata->gc; 756 - pinctrl_add_gpio_range(drvdata->pctl_dev, &drvdata->grange); 715 + for (bank = 0; bank < drvdata->ctrl->nr_banks; ++bank) { 716 + pin_bank = &drvdata->ctrl->pin_banks[bank]; 717 + pin_bank->grange.name = pin_bank->name; 718 + pin_bank->grange.id = bank; 719 + pin_bank->grange.pin_base = pin_bank->pin_base; 720 + pin_bank->grange.base = pin_bank->gpio_chip.base; 721 + pin_bank->grange.npins = pin_bank->gpio_chip.ngpio; 722 + pin_bank->grange.gc = &pin_bank->gpio_chip; 723 + pinctrl_add_gpio_range(drvdata->pctl_dev, &pin_bank->grange); 724 + } 757 725 758 726 ret = samsung_pinctrl_parse_dt(pdev, drvdata); 759 727 if (ret) { ··· 768 728 return 0; 769 729 } 770 730 731 + static const struct gpio_chip samsung_gpiolib_chip = { 732 + .set = samsung_gpio_set, 733 + .get = samsung_gpio_get, 734 + .direction_input = samsung_gpio_direction_input, 735 + .direction_output = samsung_gpio_direction_output, 736 + .to_irq = samsung_gpio_to_irq, 737 + .owner = THIS_MODULE, 738 + }; 739 + 771 740 /* register the gpiolib interface with the gpiolib subsystem */ 772 741 static int __devinit samsung_gpiolib_register(struct platform_device *pdev, 773 742 struct samsung_pinctrl_drv_data *drvdata) 774 743 { 744 + struct samsung_pin_ctrl *ctrl = drvdata->ctrl; 745 + struct samsung_pin_bank *bank = ctrl->pin_banks; 775 746 struct gpio_chip *gc; 776 747 int ret; 748 + int i; 777 749 778 - gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); 779 - if (!gc) { 780 - dev_err(&pdev->dev, "mem alloc for gpio_chip failed\n"); 781 - return -ENOMEM; 782 - } 750 + for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { 751 + bank->gpio_chip = samsung_gpiolib_chip; 783 752 784 - drvdata->gc = gc; 785 - gc->base = drvdata->ctrl->base; 786 - gc->ngpio = drvdata->ctrl->nr_pins; 787 - gc->dev = &pdev->dev; 788 - gc->set = samsung_gpio_set; 789 - gc->get = samsung_gpio_get; 790 - gc->direction_input = samsung_gpio_direction_input; 791 - gc->direction_output = samsung_gpio_direction_output; 792 - gc->label = drvdata->ctrl->label; 793 - gc->owner = THIS_MODULE; 794 - ret = gpiochip_add(gc); 795 - if (ret) { 796 - dev_err(&pdev->dev, "failed to register gpio_chip %s, error " 797 - "code: %d\n", gc->label, ret); 798 - return ret; 753 + gc = &bank->gpio_chip; 754 + gc->base = ctrl->base + bank->pin_base; 755 + gc->ngpio = bank->nr_pins; 756 + gc->dev = &pdev->dev; 757 + gc->of_node = bank->of_node; 758 + gc->label = bank->name; 759 + 760 + ret = gpiochip_add(gc); 761 + if (ret) { 762 + dev_err(&pdev->dev, "failed to register gpio_chip %s, error code: %d\n", 763 + gc->label, ret); 764 + goto fail; 765 + } 799 766 } 800 767 801 768 return 0; 769 + 770 + fail: 771 + for (--i, --bank; i >= 0; --i, --bank) 772 + if (gpiochip_remove(&bank->gpio_chip)) 773 + dev_err(&pdev->dev, "gpio chip %s remove failed\n", 774 + bank->gpio_chip.label); 775 + return ret; 802 776 } 803 777 804 778 /* unregister the gpiolib interface with the gpiolib subsystem */ 805 779 static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, 806 780 struct samsung_pinctrl_drv_data *drvdata) 807 781 { 808 - int ret = gpiochip_remove(drvdata->gc); 809 - if (ret) { 782 + struct samsung_pin_ctrl *ctrl = drvdata->ctrl; 783 + struct samsung_pin_bank *bank = ctrl->pin_banks; 784 + int ret = 0; 785 + int i; 786 + 787 + for (i = 0; !ret && i < ctrl->nr_banks; ++i, ++bank) 788 + ret = gpiochip_remove(&bank->gpio_chip); 789 + 790 + if (ret) 810 791 dev_err(&pdev->dev, "gpio chip remove failed\n"); 811 - return ret; 812 - } 813 - return 0; 792 + 793 + return ret; 814 794 } 815 795 816 796 static const struct of_device_id samsung_pinctrl_dt_match[]; 817 797 818 798 /* retrieve the soc specific data */ 819 799 static struct samsung_pin_ctrl *samsung_pinctrl_get_soc_data( 800 + struct samsung_pinctrl_drv_data *d, 820 801 struct platform_device *pdev) 821 802 { 822 803 int id; 823 804 const struct of_device_id *match; 824 - const struct device_node *node = pdev->dev.of_node; 805 + struct device_node *node = pdev->dev.of_node; 806 + struct device_node *np; 807 + struct samsung_pin_ctrl *ctrl; 808 + struct samsung_pin_bank *bank; 809 + int i; 825 810 826 - id = of_alias_get_id(pdev->dev.of_node, "pinctrl"); 811 + id = of_alias_get_id(node, "pinctrl"); 827 812 if (id < 0) { 828 813 dev_err(&pdev->dev, "failed to get alias id\n"); 829 814 return NULL; 830 815 } 831 816 match = of_match_node(samsung_pinctrl_dt_match, node); 832 - return (struct samsung_pin_ctrl *)match->data + id; 817 + ctrl = (struct samsung_pin_ctrl *)match->data + id; 818 + 819 + bank = ctrl->pin_banks; 820 + for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { 821 + bank->drvdata = d; 822 + bank->pin_base = ctrl->nr_pins; 823 + ctrl->nr_pins += bank->nr_pins; 824 + } 825 + 826 + for_each_child_of_node(node, np) { 827 + if (!of_find_property(np, "gpio-controller", NULL)) 828 + continue; 829 + bank = ctrl->pin_banks; 830 + for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { 831 + if (!strcmp(bank->name, np->name)) { 832 + bank->of_node = np; 833 + break; 834 + } 835 + } 836 + } 837 + 838 + ctrl->base = pin_base; 839 + pin_base += ctrl->nr_pins; 840 + 841 + return ctrl; 833 842 } 834 843 835 844 static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) ··· 894 805 return -ENODEV; 895 806 } 896 807 897 - ctrl = samsung_pinctrl_get_soc_data(pdev); 898 - if (!ctrl) { 899 - dev_err(&pdev->dev, "driver data not available\n"); 900 - return -EINVAL; 901 - } 902 - 903 808 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); 904 809 if (!drvdata) { 905 810 dev_err(dev, "failed to allocate memory for driver's " 906 811 "private data\n"); 907 812 return -ENOMEM; 813 + } 814 + 815 + ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev); 816 + if (!ctrl) { 817 + dev_err(&pdev->dev, "driver data not available\n"); 818 + return -EINVAL; 908 819 } 909 820 drvdata->ctrl = ctrl; 910 821 drvdata->dev = dev; ··· 947 858 static const struct of_device_id samsung_pinctrl_dt_match[] = { 948 859 { .compatible = "samsung,pinctrl-exynos4210", 949 860 .data = (void *)exynos4210_pin_ctrl }, 861 + { .compatible = "samsung,pinctrl-exynos4x12", 862 + .data = (void *)exynos4x12_pin_ctrl }, 950 863 {}, 951 864 }; 952 865 MODULE_DEVICE_TABLE(of, samsung_pinctrl_dt_match);
+16 -14
drivers/pinctrl/pinctrl-samsung.h
··· 23 23 #include <linux/pinctrl/consumer.h> 24 24 #include <linux/pinctrl/machine.h> 25 25 26 + #include <linux/gpio.h> 27 + 26 28 /* register offsets within a pin bank */ 27 29 #define DAT_REG 0x4 28 30 #define PUD_REG 0x8 ··· 66 64 * @EINT_TYPE_NONE: bank does not support external interrupts 67 65 * @EINT_TYPE_GPIO: bank supportes external gpio interrupts 68 66 * @EINT_TYPE_WKUP: bank supportes external wakeup interrupts 67 + * @EINT_TYPE_WKUP_MUX: bank supports multiplexed external wakeup interrupts 69 68 * 70 69 * Samsung GPIO controller groups all the available pins into banks. The pins 71 70 * in a pin bank can support external gpio interrupts or external wakeup ··· 79 76 EINT_TYPE_NONE, 80 77 EINT_TYPE_GPIO, 81 78 EINT_TYPE_WKUP, 79 + EINT_TYPE_WKUP_MUX, 82 80 }; 83 81 84 82 /* maximum length of a pin in pin descriptor (example: "gpa0-0") */ ··· 113 109 * @conpdn_width: width of the sleep mode function selector bin field. 114 110 * @pudpdn_width: width of the sleep mode pull up/down selector bit field. 115 111 * @eint_type: type of the external interrupt supported by the bank. 116 - * @irq_base: starting controller local irq number of the bank. 117 112 * @name: name to be prefixed for each pin in this pin bank. 113 + * @of_node: OF node of the bank. 114 + * @drvdata: link to controller driver data 115 + * @irq_domain: IRQ domain of the bank. 116 + * @gpio_chip: GPIO chip of the bank. 117 + * @grange: linux gpio pin range supported by this bank. 118 118 */ 119 119 struct samsung_pin_bank { 120 120 u32 pctl_offset; ··· 130 122 u8 conpdn_width; 131 123 u8 pudpdn_width; 132 124 enum eint_type eint_type; 133 - u32 irq_base; 125 + u32 eint_offset; 134 126 char *name; 127 + struct device_node *of_node; 128 + struct samsung_pinctrl_drv_data *drvdata; 129 + struct irq_domain *irq_domain; 130 + struct gpio_chip gpio_chip; 131 + struct pinctrl_gpio_range grange; 135 132 }; 136 133 137 134 /** ··· 145 132 * @nr_banks: number of pin banks. 146 133 * @base: starting system wide pin number. 147 134 * @nr_pins: number of pins supported by the controller. 148 - * @nr_gint: number of external gpio interrupts supported. 149 - * @nr_wint: number of external wakeup interrupts supported. 150 135 * @geint_con: offset of the ext-gpio controller registers. 151 136 * @geint_mask: offset of the ext-gpio interrupt mask registers. 152 137 * @geint_pend: offset of the ext-gpio interrupt pending registers. ··· 164 153 165 154 u32 base; 166 155 u32 nr_pins; 167 - u32 nr_gint; 168 - u32 nr_wint; 169 156 170 157 u32 geint_con; 171 158 u32 geint_mask; ··· 192 183 * @nr_groups: number of such pin groups. 193 184 * @pmx_functions: list of pin functions available to the driver. 194 185 * @nr_function: number of such pin functions. 195 - * @gc: gpio_chip instance registered with gpiolib. 196 - * @grange: linux gpio pin range supported by this controller. 197 186 */ 198 187 struct samsung_pinctrl_drv_data { 199 188 void __iomem *virt_base; ··· 206 199 unsigned int nr_groups; 207 200 const struct samsung_pmx_func *pmx_functions; 208 201 unsigned int nr_functions; 209 - 210 - struct irq_domain *gpio_irqd; 211 - struct irq_domain *wkup_irqd; 212 - 213 - struct gpio_chip *gc; 214 - struct pinctrl_gpio_range grange; 215 202 }; 216 203 217 204 /** ··· 236 235 237 236 /* list of all exported SoC specific data */ 238 237 extern struct samsung_pin_ctrl exynos4210_pin_ctrl[]; 238 + extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[]; 239 239 240 240 #endif /* __PINCTRL_SAMSUNG_H */