Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Device Tree Source for the Gose board |
| 3 | * |
| 4 | * Copyright (C) 2014-2015 Renesas Electronics Corporation |
| 5 | * |
| 6 | * This file is licensed under the terms of the GNU General Public License |
| 7 | * version 2. This program is licensed "as is" without any warranty of any |
| 8 | * kind, whether express or implied. |
| 9 | */ |
| 10 | |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 11 | /* |
| 12 | * SSI-AK4643 |
| 13 | * |
| 14 | * SW1: 1: AK4643 |
| 15 | * 2: CN22 |
| 16 | * 3: ADV7511 |
| 17 | * |
| 18 | * This command is required when Playback/Capture |
| 19 | * |
| 20 | * amixer set "LINEOUT Mixer DACL" on |
Simon Horman | ae79f66 | 2015-12-02 16:59:44 +0900 | [diff] [blame] | 21 | * amixer set "DVC Out" 100% |
| 22 | * amixer set "DVC In" 100% |
| 23 | * |
| 24 | * You can use Mute |
| 25 | * |
| 26 | * amixer set "DVC Out Mute" on |
| 27 | * amixer set "DVC In Mute" on |
| 28 | * |
| 29 | * You can use Volume Ramp |
| 30 | * |
| 31 | * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" |
| 32 | * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" |
| 33 | * amixer set "DVC Out Ramp" on |
| 34 | * aplay xxx.wav & |
| 35 | * amixer set "DVC Out" 80% // Volume Down |
| 36 | * amixer set "DVC Out" 100% // Volume Up |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 37 | */ |
Simon Horman | ae79f66 | 2015-12-02 16:59:44 +0900 | [diff] [blame] | 38 | |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 39 | /dts-v1/; |
| 40 | #include "r8a7793.dtsi" |
| 41 | #include <dt-bindings/gpio/gpio.h> |
| 42 | #include <dt-bindings/input/input.h> |
| 43 | |
| 44 | / { |
| 45 | model = "Gose"; |
| 46 | compatible = "renesas,gose", "renesas,r8a7793"; |
| 47 | |
| 48 | aliases { |
| 49 | serial0 = &scif0; |
| 50 | serial1 = &scif1; |
| 51 | }; |
| 52 | |
| 53 | chosen { |
| 54 | bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp"; |
Geert Uytterhoeven | 16010a3 | 2015-12-08 18:54:11 +0100 | [diff] [blame] | 55 | stdout-path = "serial0:115200n8"; |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | memory@40000000 { |
| 59 | device_type = "memory"; |
| 60 | reg = <0 0x40000000 0 0x40000000>; |
| 61 | }; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 62 | |
| 63 | gpio-keys { |
| 64 | compatible = "gpio-keys"; |
| 65 | |
| 66 | key-1 { |
| 67 | gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; |
| 68 | linux,code = <KEY_1>; |
| 69 | label = "SW2-1"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 70 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 71 | debounce-interval = <20>; |
| 72 | }; |
| 73 | key-2 { |
| 74 | gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; |
| 75 | linux,code = <KEY_2>; |
| 76 | label = "SW2-2"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 77 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 78 | debounce-interval = <20>; |
| 79 | }; |
| 80 | key-3 { |
| 81 | gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; |
| 82 | linux,code = <KEY_3>; |
| 83 | label = "SW2-3"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 84 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 85 | debounce-interval = <20>; |
| 86 | }; |
| 87 | key-4 { |
| 88 | gpios = <&gpio5 3 GPIO_ACTIVE_LOW>; |
| 89 | linux,code = <KEY_4>; |
| 90 | label = "SW2-4"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 91 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 92 | debounce-interval = <20>; |
| 93 | }; |
| 94 | key-a { |
| 95 | gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; |
| 96 | linux,code = <KEY_A>; |
| 97 | label = "SW30"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 98 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 99 | debounce-interval = <20>; |
| 100 | }; |
| 101 | key-b { |
| 102 | gpios = <&gpio7 1 GPIO_ACTIVE_LOW>; |
| 103 | linux,code = <KEY_B>; |
| 104 | label = "SW31"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 105 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 106 | debounce-interval = <20>; |
| 107 | }; |
| 108 | key-c { |
| 109 | gpios = <&gpio7 2 GPIO_ACTIVE_LOW>; |
| 110 | linux,code = <KEY_C>; |
| 111 | label = "SW32"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 112 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 113 | debounce-interval = <20>; |
| 114 | }; |
| 115 | key-d { |
| 116 | gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; |
| 117 | linux,code = <KEY_D>; |
| 118 | label = "SW33"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 119 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 120 | debounce-interval = <20>; |
| 121 | }; |
| 122 | key-e { |
| 123 | gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; |
| 124 | linux,code = <KEY_E>; |
| 125 | label = "SW34"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 126 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 127 | debounce-interval = <20>; |
| 128 | }; |
| 129 | key-f { |
| 130 | gpios = <&gpio7 5 GPIO_ACTIVE_LOW>; |
| 131 | linux,code = <KEY_F>; |
| 132 | label = "SW35"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 133 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 134 | debounce-interval = <20>; |
| 135 | }; |
| 136 | key-g { |
| 137 | gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; |
| 138 | linux,code = <KEY_G>; |
| 139 | label = "SW36"; |
Simon Horman | c816617 | 2016-02-16 06:48:45 +0900 | [diff] [blame] | 140 | wakeup-source; |
Simon Horman | d7d5974 | 2015-11-18 14:20:34 -0800 | [diff] [blame] | 141 | debounce-interval = <20>; |
| 142 | }; |
| 143 | }; |
Simon Horman | 3b18d85 | 2015-11-18 14:20:35 -0800 | [diff] [blame] | 144 | |
| 145 | leds { |
| 146 | compatible = "gpio-leds"; |
| 147 | led6 { |
| 148 | gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>; |
| 149 | label = "LED6"; |
| 150 | }; |
| 151 | led7 { |
| 152 | gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; |
| 153 | label = "LED7"; |
| 154 | }; |
| 155 | led8 { |
| 156 | gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; |
| 157 | label = "LED8"; |
| 158 | }; |
| 159 | }; |
Magnus Damm | 8871eb0 | 2016-01-18 20:03:10 +0900 | [diff] [blame] | 160 | |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 161 | audio_clock: clock { |
| 162 | compatible = "fixed-clock"; |
| 163 | #clock-cells = <0>; |
| 164 | clock-frequency = <11289600>; |
| 165 | clock-output-names = "audio_clock"; |
| 166 | }; |
| 167 | |
| 168 | rsnd_ak4643: sound { |
| 169 | compatible = "simple-audio-card"; |
| 170 | |
| 171 | simple-audio-card,format = "left_j"; |
| 172 | simple-audio-card,bitclock-master = <&sndcodec>; |
| 173 | simple-audio-card,frame-master = <&sndcodec>; |
| 174 | |
| 175 | sndcpu: simple-audio-card,cpu { |
| 176 | sound-dai = <&rcar_sound>; |
| 177 | }; |
| 178 | |
| 179 | sndcodec: simple-audio-card,codec { |
| 180 | sound-dai = <&ak4643>; |
| 181 | clocks = <&audio_clock>; |
| 182 | }; |
| 183 | }; |
| 184 | |
Magnus Damm | 8871eb0 | 2016-01-18 20:03:10 +0900 | [diff] [blame] | 185 | hdmi-out { |
| 186 | compatible = "hdmi-connector"; |
| 187 | type = "a"; |
| 188 | |
| 189 | port { |
| 190 | hdmi_con: endpoint { |
| 191 | remote-endpoint = <&adv7511_out>; |
| 192 | }; |
| 193 | }; |
| 194 | }; |
| 195 | |
| 196 | x2_clk: x2-clock { |
| 197 | compatible = "fixed-clock"; |
| 198 | #clock-cells = <0>; |
| 199 | clock-frequency = <74250000>; |
| 200 | }; |
| 201 | |
| 202 | x13_clk: x13-clock { |
| 203 | compatible = "fixed-clock"; |
| 204 | #clock-cells = <0>; |
| 205 | clock-frequency = <148500000>; |
| 206 | }; |
| 207 | }; |
| 208 | |
| 209 | &du { |
| 210 | pinctrl-0 = <&du_pins>; |
| 211 | pinctrl-names = "default"; |
| 212 | status = "okay"; |
| 213 | |
| 214 | clocks = <&mstp7_clks R8A7793_CLK_DU0>, |
| 215 | <&mstp7_clks R8A7793_CLK_DU1>, |
| 216 | <&mstp7_clks R8A7793_CLK_LVDS0>, |
| 217 | <&x13_clk>, <&x2_clk>; |
| 218 | clock-names = "du.0", "du.1", "lvds.0", |
| 219 | "dclkin.0", "dclkin.1"; |
| 220 | |
| 221 | ports { |
| 222 | port@0 { |
| 223 | endpoint { |
| 224 | remote-endpoint = <&adv7511_in>; |
| 225 | }; |
| 226 | }; |
| 227 | port@1 { |
| 228 | lvds_connector: endpoint { |
| 229 | }; |
| 230 | }; |
| 231 | }; |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 232 | }; |
| 233 | |
| 234 | &extal_clk { |
| 235 | clock-frequency = <20000000>; |
| 236 | }; |
| 237 | |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 238 | &pfc { |
Geert Uytterhoeven | 81a81ba | 2016-01-29 11:17:20 +0100 | [diff] [blame] | 239 | pinctrl-0 = <&scif_clk_pins>; |
| 240 | pinctrl-names = "default"; |
| 241 | |
Simon Horman | f6890af | 2016-01-05 09:16:20 +1100 | [diff] [blame] | 242 | i2c2_pins: i2c2 { |
| 243 | renesas,groups = "i2c2"; |
| 244 | renesas,function = "i2c2"; |
| 245 | }; |
| 246 | |
Magnus Damm | 8871eb0 | 2016-01-18 20:03:10 +0900 | [diff] [blame] | 247 | du_pins: du { |
| 248 | renesas,groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0"; |
| 249 | renesas,function = "du"; |
| 250 | }; |
| 251 | |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 252 | scif0_pins: serial0 { |
| 253 | renesas,groups = "scif0_data_d"; |
| 254 | renesas,function = "scif0"; |
| 255 | }; |
| 256 | |
| 257 | scif1_pins: serial1 { |
| 258 | renesas,groups = "scif1_data_d"; |
| 259 | renesas,function = "scif1"; |
| 260 | }; |
| 261 | |
Geert Uytterhoeven | 81a81ba | 2016-01-29 11:17:20 +0100 | [diff] [blame] | 262 | scif_clk_pins: scif_clk { |
| 263 | renesas,groups = "scif_clk"; |
| 264 | renesas,function = "scif_clk"; |
| 265 | }; |
| 266 | |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 267 | ether_pins: ether { |
| 268 | renesas,groups = "eth_link", "eth_mdio", "eth_rmii"; |
| 269 | renesas,function = "eth"; |
| 270 | }; |
| 271 | |
| 272 | phy1_pins: phy1 { |
| 273 | renesas,groups = "intc_irq0"; |
| 274 | renesas,function = "intc"; |
| 275 | }; |
Simon Horman | 6380d62 | 2015-11-12 10:29:23 +0900 | [diff] [blame] | 276 | |
| 277 | qspi_pins: spi0 { |
| 278 | renesas,groups = "qspi_ctrl", "qspi_data4"; |
| 279 | renesas,function = "qspi"; |
| 280 | }; |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 281 | |
| 282 | sound_pins: sound { |
| 283 | renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; |
| 284 | renesas,function = "ssi"; |
| 285 | }; |
| 286 | |
| 287 | sound_clk_pins: sound_clk { |
| 288 | renesas,groups = "audio_clk_a"; |
| 289 | renesas,function = "audio_clk"; |
| 290 | }; |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 291 | }; |
| 292 | |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 293 | ðer { |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 294 | pinctrl-0 = <ðer_pins &phy1_pins>; |
| 295 | pinctrl-names = "default"; |
| 296 | |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 297 | phy-handle = <&phy1>; |
| 298 | renesas,ether-link-active-low; |
| 299 | status = "okay"; |
| 300 | |
| 301 | phy1: ethernet-phy@1 { |
| 302 | reg = <1>; |
| 303 | interrupt-parent = <&irqc0>; |
| 304 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
| 305 | micrel,led-mode = <1>; |
| 306 | }; |
| 307 | }; |
| 308 | |
| 309 | &cmt0 { |
| 310 | status = "okay"; |
| 311 | }; |
| 312 | |
| 313 | &scif0 { |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 314 | pinctrl-0 = <&scif0_pins>; |
| 315 | pinctrl-names = "default"; |
| 316 | |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 317 | status = "okay"; |
| 318 | }; |
| 319 | |
| 320 | &scif1 { |
Simon Horman | a81f050 | 2015-11-09 10:33:19 +0900 | [diff] [blame] | 321 | pinctrl-0 = <&scif1_pins>; |
| 322 | pinctrl-names = "default"; |
| 323 | |
Ulrich Hecht | b8af459 | 2015-06-01 16:22:56 +0200 | [diff] [blame] | 324 | status = "okay"; |
| 325 | }; |
Simon Horman | 6380d62 | 2015-11-12 10:29:23 +0900 | [diff] [blame] | 326 | |
Geert Uytterhoeven | 81a81ba | 2016-01-29 11:17:20 +0100 | [diff] [blame] | 327 | &scif_clk { |
| 328 | clock-frequency = <14745600>; |
| 329 | status = "okay"; |
| 330 | }; |
| 331 | |
Simon Horman | 6380d62 | 2015-11-12 10:29:23 +0900 | [diff] [blame] | 332 | &qspi { |
| 333 | pinctrl-0 = <&qspi_pins>; |
| 334 | pinctrl-names = "default"; |
| 335 | |
| 336 | status = "okay"; |
| 337 | |
| 338 | flash@0 { |
| 339 | compatible = "spansion,s25fl512s", "jedec,spi-nor"; |
| 340 | reg = <0>; |
| 341 | spi-max-frequency = <30000000>; |
| 342 | spi-tx-bus-width = <4>; |
| 343 | spi-rx-bus-width = <4>; |
| 344 | spi-cpol; |
| 345 | spi-cpha; |
| 346 | m25p,fast-read; |
| 347 | |
| 348 | partitions { |
Geert Uytterhoeven | e5e6f9b | 2015-12-21 11:33:51 +0100 | [diff] [blame] | 349 | compatible = "fixed-partitions"; |
Simon Horman | 6380d62 | 2015-11-12 10:29:23 +0900 | [diff] [blame] | 350 | #address-cells = <1>; |
| 351 | #size-cells = <1>; |
| 352 | |
| 353 | partition@0 { |
| 354 | label = "loader"; |
| 355 | reg = <0x00000000 0x00040000>; |
| 356 | read-only; |
| 357 | }; |
| 358 | partition@40000 { |
| 359 | label = "user"; |
| 360 | reg = <0x00040000 0x00400000>; |
| 361 | read-only; |
| 362 | }; |
| 363 | partition@440000 { |
| 364 | label = "flash"; |
| 365 | reg = <0x00440000 0x03bc0000>; |
| 366 | }; |
| 367 | }; |
| 368 | }; |
| 369 | }; |
Simon Horman | f6890af | 2016-01-05 09:16:20 +1100 | [diff] [blame] | 370 | |
| 371 | &i2c2 { |
| 372 | pinctrl-0 = <&i2c2_pins>; |
| 373 | pinctrl-names = "default"; |
| 374 | |
| 375 | status = "okay"; |
| 376 | clock-frequency = <100000>; |
| 377 | |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 378 | ak4643: codec@12 { |
| 379 | compatible = "asahi-kasei,ak4643"; |
| 380 | #sound-dai-cells = <0>; |
| 381 | reg = <0x12>; |
| 382 | }; |
| 383 | |
Magnus Damm | 8871eb0 | 2016-01-18 20:03:10 +0900 | [diff] [blame] | 384 | hdmi@39 { |
| 385 | compatible = "adi,adv7511w"; |
| 386 | reg = <0x39>; |
| 387 | interrupt-parent = <&gpio3>; |
| 388 | interrupts = <29 IRQ_TYPE_LEVEL_LOW>; |
| 389 | |
| 390 | adi,input-depth = <8>; |
| 391 | adi,input-colorspace = "rgb"; |
| 392 | adi,input-clock = "1x"; |
| 393 | adi,input-style = <1>; |
| 394 | adi,input-justification = "evenly"; |
| 395 | |
| 396 | ports { |
| 397 | #address-cells = <1>; |
| 398 | #size-cells = <0>; |
| 399 | |
| 400 | port@0 { |
| 401 | reg = <0>; |
| 402 | adv7511_in: endpoint { |
| 403 | remote-endpoint = <&du_out_rgb>; |
| 404 | }; |
| 405 | }; |
| 406 | |
| 407 | port@1 { |
| 408 | reg = <1>; |
| 409 | adv7511_out: endpoint { |
| 410 | remote-endpoint = <&hdmi_con>; |
| 411 | }; |
| 412 | }; |
| 413 | }; |
| 414 | }; |
| 415 | |
Simon Horman | f6890af | 2016-01-05 09:16:20 +1100 | [diff] [blame] | 416 | eeprom@50 { |
| 417 | compatible = "renesas,r1ex24002", "atmel,24c02"; |
| 418 | reg = <0x50>; |
| 419 | pagesize = <16>; |
| 420 | }; |
| 421 | }; |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 422 | |
| 423 | &rcar_sound { |
| 424 | pinctrl-0 = <&sound_pins &sound_clk_pins>; |
| 425 | pinctrl-names = "default"; |
| 426 | |
| 427 | /* Single DAI */ |
| 428 | #sound-dai-cells = <0>; |
| 429 | |
| 430 | status = "okay"; |
| 431 | |
| 432 | rcar_sound,dai { |
| 433 | dai0 { |
Simon Horman | ae79f66 | 2015-12-02 16:59:44 +0900 | [diff] [blame] | 434 | playback = <&ssi0 &src2 &dvc0>; |
| 435 | capture = <&ssi1 &src3 &dvc1>; |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 436 | }; |
| 437 | }; |
| 438 | }; |
| 439 | |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 440 | &ssi1 { |
Simon Horman | f8905ce | 2015-12-02 16:45:35 +0900 | [diff] [blame] | 441 | shared-pin; |
| 442 | }; |