xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun5i-gr8-chip-pro.dts (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1724ba675SRob Herring/*
2724ba675SRob Herring * Copyright 2016 Free Electrons
3724ba675SRob Herring * Copyright 2016 NextThing Co
4724ba675SRob Herring *
5724ba675SRob Herring * Maxime Ripard <maxime.ripard@free-electrons.com>
6724ba675SRob Herring *
7724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
8724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
9724ba675SRob Herring * licensing only applies to this file, and not this project as a
10724ba675SRob Herring * whole.
11724ba675SRob Herring *
12724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
13724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
14724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
15724ba675SRob Herring *     License, or (at your option) any later version.
16724ba675SRob Herring *
17724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
18724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20724ba675SRob Herring *     GNU General Public License for more details.
21724ba675SRob Herring *
22724ba675SRob Herring * Or, alternatively,
23724ba675SRob Herring *
24724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
25724ba675SRob Herring *     obtaining a copy of this software and associated documentation
26724ba675SRob Herring *     files (the "Software"), to deal in the Software without
27724ba675SRob Herring *     restriction, including without limitation the rights to use,
28724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
29724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
30724ba675SRob Herring *     Software is furnished to do so, subject to the following
31724ba675SRob Herring *     conditions:
32724ba675SRob Herring *
33724ba675SRob Herring *     The above copyright notice and this permission notice shall be
34724ba675SRob Herring *     included in all copies or substantial portions of the Software.
35724ba675SRob Herring *
36724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
44724ba675SRob Herring */
45724ba675SRob Herring
46724ba675SRob Herring/dts-v1/;
47724ba675SRob Herring#include "sun5i-gr8.dtsi"
48724ba675SRob Herring#include "sunxi-common-regulators.dtsi"
49724ba675SRob Herring
50724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
51724ba675SRob Herring#include <dt-bindings/input/input.h>
52724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
53724ba675SRob Herring
54724ba675SRob Herring/ {
55724ba675SRob Herring	model = "NextThing C.H.I.P. Pro";
56724ba675SRob Herring	compatible = "nextthing,chip-pro", "nextthing,gr8";
57724ba675SRob Herring
58724ba675SRob Herring	aliases {
59724ba675SRob Herring		i2c0 = &i2c0;
60724ba675SRob Herring		i2c1 = &i2c1;
61724ba675SRob Herring		serial0 = &uart1;
62724ba675SRob Herring		serial1 = &uart2;
63724ba675SRob Herring		serial2 = &uart3;
64724ba675SRob Herring	};
65724ba675SRob Herring
66724ba675SRob Herring	chosen {
67724ba675SRob Herring		stdout-path = "serial0:115200n8";
68724ba675SRob Herring	};
69724ba675SRob Herring
70724ba675SRob Herring	leds {
71724ba675SRob Herring		compatible = "gpio-leds";
72724ba675SRob Herring
73724ba675SRob Herring		led-0 {
74724ba675SRob Herring			label = "chip-pro:white:status";
75724ba675SRob Herring			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
76724ba675SRob Herring			default-state = "on";
77724ba675SRob Herring		};
78724ba675SRob Herring	};
79724ba675SRob Herring
80*0f47ef3fSKrzysztof Kozlowski	mmc0_pwrseq: pwrseq {
81724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
82724ba675SRob Herring		reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */
83724ba675SRob Herring	};
84724ba675SRob Herring};
85724ba675SRob Herring
86724ba675SRob Herring&codec {
87724ba675SRob Herring	status = "okay";
88724ba675SRob Herring};
89724ba675SRob Herring
90724ba675SRob Herring&ehci0 {
91724ba675SRob Herring	status = "okay";
92724ba675SRob Herring};
93724ba675SRob Herring
94724ba675SRob Herring&i2c0 {
95724ba675SRob Herring	status = "okay";
96724ba675SRob Herring
97724ba675SRob Herring	axp209: pmic@34 {
98724ba675SRob Herring		reg = <0x34>;
99724ba675SRob Herring
100724ba675SRob Herring		/*
101724ba675SRob Herring		* The interrupt is routed through the "External Fast
102724ba675SRob Herring		* Interrupt Request" pin (ball G13 of the module)
103724ba675SRob Herring		* directly to the main interrupt controller, without
104724ba675SRob Herring		* any other controller interfering.
105724ba675SRob Herring		*/
106724ba675SRob Herring		interrupts = <0>;
107724ba675SRob Herring	};
108724ba675SRob Herring};
109724ba675SRob Herring
110724ba675SRob Herring#include "axp209.dtsi"
111724ba675SRob Herring
112724ba675SRob Herring&i2c1 {
113724ba675SRob Herring	status = "disabled";
114724ba675SRob Herring};
115724ba675SRob Herring
116724ba675SRob Herring&i2s0 {
117724ba675SRob Herring	pinctrl-names = "default";
118724ba675SRob Herring	pinctrl-0 = <&i2s0_mclk_pin>, <&i2s0_data_pins>;
119724ba675SRob Herring	status = "disabled";
120724ba675SRob Herring};
121724ba675SRob Herring
122724ba675SRob Herring&mmc0 {
123724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
124724ba675SRob Herring	mmc-pwrseq = <&mmc0_pwrseq>;
125724ba675SRob Herring	bus-width = <4>;
126724ba675SRob Herring	non-removable;
127724ba675SRob Herring	status = "okay";
128724ba675SRob Herring};
129724ba675SRob Herring
130724ba675SRob Herring&nfc {
131724ba675SRob Herring	pinctrl-names = "default";
132724ba675SRob Herring	pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>;
133724ba675SRob Herring	status = "okay";
134724ba675SRob Herring
135724ba675SRob Herring	nand@0 {
136724ba675SRob Herring		reg = <0>;
137724ba675SRob Herring		allwinner,rb = <0>;
138724ba675SRob Herring		nand-ecc-mode = "hw";
139724ba675SRob Herring	};
140724ba675SRob Herring};
141724ba675SRob Herring
142724ba675SRob Herring&ohci0 {
143724ba675SRob Herring	status = "okay";
144724ba675SRob Herring};
145724ba675SRob Herring
146724ba675SRob Herring&otg_sram {
147724ba675SRob Herring	status = "okay";
148724ba675SRob Herring};
149724ba675SRob Herring
150724ba675SRob Herring&pwm {
151724ba675SRob Herring	pinctrl-names = "default";
152724ba675SRob Herring	pinctrl-0 = <&pwm0_pin>, <&pwm1_pins>;
153724ba675SRob Herring	status = "disabled";
154724ba675SRob Herring};
155724ba675SRob Herring
156724ba675SRob Herring&reg_dcdc2 {
157724ba675SRob Herring	regulator-min-microvolt = <1000000>;
158724ba675SRob Herring	regulator-max-microvolt = <1400000>;
159724ba675SRob Herring	regulator-name = "vdd-cpu";
160724ba675SRob Herring	regulator-always-on;
161724ba675SRob Herring};
162724ba675SRob Herring
163724ba675SRob Herring&reg_dcdc3 {
164724ba675SRob Herring	regulator-min-microvolt = <1000000>;
165724ba675SRob Herring	regulator-max-microvolt = <1300000>;
166724ba675SRob Herring	regulator-name = "vdd-sys";
167724ba675SRob Herring	regulator-always-on;
168724ba675SRob Herring};
169724ba675SRob Herring
170724ba675SRob Herring&reg_ldo1 {
171724ba675SRob Herring	regulator-name = "vdd-rtc";
172724ba675SRob Herring};
173724ba675SRob Herring
174724ba675SRob Herring&reg_ldo2 {
175724ba675SRob Herring	regulator-min-microvolt = <2700000>;
176724ba675SRob Herring	regulator-max-microvolt = <3300000>;
177724ba675SRob Herring	regulator-name = "avcc";
178724ba675SRob Herring	regulator-always-on;
179724ba675SRob Herring};
180724ba675SRob Herring
181724ba675SRob Herring/*
182724ba675SRob Herring * Both LDO3 and LDO4 are used in parallel to power up the
183724ba675SRob Herring * WiFi/BT chip.
184724ba675SRob Herring */
185724ba675SRob Herring&reg_ldo3 {
186724ba675SRob Herring	regulator-min-microvolt = <3300000>;
187724ba675SRob Herring	regulator-max-microvolt = <3300000>;
188724ba675SRob Herring	regulator-name = "vcc-wifi-1";
189724ba675SRob Herring	regulator-always-on;
190724ba675SRob Herring};
191724ba675SRob Herring
192724ba675SRob Herring&reg_ldo4 {
193724ba675SRob Herring	regulator-min-microvolt = <3300000>;
194724ba675SRob Herring	regulator-max-microvolt = <3300000>;
195724ba675SRob Herring	regulator-name = "vcc-wifi-2";
196724ba675SRob Herring	regulator-always-on;
197724ba675SRob Herring};
198724ba675SRob Herring
199724ba675SRob Herring&uart1 {
200724ba675SRob Herring	pinctrl-names = "default";
201724ba675SRob Herring	pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pins>;
202724ba675SRob Herring	status = "okay";
203724ba675SRob Herring};
204724ba675SRob Herring
205724ba675SRob Herring&uart2 {
206724ba675SRob Herring	pinctrl-names = "default";
207724ba675SRob Herring	pinctrl-0 = <&uart2_pd_pins>, <&uart2_cts_rts_pd_pins>;
208724ba675SRob Herring	status = "disabled";
209724ba675SRob Herring};
210724ba675SRob Herring
211724ba675SRob Herring&uart3 {
212724ba675SRob Herring	pinctrl-names = "default";
213724ba675SRob Herring	pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>;
214724ba675SRob Herring	status = "okay";
215724ba675SRob Herring};
216724ba675SRob Herring
217724ba675SRob Herring&usb_otg {
218724ba675SRob Herring	/*
219724ba675SRob Herring	 * The CHIP Pro doesn't have a controllable VBUS, nor does it
220724ba675SRob Herring	 * have any 5v rail on the board itself.
221724ba675SRob Herring	 *
222724ba675SRob Herring	 * If one wants to use it as a true OTG port, it should be
223724ba675SRob Herring	 * done in the baseboard, and its DT / overlay will add it.
224724ba675SRob Herring	 */
225724ba675SRob Herring	dr_mode = "otg";
226724ba675SRob Herring	status = "okay";
227724ba675SRob Herring};
228724ba675SRob Herring
229724ba675SRob Herring&usb_power_supply {
230724ba675SRob Herring	status = "okay";
231724ba675SRob Herring};
232724ba675SRob Herring
233724ba675SRob Herring&usbphy {
234724ba675SRob Herring	usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
235724ba675SRob Herring	usb0_vbus_power-supply = <&usb_power_supply>;
236724ba675SRob Herring	usb1_vbus-supply = <&reg_vcc5v0>;
237724ba675SRob Herring	status = "okay";
238724ba675SRob Herring};
239