xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm/dove-cm-a510.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Device Tree include for Compulab CM-A510 System-on-Module
3*4882a593Smuzhiyun *
4*4882a593Smuzhiyun * Copyright (C) 2015, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
5*4882a593Smuzhiyun *
6*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms
7*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual
8*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a
9*4882a593Smuzhiyun * whole.
10*4882a593Smuzhiyun *
11*4882a593Smuzhiyun *  a) This file is free software; you can redistribute it and/or
12*4882a593Smuzhiyun *     modify it under the terms of the GNU General Public License as
13*4882a593Smuzhiyun *     published by the Free Software Foundation; version 2 of the
14*4882a593Smuzhiyun *     License.
15*4882a593Smuzhiyun *
16*4882a593Smuzhiyun *     This file is distributed in the hope that it will be useful,
17*4882a593Smuzhiyun *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18*4882a593Smuzhiyun *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19*4882a593Smuzhiyun *     GNU General Public License for more details.
20*4882a593Smuzhiyun *
21*4882a593Smuzhiyun * Or, alternatively,
22*4882a593Smuzhiyun *
23*4882a593Smuzhiyun *  b) Permission is hereby granted, free of charge, to any person
24*4882a593Smuzhiyun *     obtaining a copy of this software and associated documentation
25*4882a593Smuzhiyun *     files (the "Software"), to deal in the Software without
26*4882a593Smuzhiyun *     restriction, including without limitation the rights to use,
27*4882a593Smuzhiyun *     copy, modify, merge, publish, distribute, sublicense, and/or
28*4882a593Smuzhiyun *     sell copies of the Software, and to permit persons to whom the
29*4882a593Smuzhiyun *     Software is furnished to do so, subject to the following
30*4882a593Smuzhiyun *     conditions:
31*4882a593Smuzhiyun *
32*4882a593Smuzhiyun *     The above copyright notice and this permission notice shall be
33*4882a593Smuzhiyun *     included in all copies or substantial portions of the Software.
34*4882a593Smuzhiyun *
35*4882a593Smuzhiyun *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36*4882a593Smuzhiyun *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37*4882a593Smuzhiyun *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38*4882a593Smuzhiyun *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39*4882a593Smuzhiyun *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40*4882a593Smuzhiyun *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41*4882a593Smuzhiyun *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42*4882a593Smuzhiyun *     OTHER DEALINGS IN THE SOFTWARE.
43*4882a593Smuzhiyun */
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun/*
46*4882a593Smuzhiyun * The CM-A510 comes with several optional components:
47*4882a593Smuzhiyun *
48*4882a593Smuzhiyun * Memory options:
49*4882a593Smuzhiyun *  D512: 512M
50*4882a593Smuzhiyun *  D1024: 1G
51*4882a593Smuzhiyun *
52*4882a593Smuzhiyun * NAND options:
53*4882a593Smuzhiyun *  N512: 512M NAND
54*4882a593Smuzhiyun *
55*4882a593Smuzhiyun * Ethernet options:
56*4882a593Smuzhiyun *  E1: PHY RTL8211D on internal GbE (SMI address 0x03)
57*4882a593Smuzhiyun *  E2: Additional ethernet NIC RTL8111D on PCIe1
58*4882a593Smuzhiyun *
59*4882a593Smuzhiyun * Audio options:
60*4882a593Smuzhiyun *  A: TI TLV320AIC23b audio codec (I2C address 0x1a)
61*4882a593Smuzhiyun *
62*4882a593Smuzhiyun * Touchscreen options:
63*4882a593Smuzhiyun *  I: TI TSC2046 touchscreen controller (on SPI1)
64*4882a593Smuzhiyun *
65*4882a593Smuzhiyun * USB options:
66*4882a593Smuzhiyun *  U2: 2 dual-role USB2.0 ports
67*4882a593Smuzhiyun *  U4: 2 additional USB2.0 host ports (via USB1)
68*4882a593Smuzhiyun *
69*4882a593Smuzhiyun * WiFi options:
70*4882a593Smuzhiyun *  W: Broadcom BCM4319 802.11b/g/n (USI WM-N-BM-01 on SDIO1)
71*4882a593Smuzhiyun *
72*4882a593Smuzhiyun * GPIOs used on CM-A510:
73*4882a593Smuzhiyun *   1 GbE PHY reset (active low)
74*4882a593Smuzhiyun *   3 WakeUp
75*4882a593Smuzhiyun *   8 PowerOff (active low)
76*4882a593Smuzhiyun *  13 Touchscreen pen irq (active low)
77*4882a593Smuzhiyun *  65 System LED (active high)
78*4882a593Smuzhiyun *  69 USB Hub reset (active low)
79*4882a593Smuzhiyun *  70 WLAN reset (active low)
80*4882a593Smuzhiyun *  71 WLAN regulator (active high)
81*4882a593Smuzhiyun */
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun#include "dove.dtsi"
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun/ {
86*4882a593Smuzhiyun	model = "Compulab CM-A510";
87*4882a593Smuzhiyun	compatible = "compulab,cm-a510", "marvell,dove";
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun	/*
90*4882a593Smuzhiyun	 * Set the minimum memory size here and let the
91*4882a593Smuzhiyun	 * bootloader set the real size.
92*4882a593Smuzhiyun	 */
93*4882a593Smuzhiyun	memory {
94*4882a593Smuzhiyun		device_type = "memory";
95*4882a593Smuzhiyun		reg = <0x00000000 0x20000000>;
96*4882a593Smuzhiyun	};
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun	leds {
99*4882a593Smuzhiyun		compatible = "gpio-leds";
100*4882a593Smuzhiyun		/* Set upper NAND data bit to GPO */
101*4882a593Smuzhiyun		pinctrl-0 = <&pmx_nand_gpo>;
102*4882a593Smuzhiyun		pinctrl-names = "default";
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun		system {
105*4882a593Smuzhiyun			label = "cm-a510:system:green";
106*4882a593Smuzhiyun			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
107*4882a593Smuzhiyun			default-state = "keep";
108*4882a593Smuzhiyun		};
109*4882a593Smuzhiyun	};
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun	regulators {
112*4882a593Smuzhiyun		compatible = "simple-bus";
113*4882a593Smuzhiyun		#address-cells = <1>;
114*4882a593Smuzhiyun		#size-cells = <0>;
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun		wifi_power: regulator@1 {
117*4882a593Smuzhiyun			compatible = "regulator-fixed";
118*4882a593Smuzhiyun			regulator-name = "WiFi Power";
119*4882a593Smuzhiyun			regulator-min-microvolt = <3300000>;
120*4882a593Smuzhiyun			regulator-max-microvolt = <3300000>;
121*4882a593Smuzhiyun			gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>;
122*4882a593Smuzhiyun		};
123*4882a593Smuzhiyun	};
124*4882a593Smuzhiyun};
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun/* Optional RTL8211D GbE PHY on SMI address 0x03 */
127*4882a593Smuzhiyun&ethphy {
128*4882a593Smuzhiyun	reg = <3>;
129*4882a593Smuzhiyun	status = "disabled";
130*4882a593Smuzhiyun};
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun&i2c0 {
133*4882a593Smuzhiyun	/* Optional TI TLV320AIC23b audio codec */
134*4882a593Smuzhiyun	opt_audio: audio@1a {
135*4882a593Smuzhiyun		compatible = "ti,tlv320aic23";
136*4882a593Smuzhiyun		reg = <0x1a>;
137*4882a593Smuzhiyun		status = "disabled";
138*4882a593Smuzhiyun	};
139*4882a593Smuzhiyun};
140*4882a593Smuzhiyun
141*4882a593Smuzhiyun/* Optional RTL8111D GbE NIC on PCIe1 */
142*4882a593Smuzhiyun&pcie { status = "disabled"; };
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun&pcie1 {
145*4882a593Smuzhiyun	pinctrl-0 = <&pmx_pcie1_clkreq>;
146*4882a593Smuzhiyun	pinctrl-names = "default";
147*4882a593Smuzhiyun	status = "disabled";
148*4882a593Smuzhiyun};
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun&pinctrl {
151*4882a593Smuzhiyun	pmx_uart2: pmx-uart2 {
152*4882a593Smuzhiyun		marvell,pins = "mpp14", "mpp15";
153*4882a593Smuzhiyun		marvell,function = "uart2";
154*4882a593Smuzhiyun	};
155*4882a593Smuzhiyun};
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun/* Optional Broadcom BCM4319 802.11b/g/n WiFi module */
158*4882a593Smuzhiyun&sdio1 {
159*4882a593Smuzhiyun	non-removable;
160*4882a593Smuzhiyun	vmmc-supply = <&wifi_power>;
161*4882a593Smuzhiyun	reset-gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
162*4882a593Smuzhiyun	status = "disabled";
163*4882a593Smuzhiyun};
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun&spi0 {
166*4882a593Smuzhiyun	status = "okay";
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun	/* 1M Flash Winbond W25Q80BL */
169*4882a593Smuzhiyun	flash@0 {
170*4882a593Smuzhiyun		compatible = "winbond,w25q80";
171*4882a593Smuzhiyun		spi-max-frequency = <80000000>;
172*4882a593Smuzhiyun		reg = <0>;
173*4882a593Smuzhiyun	};
174*4882a593Smuzhiyun};
175*4882a593Smuzhiyun
176*4882a593Smuzhiyun&spi1 {
177*4882a593Smuzhiyun	pinctrl-0 = <&pmx_spi1_20_23>;
178*4882a593Smuzhiyun	pinctrl-names = "default";
179*4882a593Smuzhiyun	status = "disabled";
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun	/* Optional TI TSC2046 touchscreen controller */
182*4882a593Smuzhiyun	opt_touch: touchscreen@0 {
183*4882a593Smuzhiyun		compatible = "ti,tsc2046";
184*4882a593Smuzhiyun		spi-max-frequency = <2500000>;
185*4882a593Smuzhiyun		reg = <0>;
186*4882a593Smuzhiyun		pinctrl-0 = <&pmx_gpio_13>;
187*4882a593Smuzhiyun		pinctrl-names = "default";
188*4882a593Smuzhiyun		interrupts-extended = <&gpio0 13 IRQ_TYPE_EDGE_FALLING>;
189*4882a593Smuzhiyun	};
190*4882a593Smuzhiyun};
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun&uart2 {
193*4882a593Smuzhiyun	pinctrl-0 = <&pmx_uart2>;
194*4882a593Smuzhiyun	pinctrl-names = "default";
195*4882a593Smuzhiyun};
196