blob: c737183a294721b49ed9064704a444efcf312a65 [file] [log] [blame]
Beniamino Galvanid1037e42016-05-08 08:30:16 +02001/*
2 * Copyright (c) 2016 Andreas Färber
3 * Copyright (c) 2016 BayLibre, Inc.
4 * Author: Kevin Hilman <khilman@kernel.org>
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 */
44
45/dts-v1/;
46
47#include "meson-gxbb.dtsi"
Beniamino Galvani77e425d2016-08-16 11:49:48 +020048#include <dt-bindings/gpio/gpio.h>
Beniamino Galvanid1037e42016-05-08 08:30:16 +020049
50/ {
51 compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
52 model = "Hardkernel ODROID-C2";
53
54 aliases {
55 serial0 = &uart_AO;
56 };
57
58 chosen {
59 stdout-path = "serial0:115200n8";
60 };
61
62 memory@0 {
63 device_type = "memory";
64 reg = <0x0 0x0 0x0 0x80000000>;
65 };
Beniamino Galvani77e425d2016-08-16 11:49:48 +020066
Heiner Kallweit4b90b402017-04-12 20:28:36 +020067 usb_otg_pwr: regulator-usb-pwrs {
68 compatible = "regulator-fixed";
69
70 regulator-name = "USB_OTG_PWR";
71
72 regulator-min-microvolt = <5000000>;
73 regulator-max-microvolt = <5000000>;
74
75 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
76 enable-active-high;
77 };
78
Beniamino Galvani77e425d2016-08-16 11:49:48 +020079 leds {
80 compatible = "gpio-leds";
81 blue {
82 label = "c2:blue:alive";
83 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
84 linux,default-trigger = "heartbeat";
85 default-state = "off";
86 };
87 };
Heiner Kallweit4b90b402017-04-12 20:28:36 +020088
89 tflash_vdd: regulator-tflash_vdd {
90 /*
91 * signal name from schematics: TFLASH_VDD_EN
92 */
93 compatible = "regulator-fixed";
94
95 regulator-name = "TFLASH_VDD";
96 regulator-min-microvolt = <3300000>;
97 regulator-max-microvolt = <3300000>;
98
99 gpio = <&gpio_ao GPIOAO_12 GPIO_ACTIVE_HIGH>;
100 enable-active-high;
101 };
102
103 tf_io: gpio-regulator-tf_io {
104 compatible = "regulator-gpio";
105
106 regulator-name = "TF_IO";
107 regulator-min-microvolt = <1800000>;
108 regulator-max-microvolt = <3300000>;
109
110 /*
111 * signal name from schematics: TF_3V3N_1V8_EN
112 */
113 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
114 gpios-states = <0>;
115
116 states = <3300000 0
117 1800000 1>;
118 };
119
120 vcc1v8: regulator-vcc1v8 {
121 compatible = "regulator-fixed";
122 regulator-name = "VCC1V8";
123 regulator-min-microvolt = <1800000>;
124 regulator-max-microvolt = <1800000>;
125 };
126
127 vcc3v3: regulator-vcc3v3 {
128 compatible = "regulator-fixed";
129 regulator-name = "VCC3V3";
130 regulator-min-microvolt = <3300000>;
131 regulator-max-microvolt = <3300000>;
132 };
133
134 emmc_pwrseq: emmc-pwrseq {
135 compatible = "mmc-pwrseq-emmc";
136 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
137 };
Beniamino Galvanid1037e42016-05-08 08:30:16 +0200138};
139
Heiner Kallweit4b90b402017-04-12 20:28:36 +0200140&scpi_clocks {
141 status = "disabled";
142};
143
Beniamino Galvanid1037e42016-05-08 08:30:16 +0200144&uart_AO {
145 status = "okay";
Beniamino Galvani77e425d2016-08-16 11:49:48 +0200146 pinctrl-0 = <&uart_ao_a_pins>;
147 pinctrl-names = "default";
148};
149
150&ethmac {
151 status = "okay";
Heiner Kallweit4b90b402017-04-12 20:28:36 +0200152 pinctrl-0 = <&eth_rgmii_pins>;
153 pinctrl-names = "default";
154 phy-handle = <&eth_phy0>;
155
156 mdio {
157 compatible = "snps,dwmac-mdio";
158 #address-cells = <1>;
159 #size-cells = <0>;
160
161 eth_phy0: ethernet-phy@0 {
162 reg = <0>;
163 eee-broken-1000t;
164 };
165 };
166};
167
168&ir {
169 status = "okay";
170 pinctrl-0 = <&remote_input_ao_pins>;
Beniamino Galvani77e425d2016-08-16 11:49:48 +0200171 pinctrl-names = "default";
Beniamino Galvanid1037e42016-05-08 08:30:16 +0200172};
Heiner Kallweit4b90b402017-04-12 20:28:36 +0200173
174&i2c_A {
175 status = "okay";
176 pinctrl-0 = <&i2c_a_pins>;
177 pinctrl-names = "default";
178};
179
180&usb0_phy {
181 status = "okay";
182 phy-supply = <&usb_otg_pwr>;
183};
184
185&usb1_phy {
186 status = "okay";
187};
188
189&usb0 {
190 status = "okay";
191};
192
193&usb1 {
194 status = "okay";
195};
196
197/* SD */
198&sd_emmc_b {
199 status = "okay";
200 pinctrl-0 = <&sdcard_pins>;
201 pinctrl-names = "default";
202
203 bus-width = <4>;
204 cap-sd-highspeed;
205 max-frequency = <100000000>;
206 disable-wp;
207
208 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
209 cd-inverted;
210
211 vmmc-supply = <&tflash_vdd>;
212 vqmmc-supply = <&tf_io>;
213};
214
215/* eMMC */
216&sd_emmc_c {
217 status = "okay";
218 pinctrl-0 = <&emmc_pins>;
219 pinctrl-names = "default";
220
221 bus-width = <8>;
222 cap-sd-highspeed;
223 max-frequency = <200000000>;
224 non-removable;
225 disable-wp;
226 cap-mmc-highspeed;
227 mmc-ddr-1_8v;
228 mmc-hs200-1_8v;
229
230 mmc-pwrseq = <&emmc_pwrseq>;
231 vmmc-supply = <&vcc3v3>;
232 vqmmc-supply = <&vcc1v8>;
233};