aboutsummaryrefslogtreecommitdiffstats
ModeNameSize
-rw-r--r--.clang-format267logstatsplain
-rw-r--r--.dockerignore139logstatsplain
-rw-r--r--.editorconfig114logstatsplain
d---------.github45logstatsplain
-rw-r--r--.gitignore603logstatsplain
-rw-r--r--.travis.yml3247logstatsplain
d---------.travis169logstatsplain
-rw-r--r--Brewfile149logstatsplain
-rw-r--r--CHANGELOG33454logstatsplain
-rw-r--r--COPYING776logstatsplain
-rw-r--r--CodeOfConduct3195logstatsplain
-rw-r--r--CodingReadme16871logstatsplain
-rw-r--r--Dockerfile965logstatsplain
-rw-r--r--Makefile34417logstatsplain
-rw-r--r--README.md23362logstatsplain
d---------backends519logstatsplain
d---------examples397logstatsplain
d---------frontends288logstatsplain
d---------kernel964logstatsplain
d---------libs200logstatsplain
d---------manual1913logstatsplain
d---------misc285logstatsplain
d---------passes351logstatsplain
d---------techlibs505logstatsplain
d---------tests983logstatsplain
/a> 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 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 400 401 402 403 404 405 406 407 408 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 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Device Tree Source for Netgear WNDR4700/WNDR4720 Series
 *
 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
 */

/dts-v1/;

#include <dt-bindings/thermal/thermal.h>
#include <dt-bindings/leds/common.h>
#include "apm82181.dtsi"

/ {
	model = "Netgear WNDR4700/WNDR4720 Series";
	compatible = "netgear,wndr4700", "apm,bluestone";

	aliases {
		serial0 = &UART0;
	};

	chosen {
		stdout-path = "/plb/opb/serial@ef600300:115200n8";
	};

	thermal-zones {
		cpu_thermal: cpu-thermal {
			polling-delay-passive = <10000>; /* milliseconds */
			polling-delay = <20000>; /* milliseconds */

			thermal-sensors = <&temp0 1>;

			/*
			 * REVISIT:
			 *
			 * Add the <&drive_temp>; sensor there and wire up
			 * the coefficients = <1 1>; property.
			 *
			 * Note: The kernel does not yet support more than
			 * one sensor (see of_thermal.c's function:
			 * thermal_of_build_thermal_zon()). Once this is
			 * implemented.
			 */

			trips {
				/*
				 * Once the thermal governers are a bit smarter
				 * and do hysteresis properly, we can disable
				 * the fan when the HDD and CPU has < 39 C.
				 */
				cpu_alert0: board-alert0 {
					temperature = <25000>;
					hysteresis = <2000>;
					type = "active";
				};

				cpu_alert1: cpu-alert1 {
					temperature = <27000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "active";
				};

				cpu_alert2: cpu-alert2 {
					temperature = <65000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "active";
				};

				cpu_alert3: cpu-alert3 {
					temperature = <70000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "active";
				};

				cpu_alert4: cpu-alert4 {
					temperature = <75000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "active";
				};

				cpu_alert5: cpu-alert5 {
					temperature = <80000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "active";
				};

				cpu_alert6: cpu-alert6 {
					temperature = <85000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "active";
				};

				cpu_crit: cpu-crit {
					temperature = <90000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "critical";
				};
			};

			cooling-maps {
				map0 {
					trip = <&cpu_alert0>;
					cooling-device = <&fan0 THERMAL_NO_LIMIT 0>;
				};

				map1 {
					trip = <&cpu_alert1>;
					cooling-device = <&fan0 1 76>;
				};

				map2 {
					trip = <&cpu_alert2>;
					cooling-device = <&fan0 77 101>;
				};

				map3 {
					trip = <&cpu_alert3>;
					cooling-device = <&fan0 102 147>;
				};

				map4 {
					trip = <&cpu_alert4>;
					cooling-device = <&fan0 148 207>;
				};

				map5 {
					trip = <&cpu_alert5>;
					cooling-device = <&fan0 208 231>;
				};

				map6 {
					trip = <&cpu_alert6>;
					cooling-device =<&fan0 232 THERMAL_NO_LIMIT>;
				};
			};
		};
	};
};

&CRYPTO {
	status = "okay";
};

&PKA {
	status = "okay";
};

&TRNG {
	status = "okay";
};

&SATA1 {
	status = "okay";

	/*
	 * This drive may have a temperature sensor with a
	 * thermal zone we can use for thermal control of the
	 * chassis temperature using the fan.
	 */

	drive_temp: sata-port@0 {
		reg = <0>;
		#thermal-sensor-cells = <0>;
	};
};

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

&EBC0 {
	ndfc: ndfc@1,0 {

		status = "okay";
		/* 128 MiB Nand Flash */
		nand {
			nand-is-boot-medium;

			partition@0 {
				label = "uboot";
				reg = <0x00000000 0x00180000>;
				read-only;
			};

			partition@180000 {
				label = "kernel";
				reg = <0x00180000 0x00380000>;
				/*
				 * device-tree is @ 0x00180000 - 0x001fffff
				 * kernel starts from 0x200000.
				 * this is coded into netgear's u-boot.
				 *
				 * this partition will also contain a
				 * fake/empty rootfs at the end to fool
				 * Netgear's uboot rootfs integrety checks.
				 */
			};

			partition@500000 {
				label = "ubi";
				reg = <0x00500000 0x014e0000>;
			};


			/*
			 * Netgear's u-boot in the fw_recovery mode (can be
			 * triggered by holding the reset button, or if
			 * "bootm" fails) will not flash past this point
			 * (= 0x19E0000).
			 */

			partition@19e0000 {
				label = "config";
				reg = <0x019e0000 0x00080000>;
				read-only;
			};

			partition@1a60000 {
				label = "pot";
				reg = <0x01a60000 0x00080000>;
				read-only;
			};

			partition@1ae0000 {
				label = "traffic_meter";
				reg = <0x01ae0000 0x00300000>;
				read-only;
			};

			partition@1de0000 {
				label = "language";
				reg = <0x01de0000 0x001c0000>;
				read-only;
			};

			partition@1fa0000 {
				label = "ecos";
				reg = <0x01fa0000 0x06020000>;
				read-only;
			};

			partition@7fc0000 {
				label = "wifi_data";
				reg = <0x07fc0000 0x00040000>;
				read-only;
			};
		};
	};
};

&UART0 {
	status = "okay";
};

&GPIO0 {
	status = "okay";
};

&IIC0 {
	status = "okay";

	fan0: fan@1b {
		compatible = "microchip,tc654";
		reg = <0x1b>;
		#cooling-cells = <2>; /* min followed by max */

		gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>; /* fan status */
		alarm-gpios = <&GPIO0 5 GPIO_ACTIVE_LOW>; /* fault */
		interrupt-parent = <&UIC3>;
		interrupts = <0x16 IRQ_TYPE_EDGE_FALLING>; /* fault */
	};

	temp0: temp@4d {
		compatible = "gmt,g781";
		reg = <0x4d>;
		#thermal-sensor-cells = <1>;

		/*
		 * The LM90 has two sensors:
		 *   temp0 -> internal to LM90
		 *   temp1 -> external NTC near CPU
		 */
	};
};


&EMAC0 {
	status = "okay";
	phy-handle = <&phy0>;
	fifo-entry-size = <10>;

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;
		phy0: ethernet-phy@0 {
			device_type = "ethernet-phy";
			reg = <0>;
			qca,mib-poll-interval = <500>;

			qca,ar8327-initvals = <
				0x0010 0x40000000
				0x0624 0x007f7f7f
				0x0004 0x07a00000	/* PAD0_MODE */
				0x000c 0x01000000	/* PAD6_MODE */
				0x007c 0x0000007e	/* PORT0_STATUS */
			>;