aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/dts/WBMR300.dts
blob: 54bb98e81a4c012981e4abae38a91fe7e534e519 (plain)
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
pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/dts-v1/;

#include "rt3050.dtsi"

/ {
	compatible = "W306R_V20", "ralink,rt3052-soc";
	model = "Tenda W306R V2.0";

	cfi@1f000000 {
		compatible = "cfi-flash";
		reg = <0x1f000000 0x800000>;
		bank-width = <2>;
		device-width = <2>;
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "u-boot";
			reg = <
/dts-v1/;

#include "vr9.dtsi"

#include <dt-bindings/input/input.h>

/ {
	model = "WBMR300 - Buffalo WBMR-300HPD";

	chosen {
		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
	};

	aliases {
		led-boot = &power_g;
		led-failsafe = &diag_r;
		led-running = &power_g;

		led-dsl = &dsl;
		led-internet = &router_g;
		led-wifi = &wifi_g;
	};

	memory@0 {
		reg = <0x0 0x4000000>;
	};

	fpi@10000000 {
		gpio: pinmux@E100B10 {
			pinctrl-names = "default";
			pinctrl-0 = <&state_default>;

			state_default: pinmux {
				mdio {
					lantiq,groups = "mdio";
					lantiq,function = "mdio";
				};
				phy-rst {
					lantiq,pins = "io42";
					lantiq,pull = <0>;
					lantiq,open-drain = <0>;
					lantiq,output = <1>;
				};
				pcie-rst {
					lantiq,pins = "io38";
					lantiq,pull = <0>;
					lantiq,output = <1>;
				};
			};
			pins_spi_default: pins_spi_default {
				spi_in {
					lantiq,groups = "spi_di";
					lantiq,function = "spi";
				};
				spi_out {
					lantiq,groups = "spi_do", "spi_clk",
						"spi_cs4";
					lantiq,function = "spi";
					lantiq,output = <1>;
				};
			};
		};

		ifxhcd@E101000 {
			status = "okay";
			gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
			lantiq,portmask = <0x3>;
		};

		ifxhcd@E106000 {
			status = "okay";
			gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
		};
	};

	gphy-xrx200 {
		compatible = "lantiq,phy-xrx200";
		firmware = "lantiq/vr9_phy22f_a2x.bin";
		phys = [ 00 01 ];
	};

	gpio_poweroff {
		compatible = "gpio-poweroff";
		gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <100>;

		power {
			label = "power";
			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_POWER>;
		};

		reset {
			label = "reset";
			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};

		auto {
			label = "auto";
			gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
			linux,code = <BTN_0>;
			linux,input-type = <EV_SW>;
		};

		router {
			label = "router";
			gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
			linux,code = <BTN_0>;
			linux,input-type = <EV_SW>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		diag_r: diag_r {
			label = "wbmr300:red:diag";
			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
			default_state = "off";
		};

		wifi_g: wifi_g {
			label = "wbmr300:green:wifi";
			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
		};

		dsl: dsl {
			label = "dsl";
			gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
		};

		router_y: router_y {
			label = "wbmr300:yellow:router";
			gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
		};

		wifi_y: wifi_y {
			label = "wbmr300:yellow:wifi";
			gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
		};

		lan1: lan1 {
			label = "wbmr300:green:lan1";
			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
		};

		wan: wan {
			label = "wbmr300:green:wan";
			gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
		};

		lan3: lan3 {
			label = "wbmr300:green:lan3";
			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
		};

		lan2: lan2 {
			label = "wbmr300:green:lan2";
			gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
		};

		internet_g: internet_g {
			label = "wbmr300:green:internet";
			gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
		};

		internet_y: internet_y {
			label = "wbmr300:yellow:internet";
			gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
		};

		router_g: router_g {
			label = "wbmr300:green:router";
			gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
		};

		power_g: power_g {
			label = "wbmr300:green:power";
			gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
		};
	};
};

&spi {
	pinctrl-names = "default";
	pinctrl-0 = <&pins_spi_default>;

	status = "ok";
	m25p80@4 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		reg = <4 0>;
		spi-max-frequency = <20000000>;

		partition@0 {
			reg = <0x0 0x10000>;
			label = "u-boot";
			read-only;
		};

		partition@10000 {
			reg = <0x10000 0x10000>;
			label = "gphyfirmware";
			read-only;
		};

		partition@20000 {
			reg = <0x20000 0x80000>;
			label = "dsl_fw";
		};

		partition@de0000 {
			reg = <0xa0000 0xf40000>;
			label = "firmware";
		};

		partition@fe0000 {
			reg = <0xfe0000 0x10000>;
			label = "sysconfig";
			read-only;
		};

		partition@ff0000 {
			reg = <0xff0000 0x2000>;
			label = "ubootconfig";
		};

		partition@ff3000 {
			reg = <0xff3000 0x2000>;
			label = "board_config";
			read-only;
		};
	};
};

&eth0 {
	lan: interface@0 {
		compatible = "lantiq,xrx200-pdi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		lantiq,switch;

		ethernet@1 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <4>;
			phy-mode = "mii";
			phy-handle = <&phy13>;
		};
		ethernet@2 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <5>;
			phy-mode = "mii";
			phy-handle = <&phy14>;
		};
		ethernet@3 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <2>;
			phy-mode = "mii";
			phy-handle = <&phy11>;
		};
		ethernet@4 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <3>;
			phy-mode = "mii";
			phy-handle = <&phy12>;
		};
	};

	mdio@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "lantiq,xrx200-mdio";
		phy11: ethernet-phy@11 {
			reg = <0x11>;
			compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
		};
		phy12: ethernet-phy@12 {
			reg = <0x12>;
			compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
		};
		phy13: ethernet-phy@13 {
			reg = <0x13>;
			compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
		};
		phy14: ethernet-phy@14 {
			reg = <0x14>;
			compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
		};
	};
};