1da47515eSNeil Armstrong/*
2da47515eSNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc.
3da47515eSNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com>
4da47515eSNeil Armstrong *
5da47515eSNeil Armstrong * This file is dual-licensed: you can use it either under the terms
6da47515eSNeil Armstrong * of the GPL or the X11 license, at your option. Note that this dual
7da47515eSNeil Armstrong * licensing only applies to this file, and not this project as a
8da47515eSNeil Armstrong * whole.
9da47515eSNeil Armstrong *
10da47515eSNeil Armstrong *  a) This library is free software; you can redistribute it and/or
11da47515eSNeil Armstrong *     modify it under the terms of the GNU General Public License as
12da47515eSNeil Armstrong *     published by the Free Software Foundation; either version 2 of the
13da47515eSNeil Armstrong *     License, or (at your option) any later version.
14da47515eSNeil Armstrong *
15da47515eSNeil Armstrong *     This library is distributed in the hope that it will be useful,
16da47515eSNeil Armstrong *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17da47515eSNeil Armstrong *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18da47515eSNeil Armstrong *     GNU General Public License for more details.
19da47515eSNeil Armstrong *
20da47515eSNeil Armstrong * Or, alternatively,
21da47515eSNeil Armstrong *
22da47515eSNeil Armstrong *  b) Permission is hereby granted, free of charge, to any person
23da47515eSNeil Armstrong *     obtaining a copy of this software and associated documentation
24da47515eSNeil Armstrong *     files (the "Software"), to deal in the Software without
25da47515eSNeil Armstrong *     restriction, including without limitation the rights to use,
26da47515eSNeil Armstrong *     copy, modify, merge, publish, distribute, sublicense, and/or
27da47515eSNeil Armstrong *     sell copies of the Software, and to permit persons to whom the
28da47515eSNeil Armstrong *     Software is furnished to do so, subject to the following
29da47515eSNeil Armstrong *     conditions:
30da47515eSNeil Armstrong *
31da47515eSNeil Armstrong *     The above copyright notice and this permission notice shall be
32da47515eSNeil Armstrong *     included in all copies or substantial portions of the Software.
33da47515eSNeil Armstrong *
34da47515eSNeil Armstrong *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35da47515eSNeil Armstrong *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36da47515eSNeil Armstrong *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37da47515eSNeil Armstrong *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38da47515eSNeil Armstrong *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39da47515eSNeil Armstrong *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40da47515eSNeil Armstrong *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41da47515eSNeil Armstrong *     OTHER DEALINGS IN THE SOFTWARE.
42da47515eSNeil Armstrong */
43da47515eSNeil Armstrong
44da47515eSNeil Armstrong/dts-v1/;
45da47515eSNeil Armstrong
46da47515eSNeil Armstrong#include "meson-gxl-s905d-p23x.dtsi"
47da47515eSNeil Armstrong
48da47515eSNeil Armstrong/ {
49da47515eSNeil Armstrong	compatible = "amlogic,p230", "amlogic,s905d", "amlogic,meson-gxl";
50da47515eSNeil Armstrong	model = "Amlogic Meson GXL (S905D) P230 Development Board";
51da47515eSNeil Armstrong};
5273a5d99fSNeil Armstrong
5373a5d99fSNeil Armstrong/* P230 has exclusive choice between internal or external PHY */
5473a5d99fSNeil Armstrong&ethmac {
5573a5d99fSNeil Armstrong	pinctrl-0 = <&eth_pins>;
5673a5d99fSNeil Armstrong	pinctrl-names = "default";
5773a5d99fSNeil Armstrong
5873a5d99fSNeil Armstrong	/* Select external PHY by default */
5973a5d99fSNeil Armstrong	phy-handle = <&external_phy>;
6073a5d99fSNeil Armstrong
6173a5d99fSNeil Armstrong	/* External PHY reset is shared with internal PHY Led signals */
6273a5d99fSNeil Armstrong	snps,reset-gpio = <&gpio GPIOZ_14 0>;
6373a5d99fSNeil Armstrong	snps,reset-delays-us = <0 10000 1000000>;
6473a5d99fSNeil Armstrong	snps,reset-active-low;
6573a5d99fSNeil Armstrong
6673a5d99fSNeil Armstrong	/* External PHY is in RGMII */
6773a5d99fSNeil Armstrong	phy-mode = "rgmii";
6873a5d99fSNeil Armstrong};
6973a5d99fSNeil Armstrong
7073a5d99fSNeil Armstrong&external_mdio {
7173a5d99fSNeil Armstrong	external_phy: ethernet-phy@0 {
7273a5d99fSNeil Armstrong		compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
7373a5d99fSNeil Armstrong		reg = <0>;
7473a5d99fSNeil Armstrong		max-speed = <1000>;
7573a5d99fSNeil Armstrong	};
7673a5d99fSNeil Armstrong};
77