xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun8i-h3-nanopi-r1.dts (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2724ba675SRob Herring/*
3724ba675SRob Herring * Copyright (C) 2019 Igor Pecovnik <igor@armbian.com>
4724ba675SRob Herring * Copyright (C) 2020 Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
5724ba675SRob Herring * Copyright (C) 2020 Yu-Tung Chang <mtwget@gmail.com>
6724ba675SRob Herring*/
7724ba675SRob Herring
8724ba675SRob Herring#include "sun8i-h3-nanopi.dtsi"
9724ba675SRob Herring#include <dt-bindings/leds/common.h>
10724ba675SRob Herring
11724ba675SRob Herring/ {
12724ba675SRob Herring	model = "FriendlyARM NanoPi R1";
13724ba675SRob Herring	compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3";
14724ba675SRob Herring
15724ba675SRob Herring	aliases {
16724ba675SRob Herring		serial1 = &uart1;
17724ba675SRob Herring		ethernet0 = &emac;
18724ba675SRob Herring		ethernet1 = &wifi;
19724ba675SRob Herring	};
20724ba675SRob Herring
21724ba675SRob Herring	reg_gmac_3v3: gmac-3v3 {
22724ba675SRob Herring		compatible = "regulator-fixed";
23724ba675SRob Herring		regulator-name = "gmac-3v3";
24724ba675SRob Herring		regulator-min-microvolt = <3300000>;
25724ba675SRob Herring		regulator-max-microvolt = <3300000>;
26724ba675SRob Herring		startup-delay-us = <100000>;
27724ba675SRob Herring		enable-active-high;
28724ba675SRob Herring		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
29724ba675SRob Herring	};
30724ba675SRob Herring
31724ba675SRob Herring	reg_vdd_cpux: gpio-regulator {
32724ba675SRob Herring		compatible = "regulator-gpio";
33724ba675SRob Herring		regulator-name = "vdd-cpux";
34724ba675SRob Herring		regulator-type = "voltage";
35724ba675SRob Herring		regulator-boot-on;
36724ba675SRob Herring		regulator-always-on;
37724ba675SRob Herring		regulator-min-microvolt = <1100000>;
38724ba675SRob Herring		regulator-max-microvolt = <1300000>;
39724ba675SRob Herring		regulator-ramp-delay = <50>;
40724ba675SRob Herring		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
41724ba675SRob Herring		gpios-states = <0x1>;
42724ba675SRob Herring		states = <1100000 0x0>,
43724ba675SRob Herring			 <1300000 0x1>;
44724ba675SRob Herring	};
45724ba675SRob Herring
46*0f47ef3fSKrzysztof Kozlowski	wifi_pwrseq: pwrseq {
47724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
48724ba675SRob Herring		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
49724ba675SRob Herring		clocks = <&rtc CLK_OSC32K_FANOUT>;
50724ba675SRob Herring		clock-names = "ext_clock";
51724ba675SRob Herring	};
52724ba675SRob Herring
53724ba675SRob Herring	leds {
54724ba675SRob Herring		led-2 {
55724ba675SRob Herring			function = LED_FUNCTION_WAN;
56724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
57724ba675SRob Herring			gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
58724ba675SRob Herring		};
59724ba675SRob Herring
60724ba675SRob Herring		led-3 {
61724ba675SRob Herring			function = LED_FUNCTION_LAN;
62724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
63724ba675SRob Herring			gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; /* PA9 */
64724ba675SRob Herring		};
65724ba675SRob Herring	};
66724ba675SRob Herring};
67724ba675SRob Herring
68724ba675SRob Herring&cpu0 {
69724ba675SRob Herring	cpu-supply = <&reg_vdd_cpux>;
70724ba675SRob Herring};
71724ba675SRob Herring
72724ba675SRob Herring&ehci1 {
73724ba675SRob Herring	status = "okay";
74724ba675SRob Herring};
75724ba675SRob Herring
76724ba675SRob Herring&ehci2 {
77724ba675SRob Herring	status = "okay";
78724ba675SRob Herring};
79724ba675SRob Herring
80724ba675SRob Herring&emac {
81724ba675SRob Herring	pinctrl-names = "default";
82724ba675SRob Herring	pinctrl-0 = <&emac_rgmii_pins>;
83724ba675SRob Herring	phy-supply = <&reg_gmac_3v3>;
84724ba675SRob Herring	phy-handle = <&ext_rgmii_phy>;
85724ba675SRob Herring	phy-mode = "rgmii-id";
86724ba675SRob Herring	status = "okay";
87724ba675SRob Herring};
88724ba675SRob Herring
89724ba675SRob Herring&external_mdio {
90724ba675SRob Herring	ext_rgmii_phy: ethernet-phy@7 {
91724ba675SRob Herring		compatible = "ethernet-phy-ieee802.3-c22";
92724ba675SRob Herring		reg = <7>;
93724ba675SRob Herring	};
94724ba675SRob Herring};
95724ba675SRob Herring
96724ba675SRob Herring&mmc1 {
97724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
98724ba675SRob Herring	vqmmc-supply = <&reg_vcc3v3>;
99724ba675SRob Herring	mmc-pwrseq = <&wifi_pwrseq>;
100724ba675SRob Herring	bus-width = <4>;
101724ba675SRob Herring	non-removable;
102724ba675SRob Herring	status = "okay";
103724ba675SRob Herring
104724ba675SRob Herring	wifi: wifi@1 {
105724ba675SRob Herring		reg = <1>;
106724ba675SRob Herring		compatible = "brcm,bcm4329-fmac";
107724ba675SRob Herring		interrupt-parent = <&pio>;
108724ba675SRob Herring		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
109724ba675SRob Herring		interrupt-names = "host-wake";
110724ba675SRob Herring	};
111724ba675SRob Herring};
112724ba675SRob Herring
113724ba675SRob Herring&mmc2 {
114724ba675SRob Herring	pinctrl-names = "default";
115724ba675SRob Herring	pinctrl-0 = <&mmc2_8bit_pins>;
116724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
117724ba675SRob Herring	vqmmc-supply = <&reg_vcc3v3>;
118724ba675SRob Herring	bus-width = <8>;
119724ba675SRob Herring	non-removable;
120724ba675SRob Herring	status = "okay";
121724ba675SRob Herring};
122724ba675SRob Herring
123724ba675SRob Herring&ohci1 {
124724ba675SRob Herring	status = "okay";
125724ba675SRob Herring};
126724ba675SRob Herring
127724ba675SRob Herring&ohci2 {
128724ba675SRob Herring	status = "okay";
129724ba675SRob Herring};
130724ba675SRob Herring
131724ba675SRob Herring&reg_usb0_vbus {
132724ba675SRob Herring	gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
133724ba675SRob Herring	status = "okay";
134724ba675SRob Herring};
135724ba675SRob Herring
136724ba675SRob Herring&uart1 {
137724ba675SRob Herring	pinctrl-names = "default";
138724ba675SRob Herring	pinctrl-0 = <&uart1_pins>;
139724ba675SRob Herring	status = "okay";
140724ba675SRob Herring};
141724ba675SRob Herring
142724ba675SRob Herring&uart3 {
143724ba675SRob Herring	pinctrl-names = "default";
144724ba675SRob Herring	pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
145724ba675SRob Herring	uart-has-rtscts;
146724ba675SRob Herring	status = "okay";
147724ba675SRob Herring
148724ba675SRob Herring	bluetooth {
149724ba675SRob Herring		compatible = "brcm,bcm43438-bt";
150724ba675SRob Herring		clocks = <&rtc CLK_OSC32K_FANOUT>;
151724ba675SRob Herring		clock-names = "lpo";
152724ba675SRob Herring		vbat-supply = <&reg_vcc3v3>;
153724ba675SRob Herring		vddio-supply = <&reg_vcc3v3>;
154724ba675SRob Herring		device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
155724ba675SRob Herring		host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
156724ba675SRob Herring		shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
157724ba675SRob Herring	};
158724ba675SRob Herring};
159724ba675SRob Herring
160724ba675SRob Herring&usb_otg {
161724ba675SRob Herring	status = "okay";
162724ba675SRob Herring	dr_mode = "otg";
163724ba675SRob Herring};
164724ba675SRob Herring
165724ba675SRob Herring&usbphy {
166724ba675SRob Herring	usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
167724ba675SRob Herring	usb0_vbus-supply = <&reg_usb0_vbus>;
168724ba675SRob Herring	status = "okay";
169724ba675SRob Herring};
170