xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/dove-sbc-a510.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Device Tree file for Compulab SBC-A510 Single Board Computer
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 * SBC-A510 comprises a PCA9555 I2C GPIO expander its GPIO lines connected to
47*4882a593Smuzhiyun *
48*4882a593Smuzhiyun * 0.0 USB0 VBUS_EN (active high)
49*4882a593Smuzhiyun * 0.1 USB0 VBUS_GOOD
50*4882a593Smuzhiyun * 0.2 DVI transmitter TI TFP410 MSEN
51*4882a593Smuzhiyun * 0.3 DVI transmitter TI TFP410 PD# (active low power down)
52*4882a593Smuzhiyun * 0.4 LVDS transmitter DS90C365 PD# (active low power down)
53*4882a593Smuzhiyun * 0.5 LCD nRST (active low reset)
54*4882a593Smuzhiyun * 0.6 PCIe0 nRST (active low reset)
55*4882a593Smuzhiyun * 0.7 mini-PCIe slot W_DISABLE#
56*4882a593Smuzhiyun *
57*4882a593Smuzhiyun * 1.0 MMC WP
58*4882a593Smuzhiyun * 1.1 Camera Input FPC FLASH_STB and P21.5
59*4882a593Smuzhiyun * 1.2 Camera Input FPC WE        and P21.22
60*4882a593Smuzhiyun * 1.3 MMC VCC_EN (active high)   and P21.7
61*4882a593Smuzhiyun * 1.4 Camera Input FPC AFTR_RST  and P21.17
62*4882a593Smuzhiyun * 1.5 Camera Input FPC OE        and P21.19
63*4882a593Smuzhiyun * 1.6 Camera Input FPC SNPSHT    and P21.6
64*4882a593Smuzhiyun * 1.7 Camera Input FPC SHTR      and P21.10
65*4882a593Smuzhiyun */
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun/dts-v1/;
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun#include "dove-cm-a510.dtsi"
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun/ {
72*4882a593Smuzhiyun	model = "Compulab SBC-A510";
73*4882a593Smuzhiyun	compatible = "compulab,sbc-a510", "compulab,cm-a510", "marvell,dove";
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun	chosen {
76*4882a593Smuzhiyun		stdout-path = &uart0;
77*4882a593Smuzhiyun	};
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun	regulators {
80*4882a593Smuzhiyun		usb0_power: regulator@2 {
81*4882a593Smuzhiyun			compatible = "regulator-fixed";
82*4882a593Smuzhiyun			regulator-name = "USB Power";
83*4882a593Smuzhiyun			regulator-min-microvolt = <5000000>;
84*4882a593Smuzhiyun			regulator-max-microvolt = <5000000>;
85*4882a593Smuzhiyun			gpio = <&gpio_ext 0 GPIO_ACTIVE_HIGH>;
86*4882a593Smuzhiyun		};
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun		mmc_power: regulator@3 {
89*4882a593Smuzhiyun			compatible = "regulator-fixed";
90*4882a593Smuzhiyun			regulator-name = "MMC Power";
91*4882a593Smuzhiyun			regulator-min-microvolt = <3300000>;
92*4882a593Smuzhiyun			regulator-max-microvolt = <3300000>;
93*4882a593Smuzhiyun			gpio = <&gpio_ext 13 GPIO_ACTIVE_HIGH>;
94*4882a593Smuzhiyun		};
95*4882a593Smuzhiyun	};
96*4882a593Smuzhiyun};
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun/* Ethernet0 depends on CM-A510 option E1 */
99*4882a593Smuzhiyun&mdio { status = "disabled"; };
100*4882a593Smuzhiyun&eth { status = "disabled"; };
101*4882a593Smuzhiyun&ethphy { status = "disabled"; };
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun/*
104*4882a593Smuzhiyun * USB port 0 can be powered and monitored by I2C GPIO expander:
105*4882a593Smuzhiyun *  VBUS_ENABLE on GPIO0, VBUS_GOOD on GPIO1
106*4882a593Smuzhiyun */
107*4882a593Smuzhiyun&ehci0 {
108*4882a593Smuzhiyun	status = "okay";
109*4882a593Smuzhiyun	vbus-supply = <&usb0_power>;
110*4882a593Smuzhiyun};
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun/* USB port 1 (and ports 2, 3 if CM-A510 has U4 option) */
113*4882a593Smuzhiyun&ehci1 { status = "okay"; };
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun/*
116*4882a593Smuzhiyun * I2C bus layout:
117*4882a593Smuzhiyun * i2c0:
118*4882a593Smuzhiyun *  - Audio Codec, 0x1a (option from CM-A510)
119*4882a593Smuzhiyun *  - DVI transmitter TI TFP410, 0x39
120*4882a593Smuzhiyun *  - HDMI/DVI DDC channel
121*4882a593Smuzhiyun * i2c1:
122*4882a593Smuzhiyun *  - GPIO expander, NXP PCA9555, 0x20
123*4882a593Smuzhiyun *  - VGA DDC channel
124*4882a593Smuzhiyun */
125*4882a593Smuzhiyun&i2c {
126*4882a593Smuzhiyun	pinctrl-0 = <&pmx_i2c1>;
127*4882a593Smuzhiyun	pinctrl-names = "default";
128*4882a593Smuzhiyun};
129*4882a593Smuzhiyun
130*4882a593Smuzhiyun&i2c0 {
131*4882a593Smuzhiyun	/* TI TFP410 DVI transmitter */
132*4882a593Smuzhiyun	dvi: video@39 {
133*4882a593Smuzhiyun		compatible = "ti,tfp410";
134*4882a593Smuzhiyun		reg = <0x39>;
135*4882a593Smuzhiyun		powerdown-gpio = <&gpio_ext 3 GPIO_ACTIVE_LOW>;
136*4882a593Smuzhiyun	};
137*4882a593Smuzhiyun};
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun&i2c1 {
140*4882a593Smuzhiyun	status = "okay";
141*4882a593Smuzhiyun
142*4882a593Smuzhiyun	/* NXP PCA9555 GPIO expander */
143*4882a593Smuzhiyun	gpio_ext: gpio@20 {
144*4882a593Smuzhiyun		compatible = "nxp,pca9555";
145*4882a593Smuzhiyun		reg = <0x20>;
146*4882a593Smuzhiyun		#gpio-cells = <2>;
147*4882a593Smuzhiyun	};
148*4882a593Smuzhiyun};
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun&pcie { status = "okay"; };
151*4882a593Smuzhiyun
152*4882a593Smuzhiyun/*
153*4882a593Smuzhiyun * PCIe0 can be configured by Jumper E1 to be either connected to
154*4882a593Smuzhiyun * a mini-PCIe slot or a Pericom PI7C9X111 PCIe-to-PCI bridge.
155*4882a593Smuzhiyun */
156*4882a593Smuzhiyun&pcie0 {
157*4882a593Smuzhiyun	status = "okay";
158*4882a593Smuzhiyun	pinctrl-0 = <&pmx_pcie0_clkreq>;
159*4882a593Smuzhiyun	pinctrl-names = "default";
160*4882a593Smuzhiyun	reset-gpios = <&gpio_ext 6 GPIO_ACTIVE_LOW>;
161*4882a593Smuzhiyun};
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun/* Ethernet1 depends on CM-A510 option E2 */
164*4882a593Smuzhiyun&pcie1 { status = "disabled"; };
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun/* SATA connector */
167*4882a593Smuzhiyun&sata0 { status = "okay"; };
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun/*
170*4882a593Smuzhiyun * SDIO0 is connected to a MMC/SD/SDIO socket, I2C GPIO expander has
171*4882a593Smuzhiyun *  VCC_MMC_ENABLE on GPIO13, MMC_WP on GPIO10
172*4882a593Smuzhiyun */
173*4882a593Smuzhiyun&sdio0 {
174*4882a593Smuzhiyun	vmmc-supply = <&mmc_power>;
175*4882a593Smuzhiyun	wp-gpios = <&gpio_ext 10 GPIO_ACTIVE_LOW>;
176*4882a593Smuzhiyun	status = "okay";
177*4882a593Smuzhiyun};
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun/* UART0 on RS232 mini-connector */
180*4882a593Smuzhiyun&uart0 { status = "okay"; };
181*4882a593Smuzhiyun/* UART2 on pin headers */
182*4882a593Smuzhiyun&uart2 { status = "okay"; };
183