2 * Copyright (c) 2017 Andreas Färber
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
9 * a) This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
42 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
47 #include "meson-gxbb.dtsi"
48 #include <dt-bindings/gpio/gpio.h>
51 compatible = "friendlyarm,nanopi-k2", "amlogic,meson-gxbb";
58 stdout-path = "serial0:115200n8";
62 device_type = "memory";
63 reg = <0x0 0x0 0x0 0x80000000>;
67 compatible = "gpio-leds";
70 label = "nanopi-k2:blue:stat";
71 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
77 vdd_5v: regulator-vdd-5v {
78 compatible = "regulator-fixed";
79 regulator-name = "VDD_5V";
80 regulator-min-microvolt = <5000000>;
81 regulator-max-microvolt = <5000000>;
84 vddio_ao18: regulator-vddio-ao18 {
85 compatible = "regulator-fixed";
86 regulator-name = "VDDIO_AO18";
87 regulator-min-microvolt = <1800000>;
88 regulator-max-microvolt = <1800000>;
91 vddio_ao3v3: regulator-vddio-ao3v3 {
92 compatible = "regulator-fixed";
93 regulator-name = "VDDIO_AO3.3V";
94 regulator-min-microvolt = <3300000>;
95 regulator-max-microvolt = <3300000>;
98 vddio_tf: regulator-vddio-tf {
99 compatible = "regulator-gpio";
101 regulator-name = "VDDIO_TF";
102 regulator-min-microvolt = <1800000>;
103 regulator-max-microvolt = <3300000>;
105 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
108 states = <3300000 0>,
113 compatible = "pwm-clock";
115 clock-frequency = <32768>;
116 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
119 sdio_pwrseq: sdio-pwrseq {
120 compatible = "mmc-pwrseq-simple";
121 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
122 clocks = <&wifi_32k>;
123 clock-names = "ext_clock";
126 vcc1v8: regulator-vcc1v8 {
127 compatible = "regulator-fixed";
128 regulator-name = "VCC1.8V";
129 regulator-min-microvolt = <1800000>;
130 regulator-max-microvolt = <1800000>;
133 vcc3v3: regulator-vcc3v3 {
134 compatible = "regulator-fixed";
135 regulator-name = "VCC3.3V";
136 regulator-min-microvolt = <3300000>;
137 regulator-max-microvolt = <3300000>;
140 emmc_pwrseq: emmc-pwrseq {
141 compatible = "mmc-pwrseq-emmc";
142 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
148 pinctrl-0 = <ð_rgmii_pins>;
149 pinctrl-names = "default";
151 phy-handle = <ð_phy0>;
154 amlogic,tx-delay-ns = <2>;
156 snps,reset-gpio = <&gpio GPIOZ_14 0>;
157 snps,reset-delays-us = <0 10000 1000000>;
158 snps,reset-active-low;
161 compatible = "snps,dwmac-mdio";
162 #address-cells = <1>;
165 eth_phy0: ethernet-phy@0 {
166 /* Realtek RTL8211F (0x001cc916) */
174 pinctrl-0 = <&remote_input_ao_pins>;
175 pinctrl-names = "default";
179 gpio-line-names = "UART TX", "UART RX", "Power Control", "Power Key In",
180 "VCCK En", "CON1 Header Pin31",
181 "I2S Header Pin6", "IR In", "I2S Header Pin7",
182 "I2S Header Pin3", "I2S Header Pin4",
183 "I2S Header Pin5", "HDMI CEC", "SYS LED";
187 gpio-line-names = /* Bank GPIOZ */
188 "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
189 "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
190 "Eth RX D3", "Eth RGMII TX Clk", "Eth TX En",
191 "Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3",
192 "Eth PHY nRESET", "Eth PHY Intc",
194 "HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL",
197 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4",
198 "eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk",
199 "eMMC Reset", "eMMC CMD",
200 "", "", "", "", "eMMC DS",
203 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
204 "SDCard D3", "SDCard D2", "SDCard Det",
206 "", "", "", "", "", "", "", "", "", "", "", "", "",
207 "", "", "", "", "", "", "", "", "", "", "",
208 "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK",
209 "VDDEE Regulator", "VCCK Regulator",
211 "CON1 Header Pin7", "CON1 Header Pin11",
212 "CON1 Header Pin13", "CON1 Header Pin15",
213 "CON1 Header Pin18", "CON1 Header Pin19",
214 "CON1 Header Pin22", "CON1 Header Pin21",
215 "CON1 Header Pin24", "CON1 Header Pin23",
216 "CON1 Header Pin26", "CON1 Header Pin29",
217 "CON1 Header Pin32", "CON1 Header Pin8",
218 "CON1 Header Pin10", "CON1 Header Pin16",
221 "WIFI SDIO D0", "WIFI SDIO D1", "WIFI SDIO D2",
222 "WIFI SDIO D3", "WIFI SDIO CLK", "WIFI SDIO CMD",
223 "WIFI Power Enable", "WIFI WAKE HOST",
224 "Bluetooth PCM DOUT", "Bluetooth PCM DIN",
225 "Bluetooth PCM SYNC", "Bluetooth PCM CLK",
226 "Bluetooth UART TX", "Bluetooth UART RX",
227 "Bluetooth UART CTS", "Bluetooth UART RTS",
228 "", "", "", "WIFI 32K", "Bluetooth Enable",
229 "Bluetooth WAKE HOST",
231 "", "CON1 Header Pin35", "", "",
238 pinctrl-0 = <&pwm_e_pins>;
239 pinctrl-names = "default";
240 clocks = <&clkc CLKID_FCLK_DIV4>;
241 clock-names = "clkin0";
246 vref-supply = <&vddio_ao18>;
252 pinctrl-0 = <&sdio_pins>, <&sdio_irq_pins>;
253 pinctrl-names = "default";
254 #address-cells = <1>;
259 max-frequency = <200000000>;
264 mmc-pwrseq = <&sdio_pwrseq>;
266 vmmc-supply = <&vddio_ao3v3>;
267 vqmmc-supply = <&vddio_ao18>;
270 compatible = "brcm,bcm4329-fmac";
278 pinctrl-0 = <&sdcard_pins>;
279 pinctrl-names = "default";
283 max-frequency = <100000000>;
286 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
289 vmmc-supply = <&vddio_ao3v3>;
290 vqmmc-supply = <&vddio_tf>;
296 pinctrl-0 = <&emmc_pins>;
297 pinctrl-names = "default";
301 max-frequency = <200000000>;
308 mmc-pwrseq = <&emmc_pwrseq>;
309 vmmc-supply = <&vcc3v3>;
310 vqmmc-supply = <&vcc1v8>;
316 pinctrl-0 = <&uart_ao_a_pins>;
317 pinctrl-names = "default";
320 /* Bluetooth on AP6212 */
323 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
324 pinctrl-names = "default";
330 pinctrl-0 = <&uart_c_pins>;
331 pinctrl-names = "default";
336 phy-supply = <&vdd_5v>;