Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Oliver Schinagl |
| 3 | * |
| 4 | * Oliver Schinagl <oliver@schinagl.nl> |
| 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" |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [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 | |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 22 | / { |
| 23 | model = "Cubietech Cubietruck"; |
| 24 | compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; |
| 25 | |
| 26 | soc@01c00000 { |
Hans de Goede | c621183 | 2014-05-02 17:57:28 +0200 | [diff] [blame] | 27 | mmc0: mmc@01c0f000 { |
| 28 | pinctrl-names = "default"; |
| 29 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; |
Hans de Goede | 0ed9eab | 2014-05-11 09:46:57 +0200 | [diff] [blame] | 30 | vmmc-supply = <®_vcc3v3>; |
Hans de Goede | c621183 | 2014-05-02 17:57:28 +0200 | [diff] [blame] | 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 */ |
Hans de Goede | c621183 | 2014-05-02 17:57:28 +0200 | [diff] [blame] | 33 | cd-inverted; |
| 34 | status = "okay"; |
| 35 | }; |
| 36 | |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 37 | mmc3: mmc@01c12000 { |
| 38 | pinctrl-names = "default"; |
| 39 | pinctrl-0 = <&mmc3_pins_a>; |
| 40 | vmmc-supply = <®_vmmc3>; |
Hans de Goede | c5b7261 | 2014-05-21 19:43:30 +0200 | [diff] [blame] | 41 | bus-width = <4>; |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 42 | non-removable; |
| 43 | status = "okay"; |
| 44 | }; |
| 45 | |
Hans de Goede | a415eef | 2014-03-01 20:26:34 +0100 | [diff] [blame] | 46 | usbphy: phy@01c13400 { |
Roman Byshko | a7679b6 | 2014-11-10 19:55:10 +0100 | [diff] [blame] | 47 | usb0_vbus-supply = <®_usb0_vbus>; |
Hans de Goede | a415eef | 2014-03-01 20:26:34 +0100 | [diff] [blame] | 48 | usb1_vbus-supply = <®_usb1_vbus>; |
| 49 | usb2_vbus-supply = <®_usb2_vbus>; |
| 50 | status = "okay"; |
| 51 | }; |
| 52 | |
| 53 | ehci0: usb@01c14000 { |
| 54 | status = "okay"; |
| 55 | }; |
| 56 | |
| 57 | ohci0: usb@01c14400 { |
| 58 | status = "okay"; |
| 59 | }; |
| 60 | |
Hans de Goede | 902febf | 2014-03-01 20:26:22 +0100 | [diff] [blame] | 61 | ahci: sata@01c18000 { |
| 62 | target-supply = <®_ahci_5v>; |
| 63 | status = "okay"; |
| 64 | }; |
| 65 | |
Hans de Goede | a415eef | 2014-03-01 20:26:34 +0100 | [diff] [blame] | 66 | ehci1: usb@01c1c000 { |
| 67 | status = "okay"; |
| 68 | }; |
| 69 | |
| 70 | ohci1: usb@01c1c400 { |
| 71 | status = "okay"; |
| 72 | }; |
| 73 | |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 74 | pinctrl@01c20800 { |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 75 | mmc3_pins_a: mmc3@0 { |
| 76 | /* AP6210 requires pull-up */ |
Maxime Ripard | 092a0c3 | 2014-12-16 22:59:57 +0100 | [diff] [blame] | 77 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 78 | }; |
| 79 | |
| 80 | vmmc3_pin_cubietruck: vmmc3_pin@0 { |
| 81 | allwinner,pins = "PH9"; |
| 82 | allwinner,function = "gpio_out"; |
Maxime Ripard | 092a0c3 | 2014-12-16 22:59:57 +0100 | [diff] [blame] | 83 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
| 84 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 85 | }; |
| 86 | |
Hans de Goede | 902febf | 2014-03-01 20:26:22 +0100 | [diff] [blame] | 87 | ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { |
| 88 | allwinner,pins = "PH12"; |
| 89 | allwinner,function = "gpio_out"; |
Maxime Ripard | 092a0c3 | 2014-12-16 22:59:57 +0100 | [diff] [blame] | 90 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
| 91 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
Hans de Goede | 902febf | 2014-03-01 20:26:22 +0100 | [diff] [blame] | 92 | }; |
| 93 | |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 94 | led_pins_cubietruck: led_pins@0 { |
| 95 | allwinner,pins = "PH7", "PH11", "PH20", "PH21"; |
| 96 | allwinner,function = "gpio_out"; |
Maxime Ripard | 092a0c3 | 2014-12-16 22:59:57 +0100 | [diff] [blame] | 97 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
| 98 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 99 | }; |
Roman Byshko | 9eb1e27 | 2014-11-10 19:55:09 +0100 | [diff] [blame] | 100 | |
| 101 | usb0_vbus_pin_a: usb0_vbus_pin@0 { |
| 102 | allwinner,pins = "PH17"; |
| 103 | allwinner,function = "gpio_out"; |
Maxime Ripard | 092a0c3 | 2014-12-16 22:59:57 +0100 | [diff] [blame] | 104 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
| 105 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
Roman Byshko | 9eb1e27 | 2014-11-10 19:55:09 +0100 | [diff] [blame] | 106 | }; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 107 | }; |
| 108 | |
Alexandre Belloni | 96ac3b3 | 2014-04-28 18:17:14 +0200 | [diff] [blame] | 109 | pwm: pwm@01c20e00 { |
| 110 | pinctrl-names = "default"; |
| 111 | pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>; |
| 112 | status = "okay"; |
| 113 | }; |
| 114 | |
Alexander Bersenev | 0256452 | 2014-06-09 00:08:13 +0600 | [diff] [blame] | 115 | ir0: ir@01c21800 { |
| 116 | pinctrl-names = "default"; |
| 117 | pinctrl-0 = <&ir0_pins_a>; |
| 118 | status = "okay"; |
| 119 | }; |
| 120 | |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 121 | uart0: serial@01c28000 { |
| 122 | pinctrl-names = "default"; |
| 123 | pinctrl-0 = <&uart0_pins_a>; |
| 124 | status = "okay"; |
| 125 | }; |
Chen-Yu Tsai | 6267355 | 2014-01-06 13:58:12 +0800 | [diff] [blame] | 126 | |
| 127 | i2c0: i2c@01c2ac00 { |
| 128 | pinctrl-names = "default"; |
| 129 | pinctrl-0 = <&i2c0_pins_a>; |
| 130 | status = "okay"; |
Carlo Caione | ec0c933 | 2014-06-30 23:57:53 +0200 | [diff] [blame] | 131 | |
| 132 | axp209: pmic@34 { |
Carlo Caione | ec0c933 | 2014-06-30 23:57:53 +0200 | [diff] [blame] | 133 | reg = <0x34>; |
| 134 | interrupt-parent = <&nmi_intc>; |
Maxime Ripard | a6bac9e | 2014-12-16 22:59:59 +0100 | [diff] [blame] | 135 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
Carlo Caione | ec0c933 | 2014-06-30 23:57:53 +0200 | [diff] [blame] | 136 | }; |
Chen-Yu Tsai | 6267355 | 2014-01-06 13:58:12 +0800 | [diff] [blame] | 137 | }; |
| 138 | |
| 139 | i2c1: i2c@01c2b000 { |
| 140 | pinctrl-names = "default"; |
| 141 | pinctrl-0 = <&i2c1_pins_a>; |
| 142 | status = "okay"; |
| 143 | }; |
| 144 | |
| 145 | i2c2: i2c@01c2b400 { |
| 146 | pinctrl-names = "default"; |
| 147 | pinctrl-0 = <&i2c2_pins_a>; |
| 148 | status = "okay"; |
| 149 | }; |
Chen-Yu Tsai | 67073d9 | 2014-02-10 18:35:51 +0800 | [diff] [blame] | 150 | |
| 151 | gmac: ethernet@01c50000 { |
| 152 | pinctrl-names = "default"; |
| 153 | pinctrl-0 = <&gmac_pins_rgmii_a>; |
| 154 | phy = <&phy1>; |
| 155 | phy-mode = "rgmii"; |
| 156 | status = "okay"; |
| 157 | |
| 158 | phy1: ethernet-phy@1 { |
| 159 | reg = <1>; |
| 160 | }; |
| 161 | }; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 162 | }; |
| 163 | |
| 164 | leds { |
| 165 | compatible = "gpio-leds"; |
| 166 | pinctrl-names = "default"; |
| 167 | pinctrl-0 = <&led_pins_cubietruck>; |
| 168 | |
| 169 | blue { |
| 170 | label = "cubietruck:blue:usr"; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 171 | gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 172 | }; |
| 173 | |
| 174 | orange { |
| 175 | label = "cubietruck:orange:usr"; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 176 | gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 177 | }; |
| 178 | |
| 179 | white { |
| 180 | label = "cubietruck:white:usr"; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 181 | gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 182 | }; |
| 183 | |
| 184 | green { |
| 185 | label = "cubietruck:green:usr"; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 186 | gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 187 | }; |
| 188 | }; |
Hans de Goede | 902febf | 2014-03-01 20:26:22 +0100 | [diff] [blame] | 189 | |
| 190 | reg_ahci_5v: ahci-5v { |
| 191 | pinctrl-0 = <&ahci_pwr_pin_cubietruck>; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 192 | gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; |
Hans de Goede | 902febf | 2014-03-01 20:26:22 +0100 | [diff] [blame] | 193 | status = "okay"; |
| 194 | }; |
Hans de Goede | a415eef | 2014-03-01 20:26:34 +0100 | [diff] [blame] | 195 | |
Roman Byshko | 9eb1e27 | 2014-11-10 19:55:09 +0100 | [diff] [blame] | 196 | reg_usb0_vbus: usb0-vbus { |
| 197 | pinctrl-0 = <&usb0_vbus_pin_a>; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 198 | gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>; |
Roman Byshko | 9eb1e27 | 2014-11-10 19:55:09 +0100 | [diff] [blame] | 199 | status = "okay"; |
| 200 | }; |
| 201 | |
Hans de Goede | a415eef | 2014-03-01 20:26:34 +0100 | [diff] [blame] | 202 | reg_usb1_vbus: usb1-vbus { |
| 203 | status = "okay"; |
| 204 | }; |
| 205 | |
| 206 | reg_usb2_vbus: usb2-vbus { |
| 207 | status = "okay"; |
| 208 | }; |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 209 | |
| 210 | reg_vmmc3: vmmc3 { |
| 211 | compatible = "regulator-fixed"; |
| 212 | pinctrl-names = "default"; |
| 213 | pinctrl-0 = <&vmmc3_pin_cubietruck>; |
| 214 | regulator-name = "vmmc3"; |
| 215 | regulator-min-microvolt = <3300000>; |
| 216 | regulator-max-microvolt = <3300000>; |
| 217 | enable-active-high; |
Maxime Ripard | bca1292 | 2014-12-16 22:59:55 +0100 | [diff] [blame] | 218 | gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; |
Chen-Yu Tsai | 3906c0a | 2014-05-02 17:57:29 +0200 | [diff] [blame] | 219 | }; |
Oliver Schinagl | 01ed663 | 2013-10-08 10:22:32 +0200 | [diff] [blame] | 220 | }; |
Chen-Yu Tsai | 0d4e2934 | 2015-01-12 12:34:05 +0800 | [diff] [blame^] | 221 | |
| 222 | #include "axp209.dtsi" |
| 223 | |
| 224 | &cpu0 { |
| 225 | cpu-supply = <®_dcdc2>; |
| 226 | }; |
| 227 | |
| 228 | ®_dcdc2 { |
| 229 | regulator-always-on; |
| 230 | regulator-min-microvolt = <1000000>; |
| 231 | regulator-max-microvolt = <1450000>; |
| 232 | regulator-name = "vdd-cpu"; |
| 233 | }; |
| 234 | |
| 235 | ®_dcdc3 { |
| 236 | regulator-always-on; |
| 237 | regulator-min-microvolt = <1000000>; |
| 238 | regulator-max-microvolt = <1400000>; |
| 239 | regulator-name = "vdd-int-dll"; |
| 240 | }; |
| 241 | |
| 242 | ®_ldo1 { |
| 243 | regulator-name = "vdd-rtc"; |
| 244 | }; |
| 245 | |
| 246 | ®_ldo2 { |
| 247 | regulator-always-on; |
| 248 | regulator-min-microvolt = <3000000>; |
| 249 | regulator-max-microvolt = <3000000>; |
| 250 | regulator-name = "avcc"; |
| 251 | }; |