1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2017 Andreas Färber
8 #include "meson-gxbb.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/sound/meson-aiu.h>
13 compatible = "friendlyarm,nanopi-k2", "amlogic,meson-gxbb";
14 model = "FriendlyARM NanoPi K2";
22 stdout-path = "serial0:115200n8";
26 device_type = "memory";
27 reg = <0x0 0x0 0x0 0x80000000>;
31 compatible = "gpio-leds";
34 label = "nanopi-k2:blue:stat";
35 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
41 vdd_5v: regulator-vdd-5v {
42 compatible = "regulator-fixed";
43 regulator-name = "VDD_5V";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
48 vddio_ao18: regulator-vddio-ao18 {
49 compatible = "regulator-fixed";
50 regulator-name = "VDDIO_AO18";
51 regulator-min-microvolt = <1800000>;
52 regulator-max-microvolt = <1800000>;
55 vddio_ao3v3: regulator-vddio-ao3v3 {
56 compatible = "regulator-fixed";
57 regulator-name = "VDDIO_AO3.3V";
58 regulator-min-microvolt = <3300000>;
59 regulator-max-microvolt = <3300000>;
62 vddio_tf: regulator-vddio-tf {
63 compatible = "regulator-gpio";
65 regulator-name = "VDDIO_TF";
66 regulator-min-microvolt = <1800000>;
67 regulator-max-microvolt = <3300000>;
69 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
75 regulator-settling-time-up-us = <100>;
76 regulator-settling-time-down-us = <5000>;
80 compatible = "pwm-clock";
82 clock-frequency = <32768>;
83 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
86 sdio_pwrseq: sdio-pwrseq {
87 compatible = "mmc-pwrseq-simple";
88 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
90 clock-names = "ext_clock";
93 vcc1v8: regulator-vcc1v8 {
94 compatible = "regulator-fixed";
95 regulator-name = "VCC1.8V";
96 regulator-min-microvolt = <1800000>;
97 regulator-max-microvolt = <1800000>;
100 vcc3v3: regulator-vcc3v3 {
101 compatible = "regulator-fixed";
102 regulator-name = "VCC3.3V";
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
107 emmc_pwrseq: emmc-pwrseq {
108 compatible = "mmc-pwrseq-emmc";
109 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
112 /* CVBS is available on CON1 pin 36, disabled by default */
114 compatible = "composite-video-connector";
118 cvbs_connector_in: endpoint {
119 remote-endpoint = <&cvbs_vdac_out>;
125 compatible = "hdmi-connector";
129 hdmi_connector_in: endpoint {
130 remote-endpoint = <&hdmi_tx_tmds_out>;
136 compatible = "amlogic,gx-sound-card";
138 assigned-clocks = <&clkc CLKID_MPLL0>,
141 assigned-clock-parents = <0>, <0>, <0>;
142 assigned-clock-rates = <294912000>,
147 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
151 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
156 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
161 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
164 sound-dai = <&hdmi_tx>;
176 pinctrl-0 = <&ao_cec_pins>;
177 pinctrl-names = "default";
178 hdmi-phandle = <&hdmi_tx>;
182 cvbs_vdac_out: endpoint {
183 remote-endpoint = <&cvbs_connector_in>;
189 pinctrl-0 = <ð_rgmii_pins>;
190 pinctrl-names = "default";
192 phy-handle = <ð_phy0>;
195 amlogic,tx-delay-ns = <2>;
198 compatible = "snps,dwmac-mdio";
199 #address-cells = <1>;
202 eth_phy0: ethernet-phy@0 {
203 /* Realtek RTL8211F (0x001cc916) */
206 reset-assert-us = <10000>;
207 reset-deassert-us = <80000>;
208 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
210 interrupt-parent = <&gpio_intc>;
211 /* MAC_INTR on GPIOZ_15 */
212 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
219 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
220 pinctrl-names = "default";
224 hdmi_tx_tmds_out: endpoint {
225 remote-endpoint = <&hdmi_connector_in>;
231 pinctrl-0 = <&remote_input_ao_pins>;
232 pinctrl-names = "default";
236 gpio-line-names = "UART TX", "UART RX", "Power Control", "Power Key In",
237 "VCCK En", "CON1 Header Pin31",
238 "I2S Header Pin6", "IR In", "I2S Header Pin7",
239 "I2S Header Pin3", "I2S Header Pin4",
240 "I2S Header Pin5", "HDMI CEC", "SYS LED",
246 gpio-line-names = /* Bank GPIOZ */
247 "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
248 "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
249 "Eth RX D3", "Eth RGMII TX Clk", "Eth TX En",
250 "Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3",
251 "Eth PHY nRESET", "Eth PHY Intc",
253 "HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL",
256 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4",
257 "eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk",
258 "eMMC Reset", "eMMC CMD",
259 "", "", "", "", "eMMC DS",
262 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
263 "SDCard D3", "SDCard D2", "SDCard Det",
265 "", "", "", "", "", "", "", "", "", "", "", "", "",
266 "", "", "", "", "", "", "", "", "", "", "",
267 "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK",
268 "VDDEE Regulator", "VCCK Regulator",
270 "CON1 Header Pin7", "CON1 Header Pin11",
271 "CON1 Header Pin13", "CON1 Header Pin15",
272 "CON1 Header Pin18", "CON1 Header Pin19",
273 "CON1 Header Pin22", "CON1 Header Pin21",
274 "CON1 Header Pin24", "CON1 Header Pin23",
275 "CON1 Header Pin26", "CON1 Header Pin29",
276 "CON1 Header Pin32", "CON1 Header Pin8",
277 "CON1 Header Pin10", "CON1 Header Pin16",
280 "WIFI SDIO D0", "WIFI SDIO D1", "WIFI SDIO D2",
281 "WIFI SDIO D3", "WIFI SDIO CLK", "WIFI SDIO CMD",
282 "WIFI Power Enable", "WIFI WAKE HOST",
283 "Bluetooth PCM DOUT", "Bluetooth PCM DIN",
284 "Bluetooth PCM SYNC", "Bluetooth PCM CLK",
285 "Bluetooth UART TX", "Bluetooth UART RX",
286 "Bluetooth UART CTS", "Bluetooth UART RTS",
287 "", "", "", "WIFI 32K", "Bluetooth Enable",
288 "Bluetooth WAKE HOST", "",
290 "", "CON1 Header Pin35", "", "";
295 pinctrl-0 = <&pwm_e_pins>;
296 pinctrl-names = "default";
297 clocks = <&clkc CLKID_FCLK_DIV4>;
298 clock-names = "clkin0";
303 vref-supply = <&vddio_ao18>;
309 pinctrl-0 = <&sdio_pins>, <&sdio_irq_pins>;
310 pinctrl-1 = <&sdio_clk_gate_pins>;
311 pinctrl-names = "default", "clk-gate";
312 #address-cells = <1>;
317 max-frequency = <50000000>;
322 /* WiFi firmware requires power to be kept while in suspend */
323 keep-power-in-suspend;
325 mmc-pwrseq = <&sdio_pwrseq>;
327 vmmc-supply = <&vddio_ao3v3>;
328 vqmmc-supply = <&vddio_ao18>;
331 compatible = "brcm,bcm4329-fmac";
339 pinctrl-0 = <&sdcard_pins>;
340 pinctrl-1 = <&sdcard_clk_gate_pins>;
341 pinctrl-names = "default", "clk-gate";
349 max-frequency = <100000000>;
352 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
354 vmmc-supply = <&vddio_ao3v3>;
355 vqmmc-supply = <&vddio_tf>;
361 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
362 pinctrl-1 = <&emmc_clk_gate_pins>;
363 pinctrl-names = "default", "clk-gate";
366 max-frequency = <200000000>;
373 mmc-pwrseq = <&emmc_pwrseq>;
374 vmmc-supply = <&vcc3v3>;
375 vqmmc-supply = <&vcc1v8>;
381 pinctrl-0 = <&uart_ao_a_pins>;
382 pinctrl-names = "default";
385 /* Bluetooth on AP6212 */
388 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
389 pinctrl-names = "default";
393 compatible = "brcm,bcm43438-bt";
394 clocks = <&wifi_32k>;
396 vbat-supply = <&vddio_ao3v3>;
397 vddio-supply = <&vddio_ao18>;
398 host-wakeup-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;
399 shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
406 pinctrl-0 = <&uart_c_pins>;
407 pinctrl-names = "default";
412 phy-supply = <&vdd_5v>;