1d537d289SNeil Armstrong/*
2d537d289SNeil Armstrong * Copyright (c) 2016 BayLibre, Inc.
3d537d289SNeil Armstrong * Author: Neil Armstrong <narmstrong@baylibre.com>
4d537d289SNeil Armstrong *
5d537d289SNeil Armstrong * This file is dual-licensed: you can use it either under the terms
6d537d289SNeil Armstrong * of the GPL or the X11 license, at your option. Note that this dual
7d537d289SNeil Armstrong * licensing only applies to this file, and not this project as a
8d537d289SNeil Armstrong * whole.
9d537d289SNeil Armstrong *
10d537d289SNeil Armstrong *  a) This library is free software; you can redistribute it and/or
11d537d289SNeil Armstrong *     modify it under the terms of the GNU General Public License as
12d537d289SNeil Armstrong *     published by the Free Software Foundation; either version 2 of the
13d537d289SNeil Armstrong *     License, or (at your option) any later version.
14d537d289SNeil Armstrong *
15d537d289SNeil Armstrong *     This library is distributed in the hope that it will be useful,
16d537d289SNeil Armstrong *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17d537d289SNeil Armstrong *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18d537d289SNeil Armstrong *     GNU General Public License for more details.
19d537d289SNeil Armstrong *
20d537d289SNeil Armstrong * Or, alternatively,
21d537d289SNeil Armstrong *
22d537d289SNeil Armstrong *  b) Permission is hereby granted, free of charge, to any person
23d537d289SNeil Armstrong *     obtaining a copy of this software and associated documentation
24d537d289SNeil Armstrong *     files (the "Software"), to deal in the Software without
25d537d289SNeil Armstrong *     restriction, including without limitation the rights to use,
26d537d289SNeil Armstrong *     copy, modify, merge, publish, distribute, sublicense, and/or
27d537d289SNeil Armstrong *     sell copies of the Software, and to permit persons to whom the
28d537d289SNeil Armstrong *     Software is furnished to do so, subject to the following
29d537d289SNeil Armstrong *     conditions:
30d537d289SNeil Armstrong *
31d537d289SNeil Armstrong *     The above copyright notice and this permission notice shall be
32d537d289SNeil Armstrong *     included in all copies or substantial portions of the Software.
33d537d289SNeil Armstrong *
34d537d289SNeil Armstrong *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35d537d289SNeil Armstrong *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36d537d289SNeil Armstrong *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37d537d289SNeil Armstrong *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38d537d289SNeil Armstrong *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39d537d289SNeil Armstrong *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40d537d289SNeil Armstrong *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41d537d289SNeil Armstrong *     OTHER DEALINGS IN THE SOFTWARE.
42d537d289SNeil Armstrong */
43d537d289SNeil Armstrong
44d537d289SNeil Armstrong/dts-v1/;
45d537d289SNeil Armstrong
46d537d289SNeil Armstrong#include "meson-gxbb-p20x.dtsi"
47d537d289SNeil Armstrong#include <dt-bindings/input/input.h>
48d537d289SNeil Armstrong
49d537d289SNeil Armstrong/ {
50d537d289SNeil Armstrong	compatible = "wetek,play2", "amlogic,meson-gxbb";
51d537d289SNeil Armstrong	model = "WeTek Play 2";
52d537d289SNeil Armstrong
53d537d289SNeil Armstrong	leds {
54d537d289SNeil Armstrong		compatible = "gpio-leds";
55d537d289SNeil Armstrong
56d537d289SNeil Armstrong		system {
57d537d289SNeil Armstrong			label = "wetek-play:system-status";
58d537d289SNeil Armstrong			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
59d537d289SNeil Armstrong			default-state = "on";
60d537d289SNeil Armstrong			panic-indicator;
61d537d289SNeil Armstrong		};
62d537d289SNeil Armstrong
63d537d289SNeil Armstrong		wifi {
64d537d289SNeil Armstrong			label = "wetek-play:wifi-status";
65d537d289SNeil Armstrong			gpios = <&gpio GPIODV_26 GPIO_ACTIVE_HIGH>;
66d537d289SNeil Armstrong			default-state = "off";
67d537d289SNeil Armstrong		};
68d537d289SNeil Armstrong
69d537d289SNeil Armstrong		ethernet {
70d537d289SNeil Armstrong			label = "wetek-play:ethernet-status";
71d537d289SNeil Armstrong			gpios = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>;
72d537d289SNeil Armstrong			default-state = "off";
73d537d289SNeil Armstrong		};
74d537d289SNeil Armstrong	};
75d537d289SNeil Armstrong
76d537d289SNeil Armstrong	gpio-keys-polled {
77d537d289SNeil Armstrong		compatible = "gpio-keys-polled";
78d537d289SNeil Armstrong		#address-cells = <1>;
79d537d289SNeil Armstrong		#size-cells = <0>;
80d537d289SNeil Armstrong		poll-interval = <100>;
81d537d289SNeil Armstrong
82d537d289SNeil Armstrong		button@0 {
83d537d289SNeil Armstrong			label = "reset";
84d537d289SNeil Armstrong			linux,code = <KEY_RESTART>;
85d537d289SNeil Armstrong			gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
86d537d289SNeil Armstrong		};
87d537d289SNeil Armstrong	};
88ab2a4931SNeil Armstrong
89ab2a4931SNeil Armstrong	cvbs-connector {
90ab2a4931SNeil Armstrong		compatible = "composite-video-connector";
91ab2a4931SNeil Armstrong
92ab2a4931SNeil Armstrong		port {
93ab2a4931SNeil Armstrong			cvbs_connector_in: endpoint {
94ab2a4931SNeil Armstrong				remote-endpoint = <&cvbs_vdac_out>;
95ab2a4931SNeil Armstrong			};
96ab2a4931SNeil Armstrong		};
97ab2a4931SNeil Armstrong	};
98ab2a4931SNeil Armstrong
99ab2a4931SNeil Armstrong	hdmi-connector {
100ab2a4931SNeil Armstrong		compatible = "hdmi-connector";
101ab2a4931SNeil Armstrong		type = "a";
102ab2a4931SNeil Armstrong
103ab2a4931SNeil Armstrong		port {
104ab2a4931SNeil Armstrong			hdmi_connector_in: endpoint {
105ab2a4931SNeil Armstrong				remote-endpoint = <&hdmi_tx_tmds_out>;
106ab2a4931SNeil Armstrong			};
107ab2a4931SNeil Armstrong		};
108ab2a4931SNeil Armstrong	};
109ab2a4931SNeil Armstrong};
110ab2a4931SNeil Armstrong
111ab2a4931SNeil Armstrong
112ab2a4931SNeil Armstrong&cvbs_vdac_port {
113ab2a4931SNeil Armstrong	cvbs_vdac_out: endpoint {
114ab2a4931SNeil Armstrong		remote-endpoint = <&cvbs_connector_in>;
115ab2a4931SNeil Armstrong	};
116d537d289SNeil Armstrong};
117d537d289SNeil Armstrong
118695dcb2bSMartin Blumenstingl&ethmac {
119695dcb2bSMartin Blumenstingl	status = "okay";
120695dcb2bSMartin Blumenstingl	pinctrl-0 = <&eth_rgmii_pins>;
121695dcb2bSMartin Blumenstingl	pinctrl-names = "default";
122695dcb2bSMartin Blumenstingl
123695dcb2bSMartin Blumenstingl	phy-handle = <&eth_phy0>;
124695dcb2bSMartin Blumenstingl	phy-mode = "rgmii";
125695dcb2bSMartin Blumenstingl
126093d23dbSMartin Blumenstingl	amlogic,tx-delay-ns = <2>;
127093d23dbSMartin Blumenstingl
128695dcb2bSMartin Blumenstingl	snps,reset-gpio = <&gpio GPIOZ_14 0>;
129695dcb2bSMartin Blumenstingl	snps,reset-delays-us = <0 10000 1000000>;
130695dcb2bSMartin Blumenstingl	snps,reset-active-low;
131695dcb2bSMartin Blumenstingl
132695dcb2bSMartin Blumenstingl	mdio {
133695dcb2bSMartin Blumenstingl		compatible = "snps,dwmac-mdio";
134695dcb2bSMartin Blumenstingl		#address-cells = <1>;
135695dcb2bSMartin Blumenstingl		#size-cells = <0>;
136695dcb2bSMartin Blumenstingl
137695dcb2bSMartin Blumenstingl		eth_phy0: ethernet-phy@0 {
138695dcb2bSMartin Blumenstingl			/* Realtek RTL8211F (0x001cc916) */
139695dcb2bSMartin Blumenstingl			reg = <0>;
140695dcb2bSMartin Blumenstingl		};
141695dcb2bSMartin Blumenstingl	};
142695dcb2bSMartin Blumenstingl};
143695dcb2bSMartin Blumenstingl
144ab2a4931SNeil Armstrong&hdmi_tx {
145ab2a4931SNeil Armstrong	status = "okay";
146ab2a4931SNeil Armstrong	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
147ab2a4931SNeil Armstrong	pinctrl-names = "default";
148ab2a4931SNeil Armstrong};
149ab2a4931SNeil Armstrong
150ab2a4931SNeil Armstrong&hdmi_tx_tmds_port {
151ab2a4931SNeil Armstrong	hdmi_tx_tmds_out: endpoint {
152ab2a4931SNeil Armstrong		remote-endpoint = <&hdmi_connector_in>;
153ab2a4931SNeil Armstrong	};
154ab2a4931SNeil Armstrong};
155ab2a4931SNeil Armstrong
156d537d289SNeil Armstrong&i2c_A {
157d537d289SNeil Armstrong	status = "okay";
158d537d289SNeil Armstrong	pinctrl-0 = <&i2c_a_pins>;
159d537d289SNeil Armstrong	pinctrl-names = "default";
160d537d289SNeil Armstrong};
161