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