aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
blob: b4a5bb4709f5a2f7699be82a7ed5a95ad371d68c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 } /
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

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

#include "ar9344.dtsi"

/ {
	compatible = "comfast,cf-e120a-v3", "qca,ar9344";
	model = "COMFAST CF-E120A v3";

	aliases {
		serial0 = &uart;
		led-boot = &led_rssihigh;
		led-failsafe = &led_rssihigh;
		led-upgrade = &led_rssihigh;
		label-mac-device = &eth0;
	};

	leds {
		compatible = "gpio-leds";

		pinctrl-names = "default";
		pinctrl-0 = <&led_rssimediumhigh_pin>;

		wan {
			label = "cf-e120a-v3:green:wan";
			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
		};

		lan {
			label = "cf-e120a-v3:green:lan";
			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
		};

		wlan {
			label = "cf-e120a-v3:green:wlan";
			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "phy0tpt";
		};

		rssilow {
			label = "cf-e120a-v3:red:rssilow";
			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
		};

		rssimediumlow {
			label = "cf-e120a-v3:red:rssimediumlow";
			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
		};

		rssimediumhigh {
			label = "cf-e120a-v3:green:rssimediumhigh";
			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
		};

		led_rssihigh: rssihigh {
			label = "cf-e120a-v3:green:rssihigh";
			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
		};
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
			debounce-interval = <60>;
		};
	};
};

&pinmux {
	led_rssimediumhigh_pin: pinmux_rssimediumhigh_pin {
		pinctrl-single,bits = <0x10 0x0 0xff>;
	};
};

&spi {
	status = "okay";

	num-cs = <1>;

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <25000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

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

			art: partition@10000 {
				label = "art";
				reg = <0x010000 0x010000>;
				read-only;
			};

			partition@20000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x020000 0x7d0000>;
			};

			partition@7f0000 {
				label = "nvram";
				reg = <0x7f0000 0x010000>;
				read-only;
			};
		};
	};
};

&uart {
	status = "okay";
};

&eth0 {
	status = "okay";
	phy-handle = <&swphy0>;
	mtd-mac-address = <&art 0x0>;

	gmac-config {
		device = <&gmac>;
		switch-phy-swap = <1>;
	};
};

&eth1 {
	status = "okay";
	mtd-mac-address = <&art 0x6>;
};

&wmac {
	status = "okay";
	mtd-cal-data = <&art 0x1000>;
};