blob: 69ca14ac10fa097633562cb96db4f088e543ebd9 [file] [log] [blame]
Jerome Brunetcd84aff2017-06-19 11:04:40 +02001/*
2 * Copyright (c) 2017 BayLibre, SAS.
3 * Author: Neil Armstrong <narmstrong@baylibre.com>
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
5 *
6 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
7 */
8
9/dts-v1/;
10
11#include <dt-bindings/input/input.h>
12
Jerome Brunet72fb2c82017-07-17 18:03:01 +020013#include "meson-gxl-s905x.dtsi"
Jerome Brunetcd84aff2017-06-19 11:04:40 +020014
15/ {
16 compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
17 model = "Libre Technology CC";
18
Jerome Brunet72fb2c82017-07-17 18:03:01 +020019 aliases {
20 serial0 = &uart_AO;
21 };
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 };
26
Jerome Brunetcd84aff2017-06-19 11:04:40 +020027 cvbs-connector {
28 compatible = "composite-video-connector";
29
30 port {
31 cvbs_connector_in: endpoint {
32 remote-endpoint = <&cvbs_vdac_out>;
33 };
34 };
35 };
36
Jerome Brunet72fb2c82017-07-17 18:03:01 +020037 emmc_pwrseq: emmc-pwrseq {
38 compatible = "mmc-pwrseq-emmc";
39 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
40 };
41
Jerome Brunetcd84aff2017-06-19 11:04:40 +020042 hdmi-connector {
43 compatible = "hdmi-connector";
44 type = "a";
45
46 port {
47 hdmi_connector_in: endpoint {
48 remote-endpoint = <&hdmi_tx_tmds_out>;
49 };
50 };
51 };
52
53 leds {
54 compatible = "gpio-leds";
55
56 system {
57 label = "librecomputer:system-status";
58 gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
59 default-state = "on";
60 panic-indicator;
61 };
62
63 blue {
64 label = "librecomputer:blue";
65 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
66 linux,default-trigger = "heartbeat";
67 };
68 };
Jerome Brunet72fb2c82017-07-17 18:03:01 +020069
70 memory@0 {
71 device_type = "memory";
72 reg = <0x0 0x0 0x0 0x80000000>;
73 };
74
75 vcc_3v3: regulator-vcc_3v3 {
76 compatible = "regulator-fixed";
77 regulator-name = "VCC_3V3";
78 regulator-min-microvolt = <3300000>;
79 regulator-max-microvolt = <3300000>;
80 };
81
82 vcc_card: regulator-vcc-card {
83 compatible = "regulator-gpio";
84
85 regulator-name = "VCC_CARD";
86 regulator-min-microvolt = <1800000>;
87 regulator-max-microvolt = <3300000>;
88
89 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
90 gpios-states = <0>;
91
92 states = <3300000 0>,
93 <1800000 1>;
94 };
95
96 vddio_boot: regulator-vddio_boot {
97 compatible = "regulator-fixed";
98 regulator-name = "VDDIO_BOOT";
99 regulator-min-microvolt = <3300000>;
100 regulator-max-microvolt = <3300000>;
101 };
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200102};
103
Neil Armstrongb16c71c2017-08-04 15:12:13 +0200104&cec_AO {
105 status = "okay";
106 pinctrl-0 = <&ao_cec_pins>;
107 pinctrl-names = "default";
108 hdmi-phandle = <&hdmi_tx>;
109};
110
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200111&cvbs_vdac_port {
112 cvbs_vdac_out: endpoint {
113 remote-endpoint = <&cvbs_connector_in>;
114 };
115};
116
Jerome Brunet72fb2c82017-07-17 18:03:01 +0200117&ethmac {
118 status = "okay";
119};
120
121&ir {
122 status = "okay";
123 pinctrl-0 = <&remote_input_ao_pins>;
124 pinctrl-names = "default";
125};
126
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200127&hdmi_tx {
128 status = "okay";
129 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
130 pinctrl-names = "default";
131};
132
133&hdmi_tx_tmds_port {
134 hdmi_tx_tmds_out: endpoint {
135 remote-endpoint = <&hdmi_connector_in>;
136 };
137};
138
Neil Armstrong47884c52017-08-04 15:38:04 +0200139&pinctrl_aobus {
140 gpio-line-names = "UART TX",
141 "UART RX",
142 "Blue LED",
143 "SDCard Voltage Switch",
144 "7J1 Header Pin5",
145 "7J1 Header Pin3",
146 "7J1 Header Pin12",
147 "IR In",
148 "9J3 Switch HDMI CEC/7J1 Header Pin11",
149 "7J1 Header Pin13";
150};
151
152&pinctrl_periphs {
153 gpio-line-names = /* Bank GPIOZ */
154 "", "", "", "", "", "", "",
155 "", "", "", "", "", "", "",
156 "Eth Link LED", "Eth Activity LED",
157 /* Bank GPIOH */
158 "HDMI HPD", "HDMI SDA", "HDMI SCL",
159 "HDMI_5V_EN", "9J1 Header Pin2",
160 "Analog Audio Mute",
161 "2J3 Header Pin6",
162 "2J3 Header Pin5",
163 "2J3 Header Pin4",
164 "2J3 Header Pin3",
165 /* Bank BOOT */
166 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3",
167 "eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7",
168 "eMMC Clk", "eMMC Reset", "eMMC CMD",
169 "ALT BOOT MODE", "", "", "", "eMMC Data Strobe",
170 /* Bank CARD */
171 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
172 "SDCard D3", "SDCard D2", "SDCard Det",
173 /* Bank GPIODV */
174 "", "", "", "", "", "", "", "", "", "", "", "",
175 "", "", "", "", "", "", "", "", "", "", "", "",
176 "Green LED", "VCCK Enable",
177 "7J1 Header Pin27", "7J1 Header Pin28",
178 "VCCK Regulator", "VDDEE Regulator",
179 /* Bank GPIOX */
180 "7J1 Header Pin22", "7J1 Header Pin26",
181 "7J1 Header Pin36", "7J1 Header Pin38",
182 "7J1 Header Pin40", "7J1 Header Pin37",
183 "7J1 Header Pin33", "7J1 Header Pin35",
184 "7J1 Header Pin19", "7J1 Header Pin21",
185 "7J1 Header Pin24", "7J1 Header Pin23",
186 "7J1 Header Pin8", "7J1 Header Pin10",
187 "7J1 Header Pin16", "7J1 Header Pin18",
188 "7J1 Header Pin32", "7J1 Header Pin29",
189 "7J1 Header Pin31",
190 /* Bank GPIOCLK */
191 "7J1 Header Pin7", "",
192 /* GPIO_TEST_N */
193 "7J1 Header Pin15";
194};
195
Jerome Brunet72fb2c82017-07-17 18:03:01 +0200196/* SD card */
197&sd_emmc_b {
198 status = "okay";
199 pinctrl-0 = <&sdcard_pins>;
200 pinctrl-names = "default";
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200201
Jerome Brunet72fb2c82017-07-17 18:03:01 +0200202 bus-width = <4>;
203 cap-sd-highspeed;
204 max-frequency = <100000000>;
205 disable-wp;
206
207 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
208 cd-inverted;
209
210 vmmc-supply = <&vcc_3v3>;
211 vqmmc-supply = <&vcc_card>;
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200212};
213
Jerome Brunet72fb2c82017-07-17 18:03:01 +0200214/* eMMC */
215&sd_emmc_c {
216 status = "okay";
217 pinctrl-0 = <&emmc_pins>;
218 pinctrl-names = "default";
219
220 bus-width = <8>;
221 cap-mmc-highspeed;
222 max-frequency = <50000000>;
223 non-removable;
224 disable-wp;
225
226 mmc-pwrseq = <&emmc_pwrseq>;
227 vmmc-supply = <&vcc_3v3>;
228 vqmmc-supply = <&vddio_boot>;
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200229};
230
Jerome Brunet72fb2c82017-07-17 18:03:01 +0200231&uart_AO {
232 status = "okay";
233 pinctrl-0 = <&uart_ao_a_pins>;
234 pinctrl-names = "default";
Jerome Brunetcd84aff2017-06-19 11:04:40 +0200235};