Commit 8749f9f3 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'sunxi-dt-for-3.20' of...

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: default avatarOlof Johansson <olof@lixom.net>
parents 7c83955a c121f45e
...@@ -508,13 +508,19 @@ dtb-$(CONFIG_ARCH_STI) += \ ...@@ -508,13 +508,19 @@ dtb-$(CONFIG_ARCH_STI) += \
dtb-$(CONFIG_MACH_SUN4I) += \ dtb-$(CONFIG_MACH_SUN4I) += \
sun4i-a10-a1000.dtb \ sun4i-a10-a1000.dtb \
sun4i-a10-ba10-tvbox.dtb \ sun4i-a10-ba10-tvbox.dtb \
sun4i-a10-chuwi-v7-cw0825.dtb \
sun4i-a10-cubieboard.dtb \ sun4i-a10-cubieboard.dtb \
sun4i-a10-marsboard.dtb \
sun4i-a10-mini-xplus.dtb \ sun4i-a10-mini-xplus.dtb \
sun4i-a10-mk802.dtb \
sun4i-a10-mk802ii.dtb \
sun4i-a10-hackberry.dtb \ sun4i-a10-hackberry.dtb \
sun4i-a10-hyundai-a7hd.dtb \
sun4i-a10-inet97fv2.dtb \ sun4i-a10-inet97fv2.dtb \
sun4i-a10-olinuxino-lime.dtb \ sun4i-a10-olinuxino-lime.dtb \
sun4i-a10-pcduino.dtb sun4i-a10-pcduino.dtb
dtb-$(CONFIG_MACH_SUN5I) += \ dtb-$(CONFIG_MACH_SUN5I) += \
sun5i-a10s-mk802.dtb \
sun5i-a10s-olinuxino-micro.dtb \ sun5i-a10s-olinuxino-micro.dtb \
sun5i-a10s-r7-tv-dongle.dtb \ sun5i-a10s-r7-tv-dongle.dtb \
sun5i-a13-hsg-h702.dtb \ sun5i-a13-hsg-h702.dtb \
...@@ -524,9 +530,11 @@ dtb-$(CONFIG_MACH_SUN6I) += \ ...@@ -524,9 +530,11 @@ dtb-$(CONFIG_MACH_SUN6I) += \
sun6i-a31-app4-evb1.dtb \ sun6i-a31-app4-evb1.dtb \
sun6i-a31-colombus.dtb \ sun6i-a31-colombus.dtb \
sun6i-a31-hummingbird.dtb \ sun6i-a31-hummingbird.dtb \
sun6i-a31-m9.dtb sun6i-a31-m9.dtb \
sun6i-a31s-cs908.dtb
dtb-$(CONFIG_MACH_SUN7I) += \ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-bananapi.dtb \ sun7i-a20-bananapi.dtb \
sun7i-a20-bananapro.dtb \
sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \ sun7i-a20-cubietruck.dtb \
sun7i-a20-hummingbird.dtb \ sun7i-a20-hummingbird.dtb \
...@@ -537,7 +545,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \ ...@@ -537,7 +545,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-olinuxino-micro.dtb \ sun7i-a20-olinuxino-micro.dtb \
sun7i-a20-pcduino3.dtb sun7i-a20-pcduino3.dtb
dtb-$(CONFIG_MACH_SUN8I) += \ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a23-ippo-q8h-v5.dtb sun8i-a23-ippo-q8h-v5.dtb \
sun8i-a23-ippo-q8h-v1.2.dtb
dtb-$(CONFIG_MACH_SUN9I) += \ dtb-$(CONFIG_MACH_SUN9I) += \
sun9i-a80-optimus.dtb sun9i-a80-optimus.dtb
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
......
/*
* Copyright 2015 Chen-Yu Tsai
*
* Chen-Yu Tsai <wens@csie.org>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* AXP202/209 Integrated Power Management Chip
* http://www.x-powers.com/product/AXP20X.php
* http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf
*/
&axp209 {
compatible = "x-powers,axp209";
interrupt-controller;
#interrupt-cells = <1>;
regulators {
/* Default work frequency for buck regulators */
x-powers,dcdc-freq = <1500>;
reg_dcdc2: dcdc2 {
regulator-name = "dcdc2";
};
reg_dcdc3: dcdc3 {
regulator-name = "dcdc3";
};
reg_ldo1: ldo1 {
/* LDO1 is a fixed output regulator */
regulator-always-on;
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
regulator-name = "ldo1";
};
reg_ldo2: ldo2 {
regulator-name = "ldo2";
};
reg_ldo3: ldo3 {
regulator-name = "ldo3";
};
reg_ldo4: ldo4 {
regulator-name = "ldo4";
};
reg_ldo5: ldo5 {
regulator-name = "ldo5";
};
};
};
...@@ -48,8 +48,11 @@ ...@@ -48,8 +48,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Mele A1000"; model = "Mele A1000";
...@@ -77,7 +80,7 @@ mmc0: mmc@01c0f000 { ...@@ -77,7 +80,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -112,15 +115,15 @@ pinctrl@01c20800 { ...@@ -112,15 +115,15 @@ pinctrl@01c20800 {
emac_power_pin_a1000: emac_power_pin@0 { emac_power_pin_a1000: emac_power_pin@0 {
allwinner,pins = "PH15"; allwinner,pins = "PH15";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_a1000: led_pins@0 { led_pins_a1000: led_pins@0 {
allwinner,pins = "PH10", "PH20"; allwinner,pins = "PH10", "PH20";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -159,12 +162,12 @@ leds { ...@@ -159,12 +162,12 @@ leds {
red { red {
label = "a1000:red:usr"; label = "a1000:red:usr";
gpios = <&pio 7 10 0>; gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>;
}; };
blue { blue {
label = "a1000:blue:usr"; label = "a1000:blue:usr";
gpios = <&pio 7 20 0>; gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
}; };
}; };
...@@ -176,7 +179,7 @@ reg_emac_3v3: emac-3v3 { ...@@ -176,7 +179,7 @@ reg_emac_3v3: emac-3v3 {
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 15 0>; gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
......
...@@ -46,8 +46,10 @@ ...@@ -46,8 +46,10 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "BA10 tvbox"; model = "BA10 tvbox";
...@@ -74,7 +76,7 @@ mmc0: mmc@01c0f000 { ...@@ -74,7 +76,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -140,7 +142,7 @@ reg_usb1_vbus: usb1-vbus { ...@@ -140,7 +142,7 @@ reg_usb1_vbus: usb1-vbus {
}; };
reg_usb2_vbus: usb2-vbus { reg_usb2_vbus: usb2-vbus {
gpio = <&pio 7 12 0>; gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Chuwi V7 CW0825";
compatible = "chuwi,v7-cw0825", "allwinner,sun4i-a10";
};
&ehci1 {
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
interrupt-controller;
#interrupt-cells = <1>;
};
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted;
status = "okay";
};
&reg_usb2_vbus {
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usbphy {
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
...@@ -47,8 +47,11 @@ ...@@ -47,8 +47,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Cubietech Cubieboard"; model = "Cubietech Cubieboard";
...@@ -75,7 +78,7 @@ mmc0: mmc@01c0f000 { ...@@ -75,7 +78,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -111,8 +114,8 @@ pinctrl@01c20800 { ...@@ -111,8 +114,8 @@ pinctrl@01c20800 {
led_pins_cubieboard: led_pins@0 { led_pins_cubieboard: led_pins@0 {
allwinner,pins = "PH20", "PH21"; allwinner,pins = "PH20", "PH21";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -134,12 +137,8 @@ i2c0: i2c@01c2ac00 { ...@@ -134,12 +137,8 @@ i2c0: i2c@01c2ac00 {
status = "okay"; status = "okay";
axp209: pmic@34 { axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupts = <0>; interrupts = <0>;
interrupt-controller;
#interrupt-cells = <1>;
}; };
}; };
...@@ -148,6 +147,12 @@ i2c1: i2c@01c2b000 { ...@@ -148,6 +147,12 @@ i2c1: i2c@01c2b000 {
pinctrl-0 = <&i2c1_pins_a>; pinctrl-0 = <&i2c1_pins_a>;
status = "okay"; status = "okay";
}; };
spi0: spi@01c05000 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
};
}; };
leds { leds {
...@@ -157,12 +162,12 @@ leds { ...@@ -157,12 +162,12 @@ leds {
blue { blue {
label = "cubieboard:blue:usr"; label = "cubieboard:blue:usr";
gpios = <&pio 7 21 0>; /* LED1 */ gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
}; };
green { green {
label = "cubieboard:green:usr"; label = "cubieboard:green:usr";
gpios = <&pio 7 20 0>; /* LED2 */ gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
}; };
...@@ -179,3 +184,34 @@ reg_usb2_vbus: usb2-vbus { ...@@ -179,3 +184,34 @@ reg_usb2_vbus: usb2-vbus {
status = "okay"; status = "okay";
}; };
}; };
#include "axp209.dtsi"
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1450000>;
regulator-name = "vdd-cpu";
};
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-int-dll";
};
&reg_ldo1 {
regulator-name = "vdd-rtc";
};
&reg_ldo2 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "avcc";
};
...@@ -48,8 +48,11 @@ ...@@ -48,8 +48,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Miniand Hackberry"; model = "Miniand Hackberry";
...@@ -77,7 +80,7 @@ mmc0: mmc@01c0f000 { ...@@ -77,7 +80,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -111,15 +114,15 @@ pio: pinctrl@01c20800 { ...@@ -111,15 +114,15 @@ pio: pinctrl@01c20800 {
hackberry_hogs: hogs@0 { hackberry_hogs: hogs@0 {
allwinner,pins = "PH19"; allwinner,pins = "PH19";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb2_vbus_pin_hackberry: usb2_vbus_pin@0 { usb2_vbus_pin_hackberry: usb2_vbus_pin@0 {
allwinner,pins = "PH12"; allwinner,pins = "PH12";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -157,7 +160,7 @@ reg_emac_3v3: emac-3v3 { ...@@ -157,7 +160,7 @@ reg_emac_3v3: emac-3v3 {
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 19 0>; gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>;
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
...@@ -166,7 +169,7 @@ reg_usb1_vbus: usb1-vbus { ...@@ -166,7 +169,7 @@ reg_usb1_vbus: usb1-vbus {
reg_usb2_vbus: usb2-vbus { reg_usb2_vbus: usb2-vbus {
pinctrl-0 = <&usb2_vbus_pin_hackberry>; pinctrl-0 = <&usb2_vbus_pin_hackberry>;
gpio = <&pio 7 12 0>; gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Hyundai A7HD";
compatible = "hyundai,a7hd", "allwinner,sun4i-a10";
};
&ehci1 {
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
interrupt-controller;
#interrupt-cells = <1>;
};
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted;
status = "okay";
};
&reg_usb2_vbus {
gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usb2_vbus_pin_a {
allwinner,pins = "PH6";
};
&usbphy {
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
...@@ -48,8 +48,10 @@ ...@@ -48,8 +48,10 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "INet-97F Rev 02"; model = "INet-97F Rev 02";
...@@ -65,7 +67,7 @@ mmc0: mmc@01c0f000 { ...@@ -65,7 +67,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
......
/*
* Copyright 2015 Aleksei Mamlin
* Aleksei Mamlin <mamlinav@gmail.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
model = "HAOYU Electronics Marsboard A10";
compatible = "haoyu,a10-marsboard", "allwinner,sun4i-a10";
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_marsboard>;
red1 {
label = "marsboard:red1:usr";
gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>;
};
red2 {
label = "marsboard:red2:usr";
gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>;
};
red3 {
label = "marsboard:red3:usr";
gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
};
red4 {
label = "marsboard:red4:usr";
gpios = <&pio 1 8 GPIO_ACTIVE_HIGH>;
};
};
};
&ahci {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&emac {
pinctrl-names = "default";
pinctrl-0 = <&emac_pins_a>;
phy = <&phy1>;
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
};
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins_a>;
status = "okay";
};
&i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
};
&mdio {
status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted;
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&pio {
led_pins_marsboard: led_pins@0 {
allwinner,pins = "PB5", "PB6", "PB7", "PB8";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
...@@ -48,8 +48,11 @@ ...@@ -48,8 +48,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "PineRiver Mini X-Plus"; model = "PineRiver Mini X-Plus";
...@@ -61,7 +64,7 @@ mmc0: mmc@01c0f000 { ...@@ -61,7 +64,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -91,7 +94,7 @@ ohci1: usb@01c1c400 { ...@@ -91,7 +94,7 @@ ohci1: usb@01c1c400 {
pinctrl@01c20800 { pinctrl@01c20800 {
ir0_pins_a: ir0@0 { ir0_pins_a: ir0@0 {
/* The ir receiver is not always populated */ /* The ir receiver is not always populated */
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
}; };
......
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "MK802";
compatible = "allwinner,mk802", "allwinner,sun4i-a10";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted;
status = "okay";
};
&ohci0 {
status = "okay";
};
&pio {
usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
allwinner,pins = "PH12";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
pinctrl-0 = <&usb2_vbus_pin_mk802>;
gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "MK802ii";
compatible = "allwinner,mk802ii", "allwinner,sun4i-a10";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
interrupt-controller;
#interrupt-cells = <1>;
};
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted;
status = "okay";
};
&ohci0 {
status = "okay";
};
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
...@@ -46,8 +46,11 @@ ...@@ -46,8 +46,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A10-OLinuXino-LIME"; model = "Olimex A10-OLinuXino-LIME";
...@@ -74,7 +77,7 @@ mmc0: mmc@01c0f000 { ...@@ -74,7 +77,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -110,15 +113,15 @@ pinctrl@01c20800 { ...@@ -110,15 +113,15 @@ pinctrl@01c20800 {
ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
allwinner,pins = "PC3"; allwinner,pins = "PC3";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_olinuxinolime: led_pins@0 { led_pins_olinuxinolime: led_pins@0 {
allwinner,pins = "PH2"; allwinner,pins = "PH2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -151,14 +154,14 @@ leds { ...@@ -151,14 +154,14 @@ leds {
green { green {
label = "a10-olinuxino-lime:green:usr"; label = "a10-olinuxino-lime:green:usr";
gpios = <&pio 7 2 0>; gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
gpio = <&pio 2 3 0>; gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
......
...@@ -47,8 +47,12 @@ ...@@ -47,8 +47,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "LinkSprite pcDuino"; model = "LinkSprite pcDuino";
...@@ -62,6 +66,22 @@ emac: ethernet@01c0b000 { ...@@ -62,6 +66,22 @@ emac: ethernet@01c0b000 {
status = "okay"; status = "okay";
}; };
pinctrl@01c20800 {
led_pins_pcduino: led_pins@0 {
allwinner,pins = "PH15", "PH16";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
key_pins_pcduino: key_pins@0 {
allwinner,pins = "PH17", "PH18", "PH19";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
mdio@01c0b080 { mdio@01c0b080 {
status = "okay"; status = "okay";
...@@ -75,7 +95,7 @@ mmc0: mmc@01c0f000 { ...@@ -75,7 +95,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -124,6 +144,48 @@ axp209: pmic@34 { ...@@ -124,6 +144,48 @@ axp209: pmic@34 {
}; };
}; };
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_pcduino>;
tx {
label = "pcduino:green:tx";
gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
};
rx {
label = "pcduino:green:rx";
gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
};
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_pins_pcduino>;
#address-cells = <1>;
#size-cells = <0>;
button@0 {
label = "Key Back";
linux,code = <KEY_BACK>;
gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
};
button@1 {
label = "Key Home";
linux,code = <KEY_HOME>;
gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
};
button@2 {
label = "Key Menu";
linux,code = <KEY_MENU>;
gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
};
};
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
status = "okay"; status = "okay";
}; };
......
...@@ -10,7 +10,12 @@ ...@@ -10,7 +10,12 @@
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
*/ */
/include/ "skeleton.dtsi" #include "skeleton.dtsi"
#include <dt-bindings/thermal/thermal.h>
#include <dt-bindings/dma/sun4i-a10.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
...@@ -39,15 +44,86 @@ framebuffer@0 { ...@@ -39,15 +44,86 @@ framebuffer@0 {
<&ahb_gates 44>; <&ahb_gates 44>;
status = "disabled"; status = "disabled";
}; };
framebuffer@1 {
compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
<&ahb_gates 44>, <&ahb_gates 46>;
status = "disabled";
};
framebuffer@2 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de_fe0-de_be0-lcd0";
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
<&ahb_gates 46>;
status = "disabled";
};
framebuffer@3 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
<&ahb_gates 44>, <&ahb_gates 46>;
status = "disabled";
};
}; };
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cpu@0 { cpu0: cpu@0 {
device_type = "cpu"; device_type = "cpu";
compatible = "arm,cortex-a8"; compatible = "arm,cortex-a8";
reg = <0x0>; reg = <0x0>;
clocks = <&cpu>;
clock-latency = <244144>; /* 8 32k periods */
operating-points = <
/* kHz uV */
1056000 1500000
1008000 1400000
912000 1350000
864000 1300000
624000 1250000
>;
#cooling-cells = <2>;
cooling-min-level = <0>;
cooling-max-level = <4>;
};
};
thermal-zones {
cpu_thermal {
/* milliseconds */
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&rtp>;
cooling-maps {
map0 {
trip = <&cpu_alert0>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
cpu_alert0: cpu_alert0 {
/* milliCelsius */
temperature = <850000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit: cpu_crit {
/* milliCelsius */
temperature = <100000>;
hysteresis = <2000>;
type = "critical";
};
};
}; };
}; };
...@@ -359,7 +435,8 @@ spi0: spi@01c05000 { ...@@ -359,7 +435,8 @@ spi0: spi@01c05000 {
interrupts = <10>; interrupts = <10>;
clocks = <&ahb_gates 20>, <&spi0_clk>; clocks = <&ahb_gates 20>, <&spi0_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 27>, <&dma 1 26>; dmas = <&dma SUN4I_DMA_DEDICATED 27>,
<&dma SUN4I_DMA_DEDICATED 26>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -372,7 +449,8 @@ spi1: spi@01c06000 { ...@@ -372,7 +449,8 @@ spi1: spi@01c06000 {
interrupts = <11>; interrupts = <11>;
clocks = <&ahb_gates 21>, <&spi1_clk>; clocks = <&ahb_gates 21>, <&spi1_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 9>, <&dma 1 8>; dmas = <&dma SUN4I_DMA_DEDICATED 9>,
<&dma SUN4I_DMA_DEDICATED 8>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -387,7 +465,7 @@ emac: ethernet@01c0b000 { ...@@ -387,7 +465,7 @@ emac: ethernet@01c0b000 {
status = "disabled"; status = "disabled";
}; };
mdio@01c0b080 { mdio: mdio@01c0b080 {
compatible = "allwinner,sun4i-a10-mdio"; compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>; reg = <0x01c0b080 0x14>;
status = "disabled"; status = "disabled";
...@@ -438,8 +516,8 @@ usbphy: phy@01c13400 { ...@@ -438,8 +516,8 @@ usbphy: phy@01c13400 {
reg-names = "phy_ctrl", "pmu1", "pmu2"; reg-names = "phy_ctrl", "pmu1", "pmu2";
clocks = <&usb_clk 8>; clocks = <&usb_clk 8>;
clock-names = "usb_phy"; clock-names = "usb_phy";
resets = <&usb_clk 1>, <&usb_clk 2>; resets = <&usb_clk 0>, <&usb_clk 1>, <&usb_clk 2>;
reset-names = "usb1_reset", "usb2_reset"; reset-names = "usb0_reset", "usb1_reset", "usb2_reset";
status = "disabled"; status = "disabled";
}; };
...@@ -469,7 +547,8 @@ spi2: spi@01c17000 { ...@@ -469,7 +547,8 @@ spi2: spi@01c17000 {
interrupts = <12>; interrupts = <12>;
clocks = <&ahb_gates 22>, <&spi2_clk>; clocks = <&ahb_gates 22>, <&spi2_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 29>, <&dma 1 28>; dmas = <&dma SUN4I_DMA_DEDICATED 29>,
<&dma SUN4I_DMA_DEDICATED 28>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -510,7 +589,8 @@ spi3: spi@01c1f000 { ...@@ -510,7 +589,8 @@ spi3: spi@01c1f000 {
interrupts = <50>; interrupts = <50>;
clocks = <&ahb_gates 23>, <&spi3_clk>; clocks = <&ahb_gates 23>, <&spi3_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 31>, <&dma 1 30>; dmas = <&dma SUN4I_DMA_DEDICATED 31>,
<&dma SUN4I_DMA_DEDICATED 30>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -538,57 +618,57 @@ pio: pinctrl@01c20800 { ...@@ -538,57 +618,57 @@ pio: pinctrl@01c20800 {
pwm0_pins_a: pwm0@0 { pwm0_pins_a: pwm0@0 {
allwinner,pins = "PB2"; allwinner,pins = "PB2";
allwinner,function = "pwm"; allwinner,function = "pwm";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
pwm1_pins_a: pwm1@0 { pwm1_pins_a: pwm1@0 {
allwinner,pins = "PI3"; allwinner,pins = "PI3";
allwinner,function = "pwm"; allwinner,function = "pwm";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
uart0_pins_a: uart0@0 { uart0_pins_a: uart0@0 {
allwinner,pins = "PB22", "PB23"; allwinner,pins = "PB22", "PB23";
allwinner,function = "uart0"; allwinner,function = "uart0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
uart0_pins_b: uart0@1 { uart0_pins_b: uart0@1 {
allwinner,pins = "PF2", "PF4"; allwinner,pins = "PF2", "PF4";
allwinner,function = "uart0"; allwinner,function = "uart0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
uart1_pins_a: uart1@0 { uart1_pins_a: uart1@0 {
allwinner,pins = "PA10", "PA11"; allwinner,pins = "PA10", "PA11";
allwinner,function = "uart1"; allwinner,function = "uart1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c0_pins_a: i2c0@0 { i2c0_pins_a: i2c0@0 {
allwinner,pins = "PB0", "PB1"; allwinner,pins = "PB0", "PB1";
allwinner,function = "i2c0"; allwinner,function = "i2c0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c1_pins_a: i2c1@0 { i2c1_pins_a: i2c1@0 {
allwinner,pins = "PB18", "PB19"; allwinner,pins = "PB18", "PB19";
allwinner,function = "i2c1"; allwinner,function = "i2c1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c2_pins_a: i2c2@0 { i2c2_pins_a: i2c2@0 {
allwinner,pins = "PB20", "PB21"; allwinner,pins = "PB20", "PB21";
allwinner,function = "i2c2"; allwinner,function = "i2c2";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
emac_pins_a: emac0@0 { emac_pins_a: emac0@0 {
...@@ -598,36 +678,78 @@ emac_pins_a: emac0@0 { ...@@ -598,36 +678,78 @@ emac_pins_a: emac0@0 {
"PA11", "PA12", "PA13", "PA14", "PA11", "PA12", "PA13", "PA14",
"PA15", "PA16"; "PA15", "PA16";
allwinner,function = "emac"; allwinner,function = "emac";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc0_pins_a: mmc0@0 { mmc0_pins_a: mmc0@0 {
allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
allwinner,function = "mmc0"; allwinner,function = "mmc0";
allwinner,drive = <2>; allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc0_cd_pin_reference_design: mmc0_cd_pin@0 { mmc0_cd_pin_reference_design: mmc0_cd_pin@0 {
allwinner,pins = "PH1"; allwinner,pins = "PH1";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
ir0_pins_a: ir0@0 { ir0_pins_a: ir0@0 {
allwinner,pins = "PB3","PB4"; allwinner,pins = "PB3","PB4";
allwinner,function = "ir0"; allwinner,function = "ir0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
ir1_pins_a: ir1@0 { ir1_pins_a: ir1@0 {
allwinner,pins = "PB22","PB23"; allwinner,pins = "PB22","PB23";
allwinner,function = "ir1"; allwinner,function = "ir1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
spi0_pins_a: spi0@0 {
allwinner,pins = "PI10", "PI11", "PI12", "PI13";
allwinner,function = "spi0";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
spi1_pins_a: spi1@0 {
allwinner,pins = "PI16", "PI17", "PI18", "PI19";
allwinner,function = "spi1";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
spi2_pins_a: spi2@0 {
allwinner,pins = "PB14", "PB15", "PB16", "PB17";
allwinner,function = "spi2";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
spi2_pins_b: spi2@1 {
allwinner,pins = "PC19", "PC20", "PC21", "PC22";
allwinner,function = "spi2";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
ps20_pins_a: ps20@0 {
allwinner,pins = "PI20", "PI21";
allwinner,function = "ps2";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
ps21_pins_a: ps21@0 {
allwinner,pins = "PH12", "PH13";
allwinner,function = "ps2";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -675,6 +797,13 @@ ir1: ir@01c21c00 { ...@@ -675,6 +797,13 @@ ir1: ir@01c21c00 {
status = "disabled"; status = "disabled";
}; };
lradc: lradc@01c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x100>;
interrupts = <31>;
status = "disabled";
};
sid: eeprom@01c23800 { sid: eeprom@01c23800 {
compatible = "allwinner,sun4i-a10-sid"; compatible = "allwinner,sun4i-a10-sid";
reg = <0x01c23800 0x10>; reg = <0x01c23800 0x10>;
...@@ -684,6 +813,7 @@ rtp: rtp@01c25000 { ...@@ -684,6 +813,7 @@ rtp: rtp@01c25000 {
compatible = "allwinner,sun4i-a10-ts"; compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>; reg = <0x01c25000 0x100>;
interrupts = <29>; interrupts = <29>;
#thermal-sensor-cells = <0>;
}; };
uart0: serial@01c28000 { uart0: serial@01c28000 {
...@@ -795,5 +925,21 @@ i2c2: i2c@01c2b400 { ...@@ -795,5 +925,21 @@ i2c2: i2c@01c2b400 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
}; };
ps20: ps2@01c2a000 {
compatible = "allwinner,sun4i-a10-ps2";
reg = <0x01c2a000 0x400>;
interrupts = <62>;
clocks = <&apb1_gates 6>;
status = "disabled";
};
ps21: ps2@01c2a400 {
compatible = "allwinner,sun4i-a10-ps2";
reg = <0x01c2a400 0x400>;
interrupts = <63>;
clocks = <&apb1_gates 7>;
status = "disabled";
};
}; };
}; };
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun5i-a10s.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "MK802-A10s";
compatible = "allwinner,a10s-mk802", "allwinner,sun5i-a10s";
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_mk802>;
red {
label = "mk802:red:usr";
gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2 */
};
};
};
&ehci0 {
status = "okay";
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mk802>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
cd-inverted;
status = "okay";
};
&ohci0 {
status = "okay";
};
&pio {
led_pins_mk802: led_pins@0 {
allwinner,pins = "PB2";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
mmc0_cd_pin_mk802: mmc0_cd_pin@0 {
allwinner,pins = "PG1";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
usb1_vbus_pin_mk802: usb1_vbus_pin@0 {
allwinner,pins = "PB10";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&reg_usb1_vbus {
pinctrl-0 = <&usb1_vbus_pin_mk802>;
gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>;
status = "okay";
};
...@@ -48,8 +48,12 @@ ...@@ -48,8 +48,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun5i-a10s.dtsi" #include "sun5i-a10s.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A10s-Olinuxino Micro"; model = "Olimex A10s-Olinuxino Micro";
...@@ -76,7 +80,7 @@ mmc0: mmc@01c0f000 { ...@@ -76,7 +80,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 6 1 0>; /* PG1 */ cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -86,7 +90,7 @@ mmc1: mmc@01c10000 { ...@@ -86,7 +90,7 @@ mmc1: mmc@01c10000 {
pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>; pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 6 13 0>; /* PG13 */ cd-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -108,29 +112,69 @@ pinctrl@01c20800 { ...@@ -108,29 +112,69 @@ pinctrl@01c20800 {
mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 { mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
allwinner,pins = "PG1"; allwinner,pins = "PG1";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
mmc1_cd_pin_olinuxino_micro: mmc1_cd_pin@0 { mmc1_cd_pin_olinuxino_micro: mmc1_cd_pin@0 {
allwinner,pins = "PG13"; allwinner,pins = "PG13";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
led_pins_olinuxino: led_pins@0 { led_pins_olinuxino: led_pins@0 {
allwinner,pins = "PE3"; allwinner,pins = "PE3";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb1_vbus_pin_olinuxino_m: usb1_vbus_pin@0 { usb1_vbus_pin_olinuxino_m: usb1_vbus_pin@0 {
allwinner,pins = "PB10"; allwinner,pins = "PB10";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
lradc: lradc@01c22800 {
vref-supply = <&reg_vcc3v0>;
status = "okay";
button@191 {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
channel = <0>;
voltage = <191274>;
};
button@392 {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
channel = <0>;
voltage = <392644>;
};
button@601 {
label = "Menu";
linux,code = <KEY_MENU>;
channel = <0>;
voltage = <601151>;
};
button@795 {
label = "Enter";
linux,code = <KEY_ENTER>;
channel = <0>;
voltage = <795090>;
};
button@987 {
label = "Home";
linux,code = <KEY_HOMEPAGE>;
channel = <0>;
voltage = <987387>;
}; };
}; };
...@@ -185,14 +229,14 @@ leds { ...@@ -185,14 +229,14 @@ leds {
green { green {
label = "a10s-olinuxino-micro:green:usr"; label = "a10s-olinuxino-micro:green:usr";
gpios = <&pio 4 3 0>; gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-0 = <&usb1_vbus_pin_olinuxino_m>; pinctrl-0 = <&usb1_vbus_pin_olinuxino_m>;
gpio = <&pio 1 10 0>; gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
...@@ -46,8 +46,11 @@ ...@@ -46,8 +46,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun5i-a10s.dtsi" #include "sun5i-a10s.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "R7 A10s hdmi tv-stick"; model = "R7 A10s hdmi tv-stick";
...@@ -59,7 +62,7 @@ mmc0: mmc@01c0f000 { ...@@ -59,7 +62,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_r7>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_r7>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 6 1 0>; /* PG1 */ cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -90,22 +93,22 @@ pinctrl@01c20800 { ...@@ -90,22 +93,22 @@ pinctrl@01c20800 {
mmc0_cd_pin_r7: mmc0_cd_pin@0 { mmc0_cd_pin_r7: mmc0_cd_pin@0 {
allwinner,pins = "PG1"; allwinner,pins = "PG1";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
led_pins_r7: led_pins@0 { led_pins_r7: led_pins@0 {
allwinner,pins = "PB2"; allwinner,pins = "PB2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb1_vbus_pin_r7: usb1_vbus_pin@0 { usb1_vbus_pin_r7: usb1_vbus_pin@0 {
allwinner,pins = "PG13"; allwinner,pins = "PG13";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -123,14 +126,14 @@ leds { ...@@ -123,14 +126,14 @@ leds {
green { green {
label = "r7-tv-dongle:green:usr"; label = "r7-tv-dongle:green:usr";
gpios = <&pio 1 2 0>; gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-0 = <&usb1_vbus_pin_r7>; pinctrl-0 = <&usb1_vbus_pin_r7>;
gpio = <&pio 6 13 0>; gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
*/ */
/include/ "skeleton.dtsi" #include "skeleton.dtsi"
#include <dt-bindings/dma/sun4i-a10.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
...@@ -36,6 +39,14 @@ framebuffer@0 { ...@@ -36,6 +39,14 @@ framebuffer@0 {
<&ahb_gates 44>; <&ahb_gates 44>;
status = "disabled"; status = "disabled";
}; };
framebuffer@1 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de_be0-lcd0";
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
status = "disabled";
};
}; };
cpus { cpus {
...@@ -320,7 +331,8 @@ spi0: spi@01c05000 { ...@@ -320,7 +331,8 @@ spi0: spi@01c05000 {
interrupts = <10>; interrupts = <10>;
clocks = <&ahb_gates 20>, <&spi0_clk>; clocks = <&ahb_gates 20>, <&spi0_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 27>, <&dma 1 26>; dmas = <&dma SUN4I_DMA_DEDICATED 27>,
<&dma SUN4I_DMA_DEDICATED 26>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -333,7 +345,8 @@ spi1: spi@01c06000 { ...@@ -333,7 +345,8 @@ spi1: spi@01c06000 {
interrupts = <11>; interrupts = <11>;
clocks = <&ahb_gates 21>, <&spi1_clk>; clocks = <&ahb_gates 21>, <&spi1_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 9>, <&dma 1 8>; dmas = <&dma SUN4I_DMA_DEDICATED 9>,
<&dma SUN4I_DMA_DEDICATED 8>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -348,7 +361,7 @@ emac: ethernet@01c0b000 { ...@@ -348,7 +361,7 @@ emac: ethernet@01c0b000 {
status = "disabled"; status = "disabled";
}; };
mdio@01c0b080 { mdio: mdio@01c0b080 {
compatible = "allwinner,sun4i-a10-mdio"; compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>; reg = <0x01c0b080 0x14>;
status = "disabled"; status = "disabled";
...@@ -390,8 +403,8 @@ usbphy: phy@01c13400 { ...@@ -390,8 +403,8 @@ usbphy: phy@01c13400 {
reg-names = "phy_ctrl", "pmu1"; reg-names = "phy_ctrl", "pmu1";
clocks = <&usb_clk 8>; clocks = <&usb_clk 8>;
clock-names = "usb_phy"; clock-names = "usb_phy";
resets = <&usb_clk 1>; resets = <&usb_clk 0>, <&usb_clk 1>;
reset-names = "usb1_reset"; reset-names = "usb0_reset", "usb1_reset";
status = "disabled"; status = "disabled";
}; };
...@@ -421,7 +434,8 @@ spi2: spi@01c17000 { ...@@ -421,7 +434,8 @@ spi2: spi@01c17000 {
interrupts = <12>; interrupts = <12>;
clocks = <&ahb_gates 22>, <&spi2_clk>; clocks = <&ahb_gates 22>, <&spi2_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 29>, <&dma 1 28>; dmas = <&dma SUN4I_DMA_DEDICATED 29>,
<&dma SUN4I_DMA_DEDICATED 28>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -449,22 +463,22 @@ pio: pinctrl@01c20800 { ...@@ -449,22 +463,22 @@ pio: pinctrl@01c20800 {
uart0_pins_a: uart0@0 { uart0_pins_a: uart0@0 {
allwinner,pins = "PB19", "PB20"; allwinner,pins = "PB19", "PB20";
allwinner,function = "uart0"; allwinner,function = "uart0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
uart2_pins_a: uart2@0 { uart2_pins_a: uart2@0 {
allwinner,pins = "PC18", "PC19"; allwinner,pins = "PC18", "PC19";
allwinner,function = "uart2"; allwinner,function = "uart2";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
uart3_pins_a: uart3@0 { uart3_pins_a: uart3@0 {
allwinner,pins = "PG9", "PG10"; allwinner,pins = "PG9", "PG10";
allwinner,function = "uart3"; allwinner,function = "uart3";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
emac_pins_a: emac0@0 { emac_pins_a: emac0@0 {
...@@ -474,43 +488,43 @@ emac_pins_a: emac0@0 { ...@@ -474,43 +488,43 @@ emac_pins_a: emac0@0 {
"PA11", "PA12", "PA13", "PA14", "PA11", "PA12", "PA13", "PA14",
"PA15", "PA16"; "PA15", "PA16";
allwinner,function = "emac"; allwinner,function = "emac";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c0_pins_a: i2c0@0 { i2c0_pins_a: i2c0@0 {
allwinner,pins = "PB0", "PB1"; allwinner,pins = "PB0", "PB1";
allwinner,function = "i2c0"; allwinner,function = "i2c0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c1_pins_a: i2c1@0 { i2c1_pins_a: i2c1@0 {
allwinner,pins = "PB15", "PB16"; allwinner,pins = "PB15", "PB16";
allwinner,function = "i2c1"; allwinner,function = "i2c1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c2_pins_a: i2c2@0 { i2c2_pins_a: i2c2@0 {
allwinner,pins = "PB17", "PB18"; allwinner,pins = "PB17", "PB18";
allwinner,function = "i2c2"; allwinner,function = "i2c2";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc0_pins_a: mmc0@0 { mmc0_pins_a: mmc0@0 {
allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
allwinner,function = "mmc0"; allwinner,function = "mmc0";
allwinner,drive = <2>; allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc1_pins_a: mmc1@0 { mmc1_pins_a: mmc1@0 {
allwinner,pins = "PG3","PG4","PG5","PG6","PG7","PG8"; allwinner,pins = "PG3","PG4","PG5","PG6","PG7","PG8";
allwinner,function = "mmc1"; allwinner,function = "mmc1";
allwinner,drive = <2>; allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -526,6 +540,13 @@ wdt: watchdog@01c20c90 { ...@@ -526,6 +540,13 @@ wdt: watchdog@01c20c90 {
reg = <0x01c20c90 0x10>; reg = <0x01c20c90 0x10>;
}; };
lradc: lradc@01c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x100>;
interrupts = <31>;
status = "disabled";
};
sid: eeprom@01c23800 { sid: eeprom@01c23800 {
compatible = "allwinner,sun4i-a10-sid"; compatible = "allwinner,sun4i-a10-sid";
reg = <0x01c23800 0x10>; reg = <0x01c23800 0x10>;
...@@ -535,6 +556,7 @@ rtp: rtp@01c25000 { ...@@ -535,6 +556,7 @@ rtp: rtp@01c25000 {
compatible = "allwinner,sun4i-a10-ts"; compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>; reg = <0x01c25000 0x100>;
interrupts = <29>; interrupts = <29>;
#thermal-sensor-cells = <0>;
}; };
uart0: serial@01c28000 { uart0: serial@01c28000 {
......
...@@ -46,8 +46,11 @@ ...@@ -46,8 +46,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun5i-a13.dtsi" #include "sun5i-a13.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "HSG H702"; model = "HSG H702";
...@@ -59,17 +62,13 @@ mmc0: mmc@01c0f000 { ...@@ -59,17 +62,13 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 6 0 0>; /* PG0 */ cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
usbphy: phy@01c13400 { usbphy: phy@01c13400 {
/* usb1_vbus-supply = <&reg_ldo3>;
* There doesn't seem to be a GPIO for controlling
* usb1 vbus, despite the fex file saying otherwise.
*/
usb1_vbus-supply = <&reg_vcc5v0>;
status = "okay"; status = "okay";
}; };
...@@ -85,8 +84,8 @@ pinctrl@01c20800 { ...@@ -85,8 +84,8 @@ pinctrl@01c20800 {
mmc0_cd_pin_h702: mmc0_cd_pin@0 { mmc0_cd_pin_h702: mmc0_cd_pin@0 {
allwinner,pins = "PG0"; allwinner,pins = "PG0";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
}; };
...@@ -102,11 +101,8 @@ i2c0: i2c@01c2ac00 { ...@@ -102,11 +101,8 @@ i2c0: i2c@01c2ac00 {
status = "okay"; status = "okay";
axp209: pmic@34 { axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupts = <0>; interrupts = <0>;
interrupt-controller;
#interrupt-cells = <1>;
}; };
}; };
...@@ -128,3 +124,40 @@ i2c2: i2c@01c2b400 { ...@@ -128,3 +124,40 @@ i2c2: i2c@01c2b400 {
}; };
}; };
}; };
#include "axp209.dtsi"
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1500000>;
regulator-name = "vdd-cpu";
};
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-int-dll";
};
&reg_ldo1 {
regulator-name = "vdd-rtc";
};
&reg_ldo2 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "avcc";
};
&reg_ldo3 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi";
};
...@@ -47,8 +47,11 @@ ...@@ -47,8 +47,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun5i-a13.dtsi" #include "sun5i-a13.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A13-Olinuxino Micro"; model = "Olimex A13-Olinuxino Micro";
...@@ -60,7 +63,7 @@ mmc0: mmc@01c0f000 { ...@@ -60,7 +63,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 6 0 0>; /* PG0 */ cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -82,22 +85,22 @@ pinctrl@01c20800 { ...@@ -82,22 +85,22 @@ pinctrl@01c20800 {
mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 { mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 {
allwinner,pins = "PG0"; allwinner,pins = "PG0";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
led_pins_olinuxinom: led_pins@0 { led_pins_olinuxinom: led_pins@0 {
allwinner,pins = "PG9"; allwinner,pins = "PG9";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 { usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 {
allwinner,pins = "PG11"; allwinner,pins = "PG11";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -133,14 +136,14 @@ leds { ...@@ -133,14 +136,14 @@ leds {
power { power {
label = "a13-olinuxino-micro:green:power"; label = "a13-olinuxino-micro:green:power";
gpios = <&pio 6 9 0>; gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-0 = <&usb1_vbus_pin_olinuxinom>; pinctrl-0 = <&usb1_vbus_pin_olinuxinom>;
gpio = <&pio 6 11 0>; gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
...@@ -48,8 +48,12 @@ ...@@ -48,8 +48,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun5i-a13.dtsi" #include "sun5i-a13.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A13-Olinuxino"; model = "Olimex A13-Olinuxino";
...@@ -61,7 +65,7 @@ mmc0: mmc@01c0f000 { ...@@ -61,7 +65,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 6 0 0>; /* PG0 */ cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -83,22 +87,62 @@ pinctrl@01c20800 { ...@@ -83,22 +87,62 @@ pinctrl@01c20800 {
mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 { mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
allwinner,pins = "PG0"; allwinner,pins = "PG0";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
led_pins_olinuxino: led_pins@0 { led_pins_olinuxino: led_pins@0 {
allwinner,pins = "PG9"; allwinner,pins = "PG9";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 { usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
allwinner,pins = "PG11"; allwinner,pins = "PG11";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
lradc: lradc@01c22800 {
vref-supply = <&reg_vcc3v0>;
status = "okay";
button@191 {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
channel = <0>;
voltage = <191274>;
};
button@392 {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
channel = <0>;
voltage = <392644>;
};
button@601 {
label = "Menu";
linux,code = <KEY_MENU>;
channel = <0>;
voltage = <601151>;
};
button@795 {
label = "Enter";
linux,code = <KEY_ENTER>;
channel = <0>;
voltage = <795090>;
};
button@987 {
label = "Home";
linux,code = <KEY_HOMEPAGE>;
channel = <0>;
voltage = <987387>;
}; };
}; };
...@@ -112,6 +156,15 @@ i2c0: i2c@01c2ac00 { ...@@ -112,6 +156,15 @@ i2c0: i2c@01c2ac00 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>; pinctrl-0 = <&i2c0_pins_a>;
status = "okay"; status = "okay";
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
interrupt-controller;
#interrupt-cells = <1>;
};
}; };
i2c1: i2c@01c2b000 { i2c1: i2c@01c2b000 {
...@@ -133,14 +186,14 @@ leds { ...@@ -133,14 +186,14 @@ leds {
pinctrl-0 = <&led_pins_olinuxino>; pinctrl-0 = <&led_pins_olinuxino>;
power { power {
gpios = <&pio 6 9 0>; gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-0 = <&usb1_vbus_pin_olinuxino>; pinctrl-0 = <&usb1_vbus_pin_olinuxino>;
gpio = <&pio 6 11 0>; gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
*/ */
/include/ "skeleton.dtsi" #include "skeleton.dtsi"
#include <dt-bindings/thermal/thermal.h>
#include <dt-bindings/dma/sun4i-a10.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
...@@ -21,13 +26,75 @@ aliases { ...@@ -21,13 +26,75 @@ aliases {
serial1 = &uart3; serial1 = &uart3;
}; };
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
framebuffer@0 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de_be0-lcd0";
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
status = "disabled";
};
};
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cpu@0 {
cpu0: cpu@0 {
device_type = "cpu"; device_type = "cpu";
compatible = "arm,cortex-a8"; compatible = "arm,cortex-a8";
reg = <0x0>; reg = <0x0>;
clocks = <&cpu>;
clock-latency = <244144>; /* 8 32k periods */
operating-points = <
/* kHz uV */
1104000 1500000
1008000 1400000
912000 1350000
864000 1300000
624000 1200000
576000 1200000
432000 1200000
>;
#cooling-cells = <2>;
cooling-min-level = <0>;
cooling-max-level = <6>;
};
};
thermal-zones {
cpu_thermal {
/* milliseconds */
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&rtp>;
cooling-maps {
map0 {
trip = <&cpu_alert0>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
trips {
cpu_alert0: cpu_alert0 {
/* milliCelsius */
temperature = <850000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit: cpu_crit {
/* milliCelsius */
temperature = <100000>;
hysteresis = <2000>;
type = "critical";
};
};
}; };
}; };
...@@ -304,7 +371,8 @@ spi0: spi@01c05000 { ...@@ -304,7 +371,8 @@ spi0: spi@01c05000 {
interrupts = <10>; interrupts = <10>;
clocks = <&ahb_gates 20>, <&spi0_clk>; clocks = <&ahb_gates 20>, <&spi0_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 27>, <&dma 1 26>; dmas = <&dma SUN4I_DMA_DEDICATED 27>,
<&dma SUN4I_DMA_DEDICATED 26>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -317,7 +385,8 @@ spi1: spi@01c06000 { ...@@ -317,7 +385,8 @@ spi1: spi@01c06000 {
interrupts = <11>; interrupts = <11>;
clocks = <&ahb_gates 21>, <&spi1_clk>; clocks = <&ahb_gates 21>, <&spi1_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 9>, <&dma 1 8>; dmas = <&dma SUN4I_DMA_DEDICATED 9>,
<&dma SUN4I_DMA_DEDICATED 8>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -349,8 +418,8 @@ usbphy: phy@01c13400 { ...@@ -349,8 +418,8 @@ usbphy: phy@01c13400 {
reg-names = "phy_ctrl", "pmu1"; reg-names = "phy_ctrl", "pmu1";
clocks = <&usb_clk 8>; clocks = <&usb_clk 8>;
clock-names = "usb_phy"; clock-names = "usb_phy";
resets = <&usb_clk 1>; resets = <&usb_clk 0>, <&usb_clk 1>;
reset-names = "usb1_reset"; reset-names = "usb0_reset", "usb1_reset";
status = "disabled"; status = "disabled";
}; };
...@@ -380,7 +449,8 @@ spi2: spi@01c17000 { ...@@ -380,7 +449,8 @@ spi2: spi@01c17000 {
interrupts = <12>; interrupts = <12>;
clocks = <&ahb_gates 22>, <&spi2_clk>; clocks = <&ahb_gates 22>, <&spi2_clk>;
clock-names = "ahb", "mod"; clock-names = "ahb", "mod";
dmas = <&dma 1 29>, <&dma 1 28>; dmas = <&dma SUN4I_DMA_DEDICATED 29>,
<&dma SUN4I_DMA_DEDICATED 28>;
dma-names = "rx", "tx"; dma-names = "rx", "tx";
status = "disabled"; status = "disabled";
#address-cells = <1>; #address-cells = <1>;
...@@ -408,43 +478,43 @@ pio: pinctrl@01c20800 { ...@@ -408,43 +478,43 @@ pio: pinctrl@01c20800 {
uart1_pins_a: uart1@0 { uart1_pins_a: uart1@0 {
allwinner,pins = "PE10", "PE11"; allwinner,pins = "PE10", "PE11";
allwinner,function = "uart1"; allwinner,function = "uart1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
uart1_pins_b: uart1@1 { uart1_pins_b: uart1@1 {
allwinner,pins = "PG3", "PG4"; allwinner,pins = "PG3", "PG4";
allwinner,function = "uart1"; allwinner,function = "uart1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c0_pins_a: i2c0@0 { i2c0_pins_a: i2c0@0 {
allwinner,pins = "PB0", "PB1"; allwinner,pins = "PB0", "PB1";
allwinner,function = "i2c0"; allwinner,function = "i2c0";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c1_pins_a: i2c1@0 { i2c1_pins_a: i2c1@0 {
allwinner,pins = "PB15", "PB16"; allwinner,pins = "PB15", "PB16";
allwinner,function = "i2c1"; allwinner,function = "i2c1";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
i2c2_pins_a: i2c2@0 { i2c2_pins_a: i2c2@0 {
allwinner,pins = "PB17", "PB18"; allwinner,pins = "PB17", "PB18";
allwinner,function = "i2c2"; allwinner,function = "i2c2";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc0_pins_a: mmc0@0 { mmc0_pins_a: mmc0@0 {
allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
allwinner,function = "mmc0"; allwinner,function = "mmc0";
allwinner,drive = <2>; allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -460,6 +530,13 @@ wdt: watchdog@01c20c90 { ...@@ -460,6 +530,13 @@ wdt: watchdog@01c20c90 {
reg = <0x01c20c90 0x10>; reg = <0x01c20c90 0x10>;
}; };
lradc: lradc@01c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x100>;
interrupts = <31>;
status = "disabled";
};
sid: eeprom@01c23800 { sid: eeprom@01c23800 {
compatible = "allwinner,sun4i-a10-sid"; compatible = "allwinner,sun4i-a10-sid";
reg = <0x01c23800 0x10>; reg = <0x01c23800 0x10>;
...@@ -469,6 +546,7 @@ rtp: rtp@01c25000 { ...@@ -469,6 +546,7 @@ rtp: rtp@01c25000 {
compatible = "allwinner,sun4i-a10-ts"; compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>; reg = <0x01c25000 0x100>;
interrupts = <29>; interrupts = <29>;
#thermal-sensor-cells = <0>;
}; };
uart1: serial@01c28400 { uart1: serial@01c28400 {
......
...@@ -48,8 +48,11 @@ ...@@ -48,8 +48,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun6i-a31.dtsi" #include "sun6i-a31.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Allwinner A31 APP4 EVB1 Evaluation Board"; model = "Allwinner A31 APP4 EVB1 Evaluation Board";
...@@ -64,8 +67,8 @@ pio: pinctrl@01c20800 { ...@@ -64,8 +67,8 @@ pio: pinctrl@01c20800 {
usb1_vbus_pin_a: usb1_vbus_pin@0 { usb1_vbus_pin_a: usb1_vbus_pin@0 {
allwinner,pins = "PH27"; allwinner,pins = "PH27";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -87,7 +90,7 @@ uart0: serial@01c28000 { ...@@ -87,7 +90,7 @@ uart0: serial@01c28000 {
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-0 = <&usb1_vbus_pin_a>; pinctrl-0 = <&usb1_vbus_pin_a>;
gpio = <&pio 7 27 0>; gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
...@@ -48,8 +48,11 @@ ...@@ -48,8 +48,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun6i-a31.dtsi" #include "sun6i-a31.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "WITS A31 Colombus Evaluation Board"; model = "WITS A31 Colombus Evaluation Board";
...@@ -65,7 +68,7 @@ mmc0: mmc@01c0f000 { ...@@ -65,7 +68,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>;
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_vcc3v0>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 0 8 0>; /* PA8 */ cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -81,21 +84,21 @@ ehci1: usb@01c1b000 { ...@@ -81,21 +84,21 @@ ehci1: usb@01c1b000 {
pio: pinctrl@01c20800 { pio: pinctrl@01c20800 {
mmc0_pins_a: mmc0@0 { mmc0_pins_a: mmc0@0 {
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
mmc0_cd_pin_colombus: mmc0_cd_pin@0 { mmc0_cd_pin_colombus: mmc0_cd_pin@0 {
allwinner,pins = "PA8"; allwinner,pins = "PA8";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
usb2_vbus_pin_colombus: usb2_vbus_pin@0 { usb2_vbus_pin_colombus: usb2_vbus_pin@0 {
allwinner,pins = "PH24"; allwinner,pins = "PH24";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -127,7 +130,7 @@ i2c2: i2c@01c2b400 { ...@@ -127,7 +130,7 @@ i2c2: i2c@01c2b400 {
reg_usb2_vbus: usb2-vbus { reg_usb2_vbus: usb2-vbus {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&usb2_vbus_pin_colombus>; pinctrl-0 = <&usb2_vbus_pin_colombus>;
gpio = <&pio 7 24 0>; gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
...@@ -48,8 +48,11 @@ ...@@ -48,8 +48,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun6i-a31.dtsi" #include "sun6i-a31.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Merrii A31 Hummingbird"; model = "Merrii A31 Hummingbird";
...@@ -58,98 +61,96 @@ / { ...@@ -58,98 +61,96 @@ / {
chosen { chosen {
bootargs = "earlyprintk console=ttyS0,115200"; bootargs = "earlyprintk console=ttyS0,115200";
}; };
};
&ehci0 {
status = "okay";
};
soc@01c00000 { &gmac {
mmc0: mmc@01c0f000 { pinctrl-names = "default";
pinctrl-names = "default"; pinctrl-0 = <&gmac_pins_rgmii_a>;
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; phy = <&phy1>;
vmmc-supply = <&reg_vcc3v0>; phy-mode = "rgmii";
bus-width = <4>; snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
cd-gpios = <&pio 0 8 0>; /* PA8 */ snps,reset-active-low;
cd-inverted; snps,reset-delays-us = <0 10000 30000>;
status = "okay"; status = "okay";
};
phy1: ethernet-phy@1 {
usbphy: phy@01c19400 { reg = <1>;
usb1_vbus-supply = <&reg_usb1_vbus>;
status = "okay";
};
ehci0: usb@01c1a000 {
status = "okay";
};
ohci0: usb@01c1a400 {
status = "okay";
};
pio: pinctrl@01c20800 {
mmc0_pins_a: mmc0@0 {
/* external pull-ups missing for some pins */
allwinner,pull = <1>;
};
mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
allwinner,pins = "PA8";
allwinner,function = "gpio_in";
allwinner,drive = <0>;
allwinner,pull = <1>;
};
usb1_vbus_pin_a: usb1_vbus_pin@0 {
allwinner,pins = "PH24";
allwinner,function = "gpio_out";
allwinner,drive = <0>;
allwinner,pull = <0>;
};
};
uart0: serial@01c28000 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
i2c0: i2c@01c2ac00 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
/* pull-ups and devices require AXP221 DLDO3 */
status = "failed";
};
i2c1: i2c@01c2b000 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins_a>;
status = "okay";
};
i2c2: i2c@01c2b400 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
gmac: ethernet@01c30000 {
pinctrl-names = "default";
pinctrl-0 = <&gmac_pins_rgmii_a>;
phy = <&phy1>;
phy-mode = "rgmii";
status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
};
}; };
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
/* pull-ups and devices require AXP221 DLDO3 */
status = "failed";
};
reg_usb1_vbus: usb1-vbus { &i2c1 {
pinctrl-0 = <&usb1_vbus_pin_a>; pinctrl-names = "default";
gpio = <&pio 7 24 0>; /* PH24 */ pinctrl-0 = <&i2c1_pins_a>;
status = "okay"; status = "okay";
};
&i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
}; };
}; };
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
vmmc-supply = <&reg_vcc3v0>;
bus-width = <4>;
cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
cd-inverted;
status = "okay";
};
&mmc0_pins_a {
/* external pull-ups missing for some pins */
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
&ohci0 {
status = "okay";
};
&pio {
mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
allwinner,pins = "PA8";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
};
&reg_usb1_vbus {
gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&usb1_vbus_pin_a {
/* different pin from sunxi-common-regulators */
allwinner,pins = "PH24";
};
&usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>;
status = "okay";
};
...@@ -46,8 +46,11 @@ ...@@ -46,8 +46,11 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun6i-a31.dtsi" #include "sun6i-a31.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Mele M9 / A1000G Quad top set box"; model = "Mele M9 / A1000G Quad top set box";
...@@ -63,7 +66,7 @@ mmc0: mmc@01c0f000 { ...@@ -63,7 +66,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 22 0>; /* PH22 */ cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -85,22 +88,22 @@ pio: pinctrl@01c20800 { ...@@ -85,22 +88,22 @@ pio: pinctrl@01c20800 {
led_pins_m9: led_pins@0 { led_pins_m9: led_pins@0 {
allwinner,pins = "PH13"; allwinner,pins = "PH13";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc0_cd_pin_m9: mmc0_cd_pin@0 { mmc0_cd_pin_m9: mmc0_cd_pin@0 {
allwinner,pins = "PH22"; allwinner,pins = "PH22";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
usb1_vbus_pin_m9: usb1_vbus_pin@0 { usb1_vbus_pin_m9: usb1_vbus_pin@0 {
allwinner,pins = "PC27"; allwinner,pins = "PC27";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -121,6 +124,12 @@ phy1: ethernet-phy@1 { ...@@ -121,6 +124,12 @@ phy1: ethernet-phy@1 {
reg = <1>; reg = <1>;
}; };
}; };
ir@01f02000 {
pinctrl-names = "default";
pinctrl-0 = <&ir_pins_a>;
status = "okay";
};
}; };
leds { leds {
...@@ -130,14 +139,14 @@ leds { ...@@ -130,14 +139,14 @@ leds {
blue { blue {
label = "m9:blue:usr"; label = "m9:blue:usr";
gpios = <&pio 7 13 0>; gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>;
}; };
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&usb1_vbus_pin_m9>; pinctrl-0 = <&usb1_vbus_pin_m9>;
gpio = <&pio 2 27 0>; gpio = <&pio 2 27 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
This diff is collapsed.
/*
* Copyright 2014 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun6i-a31s.dtsi"
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
model = "CSQ CS908 top set box";
compatible = "csq,cs908", "allwinner,sun6i-a31s";
};
&usbphy {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&pio {
usb1_vbus_pin_csq908: usb1_vbus_pin@0 {
allwinner,pins = "PC27";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&gmac {
pinctrl-names = "default";
pinctrl-0 = <&gmac_pins_mii_a>;
phy = <&phy1>;
phy-mode = "mii";
status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
};
&ir {
pinctrl-names = "default";
pinctrl-0 = <&ir_pins_a>;
status = "okay";
};
/*
* Copyright 2014 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* The A31s is the same die as the A31 in a different package, this is
* reflected by it having different pinctrl compatible everything else is
* identical.
*/
#include "sun6i-a31.dtsi"
&pio {
compatible = "allwinner,sun6i-a31s-pinctrl";
};
...@@ -48,8 +48,12 @@ ...@@ -48,8 +48,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "LeMaker Banana Pi"; model = "LeMaker Banana Pi";
...@@ -67,7 +71,7 @@ mmc0: mmc@01c0f000 { ...@@ -67,7 +71,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 10 0>; /* PH10 */ cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -102,22 +106,22 @@ pinctrl@01c20800 { ...@@ -102,22 +106,22 @@ pinctrl@01c20800 {
mmc0_cd_pin_bananapi: mmc0_cd_pin@0 { mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
allwinner,pins = "PH10"; allwinner,pins = "PH10";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
gmac_power_pin_bananapi: gmac_power_pin@0 { gmac_power_pin_bananapi: gmac_power_pin@0 {
allwinner,pins = "PH23"; allwinner,pins = "PH23";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_bananapi: led_pins@0 { led_pins_bananapi: led_pins@0 {
allwinner,pins = "PH24"; allwinner,pins = "PH24";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -154,7 +158,7 @@ axp209: pmic@34 { ...@@ -154,7 +158,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -188,7 +192,7 @@ leds { ...@@ -188,7 +192,7 @@ leds {
green { green {
label = "bananapi:green:usr"; label = "bananapi:green:usr";
gpios = <&pio 7 24 0>; gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
}; };
}; };
...@@ -209,6 +213,6 @@ reg_gmac_3v3: gmac-3v3 { ...@@ -209,6 +213,6 @@ reg_gmac_3v3: gmac-3v3 {
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
startup-delay-us = <100000>; startup-delay-us = <100000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 23 0>; gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
}; };
}; };
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun7i-a20.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
/ {
model = "LeMaker Banana Pro";
compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_bananapro>;
blue {
label = "bananapro:blue:usr";
gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
};
green {
label = "bananapro:green:usr";
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
};
};
reg_gmac_3v3: gmac-3v3 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gmac_power_pin_bananapro>;
regulator-name = "gmac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
startup-delay-us = <100000>;
enable-active-high;
gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
};
reg_vmmc3: vmmc3 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&vmmc3_pin_bananapro>;
regulator-name = "vmmc3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
};
};
&ahci {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&gmac {
pinctrl-names = "default";
pinctrl-0 = <&gmac_pins_rgmii_a>;
phy = <&phy1>;
phy-mode = "rgmii";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <1>;
};
};
&i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
};
&ir0 {
pinctrl-names = "default";
pinctrl-0 = <&ir0_pins_a>;
status = "okay";
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapro>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
cd-inverted;
status = "okay";
};
&mmc3 {
pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins_a>;
vmmc-supply = <&reg_vmmc3>;
bus-width = <4>;
non-removable;
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&pio {
gmac_power_pin_bananapro: gmac_power_pin@0 {
allwinner,pins = "PH23";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
led_pins_bananapro: led_pins@0 {
allwinner,pins = "PH24", "PG2";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
mmc0_cd_pin_bananapro: mmc0_cd_pin@0 {
allwinner,pins = "PH10";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
usb1_vbus_pin_bananapro: usb1_vbus_pin@0 {
allwinner,pins = "PH0";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
usb2_vbus_pin_bananapro: usb2_vbus_pin@0 {
allwinner,pins = "PH1";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
vmmc3_pin_bananapro: vmmc3_pin@0 {
allwinner,pins = "PH22";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&reg_usb1_vbus {
pinctrl-0 = <&usb1_vbus_pin_bananapro>;
gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
status = "okay";
};
&reg_usb2_vbus {
pinctrl-0 = <&usb2_vbus_pin_bananapro>;
gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins_a>;
status = "okay";
};
&uart7 {
pinctrl-names = "default";
pinctrl-0 = <&uart7_pins_a>;
status = "okay";
};
&usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
...@@ -3,17 +3,57 @@ ...@@ -3,17 +3,57 @@
* *
* Maxime Ripard <maxime.ripard@free-electrons.com> * Maxime Ripard <maxime.ripard@free-electrons.com>
* *
* The code contained herein is licensed under the GNU General Public * This file is dual-licensed: you can use it either under the terms
* License. You may obtain a copy of the GNU General Public License * of the GPL or the X11 license, at your option. Note that this dual
* Version 2 or later at the following locations: * licensing only applies to this file, and not this project as a
* whole.
* *
* http://www.opensource.org/licenses/gpl-license.html * a) This file is free software; you can redistribute it and/or
* http://www.gnu.org/copyleft/gpl.html * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Cubietech Cubieboard2"; model = "Cubietech Cubieboard2";
...@@ -25,7 +65,7 @@ mmc0: mmc@01c0f000 { ...@@ -25,7 +65,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -61,8 +101,8 @@ pinctrl@01c20800 { ...@@ -61,8 +101,8 @@ pinctrl@01c20800 {
led_pins_cubieboard2: led_pins@0 { led_pins_cubieboard2: led_pins@0 {
allwinner,pins = "PH20", "PH21"; allwinner,pins = "PH20", "PH21";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -84,13 +124,9 @@ i2c0: i2c@01c2ac00 { ...@@ -84,13 +124,9 @@ i2c0: i2c@01c2ac00 {
status = "okay"; status = "okay";
axp209: pmic@34 { axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <1>;
}; };
}; };
...@@ -120,12 +156,12 @@ leds { ...@@ -120,12 +156,12 @@ leds {
blue { blue {
label = "cubieboard2:blue:usr"; label = "cubieboard2:blue:usr";
gpios = <&pio 7 21 0>; gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
}; };
green { green {
label = "cubieboard2:green:usr"; label = "cubieboard2:green:usr";
gpios = <&pio 7 20 0>; gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
}; };
}; };
...@@ -141,3 +177,34 @@ reg_usb2_vbus: usb2-vbus { ...@@ -141,3 +177,34 @@ reg_usb2_vbus: usb2-vbus {
status = "okay"; status = "okay";
}; };
}; };
#include "axp209.dtsi"
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1450000>;
regulator-name = "vdd-cpu";
};
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-int-dll";
};
&reg_ldo1 {
regulator-name = "vdd-rtc";
};
&reg_ldo2 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "avcc";
};
...@@ -3,17 +3,57 @@ ...@@ -3,17 +3,57 @@
* *
* Oliver Schinagl <oliver@schinagl.nl> * Oliver Schinagl <oliver@schinagl.nl>
* *
* The code contained herein is licensed under the GNU General Public * This file is dual-licensed: you can use it either under the terms
* License. You may obtain a copy of the GNU General Public License * of the GPL or the X11 license, at your option. Note that this dual
* Version 2 or later at the following locations: * licensing only applies to this file, and not this project as a
* whole.
* *
* http://www.opensource.org/licenses/gpl-license.html * a) This file is free software; you can redistribute it and/or
* http://www.gnu.org/copyleft/gpl.html * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Cubietech Cubietruck"; model = "Cubietech Cubietruck";
...@@ -25,7 +65,7 @@ mmc0: mmc@01c0f000 { ...@@ -25,7 +65,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -70,35 +110,35 @@ ohci1: usb@01c1c400 { ...@@ -70,35 +110,35 @@ ohci1: usb@01c1c400 {
pinctrl@01c20800 { pinctrl@01c20800 {
mmc3_pins_a: mmc3@0 { mmc3_pins_a: mmc3@0 {
/* AP6210 requires pull-up */ /* AP6210 requires pull-up */
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
vmmc3_pin_cubietruck: vmmc3_pin@0 { vmmc3_pin_cubietruck: vmmc3_pin@0 {
allwinner,pins = "PH9"; allwinner,pins = "PH9";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
allwinner,pins = "PH12"; allwinner,pins = "PH12";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_cubietruck: led_pins@0 { led_pins_cubietruck: led_pins@0 {
allwinner,pins = "PH7", "PH11", "PH20", "PH21"; allwinner,pins = "PH7", "PH11", "PH20", "PH21";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb0_vbus_pin_a: usb0_vbus_pin@0 { usb0_vbus_pin_a: usb0_vbus_pin@0 {
allwinner,pins = "PH17"; allwinner,pins = "PH17";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -126,13 +166,9 @@ i2c0: i2c@01c2ac00 { ...@@ -126,13 +166,9 @@ i2c0: i2c@01c2ac00 {
status = "okay"; status = "okay";
axp209: pmic@34 { axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <1>;
}; };
}; };
...@@ -168,34 +204,34 @@ leds { ...@@ -168,34 +204,34 @@ leds {
blue { blue {
label = "cubietruck:blue:usr"; label = "cubietruck:blue:usr";
gpios = <&pio 7 21 0>; gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
}; };
orange { orange {
label = "cubietruck:orange:usr"; label = "cubietruck:orange:usr";
gpios = <&pio 7 20 0>; gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
}; };
white { white {
label = "cubietruck:white:usr"; label = "cubietruck:white:usr";
gpios = <&pio 7 11 0>; gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
}; };
green { green {
label = "cubietruck:green:usr"; label = "cubietruck:green:usr";
gpios = <&pio 7 7 0>; gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
}; };
}; };
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
pinctrl-0 = <&ahci_pwr_pin_cubietruck>; pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
gpio = <&pio 7 12 0>; gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
reg_usb0_vbus: usb0-vbus { reg_usb0_vbus: usb0-vbus {
pinctrl-0 = <&usb0_vbus_pin_a>; pinctrl-0 = <&usb0_vbus_pin_a>;
gpio = <&pio 7 17 0>; gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
...@@ -215,6 +251,37 @@ reg_vmmc3: vmmc3 { ...@@ -215,6 +251,37 @@ reg_vmmc3: vmmc3 {
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 9 0>; gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
}; };
}; };
#include "axp209.dtsi"
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1450000>;
regulator-name = "vdd-cpu";
};
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-int-dll";
};
&reg_ldo1 {
regulator-name = "vdd-rtc";
};
&reg_ldo2 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "avcc";
};
...@@ -12,8 +12,12 @@ ...@@ -12,8 +12,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Merrii A20 Hummingbird"; model = "Merrii A20 Hummingbird";
...@@ -25,7 +29,7 @@ mmc0: mmc@01c0f000 { ...@@ -25,7 +29,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_vcc3v0>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -70,29 +74,29 @@ pio: pinctrl@01c20800 { ...@@ -70,29 +74,29 @@ pio: pinctrl@01c20800 {
ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 { ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 {
allwinner,pins = "PH15"; allwinner,pins = "PH15";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 { usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 {
allwinner,pins = "PH2"; allwinner,pins = "PH2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 { mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 {
allwinner,pins = "PH9"; allwinner,pins = "PH9";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 { gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 {
allwinner,pins = "PH16"; allwinner,pins = "PH16";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -147,7 +151,7 @@ axp209: pmic@34 { ...@@ -147,7 +151,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
}; };
...@@ -184,7 +188,7 @@ gmac: ethernet@01c50000 { ...@@ -184,7 +188,7 @@ gmac: ethernet@01c50000 {
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-supply = <&reg_gmac_vdd>; phy-supply = <&reg_gmac_vdd>;
/* phy reset config */ /* phy reset config */
snps,reset-gpio = <&pio 0 17 0>; /* PA17 */ snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
snps,reset-active-low; snps,reset-active-low;
/* wait 1s after reset, otherwise fail to read phy id */ /* wait 1s after reset, otherwise fail to read phy id */
snps,reset-delays-us = <0 10000 1000000>; snps,reset-delays-us = <0 10000 1000000>;
...@@ -198,13 +202,13 @@ phy1: ethernet-phy@1 { ...@@ -198,13 +202,13 @@ phy1: ethernet-phy@1 {
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>; pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>;
gpio = <&pio 7 15 0>; /* PH15 */ gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
status = "okay"; status = "okay";
}; };
reg_usb1_vbus: usb1-vbus { reg_usb1_vbus: usb1-vbus {
pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>; pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>;
gpio = <&pio 7 2 0>; /* PH2 */ gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
status = "okay"; status = "okay";
}; };
...@@ -220,7 +224,7 @@ reg_mmc3_vdd: mmc3_vdd { ...@@ -220,7 +224,7 @@ reg_mmc3_vdd: mmc3_vdd {
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <3000000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 9 0>; /* PH9 */ gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
}; };
reg_gmac_vdd: gmac_vdd { reg_gmac_vdd: gmac_vdd {
...@@ -231,6 +235,6 @@ reg_gmac_vdd: gmac_vdd { ...@@ -231,6 +235,6 @@ reg_gmac_vdd: gmac_vdd {
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <3000000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 16 0>; /* PH16 */ gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
}; };
}; };
...@@ -46,8 +46,12 @@ ...@@ -46,8 +46,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "I12 / Q5 / QT840A A20 tvbox"; model = "I12 / Q5 / QT840A A20 tvbox";
...@@ -59,7 +63,7 @@ mmc0: mmc@01c0f000 { ...@@ -59,7 +63,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -98,35 +102,35 @@ ohci1: usb@01c1c400 { ...@@ -98,35 +102,35 @@ ohci1: usb@01c1c400 {
pinctrl@01c20800 { pinctrl@01c20800 {
mmc3_pins_a: mmc3@0 { mmc3_pins_a: mmc3@0 {
/* AP6210 / AP6330 requires pull-up */ /* AP6210 / AP6330 requires pull-up */
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
vmmc3_pin_i12_tvbox: vmmc3_pin@0 { vmmc3_pin_i12_tvbox: vmmc3_pin@0 {
allwinner,pins = "PH2"; allwinner,pins = "PH2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
vmmc3_io_pin_i12_tvbox: vmmc3_io_pin@0 { vmmc3_io_pin_i12_tvbox: vmmc3_io_pin@0 {
allwinner,pins = "PH12"; allwinner,pins = "PH12";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
gmac_power_pin_i12_tvbox: gmac_power_pin@0 { gmac_power_pin_i12_tvbox: gmac_power_pin@0 {
allwinner,pins = "PH21"; allwinner,pins = "PH21";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_i12_tvbox: led_pins@0 { led_pins_i12_tvbox: led_pins@0 {
allwinner,pins = "PH9", "PH20"; allwinner,pins = "PH9", "PH20";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -151,7 +155,7 @@ axp209: pmic@34 { ...@@ -151,7 +155,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -179,12 +183,12 @@ leds { ...@@ -179,12 +183,12 @@ leds {
red { red {
label = "i12_tvbox:red:usr"; label = "i12_tvbox:red:usr";
gpios = <&pio 7 9 1>; gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;
}; };
blue { blue {
label = "i12_tvbox:blue:usr"; label = "i12_tvbox:blue:usr";
gpios = <&pio 7 20 0>; gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
}; };
}; };
...@@ -204,7 +208,7 @@ reg_vmmc3: vmmc3 { ...@@ -204,7 +208,7 @@ reg_vmmc3: vmmc3 {
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 2 0>; gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
}; };
reg_vmmc3_io: vmmc3-io { reg_vmmc3_io: vmmc3-io {
...@@ -217,7 +221,7 @@ reg_vmmc3_io: vmmc3-io { ...@@ -217,7 +221,7 @@ reg_vmmc3_io: vmmc3-io {
/* This controls VCC-PI, must be always on! */ /* This controls VCC-PI, must be always on! */
regulator-always-on; regulator-always-on;
enable-active-high; enable-active-high;
gpio = <&pio 7 12 0>; gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
}; };
reg_gmac_3v3: gmac-3v3 { reg_gmac_3v3: gmac-3v3 {
...@@ -229,6 +233,6 @@ reg_gmac_3v3: gmac-3v3 { ...@@ -229,6 +233,6 @@ reg_gmac_3v3: gmac-3v3 {
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
startup-delay-us = <50000>; startup-delay-us = <50000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 21 0>; gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>;
}; };
}; };
...@@ -48,8 +48,12 @@ ...@@ -48,8 +48,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Mele M3"; model = "Mele M3";
...@@ -61,7 +65,7 @@ mmc0: mmc@01c0f000 { ...@@ -61,7 +65,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -101,8 +105,8 @@ pinctrl@01c20800 { ...@@ -101,8 +105,8 @@ pinctrl@01c20800 {
led_pins_m3: led_pins@0 { led_pins_m3: led_pins@0 {
allwinner,pins = "PH20"; allwinner,pins = "PH20";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -127,7 +131,7 @@ axp209: pmic@34 { ...@@ -127,7 +131,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -154,7 +158,7 @@ leds { ...@@ -154,7 +158,7 @@ leds {
blue { blue {
label = "m3:blue:usr"; label = "m3:blue:usr";
gpios = <&pio 7 20 0>; gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
}; };
}; };
......
...@@ -49,8 +49,12 @@ ...@@ -49,8 +49,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A20-OLinuXino-LIME"; model = "Olimex A20-OLinuXino-LIME";
...@@ -62,7 +66,7 @@ mmc0: mmc@01c0f000 { ...@@ -62,7 +66,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -98,15 +102,15 @@ pinctrl@01c20800 { ...@@ -98,15 +102,15 @@ pinctrl@01c20800 {
ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
allwinner,pins = "PC3"; allwinner,pins = "PC3";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_olinuxinolime: led_pins@0 { led_pins_olinuxinolime: led_pins@0 {
allwinner,pins = "PH2"; allwinner,pins = "PH2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -125,7 +129,7 @@ axp209: pmic@34 { ...@@ -125,7 +129,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -152,14 +156,14 @@ leds { ...@@ -152,14 +156,14 @@ leds {
green { green {
label = "a20-olinuxino-lime:green:usr"; label = "a20-olinuxino-lime:green:usr";
gpios = <&pio 7 2 0>; gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
gpio = <&pio 2 3 0>; gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
......
...@@ -46,8 +46,12 @@ ...@@ -46,8 +46,12 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A20-OLinuXino-LIME2"; model = "Olimex A20-OLinuXino-LIME2";
...@@ -59,7 +63,7 @@ mmc0: mmc@01c0f000 { ...@@ -59,7 +63,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -95,15 +99,15 @@ pinctrl@01c20800 { ...@@ -95,15 +99,15 @@ pinctrl@01c20800 {
ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
allwinner,pins = "PC3"; allwinner,pins = "PC3";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
led_pins_olinuxinolime: led_pins@0 { led_pins_olinuxinolime: led_pins@0 {
allwinner,pins = "PH2"; allwinner,pins = "PH2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -122,7 +126,7 @@ axp209: pmic@34 { ...@@ -122,7 +126,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -199,14 +203,14 @@ leds { ...@@ -199,14 +203,14 @@ leds {
green { green {
label = "a20-olinuxino-lime2:green:usr"; label = "a20-olinuxino-lime2:green:usr";
gpios = <&pio 7 2 0>; gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
gpio = <&pio 2 3 0>; gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
......
...@@ -12,8 +12,13 @@ ...@@ -12,8 +12,13 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Olimex A20-Olinuxino Micro"; model = "Olimex A20-Olinuxino Micro";
...@@ -36,7 +41,7 @@ mmc0: mmc@01c0f000 { ...@@ -36,7 +41,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -46,7 +51,7 @@ mmc3: mmc@01c12000 { ...@@ -46,7 +51,7 @@ mmc3: mmc@01c12000 {
pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>; pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 11 0>; /* PH11 */ cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -88,15 +93,69 @@ pinctrl@01c20800 { ...@@ -88,15 +93,69 @@ pinctrl@01c20800 {
mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 { mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
allwinner,pins = "PH11"; allwinner,pins = "PH11";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
led_pins_olinuxino: led_pins@0 { led_pins_olinuxino: led_pins@0 {
allwinner,pins = "PH2"; allwinner,pins = "PH2";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <1>; allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
lradc: lradc@01c22800 {
vref-supply = <&reg_vcc3v0>;
status = "okay";
button@191 {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
channel = <0>;
voltage = <191274>;
};
button@392 {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
channel = <0>;
voltage = <392644>;
};
button@601 {
label = "Menu";
linux,code = <KEY_MENU>;
channel = <0>;
voltage = <601151>;
};
button@795 {
label = "Search";
linux,code = <KEY_SEARCH>;
channel = <0>;
voltage = <795090>;
};
button@987 {
label = "Home";
linux,code = <KEY_HOMEPAGE>;
channel = <0>;
voltage = <987387>;
};
button@1184 {
label = "Esc";
linux,code = <KEY_ESC>;
channel = <0>;
voltage = <1184678>;
};
button@1398 {
label = "Enter";
linux,code = <KEY_ENTER>;
channel = <0>;
voltage = <1398804>;
}; };
}; };
...@@ -127,7 +186,7 @@ axp209: pmic@34 { ...@@ -127,7 +186,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -166,7 +225,7 @@ leds { ...@@ -166,7 +225,7 @@ leds {
green { green {
label = "a20-olinuxino-micro:green:usr"; label = "a20-olinuxino-micro:green:usr";
gpios = <&pio 7 2 0>; gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
}; };
}; };
......
...@@ -47,10 +47,13 @@ ...@@ -47,10 +47,13 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun7i-a20.dtsi" #include "sun7i-a20.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "LinkSprite pcDuino3"; model = "LinkSprite pcDuino3";
...@@ -62,7 +65,7 @@ mmc0: mmc@01c0f000 { ...@@ -62,7 +65,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
vmmc-supply = <&reg_vcc3v3>; vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -102,15 +105,15 @@ ahci_pwr_pin_a: ahci_pwr_pin@0 { ...@@ -102,15 +105,15 @@ ahci_pwr_pin_a: ahci_pwr_pin@0 {
led_pins_pcduino3: led_pins@0 { led_pins_pcduino3: led_pins@0 {
allwinner,pins = "PH15", "PH16"; allwinner,pins = "PH15", "PH16";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
key_pins_pcduino3: key_pins@0 { key_pins_pcduino3: key_pins@0 {
allwinner,pins = "PH17", "PH18", "PH19"; allwinner,pins = "PH17", "PH18", "PH19";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
}; };
...@@ -135,7 +138,7 @@ axp209: pmic@34 { ...@@ -135,7 +138,7 @@ axp209: pmic@34 {
compatible = "x-powers,axp209"; compatible = "x-powers,axp209";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 8>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
...@@ -203,7 +206,7 @@ reg_usb2_vbus: usb2-vbus { ...@@ -203,7 +206,7 @@ reg_usb2_vbus: usb2-vbus {
}; };
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
gpio = <&pio 7 2 0>; gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
}; };
}; };
This diff is collapsed.
/*
* Copyright 2015 Hans de Goede <hdegoede@redhat.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this file; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* The Ippo Q8H v1.2 is almost identical to the v5, still it needs a separate
* dtb file since some gpio-s surrounding the wlan/bluetooth are different,
* and it uses different camera sensors.
*/
#include "sun8i-a23-ippo-q8h-v5.dts"
/ {
model = "Ippo Q8H Dual Core Tablet (v1.2)";
compatible = "ippo,q8h-v1.2", "allwinner,sun8i-a23";
};
...@@ -48,13 +48,21 @@ ...@@ -48,13 +48,21 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "sun8i-a23.dtsi" #include "sun8i-a23.dtsi"
/include/ "sunxi-common-regulators.dtsi" #include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Ippo Q8H Dual Core Tablet (v5)"; model = "Ippo Q8H Dual Core Tablet (v5)";
compatible = "ippo,q8h-v5", "allwinner,sun8i-a23"; compatible = "ippo,q8h-v5", "allwinner,sun8i-a23";
aliases {
serial0 = &r_uart;
};
chosen { chosen {
bootargs = "earlyprintk console=ttyS0,115200"; bootargs = "earlyprintk console=ttyS0,115200";
}; };
...@@ -65,7 +73,7 @@ mmc0: mmc@01c0f000 { ...@@ -65,7 +73,7 @@ mmc0: mmc@01c0f000 {
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>;
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_vcc3v0>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 1 4 0>; /* PB4 */ cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
...@@ -74,8 +82,27 @@ pinctrl@01c20800 { ...@@ -74,8 +82,27 @@ pinctrl@01c20800 {
mmc0_cd_pin_q8h: mmc0_cd_pin@0 { mmc0_cd_pin_q8h: mmc0_cd_pin@0 {
allwinner,pins = "PB4"; allwinner,pins = "PB4";
allwinner,function = "gpio_in"; allwinner,function = "gpio_in";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <1>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
};
lradc: lradc@01c22800 {
vref-supply = <&reg_vcc3v0>;
status = "okay";
button@200 {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
channel = <0>;
voltage = <200000>;
};
button@400 {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
channel = <0>;
voltage = <400000>;
}; };
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -47,39 +47,40 @@ ...@@ -47,39 +47,40 @@
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
*/ */
/ { #include <dt-bindings/gpio/gpio.h>
soc@01c00000 { #include <dt-bindings/pinctrl/sun4i-a10.h>
pio: pinctrl@01c20800 {
ahci_pwr_pin_a: ahci_pwr_pin@0 {
allwinner,pins = "PB8";
allwinner,function = "gpio_out";
allwinner,drive = <0>;
allwinner,pull = <0>;
};
usb0_vbus_pin_a: usb0_vbus_pin@0 { &pio {
allwinner,pins = "PB9"; ahci_pwr_pin_a: ahci_pwr_pin@0 {
allwinner,function = "gpio_out"; allwinner,pins = "PB8";
allwinner,drive = <0>; allwinner,function = "gpio_out";
allwinner,pull = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
}; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
usb1_vbus_pin_a: usb1_vbus_pin@0 { usb0_vbus_pin_a: usb0_vbus_pin@0 {
allwinner,pins = "PH6"; allwinner,pins = "PB9";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
usb2_vbus_pin_a: usb2_vbus_pin@0 { usb1_vbus_pin_a: usb1_vbus_pin@0 {
allwinner,pins = "PH3"; allwinner,pins = "PH6";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
allwinner,drive = <0>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <0>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
}; };
usb2_vbus_pin_a: usb2_vbus_pin@0 {
allwinner,pins = "PH3";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
/ {
reg_ahci_5v: ahci-5v { reg_ahci_5v: ahci-5v {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
pinctrl-names = "default"; pinctrl-names = "default";
...@@ -89,7 +90,7 @@ reg_ahci_5v: ahci-5v { ...@@ -89,7 +90,7 @@ reg_ahci_5v: ahci-5v {
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
regulator-boot-on; regulator-boot-on;
enable-active-high; enable-active-high;
gpio = <&pio 1 8 0>; gpio = <&pio 1 8 GPIO_ACTIVE_HIGH>;
status = "disabled"; status = "disabled";
}; };
...@@ -101,7 +102,7 @@ reg_usb0_vbus: usb0-vbus { ...@@ -101,7 +102,7 @@ reg_usb0_vbus: usb0-vbus {
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
enable-active-high; enable-active-high;
gpio = <&pio 1 9 0>; gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>;
status = "disabled"; status = "disabled";
}; };
...@@ -113,7 +114,7 @@ reg_usb1_vbus: usb1-vbus { ...@@ -113,7 +114,7 @@ reg_usb1_vbus: usb1-vbus {
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 6 0>; gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
status = "disabled"; status = "disabled";
}; };
...@@ -125,7 +126,7 @@ reg_usb2_vbus: usb2-vbus { ...@@ -125,7 +126,7 @@ reg_usb2_vbus: usb2-vbus {
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
enable-active-high; enable-active-high;
gpio = <&pio 7 3 0>; gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>;
status = "disabled"; status = "disabled";
}; };
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment