]> git.ipfire.org Git - people/arne_f/kernel.git/blame - arch/arm/boot/dts/sun8i-h3-nanopi-r1.dts
dts: nanopi-r1: remove redifinition of k1 to reset
[people/arne_f/kernel.git] / arch / arm / boot / dts / sun8i-h3-nanopi-r1.dts
CommitLineData
6832c5d8
AF
1/*
2 * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
3 *
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
7 * whole.
8 *
9 * a) This file 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.
13 *
14 * This file 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.
18 *
19 * Or, alternatively,
20 *
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
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
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.
41 */
42
43#include "sun8i-h3-nanopi.dtsi"
44
45/ {
46 model = "FriendlyElec NanoPi-R1";
47 compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3";
48
a0d0862f
AF
49 aliases {
50 ethernet0 = &emac;
51 ethernet1 = &usbr8152;
52 ethernet2 = &brcmf;
53 serial0 = &uart0;
857469bc 54 serial1 = &uart1;
a0d0862f
AF
55 };
56
6832c5d8
AF
57 wifi_pwrseq: wifi_pwrseq {
58 compatible = "mmc-pwrseq-simple";
59 pinctrl-names = "default";
60 pinctrl-0 = <&wifi_en_npi>;
61 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
62 post-power-on-delay-ms = <200>;
63 };
64
65 reg_gmac_3v3: gmac-3v3 {
66 compatible = "regulator-fixed";
67 pinctrl-names = "default";
68 pinctrl-0 = <&gmac_power_pin_nanopi>;
69 regulator-name = "gmac-3v3";
70 regulator-min-microvolt = <3300000>;
71 regulator-max-microvolt = <3300000>;
72 startup-delay-us = <100000>;
73 enable-active-high;
74 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
75 };
76
77 rfkill_bt {
78 compatible = "rfkill-gpio";
79 pinctrl-names = "default";
80 pinctrl-0 = <&bt_pwr_pin>;
81 reset-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
82 clocks = <&osc32k>;
83 clock-frequency = <32768>;
84 rfkill-name = "sunxi-bt";
85 rfkill-type = "bluetooth";
86 };
87
88 leds {
89 /delete-node/ status;
90 /delete-node/ pwr;
91 led1 {
91259a48 92 label = "nanopi-r1:red:status";
6832c5d8
AF
93 gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
94 linux,default-trigger = "heartbeat";
95 };
96
97 led2 {
91259a48 98 label = "nanopi-r1:green:wan";
6832c5d8
AF
99 gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
100 default-state = "off";
101 linux,default-trigger = "netdev";
102 };
103
104 led3 {
91259a48 105 label = "nanopi-r1:green:lan";
6832c5d8
AF
106 gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
107 default-state = "off";
108 linux,default-trigger = "netdev";
109 };
110 };
6832c5d8
AF
111};
112
113&pio {
114 gmac_power_pin_nanopi: gmac_power_pin@0 {
115 pins = "PD6";
116 function = "gpio_out";
117 };
118 bt_pwr_pin: bt_pwr_pin@0 {
119 pins = "PG13";
120 function = "gpio_out";
121 };
122};
123
124&r_pio {
125 wifi_en_npi: wifi_en_pin {
126 pins = "PL7";
127 function = "gpio_out";
128 };
129};
130
131&mdio {
132 ext_rgmii_phy: ethernet-phy@1 {
133 reg = <7>;
134 };
135};
136
137&emac {
138 pinctrl-names = "default";
139 pinctrl-0 = <&emac_rgmii_pins>;
140 phy-supply = <&reg_gmac_3v3>;
141 phy-handle = <&ext_rgmii_phy>;
142 phy-mode = "rgmii";
143
144 allwinner,leds-active-low;
145 status = "okay";
146};
147
a0d0862f
AF
148&ehci1 {
149 status = "okay";
150 #address-cells = <1>;
151 #size-cells = <0>;
152 usbr8152: usbether@1 {
153 compatible = "usb0bda,8152";
154 reg = <1>;
155 };
156};
157
158&ohci1 {
159 status = "disabled";
160};
161
857469bc
AF
162&uart1 {
163 pinctrl-names = "default";
164 pinctrl-0 = <&uart1_pins>;
165 status = "okay";
166};
167
6832c5d8
AF
168&mmc1 {
169 pinctrl-names = "default";
170 pinctrl-0 = <&mmc1_pins_a>;
171 vmmc-supply = <&reg_vcc3v3>;
172 vqmmc-supply = <&reg_vcc3v3>;
173 mmc-pwrseq = <&wifi_pwrseq>;
174 bus-width = <4>;
175 non-removable;
176 status = "okay";
177
178 brcmf: bcrmf@1 {
179 reg = <1>;
180 compatible = "brcm,bcm4329-fmac";
181 interrupt-parent = <&pio>;
182 interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
183 interrupt-names = "host-wake";
184 };
185};
186
187&mmc2 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&mmc2_8bit_pins>;
190 vmmc-supply = <&reg_vcc3v3>;
191 bus-width = <8>;
192 non-removable;
193 cap-mmc-hw-reset;
194 status = "okay";
195};
196
197&mmc2_8bit_pins {
198 /* Increase drive strength for DDR modes */
199 drive-strength = <40>;
200 /* eMMC is missing pull-ups */
201 bias-pull-up;
202};