am335x-sl50.dts 19.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 * Copyright (C) 2015 Toby Churchill - http://www.toby-churchill.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;

#include "am33xx.dtsi"
11
#include <dt-bindings/pwm/pwm.h>
12
#include <dt-bindings/interrupt-controller/irq.h>
13 14 15 16 17 18 19 20 21 22 23

/ {
	model = "Toby Churchill SL50 Series";
	compatible = "tcl,am335x-sl50", "ti,am33xx";

	cpus {
		cpu@0 {
			cpu0-supply = <&dcdc2_reg>;
		};
	};

24
	memory@80000000 {
25 26 27 28
		device_type = "memory";
		reg = <0x80000000 0x20000000>; /* 512 MB */
	};

29 30 31 32
	chosen {
		stdout-path = &uart0;
	};

33 34 35 36 37
	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&led_pins>;

38
		led0 {
39 40 41 42 43
			label = "sl50:green:usr0";
			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

44
		led1 {
45 46 47 48 49
			label = "sl50:red:usr1";
			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

50
		led2 {
51 52 53 54 55
			label = "sl50:green:usr2";
			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

56
		led3 {
57 58 59 60 61 62 63 64
			label = "sl50:red:usr3";
			gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};
	};

	backlight0: disp0 {
		compatible = "pwm-backlight";
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
		pinctrl-names = "default";
		pinctrl-0 = <&backlight0_pins>;
		pwms = <&ehrpwm1 0 500000 PWM_POLARITY_INVERTED>;
		brightness-levels = < 0  1  2  3  4  5  6  7  8  9
				     10 11 12 13 14 15 16 17 18 19
				     20 21 22 23 24 25 26 27 28 29
				     30 31 32 33 34 35 36 37 38 39
				     40 41 42 43 44 45 46 47 48 49
				     50 51 52 53 54 55 56 57 58 59
				     60 61 62 63 64 65 66 67 68 69
				     70 71 72 73 74 75 76 77 78 79
				     80 81 82 83 84 85 86 87 88 89
				     90 91 92 93 94 95 96 97 98 99
				    100>;
		default-brightness-level = <50>;
		enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
		power-supply = <&vdd_sys_reg>;
82 83 84 85
	};

	backlight1: disp1 {
		compatible = "pwm-backlight";
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
		pinctrl-names = "default";
		pinctrl-0 = <&backlight1_pins>;
		pwms = <&ehrpwm1 1 500000 PWM_POLARITY_INVERTED>;
		brightness-levels = < 0  1  2  3  4  5  6  7  8  9
				     10 11 12 13 14 15 16 17 18 19
				     20 21 22 23 24 25 26 27 28 29
				     30 31 32 33 34 35 36 37 38 39
				     40 41 42 43 44 45 46 47 48 49
				     50 51 52 53 54 55 56 57 58 59
				     60 61 62 63 64 65 66 67 68 69
				     70 71 72 73 74 75 76 77 78 79
				     80 81 82 83 84 85 86 87 88 89
				     90 91 92 93 94 95 96 97 98 99
				    100>;
		default-brightness-level = <50>;
		enable-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
		power-supply = <&vdd_sys_reg>;
103 104
	};

105 106 107 108 109 110
	clocks {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		/* audio external oscillator */
111
		audio_mclk_fixed: oscillator@0 {
112 113 114 115
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency  = <24576000>;	/* 24.576MHz */
		};
116 117 118 119 120 121 122 123 124

		audio_mclk: audio_mclk_gate@0 {
			compatible = "gpio-gate-clock";
			#clock-cells = <0>;
			pinctrl-names = "default";
			pinctrl-0 = <&audio_mclk_pins>;
			clocks = <&audio_mclk_fixed>;
			enable-gpios = <&gpio1 27 0>;
		};
125 126
	};

127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
	panel: lcd_panel {
		compatible = "ti,tilcdc,panel";
		pinctrl-names = "default";
		pinctrl-0 = <&lcd_pins>;

		panel-info {
			ac-bias = <255>;
			ac-bias-intrpt = <0>;
			dma-burst-sz = <16>;
			bpp = <16>;
			fdd = <0x80>;
			tft-alt-mode = <0>;
			mono-8bit-mode = <0>;
			sync-edge = <0>;
			sync-ctrl = <1>;
			raster-order = <0>;
			fifo-th = <0>;
		};

		display-timings {
			native-mode = <&timing0>;
			timing0: 960x128 {
				clock-frequency = <18000000>;
				hactive = <960>;
				vactive = <272>;

				hback-porch = <40>;
				hfront-porch = <16>;
				hsync-len = <24>;
				hsync-active = <0>;

				vback-porch = <3>;
				vfront-porch = <8>;
				vsync-len = <4>;
				vsync-active = <0>;
			};
		};
	};

166
	sound {
167 168 169 170 171 172 173 174 175
		compatible = "audio-graph-card";
		label = "sound-card";
		pinctrl-names = "default";
		pinctrl-0 = <&audio_pa_pins>;

		widgets = "Headphone", "Headphone Jack",
			  "Speaker", "Speaker External",
			  "Line", "Line In",
			  "Microphone", "Microphone Jack";
176

177 178 179 180 181 182 183 184 185
		routing = "Headphone Jack",	"HPLOUT",
			  "Headphone Jack",	"HPROUT",
			  "Amplifier",		"MONO_LOUT",
			  "Speaker External",	"Amplifier",
			  "LINE1R",		"Line In",
			  "LINE1L",		"Line In",
			  "MIC3L",		"Microphone Jack",
			  "MIC3R",		"Microphone Jack",
			  "Microphone Jack",	"Mic Bias";
186

187 188 189
		dais = <&cpu_port>;

		pa-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
190 191 192 193 194 195 196 197 198
	};

	emmc_pwrseq: pwrseq@0 {
		compatible = "mmc-pwrseq-emmc";
		pinctrl-names = "default";
		pinctrl-0 = <&emmc_pwrseq_pins>;
		reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
	};

199 200 201 202 203 204 205 206
	vdd_sys_reg: regulator@0 {
		compatible = "regulator-fixed";
		regulator-name = "vdd_sys_reg";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-always-on;
	};

207
	vmmcsd_fixed: fixedregulator0 {
208 209 210 211 212 213 214 215 216 217 218
		compatible = "regulator-fixed";
		regulator-name = "vmmcsd_fixed";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};
};

&am33xx_pinmux {
	pinctrl-names = "default";
	pinctrl-0 = <&lwb_pins>;

219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
	audio_pins: pinmux_audio_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_ahcklx.mcasp0_ahclkx */
			AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_fsx.mcasp0_fsx */
			AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_aclkx.mcasp0_aclkx */
			AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_axr0.mcasp0_axr0 */
			AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mcasp0_ahclkr.mcasp0_axr2 */
		>;
	};

	audio_pa_pins: pinmux_audio_pa_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* SoundPA_en - mcasp0_aclkr.gpio3_18 */
		>;
	};

	audio_mclk_pins: pinmux_audio_mclk_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a11.gpio1_27 */
		>;
	};

241 242 243 244 245 246 247 248 249 250 251 252
	backlight0_pins: pinmux_backlight0_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE7)	/* gpmc_wen.gpio2_4 */
		>;
	};

	backlight1_pins: pinmux_backlight1_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE7)     /* gpmc_ad10.gpio0_26 */
		>;
	};

253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
	lcd_pins: pinmux_lcd_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)	/* lcd_data0.lcd_data0 */
			AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)	/* lcd_data1.lcd_data1 */
			AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)	/* lcd_data2.lcd_data2 */
			AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)	/* lcd_data3.lcd_data3 */
			AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)	/* lcd_data4.lcd_data4 */
			AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)	/* lcd_data5.lcd_data5 */
			AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)	/* lcd_data6.lcd_data6 */
			AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)	/* lcd_data7.lcd_data7 */
			AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)	/* lcd_data8.lcd_data8 */
			AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)	/* lcd_data9.lcd_data9 */
			AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)	/* lcd_data10.lcd_data10 */
			AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)	/* lcd_data11.lcd_data11 */
			AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)	/* lcd_data12.lcd_data12 */
			AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)	/* lcd_data13.lcd_data13 */
			AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)	/* lcd_data14.lcd_data14 */
			AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)	/* lcd_data15.lcd_data15 */
			AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_vsync.lcd_vsync */
			AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_hsync.lcd_hsync */
			AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_pclk.lcd_pclk */
			AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_ac_bias_en.lcd_ac_bias_en */
		>;
	};

278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
	led_pins: pinmux_led_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7)	/* gpmc_a5.gpio1_21 */
			AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE7)	/* gpmc_a6.gpio1_22 */
			AM33XX_IOPAD(0x85c, PIN_OUTPUT | MUX_MODE7)	/* gpmc_a7.gpio1_23 */
			AM33XX_IOPAD(0x860, PIN_OUTPUT | MUX_MODE7)	/* gpmc_a8.gpio1_24 */
		>;
	};

	uart0_pins: pinmux_uart0_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
			AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
		>;
	};

294 295 296 297 298 299 300
	uart1_pins: pinmux_uart1_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart1_rxd.uart1_rxd */
			AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart1_txd.uart1_txd */
		>;
	};

301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
	uart4_pins: pinmux_uart4_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE6)	/* gpmc_wait0.uart4_rxd */
			AM33XX_IOPAD(0x874, PIN_OUTPUT_PULLDOWN | MUX_MODE6)	/* gpmc_wpn.uart4_txd */
		>;
	};

	i2c0_pins: pinmux_i2c0_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
			AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
		>;
	};

	i2c2_pins: pinmux_i2c2_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_ctsn.i2c2_sda */
			AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_rtsn.i2c2_scl */
		>;
	};

	cpsw_default: cpsw_default {
		pinctrl-single,pins = <
			/* Slave 1 */
			AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxerr.mii1_rxerr */
			AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txen.mii1_txen */
			AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxdv.mii1_rxdv */
			AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd3.mii1_txd3 */
			AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd2.mii1_txd2 */
			AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd1.mii1_txd1 */
			AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd0.mii1_txd0 */
			AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_txclk.mii1_txclk */
			AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxclk.mii1_rxclk */
			AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd3.mii1_rxd3 */
			AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd2.mii1_rxd2 */
			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd1.mii1_rxd1 */
			AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd0.mii1_rxd0 */
		>;
	};

	cpsw_sleep: cpsw_sleep {
		pinctrl-single,pins = <
			/* Slave 1 reset value */
			AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	davinci_mdio_default: davinci_mdio_default {
		pinctrl-single,pins = <
			/* MDIO */
			AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
			AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
365 366
			/* Ethernet */
			AM33XX_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE7)	/* Ethernet_nRST - gpmc_ad14.gpio1_14 */
367 368 369 370 371 372 373 374 375 376 377 378 379
		>;
	};

	davinci_mdio_sleep: davinci_mdio_sleep {
		pinctrl-single,pins = <
			/* MDIO reset value */
			AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	mmc1_pins: pinmux_mmc1_pins {
		pinctrl-single,pins = <
380
			AM33XX_IOPAD(0x96c, PIN_INPUT | MUX_MODE7)		/* uart0_rtsn.gpio1_9 */
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
		>;
	};

	emmc_pwrseq_pins: pinmux_emmc_pwrseq_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a4.gpio1_20 */
		>;
	};

	emmc_pins: pinmux_emmc_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2)	/* gpmc_csn1.mmc1_clk */
			AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2)	/* gpmc_csn2.mmc1_cmd */
			AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad0.mmc1_dat0 */
			AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad1.mmc1_dat1 */
			AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad2.mmc1_dat2 */
			AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad3.mmc1_dat3 */
			AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad4.mmc1_dat4 */
			AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) 	/* gpmc_ad5.mmc1_dat5 */
			AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad6.mmc1_dat6 */
			AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad7.mmc1_dat7 */
		>;
	};

	ehrpwm1_pins: pinmux_ehrpwm1a_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE6)	/* gpmc_a2.ehrpwm1a */
			AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE6)	/* gpmc_a3.ehrpwm1b */
		>;
	};

412 413 414 415 416 417
	rtc0_irq_pins: pinmux_rtc0_irq_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_ad9.gpio0_23 */
		>;
	};

418 419 420 421 422 423 424 425 426 427
	spi0_pins: pinmux_spi0_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0)	/* SPI0_MOSI - spi0_d0.spi0_d0 */
			AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0)	/* SPI0_MISO - spi0_d1.spi0_d1 */
			AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0)	/* SPI0_CLK  - spi0_clk.spi0_clk */
			AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0)	/* SPI0_CS0 (NBATTSS) - spi0_cs0.spi0_cs0 */
			AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE0)	/* SPI0_CS1 (FPGA_FLASH_NCS) - spi0_cs1.spi0_cs1 */
		>;
	};

428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
	lwb_pins: pinmux_lwb_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE7)	/* nKbdInt - gpmc_ad12.gpio1_12 */
			AM33XX_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE7)	/* nKbdReset - gpmc_ad13.gpio1_13 */
			AM33XX_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE7)	/* USB1_enPower - gpmc_a1.gpio1_17 */
			/* PDI Bus - Battery system */
			AM33XX_IOPAD(0x840, PIN_INPUT_PULLUP | MUX_MODE7)	/* nBattReset  gpmc_a0.gpio1_16 */
			AM33XX_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE7)	/* BattPDIData gpmc_ad15.gpio1_15 */
		>;
	};
};

&i2c0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins>;

	clock-frequency = <400000>;

	tps: tps@24 {
		reg = <0x24>;
	};

451 452 453 454 455 456 457 458
	rtc0: rtc@68 {
		compatible = "dallas,ds1339";
		pinctrl-names = "default";
		pinctrl-0 = <&rtc0_irq_pins>;
		interrupt-parent = <&gpio0>;
		interrupts = <23 IRQ_TYPE_EDGE_FALLING>; /* gpio 23 */
		wakeup-source;
		trickle-resistor-ohms = <2000>;
459 460 461
		reg = <0x68>;
	};

462
	eeprom: eeprom@50 {
463
		compatible = "atmel,24c256";
464 465
		reg = <0x50>;
	};
466

467 468 469 470
	gpio_exp: mcp23017@20 {
		compatible = "microchip,mcp23017";
		reg = <0x20>;
	};
471

472 473 474 475 476 477 478 479 480 481 482 483
};

&i2c2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2_pins>;

	clock-frequency = <400000>;

	audio_codec: tlv320aic3106@1b {
		status = "okay";
		compatible = "ti,tlv320aic3106";
484
		#sound-dai-cells = <0>;
485
		reg = <0x1b>;
486
		ai3x-micbias-vg = <2>;  /* 2.5V */
487 488 489 490 491

		AVDD-supply = <&ldo4_reg>;
		IOVDD-supply = <&ldo4_reg>;
		DRVDD-supply = <&ldo4_reg>;
		DVDD-supply = <&ldo3_reg>;
492 493 494 495 496 497 498

		codec_port: port {
			codec_endpoint: endpoint {
				remote-endpoint = <&cpu_endpoint>;
				clocks = <&audio_mclk>;
			};
		};
499
	};
500 501 502 503 504 505

	/* Ambient Light Sensor */
	als: isl29023@44 {
		compatible = "isil,isl29023";
		reg = <0x44>;
	};
506 507
};

508 509 510 511
&rtc {
	status = "disabled";
};

512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
&usb {
	status = "okay";
};

&usb_ctrl_mod {
	status = "okay";
};

&usb0_phy {
	status = "okay";
};

&usb1_phy {
	status = "okay";
};

&usb0 {
	status = "okay";
530
	dr_mode = "otg";
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
};

&usb1 {
	status = "okay";
	dr_mode = "host";
};

&cppi41dma  {
	status = "okay";
};

&mmc1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins>;
	bus-width = <4>;
547
	cd-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
	vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&emmc_pins>;
	bus-width = <8>;
	vmmc-supply = <&vmmcsd_fixed>;
	mmc-pwrseq = <&emmc_pwrseq>;
};

&mcasp0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&audio_pins>;
564
	#sound-dai-cells = <0>;
565 566
	op-mode = <0>;  /* MCASP_ISS_MODE */
	tdm-slots = <2>;
567 568 569
	/* 4 serializers */
	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
		0 0 1 2
570
	>;
571 572 573 574 575 576 577 578 579 580 581 582 583 584
	tx-num-evt = <32>;
	rx-num-evt = <32>;

	cpu_port: port {
		cpu_endpoint: endpoint {
			remote-endpoint = <&codec_endpoint>;

			dai-format = "dsp_b";
			bitclock-master = <&codec_port>;
			frame-master = <&codec_port>;
			bitclock-inversion;
			clocks = <&audio_mclk>;
		};
	};
585 586 587 588 589 590 591 592
};

&uart0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins>;
};

593 594 595 596 597 598
&uart1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_pins>;
};

599 600 601 602 603 604
&uart4 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&uart4_pins>;
};

605 606 607 608 609 610 611 612 613 614 615 616 617 618
&spi0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins>;

	flash: n25q032@1 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "micron,n25q032";
		reg = <1>;
		spi-max-frequency = <5000000>;
	};
};

619 620
#include "tps65217.dtsi"

621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
&tps {
	ti,pmic-shutdown-controller;

	interrupt-parent = <&intc>;
	interrupts = <7>;	/* NNMI */

	regulators {
		dcdc1_reg: regulator@0 {
			/* VDDS_DDR */
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <1500000>;
			regulator-always-on;
		};

		dcdc2_reg: regulator@1 {
			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <1325000>;
			regulator-boot-on;
			regulator-always-on;
		};

		dcdc3_reg: regulator@2 {
			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
			regulator-name = "vdd_core";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <1150000>;
			regulator-boot-on;
			regulator-always-on;
		};

		ldo1_reg: regulator@3 {
			/* VRTC / VIO / VDDS*/
			regulator-always-on;
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		ldo2_reg: regulator@4 {
			/* VDD_3V3AUX */
			regulator-always-on;
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
		};

		ldo3_reg: regulator@5 {
			/* VDD_1V8 */
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
		};

		ldo4_reg: regulator@6 {
			/* VDD_3V3A */
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};
};

&cpsw_emac0 {
	phy-mode = "mii";
685
	phy-handle = <&ethphy0>;
686 687 688 689 690 691 692 693 694 695 696 697 698 699
};

&mac {
	status = "okay";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&cpsw_default>;
	pinctrl-1 = <&cpsw_sleep>;
};

&davinci_mdio {
	status = "okay";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;
700 701 702 703 704 705
	reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
	reset-delay-us = <100>;   /* PHY datasheet states 100us min */

	ethphy0: ethernet-phy@0 {
		reg = <0>;
	};
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724
};

&sham {
	status = "okay";
};

&aes {
	status = "okay";
};

&epwmss1 {
	status = "okay";
};

&ehrpwm1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&ehrpwm1_pins>;
};
725 726 727 728

&lcdc {
	status = "okay";
};