Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Wills Wang |
| 3 | * |
| 4 | * Wills Wang <wills.wang.open@gmail.com> |
| 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License |
| 8 | * Version 2 or later at the following locations: |
| 9 | * |
| 10 | * http://www.opensource.org/licenses/gpl-license.html |
| 11 | * http://www.gnu.org/copyleft/gpl.html |
| 12 | */ |
| 13 | |
| 14 | /dts-v1/; |
Maxime Ripard | 7145570 | 2014-12-16 22:59:54 +0100 | [diff] [blame] | 15 | #include "sun7i-a20.dtsi" |
| 16 | #include "sunxi-common-regulators.dtsi" |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 17 | |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 18 | #include <dt-bindings/gpio/gpio.h> |
| 19 | |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 20 | / { |
| 21 | model = "Merrii A20 Hummingbird"; |
| 22 | compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; |
| 23 | |
| 24 | soc@01c00000 { |
| 25 | mmc0: mmc@01c0f000 { |
| 26 | pinctrl-names = "default"; |
| 27 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; |
| 28 | vmmc-supply = <®_vcc3v0>; |
| 29 | bus-width = <4>; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 30 | cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 31 | cd-inverted; |
| 32 | status = "okay"; |
| 33 | }; |
| 34 | |
| 35 | mmc3: mmc@01c12000 { |
| 36 | pinctrl-names = "default"; |
| 37 | pinctrl-0 = <&mmc3_pins_a>; |
| 38 | vmmc-supply = <®_mmc3_vdd>; |
| 39 | bus-width = <4>; |
| 40 | non-removable; |
| 41 | status = "okay"; |
| 42 | }; |
| 43 | |
| 44 | usbphy: phy@01c13400 { |
| 45 | usb1_vbus-supply = <®_usb1_vbus>; |
| 46 | usb2_vbus-supply = <®_usb2_vbus>; |
| 47 | status = "okay"; |
| 48 | }; |
| 49 | |
| 50 | ehci0: usb@01c14000 { |
| 51 | status = "okay"; |
| 52 | }; |
| 53 | |
| 54 | ohci0: usb@01c14400 { |
| 55 | status = "okay"; |
| 56 | }; |
| 57 | |
| 58 | ahci: sata@01c18000 { |
| 59 | target-supply = <®_ahci_5v>; |
| 60 | status = "okay"; |
| 61 | }; |
| 62 | |
| 63 | ehci1: usb@01c1c000 { |
| 64 | status = "okay"; |
| 65 | }; |
| 66 | |
| 67 | ohci1: usb@01c1c400 { |
| 68 | status = "okay"; |
| 69 | }; |
| 70 | |
| 71 | pio: pinctrl@01c20800 { |
| 72 | ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 { |
| 73 | allwinner,pins = "PH15"; |
| 74 | allwinner,function = "gpio_out"; |
| 75 | allwinner,drive = <0>; |
| 76 | allwinner,pull = <0>; |
| 77 | }; |
| 78 | |
| 79 | usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 { |
| 80 | allwinner,pins = "PH2"; |
| 81 | allwinner,function = "gpio_out"; |
| 82 | allwinner,drive = <0>; |
| 83 | allwinner,pull = <0>; |
| 84 | }; |
| 85 | |
| 86 | mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 { |
| 87 | allwinner,pins = "PH9"; |
| 88 | allwinner,function = "gpio_out"; |
| 89 | allwinner,drive = <0>; |
| 90 | allwinner,pull = <0>; |
| 91 | }; |
| 92 | |
| 93 | gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 { |
| 94 | allwinner,pins = "PH16"; |
| 95 | allwinner,function = "gpio_out"; |
| 96 | allwinner,drive = <0>; |
| 97 | allwinner,pull = <0>; |
| 98 | }; |
| 99 | }; |
| 100 | |
| 101 | pwm: pwm@01c20e00 { |
| 102 | pinctrl-names = "default"; |
| 103 | pinctrl-0 = <&pwm0_pins_a>; |
| 104 | status = "okay"; |
| 105 | }; |
| 106 | |
| 107 | ir0: ir@01c21800 { |
| 108 | pinctrl-names = "default"; |
| 109 | pinctrl-0 = <&ir0_pins_a>; |
| 110 | status = "okay"; |
| 111 | }; |
| 112 | |
| 113 | uart0: serial@01c28000 { |
| 114 | pinctrl-names = "default"; |
| 115 | pinctrl-0 = <&uart0_pins_a>; |
| 116 | status = "okay"; |
| 117 | }; |
| 118 | |
| 119 | uart2: serial@01c28800 { |
| 120 | pinctrl-names = "default"; |
| 121 | pinctrl-0 = <&uart2_pins_a>; |
| 122 | status = "okay"; |
| 123 | }; |
| 124 | |
| 125 | uart3: serial@01c28c00 { |
| 126 | pinctrl-names = "default"; |
| 127 | pinctrl-0 = <&uart3_pins_a>; |
| 128 | status = "okay"; |
| 129 | }; |
| 130 | |
| 131 | uart4: serial@01c29000 { |
| 132 | pinctrl-names = "default"; |
| 133 | pinctrl-0 = <&uart4_pins_a>; |
| 134 | status = "okay"; |
| 135 | }; |
| 136 | |
| 137 | uart5: serial@01c29400 { |
| 138 | pinctrl-names = "default"; |
| 139 | pinctrl-0 = <&uart5_pins_a>; |
| 140 | status = "okay"; |
| 141 | }; |
| 142 | |
| 143 | i2c0: i2c@01c2ac00 { |
| 144 | pinctrl-names = "default"; |
| 145 | pinctrl-0 = <&i2c0_pins_a>; |
| 146 | status = "okay"; |
| 147 | |
| 148 | axp209: pmic@34 { |
| 149 | compatible = "x-powers,axp209"; |
| 150 | reg = <0x34>; |
| 151 | interrupt-parent = <&nmi_intc>; |
| 152 | interrupts = <0 8>; |
| 153 | interrupt-controller; |
| 154 | #interrupt-cells = <1>; |
| 155 | }; |
| 156 | }; |
| 157 | |
| 158 | i2c1: i2c@01c2b000 { |
| 159 | pinctrl-names = "default"; |
| 160 | pinctrl-0 = <&i2c1_pins_a>; |
| 161 | status = "okay"; |
| 162 | }; |
| 163 | |
| 164 | i2c2: i2c@01c2b400 { |
| 165 | pinctrl-names = "default"; |
| 166 | pinctrl-0 = <&i2c2_pins_a>; |
| 167 | status = "okay"; |
| 168 | }; |
| 169 | |
| 170 | i2c3: i2c@01c2b800 { |
| 171 | pinctrl-names = "default"; |
| 172 | pinctrl-0 = <&i2c3_pins_a>; |
| 173 | status = "okay"; |
| 174 | }; |
| 175 | |
| 176 | spi2: spi@01c17000 { |
| 177 | pinctrl-names = "default"; |
| 178 | pinctrl-0 = <&spi2_pins_b>; |
| 179 | status = "okay"; |
| 180 | }; |
| 181 | |
| 182 | gmac: ethernet@01c50000 { |
| 183 | pinctrl-names = "default"; |
| 184 | pinctrl-0 = <&gmac_pins_rgmii_a>; |
| 185 | phy = <&phy1>; |
| 186 | phy-mode = "rgmii"; |
| 187 | phy-supply = <®_gmac_vdd>; |
| 188 | /* phy reset config */ |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 189 | snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */ |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 190 | snps,reset-active-low; |
| 191 | /* wait 1s after reset, otherwise fail to read phy id */ |
| 192 | snps,reset-delays-us = <0 10000 1000000>; |
| 193 | status = "okay"; |
| 194 | |
| 195 | phy1: ethernet-phy@1 { |
| 196 | reg = <1>; |
| 197 | }; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | reg_ahci_5v: ahci-5v { |
| 202 | pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 203 | gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 204 | status = "okay"; |
| 205 | }; |
| 206 | |
| 207 | reg_usb1_vbus: usb1-vbus { |
| 208 | pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 209 | gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 210 | status = "okay"; |
| 211 | }; |
| 212 | |
| 213 | reg_usb2_vbus: usb2-vbus { |
| 214 | status = "okay"; |
| 215 | }; |
| 216 | |
| 217 | reg_mmc3_vdd: mmc3_vdd { |
| 218 | compatible = "regulator-fixed"; |
| 219 | pinctrl-names = "default"; |
| 220 | pinctrl-0 = <&mmc3_vdd_pin_a20_hummingbird>; |
| 221 | regulator-name = "mmc3_vdd"; |
| 222 | regulator-min-microvolt = <3000000>; |
| 223 | regulator-max-microvolt = <3000000>; |
| 224 | enable-active-high; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 225 | gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 226 | }; |
| 227 | |
| 228 | reg_gmac_vdd: gmac_vdd { |
| 229 | compatible = "regulator-fixed"; |
| 230 | pinctrl-names = "default"; |
| 231 | pinctrl-0 = <&gmac_vdd_pin_a20_hummingbird>; |
| 232 | regulator-name = "gmac_vdd"; |
| 233 | regulator-min-microvolt = <3000000>; |
| 234 | regulator-max-microvolt = <3000000>; |
| 235 | enable-active-high; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame^] | 236 | gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */ |
Wills Wang | d95d6d4 | 2014-08-19 15:33:01 +0800 | [diff] [blame] | 237 | }; |
| 238 | }; |