1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Copyright (C) 2021 Corentin Labbe <clabbe@baylibre.com>
4*724ba675SRob Herring * Device Tree file for Edimax NS 2502
5*724ba675SRob Herring */
6*724ba675SRob Herring
7*724ba675SRob Herring/dts-v1/;
8*724ba675SRob Herring
9*724ba675SRob Herring#include "gemini.dtsi"
10*724ba675SRob Herring
11*724ba675SRob Herring/ {
12*724ba675SRob Herring	model = "Edimax NS-2502";
13*724ba675SRob Herring	compatible = "edimax,ns-2502", "cortina,gemini";
14*724ba675SRob Herring	#address-cells = <1>;
15*724ba675SRob Herring	#size-cells = <1>;
16*724ba675SRob Herring
17*724ba675SRob Herring	memory@0 {
18*724ba675SRob Herring		/* 128 MB */
19*724ba675SRob Herring		device_type = "memory";
20*724ba675SRob Herring		reg = <0x00000000 0x8000000>;
21*724ba675SRob Herring	};
22*724ba675SRob Herring
23*724ba675SRob Herring	aliases {
24*724ba675SRob Herring		mdio-gpio0 = &mdio0;
25*724ba675SRob Herring	};
26*724ba675SRob Herring
27*724ba675SRob Herring	chosen {
28*724ba675SRob Herring		bootargs = "console=ttyS0,19200n8";
29*724ba675SRob Herring		stdout-path = &uart0;
30*724ba675SRob Herring	};
31*724ba675SRob Herring
32*724ba675SRob Herring	mdio0: mdio {
33*724ba675SRob Herring		compatible = "virtual,mdio-gpio";
34*724ba675SRob Herring		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
35*724ba675SRob Herring			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
36*724ba675SRob Herring		#address-cells = <1>;
37*724ba675SRob Herring		#size-cells = <0>;
38*724ba675SRob Herring
39*724ba675SRob Herring		phy0: ethernet-phy@1 {
40*724ba675SRob Herring			reg = <1>;
41*724ba675SRob Herring			device_type = "ethernet-phy";
42*724ba675SRob Herring		};
43*724ba675SRob Herring	};
44*724ba675SRob Herring};
45*724ba675SRob Herring
46*724ba675SRob Herring&ethernet {
47*724ba675SRob Herring	status = "okay";
48*724ba675SRob Herring	ethernet-port@0 {
49*724ba675SRob Herring		phy-mode = "rgmii-id";
50*724ba675SRob Herring		phy-handle = <&phy0>;
51*724ba675SRob Herring	};
52*724ba675SRob Herring};
53*724ba675SRob Herring
54*724ba675SRob Herring&flash {
55*724ba675SRob Herring	status = "okay";
56*724ba675SRob Herring	/* 8MB of flash */
57*724ba675SRob Herring	reg = <0x30000000 0x00800000>;
58*724ba675SRob Herring
59*724ba675SRob Herring	pinctrl-names = "enabled", "disabled";
60*724ba675SRob Herring	pinctrl-0 = <&pflash_default_pins>;
61*724ba675SRob Herring	pinctrl-1 = <&pflash_disabled_pins>;
62*724ba675SRob Herring
63*724ba675SRob Herring	partitions {
64*724ba675SRob Herring		compatible = "redboot-fis";
65*724ba675SRob Herring		/* Eraseblock at 0x7e0000 */
66*724ba675SRob Herring		fis-index-block = <0x3f>;
67*724ba675SRob Herring	};
68*724ba675SRob Herring};
69*724ba675SRob Herring
70*724ba675SRob Herring&gpio0 {
71*724ba675SRob Herring	pinctrl-names = "default";
72*724ba675SRob Herring	pinctrl-0 = <&gpio0_default_pins>;
73*724ba675SRob Herring};
74*724ba675SRob Herring
75*724ba675SRob Herring&ide0 {
76*724ba675SRob Herring	status = "okay";
77*724ba675SRob Herring};
78*724ba675SRob Herring
79*724ba675SRob Herring&ide1 {
80*724ba675SRob Herring	status = "okay";
81*724ba675SRob Herring};
82*724ba675SRob Herring
83*724ba675SRob Herring&sata {
84*724ba675SRob Herring	cortina,gemini-ata-muxmode = <3>;
85*724ba675SRob Herring	cortina,gemini-enable-sata-bridge;
86*724ba675SRob Herring	status = "okay";
87*724ba675SRob Herring};
88*724ba675SRob Herring
89*724ba675SRob Herring&syscon {
90*724ba675SRob Herring	pinctrl {
91*724ba675SRob Herring		/*
92*724ba675SRob Herring		 * gpio0agrp cover line 0-4
93*724ba675SRob Herring		 * gpio0bgrp cover line 5
94*724ba675SRob Herring		 */
95*724ba675SRob Herring		gpio0_default_pins: pinctrl-gpio0 {
96*724ba675SRob Herring			    mux {
97*724ba675SRob Herring				    function = "gpio0";
98*724ba675SRob Herring				    groups = "gpio0agrp", "gpio0bgrp", "gpio0hgrp";
99*724ba675SRob Herring			    };
100*724ba675SRob Herring		};
101*724ba675SRob Herring		pflash_disabled_pins: pinctrl-pflash-disabled {
102*724ba675SRob Herring			mux {
103*724ba675SRob Herring				function = "gpio0";
104*724ba675SRob Herring				groups = "gpio0ggrp", "gpio0igrp", "gpio0jgrp",
105*724ba675SRob Herring					 "gpio0kgrp";
106*724ba675SRob Herring			};
107*724ba675SRob Herring		};
108*724ba675SRob Herring		pinctrl-gmii {
109*724ba675SRob Herring			mux {
110*724ba675SRob Herring				function = "gmii";
111*724ba675SRob Herring				groups = "gmii_gmac0_grp";
112*724ba675SRob Herring				};
113*724ba675SRob Herring		};
114*724ba675SRob Herring	};
115*724ba675SRob Herring};
116*724ba675SRob Herring
117*724ba675SRob Herring&usb0 {
118*724ba675SRob Herring	status = "okay";
119*724ba675SRob Herring};
120*724ba675SRob Herring
121*724ba675SRob Herring&usb1 {
122*724ba675SRob Herring	status = "okay";
123*724ba675SRob Herring};
124