xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/dove-cm-a510.dtsi (revision 725a9f47324d42037db93c27ceb40d4956872f3e)
1/*
2 * Device Tree include for Compulab CM-A510 System-on-Module
3 *
4 * Copyright (C) 2015, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
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 file 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; version 2 of the
14 *     License.
15 *
16 *     This file 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/*
46 * The CM-A510 comes with several optional components:
47 *
48 * Memory options:
49 *  D512: 512M
50 *  D1024: 1G
51 *
52 * NAND options:
53 *  N512: 512M NAND
54 *
55 * Ethernet options:
56 *  E1: PHY RTL8211D on internal GbE (SMI address 0x03)
57 *  E2: Additional ethernet NIC RTL8111D on PCIe1
58 *
59 * Audio options:
60 *  A: TI TLV320AIC23b audio codec (I2C address 0x1a)
61 *
62 * Touchscreen options:
63 *  I: TI TSC2046 touchscreen controller (on SPI1)
64 *
65 * USB options:
66 *  U2: 2 dual-role USB2.0 ports
67 *  U4: 2 additional USB2.0 host ports (via USB1)
68 *
69 * WiFi options:
70 *  W: Broadcom BCM4319 802.11b/g/n (USI WM-N-BM-01 on SDIO1)
71 *
72 * GPIOs used on CM-A510:
73 *   1 GbE PHY reset (active low)
74 *   3 WakeUp
75 *   8 PowerOff (active low)
76 *  13 Touchscreen pen irq (active low)
77 *  65 System LED (active high)
78 *  69 USB Hub reset (active low)
79 *  70 WLAN reset (active low)
80 *  71 WLAN regulator (active high)
81 */
82
83#include "dove.dtsi"
84
85/ {
86	model = "Compulab CM-A510";
87	compatible = "compulab,cm-a510", "marvell,dove";
88
89	/*
90	 * Set the minimum memory size here and let the
91	 * bootloader set the real size.
92	 */
93	memory {
94		device_type = "memory";
95		reg = <0x00000000 0x20000000>;
96	};
97
98	leds {
99		compatible = "gpio-leds";
100		/* Set upper NAND data bit to GPO */
101		pinctrl-0 = <&pmx_nand_gpo>;
102		pinctrl-names = "default";
103
104		led-system {
105			label = "cm-a510:system:green";
106			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
107			default-state = "keep";
108		};
109	};
110
111	regulators {
112		compatible = "simple-bus";
113		#address-cells = <1>;
114		#size-cells = <0>;
115
116		wifi_power: regulator@1 {
117			compatible = "regulator-fixed";
118			regulator-name = "WiFi Power";
119			regulator-min-microvolt = <3300000>;
120			regulator-max-microvolt = <3300000>;
121			gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>;
122		};
123	};
124};
125
126/* Optional RTL8211D GbE PHY on SMI address 0x03 */
127&mdio {
128	ethphy: ethernet-phy@3 {
129		reg = <3>;
130		status = "disabled";
131	};
132};
133
134&eth {
135	ethernet-port@0 {
136		phy-handle = <&ethphy>;
137	};
138};
139
140&i2c0 {
141	/* Optional TI TLV320AIC23b audio codec */
142	opt_audio: audio@1a {
143		compatible = "ti,tlv320aic23";
144		reg = <0x1a>;
145		status = "disabled";
146	};
147};
148
149/* Optional RTL8111D GbE NIC on PCIe1 */
150&pcie { status = "disabled"; };
151
152&pcie1 {
153	pinctrl-0 = <&pmx_pcie1_clkreq>;
154	pinctrl-names = "default";
155	status = "disabled";
156};
157
158&pinctrl {
159	pmx_uart2: pmx-uart2 {
160		marvell,pins = "mpp14", "mpp15";
161		marvell,function = "uart2";
162	};
163};
164
165/* Optional Broadcom BCM4319 802.11b/g/n WiFi module */
166&sdio1 {
167	non-removable;
168	vmmc-supply = <&wifi_power>;
169	reset-gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
170	status = "disabled";
171};
172
173&spi0 {
174	status = "okay";
175
176	/* 1M Flash Winbond W25Q80BL */
177	flash@0 {
178		compatible = "winbond,w25q80";
179		spi-max-frequency = <80000000>;
180		reg = <0>;
181	};
182};
183
184&spi1 {
185	pinctrl-0 = <&pmx_spi1_20_23>;
186	pinctrl-names = "default";
187	status = "disabled";
188
189	/* Optional TI TSC2046 touchscreen controller */
190	opt_touch: touchscreen@0 {
191		compatible = "ti,tsc2046";
192		spi-max-frequency = <2500000>;
193		reg = <0>;
194		pinctrl-0 = <&pmx_gpio_13>;
195		pinctrl-names = "default";
196		interrupts-extended = <&gpio0 13 IRQ_TYPE_EDGE_FALLING>;
197	};
198};
199
200&uart2 {
201	pinctrl-0 = <&pmx_uart2>;
202	pinctrl-names = "default";
203};
204