xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun8i-h3-nanopi-duo2.dts (revision 724ba6751532055db75992fc6ae21c3e322e94a7)
1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Copyright (C) 2019 Karl Palsson <karlp@tweak.net.au>
4*724ba675SRob Herring */
5*724ba675SRob Herring
6*724ba675SRob Herring/dts-v1/;
7*724ba675SRob Herring#include "sun8i-h3.dtsi"
8*724ba675SRob Herring#include "sunxi-common-regulators.dtsi"
9*724ba675SRob Herring
10*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
11*724ba675SRob Herring#include <dt-bindings/input/input.h>
12*724ba675SRob Herring
13*724ba675SRob Herring/ {
14*724ba675SRob Herring	model = "FriendlyARM NanoPi Duo2";
15*724ba675SRob Herring	compatible = "friendlyarm,nanopi-duo2", "allwinner,sun8i-h3";
16*724ba675SRob Herring
17*724ba675SRob Herring	aliases {
18*724ba675SRob Herring		serial0 = &uart0;
19*724ba675SRob Herring	};
20*724ba675SRob Herring
21*724ba675SRob Herring	chosen {
22*724ba675SRob Herring		stdout-path = "serial0:115200n8";
23*724ba675SRob Herring	};
24*724ba675SRob Herring
25*724ba675SRob Herring	leds {
26*724ba675SRob Herring		compatible = "gpio-leds";
27*724ba675SRob Herring
28*724ba675SRob Herring		led-0 {
29*724ba675SRob Herring			label = "nanopi:red:pwr";
30*724ba675SRob Herring			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
31*724ba675SRob Herring			default-state = "on";
32*724ba675SRob Herring		};
33*724ba675SRob Herring
34*724ba675SRob Herring		led-1 {
35*724ba675SRob Herring			label = "nanopi:green:status";
36*724ba675SRob Herring			gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
37*724ba675SRob Herring		};
38*724ba675SRob Herring	};
39*724ba675SRob Herring
40*724ba675SRob Herring	gpio-keys {
41*724ba675SRob Herring		compatible = "gpio-keys";
42*724ba675SRob Herring
43*724ba675SRob Herring		key-0 {
44*724ba675SRob Herring			label = "k1";
45*724ba675SRob Herring			linux,code = <BTN_0>;
46*724ba675SRob Herring			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */
47*724ba675SRob Herring		};
48*724ba675SRob Herring	};
49*724ba675SRob Herring
50*724ba675SRob Herring	reg_vdd_cpux: vdd-cpux-regulator {
51*724ba675SRob Herring		compatible = "regulator-gpio";
52*724ba675SRob Herring		regulator-name = "vdd-cpux";
53*724ba675SRob Herring		regulator-min-microvolt = <1100000>;
54*724ba675SRob Herring		regulator-max-microvolt = <1300000>;
55*724ba675SRob Herring		regulator-always-on;
56*724ba675SRob Herring		regulator-boot-on;
57*724ba675SRob Herring		regulator-ramp-delay = <50>; /* 4ms */
58*724ba675SRob Herring
59*724ba675SRob Herring		enable-active-high;
60*724ba675SRob Herring		enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
61*724ba675SRob Herring		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
62*724ba675SRob Herring		gpios-states = <0x1>;
63*724ba675SRob Herring		states = <1100000 0>, <1300000 1>;
64*724ba675SRob Herring	};
65*724ba675SRob Herring
66*724ba675SRob Herring	reg_vcc_dram: vcc-dram {
67*724ba675SRob Herring		compatible = "regulator-fixed";
68*724ba675SRob Herring		regulator-name = "vcc-dram";
69*724ba675SRob Herring		regulator-min-microvolt = <1500000>;
70*724ba675SRob Herring		regulator-max-microvolt = <1500000>;
71*724ba675SRob Herring		regulator-always-on;
72*724ba675SRob Herring		regulator-boot-on;
73*724ba675SRob Herring		enable-active-high;
74*724ba675SRob Herring		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
75*724ba675SRob Herring		vin-supply = <&reg_vcc5v0>;
76*724ba675SRob Herring        };
77*724ba675SRob Herring
78*724ba675SRob Herring	reg_vdd_sys: vdd-sys {
79*724ba675SRob Herring		compatible = "regulator-fixed";
80*724ba675SRob Herring		regulator-name = "vdd-sys";
81*724ba675SRob Herring		regulator-min-microvolt = <1200000>;
82*724ba675SRob Herring		regulator-max-microvolt = <1200000>;
83*724ba675SRob Herring		regulator-always-on;
84*724ba675SRob Herring		regulator-boot-on;
85*724ba675SRob Herring		enable-active-high;
86*724ba675SRob Herring		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
87*724ba675SRob Herring		vin-supply = <&reg_vcc5v0>;
88*724ba675SRob Herring        };
89*724ba675SRob Herring
90*724ba675SRob Herring	wifi_pwrseq: wifi_pwrseq {
91*724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
92*724ba675SRob Herring		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
93*724ba675SRob Herring		clocks = <&rtc CLK_OSC32K_FANOUT>;
94*724ba675SRob Herring		clock-names = "ext_clock";
95*724ba675SRob Herring	};
96*724ba675SRob Herring
97*724ba675SRob Herring};
98*724ba675SRob Herring
99*724ba675SRob Herring&cpu0 {
100*724ba675SRob Herring	cpu-supply = <&reg_vdd_cpux>;
101*724ba675SRob Herring};
102*724ba675SRob Herring
103*724ba675SRob Herring&ehci0 {
104*724ba675SRob Herring	status = "okay";
105*724ba675SRob Herring};
106*724ba675SRob Herring
107*724ba675SRob Herring&mmc0 {
108*724ba675SRob Herring	bus-width = <4>;
109*724ba675SRob Herring	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
110*724ba675SRob Herring	status = "okay";
111*724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
112*724ba675SRob Herring};
113*724ba675SRob Herring
114*724ba675SRob Herring&mmc1 {
115*724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
116*724ba675SRob Herring	vqmmc-supply = <&reg_vcc3v3>;
117*724ba675SRob Herring	mmc-pwrseq = <&wifi_pwrseq>;
118*724ba675SRob Herring	bus-width = <4>;
119*724ba675SRob Herring	non-removable;
120*724ba675SRob Herring	status = "okay";
121*724ba675SRob Herring
122*724ba675SRob Herring	sdio_wifi: sdio_wifi@1 {
123*724ba675SRob Herring		reg = <1>;
124*724ba675SRob Herring		compatible = "brcm,bcm4329-fmac";
125*724ba675SRob Herring		interrupt-parent = <&pio>;
126*724ba675SRob Herring		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
127*724ba675SRob Herring		interrupt-names = "host-wake";
128*724ba675SRob Herring	};
129*724ba675SRob Herring};
130*724ba675SRob Herring
131*724ba675SRob Herring&ohci0 {
132*724ba675SRob Herring	status = "okay";
133*724ba675SRob Herring};
134*724ba675SRob Herring
135*724ba675SRob Herring&reg_usb0_vbus {
136*724ba675SRob Herring	gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
137*724ba675SRob Herring	status = "okay";
138*724ba675SRob Herring};
139*724ba675SRob Herring
140*724ba675SRob Herring&uart0 {
141*724ba675SRob Herring	pinctrl-names = "default";
142*724ba675SRob Herring	pinctrl-0 = <&uart0_pa_pins>;
143*724ba675SRob Herring	status = "okay";
144*724ba675SRob Herring};
145*724ba675SRob Herring
146*724ba675SRob Herring&uart2 {
147*724ba675SRob Herring	pinctrl-names = "default";
148*724ba675SRob Herring	pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>;
149*724ba675SRob Herring	uart-has-rtscts;
150*724ba675SRob Herring	status = "okay";
151*724ba675SRob Herring
152*724ba675SRob Herring	bluetooth {
153*724ba675SRob Herring		compatible = "brcm,bcm43438-bt";
154*724ba675SRob Herring		clocks = <&rtc CLK_OSC32K_FANOUT>;
155*724ba675SRob Herring		clock-names = "lpo";
156*724ba675SRob Herring		vbat-supply = <&reg_vcc3v3>;
157*724ba675SRob Herring		vddio-supply = <&reg_vcc3v3>;
158*724ba675SRob Herring		device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
159*724ba675SRob Herring		host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
160*724ba675SRob Herring		shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
161*724ba675SRob Herring	};
162*724ba675SRob Herring};
163*724ba675SRob Herring
164*724ba675SRob Herring&usb_otg {
165*724ba675SRob Herring	status = "okay";
166*724ba675SRob Herring	dr_mode = "otg";
167*724ba675SRob Herring};
168*724ba675SRob Herring
169*724ba675SRob Herring&usbphy {
170*724ba675SRob Herring	usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
171*724ba675SRob Herring	usb0_vbus-supply = <&reg_usb0_vbus>;
172*724ba675SRob Herring	status = "okay";
173*724ba675SRob Herring};
174