Commit 8898cb41 authored by Arnd Bergmann's avatar Arnd Bergmann

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

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

Merge "Allwinner DT Additions for 4.6" from Maxime Ripard:

Quite a few changes, among which:
  - Support for the A83t
  - Support for the eMMC DDR on a few boards
  - Support for the OTG controller on a few boards
  - New boards: Itead Ibox, Cubietruck plus, Homlet v2, Lamobo R1

* tag 'sunxi-dt-for-4.6' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (34 commits)
  ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
  ARM: dts: sun8i: Add ir receiver nodes to H3 dtsi
  ARM: dts: sun8i-h3: Add R_PIO controller node to the dtsi
  dts: sun8i-h3: Add APB0 related clocks and resets
  ARM: dts: sun7i: Add dts file for the lamobo-r1 board
  ARM: dts: sun4i: Enable USB DRC on Hyundai-a7hd
  ARM: dts: sun4i: Enable USB DRC on the MK802
  ARM: dts: sun8i: q8-common: Add AXP223 PMIC device and regulator nodes
  ARM: dts: sun8i: sinlinx-sina33: Add AXP223 PMIC device and regulator nodes
  ARM: dts: sun7i: Enable USB DRC on Olimex A20 EVB
  ARM: dts: sun7i: Enable USB DRC on MK808C
  ARM: dts: sunxi: Fix #interrupt-cells for PIO in H3
  ARM: dts: sun8i-a83t: Correct low speed oscillator clocks
  ARM: dts: sun9i: a80-optimus: Remove i2c3 and uart4
  ARM: dts: sun4i: Itead Iteaduino to use common code
  ARM: dts: sun7i: Add Itead Ibox support
  ARM: dts: sunxi: Add sunxi-itead-core-common.dtsi
  ARM: dts: sun9i: cubieboard4: Enable hardware reset and HS-DDR for eMMC
  ARM: dts: sun9i: a80-optimus: Enable hardware reset and HS-DDR for eMMC
  ARM: dts: sun9i: Include SDC2_RST pin in mmc2_8bit_pins
  ...
parents eff01adb d250d17d
...@@ -675,8 +675,10 @@ dtb-$(CONFIG_MACH_SUN7I) += \ ...@@ -675,8 +675,10 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \ sun7i-a20-cubietruck.dtb \
sun7i-a20-hummingbird.dtb \ sun7i-a20-hummingbird.dtb \
sun7i-a20-itead-ibox.dtb \
sun7i-a20-i12-tvbox.dtb \ sun7i-a20-i12-tvbox.dtb \
sun7i-a20-icnova-swac.dtb \ sun7i-a20-icnova-swac.dtb \
sun7i-a20-lamobo-r1.dtb \
sun7i-a20-m3.dtb \ sun7i-a20-m3.dtb \
sun7i-a20-mk808c.dtb \ sun7i-a20-mk808c.dtb \
sun7i-a20-olimex-som-evb.dtb \ sun7i-a20-olimex-som-evb.dtb \
...@@ -700,6 +702,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ ...@@ -700,6 +702,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a33-ippo-q8h-v1.2.dtb \ sun8i-a33-ippo-q8h-v1.2.dtb \
sun8i-a33-q8-tablet.dtb \ sun8i-a33-q8-tablet.dtb \
sun8i-a33-sinlinx-sina33.dtb \ sun8i-a33-sinlinx-sina33.dtb \
sun8i-a83t-allwinner-h8homlet-v2.dtb \
sun8i-a83t-cubietruck-plus.dtb \
sun8i-h3-orangepi-plus.dtb sun8i-h3-orangepi-plus.dtb
dtb-$(CONFIG_MACH_SUN9I) += \ dtb-$(CONFIG_MACH_SUN9I) += \
sun9i-a80-optimus.dtb \ sun9i-a80-optimus.dtb \
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#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>
/ { / {
model = "Chuwi V7 CW0825"; model = "Chuwi V7 CW0825";
...@@ -88,6 +89,15 @@ &i2c2 { ...@@ -88,6 +89,15 @@ &i2c2 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>; pinctrl-0 = <&i2c2_pins_a>;
status = "okay"; status = "okay";
ft5306de4: touchscreen@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
touchscreen-size-x = <1024>;
touchscreen-size-y = <768>;
};
}; };
&lradc { &lradc {
......
...@@ -87,6 +87,30 @@ &mmc0 { ...@@ -87,6 +87,30 @@ &mmc0 {
status = "okay"; status = "okay";
}; };
&otg_sram {
status = "okay";
};
&pio {
usb0_id_detect_pin: usb0_id_detect_pin@0 {
allwinner,pins = "PH4";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
allwinner,pins = "PH5";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
};
};
&reg_usb0_vbus {
status = "okay";
};
&reg_usb2_vbus { &reg_usb2_vbus {
gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
status = "okay"; status = "okay";
...@@ -102,7 +126,17 @@ &usb2_vbus_pin_a { ...@@ -102,7 +126,17 @@ &usb2_vbus_pin_a {
allwinner,pins = "PH6"; allwinner,pins = "PH6";
}; };
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy { &usbphy {
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
usb0_vbus-supply = <&reg_usb0_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>; usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay"; status = "okay";
}; };
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#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>
/ { / {
model = "INet-97F Rev 02"; model = "INet-97F Rev 02";
...@@ -93,6 +94,15 @@ &i2c2 { ...@@ -93,6 +94,15 @@ &i2c2 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>; pinctrl-0 = <&i2c2_pins_a>;
status = "okay"; status = "okay";
ft5406ee8: touchscreen@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
};
}; };
&lradc { &lradc {
......
...@@ -253,6 +253,15 @@ &i2c2 { ...@@ -253,6 +253,15 @@ &i2c2 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>; pinctrl-0 = <&i2c2_pins_a>;
status = "okay"; status = "okay";
ft5406ee8: touchscreen@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
};
}; };
&lradc { &lradc {
......
/* /*
* Copyright 2015 Josef Gajdusek <atx@atx.name> * Copyright 2015 Josef Gajdusek <atx@atx.name>
* Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
* *
* This file is dual-licensed: you can use it either under the terms * 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 * of the GPL or the X11 license, at your option. Note that this dual
...@@ -42,22 +43,11 @@ ...@@ -42,22 +43,11 @@
/dts-v1/; /dts-v1/;
#include "sun4i-a10.dtsi" #include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi" #include "sunxi-itead-core-common.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "Iteaduino Plus A10"; model = "Iteaduino Plus A10";
compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10"; compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
}; };
&ahci { &ahci {
...@@ -65,18 +55,6 @@ &ahci { ...@@ -65,18 +55,6 @@ &ahci {
status = "okay"; status = "okay";
}; };
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&emac { &emac {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&emac_pins_a>; pinctrl-0 = <&emac_pins_a>;
...@@ -89,12 +67,7 @@ &emac_sram { ...@@ -89,12 +67,7 @@ &emac_sram {
}; };
&i2c0 { &i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
axp209: pmic@34 { axp209: pmic@34 {
reg = <0x34>;
interrupts = <0>; interrupts = <0>;
}; };
}; };
...@@ -135,68 +108,13 @@ &mmc0 { ...@@ -135,68 +108,13 @@ &mmc0 {
status = "okay"; status = "okay";
}; };
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&reg_ahci_5v { &reg_ahci_5v {
status = "okay"; status = "okay";
}; };
#include "axp209.dtsi"
&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";
};
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
status = "okay";
};
&spi0 { &spi0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>, pinctrl-0 = <&spi0_pins_a>,
<&spi0_cs0_pins_a>; <&spi0_cs0_pins_a>;
status = "okay"; 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";
};
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#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/gpio/gpio.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "MK802"; model = "MK802";
...@@ -84,7 +85,25 @@ &ohci0 { ...@@ -84,7 +85,25 @@ &ohci0 {
status = "okay"; status = "okay";
}; };
&otg_sram {
status = "okay";
};
&pio { &pio {
usb0_id_detect_pin: usb0_id_detect_pin@0 {
allwinner,pins = "PH4";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
allwinner,pins = "PH5";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
usb2_vbus_pin_mk802: usb2_vbus_pin@0 { usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
allwinner,pins = "PH12"; allwinner,pins = "PH12";
allwinner,function = "gpio_out"; allwinner,function = "gpio_out";
...@@ -93,6 +112,10 @@ usb2_vbus_pin_mk802: usb2_vbus_pin@0 { ...@@ -93,6 +112,10 @@ usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
}; };
}; };
&reg_usb0_vbus {
status = "okay";
};
&reg_usb1_vbus { &reg_usb1_vbus {
status = "okay"; status = "okay";
}; };
...@@ -109,7 +132,17 @@ &uart0 { ...@@ -109,7 +132,17 @@ &uart0 {
status = "okay"; status = "okay";
}; };
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy { &usbphy {
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
usb0_vbus-supply = <&reg_usb0_vbus>;
usb1_vbus-supply = <&reg_usb1_vbus>; usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>; usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay"; status = "okay";
......
...@@ -70,6 +70,10 @@ &codec { ...@@ -70,6 +70,10 @@ &codec {
status = "okay"; status = "okay";
}; };
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&ehci0 { &ehci0 {
status = "okay"; status = "okay";
}; };
......
...@@ -709,6 +709,16 @@ mmc2_8bit_emmc_pins: mmc2@1 { ...@@ -709,6 +709,16 @@ mmc2_8bit_emmc_pins: mmc2@1 {
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc3_8bit_emmc_pins: mmc3@1 {
allwinner,pins = "PC6", "PC7", "PC8", "PC9",
"PC10", "PC11", "PC12",
"PC13", "PC14", "PC15",
"PC24";
allwinner,function = "mmc3";
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
gmac_pins_mii_a: gmac_mii@0 { gmac_pins_mii_a: gmac_mii@0 {
allwinner,pins = "PA0", "PA1", "PA2", "PA3", allwinner,pins = "PA0", "PA1", "PA2", "PA3",
"PA8", "PA9", "PA11", "PA8", "PA9", "PA11",
......
...@@ -61,12 +61,14 @@ &cpu0 { ...@@ -61,12 +61,14 @@ &cpu0 {
}; };
/* eMMC on core board */ /* eMMC on core board */
&mmc2 { &mmc3 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_emmc_pins>; pinctrl-0 = <&mmc3_8bit_emmc_pins>;
vmmc-supply = <&reg_dcdc1>; vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_dcdc1>;
bus-width = <8>; bus-width = <8>;
non-removable; non-removable;
cap-mmc-hw-reset;
status = "okay"; status = "okay";
}; };
......
/*
* Copyright 2015 - Marcus Cooper <codekipper@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.
*
* 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-itead-core-common.dtsi"
/ {
model = "Itead Ibox A20";
compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_itead_core>;
green {
label = "itead_core:green:usr";
gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
blue {
label = "itead_core:blue:usr";
gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};
};
&ahci {
target-supply = <&reg_ahci_5v>;
status = "okay";
};
&codec {
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>;
};
};
&i2c0 {
axp209: pmic@34 {
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
};
};
&ir0 {
pinctrl-names = "default";
pinctrl-0 = <&ir0_rx_pins_a>;
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";
};
&pio {
led_pins_itead_core: led_pins@0 {
allwinner,pins = "PH20","PH21";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&reg_ahci_5v {
status = "okay";
};
/*
* Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
*
* 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.
*
* 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/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
model = "Lamobo R1";
compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
aliases {
serial0 = &uart0;
serial1 = &uart3;
serial2 = &uart7;
};
chosen {
stdout-path = "serial0:115200n8";
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_lamobo_r1>;
green {
label = "lamobo_r1: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_lamobo_r1>;
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>; /* PH23 */
};
};
&ahci_pwr_pin_a {
allwinner,pins = "PB3";
};
&ahci {
target-supply = <&reg_ahci_5v>;
status = "okay";
};
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&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 {
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
};
};
&i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
};
&ir0 {
pinctrl-names = "default";
pinctrl-0 = <&ir0_rx_pins_a>;
status = "okay";
};
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo_r1>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
cd-inverted;
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&otg_sram {
status = "okay";
};
&pio {
usb0_id_detect_pin: usb0_id_detect_pin@0 {
allwinner,pins = "PH4";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
mmc0_cd_pin_lamobo_r1: mmc0_cd_pin@0 {
allwinner,pins = "PH10";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
gmac_power_pin_lamobo_r1: 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_lamobo_r1: led_pins@0 {
allwinner,pins = "PH24";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
#include "axp209.dtsi"
&reg_ahci_5v {
gpio = <&pio 1 3 0>; /* PB3 */
status = "okay";
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
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_usb0_vbus {
status = "okay";
};
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>,
<&spi0_cs0_pins_a>,
<&spi0_cs1_pins_a>;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins_b>;
status = "okay";
};
&uart7 {
pinctrl-names = "default";
pinctrl-0 = <&uart7_pins_a>;
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usb_power_supply {
status = "okay";
};
&usbphy {
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_detect_pin>;
usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
usb0_vbus_power-supply = <&usb_power_supply>;
usb0_vbus-supply = <&reg_usb0_vbus>;
usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
model = "mk808c"; model = "mk808c";
...@@ -125,6 +126,30 @@ &ohci1 { ...@@ -125,6 +126,30 @@ &ohci1 {
status = "okay"; status = "okay";
}; };
&otg_sram {
status = "okay";
};
&pio {
usb0_id_detect_pin: usb0_id_detect_pin@0 {
allwinner,pins = "PH4";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
allwinner,pins = "PH5";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&reg_usb0_vbus {
status = "okay";
};
&reg_usb1_vbus { &reg_usb1_vbus {
status = "okay"; status = "okay";
}; };
...@@ -145,7 +170,17 @@ &uart2 { ...@@ -145,7 +170,17 @@ &uart2 {
status = "okay"; status = "okay";
}; };
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy { &usbphy {
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
usb0_vbus-supply = <&reg_usb0_vbus>;
usb1_vbus-supply = <&reg_usb1_vbus>; usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>; usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay"; status = "okay";
......
...@@ -198,6 +198,10 @@ &ohci1 { ...@@ -198,6 +198,10 @@ &ohci1 {
status = "okay"; status = "okay";
}; };
&otg_sram {
status = "okay";
};
&pio { &pio {
ahci_pwr_pin_olimex_som_evb: ahci_pwr_pin@1 { ahci_pwr_pin_olimex_som_evb: ahci_pwr_pin@1 {
allwinner,pins = "PC3"; allwinner,pins = "PC3";
...@@ -219,6 +223,20 @@ mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 { ...@@ -219,6 +223,20 @@ mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
usb0_id_detect_pin: usb0_id_detect_pin@0 {
allwinner,pins = "PH4";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
allwinner,pins = "PH5";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
}; };
&reg_ahci_5v { &reg_ahci_5v {
...@@ -254,6 +272,10 @@ &reg_ldo2 { ...@@ -254,6 +272,10 @@ &reg_ldo2 {
regulator-name = "avcc"; regulator-name = "avcc";
}; };
&reg_usb0_vbus {
status = "okay";
};
&reg_usb1_vbus { &reg_usb1_vbus {
status = "okay"; status = "okay";
}; };
...@@ -268,7 +290,17 @@ &uart0 { ...@@ -268,7 +290,17 @@ &uart0 {
status = "okay"; status = "okay";
}; };
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy { &usbphy {
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
usb0_vbus-supply = <&reg_usb0_vbus>;
usb1_vbus-supply = <&reg_usb1_vbus>; usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>; usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay"; status = "okay";
......
...@@ -381,7 +381,7 @@ mmc2_8bit_pins: mmc2_8bit { ...@@ -381,7 +381,7 @@ mmc2_8bit_pins: mmc2_8bit {
allwinner,pins = "PC5", "PC6", "PC8", allwinner,pins = "PC5", "PC6", "PC8",
"PC9", "PC10", "PC11", "PC9", "PC10", "PC11",
"PC12", "PC13", "PC14", "PC12", "PC13", "PC14",
"PC15"; "PC15", "PC16";
allwinner,function = "mmc2"; allwinner,function = "mmc2";
allwinner,drive = <SUN4I_PINCTRL_30_MA>; allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
......
...@@ -68,7 +68,7 @@ &ehci0 { ...@@ -68,7 +68,7 @@ &ehci0 {
}; };
&lradc { &lradc {
vref-supply = <&reg_vcc3v0>; vref-supply = <&reg_dcdc1>;
status = "okay"; status = "okay";
button@200 { button@200 {
...@@ -96,7 +96,7 @@ button@600 { ...@@ -96,7 +96,7 @@ button@600 {
&mmc0 { &mmc0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_dcdc1>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
cd-inverted; cd-inverted;
...@@ -106,13 +106,16 @@ &mmc0 { ...@@ -106,13 +106,16 @@ &mmc0 {
&mmc2 { &mmc2 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>; pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_dcdc1>;
bus-width = <8>; bus-width = <8>;
non-removable; non-removable;
cap-mmc-hw-reset;
status = "okay"; status = "okay";
}; };
&mmc2_8bit_pins { &mmc2_8bit_pins {
/* Increase drive strength for DDR modes */
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
/* eMMC is missing pull-ups */ /* eMMC is missing pull-ups */
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
}; };
...@@ -132,6 +135,76 @@ mmc0_cd_pin_sina33: mmc0_cd_pin@0 { ...@@ -132,6 +135,76 @@ mmc0_cd_pin_sina33: mmc0_cd_pin@0 {
&r_rsb { &r_rsb {
status = "okay"; status = "okay";
axp22x: pmic@3a3 {
compatible = "x-powers,axp223";
reg = <0x3a3>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
eldoin-supply = <&reg_dcdc1>;
};
};
#include "axp22x.dtsi"
&reg_aldo1 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-io";
};
&reg_aldo2 {
regulator-always-on;
regulator-min-microvolt = <2350000>;
regulator-max-microvolt = <2650000>;
regulator-name = "vdd-dll";
};
&reg_aldo3 {
regulator-always-on;
regulator-min-microvolt = <2700000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-pll-avcc";
};
&reg_dc5ldo {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-cpus";
};
&reg_dcdc1 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-3v0";
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-sys";
};
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-cpu";
};
&reg_dcdc5 {
regulator-always-on;
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-name = "vcc-dram";
};
&reg_rtc_ldo {
regulator-name = "vcc-rtc";
}; };
&uart0 { &uart0 {
......
/*
* Copyright 2015 Vishnu Patekar
* Vishnu Patekar <vishnupatekar0510@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.
*
* 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 "sun8i-a83t.dtsi"
/ {
model = "Allwinner A83T H8Homlet Proto Dev Board v2.0";
compatible = "allwinner,h8homlet-v2", "allwinner,sun8i-a83t";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_b>;
status = "okay";
};
/*
* 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.
*
* 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 "sun8i-a83t.dtsi"
/ {
model = "Cubietech Cubietruck Plus";
compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_b>;
status = "okay";
};
/*
* Copyright 2015 Vishnu Patekar
*
* Vishnu Patekar <vishnupatekar0510@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.
*
* 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.
*/
#include "skeleton.dtsi"
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
interrupt-parent = <&gic>;
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <1>;
};
cpu@2 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <2>;
};
cpu@3 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <3>;
};
cpu@100 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0x100>;
};
cpu@101 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0x101>;
};
cpu@102 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0x102>;
};
cpu@103 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0x103>;
};
};
timer {
compatible = "arm,armv7-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
};
clocks {
#address-cells = <1>;
#size-cells = <1>;
ranges;
/* TODO: PRCM block has a mux for this. */
osc24M: osc24M_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
clock-output-names = "osc24M";
};
/*
* This is called "internal OSC" in some places.
* It is an internal RC-based oscillator.
* TODO: Its controls are in the PRCM block.
*/
osc16M: osc16M_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <16000000>;
clock-output-names = "osc16M";
};
osc16Md512: osc16Md512_clk {
#clock-cells = <0>;
compatible = "fixed-factor-clock";
clock-div = <512>;
clock-mult = <1>;
clocks = <&osc16M>;
clock-output-names = "osc16M-d512";
};
};
soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
pio: pinctrl@01c20800 {
compatible = "allwinner,sun8i-a83t-pinctrl";
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x01c20800 0x400>;
clocks = <&osc24M>;
gpio-controller;
interrupt-controller;
#interrupt-cells = <3>;
#gpio-cells = <3>;
mmc0_pins_a: mmc0@0 {
allwinner,pins = "PF0", "PF1", "PF2",
"PF3", "PF4", "PF5";
allwinner,function = "mmc0";
allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
uart0_pins_a: uart0@0 {
allwinner,pins = "PF2", "PF4";
allwinner,function = "uart0";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
uart0_pins_b: uart0@1 {
allwinner,pins = "PB9", "PB10";
allwinner,function = "uart0";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
timer@01c20c00 {
compatible = "allwinner,sun4i-a10-timer";
reg = <0x01c20c00 0xa0>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&osc24M>;
};
watchdog@01c20ca0 {
compatible = "allwinner,sun6i-a31-wdt";
reg = <0x01c20ca0 0x20>;
interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&osc24M>;
};
uart0: serial@01c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&osc24M>;
status = "disabled";
};
gic: interrupt-controller@01c81000 {
compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
reg = <0x01c81000 0x1000>,
<0x01c82000 0x1000>,
<0x01c84000 0x2000>,
<0x01c86000 0x2000>;
interrupt-controller;
#interrupt-cells = <3>;
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
};
};
};
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#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/pinctrl/sun4i-a10.h> #include <dt-bindings/pinctrl/sun4i-a10.h>
/ { / {
...@@ -58,6 +59,62 @@ aliases { ...@@ -58,6 +59,62 @@ aliases {
chosen { chosen {
stdout-path = "serial0:115200n8"; stdout-path = "serial0:115200n8";
}; };
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
status_led {
label = "orangepi-plus:red:status";
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
};
pwr_led {
label = "orangepi-plus:green:pwr";
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};
r_gpio_keys {
compatible = "gpio-keys";
input-name = "sw4";
pinctrl-names = "default";
pinctrl-0 = <&sw_r_opc>;
sw4@0 {
label = "sw4";
linux,code = <BTN_0>;
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
};
};
};
&pio {
leds_opc: led_pins@0 {
allwinner,pins = "PA15";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
&r_pio {
leds_r_opc: led_pins@0 {
allwinner,pins = "PL10";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
sw_r_opc: key_pins@0 {
allwinner,pins = "PL03";
allwinner,function = "gpio_in";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
}; };
&mmc0 { &mmc0 {
......
...@@ -276,6 +276,33 @@ mbus_clk: clk@01c2015c { ...@@ -276,6 +276,33 @@ mbus_clk: clk@01c2015c {
clocks = <&osc24M>, <&pll6 1>, <&pll5>; clocks = <&osc24M>, <&pll6 1>, <&pll5>;
clock-output-names = "mbus"; clock-output-names = "mbus";
}; };
apb0: apb0_clk {
compatible = "fixed-factor-clock";
#clock-cells = <0>;
clock-div = <1>;
clock-mult = <1>;
clocks = <&osc24M>;
clock-output-names = "apb0";
};
apb0_gates: clk@01f01428 {
compatible = "allwinner,sun8i-h3-apb0-gates-clk",
"allwinner,sun4i-a10-gates-clk";
reg = <0x01f01428 0x4>;
#clock-cells = <1>;
clocks = <&apb0>;
clock-indices = <0>, <1>;
clock-output-names = "apb0_pio", "apb0_ir";
};
ir_clk: ir_clk@01f01454 {
compatible = "allwinner,sun4i-a10-mod0-clk";
reg = <0x01f01454 0x4>;
#clock-cells = <0>;
clocks = <&osc32k>, <&osc24M>;
clock-output-names = "ir";
};
}; };
soc { soc {
...@@ -359,7 +386,7 @@ pio: pinctrl@01c20800 { ...@@ -359,7 +386,7 @@ pio: pinctrl@01c20800 {
gpio-controller; gpio-controller;
#gpio-cells = <3>; #gpio-cells = <3>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <3>;
uart0_pins_a: uart0@0 { uart0_pins_a: uart0@0 {
allwinner,pins = "PA4", "PA5"; allwinner,pins = "PA4", "PA5";
...@@ -493,5 +520,40 @@ rtc: rtc@01f00000 { ...@@ -493,5 +520,40 @@ rtc: rtc@01f00000 {
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
}; };
apb0_reset: reset@01f014b0 {
reg = <0x01f014b0 0x4>;
compatible = "allwinner,sun6i-a31-clock-reset";
#reset-cells = <1>;
};
ir: ir@01f02000 {
compatible = "allwinner,sun5i-a13-ir";
clocks = <&apb0_gates 1>, <&ir_clk>;
clock-names = "apb", "ir";
resets = <&apb0_reset 1>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x01f02000 0x40>;
status = "disabled";
};
r_pio: pinctrl@01f02c00 {
compatible = "allwinner,sun8i-h3-r-pinctrl";
reg = <0x01f02c00 0x400>;
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&apb0_gates 0>;
resets = <&apb0_reset 0>;
gpio-controller;
#gpio-cells = <3>;
interrupt-controller;
#interrupt-cells = <3>;
ir_pins_a: ir@0 {
allwinner,pins = "PL11";
allwinner,function = "s_cir_rx";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
}; };
}; };
...@@ -56,7 +56,6 @@ backlight: backlight { ...@@ -56,7 +56,6 @@ backlight: backlight {
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
default-brightness-level = <8>; default-brightness-level = <8>;
enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
/* backlight is powered by AXP223 DC1SW */
}; };
chosen { chosen {
...@@ -67,7 +66,7 @@ chosen { ...@@ -67,7 +66,7 @@ chosen {
&mmc0 { &mmc0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_dcdc1>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
cd-inverted; cd-inverted;
...@@ -92,6 +91,82 @@ mmc0_cd_pin_q8: mmc0_cd_pin@0 { ...@@ -92,6 +91,82 @@ mmc0_cd_pin_q8: mmc0_cd_pin@0 {
&r_rsb { &r_rsb {
status = "okay"; status = "okay";
axp22x: pmic@3a3 {
compatible = "x-powers,axp223";
reg = <0x3a3>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
eldoin-supply = <&reg_dcdc1>;
};
};
#include "axp22x.dtsi"
&reg_aldo1 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-io";
};
&reg_aldo2 {
regulator-always-on;
regulator-min-microvolt = <2350000>;
regulator-max-microvolt = <2650000>;
regulator-name = "vdd-dll";
};
&reg_aldo3 {
regulator-always-on;
regulator-min-microvolt = <2700000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-pll-avcc";
};
&reg_dc1sw {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-lcd";
};
&reg_dc5ldo {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-cpus";
};
&reg_dcdc1 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-3v0";
};
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-sys";
};
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-cpu";
};
&reg_dcdc5 {
regulator-always-on;
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-name = "vcc-dram";
};
&reg_rtc_ldo {
regulator-name = "vcc-rtc";
}; };
&r_uart { &r_uart {
...@@ -99,3 +174,7 @@ &r_uart { ...@@ -99,3 +174,7 @@ &r_uart {
pinctrl-0 = <&r_uart_pins_a>; pinctrl-0 = <&r_uart_pins_a>;
status = "okay"; status = "okay";
}; };
&simplefb_lcd {
vcc-lcd-supply = <&reg_dc1sw>;
};
...@@ -111,9 +111,15 @@ &mmc2 { ...@@ -111,9 +111,15 @@ &mmc2 {
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_vcc3v0>;
bus-width = <8>; bus-width = <8>;
non-removable; non-removable;
cap-mmc-hw-reset;
status = "okay"; status = "okay";
}; };
&mmc2_8bit_pins {
/* Increase drive strength for DDR modes */
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
};
&r_ir { &r_ir {
status = "okay"; status = "okay";
}; };
......
...@@ -109,17 +109,6 @@ &ehci2 { ...@@ -109,17 +109,6 @@ &ehci2 {
status = "okay"; status = "okay";
}; };
&i2c3 {
pinctrl-names = "default";
pinctrl-0 = <&i2c3_pins_a>;
status = "okay";
};
&i2c3_pins_a {
/* Enable internal pull-up */
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
&ohci0 { &ohci0 {
status = "okay"; status = "okay";
}; };
...@@ -174,9 +163,15 @@ &mmc2 { ...@@ -174,9 +163,15 @@ &mmc2 {
vmmc-supply = <&reg_vcc3v0>; vmmc-supply = <&reg_vcc3v0>;
bus-width = <8>; bus-width = <8>;
non-removable; non-removable;
cap-mmc-hw-reset;
status = "okay"; status = "okay";
}; };
&mmc2_8bit_pins {
/* Increase drive strength for DDR modes */
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
};
&reg_usb1_vbus { &reg_usb1_vbus {
pinctrl-0 = <&usb1_vbus_pin_optimus>; pinctrl-0 = <&usb1_vbus_pin_optimus>;
gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
...@@ -206,17 +201,6 @@ &uart0 { ...@@ -206,17 +201,6 @@ &uart0 {
status = "okay"; status = "okay";
}; };
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&uart4_pins_a>;
status = "okay";
};
&uart4_pins_a {
/* Enable internal pull-up */
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
&usbphy1 { &usbphy1 {
phy-supply = <&reg_usb1_vbus>; phy-supply = <&reg_usb1_vbus>;
status = "okay"; status = "okay";
......
...@@ -543,7 +543,7 @@ usbphy3: phy@00a02800 { ...@@ -543,7 +543,7 @@ usbphy3: phy@00a02800 {
}; };
mmc0: mmc@01c0f000 { mmc0: mmc@01c0f000 {
compatible = "allwinner,sun5i-a13-mmc"; compatible = "allwinner,sun9i-a80-mmc";
reg = <0x01c0f000 0x1000>; reg = <0x01c0f000 0x1000>;
clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>, clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
<&mmc0_clk 1>, <&mmc0_clk 2>; <&mmc0_clk 1>, <&mmc0_clk 2>;
...@@ -557,7 +557,7 @@ mmc0: mmc@01c0f000 { ...@@ -557,7 +557,7 @@ mmc0: mmc@01c0f000 {
}; };
mmc1: mmc@01c10000 { mmc1: mmc@01c10000 {
compatible = "allwinner,sun5i-a13-mmc"; compatible = "allwinner,sun9i-a80-mmc";
reg = <0x01c10000 0x1000>; reg = <0x01c10000 0x1000>;
clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>, clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
<&mmc1_clk 1>, <&mmc1_clk 2>; <&mmc1_clk 1>, <&mmc1_clk 2>;
...@@ -571,7 +571,7 @@ mmc1: mmc@01c10000 { ...@@ -571,7 +571,7 @@ mmc1: mmc@01c10000 {
}; };
mmc2: mmc@01c11000 { mmc2: mmc@01c11000 {
compatible = "allwinner,sun5i-a13-mmc"; compatible = "allwinner,sun9i-a80-mmc";
reg = <0x01c11000 0x1000>; reg = <0x01c11000 0x1000>;
clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>, clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
<&mmc2_clk 1>, <&mmc2_clk 2>; <&mmc2_clk 1>, <&mmc2_clk 2>;
...@@ -585,7 +585,7 @@ mmc2: mmc@01c11000 { ...@@ -585,7 +585,7 @@ mmc2: mmc@01c11000 {
}; };
mmc3: mmc@01c12000 { mmc3: mmc@01c12000 {
compatible = "allwinner,sun5i-a13-mmc"; compatible = "allwinner,sun9i-a80-mmc";
reg = <0x01c12000 0x1000>; reg = <0x01c12000 0x1000>;
clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>, clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
<&mmc3_clk 1>, <&mmc3_clk 2>; <&mmc3_clk 1>, <&mmc3_clk 2>;
...@@ -704,7 +704,8 @@ mmc0_pins: mmc0 { ...@@ -704,7 +704,8 @@ mmc0_pins: mmc0 {
mmc2_8bit_pins: mmc2_8bit { mmc2_8bit_pins: mmc2_8bit {
allwinner,pins = "PC6", "PC7", "PC8", "PC9", allwinner,pins = "PC6", "PC7", "PC8", "PC9",
"PC10", "PC11", "PC12", "PC10", "PC11", "PC12",
"PC13", "PC14", "PC15"; "PC13", "PC14", "PC15",
"PC16";
allwinner,function = "mmc2"; allwinner,function = "mmc2";
allwinner,drive = <SUN4I_PINCTRL_30_MA>; allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
......
/*
* Copyright 2015 - Marcus Cooper <codekipper@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.
*
* 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.
*/
#include "sunxi-common-regulators.dtsi"
/ {
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
axp209: pmic@34 {
reg = <0x34>;
};
};
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins_a>;
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
#include "axp209.dtsi"
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
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_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";
};
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