Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sunxi-dt-for-3.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt

Merge "Allwinner device tree changes for 3.20" from Maxime Ripard:

A lot of changes to the device tree for the 3.20 merge window, mostly with:
- More DT license convertions, only two DTS and two DTSI are still uncertain
and have not been converted yet
- Use the C-preprocessor includes in the device trees.
- Add support for the A31s SoC and improve the A80 support
- Add IR receiver, lradc, PS/2 support
- Add cpufreq support for all SoCs but the A23 and A80.
- And a lot of new boards

* tag 'sunxi-dt-for-3.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (64 commits)
ARM: dts: sun5i: Enable axp209 support on A13-OLinuxIno
ARM: sunxi: dts: Add A10/A20 PS2 pin muxing options
ARM: sunxi: dts: Add PS2 nodes to dtsi for A10,A20
ARM: dts: sun6i: Add resistive touchscreen controller node to dtsi
ARM: dts: sun4i: Add Hyundau A7HD board
ARM: dts: sun4i: Add Marsboard A10 board
ARM: dts: sun9i: Enable mmc2 on A80 Optimus Board
ARM: dts: sun9i: Add 8 bit mmc pinmux setting for mmc2
ARM: dts: sun9i: Enable mmc0 on A80 Optimus Board
ARM: dts: sun9i: Convert a80 optimus board dts to label referencing
ARM: dts: sun9i: Add mmc controller nodes to the A80 dtsi
ARM: dts: sun9i: Add mmc config clock nodes
ARM: dts: sunxi: Add missing mdio label
ARM: dts: sun5i: Add mk802_a10s board
ARM: dts: sun4i: Add mk802ii board
ARM: dts: sun4i: Add mk802 board
ARM: dts: sun4i: Add dts file for Chuwi V7 CW0825 tablet
ARM: dts: sun7i: Add dts file for Bananapro board
ARM: sun6i: Enable ARM arch timers
ARM: dts: sun6i: Convert hummingbird a31 dts to label references
...

Signed-off-by: Olof Johansson <olof@lixom.net>

+3330 -779
+11 -2
arch/arm/boot/dts/Makefile
··· 508 508 dtb-$(CONFIG_MACH_SUN4I) += \ 509 509 sun4i-a10-a1000.dtb \ 510 510 sun4i-a10-ba10-tvbox.dtb \ 511 + sun4i-a10-chuwi-v7-cw0825.dtb \ 511 512 sun4i-a10-cubieboard.dtb \ 513 + sun4i-a10-marsboard.dtb \ 512 514 sun4i-a10-mini-xplus.dtb \ 515 + sun4i-a10-mk802.dtb \ 516 + sun4i-a10-mk802ii.dtb \ 513 517 sun4i-a10-hackberry.dtb \ 518 + sun4i-a10-hyundai-a7hd.dtb \ 514 519 sun4i-a10-inet97fv2.dtb \ 515 520 sun4i-a10-olinuxino-lime.dtb \ 516 521 sun4i-a10-pcduino.dtb 517 522 dtb-$(CONFIG_MACH_SUN5I) += \ 523 + sun5i-a10s-mk802.dtb \ 518 524 sun5i-a10s-olinuxino-micro.dtb \ 519 525 sun5i-a10s-r7-tv-dongle.dtb \ 520 526 sun5i-a13-hsg-h702.dtb \ ··· 530 524 sun6i-a31-app4-evb1.dtb \ 531 525 sun6i-a31-colombus.dtb \ 532 526 sun6i-a31-hummingbird.dtb \ 533 - sun6i-a31-m9.dtb 527 + sun6i-a31-m9.dtb \ 528 + sun6i-a31s-cs908.dtb 534 529 dtb-$(CONFIG_MACH_SUN7I) += \ 535 530 sun7i-a20-bananapi.dtb \ 531 + sun7i-a20-bananapro.dtb \ 536 532 sun7i-a20-cubieboard2.dtb \ 537 533 sun7i-a20-cubietruck.dtb \ 538 534 sun7i-a20-hummingbird.dtb \ ··· 545 537 sun7i-a20-olinuxino-micro.dtb \ 546 538 sun7i-a20-pcduino3.dtb 547 539 dtb-$(CONFIG_MACH_SUN8I) += \ 548 - sun8i-a23-ippo-q8h-v5.dtb 540 + sun8i-a23-ippo-q8h-v5.dtb \ 541 + sun8i-a23-ippo-q8h-v1.2.dtb 549 542 dtb-$(CONFIG_MACH_SUN9I) += \ 550 543 sun9i-a80-optimus.dtb 551 544 dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
+97
arch/arm/boot/dts/axp209.dtsi
··· 1 + /* 2 + * Copyright 2015 Chen-Yu Tsai 3 + * 4 + * Chen-Yu Tsai <wens@csie.org> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This file is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * You should have received a copy of the GNU General Public 22 + * License along with this file; if not, write to the Free 23 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 24 + * MA 02110-1301 USA 25 + * 26 + * Or, alternatively, 27 + * 28 + * b) Permission is hereby granted, free of charge, to any person 29 + * obtaining a copy of this software and associated documentation 30 + * files (the "Software"), to deal in the Software without 31 + * restriction, including without limitation the rights to use, 32 + * copy, modify, merge, publish, distribute, sublicense, and/or 33 + * sell copies of the Software, and to permit persons to whom the 34 + * Software is furnished to do so, subject to the following 35 + * conditions: 36 + * 37 + * The above copyright notice and this permission notice shall be 38 + * included in all copies or substantial portions of the Software. 39 + * 40 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 41 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 42 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 43 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 44 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 45 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 46 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 47 + * OTHER DEALINGS IN THE SOFTWARE. 48 + */ 49 + 50 + /* 51 + * AXP202/209 Integrated Power Management Chip 52 + * http://www.x-powers.com/product/AXP20X.php 53 + * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf 54 + */ 55 + 56 + &axp209 { 57 + compatible = "x-powers,axp209"; 58 + interrupt-controller; 59 + #interrupt-cells = <1>; 60 + 61 + regulators { 62 + /* Default work frequency for buck regulators */ 63 + x-powers,dcdc-freq = <1500>; 64 + 65 + reg_dcdc2: dcdc2 { 66 + regulator-name = "dcdc2"; 67 + }; 68 + 69 + reg_dcdc3: dcdc3 { 70 + regulator-name = "dcdc3"; 71 + }; 72 + 73 + reg_ldo1: ldo1 { 74 + /* LDO1 is a fixed output regulator */ 75 + regulator-always-on; 76 + regulator-min-microvolt = <1300000>; 77 + regulator-max-microvolt = <1300000>; 78 + regulator-name = "ldo1"; 79 + }; 80 + 81 + reg_ldo2: ldo2 { 82 + regulator-name = "ldo2"; 83 + }; 84 + 85 + reg_ldo3: ldo3 { 86 + regulator-name = "ldo3"; 87 + }; 88 + 89 + reg_ldo4: ldo4 { 90 + regulator-name = "ldo4"; 91 + }; 92 + 93 + reg_ldo5: ldo5 { 94 + regulator-name = "ldo5"; 95 + }; 96 + }; 97 + };
+13 -10
arch/arm/boot/dts/sun4i-a10-a1000.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun4i-a10.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun4i-a10.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 56 54 57 / { 55 58 model = "Mele A1000"; ··· 80 77 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 81 78 vmmc-supply = <&reg_vcc3v3>; 82 79 bus-width = <4>; 83 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 80 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 84 81 cd-inverted; 85 82 status = "okay"; 86 83 }; ··· 115 112 emac_power_pin_a1000: emac_power_pin@0 { 116 113 allwinner,pins = "PH15"; 117 114 allwinner,function = "gpio_out"; 118 - allwinner,drive = <0>; 119 - allwinner,pull = <0>; 115 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 116 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 120 117 }; 121 118 122 119 led_pins_a1000: led_pins@0 { 123 120 allwinner,pins = "PH10", "PH20"; 124 121 allwinner,function = "gpio_out"; 125 - allwinner,drive = <0>; 126 - allwinner,pull = <0>; 122 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 123 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 127 124 }; 128 125 }; 129 126 ··· 162 159 163 160 red { 164 161 label = "a1000:red:usr"; 165 - gpios = <&pio 7 10 0>; 162 + gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; 166 163 }; 167 164 168 165 blue { 169 166 label = "a1000:blue:usr"; 170 - gpios = <&pio 7 20 0>; 167 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 171 168 }; 172 169 }; 173 170 ··· 179 176 regulator-min-microvolt = <3300000>; 180 177 regulator-max-microvolt = <3300000>; 181 178 enable-active-high; 182 - gpio = <&pio 7 15 0>; 179 + gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; 183 180 }; 184 181 185 182 reg_usb1_vbus: usb1-vbus {
+6 -4
arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun4i-a10.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun4i-a10.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 51 53 52 54 / { 53 55 model = "BA10 tvbox"; ··· 76 74 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 77 75 vmmc-supply = <&reg_vcc3v3>; 78 76 bus-width = <4>; 79 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 77 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 80 78 cd-inverted; 81 79 status = "okay"; 82 80 }; ··· 142 140 }; 143 141 144 142 reg_usb2_vbus: usb2-vbus { 145 - gpio = <&pio 7 12 0>; 143 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 146 144 status = "okay"; 147 145 }; 148 146 };
+100
arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun4i-a10.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + #include <dt-bindings/gpio/gpio.h> 52 + 53 + / { 54 + model = "Chuwi V7 CW0825"; 55 + compatible = "chuwi,v7-cw0825", "allwinner,sun4i-a10"; 56 + }; 57 + 58 + &ehci1 { 59 + status = "okay"; 60 + }; 61 + 62 + &i2c0 { 63 + pinctrl-names = "default"; 64 + pinctrl-0 = <&i2c0_pins_a>; 65 + status = "okay"; 66 + 67 + axp209: pmic@34 { 68 + compatible = "x-powers,axp209"; 69 + reg = <0x34>; 70 + interrupts = <0>; 71 + 72 + interrupt-controller; 73 + #interrupt-cells = <1>; 74 + }; 75 + }; 76 + 77 + &mmc0 { 78 + pinctrl-names = "default"; 79 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 80 + vmmc-supply = <&reg_vcc3v3>; 81 + bus-width = <4>; 82 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 83 + cd-inverted; 84 + status = "okay"; 85 + }; 86 + 87 + &reg_usb2_vbus { 88 + status = "okay"; 89 + }; 90 + 91 + &uart0 { 92 + pinctrl-names = "default"; 93 + pinctrl-0 = <&uart0_pins_a>; 94 + status = "okay"; 95 + }; 96 + 97 + &usbphy { 98 + usb2_vbus-supply = <&reg_usb2_vbus>; 99 + status = "okay"; 100 + };
+47 -11
arch/arm/boot/dts/sun4i-a10-cubieboard.dts
··· 47 47 */ 48 48 49 49 /dts-v1/; 50 - /include/ "sun4i-a10.dtsi" 51 - /include/ "sunxi-common-regulators.dtsi" 50 + #include "sun4i-a10.dtsi" 51 + #include "sunxi-common-regulators.dtsi" 52 + 53 + #include <dt-bindings/gpio/gpio.h> 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 52 55 53 56 / { 54 57 model = "Cubietech Cubieboard"; ··· 78 75 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 79 76 vmmc-supply = <&reg_vcc3v3>; 80 77 bus-width = <4>; 81 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 78 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 82 79 cd-inverted; 83 80 status = "okay"; 84 81 }; ··· 114 111 led_pins_cubieboard: led_pins@0 { 115 112 allwinner,pins = "PH20", "PH21"; 116 113 allwinner,function = "gpio_out"; 117 - allwinner,drive = <1>; 118 - allwinner,pull = <0>; 114 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 115 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 119 116 }; 120 117 }; 121 118 ··· 137 134 status = "okay"; 138 135 139 136 axp209: pmic@34 { 140 - compatible = "x-powers,axp209"; 141 137 reg = <0x34>; 142 138 interrupts = <0>; 143 - 144 - interrupt-controller; 145 - #interrupt-cells = <1>; 146 139 }; 147 140 }; 148 141 149 142 i2c1: i2c@01c2b000 { 150 143 pinctrl-names = "default"; 151 144 pinctrl-0 = <&i2c1_pins_a>; 145 + status = "okay"; 146 + }; 147 + 148 + spi0: spi@01c05000 { 149 + pinctrl-names = "default"; 150 + pinctrl-0 = <&spi0_pins_a>; 152 151 status = "okay"; 153 152 }; 154 153 }; ··· 162 157 163 158 blue { 164 159 label = "cubieboard:blue:usr"; 165 - gpios = <&pio 7 21 0>; /* LED1 */ 160 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */ 166 161 }; 167 162 168 163 green { 169 164 label = "cubieboard:green:usr"; 170 - gpios = <&pio 7 20 0>; /* LED2 */ 165 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */ 171 166 linux,default-trigger = "heartbeat"; 172 167 }; 173 168 }; ··· 183 178 reg_usb2_vbus: usb2-vbus { 184 179 status = "okay"; 185 180 }; 181 + }; 182 + 183 + #include "axp209.dtsi" 184 + 185 + &cpu0 { 186 + cpu-supply = <&reg_dcdc2>; 187 + }; 188 + 189 + &reg_dcdc2 { 190 + regulator-always-on; 191 + regulator-min-microvolt = <1000000>; 192 + regulator-max-microvolt = <1450000>; 193 + regulator-name = "vdd-cpu"; 194 + }; 195 + 196 + &reg_dcdc3 { 197 + regulator-always-on; 198 + regulator-min-microvolt = <1000000>; 199 + regulator-max-microvolt = <1400000>; 200 + regulator-name = "vdd-int-dll"; 201 + }; 202 + 203 + &reg_ldo1 { 204 + regulator-name = "vdd-rtc"; 205 + }; 206 + 207 + &reg_ldo2 { 208 + regulator-always-on; 209 + regulator-min-microvolt = <3000000>; 210 + regulator-max-microvolt = <3000000>; 211 + regulator-name = "avcc"; 186 212 };
+12 -9
arch/arm/boot/dts/sun4i-a10-hackberry.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun4i-a10.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun4i-a10.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 56 54 57 / { 55 58 model = "Miniand Hackberry"; ··· 80 77 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 81 78 vmmc-supply = <&reg_vcc3v3>; 82 79 bus-width = <4>; 83 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 80 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 84 81 cd-inverted; 85 82 status = "okay"; 86 83 }; ··· 114 111 hackberry_hogs: hogs@0 { 115 112 allwinner,pins = "PH19"; 116 113 allwinner,function = "gpio_out"; 117 - allwinner,drive = <0>; 118 - allwinner,pull = <0>; 114 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 115 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 119 116 }; 120 117 121 118 usb2_vbus_pin_hackberry: usb2_vbus_pin@0 { 122 119 allwinner,pins = "PH12"; 123 120 allwinner,function = "gpio_out"; 124 - allwinner,drive = <0>; 125 - allwinner,pull = <0>; 121 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 122 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 126 123 }; 127 124 }; 128 125 ··· 160 157 regulator-min-microvolt = <3300000>; 161 158 regulator-max-microvolt = <3300000>; 162 159 enable-active-high; 163 - gpio = <&pio 7 19 0>; 160 + gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>; 164 161 }; 165 162 166 163 reg_usb1_vbus: usb1-vbus { ··· 169 166 170 167 reg_usb2_vbus: usb2-vbus { 171 168 pinctrl-0 = <&usb2_vbus_pin_hackberry>; 172 - gpio = <&pio 7 12 0>; 169 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 173 170 status = "okay"; 174 171 }; 175 172 };
+105
arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun4i-a10.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + #include <dt-bindings/gpio/gpio.h> 52 + 53 + / { 54 + model = "Hyundai A7HD"; 55 + compatible = "hyundai,a7hd", "allwinner,sun4i-a10"; 56 + }; 57 + 58 + &ehci1 { 59 + status = "okay"; 60 + }; 61 + 62 + &i2c0 { 63 + pinctrl-names = "default"; 64 + pinctrl-0 = <&i2c0_pins_a>; 65 + status = "okay"; 66 + 67 + axp209: pmic@34 { 68 + compatible = "x-powers,axp209"; 69 + reg = <0x34>; 70 + interrupts = <0>; 71 + 72 + interrupt-controller; 73 + #interrupt-cells = <1>; 74 + }; 75 + }; 76 + 77 + &mmc0 { 78 + pinctrl-names = "default"; 79 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 80 + vmmc-supply = <&reg_vcc3v3>; 81 + bus-width = <4>; 82 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 83 + cd-inverted; 84 + status = "okay"; 85 + }; 86 + 87 + &reg_usb2_vbus { 88 + gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ 89 + status = "okay"; 90 + }; 91 + 92 + &uart0 { 93 + pinctrl-names = "default"; 94 + pinctrl-0 = <&uart0_pins_a>; 95 + status = "okay"; 96 + }; 97 + 98 + &usb2_vbus_pin_a { 99 + allwinner,pins = "PH6"; 100 + }; 101 + 102 + &usbphy { 103 + usb2_vbus-supply = <&reg_usb2_vbus>; 104 + status = "okay"; 105 + };
+5 -3
arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun4i-a10.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun4i-a10.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 53 55 54 56 / { 55 57 model = "INet-97F Rev 02"; ··· 67 65 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 68 66 vmmc-supply = <&reg_vcc3v3>; 69 67 bus-width = <4>; 70 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 68 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 71 69 cd-inverted; 72 70 status = "okay"; 73 71 };
+183
arch/arm/boot/dts/sun4i-a10-marsboard.dts
··· 1 + /* 2 + * Copyright 2015 Aleksei Mamlin 3 + * Aleksei Mamlin <mamlinav@gmail.com> 4 + * 5 + * This file is dual-licensed: you can use it either under the terms 6 + * of the GPL or the X11 license, at your option. Note that this dual 7 + * licensing only applies to this file, and not this project as a 8 + * whole. 9 + * 10 + * a) This file is free software; you can redistribute it and/or 11 + * modify it under the terms of the GNU General Public License as 12 + * published by the Free Software Foundation; either version 2 of the 13 + * License, or (at your option) any later version. 14 + * 15 + * This file is distributed in the hope that it will be useful, 16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 + * GNU General Public License for more details. 19 + * 20 + * You should have received a copy of the GNU General Public 21 + * License along with this file; if not, write to the Free 22 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 23 + * MA 02110-1301 USA 24 + * 25 + * Or, alternatively, 26 + * 27 + * b) Permission is hereby granted, free of charge, to any person 28 + * obtaining a copy of this software and associated documentation 29 + * files (the "Software"), to deal in the Software without 30 + * restriction, including without limitation the rights to use, 31 + * copy, modify, merge, publish, distribute, sublicense, and/or 32 + * sell copies of the Software, and to permit persons to whom the 33 + * Software is furnished to do so, subject to the following 34 + * conditions: 35 + * 36 + * The above copyright notice and this permission notice shall be 37 + * included in all copies or substantial portions of the Software. 38 + * 39 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 40 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 41 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 42 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 43 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 44 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 45 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 46 + * OTHER DEALINGS IN THE SOFTWARE. 47 + */ 48 + 49 + /dts-v1/; 50 + #include "sun4i-a10.dtsi" 51 + #include "sunxi-common-regulators.dtsi" 52 + 53 + #include <dt-bindings/gpio/gpio.h> 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 55 + 56 + / { 57 + model = "HAOYU Electronics Marsboard A10"; 58 + compatible = "haoyu,a10-marsboard", "allwinner,sun4i-a10"; 59 + 60 + leds { 61 + compatible = "gpio-leds"; 62 + pinctrl-names = "default"; 63 + pinctrl-0 = <&led_pins_marsboard>; 64 + 65 + red1 { 66 + label = "marsboard:red1:usr"; 67 + gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>; 68 + }; 69 + 70 + red2 { 71 + label = "marsboard:red2:usr"; 72 + gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>; 73 + }; 74 + 75 + red3 { 76 + label = "marsboard:red3:usr"; 77 + gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; 78 + }; 79 + 80 + red4 { 81 + label = "marsboard:red4:usr"; 82 + gpios = <&pio 1 8 GPIO_ACTIVE_HIGH>; 83 + }; 84 + }; 85 + }; 86 + 87 + &ahci { 88 + status = "okay"; 89 + }; 90 + 91 + &ehci0 { 92 + status = "okay"; 93 + }; 94 + 95 + &ehci1 { 96 + status = "okay"; 97 + }; 98 + 99 + &emac { 100 + pinctrl-names = "default"; 101 + pinctrl-0 = <&emac_pins_a>; 102 + phy = <&phy1>; 103 + status = "okay"; 104 + }; 105 + 106 + &i2c0 { 107 + pinctrl-names = "default"; 108 + pinctrl-0 = <&i2c0_pins_a>; 109 + status = "okay"; 110 + }; 111 + 112 + &i2c1 { 113 + pinctrl-names = "default"; 114 + pinctrl-0 = <&i2c1_pins_a>; 115 + status = "okay"; 116 + }; 117 + 118 + &i2c2 { 119 + pinctrl-names = "default"; 120 + pinctrl-0 = <&i2c2_pins_a>; 121 + status = "okay"; 122 + }; 123 + 124 + &mdio { 125 + status = "okay"; 126 + 127 + phy1: ethernet-phy@1 { 128 + reg = <1>; 129 + }; 130 + }; 131 + 132 + &mmc0 { 133 + pinctrl-names = "default"; 134 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 135 + vmmc-supply = <&reg_vcc3v3>; 136 + bus-width = <4>; 137 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 138 + cd-inverted; 139 + status = "okay"; 140 + }; 141 + 142 + &ohci0 { 143 + status = "okay"; 144 + }; 145 + 146 + &ohci1 { 147 + status = "okay"; 148 + }; 149 + 150 + &pio { 151 + led_pins_marsboard: led_pins@0 { 152 + allwinner,pins = "PB5", "PB6", "PB7", "PB8"; 153 + allwinner,function = "gpio_out"; 154 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 155 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 156 + }; 157 + }; 158 + 159 + &reg_usb1_vbus { 160 + status = "okay"; 161 + }; 162 + 163 + &reg_usb2_vbus { 164 + status = "okay"; 165 + }; 166 + 167 + &spi0 { 168 + pinctrl-names = "default"; 169 + pinctrl-0 = <&spi0_pins_a>; 170 + status = "okay"; 171 + }; 172 + 173 + &uart0 { 174 + pinctrl-names = "default"; 175 + pinctrl-0 = <&uart0_pins_a>; 176 + status = "okay"; 177 + }; 178 + 179 + &usbphy { 180 + usb1_vbus-supply = <&reg_usb1_vbus>; 181 + usb2_vbus-supply = <&reg_usb2_vbus>; 182 + status = "okay"; 183 + };
+7 -4
arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun4i-a10.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun4i-a10.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 56 54 57 / { 55 58 model = "PineRiver Mini X-Plus"; ··· 64 61 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 65 62 vmmc-supply = <&reg_vcc3v3>; 66 63 bus-width = <4>; 67 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 64 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 68 65 cd-inverted; 69 66 status = "okay"; 70 67 }; ··· 94 91 pinctrl@01c20800 { 95 92 ir0_pins_a: ir0@0 { 96 93 /* The ir receiver is not always populated */ 97 - allwinner,pull = <1>; 94 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 98 95 }; 99 96 }; 100 97
+109
arch/arm/boot/dts/sun4i-a10-mk802.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun4i-a10.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + #include <dt-bindings/gpio/gpio.h> 52 + 53 + / { 54 + model = "MK802"; 55 + compatible = "allwinner,mk802", "allwinner,sun4i-a10"; 56 + }; 57 + 58 + &ehci0 { 59 + status = "okay"; 60 + }; 61 + 62 + &ehci1 { 63 + status = "okay"; 64 + }; 65 + 66 + &mmc0 { 67 + pinctrl-names = "default"; 68 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 69 + vmmc-supply = <&reg_vcc3v3>; 70 + bus-width = <4>; 71 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 72 + cd-inverted; 73 + status = "okay"; 74 + }; 75 + 76 + &ohci0 { 77 + status = "okay"; 78 + }; 79 + 80 + &pio { 81 + usb2_vbus_pin_mk802: usb2_vbus_pin@0 { 82 + allwinner,pins = "PH12"; 83 + allwinner,function = "gpio_out"; 84 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 85 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 86 + }; 87 + }; 88 + 89 + &reg_usb1_vbus { 90 + status = "okay"; 91 + }; 92 + 93 + &reg_usb2_vbus { 94 + pinctrl-0 = <&usb2_vbus_pin_mk802>; 95 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ 96 + status = "okay"; 97 + }; 98 + 99 + &uart0 { 100 + pinctrl-names = "default"; 101 + pinctrl-0 = <&uart0_pins_a>; 102 + status = "okay"; 103 + }; 104 + 105 + &usbphy { 106 + usb1_vbus-supply = <&reg_usb1_vbus>; 107 + usb2_vbus-supply = <&reg_usb2_vbus>; 108 + status = "okay"; 109 + };
+113
arch/arm/boot/dts/sun4i-a10-mk802ii.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun4i-a10.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + #include <dt-bindings/gpio/gpio.h> 52 + 53 + / { 54 + model = "MK802ii"; 55 + compatible = "allwinner,mk802ii", "allwinner,sun4i-a10"; 56 + }; 57 + 58 + &ehci0 { 59 + status = "okay"; 60 + }; 61 + 62 + &ehci1 { 63 + status = "okay"; 64 + }; 65 + 66 + &i2c0 { 67 + pinctrl-names = "default"; 68 + pinctrl-0 = <&i2c0_pins_a>; 69 + status = "okay"; 70 + 71 + axp209: pmic@34 { 72 + compatible = "x-powers,axp209"; 73 + reg = <0x34>; 74 + interrupts = <0>; 75 + 76 + interrupt-controller; 77 + #interrupt-cells = <1>; 78 + }; 79 + }; 80 + 81 + &mmc0 { 82 + pinctrl-names = "default"; 83 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 84 + vmmc-supply = <&reg_vcc3v3>; 85 + bus-width = <4>; 86 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 87 + cd-inverted; 88 + status = "okay"; 89 + }; 90 + 91 + &ohci0 { 92 + status = "okay"; 93 + }; 94 + 95 + &reg_usb1_vbus { 96 + status = "okay"; 97 + }; 98 + 99 + &reg_usb2_vbus { 100 + status = "okay"; 101 + }; 102 + 103 + &uart0 { 104 + pinctrl-names = "default"; 105 + pinctrl-0 = <&uart0_pins_a>; 106 + status = "okay"; 107 + }; 108 + 109 + &usbphy { 110 + usb1_vbus-supply = <&reg_usb1_vbus>; 111 + usb2_vbus-supply = <&reg_usb2_vbus>; 112 + status = "okay"; 113 + };
+12 -9
arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun4i-a10.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun4i-a10.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 53 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 54 52 55 / { 53 56 model = "Olimex A10-OLinuXino-LIME"; ··· 77 74 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 78 75 vmmc-supply = <&reg_vcc3v3>; 79 76 bus-width = <4>; 80 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 77 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 81 78 cd-inverted; 82 79 status = "okay"; 83 80 }; ··· 113 110 ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { 114 111 allwinner,pins = "PC3"; 115 112 allwinner,function = "gpio_out"; 116 - allwinner,drive = <0>; 117 - allwinner,pull = <0>; 113 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 114 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 118 115 }; 119 116 120 117 led_pins_olinuxinolime: led_pins@0 { 121 118 allwinner,pins = "PH2"; 122 119 allwinner,function = "gpio_out"; 123 - allwinner,drive = <1>; 124 - allwinner,pull = <0>; 120 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 121 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 125 122 }; 126 123 }; 127 124 ··· 154 151 155 152 green { 156 153 label = "a10-olinuxino-lime:green:usr"; 157 - gpios = <&pio 7 2 0>; 154 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 158 155 default-state = "on"; 159 156 }; 160 157 }; 161 158 162 159 reg_ahci_5v: ahci-5v { 163 160 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 164 - gpio = <&pio 2 3 0>; 161 + gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 165 162 status = "okay"; 166 163 }; 167 164
+65 -3
arch/arm/boot/dts/sun4i-a10-pcduino.dts
··· 47 47 */ 48 48 49 49 /dts-v1/; 50 - /include/ "sun4i-a10.dtsi" 51 - /include/ "sunxi-common-regulators.dtsi" 50 + #include "sun4i-a10.dtsi" 51 + #include "sunxi-common-regulators.dtsi" 52 + 53 + #include <dt-bindings/gpio/gpio.h> 54 + #include <dt-bindings/input/input.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 52 56 53 57 / { 54 58 model = "LinkSprite pcDuino"; ··· 64 60 pinctrl-0 = <&emac_pins_a>; 65 61 phy = <&phy1>; 66 62 status = "okay"; 63 + }; 64 + 65 + pinctrl@01c20800 { 66 + led_pins_pcduino: led_pins@0 { 67 + allwinner,pins = "PH15", "PH16"; 68 + allwinner,function = "gpio_out"; 69 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 70 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 71 + }; 72 + 73 + key_pins_pcduino: key_pins@0 { 74 + allwinner,pins = "PH17", "PH18", "PH19"; 75 + allwinner,function = "gpio_in"; 76 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 77 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 78 + }; 67 79 }; 68 80 69 81 mdio@01c0b080 { ··· 95 75 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 96 76 vmmc-supply = <&reg_vcc3v3>; 97 77 bus-width = <4>; 98 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 78 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 99 79 cd-inverted; 100 80 status = "okay"; 101 81 }; ··· 141 121 interrupt-controller; 142 122 #interrupt-cells = <1>; 143 123 }; 124 + }; 125 + }; 126 + 127 + leds { 128 + compatible = "gpio-leds"; 129 + pinctrl-names = "default"; 130 + pinctrl-0 = <&led_pins_pcduino>; 131 + 132 + tx { 133 + label = "pcduino:green:tx"; 134 + gpios = <&pio 7 15 GPIO_ACTIVE_LOW>; 135 + }; 136 + 137 + rx { 138 + label = "pcduino:green:rx"; 139 + gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; 140 + }; 141 + }; 142 + 143 + gpio_keys { 144 + compatible = "gpio-keys"; 145 + pinctrl-names = "default"; 146 + pinctrl-0 = <&key_pins_pcduino>; 147 + #address-cells = <1>; 148 + #size-cells = <0>; 149 + 150 + button@0 { 151 + label = "Key Back"; 152 + linux,code = <KEY_BACK>; 153 + gpios = <&pio 7 17 GPIO_ACTIVE_LOW>; 154 + }; 155 + 156 + button@1 { 157 + label = "Key Home"; 158 + linux,code = <KEY_HOME>; 159 + gpios = <&pio 7 18 GPIO_ACTIVE_LOW>; 160 + }; 161 + 162 + button@2 { 163 + label = "Key Menu"; 164 + linux,code = <KEY_MENU>; 165 + gpios = <&pio 7 19 GPIO_ACTIVE_LOW>; 144 166 }; 145 167 }; 146 168
+181 -35
arch/arm/boot/dts/sun4i-a10.dtsi
··· 10 10 * http://www.gnu.org/copyleft/gpl.html 11 11 */ 12 12 13 - /include/ "skeleton.dtsi" 13 + #include "skeleton.dtsi" 14 + 15 + #include <dt-bindings/thermal/thermal.h> 16 + 17 + #include <dt-bindings/dma/sun4i-a10.h> 18 + #include <dt-bindings/pinctrl/sun4i-a10.h> 14 19 15 20 / { 16 21 interrupt-parent = <&intc>; ··· 44 39 <&ahb_gates 44>; 45 40 status = "disabled"; 46 41 }; 42 + 43 + framebuffer@1 { 44 + compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; 45 + allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi"; 46 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, 47 + <&ahb_gates 44>, <&ahb_gates 46>; 48 + status = "disabled"; 49 + }; 50 + 51 + framebuffer@2 { 52 + compatible = "allwinner,simple-framebuffer", 53 + "simple-framebuffer"; 54 + allwinner,pipeline = "de_fe0-de_be0-lcd0"; 55 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, 56 + <&ahb_gates 46>; 57 + status = "disabled"; 58 + }; 59 + 60 + framebuffer@3 { 61 + compatible = "allwinner,simple-framebuffer", 62 + "simple-framebuffer"; 63 + allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0"; 64 + clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, 65 + <&ahb_gates 44>, <&ahb_gates 46>; 66 + status = "disabled"; 67 + }; 47 68 }; 48 69 49 70 cpus { 50 71 #address-cells = <1>; 51 72 #size-cells = <0>; 52 - cpu@0 { 73 + cpu0: cpu@0 { 53 74 device_type = "cpu"; 54 75 compatible = "arm,cortex-a8"; 55 76 reg = <0x0>; 77 + clocks = <&cpu>; 78 + clock-latency = <244144>; /* 8 32k periods */ 79 + operating-points = < 80 + /* kHz uV */ 81 + 1056000 1500000 82 + 1008000 1400000 83 + 912000 1350000 84 + 864000 1300000 85 + 624000 1250000 86 + >; 87 + #cooling-cells = <2>; 88 + cooling-min-level = <0>; 89 + cooling-max-level = <4>; 90 + }; 91 + }; 92 + 93 + thermal-zones { 94 + cpu_thermal { 95 + /* milliseconds */ 96 + polling-delay-passive = <250>; 97 + polling-delay = <1000>; 98 + thermal-sensors = <&rtp>; 99 + 100 + cooling-maps { 101 + map0 { 102 + trip = <&cpu_alert0>; 103 + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 104 + }; 105 + }; 106 + 107 + trips { 108 + cpu_alert0: cpu_alert0 { 109 + /* milliCelsius */ 110 + temperature = <850000>; 111 + hysteresis = <2000>; 112 + type = "passive"; 113 + }; 114 + 115 + cpu_crit: cpu_crit { 116 + /* milliCelsius */ 117 + temperature = <100000>; 118 + hysteresis = <2000>; 119 + type = "critical"; 120 + }; 121 + }; 56 122 }; 57 123 }; 58 124 ··· 435 359 interrupts = <10>; 436 360 clocks = <&ahb_gates 20>, <&spi0_clk>; 437 361 clock-names = "ahb", "mod"; 438 - dmas = <&dma 1 27>, <&dma 1 26>; 362 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 363 + <&dma SUN4I_DMA_DEDICATED 26>; 439 364 dma-names = "rx", "tx"; 440 365 status = "disabled"; 441 366 #address-cells = <1>; ··· 449 372 interrupts = <11>; 450 373 clocks = <&ahb_gates 21>, <&spi1_clk>; 451 374 clock-names = "ahb", "mod"; 452 - dmas = <&dma 1 9>, <&dma 1 8>; 375 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 376 + <&dma SUN4I_DMA_DEDICATED 8>; 453 377 dma-names = "rx", "tx"; 454 378 status = "disabled"; 455 379 #address-cells = <1>; ··· 465 387 status = "disabled"; 466 388 }; 467 389 468 - mdio@01c0b080 { 390 + mdio: mdio@01c0b080 { 469 391 compatible = "allwinner,sun4i-a10-mdio"; 470 392 reg = <0x01c0b080 0x14>; 471 393 status = "disabled"; ··· 516 438 reg-names = "phy_ctrl", "pmu1", "pmu2"; 517 439 clocks = <&usb_clk 8>; 518 440 clock-names = "usb_phy"; 519 - resets = <&usb_clk 1>, <&usb_clk 2>; 520 - reset-names = "usb1_reset", "usb2_reset"; 441 + resets = <&usb_clk 0>, <&usb_clk 1>, <&usb_clk 2>; 442 + reset-names = "usb0_reset", "usb1_reset", "usb2_reset"; 521 443 status = "disabled"; 522 444 }; 523 445 ··· 547 469 interrupts = <12>; 548 470 clocks = <&ahb_gates 22>, <&spi2_clk>; 549 471 clock-names = "ahb", "mod"; 550 - dmas = <&dma 1 29>, <&dma 1 28>; 472 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 473 + <&dma SUN4I_DMA_DEDICATED 28>; 551 474 dma-names = "rx", "tx"; 552 475 status = "disabled"; 553 476 #address-cells = <1>; ··· 589 510 interrupts = <50>; 590 511 clocks = <&ahb_gates 23>, <&spi3_clk>; 591 512 clock-names = "ahb", "mod"; 592 - dmas = <&dma 1 31>, <&dma 1 30>; 513 + dmas = <&dma SUN4I_DMA_DEDICATED 31>, 514 + <&dma SUN4I_DMA_DEDICATED 30>; 593 515 dma-names = "rx", "tx"; 594 516 status = "disabled"; 595 517 #address-cells = <1>; ··· 618 538 pwm0_pins_a: pwm0@0 { 619 539 allwinner,pins = "PB2"; 620 540 allwinner,function = "pwm"; 621 - allwinner,drive = <0>; 622 - allwinner,pull = <0>; 541 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 542 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 623 543 }; 624 544 625 545 pwm1_pins_a: pwm1@0 { 626 546 allwinner,pins = "PI3"; 627 547 allwinner,function = "pwm"; 628 - allwinner,drive = <0>; 629 - allwinner,pull = <0>; 548 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 549 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 630 550 }; 631 551 632 552 uart0_pins_a: uart0@0 { 633 553 allwinner,pins = "PB22", "PB23"; 634 554 allwinner,function = "uart0"; 635 - allwinner,drive = <0>; 636 - allwinner,pull = <0>; 555 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 556 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 637 557 }; 638 558 639 559 uart0_pins_b: uart0@1 { 640 560 allwinner,pins = "PF2", "PF4"; 641 561 allwinner,function = "uart0"; 642 - allwinner,drive = <0>; 643 - allwinner,pull = <0>; 562 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 563 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 644 564 }; 645 565 646 566 uart1_pins_a: uart1@0 { 647 567 allwinner,pins = "PA10", "PA11"; 648 568 allwinner,function = "uart1"; 649 - allwinner,drive = <0>; 650 - allwinner,pull = <0>; 569 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 570 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 651 571 }; 652 572 653 573 i2c0_pins_a: i2c0@0 { 654 574 allwinner,pins = "PB0", "PB1"; 655 575 allwinner,function = "i2c0"; 656 - allwinner,drive = <0>; 657 - allwinner,pull = <0>; 576 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 577 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 658 578 }; 659 579 660 580 i2c1_pins_a: i2c1@0 { 661 581 allwinner,pins = "PB18", "PB19"; 662 582 allwinner,function = "i2c1"; 663 - allwinner,drive = <0>; 664 - allwinner,pull = <0>; 583 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 584 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 665 585 }; 666 586 667 587 i2c2_pins_a: i2c2@0 { 668 588 allwinner,pins = "PB20", "PB21"; 669 589 allwinner,function = "i2c2"; 670 - allwinner,drive = <0>; 671 - allwinner,pull = <0>; 590 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 591 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 672 592 }; 673 593 674 594 emac_pins_a: emac0@0 { ··· 678 598 "PA11", "PA12", "PA13", "PA14", 679 599 "PA15", "PA16"; 680 600 allwinner,function = "emac"; 681 - allwinner,drive = <0>; 682 - allwinner,pull = <0>; 601 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 602 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 683 603 }; 684 604 685 605 mmc0_pins_a: mmc0@0 { 686 606 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; 687 607 allwinner,function = "mmc0"; 688 - allwinner,drive = <2>; 689 - allwinner,pull = <0>; 608 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 609 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 690 610 }; 691 611 692 612 mmc0_cd_pin_reference_design: mmc0_cd_pin@0 { 693 613 allwinner,pins = "PH1"; 694 614 allwinner,function = "gpio_in"; 695 - allwinner,drive = <0>; 696 - allwinner,pull = <1>; 615 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 616 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 697 617 }; 698 618 699 619 ir0_pins_a: ir0@0 { 700 620 allwinner,pins = "PB3","PB4"; 701 621 allwinner,function = "ir0"; 702 - allwinner,drive = <0>; 703 - allwinner,pull = <0>; 622 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 623 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 704 624 }; 705 625 706 626 ir1_pins_a: ir1@0 { 707 627 allwinner,pins = "PB22","PB23"; 708 628 allwinner,function = "ir1"; 709 - allwinner,drive = <0>; 710 - allwinner,pull = <0>; 629 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 630 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 631 + }; 632 + 633 + spi0_pins_a: spi0@0 { 634 + allwinner,pins = "PI10", "PI11", "PI12", "PI13"; 635 + allwinner,function = "spi0"; 636 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 637 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 638 + }; 639 + 640 + spi1_pins_a: spi1@0 { 641 + allwinner,pins = "PI16", "PI17", "PI18", "PI19"; 642 + allwinner,function = "spi1"; 643 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 644 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 645 + }; 646 + 647 + spi2_pins_a: spi2@0 { 648 + allwinner,pins = "PB14", "PB15", "PB16", "PB17"; 649 + allwinner,function = "spi2"; 650 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 651 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 652 + }; 653 + 654 + spi2_pins_b: spi2@1 { 655 + allwinner,pins = "PC19", "PC20", "PC21", "PC22"; 656 + allwinner,function = "spi2"; 657 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 658 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 659 + }; 660 + 661 + ps20_pins_a: ps20@0 { 662 + allwinner,pins = "PI20", "PI21"; 663 + allwinner,function = "ps2"; 664 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 665 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 666 + }; 667 + 668 + ps21_pins_a: ps21@0 { 669 + allwinner,pins = "PH12", "PH13"; 670 + allwinner,function = "ps2"; 671 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 672 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 711 673 }; 712 674 }; 713 675 ··· 797 675 status = "disabled"; 798 676 }; 799 677 678 + lradc: lradc@01c22800 { 679 + compatible = "allwinner,sun4i-a10-lradc-keys"; 680 + reg = <0x01c22800 0x100>; 681 + interrupts = <31>; 682 + status = "disabled"; 683 + }; 684 + 800 685 sid: eeprom@01c23800 { 801 686 compatible = "allwinner,sun4i-a10-sid"; 802 687 reg = <0x01c23800 0x10>; ··· 813 684 compatible = "allwinner,sun4i-a10-ts"; 814 685 reg = <0x01c25000 0x100>; 815 686 interrupts = <29>; 687 + #thermal-sensor-cells = <0>; 816 688 }; 817 689 818 690 uart0: serial@01c28000 { ··· 924 794 status = "disabled"; 925 795 #address-cells = <1>; 926 796 #size-cells = <0>; 797 + }; 798 + 799 + ps20: ps2@01c2a000 { 800 + compatible = "allwinner,sun4i-a10-ps2"; 801 + reg = <0x01c2a000 0x400>; 802 + interrupts = <62>; 803 + clocks = <&apb1_gates 6>; 804 + status = "disabled"; 805 + }; 806 + 807 + ps21: ps2@01c2a400 { 808 + compatible = "allwinner,sun4i-a10-ps2"; 809 + reg = <0x01c2a400 0x400>; 810 + interrupts = <63>; 811 + clocks = <&apb1_gates 7>; 812 + status = "disabled"; 927 813 }; 928 814 }; 929 815 };
+125
arch/arm/boot/dts/sun5i-a10s-mk802.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun5i-a10s.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + #include <dt-bindings/gpio/gpio.h> 52 + 53 + / { 54 + model = "MK802-A10s"; 55 + compatible = "allwinner,a10s-mk802", "allwinner,sun5i-a10s"; 56 + 57 + leds { 58 + compatible = "gpio-leds"; 59 + pinctrl-names = "default"; 60 + pinctrl-0 = <&led_pins_mk802>; 61 + 62 + red { 63 + label = "mk802:red:usr"; 64 + gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2 */ 65 + }; 66 + }; 67 + }; 68 + 69 + &ehci0 { 70 + status = "okay"; 71 + }; 72 + 73 + &mmc0 { 74 + pinctrl-names = "default"; 75 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mk802>; 76 + vmmc-supply = <&reg_vcc3v3>; 77 + bus-width = <4>; 78 + cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 79 + cd-inverted; 80 + status = "okay"; 81 + }; 82 + 83 + &ohci0 { 84 + status = "okay"; 85 + }; 86 + 87 + &pio { 88 + led_pins_mk802: led_pins@0 { 89 + allwinner,pins = "PB2"; 90 + allwinner,function = "gpio_out"; 91 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 92 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 93 + }; 94 + 95 + mmc0_cd_pin_mk802: mmc0_cd_pin@0 { 96 + allwinner,pins = "PG1"; 97 + allwinner,function = "gpio_in"; 98 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 99 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 100 + }; 101 + 102 + usb1_vbus_pin_mk802: usb1_vbus_pin@0 { 103 + allwinner,pins = "PB10"; 104 + allwinner,function = "gpio_out"; 105 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 106 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 107 + }; 108 + }; 109 + 110 + &reg_usb1_vbus { 111 + pinctrl-0 = <&usb1_vbus_pin_mk802>; 112 + gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */ 113 + status = "okay"; 114 + }; 115 + 116 + &uart0 { 117 + pinctrl-names = "default"; 118 + pinctrl-0 = <&uart0_pins_a>; 119 + status = "okay"; 120 + }; 121 + 122 + &usbphy { 123 + usb1_vbus-supply = <&reg_usb1_vbus>; 124 + status = "okay"; 125 + };
+58 -14
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun5i-a10s.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun5i-a10s.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/input/input.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 57 54 58 / { 55 59 model = "Olimex A10s-Olinuxino Micro"; ··· 80 76 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>; 81 77 vmmc-supply = <&reg_vcc3v3>; 82 78 bus-width = <4>; 83 - cd-gpios = <&pio 6 1 0>; /* PG1 */ 79 + cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 84 80 cd-inverted; 85 81 status = "okay"; 86 82 }; ··· 90 86 pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>; 91 87 vmmc-supply = <&reg_vcc3v3>; 92 88 bus-width = <4>; 93 - cd-gpios = <&pio 6 13 0>; /* PG13 */ 89 + cd-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ 94 90 cd-inverted; 95 91 status = "okay"; 96 92 }; ··· 112 108 mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 { 113 109 allwinner,pins = "PG1"; 114 110 allwinner,function = "gpio_in"; 115 - allwinner,drive = <0>; 116 - allwinner,pull = <1>; 111 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 112 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 117 113 }; 118 114 119 115 mmc1_cd_pin_olinuxino_micro: mmc1_cd_pin@0 { 120 116 allwinner,pins = "PG13"; 121 117 allwinner,function = "gpio_in"; 122 - allwinner,drive = <0>; 123 - allwinner,pull = <1>; 118 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 119 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 124 120 }; 125 121 126 122 led_pins_olinuxino: led_pins@0 { 127 123 allwinner,pins = "PE3"; 128 124 allwinner,function = "gpio_out"; 129 - allwinner,drive = <1>; 130 - allwinner,pull = <0>; 125 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 126 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 131 127 }; 132 128 133 129 usb1_vbus_pin_olinuxino_m: usb1_vbus_pin@0 { 134 130 allwinner,pins = "PB10"; 135 131 allwinner,function = "gpio_out"; 136 - allwinner,drive = <0>; 137 - allwinner,pull = <0>; 132 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 133 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 134 + }; 135 + }; 136 + 137 + lradc: lradc@01c22800 { 138 + vref-supply = <&reg_vcc3v0>; 139 + status = "okay"; 140 + 141 + button@191 { 142 + label = "Volume Up"; 143 + linux,code = <KEY_VOLUMEUP>; 144 + channel = <0>; 145 + voltage = <191274>; 146 + }; 147 + 148 + button@392 { 149 + label = "Volume Down"; 150 + linux,code = <KEY_VOLUMEDOWN>; 151 + channel = <0>; 152 + voltage = <392644>; 153 + }; 154 + 155 + button@601 { 156 + label = "Menu"; 157 + linux,code = <KEY_MENU>; 158 + channel = <0>; 159 + voltage = <601151>; 160 + }; 161 + 162 + button@795 { 163 + label = "Enter"; 164 + linux,code = <KEY_ENTER>; 165 + channel = <0>; 166 + voltage = <795090>; 167 + }; 168 + 169 + button@987 { 170 + label = "Home"; 171 + linux,code = <KEY_HOMEPAGE>; 172 + channel = <0>; 173 + voltage = <987387>; 138 174 }; 139 175 }; 140 176 ··· 229 185 230 186 green { 231 187 label = "a10s-olinuxino-micro:green:usr"; 232 - gpios = <&pio 4 3 0>; 188 + gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>; 233 189 default-state = "on"; 234 190 }; 235 191 }; 236 192 237 193 reg_usb1_vbus: usb1-vbus { 238 194 pinctrl-0 = <&usb1_vbus_pin_olinuxino_m>; 239 - gpio = <&pio 1 10 0>; 195 + gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; 240 196 status = "okay"; 241 197 }; 242 198 };
+14 -11
arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun5i-a10s.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun5i-a10s.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 53 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 54 52 55 / { 53 56 model = "R7 A10s hdmi tv-stick"; ··· 62 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_r7>; 63 60 vmmc-supply = <&reg_vcc3v3>; 64 61 bus-width = <4>; 65 - cd-gpios = <&pio 6 1 0>; /* PG1 */ 62 + cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 66 63 cd-inverted; 67 64 status = "okay"; 68 65 }; ··· 93 90 mmc0_cd_pin_r7: mmc0_cd_pin@0 { 94 91 allwinner,pins = "PG1"; 95 92 allwinner,function = "gpio_in"; 96 - allwinner,drive = <0>; 97 - allwinner,pull = <1>; 93 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 94 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 98 95 }; 99 96 100 97 led_pins_r7: led_pins@0 { 101 98 allwinner,pins = "PB2"; 102 99 allwinner,function = "gpio_out"; 103 - allwinner,drive = <1>; 104 - allwinner,pull = <0>; 100 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 101 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 105 102 }; 106 103 107 104 usb1_vbus_pin_r7: usb1_vbus_pin@0 { 108 105 allwinner,pins = "PG13"; 109 106 allwinner,function = "gpio_out"; 110 - allwinner,drive = <0>; 111 - allwinner,pull = <0>; 107 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 108 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 112 109 }; 113 110 }; 114 111 ··· 126 123 127 124 green { 128 125 label = "r7-tv-dongle:green:usr"; 129 - gpios = <&pio 1 2 0>; 126 + gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; 130 127 default-state = "on"; 131 128 }; 132 129 }; 133 130 134 131 reg_usb1_vbus: usb1-vbus { 135 132 pinctrl-0 = <&usb1_vbus_pin_r7>; 136 - gpio = <&pio 6 13 0>; 133 + gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>; 137 134 status = "okay"; 138 135 }; 139 136 };
+47 -25
arch/arm/boot/dts/sun5i-a10s.dtsi
··· 11 11 * http://www.gnu.org/copyleft/gpl.html 12 12 */ 13 13 14 - /include/ "skeleton.dtsi" 14 + #include "skeleton.dtsi" 15 + 16 + #include <dt-bindings/dma/sun4i-a10.h> 17 + #include <dt-bindings/pinctrl/sun4i-a10.h> 15 18 16 19 / { 17 20 interrupt-parent = <&intc>; ··· 37 34 allwinner,pipeline = "de_be0-lcd0-hdmi"; 38 35 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, 39 36 <&ahb_gates 44>; 37 + status = "disabled"; 38 + }; 39 + 40 + framebuffer@1 { 41 + compatible = "allwinner,simple-framebuffer", 42 + "simple-framebuffer"; 43 + allwinner,pipeline = "de_be0-lcd0"; 44 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>; 40 45 status = "disabled"; 41 46 }; 42 47 }; ··· 331 320 interrupts = <10>; 332 321 clocks = <&ahb_gates 20>, <&spi0_clk>; 333 322 clock-names = "ahb", "mod"; 334 - dmas = <&dma 1 27>, <&dma 1 26>; 323 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 324 + <&dma SUN4I_DMA_DEDICATED 26>; 335 325 dma-names = "rx", "tx"; 336 326 status = "disabled"; 337 327 #address-cells = <1>; ··· 345 333 interrupts = <11>; 346 334 clocks = <&ahb_gates 21>, <&spi1_clk>; 347 335 clock-names = "ahb", "mod"; 348 - dmas = <&dma 1 9>, <&dma 1 8>; 336 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 337 + <&dma SUN4I_DMA_DEDICATED 8>; 349 338 dma-names = "rx", "tx"; 350 339 status = "disabled"; 351 340 #address-cells = <1>; ··· 361 348 status = "disabled"; 362 349 }; 363 350 364 - mdio@01c0b080 { 351 + mdio: mdio@01c0b080 { 365 352 compatible = "allwinner,sun4i-a10-mdio"; 366 353 reg = <0x01c0b080 0x14>; 367 354 status = "disabled"; ··· 403 390 reg-names = "phy_ctrl", "pmu1"; 404 391 clocks = <&usb_clk 8>; 405 392 clock-names = "usb_phy"; 406 - resets = <&usb_clk 1>; 407 - reset-names = "usb1_reset"; 393 + resets = <&usb_clk 0>, <&usb_clk 1>; 394 + reset-names = "usb0_reset", "usb1_reset"; 408 395 status = "disabled"; 409 396 }; 410 397 ··· 434 421 interrupts = <12>; 435 422 clocks = <&ahb_gates 22>, <&spi2_clk>; 436 423 clock-names = "ahb", "mod"; 437 - dmas = <&dma 1 29>, <&dma 1 28>; 424 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 425 + <&dma SUN4I_DMA_DEDICATED 28>; 438 426 dma-names = "rx", "tx"; 439 427 status = "disabled"; 440 428 #address-cells = <1>; ··· 463 449 uart0_pins_a: uart0@0 { 464 450 allwinner,pins = "PB19", "PB20"; 465 451 allwinner,function = "uart0"; 466 - allwinner,drive = <0>; 467 - allwinner,pull = <0>; 452 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 453 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 468 454 }; 469 455 470 456 uart2_pins_a: uart2@0 { 471 457 allwinner,pins = "PC18", "PC19"; 472 458 allwinner,function = "uart2"; 473 - allwinner,drive = <0>; 474 - allwinner,pull = <0>; 459 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 460 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 475 461 }; 476 462 477 463 uart3_pins_a: uart3@0 { 478 464 allwinner,pins = "PG9", "PG10"; 479 465 allwinner,function = "uart3"; 480 - allwinner,drive = <0>; 481 - allwinner,pull = <0>; 466 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 467 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 482 468 }; 483 469 484 470 emac_pins_a: emac0@0 { ··· 488 474 "PA11", "PA12", "PA13", "PA14", 489 475 "PA15", "PA16"; 490 476 allwinner,function = "emac"; 491 - allwinner,drive = <0>; 492 - allwinner,pull = <0>; 477 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 478 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 493 479 }; 494 480 495 481 i2c0_pins_a: i2c0@0 { 496 482 allwinner,pins = "PB0", "PB1"; 497 483 allwinner,function = "i2c0"; 498 - allwinner,drive = <0>; 499 - allwinner,pull = <0>; 484 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 485 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 500 486 }; 501 487 502 488 i2c1_pins_a: i2c1@0 { 503 489 allwinner,pins = "PB15", "PB16"; 504 490 allwinner,function = "i2c1"; 505 - allwinner,drive = <0>; 506 - allwinner,pull = <0>; 491 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 492 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 507 493 }; 508 494 509 495 i2c2_pins_a: i2c2@0 { 510 496 allwinner,pins = "PB17", "PB18"; 511 497 allwinner,function = "i2c2"; 512 - allwinner,drive = <0>; 513 - allwinner,pull = <0>; 498 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 499 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 514 500 }; 515 501 516 502 mmc0_pins_a: mmc0@0 { 517 503 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; 518 504 allwinner,function = "mmc0"; 519 - allwinner,drive = <2>; 520 - allwinner,pull = <0>; 505 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 506 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 521 507 }; 522 508 523 509 mmc1_pins_a: mmc1@0 { 524 510 allwinner,pins = "PG3","PG4","PG5","PG6","PG7","PG8"; 525 511 allwinner,function = "mmc1"; 526 - allwinner,drive = <2>; 527 - allwinner,pull = <0>; 512 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 513 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 528 514 }; 529 515 }; 530 516 ··· 540 526 reg = <0x01c20c90 0x10>; 541 527 }; 542 528 529 + lradc: lradc@01c22800 { 530 + compatible = "allwinner,sun4i-a10-lradc-keys"; 531 + reg = <0x01c22800 0x100>; 532 + interrupts = <31>; 533 + status = "disabled"; 534 + }; 535 + 543 536 sid: eeprom@01c23800 { 544 537 compatible = "allwinner,sun4i-a10-sid"; 545 538 reg = <0x01c23800 0x10>; ··· 556 535 compatible = "allwinner,sun4i-a10-ts"; 557 536 reg = <0x01c25000 0x100>; 558 537 interrupts = <29>; 538 + #thermal-sensor-cells = <0>; 559 539 }; 560 540 561 541 uart0: serial@01c28000 {
+46 -13
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun5i-a13.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun5i-a13.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 53 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 54 52 55 / { 53 56 model = "HSG H702"; ··· 62 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>; 63 60 vmmc-supply = <&reg_vcc3v3>; 64 61 bus-width = <4>; 65 - cd-gpios = <&pio 6 0 0>; /* PG0 */ 62 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 66 63 cd-inverted; 67 64 status = "okay"; 68 65 }; 69 66 70 67 usbphy: phy@01c13400 { 71 - /* 72 - * There doesn't seem to be a GPIO for controlling 73 - * usb1 vbus, despite the fex file saying otherwise. 74 - */ 75 - usb1_vbus-supply = <&reg_vcc5v0>; 68 + usb1_vbus-supply = <&reg_ldo3>; 76 69 status = "okay"; 77 70 }; 78 71 ··· 84 85 mmc0_cd_pin_h702: mmc0_cd_pin@0 { 85 86 allwinner,pins = "PG0"; 86 87 allwinner,function = "gpio_in"; 87 - allwinner,drive = <0>; 88 - allwinner,pull = <1>; 88 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 89 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 89 90 }; 90 91 }; 91 92 ··· 101 102 status = "okay"; 102 103 103 104 axp209: pmic@34 { 104 - compatible = "x-powers,axp209"; 105 105 reg = <0x34>; 106 106 interrupts = <0>; 107 - interrupt-controller; 108 - #interrupt-cells = <1>; 109 107 }; 110 108 }; 111 109 ··· 123 127 status = "okay"; 124 128 }; 125 129 }; 130 + }; 131 + 132 + #include "axp209.dtsi" 133 + 134 + &cpu0 { 135 + cpu-supply = <&reg_dcdc2>; 136 + }; 137 + 138 + &reg_dcdc2 { 139 + regulator-always-on; 140 + regulator-min-microvolt = <1000000>; 141 + regulator-max-microvolt = <1500000>; 142 + regulator-name = "vdd-cpu"; 143 + }; 144 + 145 + &reg_dcdc3 { 146 + regulator-always-on; 147 + regulator-min-microvolt = <1000000>; 148 + regulator-max-microvolt = <1400000>; 149 + regulator-name = "vdd-int-dll"; 150 + }; 151 + 152 + &reg_ldo1 { 153 + regulator-name = "vdd-rtc"; 154 + }; 155 + 156 + &reg_ldo2 { 157 + regulator-always-on; 158 + regulator-min-microvolt = <3000000>; 159 + regulator-max-microvolt = <3000000>; 160 + regulator-name = "avcc"; 161 + }; 162 + 163 + &reg_ldo3 { 164 + regulator-min-microvolt = <3300000>; 165 + regulator-max-microvolt = <3300000>; 166 + regulator-name = "vcc-wifi"; 126 167 };
+14 -11
arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
··· 47 47 */ 48 48 49 49 /dts-v1/; 50 - /include/ "sun5i-a13.dtsi" 51 - /include/ "sunxi-common-regulators.dtsi" 50 + #include "sun5i-a13.dtsi" 51 + #include "sunxi-common-regulators.dtsi" 52 + 53 + #include <dt-bindings/gpio/gpio.h> 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 52 55 53 56 / { 54 57 model = "Olimex A13-Olinuxino Micro"; ··· 63 60 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>; 64 61 vmmc-supply = <&reg_vcc3v3>; 65 62 bus-width = <4>; 66 - cd-gpios = <&pio 6 0 0>; /* PG0 */ 63 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 67 64 cd-inverted; 68 65 status = "okay"; 69 66 }; ··· 85 82 mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 { 86 83 allwinner,pins = "PG0"; 87 84 allwinner,function = "gpio_in"; 88 - allwinner,drive = <0>; 89 - allwinner,pull = <1>; 85 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 86 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 90 87 }; 91 88 92 89 led_pins_olinuxinom: led_pins@0 { 93 90 allwinner,pins = "PG9"; 94 91 allwinner,function = "gpio_out"; 95 - allwinner,drive = <1>; 96 - allwinner,pull = <0>; 92 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 93 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 97 94 }; 98 95 99 96 usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 { 100 97 allwinner,pins = "PG11"; 101 98 allwinner,function = "gpio_out"; 102 - allwinner,drive = <0>; 103 - allwinner,pull = <0>; 99 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 100 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 104 101 }; 105 102 }; 106 103 ··· 136 133 137 134 power { 138 135 label = "a13-olinuxino-micro:green:power"; 139 - gpios = <&pio 6 9 0>; 136 + gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>; 140 137 default-state = "on"; 141 138 }; 142 139 }; 143 140 144 141 reg_usb1_vbus: usb1-vbus { 145 142 pinctrl-0 = <&usb1_vbus_pin_olinuxinom>; 146 - gpio = <&pio 6 11 0>; 143 + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; 147 144 status = "okay"; 148 145 }; 149 146 };
+64 -11
arch/arm/boot/dts/sun5i-a13-olinuxino.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun5i-a13.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun5i-a13.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/input/input.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 57 54 58 / { 55 59 model = "Olimex A13-Olinuxino"; ··· 65 61 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>; 66 62 vmmc-supply = <&reg_vcc3v3>; 67 63 bus-width = <4>; 68 - cd-gpios = <&pio 6 0 0>; /* PG0 */ 64 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 69 65 cd-inverted; 70 66 status = "okay"; 71 67 }; ··· 87 83 mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 { 88 84 allwinner,pins = "PG0"; 89 85 allwinner,function = "gpio_in"; 90 - allwinner,drive = <0>; 91 - allwinner,pull = <1>; 86 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 87 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 92 88 }; 93 89 94 90 led_pins_olinuxino: led_pins@0 { 95 91 allwinner,pins = "PG9"; 96 92 allwinner,function = "gpio_out"; 97 - allwinner,drive = <1>; 98 - allwinner,pull = <0>; 93 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 94 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 99 95 }; 100 96 101 97 usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 { 102 98 allwinner,pins = "PG11"; 103 99 allwinner,function = "gpio_out"; 104 - allwinner,drive = <0>; 105 - allwinner,pull = <0>; 100 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 101 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 102 + }; 103 + }; 104 + 105 + lradc: lradc@01c22800 { 106 + vref-supply = <&reg_vcc3v0>; 107 + status = "okay"; 108 + 109 + button@191 { 110 + label = "Volume Up"; 111 + linux,code = <KEY_VOLUMEUP>; 112 + channel = <0>; 113 + voltage = <191274>; 114 + }; 115 + 116 + button@392 { 117 + label = "Volume Down"; 118 + linux,code = <KEY_VOLUMEDOWN>; 119 + channel = <0>; 120 + voltage = <392644>; 121 + }; 122 + 123 + button@601 { 124 + label = "Menu"; 125 + linux,code = <KEY_MENU>; 126 + channel = <0>; 127 + voltage = <601151>; 128 + }; 129 + 130 + button@795 { 131 + label = "Enter"; 132 + linux,code = <KEY_ENTER>; 133 + channel = <0>; 134 + voltage = <795090>; 135 + }; 136 + 137 + button@987 { 138 + label = "Home"; 139 + linux,code = <KEY_HOMEPAGE>; 140 + channel = <0>; 141 + voltage = <987387>; 106 142 }; 107 143 }; 108 144 ··· 156 112 pinctrl-names = "default"; 157 113 pinctrl-0 = <&i2c0_pins_a>; 158 114 status = "okay"; 115 + 116 + axp209: pmic@34 { 117 + compatible = "x-powers,axp209"; 118 + reg = <0x34>; 119 + interrupts = <0>; 120 + 121 + interrupt-controller; 122 + #interrupt-cells = <1>; 123 + }; 159 124 }; 160 125 161 126 i2c1: i2c@01c2b000 { ··· 186 133 pinctrl-0 = <&led_pins_olinuxino>; 187 134 188 135 power { 189 - gpios = <&pio 6 9 0>; 136 + gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>; 190 137 default-state = "on"; 191 138 }; 192 139 }; 193 140 194 141 reg_usb1_vbus: usb1-vbus { 195 142 pinctrl-0 = <&usb1_vbus_pin_olinuxino>; 196 - gpio = <&pio 6 11 0>; 143 + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; 197 144 status = "okay"; 198 145 }; 199 146 };
+97 -19
arch/arm/boot/dts/sun5i-a13.dtsi
··· 11 11 * http://www.gnu.org/copyleft/gpl.html 12 12 */ 13 13 14 - /include/ "skeleton.dtsi" 14 + #include "skeleton.dtsi" 15 + 16 + #include <dt-bindings/thermal/thermal.h> 17 + 18 + #include <dt-bindings/dma/sun4i-a10.h> 19 + #include <dt-bindings/pinctrl/sun4i-a10.h> 15 20 16 21 / { 17 22 interrupt-parent = <&intc>; ··· 26 21 serial1 = &uart3; 27 22 }; 28 23 24 + chosen { 25 + #address-cells = <1>; 26 + #size-cells = <1>; 27 + ranges; 28 + 29 + framebuffer@0 { 30 + compatible = "allwinner,simple-framebuffer", 31 + "simple-framebuffer"; 32 + allwinner,pipeline = "de_be0-lcd0"; 33 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>; 34 + status = "disabled"; 35 + }; 36 + }; 37 + 29 38 cpus { 30 39 #address-cells = <1>; 31 40 #size-cells = <0>; 32 - cpu@0 { 41 + 42 + cpu0: cpu@0 { 33 43 device_type = "cpu"; 34 44 compatible = "arm,cortex-a8"; 35 45 reg = <0x0>; 46 + clocks = <&cpu>; 47 + clock-latency = <244144>; /* 8 32k periods */ 48 + operating-points = < 49 + /* kHz uV */ 50 + 1104000 1500000 51 + 1008000 1400000 52 + 912000 1350000 53 + 864000 1300000 54 + 624000 1200000 55 + 576000 1200000 56 + 432000 1200000 57 + >; 58 + #cooling-cells = <2>; 59 + cooling-min-level = <0>; 60 + cooling-max-level = <6>; 61 + }; 62 + }; 63 + 64 + thermal-zones { 65 + cpu_thermal { 66 + /* milliseconds */ 67 + polling-delay-passive = <250>; 68 + polling-delay = <1000>; 69 + thermal-sensors = <&rtp>; 70 + 71 + cooling-maps { 72 + map0 { 73 + trip = <&cpu_alert0>; 74 + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 75 + }; 76 + }; 77 + 78 + trips { 79 + cpu_alert0: cpu_alert0 { 80 + /* milliCelsius */ 81 + temperature = <850000>; 82 + hysteresis = <2000>; 83 + type = "passive"; 84 + }; 85 + 86 + cpu_crit: cpu_crit { 87 + /* milliCelsius */ 88 + temperature = <100000>; 89 + hysteresis = <2000>; 90 + type = "critical"; 91 + }; 92 + }; 36 93 }; 37 94 }; 38 95 ··· 371 304 interrupts = <10>; 372 305 clocks = <&ahb_gates 20>, <&spi0_clk>; 373 306 clock-names = "ahb", "mod"; 374 - dmas = <&dma 1 27>, <&dma 1 26>; 307 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 308 + <&dma SUN4I_DMA_DEDICATED 26>; 375 309 dma-names = "rx", "tx"; 376 310 status = "disabled"; 377 311 #address-cells = <1>; ··· 385 317 interrupts = <11>; 386 318 clocks = <&ahb_gates 21>, <&spi1_clk>; 387 319 clock-names = "ahb", "mod"; 388 - dmas = <&dma 1 9>, <&dma 1 8>; 320 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 321 + <&dma SUN4I_DMA_DEDICATED 8>; 389 322 dma-names = "rx", "tx"; 390 323 status = "disabled"; 391 324 #address-cells = <1>; ··· 418 349 reg-names = "phy_ctrl", "pmu1"; 419 350 clocks = <&usb_clk 8>; 420 351 clock-names = "usb_phy"; 421 - resets = <&usb_clk 1>; 422 - reset-names = "usb1_reset"; 352 + resets = <&usb_clk 0>, <&usb_clk 1>; 353 + reset-names = "usb0_reset", "usb1_reset"; 423 354 status = "disabled"; 424 355 }; 425 356 ··· 449 380 interrupts = <12>; 450 381 clocks = <&ahb_gates 22>, <&spi2_clk>; 451 382 clock-names = "ahb", "mod"; 452 - dmas = <&dma 1 29>, <&dma 1 28>; 383 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 384 + <&dma SUN4I_DMA_DEDICATED 28>; 453 385 dma-names = "rx", "tx"; 454 386 status = "disabled"; 455 387 #address-cells = <1>; ··· 478 408 uart1_pins_a: uart1@0 { 479 409 allwinner,pins = "PE10", "PE11"; 480 410 allwinner,function = "uart1"; 481 - allwinner,drive = <0>; 482 - allwinner,pull = <0>; 411 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 412 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 483 413 }; 484 414 485 415 uart1_pins_b: uart1@1 { 486 416 allwinner,pins = "PG3", "PG4"; 487 417 allwinner,function = "uart1"; 488 - allwinner,drive = <0>; 489 - allwinner,pull = <0>; 418 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 419 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 490 420 }; 491 421 492 422 i2c0_pins_a: i2c0@0 { 493 423 allwinner,pins = "PB0", "PB1"; 494 424 allwinner,function = "i2c0"; 495 - allwinner,drive = <0>; 496 - allwinner,pull = <0>; 425 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 426 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 497 427 }; 498 428 499 429 i2c1_pins_a: i2c1@0 { 500 430 allwinner,pins = "PB15", "PB16"; 501 431 allwinner,function = "i2c1"; 502 - allwinner,drive = <0>; 503 - allwinner,pull = <0>; 432 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 433 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 504 434 }; 505 435 506 436 i2c2_pins_a: i2c2@0 { 507 437 allwinner,pins = "PB17", "PB18"; 508 438 allwinner,function = "i2c2"; 509 - allwinner,drive = <0>; 510 - allwinner,pull = <0>; 439 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 440 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 511 441 }; 512 442 513 443 mmc0_pins_a: mmc0@0 { 514 444 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; 515 445 allwinner,function = "mmc0"; 516 - allwinner,drive = <2>; 517 - allwinner,pull = <0>; 446 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 447 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 518 448 }; 519 449 }; 520 450 ··· 530 460 reg = <0x01c20c90 0x10>; 531 461 }; 532 462 463 + lradc: lradc@01c22800 { 464 + compatible = "allwinner,sun4i-a10-lradc-keys"; 465 + reg = <0x01c22800 0x100>; 466 + interrupts = <31>; 467 + status = "disabled"; 468 + }; 469 + 533 470 sid: eeprom@01c23800 { 534 471 compatible = "allwinner,sun4i-a10-sid"; 535 472 reg = <0x01c23800 0x10>; ··· 546 469 compatible = "allwinner,sun4i-a10-ts"; 547 470 reg = <0x01c25000 0x100>; 548 471 interrupts = <29>; 472 + #thermal-sensor-cells = <0>; 549 473 }; 550 474 551 475 uart1: serial@01c28400 {
+8 -5
arch/arm/boot/dts/sun6i-a31-app4-evb1.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun6i-a31.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun6i-a31.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 56 54 57 / { 55 58 model = "Allwinner A31 APP4 EVB1 Evaluation Board"; ··· 67 64 usb1_vbus_pin_a: usb1_vbus_pin@0 { 68 65 allwinner,pins = "PH27"; 69 66 allwinner,function = "gpio_out"; 70 - allwinner,drive = <0>; 71 - allwinner,pull = <0>; 67 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 68 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 72 69 }; 73 70 }; 74 71 ··· 90 87 91 88 reg_usb1_vbus: usb1-vbus { 92 89 pinctrl-0 = <&usb1_vbus_pin_a>; 93 - gpio = <&pio 7 27 0>; 90 + gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>; 94 91 status = "okay"; 95 92 }; 96 93 };
+12 -9
arch/arm/boot/dts/sun6i-a31-colombus.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun6i-a31.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun6i-a31.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 56 54 57 / { 55 58 model = "WITS A31 Colombus Evaluation Board"; ··· 68 65 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>; 69 66 vmmc-supply = <&reg_vcc3v0>; 70 67 bus-width = <4>; 71 - cd-gpios = <&pio 0 8 0>; /* PA8 */ 68 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 72 69 cd-inverted; 73 70 status = "okay"; 74 71 }; ··· 84 81 85 82 pio: pinctrl@01c20800 { 86 83 mmc0_pins_a: mmc0@0 { 87 - allwinner,pull = <1>; 84 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 88 85 }; 89 86 90 87 mmc0_cd_pin_colombus: mmc0_cd_pin@0 { 91 88 allwinner,pins = "PA8"; 92 89 allwinner,function = "gpio_in"; 93 - allwinner,drive = <0>; 94 - allwinner,pull = <1>; 90 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 91 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 95 92 }; 96 93 97 94 usb2_vbus_pin_colombus: usb2_vbus_pin@0 { 98 95 allwinner,pins = "PH24"; 99 96 allwinner,function = "gpio_out"; 100 - allwinner,drive = <0>; 101 - allwinner,pull = <0>; 97 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 98 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 102 99 }; 103 100 }; 104 101 ··· 130 127 reg_usb2_vbus: usb2-vbus { 131 128 pinctrl-names = "default"; 132 129 pinctrl-0 = <&usb2_vbus_pin_colombus>; 133 - gpio = <&pio 7 24 0>; 130 + gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; 134 131 status = "okay"; 135 132 }; 136 133 };
+91 -90
arch/arm/boot/dts/sun6i-a31-hummingbird.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun6i-a31.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun6i-a31.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 56 54 57 / { 55 58 model = "Merrii A31 Hummingbird"; ··· 61 58 chosen { 62 59 bootargs = "earlyprintk console=ttyS0,115200"; 63 60 }; 61 + }; 64 62 65 - soc@01c00000 { 66 - mmc0: mmc@01c0f000 { 67 - pinctrl-names = "default"; 68 - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; 69 - vmmc-supply = <&reg_vcc3v0>; 70 - bus-width = <4>; 71 - cd-gpios = <&pio 0 8 0>; /* PA8 */ 72 - cd-inverted; 73 - status = "okay"; 74 - }; 63 + &ehci0 { 64 + status = "okay"; 65 + }; 75 66 76 - usbphy: phy@01c19400 { 77 - usb1_vbus-supply = <&reg_usb1_vbus>; 78 - status = "okay"; 79 - }; 67 + &gmac { 68 + pinctrl-names = "default"; 69 + pinctrl-0 = <&gmac_pins_rgmii_a>; 70 + phy = <&phy1>; 71 + phy-mode = "rgmii"; 72 + snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; 73 + snps,reset-active-low; 74 + snps,reset-delays-us = <0 10000 30000>; 75 + status = "okay"; 80 76 81 - ehci0: usb@01c1a000 { 82 - status = "okay"; 83 - }; 84 - 85 - ohci0: usb@01c1a400 { 86 - status = "okay"; 87 - }; 88 - 89 - pio: pinctrl@01c20800 { 90 - mmc0_pins_a: mmc0@0 { 91 - /* external pull-ups missing for some pins */ 92 - allwinner,pull = <1>; 93 - }; 94 - 95 - mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 { 96 - allwinner,pins = "PA8"; 97 - allwinner,function = "gpio_in"; 98 - allwinner,drive = <0>; 99 - allwinner,pull = <1>; 100 - }; 101 - 102 - usb1_vbus_pin_a: usb1_vbus_pin@0 { 103 - allwinner,pins = "PH24"; 104 - allwinner,function = "gpio_out"; 105 - allwinner,drive = <0>; 106 - allwinner,pull = <0>; 107 - }; 108 - }; 109 - 110 - uart0: serial@01c28000 { 111 - pinctrl-names = "default"; 112 - pinctrl-0 = <&uart0_pins_a>; 113 - status = "okay"; 114 - }; 115 - 116 - i2c0: i2c@01c2ac00 { 117 - pinctrl-names = "default"; 118 - pinctrl-0 = <&i2c0_pins_a>; 119 - /* pull-ups and devices require AXP221 DLDO3 */ 120 - status = "failed"; 121 - }; 122 - 123 - i2c1: i2c@01c2b000 { 124 - pinctrl-names = "default"; 125 - pinctrl-0 = <&i2c1_pins_a>; 126 - status = "okay"; 127 - }; 128 - 129 - i2c2: i2c@01c2b400 { 130 - pinctrl-names = "default"; 131 - pinctrl-0 = <&i2c2_pins_a>; 132 - status = "okay"; 133 - 134 - pcf8563: rtc@51 { 135 - compatible = "nxp,pcf8563"; 136 - reg = <0x51>; 137 - }; 138 - }; 139 - 140 - gmac: ethernet@01c30000 { 141 - pinctrl-names = "default"; 142 - pinctrl-0 = <&gmac_pins_rgmii_a>; 143 - phy = <&phy1>; 144 - phy-mode = "rgmii"; 145 - status = "okay"; 146 - 147 - phy1: ethernet-phy@1 { 148 - reg = <1>; 149 - }; 150 - }; 77 + phy1: ethernet-phy@1 { 78 + reg = <1>; 151 79 }; 80 + }; 152 81 153 - reg_usb1_vbus: usb1-vbus { 154 - pinctrl-0 = <&usb1_vbus_pin_a>; 155 - gpio = <&pio 7 24 0>; /* PH24 */ 156 - status = "okay"; 82 + &i2c0 { 83 + pinctrl-names = "default"; 84 + pinctrl-0 = <&i2c0_pins_a>; 85 + /* pull-ups and devices require AXP221 DLDO3 */ 86 + status = "failed"; 87 + }; 88 + 89 + &i2c1 { 90 + pinctrl-names = "default"; 91 + pinctrl-0 = <&i2c1_pins_a>; 92 + status = "okay"; 93 + }; 94 + 95 + &i2c2 { 96 + pinctrl-names = "default"; 97 + pinctrl-0 = <&i2c2_pins_a>; 98 + status = "okay"; 99 + 100 + pcf8563: rtc@51 { 101 + compatible = "nxp,pcf8563"; 102 + reg = <0x51>; 157 103 }; 104 + }; 105 + 106 + &mmc0 { 107 + pinctrl-names = "default"; 108 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; 109 + vmmc-supply = <&reg_vcc3v0>; 110 + bus-width = <4>; 111 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 112 + cd-inverted; 113 + status = "okay"; 114 + }; 115 + 116 + &mmc0_pins_a { 117 + /* external pull-ups missing for some pins */ 118 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 119 + }; 120 + 121 + &ohci0 { 122 + status = "okay"; 123 + }; 124 + 125 + &pio { 126 + mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 { 127 + allwinner,pins = "PA8"; 128 + allwinner,function = "gpio_in"; 129 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 130 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 131 + }; 132 + }; 133 + 134 + &reg_usb1_vbus { 135 + gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ 136 + status = "okay"; 137 + }; 138 + 139 + &uart0 { 140 + pinctrl-names = "default"; 141 + pinctrl-0 = <&uart0_pins_a>; 142 + status = "okay"; 143 + }; 144 + 145 + &usb1_vbus_pin_a { 146 + /* different pin from sunxi-common-regulators */ 147 + allwinner,pins = "PH24"; 148 + }; 149 + 150 + &usbphy { 151 + usb1_vbus-supply = <&reg_usb1_vbus>; 152 + status = "okay"; 158 153 };
+20 -11
arch/arm/boot/dts/sun6i-a31-m9.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun6i-a31.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun6i-a31.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 53 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 54 52 55 / { 53 56 model = "Mele M9 / A1000G Quad top set box"; ··· 66 63 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>; 67 64 vmmc-supply = <&reg_vcc3v3>; 68 65 bus-width = <4>; 69 - cd-gpios = <&pio 7 22 0>; /* PH22 */ 66 + cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */ 70 67 cd-inverted; 71 68 status = "okay"; 72 69 }; ··· 88 85 led_pins_m9: led_pins@0 { 89 86 allwinner,pins = "PH13"; 90 87 allwinner,function = "gpio_out"; 91 - allwinner,drive = <0>; 92 - allwinner,pull = <0>; 88 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 89 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 93 90 }; 94 91 95 92 mmc0_cd_pin_m9: mmc0_cd_pin@0 { 96 93 allwinner,pins = "PH22"; 97 94 allwinner,function = "gpio_in"; 98 - allwinner,drive = <0>; 99 - allwinner,pull = <1>; 95 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 96 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 100 97 }; 101 98 102 99 usb1_vbus_pin_m9: usb1_vbus_pin@0 { 103 100 allwinner,pins = "PC27"; 104 101 allwinner,function = "gpio_out"; 105 - allwinner,drive = <0>; 106 - allwinner,pull = <0>; 102 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 103 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 107 104 }; 108 105 }; 109 106 ··· 124 121 reg = <1>; 125 122 }; 126 123 }; 124 + 125 + ir@01f02000 { 126 + pinctrl-names = "default"; 127 + pinctrl-0 = <&ir_pins_a>; 128 + status = "okay"; 129 + }; 127 130 }; 128 131 129 132 leds { ··· 139 130 140 131 blue { 141 132 label = "m9:blue:usr"; 142 - gpios = <&pio 7 13 0>; 133 + gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; 143 134 }; 144 135 }; 145 136 146 137 reg_usb1_vbus: usb1-vbus { 147 138 pinctrl-names = "default"; 148 139 pinctrl-0 = <&usb1_vbus_pin_m9>; 149 - gpio = <&pio 2 27 0>; 140 + gpio = <&pio 2 27 GPIO_ACTIVE_HIGH>; 150 141 status = "okay"; 151 142 }; 152 143 };
+118 -64
arch/arm/boot/dts/sun6i-a31.dtsi
··· 47 47 * OTHER DEALINGS IN THE SOFTWARE. 48 48 */ 49 49 50 - /include/ "skeleton.dtsi" 50 + #include "skeleton.dtsi" 51 + 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 55 52 56 / { 53 57 interrupt-parent = <&gic>; ··· 77 73 clocks = <&pll6 0>; 78 74 status = "disabled"; 79 75 }; 76 + 77 + framebuffer@1 { 78 + compatible = "allwinner,simple-framebuffer", 79 + "simple-framebuffer"; 80 + allwinner,pipeline = "de_be0-lcd0"; 81 + clocks = <&pll6 0>; 82 + status = "disabled"; 83 + }; 84 + }; 85 + 86 + timer { 87 + compatible = "arm,armv7-timer"; 88 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 89 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 90 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 91 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 92 + clock-frequency = <24000000>; 93 + arm,cpu-registers-not-fw-configured; 80 94 }; 81 95 82 96 cpus { ··· 133 111 134 112 pmu { 135 113 compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; 136 - interrupts = <0 120 4>, 137 - <0 121 4>, 138 - <0 122 4>, 139 - <0 123 4>; 114 + interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, 115 + <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, 116 + <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, 117 + <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; 140 118 }; 141 119 142 120 clocks { ··· 383 361 dma: dma-controller@01c02000 { 384 362 compatible = "allwinner,sun6i-a31-dma"; 385 363 reg = <0x01c02000 0x1000>; 386 - interrupts = <0 50 4>; 364 + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 387 365 clocks = <&ahb1_gates 6>; 388 366 resets = <&ahb1_rst 6>; 389 367 #dma-cells = <1>; ··· 400 378 clock-names = "ahb", "mmc"; 401 379 resets = <&ahb1_rst 8>; 402 380 reset-names = "ahb"; 403 - interrupts = <0 60 4>; 381 + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 404 382 status = "disabled"; 405 383 }; 406 384 ··· 411 389 clock-names = "ahb", "mmc"; 412 390 resets = <&ahb1_rst 9>; 413 391 reset-names = "ahb"; 414 - interrupts = <0 61 4>; 392 + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 415 393 status = "disabled"; 416 394 }; 417 395 ··· 422 400 clock-names = "ahb", "mmc"; 423 401 resets = <&ahb1_rst 10>; 424 402 reset-names = "ahb"; 425 - interrupts = <0 62 4>; 403 + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 426 404 status = "disabled"; 427 405 }; 428 406 ··· 433 411 clock-names = "ahb", "mmc"; 434 412 resets = <&ahb1_rst 11>; 435 413 reset-names = "ahb"; 436 - interrupts = <0 63 4>; 414 + interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; 437 415 status = "disabled"; 438 416 }; 439 417 ··· 464 442 ehci0: usb@01c1a000 { 465 443 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; 466 444 reg = <0x01c1a000 0x100>; 467 - interrupts = <0 72 4>; 445 + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 468 446 clocks = <&ahb1_gates 26>; 469 447 resets = <&ahb1_rst 26>; 470 448 phys = <&usbphy 1>; ··· 475 453 ohci0: usb@01c1a400 { 476 454 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; 477 455 reg = <0x01c1a400 0x100>; 478 - interrupts = <0 73 4>; 456 + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 479 457 clocks = <&ahb1_gates 29>, <&usb_clk 16>; 480 458 resets = <&ahb1_rst 29>; 481 459 phys = <&usbphy 1>; ··· 486 464 ehci1: usb@01c1b000 { 487 465 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; 488 466 reg = <0x01c1b000 0x100>; 489 - interrupts = <0 74 4>; 467 + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 490 468 clocks = <&ahb1_gates 27>; 491 469 resets = <&ahb1_rst 27>; 492 470 phys = <&usbphy 2>; ··· 497 475 ohci1: usb@01c1b400 { 498 476 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; 499 477 reg = <0x01c1b400 0x100>; 500 - interrupts = <0 75 4>; 478 + interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; 501 479 clocks = <&ahb1_gates 30>, <&usb_clk 17>; 502 480 resets = <&ahb1_rst 30>; 503 481 phys = <&usbphy 2>; ··· 508 486 ohci2: usb@01c1c400 { 509 487 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; 510 488 reg = <0x01c1c400 0x100>; 511 - interrupts = <0 77 4>; 489 + interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; 512 490 clocks = <&ahb1_gates 31>, <&usb_clk 18>; 513 491 resets = <&ahb1_rst 31>; 514 492 status = "disabled"; ··· 517 495 pio: pinctrl@01c20800 { 518 496 compatible = "allwinner,sun6i-a31-pinctrl"; 519 497 reg = <0x01c20800 0x400>; 520 - interrupts = <0 11 4>, 521 - <0 15 4>, 522 - <0 16 4>, 523 - <0 17 4>; 498 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 499 + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 500 + <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>, 501 + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 524 502 clocks = <&apb1_gates 5>; 525 503 gpio-controller; 526 504 interrupt-controller; ··· 531 509 uart0_pins_a: uart0@0 { 532 510 allwinner,pins = "PH20", "PH21"; 533 511 allwinner,function = "uart0"; 534 - allwinner,drive = <0>; 535 - allwinner,pull = <0>; 512 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 513 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 536 514 }; 537 515 538 516 i2c0_pins_a: i2c0@0 { 539 517 allwinner,pins = "PH14", "PH15"; 540 518 allwinner,function = "i2c0"; 541 - allwinner,drive = <0>; 542 - allwinner,pull = <0>; 519 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 520 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 543 521 }; 544 522 545 523 i2c1_pins_a: i2c1@0 { 546 524 allwinner,pins = "PH16", "PH17"; 547 525 allwinner,function = "i2c1"; 548 - allwinner,drive = <0>; 549 - allwinner,pull = <0>; 526 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 527 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 550 528 }; 551 529 552 530 i2c2_pins_a: i2c2@0 { 553 531 allwinner,pins = "PH18", "PH19"; 554 532 allwinner,function = "i2c2"; 555 - allwinner,drive = <0>; 556 - allwinner,pull = <0>; 533 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 534 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 557 535 }; 558 536 559 537 mmc0_pins_a: mmc0@0 { 560 538 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; 561 539 allwinner,function = "mmc0"; 562 - allwinner,drive = <2>; 563 - allwinner,pull = <0>; 540 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 541 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 564 542 }; 565 543 566 544 gmac_pins_mii_a: gmac_mii@0 { ··· 570 548 "PA20", "PA21", "PA22", "PA23", 571 549 "PA24", "PA26", "PA27"; 572 550 allwinner,function = "gmac"; 573 - allwinner,drive = <0>; 574 - allwinner,pull = <0>; 551 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 552 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 575 553 }; 576 554 577 555 gmac_pins_gmii_a: gmac_gmii@0 { ··· 587 565 * data lines in GMII mode run at 125MHz and 588 566 * might need a higher signal drive strength 589 567 */ 590 - allwinner,drive = <2>; 591 - allwinner,pull = <0>; 568 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 569 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 592 570 }; 593 571 594 572 gmac_pins_rgmii_a: gmac_rgmii@0 { ··· 601 579 * data lines in RGMII mode use DDR mode 602 580 * and need a higher signal drive strength 603 581 */ 604 - allwinner,drive = <3>; 605 - allwinner,pull = <0>; 582 + allwinner,drive = <SUN4I_PINCTRL_40_MA>; 583 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 606 584 }; 607 585 }; 608 586 ··· 627 605 timer@01c20c00 { 628 606 compatible = "allwinner,sun4i-a10-timer"; 629 607 reg = <0x01c20c00 0xa0>; 630 - interrupts = <0 18 4>, 631 - <0 19 4>, 632 - <0 20 4>, 633 - <0 21 4>, 634 - <0 22 4>; 608 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 609 + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, 610 + <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>, 611 + <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>, 612 + <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; 635 613 clocks = <&osc24M>; 636 614 }; 637 615 ··· 640 618 reg = <0x01c20ca0 0x20>; 641 619 }; 642 620 621 + rtp: rtp@01c25000 { 622 + compatible = "allwinner,sun6i-a31-ts"; 623 + reg = <0x01c25000 0x100>; 624 + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; 625 + #thermal-sensor-cells = <0>; 626 + }; 627 + 643 628 uart0: serial@01c28000 { 644 629 compatible = "snps,dw-apb-uart"; 645 630 reg = <0x01c28000 0x400>; 646 - interrupts = <0 0 4>; 631 + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 647 632 reg-shift = <2>; 648 633 reg-io-width = <4>; 649 634 clocks = <&apb2_gates 16>; ··· 663 634 uart1: serial@01c28400 { 664 635 compatible = "snps,dw-apb-uart"; 665 636 reg = <0x01c28400 0x400>; 666 - interrupts = <0 1 4>; 637 + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 667 638 reg-shift = <2>; 668 639 reg-io-width = <4>; 669 640 clocks = <&apb2_gates 17>; ··· 676 647 uart2: serial@01c28800 { 677 648 compatible = "snps,dw-apb-uart"; 678 649 reg = <0x01c28800 0x400>; 679 - interrupts = <0 2 4>; 650 + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 680 651 reg-shift = <2>; 681 652 reg-io-width = <4>; 682 653 clocks = <&apb2_gates 18>; ··· 689 660 uart3: serial@01c28c00 { 690 661 compatible = "snps,dw-apb-uart"; 691 662 reg = <0x01c28c00 0x400>; 692 - interrupts = <0 3 4>; 663 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 693 664 reg-shift = <2>; 694 665 reg-io-width = <4>; 695 666 clocks = <&apb2_gates 19>; ··· 702 673 uart4: serial@01c29000 { 703 674 compatible = "snps,dw-apb-uart"; 704 675 reg = <0x01c29000 0x400>; 705 - interrupts = <0 4 4>; 676 + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 706 677 reg-shift = <2>; 707 678 reg-io-width = <4>; 708 679 clocks = <&apb2_gates 20>; ··· 715 686 uart5: serial@01c29400 { 716 687 compatible = "snps,dw-apb-uart"; 717 688 reg = <0x01c29400 0x400>; 718 - interrupts = <0 5 4>; 689 + interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; 719 690 reg-shift = <2>; 720 691 reg-io-width = <4>; 721 692 clocks = <&apb2_gates 21>; ··· 728 699 i2c0: i2c@01c2ac00 { 729 700 compatible = "allwinner,sun6i-a31-i2c"; 730 701 reg = <0x01c2ac00 0x400>; 731 - interrupts = <0 6 4>; 702 + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 732 703 clocks = <&apb2_gates 0>; 733 704 resets = <&apb2_rst 0>; 734 705 status = "disabled"; ··· 739 710 i2c1: i2c@01c2b000 { 740 711 compatible = "allwinner,sun6i-a31-i2c"; 741 712 reg = <0x01c2b000 0x400>; 742 - interrupts = <0 7 4>; 713 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 743 714 clocks = <&apb2_gates 1>; 744 715 resets = <&apb2_rst 1>; 745 716 status = "disabled"; ··· 750 721 i2c2: i2c@01c2b400 { 751 722 compatible = "allwinner,sun6i-a31-i2c"; 752 723 reg = <0x01c2b400 0x400>; 753 - interrupts = <0 8 4>; 724 + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 754 725 clocks = <&apb2_gates 2>; 755 726 resets = <&apb2_rst 2>; 756 727 status = "disabled"; ··· 761 732 i2c3: i2c@01c2b800 { 762 733 compatible = "allwinner,sun6i-a31-i2c"; 763 734 reg = <0x01c2b800 0x400>; 764 - interrupts = <0 9 4>; 735 + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; 765 736 clocks = <&apb2_gates 3>; 766 737 resets = <&apb2_rst 3>; 767 738 status = "disabled"; ··· 772 743 gmac: ethernet@01c30000 { 773 744 compatible = "allwinner,sun7i-a20-gmac"; 774 745 reg = <0x01c30000 0x1054>; 775 - interrupts = <0 82 4>; 746 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 776 747 interrupt-names = "macirq"; 777 748 clocks = <&ahb1_gates 17>, <&gmac_tx_clk>; 778 749 clock-names = "stmmaceth", "allwinner_gmac_tx"; ··· 789 760 timer@01c60000 { 790 761 compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer"; 791 762 reg = <0x01c60000 0x1000>; 792 - interrupts = <0 51 4>, 793 - <0 52 4>, 794 - <0 53 4>, 795 - <0 54 4>; 763 + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>, 764 + <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, 765 + <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, 766 + <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 796 767 clocks = <&ahb1_gates 19>; 797 768 resets = <&ahb1_rst 19>; 798 769 }; ··· 800 771 spi0: spi@01c68000 { 801 772 compatible = "allwinner,sun6i-a31-spi"; 802 773 reg = <0x01c68000 0x1000>; 803 - interrupts = <0 65 4>; 774 + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 804 775 clocks = <&ahb1_gates 20>, <&spi0_clk>; 805 776 clock-names = "ahb", "mod"; 806 777 dmas = <&dma 23>, <&dma 23>; ··· 812 783 spi1: spi@01c69000 { 813 784 compatible = "allwinner,sun6i-a31-spi"; 814 785 reg = <0x01c69000 0x1000>; 815 - interrupts = <0 66 4>; 786 + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; 816 787 clocks = <&ahb1_gates 21>, <&spi1_clk>; 817 788 clock-names = "ahb", "mod"; 818 789 dmas = <&dma 24>, <&dma 24>; ··· 824 795 spi2: spi@01c6a000 { 825 796 compatible = "allwinner,sun6i-a31-spi"; 826 797 reg = <0x01c6a000 0x1000>; 827 - interrupts = <0 67 4>; 798 + interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; 828 799 clocks = <&ahb1_gates 22>, <&spi2_clk>; 829 800 clock-names = "ahb", "mod"; 830 801 dmas = <&dma 25>, <&dma 25>; ··· 836 807 spi3: spi@01c6b000 { 837 808 compatible = "allwinner,sun6i-a31-spi"; 838 809 reg = <0x01c6b000 0x1000>; 839 - interrupts = <0 68 4>; 810 + interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; 840 811 clocks = <&ahb1_gates 23>, <&spi3_clk>; 841 812 clock-names = "ahb", "mod"; 842 813 dmas = <&dma 26>, <&dma 26>; ··· 853 824 <0x01c86000 0x2000>; 854 825 interrupt-controller; 855 826 #interrupt-cells = <3>; 856 - interrupts = <1 9 0xf04>; 827 + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 857 828 }; 858 829 859 830 rtc: rtc@01f00000 { 860 831 compatible = "allwinner,sun6i-a31-rtc"; 861 832 reg = <0x01f00000 0x54>; 862 - interrupts = <0 40 4>, <0 41 4>; 833 + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 834 + <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; 863 835 }; 864 836 865 837 nmi_intc: interrupt-controller@01f00c0c { ··· 868 838 interrupt-controller; 869 839 #interrupt-cells = <2>; 870 840 reg = <0x01f00c0c 0x38>; 871 - interrupts = <0 32 4>; 841 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 872 842 }; 873 843 874 844 prcm@01f01400 { ··· 908 878 "apb0_i2c"; 909 879 }; 910 880 881 + ir_clk: ir_clk { 882 + #clock-cells = <0>; 883 + compatible = "allwinner,sun4i-a10-mod0-clk"; 884 + clocks = <&osc32k>, <&osc24M>; 885 + clock-output-names = "ir"; 886 + }; 887 + 911 888 apb0_rst: apb0_rst { 912 889 compatible = "allwinner,sun6i-a31-clock-reset"; 913 890 #reset-cells = <1>; ··· 926 889 reg = <0x01f01c00 0x300>; 927 890 }; 928 891 892 + ir: ir@01f02000 { 893 + compatible = "allwinner,sun5i-a13-ir"; 894 + clocks = <&apb0_gates 1>, <&ir_clk>; 895 + clock-names = "apb", "ir"; 896 + resets = <&apb0_rst 1>; 897 + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 898 + reg = <0x01f02000 0x40>; 899 + status = "disabled"; 900 + }; 901 + 929 902 r_pio: pinctrl@01f02c00 { 930 903 compatible = "allwinner,sun6i-a31-r-pinctrl"; 931 904 reg = <0x01f02c00 0x400>; 932 - interrupts = <0 45 4>, 933 - <0 46 4>; 905 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>, 906 + <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; 934 907 clocks = <&apb0_gates 0>; 935 908 resets = <&apb0_rst 0>; 936 909 gpio-controller; ··· 948 901 #interrupt-cells = <2>; 949 902 #size-cells = <0>; 950 903 #gpio-cells = <3>; 904 + 905 + ir_pins_a: ir@0 { 906 + allwinner,pins = "PL4"; 907 + allwinner,function = "s_ir"; 908 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 909 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 910 + }; 951 911 }; 952 912 }; 953 913 };
+104
arch/arm/boot/dts/sun6i-a31s-cs908.dts
··· 1 + /* 2 + * Copyright 2014 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 library 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 library 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this library; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun6i-a31s.dtsi" 50 + 51 + #include <dt-bindings/pinctrl/sun4i-a10.h> 52 + 53 + / { 54 + model = "CSQ CS908 top set box"; 55 + compatible = "csq,cs908", "allwinner,sun6i-a31s"; 56 + }; 57 + 58 + &usbphy { 59 + status = "okay"; 60 + }; 61 + 62 + &ehci0 { 63 + status = "okay"; 64 + }; 65 + 66 + &ehci1 { 67 + status = "okay"; 68 + }; 69 + 70 + &ohci1 { 71 + status = "okay"; 72 + }; 73 + 74 + &pio { 75 + usb1_vbus_pin_csq908: usb1_vbus_pin@0 { 76 + allwinner,pins = "PC27"; 77 + allwinner,function = "gpio_out"; 78 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 79 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 80 + }; 81 + }; 82 + 83 + &uart0 { 84 + pinctrl-names = "default"; 85 + pinctrl-0 = <&uart0_pins_a>; 86 + status = "okay"; 87 + }; 88 + 89 + &gmac { 90 + pinctrl-names = "default"; 91 + pinctrl-0 = <&gmac_pins_mii_a>; 92 + phy = <&phy1>; 93 + phy-mode = "mii"; 94 + status = "okay"; 95 + phy1: ethernet-phy@1 { 96 + reg = <1>; 97 + }; 98 + }; 99 + 100 + &ir { 101 + pinctrl-names = "default"; 102 + pinctrl-0 = <&ir_pins_a>; 103 + status = "okay"; 104 + };
+58
arch/arm/boot/dts/sun6i-a31s.dtsi
··· 1 + /* 2 + * Copyright 2014 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 library 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 library 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this library; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /* 49 + * The A31s is the same die as the A31 in a different package, this is 50 + * reflected by it having different pinctrl compatible everything else is 51 + * identical. 52 + */ 53 + 54 + #include "sun6i-a31.dtsi" 55 + 56 + &pio { 57 + compatible = "allwinner,sun6i-a31s-pinctrl"; 58 + };
+16 -12
arch/arm/boot/dts/sun7i-a20-bananapi.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun7i-a20.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun7i-a20.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 57 54 58 / { 55 59 model = "LeMaker Banana Pi"; ··· 71 67 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; 72 68 vmmc-supply = <&reg_vcc3v3>; 73 69 bus-width = <4>; 74 - cd-gpios = <&pio 7 10 0>; /* PH10 */ 70 + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ 75 71 cd-inverted; 76 72 status = "okay"; 77 73 }; ··· 106 102 mmc0_cd_pin_bananapi: mmc0_cd_pin@0 { 107 103 allwinner,pins = "PH10"; 108 104 allwinner,function = "gpio_in"; 109 - allwinner,drive = <0>; 110 - allwinner,pull = <1>; 105 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 106 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 111 107 }; 112 108 113 109 gmac_power_pin_bananapi: gmac_power_pin@0 { 114 110 allwinner,pins = "PH23"; 115 111 allwinner,function = "gpio_out"; 116 - allwinner,drive = <0>; 117 - allwinner,pull = <0>; 112 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 113 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 118 114 }; 119 115 120 116 led_pins_bananapi: led_pins@0 { 121 117 allwinner,pins = "PH24"; 122 118 allwinner,function = "gpio_out"; 123 - allwinner,drive = <0>; 124 - allwinner,pull = <0>; 119 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 120 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 125 121 }; 126 122 }; 127 123 ··· 158 154 compatible = "x-powers,axp209"; 159 155 reg = <0x34>; 160 156 interrupt-parent = <&nmi_intc>; 161 - interrupts = <0 8>; 157 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 162 158 163 159 interrupt-controller; 164 160 #interrupt-cells = <1>; ··· 192 188 193 189 green { 194 190 label = "bananapi:green:usr"; 195 - gpios = <&pio 7 24 0>; 191 + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; 196 192 }; 197 193 }; 198 194 ··· 213 209 regulator-max-microvolt = <3300000>; 214 210 startup-delay-us = <100000>; 215 211 enable-active-high; 216 - gpio = <&pio 7 23 0>; 212 + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; 217 213 }; 218 214 };
+262
arch/arm/boot/dts/sun7i-a20-bananapro.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /dts-v1/; 49 + #include "sun7i-a20.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + #include <dt-bindings/gpio/gpio.h> 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + 54 + / { 55 + model = "LeMaker Banana Pro"; 56 + compatible = "lemaker,bananapro", "allwinner,sun7i-a20"; 57 + 58 + leds { 59 + compatible = "gpio-leds"; 60 + pinctrl-names = "default"; 61 + pinctrl-0 = <&led_pins_bananapro>; 62 + 63 + blue { 64 + label = "bananapro:blue:usr"; 65 + gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; 66 + }; 67 + 68 + green { 69 + label = "bananapro:green:usr"; 70 + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; 71 + }; 72 + }; 73 + 74 + reg_gmac_3v3: gmac-3v3 { 75 + compatible = "regulator-fixed"; 76 + pinctrl-names = "default"; 77 + pinctrl-0 = <&gmac_power_pin_bananapro>; 78 + regulator-name = "gmac-3v3"; 79 + regulator-min-microvolt = <3300000>; 80 + regulator-max-microvolt = <3300000>; 81 + startup-delay-us = <100000>; 82 + enable-active-high; 83 + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; 84 + }; 85 + 86 + reg_vmmc3: vmmc3 { 87 + compatible = "regulator-fixed"; 88 + pinctrl-names = "default"; 89 + pinctrl-0 = <&vmmc3_pin_bananapro>; 90 + regulator-name = "vmmc3"; 91 + regulator-min-microvolt = <3300000>; 92 + regulator-max-microvolt = <3300000>; 93 + enable-active-high; 94 + gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; 95 + }; 96 + }; 97 + 98 + &ahci { 99 + status = "okay"; 100 + }; 101 + 102 + &ehci0 { 103 + status = "okay"; 104 + }; 105 + 106 + &ehci1 { 107 + status = "okay"; 108 + }; 109 + 110 + &gmac { 111 + pinctrl-names = "default"; 112 + pinctrl-0 = <&gmac_pins_rgmii_a>; 113 + phy = <&phy1>; 114 + phy-mode = "rgmii"; 115 + phy-supply = <&reg_gmac_3v3>; 116 + status = "okay"; 117 + 118 + phy1: ethernet-phy@1 { 119 + reg = <1>; 120 + }; 121 + }; 122 + 123 + &i2c0 { 124 + pinctrl-names = "default"; 125 + pinctrl-0 = <&i2c0_pins_a>; 126 + status = "okay"; 127 + 128 + axp209: pmic@34 { 129 + compatible = "x-powers,axp209"; 130 + reg = <0x34>; 131 + interrupt-parent = <&nmi_intc>; 132 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 133 + 134 + interrupt-controller; 135 + #interrupt-cells = <1>; 136 + }; 137 + }; 138 + 139 + &i2c2 { 140 + pinctrl-names = "default"; 141 + pinctrl-0 = <&i2c2_pins_a>; 142 + status = "okay"; 143 + }; 144 + 145 + &ir0 { 146 + pinctrl-names = "default"; 147 + pinctrl-0 = <&ir0_pins_a>; 148 + status = "okay"; 149 + }; 150 + 151 + &mmc0 { 152 + pinctrl-names = "default"; 153 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapro>; 154 + vmmc-supply = <&reg_vcc3v3>; 155 + bus-width = <4>; 156 + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ 157 + cd-inverted; 158 + status = "okay"; 159 + }; 160 + 161 + &mmc3 { 162 + pinctrl-names = "default"; 163 + pinctrl-0 = <&mmc3_pins_a>; 164 + vmmc-supply = <&reg_vmmc3>; 165 + bus-width = <4>; 166 + non-removable; 167 + status = "okay"; 168 + }; 169 + 170 + &ohci0 { 171 + status = "okay"; 172 + }; 173 + 174 + &ohci1 { 175 + status = "okay"; 176 + }; 177 + 178 + &pio { 179 + gmac_power_pin_bananapro: gmac_power_pin@0 { 180 + allwinner,pins = "PH23"; 181 + allwinner,function = "gpio_out"; 182 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 183 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 184 + }; 185 + 186 + led_pins_bananapro: led_pins@0 { 187 + allwinner,pins = "PH24", "PG2"; 188 + allwinner,function = "gpio_out"; 189 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 190 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 191 + }; 192 + 193 + mmc0_cd_pin_bananapro: mmc0_cd_pin@0 { 194 + allwinner,pins = "PH10"; 195 + allwinner,function = "gpio_in"; 196 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 197 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 198 + }; 199 + 200 + usb1_vbus_pin_bananapro: usb1_vbus_pin@0 { 201 + allwinner,pins = "PH0"; 202 + allwinner,function = "gpio_out"; 203 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 204 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 205 + }; 206 + 207 + usb2_vbus_pin_bananapro: usb2_vbus_pin@0 { 208 + allwinner,pins = "PH1"; 209 + allwinner,function = "gpio_out"; 210 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 211 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 212 + }; 213 + 214 + vmmc3_pin_bananapro: vmmc3_pin@0 { 215 + allwinner,pins = "PH22"; 216 + allwinner,function = "gpio_out"; 217 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 218 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 219 + }; 220 + }; 221 + 222 + &reg_usb1_vbus { 223 + pinctrl-0 = <&usb1_vbus_pin_bananapro>; 224 + gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ 225 + status = "okay"; 226 + }; 227 + 228 + &reg_usb2_vbus { 229 + pinctrl-0 = <&usb2_vbus_pin_bananapro>; 230 + gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 231 + status = "okay"; 232 + }; 233 + 234 + &spi0 { 235 + pinctrl-names = "default"; 236 + pinctrl-0 = <&spi0_pins_a>; 237 + status = "okay"; 238 + }; 239 + 240 + &uart0 { 241 + pinctrl-names = "default"; 242 + pinctrl-0 = <&uart0_pins_a>; 243 + status = "okay"; 244 + }; 245 + 246 + &uart2 { 247 + pinctrl-names = "default"; 248 + pinctrl-0 = <&uart2_pins_a>; 249 + status = "okay"; 250 + }; 251 + 252 + &uart7 { 253 + pinctrl-names = "default"; 254 + pinctrl-0 = <&uart7_pins_a>; 255 + status = "okay"; 256 + }; 257 + 258 + &usbphy { 259 + usb1_vbus-supply = <&reg_usb1_vbus>; 260 + usb2_vbus-supply = <&reg_usb2_vbus>; 261 + status = "okay"; 262 + };
+84 -17
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
··· 3 3 * 4 4 * Maxime Ripard <maxime.ripard@free-electrons.com> 5 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: 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 9 10 * 10 - * http://www.opensource.org/licenses/gpl-license.html 11 - * http://www.gnu.org/copyleft/gpl.html 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This file is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * You should have received a copy of the GNU General Public 22 + * License along with this file; if not, write to the Free 23 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 24 + * MA 02110-1301 USA 25 + * 26 + * Or, alternatively, 27 + * 28 + * b) Permission is hereby granted, free of charge, to any person 29 + * obtaining a copy of this software and associated documentation 30 + * files (the "Software"), to deal in the Software without 31 + * restriction, including without limitation the rights to use, 32 + * copy, modify, merge, publish, distribute, sublicense, and/or 33 + * sell copies of the Software, and to permit persons to whom the 34 + * Software is furnished to do so, subject to the following 35 + * conditions: 36 + * 37 + * The above copyright notice and this permission notice shall be 38 + * included in all copies or substantial portions of the Software. 39 + * 40 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 41 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 42 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 43 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 44 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 45 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 46 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 47 + * OTHER DEALINGS IN THE SOFTWARE. 12 48 */ 13 49 14 50 /dts-v1/; 15 - /include/ "sun7i-a20.dtsi" 16 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun7i-a20.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 17 57 18 58 / { 19 59 model = "Cubietech Cubieboard2"; ··· 65 25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 66 26 vmmc-supply = <&reg_vcc3v3>; 67 27 bus-width = <4>; 68 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 28 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 69 29 cd-inverted; 70 30 status = "okay"; 71 31 }; ··· 101 61 led_pins_cubieboard2: led_pins@0 { 102 62 allwinner,pins = "PH20", "PH21"; 103 63 allwinner,function = "gpio_out"; 104 - allwinner,drive = <0>; 105 - allwinner,pull = <0>; 64 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 65 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 106 66 }; 107 67 }; 108 68 ··· 124 84 status = "okay"; 125 85 126 86 axp209: pmic@34 { 127 - compatible = "x-powers,axp209"; 128 87 reg = <0x34>; 129 88 interrupt-parent = <&nmi_intc>; 130 - interrupts = <0 8>; 131 - 132 - interrupt-controller; 133 - #interrupt-cells = <1>; 89 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 134 90 }; 135 91 }; 136 92 ··· 156 120 157 121 blue { 158 122 label = "cubieboard2:blue:usr"; 159 - gpios = <&pio 7 21 0>; 123 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; 160 124 }; 161 125 162 126 green { 163 127 label = "cubieboard2:green:usr"; 164 - gpios = <&pio 7 20 0>; 128 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 165 129 }; 166 130 }; 167 131 ··· 176 140 reg_usb2_vbus: usb2-vbus { 177 141 status = "okay"; 178 142 }; 143 + }; 144 + 145 + #include "axp209.dtsi" 146 + 147 + &cpu0 { 148 + cpu-supply = <&reg_dcdc2>; 149 + }; 150 + 151 + &reg_dcdc2 { 152 + regulator-always-on; 153 + regulator-min-microvolt = <1000000>; 154 + regulator-max-microvolt = <1450000>; 155 + regulator-name = "vdd-cpu"; 156 + }; 157 + 158 + &reg_dcdc3 { 159 + regulator-always-on; 160 + regulator-min-microvolt = <1000000>; 161 + regulator-max-microvolt = <1400000>; 162 + regulator-name = "vdd-int-dll"; 163 + }; 164 + 165 + &reg_ldo1 { 166 + regulator-name = "vdd-rtc"; 167 + }; 168 + 169 + &reg_ldo2 { 170 + regulator-always-on; 171 + regulator-min-microvolt = <3000000>; 172 + regulator-max-microvolt = <3000000>; 173 + regulator-name = "avcc"; 179 174 };
+96 -29
arch/arm/boot/dts/sun7i-a20-cubietruck.dts
··· 3 3 * 4 4 * Oliver Schinagl <oliver@schinagl.nl> 5 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: 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 9 10 * 10 - * http://www.opensource.org/licenses/gpl-license.html 11 - * http://www.gnu.org/copyleft/gpl.html 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This file is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * You should have received a copy of the GNU General Public 22 + * License along with this file; if not, write to the Free 23 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 24 + * MA 02110-1301 USA 25 + * 26 + * Or, alternatively, 27 + * 28 + * b) Permission is hereby granted, free of charge, to any person 29 + * obtaining a copy of this software and associated documentation 30 + * files (the "Software"), to deal in the Software without 31 + * restriction, including without limitation the rights to use, 32 + * copy, modify, merge, publish, distribute, sublicense, and/or 33 + * sell copies of the Software, and to permit persons to whom the 34 + * Software is furnished to do so, subject to the following 35 + * conditions: 36 + * 37 + * The above copyright notice and this permission notice shall be 38 + * included in all copies or substantial portions of the Software. 39 + * 40 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 41 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 42 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 43 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 44 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 45 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 46 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 47 + * OTHER DEALINGS IN THE SOFTWARE. 12 48 */ 13 49 14 50 /dts-v1/; 15 - /include/ "sun7i-a20.dtsi" 16 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun7i-a20.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 17 57 18 58 / { 19 59 model = "Cubietech Cubietruck"; ··· 65 25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 66 26 vmmc-supply = <&reg_vcc3v3>; 67 27 bus-width = <4>; 68 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 28 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 69 29 cd-inverted; 70 30 status = "okay"; 71 31 }; ··· 110 70 pinctrl@01c20800 { 111 71 mmc3_pins_a: mmc3@0 { 112 72 /* AP6210 requires pull-up */ 113 - allwinner,pull = <1>; 73 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 114 74 }; 115 75 116 76 vmmc3_pin_cubietruck: vmmc3_pin@0 { 117 77 allwinner,pins = "PH9"; 118 78 allwinner,function = "gpio_out"; 119 - allwinner,drive = <0>; 120 - allwinner,pull = <0>; 79 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 80 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 121 81 }; 122 82 123 83 ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { 124 84 allwinner,pins = "PH12"; 125 85 allwinner,function = "gpio_out"; 126 - allwinner,drive = <0>; 127 - allwinner,pull = <0>; 86 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 87 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 128 88 }; 129 89 130 90 led_pins_cubietruck: led_pins@0 { 131 91 allwinner,pins = "PH7", "PH11", "PH20", "PH21"; 132 92 allwinner,function = "gpio_out"; 133 - allwinner,drive = <0>; 134 - allwinner,pull = <0>; 93 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 94 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 135 95 }; 136 96 137 97 usb0_vbus_pin_a: usb0_vbus_pin@0 { 138 98 allwinner,pins = "PH17"; 139 99 allwinner,function = "gpio_out"; 140 - allwinner,drive = <0>; 141 - allwinner,pull = <0>; 100 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 101 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 142 102 }; 143 103 }; 144 104 ··· 166 126 status = "okay"; 167 127 168 128 axp209: pmic@34 { 169 - compatible = "x-powers,axp209"; 170 129 reg = <0x34>; 171 130 interrupt-parent = <&nmi_intc>; 172 - interrupts = <0 8>; 173 - 174 - interrupt-controller; 175 - #interrupt-cells = <1>; 131 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 176 132 }; 177 133 }; 178 134 ··· 204 168 205 169 blue { 206 170 label = "cubietruck:blue:usr"; 207 - gpios = <&pio 7 21 0>; 171 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; 208 172 }; 209 173 210 174 orange { 211 175 label = "cubietruck:orange:usr"; 212 - gpios = <&pio 7 20 0>; 176 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 213 177 }; 214 178 215 179 white { 216 180 label = "cubietruck:white:usr"; 217 - gpios = <&pio 7 11 0>; 181 + gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; 218 182 }; 219 183 220 184 green { 221 185 label = "cubietruck:green:usr"; 222 - gpios = <&pio 7 7 0>; 186 + gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; 223 187 }; 224 188 }; 225 189 226 190 reg_ahci_5v: ahci-5v { 227 191 pinctrl-0 = <&ahci_pwr_pin_cubietruck>; 228 - gpio = <&pio 7 12 0>; 192 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 229 193 status = "okay"; 230 194 }; 231 195 232 196 reg_usb0_vbus: usb0-vbus { 233 197 pinctrl-0 = <&usb0_vbus_pin_a>; 234 - gpio = <&pio 7 17 0>; 198 + gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>; 235 199 status = "okay"; 236 200 }; 237 201 ··· 251 215 regulator-min-microvolt = <3300000>; 252 216 regulator-max-microvolt = <3300000>; 253 217 enable-active-high; 254 - gpio = <&pio 7 9 0>; 218 + gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; 255 219 }; 220 + }; 221 + 222 + #include "axp209.dtsi" 223 + 224 + &cpu0 { 225 + cpu-supply = <&reg_dcdc2>; 226 + }; 227 + 228 + &reg_dcdc2 { 229 + regulator-always-on; 230 + regulator-min-microvolt = <1000000>; 231 + regulator-max-microvolt = <1450000>; 232 + regulator-name = "vdd-cpu"; 233 + }; 234 + 235 + &reg_dcdc3 { 236 + regulator-always-on; 237 + regulator-min-microvolt = <1000000>; 238 + regulator-max-microvolt = <1400000>; 239 + regulator-name = "vdd-int-dll"; 240 + }; 241 + 242 + &reg_ldo1 { 243 + regulator-name = "vdd-rtc"; 244 + }; 245 + 246 + &reg_ldo2 { 247 + regulator-always-on; 248 + regulator-min-microvolt = <3000000>; 249 + regulator-max-microvolt = <3000000>; 250 + regulator-name = "avcc"; 256 251 };
+21 -17
arch/arm/boot/dts/sun7i-a20-hummingbird.dts
··· 12 12 */ 13 13 14 14 /dts-v1/; 15 - /include/ "sun7i-a20.dtsi" 16 - /include/ "sunxi-common-regulators.dtsi" 15 + #include "sun7i-a20.dtsi" 16 + #include "sunxi-common-regulators.dtsi" 17 + 18 + #include <dt-bindings/gpio/gpio.h> 19 + #include <dt-bindings/interrupt-controller/irq.h> 20 + #include <dt-bindings/pinctrl/sun4i-a10.h> 17 21 18 22 / { 19 23 model = "Merrii A20 Hummingbird"; ··· 29 25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 30 26 vmmc-supply = <&reg_vcc3v0>; 31 27 bus-width = <4>; 32 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 28 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 33 29 cd-inverted; 34 30 status = "okay"; 35 31 }; ··· 74 70 ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 { 75 71 allwinner,pins = "PH15"; 76 72 allwinner,function = "gpio_out"; 77 - allwinner,drive = <0>; 78 - allwinner,pull = <0>; 73 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 74 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 79 75 }; 80 76 81 77 usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 { 82 78 allwinner,pins = "PH2"; 83 79 allwinner,function = "gpio_out"; 84 - allwinner,drive = <0>; 85 - allwinner,pull = <0>; 80 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 81 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 86 82 }; 87 83 88 84 mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 { 89 85 allwinner,pins = "PH9"; 90 86 allwinner,function = "gpio_out"; 91 - allwinner,drive = <0>; 92 - allwinner,pull = <0>; 87 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 88 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 93 89 }; 94 90 95 91 gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 { 96 92 allwinner,pins = "PH16"; 97 93 allwinner,function = "gpio_out"; 98 - allwinner,drive = <0>; 99 - allwinner,pull = <0>; 94 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 95 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 100 96 }; 101 97 }; 102 98 ··· 151 147 compatible = "x-powers,axp209"; 152 148 reg = <0x34>; 153 149 interrupt-parent = <&nmi_intc>; 154 - interrupts = <0 8>; 150 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 155 151 interrupt-controller; 156 152 #interrupt-cells = <1>; 157 153 }; ··· 188 184 phy-mode = "rgmii"; 189 185 phy-supply = <&reg_gmac_vdd>; 190 186 /* phy reset config */ 191 - snps,reset-gpio = <&pio 0 17 0>; /* PA17 */ 187 + snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */ 192 188 snps,reset-active-low; 193 189 /* wait 1s after reset, otherwise fail to read phy id */ 194 190 snps,reset-delays-us = <0 10000 1000000>; ··· 202 198 203 199 reg_ahci_5v: ahci-5v { 204 200 pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>; 205 - gpio = <&pio 7 15 0>; /* PH15 */ 201 + gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ 206 202 status = "okay"; 207 203 }; 208 204 209 205 reg_usb1_vbus: usb1-vbus { 210 206 pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>; 211 - gpio = <&pio 7 2 0>; /* PH2 */ 207 + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ 212 208 status = "okay"; 213 209 }; 214 210 ··· 224 220 regulator-min-microvolt = <3000000>; 225 221 regulator-max-microvolt = <3000000>; 226 222 enable-active-high; 227 - gpio = <&pio 7 9 0>; /* PH9 */ 223 + gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ 228 224 }; 229 225 230 226 reg_gmac_vdd: gmac_vdd { ··· 235 231 regulator-min-microvolt = <3000000>; 236 232 regulator-max-microvolt = <3000000>; 237 233 enable-active-high; 238 - gpio = <&pio 7 16 0>; /* PH16 */ 234 + gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */ 239 235 }; 240 236 };
+22 -18
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun7i-a20.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun7i-a20.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 53 + #include <dt-bindings/interrupt-controller/irq.h> 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 55 52 56 / { 53 57 model = "I12 / Q5 / QT840A A20 tvbox"; ··· 63 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 64 60 vmmc-supply = <&reg_vcc3v3>; 65 61 bus-width = <4>; 66 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 62 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 67 63 cd-inverted; 68 64 status = "okay"; 69 65 }; ··· 102 98 pinctrl@01c20800 { 103 99 mmc3_pins_a: mmc3@0 { 104 100 /* AP6210 / AP6330 requires pull-up */ 105 - allwinner,pull = <1>; 101 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 106 102 }; 107 103 108 104 vmmc3_pin_i12_tvbox: vmmc3_pin@0 { 109 105 allwinner,pins = "PH2"; 110 106 allwinner,function = "gpio_out"; 111 - allwinner,drive = <0>; 112 - allwinner,pull = <0>; 107 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 108 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 113 109 }; 114 110 115 111 vmmc3_io_pin_i12_tvbox: vmmc3_io_pin@0 { 116 112 allwinner,pins = "PH12"; 117 113 allwinner,function = "gpio_out"; 118 - allwinner,drive = <0>; 119 - allwinner,pull = <0>; 114 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 115 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 120 116 }; 121 117 122 118 gmac_power_pin_i12_tvbox: gmac_power_pin@0 { 123 119 allwinner,pins = "PH21"; 124 120 allwinner,function = "gpio_out"; 125 - allwinner,drive = <0>; 126 - allwinner,pull = <0>; 121 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 122 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 127 123 }; 128 124 129 125 led_pins_i12_tvbox: led_pins@0 { 130 126 allwinner,pins = "PH9", "PH20"; 131 127 allwinner,function = "gpio_out"; 132 - allwinner,drive = <0>; 133 - allwinner,pull = <0>; 128 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 129 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 134 130 }; 135 131 }; 136 132 ··· 155 151 compatible = "x-powers,axp209"; 156 152 reg = <0x34>; 157 153 interrupt-parent = <&nmi_intc>; 158 - interrupts = <0 8>; 154 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 159 155 160 156 interrupt-controller; 161 157 #interrupt-cells = <1>; ··· 183 179 184 180 red { 185 181 label = "i12_tvbox:red:usr"; 186 - gpios = <&pio 7 9 1>; 182 + gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; 187 183 }; 188 184 189 185 blue { 190 186 label = "i12_tvbox:blue:usr"; 191 - gpios = <&pio 7 20 0>; 187 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 192 188 }; 193 189 }; 194 190 ··· 208 204 regulator-min-microvolt = <3300000>; 209 205 regulator-max-microvolt = <3300000>; 210 206 enable-active-high; 211 - gpio = <&pio 7 2 0>; 207 + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; 212 208 }; 213 209 214 210 reg_vmmc3_io: vmmc3-io { ··· 221 217 /* This controls VCC-PI, must be always on! */ 222 218 regulator-always-on; 223 219 enable-active-high; 224 - gpio = <&pio 7 12 0>; 220 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 225 221 }; 226 222 227 223 reg_gmac_3v3: gmac-3v3 { ··· 233 229 regulator-max-microvolt = <3300000>; 234 230 startup-delay-us = <50000>; 235 231 enable-active-high; 236 - gpio = <&pio 7 21 0>; 232 + gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; 237 233 }; 238 234 };
+11 -7
arch/arm/boot/dts/sun7i-a20-m3.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun7i-a20.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun7i-a20.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 57 54 58 / { 55 59 model = "Mele M3"; ··· 65 61 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 66 62 vmmc-supply = <&reg_vcc3v3>; 67 63 bus-width = <4>; 68 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 64 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 69 65 cd-inverted; 70 66 status = "okay"; 71 67 }; ··· 105 101 led_pins_m3: led_pins@0 { 106 102 allwinner,pins = "PH20"; 107 103 allwinner,function = "gpio_out"; 108 - allwinner,drive = <0>; 109 - allwinner,pull = <0>; 104 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 105 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 110 106 }; 111 107 }; 112 108 ··· 131 127 compatible = "x-powers,axp209"; 132 128 reg = <0x34>; 133 129 interrupt-parent = <&nmi_intc>; 134 - interrupts = <0 8>; 130 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 135 131 136 132 interrupt-controller; 137 133 #interrupt-cells = <1>; ··· 158 154 159 155 blue { 160 156 label = "m3:blue:usr"; 161 - gpios = <&pio 7 20 0>; 157 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 162 158 }; 163 159 }; 164 160
+14 -10
arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
··· 49 49 */ 50 50 51 51 /dts-v1/; 52 - /include/ "sun7i-a20.dtsi" 53 - /include/ "sunxi-common-regulators.dtsi" 52 + #include "sun7i-a20.dtsi" 53 + #include "sunxi-common-regulators.dtsi" 54 + 55 + #include <dt-bindings/gpio/gpio.h> 56 + #include <dt-bindings/interrupt-controller/irq.h> 57 + #include <dt-bindings/pinctrl/sun4i-a10.h> 54 58 55 59 / { 56 60 model = "Olimex A20-OLinuXino-LIME"; ··· 66 62 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 67 63 vmmc-supply = <&reg_vcc3v3>; 68 64 bus-width = <4>; 69 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 65 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 70 66 cd-inverted; 71 67 status = "okay"; 72 68 }; ··· 102 98 ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { 103 99 allwinner,pins = "PC3"; 104 100 allwinner,function = "gpio_out"; 105 - allwinner,drive = <0>; 106 - allwinner,pull = <0>; 101 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 102 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 107 103 }; 108 104 109 105 led_pins_olinuxinolime: led_pins@0 { 110 106 allwinner,pins = "PH2"; 111 107 allwinner,function = "gpio_out"; 112 - allwinner,drive = <1>; 113 - allwinner,pull = <0>; 108 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 109 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 114 110 }; 115 111 }; 116 112 ··· 129 125 compatible = "x-powers,axp209"; 130 126 reg = <0x34>; 131 127 interrupt-parent = <&nmi_intc>; 132 - interrupts = <0 8>; 128 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 133 129 134 130 interrupt-controller; 135 131 #interrupt-cells = <1>; ··· 156 152 157 153 green { 158 154 label = "a20-olinuxino-lime:green:usr"; 159 - gpios = <&pio 7 2 0>; 155 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 160 156 default-state = "on"; 161 157 }; 162 158 }; 163 159 164 160 reg_ahci_5v: ahci-5v { 165 161 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 166 - gpio = <&pio 2 3 0>; 162 + gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 167 163 status = "okay"; 168 164 }; 169 165
+14 -10
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
··· 46 46 */ 47 47 48 48 /dts-v1/; 49 - /include/ "sun7i-a20.dtsi" 50 - /include/ "sunxi-common-regulators.dtsi" 49 + #include "sun7i-a20.dtsi" 50 + #include "sunxi-common-regulators.dtsi" 51 + 52 + #include <dt-bindings/gpio/gpio.h> 53 + #include <dt-bindings/interrupt-controller/irq.h> 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 55 52 56 / { 53 57 model = "Olimex A20-OLinuXino-LIME2"; ··· 63 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 64 60 vmmc-supply = <&reg_vcc3v3>; 65 61 bus-width = <4>; 66 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 62 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 67 63 cd-inverted; 68 64 status = "okay"; 69 65 }; ··· 99 95 ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { 100 96 allwinner,pins = "PC3"; 101 97 allwinner,function = "gpio_out"; 102 - allwinner,drive = <0>; 103 - allwinner,pull = <0>; 98 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 99 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 104 100 }; 105 101 106 102 led_pins_olinuxinolime: led_pins@0 { 107 103 allwinner,pins = "PH2"; 108 104 allwinner,function = "gpio_out"; 109 - allwinner,drive = <1>; 110 - allwinner,pull = <0>; 105 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 106 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 111 107 }; 112 108 }; 113 109 ··· 126 122 compatible = "x-powers,axp209"; 127 123 reg = <0x34>; 128 124 interrupt-parent = <&nmi_intc>; 129 - interrupts = <0 8>; 125 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 130 126 131 127 interrupt-controller; 132 128 #interrupt-cells = <1>; ··· 203 199 204 200 green { 205 201 label = "a20-olinuxino-lime2:green:usr"; 206 - gpios = <&pio 7 2 0>; 202 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 207 203 default-state = "on"; 208 204 }; 209 205 }; 210 206 211 207 reg_ahci_5v: ahci-5v { 212 208 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 213 - gpio = <&pio 2 3 0>; 209 + gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 214 210 status = "okay"; 215 211 }; 216 212
+69 -10
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
··· 12 12 */ 13 13 14 14 /dts-v1/; 15 - /include/ "sun7i-a20.dtsi" 16 - /include/ "sunxi-common-regulators.dtsi" 15 + #include "sun7i-a20.dtsi" 16 + #include "sunxi-common-regulators.dtsi" 17 + 18 + #include <dt-bindings/gpio/gpio.h> 19 + #include <dt-bindings/input/input.h> 20 + #include <dt-bindings/interrupt-controller/irq.h> 21 + #include <dt-bindings/pinctrl/sun4i-a10.h> 17 22 18 23 / { 19 24 model = "Olimex A20-Olinuxino Micro"; ··· 41 36 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 42 37 vmmc-supply = <&reg_vcc3v3>; 43 38 bus-width = <4>; 44 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 39 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 45 40 cd-inverted; 46 41 status = "okay"; 47 42 }; ··· 51 46 pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>; 52 47 vmmc-supply = <&reg_vcc3v3>; 53 48 bus-width = <4>; 54 - cd-gpios = <&pio 7 11 0>; /* PH11 */ 49 + cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ 55 50 cd-inverted; 56 51 status = "okay"; 57 52 }; ··· 93 88 mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 { 94 89 allwinner,pins = "PH11"; 95 90 allwinner,function = "gpio_in"; 96 - allwinner,drive = <0>; 97 - allwinner,pull = <1>; 91 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 92 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 98 93 }; 99 94 100 95 led_pins_olinuxino: led_pins@0 { 101 96 allwinner,pins = "PH2"; 102 97 allwinner,function = "gpio_out"; 103 - allwinner,drive = <1>; 104 - allwinner,pull = <0>; 98 + allwinner,drive = <SUN4I_PINCTRL_20_MA>; 99 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 100 + }; 101 + }; 102 + 103 + lradc: lradc@01c22800 { 104 + vref-supply = <&reg_vcc3v0>; 105 + status = "okay"; 106 + 107 + button@191 { 108 + label = "Volume Up"; 109 + linux,code = <KEY_VOLUMEUP>; 110 + channel = <0>; 111 + voltage = <191274>; 112 + }; 113 + 114 + button@392 { 115 + label = "Volume Down"; 116 + linux,code = <KEY_VOLUMEDOWN>; 117 + channel = <0>; 118 + voltage = <392644>; 119 + }; 120 + 121 + button@601 { 122 + label = "Menu"; 123 + linux,code = <KEY_MENU>; 124 + channel = <0>; 125 + voltage = <601151>; 126 + }; 127 + 128 + button@795 { 129 + label = "Search"; 130 + linux,code = <KEY_SEARCH>; 131 + channel = <0>; 132 + voltage = <795090>; 133 + }; 134 + 135 + button@987 { 136 + label = "Home"; 137 + linux,code = <KEY_HOMEPAGE>; 138 + channel = <0>; 139 + voltage = <987387>; 140 + }; 141 + 142 + button@1184 { 143 + label = "Esc"; 144 + linux,code = <KEY_ESC>; 145 + channel = <0>; 146 + voltage = <1184678>; 147 + }; 148 + 149 + button@1398 { 150 + label = "Enter"; 151 + linux,code = <KEY_ENTER>; 152 + channel = <0>; 153 + voltage = <1398804>; 105 154 }; 106 155 }; 107 156 ··· 186 127 compatible = "x-powers,axp209"; 187 128 reg = <0x34>; 188 129 interrupt-parent = <&nmi_intc>; 189 - interrupts = <0 8>; 130 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 190 131 191 132 interrupt-controller; 192 133 #interrupt-cells = <1>; ··· 225 166 226 167 green { 227 168 label = "a20-olinuxino-micro:green:usr"; 228 - gpios = <&pio 7 2 0>; 169 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 229 170 default-state = "on"; 230 171 }; 231 172 };
+12 -9
arch/arm/boot/dts/sun7i-a20-pcduino3.dts
··· 47 47 */ 48 48 49 49 /dts-v1/; 50 - /include/ "sun7i-a20.dtsi" 51 - /include/ "sunxi-common-regulators.dtsi" 50 + #include "sun7i-a20.dtsi" 51 + #include "sunxi-common-regulators.dtsi" 52 + 52 53 #include <dt-bindings/gpio/gpio.h> 53 54 #include <dt-bindings/input/input.h> 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 54 57 55 58 / { 56 59 model = "LinkSprite pcDuino3"; ··· 65 62 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 66 63 vmmc-supply = <&reg_vcc3v3>; 67 64 bus-width = <4>; 68 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 65 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 69 66 cd-inverted; 70 67 status = "okay"; 71 68 }; ··· 105 102 led_pins_pcduino3: led_pins@0 { 106 103 allwinner,pins = "PH15", "PH16"; 107 104 allwinner,function = "gpio_out"; 108 - allwinner,drive = <0>; 109 - allwinner,pull = <0>; 105 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 106 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 110 107 }; 111 108 112 109 key_pins_pcduino3: key_pins@0 { 113 110 allwinner,pins = "PH17", "PH18", "PH19"; 114 111 allwinner,function = "gpio_in"; 115 - allwinner,drive = <0>; 116 - allwinner,pull = <0>; 112 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 113 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 117 114 }; 118 115 }; 119 116 ··· 138 135 compatible = "x-powers,axp209"; 139 136 reg = <0x34>; 140 137 interrupt-parent = <&nmi_intc>; 141 - interrupts = <0 8>; 138 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 142 139 143 140 interrupt-controller; 144 141 #interrupt-cells = <1>; ··· 206 203 }; 207 204 208 205 reg_ahci_5v: ahci-5v { 209 - gpio = <&pio 7 2 0>; 206 + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; 210 207 status = "okay"; 211 208 }; 212 209 };
+230 -117
arch/arm/boot/dts/sun7i-a20.dtsi
··· 47 47 * OTHER DEALINGS IN THE SOFTWARE. 48 48 */ 49 49 50 - /include/ "skeleton.dtsi" 50 + #include "skeleton.dtsi" 51 + 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + #include <dt-bindings/thermal/thermal.h> 54 + 55 + #include <dt-bindings/dma/sun4i-a10.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 57 52 58 / { 53 59 interrupt-parent = <&gic>; ··· 82 76 <&ahb_gates 44>; 83 77 status = "disabled"; 84 78 }; 79 + 80 + framebuffer@1 { 81 + compatible = "allwinner,simple-framebuffer", 82 + "simple-framebuffer"; 83 + allwinner,pipeline = "de_be0-lcd0"; 84 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>; 85 + status = "disabled"; 86 + }; 87 + 88 + framebuffer@2 { 89 + compatible = "allwinner,simple-framebuffer", 90 + "simple-framebuffer"; 91 + allwinner,pipeline = "de_be0-lcd0-tve0"; 92 + clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, 93 + <&ahb_gates 44>; 94 + status = "disabled"; 95 + }; 85 96 }; 86 97 87 98 cpus { 88 99 #address-cells = <1>; 89 100 #size-cells = <0>; 90 101 91 - cpu@0 { 102 + cpu0: cpu@0 { 92 103 compatible = "arm,cortex-a7"; 93 104 device_type = "cpu"; 94 105 reg = <0>; 106 + clocks = <&cpu>; 107 + clock-latency = <244144>; /* 8 32k periods */ 108 + operating-points = < 109 + /* kHz uV */ 110 + 1008000 1450000 111 + 960000 1400000 112 + 912000 1400000 113 + 864000 1300000 114 + 720000 1200000 115 + 528000 1100000 116 + 312000 1000000 117 + 144000 900000 118 + >; 119 + #cooling-cells = <2>; 120 + cooling-min-level = <0>; 121 + cooling-max-level = <7>; 95 122 }; 96 123 97 124 cpu@1 { ··· 134 95 }; 135 96 }; 136 97 98 + thermal-zones { 99 + cpu_thermal { 100 + /* milliseconds */ 101 + polling-delay-passive = <250>; 102 + polling-delay = <1000>; 103 + thermal-sensors = <&rtp>; 104 + 105 + cooling-maps { 106 + map0 { 107 + trip = <&cpu_alert0>; 108 + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 109 + }; 110 + }; 111 + 112 + trips { 113 + cpu_alert0: cpu_alert0 { 114 + /* milliCelsius */ 115 + temperature = <75000>; 116 + hysteresis = <2000>; 117 + type = "passive"; 118 + }; 119 + 120 + cpu_crit: cpu_crit { 121 + /* milliCelsius */ 122 + temperature = <100000>; 123 + hysteresis = <2000>; 124 + type = "critical"; 125 + }; 126 + }; 127 + }; 128 + }; 129 + 137 130 memory { 138 131 reg = <0x40000000 0x80000000>; 139 132 }; 140 133 141 134 timer { 142 135 compatible = "arm,armv7-timer"; 143 - interrupts = <1 13 0xf08>, 144 - <1 14 0xf08>, 145 - <1 11 0xf08>, 146 - <1 10 0xf08>; 136 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 137 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 138 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 139 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 147 140 }; 148 141 149 142 pmu { 150 143 compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; 151 - interrupts = <0 120 4>, 152 - <0 121 4>; 144 + interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, 145 + <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; 153 146 }; 154 147 155 148 clocks { ··· 533 462 interrupt-controller; 534 463 #interrupt-cells = <2>; 535 464 reg = <0x01c00030 0x0c>; 536 - interrupts = <0 0 4>; 465 + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 537 466 }; 538 467 539 468 dma: dma-controller@01c02000 { 540 469 compatible = "allwinner,sun4i-a10-dma"; 541 470 reg = <0x01c02000 0x1000>; 542 - interrupts = <0 27 4>; 471 + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; 543 472 clocks = <&ahb_gates 6>; 544 473 #dma-cells = <2>; 545 474 }; ··· 547 476 spi0: spi@01c05000 { 548 477 compatible = "allwinner,sun4i-a10-spi"; 549 478 reg = <0x01c05000 0x1000>; 550 - interrupts = <0 10 4>; 479 + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 551 480 clocks = <&ahb_gates 20>, <&spi0_clk>; 552 481 clock-names = "ahb", "mod"; 553 - dmas = <&dma 1 27>, <&dma 1 26>; 482 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 483 + <&dma SUN4I_DMA_DEDICATED 26>; 554 484 dma-names = "rx", "tx"; 555 485 status = "disabled"; 556 486 #address-cells = <1>; ··· 561 489 spi1: spi@01c06000 { 562 490 compatible = "allwinner,sun4i-a10-spi"; 563 491 reg = <0x01c06000 0x1000>; 564 - interrupts = <0 11 4>; 492 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 565 493 clocks = <&ahb_gates 21>, <&spi1_clk>; 566 494 clock-names = "ahb", "mod"; 567 - dmas = <&dma 1 9>, <&dma 1 8>; 495 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 496 + <&dma SUN4I_DMA_DEDICATED 8>; 568 497 dma-names = "rx", "tx"; 569 498 status = "disabled"; 570 499 #address-cells = <1>; ··· 575 502 emac: ethernet@01c0b000 { 576 503 compatible = "allwinner,sun4i-a10-emac"; 577 504 reg = <0x01c0b000 0x1000>; 578 - interrupts = <0 55 4>; 505 + interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; 579 506 clocks = <&ahb_gates 17>; 580 507 status = "disabled"; 581 508 }; 582 509 583 - mdio@01c0b080 { 510 + mdio: mdio@01c0b080 { 584 511 compatible = "allwinner,sun4i-a10-mdio"; 585 512 reg = <0x01c0b080 0x14>; 586 513 status = "disabled"; ··· 593 520 reg = <0x01c0f000 0x1000>; 594 521 clocks = <&ahb_gates 8>, <&mmc0_clk>; 595 522 clock-names = "ahb", "mmc"; 596 - interrupts = <0 32 4>; 523 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 597 524 status = "disabled"; 598 525 }; 599 526 ··· 602 529 reg = <0x01c10000 0x1000>; 603 530 clocks = <&ahb_gates 9>, <&mmc1_clk>; 604 531 clock-names = "ahb", "mmc"; 605 - interrupts = <0 33 4>; 532 + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; 606 533 status = "disabled"; 607 534 }; 608 535 ··· 611 538 reg = <0x01c11000 0x1000>; 612 539 clocks = <&ahb_gates 10>, <&mmc2_clk>; 613 540 clock-names = "ahb", "mmc"; 614 - interrupts = <0 34 4>; 541 + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; 615 542 status = "disabled"; 616 543 }; 617 544 ··· 620 547 reg = <0x01c12000 0x1000>; 621 548 clocks = <&ahb_gates 11>, <&mmc3_clk>; 622 549 clock-names = "ahb", "mmc"; 623 - interrupts = <0 35 4>; 550 + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; 624 551 status = "disabled"; 625 552 }; 626 553 ··· 639 566 ehci0: usb@01c14000 { 640 567 compatible = "allwinner,sun7i-a20-ehci", "generic-ehci"; 641 568 reg = <0x01c14000 0x100>; 642 - interrupts = <0 39 4>; 569 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; 643 570 clocks = <&ahb_gates 1>; 644 571 phys = <&usbphy 1>; 645 572 phy-names = "usb"; ··· 649 576 ohci0: usb@01c14400 { 650 577 compatible = "allwinner,sun7i-a20-ohci", "generic-ohci"; 651 578 reg = <0x01c14400 0x100>; 652 - interrupts = <0 64 4>; 579 + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; 653 580 clocks = <&usb_clk 6>, <&ahb_gates 2>; 654 581 phys = <&usbphy 1>; 655 582 phy-names = "usb"; ··· 659 586 spi2: spi@01c17000 { 660 587 compatible = "allwinner,sun4i-a10-spi"; 661 588 reg = <0x01c17000 0x1000>; 662 - interrupts = <0 12 4>; 589 + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; 663 590 clocks = <&ahb_gates 22>, <&spi2_clk>; 664 591 clock-names = "ahb", "mod"; 665 - dmas = <&dma 1 29>, <&dma 1 28>; 592 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 593 + <&dma SUN4I_DMA_DEDICATED 28>; 666 594 dma-names = "rx", "tx"; 667 595 status = "disabled"; 668 596 #address-cells = <1>; ··· 673 599 ahci: sata@01c18000 { 674 600 compatible = "allwinner,sun4i-a10-ahci"; 675 601 reg = <0x01c18000 0x1000>; 676 - interrupts = <0 56 4>; 602 + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; 677 603 clocks = <&pll6 0>, <&ahb_gates 25>; 678 604 status = "disabled"; 679 605 }; ··· 681 607 ehci1: usb@01c1c000 { 682 608 compatible = "allwinner,sun7i-a20-ehci", "generic-ehci"; 683 609 reg = <0x01c1c000 0x100>; 684 - interrupts = <0 40 4>; 610 + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 685 611 clocks = <&ahb_gates 3>; 686 612 phys = <&usbphy 2>; 687 613 phy-names = "usb"; ··· 691 617 ohci1: usb@01c1c400 { 692 618 compatible = "allwinner,sun7i-a20-ohci", "generic-ohci"; 693 619 reg = <0x01c1c400 0x100>; 694 - interrupts = <0 65 4>; 620 + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 695 621 clocks = <&usb_clk 7>, <&ahb_gates 4>; 696 622 phys = <&usbphy 2>; 697 623 phy-names = "usb"; ··· 701 627 spi3: spi@01c1f000 { 702 628 compatible = "allwinner,sun4i-a10-spi"; 703 629 reg = <0x01c1f000 0x1000>; 704 - interrupts = <0 50 4>; 630 + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 705 631 clocks = <&ahb_gates 23>, <&spi3_clk>; 706 632 clock-names = "ahb", "mod"; 707 - dmas = <&dma 1 31>, <&dma 1 30>; 633 + dmas = <&dma SUN4I_DMA_DEDICATED 31>, 634 + <&dma SUN4I_DMA_DEDICATED 30>; 708 635 dma-names = "rx", "tx"; 709 636 status = "disabled"; 710 637 #address-cells = <1>; ··· 715 640 pio: pinctrl@01c20800 { 716 641 compatible = "allwinner,sun7i-a20-pinctrl"; 717 642 reg = <0x01c20800 0x400>; 718 - interrupts = <0 28 4>; 643 + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; 719 644 clocks = <&apb0_gates 5>; 720 645 gpio-controller; 721 646 interrupt-controller; ··· 726 651 pwm0_pins_a: pwm0@0 { 727 652 allwinner,pins = "PB2"; 728 653 allwinner,function = "pwm"; 729 - allwinner,drive = <0>; 730 - allwinner,pull = <0>; 654 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 655 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 731 656 }; 732 657 733 658 pwm1_pins_a: pwm1@0 { 734 659 allwinner,pins = "PI3"; 735 660 allwinner,function = "pwm"; 736 - allwinner,drive = <0>; 737 - allwinner,pull = <0>; 661 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 662 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 738 663 }; 739 664 740 665 uart0_pins_a: uart0@0 { 741 666 allwinner,pins = "PB22", "PB23"; 742 667 allwinner,function = "uart0"; 743 - allwinner,drive = <0>; 744 - allwinner,pull = <0>; 668 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 669 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 745 670 }; 746 671 747 672 uart2_pins_a: uart2@0 { 748 673 allwinner,pins = "PI16", "PI17", "PI18", "PI19"; 749 674 allwinner,function = "uart2"; 750 - allwinner,drive = <0>; 751 - allwinner,pull = <0>; 675 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 676 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 752 677 }; 753 678 754 679 uart3_pins_a: uart3@0 { 755 680 allwinner,pins = "PG6", "PG7", "PG8", "PG9"; 756 681 allwinner,function = "uart3"; 757 - allwinner,drive = <0>; 758 - allwinner,pull = <0>; 682 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 683 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 759 684 }; 760 685 761 686 uart3_pins_b: uart3@1 { 762 687 allwinner,pins = "PH0", "PH1"; 763 688 allwinner,function = "uart3"; 764 - allwinner,drive = <0>; 765 - allwinner,pull = <0>; 689 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 690 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 766 691 }; 767 692 768 693 uart4_pins_a: uart4@0 { 769 694 allwinner,pins = "PG10", "PG11"; 770 695 allwinner,function = "uart4"; 771 - allwinner,drive = <0>; 772 - allwinner,pull = <0>; 696 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 697 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 773 698 }; 774 699 775 700 uart5_pins_a: uart5@0 { 776 701 allwinner,pins = "PI10", "PI11"; 777 702 allwinner,function = "uart5"; 778 - allwinner,drive = <0>; 779 - allwinner,pull = <0>; 703 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 704 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 780 705 }; 781 706 782 707 uart6_pins_a: uart6@0 { 783 708 allwinner,pins = "PI12", "PI13"; 784 709 allwinner,function = "uart6"; 785 - allwinner,drive = <0>; 786 - allwinner,pull = <0>; 710 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 711 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 787 712 }; 788 713 789 714 uart7_pins_a: uart7@0 { 790 715 allwinner,pins = "PI20", "PI21"; 791 716 allwinner,function = "uart7"; 792 - allwinner,drive = <0>; 793 - allwinner,pull = <0>; 717 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 718 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 794 719 }; 795 720 796 721 i2c0_pins_a: i2c0@0 { 797 722 allwinner,pins = "PB0", "PB1"; 798 723 allwinner,function = "i2c0"; 799 - allwinner,drive = <0>; 800 - allwinner,pull = <0>; 724 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 725 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 801 726 }; 802 727 803 728 i2c1_pins_a: i2c1@0 { 804 729 allwinner,pins = "PB18", "PB19"; 805 730 allwinner,function = "i2c1"; 806 - allwinner,drive = <0>; 807 - allwinner,pull = <0>; 731 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 732 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 808 733 }; 809 734 810 735 i2c2_pins_a: i2c2@0 { 811 736 allwinner,pins = "PB20", "PB21"; 812 737 allwinner,function = "i2c2"; 813 - allwinner,drive = <0>; 814 - allwinner,pull = <0>; 738 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 739 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 815 740 }; 816 741 817 742 i2c3_pins_a: i2c3@0 { 818 743 allwinner,pins = "PI0", "PI1"; 819 744 allwinner,function = "i2c3"; 820 - allwinner,drive = <0>; 821 - allwinner,pull = <0>; 745 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 746 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 822 747 }; 823 748 824 749 emac_pins_a: emac0@0 { ··· 828 753 "PA11", "PA12", "PA13", "PA14", 829 754 "PA15", "PA16"; 830 755 allwinner,function = "emac"; 831 - allwinner,drive = <0>; 832 - allwinner,pull = <0>; 756 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 757 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 833 758 }; 834 759 835 760 clk_out_a_pins_a: clk_out_a@0 { 836 761 allwinner,pins = "PI12"; 837 762 allwinner,function = "clk_out_a"; 838 - allwinner,drive = <0>; 839 - allwinner,pull = <0>; 763 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 764 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 840 765 }; 841 766 842 767 clk_out_b_pins_a: clk_out_b@0 { 843 768 allwinner,pins = "PI13"; 844 769 allwinner,function = "clk_out_b"; 845 - allwinner,drive = <0>; 846 - allwinner,pull = <0>; 770 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 771 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 847 772 }; 848 773 849 774 gmac_pins_mii_a: gmac_mii@0 { ··· 853 778 "PA11", "PA12", "PA13", "PA14", 854 779 "PA15", "PA16"; 855 780 allwinner,function = "gmac"; 856 - allwinner,drive = <0>; 857 - allwinner,pull = <0>; 781 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 782 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 858 783 }; 859 784 860 785 gmac_pins_rgmii_a: gmac_rgmii@0 { ··· 868 793 * data lines in RGMII mode use DDR mode 869 794 * and need a higher signal drive strength 870 795 */ 871 - allwinner,drive = <3>; 872 - allwinner,pull = <0>; 796 + allwinner,drive = <SUN4I_PINCTRL_40_MA>; 797 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 873 798 }; 874 799 875 800 spi0_pins_a: spi0@0 { 876 801 allwinner,pins = "PI10", "PI11", "PI12", "PI13", "PI14"; 877 802 allwinner,function = "spi0"; 878 - allwinner,drive = <0>; 879 - allwinner,pull = <0>; 803 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 804 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 880 805 }; 881 806 882 807 spi1_pins_a: spi1@0 { 883 808 allwinner,pins = "PI16", "PI17", "PI18", "PI19"; 884 809 allwinner,function = "spi1"; 885 - allwinner,drive = <0>; 886 - allwinner,pull = <0>; 810 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 811 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 887 812 }; 888 813 889 814 spi2_pins_a: spi2@0 { 890 815 allwinner,pins = "PC19", "PC20", "PC21", "PC22"; 891 816 allwinner,function = "spi2"; 892 - allwinner,drive = <0>; 893 - allwinner,pull = <0>; 817 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 818 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 894 819 }; 895 820 896 821 spi2_pins_b: spi2@1 { 897 822 allwinner,pins = "PB14", "PB15", "PB16", "PB17"; 898 823 allwinner,function = "spi2"; 899 - allwinner,drive = <0>; 900 - allwinner,pull = <0>; 824 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 825 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 901 826 }; 902 827 903 828 mmc0_pins_a: mmc0@0 { 904 829 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; 905 830 allwinner,function = "mmc0"; 906 - allwinner,drive = <2>; 907 - allwinner,pull = <0>; 831 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 832 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 908 833 }; 909 834 910 835 mmc0_cd_pin_reference_design: mmc0_cd_pin@0 { 911 836 allwinner,pins = "PH1"; 912 837 allwinner,function = "gpio_in"; 913 - allwinner,drive = <0>; 914 - allwinner,pull = <1>; 838 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 839 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 915 840 }; 916 841 917 842 mmc2_pins_a: mmc2@0 { 918 843 allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11"; 919 844 allwinner,function = "mmc2"; 920 - allwinner,drive = <2>; 921 - allwinner,pull = <1>; 845 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 846 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 922 847 }; 923 848 924 849 mmc3_pins_a: mmc3@0 { 925 850 allwinner,pins = "PI4","PI5","PI6","PI7","PI8","PI9"; 926 851 allwinner,function = "mmc3"; 927 - allwinner,drive = <2>; 928 - allwinner,pull = <0>; 852 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 853 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 929 854 }; 930 855 931 856 ir0_pins_a: ir0@0 { 932 857 allwinner,pins = "PB3","PB4"; 933 858 allwinner,function = "ir0"; 934 - allwinner,drive = <0>; 935 - allwinner,pull = <0>; 859 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 860 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 936 861 }; 937 862 938 863 ir1_pins_a: ir1@0 { 939 864 allwinner,pins = "PB22","PB23"; 940 865 allwinner,function = "ir1"; 941 - allwinner,drive = <0>; 942 - allwinner,pull = <0>; 866 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 867 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 868 + }; 869 + 870 + ps20_pins_a: ps20@0 { 871 + allwinner,pins = "PI20", "PI21"; 872 + allwinner,function = "ps2"; 873 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 874 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 875 + }; 876 + 877 + ps21_pins_a: ps21@0 { 878 + allwinner,pins = "PH12", "PH13"; 879 + allwinner,function = "ps2"; 880 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 881 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 943 882 }; 944 883 }; 945 884 946 885 timer@01c20c00 { 947 886 compatible = "allwinner,sun4i-a10-timer"; 948 887 reg = <0x01c20c00 0x90>; 949 - interrupts = <0 22 4>, 950 - <0 23 4>, 951 - <0 24 4>, 952 - <0 25 4>, 953 - <0 67 4>, 954 - <0 68 4>; 888 + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>, 889 + <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>, 890 + <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>, 891 + <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>, 892 + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, 893 + <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; 955 894 clocks = <&osc24M>; 956 895 }; 957 896 ··· 977 888 rtc: rtc@01c20d00 { 978 889 compatible = "allwinner,sun7i-a20-rtc"; 979 890 reg = <0x01c20d00 0x20>; 980 - interrupts = <0 24 4>; 891 + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; 981 892 }; 982 893 983 894 pwm: pwm@01c20e00 { ··· 992 903 compatible = "allwinner,sun4i-a10-ir"; 993 904 clocks = <&apb0_gates 6>, <&ir0_clk>; 994 905 clock-names = "apb", "ir"; 995 - interrupts = <0 5 4>; 906 + interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; 996 907 reg = <0x01c21800 0x40>; 997 908 status = "disabled"; 998 909 }; ··· 1001 912 compatible = "allwinner,sun4i-a10-ir"; 1002 913 clocks = <&apb0_gates 7>, <&ir1_clk>; 1003 914 clock-names = "apb", "ir"; 1004 - interrupts = <0 6 4>; 915 + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 1005 916 reg = <0x01c21c00 0x40>; 917 + status = "disabled"; 918 + }; 919 + 920 + lradc: lradc@01c22800 { 921 + compatible = "allwinner,sun4i-a10-lradc-keys"; 922 + reg = <0x01c22800 0x100>; 923 + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 1006 924 status = "disabled"; 1007 925 }; 1008 926 ··· 1021 925 rtp: rtp@01c25000 { 1022 926 compatible = "allwinner,sun4i-a10-ts"; 1023 927 reg = <0x01c25000 0x100>; 1024 - interrupts = <0 29 4>; 928 + interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; 929 + #thermal-sensor-cells = <0>; 1025 930 }; 1026 931 1027 932 uart0: serial@01c28000 { 1028 933 compatible = "snps,dw-apb-uart"; 1029 934 reg = <0x01c28000 0x400>; 1030 - interrupts = <0 1 4>; 935 + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 1031 936 reg-shift = <2>; 1032 937 reg-io-width = <4>; 1033 938 clocks = <&apb1_gates 16>; ··· 1038 941 uart1: serial@01c28400 { 1039 942 compatible = "snps,dw-apb-uart"; 1040 943 reg = <0x01c28400 0x400>; 1041 - interrupts = <0 2 4>; 944 + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 1042 945 reg-shift = <2>; 1043 946 reg-io-width = <4>; 1044 947 clocks = <&apb1_gates 17>; ··· 1048 951 uart2: serial@01c28800 { 1049 952 compatible = "snps,dw-apb-uart"; 1050 953 reg = <0x01c28800 0x400>; 1051 - interrupts = <0 3 4>; 954 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 1052 955 reg-shift = <2>; 1053 956 reg-io-width = <4>; 1054 957 clocks = <&apb1_gates 18>; ··· 1058 961 uart3: serial@01c28c00 { 1059 962 compatible = "snps,dw-apb-uart"; 1060 963 reg = <0x01c28c00 0x400>; 1061 - interrupts = <0 4 4>; 964 + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 1062 965 reg-shift = <2>; 1063 966 reg-io-width = <4>; 1064 967 clocks = <&apb1_gates 19>; ··· 1068 971 uart4: serial@01c29000 { 1069 972 compatible = "snps,dw-apb-uart"; 1070 973 reg = <0x01c29000 0x400>; 1071 - interrupts = <0 17 4>; 974 + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 1072 975 reg-shift = <2>; 1073 976 reg-io-width = <4>; 1074 977 clocks = <&apb1_gates 20>; ··· 1078 981 uart5: serial@01c29400 { 1079 982 compatible = "snps,dw-apb-uart"; 1080 983 reg = <0x01c29400 0x400>; 1081 - interrupts = <0 18 4>; 984 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; 1082 985 reg-shift = <2>; 1083 986 reg-io-width = <4>; 1084 987 clocks = <&apb1_gates 21>; ··· 1088 991 uart6: serial@01c29800 { 1089 992 compatible = "snps,dw-apb-uart"; 1090 993 reg = <0x01c29800 0x400>; 1091 - interrupts = <0 19 4>; 994 + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 1092 995 reg-shift = <2>; 1093 996 reg-io-width = <4>; 1094 997 clocks = <&apb1_gates 22>; ··· 1098 1001 uart7: serial@01c29c00 { 1099 1002 compatible = "snps,dw-apb-uart"; 1100 1003 reg = <0x01c29c00 0x400>; 1101 - interrupts = <0 20 4>; 1004 + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; 1102 1005 reg-shift = <2>; 1103 1006 reg-io-width = <4>; 1104 1007 clocks = <&apb1_gates 23>; ··· 1108 1011 i2c0: i2c@01c2ac00 { 1109 1012 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c"; 1110 1013 reg = <0x01c2ac00 0x400>; 1111 - interrupts = <0 7 4>; 1014 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 1112 1015 clocks = <&apb1_gates 0>; 1113 1016 status = "disabled"; 1114 1017 #address-cells = <1>; ··· 1118 1021 i2c1: i2c@01c2b000 { 1119 1022 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c"; 1120 1023 reg = <0x01c2b000 0x400>; 1121 - interrupts = <0 8 4>; 1024 + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 1122 1025 clocks = <&apb1_gates 1>; 1123 1026 status = "disabled"; 1124 1027 #address-cells = <1>; ··· 1128 1031 i2c2: i2c@01c2b400 { 1129 1032 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c"; 1130 1033 reg = <0x01c2b400 0x400>; 1131 - interrupts = <0 9 4>; 1034 + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; 1132 1035 clocks = <&apb1_gates 2>; 1133 1036 status = "disabled"; 1134 1037 #address-cells = <1>; ··· 1138 1041 i2c3: i2c@01c2b800 { 1139 1042 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c"; 1140 1043 reg = <0x01c2b800 0x400>; 1141 - interrupts = <0 88 4>; 1044 + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>; 1142 1045 clocks = <&apb1_gates 3>; 1143 1046 status = "disabled"; 1144 1047 #address-cells = <1>; ··· 1148 1051 i2c4: i2c@01c2c000 { 1149 1052 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c"; 1150 1053 reg = <0x01c2c000 0x400>; 1151 - interrupts = <0 89 4>; 1054 + interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; 1152 1055 clocks = <&apb1_gates 15>; 1153 1056 status = "disabled"; 1154 1057 #address-cells = <1>; ··· 1158 1061 gmac: ethernet@01c50000 { 1159 1062 compatible = "allwinner,sun7i-a20-gmac"; 1160 1063 reg = <0x01c50000 0x10000>; 1161 - interrupts = <0 85 4>; 1064 + interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; 1162 1065 interrupt-names = "macirq"; 1163 1066 clocks = <&ahb_gates 49>, <&gmac_tx_clk>; 1164 1067 clock-names = "stmmaceth", "allwinner_gmac_tx"; ··· 1173 1076 hstimer@01c60000 { 1174 1077 compatible = "allwinner,sun7i-a20-hstimer"; 1175 1078 reg = <0x01c60000 0x1000>; 1176 - interrupts = <0 81 4>, 1177 - <0 82 4>, 1178 - <0 83 4>, 1179 - <0 84 4>; 1079 + interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>, 1080 + <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>, 1081 + <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>, 1082 + <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; 1180 1083 clocks = <&ahb_gates 28>; 1181 1084 }; 1182 1085 ··· 1188 1091 <0x01c86000 0x2000>; 1189 1092 interrupt-controller; 1190 1093 #interrupt-cells = <3>; 1191 - interrupts = <1 9 0xf04>; 1094 + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 1095 + }; 1096 + 1097 + ps20: ps2@01c2a000 { 1098 + compatible = "allwinner,sun4i-a10-ps2"; 1099 + reg = <0x01c2a000 0x400>; 1100 + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 1101 + clocks = <&apb1_gates 6>; 1102 + status = "disabled"; 1103 + }; 1104 + 1105 + ps21: ps2@01c2a400 { 1106 + compatible = "allwinner,sun4i-a10-ps2"; 1107 + reg = <0x01c2a400 0x400>; 1108 + interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; 1109 + clocks = <&apb1_gates 7>; 1110 + status = "disabled"; 1192 1111 }; 1193 1112 }; 1194 1113 };
+59
arch/arm/boot/dts/sun8i-a23-ippo-q8h-v1.2.dts
··· 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 + * 19 + * You should have received a copy of the GNU General Public 20 + * License along with this file; if not, write to the Free 21 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 + * MA 02110-1301 USA 23 + * 24 + * Or, alternatively, 25 + * 26 + * b) Permission is hereby granted, free of charge, to any person 27 + * obtaining a copy of this software and associated documentation 28 + * files (the "Software"), to deal in the Software without 29 + * restriction, including without limitation the rights to use, 30 + * copy, modify, merge, publish, distribute, sublicense, and/or 31 + * sell copies of the Software, and to permit persons to whom the 32 + * Software is furnished to do so, subject to the following 33 + * conditions: 34 + * 35 + * The above copyright notice and this permission notice shall be 36 + * included in all copies or substantial portions of the Software. 37 + * 38 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 40 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 41 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 42 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 43 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 44 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 45 + * OTHER DEALINGS IN THE SOFTWARE. 46 + */ 47 + 48 + /* 49 + * The Ippo Q8H v1.2 is almost identical to the v5, still it needs a separate 50 + * dtb file since some gpio-s surrounding the wlan/bluetooth are different, 51 + * and it uses different camera sensors. 52 + */ 53 + 54 + #include "sun8i-a23-ippo-q8h-v5.dts" 55 + 56 + / { 57 + model = "Ippo Q8H Dual Core Tablet (v1.2)"; 58 + compatible = "ippo,q8h-v1.2", "allwinner,sun8i-a23"; 59 + };
+32 -5
arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun8i-a23.dtsi" 52 - /include/ "sunxi-common-regulators.dtsi" 51 + #include "sun8i-a23.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/input/input.h> 56 + #include <dt-bindings/pinctrl/sun4i-a10.h> 53 57 54 58 / { 55 59 model = "Ippo Q8H Dual Core Tablet (v5)"; 56 60 compatible = "ippo,q8h-v5", "allwinner,sun8i-a23"; 61 + 62 + aliases { 63 + serial0 = &r_uart; 64 + }; 57 65 58 66 chosen { 59 67 bootargs = "earlyprintk console=ttyS0,115200"; ··· 73 65 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>; 74 66 vmmc-supply = <&reg_vcc3v0>; 75 67 bus-width = <4>; 76 - cd-gpios = <&pio 1 4 0>; /* PB4 */ 68 + cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ 77 69 cd-inverted; 78 70 status = "okay"; 79 71 }; ··· 82 74 mmc0_cd_pin_q8h: mmc0_cd_pin@0 { 83 75 allwinner,pins = "PB4"; 84 76 allwinner,function = "gpio_in"; 85 - allwinner,drive = <0>; 86 - allwinner,pull = <1>; 77 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 78 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 79 + }; 80 + }; 81 + 82 + lradc: lradc@01c22800 { 83 + vref-supply = <&reg_vcc3v0>; 84 + status = "okay"; 85 + 86 + button@200 { 87 + label = "Volume Up"; 88 + linux,code = <KEY_VOLUMEUP>; 89 + channel = <0>; 90 + voltage = <200000>; 91 + }; 92 + 93 + button@400 { 94 + label = "Volume Down"; 95 + linux,code = <KEY_VOLUMEDOWN>; 96 + channel = <0>; 97 + voltage = <400000>; 87 98 }; 88 99 }; 89 100
+63 -37
arch/arm/boot/dts/sun8i-a23.dtsi
··· 47 47 * OTHER DEALINGS IN THE SOFTWARE. 48 48 */ 49 49 50 - /include/ "skeleton.dtsi" 50 + #include "skeleton.dtsi" 51 + 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 55 52 56 / { 53 57 interrupt-parent = <&gic>; ··· 63 59 serial3 = &uart3; 64 60 serial4 = &uart4; 65 61 serial5 = &r_uart; 62 + }; 63 + 64 + chosen { 65 + #address-cells = <1>; 66 + #size-cells = <1>; 67 + ranges; 68 + 69 + framebuffer@0 { 70 + compatible = "allwinner,simple-framebuffer", 71 + "simple-framebuffer"; 72 + allwinner,pipeline = "de_be0-lcd0"; 73 + clocks = <&pll6 0>; 74 + status = "disabled"; 75 + }; 66 76 }; 67 77 68 78 cpus { ··· 260 242 dma: dma-controller@01c02000 { 261 243 compatible = "allwinner,sun8i-a23-dma"; 262 244 reg = <0x01c02000 0x1000>; 263 - interrupts = <0 50 4>; 245 + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 264 246 clocks = <&ahb1_gates 6>; 265 247 resets = <&ahb1_rst 6>; 266 248 #dma-cells = <1>; ··· 273 255 clock-names = "ahb", "mmc"; 274 256 resets = <&ahb1_rst 8>; 275 257 reset-names = "ahb"; 276 - interrupts = <0 60 4>; 258 + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 277 259 status = "disabled"; 278 260 }; 279 261 ··· 284 266 clock-names = "ahb", "mmc"; 285 267 resets = <&ahb1_rst 9>; 286 268 reset-names = "ahb"; 287 - interrupts = <0 61 4>; 269 + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 288 270 status = "disabled"; 289 271 }; 290 272 ··· 295 277 clock-names = "ahb", "mmc"; 296 278 resets = <&ahb1_rst 10>; 297 279 reset-names = "ahb"; 298 - interrupts = <0 62 4>; 280 + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 299 281 status = "disabled"; 300 282 }; 301 283 302 284 pio: pinctrl@01c20800 { 303 285 compatible = "allwinner,sun8i-a23-pinctrl"; 304 286 reg = <0x01c20800 0x400>; 305 - interrupts = <0 11 4>, 306 - <0 15 4>, 307 - <0 17 4>; 287 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 288 + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 289 + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 308 290 clocks = <&apb1_gates 5>; 309 291 gpio-controller; 310 292 interrupt-controller; ··· 315 297 uart0_pins_a: uart0@0 { 316 298 allwinner,pins = "PF2", "PF4"; 317 299 allwinner,function = "uart0"; 318 - allwinner,drive = <0>; 319 - allwinner,pull = <0>; 300 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 301 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 320 302 }; 321 303 322 304 mmc0_pins_a: mmc0@0 { 323 305 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; 324 306 allwinner,function = "mmc0"; 325 - allwinner,drive = <2>; 326 - allwinner,pull = <0>; 307 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 308 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 327 309 }; 328 310 329 311 mmc1_pins_a: mmc1@0 { 330 312 allwinner,pins = "PG0","PG1","PG2","PG3","PG4","PG5"; 331 313 allwinner,function = "mmc1"; 332 - allwinner,drive = <2>; 333 - allwinner,pull = <0>; 314 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 315 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 334 316 }; 335 317 336 318 i2c0_pins_a: i2c0@0 { 337 319 allwinner,pins = "PH2", "PH3"; 338 320 allwinner,function = "i2c0"; 339 - allwinner,drive = <0>; 340 - allwinner,pull = <0>; 321 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 322 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 341 323 }; 342 324 343 325 i2c1_pins_a: i2c1@0 { 344 326 allwinner,pins = "PH4", "PH5"; 345 327 allwinner,function = "i2c1"; 346 - allwinner,drive = <0>; 347 - allwinner,pull = <0>; 328 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 329 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 348 330 }; 349 331 350 332 i2c2_pins_a: i2c2@0 { 351 333 allwinner,pins = "PE12", "PE13"; 352 334 allwinner,function = "i2c2"; 353 - allwinner,drive = <0>; 354 - allwinner,pull = <0>; 335 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 336 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 355 337 }; 356 338 }; 357 339 ··· 376 358 timer@01c20c00 { 377 359 compatible = "allwinner,sun4i-a10-timer"; 378 360 reg = <0x01c20c00 0xa0>; 379 - interrupts = <0 18 4>, 380 - <0 19 4>; 361 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 362 + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 381 363 clocks = <&osc24M>; 382 364 }; 383 365 384 366 wdt0: watchdog@01c20ca0 { 385 367 compatible = "allwinner,sun6i-a31-wdt"; 386 368 reg = <0x01c20ca0 0x20>; 387 - interrupts = <0 25 4>; 369 + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 370 + }; 371 + 372 + lradc: lradc@01c22800 { 373 + compatible = "allwinner,sun4i-a10-lradc-keys"; 374 + reg = <0x01c22800 0x100>; 375 + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 376 + status = "disabled"; 388 377 }; 389 378 390 379 uart0: serial@01c28000 { 391 380 compatible = "snps,dw-apb-uart"; 392 381 reg = <0x01c28000 0x400>; 393 - interrupts = <0 0 4>; 382 + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 394 383 reg-shift = <2>; 395 384 reg-io-width = <4>; 396 385 clocks = <&apb2_gates 16>; ··· 410 385 uart1: serial@01c28400 { 411 386 compatible = "snps,dw-apb-uart"; 412 387 reg = <0x01c28400 0x400>; 413 - interrupts = <0 1 4>; 388 + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 414 389 reg-shift = <2>; 415 390 reg-io-width = <4>; 416 391 clocks = <&apb2_gates 17>; ··· 423 398 uart2: serial@01c28800 { 424 399 compatible = "snps,dw-apb-uart"; 425 400 reg = <0x01c28800 0x400>; 426 - interrupts = <0 2 4>; 401 + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 427 402 reg-shift = <2>; 428 403 reg-io-width = <4>; 429 404 clocks = <&apb2_gates 18>; ··· 436 411 uart3: serial@01c28c00 { 437 412 compatible = "snps,dw-apb-uart"; 438 413 reg = <0x01c28c00 0x400>; 439 - interrupts = <0 3 4>; 414 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 440 415 reg-shift = <2>; 441 416 reg-io-width = <4>; 442 417 clocks = <&apb2_gates 19>; ··· 449 424 uart4: serial@01c29000 { 450 425 compatible = "snps,dw-apb-uart"; 451 426 reg = <0x01c29000 0x400>; 452 - interrupts = <0 4 4>; 427 + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 453 428 reg-shift = <2>; 454 429 reg-io-width = <4>; 455 430 clocks = <&apb2_gates 20>; ··· 462 437 i2c0: i2c@01c2ac00 { 463 438 compatible = "allwinner,sun6i-a31-i2c"; 464 439 reg = <0x01c2ac00 0x400>; 465 - interrupts = <0 6 4>; 440 + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 466 441 clocks = <&apb2_gates 0>; 467 442 resets = <&apb2_rst 0>; 468 443 status = "disabled"; ··· 473 448 i2c1: i2c@01c2b000 { 474 449 compatible = "allwinner,sun6i-a31-i2c"; 475 450 reg = <0x01c2b000 0x400>; 476 - interrupts = <0 7 4>; 451 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 477 452 clocks = <&apb2_gates 1>; 478 453 resets = <&apb2_rst 1>; 479 454 status = "disabled"; ··· 484 459 i2c2: i2c@01c2b400 { 485 460 compatible = "allwinner,sun6i-a31-i2c"; 486 461 reg = <0x01c2b400 0x400>; 487 - interrupts = <0 8 4>; 462 + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 488 463 clocks = <&apb2_gates 2>; 489 464 resets = <&apb2_rst 2>; 490 465 status = "disabled"; ··· 500 475 <0x01c86000 0x2000>; 501 476 interrupt-controller; 502 477 #interrupt-cells = <3>; 503 - interrupts = <1 9 0xf04>; 478 + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 504 479 }; 505 480 506 481 rtc: rtc@01f00000 { 507 482 compatible = "allwinner,sun6i-a31-rtc"; 508 483 reg = <0x01f00000 0x54>; 509 - interrupts = <0 40 4>, <0 41 4>; 484 + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 485 + <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; 510 486 }; 511 487 512 488 prcm@01f01400 { ··· 557 531 r_uart: serial@01f02800 { 558 532 compatible = "snps,dw-apb-uart"; 559 533 reg = <0x01f02800 0x400>; 560 - interrupts = <0 38 4>; 534 + interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; 561 535 reg-shift = <2>; 562 536 reg-io-width = <4>; 563 537 clocks = <&apb0_gates 4>; ··· 568 542 r_pio: pinctrl@01f02c00 { 569 543 compatible = "allwinner,sun8i-a23-r-pinctrl"; 570 544 reg = <0x01f02c00 0x400>; 571 - interrupts = <0 45 4>; 545 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; 572 546 clocks = <&apb0_gates 0>; 573 547 resets = <&apb0_rst 0>; 574 548 gpio-controller; ··· 580 554 r_uart_pins_a: r_uart@0 { 581 555 allwinner,pins = "PL2", "PL3"; 582 556 allwinner,function = "s_uart"; 583 - allwinner,drive = <0>; 584 - allwinner,pull = <0>; 557 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 558 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 585 559 }; 586 560 }; 587 561 };
+70 -42
arch/arm/boot/dts/sun9i-a80-optimus.dts
··· 48 48 */ 49 49 50 50 /dts-v1/; 51 - /include/ "sun9i-a80.dtsi" 51 + #include "sun9i-a80.dtsi" 52 + #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 55 + #include <dt-bindings/pinctrl/sun4i-a10.h> 52 56 53 57 / { 54 58 model = "Merrii A80 Optimus Board"; ··· 60 56 61 57 chosen { 62 58 bootargs = "earlyprintk console=ttyS0,115200"; 63 - }; 64 - 65 - soc { 66 - pio: pinctrl@06000800 { 67 - i2c3_pins_a: i2c3@0 { 68 - /* Enable internal pull-up */ 69 - allwinner,pull = <1>; 70 - }; 71 - 72 - led_pins_optimus: led-pins@0 { 73 - allwinner,pins = "PH0", "PH1"; 74 - allwinner,function = "gpio_out"; 75 - allwinner,drive = <0>; 76 - allwinner,pull = <0>; 77 - }; 78 - 79 - uart4_pins_a: uart4@0 { 80 - /* Enable internal pull-up */ 81 - allwinner,pull = <1>; 82 - }; 83 - }; 84 - 85 - uart0: serial@07000000 { 86 - pinctrl-names = "default"; 87 - pinctrl-0 = <&uart0_pins_a>; 88 - status = "okay"; 89 - }; 90 - 91 - uart4: serial@07001000 { 92 - pinctrl-names = "default"; 93 - pinctrl-0 = <&uart4_pins_a>; 94 - status = "okay"; 95 - }; 96 - 97 - i2c3: i2c@07003400 { 98 - pinctrl-names = "default"; 99 - pinctrl-0 = <&i2c3_pins_a>; 100 - status = "okay"; 101 - }; 102 59 }; 103 60 104 61 leds { ··· 71 106 72 107 led2 { 73 108 label = "optimus:led2:usr"; 74 - gpios = <&pio 7 1 0>; 109 + gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; 75 110 }; 76 111 77 112 /* led3 is on PM15, in R_PIO */ 78 113 79 114 led4 { 80 115 label = "optimus:led4:usr"; 81 - gpios = <&pio 7 0 0>; 116 + gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; 82 117 }; 83 118 }; 119 + }; 120 + 121 + &i2c3 { 122 + pinctrl-names = "default"; 123 + pinctrl-0 = <&i2c3_pins_a>; 124 + status = "okay"; 125 + }; 126 + 127 + &i2c3_pins_a { 128 + /* Enable internal pull-up */ 129 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 130 + }; 131 + 132 + &pio { 133 + led_pins_optimus: led-pins@0 { 134 + allwinner,pins = "PH0", "PH1"; 135 + allwinner,function = "gpio_out"; 136 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 137 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 138 + }; 139 + 140 + mmc0_cd_pin_optimus: mmc0_cd_pin@0 { 141 + allwinner,pins = "PH18"; 142 + allwinner,function = "gpio_in"; 143 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 144 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 145 + }; 146 + }; 147 + 148 + &mmc0 { 149 + pinctrl-names = "default"; 150 + pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_optimus>; 151 + vmmc-supply = <&reg_vcc3v0>; 152 + bus-width = <4>; 153 + cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH8 */ 154 + cd-inverted; 155 + status = "okay"; 156 + }; 157 + 158 + &mmc2 { 159 + pinctrl-names = "default"; 160 + pinctrl-0 = <&mmc2_8bit_pins>; 161 + vmmc-supply = <&reg_vcc3v0>; 162 + bus-width = <8>; 163 + non-removable; 164 + status = "okay"; 165 + }; 166 + 167 + &uart0 { 168 + pinctrl-names = "default"; 169 + pinctrl-0 = <&uart0_pins_a>; 170 + status = "okay"; 171 + }; 172 + 173 + &uart4 { 174 + pinctrl-names = "default"; 175 + pinctrl-0 = <&uart4_pins_a>; 176 + status = "okay"; 177 + }; 178 + 179 + &uart4_pins_a { 180 + /* Enable internal pull-up */ 181 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 84 182 };
+160 -32
arch/arm/boot/dts/sun9i-a80.dtsi
··· 47 47 * OTHER DEALINGS IN THE SOFTWARE. 48 48 */ 49 49 50 - /include/ "skeleton64.dtsi" 50 + #include "skeleton64.dtsi" 51 + 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + 54 + #include <dt-bindings/pinctrl/sun4i-a10.h> 51 55 52 56 / { 53 57 interrupt-parent = <&gic>; ··· 219 215 clock-output-names = "cci400"; 220 216 }; 221 217 218 + mmc0_clk: clk@06000410 { 219 + #clock-cells = <1>; 220 + compatible = "allwinner,sun9i-a80-mmc-clk"; 221 + reg = <0x06000410 0x4>; 222 + clocks = <&osc24M>, <&pll4>; 223 + clock-output-names = "mmc0", "mmc0_output", 224 + "mmc0_sample"; 225 + }; 226 + 227 + mmc1_clk: clk@06000414 { 228 + #clock-cells = <1>; 229 + compatible = "allwinner,sun9i-a80-mmc-clk"; 230 + reg = <0x06000414 0x4>; 231 + clocks = <&osc24M>, <&pll4>; 232 + clock-output-names = "mmc1", "mmc1_output", 233 + "mmc1_sample"; 234 + }; 235 + 236 + mmc2_clk: clk@06000418 { 237 + #clock-cells = <1>; 238 + compatible = "allwinner,sun9i-a80-mmc-clk"; 239 + reg = <0x06000418 0x4>; 240 + clocks = <&osc24M>, <&pll4>; 241 + clock-output-names = "mmc2", "mmc2_output", 242 + "mmc2_sample"; 243 + }; 244 + 245 + mmc3_clk: clk@0600041c { 246 + #clock-cells = <1>; 247 + compatible = "allwinner,sun9i-a80-mmc-clk"; 248 + reg = <0x0600041c 0x4>; 249 + clocks = <&osc24M>, <&pll4>; 250 + clock-output-names = "mmc3", "mmc3_output", 251 + "mmc3_sample"; 252 + }; 253 + 222 254 ahb0_gates: clk@06000580 { 223 255 #clock-cells = <1>; 224 256 compatible = "allwinner,sun9i-a80-ahb0-gates-clk"; 225 257 reg = <0x06000580 0x4>; 226 258 clocks = <&ahb0>; 259 + clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>, 260 + <14>, <15>, <16>, <18>, <20>, <21>, 261 + <22>, <23>; 227 262 clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu", 228 263 "ahb0_ss", "ahb0_sd", "ahb0_nand1", 229 264 "ahb0_nand0", "ahb0_sdram", ··· 276 233 compatible = "allwinner,sun9i-a80-ahb1-gates-clk"; 277 234 reg = <0x06000584 0x4>; 278 235 clocks = <&ahb1>; 236 + clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>; 279 237 clock-output-names = "ahb1_usbotg", "ahb1_usbhci", 280 238 "ahb1_gmac", "ahb1_msgbox", 281 239 "ahb1_spinlock", "ahb1_hstimer", ··· 288 244 compatible = "allwinner,sun9i-a80-ahb2-gates-clk"; 289 245 reg = <0x06000588 0x4>; 290 246 clocks = <&ahb2>; 247 + clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>, 248 + <11>; 291 249 clock-output-names = "ahb2_lcd0", "ahb2_lcd1", 292 250 "ahb2_edp", "ahb2_csi", "ahb2_hdmi", 293 251 "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi"; ··· 300 254 compatible = "allwinner,sun9i-a80-apb0-gates-clk"; 301 255 reg = <0x06000590 0x4>; 302 256 clocks = <&apb0>; 257 + clock-indices = <1>, <5>, <11>, <12>, <13>, <15>, 258 + <17>, <18>, <19>; 303 259 clock-output-names = "apb0_spdif", "apb0_pio", 304 260 "apb0_ac97", "apb0_i2s0", "apb0_i2s1", 305 261 "apb0_lradc", "apb0_gpadc", "apb0_twd", ··· 313 265 compatible = "allwinner,sun9i-a80-apb1-gates-clk"; 314 266 reg = <0x06000594 0x4>; 315 267 clocks = <&apb1>; 268 + clock-indices = <0>, <1>, <2>, <3>, <4>, 269 + <16>, <17>, <18>, <19>, <20>, <21>; 316 270 clock-output-names = "apb1_i2c0", "apb1_i2c1", 317 271 "apb1_i2c2", "apb1_i2c3", "apb1_i2c4", 318 272 "apb1_uart0", "apb1_uart1", ··· 333 283 */ 334 284 ranges = <0 0 0 0x20000000>; 335 285 286 + mmc0: mmc@01c0f000 { 287 + compatible = "allwinner,sun5i-a13-mmc"; 288 + reg = <0x01c0f000 0x1000>; 289 + clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>, 290 + <&mmc0_clk 1>, <&mmc0_clk 2>; 291 + clock-names = "ahb", "mmc", "output", "sample"; 292 + resets = <&mmc_config_clk 0>; 293 + reset-names = "ahb"; 294 + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 295 + status = "disabled"; 296 + }; 297 + 298 + mmc1: mmc@01c10000 { 299 + compatible = "allwinner,sun5i-a13-mmc"; 300 + reg = <0x01c10000 0x1000>; 301 + clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>, 302 + <&mmc1_clk 1>, <&mmc1_clk 2>; 303 + clock-names = "ahb", "mmc", "output", "sample"; 304 + resets = <&mmc_config_clk 1>; 305 + reset-names = "ahb"; 306 + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 307 + status = "disabled"; 308 + }; 309 + 310 + mmc2: mmc@01c11000 { 311 + compatible = "allwinner,sun5i-a13-mmc"; 312 + reg = <0x01c11000 0x1000>; 313 + clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>, 314 + <&mmc2_clk 1>, <&mmc2_clk 2>; 315 + clock-names = "ahb", "mmc", "output", "sample"; 316 + resets = <&mmc_config_clk 2>; 317 + reset-names = "ahb"; 318 + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 319 + status = "disabled"; 320 + }; 321 + 322 + mmc3: mmc@01c12000 { 323 + compatible = "allwinner,sun5i-a13-mmc"; 324 + reg = <0x01c12000 0x1000>; 325 + clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>, 326 + <&mmc3_clk 1>, <&mmc3_clk 2>; 327 + clock-names = "ahb", "mmc", "output", "sample"; 328 + resets = <&mmc_config_clk 3>; 329 + reset-names = "ahb"; 330 + interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; 331 + status = "disabled"; 332 + }; 333 + 334 + mmc_config_clk: clk@01c13000 { 335 + compatible = "allwinner,sun9i-a80-mmc-config-clk"; 336 + reg = <0x01c13000 0x10>; 337 + clocks = <&ahb0_gates 8>; 338 + clock-names = "ahb"; 339 + resets = <&ahb0_resets 8>; 340 + reset-names = "ahb"; 341 + #clock-cells = <1>; 342 + #reset-cells = <1>; 343 + clock-output-names = "mmc0_config", "mmc1_config", 344 + "mmc2_config", "mmc3_config"; 345 + }; 346 + 336 347 gic: interrupt-controller@01c41000 { 337 348 compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; 338 349 reg = <0x01c41000 0x1000>, ··· 402 291 <0x01c46000 0x2000>; 403 292 interrupt-controller; 404 293 #interrupt-cells = <3>; 405 - interrupts = <1 9 0xf04>; 294 + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 406 295 }; 407 296 408 297 ahb0_resets: reset@060005a0 { ··· 438 327 timer@06000c00 { 439 328 compatible = "allwinner,sun4i-a10-timer"; 440 329 reg = <0x06000c00 0xa0>; 441 - interrupts = <0 18 4>, 442 - <0 19 4>, 443 - <0 20 4>, 444 - <0 21 4>, 445 - <0 22 4>, 446 - <0 23 4>; 330 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 331 + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, 332 + <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>, 333 + <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>, 334 + <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>, 335 + <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; 447 336 448 337 clocks = <&osc24M>; 449 338 }; ··· 451 340 pio: pinctrl@06000800 { 452 341 compatible = "allwinner,sun9i-a80-pinctrl"; 453 342 reg = <0x06000800 0x400>; 454 - interrupts = <0 11 4>, 455 - <0 15 4>, 456 - <0 16 4>, 457 - <0 17 4>, 458 - <0 120 4>; 343 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 344 + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 345 + <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>, 346 + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, 347 + <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; 459 348 clocks = <&apb0_gates 5>; 460 349 gpio-controller; 461 350 interrupt-controller; ··· 466 355 i2c3_pins_a: i2c3@0 { 467 356 allwinner,pins = "PG10", "PG11"; 468 357 allwinner,function = "i2c3"; 469 - allwinner,drive = <0>; 470 - allwinner,pull = <0>; 358 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 359 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 360 + }; 361 + 362 + mmc0_pins: mmc0 { 363 + allwinner,pins = "PF0", "PF1" ,"PF2", "PF3", 364 + "PF4", "PF5"; 365 + allwinner,function = "mmc0"; 366 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 367 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 368 + }; 369 + 370 + mmc2_8bit_pins: mmc2_8bit { 371 + allwinner,pins = "PC6", "PC7", "PC8", "PC9", 372 + "PC10", "PC11", "PC12", 373 + "PC13", "PC14", "PC15"; 374 + allwinner,function = "mmc2"; 375 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 376 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 471 377 }; 472 378 473 379 uart0_pins_a: uart0@0 { 474 380 allwinner,pins = "PH12", "PH13"; 475 381 allwinner,function = "uart0"; 476 - allwinner,drive = <0>; 477 - allwinner,pull = <0>; 382 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 383 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 478 384 }; 479 385 480 386 uart4_pins_a: uart4@0 { 481 387 allwinner,pins = "PG12", "PG13", "PG14", "PG15"; 482 388 allwinner,function = "uart4"; 483 - allwinner,drive = <0>; 484 - allwinner,pull = <0>; 389 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 390 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 485 391 }; 486 392 }; 487 393 488 394 uart0: serial@07000000 { 489 395 compatible = "snps,dw-apb-uart"; 490 396 reg = <0x07000000 0x400>; 491 - interrupts = <0 0 4>; 397 + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 492 398 reg-shift = <2>; 493 399 reg-io-width = <4>; 494 400 clocks = <&apb1_gates 16>; ··· 516 388 uart1: serial@07000400 { 517 389 compatible = "snps,dw-apb-uart"; 518 390 reg = <0x07000400 0x400>; 519 - interrupts = <0 1 4>; 391 + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 520 392 reg-shift = <2>; 521 393 reg-io-width = <4>; 522 394 clocks = <&apb1_gates 17>; ··· 527 399 uart2: serial@07000800 { 528 400 compatible = "snps,dw-apb-uart"; 529 401 reg = <0x07000800 0x400>; 530 - interrupts = <0 2 4>; 402 + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 531 403 reg-shift = <2>; 532 404 reg-io-width = <4>; 533 405 clocks = <&apb1_gates 18>; ··· 538 410 uart3: serial@07000c00 { 539 411 compatible = "snps,dw-apb-uart"; 540 412 reg = <0x07000c00 0x400>; 541 - interrupts = <0 3 4>; 413 + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 542 414 reg-shift = <2>; 543 415 reg-io-width = <4>; 544 416 clocks = <&apb1_gates 19>; ··· 549 421 uart4: serial@07001000 { 550 422 compatible = "snps,dw-apb-uart"; 551 423 reg = <0x07001000 0x400>; 552 - interrupts = <0 4 4>; 424 + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 553 425 reg-shift = <2>; 554 426 reg-io-width = <4>; 555 427 clocks = <&apb1_gates 20>; ··· 560 432 uart5: serial@07001400 { 561 433 compatible = "snps,dw-apb-uart"; 562 434 reg = <0x07001400 0x400>; 563 - interrupts = <0 5 4>; 435 + interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; 564 436 reg-shift = <2>; 565 437 reg-io-width = <4>; 566 438 clocks = <&apb1_gates 21>; ··· 571 443 i2c0: i2c@07002800 { 572 444 compatible = "allwinner,sun6i-a31-i2c"; 573 445 reg = <0x07002800 0x400>; 574 - interrupts = <0 6 4>; 446 + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 575 447 clocks = <&apb1_gates 0>; 576 448 resets = <&apb1_resets 0>; 577 449 status = "disabled"; ··· 582 454 i2c1: i2c@07002c00 { 583 455 compatible = "allwinner,sun6i-a31-i2c"; 584 456 reg = <0x07002c00 0x400>; 585 - interrupts = <0 7 4>; 457 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 586 458 clocks = <&apb1_gates 1>; 587 459 resets = <&apb1_resets 1>; 588 460 status = "disabled"; ··· 593 465 i2c2: i2c@07003000 { 594 466 compatible = "allwinner,sun6i-a31-i2c"; 595 467 reg = <0x07003000 0x400>; 596 - interrupts = <0 8 4>; 468 + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 597 469 clocks = <&apb1_gates 2>; 598 470 resets = <&apb1_resets 2>; 599 471 status = "disabled"; ··· 604 476 i2c3: i2c@07003400 { 605 477 compatible = "allwinner,sun6i-a31-i2c"; 606 478 reg = <0x07003400 0x400>; 607 - interrupts = <0 9 4>; 479 + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; 608 480 clocks = <&apb1_gates 3>; 609 481 resets = <&apb1_resets 3>; 610 482 status = "disabled"; ··· 615 487 i2c4: i2c@07003800 { 616 488 compatible = "allwinner,sun6i-a31-i2c"; 617 489 reg = <0x07003800 0x400>; 618 - interrupts = <0 10 4>; 490 + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 619 491 clocks = <&apb1_gates 4>; 620 492 resets = <&apb1_resets 4>; 621 493 status = "disabled"; ··· 626 498 r_wdt: watchdog@08001000 { 627 499 compatible = "allwinner,sun6i-a31-wdt"; 628 500 reg = <0x08001000 0x20>; 629 - interrupts = <0 36 4>; 501 + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 630 502 }; 631 503 632 504 r_uart: serial@08002800 { 633 505 compatible = "snps,dw-apb-uart"; 634 506 reg = <0x08002800 0x400>; 635 - interrupts = <0 38 4>; 507 + interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; 636 508 reg-shift = <2>; 637 509 reg-io-width = <4>; 638 510 clocks = <&osc24M>;
+35 -34
arch/arm/boot/dts/sunxi-common-regulators.dtsi
··· 47 47 * OTHER DEALINGS IN THE SOFTWARE. 48 48 */ 49 49 50 - / { 51 - soc@01c00000 { 52 - pio: pinctrl@01c20800 { 53 - ahci_pwr_pin_a: ahci_pwr_pin@0 { 54 - allwinner,pins = "PB8"; 55 - allwinner,function = "gpio_out"; 56 - allwinner,drive = <0>; 57 - allwinner,pull = <0>; 58 - }; 50 + #include <dt-bindings/gpio/gpio.h> 51 + #include <dt-bindings/pinctrl/sun4i-a10.h> 59 52 60 - usb0_vbus_pin_a: usb0_vbus_pin@0 { 61 - allwinner,pins = "PB9"; 62 - allwinner,function = "gpio_out"; 63 - allwinner,drive = <0>; 64 - allwinner,pull = <0>; 65 - }; 66 - 67 - usb1_vbus_pin_a: usb1_vbus_pin@0 { 68 - allwinner,pins = "PH6"; 69 - allwinner,function = "gpio_out"; 70 - allwinner,drive = <0>; 71 - allwinner,pull = <0>; 72 - }; 73 - 74 - usb2_vbus_pin_a: usb2_vbus_pin@0 { 75 - allwinner,pins = "PH3"; 76 - allwinner,function = "gpio_out"; 77 - allwinner,drive = <0>; 78 - allwinner,pull = <0>; 79 - }; 80 - }; 53 + &pio { 54 + ahci_pwr_pin_a: ahci_pwr_pin@0 { 55 + allwinner,pins = "PB8"; 56 + allwinner,function = "gpio_out"; 57 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 58 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 81 59 }; 82 60 61 + usb0_vbus_pin_a: usb0_vbus_pin@0 { 62 + allwinner,pins = "PB9"; 63 + allwinner,function = "gpio_out"; 64 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 65 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 66 + }; 67 + 68 + usb1_vbus_pin_a: usb1_vbus_pin@0 { 69 + allwinner,pins = "PH6"; 70 + allwinner,function = "gpio_out"; 71 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 72 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 73 + }; 74 + 75 + usb2_vbus_pin_a: usb2_vbus_pin@0 { 76 + allwinner,pins = "PH3"; 77 + allwinner,function = "gpio_out"; 78 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 79 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 80 + }; 81 + }; 82 + 83 + / { 83 84 reg_ahci_5v: ahci-5v { 84 85 compatible = "regulator-fixed"; 85 86 pinctrl-names = "default"; ··· 90 89 regulator-max-microvolt = <5000000>; 91 90 regulator-boot-on; 92 91 enable-active-high; 93 - gpio = <&pio 1 8 0>; 92 + gpio = <&pio 1 8 GPIO_ACTIVE_HIGH>; 94 93 status = "disabled"; 95 94 }; 96 95 ··· 102 101 regulator-min-microvolt = <5000000>; 103 102 regulator-max-microvolt = <5000000>; 104 103 enable-active-high; 105 - gpio = <&pio 1 9 0>; 104 + gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; 106 105 status = "disabled"; 107 106 }; 108 107 ··· 114 113 regulator-min-microvolt = <5000000>; 115 114 regulator-max-microvolt = <5000000>; 116 115 enable-active-high; 117 - gpio = <&pio 7 6 0>; 116 + gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; 118 117 status = "disabled"; 119 118 }; 120 119 ··· 126 125 regulator-min-microvolt = <5000000>; 127 126 regulator-max-microvolt = <5000000>; 128 127 enable-active-high; 129 - gpio = <&pio 7 3 0>; 128 + gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>; 130 129 status = "disabled"; 131 130 }; 132 131
+56
include/dt-bindings/dma/sun4i-a10.h
··· 1 + /* 2 + * Copyright 2014 Maxime Ripard 3 + * 4 + * Maxime Ripard <maxime.ripard@free-electrons.com> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This file is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * You should have received a copy of the GNU General Public 22 + * License along with this file; if not, write to the Free 23 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 24 + * MA 02110-1301 USA 25 + * 26 + * Or, alternatively, 27 + * 28 + * b) Permission is hereby granted, free of charge, to any person 29 + * obtaining a copy of this software and associated documentation 30 + * files (the "Software"), to deal in the Software without 31 + * restriction, including without limitation the rights to use, 32 + * copy, modify, merge, publish, distribute, sublicense, and/or 33 + * sell copies of the Software, and to permit persons to whom the 34 + * Software is furnished to do so, subject to the following 35 + * conditions: 36 + * 37 + * The above copyright notice and this permission notice shall be 38 + * included in all copies or substantial portions of the Software. 39 + * 40 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 41 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 42 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 43 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 44 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 45 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 46 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 47 + * OTHER DEALINGS IN THE SOFTWARE. 48 + */ 49 + 50 + #ifndef __DT_BINDINGS_DMA_SUN4I_A10_H_ 51 + #define __DT_BINDINGS_DMA_SUN4I_A10_H_ 52 + 53 + #define SUN4I_DMA_NORMAL 0 54 + #define SUN4I_DMA_DEDICATED 1 55 + 56 + #endif /* __DT_BINDINGS_DMA_SUN4I_A10_H_ */
+62
include/dt-bindings/pinctrl/sun4i-a10.h
··· 1 + /* 2 + * Copyright 2014 Maxime Ripard 3 + * 4 + * Maxime Ripard <maxime.ripard@free-electrons.com> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This file is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This file is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * You should have received a copy of the GNU General Public 22 + * License along with this file; if not, write to the Free 23 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 24 + * MA 02110-1301 USA 25 + * 26 + * Or, alternatively, 27 + * 28 + * b) Permission is hereby granted, free of charge, to any person 29 + * obtaining a copy of this software and associated documentation 30 + * files (the "Software"), to deal in the Software without 31 + * restriction, including without limitation the rights to use, 32 + * copy, modify, merge, publish, distribute, sublicense, and/or 33 + * sell copies of the Software, and to permit persons to whom the 34 + * Software is furnished to do so, subject to the following 35 + * conditions: 36 + * 37 + * The above copyright notice and this permission notice shall be 38 + * included in all copies or substantial portions of the Software. 39 + * 40 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 41 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 42 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 43 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 44 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 45 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 46 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 47 + * OTHER DEALINGS IN THE SOFTWARE. 48 + */ 49 + 50 + #ifndef __DT_BINDINGS_PINCTRL_SUN4I_A10_H_ 51 + #define __DT_BINDINGS_PINCTRL_SUN4I_A10_H_ 52 + 53 + #define SUN4I_PINCTRL_10_MA 0 54 + #define SUN4I_PINCTRL_20_MA 1 55 + #define SUN4I_PINCTRL_30_MA 2 56 + #define SUN4I_PINCTRL_40_MA 3 57 + 58 + #define SUN4I_PINCTRL_NO_PULL 0 59 + #define SUN4I_PINCTRL_PULL_UP 1 60 + #define SUN4I_PINCTRL_PULL_DOWN 2 61 + 62 + #endif /* __DT_BINDINGS_PINCTRL_SUN4I_A10_H_ */