blob: e22f0e8bb17a77b1e1f008f2cb533a2ce9d7c60d [file] [log] [blame]
Hans de Goede53ab4af2015-04-15 19:03:49 +02001/*
2 * Copyright 2015 Hans de Goede <hdegoede@redhat.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 *
Hans de Goede53ab4af2015-04-15 19:03:49 +020019 * 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/dts-v1/;
44#include "sun7i-a20.dtsi"
45#include "sunxi-common-regulators.dtsi"
46#include <dt-bindings/gpio/gpio.h>
47#include <dt-bindings/interrupt-controller/arm-gic.h>
48
49/ {
50 model = "LeMaker Banana Pro";
51 compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
52
53 aliases {
54 serial0 = &uart0;
Hans de Goede8b1ba942015-06-02 15:53:40 +020055 serial1 = &uart4;
Hans de Goede53ab4af2015-04-15 19:03:49 +020056 serial2 = &uart7;
57 };
58
59 chosen {
60 stdout-path = "serial0:115200n8";
61 };
62
63 leds {
64 compatible = "gpio-leds";
Hans de Goede53ab4af2015-04-15 19:03:49 +020065
Samuel Holland0605ac42022-04-27 15:31:23 -050066 led-0 {
Hans de Goede53ab4af2015-04-15 19:03:49 +020067 label = "bananapro:blue:usr";
68 gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
69 };
70
Samuel Holland0605ac42022-04-27 15:31:23 -050071 led-1 {
Hans de Goede53ab4af2015-04-15 19:03:49 +020072 label = "bananapro:green:usr";
73 gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
74 };
75 };
76
Jagan Tekib9d59d02018-08-05 00:40:10 +053077 wifi_pwrseq: wifi-pwrseq {
78 compatible = "mmc-pwrseq-simple";
Jagan Tekib9d59d02018-08-05 00:40:10 +053079 reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>;
80 };
81
Hans de Goede53ab4af2015-04-15 19:03:49 +020082 reg_gmac_3v3: gmac-3v3 {
83 compatible = "regulator-fixed";
Hans de Goede53ab4af2015-04-15 19:03:49 +020084 regulator-name = "gmac-3v3";
85 regulator-min-microvolt = <3300000>;
86 regulator-max-microvolt = <3300000>;
87 startup-delay-us = <100000>;
88 enable-active-high;
89 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
90 };
Hans de Goede53ab4af2015-04-15 19:03:49 +020091};
92
93&ahci {
94 status = "okay";
95};
96
Jagan Tekib9d59d02018-08-05 00:40:10 +053097&codec {
98 status = "okay";
99};
100
Hans de Goede53ab4af2015-04-15 19:03:49 +0200101&ehci0 {
102 status = "okay";
103};
104
105&ehci1 {
106 status = "okay";
107};
108
109&gmac {
110 pinctrl-names = "default";
Jagan Teki0cc47a82019-04-12 16:19:34 +0530111 pinctrl-0 = <&gmac_rgmii_pins>;
Samuel Holland0605ac42022-04-27 15:31:23 -0500112 phy-handle = <&phy1>;
Andre Przywara85da5582022-03-15 23:20:54 +0000113 phy-mode = "rgmii-id";
Hans de Goede53ab4af2015-04-15 19:03:49 +0200114 phy-supply = <&reg_gmac_3v3>;
115 status = "okay";
Hans de Goede53ab4af2015-04-15 19:03:49 +0200116};
117
118&i2c0 {
Hans de Goede53ab4af2015-04-15 19:03:49 +0200119 status = "okay";
120
121 axp209: pmic@34 {
122 compatible = "x-powers,axp209";
123 reg = <0x34>;
124 interrupt-parent = <&nmi_intc>;
125 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
126
127 interrupt-controller;
128 #interrupt-cells = <1>;
129 };
130};
131
132&i2c2 {
Hans de Goede53ab4af2015-04-15 19:03:49 +0200133 status = "okay";
134};
135
136&ir0 {
137 pinctrl-names = "default";
Jagan Teki0cc47a82019-04-12 16:19:34 +0530138 pinctrl-0 = <&ir0_rx_pin>;
Hans de Goede53ab4af2015-04-15 19:03:49 +0200139 status = "okay";
140};
141
Samuel Holland0605ac42022-04-27 15:31:23 -0500142&gmac_mdio {
143 phy1: ethernet-phy@1 {
144 reg = <1>;
145 };
146};
147
Hans de Goede53ab4af2015-04-15 19:03:49 +0200148&mmc0 {
Hans de Goede53ab4af2015-04-15 19:03:49 +0200149 vmmc-supply = <&reg_vcc3v3>;
150 bus-width = <4>;
Jagan Tekib9d59d02018-08-05 00:40:10 +0530151 cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
Hans de Goede53ab4af2015-04-15 19:03:49 +0200152 status = "okay";
153};
154
155&mmc3 {
Jagan Tekib9d59d02018-08-05 00:40:10 +0530156 vmmc-supply = <&reg_vcc3v3>;
157 mmc-pwrseq = <&wifi_pwrseq>;
Hans de Goede53ab4af2015-04-15 19:03:49 +0200158 bus-width = <4>;
159 non-removable;
160 status = "okay";
Jagan Tekib9d59d02018-08-05 00:40:10 +0530161
162 brcmf: wifi@1 {
163 reg = <1>;
164 compatible = "brcm,bcm4329-fmac";
165 interrupt-parent = <&pio>;
166 interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
167 interrupt-names = "host-wake";
168 };
Hans de Goede53ab4af2015-04-15 19:03:49 +0200169};
170
171&ohci0 {
172 status = "okay";
173};
174
175&ohci1 {
176 status = "okay";
177};
178
Hans de Goede53ab4af2015-04-15 19:03:49 +0200179&reg_usb1_vbus {
Hans de Goede53ab4af2015-04-15 19:03:49 +0200180 gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
181 status = "okay";
182};
183
184&reg_usb2_vbus {
Hans de Goede53ab4af2015-04-15 19:03:49 +0200185 gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
186 status = "okay";
187};
188
189&spi0 {
190 pinctrl-names = "default";
Jagan Teki0cc47a82019-04-12 16:19:34 +0530191 pinctrl-0 = <&spi0_pi_pins>,
192 <&spi0_cs0_pi_pin>,
193 <&spi0_cs1_pi_pin>;
Hans de Goede53ab4af2015-04-15 19:03:49 +0200194 status = "okay";
195};
196
197&uart0 {
198 pinctrl-names = "default";
Jagan Teki0cc47a82019-04-12 16:19:34 +0530199 pinctrl-0 = <&uart0_pb_pins>;
Hans de Goede53ab4af2015-04-15 19:03:49 +0200200 status = "okay";
201};
202
Hans de Goede8b1ba942015-06-02 15:53:40 +0200203&uart4 {
Hans de Goede53ab4af2015-04-15 19:03:49 +0200204 pinctrl-names = "default";
Jagan Teki0cc47a82019-04-12 16:19:34 +0530205 pinctrl-0 = <&uart4_ph_pins>;
Hans de Goede53ab4af2015-04-15 19:03:49 +0200206 status = "okay";
207};
208
209&uart7 {
210 pinctrl-names = "default";
Jagan Teki0cc47a82019-04-12 16:19:34 +0530211 pinctrl-0 = <&uart7_pi_pins>;
Hans de Goede53ab4af2015-04-15 19:03:49 +0200212 status = "okay";
213};
214
215&usbphy {
216 usb1_vbus-supply = <&reg_usb1_vbus>;
217 usb2_vbus-supply = <&reg_usb2_vbus>;
218 status = "okay";
219};