tegra20-colibri.dtsi 14.6 KB
Newer Older
1
// SPDX-License-Identifier: GPL-2.0
2
#include "tegra20.dtsi"
3 4

/ {
5
	model = "Toradex Colibri T20 256/512 MB";
6 7
	compatible = "toradex,colibri_t20-512", "nvidia,tegra20";

8
	memory@0 {
9 10 11 12 13 14
		/*
		 * Set memory to 256 MB to be safe as this could be used on
		 * 256 or 512 MB module. It is expected from bootloader
		 * to fix this up for 512 MB version.
		 */
		reg = <0x00000000 0x10000000>;
15 16
	};

17 18
	host1x@50000000 {
		hdmi@54280000 {
19
			nvidia,ddc-i2c-bus = <&i2c_ddc>;
20 21 22 23
			nvidia,hpd-gpio =
				<&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
			pll-supply = <&hdmi_pll_reg>;
			vdd-supply = <&hdmi_vdd_reg>;
24 25 26
		};
	};

27
	pinmux@70000014 {
28 29 30 31 32 33 34
		pinctrl-names = "default";
		pinctrl-0 = <&state_default>;

		state_default: pinmux {
			audio_refclk {
				nvidia,pins = "cdev1";
				nvidia,function = "plla_out";
35 36
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
37 38 39 40
			};
			crt {
				nvidia,pins = "crtp";
				nvidia,function = "crt";
41 42
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
43 44 45 46
			};
			dap3 {
				nvidia,pins = "dap3";
				nvidia,function = "dap3";
47 48
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
49 50 51 52 53 54 55 56 57
			};
			displaya {
				nvidia,pins = "ld0", "ld1", "ld2", "ld3",
					"ld4", "ld5", "ld6", "ld7", "ld8",
					"ld9", "ld10", "ld11", "ld12", "ld13",
					"ld14", "ld15", "ld16", "ld17",
					"lhs", "lpw0", "lpw2", "lsc0",
					"lsc1", "lsck", "lsda", "lspi", "lvs";
				nvidia,function = "displaya";
58
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
59 60 61 62
			};
			gpio_dte {
				nvidia,pins = "dte";
				nvidia,function = "rsvd1";
63 64
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
65 66 67 68 69 70
			};
			gpio_gmi {
				nvidia,pins = "ata", "atc", "atd", "ate",
					"dap1", "dap2", "dap4", "gpu", "irrx",
					"irtx", "spia", "spib", "spic";
				nvidia,function = "gmi";
71 72
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
73 74 75 76
			};
			gpio_pta {
				nvidia,pins = "pta";
				nvidia,function = "rsvd4";
77 78
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
79 80 81 82
			};
			gpio_uac {
				nvidia,pins = "uac";
				nvidia,function = "rsvd2";
83 84
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
85 86 87 88
			};
			hdint {
				nvidia,pins = "hdint";
				nvidia,function = "hdmi";
89
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
90 91 92 93
			};
			i2c1 {
				nvidia,pins = "rm";
				nvidia,function = "i2c1";
94 95
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
96 97 98 99
			};
			i2c3 {
				nvidia,pins = "dtf";
				nvidia,function = "i2c3";
100 101
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
102 103 104 105
			};
			i2cddc {
				nvidia,pins = "ddc";
				nvidia,function = "i2c2";
106 107
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
108 109 110 111
			};
			i2cp {
				nvidia,pins = "i2cp";
				nvidia,function = "i2cp";
112 113
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
114 115 116 117
			};
			irda {
				nvidia,pins = "uad";
				nvidia,function = "irda";
118 119
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
120 121 122 123 124
			};
			nand {
				nvidia,pins = "kbca", "kbcc", "kbcd",
					"kbce", "kbcf";
				nvidia,function = "nand";
125 126
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
127 128 129 130
			};
			owc {
				nvidia,pins = "owc";
				nvidia,function = "owr";
131 132
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
133 134 135 136
			};
			pmc {
				nvidia,pins = "pmc";
				nvidia,function = "pwr_on";
137
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
138 139 140 141
			};
			pwm {
				nvidia,pins = "sdb", "sdc", "sdd";
				nvidia,function = "pwm";
142
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
143 144 145 146
			};
			sdio4 {
				nvidia,pins = "atb", "gma", "gme";
				nvidia,function = "sdio4";
147 148
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
149 150 151 152
			};
			spi1 {
				nvidia,pins = "spid", "spie", "spif";
				nvidia,function = "spi1";
153 154
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
155 156 157 158
			};
			spi4 {
				nvidia,pins = "slxa", "slxc", "slxd", "slxk";
				nvidia,function = "spi4";
159 160
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
161 162 163 164
			};
			uarta {
				nvidia,pins = "sdio1";
				nvidia,function = "uarta";
165 166
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
167 168 169 170
			};
			uartd {
				nvidia,pins = "gmc";
				nvidia,function = "uartd";
171 172
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
173 174 175 176
			};
			ulpi {
				nvidia,pins = "uaa", "uab", "uda";
				nvidia,function = "ulpi";
177 178
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
179 180 181 182
			};
			ulpi_refclk {
				nvidia,pins = "cdev2";
				nvidia,function = "pllp_out4";
183 184
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
185 186 187 188
			};
			usb_gpio {
				nvidia,pins = "spig", "spih";
				nvidia,function = "spi2_alt";
189 190
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
191 192 193 194
			};
			vi {
				nvidia,pins = "dta", "dtb", "dtc", "dtd";
				nvidia,function = "vi";
195 196
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
197 198 199 200
			};
			vi_sc {
				nvidia,pins = "csus";
				nvidia,function = "vi_sensor_clk";
201 202
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
203 204 205 206
			};
		};
	};

S
Stephen Warren 已提交
207 208 209 210 211 212 213 214
	ac97: ac97@70002000 {
		status = "okay";
		nvidia,codec-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
			GPIO_ACTIVE_HIGH>;
		nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0)
			GPIO_ACTIVE_HIGH>;
	};

215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
	nand-controller@70008000 {
		status = "okay";

		nand@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <1>;
			nand-bus-width = <8>;
			nand-on-flash-bbt;
			nand-ecc-algo = "bch";
			nand-is-boot-medium;
			nand-ecc-maximize;
			wp-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
		};
	};

231 232 233 234
	/*
	 * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
	 * board)
	 */
235 236 237 238
	i2c@7000c000 {
		clock-frequency = <400000>;
	};

239
	/* DDC_SCL/SDA on X3 pin 15/16 (e.g. display EDID) */
240
	i2c_ddc: i2c@7000c400 {
241
		clock-frequency = <10000>;
242 243
	};

244
	/* GEN2_I2C: unused */
245

246 247 248
	/* CAM/GEN3_I2C: used as EXT_IO1/2 GPIOs on SODIMM pin 133/127 */

	/* PWR_I2C: power I2C to PMIC and temperature sensor (On-module) */
249 250
	i2c@7000d000 {
		status = "okay";
251
		clock-frequency = <100000>;
252 253 254 255

		pmic: tps6586x@34 {
			compatible = "ti,tps6586x";
			reg = <0x34>;
256
			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
257 258 259 260 261 262

			ti,system-power-controller;

			#gpio-cells = <2>;
			gpio-controller;

263
			sys-supply = <&vdd_3v3_reg>;
264 265 266 267
			vin-sm0-supply = <&sys_reg>;
			vin-sm1-supply = <&sys_reg>;
			vin-sm2-supply = <&sys_reg>;
			vinldo01-supply = <&sm2_reg>;
268 269 270 271
			vinldo23-supply = <&vdd_3v3_reg>;
			vinldo4-supply = <&vdd_3v3_reg>;
			vinldo678-supply = <&vdd_3v3_reg>;
			vinldo9-supply = <&vdd_3v3_reg>;
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287

			regulators {
				#address-cells = <1>;
				#size-cells = <0>;

				sys_reg: regulator@0 {
					reg = <0>;
					regulator-compatible = "sys";
					regulator-name = "vdd_sys";
					regulator-always-on;
				};

				regulator@1 {
					reg = <1>;
					regulator-compatible = "sm0";
					regulator-name = "vdd_sm0,vdd_core";
288 289
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
290 291 292 293 294 295 296
					regulator-always-on;
				};

				regulator@2 {
					reg = <2>;
					regulator-compatible = "sm1";
					regulator-name = "vdd_sm1,vdd_cpu";
297 298
					regulator-min-microvolt = <1000000>;
					regulator-max-microvolt = <1000000>;
299 300 301 302 303 304 305
					regulator-always-on;
				};

				sm2_reg: regulator@3 {
					reg = <3>;
					regulator-compatible = "sm2";
					regulator-name = "vdd_sm2,vin_ldo*";
306 307
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
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
					regulator-always-on;
				};

				/* LDO0 is not connected to anything */

				regulator@5 {
					reg = <5>;
					regulator-compatible = "ldo1";
					regulator-name = "vdd_ldo1,avdd_pll*";
					regulator-min-microvolt = <1100000>;
					regulator-max-microvolt = <1100000>;
					regulator-always-on;
				};

				regulator@6 {
					reg = <6>;
					regulator-compatible = "ldo2";
					regulator-name = "vdd_ldo2,vdd_rtc";
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
				};

				/* LDO3 is not connected to anything */

				regulator@8 {
					reg = <8>;
					regulator-compatible = "ldo4";
					regulator-name = "vdd_ldo4,avdd_osc,vddio_sys";
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					regulator-always-on;
				};

				ldo5_reg: regulator@9 {
					reg = <9>;
					regulator-compatible = "ldo5";
					regulator-name = "vdd_ldo5,vdd_fuse";
					regulator-min-microvolt = <3300000>;
					regulator-max-microvolt = <3300000>;
					regulator-always-on;
				};

				regulator@10 {
					reg = <10>;
					regulator-compatible = "ldo6";
					regulator-name = "vdd_ldo6,avdd_vdac,vddio_vi,vddio_cam";
354 355
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399
				};

				hdmi_vdd_reg: regulator@11 {
					reg = <11>;
					regulator-compatible = "ldo7";
					regulator-name = "vdd_ldo7,avdd_hdmi";
					regulator-min-microvolt = <3300000>;
					regulator-max-microvolt = <3300000>;
				};

				hdmi_pll_reg: regulator@12 {
					reg = <12>;
					regulator-compatible = "ldo8";
					regulator-name = "vdd_ldo8,avdd_hdmi_pll";
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
				};

				regulator@13 {
					reg = <13>;
					regulator-compatible = "ldo9";
					regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx";
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
					regulator-always-on;
				};

				regulator@14 {
					reg = <14>;
					regulator-compatible = "ldo_rtc";
					regulator-name = "vdd_rtc_out,vdd_cell";
					regulator-min-microvolt = <3300000>;
					regulator-max-microvolt = <3300000>;
					regulator-always-on;
				};
			};
		};

		temperature-sensor@4c {
			compatible = "national,lm95245";
			reg = <0x4c>;
		};
	};

400
	pmc@7000e400 {
J
Joseph Lo 已提交
401
		nvidia,suspend-mode = <1>;
402 403 404 405 406 407 408
		nvidia,cpu-pwr-good-time = <5000>;
		nvidia,cpu-pwr-off-time = <5000>;
		nvidia,core-pwr-good-time = <3845 3845>;
		nvidia,core-pwr-off-time = <3875>;
		nvidia,sys-clock-req-active-high;
	};

409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
	memory-controller@7000f400 {
		emc-table@83250 {
			reg = <83250>;
			compatible = "nvidia,tegra20-emc-table";
			clock-frequency = <83250>;
			nvidia,emc-registers =   <0x00000005 0x00000011
				0x00000004 0x00000002 0x00000004 0x00000004
				0x00000001 0x0000000a 0x00000002 0x00000002
				0x00000001 0x00000001 0x00000003 0x00000004
				0x00000003 0x00000009 0x0000000c 0x0000025f
				0x00000000 0x00000003 0x00000003 0x00000002
				0x00000002 0x00000001 0x00000008 0x000000c8
				0x00000003 0x00000005 0x00000003 0x0000000c
				0x00000002 0x00000000 0x00000000 0x00000002
				0x00000000 0x00000000 0x00000083 0x00520006
				0x00000010 0x00000008 0x00000000 0x00000000
				0x00000000 0x00000000 0x00000000 0x00000000>;
		};
		emc-table@133200 {
			reg = <133200>;
			compatible = "nvidia,tegra20-emc-table";
			clock-frequency = <133200>;
			nvidia,emc-registers =   <0x00000008 0x00000019
				0x00000006 0x00000002 0x00000004 0x00000004
				0x00000001 0x0000000a 0x00000002 0x00000002
				0x00000002 0x00000001 0x00000003 0x00000004
				0x00000003 0x00000009 0x0000000c 0x0000039f
				0x00000000 0x00000003 0x00000003 0x00000002
				0x00000002 0x00000001 0x00000008 0x000000c8
				0x00000003 0x00000007 0x00000003 0x0000000c
				0x00000002 0x00000000 0x00000000 0x00000002
				0x00000000 0x00000000 0x00000083 0x00510006
				0x00000010 0x00000008 0x00000000 0x00000000
				0x00000000 0x00000000 0x00000000 0x00000000>;
		};
		emc-table@166500 {
			reg = <166500>;
			compatible = "nvidia,tegra20-emc-table";
			clock-frequency = <166500>;
			nvidia,emc-registers =   <0x0000000a 0x00000021
				0x00000008 0x00000003 0x00000004 0x00000004
				0x00000002 0x0000000a 0x00000003 0x00000003
				0x00000002 0x00000001 0x00000003 0x00000004
				0x00000003 0x00000009 0x0000000c 0x000004df
				0x00000000 0x00000003 0x00000003 0x00000003
				0x00000003 0x00000001 0x00000009 0x000000c8
				0x00000003 0x00000009 0x00000004 0x0000000c
				0x00000002 0x00000000 0x00000000 0x00000002
				0x00000000 0x00000000 0x00000083 0x004f0006
				0x00000010 0x00000008 0x00000000 0x00000000
				0x00000000 0x00000000 0x00000000 0x00000000>;
		};
		emc-table@333000 {
			reg = <333000>;
			compatible = "nvidia,tegra20-emc-table";
			clock-frequency = <333000>;
			nvidia,emc-registers =   <0x00000014 0x00000041
				0x0000000f 0x00000005 0x00000004 0x00000005
				0x00000003 0x0000000a 0x00000005 0x00000005
				0x00000004 0x00000001 0x00000003 0x00000004
				0x00000003 0x00000009 0x0000000c 0x000009ff
				0x00000000 0x00000003 0x00000003 0x00000005
				0x00000005 0x00000001 0x0000000e 0x000000c8
				0x00000003 0x00000011 0x00000006 0x0000000c
				0x00000002 0x00000000 0x00000000 0x00000002
				0x00000000 0x00000000 0x00000083 0x00380006
				0x00000010 0x00000008 0x00000000 0x00000000
				0x00000000 0x00000000 0x00000000 0x00000000>;
		};
	};

	usb@c5004000 {
		status = "okay";
482 483
		nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
			GPIO_ACTIVE_LOW>;
484 485 486 487 488 489 490
		#address-cells = <1>;
		#size-cells = <0>;

		asix@1 {
			reg = <1>;
			local-mac-address = [00 00 00 00 00 00];
		};
491 492 493
	};

	usb-phy@c5004000 {
494
		status = "okay";
495 496
		nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
			GPIO_ACTIVE_LOW>;
497 498 499
	};

	sdhci@c8000600 {
500
		cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
501 502
	};

503 504 505 506 507
	clocks {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

508
		clk32k_in: clock@0 {
509
			compatible = "fixed-clock";
510
			reg = <0>;
511 512 513 514 515
			#clock-cells = <0>;
			clock-frequency = <32768>;
		};
	};

516 517 518 519 520
	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

521
		vdd_3v3_reg: regulator@100 {
522 523
			compatible = "regulator-fixed";
			reg = <100>;
524 525 526
			regulator-name = "vdd_3v3";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
527 528 529 530 531 532 533 534 535 536 537 538
			regulator-always-on;
		};

		regulator@101 {
			compatible = "regulator-fixed";
			reg = <101>;
			regulator-name = "internal_usb";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-boot-on;
			regulator-always-on;
539
			gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
540 541
		};
	};
S
Stephen Warren 已提交
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561

	sound {
		compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
			         "nvidia,tegra-audio-wm9712";
		nvidia,model = "Colibri T20 AC97 Audio";

		nvidia,audio-routing =
			"Headphone", "HPOUTL",
			"Headphone", "HPOUTR",
			"LineIn", "LINEINL",
			"LineIn", "LINEINR",
			"Mic", "MIC1";

		nvidia,ac97-controller = <&ac97>;

		clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
			 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
			 <&tegra_car TEGRA20_CLK_CDEV1>;
		clock-names = "pll_a", "pll_a_out0", "mclk";
	};
562
};