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

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

Pull ARM SoC board updates from Olof Johansson:
"Board updates for 3.12. Again, a bit of domain overlap with SoC and
DT branches, but most of this is around legacy code and board support.
We've found that platform maintainers have a hard time separating all
of these out and might move towards fewer branches for next release.

- Removal of a number of Marvell Kirkwood board files, since contents
is now common and mostly configured via DT.
- Device-tree updates for Marvell Dove, including irqchip and
clocksource setup.
- Defconfig updates. Gotta go somewhere. One new one for Renesas
Lager.
- New backlight drivers for backlights used on Renesas shmobile
platforms.
- Removal of Renesas leds driver.
- Shuffling of some of the new Broadcom platforms to give room for
others in the same mach directory. More in 3.13"

* tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits)
mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event
mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion
ARM: bcm: Make secure API call optional
ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers)
ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona
ARM: bcm: Rename board_bcm
mmc: sdhci-bcm-kona: make linker-section warning go away
ARM: tegra: defconfig updates
ARM: dove: add initial DT file for Globalscale D2Plug
ARM: dove: add GPIO IR receiver node to SolidRun CuBox
ARM: dove: add common pinmux functions to DT
ARM: dove: add cpu device tree node
ARM: dove: update dove_defconfig with SI5351, PCI, and xHCI
arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument
ARM: kirkwood: fix DT building and update defconfig
ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code
ARM: configs: disable DEBUG_LL in bcm_defconfig
ARM: bcm281xx: Board specific reboot code
ARM bcm281xx: Turn on socket & network support.
ARM: bcm281xx: Turn on L2 cache.
...

+2416 -3040
+2
arch/arm/boot/dts/Makefile
··· 48 48 da850-evm.dtb 49 49 dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ 50 50 dove-cubox.dtb \ 51 + dove-d2plug.dtb \ 51 52 dove-dove-db.dtb 52 53 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ 53 54 exynos4210-smdkv310.dtb \ ··· 86 85 kirkwood-lschlv2.dtb \ 87 86 kirkwood-lsxhl.dtb \ 88 87 kirkwood-mplcec4.dtb \ 88 + kirkwood-mv88f6281gtw-ge.dtb \ 89 89 kirkwood-netgear_readynas_duo_v2.dtb \ 90 90 kirkwood-ns2.dtb \ 91 91 kirkwood-ns2lite.dtb \
+17 -20
arch/arm/boot/dts/dove-cubox.dts
··· 42 42 regulator-always-on; 43 43 regulator-boot-on; 44 44 gpio = <&gpio0 1 0>; 45 + pinctrl-0 = <&pmx_gpio_1>; 46 + pinctrl-names = "default"; 45 47 }; 46 48 }; 47 49 ··· 55 53 clock-frequency = <25000000>; 56 54 }; 57 55 }; 56 + 57 + ir_recv: ir-receiver { 58 + compatible = "gpio-ir-receiver"; 59 + gpios = <&gpio0 19 1>; 60 + pinctrl-0 = <&pmx_gpio_19>; 61 + pinctrl-names = "default"; 62 + }; 58 63 }; 59 64 60 65 &uart0 { status = "okay"; }; 61 66 &sata0 { status = "okay"; }; 67 + &mdio { status = "okay"; }; 68 + &eth { status = "okay"; }; 69 + 70 + &ethphy { 71 + compatible = "marvell,88e1310"; 72 + reg = <1>; 73 + }; 62 74 63 75 &i2c0 { 64 76 status = "okay"; ··· 119 103 status = "okay"; 120 104 /* sdio0 card detect is connected to wrong pin on CuBox */ 121 105 cd-gpios = <&gpio0 12 1>; 106 + pinctrl-0 = <&pmx_sdio0 &pmx_gpio_12>; 122 107 }; 123 108 124 109 &spi0 { ··· 130 113 compatible = "st,w25q32"; 131 114 spi-max-frequency = <20000000>; 132 115 reg = <0>; 133 - }; 134 - }; 135 - 136 - &pinctrl { 137 - pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>; 138 - pinctrl-names = "default"; 139 - 140 - pmx_gpio_1: pmx-gpio-1 { 141 - marvell,pins = "mpp1"; 142 - marvell,function = "gpio"; 143 - }; 144 - 145 - pmx_gpio_12: pmx-gpio-12 { 146 - marvell,pins = "mpp12"; 147 - marvell,function = "gpio"; 148 - }; 149 - 150 - pmx_gpio_18: pmx-gpio-18 { 151 - marvell,pins = "mpp18"; 152 - marvell,function = "gpio"; 153 116 }; 154 117 };
+69
arch/arm/boot/dts/dove-d2plug.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "dove.dtsi" 4 + 5 + / { 6 + model = "Globalscale D2Plug"; 7 + compatible = "globalscale,d2plug", "marvell,dove"; 8 + 9 + memory { 10 + device_type = "memory"; 11 + reg = <0x00000000 0x40000000>; 12 + }; 13 + 14 + chosen { 15 + bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 + }; 17 + 18 + leds { 19 + compatible = "gpio-leds"; 20 + pinctrl-0 = <&pmx_gpio_0 &pmx_gpio_1 &pmx_gpio_2>; 21 + pinctrl-names = "default"; 22 + 23 + wlan-ap { 24 + label = "wlan-ap"; 25 + gpios = <&gpio0 0 1>; 26 + }; 27 + 28 + wlan-act { 29 + label = "wlan-act"; 30 + gpios = <&gpio0 1 1>; 31 + }; 32 + 33 + bluetooth-act { 34 + label = "bt-act"; 35 + gpios = <&gpio0 2 1>; 36 + }; 37 + }; 38 + }; 39 + 40 + &uart0 { status = "okay"; }; 41 + &sata0 { status = "okay"; }; 42 + &i2c0 { status = "okay"; }; 43 + &mdio { status = "okay"; }; 44 + &eth { status = "okay"; }; 45 + 46 + /* Samsung M8G2F eMMC */ 47 + &sdio0 { 48 + status = "okay"; 49 + non-removable; 50 + bus-width = <4>; 51 + }; 52 + 53 + /* Marvell SD8787 WLAN/BT */ 54 + &sdio1 { 55 + status = "okay"; 56 + non-removable; 57 + bus-width = <4>; 58 + }; 59 + 60 + &spi0 { 61 + status = "okay"; 62 + 63 + /* spi0.0: 4M Flash Macronix MX25L3205D */ 64 + spi-flash@0 { 65 + compatible = "st,m25l3205d"; 66 + spi-max-frequency = <20000000>; 67 + reg = <0>; 68 + }; 69 + };
+266 -19
arch/arm/boot/dts/dove.dtsi
··· 10 10 gpio2 = &gpio2; 11 11 }; 12 12 13 + cpus { 14 + #address-cells = <1>; 15 + #size-cells = <0>; 16 + 17 + cpu0: cpu@0 { 18 + compatible = "marvell,pj4a", "marvell,sheeva-v7"; 19 + device_type = "cpu"; 20 + next-level-cache = <&l2>; 21 + reg = <0>; 22 + }; 23 + }; 24 + 25 + l2: l2-cache { 26 + compatible = "marvell,tauros2-cache"; 27 + marvell,tauros2-cache-features = <0>; 28 + }; 29 + 13 30 soc@f1000000 { 14 31 compatible = "simple-bus"; 15 32 #address-cells = <1>; ··· 42 25 0xf2100000 0xf2100000 0x0100000 /* PCIe0 I/O 1M */ 43 26 0xf8000000 0xf8000000 0x8000000>; /* BootROM 128M */ 44 27 45 - l2: l2-cache { 46 - compatible = "marvell,tauros2-cache"; 47 - marvell,tauros2-cache-features = <0>; 28 + timer: timer@20300 { 29 + compatible = "marvell,orion-timer"; 30 + reg = <0x20300 0x20>; 31 + interrupt-parent = <&bridge_intc>; 32 + interrupts = <1>, <2>; 33 + clocks = <&core_clk 0>; 48 34 }; 49 35 50 - intc: interrupt-controller { 36 + intc: main-interrupt-ctrl@20200 { 51 37 compatible = "marvell,orion-intc"; 52 38 interrupt-controller; 53 39 #interrupt-cells = <1>; 54 - reg = <0x20204 0x04>, <0x20214 0x04>; 40 + reg = <0x20200 0x10>, <0x20210 0x10>; 41 + }; 42 + 43 + bridge_intc: bridge-interrupt-ctrl@20110 { 44 + compatible = "marvell,orion-bridge-intc"; 45 + interrupt-controller; 46 + #interrupt-cells = <1>; 47 + reg = <0x20110 0x8>; 48 + interrupts = <0>; 49 + marvell,#interrupts = <5>; 55 50 }; 56 51 57 52 core_clk: core-clocks@d0214 { ··· 72 43 #clock-cells = <1>; 73 44 }; 74 45 75 - gate_clk: clock-gating-control@d0038 { 46 + gate_clk: clock-gating-ctrl@d0038 { 76 47 compatible = "marvell,dove-gating-clock"; 77 48 reg = <0xd0038 0x4>; 78 49 clocks = <&core_clk 0>; 79 50 #clock-cells = <1>; 80 51 }; 81 52 82 - thermal: thermal@d001c { 53 + thermal: thermal-diode@d001c { 83 54 compatible = "marvell,dove-thermal"; 84 55 reg = <0xd001c 0x0c>, <0xd005c 0x08>; 85 56 }; ··· 99 70 reg-shift = <2>; 100 71 interrupts = <8>; 101 72 clocks = <&core_clk 0>; 73 + pinctrl-0 = <&pmx_uart1>; 74 + pinctrl-names = "default"; 102 75 status = "disabled"; 103 76 }; 104 77 ··· 122 91 status = "disabled"; 123 92 }; 124 93 125 - gpio0: gpio@d0400 { 94 + gpio0: gpio-ctrl@d0400 { 126 95 compatible = "marvell,orion-gpio"; 127 96 #gpio-cells = <2>; 128 97 gpio-controller; ··· 133 102 interrupts = <12>, <13>, <14>, <60>; 134 103 }; 135 104 136 - gpio1: gpio@d0420 { 105 + gpio1: gpio-ctrl@d0420 { 137 106 compatible = "marvell,orion-gpio"; 138 107 #gpio-cells = <2>; 139 108 gpio-controller; ··· 144 113 interrupts = <61>; 145 114 }; 146 115 147 - gpio2: gpio@e8400 { 116 + gpio2: gpio-ctrl@e8400 { 148 117 compatible = "marvell,orion-gpio"; 149 118 #gpio-cells = <2>; 150 119 gpio-controller; ··· 152 121 ngpios = <8>; 153 122 }; 154 123 155 - pinctrl: pinctrl@d0200 { 124 + pinctrl: pin-ctrl@d0200 { 156 125 compatible = "marvell,dove-pinctrl"; 157 126 reg = <0xd0200 0x10>; 158 127 clocks = <&gate_clk 22>; 128 + 129 + pmx_gpio_0: pmx-gpio-0 { 130 + marvell,pins = "mpp0"; 131 + marvell,function = "gpio"; 132 + }; 133 + 134 + pmx_gpio_1: pmx-gpio-1 { 135 + marvell,pins = "mpp1"; 136 + marvell,function = "gpio"; 137 + }; 138 + 139 + pmx_gpio_2: pmx-gpio-2 { 140 + marvell,pins = "mpp2"; 141 + marvell,function = "gpio"; 142 + }; 143 + 144 + pmx_gpio_3: pmx-gpio-3 { 145 + marvell,pins = "mpp3"; 146 + marvell,function = "gpio"; 147 + }; 148 + 149 + pmx_gpio_4: pmx-gpio-4 { 150 + marvell,pins = "mpp4"; 151 + marvell,function = "gpio"; 152 + }; 153 + 154 + pmx_gpio_5: pmx-gpio-5 { 155 + marvell,pins = "mpp5"; 156 + marvell,function = "gpio"; 157 + }; 158 + 159 + pmx_gpio_6: pmx-gpio-6 { 160 + marvell,pins = "mpp6"; 161 + marvell,function = "gpio"; 162 + }; 163 + 164 + pmx_gpio_7: pmx-gpio-7 { 165 + marvell,pins = "mpp7"; 166 + marvell,function = "gpio"; 167 + }; 168 + 169 + pmx_gpio_8: pmx-gpio-8 { 170 + marvell,pins = "mpp8"; 171 + marvell,function = "gpio"; 172 + }; 173 + 174 + pmx_gpio_9: pmx-gpio-9 { 175 + marvell,pins = "mpp9"; 176 + marvell,function = "gpio"; 177 + }; 178 + 179 + pmx_gpio_10: pmx-gpio-10 { 180 + marvell,pins = "mpp10"; 181 + marvell,function = "gpio"; 182 + }; 183 + 184 + pmx_gpio_11: pmx-gpio-11 { 185 + marvell,pins = "mpp11"; 186 + marvell,function = "gpio"; 187 + }; 188 + 189 + pmx_gpio_12: pmx-gpio-12 { 190 + marvell,pins = "mpp12"; 191 + marvell,function = "gpio"; 192 + }; 193 + 194 + pmx_gpio_13: pmx-gpio-13 { 195 + marvell,pins = "mpp13"; 196 + marvell,function = "gpio"; 197 + }; 198 + 199 + pmx_gpio_14: pmx-gpio-14 { 200 + marvell,pins = "mpp14"; 201 + marvell,function = "gpio"; 202 + }; 203 + 204 + pmx_gpio_15: pmx-gpio-15 { 205 + marvell,pins = "mpp15"; 206 + marvell,function = "gpio"; 207 + }; 208 + 209 + pmx_gpio_16: pmx-gpio-16 { 210 + marvell,pins = "mpp16"; 211 + marvell,function = "gpio"; 212 + }; 213 + 214 + pmx_gpio_17: pmx-gpio-17 { 215 + marvell,pins = "mpp17"; 216 + marvell,function = "gpio"; 217 + }; 218 + 219 + pmx_gpio_18: pmx-gpio-18 { 220 + marvell,pins = "mpp18"; 221 + marvell,function = "gpio"; 222 + }; 223 + 224 + pmx_gpio_19: pmx-gpio-19 { 225 + marvell,pins = "mpp19"; 226 + marvell,function = "gpio"; 227 + }; 228 + 229 + pmx_gpio_20: pmx-gpio-20 { 230 + marvell,pins = "mpp20"; 231 + marvell,function = "gpio"; 232 + }; 233 + 234 + pmx_gpio_21: pmx-gpio-21 { 235 + marvell,pins = "mpp21"; 236 + marvell,function = "gpio"; 237 + }; 238 + 239 + pmx_camera: pmx-camera { 240 + marvell,pins = "mpp_camera"; 241 + marvell,function = "camera"; 242 + }; 243 + 244 + pmx_camera_gpio: pmx-camera-gpio { 245 + marvell,pins = "mpp_camera"; 246 + marvell,function = "gpio"; 247 + }; 248 + 249 + pmx_sdio0: pmx-sdio0 { 250 + marvell,pins = "mpp_sdio0"; 251 + marvell,function = "sdio0"; 252 + }; 253 + 254 + pmx_sdio0_gpio: pmx-sdio0-gpio { 255 + marvell,pins = "mpp_sdio0"; 256 + marvell,function = "gpio"; 257 + }; 258 + 259 + pmx_sdio1: pmx-sdio1 { 260 + marvell,pins = "mpp_sdio1"; 261 + marvell,function = "sdio1"; 262 + }; 263 + 264 + pmx_sdio1_gpio: pmx-sdio1-gpio { 265 + marvell,pins = "mpp_sdio1"; 266 + marvell,function = "gpio"; 267 + }; 268 + 269 + pmx_audio1_gpio: pmx-audio1-gpio { 270 + marvell,pins = "mpp_audio1"; 271 + marvell,function = "gpio"; 272 + }; 273 + 274 + pmx_spi0: pmx-spi0 { 275 + marvell,pins = "mpp_spi0"; 276 + marvell,function = "spi0"; 277 + }; 278 + 279 + pmx_spi0_gpio: pmx-spi0-gpio { 280 + marvell,pins = "mpp_spi0"; 281 + marvell,function = "gpio"; 282 + }; 283 + 284 + pmx_uart1: pmx-uart1 { 285 + marvell,pins = "mpp_uart1"; 286 + marvell,function = "uart1"; 287 + }; 288 + 289 + pmx_uart1_gpio: pmx-uart1-gpio { 290 + marvell,pins = "mpp_uart1"; 291 + marvell,function = "gpio"; 292 + }; 293 + 294 + pmx_nand: pmx-nand { 295 + marvell,pins = "mpp_nand"; 296 + marvell,function = "nand"; 297 + }; 298 + 299 + pmx_nand_gpo: pmx-nand-gpo { 300 + marvell,pins = "mpp_nand"; 301 + marvell,function = "gpo"; 302 + }; 159 303 }; 160 304 161 - spi0: spi@10600 { 305 + spi0: spi-ctrl@10600 { 162 306 compatible = "marvell,orion-spi"; 163 307 #address-cells = <1>; 164 308 #size-cells = <0>; ··· 341 135 interrupts = <6>; 342 136 reg = <0x10600 0x28>; 343 137 clocks = <&core_clk 0>; 138 + pinctrl-0 = <&pmx_spi0>; 139 + pinctrl-names = "default"; 344 140 status = "disabled"; 345 141 }; 346 142 347 - spi1: spi@14600 { 143 + spi1: spi-ctrl@14600 { 348 144 compatible = "marvell,orion-spi"; 349 145 #address-cells = <1>; 350 146 #size-cells = <0>; ··· 357 149 status = "disabled"; 358 150 }; 359 151 360 - i2c0: i2c@11000 { 152 + i2c0: i2c-ctrl@11000 { 361 153 compatible = "marvell,mv64xxx-i2c"; 362 154 reg = <0x11000 0x20>; 363 155 #address-cells = <1>; ··· 385 177 status = "okay"; 386 178 }; 387 179 388 - sdio0: sdio@92000 { 180 + sdio0: sdio-host@92000 { 389 181 compatible = "marvell,dove-sdhci"; 390 182 reg = <0x92000 0x100>; 391 183 interrupts = <35>, <37>; 392 184 clocks = <&gate_clk 8>; 185 + pinctrl-0 = <&pmx_sdio0>; 186 + pinctrl-names = "default"; 393 187 status = "disabled"; 394 188 }; 395 189 396 - sdio1: sdio@90000 { 190 + sdio1: sdio-host@90000 { 397 191 compatible = "marvell,dove-sdhci"; 398 192 reg = <0x90000 0x100>; 399 193 interrupts = <36>, <38>; 400 194 clocks = <&gate_clk 9>; 195 + pinctrl-0 = <&pmx_sdio1>; 196 + pinctrl-names = "default"; 401 197 status = "disabled"; 402 198 }; 403 199 404 - sata0: sata@a0000 { 200 + sata0: sata-host@a0000 { 405 201 compatible = "marvell,orion-sata"; 406 202 reg = <0xa0000 0x2400>; 407 203 interrupts = <62>; ··· 414 202 status = "disabled"; 415 203 }; 416 204 417 - rtc@d8500 { 205 + rtc: real-time-clock@d8500 { 418 206 compatible = "marvell,orion-rtc"; 419 207 reg = <0xd8500 0x20>; 420 208 }; 421 209 422 - crypto: crypto@30000 { 210 + crypto: crypto-engine@30000 { 423 211 compatible = "marvell,orion-crypto"; 424 212 reg = <0x30000 0x10000>, 425 213 <0xc8000000 0x800>; ··· 468 256 dmacap,memset; 469 257 dmacap,memcpy; 470 258 dmacap,xor; 259 + }; 260 + }; 261 + 262 + mdio: mdio-bus@72004 { 263 + compatible = "marvell,orion-mdio"; 264 + #address-cells = <1>; 265 + #size-cells = <0>; 266 + reg = <0x72004 0x84>; 267 + interrupts = <30>; 268 + clocks = <&gate_clk 2>; 269 + status = "disabled"; 270 + 271 + ethphy: ethernet-phy { 272 + device-type = "ethernet-phy"; 273 + /* set phy address in board file */ 274 + }; 275 + }; 276 + 277 + eth: ethernet-controller@72000 { 278 + compatible = "marvell,orion-eth"; 279 + #address-cells = <1>; 280 + #size-cells = <0>; 281 + reg = <0x72000 0x4000>; 282 + clocks = <&gate_clk 2>; 283 + marvell,tx-checksum-limit = <1600>; 284 + status = "disabled"; 285 + 286 + ethernet-port@0 { 287 + device_type = "network"; 288 + compatible = "marvell,orion-eth-port"; 289 + reg = <0>; 290 + interrupts = <29>; 291 + /* overwrite MAC address in bootloader */ 292 + local-mac-address = [00 00 00 00 00 00]; 293 + phy-handle = <&ethphy>; 471 294 }; 472 295 }; 473 296 };
+16
arch/arm/boot/dts/kirkwood-cloudbox.dts
··· 89 89 gpios = <&gpio0 17 0>; 90 90 }; 91 91 }; 92 + 93 + &mdio { 94 + status = "okay"; 95 + 96 + ethphy0: ethernet-phy@0 { 97 + device_type = "ethernet-phy"; 98 + reg = <0>; 99 + }; 100 + }; 101 + 102 + &eth0 { 103 + status = "okay"; 104 + ethernet0-port@0 { 105 + phy-handle = <&ethphy0>; 106 + }; 107 + };
+16
arch/arm/boot/dts/kirkwood-db.dtsi
··· 79 79 }; 80 80 }; 81 81 }; 82 + 83 + &mdio { 84 + status = "okay"; 85 + 86 + ethphy0: ethernet-phy@8 { 87 + device_type = "ethernet-phy"; 88 + reg = <8>; 89 + }; 90 + }; 91 + 92 + &eth0 { 93 + status = "okay"; 94 + ethernet0-port@0 { 95 + phy-handle = <&ethphy0>; 96 + }; 97 + };
+16
arch/arm/boot/dts/kirkwood-dnskw.dtsi
··· 219 219 }; 220 220 }; 221 221 }; 222 + 223 + &mdio { 224 + status = "okay"; 225 + 226 + ethphy0: ethernet-phy@8 { 227 + device_type = "ethernet-phy"; 228 + reg = <8>; 229 + }; 230 + }; 231 + 232 + &eth0 { 233 + status = "okay"; 234 + ethernet0-port@0 { 235 + phy-handle = <&ethphy0>; 236 + }; 237 + };
+17
arch/arm/boot/dts/kirkwood-dockstar.dts
··· 90 90 }; 91 91 }; 92 92 }; 93 + 94 + &mdio { 95 + status = "okay"; 96 + 97 + ethphy0: ethernet-phy@0 { 98 + device_type = "ethernet-phy"; 99 + compatible = "marvell,88e1116"; 100 + reg = <0>; 101 + }; 102 + }; 103 + 104 + &eth0 { 105 + status = "okay"; 106 + ethernet0-port@0 { 107 + phy-handle = <&ethphy0>; 108 + }; 109 + };
+28
arch/arm/boot/dts/kirkwood-dreamplug.dts
··· 99 99 }; 100 100 }; 101 101 }; 102 + 103 + &mdio { 104 + status = "okay"; 105 + 106 + ethphy0: ethernet-phy@0 { 107 + device_type = "ethernet-phy"; 108 + reg = <0>; 109 + }; 110 + 111 + ethphy1: ethernet-phy@1 { 112 + device_type = "ethernet-phy"; 113 + reg = <1>; 114 + }; 115 + }; 116 + 117 + &eth0 { 118 + status = "okay"; 119 + ethernet0-port@0 { 120 + phy-handle = <&ethphy0>; 121 + }; 122 + }; 123 + 124 + &eth1 { 125 + status = "okay"; 126 + ethernet1-port@0 { 127 + phy-handle = <&ethphy1>; 128 + }; 129 + };
+16
arch/arm/boot/dts/kirkwood-goflexnet.dts
··· 170 170 }; 171 171 }; 172 172 }; 173 + 174 + &mdio { 175 + status = "okay"; 176 + 177 + ethphy0: ethernet-phy@0 { 178 + device_type = "ethernet-phy"; 179 + reg = <0>; 180 + }; 181 + }; 182 + 183 + &eth0 { 184 + status = "okay"; 185 + ethernet0-port@0 { 186 + phy-handle = <&ethphy0>; 187 + }; 188 + };
+30
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
··· 96 96 }; 97 97 }; 98 98 }; 99 + 100 + &mdio { 101 + status = "okay"; 102 + 103 + ethphy0: ethernet-phy@0 { 104 + device_type = "ethernet-phy"; 105 + compatible = "marvell,88e1121"; 106 + reg = <0>; 107 + }; 108 + 109 + ethphy1: ethernet-phy@1 { 110 + device_type = "ethernet-phy"; 111 + compatible = "marvell,88e1121"; 112 + reg = <1>; 113 + }; 114 + }; 115 + 116 + &eth0 { 117 + status = "okay"; 118 + ethernet0-port@0 { 119 + phy-handle = <&ethphy0>; 120 + }; 121 + }; 122 + 123 + &eth1 { 124 + status = "okay"; 125 + ethernet1-port@0 { 126 + phy-handle = <&ethphy1>; 127 + }; 128 + };
+16
arch/arm/boot/dts/kirkwood-ib62x0.dts
··· 122 122 123 123 124 124 }; 125 + 126 + &mdio { 127 + status = "okay"; 128 + 129 + ethphy0: ethernet-phy@8 { 130 + device_type = "ethernet-phy"; 131 + reg = <8>; 132 + }; 133 + }; 134 + 135 + &eth0 { 136 + status = "okay"; 137 + ethernet0-port@0 { 138 + phy-handle = <&ethphy0>; 139 + }; 140 + };
+16
arch/arm/boot/dts/kirkwood-iconnect.dts
··· 179 179 }; 180 180 }; 181 181 }; 182 + 183 + &mdio { 184 + status = "okay"; 185 + 186 + ethphy0: ethernet-phy@11 { 187 + device_type = "ethernet-phy"; 188 + reg = <11>; 189 + }; 190 + }; 191 + 192 + &eth0 { 193 + status = "okay"; 194 + ethernet0-port@0 { 195 + phy-handle = <&ethphy0>; 196 + }; 197 + };
+24
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
··· 194 194 }; 195 195 }; 196 196 }; 197 + 198 + &mdio { 199 + status = "okay"; 200 + 201 + ethphy1: ethernet-phy@11 { 202 + device_type = "ethernet-phy"; 203 + reg = <11>; 204 + }; 205 + }; 206 + 207 + &eth0 { 208 + status = "okay"; 209 + ethernet0-port@0 { 210 + speed = <1000>; 211 + duplex = <1>; 212 + }; 213 + }; 214 + 215 + &eth1 { 216 + status = "okay"; 217 + ethernet1-port@0 { 218 + phy-handle = <&ethphy1>; 219 + }; 220 + };
+2
arch/arm/boot/dts/kirkwood-is2.dts
··· 30 30 }; 31 31 }; 32 32 }; 33 + 34 + &ethphy0 { reg = <8>; };
+16
arch/arm/boot/dts/kirkwood-km_kirkwood.dts
··· 50 50 i2c-gpio,delay-us = <2>; /* ~100 kHz */ 51 51 }; 52 52 }; 53 + 54 + &mdio { 55 + status = "okay"; 56 + 57 + ethphy0: ethernet-phy@0 { 58 + device_type = "ethernet-phy"; 59 + reg = <0>; 60 + }; 61 + }; 62 + 63 + &eth0 { 64 + status = "okay"; 65 + ethernet0-port@0 { 66 + phy-handle = <&ethphy0>; 67 + }; 68 + };
+28
arch/arm/boot/dts/kirkwood-lsxl.dtsi
··· 207 207 }; 208 208 }; 209 209 }; 210 + 211 + &mdio { 212 + status = "okay"; 213 + 214 + ethphy0: ethernet-phy@0 { 215 + device_type = "ethernet-phy"; 216 + reg = <0>; 217 + }; 218 + 219 + ethphy1: ethernet-phy@8 { 220 + device_type = "ethernet-phy"; 221 + reg = <8>; 222 + }; 223 + }; 224 + 225 + &eth0 { 226 + status = "okay"; 227 + ethernet0-port@0 { 228 + phy-handle = <&ethphy0>; 229 + }; 230 + }; 231 + 232 + &eth1 { 233 + status = "okay"; 234 + ethernet1-port@0 { 235 + phy-handle = <&ethphy1>; 236 + }; 237 + };
+27
arch/arm/boot/dts/kirkwood-mplcec4.dts
··· 194 194 }; 195 195 }; 196 196 197 + &mdio { 198 + status = "okay"; 199 + 200 + ethphy0: ethernet-phy@1 { 201 + device_type = "ethernet-phy"; 202 + reg = <1>; 203 + }; 204 + 205 + ethphy1: ethernet-phy@2 { 206 + device_type = "ethernet-phy"; 207 + reg = <2>; 208 + }; 209 + }; 210 + 211 + &eth0 { 212 + status = "okay"; 213 + ethernet0-port@0 { 214 + phy-handle = <&ethphy0>; 215 + }; 216 + }; 217 + 218 + &eth1 { 219 + status = "okay"; 220 + ethernet1-port@0 { 221 + phy-handle = <&ethphy1>; 222 + }; 223 + };
+125
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
··· 1 + /* 2 + * Marvell 88F6281 GTW GE Board 3 + * 4 + * Lennert Buytenhek <buytenh@marvell.com> 5 + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 6 + * 7 + * This file is licensed under the terms of the GNU General Public 8 + * License version 2. This program is licensed "as is" without any 9 + * warranty of any kind, whether express or implied. 10 + * 11 + * This file contains the definitions that are common between the 6281 12 + * and 6282 variants of the Marvell Kirkwood Development Board. 13 + */ 14 + 15 + /dts-v1/; 16 + 17 + #include "kirkwood.dtsi" 18 + #include "kirkwood-6281.dtsi" 19 + 20 + / { 21 + model = "Marvell 88F6281 GTW GE Board"; 22 + compatible = "marvell,mv88f6281gtw-ge", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 23 + 24 + memory { 25 + device_type = "memory"; 26 + reg = <0x00000000 0x20000000>; /* 512 MB */ 27 + }; 28 + 29 + chosen { 30 + bootargs = "console=ttyS0,115200n8 earlyprintk"; 31 + }; 32 + 33 + ocp@f1000000 { 34 + pinctrl@10000 { 35 + pmx_usb_led: pmx-usb-led { 36 + marvell,pins = "mpp12"; 37 + marvell,function = "gpo"; 38 + }; 39 + 40 + pmx_leds: pmx-leds { 41 + marvell,pins = "mpp20", "mpp21"; 42 + marvell,function = "gpio"; 43 + }; 44 + 45 + pmx_keys: pmx-keys { 46 + marvell,pins = "mpp46", "mpp47"; 47 + marvell,function = "gpio"; 48 + }; 49 + }; 50 + 51 + spi@10600 { 52 + pinctrl-0 = <&pmx_spi>; 53 + pinctrl-names = "default"; 54 + status = "okay"; 55 + 56 + flash@0 { 57 + #address-cells = <1>; 58 + #size-cells = <1>; 59 + compatible = "mx25l12805d"; 60 + reg = <0>; 61 + spi-max-frequency = <50000000>; 62 + mode = <0>; 63 + }; 64 + }; 65 + 66 + serial@12000 { 67 + pinctrl-0 = <&pmx_uart0>; 68 + pinctrl-names = "default"; 69 + clock-frequency = <200000000>; 70 + status = "ok"; 71 + }; 72 + 73 + ehci@50000 { 74 + status = "okay"; 75 + }; 76 + 77 + pcie-controller { 78 + status = "okay"; 79 + 80 + pcie@1,0 { 81 + status = "okay"; 82 + }; 83 + }; 84 + }; 85 + 86 + gpio-leds { 87 + compatible = "gpio-leds"; 88 + pinctrl-0 = <&pmx_leds &pmx_usb_led>; 89 + pinctrl-names = "default"; 90 + 91 + green-status { 92 + label = "gtw:green:Status"; 93 + gpios = <&gpio0 20 0>; 94 + }; 95 + 96 + red-status { 97 + label = "gtw:red:Status"; 98 + gpios = <&gpio0 21 0>; 99 + }; 100 + 101 + green-usb { 102 + label = "gtw:green:USB"; 103 + gpios = <&gpio0 12 0>; 104 + }; 105 + }; 106 + 107 + gpio_keys { 108 + compatible = "gpio-keys"; 109 + #address-cells = <1>; 110 + #size-cells = <0>; 111 + pinctrl-0 = <&pmx_keys>; 112 + pinctrl-names = "default"; 113 + 114 + button@1 { 115 + label = "SWR Button"; 116 + linux,code = <0x198>; /* KEY_RESTART */ 117 + gpios = <&gpio1 15 1>; 118 + }; 119 + button@2 { 120 + label = "WPS Button"; 121 + linux,code = <0x211>; /* KEY_WPS_BUTTON */ 122 + gpios = <&gpio1 14 1>; 123 + }; 124 + }; 125 + };
+16
arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
··· 207 207 }; 208 208 }; 209 209 }; 210 + 211 + &mdio { 212 + status = "okay"; 213 + 214 + ethphy0: ethernet-phy@0 { 215 + device_type = "ethernet-phy"; 216 + reg = <0>; 217 + }; 218 + }; 219 + 220 + &eth0 { 221 + status = "okay"; 222 + ethernet0-port@0 { 223 + phy-handle = <&ethphy0>; 224 + }; 225 + };
+16
arch/arm/boot/dts/kirkwood-ns2-common.dtsi
··· 84 84 }; 85 85 86 86 }; 87 + 88 + &mdio { 89 + status = "okay"; 90 + 91 + ethphy0: ethernet-phy { 92 + device_type = "ethernet-phy"; 93 + /* overwrite reg property in board file */ 94 + }; 95 + }; 96 + 97 + &eth0 { 98 + status = "okay"; 99 + ethernet0-port@0 { 100 + phy-handle = <&ethphy0>; 101 + }; 102 + };
+2
arch/arm/boot/dts/kirkwood-ns2.dts
··· 30 30 }; 31 31 }; 32 32 }; 33 + 34 + &ethphy0 { reg = <8>; };
+2
arch/arm/boot/dts/kirkwood-ns2lite.dts
··· 30 30 }; 31 31 }; 32 32 }; 33 + 34 + &ethphy0 { reg = <0>; };
+2
arch/arm/boot/dts/kirkwood-ns2max.dts
··· 49 49 }; 50 50 }; 51 51 }; 52 + 53 + &ethphy0 { reg = <8>; };
+2
arch/arm/boot/dts/kirkwood-ns2mini.dts
··· 50 50 }; 51 51 }; 52 52 }; 53 + 54 + &ethphy0 { reg = <0>; };
+16
arch/arm/boot/dts/kirkwood-openblocks_a6.dts
··· 166 166 }; 167 167 }; 168 168 }; 169 + 170 + &mdio { 171 + status = "okay"; 172 + 173 + ethphy0: ethernet-phy@0 { 174 + device_type = "ethernet-phy"; 175 + reg = <0>; 176 + }; 177 + }; 178 + 179 + &eth0 { 180 + status = "okay"; 181 + ethernet0-port@0 { 182 + phy-handle = <&ethphy0>; 183 + }; 184 + };
+16
arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
··· 91 91 }; 92 92 }; 93 93 }; 94 + 95 + &mdio { 96 + status = "okay"; 97 + 98 + ethphy0: ethernet-phy@0 { 99 + device_type = "ethernet-phy"; 100 + reg = <0>; 101 + }; 102 + }; 103 + 104 + &eth0 { 105 + status = "okay"; 106 + ethernet0-port@0 { 107 + phy-handle = <&ethphy0>; 108 + }; 109 + };
+16
arch/arm/boot/dts/kirkwood-topkick.dts
··· 203 203 }; 204 204 }; 205 205 }; 206 + 207 + &mdio { 208 + status = "okay"; 209 + 210 + ethphy0: ethernet-phy@0 { 211 + device_type = "ethernet-phy"; 212 + reg = <0>; 213 + }; 214 + }; 215 + 216 + &eth0 { 217 + status = "okay"; 218 + ethernet0-port@0 { 219 + phy-handle = <&ethphy0>; 220 + }; 221 + };
+2
arch/arm/boot/dts/kirkwood-ts219-6281.dts
··· 51 51 }; 52 52 }; 53 53 }; 54 + 55 + &ethphy0 { reg = <8>; };
+2
arch/arm/boot/dts/kirkwood-ts219-6282.dts
··· 62 62 }; 63 63 }; 64 64 }; 65 + 66 + &ethphy0 { reg = <0>; };
+16
arch/arm/boot/dts/kirkwood-ts219.dtsi
··· 99 99 }; 100 100 }; 101 101 }; 102 + 103 + &mdio { 104 + status = "okay"; 105 + 106 + ethphy0: ethernet-phy { 107 + device_type = "ethernet-phy"; 108 + /* overwrite reg property in board file */ 109 + }; 110 + }; 111 + 112 + &eth0 { 113 + status = "okay"; 114 + ethernet0-port@0 { 115 + phy-handle = <&ethphy0>; 116 + }; 117 + };
+79 -8
arch/arm/boot/dts/kirkwood.dtsi
··· 22 22 gpio0 = &gpio0; 23 23 gpio1 = &gpio1; 24 24 }; 25 - intc: interrupt-controller { 26 - compatible = "marvell,orion-intc", "marvell,intc"; 27 - interrupt-controller; 28 - #interrupt-cells = <1>; 29 - reg = <0xf1020204 0x04>, 30 - <0xf1020214 0x04>; 31 - }; 32 25 33 26 mbus { 34 27 compatible = "marvell,kirkwood-mbus", "simple-bus"; ··· 43 50 mbusc: mbus-controller@20000 { 44 51 compatible = "marvell,mbus-controller"; 45 52 reg = <0x20000 0x80>, <0x1500 0x20>; 53 + }; 54 + 55 + timer: timer@20300 { 56 + compatible = "marvell,orion-timer"; 57 + reg = <0x20300 0x20>; 58 + interrupt-parent = <&bridge_intc>; 59 + interrupts = <1>, <2>; 60 + clocks = <&core_clk 0>; 61 + }; 62 + 63 + intc: main-interrupt-ctrl@20200 { 64 + compatible = "marvell,orion-intc"; 65 + interrupt-controller; 66 + #interrupt-cells = <1>; 67 + reg = <0x20200 0x10>, <0x20210 0x10>; 68 + }; 69 + 70 + bridge_intc: bridge-interrupt-ctrl@20110 { 71 + compatible = "marvell,orion-bridge-intc"; 72 + interrupt-controller; 73 + #interrupt-cells = <1>; 74 + reg = <0x20110 0x8>; 75 + interrupts = <1>; 76 + marvell,#interrupts = <6>; 46 77 }; 47 78 48 79 core_clk: core-clocks@10030 { ··· 135 118 #clock-cells = <1>; 136 119 }; 137 120 138 - wdt@20300 { 121 + wdt: watchdog-timer@20300 { 139 122 compatible = "marvell,orion-wdt"; 140 123 reg = <0x20300 0x28>; 124 + interrupt-parent = <&bridge_intc>; 125 + interrupts = <3>; 141 126 clocks = <&gate_clk 7>; 142 127 status = "okay"; 143 128 }; ··· 225 206 interrupts = <22>; 226 207 clocks = <&gate_clk 17>; 227 208 status = "okay"; 209 + }; 210 + 211 + mdio: mdio-bus@72004 { 212 + compatible = "marvell,orion-mdio"; 213 + #address-cells = <1>; 214 + #size-cells = <0>; 215 + reg = <0x72004 0x84>; 216 + interrupts = <46>; 217 + clocks = <&gate_clk 0>; 218 + status = "disabled"; 219 + 220 + /* add phy nodes in board file */ 221 + }; 222 + 223 + eth0: ethernet-controller@72000 { 224 + compatible = "marvell,kirkwood-eth"; 225 + #address-cells = <1>; 226 + #size-cells = <0>; 227 + reg = <0x72000 0x4000>; 228 + clocks = <&gate_clk 0>; 229 + marvell,tx-checksum-limit = <1600>; 230 + status = "disabled"; 231 + 232 + ethernet0-port@0 { 233 + device_type = "network"; 234 + compatible = "marvell,kirkwood-eth-port"; 235 + reg = <0>; 236 + interrupts = <11>; 237 + /* overwrite MAC address in bootloader */ 238 + local-mac-address = [00 00 00 00 00 00]; 239 + /* set phy-handle property in board file */ 240 + }; 241 + }; 242 + 243 + eth1: ethernet-controller@76000 { 244 + compatible = "marvell,kirkwood-eth"; 245 + #address-cells = <1>; 246 + #size-cells = <0>; 247 + reg = <0x76000 0x4000>; 248 + clocks = <&gate_clk 19>; 249 + marvell,tx-checksum-limit = <1600>; 250 + status = "disabled"; 251 + 252 + ethernet1-port@0 { 253 + device_type = "network"; 254 + compatible = "marvell,kirkwood-eth-port"; 255 + reg = <0>; 256 + interrupts = <15>; 257 + /* overwrite MAC address in bootloader */ 258 + local-mac-address = [00 00 00 00 00 00]; 259 + /* set phy-handle property in board file */ 260 + }; 228 261 }; 229 262 }; 230 263 };
+17
arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
··· 53 53 }; 54 54 }; 55 55 }; 56 + 57 + &mdio { 58 + status = "okay"; 59 + 60 + ethphy: ethernet-phy { 61 + device-type = "ethernet-phy"; 62 + reg = <8>; 63 + }; 64 + }; 65 + 66 + &eth { 67 + status = "okay"; 68 + 69 + ethernet-port@0 { 70 + phy-handle = <&ethphy>; 71 + }; 72 + };
+32 -2
arch/arm/boot/dts/orion5x.dtsi
··· 16 16 aliases { 17 17 gpio0 = &gpio0; 18 18 }; 19 + 19 20 intc: interrupt-controller { 20 - compatible = "marvell,orion-intc", "marvell,intc"; 21 + compatible = "marvell,orion-intc"; 21 22 interrupt-controller; 22 23 #interrupt-cells = <1>; 23 - reg = <0xf1020204 0x04>; 24 + reg = <0xf1020200 0x08>; 24 25 }; 25 26 26 27 ocp@f1000000 { ··· 132 131 reg-names = "regs", "sram"; 133 132 interrupts = <28>; 134 133 status = "okay"; 134 + }; 135 + 136 + mdio: mdio-bus@72004 { 137 + compatible = "marvell,orion-mdio"; 138 + #address-cells = <1>; 139 + #size-cells = <0>; 140 + reg = <0x72004 0x84>; 141 + interrupts = <22>; 142 + status = "disabled"; 143 + 144 + /* add phy nodes in board file */ 145 + }; 146 + 147 + eth: ethernet-controller@72000 { 148 + compatible = "marvell,orion-eth"; 149 + #address-cells = <1>; 150 + #size-cells = <0>; 151 + reg = <0x72000 0x4000>; 152 + marvell,tx-checksum-limit = <1600>; 153 + status = "disabled"; 154 + 155 + ethernet-port@0 { 156 + device_type = "network"; 157 + compatible = "marvell,orion-eth-port"; 158 + reg = <0>; 159 + /* overwrite MAC address in bootloader */ 160 + local-mac-address = [00 00 00 00 00 00]; 161 + /* set phy-handle property in board file */ 162 + }; 135 163 }; 136 164 }; 137 165 };
+5 -1
arch/arm/configs/ape6evm_defconfig
··· 54 54 CONFIG_SMC91X=y 55 55 CONFIG_SMSC911X=y 56 56 # CONFIG_INPUT_MOUSEDEV is not set 57 - # CONFIG_INPUT_KEYBOARD is not set 57 + CONFIG_INPUT_EVDEV=y 58 + CONFIG_KEYBOARD_GPIO=y 58 59 # CONFIG_INPUT_MOUSE is not set 59 60 # CONFIG_SERIO is not set 60 61 CONFIG_SERIAL_NONSTANDARD=y ··· 72 71 CONFIG_REGULATOR_GPIO=y 73 72 # CONFIG_HID is not set 74 73 # CONFIG_USB_SUPPORT is not set 74 + CONFIG_NEW_LEDS=y 75 + CONFIG_LEDS_CLASS=y 76 + CONFIG_LEDS_GPIO=y 75 77 # CONFIG_IOMMU_SUPPORT is not set 76 78 # CONFIG_DNOTIFY is not set 77 79 CONFIG_TMPFS=y
+12 -1
arch/arm/configs/bcm_defconfig
··· 42 42 CONFIG_NEON=y 43 43 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 44 44 CONFIG_PM_RUNTIME=y 45 + CONFIG_NET=y 46 + CONFIG_PACKET=y 47 + CONFIG_PACKET_DIAG=y 48 + CONFIG_UNIX=y 49 + CONFIG_UNIX_DIAG=y 50 + CONFIG_NET_KEY=y 51 + CONFIG_INET=y 52 + CONFIG_IP_MULTICAST=y 53 + CONFIG_ARPD=y 54 + CONFIG_SYN_COOKIES=y 55 + CONFIG_TCP_MD5SIG=y 56 + CONFIG_IPV6=y 45 57 CONFIG_DEVTMPFS=y 46 58 CONFIG_DEVTMPFS_MOUNT=y 47 59 CONFIG_PROC_DEVICETREE=y ··· 124 112 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y 125 113 CONFIG_DEBUG_INFO=y 126 114 # CONFIG_FTRACE is not set 127 - CONFIG_DEBUG_LL=y 128 115 CONFIG_CRC_CCITT=y 129 116 CONFIG_CRC_T10DIF=y 130 117 CONFIG_CRC_ITU_T=y
+4
arch/arm/configs/dove_defconfig
··· 13 13 CONFIG_MACH_DOVE_DB=y 14 14 CONFIG_MACH_CM_A510=y 15 15 CONFIG_MACH_DOVE_DT=y 16 + CONFIG_PCI=y 17 + CONFIG_PCI_MSI=y 18 + CONFIG_PCI_MVEBU=y 16 19 CONFIG_AEABI=y 17 20 CONFIG_HIGHMEM=y 18 21 CONFIG_ZBOOT_ROM_TEXT=0x0 ··· 81 78 CONFIG_THERMAL=y 82 79 CONFIG_DOVE_THERMAL=y 83 80 CONFIG_USB=y 81 + CONFIG_USB_XHCI_HCD=y 84 82 CONFIG_USB_EHCI_HCD=y 85 83 CONFIG_USB_EHCI_ROOT_HUB_TT=y 86 84 CONFIG_USB_STORAGE=y
+13 -38
arch/arm/configs/kirkwood_defconfig
··· 10 10 # CONFIG_BLK_DEV_BSG is not set 11 11 CONFIG_ARCH_KIRKWOOD=y 12 12 CONFIG_MACH_D2NET_V2=y 13 - CONFIG_MACH_DB88F6281_BP=y 14 - CONFIG_MACH_DOCKSTAR=y 15 - CONFIG_MACH_ESATA_SHEEVAPLUG=y 16 - CONFIG_MACH_GURUPLUG=y 17 - CONFIG_MACH_INETSPACE_V2=y 18 - CONFIG_MACH_MV88F6281GTW_GE=y 19 13 CONFIG_MACH_NET2BIG_V2=y 20 14 CONFIG_MACH_NET5BIG_V2=y 21 - CONFIG_MACH_NETSPACE_MAX_V2=y 22 - CONFIG_MACH_NETSPACE_V2=y 23 15 CONFIG_MACH_OPENRD_BASE=y 24 16 CONFIG_MACH_OPENRD_CLIENT=y 25 17 CONFIG_MACH_OPENRD_ULTIMATE=y 26 18 CONFIG_MACH_RD88F6192_NAS=y 27 19 CONFIG_MACH_RD88F6281=y 28 - CONFIG_MACH_SHEEVAPLUG=y 29 20 CONFIG_MACH_T5325=y 30 21 CONFIG_MACH_TS219=y 31 22 CONFIG_MACH_TS41X=y 32 - CONFIG_MACH_CLOUDBOX_DT=y 33 - CONFIG_MACH_DB88F628X_BP_DT=y 34 - CONFIG_MACH_DLINK_KIRKWOOD_DT=y 35 - CONFIG_MACH_DOCKSTAR_DT=y 36 - CONFIG_MACH_DREAMPLUG_DT=y 37 - CONFIG_MACH_GOFLEXNET_DT=y 38 - CONFIG_MACH_GURUPLUG_DT=y 39 - CONFIG_MACH_IB62X0_DT=y 40 - CONFIG_MACH_ICONNECT_DT=y 41 - CONFIG_MACH_INETSPACE_V2_DT=y 42 - CONFIG_MACH_IOMEGA_IX2_200_DT=y 43 - CONFIG_MACH_KM_KIRKWOOD_DT=y 44 - CONFIG_MACH_LSXL_DT=y 45 - CONFIG_MACH_MPLCEC4_DT=y 46 - CONFIG_MACH_NETSPACE_LITE_V2_DT=y 47 - CONFIG_MACH_NETSPACE_MAX_V2_DT=y 48 - CONFIG_MACH_NETSPACE_MINI_V2_DT=y 49 - CONFIG_MACH_NETSPACE_V2_DT=y 50 - CONFIG_MACH_NSA310_DT=y 51 - CONFIG_MACH_OPENBLOCKS_A6_DT=y 52 - CONFIG_MACH_READYNAS_DT=y 53 - CONFIG_MACH_SHEEVAPLUG_DT=y 54 - CONFIG_MACH_TOPKICK_DT=y 55 - CONFIG_MACH_TS219_DT=y 23 + CONFIG_ARCH_KIRKWOOD_DT=y 24 + CONFIG_MACH_MV88F6281GTW_GE_DT=y 56 25 # CONFIG_CPU_FEROCEON_OLD_ID is not set 57 26 CONFIG_PCI_MVEBU=y 58 27 CONFIG_PREEMPT=y ··· 61 92 CONFIG_MTD_NAND=y 62 93 CONFIG_MTD_NAND_ORION=y 63 94 CONFIG_BLK_DEV_LOOP=y 95 + CONFIG_EEPROM_AT24=y 64 96 # CONFIG_SCSI_PROC_FS is not set 65 97 CONFIG_BLK_DEV_SD=y 66 98 CONFIG_BLK_DEV_SR=m ··· 70 100 CONFIG_SATA_AHCI=y 71 101 CONFIG_SATA_MV=y 72 102 CONFIG_NETDEVICES=y 73 - CONFIG_MII=y 74 103 CONFIG_NET_DSA_MV88E6123_61_65=y 75 104 CONFIG_MV643XX_ETH=y 105 + CONFIG_R8169=y 76 106 CONFIG_MARVELL_PHY=y 77 107 CONFIG_LIBERTAS=y 78 108 CONFIG_LIBERTAS_SDIO=y ··· 93 123 CONFIG_SPI=y 94 124 CONFIG_SPI_ORION=y 95 125 CONFIG_GPIO_SYSFS=y 96 - # CONFIG_HWMON is not set 126 + CONFIG_SENSORS_ADT7475=y 127 + CONFIG_SENSORS_LM63=y 128 + CONFIG_SENSORS_LM75=y 129 + CONFIG_SENSORS_LM85=y 97 130 CONFIG_THERMAL=y 98 - CONFIG_KIRKWOOD_THERMAL=y 99 131 CONFIG_WATCHDOG=y 100 132 CONFIG_ORION_WATCHDOG=y 101 133 CONFIG_HID_DRAGONRISE=y ··· 136 164 CONFIG_LEDS_TRIGGER_HEARTBEAT=y 137 165 CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 138 166 CONFIG_RTC_CLASS=y 167 + CONFIG_RTC_DRV_RS5C372=y 168 + CONFIG_RTC_DRV_PCF8563=y 139 169 CONFIG_RTC_DRV_S35390A=y 140 170 CONFIG_RTC_DRV_MV=y 141 171 CONFIG_DMADEVICES=y ··· 145 171 CONFIG_EXT2_FS=y 146 172 CONFIG_EXT3_FS=y 147 173 # CONFIG_EXT3_FS_XATTR is not set 174 + CONFIG_EXT4_FS=y 148 175 CONFIG_ISO9660_FS=m 149 176 CONFIG_JOLIET=y 150 177 CONFIG_UDF_FS=m ··· 161 186 CONFIG_NLS_ISO8859_1=y 162 187 CONFIG_NLS_ISO8859_2=y 163 188 CONFIG_NLS_UTF8=y 164 - CONFIG_MAGIC_SYSRQ=y 189 + CONFIG_DEBUG_INFO=y 165 190 CONFIG_DEBUG_FS=y 191 + CONFIG_MAGIC_SYSRQ=y 166 192 CONFIG_DEBUG_KERNEL=y 167 193 # CONFIG_SCHED_DEBUG is not set 168 194 # CONFIG_DEBUG_PREEMPT is not set 169 - CONFIG_DEBUG_INFO=y 170 195 # CONFIG_FTRACE is not set 171 196 CONFIG_DEBUG_USER=y 172 197 CONFIG_DEBUG_LL=y
+120
arch/arm/configs/lager_defconfig
··· 1 + CONFIG_SYSVIPC=y 2 + CONFIG_NO_HZ=y 3 + CONFIG_IKCONFIG=y 4 + CONFIG_IKCONFIG_PROC=y 5 + CONFIG_LOG_BUF_SHIFT=16 6 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 7 + CONFIG_SYSCTL_SYSCALL=y 8 + CONFIG_EMBEDDED=y 9 + CONFIG_PERF_EVENTS=y 10 + CONFIG_SLAB=y 11 + # CONFIG_LBDAF is not set 12 + # CONFIG_BLK_DEV_BSG is not set 13 + # CONFIG_IOSCHED_DEADLINE is not set 14 + # CONFIG_IOSCHED_CFQ is not set 15 + CONFIG_ARCH_SHMOBILE=y 16 + CONFIG_ARCH_R8A7790=y 17 + CONFIG_MACH_LAGER=y 18 + # CONFIG_SH_TIMER_TMU is not set 19 + # CONFIG_EM_TIMER_STI is not set 20 + CONFIG_ARM_ERRATA_430973=y 21 + CONFIG_ARM_ERRATA_458693=y 22 + CONFIG_ARM_ERRATA_460075=y 23 + CONFIG_ARM_ERRATA_743622=y 24 + CONFIG_ARM_ERRATA_754322=y 25 + CONFIG_HAVE_ARM_ARCH_TIMER=y 26 + CONFIG_AEABI=y 27 + # CONFIG_OABI_COMPAT is not set 28 + CONFIG_FORCE_MAX_ZONEORDER=13 29 + CONFIG_ZBOOT_ROM_TEXT=0x0 30 + CONFIG_ZBOOT_ROM_BSS=0x0 31 + CONFIG_ARM_APPENDED_DTB=y 32 + CONFIG_KEXEC=y 33 + CONFIG_AUTO_ZRELADDR=y 34 + CONFIG_VFP=y 35 + CONFIG_NEON=y 36 + # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 37 + CONFIG_PM_RUNTIME=y 38 + CONFIG_NET=y 39 + CONFIG_PACKET=y 40 + CONFIG_UNIX=y 41 + CONFIG_INET=y 42 + CONFIG_IP_PNP=y 43 + CONFIG_IP_PNP_DHCP=y 44 + # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 45 + # CONFIG_INET_XFRM_MODE_TUNNEL is not set 46 + # CONFIG_INET_XFRM_MODE_BEET is not set 47 + # CONFIG_INET_LRO is not set 48 + # CONFIG_INET_DIAG is not set 49 + # CONFIG_IPV6 is not set 50 + # CONFIG_WIRELESS is not set 51 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 52 + CONFIG_NETDEVICES=y 53 + # CONFIG_NET_CORE is not set 54 + # CONFIG_NET_VENDOR_ARC is not set 55 + # CONFIG_NET_CADENCE is not set 56 + # CONFIG_NET_VENDOR_BROADCOM is not set 57 + # CONFIG_NET_VENDOR_CIRRUS is not set 58 + # CONFIG_NET_VENDOR_FARADAY is not set 59 + # CONFIG_NET_VENDOR_INTEL is not set 60 + # CONFIG_NET_VENDOR_MARVELL is not set 61 + # CONFIG_NET_VENDOR_MICREL is not set 62 + # CONFIG_NET_VENDOR_NATSEMI is not set 63 + CONFIG_SH_ETH=y 64 + # CONFIG_NET_VENDOR_SEEQ is not set 65 + # CONFIG_NET_VENDOR_SMSC is not set 66 + # CONFIG_NET_VENDOR_STMICRO is not set 67 + # CONFIG_NET_VENDOR_VIA is not set 68 + # CONFIG_NET_VENDOR_WIZNET is not set 69 + # CONFIG_WLAN is not set 70 + # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 71 + CONFIG_INPUT_EVDEV=y 72 + # CONFIG_KEYBOARD_ATKBD is not set 73 + CONFIG_KEYBOARD_GPIO=y 74 + # CONFIG_INPUT_MOUSE is not set 75 + # CONFIG_SERIO is not set 76 + # CONFIG_LEGACY_PTYS is not set 77 + CONFIG_SERIAL_SH_SCI=y 78 + CONFIG_SERIAL_SH_SCI_NR_UARTS=10 79 + CONFIG_SERIAL_SH_SCI_CONSOLE=y 80 + # CONFIG_HW_RANDOM is not set 81 + CONFIG_I2C=y 82 + CONFIG_I2C_GPIO=y 83 + CONFIG_I2C_SH_MOBILE=y 84 + CONFIG_GPIO_SH_PFC=y 85 + CONFIG_GPIOLIB=y 86 + CONFIG_GPIO_RCAR=y 87 + # CONFIG_HWMON is not set 88 + CONFIG_THERMAL=y 89 + CONFIG_RCAR_THERMAL=y 90 + CONFIG_REGULATOR=y 91 + CONFIG_REGULATOR_FIXED_VOLTAGE=y 92 + # CONFIG_USB_SUPPORT is not set 93 + CONFIG_MMC=y 94 + CONFIG_MMC_SDHI=y 95 + CONFIG_MMC_SH_MMCIF=y 96 + CONFIG_NEW_LEDS=y 97 + CONFIG_LEDS_CLASS=y 98 + CONFIG_LEDS_GPIO=y 99 + CONFIG_RTC_CLASS=y 100 + CONFIG_DMADEVICES=y 101 + CONFIG_SH_DMAE=y 102 + # CONFIG_IOMMU_SUPPORT is not set 103 + # CONFIG_DNOTIFY is not set 104 + CONFIG_MSDOS_FS=y 105 + CONFIG_VFAT_FS=y 106 + CONFIG_TMPFS=y 107 + CONFIG_CONFIGFS_FS=y 108 + # CONFIG_MISC_FILESYSTEMS is not set 109 + CONFIG_NFS_FS=y 110 + CONFIG_NFS_V3_ACL=y 111 + CONFIG_NFS_V4=y 112 + CONFIG_NFS_V4_1=y 113 + CONFIG_ROOT_NFS=y 114 + CONFIG_NLS_CODEPAGE_437=y 115 + CONFIG_NLS_ISO8859_1=y 116 + # CONFIG_ENABLE_WARN_DEPRECATED is not set 117 + # CONFIG_ENABLE_MUST_CHECK is not set 118 + # CONFIG_ARM_UNWIND is not set 119 + # CONFIG_CRYPTO_ANSI_CPRNG is not set 120 + # CONFIG_CRYPTO_HW is not set
+1
arch/arm/configs/marzen_defconfig
··· 29 29 CONFIG_HIGHMEM=y 30 30 CONFIG_ZBOOT_ROM_TEXT=0x0 31 31 CONFIG_ZBOOT_ROM_BSS=0x0 32 + CONFIG_ARM_APPENDED_DTB=y 32 33 CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on" 33 34 CONFIG_CMDLINE_FORCE=y 34 35 CONFIG_KEXEC=y
+2
arch/arm/configs/mvebu_defconfig
··· 39 39 CONFIG_MARVELL_PHY=y 40 40 CONFIG_MWIFIEX=y 41 41 CONFIG_MWIFIEX_SDIO=y 42 + CONFIG_INPUT_EVDEV=y 43 + CONFIG_KEYBOARD_GPIO=y 42 44 CONFIG_SERIAL_8250=y 43 45 CONFIG_SERIAL_8250_CONSOLE=y 44 46 CONFIG_I2C=y
+8 -1
arch/arm/configs/tegra_defconfig
··· 1 + CONFIG_SYSVIPC=y 1 2 CONFIG_NO_HZ=y 2 3 CONFIG_HIGH_RES_TIMERS=y 3 4 CONFIG_IKCONFIG=y ··· 27 26 CONFIG_ARCH_TEGRA_2x_SOC=y 28 27 CONFIG_ARCH_TEGRA_3x_SOC=y 29 28 CONFIG_ARCH_TEGRA_114_SOC=y 30 - CONFIG_TEGRA_PCI=y 31 29 CONFIG_TEGRA_EMC_SCALING_ENABLE=y 30 + CONFIG_PCI=y 31 + CONFIG_PCI_MSI=y 32 + CONFIG_PCI_TEGRA=y 33 + CONFIG_PCIEPORTBUS=y 32 34 CONFIG_SMP=y 33 35 CONFIG_PREEMPT=y 34 36 CONFIG_AEABI=y ··· 96 92 CONFIG_SCSI=y 97 93 CONFIG_BLK_DEV_SD=y 98 94 CONFIG_BLK_DEV_SR=y 95 + CONFIG_SCSI_MULTI_LUN=y 99 96 # CONFIG_SCSI_LOWLEVEL is not set 100 97 CONFIG_NETDEVICES=y 101 98 CONFIG_DUMMY=y ··· 111 106 CONFIG_INPUT_EVDEV=y 112 107 CONFIG_KEYBOARD_GPIO=y 113 108 CONFIG_KEYBOARD_TEGRA=y 109 + CONFIG_MOUSE_PS2_ELANTECH=y 114 110 CONFIG_INPUT_MISC=y 115 111 CONFIG_INPUT_MPU3050=y 116 112 # CONFIG_LEGACY_PTYS is not set ··· 184 178 CONFIG_SND_SOC_TEGRA_TRIMSLICE=y 185 179 CONFIG_SND_SOC_TEGRA_ALC5632=y 186 180 CONFIG_USB=y 181 + CONFIG_USB_XHCI_HCD=y 187 182 CONFIG_USB_EHCI_HCD=y 188 183 CONFIG_USB_EHCI_TEGRA=y 189 184 CONFIG_USB_ACM=y
+1
arch/arm/mach-bcm/Kconfig
··· 12 12 select GPIO_BCM 13 13 select SPARSE_IRQ 14 14 select TICK_ONESHOT 15 + select CACHE_L2X0 15 16 help 16 17 This enables support for system based on Broadcom SoCs. 17 18 It currently supports the 'BCM281XX' family, which includes
+2 -2
arch/arm/mach-bcm/Makefile
··· 1 1 # 2 - # Copyright (C) 2012 Broadcom Corporation 2 + # Copyright (C) 2012-2013 Broadcom Corporation 3 3 # 4 4 # This program is free software; you can redistribute it and/or 5 5 # modify it under the terms of the GNU General Public License as ··· 10 10 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 # GNU General Public License for more details. 12 12 13 - obj-$(CONFIG_ARCH_BCM) := board_bcm.o bcm_kona_smc.o bcm_kona_smc_asm.o 13 + obj-$(CONFIG_ARCH_BCM) := board_bcm281xx.o bcm_kona_smc.o bcm_kona_smc_asm.o kona.o 14 14 plus_sec := $(call as-instr,.arch_extension sec,+sec) 15 15 AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec)
+8 -4
arch/arm/mach-bcm/bcm_kona_smc.c
··· 36 36 }; 37 37 38 38 static const struct of_device_id bcm_kona_smc_ids[] __initconst = { 39 - {.compatible = "bcm,kona-smc"}, 39 + {.compatible = "brcm,kona-smc"}, 40 + {.compatible = "bcm,kona-smc"}, /* deprecated name */ 40 41 {}, 41 42 }; 42 43 43 44 /* Map in the bounce area */ 44 - void __init bcm_kona_smc_init(void) 45 + int __init bcm_kona_smc_init(void) 45 46 { 46 47 struct device_node *node; 47 48 48 49 /* Read buffer addr and size from the device tree node */ 49 50 node = of_find_matching_node(NULL, bcm_kona_smc_ids); 50 - BUG_ON(!node); 51 + if (!node) 52 + return -ENODEV; 51 53 52 54 /* Don't care about size or flags of the DT node */ 53 55 bridge_data.buffer_addr = ··· 61 59 62 60 bridge_data.initialized = 1; 63 61 64 - pr_info("Secure API initialized!\n"); 62 + pr_info("Kona Secure API initialized\n"); 63 + 64 + return 0; 65 65 } 66 66 67 67 /* __bcm_kona_smc() should only run on CPU 0, with pre-emption disabled */
+1 -1
arch/arm/mach-bcm/bcm_kona_smc.h
··· 64 64 #define SSAPI_BRCM_START_VC_CORE 0x0E000008 65 65 66 66 #ifndef __ASSEMBLY__ 67 - extern void bcm_kona_smc_init(void); 67 + extern int __init bcm_kona_smc_init(void); 68 68 69 69 extern unsigned bcm_kona_smc(unsigned service_id, 70 70 unsigned arg0,
+23 -7
arch/arm/mach-bcm/board_bcm.c arch/arm/mach-bcm/board_bcm281xx.c
··· 1 1 /* 2 - * Copyright (C) 2012 Broadcom Corporation 2 + * Copyright (C) 2012-2013 Broadcom Corporation 3 3 * 4 4 * This program is free software; you can redistribute it and/or 5 5 * modify it under the terms of the GNU General Public License as ··· 21 21 #include <asm/mach/time.h> 22 22 #include <asm/hardware/cache-l2x0.h> 23 23 24 - 25 24 #include "bcm_kona_smc.h" 25 + #include "kona.h" 26 26 27 27 static int __init kona_l2_cache_init(void) 28 28 { 29 29 if (!IS_ENABLED(CONFIG_CACHE_L2X0)) 30 30 return 0; 31 + 32 + if (bcm_kona_smc_init() < 0) { 33 + pr_info("Kona secure API not available. Skipping L2 init\n"); 34 + return 0; 35 + } 31 36 32 37 bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0); 33 38 ··· 40 35 * The aux_val and aux_mask have no effect since L2 cache is already 41 36 * enabled. Pass 0s for aux_val and 1s for aux_mask for default value. 42 37 */ 43 - l2x0_of_init(0, ~0); 38 + return l2x0_of_init(0, ~0); 39 + } 44 40 45 - return 0; 41 + static void bcm_board_setup_restart(void) 42 + { 43 + struct device_node *np; 44 + 45 + np = of_find_compatible_node(NULL, NULL, "brcm,bcm11351"); 46 + if (np) { 47 + if (of_device_is_available(np)) 48 + bcm_kona_setup_restart(); 49 + of_node_put(np); 50 + } 51 + /* Restart setup for other boards goes here */ 46 52 } 47 53 48 54 static void __init board_init(void) ··· 61 45 of_platform_populate(NULL, of_default_bus_match_table, NULL, 62 46 &platform_bus); 63 47 64 - bcm_kona_smc_init(); 65 - 48 + bcm_board_setup_restart(); 66 49 kona_l2_cache_init(); 67 50 } 68 51 69 - static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; 52 + static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; 70 53 71 54 DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") 72 55 .init_time = clocksource_of_init, 73 56 .init_machine = board_init, 57 + .restart = bcm_kona_restart, 74 58 .dt_compat = bcm11351_dt_compat, 75 59 MACHINE_END
+65
arch/arm/mach-bcm/kona.c
··· 1 + /* 2 + * Copyright (C) 2013 Broadcom Corporation 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License as 6 + * published by the Free Software Foundation version 2. 7 + * 8 + * This program is distributed "as is" WITHOUT ANY WARRANTY of any 9 + * kind, whether express or implied; without even the implied warranty 10 + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + */ 13 + 14 + #include <linux/of_address.h> 15 + #include <asm/io.h> 16 + 17 + #include "kona.h" 18 + 19 + static void __iomem *watchdog_base; 20 + 21 + void bcm_kona_setup_restart(void) 22 + { 23 + struct device_node *np_wdog; 24 + 25 + /* 26 + * The assumption is that whoever calls bcm_kona_setup_restart() 27 + * also needs a Kona Watchdog Timer entry in Device Tree, i.e. we 28 + * report an error if the DT entry is missing. 29 + */ 30 + np_wdog = of_find_compatible_node(NULL, NULL, "brcm,kona-wdt"); 31 + if (!np_wdog) { 32 + pr_err("brcm,kona-wdt not found in DT, reboot disabled\n"); 33 + return; 34 + } 35 + watchdog_base = of_iomap(np_wdog, 0); 36 + WARN(!watchdog_base, "failed to map watchdog base"); 37 + of_node_put(np_wdog); 38 + } 39 + 40 + #define SECWDOG_OFFSET 0x00000000 41 + #define SECWDOG_RESERVED_MASK 0xE2000000 42 + #define SECWDOG_WD_LOAD_FLAG_MASK 0x10000000 43 + #define SECWDOG_EN_MASK 0x08000000 44 + #define SECWDOG_SRSTEN_MASK 0x04000000 45 + #define SECWDOG_CLKS_SHIFT 20 46 + #define SECWDOG_LOCK_SHIFT 0 47 + 48 + void bcm_kona_restart(enum reboot_mode mode, const char *cmd) 49 + { 50 + uint32_t val; 51 + 52 + if (!watchdog_base) 53 + panic("Watchdog not mapped. Reboot failed.\n"); 54 + 55 + /* Enable watchdog2 with very short timeout. */ 56 + val = readl(watchdog_base + SECWDOG_OFFSET); 57 + val &= SECWDOG_RESERVED_MASK | SECWDOG_WD_LOAD_FLAG_MASK; 58 + val |= SECWDOG_EN_MASK | SECWDOG_SRSTEN_MASK | 59 + (0x8 << SECWDOG_CLKS_SHIFT) | 60 + (0x8 << SECWDOG_LOCK_SHIFT); 61 + writel(val, watchdog_base + SECWDOG_OFFSET); 62 + 63 + while (1) 64 + ; 65 + }
+17
arch/arm/mach-bcm/kona.h
··· 1 + /* 2 + * Copyright (C) 2013 Broadcom Corporation 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License as 6 + * published by the Free Software Foundation version 2. 7 + * 8 + * This program is distributed "as is" WITHOUT ANY WARRANTY of any 9 + * kind, whether express or implied; without even the implied warranty 10 + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + */ 13 + 14 + #include <linux/reboot.h> 15 + 16 + void bcm_kona_setup_restart(void); 17 + void bcm_kona_restart(enum reboot_mode mode, const char *cmd);
+2
arch/arm/mach-dove/Kconfig
··· 23 23 config MACH_DOVE_DT 24 24 bool "Marvell Dove Flattened Device Tree" 25 25 select DOVE_CLK 26 + select ORION_IRQCHIP 27 + select ORION_TIMER 26 28 select REGULATOR 27 29 select REGULATOR_FIXED_VOLTAGE 28 30 select USE_OF
+2 -2
arch/arm/mach-dove/Makefile
··· 1 - obj-y += common.o irq.o 2 - obj-$(CONFIG_DOVE_LEGACY) += mpp.o 1 + obj-y += common.o 2 + obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o 3 3 obj-$(CONFIG_PCI) += pcie.o 4 4 obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o 5 5 obj-$(CONFIG_MACH_DOVE_DT) += board-dt.o
+15 -15
arch/arm/mach-dove/board-dt.c
··· 10 10 11 11 #include <linux/init.h> 12 12 #include <linux/clk-provider.h> 13 + #include <linux/clocksource.h> 14 + #include <linux/irqchip.h> 13 15 #include <linux/of.h> 14 16 #include <linux/of_platform.h> 15 17 #include <linux/platform_data/usb-ehci-orion.h> 16 18 #include <asm/hardware/cache-tauros2.h> 17 19 #include <asm/mach/arch.h> 20 + #include <mach/dove.h> 18 21 #include <mach/pm.h> 19 22 #include <plat/common.h> 20 23 #include <plat/irq.h> ··· 36 33 clkspec.np = np; 37 34 clkspec.args_count = 1; 38 35 39 - clkspec.args[0] = CLOCK_GATING_BIT_GBE; 40 - orion_clkdev_add(NULL, "mv643xx_eth_port.0", 41 - of_clk_get_from_provider(&clkspec)); 42 - 43 36 clkspec.args[0] = CLOCK_GATING_BIT_PCIE0; 44 37 orion_clkdev_add("0", "pcie", 45 38 of_clk_get_from_provider(&clkspec)); ··· 45 46 of_clk_get_from_provider(&clkspec)); 46 47 } 47 48 48 - static void __init dove_of_clk_init(void) 49 + static void __init dove_dt_time_init(void) 49 50 { 50 51 of_clk_init(NULL); 51 - dove_legacy_clk_init(); 52 + clocksource_of_init(); 52 53 } 53 54 54 - static struct mv643xx_eth_platform_data dove_dt_ge00_data = { 55 - .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, 56 - }; 55 + static void __init dove_dt_init_early(void) 56 + { 57 + mvebu_mbus_init("marvell,dove-mbus", 58 + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, 59 + DOVE_MC_WINS_BASE, DOVE_MC_WINS_SZ); 60 + } 57 61 58 62 static void __init dove_dt_init(void) 59 63 { ··· 67 65 #endif 68 66 dove_setup_cpu_wins(); 69 67 70 - /* Setup root of clk tree */ 71 - dove_of_clk_init(); 68 + /* Setup clocks for legacy devices */ 69 + dove_legacy_clk_init(); 72 70 73 71 /* Internal devices not ported to DT yet */ 74 - dove_ge00_init(&dove_dt_ge00_data); 75 72 dove_pcie_init(1, 1); 76 73 77 74 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); ··· 83 82 84 83 DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") 85 84 .map_io = dove_map_io, 86 - .init_early = dove_init_early, 87 - .init_irq = orion_dt_init_irq, 88 - .init_time = dove_timer_init, 85 + .init_early = dove_dt_init_early, 86 + .init_time = dove_dt_time_init, 89 87 .init_machine = dove_dt_init, 90 88 .restart = dove_restart, 91 89 .dt_compat = dove_dt_board_compat,
+19 -224
arch/arm/mach-kirkwood/Kconfig
··· 2 2 3 3 menu "Marvell Kirkwood Implementations" 4 4 5 + config KIRKWOOD_LEGACY 6 + bool 7 + 5 8 config MACH_D2NET_V2 6 9 bool "LaCie d2 Network v2 NAS Board" 10 + select KIRKWOOD_LEGACY 7 11 help 8 12 Say 'Y' here if you want your kernel to support the 9 13 LaCie d2 Network v2 NAS. 10 14 11 - config MACH_DOCKSTAR 12 - bool "Seagate FreeAgent DockStar" 13 - help 14 - Say 'Y' here if you want your kernel to support the 15 - Seagate FreeAgent DockStar. 16 - 17 - config MACH_ESATA_SHEEVAPLUG 18 - bool "Marvell eSATA SheevaPlug Reference Board" 19 - help 20 - Say 'Y' here if you want your kernel to support the 21 - Marvell eSATA SheevaPlug Reference Board. 22 - 23 - config MACH_GURUPLUG 24 - bool "Marvell GuruPlug Reference Board" 25 - help 26 - Say 'Y' here if you want your kernel to support the 27 - Marvell GuruPlug Reference Board. 28 - 29 - config MACH_INETSPACE_V2 30 - bool "LaCie Internet Space v2 NAS Board" 31 - help 32 - Say 'Y' here if you want your kernel to support the 33 - LaCie Internet Space v2 NAS. 34 - 35 - config MACH_MV88F6281GTW_GE 36 - bool "Marvell 88F6281 GTW GE Board" 37 - help 38 - Say 'Y' here if you want your kernel to support the 39 - Marvell 88F6281 GTW GE Board. 40 - 41 15 config MACH_NET2BIG_V2 42 16 bool "LaCie 2Big Network v2 NAS Board" 17 + select KIRKWOOD_LEGACY 43 18 help 44 19 Say 'Y' here if you want your kernel to support the 45 20 LaCie 2Big Network v2 NAS. 46 21 47 22 config MACH_NET5BIG_V2 48 23 bool "LaCie 5Big Network v2 NAS Board" 24 + select KIRKWOOD_LEGACY 49 25 help 50 26 Say 'Y' here if you want your kernel to support the 51 27 LaCie 5Big Network v2 NAS. 52 28 53 - config MACH_NETSPACE_MAX_V2 54 - bool "LaCie Network Space Max v2 NAS Board" 55 - help 56 - Say 'Y' here if you want your kernel to support the 57 - LaCie Network Space Max v2 NAS. 58 - 59 - config MACH_NETSPACE_V2 60 - bool "LaCie Network Space v2 NAS Board" 61 - help 62 - Say 'Y' here if you want your kernel to support the 63 - LaCie Network Space v2 NAS. 64 - 65 29 config MACH_OPENRD 30 + select KIRKWOOD_LEGACY 66 31 bool 67 32 68 33 config MACH_OPENRD_BASE ··· 53 88 54 89 config MACH_RD88F6192_NAS 55 90 bool "Marvell RD-88F6192-NAS Reference Board" 91 + select KIRKWOOD_LEGACY 56 92 help 57 93 Say 'Y' here if you want your kernel to support the 58 94 Marvell RD-88F6192-NAS Reference Board. 59 95 60 96 config MACH_RD88F6281 61 97 bool "Marvell RD-88F6281 Reference Board" 98 + select KIRKWOOD_LEGACY 62 99 help 63 100 Say 'Y' here if you want your kernel to support the 64 101 Marvell RD-88F6281 Reference Board. 65 102 66 - config MACH_SHEEVAPLUG 67 - bool "Marvell SheevaPlug Reference Board" 68 - help 69 - Say 'Y' here if you want your kernel to support the 70 - Marvell SheevaPlug Reference Board. 71 - 72 103 config MACH_T5325 73 104 bool "HP t5325 Thin Client" 105 + select KIRKWOOD_LEGACY 74 106 help 75 107 Say 'Y' here if you want your kernel to support the 76 108 HP t5325 Thin Client. 77 109 78 110 config MACH_TS219 79 111 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" 112 + select KIRKWOOD_LEGACY 80 113 help 81 114 Say 'Y' here if you want your kernel to support the 82 115 QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and ··· 82 119 83 120 config MACH_TS41X 84 121 bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS" 122 + select KIRKWOOD_LEGACY 85 123 help 86 124 Say 'Y' here if you want your kernel to support the 87 125 QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo ··· 93 129 config ARCH_KIRKWOOD_DT 94 130 bool "Marvell Kirkwood Flattened Device Tree" 95 131 select KIRKWOOD_CLK 132 + select OF_IRQ 133 + select ORION_IRQCHIP 134 + select ORION_TIMER 96 135 select POWER_SUPPLY 97 136 select POWER_RESET 98 137 select POWER_RESET_GPIO ··· 106 139 Say 'Y' here if you want your kernel to support the 107 140 Marvell Kirkwood using flattened device tree. 108 141 109 - config MACH_CLOUDBOX_DT 110 - bool "LaCie CloudBox NAS (Flattened Device Tree)" 111 - select ARCH_KIRKWOOD_DT 112 - help 113 - Say 'Y' here if you want your kernel to support the LaCie 114 - CloudBox NAS, using Flattened Device Tree. 115 - 116 - config MACH_DB88F628X_BP_DT 117 - bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)" 118 - help 119 - Say 'Y' here if you want your kernel to support the Marvell 120 - DB-88F6281-BP and DB-88F6282-BP Development Board (Flattened 121 - Device Tree). 122 - 123 - config MACH_DLINK_KIRKWOOD_DT 124 - bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" 125 - select ARCH_KIRKWOOD_DT 142 + config MACH_MV88F6281GTW_GE_DT 143 + bool "Marvell 88F6281 GTW GE Board (Flattened Device Tree)" 144 + depends on ARCH_KIRKWOOD_DT 126 145 help 127 146 Say 'Y' here if you want your kernel to support the 128 - Kirkwood-based D-Link NASes such as DNS-320 & DNS-325, 129 - using Flattened Device Tree. 130 - 131 - config MACH_DOCKSTAR_DT 132 - bool "Seagate FreeAgent Dockstar (Flattened Device Tree)" 133 - select ARCH_KIRKWOOD_DT 134 - help 135 - Say 'Y' here if you want your kernel to support the 136 - Seagate FreeAgent Dockstar (Flattened Device Tree). 137 - 138 - config MACH_DREAMPLUG_DT 139 - bool "Marvell DreamPlug (Flattened Device Tree)" 140 - select ARCH_KIRKWOOD_DT 141 - help 142 - Say 'Y' here if you want your kernel to support the 143 - Marvell DreamPlug (Flattened Device Tree). 144 - 145 - config MACH_GOFLEXNET_DT 146 - bool "Seagate GoFlex Net (Flattened Device Tree)" 147 - select ARCH_KIRKWOOD_DT 148 - help 149 - Say 'Y' here if you want your kernel to support the 150 - Seagate GoFlex Net (Flattened Device Tree). 151 - 152 - config MACH_GURUPLUG_DT 153 - bool "Marvell GuruPlug Reference Board (Flattened Device Tree)" 154 - select ARCH_KIRKWOOD_DT 155 - help 156 - Say 'Y' here if you want your kernel to support the 157 - Marvell GuruPlug Reference Board (Flattened Device Tree). 158 - 159 - config MACH_IB62X0_DT 160 - bool "RaidSonic IB-NAS6210, IB-NAS6220 (Flattened Device Tree)" 161 - select ARCH_KIRKWOOD_DT 162 - help 163 - Say 'Y' here if you want your kernel to support the 164 - RaidSonic IB-NAS6210 & IB-NAS6220 devices, using 165 - Flattened Device Tree. 166 - 167 - config MACH_ICONNECT_DT 168 - bool "Iomega Iconnect (Flattened Device Tree)" 169 - select ARCH_KIRKWOOD_DT 170 - help 171 - Say 'Y' here to enable Iomega Iconnect support. 172 - 173 - config MACH_INETSPACE_V2_DT 174 - bool "LaCie Internet Space v2 NAS (Flattened Device Tree)" 175 - select ARCH_KIRKWOOD_DT 176 - help 177 - Say 'Y' here if you want your kernel to support the LaCie 178 - Internet Space v2 NAS, using Flattened Device Tree. 179 - 180 - config MACH_IOMEGA_IX2_200_DT 181 - bool "Iomega StorCenter ix2-200 (Flattened Device Tree)" 182 - select ARCH_KIRKWOOD_DT 183 - help 184 - Say 'Y' here if you want your kernel to support the 185 - Iomega StorCenter ix2-200 (Flattened Device Tree). 186 - 187 - config MACH_KM_KIRKWOOD_DT 188 - bool "Keymile Kirkwood Reference Design (Flattened Device Tree)" 189 - select ARCH_KIRKWOOD_DT 190 - help 191 - Say 'Y' here if you want your kernel to support the 192 - Keymile Kirkwood Reference Desgin, using Flattened Device Tree. 193 - 194 - config MACH_LSXL_DT 195 - bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)" 196 - select ARCH_KIRKWOOD_DT 197 - select POWER_RESET_RESTART 198 - help 199 - Say 'Y' here if you want your kernel to support the 200 - Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using 201 - Flattened Device Tree. 202 - 203 - config MACH_MPLCEC4_DT 204 - bool "MPL CEC4 (Flattened Device Tree)" 205 - select ARCH_KIRKWOOD_DT 206 - help 207 - Say 'Y' here if you want your kernel to support the 208 - MPL CEC4 (Flattened Device Tree). 209 - 210 - config MACH_NETSPACE_LITE_V2_DT 211 - bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)" 212 - select ARCH_KIRKWOOD_DT 213 - help 214 - Say 'Y' here if you want your kernel to support the LaCie 215 - Network Space Lite v2 NAS, using Flattened Device Tree. 216 - 217 - config MACH_NETSPACE_MAX_V2_DT 218 - bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)" 219 - select ARCH_KIRKWOOD_DT 220 - help 221 - Say 'Y' here if you want your kernel to support the LaCie 222 - Network Space Max v2 NAS, using Flattened Device Tree. 223 - 224 - config MACH_NETSPACE_MINI_V2_DT 225 - bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)" 226 - select ARCH_KIRKWOOD_DT 227 - help 228 - Say 'Y' here if you want your kernel to support the LaCie 229 - Network Space Mini v2 NAS using Flattened Device Tree. 230 - 231 - This board is embedded in a product named CloudBox, which 232 - provides automatic backup on a 100GB cloud storage. This 233 - should not confused with a more recent LaCie NAS also named 234 - CloudBox. For this last, the disk capacity is 1TB or above. 235 - 236 - config MACH_NETSPACE_V2_DT 237 - bool "LaCie Network Space v2 NAS (Flattened Device Tree)" 238 - select ARCH_KIRKWOOD_DT 239 - help 240 - Say 'Y' here if you want your kernel to support the LaCie 241 - Network Space v2 NAS, using Flattened Device Tree. 242 - 243 - config MACH_OPENBLOCKS_A6_DT 244 - bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)" 245 - select ARCH_KIRKWOOD_DT 246 - help 247 - Say 'Y' here if you want your kernel to support the 248 - Plat'Home OpenBlocks A6 (Flattened Device Tree). 249 - 250 - config MACH_READYNAS_DT 251 - bool "NETGEAR ReadyNAS Duo v2 (Flattened Device Tree)" 252 - select ARCH_KIRKWOOD_DT 253 - select ARM_APPENDED_DTB 254 - select ARM_ATAG_DTB_COMPAT 255 - help 256 - Say 'Y' here if you want your kernel to support the 257 - NETGEAR ReadyNAS Duo v2 using Fattened Device Tree. 258 - 259 - config MACH_SHEEVAPLUG_DT 260 - bool "Marvell (eSATA) SheevaPlug (Flattened Device Tree)" 261 - select ARCH_KIRKWOOD_DT 262 - help 263 - Say 'Y' here if you want your kernel to support the 264 - Marvell (eSATA) SheevaPlug (Flattened Device Tree). 265 - 266 - config MACH_TOPKICK_DT 267 - bool "USI Topkick (Flattened Device Tree)" 268 - select ARCH_KIRKWOOD_DT 269 - help 270 - Say 'Y' here if you want your kernel to support the 271 - USI Topkick, using Flattened Device Tree 272 - 273 - config MACH_TS219_DT 274 - bool "Device Tree for QNAP TS-11X, TS-21X NAS" 275 - select ARCH_KIRKWOOD_DT 276 - select ARM_APPENDED_DTB 277 - select ARM_ATAG_DTB_COMPAT 278 - select POWER_RESET_QNAP 279 - help 280 - Say 'Y' here if you want your kernel to support the QNAP 281 - TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and 282 - TS-219P+ Turbo NAS devices using Fattened Device Tree. 283 - There are two different Device Tree descriptions, depending 284 - on if the device is based on an if the board uses the MV6281 285 - or MV6282. If you have the wrong one, the buttons will not 286 - work. 147 + Marvell 88F6281 GTW GE Board (Flattened Device Tree). 287 148 288 149 endmenu 289 150
+3 -33
arch/arm/mach-kirkwood/Makefile
··· 1 - obj-y += common.o irq.o pcie.o mpp.o 2 - 1 + obj-y += common.o pcie.o 2 + obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o 3 3 obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o 4 - obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o 5 - obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o 6 - obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o 7 - obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o 8 - obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o 9 4 obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o 10 5 obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o 11 - obj-$(CONFIG_MACH_NETSPACE_MAX_V2) += netspace_v2-setup.o lacie_v2-common.o 12 - obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o 13 6 obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o 14 7 obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o 15 8 obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o 16 - obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o 17 9 obj-$(CONFIG_MACH_T5325) += t5325-setup.o 18 10 obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o 19 11 obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 20 12 21 13 obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o 22 - obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o 23 - obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o 24 - obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 25 - obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o 26 - obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o 27 - obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o 28 - obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o 29 - obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o 30 - obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o 31 - obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o 32 - obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o 33 - obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o 34 - obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o 35 - obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o 36 - obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o 37 - obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o 38 - obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o 39 - obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o 40 - obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o 41 - obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o 42 - obj-$(CONFIG_MACH_SHEEVAPLUG_DT) += board-sheevaplug.o 43 - obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o 44 - obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o 14 + obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o
-24
arch/arm/mach-kirkwood/board-db88f628x-bp.c
··· 1 - /* 2 - * Saeed Bishara <saeed@marvell.com> 3 - * 4 - * Marvell DB-88F628{1,2}-BP Development Board Setup 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/of.h> 14 - #include <linux/mv643xx_eth.h> 15 - #include "common.h" 16 - 17 - static struct mv643xx_eth_platform_data db88f628x_ge00_data = { 18 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 19 - }; 20 - 21 - void __init db88f628x_init(void) 22 - { 23 - kirkwood_ge00_init(&db88f628x_ge00_data); 24 - }
-43
arch/arm/mach-kirkwood/board-dnskw.c
··· 1 - /* 2 - * Copyright 2012 (C), Jamie Lentin <jm@lentin.co.uk> 3 - * 4 - * arch/arm/mach-kirkwood/board-dnskw.c 5 - * 6 - * D-link DNS-320 & DNS-325 NAS Init for drivers not converted to 7 - * flattened device tree yet. 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #include <linux/kernel.h> 15 - #include <linux/init.h> 16 - #include <linux/platform_device.h> 17 - #include <linux/mv643xx_eth.h> 18 - #include <linux/gpio.h> 19 - #include "common.h" 20 - 21 - static struct mv643xx_eth_platform_data dnskw_ge00_data = { 22 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 23 - }; 24 - 25 - /* Register any GPIO for output and set the value */ 26 - static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) 27 - { 28 - if (gpio_request(gpio, name) == 0 && 29 - gpio_direction_output(gpio, 0) == 0) { 30 - gpio_set_value(gpio, def); 31 - if (gpio_export(gpio, 0) != 0) 32 - pr_err("dnskw: Failed to export GPIO %s\n", name); 33 - } else 34 - pr_err("dnskw: Failed to register %s\n", name); 35 - } 36 - 37 - void __init dnskw_init(void) 38 - { 39 - kirkwood_ge00_init(&dnskw_ge00_data); 40 - 41 - /* Set NAS to turn back on after a power failure */ 42 - dnskw_gpio_register(37, "dnskw:power:recover", 1); 43 - }
-32
arch/arm/mach-kirkwood/board-dockstar.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/board-dockstar.c 3 - * 4 - * Seagate FreeAgent Dockstar Board Init for drivers not converted to 5 - * flattened device tree yet. 6 - * 7 - * This file is licensed under the terms of the GNU General Public 8 - * License version 2. This program is licensed "as is" without any 9 - * warranty of any kind, whether express or implied. 10 - * 11 - * Copied and modified for Seagate GoFlex Net support by 12 - * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's 13 - * GoFlex kernel patches. 14 - * 15 - */ 16 - 17 - #include <linux/kernel.h> 18 - #include <linux/init.h> 19 - #include <linux/mv643xx_eth.h> 20 - #include "common.h" 21 - 22 - static struct mv643xx_eth_platform_data dockstar_ge00_data = { 23 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 24 - }; 25 - 26 - void __init dockstar_dt_init(void) 27 - { 28 - /* 29 - * Basic setup. Needs to be called early. 30 - */ 31 - kirkwood_ge00_init(&dockstar_ge00_data); 32 - }
-35
arch/arm/mach-kirkwood/board-dreamplug.c
··· 1 - /* 2 - * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> 3 - * 4 - * arch/arm/mach-kirkwood/board-dreamplug.c 5 - * 6 - * Marvell DreamPlug Reference Board Init for drivers not converted to 7 - * flattened device tree yet. 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #include <linux/kernel.h> 15 - #include <linux/init.h> 16 - #include <linux/mv643xx_eth.h> 17 - #include <linux/gpio.h> 18 - #include "common.h" 19 - 20 - static struct mv643xx_eth_platform_data dreamplug_ge00_data = { 21 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 22 - }; 23 - 24 - static struct mv643xx_eth_platform_data dreamplug_ge01_data = { 25 - .phy_addr = MV643XX_ETH_PHY_ADDR(1), 26 - }; 27 - 28 - void __init dreamplug_init(void) 29 - { 30 - /* 31 - * Basic setup. Needs to be called early. 32 - */ 33 - kirkwood_ge00_init(&dreamplug_ge00_data); 34 - kirkwood_ge01_init(&dreamplug_ge01_data); 35 - }
+19 -98
arch/arm/mach-kirkwood/board-dt.c
··· 15 15 #include <linux/of.h> 16 16 #include <linux/of_platform.h> 17 17 #include <linux/clk-provider.h> 18 + #include <linux/clocksource.h> 19 + #include <linux/dma-mapping.h> 20 + #include <linux/irqchip.h> 18 21 #include <linux/kexec.h> 19 22 #include <asm/mach/arch.h> 20 23 #include <asm/mach/map.h> ··· 52 49 orion_clkdev_add("1", "pcie", 53 50 of_clk_get_from_provider(&clkspec)); 54 51 55 - clkspec.args[0] = CGC_BIT_SDIO; 56 - orion_clkdev_add(NULL, "mvsdio", 57 - of_clk_get_from_provider(&clkspec)); 58 - 59 52 /* 60 53 * The ethernet interfaces forget the MAC address assigned by 61 54 * u-boot if the clocks are turned off. Until proper DT support ··· 59 60 */ 60 61 clkspec.args[0] = CGC_BIT_GE0; 61 62 clk = of_clk_get_from_provider(&clkspec); 62 - orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk); 63 63 clk_prepare_enable(clk); 64 64 65 65 clkspec.args[0] = CGC_BIT_GE1; 66 66 clk = of_clk_get_from_provider(&clkspec); 67 - orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk); 68 67 clk_prepare_enable(clk); 69 68 } 70 69 71 - static void __init kirkwood_of_clk_init(void) 70 + static void __init kirkwood_dt_time_init(void) 72 71 { 73 72 of_clk_init(NULL); 74 - kirkwood_legacy_clk_init(); 73 + clocksource_of_init(); 74 + } 75 + 76 + static void __init kirkwood_dt_init_early(void) 77 + { 78 + mvebu_mbus_init("marvell,kirkwood-mbus", 79 + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, 80 + DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); 75 81 } 76 82 77 83 static void __init kirkwood_dt_init(void) ··· 98 94 99 95 kirkwood_cpufreq_init(); 100 96 101 - /* Setup root of clk tree */ 102 - kirkwood_of_clk_init(); 97 + /* Setup clocks for legacy devices */ 98 + kirkwood_legacy_clk_init(); 103 99 104 100 kirkwood_cpuidle_init(); 105 101 ··· 107 103 kexec_reinit = kirkwood_enable_pcie; 108 104 #endif 109 105 110 - if (of_machine_is_compatible("globalscale,dreamplug")) 111 - dreamplug_init(); 112 - 113 - if (of_machine_is_compatible("globalscale,guruplug")) 114 - guruplug_dt_init(); 115 - 116 - if (of_machine_is_compatible("globalscale,sheevaplug")) 117 - sheevaplug_dt_init(); 118 - 119 - if (of_machine_is_compatible("dlink,dns-kirkwood")) 120 - dnskw_init(); 121 - 122 - if (of_machine_is_compatible("iom,iconnect")) 123 - iconnect_init(); 124 - 125 - if (of_machine_is_compatible("raidsonic,ib-nas62x0")) 126 - ib62x0_init(); 127 - 128 - if (of_machine_is_compatible("qnap,ts219")) 129 - qnap_dt_ts219_init(); 130 - 131 - if (of_machine_is_compatible("seagate,dockstar")) 132 - dockstar_dt_init(); 133 - 134 - if (of_machine_is_compatible("seagate,goflexnet")) 135 - goflexnet_init(); 136 - 137 - if (of_machine_is_compatible("buffalo,lsxl")) 138 - lsxl_init(); 139 - 140 - if (of_machine_is_compatible("iom,ix2-200")) 141 - iomega_ix2_200_init(); 142 - 143 - if (of_machine_is_compatible("keymile,km_kirkwood")) 144 - km_kirkwood_init(); 145 - 146 - if (of_machine_is_compatible("lacie,cloudbox") || 147 - of_machine_is_compatible("lacie,inetspace_v2") || 148 - of_machine_is_compatible("lacie,netspace_lite_v2") || 149 - of_machine_is_compatible("lacie,netspace_max_v2") || 150 - of_machine_is_compatible("lacie,netspace_mini_v2") || 151 - of_machine_is_compatible("lacie,netspace_v2")) 152 - ns2_init(); 153 - 154 - if (of_machine_is_compatible("marvell,db-88f6281-bp") || 155 - of_machine_is_compatible("marvell,db-88f6282-bp")) 156 - db88f628x_init(); 157 - 158 - if (of_machine_is_compatible("mpl,cec4")) 159 - mplcec4_init(); 160 - 161 - if (of_machine_is_compatible("netgear,readynas-duo-v2")) 162 - netgear_readynas_init(); 163 - 164 - if (of_machine_is_compatible("plathome,openblocks-a6")) 165 - openblocks_a6_init(); 166 - 167 - if (of_machine_is_compatible("usi,topkick")) 168 - usi_topkick_init(); 106 + if (of_machine_is_compatible("marvell,mv88f6281gtw-ge")) 107 + mv88f6281gtw_ge_init(); 169 108 170 109 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 171 110 } 172 111 173 112 static const char * const kirkwood_dt_board_compat[] = { 174 - "globalscale,dreamplug", 175 - "globalscale,guruplug", 176 - "globalscale,sheevaplug", 177 - "dlink,dns-320", 178 - "dlink,dns-325", 179 - "iom,iconnect", 180 - "raidsonic,ib-nas62x0", 181 - "qnap,ts219", 182 - "seagate,dockstar", 183 - "seagate,goflexnet", 184 - "buffalo,lsxl", 185 - "iom,ix2-200", 186 - "keymile,km_kirkwood", 187 - "lacie,cloudbox", 188 - "lacie,inetspace_v2", 189 - "lacie,netspace_lite_v2", 190 - "lacie,netspace_max_v2", 191 - "lacie,netspace_mini_v2", 192 - "lacie,netspace_v2", 193 - "marvell,db-88f6281-bp", 194 - "marvell,db-88f6282-bp", 195 - "mpl,cec4", 196 - "netgear,readynas-duo-v2", 197 - "plathome,openblocks-a6", 198 - "usi,topkick", 199 - "zyxel,nsa310", 113 + "marvell,kirkwood", 200 114 NULL 201 115 }; 202 116 203 117 DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") 204 118 /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ 205 119 .map_io = kirkwood_map_io, 206 - .init_early = kirkwood_init_early, 207 - .init_irq = orion_dt_init_irq, 208 - .init_time = kirkwood_timer_init, 120 + .init_early = kirkwood_dt_init_early, 121 + .init_time = kirkwood_dt_time_init, 209 122 .init_machine = kirkwood_dt_init, 210 123 .restart = kirkwood_restart, 211 124 .dt_compat = kirkwood_dt_board_compat,
-34
arch/arm/mach-kirkwood/board-goflexnet.c
··· 1 - /* 2 - * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> 3 - * 4 - * arch/arm/mach-kirkwood/board-goflexnet.c 5 - * 6 - * Seagate GoFlext Net Board Init for drivers not converted to 7 - * flattened device tree yet. 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - * 13 - * Copied and modified for Seagate GoFlex Net support by 14 - * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's 15 - * GoFlex kernel patches. 16 - * 17 - */ 18 - 19 - #include <linux/kernel.h> 20 - #include <linux/init.h> 21 - #include <linux/mv643xx_eth.h> 22 - #include "common.h" 23 - 24 - static struct mv643xx_eth_platform_data goflexnet_ge00_data = { 25 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 26 - }; 27 - 28 - void __init goflexnet_init(void) 29 - { 30 - /* 31 - * Basic setup. Needs to be called early. 32 - */ 33 - kirkwood_ge00_init(&goflexnet_ge00_data); 34 - }
-33
arch/arm/mach-kirkwood/board-guruplug.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/board-guruplug.c 3 - * 4 - * Marvell Guruplug Reference Board Init for drivers not converted to 5 - * flattened device tree yet. 6 - * 7 - * This file is licensed under the terms of the GNU General Public 8 - * License version 2. This program is licensed "as is" without any 9 - * warranty of any kind, whether express or implied. 10 - */ 11 - 12 - #include <linux/kernel.h> 13 - #include <linux/init.h> 14 - #include <linux/mv643xx_eth.h> 15 - #include <linux/gpio.h> 16 - #include "common.h" 17 - 18 - static struct mv643xx_eth_platform_data guruplug_ge00_data = { 19 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 20 - }; 21 - 22 - static struct mv643xx_eth_platform_data guruplug_ge01_data = { 23 - .phy_addr = MV643XX_ETH_PHY_ADDR(1), 24 - }; 25 - 26 - void __init guruplug_dt_init(void) 27 - { 28 - /* 29 - * Basic setup. Needs to be called early. 30 - */ 31 - kirkwood_ge00_init(&guruplug_ge00_data); 32 - kirkwood_ge01_init(&guruplug_ge01_data); 33 - }
-29
arch/arm/mach-kirkwood/board-ib62x0.c
··· 1 - /* 2 - * Copyright 2012 (C), Simon Baatz <gmbnomis@gmail.com> 3 - * 4 - * arch/arm/mach-kirkwood/board-ib62x0.c 5 - * 6 - * RaidSonic ICY BOX IB-NAS6210 & IB-NAS6220 init for drivers not 7 - * converted to flattened device tree yet. 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #include <linux/kernel.h> 15 - #include <linux/init.h> 16 - #include <linux/mv643xx_eth.h> 17 - #include "common.h" 18 - 19 - static struct mv643xx_eth_platform_data ib62x0_ge00_data = { 20 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 21 - }; 22 - 23 - void __init ib62x0_init(void) 24 - { 25 - /* 26 - * Basic setup. Needs to be called early. 27 - */ 28 - kirkwood_ge00_init(&ib62x0_ge00_data); 29 - }
-24
arch/arm/mach-kirkwood/board-iconnect.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/board-iconnect.c 3 - * 4 - * Iomega i-connect Board Setup 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/of.h> 14 - #include <linux/mv643xx_eth.h> 15 - #include "common.h" 16 - 17 - static struct mv643xx_eth_platform_data iconnect_ge00_data = { 18 - .phy_addr = MV643XX_ETH_PHY_ADDR(11), 19 - }; 20 - 21 - void __init iconnect_init(void) 22 - { 23 - kirkwood_ge00_init(&iconnect_ge00_data); 24 - }
-34
arch/arm/mach-kirkwood/board-iomega_ix2_200.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/board-iomega_ix2_200.c 3 - * 4 - * Iomega StorCenter ix2-200 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/mv643xx_eth.h> 14 - #include <linux/ethtool.h> 15 - #include "common.h" 16 - 17 - static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { 18 - .phy_addr = MV643XX_ETH_PHY_NONE, 19 - .speed = SPEED_1000, 20 - .duplex = DUPLEX_FULL, 21 - }; 22 - 23 - static struct mv643xx_eth_platform_data iomega_ix2_200_ge01_data = { 24 - .phy_addr = MV643XX_ETH_PHY_ADDR(11), 25 - }; 26 - 27 - void __init iomega_ix2_200_init(void) 28 - { 29 - /* 30 - * Basic setup. Needs to be called early. 31 - */ 32 - kirkwood_ge00_init(&iomega_ix2_200_ge00_data); 33 - kirkwood_ge01_init(&iomega_ix2_200_ge01_data); 34 - }
-44
arch/arm/mach-kirkwood/board-km_kirkwood.c
··· 1 - /* 2 - * Copyright 2012 2012 KEYMILE AG, CH-3097 Bern 3 - * Valentin Longchamp <valentin.longchamp@keymile.com> 4 - * 5 - * arch/arm/mach-kirkwood/board-km_kirkwood.c 6 - * 7 - * Keymile km_kirkwood Reference Desing Init for drivers not converted to 8 - * flattened device tree yet. 9 - * 10 - * This file is licensed under the terms of the GNU General Public 11 - * License version 2. This program is licensed "as is" without any 12 - * warranty of any kind, whether express or implied. 13 - */ 14 - 15 - #include <linux/kernel.h> 16 - #include <linux/init.h> 17 - #include <linux/mv643xx_eth.h> 18 - #include <linux/clk.h> 19 - #include <linux/clk-private.h> 20 - #include "common.h" 21 - 22 - static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { 23 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 24 - }; 25 - 26 - void __init km_kirkwood_init(void) 27 - { 28 - struct clk *sata_clk; 29 - /* 30 - * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing 31 - * SATA bits (14-15) of the Clock Gating Control Register. Since these 32 - * devices are also not present in this variant, their clocks get 33 - * disabled because unused when clk_disable_unused() gets called. 34 - * That's why we change the flags to these clocks to CLK_IGNORE_UNUSED 35 - */ 36 - sata_clk = clk_get_sys("sata_mv.0", "0"); 37 - if (!IS_ERR(sata_clk)) 38 - sata_clk->flags |= CLK_IGNORE_UNUSED; 39 - sata_clk = clk_get_sys("sata_mv.0", "1"); 40 - if (!IS_ERR(sata_clk)) 41 - sata_clk->flags |= CLK_IGNORE_UNUSED; 42 - 43 - kirkwood_ge00_init(&km_kirkwood_ge00_data); 44 - }
-36
arch/arm/mach-kirkwood/board-lsxl.c
··· 1 - /* 2 - * Copyright 2012 (C), Michael Walle <michael@walle.cc> 3 - * 4 - * arch/arm/mach-kirkwood/board-lsxl.c 5 - * 6 - * Buffalo Linkstation LS-XHL and LS-CHLv2 init for drivers not 7 - * converted to flattened device tree yet. 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #include <linux/kernel.h> 15 - #include <linux/init.h> 16 - #include <linux/platform_device.h> 17 - #include <linux/mv643xx_eth.h> 18 - #include "common.h" 19 - 20 - static struct mv643xx_eth_platform_data lsxl_ge00_data = { 21 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 22 - }; 23 - 24 - static struct mv643xx_eth_platform_data lsxl_ge01_data = { 25 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 26 - }; 27 - 28 - void __init lsxl_init(void) 29 - { 30 - /* 31 - * Basic setup. Needs to be called early. 32 - */ 33 - 34 - kirkwood_ge00_init(&lsxl_ge00_data); 35 - kirkwood_ge01_init(&lsxl_ge01_data); 36 - }
-35
arch/arm/mach-kirkwood/board-mplcec4.c
··· 1 - /* 2 - * Copyright (C) 2012 MPL AG, Switzerland 3 - * Stefan Peter <s.peter@mpl.ch> 4 - * 5 - * arch/arm/mach-kirkwood/board-mplcec4.c 6 - * 7 - * This file is licensed under the terms of the GNU General Public 8 - * License version 2. This program is licensed "as is" without any 9 - * warranty of any kind, whether express or implied. 10 - */ 11 - 12 - #include <linux/kernel.h> 13 - #include <linux/init.h> 14 - #include <linux/mv643xx_eth.h> 15 - #include "common.h" 16 - 17 - static struct mv643xx_eth_platform_data mplcec4_ge00_data = { 18 - .phy_addr = MV643XX_ETH_PHY_ADDR(1), 19 - }; 20 - 21 - static struct mv643xx_eth_platform_data mplcec4_ge01_data = { 22 - .phy_addr = MV643XX_ETH_PHY_ADDR(2), 23 - }; 24 - 25 - void __init mplcec4_init(void) 26 - { 27 - /* 28 - * Basic setup. Needs to be called early. 29 - */ 30 - kirkwood_ge00_init(&mplcec4_ge00_data); 31 - kirkwood_ge01_init(&mplcec4_ge01_data); 32 - } 33 - 34 - 35 -
+50
arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
··· 1 + /* 2 + * arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c 3 + * 4 + * Marvell 88F6281 GTW GE Board Setup 5 + * 6 + * This file is licensed under the terms of the GNU General Public 7 + * License version 2. This program is licensed "as is" without any 8 + * warranty of any kind, whether express or implied. 9 + */ 10 + 11 + #include <linux/kernel.h> 12 + #include <linux/init.h> 13 + #include <linux/platform_device.h> 14 + #include <linux/irq.h> 15 + #include <linux/timer.h> 16 + #include <linux/mv643xx_eth.h> 17 + #include <linux/ethtool.h> 18 + #include <linux/gpio.h> 19 + #include <net/dsa.h> 20 + #include <asm/mach-types.h> 21 + #include <asm/mach/arch.h> 22 + #include <asm/mach/pci.h> 23 + #include <mach/kirkwood.h> 24 + #include "common.h" 25 + 26 + static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { 27 + .phy_addr = MV643XX_ETH_PHY_NONE, 28 + .speed = SPEED_1000, 29 + .duplex = DUPLEX_FULL, 30 + }; 31 + 32 + static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { 33 + .port_names[0] = "lan1", 34 + .port_names[1] = "lan2", 35 + .port_names[2] = "lan3", 36 + .port_names[3] = "lan4", 37 + .port_names[4] = "wan", 38 + .port_names[5] = "cpu", 39 + }; 40 + 41 + static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { 42 + .nr_chips = 1, 43 + .chip = &mv88f6281gtw_ge_switch_chip_data, 44 + }; 45 + 46 + void __init mv88f6281gtw_ge_init(void) 47 + { 48 + kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); 49 + kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); 50 + }
-35
arch/arm/mach-kirkwood/board-ns2.c
··· 1 - /* 2 - * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> 3 - * 4 - * arch/arm/mach-kirkwood/board-ns2.c 5 - * 6 - * LaCie Network Space v2 board (and parents) initialization for drivers 7 - * not converted to flattened device tree yet. 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #include <linux/kernel.h> 15 - #include <linux/init.h> 16 - #include <linux/platform_device.h> 17 - #include <linux/mv643xx_eth.h> 18 - #include <linux/of.h> 19 - #include "common.h" 20 - 21 - static struct mv643xx_eth_platform_data ns2_ge00_data = { 22 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 23 - }; 24 - 25 - void __init ns2_init(void) 26 - { 27 - /* 28 - * Basic setup. Needs to be called early. 29 - */ 30 - if (of_machine_is_compatible("lacie,cloudbox") || 31 - of_machine_is_compatible("lacie,netspace_lite_v2") || 32 - of_machine_is_compatible("lacie,netspace_mini_v2")) 33 - ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 34 - kirkwood_ge00_init(&ns2_ge00_data); 35 - }
-26
arch/arm/mach-kirkwood/board-openblocks_a6.c
··· 1 - /* 2 - * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 3 - * 4 - * arch/arm/mach-kirkwood/board-openblocks_a6.c 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/mv643xx_eth.h> 14 - #include "common.h" 15 - 16 - static struct mv643xx_eth_platform_data openblocks_ge00_data = { 17 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 18 - }; 19 - 20 - void __init openblocks_a6_init(void) 21 - { 22 - /* 23 - * Basic setup. Needs to be called early. 24 - */ 25 - kirkwood_ge00_init(&openblocks_ge00_data); 26 - }
-27
arch/arm/mach-kirkwood/board-readynas.c
··· 1 - /* 2 - * NETGEAR ReadyNAS Duo v2 Board setup for drivers not already 3 - * converted to DT. 4 - * 5 - * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> 6 - * 7 - * This program is free software; you can redistribute it and/or 8 - * modify it under the terms of the GNU General Public License 9 - * as published by the Free Software Foundation; either version 10 - * 2 of the License, or (at your option) any later version. 11 - */ 12 - 13 - #include <linux/kernel.h> 14 - #include <linux/init.h> 15 - #include <linux/platform_device.h> 16 - #include <linux/mv643xx_eth.h> 17 - #include <mach/kirkwood.h> 18 - #include "common.h" 19 - 20 - static struct mv643xx_eth_platform_data netgear_readynas_ge00_data = { 21 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 22 - }; 23 - 24 - void __init netgear_readynas_init(void) 25 - { 26 - kirkwood_ge00_init(&netgear_readynas_ge00_data); 27 - }
-27
arch/arm/mach-kirkwood/board-sheevaplug.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/board-sheevaplug.c 3 - * 4 - * Marvell Sheevaplug Reference Board Init for drivers not converted to 5 - * flattened device tree yet. 6 - * 7 - * This file is licensed under the terms of the GNU General Public 8 - * License version 2. This program is licensed "as is" without any 9 - * warranty of any kind, whether express or implied. 10 - */ 11 - 12 - #include <linux/kernel.h> 13 - #include <linux/init.h> 14 - #include <linux/mv643xx_eth.h> 15 - #include "common.h" 16 - 17 - static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { 18 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 19 - }; 20 - 21 - void __init sheevaplug_dt_init(void) 22 - { 23 - /* 24 - * Basic setup. Needs to be called early. 25 - */ 26 - kirkwood_ge00_init(&sheevaplug_ge00_data); 27 - }
-40
arch/arm/mach-kirkwood/board-ts219.c
··· 1 - /* 2 - * 3 - * QNAP TS-11x/TS-21x Turbo NAS Board Setup via DT 4 - * 5 - * Copyright (C) 2012 Andrew Lunn <andrew@lunn.ch> 6 - * 7 - * Based on the board file ts219-setup.c: 8 - * 9 - * Copyright (C) 2009 Martin Michlmayr <tbm@cyrius.com> 10 - * Copyright (C) 2008 Byron Bradley <byron.bbradley@gmail.com> 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 15 - * 2 of the License, or (at your option) any later version. 16 - */ 17 - 18 - #include <linux/kernel.h> 19 - #include <linux/init.h> 20 - #include <linux/platform_device.h> 21 - #include <linux/mv643xx_eth.h> 22 - #include <asm/mach-types.h> 23 - #include <asm/mach/arch.h> 24 - #include <mach/kirkwood.h> 25 - #include "common.h" 26 - 27 - static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { 28 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 29 - }; 30 - 31 - void __init qnap_dt_ts219_init(void) 32 - { 33 - u32 dev, rev; 34 - 35 - kirkwood_pcie_id(&dev, &rev); 36 - if (dev == MV88F6282_DEV_ID) 37 - qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 38 - 39 - kirkwood_ge00_init(&qnap_ts219_ge00_data); 40 - }
-29
arch/arm/mach-kirkwood/board-usi_topkick.c
··· 1 - /* 2 - * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> 3 - * 4 - * arch/arm/mach-kirkwood/board-usi_topkick.c 5 - * 6 - * USI Topkick Init for drivers not converted to flattened device tree yet. 7 - * 8 - * This file is licensed under the terms of the GNU General Public 9 - * License version 2. This program is licensed "as is" without any 10 - * warranty of any kind, whether express or implied. 11 - */ 12 - 13 - #include <linux/kernel.h> 14 - #include <linux/init.h> 15 - #include <linux/mv643xx_eth.h> 16 - #include <linux/gpio.h> 17 - #include "common.h" 18 - 19 - static struct mv643xx_eth_platform_data topkick_ge00_data = { 20 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 21 - }; 22 - 23 - void __init usi_topkick_init(void) 24 - { 25 - /* 26 - * Basic setup. Needs to be called early. 27 - */ 28 - kirkwood_ge00_init(&topkick_ge00_data); 29 - }
+3 -112
arch/arm/mach-kirkwood/common.h
··· 59 59 void kirkwood_clk_init(void); 60 60 61 61 /* board init functions for boards not fully converted to fdt */ 62 - #ifdef CONFIG_MACH_DREAMPLUG_DT 63 - void dreamplug_init(void); 62 + #ifdef CONFIG_MACH_MV88F6281GTW_GE_DT 63 + void mv88f6281gtw_ge_init(void); 64 64 #else 65 - static inline void dreamplug_init(void) {}; 66 - #endif 67 - #ifdef CONFIG_MACH_GURUPLUG_DT 68 - void guruplug_dt_init(void); 69 - #else 70 - static inline void guruplug_dt_init(void) {}; 71 - #endif 72 - #ifdef CONFIG_MACH_SHEEVAPLUG_DT 73 - void sheevaplug_dt_init(void); 74 - #else 75 - static inline void sheevaplug_dt_init(void) {}; 76 - #endif 77 - #ifdef CONFIG_MACH_TS219_DT 78 - void qnap_dt_ts219_init(void); 79 - #else 80 - static inline void qnap_dt_ts219_init(void) {}; 81 - #endif 82 - 83 - #ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT 84 - void dnskw_init(void); 85 - #else 86 - static inline void dnskw_init(void) {}; 87 - #endif 88 - 89 - #ifdef CONFIG_MACH_ICONNECT_DT 90 - void iconnect_init(void); 91 - #else 92 - static inline void iconnect_init(void) {}; 93 - #endif 94 - 95 - #ifdef CONFIG_MACH_IB62X0_DT 96 - void ib62x0_init(void); 97 - #else 98 - static inline void ib62x0_init(void) {}; 99 - #endif 100 - 101 - #ifdef CONFIG_MACH_DOCKSTAR_DT 102 - void dockstar_dt_init(void); 103 - #else 104 - static inline void dockstar_dt_init(void) {}; 105 - #endif 106 - 107 - #ifdef CONFIG_MACH_GOFLEXNET_DT 108 - void goflexnet_init(void); 109 - #else 110 - static inline void goflexnet_init(void) {}; 111 - #endif 112 - 113 - #ifdef CONFIG_MACH_LSXL_DT 114 - void lsxl_init(void); 115 - #else 116 - static inline void lsxl_init(void) {}; 117 - #endif 118 - 119 - #ifdef CONFIG_MACH_IOMEGA_IX2_200_DT 120 - void iomega_ix2_200_init(void); 121 - #else 122 - static inline void iomega_ix2_200_init(void) {}; 123 - #endif 124 - 125 - #ifdef CONFIG_MACH_KM_KIRKWOOD_DT 126 - void km_kirkwood_init(void); 127 - #else 128 - static inline void km_kirkwood_init(void) {}; 129 - #endif 130 - 131 - #ifdef CONFIG_MACH_DB88F628X_BP_DT 132 - void db88f628x_init(void); 133 - #else 134 - static inline void db88f628x_init(void) {}; 135 - #endif 136 - 137 - #ifdef CONFIG_MACH_MPLCEC4_DT 138 - void mplcec4_init(void); 139 - #else 140 - static inline void mplcec4_init(void) {}; 141 - #endif 142 - 143 - #if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ 144 - defined(CONFIG_MACH_NETSPACE_V2_DT) || \ 145 - defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ 146 - defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \ 147 - defined(CONFIG_MACH_NETSPACE_MINI_V2_DT) 148 - void ns2_init(void); 149 - #else 150 - static inline void ns2_init(void) {}; 151 - #endif 152 - 153 - #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT 154 - void openblocks_a6_init(void); 155 - #else 156 - static inline void openblocks_a6_init(void) {}; 157 - #endif 158 - 159 - #ifdef CONFIG_MACH_READYNAS_DT 160 - void netgear_readynas_init(void); 161 - #else 162 - static inline void netgear_readynas_init(void) {}; 163 - #endif 164 - 165 - #ifdef CONFIG_MACH_TOPKICK_DT 166 - void usi_topkick_init(void); 167 - #else 168 - static inline void usi_topkick_init(void) {}; 169 - #endif 170 - 171 - #ifdef CONFIG_MACH_CLOUDBOX_DT 172 - void cloudbox_init(void); 173 - #else 174 - static inline void cloudbox_init(void) {}; 65 + static inline void mv88f6281gtw_ge_init(void) {}; 175 66 #endif 176 67 177 68 /* early init functions not converted to fdt yet */
-111
arch/arm/mach-kirkwood/dockstar-setup.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/dockstar-setup.c 3 - * 4 - * Seagate FreeAgent DockStar Setup 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/platform_device.h> 14 - #include <linux/ata_platform.h> 15 - #include <linux/mtd/partitions.h> 16 - #include <linux/mv643xx_eth.h> 17 - #include <linux/gpio.h> 18 - #include <linux/leds.h> 19 - #include <asm/mach-types.h> 20 - #include <asm/mach/arch.h> 21 - #include <mach/kirkwood.h> 22 - #include "common.h" 23 - #include "mpp.h" 24 - 25 - static struct mtd_partition dockstar_nand_parts[] = { 26 - { 27 - .name = "u-boot", 28 - .offset = 0, 29 - .size = SZ_1M 30 - }, { 31 - .name = "uImage", 32 - .offset = MTDPART_OFS_NXTBLK, 33 - .size = SZ_4M 34 - }, { 35 - .name = "root", 36 - .offset = MTDPART_OFS_NXTBLK, 37 - .size = MTDPART_SIZ_FULL 38 - }, 39 - }; 40 - 41 - static struct mv643xx_eth_platform_data dockstar_ge00_data = { 42 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 43 - }; 44 - 45 - static struct gpio_led dockstar_led_pins[] = { 46 - { 47 - .name = "dockstar:green:health", 48 - .default_trigger = "default-on", 49 - .gpio = 46, 50 - .active_low = 1, 51 - }, 52 - { 53 - .name = "dockstar:orange:misc", 54 - .default_trigger = "none", 55 - .gpio = 47, 56 - .active_low = 1, 57 - }, 58 - }; 59 - 60 - static struct gpio_led_platform_data dockstar_led_data = { 61 - .leds = dockstar_led_pins, 62 - .num_leds = ARRAY_SIZE(dockstar_led_pins), 63 - }; 64 - 65 - static struct platform_device dockstar_leds = { 66 - .name = "leds-gpio", 67 - .id = -1, 68 - .dev = { 69 - .platform_data = &dockstar_led_data, 70 - } 71 - }; 72 - 73 - static unsigned int dockstar_mpp_config[] __initdata = { 74 - MPP29_GPIO, /* USB Power Enable */ 75 - MPP46_GPIO, /* LED green */ 76 - MPP47_GPIO, /* LED orange */ 77 - 0 78 - }; 79 - 80 - static void __init dockstar_init(void) 81 - { 82 - /* 83 - * Basic setup. Needs to be called early. 84 - */ 85 - kirkwood_init(); 86 - 87 - /* setup gpio pin select */ 88 - kirkwood_mpp_conf(dockstar_mpp_config); 89 - 90 - kirkwood_uart0_init(); 91 - kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts), 25); 92 - 93 - if (gpio_request(29, "USB Power Enable") != 0 || 94 - gpio_direction_output(29, 1) != 0) 95 - pr_err("can't set up GPIO 29 (USB Power Enable)\n"); 96 - kirkwood_ehci_init(); 97 - 98 - kirkwood_ge00_init(&dockstar_ge00_data); 99 - 100 - platform_device_register(&dockstar_leds); 101 - } 102 - 103 - MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar") 104 - .atag_offset = 0x100, 105 - .init_machine = dockstar_init, 106 - .map_io = kirkwood_map_io, 107 - .init_early = kirkwood_init_early, 108 - .init_irq = kirkwood_init_irq, 109 - .init_time = kirkwood_timer_init, 110 - .restart = kirkwood_restart, 111 - MACHINE_END
-133
arch/arm/mach-kirkwood/guruplug-setup.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/guruplug-setup.c 3 - * 4 - * Marvell GuruPlug Reference Board Setup 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/platform_device.h> 14 - #include <linux/mtd/partitions.h> 15 - #include <linux/ata_platform.h> 16 - #include <linux/mv643xx_eth.h> 17 - #include <linux/gpio.h> 18 - #include <linux/leds.h> 19 - #include <asm/mach-types.h> 20 - #include <asm/mach/arch.h> 21 - #include <mach/kirkwood.h> 22 - #include <linux/platform_data/mmc-mvsdio.h> 23 - #include "common.h" 24 - #include "mpp.h" 25 - 26 - static struct mtd_partition guruplug_nand_parts[] = { 27 - { 28 - .name = "u-boot", 29 - .offset = 0, 30 - .size = SZ_1M 31 - }, { 32 - .name = "uImage", 33 - .offset = MTDPART_OFS_NXTBLK, 34 - .size = SZ_4M 35 - }, { 36 - .name = "root", 37 - .offset = MTDPART_OFS_NXTBLK, 38 - .size = MTDPART_SIZ_FULL 39 - }, 40 - }; 41 - 42 - static struct mv643xx_eth_platform_data guruplug_ge00_data = { 43 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 44 - }; 45 - 46 - static struct mv643xx_eth_platform_data guruplug_ge01_data = { 47 - .phy_addr = MV643XX_ETH_PHY_ADDR(1), 48 - }; 49 - 50 - static struct mv_sata_platform_data guruplug_sata_data = { 51 - .n_ports = 1, 52 - }; 53 - 54 - static struct mvsdio_platform_data guruplug_mvsdio_data = { 55 - /* unfortunately the CD signal has not been connected */ 56 - .gpio_card_detect = -1, 57 - .gpio_write_protect = -1, 58 - }; 59 - 60 - static struct gpio_led guruplug_led_pins[] = { 61 - { 62 - .name = "guruplug:red:health", 63 - .gpio = 46, 64 - .active_low = 1, 65 - }, 66 - { 67 - .name = "guruplug:green:health", 68 - .gpio = 47, 69 - .active_low = 1, 70 - }, 71 - { 72 - .name = "guruplug:red:wmode", 73 - .gpio = 48, 74 - .active_low = 1, 75 - }, 76 - { 77 - .name = "guruplug:green:wmode", 78 - .gpio = 49, 79 - .active_low = 1, 80 - }, 81 - }; 82 - 83 - static struct gpio_led_platform_data guruplug_led_data = { 84 - .leds = guruplug_led_pins, 85 - .num_leds = ARRAY_SIZE(guruplug_led_pins), 86 - }; 87 - 88 - static struct platform_device guruplug_leds = { 89 - .name = "leds-gpio", 90 - .id = -1, 91 - .dev = { 92 - .platform_data = &guruplug_led_data, 93 - } 94 - }; 95 - 96 - static unsigned int guruplug_mpp_config[] __initdata = { 97 - MPP46_GPIO, /* M_RLED */ 98 - MPP47_GPIO, /* M_GLED */ 99 - MPP48_GPIO, /* B_RLED */ 100 - MPP49_GPIO, /* B_GLED */ 101 - 0 102 - }; 103 - 104 - static void __init guruplug_init(void) 105 - { 106 - /* 107 - * Basic setup. Needs to be called early. 108 - */ 109 - kirkwood_init(); 110 - kirkwood_mpp_conf(guruplug_mpp_config); 111 - 112 - kirkwood_uart0_init(); 113 - kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25); 114 - 115 - kirkwood_ehci_init(); 116 - kirkwood_ge00_init(&guruplug_ge00_data); 117 - kirkwood_ge01_init(&guruplug_ge01_data); 118 - kirkwood_sata_init(&guruplug_sata_data); 119 - kirkwood_sdio_init(&guruplug_mvsdio_data); 120 - 121 - platform_device_register(&guruplug_leds); 122 - } 123 - 124 - MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") 125 - /* Maintainer: Siddarth Gore <gores@marvell.com> */ 126 - .atag_offset = 0x100, 127 - .init_machine = guruplug_init, 128 - .map_io = kirkwood_map_io, 129 - .init_early = kirkwood_init_early, 130 - .init_irq = kirkwood_init_irq, 131 - .init_time = kirkwood_timer_init, 132 - .restart = kirkwood_restart, 133 - MACHINE_END
-172
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c 3 - * 4 - * Marvell 88F6281 GTW GE Board Setup 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/platform_device.h> 14 - #include <linux/pci.h> 15 - #include <linux/irq.h> 16 - #include <linux/mtd/physmap.h> 17 - #include <linux/timer.h> 18 - #include <linux/mv643xx_eth.h> 19 - #include <linux/ethtool.h> 20 - #include <linux/gpio.h> 21 - #include <linux/leds.h> 22 - #include <linux/input.h> 23 - #include <linux/gpio_keys.h> 24 - #include <linux/spi/flash.h> 25 - #include <linux/spi/spi.h> 26 - #include <net/dsa.h> 27 - #include <asm/mach-types.h> 28 - #include <asm/mach/arch.h> 29 - #include <asm/mach/pci.h> 30 - #include <mach/kirkwood.h> 31 - #include "common.h" 32 - #include "mpp.h" 33 - 34 - static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { 35 - .phy_addr = MV643XX_ETH_PHY_NONE, 36 - .speed = SPEED_1000, 37 - .duplex = DUPLEX_FULL, 38 - }; 39 - 40 - static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { 41 - .port_names[0] = "lan1", 42 - .port_names[1] = "lan2", 43 - .port_names[2] = "lan3", 44 - .port_names[3] = "lan4", 45 - .port_names[4] = "wan", 46 - .port_names[5] = "cpu", 47 - }; 48 - 49 - static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { 50 - .nr_chips = 1, 51 - .chip = &mv88f6281gtw_ge_switch_chip_data, 52 - }; 53 - 54 - static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = { 55 - .type = "mx25l12805d", 56 - }; 57 - 58 - static struct spi_board_info __initdata mv88f6281gtw_ge_spi_slave_info[] = { 59 - { 60 - .modalias = "m25p80", 61 - .platform_data = &mv88f6281gtw_ge_spi_slave_data, 62 - .irq = -1, 63 - .max_speed_hz = 50000000, 64 - .bus_num = 0, 65 - .chip_select = 0, 66 - }, 67 - }; 68 - 69 - static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = { 70 - { 71 - .code = KEY_RESTART, 72 - .gpio = 47, 73 - .desc = "SWR Button", 74 - .active_low = 1, 75 - }, { 76 - .code = KEY_WPS_BUTTON, 77 - .gpio = 46, 78 - .desc = "WPS Button", 79 - .active_low = 1, 80 - }, 81 - }; 82 - 83 - static struct gpio_keys_platform_data mv88f6281gtw_ge_button_data = { 84 - .buttons = mv88f6281gtw_ge_button_pins, 85 - .nbuttons = ARRAY_SIZE(mv88f6281gtw_ge_button_pins), 86 - }; 87 - 88 - static struct platform_device mv88f6281gtw_ge_buttons = { 89 - .name = "gpio-keys", 90 - .id = -1, 91 - .num_resources = 0, 92 - .dev = { 93 - .platform_data = &mv88f6281gtw_ge_button_data, 94 - }, 95 - }; 96 - 97 - static struct gpio_led mv88f6281gtw_ge_led_pins[] = { 98 - { 99 - .name = "gtw:green:Status", 100 - .gpio = 20, 101 - .active_low = 0, 102 - }, { 103 - .name = "gtw:red:Status", 104 - .gpio = 21, 105 - .active_low = 0, 106 - }, { 107 - .name = "gtw:green:USB", 108 - .gpio = 12, 109 - .active_low = 0, 110 - }, 111 - }; 112 - 113 - static struct gpio_led_platform_data mv88f6281gtw_ge_led_data = { 114 - .leds = mv88f6281gtw_ge_led_pins, 115 - .num_leds = ARRAY_SIZE(mv88f6281gtw_ge_led_pins), 116 - }; 117 - 118 - static struct platform_device mv88f6281gtw_ge_leds = { 119 - .name = "leds-gpio", 120 - .id = -1, 121 - .dev = { 122 - .platform_data = &mv88f6281gtw_ge_led_data, 123 - }, 124 - }; 125 - 126 - static unsigned int mv88f6281gtw_ge_mpp_config[] __initdata = { 127 - MPP12_GPO, /* Status#_USB pin */ 128 - MPP20_GPIO, /* Status#_GLED pin */ 129 - MPP21_GPIO, /* Status#_RLED pin */ 130 - MPP46_GPIO, /* WPS_Switch pin */ 131 - MPP47_GPIO, /* SW_Init pin */ 132 - 0 133 - }; 134 - 135 - static void __init mv88f6281gtw_ge_init(void) 136 - { 137 - /* 138 - * Basic setup. Needs to be called early. 139 - */ 140 - kirkwood_init(); 141 - kirkwood_mpp_conf(mv88f6281gtw_ge_mpp_config); 142 - 143 - kirkwood_ehci_init(); 144 - kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); 145 - kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); 146 - spi_register_board_info(mv88f6281gtw_ge_spi_slave_info, 147 - ARRAY_SIZE(mv88f6281gtw_ge_spi_slave_info)); 148 - kirkwood_spi_init(); 149 - kirkwood_uart0_init(); 150 - platform_device_register(&mv88f6281gtw_ge_leds); 151 - platform_device_register(&mv88f6281gtw_ge_buttons); 152 - } 153 - 154 - static int __init mv88f6281gtw_ge_pci_init(void) 155 - { 156 - if (machine_is_mv88f6281gtw_ge()) 157 - kirkwood_pcie_init(KW_PCIE0); 158 - 159 - return 0; 160 - } 161 - subsys_initcall(mv88f6281gtw_ge_pci_init); 162 - 163 - MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") 164 - /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ 165 - .atag_offset = 0x100, 166 - .init_machine = mv88f6281gtw_ge_init, 167 - .map_io = kirkwood_map_io, 168 - .init_early = kirkwood_init_early, 169 - .init_irq = kirkwood_init_irq, 170 - .init_time = kirkwood_timer_init, 171 - .restart = kirkwood_restart, 172 - MACHINE_END
-293
arch/arm/mach-kirkwood/netspace_v2-setup.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/netspace_v2-setup.c 3 - * 4 - * LaCie Network Space v2 board setup 5 - * 6 - * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com> 7 - * Copyright (C) 2009 Benoît Canet <benoit.canet@gmail.com> 8 - * 9 - * This program is free software; you can redistribute it and/or modify 10 - * it under the terms of the GNU General Public License as published by 11 - * the Free Software Foundation; either version 2 of the License, or 12 - * (at your option) any later version. 13 - * 14 - * This program is distributed in the hope that it will be useful, 15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 - * GNU General Public License for more details. 18 - * 19 - * You should have received a copy of the GNU General Public License 20 - * along with this program; if not, write to the Free Software 21 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 - */ 23 - 24 - #include <linux/kernel.h> 25 - #include <linux/init.h> 26 - #include <linux/platform_device.h> 27 - #include <linux/ata_platform.h> 28 - #include <linux/mv643xx_eth.h> 29 - #include <linux/input.h> 30 - #include <linux/gpio.h> 31 - #include <linux/gpio_keys.h> 32 - #include <linux/leds.h> 33 - #include <linux/gpio-fan.h> 34 - #include <asm/mach-types.h> 35 - #include <asm/mach/arch.h> 36 - #include <mach/kirkwood.h> 37 - #include <linux/platform_data/leds-kirkwood-ns2.h> 38 - #include "common.h" 39 - #include "mpp.h" 40 - #include "lacie_v2-common.h" 41 - 42 - /***************************************************************************** 43 - * Ethernet 44 - ****************************************************************************/ 45 - 46 - static struct mv643xx_eth_platform_data netspace_v2_ge00_data = { 47 - .phy_addr = MV643XX_ETH_PHY_ADDR(8), 48 - }; 49 - 50 - /***************************************************************************** 51 - * SATA 52 - ****************************************************************************/ 53 - 54 - static struct mv_sata_platform_data netspace_v2_sata_data = { 55 - .n_ports = 2, 56 - }; 57 - 58 - /***************************************************************************** 59 - * GPIO keys 60 - ****************************************************************************/ 61 - 62 - #define NETSPACE_V2_PUSH_BUTTON 32 63 - 64 - static struct gpio_keys_button netspace_v2_buttons[] = { 65 - [0] = { 66 - .code = KEY_POWER, 67 - .gpio = NETSPACE_V2_PUSH_BUTTON, 68 - .desc = "Power push button", 69 - .active_low = 0, 70 - }, 71 - }; 72 - 73 - static struct gpio_keys_platform_data netspace_v2_button_data = { 74 - .buttons = netspace_v2_buttons, 75 - .nbuttons = ARRAY_SIZE(netspace_v2_buttons), 76 - }; 77 - 78 - static struct platform_device netspace_v2_gpio_buttons = { 79 - .name = "gpio-keys", 80 - .id = -1, 81 - .dev = { 82 - .platform_data = &netspace_v2_button_data, 83 - }, 84 - }; 85 - 86 - /***************************************************************************** 87 - * GPIO LEDs 88 - ****************************************************************************/ 89 - 90 - #define NETSPACE_V2_GPIO_RED_LED 12 91 - 92 - static struct gpio_led netspace_v2_gpio_led_pins[] = { 93 - { 94 - .name = "ns_v2:red:fail", 95 - .gpio = NETSPACE_V2_GPIO_RED_LED, 96 - }, 97 - }; 98 - 99 - static struct gpio_led_platform_data netspace_v2_gpio_leds_data = { 100 - .num_leds = ARRAY_SIZE(netspace_v2_gpio_led_pins), 101 - .leds = netspace_v2_gpio_led_pins, 102 - }; 103 - 104 - static struct platform_device netspace_v2_gpio_leds = { 105 - .name = "leds-gpio", 106 - .id = -1, 107 - .dev = { 108 - .platform_data = &netspace_v2_gpio_leds_data, 109 - }, 110 - }; 111 - 112 - /***************************************************************************** 113 - * Dual-GPIO CPLD LEDs 114 - ****************************************************************************/ 115 - 116 - #define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29 117 - #define NETSPACE_V2_GPIO_BLUE_LED_CMD 30 118 - 119 - static struct ns2_led netspace_v2_led_pins[] = { 120 - { 121 - .name = "ns_v2:blue:sata", 122 - .cmd = NETSPACE_V2_GPIO_BLUE_LED_CMD, 123 - .slow = NETSPACE_V2_GPIO_BLUE_LED_SLOW, 124 - }, 125 - }; 126 - 127 - static struct ns2_led_platform_data netspace_v2_leds_data = { 128 - .num_leds = ARRAY_SIZE(netspace_v2_led_pins), 129 - .leds = netspace_v2_led_pins, 130 - }; 131 - 132 - static struct platform_device netspace_v2_leds = { 133 - .name = "leds-ns2", 134 - .id = -1, 135 - .dev = { 136 - .platform_data = &netspace_v2_leds_data, 137 - }, 138 - }; 139 - 140 - /***************************************************************************** 141 - * GPIO fan 142 - ****************************************************************************/ 143 - 144 - /* Designed for fan 40x40x16: ADDA AD0412LB-D50 6000rpm@12v */ 145 - static struct gpio_fan_speed netspace_max_v2_fan_speed[] = { 146 - { 0, 0 }, 147 - { 1500, 15 }, 148 - { 1700, 14 }, 149 - { 1800, 13 }, 150 - { 2100, 12 }, 151 - { 3100, 11 }, 152 - { 3300, 10 }, 153 - { 4300, 9 }, 154 - { 5500, 8 }, 155 - }; 156 - 157 - static unsigned netspace_max_v2_fan_ctrl[] = { 22, 7, 33, 23 }; 158 - 159 - static struct gpio_fan_alarm netspace_max_v2_fan_alarm = { 160 - .gpio = 25, 161 - .active_low = 1, 162 - }; 163 - 164 - static struct gpio_fan_platform_data netspace_max_v2_fan_data = { 165 - .num_ctrl = ARRAY_SIZE(netspace_max_v2_fan_ctrl), 166 - .ctrl = netspace_max_v2_fan_ctrl, 167 - .alarm = &netspace_max_v2_fan_alarm, 168 - .num_speed = ARRAY_SIZE(netspace_max_v2_fan_speed), 169 - .speed = netspace_max_v2_fan_speed, 170 - }; 171 - 172 - static struct platform_device netspace_max_v2_gpio_fan = { 173 - .name = "gpio-fan", 174 - .id = -1, 175 - .dev = { 176 - .platform_data = &netspace_max_v2_fan_data, 177 - }, 178 - }; 179 - 180 - /***************************************************************************** 181 - * General Setup 182 - ****************************************************************************/ 183 - 184 - static unsigned int netspace_v2_mpp_config[] __initdata = { 185 - MPP0_SPI_SCn, 186 - MPP1_SPI_MOSI, 187 - MPP2_SPI_SCK, 188 - MPP3_SPI_MISO, 189 - MPP4_NF_IO6, 190 - MPP5_NF_IO7, 191 - MPP6_SYSRST_OUTn, 192 - MPP7_GPO, /* Fan speed (bit 1) */ 193 - MPP8_TW0_SDA, 194 - MPP9_TW0_SCK, 195 - MPP10_UART0_TXD, 196 - MPP11_UART0_RXD, 197 - MPP12_GPO, /* Red led */ 198 - MPP14_GPIO, /* USB fuse */ 199 - MPP16_GPIO, /* SATA 0 power */ 200 - MPP17_GPIO, /* SATA 1 power */ 201 - MPP18_NF_IO0, 202 - MPP19_NF_IO1, 203 - MPP20_SATA1_ACTn, 204 - MPP21_SATA0_ACTn, 205 - MPP22_GPIO, /* Fan speed (bit 0) */ 206 - MPP23_GPIO, /* Fan power */ 207 - MPP24_GPIO, /* USB mode select */ 208 - MPP25_GPIO, /* Fan rotation fail */ 209 - MPP26_GPIO, /* USB device vbus */ 210 - MPP28_GPIO, /* USB enable host vbus */ 211 - MPP29_GPIO, /* Blue led (slow register) */ 212 - MPP30_GPIO, /* Blue led (command register) */ 213 - MPP31_GPIO, /* Board power off */ 214 - MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ 215 - MPP33_GPO, /* Fan speed (bit 2) */ 216 - 0 217 - }; 218 - 219 - #define NETSPACE_V2_GPIO_POWER_OFF 31 220 - 221 - static void netspace_v2_power_off(void) 222 - { 223 - gpio_set_value(NETSPACE_V2_GPIO_POWER_OFF, 1); 224 - } 225 - 226 - static void __init netspace_v2_init(void) 227 - { 228 - /* 229 - * Basic setup. Needs to be called early. 230 - */ 231 - kirkwood_init(); 232 - kirkwood_mpp_conf(netspace_v2_mpp_config); 233 - 234 - if (machine_is_netspace_max_v2()) 235 - lacie_v2_hdd_power_init(2); 236 - else 237 - lacie_v2_hdd_power_init(1); 238 - 239 - kirkwood_ehci_init(); 240 - kirkwood_ge00_init(&netspace_v2_ge00_data); 241 - kirkwood_sata_init(&netspace_v2_sata_data); 242 - kirkwood_uart0_init(); 243 - lacie_v2_register_flash(); 244 - lacie_v2_register_i2c_devices(); 245 - 246 - platform_device_register(&netspace_v2_leds); 247 - platform_device_register(&netspace_v2_gpio_leds); 248 - platform_device_register(&netspace_v2_gpio_buttons); 249 - if (machine_is_netspace_max_v2()) 250 - platform_device_register(&netspace_max_v2_gpio_fan); 251 - 252 - if (gpio_request(NETSPACE_V2_GPIO_POWER_OFF, "power-off") == 0 && 253 - gpio_direction_output(NETSPACE_V2_GPIO_POWER_OFF, 0) == 0) 254 - pm_power_off = netspace_v2_power_off; 255 - else 256 - pr_err("netspace_v2: failed to configure power-off GPIO\n"); 257 - } 258 - 259 - #ifdef CONFIG_MACH_NETSPACE_V2 260 - MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") 261 - .atag_offset = 0x100, 262 - .init_machine = netspace_v2_init, 263 - .map_io = kirkwood_map_io, 264 - .init_early = kirkwood_init_early, 265 - .init_irq = kirkwood_init_irq, 266 - .init_time = kirkwood_timer_init, 267 - .restart = kirkwood_restart, 268 - MACHINE_END 269 - #endif 270 - 271 - #ifdef CONFIG_MACH_INETSPACE_V2 272 - MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") 273 - .atag_offset = 0x100, 274 - .init_machine = netspace_v2_init, 275 - .map_io = kirkwood_map_io, 276 - .init_early = kirkwood_init_early, 277 - .init_irq = kirkwood_init_irq, 278 - .init_time = kirkwood_timer_init, 279 - .restart = kirkwood_restart, 280 - MACHINE_END 281 - #endif 282 - 283 - #ifdef CONFIG_MACH_NETSPACE_MAX_V2 284 - MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") 285 - .atag_offset = 0x100, 286 - .init_machine = netspace_v2_init, 287 - .map_io = kirkwood_map_io, 288 - .init_early = kirkwood_init_early, 289 - .init_irq = kirkwood_init_irq, 290 - .init_time = kirkwood_timer_init, 291 - .restart = kirkwood_restart, 292 - MACHINE_END 293 - #endif
+2 -1
arch/arm/mach-kirkwood/openrd-setup.c
··· 158 158 kirkwood_mpp_conf(openrd_mpp_config); 159 159 160 160 kirkwood_uart0_init(); 161 - kirkwood_nand_init(ARRAY_AND_SIZE(openrd_nand_parts), 25); 161 + kirkwood_nand_init(openrd_nand_parts, ARRAY_SIZE(openrd_nand_parts), 162 + 25); 162 163 163 164 kirkwood_ehci_init(); 164 165
+3 -1
arch/arm/mach-kirkwood/rd88f6281-setup.c
··· 87 87 kirkwood_init(); 88 88 kirkwood_mpp_conf(rd88f6281_mpp_config); 89 89 90 - kirkwood_nand_init(ARRAY_AND_SIZE(rd88f6281_nand_parts), 25); 90 + kirkwood_nand_init(rd88f6281_nand_parts, 91 + ARRAY_SIZE(rd88f6281_nand_parts), 92 + 25); 91 93 kirkwood_ehci_init(); 92 94 93 95 kirkwood_ge00_init(&rd88f6281_ge00_data);
-161
arch/arm/mach-kirkwood/sheevaplug-setup.c
··· 1 - /* 2 - * arch/arm/mach-kirkwood/sheevaplug-setup.c 3 - * 4 - * Marvell SheevaPlug Reference Board Setup 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - 11 - #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/platform_device.h> 14 - #include <linux/ata_platform.h> 15 - #include <linux/mtd/partitions.h> 16 - #include <linux/mv643xx_eth.h> 17 - #include <linux/gpio.h> 18 - #include <linux/leds.h> 19 - #include <asm/mach-types.h> 20 - #include <asm/mach/arch.h> 21 - #include <mach/kirkwood.h> 22 - #include <linux/platform_data/mmc-mvsdio.h> 23 - #include "common.h" 24 - #include "mpp.h" 25 - 26 - static struct mtd_partition sheevaplug_nand_parts[] = { 27 - { 28 - .name = "u-boot", 29 - .offset = 0, 30 - .size = SZ_1M 31 - }, { 32 - .name = "uImage", 33 - .offset = MTDPART_OFS_NXTBLK, 34 - .size = SZ_4M 35 - }, { 36 - .name = "root", 37 - .offset = MTDPART_OFS_NXTBLK, 38 - .size = MTDPART_SIZ_FULL 39 - }, 40 - }; 41 - 42 - static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { 43 - .phy_addr = MV643XX_ETH_PHY_ADDR(0), 44 - }; 45 - 46 - static struct mv_sata_platform_data sheeva_esata_sata_data = { 47 - .n_ports = 2, 48 - }; 49 - 50 - static struct mvsdio_platform_data sheevaplug_mvsdio_data = { 51 - /* unfortunately the CD signal has not been connected */ 52 - }; 53 - 54 - static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { 55 - .gpio_write_protect = 44, /* MPP44 used as SD write protect */ 56 - .gpio_card_detect = 47, /* MPP47 used as SD card detect */ 57 - }; 58 - 59 - static struct gpio_led sheevaplug_led_pins[] = { 60 - { 61 - .name = "plug:red:misc", 62 - .default_trigger = "none", 63 - .gpio = 46, 64 - .active_low = 1, 65 - }, 66 - { 67 - .name = "plug:green:health", 68 - .default_trigger = "default-on", 69 - .gpio = 49, 70 - .active_low = 1, 71 - }, 72 - }; 73 - 74 - static struct gpio_led_platform_data sheevaplug_led_data = { 75 - .leds = sheevaplug_led_pins, 76 - .num_leds = ARRAY_SIZE(sheevaplug_led_pins), 77 - }; 78 - 79 - static struct platform_device sheevaplug_leds = { 80 - .name = "leds-gpio", 81 - .id = -1, 82 - .dev = { 83 - .platform_data = &sheevaplug_led_data, 84 - } 85 - }; 86 - 87 - static unsigned int sheevaplug_mpp_config[] __initdata = { 88 - MPP29_GPIO, /* USB Power Enable */ 89 - MPP46_GPIO, /* LED Red */ 90 - MPP49_GPIO, /* LED */ 91 - 0 92 - }; 93 - 94 - static unsigned int sheeva_esata_mpp_config[] __initdata = { 95 - MPP29_GPIO, /* USB Power Enable */ 96 - MPP44_GPIO, /* SD Write Protect */ 97 - MPP47_GPIO, /* SD Card Detect */ 98 - MPP49_GPIO, /* LED Green */ 99 - 0 100 - }; 101 - 102 - static void __init sheevaplug_init(void) 103 - { 104 - /* 105 - * Basic setup. Needs to be called early. 106 - */ 107 - kirkwood_init(); 108 - 109 - /* setup gpio pin select */ 110 - if (machine_is_esata_sheevaplug()) 111 - kirkwood_mpp_conf(sheeva_esata_mpp_config); 112 - else 113 - kirkwood_mpp_conf(sheevaplug_mpp_config); 114 - 115 - kirkwood_uart0_init(); 116 - kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); 117 - 118 - if (gpio_request(29, "USB Power Enable") != 0 || 119 - gpio_direction_output(29, 1) != 0) 120 - pr_err("can't set up GPIO 29 (USB Power Enable)\n"); 121 - kirkwood_ehci_init(); 122 - 123 - kirkwood_ge00_init(&sheevaplug_ge00_data); 124 - 125 - /* honor lower power consumption for plugs with out eSATA */ 126 - if (machine_is_esata_sheevaplug()) 127 - kirkwood_sata_init(&sheeva_esata_sata_data); 128 - 129 - /* enable sd wp and sd cd on plugs with esata */ 130 - if (machine_is_esata_sheevaplug()) 131 - kirkwood_sdio_init(&sheeva_esata_mvsdio_data); 132 - else 133 - kirkwood_sdio_init(&sheevaplug_mvsdio_data); 134 - 135 - platform_device_register(&sheevaplug_leds); 136 - } 137 - 138 - #ifdef CONFIG_MACH_SHEEVAPLUG 139 - MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") 140 - /* Maintainer: shadi Ammouri <shadi@marvell.com> */ 141 - .atag_offset = 0x100, 142 - .init_machine = sheevaplug_init, 143 - .map_io = kirkwood_map_io, 144 - .init_early = kirkwood_init_early, 145 - .init_irq = kirkwood_init_irq, 146 - .init_time = kirkwood_timer_init, 147 - .restart = kirkwood_restart, 148 - MACHINE_END 149 - #endif 150 - 151 - #ifdef CONFIG_MACH_ESATA_SHEEVAPLUG 152 - MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") 153 - .atag_offset = 0x100, 154 - .init_machine = sheevaplug_init, 155 - .map_io = kirkwood_map_io, 156 - .init_early = kirkwood_init_early, 157 - .init_irq = kirkwood_init_irq, 158 - .init_time = kirkwood_timer_init, 159 - .restart = kirkwood_restart, 160 - MACHINE_END 161 - #endif
+1 -10
arch/arm/mach-orion5x/edmini_v2-setup.c
··· 23 23 #include <linux/platform_device.h> 24 24 #include <linux/pci.h> 25 25 #include <linux/irq.h> 26 + #include <linux/mbus.h> 26 27 #include <linux/mtd/physmap.h> 27 - #include <linux/mv643xx_eth.h> 28 28 #include <linux/leds.h> 29 29 #include <linux/gpio_keys.h> 30 30 #include <linux/input.h> ··· 96 96 }; 97 97 98 98 /***************************************************************************** 99 - * Ethernet 100 - ****************************************************************************/ 101 - 102 - static struct mv643xx_eth_platform_data edmini_v2_eth_data = { 103 - .phy_addr = 8, 104 - }; 105 - 106 - /***************************************************************************** 107 99 * RTC 5C372a on I2C bus 108 100 ****************************************************************************/ 109 101 ··· 144 152 * Configure peripherals. 145 153 */ 146 154 orion5x_ehci0_init(); 147 - orion5x_eth_init(&edmini_v2_eth_data); 148 155 149 156 mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, 150 157 ORION_MBUS_DEVBUS_BOOT_ATTR,
+1
arch/arm/mach-shmobile/Kconfig
··· 162 162 depends on ARCH_R8A7778 163 163 select ARCH_REQUIRE_GPIOLIB 164 164 select RENESAS_INTC_IRQPIN 165 + select REGULATOR_FIXED_VOLTAGE if REGULATOR 165 166 select USE_OF 166 167 167 168 config MACH_MARZEN
+16 -49
arch/arm/mach-shmobile/board-ag5evm.c
··· 41 41 #include <linux/mmc/sh_mmcif.h> 42 42 #include <linux/mmc/sh_mobile_sdhi.h> 43 43 #include <linux/mfd/tmio.h> 44 + #include <linux/platform_data/bd6107.h> 44 45 #include <linux/sh_clk.h> 45 46 #include <linux/irqchip/arm-gic.h> 46 47 #include <video/sh_mobile_lcdc.h> ··· 292 291 }, 293 292 }; 294 293 295 - static unsigned char lcd_backlight_seq[3][2] = { 296 - { 0x04, 0x07 }, 297 - { 0x23, 0x80 }, 298 - { 0x03, 0x01 }, 299 - }; 300 - 301 - static int lcd_backlight_set_brightness(int brightness) 302 - { 303 - struct i2c_adapter *adap; 304 - struct i2c_msg msg; 305 - unsigned int i; 306 - int ret; 307 - 308 - if (brightness == 0) { 309 - /* Reset the chip */ 310 - gpio_set_value(235, 0); 311 - mdelay(24); 312 - gpio_set_value(235, 1); 313 - return 0; 314 - } 315 - 316 - adap = i2c_get_adapter(1); 317 - if (adap == NULL) 318 - return -ENODEV; 319 - 320 - for (i = 0; i < ARRAY_SIZE(lcd_backlight_seq); i++) { 321 - msg.addr = 0x6d; 322 - msg.buf = &lcd_backlight_seq[i][0]; 323 - msg.len = 2; 324 - msg.flags = 0; 325 - 326 - ret = i2c_transfer(adap, &msg, 1); 327 - if (ret < 0) 328 - break; 329 - } 330 - 331 - i2c_put_adapter(adap); 332 - return ret < 0 ? ret : 0; 333 - } 334 - 335 - /* LCDC0 */ 294 + /* LCDC0 and backlight */ 336 295 static const struct fb_videomode lcdc0_modes[] = { 337 296 { 338 297 .name = "R63302(QHD)", ··· 322 361 .width = 44, 323 362 .height = 79, 324 363 }, 325 - .bl_info = { 326 - .name = "sh_mobile_lcdc_bl", 327 - .max_brightness = 1, 328 - .set_brightness = lcd_backlight_set_brightness, 329 - }, 330 364 .tx_dev = &mipidsi0_device, 331 365 } 332 366 }; ··· 348 392 .platform_data = &lcdc0_info, 349 393 .coherent_dma_mask = ~0, 350 394 }, 395 + }; 396 + 397 + static struct bd6107_platform_data backlight_data = { 398 + .fbdev = &lcdc0_device.dev, 399 + .reset = 235, 400 + .def_value = 0, 401 + }; 402 + 403 + static struct i2c_board_info backlight_board_info = { 404 + I2C_BOARD_INFO("bd6107", 0x6d), 405 + .platform_data = &backlight_data, 351 406 }; 352 407 353 408 /* Fixed 2.8V regulators to be used by SDHI0 */ ··· 615 648 gpio_set_value(217, 1); 616 649 mdelay(100); 617 650 618 - /* LCD backlight controller */ 619 - gpio_request_one(235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ 620 - lcd_backlight_set_brightness(0); 621 651 622 652 #ifdef CONFIG_CACHE_L2X0 623 653 /* Shared attribute override enable, 64K*8way */ 624 654 l2x0_init(IOMEM(0xf0100000), 0x00460000, 0xc2000fff); 625 655 #endif 626 656 sh73a0_add_standard_devices(); 657 + 658 + i2c_register_board_info(1, &backlight_board_info, 1); 659 + 627 660 platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); 628 661 } 629 662
+142 -3
arch/arm/mach-shmobile/board-ape6evm.c
··· 19 19 */ 20 20 21 21 #include <linux/gpio.h> 22 + #include <linux/gpio_keys.h> 23 + #include <linux/input.h> 22 24 #include <linux/interrupt.h> 23 25 #include <linux/kernel.h> 26 + #include <linux/mfd/tmio.h> 27 + #include <linux/mmc/host.h> 28 + #include <linux/mmc/sh_mmcif.h> 29 + #include <linux/mmc/sh_mobile_sdhi.h> 24 30 #include <linux/pinctrl/machine.h> 25 31 #include <linux/platform_device.h> 26 32 #include <linux/regulator/fixed.h> ··· 39 33 #include <asm/mach-types.h> 40 34 #include <asm/mach/arch.h> 41 35 36 + /* LEDS */ 37 + static struct gpio_led ape6evm_leds[] = { 38 + { 39 + .name = "gnss-en", 40 + .gpio = 28, 41 + .default_state = LEDS_GPIO_DEFSTATE_OFF, 42 + }, { 43 + .name = "nfc-nrst", 44 + .gpio = 126, 45 + .default_state = LEDS_GPIO_DEFSTATE_OFF, 46 + }, { 47 + .name = "gnss-nrst", 48 + .gpio = 132, 49 + .default_state = LEDS_GPIO_DEFSTATE_OFF, 50 + }, { 51 + .name = "bt-wakeup", 52 + .gpio = 232, 53 + .default_state = LEDS_GPIO_DEFSTATE_OFF, 54 + }, { 55 + .name = "strobe", 56 + .gpio = 250, 57 + .default_state = LEDS_GPIO_DEFSTATE_OFF, 58 + }, { 59 + .name = "bbresetout", 60 + .gpio = 288, 61 + .default_state = LEDS_GPIO_DEFSTATE_OFF, 62 + }, 63 + }; 64 + 65 + static __initdata struct gpio_led_platform_data ape6evm_leds_pdata = { 66 + .leds = ape6evm_leds, 67 + .num_leds = ARRAY_SIZE(ape6evm_leds), 68 + }; 69 + 70 + /* GPIO KEY */ 71 + #define GPIO_KEY(c, g, d, ...) \ 72 + { .code = c, .gpio = g, .desc = d, .active_low = 1 } 73 + 74 + static struct gpio_keys_button gpio_buttons[] = { 75 + GPIO_KEY(KEY_0, 324, "S16"), 76 + GPIO_KEY(KEY_MENU, 325, "S17"), 77 + GPIO_KEY(KEY_HOME, 326, "S18"), 78 + GPIO_KEY(KEY_BACK, 327, "S19"), 79 + GPIO_KEY(KEY_VOLUMEUP, 328, "S20"), 80 + GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"), 81 + }; 82 + 83 + static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = { 84 + .buttons = gpio_buttons, 85 + .nbuttons = ARRAY_SIZE(gpio_buttons), 86 + }; 87 + 42 88 /* Dummy supplies, where voltage doesn't matter */ 43 89 static struct regulator_consumer_supply dummy_supplies[] = { 44 90 REGULATOR_SUPPLY("vddvario", "smsc911x"), ··· 98 40 }; 99 41 100 42 /* SMSC LAN9220 */ 101 - static const struct resource lan9220_res[] = { 43 + static const struct resource lan9220_res[] __initconst = { 102 44 DEFINE_RES_MEM(0x08000000, 0x1000), 103 45 { 104 46 .start = irq_pin(40), /* IRQ40 */ ··· 106 48 }, 107 49 }; 108 50 109 - static const struct smsc911x_platform_config lan9220_data = { 51 + static const struct smsc911x_platform_config lan9220_data __initconst = { 110 52 .flags = SMSC911X_USE_32BIT, 111 53 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 112 54 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, 113 55 }; 114 56 115 - static const struct pinctrl_map ape6evm_pinctrl_map[] = { 57 + /* 58 + * On APE6EVM power is supplied to MMCIF by a tps80032 regulator. For now we 59 + * model a VDD supply to MMCIF, using a fixed 3.3V regulator. Also use the 60 + * static power supply for SDHI0 and SDHI1, whereas SDHI0's VccQ is also 61 + * supplied by the same tps80032 regulator and thus can also be adjusted 62 + * dynamically. 63 + */ 64 + static struct regulator_consumer_supply fixed3v3_power_consumers[] = 65 + { 66 + REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), 67 + REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), 68 + REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), 69 + }; 70 + 71 + /* MMCIF */ 72 + static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = { 73 + .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, 74 + }; 75 + 76 + static const struct resource mmcif0_resources[] __initconst = { 77 + DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), 78 + DEFINE_RES_IRQ(gic_spi(169)), 79 + }; 80 + 81 + /* SDHI0 */ 82 + static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = { 83 + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, 84 + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, 85 + }; 86 + 87 + static const struct resource sdhi0_resources[] __initconst = { 88 + DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), 89 + DEFINE_RES_IRQ(gic_spi(165)), 90 + }; 91 + 92 + /* SDHI1 */ 93 + static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = { 94 + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, 95 + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 96 + MMC_CAP_NEEDS_POLL, 97 + }; 98 + 99 + static const struct resource sdhi1_resources[] __initconst = { 100 + DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), 101 + DEFINE_RES_IRQ(gic_spi(166)), 102 + }; 103 + 104 + static const struct pinctrl_map ape6evm_pinctrl_map[] __initconst = { 116 105 /* SCIFA0 console */ 117 106 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4", 118 107 "scifa0_data", "scifa0"), 119 108 /* SMSC */ 120 109 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4", 121 110 "irqc_irq40", "irqc"), 111 + /* MMCIF0 */ 112 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4", 113 + "mmc0_data8", "mmc0"), 114 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4", 115 + "mmc0_ctrl", "mmc0"), 116 + /* SDHI0: uSD: no WP */ 117 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a73a4", 118 + "sdhi0_data4", "sdhi0"), 119 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a73a4", 120 + "sdhi0_ctrl", "sdhi0"), 121 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a73a4", 122 + "sdhi0_cd", "sdhi0"), 123 + /* SDHI1 */ 124 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a73a4", 125 + "sdhi1_data4", "sdhi1"), 126 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a73a4", 127 + "sdhi1_ctrl", "sdhi1"), 122 128 }; 123 129 124 130 static void __init ape6evm_add_standard_devices(void) ··· 215 93 platform_device_register_resndata(&platform_bus, "smsc911x", -1, 216 94 lan9220_res, ARRAY_SIZE(lan9220_res), 217 95 &lan9220_data, sizeof(lan9220_data)); 96 + regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, 97 + ARRAY_SIZE(fixed3v3_power_consumers), 3300000); 98 + platform_device_register_resndata(&platform_bus, "sh_mmcif", 0, 99 + mmcif0_resources, ARRAY_SIZE(mmcif0_resources), 100 + &mmcif0_pdata, sizeof(mmcif0_pdata)); 101 + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0, 102 + sdhi0_resources, ARRAY_SIZE(sdhi0_resources), 103 + &sdhi0_pdata, sizeof(sdhi0_pdata)); 104 + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1, 105 + sdhi1_resources, ARRAY_SIZE(sdhi1_resources), 106 + &sdhi1_pdata, sizeof(sdhi1_pdata)); 107 + platform_device_register_data(&platform_bus, "gpio-keys", -1, 108 + &ape6evm_keys_pdata, 109 + sizeof(ape6evm_keys_pdata)); 110 + platform_device_register_data(&platform_bus, "leds-gpio", -1, 111 + &ape6evm_leds_pdata, 112 + sizeof(ape6evm_leds_pdata)); 218 113 } 219 114 220 115 static const char *ape6evm_boards_compat_dt[] __initdata = {
+54 -2
arch/arm/mach-shmobile/board-armadillo800eva.c
··· 31 31 #include <linux/gpio_keys.h> 32 32 #include <linux/regulator/driver.h> 33 33 #include <linux/pinctrl/machine.h> 34 + #include <linux/platform_data/pwm-renesas-tpu.h> 35 + #include <linux/pwm_backlight.h> 34 36 #include <linux/regulator/fixed.h> 35 37 #include <linux/regulator/gpio-regulator.h> 36 38 #include <linux/regulator/machine.h> ··· 388 386 .num_resources = ARRAY_SIZE(sh_eth_resources), 389 387 }; 390 388 391 - /* LCDC */ 389 + /* PWM */ 390 + static struct resource pwm_resources[] = { 391 + [0] = { 392 + .start = 0xe6600000, 393 + .end = 0xe66000ff, 394 + .flags = IORESOURCE_MEM, 395 + }, 396 + }; 397 + 398 + static struct tpu_pwm_platform_data pwm_device_data = { 399 + .channels[2] = { 400 + .polarity = PWM_POLARITY_INVERSED, 401 + } 402 + }; 403 + 404 + static struct platform_device pwm_device = { 405 + .name = "renesas-tpu-pwm", 406 + .id = -1, 407 + .dev = { 408 + .platform_data = &pwm_device_data, 409 + }, 410 + .num_resources = ARRAY_SIZE(pwm_resources), 411 + .resource = pwm_resources, 412 + }; 413 + 414 + static struct pwm_lookup pwm_lookup[] = { 415 + PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL), 416 + }; 417 + 418 + /* LCDC and backlight */ 419 + static struct platform_pwm_backlight_data pwm_backlight_data = { 420 + .lth_brightness = 50, 421 + .max_brightness = 255, 422 + .dft_brightness = 255, 423 + .pwm_period_ns = 33333, /* 30kHz */ 424 + }; 425 + 426 + static struct platform_device pwm_backlight_device = { 427 + .name = "pwm-backlight", 428 + .dev = { 429 + .platform_data = &pwm_backlight_data, 430 + }, 431 + }; 432 + 392 433 static struct fb_videomode lcdc0_mode = { 393 434 .name = "AMPIER/AM-800480", 394 435 .xres = 800, ··· 823 778 .caps = MMC_CAP_4_BIT_DATA | 824 779 MMC_CAP_8_BIT_DATA | 825 780 MMC_CAP_NONREMOVABLE, 781 + .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, 782 + .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, 826 783 }; 827 784 828 785 static struct resource sh_mmcif_resources[] = { ··· 1067 1020 */ 1068 1021 static struct platform_device *eva_devices[] __initdata = { 1069 1022 &lcdc0_device, 1023 + &pwm_device, 1024 + &pwm_backlight_device, 1070 1025 &gpio_keys_device, 1071 1026 &sh_eth_device, 1072 1027 &vcc_sdhi0, ··· 1140 1091 /* ST1232 */ 1141 1092 PIN_MAP_MUX_GROUP_DEFAULT("0-0055", "pfc-r8a7740", 1142 1093 "intc_irq10", "intc"), 1094 + /* TPU0 */ 1095 + PIN_MAP_MUX_GROUP_DEFAULT("renesas-tpu-pwm", "pfc-r8a7740", 1096 + "tpu0_to2_1", "tpu0"), 1143 1097 /* USBHS */ 1144 1098 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7740", 1145 1099 "intc_irq7_1", "intc"), ··· 1196 1144 ARRAY_SIZE(fixed3v3_power_consumers), 3300000); 1197 1145 1198 1146 pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map)); 1147 + pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); 1199 1148 1200 1149 r8a7740_pinmux_init(); 1201 1150 r8a7740_meram_workaround(); 1202 1151 1203 1152 /* LCDC0 */ 1204 1153 gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1205 - gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ 1206 1154 1207 1155 /* GETHER */ 1208 1156 gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
+85 -88
arch/arm/mach-shmobile/board-kota2.c
··· 26 26 #include <linux/irq.h> 27 27 #include <linux/pinctrl/machine.h> 28 28 #include <linux/pinctrl/pinconf-generic.h> 29 + #include <linux/platform_data/pwm-renesas-tpu.h> 29 30 #include <linux/platform_device.h> 30 31 #include <linux/delay.h> 31 32 #include <linux/io.h> ··· 38 37 #include <linux/input/sh_keysc.h> 39 38 #include <linux/gpio_keys.h> 40 39 #include <linux/leds.h> 40 + #include <linux/leds_pwm.h> 41 41 #include <linux/irqchip/arm-gic.h> 42 - #include <linux/platform_data/leds-renesas-tpu.h> 43 42 #include <linux/mmc/host.h> 44 43 #include <linux/mmc/sh_mmcif.h> 45 44 #include <linux/mfd/tmio.h> ··· 187 186 }; 188 187 189 188 /* TPU LED */ 190 - static struct led_renesas_tpu_config led_renesas_tpu12_pdata = { 191 - .name = "V2513", 192 - .pin_gpio_fn = GPIO_FN_TPU1TO2, 193 - .pin_gpio = 153, 194 - .channel_offset = 0x90, 195 - .timer_bit = 2, 196 - .max_brightness = 1000, 197 - }; 198 - 199 - static struct resource tpu12_resources[] = { 189 + static struct resource tpu1_pwm_resources[] = { 200 190 [0] = { 201 - .name = "TPU12", 202 - .start = 0xe6610090, 203 - .end = 0xe66100b5, 191 + .start = 0xe6610000, 192 + .end = 0xe66100ff, 204 193 .flags = IORESOURCE_MEM, 205 194 }, 206 195 }; 207 196 208 - static struct platform_device leds_tpu12_device = { 209 - .name = "leds-renesas-tpu", 210 - .id = 12, 211 - .dev = { 212 - .platform_data = &led_renesas_tpu12_pdata, 213 - }, 214 - .num_resources = ARRAY_SIZE(tpu12_resources), 215 - .resource = tpu12_resources, 197 + static struct platform_device tpu1_pwm_device = { 198 + .name = "renesas-tpu-pwm", 199 + .id = 1, 200 + .num_resources = ARRAY_SIZE(tpu1_pwm_resources), 201 + .resource = tpu1_pwm_resources, 216 202 }; 217 203 218 - static struct led_renesas_tpu_config led_renesas_tpu41_pdata = { 219 - .name = "V2514", 220 - .pin_gpio_fn = GPIO_FN_TPU4TO1, 221 - .pin_gpio = 199, 222 - .channel_offset = 0x50, 223 - .timer_bit = 1, 224 - .max_brightness = 1000, 225 - }; 226 - 227 - static struct resource tpu41_resources[] = { 204 + static struct resource tpu2_pwm_resources[] = { 228 205 [0] = { 229 - .name = "TPU41", 230 - .start = 0xe6640050, 231 - .end = 0xe6640075, 206 + .start = 0xe6620000, 207 + .end = 0xe66200ff, 232 208 .flags = IORESOURCE_MEM, 233 209 }, 234 210 }; 235 211 236 - static struct platform_device leds_tpu41_device = { 237 - .name = "leds-renesas-tpu", 238 - .id = 41, 239 - .dev = { 240 - .platform_data = &led_renesas_tpu41_pdata, 241 - }, 242 - .num_resources = ARRAY_SIZE(tpu41_resources), 243 - .resource = tpu41_resources, 212 + static struct platform_device tpu2_pwm_device = { 213 + .name = "renesas-tpu-pwm", 214 + .id = 2, 215 + .num_resources = ARRAY_SIZE(tpu2_pwm_resources), 216 + .resource = tpu2_pwm_resources, 244 217 }; 245 218 246 - static struct led_renesas_tpu_config led_renesas_tpu21_pdata = { 247 - .name = "V2515", 248 - .pin_gpio_fn = GPIO_FN_TPU2TO1, 249 - .pin_gpio = 197, 250 - .channel_offset = 0x50, 251 - .timer_bit = 1, 252 - .max_brightness = 1000, 253 - }; 254 - 255 - static struct resource tpu21_resources[] = { 219 + static struct resource tpu3_pwm_resources[] = { 256 220 [0] = { 257 - .name = "TPU21", 258 - .start = 0xe6620050, 259 - .end = 0xe6620075, 221 + .start = 0xe6630000, 222 + .end = 0xe66300ff, 260 223 .flags = IORESOURCE_MEM, 261 224 }, 262 225 }; 263 226 264 - static struct platform_device leds_tpu21_device = { 265 - .name = "leds-renesas-tpu", 266 - .id = 21, 267 - .dev = { 268 - .platform_data = &led_renesas_tpu21_pdata, 269 - }, 270 - .num_resources = ARRAY_SIZE(tpu21_resources), 271 - .resource = tpu21_resources, 227 + static struct platform_device tpu3_pwm_device = { 228 + .name = "renesas-tpu-pwm", 229 + .id = 3, 230 + .num_resources = ARRAY_SIZE(tpu3_pwm_resources), 231 + .resource = tpu3_pwm_resources, 272 232 }; 273 233 274 - static struct led_renesas_tpu_config led_renesas_tpu30_pdata = { 275 - .name = "KEYLED", 276 - .pin_gpio_fn = GPIO_FN_TPU3TO0, 277 - .pin_gpio = 163, 278 - .channel_offset = 0x10, 279 - .timer_bit = 0, 280 - .max_brightness = 1000, 281 - }; 282 - 283 - static struct resource tpu30_resources[] = { 234 + static struct resource tpu4_pwm_resources[] = { 284 235 [0] = { 285 - .name = "TPU30", 286 - .start = 0xe6630010, 287 - .end = 0xe6630035, 236 + .start = 0xe6640000, 237 + .end = 0xe66400ff, 288 238 .flags = IORESOURCE_MEM, 289 239 }, 290 240 }; 291 241 292 - static struct platform_device leds_tpu30_device = { 293 - .name = "leds-renesas-tpu", 294 - .id = 30, 295 - .dev = { 296 - .platform_data = &led_renesas_tpu30_pdata, 242 + static struct platform_device tpu4_pwm_device = { 243 + .name = "renesas-tpu-pwm", 244 + .id = 4, 245 + .num_resources = ARRAY_SIZE(tpu4_pwm_resources), 246 + .resource = tpu4_pwm_resources, 247 + }; 248 + 249 + static struct pwm_lookup pwm_lookup[] = { 250 + PWM_LOOKUP("renesas-tpu-pwm.1", 2, "leds-pwm.0", "V2513"), 251 + PWM_LOOKUP("renesas-tpu-pwm.2", 1, "leds-pwm.0", "V2515"), 252 + PWM_LOOKUP("renesas-tpu-pwm.3", 0, "leds-pwm.0", "KEYLED"), 253 + PWM_LOOKUP("renesas-tpu-pwm.4", 1, "leds-pwm.0", "V2514"), 254 + }; 255 + 256 + static struct led_pwm tpu_pwm_leds[] = { 257 + { 258 + .name = "V2513", 259 + .max_brightness = 1000, 260 + }, { 261 + .name = "V2515", 262 + .max_brightness = 1000, 263 + }, { 264 + .name = "KEYLED", 265 + .max_brightness = 1000, 266 + }, { 267 + .name = "V2514", 268 + .max_brightness = 1000, 297 269 }, 298 - .num_resources = ARRAY_SIZE(tpu30_resources), 299 - .resource = tpu30_resources, 270 + }; 271 + 272 + static struct led_pwm_platform_data leds_pwm_pdata = { 273 + .num_leds = ARRAY_SIZE(tpu_pwm_leds), 274 + .leds = tpu_pwm_leds, 275 + }; 276 + 277 + static struct platform_device leds_pwm_device = { 278 + .name = "leds-pwm", 279 + .id = 0, 280 + .dev = { 281 + .platform_data = &leds_pwm_pdata, 282 + }, 300 283 }; 301 284 302 285 /* Fixed 1.8V regulator to be used by MMCIF */ ··· 411 426 &keysc_device, 412 427 &gpio_keys_device, 413 428 &gpio_leds_device, 414 - &leds_tpu12_device, 415 - &leds_tpu41_device, 416 - &leds_tpu21_device, 417 - &leds_tpu30_device, 429 + &tpu1_pwm_device, 430 + &tpu2_pwm_device, 431 + &tpu3_pwm_device, 432 + &tpu4_pwm_device, 433 + &leds_pwm_device, 418 434 &mmcif_device, 419 435 &sdhi0_device, 420 436 &sdhi1_device, ··· 498 512 "bsc_cs5_a", "bsc"), 499 513 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x.0", "pfc-sh73a0", 500 514 "bsc_we0", "bsc"), 515 + /* TPU */ 516 + PIN_MAP_MUX_GROUP_DEFAULT("renesas-tpu-pwm.1", "pfc-sh73a0", 517 + "tpu1_to2", "tpu1"), 518 + PIN_MAP_MUX_GROUP_DEFAULT("renesas-tpu-pwm.2", "pfc-sh73a0", 519 + "tpu2_to1", "tpu2"), 520 + PIN_MAP_MUX_GROUP_DEFAULT("renesas-tpu-pwm.3", "pfc-sh73a0", 521 + "tpu3_to0", "tpu3"), 522 + PIN_MAP_MUX_GROUP_DEFAULT("renesas-tpu-pwm.4", "pfc-sh73a0", 523 + "tpu4_to1", "tpu4"), 501 524 }; 502 525 503 526 static void __init kota2_init(void) ··· 519 524 520 525 pinctrl_register_mappings(kota2_pinctrl_map, 521 526 ARRAY_SIZE(kota2_pinctrl_map)); 527 + pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); 528 + 522 529 sh73a0_pinmux_init(); 523 530 524 531 /* SMSC911X */
+60
arch/arm/mach-shmobile/board-lager.c
··· 24 24 #include <linux/interrupt.h> 25 25 #include <linux/kernel.h> 26 26 #include <linux/leds.h> 27 + #include <linux/mmc/host.h> 28 + #include <linux/mmc/sh_mmcif.h> 27 29 #include <linux/pinctrl/machine.h> 28 30 #include <linux/platform_data/gpio-rcar.h> 29 31 #include <linux/platform_device.h> 32 + #include <linux/regulator/fixed.h> 33 + #include <linux/regulator/machine.h> 34 + #include <linux/sh_eth.h> 30 35 #include <mach/common.h> 36 + #include <mach/irqs.h> 31 37 #include <mach/r8a7790.h> 32 38 #include <asm/mach-types.h> 33 39 #include <asm/mach/arch.h> ··· 76 70 .nbuttons = ARRAY_SIZE(gpio_buttons), 77 71 }; 78 72 73 + /* Fixed 3.3V regulator to be used by MMCIF */ 74 + static struct regulator_consumer_supply fixed3v3_power_consumers[] = 75 + { 76 + REGULATOR_SUPPLY("vmmc", "sh_mmcif.1"), 77 + }; 78 + 79 + /* MMCIF */ 80 + static struct sh_mmcif_plat_data mmcif1_pdata __initdata = { 81 + .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, 82 + }; 83 + 84 + static struct resource mmcif1_resources[] __initdata = { 85 + DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"), 86 + DEFINE_RES_IRQ(gic_spi(170)), 87 + }; 88 + 89 + /* Ether */ 90 + static struct sh_eth_plat_data ether_pdata __initdata = { 91 + .phy = 0x1, 92 + .edmac_endian = EDMAC_LITTLE_ENDIAN, 93 + .register_type = SH_ETH_REG_FAST_RCAR, 94 + .phy_interface = PHY_INTERFACE_MODE_RMII, 95 + .ether_link_active_low = 1, 96 + }; 97 + 98 + static struct resource ether_resources[] __initdata = { 99 + DEFINE_RES_MEM(0xee700000, 0x400), 100 + DEFINE_RES_IRQ(gic_spi(162)), 101 + }; 102 + 79 103 static const struct pinctrl_map lager_pinctrl_map[] = { 80 104 /* SCIF0 (CN19: DEBUG SERIAL0) */ 81 105 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", ··· 113 77 /* SCIF1 (CN20: DEBUG SERIAL1) */ 114 78 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", 115 79 "scif1_data", "scif1"), 80 + /* MMCIF1 */ 81 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", 82 + "mmc1_data8", "mmc1"), 83 + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", 84 + "mmc1_ctrl", "mmc1"), 85 + /* Ether */ 86 + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", 87 + "eth_link", "eth"), 88 + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", 89 + "eth_mdio", "eth"), 90 + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", 91 + "eth_rmii", "eth"), 92 + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", 93 + "intc_irq0", "intc"), 116 94 }; 117 95 118 96 static void __init lager_add_standard_devices(void) ··· 144 94 platform_device_register_data(&platform_bus, "gpio-keys", -1, 145 95 &lager_keys_pdata, 146 96 sizeof(lager_keys_pdata)); 97 + regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, 98 + ARRAY_SIZE(fixed3v3_power_consumers), 3300000); 99 + platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, 100 + mmcif1_resources, ARRAY_SIZE(mmcif1_resources), 101 + &mmcif1_pdata, sizeof(mmcif1_pdata)); 102 + 103 + platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, 104 + ether_resources, 105 + ARRAY_SIZE(ether_resources), 106 + &ether_pdata, sizeof(ether_pdata)); 147 107 } 148 108 149 109 static const char *lager_boards_compat_dt[] __initdata = {
+17 -17
arch/arm/mach-shmobile/board-mackerel.c
··· 41 41 #include <linux/mtd/physmap.h> 42 42 #include <linux/mtd/sh_flctl.h> 43 43 #include <linux/pinctrl/machine.h> 44 + #include <linux/platform_data/gpio_backlight.h> 44 45 #include <linux/pm_clock.h> 45 46 #include <linux/regulator/fixed.h> 46 47 #include <linux/regulator/machine.h> ··· 50 49 #include <linux/tca6416_keypad.h> 51 50 #include <linux/usb/renesas_usbhs.h> 52 51 #include <linux/dma-mapping.h> 53 - 54 52 #include <video/sh_mobile_hdmi.h> 55 53 #include <video/sh_mobile_lcdc.h> 56 54 #include <media/sh_mobile_ceu.h> ··· 346 346 }, 347 347 }; 348 348 349 - /* LCDC */ 349 + /* LCDC and backlight */ 350 350 static struct fb_videomode mackerel_lcdc_modes[] = { 351 351 { 352 352 .name = "WVGA Panel", ··· 361 361 .sync = 0, 362 362 }, 363 363 }; 364 - 365 - static int mackerel_set_brightness(int brightness) 366 - { 367 - gpio_set_value(31, brightness); 368 - 369 - return 0; 370 - } 371 364 372 365 static const struct sh_mobile_meram_cfg lcd_meram_cfg = { 373 366 .icb[0] = { ··· 386 393 .width = 152, 387 394 .height = 91, 388 395 }, 389 - .bl_info = { 390 - .name = "sh_mobile_lcdc_bl", 391 - .max_brightness = 1, 392 - .set_brightness = mackerel_set_brightness, 393 - }, 394 396 .meram_cfg = &lcd_meram_cfg, 395 397 } 396 398 }; ··· 410 422 .dev = { 411 423 .platform_data = &lcdc_info, 412 424 .coherent_dma_mask = ~0, 425 + }, 426 + }; 427 + 428 + static struct gpio_backlight_platform_data gpio_backlight_data = { 429 + .fbdev = &lcdc_device.dev, 430 + .gpio = 31, 431 + .def_value = 1, 432 + .name = "backlight", 433 + }; 434 + 435 + static struct platform_device gpio_backlight_device = { 436 + .name = "gpio-backlight", 437 + .dev = { 438 + .platform_data = &gpio_backlight_data, 413 439 }, 414 440 }; 415 441 ··· 1233 1231 &nor_flash_device, 1234 1232 &smc911x_device, 1235 1233 &lcdc_device, 1234 + &gpio_backlight_device, 1236 1235 &usbhs0_device, 1237 1236 &usbhs1_device, 1238 1237 &leds_device, ··· 1443 1440 pinctrl_register_mappings(mackerel_pinctrl_map, 1444 1441 ARRAY_SIZE(mackerel_pinctrl_map)); 1445 1442 sh7372_pinmux_init(); 1446 - 1447 - /* backlight, off by default */ 1448 - gpio_request_one(31, GPIOF_OUT_INIT_LOW, NULL); 1449 1443 1450 1444 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1451 1445
+7 -5
arch/arm/mach-shmobile/clock-sh73a0.c
··· 555 555 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, 556 556 MSTP331, MSTP329, MSTP328, MSTP325, MSTP323, MSTP322, 557 557 MSTP314, MSTP313, MSTP312, MSTP311, 558 - MSTP303, MSTP302, MSTP301, MSTP300, 558 + MSTP304, MSTP303, MSTP302, MSTP301, MSTP300, 559 559 MSTP411, MSTP410, MSTP403, 560 560 MSTP_NR }; 561 561 ··· 593 593 [MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */ 594 594 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ 595 595 [MSTP311] = MSTP(&div6_clks[DIV6_SDHI2], SMSTPCR3, 11, 0), /* SDHI2 */ 596 + [MSTP304] = MSTP(&main_div2_clk, SMSTPCR3, 4, 0), /* TPU0 */ 596 597 [MSTP303] = MSTP(&main_div2_clk, SMSTPCR3, 3, 0), /* TPU1 */ 597 598 [MSTP302] = MSTP(&main_div2_clk, SMSTPCR3, 2, 0), /* TPU2 */ 598 599 [MSTP301] = MSTP(&main_div2_clk, SMSTPCR3, 1, 0), /* TPU3 */ ··· 670 669 CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMCIF0 */ 671 670 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */ 672 671 CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP311]), /* SDHI2 */ 673 - CLKDEV_DEV_ID("leds-renesas-tpu.12", &mstp_clks[MSTP303]), /* TPU1 */ 674 - CLKDEV_DEV_ID("leds-renesas-tpu.21", &mstp_clks[MSTP302]), /* TPU2 */ 675 - CLKDEV_DEV_ID("leds-renesas-tpu.30", &mstp_clks[MSTP301]), /* TPU3 */ 676 - CLKDEV_DEV_ID("leds-renesas-tpu.41", &mstp_clks[MSTP300]), /* TPU4 */ 672 + CLKDEV_DEV_ID("renesas-tpu-pwm.0", &mstp_clks[MSTP304]), /* TPU0 */ 673 + CLKDEV_DEV_ID("renesas-tpu-pwm.1", &mstp_clks[MSTP303]), /* TPU1 */ 674 + CLKDEV_DEV_ID("renesas-tpu-pwm.2", &mstp_clks[MSTP302]), /* TPU2 */ 675 + CLKDEV_DEV_ID("renesas-tpu-pwm.3", &mstp_clks[MSTP301]), /* TPU3 */ 676 + CLKDEV_DEV_ID("renesas-tpu-pwm.4", &mstp_clks[MSTP300]), /* TPU4 */ 677 677 CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ 678 678 CLKDEV_DEV_ID("e6826000.i2c", &mstp_clks[MSTP411]), /* I2C3 */ 679 679 CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */
+1 -372
arch/arm/mach-shmobile/include/mach/sh73a0.h
··· 1 1 #ifndef __ASM_SH73A0_H__ 2 2 #define __ASM_SH73A0_H__ 3 3 4 - /* Pin Function Controller: 5 - * GPIO_FN_xx - GPIO used to select pin function and MSEL switch 6 - * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU 7 - */ 8 - enum { 9 - /* Hardware manual Table 25-1 (GPIO) */ 10 - GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, 11 - GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, 12 - 13 - GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, 14 - GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, 15 - 16 - GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, 17 - GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, 18 - 19 - GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, 20 - GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, 21 - 22 - GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, 23 - GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, 24 - 25 - GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, 26 - GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, 27 - 28 - GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, 29 - GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, 30 - 31 - GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, 32 - GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, 33 - 34 - GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, 35 - GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, 36 - 37 - GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, 38 - GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, 39 - 40 - GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, 41 - GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, 42 - 43 - GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, 44 - GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, 45 - 46 - GPIO_PORT128, GPIO_PORT129, 47 - 48 - GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, 49 - GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, 50 - 51 - GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, 52 - GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, 53 - 54 - GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, 55 - GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, 56 - 57 - GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, 58 - 59 - GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, 60 - GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, 61 - 62 - GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, 63 - GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, 64 - 65 - GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, 66 - GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, 67 - 68 - GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, 69 - GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, 70 - 71 - GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, 72 - GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, 73 - 74 - GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, 75 - GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, 76 - 77 - GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, 78 - GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, 79 - 80 - GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, 81 - GPIO_PORT265, GPIO_PORT266, GPIO_PORT267, GPIO_PORT268, GPIO_PORT269, 82 - 83 - GPIO_PORT270, GPIO_PORT271, GPIO_PORT272, GPIO_PORT273, GPIO_PORT274, 84 - GPIO_PORT275, GPIO_PORT276, GPIO_PORT277, GPIO_PORT278, GPIO_PORT279, 85 - 86 - GPIO_PORT280, GPIO_PORT281, GPIO_PORT282, 87 - 88 - GPIO_PORT288, GPIO_PORT289, 89 - 90 - GPIO_PORT290, GPIO_PORT291, GPIO_PORT292, GPIO_PORT293, GPIO_PORT294, 91 - GPIO_PORT295, GPIO_PORT296, GPIO_PORT297, GPIO_PORT298, GPIO_PORT299, 92 - 93 - GPIO_PORT300, GPIO_PORT301, GPIO_PORT302, GPIO_PORT303, GPIO_PORT304, 94 - GPIO_PORT305, GPIO_PORT306, GPIO_PORT307, GPIO_PORT308, GPIO_PORT309, 95 - 96 - /* Table 25-1 (Function 0-7) */ 97 - GPIO_FN_GPI0 = 310, 98 - GPIO_FN_GPI1, 99 - GPIO_FN_GPI2, 100 - GPIO_FN_GPI3, 101 - GPIO_FN_GPI4, 102 - GPIO_FN_GPI5, 103 - GPIO_FN_GPI6, 104 - GPIO_FN_GPI7, 105 - GPIO_FN_GPO7, GPIO_FN_MFG0_OUT2, 106 - GPIO_FN_GPO6, GPIO_FN_MFG1_OUT2, 107 - GPIO_FN_GPO5, 108 - GPIO_FN_PORT16_VIO_CKOR, 109 - GPIO_FN_PORT19_VIO_CKO2, 110 - GPIO_FN_GPO0, 111 - GPIO_FN_GPO1, 112 - GPIO_FN_GPO2, GPIO_FN_STATUS0, 113 - GPIO_FN_GPO3, GPIO_FN_STATUS1, 114 - GPIO_FN_GPO4, GPIO_FN_STATUS2, 115 - GPIO_FN_VINT, 116 - GPIO_FN_TCKON, 117 - GPIO_FN_XDVFS1, 118 - GPIO_FN_MFG0_OUT1, GPIO_FN_PORT27_IROUT, 119 - GPIO_FN_XDVFS2, 120 - GPIO_FN_PORT28_TPU1TO1, 121 - GPIO_FN_SIM_RST, GPIO_FN_PORT29_TPU1TO1, 122 - GPIO_FN_SIM_CLK, GPIO_FN_PORT30_VIO_CKOR, 123 - GPIO_FN_SIM_D, GPIO_FN_PORT31_IROUT, 124 - GPIO_FN_XWUP, 125 - GPIO_FN_VACK, 126 - GPIO_FN_XTAL1L, 127 - GPIO_FN_PORT49_IROUT, 128 - GPIO_FN_BBIF2_TSYNC2, GPIO_FN_TPU2TO2, 129 - 130 - GPIO_FN_BBIF2_TSCK2, GPIO_FN_TPU2TO3, 131 - GPIO_FN_BBIF2_TXD2, 132 - GPIO_FN_TPU3TO3, 133 - GPIO_FN_TPU3TO2, 134 - GPIO_FN_TPU0TO0, 135 - GPIO_FN_A0, GPIO_FN_BS_, 136 - GPIO_FN_A12, GPIO_FN_TPU4TO2, 137 - GPIO_FN_A13, GPIO_FN_TPU0TO1, 138 - GPIO_FN_A14, 139 - GPIO_FN_A15, 140 - GPIO_FN_A16, GPIO_FN_MSIOF0_SS1, 141 - GPIO_FN_A17, GPIO_FN_MSIOF0_TSYNC, 142 - GPIO_FN_A18, GPIO_FN_MSIOF0_TSCK, 143 - GPIO_FN_A19, GPIO_FN_MSIOF0_TXD, 144 - GPIO_FN_A20, GPIO_FN_MSIOF0_RSCK, 145 - GPIO_FN_A21, GPIO_FN_MSIOF0_RSYNC, 146 - GPIO_FN_A22, GPIO_FN_MSIOF0_MCK0, 147 - GPIO_FN_A23, GPIO_FN_MSIOF0_MCK1, 148 - GPIO_FN_A24, GPIO_FN_MSIOF0_RXD, 149 - GPIO_FN_A25, GPIO_FN_MSIOF0_SS2, 150 - GPIO_FN_A26, 151 - GPIO_FN_FCE1_, 152 - GPIO_FN_DACK0, 153 - GPIO_FN_FCE0_, 154 - GPIO_FN_WAIT_, GPIO_FN_DREQ0, 155 - GPIO_FN_FRB, 156 - GPIO_FN_CKO, 157 - GPIO_FN_NBRSTOUT_, 158 - GPIO_FN_NBRST_, 159 - GPIO_FN_BBIF2_TXD, 160 - GPIO_FN_BBIF2_RXD, 161 - GPIO_FN_BBIF2_SYNC, 162 - GPIO_FN_BBIF2_SCK, 163 - GPIO_FN_MFG3_IN2, 164 - GPIO_FN_MFG3_IN1, 165 - GPIO_FN_BBIF1_SS2, GPIO_FN_MFG3_OUT1, 166 - GPIO_FN_HSI_RX_DATA, GPIO_FN_BBIF1_RXD, 167 - GPIO_FN_HSI_TX_WAKE, GPIO_FN_BBIF1_TSCK, 168 - GPIO_FN_HSI_TX_DATA, GPIO_FN_BBIF1_TSYNC, 169 - GPIO_FN_HSI_TX_READY, GPIO_FN_BBIF1_TXD, 170 - GPIO_FN_HSI_RX_READY, GPIO_FN_BBIF1_RSCK, 171 - GPIO_FN_HSI_RX_WAKE, GPIO_FN_BBIF1_RSYNC, 172 - GPIO_FN_HSI_RX_FLAG, GPIO_FN_BBIF1_SS1, GPIO_FN_BBIF1_FLOW, 173 - GPIO_FN_HSI_TX_FLAG, 174 - GPIO_FN_VIO_VD, GPIO_FN_VIO2_VD, 175 - 176 - GPIO_FN_VIO_HD, 177 - GPIO_FN_VIO2_HD, 178 - GPIO_FN_VIO_D0, GPIO_FN_PORT130_MSIOF2_RXD, 179 - GPIO_FN_VIO_D1, GPIO_FN_PORT131_MSIOF2_SS1, 180 - GPIO_FN_VIO_D2, GPIO_FN_PORT132_MSIOF2_SS2, 181 - GPIO_FN_VIO_D3, GPIO_FN_MSIOF2_TSYNC, 182 - GPIO_FN_VIO_D4, GPIO_FN_MSIOF2_TXD, 183 - GPIO_FN_VIO_D5, GPIO_FN_MSIOF2_TSCK, 184 - GPIO_FN_VIO_D6, 185 - GPIO_FN_VIO_D7, 186 - GPIO_FN_VIO_D8, GPIO_FN_VIO2_D0, 187 - GPIO_FN_VIO_D9, GPIO_FN_VIO2_D1, 188 - GPIO_FN_VIO_D10, GPIO_FN_TPU0TO2, GPIO_FN_VIO2_D2, 189 - GPIO_FN_VIO_D11, GPIO_FN_TPU0TO3, GPIO_FN_VIO2_D3, 190 - GPIO_FN_VIO_D12, GPIO_FN_VIO2_D4, 191 - GPIO_FN_VIO_D13, 192 - GPIO_FN_VIO2_D5, 193 - GPIO_FN_VIO_D14, GPIO_FN_VIO2_D6, 194 - GPIO_FN_VIO_D15, GPIO_FN_TPU1TO3, 195 - GPIO_FN_VIO2_D7, 196 - GPIO_FN_VIO_CLK, 197 - GPIO_FN_VIO2_CLK, 198 - GPIO_FN_VIO_FIELD, GPIO_FN_VIO2_FIELD, 199 - GPIO_FN_VIO_CKO, 200 - GPIO_FN_A27, GPIO_FN_MFG0_IN1, 201 - GPIO_FN_MFG0_IN2, 202 - GPIO_FN_TS_SPSYNC3, GPIO_FN_MSIOF2_RSCK, 203 - GPIO_FN_TS_SDAT3, GPIO_FN_MSIOF2_RSYNC, 204 - GPIO_FN_TPU1TO2, GPIO_FN_TS_SDEN3, GPIO_FN_PORT153_MSIOF2_SS1, 205 - GPIO_FN_MSIOF2_MCK0, 206 - GPIO_FN_MSIOF2_MCK1, 207 - GPIO_FN_PORT156_MSIOF2_SS2, 208 - GPIO_FN_PORT157_MSIOF2_RXD, 209 - GPIO_FN_DINT_, GPIO_FN_TS_SCK3, 210 - GPIO_FN_NMI, 211 - GPIO_FN_TPU3TO0, 212 - GPIO_FN_BBIF2_TSYNC1, 213 - GPIO_FN_BBIF2_TSCK1, 214 - GPIO_FN_BBIF2_TXD1, 215 - GPIO_FN_MFG2_OUT2, 216 - GPIO_FN_TPU2TO1, 217 - GPIO_FN_TPU4TO1, GPIO_FN_MFG4_OUT2, 218 - GPIO_FN_D16, 219 - GPIO_FN_D17, 220 - GPIO_FN_D18, 221 - GPIO_FN_D19, 222 - GPIO_FN_D20, 223 - GPIO_FN_D21, 224 - GPIO_FN_D22, 225 - GPIO_FN_PORT207_MSIOF0L_SS1, GPIO_FN_D23, 226 - GPIO_FN_PORT208_MSIOF0L_SS2, GPIO_FN_D24, 227 - GPIO_FN_D25, 228 - GPIO_FN_DREQ2, GPIO_FN_PORT210_MSIOF0L_SS1, GPIO_FN_D26, 229 - GPIO_FN_PORT211_MSIOF0L_SS2, GPIO_FN_D27, 230 - GPIO_FN_TS_SPSYNC1, GPIO_FN_MSIOF0L_MCK0, GPIO_FN_D28, 231 - GPIO_FN_TS_SDAT1, GPIO_FN_MSIOF0L_MCK1, GPIO_FN_D29, 232 - GPIO_FN_TS_SDEN1, GPIO_FN_MSIOF0L_RSCK, GPIO_FN_D30, 233 - GPIO_FN_TS_SCK1, GPIO_FN_MSIOF0L_RSYNC, GPIO_FN_D31, 234 - GPIO_FN_DACK2, 235 - GPIO_FN_MSIOF0L_TSYNC, GPIO_FN_VIO2_FIELD3, 236 - GPIO_FN_DACK3, 237 - GPIO_FN_PORT218_VIO_CKOR, 238 - GPIO_FN_DREQ3, GPIO_FN_MSIOF0L_TSCK, GPIO_FN_VIO2_CLK3, \ 239 - GPIO_FN_DREQ1, 240 - GPIO_FN_PWEN, GPIO_FN_MSIOF0L_RXD, GPIO_FN_VIO2_HD3, \ 241 - GPIO_FN_DACK1, GPIO_FN_OVCN, 242 - GPIO_FN_MSIOF0L_TXD, GPIO_FN_VIO2_VD3, 243 - 244 - GPIO_FN_OVCN2, 245 - GPIO_FN_EXTLP, GPIO_FN_PORT226_VIO_CKO2, 246 - GPIO_FN_IDIN, 247 - GPIO_FN_MFG1_IN1, 248 - GPIO_FN_MSIOF1_TXD, 249 - GPIO_FN_MSIOF1_TSYNC, 250 - GPIO_FN_MSIOF1_TSCK, 251 - GPIO_FN_MSIOF1_RXD, 252 - GPIO_FN_MSIOF1_RSCK, GPIO_FN_VIO2_CLK2, 253 - GPIO_FN_MSIOF1_RSYNC, GPIO_FN_MFG1_IN2, GPIO_FN_VIO2_VD2, \ 254 - GPIO_FN_MSIOF1_MCK0, 255 - GPIO_FN_MSIOF1_MCK1, 256 - GPIO_FN_MSIOF1_SS1, GPIO_FN_VIO2_FIELD2, 257 - GPIO_FN_MSIOF1_SS2, GPIO_FN_VIO2_HD2, 258 - GPIO_FN_PORT241_IROUT, GPIO_FN_MFG4_OUT1, \ 259 - GPIO_FN_TPU4TO0, 260 - GPIO_FN_MFG4_IN2, 261 - GPIO_FN_PORT243_VIO_CKO2, 262 - GPIO_FN_MFG2_IN1, 263 - GPIO_FN_MSIOF2R_RXD, 264 - GPIO_FN_MFG2_IN2, 265 - GPIO_FN_MSIOF2R_TXD, 266 - GPIO_FN_MFG1_OUT1, 267 - GPIO_FN_TPU1TO0, 268 - GPIO_FN_MFG3_OUT2, 269 - GPIO_FN_TPU3TO1, 270 - GPIO_FN_MFG2_OUT1, 271 - GPIO_FN_TPU2TO0, 272 - GPIO_FN_MSIOF2R_TSCK, 273 - GPIO_FN_PORT249_IROUT, GPIO_FN_MFG4_IN1, \ 274 - GPIO_FN_MSIOF2R_TSYNC, 275 - GPIO_FN_SDHICLK0, 276 - GPIO_FN_SDHICD0, 277 - GPIO_FN_SDHID0_0, 278 - GPIO_FN_SDHID0_1, 279 - GPIO_FN_SDHID0_2, 280 - GPIO_FN_SDHID0_3, 281 - GPIO_FN_SDHICMD0, 282 - GPIO_FN_SDHIWP0, 283 - GPIO_FN_SDHICLK1, 284 - GPIO_FN_SDHID1_0, GPIO_FN_TS_SPSYNC2, 285 - GPIO_FN_SDHID1_1, GPIO_FN_TS_SDAT2, 286 - GPIO_FN_SDHID1_2, GPIO_FN_TS_SDEN2, 287 - GPIO_FN_SDHID1_3, GPIO_FN_TS_SCK2, 288 - GPIO_FN_SDHICMD1, 289 - GPIO_FN_SDHICLK2, 290 - GPIO_FN_SDHID2_0, GPIO_FN_TS_SPSYNC4, 291 - GPIO_FN_SDHID2_1, GPIO_FN_TS_SDAT4, 292 - GPIO_FN_SDHID2_2, GPIO_FN_TS_SDEN4, 293 - GPIO_FN_SDHID2_3, GPIO_FN_TS_SCK4, 294 - GPIO_FN_SDHICMD2, 295 - GPIO_FN_MMCCLK0, 296 - GPIO_FN_MMCD0_0, 297 - GPIO_FN_MMCD0_1, 298 - GPIO_FN_MMCD0_2, 299 - GPIO_FN_MMCD0_3, 300 - GPIO_FN_MMCD0_4, GPIO_FN_TS_SPSYNC5, 301 - GPIO_FN_MMCD0_5, GPIO_FN_TS_SDAT5, 302 - GPIO_FN_MMCD0_6, GPIO_FN_TS_SDEN5, 303 - GPIO_FN_MMCD0_7, GPIO_FN_TS_SCK5, 304 - GPIO_FN_MMCCMD0, 305 - GPIO_FN_RESETOUTS_, GPIO_FN_EXTAL2OUT, 306 - GPIO_FN_MCP_WAIT__MCP_FRB, 307 - GPIO_FN_MCP_CKO, GPIO_FN_MMCCLK1, 308 - GPIO_FN_MCP_D15_MCP_NAF15, 309 - GPIO_FN_MCP_D14_MCP_NAF14, 310 - GPIO_FN_MCP_D13_MCP_NAF13, 311 - GPIO_FN_MCP_D12_MCP_NAF12, 312 - GPIO_FN_MCP_D11_MCP_NAF11, 313 - GPIO_FN_MCP_D10_MCP_NAF10, 314 - GPIO_FN_MCP_D9_MCP_NAF9, 315 - GPIO_FN_MCP_D8_MCP_NAF8, GPIO_FN_MMCCMD1, 316 - GPIO_FN_MCP_D7_MCP_NAF7, GPIO_FN_MMCD1_7, 317 - 318 - GPIO_FN_MCP_D6_MCP_NAF6, GPIO_FN_MMCD1_6, 319 - GPIO_FN_MCP_D5_MCP_NAF5, GPIO_FN_MMCD1_5, 320 - GPIO_FN_MCP_D4_MCP_NAF4, GPIO_FN_MMCD1_4, 321 - GPIO_FN_MCP_D3_MCP_NAF3, GPIO_FN_MMCD1_3, 322 - GPIO_FN_MCP_D2_MCP_NAF2, GPIO_FN_MMCD1_2, 323 - GPIO_FN_MCP_D1_MCP_NAF1, GPIO_FN_MMCD1_1, 324 - GPIO_FN_MCP_D0_MCP_NAF0, GPIO_FN_MMCD1_0, 325 - GPIO_FN_MCP_NBRSTOUT_, 326 - GPIO_FN_MCP_WE0__MCP_FWE, GPIO_FN_MCP_RDWR_MCP_FWE, 327 - 328 - /* MSEL2 special case */ 329 - GPIO_FN_TSIF2_TS_XX1, 330 - GPIO_FN_TSIF2_TS_XX2, 331 - GPIO_FN_TSIF2_TS_XX3, 332 - GPIO_FN_TSIF2_TS_XX4, 333 - GPIO_FN_TSIF2_TS_XX5, 334 - GPIO_FN_TSIF1_TS_XX1, 335 - GPIO_FN_TSIF1_TS_XX2, 336 - GPIO_FN_TSIF1_TS_XX3, 337 - GPIO_FN_TSIF1_TS_XX4, 338 - GPIO_FN_TSIF1_TS_XX5, 339 - GPIO_FN_TSIF0_TS_XX1, 340 - GPIO_FN_TSIF0_TS_XX2, 341 - GPIO_FN_TSIF0_TS_XX3, 342 - GPIO_FN_TSIF0_TS_XX4, 343 - GPIO_FN_TSIF0_TS_XX5, 344 - GPIO_FN_MST1_TS_XX1, 345 - GPIO_FN_MST1_TS_XX2, 346 - GPIO_FN_MST1_TS_XX3, 347 - GPIO_FN_MST1_TS_XX4, 348 - GPIO_FN_MST1_TS_XX5, 349 - GPIO_FN_MST0_TS_XX1, 350 - GPIO_FN_MST0_TS_XX2, 351 - GPIO_FN_MST0_TS_XX3, 352 - GPIO_FN_MST0_TS_XX4, 353 - GPIO_FN_MST0_TS_XX5, 354 - 355 - /* MSEL3 special cases */ 356 - GPIO_FN_SDHI0_VCCQ_MC0_ON, 357 - GPIO_FN_SDHI0_VCCQ_MC0_OFF, 358 - GPIO_FN_DEBUG_MON_VIO, 359 - GPIO_FN_DEBUG_MON_LCDD, 360 - GPIO_FN_LCDC_LCDC0, 361 - GPIO_FN_LCDC_LCDC1, 362 - 363 - /* MSEL4 special cases */ 364 - GPIO_FN_IRQ9_MEM_INT, 365 - GPIO_FN_IRQ9_MCP_INT, 366 - GPIO_FN_A11, 367 - GPIO_FN_TPU4TO3, 368 - GPIO_FN_RESETA_N_PU_ON, 369 - GPIO_FN_RESETA_N_PU_OFF, 370 - GPIO_FN_EDBGREQ_PD, 371 - GPIO_FN_EDBGREQ_PU, 372 - 373 - /* end of GPIO */ 374 - GPIO_NR, 375 - }; 4 + #define GPIO_NR 310 376 5 377 6 /* DMA slave IDs */ 378 7 enum {
+1 -1
arch/arm/plat-orion/irq.c
··· 47 47 do { 48 48 base = of_iomap(np, i); 49 49 if (base) { 50 - orion_irq_init(i * 32, base); 50 + orion_irq_init(i * 32, base + 0x04); 51 51 i++; 52 52 } 53 53 } while (base);
+20 -17
arch/sh/boards/mach-ecovec24/setup.c
··· 30 30 #include <linux/spi/mmc_spi.h> 31 31 #include <linux/input.h> 32 32 #include <linux/input/sh_keysc.h> 33 + #include <linux/platform_data/gpio_backlight.h> 33 34 #include <linux/sh_eth.h> 34 35 #include <linux/sh_intc.h> 35 36 #include <linux/videodev2.h> ··· 303 302 .resource = usbhs_resources, 304 303 }; 305 304 306 - /* LCDC */ 305 + /* LCDC and backlight */ 307 306 static const struct fb_videomode ecovec_lcd_modes[] = { 308 307 { 309 308 .name = "Panel", ··· 334 333 }, 335 334 }; 336 335 337 - static int ecovec24_set_brightness(int brightness) 338 - { 339 - gpio_set_value(GPIO_PTR1, brightness); 340 - 341 - return 0; 342 - } 343 - 344 336 static struct sh_mobile_lcdc_info lcdc_info = { 345 337 .ch[0] = { 346 338 .interface_type = RGB18, ··· 342 348 .panel_cfg = { /* 7.0 inch */ 343 349 .width = 152, 344 350 .height = 91, 345 - }, 346 - .bl_info = { 347 - .name = "sh_mobile_lcdc_bl", 348 - .max_brightness = 1, 349 - .set_brightness = ecovec24_set_brightness, 350 351 }, 351 352 } 352 353 }; ··· 365 376 .resource = lcdc_resources, 366 377 .dev = { 367 378 .platform_data = &lcdc_info, 379 + }, 380 + }; 381 + 382 + static struct gpio_backlight_platform_data gpio_backlight_data = { 383 + .fbdev = &lcdc_device.dev, 384 + .gpio = GPIO_PTR1, 385 + .def_value = 1, 386 + .name = "backlight", 387 + }; 388 + 389 + static struct platform_device gpio_backlight_device = { 390 + .name = "gpio-backlight", 391 + .dev = { 392 + .platform_data = &gpio_backlight_data, 368 393 }, 369 394 }; 370 395 ··· 1051 1048 &usb1_common_device, 1052 1049 &usbhs_device, 1053 1050 &lcdc_device, 1051 + &gpio_backlight_device, 1054 1052 &ceu0_device, 1055 1053 &ceu1_device, 1056 1054 &keysc_device, ··· 1242 1238 1243 1239 gpio_request(GPIO_PTE6, NULL); 1244 1240 gpio_request(GPIO_PTU1, NULL); 1245 - gpio_request(GPIO_PTR1, NULL); 1246 1241 gpio_request(GPIO_PTA2, NULL); 1247 1242 gpio_direction_input(GPIO_PTE6); 1248 1243 gpio_direction_output(GPIO_PTU1, 0); 1249 - gpio_direction_output(GPIO_PTR1, 0); 1250 1244 gpio_direction_output(GPIO_PTA2, 0); 1251 1245 1252 1246 /* I/O buffer drive ability is high */ ··· 1257 1255 lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes; 1258 1256 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes); 1259 1257 1258 + /* No backlight */ 1259 + gpio_backlight_data.fbdev = NULL; 1260 + 1260 1261 gpio_set_value(GPIO_PTA2, 1); 1261 1262 gpio_set_value(GPIO_PTU1, 1); 1262 1263 } else { ··· 1268 1263 lcdc_info.ch[0].clock_divider = 2; 1269 1264 lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes; 1270 1265 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes); 1271 - 1272 - gpio_set_value(GPIO_PTR1, 1); 1273 1266 1274 1267 /* FIXME 1275 1268 *
-48
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
··· 276 276 { 277 277 write_memory_start(sohandle, so); 278 278 } 279 - 280 - #define CTRL_CKSW 0x10 281 - #define CTRL_C10 0x20 282 - #define CTRL_CPSW 0x80 283 - #define MAIN_MLED4 0x40 284 - #define MAIN_MSW 0x80 285 - 286 - int kfr2r09_lcd_set_brightness(int brightness) 287 - { 288 - struct i2c_adapter *a; 289 - struct i2c_msg msg; 290 - unsigned char buf[2]; 291 - int ret; 292 - 293 - a = i2c_get_adapter(0); 294 - if (!a) 295 - return -ENODEV; 296 - 297 - buf[0] = 0x00; 298 - if (brightness) 299 - buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW; 300 - else 301 - buf[1] = 0; 302 - 303 - msg.addr = 0x75; 304 - msg.buf = buf; 305 - msg.len = 2; 306 - msg.flags = 0; 307 - ret = i2c_transfer(a, &msg, 1); 308 - if (ret != 1) 309 - return -ENODEV; 310 - 311 - buf[0] = 0x01; 312 - if (brightness) 313 - buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c; 314 - else 315 - buf[1] = 0; 316 - 317 - msg.addr = 0x75; 318 - msg.buf = buf; 319 - msg.len = 2; 320 - msg.flags = 0; 321 - ret = i2c_transfer(a, &msg, 1); 322 - if (ret != 1) 323 - return -ENODEV; 324 - 325 - return 0; 326 - }
+14 -5
arch/sh/boards/mach-kfr2r09/setup.c
··· 21 21 #include <linux/input.h> 22 22 #include <linux/input/sh_keysc.h> 23 23 #include <linux/i2c.h> 24 + #include <linux/platform_data/lv5207lp.h> 24 25 #include <linux/regulator/fixed.h> 25 26 #include <linux/regulator/machine.h> 26 27 #include <linux/usb/r8a66597.h> ··· 160 159 .setup_sys = kfr2r09_lcd_setup, 161 160 .start_transfer = kfr2r09_lcd_start, 162 161 }, 163 - .bl_info = { 164 - .name = "sh_mobile_lcdc_bl", 165 - .max_brightness = 1, 166 - .set_brightness = kfr2r09_lcd_set_brightness, 167 - }, 168 162 .sys_bus_cfg = { 169 163 .ldmt2r = 0x07010904, 170 164 .ldmt3r = 0x14012914, ··· 189 193 .dev = { 190 194 .platform_data = &kfr2r09_sh_lcdc_info, 191 195 }, 196 + }; 197 + 198 + static struct lv5207lp_platform_data kfr2r09_backlight_data = { 199 + .fbdev = &kfr2r09_sh_lcdc_device.dev, 200 + .def_value = 13, 201 + .max_value = 13, 202 + }; 203 + 204 + static struct i2c_board_info kfr2r09_backlight_board_info = { 205 + I2C_BOARD_INFO("lv5207lp", 0x75), 206 + .platform_data = &kfr2r09_backlight_data, 192 207 }; 193 208 194 209 static struct r8a66597_platdata kfr2r09_usb0_gadget_data = { ··· 633 626 gpio_request(GPIO_FN_SDHI0D0, NULL); 634 627 gpio_request(GPIO_FN_SDHI0CMD, NULL); 635 628 gpio_request(GPIO_FN_SDHI0CLK, NULL); 629 + 630 + i2c_register_board_info(0, &kfr2r09_backlight_board_info, 1); 636 631 637 632 return platform_add_devices(kfr2r09_devices, 638 633 ARRAY_SIZE(kfr2r09_devices));
-2
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
··· 4 4 #include <video/sh_mobile_lcdc.h> 5 5 6 6 #if defined(CONFIG_FB_SH_MOBILE_LCDC) || defined(CONFIG_FB_SH_MOBILE_LCDC_MODULE) 7 - int kfr2r09_lcd_set_brightness(int brightness); 8 7 int kfr2r09_lcd_setup(void *sys_ops_handle, 9 8 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 10 9 void kfr2r09_lcd_start(void *sys_ops_handle, 11 10 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 12 11 #else 13 - static int kfr2r09_lcd_set_brightness(int brightness) {} 14 12 static int kfr2r09_lcd_setup(void *sys_ops_handle, 15 13 struct sh_mobile_lcdc_sys_bus_ops *sys_ops) 16 14 {
+7 -1
drivers/clocksource/bcm_kona_timer.c
··· 99 99 } 100 100 101 101 static const struct of_device_id bcm_timer_ids[] __initconst = { 102 - {.compatible = "bcm,kona-timer"}, 102 + {.compatible = "brcm,kona-timer"}, 103 + {.compatible = "bcm,kona-timer"}, /* deprecated name */ 103 104 {}, 104 105 }; 105 106 ··· 202 201 kona_timer_set_next_event((arch_timer_rate / HZ), NULL); 203 202 } 204 203 204 + CLOCKSOURCE_OF_DECLARE(brcm_kona, "brcm,kona-timer", kona_timer_init); 205 + /* 206 + * bcm,kona-timer is deprecated by brcm,kona-timer 207 + * being kept here for driver compatibility 208 + */ 205 209 CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);
-12
drivers/leds/Kconfig
··· 429 429 cannot be used. This driver supports hardware blinking with an on+off 430 430 period from 62ms to 125s. Say Y to enable LEDs on the HP iPAQ hx4700. 431 431 432 - config LEDS_RENESAS_TPU 433 - bool "LED support for Renesas TPU" 434 - depends on LEDS_CLASS=y && HAVE_CLK && GPIOLIB 435 - help 436 - This option enables build of the LED TPU platform driver, 437 - suitable to drive any TPU channel on newer Renesas SoCs. 438 - The driver controls the GPIO pin connected to the LED via 439 - the GPIO framework and expects the LED to be connected to 440 - a pin that can be driven in both GPIO mode and using TPU 441 - pin function. The latter to support brightness control. 442 - Brightness control is supported but hardware blinking is not. 443 - 444 432 config LEDS_TCA6507 445 433 tristate "LED Support for TCA6507 I2C chip" 446 434 depends on LEDS_CLASS && I2C
-1
drivers/leds/Makefile
··· 49 49 obj-$(CONFIG_LEDS_NS2) += leds-ns2.o 50 50 obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o 51 51 obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o 52 - obj-$(CONFIG_LEDS_RENESAS_TPU) += leds-renesas-tpu.o 53 52 obj-$(CONFIG_LEDS_MAX8997) += leds-max8997.o 54 53 obj-$(CONFIG_LEDS_LM355x) += leds-lm355x.o 55 54 obj-$(CONFIG_LEDS_BLINKM) += leds-blinkm.o
-337
drivers/leds/leds-renesas-tpu.c
··· 1 - /* 2 - * LED control using Renesas TPU 3 - * 4 - * Copyright (C) 2011 Magnus Damm 5 - * 6 - * This program is free software; you can redistribute it and/or modify 7 - * it under the terms of the GNU General Public License as published by 8 - * the Free Software Foundation; either version 2 of the License 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 - * GNU General Public License for more details. 14 - * 15 - * You should have received a copy of the GNU General Public License 16 - * along with this program; if not, write to the Free Software 17 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 - */ 19 - 20 - #include <linux/module.h> 21 - #include <linux/init.h> 22 - #include <linux/platform_device.h> 23 - #include <linux/spinlock.h> 24 - #include <linux/printk.h> 25 - #include <linux/ioport.h> 26 - #include <linux/io.h> 27 - #include <linux/clk.h> 28 - #include <linux/leds.h> 29 - #include <linux/platform_data/leds-renesas-tpu.h> 30 - #include <linux/gpio.h> 31 - #include <linux/err.h> 32 - #include <linux/slab.h> 33 - #include <linux/pm_runtime.h> 34 - #include <linux/workqueue.h> 35 - 36 - enum r_tpu_pin { R_TPU_PIN_UNUSED, R_TPU_PIN_GPIO, R_TPU_PIN_GPIO_FN }; 37 - enum r_tpu_timer { R_TPU_TIMER_UNUSED, R_TPU_TIMER_ON }; 38 - 39 - struct r_tpu_priv { 40 - struct led_classdev ldev; 41 - void __iomem *mapbase; 42 - struct clk *clk; 43 - struct platform_device *pdev; 44 - enum r_tpu_pin pin_state; 45 - enum r_tpu_timer timer_state; 46 - unsigned long min_rate; 47 - unsigned int refresh_rate; 48 - struct work_struct work; 49 - enum led_brightness new_brightness; 50 - }; 51 - 52 - static DEFINE_SPINLOCK(r_tpu_lock); 53 - 54 - #define TSTR -1 /* Timer start register (shared register) */ 55 - #define TCR 0 /* Timer control register (+0x00) */ 56 - #define TMDR 1 /* Timer mode register (+0x04) */ 57 - #define TIOR 2 /* Timer I/O control register (+0x08) */ 58 - #define TIER 3 /* Timer interrupt enable register (+0x0c) */ 59 - #define TSR 4 /* Timer status register (+0x10) */ 60 - #define TCNT 5 /* Timer counter (+0x14) */ 61 - #define TGRA 6 /* Timer general register A (+0x18) */ 62 - #define TGRB 7 /* Timer general register B (+0x1c) */ 63 - #define TGRC 8 /* Timer general register C (+0x20) */ 64 - #define TGRD 9 /* Timer general register D (+0x24) */ 65 - 66 - static inline u16 r_tpu_read(struct r_tpu_priv *p, int reg_nr) 67 - { 68 - struct led_renesas_tpu_config *cfg = p->pdev->dev.platform_data; 69 - void __iomem *base = p->mapbase; 70 - unsigned long offs = reg_nr << 2; 71 - 72 - if (reg_nr == TSTR) 73 - return ioread16(base - cfg->channel_offset); 74 - 75 - return ioread16(base + offs); 76 - } 77 - 78 - static inline void r_tpu_write(struct r_tpu_priv *p, int reg_nr, u16 value) 79 - { 80 - struct led_renesas_tpu_config *cfg = p->pdev->dev.platform_data; 81 - void __iomem *base = p->mapbase; 82 - unsigned long offs = reg_nr << 2; 83 - 84 - if (reg_nr == TSTR) { 85 - iowrite16(value, base - cfg->channel_offset); 86 - return; 87 - } 88 - 89 - iowrite16(value, base + offs); 90 - } 91 - 92 - static void r_tpu_start_stop_ch(struct r_tpu_priv *p, int start) 93 - { 94 - struct led_renesas_tpu_config *cfg = p->pdev->dev.platform_data; 95 - unsigned long flags; 96 - u16 value; 97 - 98 - /* start stop register shared by multiple timer channels */ 99 - spin_lock_irqsave(&r_tpu_lock, flags); 100 - value = r_tpu_read(p, TSTR); 101 - 102 - if (start) 103 - value |= 1 << cfg->timer_bit; 104 - else 105 - value &= ~(1 << cfg->timer_bit); 106 - 107 - r_tpu_write(p, TSTR, value); 108 - spin_unlock_irqrestore(&r_tpu_lock, flags); 109 - } 110 - 111 - static int r_tpu_enable(struct r_tpu_priv *p, enum led_brightness brightness) 112 - { 113 - struct led_renesas_tpu_config *cfg = p->pdev->dev.platform_data; 114 - int prescaler[] = { 1, 4, 16, 64 }; 115 - int k, ret; 116 - unsigned long rate, tmp; 117 - 118 - if (p->timer_state == R_TPU_TIMER_ON) 119 - return 0; 120 - 121 - /* wake up device and enable clock */ 122 - pm_runtime_get_sync(&p->pdev->dev); 123 - ret = clk_enable(p->clk); 124 - if (ret) { 125 - dev_err(&p->pdev->dev, "cannot enable clock\n"); 126 - return ret; 127 - } 128 - 129 - /* make sure channel is disabled */ 130 - r_tpu_start_stop_ch(p, 0); 131 - 132 - /* get clock rate after enabling it */ 133 - rate = clk_get_rate(p->clk); 134 - 135 - /* pick the lowest acceptable rate */ 136 - for (k = ARRAY_SIZE(prescaler) - 1; k >= 0; k--) 137 - if ((rate / prescaler[k]) >= p->min_rate) 138 - break; 139 - 140 - if (k < 0) { 141 - dev_err(&p->pdev->dev, "clock rate mismatch\n"); 142 - goto err0; 143 - } 144 - dev_dbg(&p->pdev->dev, "rate = %lu, prescaler %u\n", 145 - rate, prescaler[k]); 146 - 147 - /* clear TCNT on TGRB match, count on rising edge, set prescaler */ 148 - r_tpu_write(p, TCR, 0x0040 | k); 149 - 150 - /* output 0 until TGRA, output 1 until TGRB */ 151 - r_tpu_write(p, TIOR, 0x0002); 152 - 153 - rate /= prescaler[k] * p->refresh_rate; 154 - r_tpu_write(p, TGRB, rate); 155 - dev_dbg(&p->pdev->dev, "TRGB = 0x%04lx\n", rate); 156 - 157 - tmp = (cfg->max_brightness - brightness) * rate; 158 - r_tpu_write(p, TGRA, tmp / cfg->max_brightness); 159 - dev_dbg(&p->pdev->dev, "TRGA = 0x%04lx\n", tmp / cfg->max_brightness); 160 - 161 - /* PWM mode */ 162 - r_tpu_write(p, TMDR, 0x0002); 163 - 164 - /* enable channel */ 165 - r_tpu_start_stop_ch(p, 1); 166 - 167 - p->timer_state = R_TPU_TIMER_ON; 168 - return 0; 169 - err0: 170 - clk_disable(p->clk); 171 - pm_runtime_put_sync(&p->pdev->dev); 172 - return -ENOTSUPP; 173 - } 174 - 175 - static void r_tpu_disable(struct r_tpu_priv *p) 176 - { 177 - if (p->timer_state == R_TPU_TIMER_UNUSED) 178 - return; 179 - 180 - /* disable channel */ 181 - r_tpu_start_stop_ch(p, 0); 182 - 183 - /* stop clock and mark device as idle */ 184 - clk_disable(p->clk); 185 - pm_runtime_put_sync(&p->pdev->dev); 186 - 187 - p->timer_state = R_TPU_TIMER_UNUSED; 188 - } 189 - 190 - static void r_tpu_set_pin(struct r_tpu_priv *p, enum r_tpu_pin new_state, 191 - enum led_brightness brightness) 192 - { 193 - struct led_renesas_tpu_config *cfg = p->pdev->dev.platform_data; 194 - 195 - if (p->pin_state == new_state) { 196 - if (p->pin_state == R_TPU_PIN_GPIO) 197 - gpio_set_value(cfg->pin_gpio, brightness); 198 - return; 199 - } 200 - 201 - if (p->pin_state == R_TPU_PIN_GPIO) 202 - gpio_free(cfg->pin_gpio); 203 - 204 - if (p->pin_state == R_TPU_PIN_GPIO_FN) 205 - gpio_free(cfg->pin_gpio_fn); 206 - 207 - if (new_state == R_TPU_PIN_GPIO) 208 - gpio_request_one(cfg->pin_gpio, !!brightness ? 209 - GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW, 210 - cfg->name); 211 - 212 - if (new_state == R_TPU_PIN_GPIO_FN) 213 - gpio_request(cfg->pin_gpio_fn, cfg->name); 214 - 215 - p->pin_state = new_state; 216 - } 217 - 218 - static void r_tpu_work(struct work_struct *work) 219 - { 220 - struct r_tpu_priv *p = container_of(work, struct r_tpu_priv, work); 221 - enum led_brightness brightness = p->new_brightness; 222 - 223 - r_tpu_disable(p); 224 - 225 - /* off and maximum are handled as GPIO pins, in between PWM */ 226 - if ((brightness == 0) || (brightness == p->ldev.max_brightness)) 227 - r_tpu_set_pin(p, R_TPU_PIN_GPIO, brightness); 228 - else { 229 - r_tpu_set_pin(p, R_TPU_PIN_GPIO_FN, 0); 230 - r_tpu_enable(p, brightness); 231 - } 232 - } 233 - 234 - static void r_tpu_set_brightness(struct led_classdev *ldev, 235 - enum led_brightness brightness) 236 - { 237 - struct r_tpu_priv *p = container_of(ldev, struct r_tpu_priv, ldev); 238 - p->new_brightness = brightness; 239 - schedule_work(&p->work); 240 - } 241 - 242 - static int r_tpu_probe(struct platform_device *pdev) 243 - { 244 - struct led_renesas_tpu_config *cfg = pdev->dev.platform_data; 245 - struct r_tpu_priv *p; 246 - struct resource *res; 247 - int ret; 248 - 249 - if (!cfg) { 250 - dev_err(&pdev->dev, "missing platform data\n"); 251 - return -ENODEV; 252 - } 253 - 254 - p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL); 255 - if (p == NULL) { 256 - dev_err(&pdev->dev, "failed to allocate driver data\n"); 257 - return -ENOMEM; 258 - } 259 - 260 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 261 - if (!res) { 262 - dev_err(&pdev->dev, "failed to get I/O memory\n"); 263 - return -ENXIO; 264 - } 265 - 266 - /* map memory, let mapbase point to our channel */ 267 - p->mapbase = devm_ioremap_nocache(&pdev->dev, res->start, 268 - resource_size(res)); 269 - if (p->mapbase == NULL) { 270 - dev_err(&pdev->dev, "failed to remap I/O memory\n"); 271 - return -ENXIO; 272 - } 273 - 274 - /* get hold of clock */ 275 - p->clk = devm_clk_get(&pdev->dev, NULL); 276 - if (IS_ERR(p->clk)) { 277 - dev_err(&pdev->dev, "cannot get clock\n"); 278 - return PTR_ERR(p->clk); 279 - } 280 - 281 - p->pdev = pdev; 282 - p->pin_state = R_TPU_PIN_UNUSED; 283 - p->timer_state = R_TPU_TIMER_UNUSED; 284 - p->refresh_rate = cfg->refresh_rate ? cfg->refresh_rate : 100; 285 - r_tpu_set_pin(p, R_TPU_PIN_GPIO, LED_OFF); 286 - platform_set_drvdata(pdev, p); 287 - 288 - INIT_WORK(&p->work, r_tpu_work); 289 - 290 - p->ldev.name = cfg->name; 291 - p->ldev.brightness = LED_OFF; 292 - p->ldev.max_brightness = cfg->max_brightness; 293 - p->ldev.brightness_set = r_tpu_set_brightness; 294 - p->ldev.flags |= LED_CORE_SUSPENDRESUME; 295 - ret = led_classdev_register(&pdev->dev, &p->ldev); 296 - if (ret < 0) 297 - goto err0; 298 - 299 - /* max_brightness may be updated by the LED core code */ 300 - p->min_rate = p->ldev.max_brightness * p->refresh_rate; 301 - 302 - pm_runtime_enable(&pdev->dev); 303 - return 0; 304 - 305 - err0: 306 - r_tpu_set_pin(p, R_TPU_PIN_UNUSED, LED_OFF); 307 - return ret; 308 - } 309 - 310 - static int r_tpu_remove(struct platform_device *pdev) 311 - { 312 - struct r_tpu_priv *p = platform_get_drvdata(pdev); 313 - 314 - r_tpu_set_brightness(&p->ldev, LED_OFF); 315 - led_classdev_unregister(&p->ldev); 316 - cancel_work_sync(&p->work); 317 - r_tpu_disable(p); 318 - r_tpu_set_pin(p, R_TPU_PIN_UNUSED, LED_OFF); 319 - 320 - pm_runtime_disable(&pdev->dev); 321 - 322 - return 0; 323 - } 324 - 325 - static struct platform_driver r_tpu_device_driver = { 326 - .probe = r_tpu_probe, 327 - .remove = r_tpu_remove, 328 - .driver = { 329 - .name = "leds-renesas-tpu", 330 - } 331 - }; 332 - 333 - module_platform_driver(r_tpu_device_driver); 334 - 335 - MODULE_AUTHOR("Magnus Damm"); 336 - MODULE_DESCRIPTION("Renesas TPU LED Driver"); 337 - MODULE_LICENSE("GPL v2");
+9 -9
drivers/mmc/host/sdhci-bcm-kona.c
··· 24 24 #include <linux/of.h> 25 25 #include <linux/of_device.h> 26 26 #include <linux/of_gpio.h> 27 - #include <linux/version.h> 28 27 #include <linux/mmc/slot-gpio.h> 29 28 30 29 #include "sdhci-pltfm.h" ··· 161 162 /* 162 163 * SD card interrupt event callback 163 164 */ 164 - void sdhci_bcm_kona_card_event(struct sdhci_host *host) 165 + static void sdhci_bcm_kona_card_event(struct sdhci_host *host) 165 166 { 166 167 if (mmc_gpio_get_cd(host->mmc) > 0) { 167 168 dev_dbg(mmc_dev(host->mmc), ··· 220 221 SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, 221 222 }; 222 223 223 - static const struct of_device_id sdhci_bcm_kona_of_match[] __initdata = { 224 - { .compatible = "bcm,kona-sdhci"}, 224 + static struct __initconst of_device_id sdhci_bcm_kona_of_match[] = { 225 + { .compatible = "brcm,kona-sdhci"}, 226 + { .compatible = "bcm,kona-sdhci"}, /* deprecated name */ 225 227 {} 226 228 }; 227 229 MODULE_DEVICE_TABLE(of, sdhci_bcm_kona_of_match); 228 230 229 - static int __init sdhci_bcm_kona_probe(struct platform_device *pdev) 231 + static int sdhci_bcm_kona_probe(struct platform_device *pdev) 230 232 { 231 233 struct sdhci_bcm_kona_dev *kona_dev = NULL; 232 234 struct sdhci_pltfm_host *pltfm_priv; ··· 263 263 (mmc_gpio_get_cd(host->mmc) != -ENOSYS) ? 'Y' : 'N', 264 264 (mmc_gpio_get_ro(host->mmc) != -ENOSYS) ? 'Y' : 'N'); 265 265 266 - if (host->mmc->caps | MMC_CAP_NONREMOVABLE) 266 + if (host->mmc->caps & MMC_CAP_NONREMOVABLE) 267 267 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; 268 268 269 269 dev_dbg(dev, "is_8bit=%c\n", ··· 282 282 } 283 283 284 284 /* if device is eMMC, emulate card insert right here */ 285 - if (host->mmc->caps | MMC_CAP_NONREMOVABLE) { 285 + if (host->mmc->caps & MMC_CAP_NONREMOVABLE) { 286 286 ret = sdhci_bcm_kona_sd_card_emulate(host, 1); 287 287 if (ret) { 288 288 dev_err(dev, ··· 336 336 .name = "sdhci-kona", 337 337 .owner = THIS_MODULE, 338 338 .pm = SDHCI_PLTFM_PMOPS, 339 - .of_match_table = of_match_ptr(sdhci_bcm_kona_of_match), 339 + .of_match_table = sdhci_bcm_kona_of_match, 340 340 }, 341 341 .probe = sdhci_bcm_kona_probe, 342 - .remove = __exit_p(sdhci_bcm_kona_remove), 342 + .remove = sdhci_bcm_kona_remove, 343 343 }; 344 344 module_platform_driver(sdhci_bcm_kona_driver); 345 345
+19
drivers/video/backlight/Kconfig
··· 425 425 If you have an Austrian Microsystems AS3711 say Y to enable the 426 426 backlight driver. 427 427 428 + config BACKLIGHT_GPIO 429 + tristate "Generic GPIO based Backlight Driver" 430 + depends on GPIOLIB 431 + help 432 + If you have a LCD backlight adjustable by GPIO, say Y to enable 433 + this driver. 434 + 435 + config BACKLIGHT_LV5207LP 436 + tristate "Sanyo LV5207LP Backlight" 437 + depends on I2C 438 + help 439 + If you have a Sanyo LV5207LP say Y to enable the backlight driver. 440 + 441 + config BACKLIGHT_BD6107 442 + tristate "Rohm BD6107 Backlight" 443 + depends on I2C 444 + help 445 + If you have a Rohm BD6107 say Y to enable the backlight driver. 446 + 428 447 endif # BACKLIGHT_CLASS_DEVICE 429 448 430 449 endif # BACKLIGHT_LCD_SUPPORT
+3
drivers/video/backlight/Makefile
··· 26 26 obj-$(CONFIG_BACKLIGHT_APPLE) += apple_bl.o 27 27 obj-$(CONFIG_BACKLIGHT_AS3711) += as3711_bl.o 28 28 obj-$(CONFIG_BACKLIGHT_ATMEL_PWM) += atmel-pwm-bl.o 29 + obj-$(CONFIG_BACKLIGHT_BD6107) += bd6107.o 29 30 obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o 30 31 obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o 31 32 obj-$(CONFIG_BACKLIGHT_DA903X) += da903x_bl.o 32 33 obj-$(CONFIG_BACKLIGHT_DA9052) += da9052_bl.o 33 34 obj-$(CONFIG_BACKLIGHT_EP93XX) += ep93xx_bl.o 34 35 obj-$(CONFIG_BACKLIGHT_GENERIC) += generic_bl.o 36 + obj-$(CONFIG_BACKLIGHT_GPIO) += gpio_backlight.o 35 37 obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o 36 38 obj-$(CONFIG_BACKLIGHT_HP700) += jornada720_bl.o 37 39 obj-$(CONFIG_BACKLIGHT_LM3533) += lm3533_bl.o ··· 42 40 obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o 43 41 obj-$(CONFIG_BACKLIGHT_LP855X) += lp855x_bl.o 44 42 obj-$(CONFIG_BACKLIGHT_LP8788) += lp8788_bl.o 43 + obj-$(CONFIG_BACKLIGHT_LV5207LP) += lv5207lp.o 45 44 obj-$(CONFIG_BACKLIGHT_MAX8925) += max8925_bl.o 46 45 obj-$(CONFIG_BACKLIGHT_OMAP1) += omap1_bl.o 47 46 obj-$(CONFIG_BACKLIGHT_OT200) += ot200_bl.o
+213
drivers/video/backlight/bd6107.c
··· 1 + /* 2 + * ROHM Semiconductor BD6107 LED Driver 3 + * 4 + * Copyright (C) 2013 Ideas on board SPRL 5 + * 6 + * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> 7 + * 8 + * This program is free software; you can redistribute it and/or modify 9 + * it under the terms of the GNU General Public License version 2 as 10 + * published by the Free Software Foundation. 11 + */ 12 + 13 + #include <linux/backlight.h> 14 + #include <linux/delay.h> 15 + #include <linux/err.h> 16 + #include <linux/fb.h> 17 + #include <linux/gpio.h> 18 + #include <linux/i2c.h> 19 + #include <linux/module.h> 20 + #include <linux/platform_data/bd6107.h> 21 + #include <linux/slab.h> 22 + 23 + #define BD6107_PSCNT1 0x00 24 + #define BD6107_PSCNT1_PSCNTREG2 (1 << 2) 25 + #define BD6107_PSCNT1_PSCNTREG1 (1 << 0) 26 + #define BD6107_REGVSET 0x02 27 + #define BD6107_REGVSET_REG1VSET_2_85V (1 << 2) 28 + #define BD6107_REGVSET_REG1VSET_2_80V (0 << 2) 29 + #define BD6107_LEDCNT1 0x03 30 + #define BD6107_LEDCNT1_LEDONOFF2 (1 << 1) 31 + #define BD6107_LEDCNT1_LEDONOFF1 (1 << 0) 32 + #define BD6107_PORTSEL 0x04 33 + #define BD6107_PORTSEL_LEDM(n) (1 << (n)) 34 + #define BD6107_RGB1CNT1 0x05 35 + #define BD6107_RGB1CNT2 0x06 36 + #define BD6107_RGB1CNT3 0x07 37 + #define BD6107_RGB1CNT4 0x08 38 + #define BD6107_RGB1CNT5 0x09 39 + #define BD6107_RGB1FLM 0x0a 40 + #define BD6107_RGB2CNT1 0x0b 41 + #define BD6107_RGB2CNT2 0x0c 42 + #define BD6107_RGB2CNT3 0x0d 43 + #define BD6107_RGB2CNT4 0x0e 44 + #define BD6107_RGB2CNT5 0x0f 45 + #define BD6107_RGB2FLM 0x10 46 + #define BD6107_PSCONT3 0x11 47 + #define BD6107_SMMONCNT 0x12 48 + #define BD6107_DCDCCNT 0x13 49 + #define BD6107_IOSEL 0x14 50 + #define BD6107_OUT1 0x15 51 + #define BD6107_OUT2 0x16 52 + #define BD6107_MASK1 0x17 53 + #define BD6107_MASK2 0x18 54 + #define BD6107_FACTOR1 0x19 55 + #define BD6107_FACTOR2 0x1a 56 + #define BD6107_CLRFACT1 0x1b 57 + #define BD6107_CLRFACT2 0x1c 58 + #define BD6107_STATE1 0x1d 59 + #define BD6107_LSIVER 0x1e 60 + #define BD6107_GRPSEL 0x1f 61 + #define BD6107_LEDCNT2 0x20 62 + #define BD6107_LEDCNT3 0x21 63 + #define BD6107_MCURRENT 0x22 64 + #define BD6107_MAINCNT1 0x23 65 + #define BD6107_MAINCNT2 0x24 66 + #define BD6107_SLOPECNT 0x25 67 + #define BD6107_MSLOPE 0x26 68 + #define BD6107_RGBSLOPE 0x27 69 + #define BD6107_TEST 0x29 70 + #define BD6107_SFTRST 0x2a 71 + #define BD6107_SFTRSTGD 0x2b 72 + 73 + struct bd6107 { 74 + struct i2c_client *client; 75 + struct backlight_device *backlight; 76 + struct bd6107_platform_data *pdata; 77 + }; 78 + 79 + static int bd6107_write(struct bd6107 *bd, u8 reg, u8 data) 80 + { 81 + return i2c_smbus_write_byte_data(bd->client, reg, data); 82 + } 83 + 84 + static int bd6107_backlight_update_status(struct backlight_device *backlight) 85 + { 86 + struct bd6107 *bd = bl_get_data(backlight); 87 + int brightness = backlight->props.brightness; 88 + 89 + if (backlight->props.power != FB_BLANK_UNBLANK || 90 + backlight->props.fb_blank != FB_BLANK_UNBLANK || 91 + backlight->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) 92 + brightness = 0; 93 + 94 + if (brightness) { 95 + bd6107_write(bd, BD6107_PORTSEL, BD6107_PORTSEL_LEDM(2) | 96 + BD6107_PORTSEL_LEDM(1) | BD6107_PORTSEL_LEDM(0)); 97 + bd6107_write(bd, BD6107_MAINCNT1, brightness); 98 + bd6107_write(bd, BD6107_LEDCNT1, BD6107_LEDCNT1_LEDONOFF1); 99 + } else { 100 + gpio_set_value(bd->pdata->reset, 0); 101 + msleep(24); 102 + gpio_set_value(bd->pdata->reset, 1); 103 + } 104 + 105 + return 0; 106 + } 107 + 108 + static int bd6107_backlight_get_brightness(struct backlight_device *backlight) 109 + { 110 + return backlight->props.brightness; 111 + } 112 + 113 + static int bd6107_backlight_check_fb(struct backlight_device *backlight, 114 + struct fb_info *info) 115 + { 116 + struct bd6107 *bd = bl_get_data(backlight); 117 + 118 + return bd->pdata->fbdev == NULL || bd->pdata->fbdev == info->dev; 119 + } 120 + 121 + static const struct backlight_ops bd6107_backlight_ops = { 122 + .options = BL_CORE_SUSPENDRESUME, 123 + .update_status = bd6107_backlight_update_status, 124 + .get_brightness = bd6107_backlight_get_brightness, 125 + .check_fb = bd6107_backlight_check_fb, 126 + }; 127 + 128 + static int bd6107_probe(struct i2c_client *client, 129 + const struct i2c_device_id *id) 130 + { 131 + struct bd6107_platform_data *pdata = client->dev.platform_data; 132 + struct backlight_device *backlight; 133 + struct backlight_properties props; 134 + struct bd6107 *bd; 135 + int ret; 136 + 137 + if (pdata == NULL || !pdata->reset) { 138 + dev_err(&client->dev, "No reset GPIO in platform data\n"); 139 + return -EINVAL; 140 + } 141 + 142 + if (!i2c_check_functionality(client->adapter, 143 + I2C_FUNC_SMBUS_BYTE_DATA)) { 144 + dev_warn(&client->dev, 145 + "I2C adapter doesn't support I2C_FUNC_SMBUS_BYTE\n"); 146 + return -EIO; 147 + } 148 + 149 + bd = devm_kzalloc(&client->dev, sizeof(*bd), GFP_KERNEL); 150 + if (!bd) 151 + return -ENOMEM; 152 + 153 + bd->client = client; 154 + bd->pdata = pdata; 155 + 156 + ret = devm_gpio_request_one(&client->dev, pdata->reset, 157 + GPIOF_DIR_OUT | GPIOF_INIT_LOW, "reset"); 158 + if (ret < 0) { 159 + dev_err(&client->dev, "unable to request reset GPIO\n"); 160 + return ret; 161 + } 162 + 163 + memset(&props, 0, sizeof(props)); 164 + props.type = BACKLIGHT_RAW; 165 + props.max_brightness = 128; 166 + props.brightness = clamp_t(unsigned int, pdata->def_value, 0, 167 + props.max_brightness); 168 + 169 + backlight = backlight_device_register(dev_name(&client->dev), 170 + &bd->client->dev, bd, 171 + &bd6107_backlight_ops, &props); 172 + if (IS_ERR(backlight)) { 173 + dev_err(&client->dev, "failed to register backlight\n"); 174 + return PTR_ERR(backlight); 175 + } 176 + 177 + backlight_update_status(backlight); 178 + i2c_set_clientdata(client, backlight); 179 + 180 + return 0; 181 + } 182 + 183 + static int bd6107_remove(struct i2c_client *client) 184 + { 185 + struct backlight_device *backlight = i2c_get_clientdata(client); 186 + 187 + backlight->props.brightness = 0; 188 + backlight_update_status(backlight); 189 + backlight_device_unregister(backlight); 190 + 191 + return 0; 192 + } 193 + 194 + static const struct i2c_device_id bd6107_ids[] = { 195 + { "bd6107", 0 }, 196 + { } 197 + }; 198 + MODULE_DEVICE_TABLE(i2c, bd6107_ids); 199 + 200 + static struct i2c_driver bd6107_driver = { 201 + .driver = { 202 + .name = "bd6107", 203 + }, 204 + .probe = bd6107_probe, 205 + .remove = bd6107_remove, 206 + .id_table = bd6107_ids, 207 + }; 208 + 209 + module_i2c_driver(bd6107_driver); 210 + 211 + MODULE_DESCRIPTION("Rohm BD6107 Backlight Driver"); 212 + MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>"); 213 + MODULE_LICENSE("GPL");
+133
drivers/video/backlight/gpio_backlight.c
··· 1 + /* 2 + * gpio_backlight.c - Simple GPIO-controlled backlight 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + */ 8 + 9 + #include <linux/backlight.h> 10 + #include <linux/err.h> 11 + #include <linux/fb.h> 12 + #include <linux/gpio.h> 13 + #include <linux/init.h> 14 + #include <linux/kernel.h> 15 + #include <linux/module.h> 16 + #include <linux/platform_data/gpio_backlight.h> 17 + #include <linux/platform_device.h> 18 + #include <linux/slab.h> 19 + 20 + struct gpio_backlight { 21 + struct device *dev; 22 + struct device *fbdev; 23 + 24 + int gpio; 25 + int active; 26 + }; 27 + 28 + static int gpio_backlight_update_status(struct backlight_device *bl) 29 + { 30 + struct gpio_backlight *gbl = bl_get_data(bl); 31 + int brightness = bl->props.brightness; 32 + 33 + if (bl->props.power != FB_BLANK_UNBLANK || 34 + bl->props.fb_blank != FB_BLANK_UNBLANK || 35 + bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) 36 + brightness = 0; 37 + 38 + gpio_set_value(gbl->gpio, brightness ? gbl->active : !gbl->active); 39 + 40 + return 0; 41 + } 42 + 43 + static int gpio_backlight_get_brightness(struct backlight_device *bl) 44 + { 45 + return bl->props.brightness; 46 + } 47 + 48 + static int gpio_backlight_check_fb(struct backlight_device *bl, 49 + struct fb_info *info) 50 + { 51 + struct gpio_backlight *gbl = bl_get_data(bl); 52 + 53 + return gbl->fbdev == NULL || gbl->fbdev == info->dev; 54 + } 55 + 56 + static const struct backlight_ops gpio_backlight_ops = { 57 + .options = BL_CORE_SUSPENDRESUME, 58 + .update_status = gpio_backlight_update_status, 59 + .get_brightness = gpio_backlight_get_brightness, 60 + .check_fb = gpio_backlight_check_fb, 61 + }; 62 + 63 + static int gpio_backlight_probe(struct platform_device *pdev) 64 + { 65 + struct gpio_backlight_platform_data *pdata = pdev->dev.platform_data; 66 + struct backlight_properties props; 67 + struct backlight_device *bl; 68 + struct gpio_backlight *gbl; 69 + int ret; 70 + 71 + if (!pdata) { 72 + dev_err(&pdev->dev, "failed to find platform data\n"); 73 + return -ENODEV; 74 + } 75 + 76 + gbl = devm_kzalloc(&pdev->dev, sizeof(*gbl), GFP_KERNEL); 77 + if (gbl == NULL) 78 + return -ENOMEM; 79 + 80 + gbl->dev = &pdev->dev; 81 + gbl->fbdev = pdata->fbdev; 82 + gbl->gpio = pdata->gpio; 83 + gbl->active = pdata->active_low ? 0 : 1; 84 + 85 + ret = devm_gpio_request_one(gbl->dev, gbl->gpio, GPIOF_DIR_OUT | 86 + (gbl->active ? GPIOF_INIT_LOW 87 + : GPIOF_INIT_HIGH), 88 + pdata->name); 89 + if (ret < 0) { 90 + dev_err(&pdev->dev, "unable to request GPIO\n"); 91 + return ret; 92 + } 93 + 94 + memset(&props, 0, sizeof(props)); 95 + props.type = BACKLIGHT_RAW; 96 + props.max_brightness = 1; 97 + bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, gbl, 98 + &gpio_backlight_ops, &props); 99 + if (IS_ERR(bl)) { 100 + dev_err(&pdev->dev, "failed to register backlight\n"); 101 + return PTR_ERR(bl); 102 + } 103 + 104 + bl->props.brightness = pdata->def_value; 105 + backlight_update_status(bl); 106 + 107 + platform_set_drvdata(pdev, bl); 108 + return 0; 109 + } 110 + 111 + static int gpio_backlight_remove(struct platform_device *pdev) 112 + { 113 + struct backlight_device *bl = platform_get_drvdata(pdev); 114 + 115 + backlight_device_unregister(bl); 116 + return 0; 117 + } 118 + 119 + static struct platform_driver gpio_backlight_driver = { 120 + .driver = { 121 + .name = "gpio-backlight", 122 + .owner = THIS_MODULE, 123 + }, 124 + .probe = gpio_backlight_probe, 125 + .remove = gpio_backlight_remove, 126 + }; 127 + 128 + module_platform_driver(gpio_backlight_driver); 129 + 130 + MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>"); 131 + MODULE_DESCRIPTION("GPIO-based Backlight Driver"); 132 + MODULE_LICENSE("GPL"); 133 + MODULE_ALIAS("platform:gpio-backlight");
+171
drivers/video/backlight/lv5207lp.c
··· 1 + /* 2 + * Sanyo LV5207LP LED Driver 3 + * 4 + * Copyright (C) 2013 Ideas on board SPRL 5 + * 6 + * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> 7 + * 8 + * This program is free software; you can redistribute it and/or modify 9 + * it under the terms of the GNU General Public License version 2 as 10 + * published by the Free Software Foundation. 11 + */ 12 + 13 + #include <linux/backlight.h> 14 + #include <linux/err.h> 15 + #include <linux/fb.h> 16 + #include <linux/i2c.h> 17 + #include <linux/module.h> 18 + #include <linux/platform_data/lv5207lp.h> 19 + #include <linux/slab.h> 20 + 21 + #define LV5207LP_CTRL1 0x00 22 + #define LV5207LP_CPSW (1 << 7) 23 + #define LV5207LP_SCTEN (1 << 6) 24 + #define LV5207LP_C10 (1 << 5) 25 + #define LV5207LP_CKSW (1 << 4) 26 + #define LV5207LP_RSW (1 << 3) 27 + #define LV5207LP_GSW (1 << 2) 28 + #define LV5207LP_BSW (1 << 1) 29 + #define LV5207LP_CTRL2 0x01 30 + #define LV5207LP_MSW (1 << 7) 31 + #define LV5207LP_MLED4 (1 << 6) 32 + #define LV5207LP_RED 0x02 33 + #define LV5207LP_GREEN 0x03 34 + #define LV5207LP_BLUE 0x04 35 + 36 + #define LV5207LP_MAX_BRIGHTNESS 32 37 + 38 + struct lv5207lp { 39 + struct i2c_client *client; 40 + struct backlight_device *backlight; 41 + struct lv5207lp_platform_data *pdata; 42 + }; 43 + 44 + static int lv5207lp_write(struct lv5207lp *lv, u8 reg, u8 data) 45 + { 46 + return i2c_smbus_write_byte_data(lv->client, reg, data); 47 + } 48 + 49 + static int lv5207lp_backlight_update_status(struct backlight_device *backlight) 50 + { 51 + struct lv5207lp *lv = bl_get_data(backlight); 52 + int brightness = backlight->props.brightness; 53 + 54 + if (backlight->props.power != FB_BLANK_UNBLANK || 55 + backlight->props.fb_blank != FB_BLANK_UNBLANK || 56 + backlight->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) 57 + brightness = 0; 58 + 59 + if (brightness) { 60 + lv5207lp_write(lv, LV5207LP_CTRL1, 61 + LV5207LP_CPSW | LV5207LP_C10 | LV5207LP_CKSW); 62 + lv5207lp_write(lv, LV5207LP_CTRL2, 63 + LV5207LP_MSW | LV5207LP_MLED4 | 64 + (brightness - 1)); 65 + } else { 66 + lv5207lp_write(lv, LV5207LP_CTRL1, 0); 67 + lv5207lp_write(lv, LV5207LP_CTRL2, 0); 68 + } 69 + 70 + return 0; 71 + } 72 + 73 + static int lv5207lp_backlight_get_brightness(struct backlight_device *backlight) 74 + { 75 + return backlight->props.brightness; 76 + } 77 + 78 + static int lv5207lp_backlight_check_fb(struct backlight_device *backlight, 79 + struct fb_info *info) 80 + { 81 + struct lv5207lp *lv = bl_get_data(backlight); 82 + 83 + return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->dev; 84 + } 85 + 86 + static const struct backlight_ops lv5207lp_backlight_ops = { 87 + .options = BL_CORE_SUSPENDRESUME, 88 + .update_status = lv5207lp_backlight_update_status, 89 + .get_brightness = lv5207lp_backlight_get_brightness, 90 + .check_fb = lv5207lp_backlight_check_fb, 91 + }; 92 + 93 + static int lv5207lp_probe(struct i2c_client *client, 94 + const struct i2c_device_id *id) 95 + { 96 + struct lv5207lp_platform_data *pdata = client->dev.platform_data; 97 + struct backlight_device *backlight; 98 + struct backlight_properties props; 99 + struct lv5207lp *lv; 100 + 101 + if (pdata == NULL) { 102 + dev_err(&client->dev, "No platform data supplied\n"); 103 + return -EINVAL; 104 + } 105 + 106 + if (!i2c_check_functionality(client->adapter, 107 + I2C_FUNC_SMBUS_BYTE_DATA)) { 108 + dev_warn(&client->dev, 109 + "I2C adapter doesn't support I2C_FUNC_SMBUS_BYTE\n"); 110 + return -EIO; 111 + } 112 + 113 + lv = devm_kzalloc(&client->dev, sizeof(*lv), GFP_KERNEL); 114 + if (!lv) 115 + return -ENOMEM; 116 + 117 + lv->client = client; 118 + lv->pdata = pdata; 119 + 120 + memset(&props, 0, sizeof(props)); 121 + props.type = BACKLIGHT_RAW; 122 + props.max_brightness = min_t(unsigned int, pdata->max_value, 123 + LV5207LP_MAX_BRIGHTNESS); 124 + props.brightness = clamp_t(unsigned int, pdata->def_value, 0, 125 + props.max_brightness); 126 + 127 + backlight = backlight_device_register(dev_name(&client->dev), 128 + &lv->client->dev, lv, 129 + &lv5207lp_backlight_ops, &props); 130 + if (IS_ERR(backlight)) { 131 + dev_err(&client->dev, "failed to register backlight\n"); 132 + return PTR_ERR(backlight); 133 + } 134 + 135 + backlight_update_status(backlight); 136 + i2c_set_clientdata(client, backlight); 137 + 138 + return 0; 139 + } 140 + 141 + static int lv5207lp_remove(struct i2c_client *client) 142 + { 143 + struct backlight_device *backlight = i2c_get_clientdata(client); 144 + 145 + backlight->props.brightness = 0; 146 + backlight_update_status(backlight); 147 + backlight_device_unregister(backlight); 148 + 149 + return 0; 150 + } 151 + 152 + static const struct i2c_device_id lv5207lp_ids[] = { 153 + { "lv5207lp", 0 }, 154 + { } 155 + }; 156 + MODULE_DEVICE_TABLE(i2c, lv5207lp_ids); 157 + 158 + static struct i2c_driver lv5207lp_driver = { 159 + .driver = { 160 + .name = "lv5207lp", 161 + }, 162 + .probe = lv5207lp_probe, 163 + .remove = lv5207lp_remove, 164 + .id_table = lv5207lp_ids, 165 + }; 166 + 167 + module_i2c_driver(lv5207lp_driver); 168 + 169 + MODULE_DESCRIPTION("Sanyo LV5207LP Backlight Driver"); 170 + MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>"); 171 + MODULE_LICENSE("GPL");
+19
include/linux/platform_data/bd6107.h
··· 1 + /* 2 + * bd6107.h - Rohm BD6107 LEDs Driver 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + */ 8 + #ifndef __BD6107_H__ 9 + #define __BD6107_H__ 10 + 11 + struct device; 12 + 13 + struct bd6107_platform_data { 14 + struct device *fbdev; 15 + int reset; /* Reset GPIO */ 16 + unsigned int def_value; 17 + }; 18 + 19 + #endif
+21
include/linux/platform_data/gpio_backlight.h
··· 1 + /* 2 + * gpio_backlight.h - Simple GPIO-controlled backlight 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + */ 8 + #ifndef __GPIO_BACKLIGHT_H__ 9 + #define __GPIO_BACKLIGHT_H__ 10 + 11 + struct device; 12 + 13 + struct gpio_backlight_platform_data { 14 + struct device *fbdev; 15 + int gpio; 16 + int def_value; 17 + bool active_low; 18 + const char *name; 19 + }; 20 + 21 + #endif
-14
include/linux/platform_data/leds-renesas-tpu.h
··· 1 - #ifndef __LEDS_RENESAS_TPU_H__ 2 - #define __LEDS_RENESAS_TPU_H__ 3 - 4 - struct led_renesas_tpu_config { 5 - char *name; 6 - unsigned pin_gpio_fn; 7 - unsigned pin_gpio; 8 - unsigned int channel_offset; 9 - unsigned int timer_bit; 10 - unsigned int max_brightness; 11 - unsigned int refresh_rate; 12 - }; 13 - 14 - #endif /* __LEDS_RENESAS_TPU_H__ */
+19
include/linux/platform_data/lv5207lp.h
··· 1 + /* 2 + * lv5207lp.h - Sanyo LV5207LP LEDs Driver 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + */ 8 + #ifndef __LV5207LP_H__ 9 + #define __LV5207LP_H__ 10 + 11 + struct device; 12 + 13 + struct lv5207lp_platform_data { 14 + struct device *fbdev; 15 + unsigned int max_value; 16 + unsigned int def_value; 17 + }; 18 + 19 + #endif