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