Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 1 | /* |
| 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 Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 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 | /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 Goede | 8b1ba94 | 2015-06-02 15:53:40 +0200 | [diff] [blame] | 55 | serial1 = &uart4; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 56 | serial2 = &uart7; |
| 57 | }; |
| 58 | |
| 59 | chosen { |
| 60 | stdout-path = "serial0:115200n8"; |
| 61 | }; |
| 62 | |
| 63 | leds { |
| 64 | compatible = "gpio-leds"; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 65 | |
Samuel Holland | 0605ac4 | 2022-04-27 15:31:23 -0500 | [diff] [blame] | 66 | led-0 { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 67 | label = "bananapro:blue:usr"; |
| 68 | gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; |
| 69 | }; |
| 70 | |
Samuel Holland | 0605ac4 | 2022-04-27 15:31:23 -0500 | [diff] [blame] | 71 | led-1 { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 72 | label = "bananapro:green:usr"; |
| 73 | gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; |
| 74 | }; |
| 75 | }; |
| 76 | |
Jagan Teki | b9d59d0 | 2018-08-05 00:40:10 +0530 | [diff] [blame] | 77 | wifi_pwrseq: wifi-pwrseq { |
| 78 | compatible = "mmc-pwrseq-simple"; |
Jagan Teki | b9d59d0 | 2018-08-05 00:40:10 +0530 | [diff] [blame] | 79 | reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; |
| 80 | }; |
| 81 | |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 82 | reg_gmac_3v3: gmac-3v3 { |
| 83 | compatible = "regulator-fixed"; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 84 | 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 Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 91 | }; |
| 92 | |
| 93 | &ahci { |
| 94 | status = "okay"; |
| 95 | }; |
| 96 | |
Jagan Teki | b9d59d0 | 2018-08-05 00:40:10 +0530 | [diff] [blame] | 97 | &codec { |
| 98 | status = "okay"; |
| 99 | }; |
| 100 | |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 101 | &ehci0 { |
| 102 | status = "okay"; |
| 103 | }; |
| 104 | |
| 105 | &ehci1 { |
| 106 | status = "okay"; |
| 107 | }; |
| 108 | |
| 109 | &gmac { |
| 110 | pinctrl-names = "default"; |
Jagan Teki | 0cc47a8 | 2019-04-12 16:19:34 +0530 | [diff] [blame] | 111 | pinctrl-0 = <&gmac_rgmii_pins>; |
Samuel Holland | 0605ac4 | 2022-04-27 15:31:23 -0500 | [diff] [blame] | 112 | phy-handle = <&phy1>; |
Andre Przywara | 85da558 | 2022-03-15 23:20:54 +0000 | [diff] [blame] | 113 | phy-mode = "rgmii-id"; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 114 | phy-supply = <®_gmac_3v3>; |
| 115 | status = "okay"; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 116 | }; |
| 117 | |
| 118 | &i2c0 { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 119 | 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 Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 133 | status = "okay"; |
| 134 | }; |
| 135 | |
| 136 | &ir0 { |
| 137 | pinctrl-names = "default"; |
Jagan Teki | 0cc47a8 | 2019-04-12 16:19:34 +0530 | [diff] [blame] | 138 | pinctrl-0 = <&ir0_rx_pin>; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 139 | status = "okay"; |
| 140 | }; |
| 141 | |
Samuel Holland | 0605ac4 | 2022-04-27 15:31:23 -0500 | [diff] [blame] | 142 | &gmac_mdio { |
| 143 | phy1: ethernet-phy@1 { |
| 144 | reg = <1>; |
| 145 | }; |
| 146 | }; |
| 147 | |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 148 | &mmc0 { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 149 | vmmc-supply = <®_vcc3v3>; |
| 150 | bus-width = <4>; |
Jagan Teki | b9d59d0 | 2018-08-05 00:40:10 +0530 | [diff] [blame] | 151 | cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */ |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 152 | status = "okay"; |
| 153 | }; |
| 154 | |
| 155 | &mmc3 { |
Jagan Teki | b9d59d0 | 2018-08-05 00:40:10 +0530 | [diff] [blame] | 156 | vmmc-supply = <®_vcc3v3>; |
| 157 | mmc-pwrseq = <&wifi_pwrseq>; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 158 | bus-width = <4>; |
| 159 | non-removable; |
| 160 | status = "okay"; |
Jagan Teki | b9d59d0 | 2018-08-05 00:40:10 +0530 | [diff] [blame] | 161 | |
| 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 Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 169 | }; |
| 170 | |
| 171 | &ohci0 { |
| 172 | status = "okay"; |
| 173 | }; |
| 174 | |
| 175 | &ohci1 { |
| 176 | status = "okay"; |
| 177 | }; |
| 178 | |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 179 | ®_usb1_vbus { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 180 | gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ |
| 181 | status = "okay"; |
| 182 | }; |
| 183 | |
| 184 | ®_usb2_vbus { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 185 | gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ |
| 186 | status = "okay"; |
| 187 | }; |
| 188 | |
| 189 | &spi0 { |
| 190 | pinctrl-names = "default"; |
Jagan Teki | 0cc47a8 | 2019-04-12 16:19:34 +0530 | [diff] [blame] | 191 | pinctrl-0 = <&spi0_pi_pins>, |
| 192 | <&spi0_cs0_pi_pin>, |
| 193 | <&spi0_cs1_pi_pin>; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 194 | status = "okay"; |
| 195 | }; |
| 196 | |
| 197 | &uart0 { |
| 198 | pinctrl-names = "default"; |
Jagan Teki | 0cc47a8 | 2019-04-12 16:19:34 +0530 | [diff] [blame] | 199 | pinctrl-0 = <&uart0_pb_pins>; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 200 | status = "okay"; |
| 201 | }; |
| 202 | |
Hans de Goede | 8b1ba94 | 2015-06-02 15:53:40 +0200 | [diff] [blame] | 203 | &uart4 { |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 204 | pinctrl-names = "default"; |
Jagan Teki | 0cc47a8 | 2019-04-12 16:19:34 +0530 | [diff] [blame] | 205 | pinctrl-0 = <&uart4_ph_pins>; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 206 | status = "okay"; |
| 207 | }; |
| 208 | |
| 209 | &uart7 { |
| 210 | pinctrl-names = "default"; |
Jagan Teki | 0cc47a8 | 2019-04-12 16:19:34 +0530 | [diff] [blame] | 211 | pinctrl-0 = <&uart7_pi_pins>; |
Hans de Goede | 53ab4af | 2015-04-15 19:03:49 +0200 | [diff] [blame] | 212 | status = "okay"; |
| 213 | }; |
| 214 | |
| 215 | &usbphy { |
| 216 | usb1_vbus-supply = <®_usb1_vbus>; |
| 217 | usb2_vbus-supply = <®_usb2_vbus>; |
| 218 | status = "okay"; |
| 219 | }; |