mirror of https://gitee.com/openkylin/linux.git
Allwinner DT additions for 4.7
The usual bunch of changes, mostly: * Addition of the SPDIF support * Addition of the pre-requisites for the display support * New boards: Difrence DIT4350, colorfly e708 q1, Dserve DSRV9703C, Polaroid MID2809PXE4, Orange Pi PC, Orange Pi 2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXI4xeAAoJEBx+YmzsjxAgqFoP/1TWPb7EeHzB5AT9EvnA5oVZ O0ZurXalr2/lgrZqI4iUuAdIHhOJHPH0YwYO6BaUY9XPMqWcEUhBSC0Gol2E80vw rovtyyASjteg1RBqPDe2jlg1wWdIYwKKe4oGY5XDRLjmqArRba7UhB7w5qW9Hjpv Q7i/jrdCm3y0UNxoNA1Z1sTjRoUu+rxBmPt3YyCze5sXysUTo27r5bRnRso0c0Fh sHz6lVrDpk5NN9idRqB9IybYl63FEysG0soWt7DYCMAnDq+fxeGv4LJC8w08BYNa K+UuwzHzn/8djbRKMcYo+4Vtv1RDU27piHTkLocnpYj+ckOYDNlcmzboBzHu/0uX oaQ8VU+lhwEydkAqiAtaTNGgmK1ZPD3/L7yrgrMrmyUe+IALLNIUYS7xUPCIQf8k FQcVTFI+S8qsdRikkb4/WwMkPCmsNwMoU7T0ErZ/akrGrWpm0OMxEpyKFhKumASc pfmGSdh7BAE/G5Mhcx8cDW1qDSJzPtrTbdmwCu5tQVpzoa7LnNNRFbAZxwwt/SNG lJXxvg4mcsp+dtEt8c/0XYQxnRMZy5o0gSQVDlqW0gYTyzfZn4l8v0iyv5l54yZv foJukaMRVvGrO/piPNVQKGJ1O8+xCjv2kjjTYkyoQY7Xs//ZOhp7s9qGlz1/Pq14 Dxsbri9UkawJvwMR9gnD =tEwH -----END PGP SIGNATURE----- Merge tag 'sunxi-dt-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Merge "Allwinner DT additions for 4.7" from Maxime Ripard: The usual bunch of changes, mostly: * Addition of the SPDIF support * Addition of the pre-requisites for the display support * New boards: Difrence DIT4350, colorfly e708 q1, Dserve DSRV9703C, Polaroid MID2809PXE4, Orange Pi PC, Orange Pi 2 * tag 'sunxi-dt-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (38 commits) ARM: dts: sun7i: Enable S/PDIF on the Cubietruck ARM: sun5i: Add DRAM gates ARM: sun5i: Add TV encoder gate to the DTSI ARM: sun5i: dt: Add pll3 and pll7 clocks ARM: dts: sun8i: Add dts file for the Orange Pi One SBC ARM: sun7i: dt: Enable dram gate 5 (tve0 clock) for simplefb TV output ARM: sun4i: dt: Enable dram gate 5 (tve0 clock) for simplefb TV output ARM: dts: sun5i-a13-olinuxino-micro: enable USB DRC ARM: dts: sun8i: Base Orange Pi Plus dts on the Orange Pi 2 dts ARM: dts: sun8i: Orangepi plus gpio keys fixes and improvements ARM: dts: sun8i: Add dts for Orange Pi 2 SBC ARM: dts: sun8i: Add Orange Pi PC support ARM: dts: sun8i: Fix pio nodes Orangepi Plus dts ARM: dts: sun7i: Add SPDIF to the Itead Ibox ARM: dts: sun4i: Add SPDIF to the Mele A1000 ARM: dts: sun7i: Add the SPDIF block to the A20 ARM: dts: sun4i: Add the SPDIF block to the A10 ARM: dts: sun7i: Add the SPDIF clk to the A20 ARM: dts: sun4i: Add the SPDIF clk to the A10 ARM: dts: sun7i: Add SPDIF TX pin to the A20 ...
This commit is contained in:
commit
e8f72bf9d4
|
@ -677,6 +677,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
|
|||
sun4i-a10-ba10-tvbox.dtb \
|
||||
sun4i-a10-chuwi-v7-cw0825.dtb \
|
||||
sun4i-a10-cubieboard.dtb \
|
||||
sun4i-a10-dserve-dsrv9703c.dtb \
|
||||
sun4i-a10-gemei-g9.dtb \
|
||||
sun4i-a10-hackberry.dtb \
|
||||
sun4i-a10-hyundai-a7hd.dtb \
|
||||
|
@ -700,6 +701,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
|
|||
sun5i-a10s-olinuxino-micro.dtb \
|
||||
sun5i-a10s-r7-tv-dongle.dtb \
|
||||
sun5i-a10s-wobo-i5.dtb \
|
||||
sun5i-a13-difrnce-dit4350.dtb \
|
||||
sun5i-a13-empire-electronix-d709.dtb \
|
||||
sun5i-a13-hsg-h702.dtb \
|
||||
sun5i-a13-inet-98v-rev2.dtb \
|
||||
|
@ -715,6 +717,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
|
|||
sun6i-a31-i7.dtb \
|
||||
sun6i-a31-m9.dtb \
|
||||
sun6i-a31-mele-a1000g-quad.dtb \
|
||||
sun6i-a31s-colorfly-e708-q1.dtb \
|
||||
sun6i-a31s-cs908.dtb \
|
||||
sun6i-a31s-primo81.dtb \
|
||||
sun6i-a31s-sina31s.dtb \
|
||||
|
@ -747,6 +750,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
|||
sun8i-a23-gt90h-v4.dtb \
|
||||
sun8i-a23-ippo-q8h-v5.dtb \
|
||||
sun8i-a23-ippo-q8h-v1.2.dtb \
|
||||
sun8i-a23-polaroid-mid2809pxe04.dtb \
|
||||
sun8i-a23-q8-tablet.dtb \
|
||||
sun8i-a33-et-q8-v1.6.dtb \
|
||||
sun8i-a33-ga10h-v1.1.dtb \
|
||||
|
@ -755,6 +759,9 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
|||
sun8i-a33-sinlinx-sina33.dtb \
|
||||
sun8i-a83t-allwinner-h8homlet-v2.dtb \
|
||||
sun8i-a83t-cubietruck-plus.dtb \
|
||||
sun8i-h3-orangepi-2.dtb \
|
||||
sun8i-h3-orangepi-one.dtb \
|
||||
sun8i-h3-orangepi-pc.dtb \
|
||||
sun8i-h3-orangepi-plus.dtb
|
||||
dtb-$(CONFIG_MACH_SUN9I) += \
|
||||
sun9i-a80-optimus.dtb \
|
||||
|
|
|
@ -87,6 +87,24 @@ reg_emac_3v3: emac-3v3 {
|
|||
enable-active-high;
|
||||
gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "On-board SPDIF";
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&spdif>;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&spdif_out>;
|
||||
};
|
||||
};
|
||||
|
||||
spdif_out: spdif-out {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dit";
|
||||
};
|
||||
};
|
||||
|
||||
&ahci {
|
||||
|
@ -188,6 +206,12 @@ ®_usb2_vbus {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&spdif {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spdif_tx_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
|
|
|
@ -0,0 +1,281 @@
|
|||
/*
|
||||
* Copyright 2016 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.
|
||||
*
|
||||
* 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/input/input.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "Dserve DSRV9703C";
|
||||
compatible = "dserve,dsrv9703c", "allwinner,sun4i-a10";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bl_en_pin_dsrv9703c>;
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <8>;
|
||||
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
haptics {
|
||||
compatible = "regulator-haptic";
|
||||
haptic-supply = <®_motor>;
|
||||
min-microvolt = <3000000>;
|
||||
max-microvolt = <3000000>;
|
||||
};
|
||||
|
||||
reg_motor: reg_motor {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&motor_pins>;
|
||||
regulator-name = "vcc-motor";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
enable-active-high;
|
||||
gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
|
||||
};
|
||||
};
|
||||
|
||||
&codec {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&codec_pa_pin>;
|
||||
allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <®_dcdc2>;
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
axp209: pmic@34 {
|
||||
reg = <0x34>;
|
||||
interrupts = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp209.dtsi"
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
/* pull-ups and devices require AXP209 LDO3 */
|
||||
status = "failed";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
ft5406ee8: touchscreen@38 {
|
||||
compatible = "edt,edt-ft5406";
|
||||
reg = <0x38>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&touchscreen_pins>;
|
||||
reset-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
|
||||
touchscreen-size-x = <1024>;
|
||||
touchscreen-size-y = <768>;
|
||||
};
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_ldo2>;
|
||||
status = "okay";
|
||||
|
||||
button@400 {
|
||||
label = "Volume Down";
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
channel = <0>;
|
||||
voltage = <400000>;
|
||||
};
|
||||
|
||||
button@800 {
|
||||
label = "Volume Up";
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
channel = <0>;
|
||||
voltage = <800000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&otg_sram {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
bl_en_pin_dsrv9703c: bl_en_pin@0 {
|
||||
allwinner,pins = "PH7";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
codec_pa_pin: codec_pa_pin@0 {
|
||||
allwinner,pins = "PH15";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
motor_pins: motor_pins@0 {
|
||||
allwinner,pins = "PB3";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
touchscreen_pins: touchscreen_pins@0 {
|
||||
allwinner,pins = "PB13";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1250000>;
|
||||
regulator-max-microvolt = <1250000>;
|
||||
regulator-name = "vdd-int-dll";
|
||||
};
|
||||
|
||||
®_ldo1 {
|
||||
regulator-name = "vdd-rtc";
|
||||
};
|
||||
|
||||
®_ldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_usb0_vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb2_vbus {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&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 = <®_usb0_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
|
@ -96,7 +96,7 @@ framebuffer@3 {
|
|||
allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>, <&ahb_gates 46>,
|
||||
<&dram_gates 25>, <&dram_gates 26>;
|
||||
<&dram_gates 5>, <&dram_gates 25>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
@ -477,6 +477,17 @@ ir1_clk: clk@01c200b4 {
|
|||
clock-output-names = "ir1";
|
||||
};
|
||||
|
||||
spdif_clk: clk@01c200c0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-mod1-clk";
|
||||
reg = <0x01c200c0 0x4>;
|
||||
clocks = <&pll2 SUN4I_A10_PLL2_8X>,
|
||||
<&pll2 SUN4I_A10_PLL2_4X>,
|
||||
<&pll2 SUN4I_A10_PLL2_2X>,
|
||||
<&pll2 SUN4I_A10_PLL2_1X>;
|
||||
clock-output-names = "spdif";
|
||||
};
|
||||
|
||||
usb_clk: clk@01c200cc {
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
|
@ -1006,6 +1017,13 @@ ps21_pins_a: ps21@0 {
|
|||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
spdif_tx_pins_a: spdif@0 {
|
||||
allwinner,pins = "PB13";
|
||||
allwinner,function = "spdif";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
timer@01c20c00 {
|
||||
|
@ -1034,6 +1052,19 @@ pwm: pwm@01c20e00 {
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
spdif: spdif@01c21000 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-spdif";
|
||||
reg = <0x01c21000 0x400>;
|
||||
interrupts = <13>;
|
||||
clocks = <&apb0_gates 1>, <&spdif_clk>;
|
||||
clock-names = "apb", "spdif";
|
||||
dmas = <&dma SUN4I_DMA_NORMAL 2>,
|
||||
<&dma SUN4I_DMA_NORMAL 2>;
|
||||
dma-names = "rx", "tx";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ir0: ir@01c21800 {
|
||||
compatible = "allwinner,sun4i-a10-ir";
|
||||
clocks = <&apb0_gates 6>, <&ir0_clk>;
|
||||
|
|
|
@ -0,0 +1,226 @@
|
|||
/*
|
||||
* Copyright 2016 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.
|
||||
*
|
||||
* 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-a13.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>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "Difrnce DIT4350";
|
||||
compatible = "difrnce,dit4350", "allwinner,sun5i-a13";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart1;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <8>;
|
||||
/* TODO: backlight uses axp gpio1 as enable pin */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <®_dcdc2>;
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
axp209: pmic@34 {
|
||||
reg = <0x34>;
|
||||
interrupts = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp209.dtsi"
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
pcf8563: rtc@51 {
|
||||
compatible = "nxp,pcf8563";
|
||||
reg = <0x51>;
|
||||
};
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_ldo2>;
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&otg_sram {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mmc0_cd_pin_d709: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PG0";
|
||||
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 = "PG1";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
|
||||
};
|
||||
|
||||
usb0_id_detect_pin: usb0_id_detect_pin@0 {
|
||||
allwinner,pins = "PG2";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1250000>;
|
||||
regulator-max-microvolt = <1250000>;
|
||||
regulator-name = "vdd-int-pll";
|
||||
};
|
||||
|
||||
®_ldo1 {
|
||||
regulator-name = "vdd-rtc";
|
||||
};
|
||||
|
||||
®_ldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_ldo3 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
®_usb0_vbus {
|
||||
gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0_vbus_pin_a {
|
||||
allwinner,pins = "PG12";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
|
||||
usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
|
||||
usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
|
||||
usb0_vbus-supply = <®_usb0_vbus>;
|
||||
usb1_vbus-supply = <®_ldo3>;
|
||||
status = "okay";
|
||||
};
|
|
@ -123,7 +123,7 @@ button@400 {
|
|||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
|
||||
|
@ -131,27 +131,12 @@ &mmc0 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_pins_a>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
mmccard: mmccard@0 {
|
||||
reg = <0>;
|
||||
compatible = "mmc-card";
|
||||
broken-hpi;
|
||||
};
|
||||
};
|
||||
|
||||
&otg_sram {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
|
||||
mmc0_cd_pin_d709: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PG0";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
|
|
|
@ -123,21 +123,6 @@ &mmc0 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_pins_a>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
mmccard: mmccard@0 {
|
||||
reg = <0>;
|
||||
compatible = "mmc-card";
|
||||
broken-hpi;
|
||||
};
|
||||
};
|
||||
|
||||
&otg_sram {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -109,6 +109,10 @@ &ohci0 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&otg_sram {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PG0";
|
||||
|
@ -124,6 +128,27 @@ led_pins_olinuxinom: led_pins@0 {
|
|||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb0_id_detect_pin: usb0_id_detect_pin@0 {
|
||||
allwinner,pins = "PG2";
|
||||
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 = "PG1";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
|
||||
};
|
||||
|
||||
usb0_vbus_pin_olinuxinom: usb0_vbus_pin@0 {
|
||||
allwinner,pins = "PG12";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 {
|
||||
allwinner,pins = "PG11";
|
||||
allwinner,function = "gpio_out";
|
||||
|
@ -132,6 +157,12 @@ usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 {
|
|||
};
|
||||
};
|
||||
|
||||
®_usb0_vbus {
|
||||
pinctrl-0 = <&usb0_vbus_pin_olinuxinom>;
|
||||
gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
pinctrl-0 = <&usb1_vbus_pin_olinuxinom>;
|
||||
gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
||||
|
@ -144,7 +175,17 @@ &uart1 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
|
||||
usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
|
||||
usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
|
||||
usb0_vbus-supply = <®_usb0_vbus>;
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -61,7 +61,8 @@ framebuffer@0 {
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
|
||||
<&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
@ -110,8 +111,8 @@ ahb_gates: clk@01c20060 {
|
|||
<10>, <13>,
|
||||
<14>, <20>,
|
||||
<21>, <22>,
|
||||
<28>, <32>, <36>,
|
||||
<40>, <44>,
|
||||
<28>, <32>, <34>,
|
||||
<36>, <40>, <44>,
|
||||
<46>, <51>,
|
||||
<52>;
|
||||
clock-output-names = "ahb_usbotg", "ahb_ehci",
|
||||
|
@ -120,8 +121,8 @@ ahb_gates: clk@01c20060 {
|
|||
"ahb_mmc2", "ahb_nand",
|
||||
"ahb_sdram", "ahb_spi0",
|
||||
"ahb_spi1", "ahb_spi2",
|
||||
"ahb_stimer", "ahb_ve", "ahb_lcd",
|
||||
"ahb_csi", "ahb_de_be",
|
||||
"ahb_stimer", "ahb_ve", "ahb_tve",
|
||||
"ahb_lcd", "ahb_csi", "ahb_de_be",
|
||||
"ahb_de_fe", "ahb_iep",
|
||||
"ahb_mali400";
|
||||
};
|
||||
|
@ -149,6 +150,26 @@ apb1_gates: clk@01c2006c {
|
|||
"apb1_i2c2", "apb1_uart1",
|
||||
"apb1_uart3";
|
||||
};
|
||||
|
||||
dram_gates: clk@01c20100 {
|
||||
#clock-cells = <1>;
|
||||
compatible = "allwinner,sun5i-a13-dram-gates-clk",
|
||||
"allwinner,sun4i-a10-gates-clk";
|
||||
reg = <0x01c20100 0x4>;
|
||||
clocks = <&pll5 0>;
|
||||
clock-indices = <0>,
|
||||
<1>,
|
||||
<25>,
|
||||
<26>,
|
||||
<29>,
|
||||
<31>;
|
||||
clock-output-names = "dram_ve",
|
||||
"dram_csi",
|
||||
"dram_de_fe",
|
||||
"dram_de_be",
|
||||
"dram_ace",
|
||||
"dram_iep";
|
||||
};
|
||||
};
|
||||
|
||||
soc@01c00000 {
|
||||
|
|
|
@ -52,7 +52,7 @@ framebuffer@1 {
|
|||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>;
|
||||
<&ahb_gates 44>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -88,6 +88,15 @@ osc24M: clk@01c20050 {
|
|||
clock-output-names = "osc24M";
|
||||
};
|
||||
|
||||
osc3M: osc3M_clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-div = <8>;
|
||||
clock-mult = <1>;
|
||||
clocks = <&osc24M>;
|
||||
clock-output-names = "osc3M";
|
||||
};
|
||||
|
||||
osc32k: clk@0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
|
@ -112,6 +121,23 @@ pll2: clk@01c20008 {
|
|||
"pll2-4x", "pll2-8x";
|
||||
};
|
||||
|
||||
pll3: clk@01c20010 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-pll3-clk";
|
||||
reg = <0x01c20010 0x4>;
|
||||
clocks = <&osc3M>;
|
||||
clock-output-names = "pll3";
|
||||
};
|
||||
|
||||
pll3x2: pll3x2_clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-div = <1>;
|
||||
clock-mult = <2>;
|
||||
clocks = <&pll3>;
|
||||
clock-output-names = "pll3-2x";
|
||||
};
|
||||
|
||||
pll4: clk@01c20018 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-pll1-clk";
|
||||
|
@ -136,6 +162,23 @@ pll6: clk@01c20028 {
|
|||
clock-output-names = "pll6_sata", "pll6_other", "pll6";
|
||||
};
|
||||
|
||||
pll7: clk@01c20030 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-pll3-clk";
|
||||
reg = <0x01c20030 0x4>;
|
||||
clocks = <&osc3M>;
|
||||
clock-output-names = "pll7";
|
||||
};
|
||||
|
||||
pll7x2: pll7x2_clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-div = <1>;
|
||||
clock-mult = <2>;
|
||||
clocks = <&pll7>;
|
||||
clock-output-names = "pll7-2x";
|
||||
};
|
||||
|
||||
/* dummy is 200M */
|
||||
cpu: cpu@01c20054 {
|
||||
#clock-cells = <0>;
|
||||
|
|
|
@ -0,0 +1,208 @@
|
|||
/*
|
||||
* Copyright 2016 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.
|
||||
*
|
||||
* 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 "sunxi-common-regulators.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
|
||||
/ {
|
||||
model = "Colorfly E708 Q1 tablet";
|
||||
compatible = "colorfly,e708-q1", "allwinner,sun6i-a31s";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <®_dcdc3>;
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
/* rtl8188etv wifi is connected here */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_aldo3>;
|
||||
status = "okay";
|
||||
|
||||
button@1000 {
|
||||
label = "Home";
|
||||
linux,code = <KEY_HOMEPAGE>;
|
||||
channel = <0>;
|
||||
voltage = <1000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mma8452_int_e708_q1: mma8452_int_pin@0 {
|
||||
allwinner,pins = "PA9";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PA8";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
&p2wi {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@68 {
|
||||
compatible = "x-powers,axp221";
|
||||
reg = <0x68>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_dc1sw {
|
||||
regulator-name = "vcc-lcd";
|
||||
};
|
||||
|
||||
®_dc5ldo {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd-cpus"; /* This is an educated guess */
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd-gpu";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc4 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd-sys-dll";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
®_dldo2 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-pg";
|
||||
};
|
||||
|
||||
&simplefb_lcd {
|
||||
vcc-lcd-supply = <®_dc1sw>;
|
||||
vcc-pg-supply = <®_dldo2>;
|
||||
};
|
||||
|
||||
/*
|
||||
* FIXME for now we only support host mode and rely on u-boot to have
|
||||
* turned on Vbus which is controlled by the axp221 pmic on the board.
|
||||
*
|
||||
* Once we have axp221 power-supply and vbus-usb support we should switch
|
||||
* to fully supporting otg.
|
||||
*/
|
||||
&usb_otg {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_dldo1>;
|
||||
status = "okay";
|
||||
};
|
|
@ -94,6 +94,24 @@ mmc3_pwrseq: mmc3_pwrseq {
|
|||
pinctrl-0 = <&mmc3_pwrseq_pin_cubietruck>;
|
||||
reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "On-board SPDIF";
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&spdif>;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&spdif_out>;
|
||||
};
|
||||
};
|
||||
|
||||
spdif_out: spdif-out {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dit";
|
||||
};
|
||||
};
|
||||
|
||||
&ahci {
|
||||
|
@ -301,6 +319,12 @@ ®_usb2_vbus {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&spdif {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spdif_tx_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
|
|
|
@ -65,6 +65,24 @@ blue {
|
|||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "On-board SPDIF";
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&spdif>;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&spdif_out>;
|
||||
};
|
||||
};
|
||||
|
||||
spdif_out: spdif-out {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dit";
|
||||
};
|
||||
};
|
||||
|
||||
&ahci {
|
||||
|
@ -123,3 +141,9 @@ led_pins_itead_core: led_pins@0 {
|
|||
®_ahci_5v {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spdif {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spdif_tx_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -85,8 +85,9 @@ framebuffer@2 {
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>, <&dram_gates 26>;
|
||||
clocks = <&pll5 1>,
|
||||
<&ahb_gates 34>, <&ahb_gates 36>, <&ahb_gates 44>,
|
||||
<&dram_gates 5>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
@ -476,6 +477,17 @@ ir1_clk: clk@01c200b4 {
|
|||
clock-output-names = "ir1";
|
||||
};
|
||||
|
||||
spdif_clk: clk@01c200c0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-mod1-clk";
|
||||
reg = <0x01c200c0 0x4>;
|
||||
clocks = <&pll2 SUN4I_A10_PLL2_8X>,
|
||||
<&pll2 SUN4I_A10_PLL2_4X>,
|
||||
<&pll2 SUN4I_A10_PLL2_2X>,
|
||||
<&pll2 SUN4I_A10_PLL2_1X>;
|
||||
clock-output-names = "spdif";
|
||||
};
|
||||
|
||||
keypad_clk: clk@01c200c4 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-mod0-clk";
|
||||
|
@ -1193,6 +1205,13 @@ ps21_pins_a: ps21@0 {
|
|||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
spdif_tx_pins_a: spdif@0 {
|
||||
allwinner,pins = "PB13";
|
||||
allwinner,function = "spdif";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
timer@01c20c00 {
|
||||
|
@ -1226,6 +1245,19 @@ pwm: pwm@01c20e00 {
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
spdif: spdif@01c21000 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "allwinner,sun4i-a10-spdif";
|
||||
reg = <0x01c21000 0x400>;
|
||||
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&apb0_gates 1>, <&spdif_clk>;
|
||||
clock-names = "apb", "spdif";
|
||||
dmas = <&dma SUN4I_DMA_NORMAL 2>,
|
||||
<&dma SUN4I_DMA_NORMAL 2>;
|
||||
dma-names = "rx", "tx";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ir0: ir@01c21800 {
|
||||
compatible = "allwinner,sun4i-a10-ir";
|
||||
clocks = <&apb0_gates 6>, <&ir0_clk>;
|
||||
|
|
|
@ -47,15 +47,26 @@
|
|||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "Allwinner GT90H Quad Core Tablet (v4)";
|
||||
compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
|
||||
model = "Allwinner GT90H Dual Core Tablet (v4)";
|
||||
compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
|
||||
|
||||
aliases {
|
||||
serial0 = &r_uart;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bl_en_pin_gt90h>;
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <8>;
|
||||
enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
@ -106,8 +117,7 @@ button@600 {
|
|||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
|
||||
/* FIXME this really is aldo1, correct once we've pmic support */
|
||||
vmmc-supply = <®_vcc3v0>;
|
||||
vmmc-supply = <®_aldo1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
|
||||
cd-inverted;
|
||||
|
@ -115,6 +125,13 @@ &mmc0 {
|
|||
};
|
||||
|
||||
&pio {
|
||||
bl_en_pin_gt90h: bl_en_pin@0 {
|
||||
allwinner,pins = "PH6";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PB4";
|
||||
allwinner,function = "gpio_in";
|
||||
|
@ -123,12 +140,106 @@ mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
|
|||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@3a3 {
|
||||
compatible = "x-powers,axp223";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
};
|
||||
};
|
||||
|
||||
&r_uart {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&r_uart_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-io";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2350000>;
|
||||
regulator-max-microvolt = <2650000>;
|
||||
regulator-name = "vdd-dll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-pll-avcc";
|
||||
};
|
||||
|
||||
®_dc1sw {
|
||||
regulator-name = "vcc-lcd";
|
||||
};
|
||||
|
||||
®_dc5ldo {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
&simplefb_lcd {
|
||||
vcc-lcd-supply = <®_dc1sw>;
|
||||
};
|
||||
|
||||
/*
|
||||
* FIXME for now we only support host mode and rely on u-boot to have
|
||||
* turned on Vbus which is controlled by the axp223 pmic on the board.
|
||||
|
@ -141,5 +252,6 @@ &usb_otg {
|
|||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_dldo1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -0,0 +1,243 @@
|
|||
/*
|
||||
* Copyright 2016 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.
|
||||
*
|
||||
* 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-a23.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>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "Polaroid MID2809PXE04 tablet";
|
||||
compatible = "polaroid,mid2809pxe04", "allwinner,sun8i-a23";
|
||||
|
||||
aliases {
|
||||
serial0 = &r_uart;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bl_en_pin_mid2809>;
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <8>;
|
||||
enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_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>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mid2809>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
bl_en_pin_mid2809: bl_en_pin@0 {
|
||||
allwinner,pins = "PH6";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_mid2809: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PB4";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@3a3 {
|
||||
compatible = "x-powers,axp223";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
};
|
||||
};
|
||||
|
||||
&r_uart {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&r_uart_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-io";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2350000>;
|
||||
regulator-max-microvolt = <2650000>;
|
||||
regulator-name = "vdd-dll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-pll-avcc";
|
||||
};
|
||||
|
||||
®_dc1sw {
|
||||
regulator-name = "vcc-lcd";
|
||||
};
|
||||
|
||||
®_dc5ldo {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
&simplefb_lcd {
|
||||
vcc-lcd-supply = <®_dc1sw>;
|
||||
};
|
||||
|
||||
/*
|
||||
* FIXME for now we only support host mode and rely on u-boot to have
|
||||
* turned on Vbus which is controlled by the axp223 pmic on the board.
|
||||
*
|
||||
* Once we have axp223 support we should switch to fully supporting otg.
|
||||
*/
|
||||
&usb_otg {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,186 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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.
|
||||
*
|
||||
* 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-h3.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 = "Xunlong Orange Pi 2";
|
||||
compatible = "xunlong,orangepi-2", "allwinner,sun8i-h3";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
|
||||
|
||||
status_led {
|
||||
label = "orangepi:red:status";
|
||||
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
pwr_led {
|
||||
label = "orangepi:green:pwr";
|
||||
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
r_gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sw_r_opc>;
|
||||
|
||||
sw2 {
|
||||
label = "sw2";
|
||||
linux,code = <BTN_1>;
|
||||
gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sw4 {
|
||||
label = "sw4";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_pwrseq_pin_orangepi>;
|
||||
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 WIFI_EN */
|
||||
};
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ir {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ir_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins_a>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&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 = "PL3", "PL4";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 {
|
||||
allwinner,pins = "PL7";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1_vbus_pin_a {
|
||||
allwinner,pins = "PG13";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,145 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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.
|
||||
*
|
||||
* 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-h3.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 = "Xunlong Orange Pi One";
|
||||
compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
|
||||
|
||||
pwr_led {
|
||||
label = "orangepi:green:pwr";
|
||||
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
status_led {
|
||||
label = "orangepi:red:status";
|
||||
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
r_gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sw_r_opc>;
|
||||
|
||||
sw4 {
|
||||
label = "sw4";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&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 = "PL3";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
/* USB VBUS is always on */
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
* Copyright (C) 2015 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-h3.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 = "Xunlong Orange Pi PC";
|
||||
compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
|
||||
|
||||
pwr_led {
|
||||
label = "orangepi:green:pwr";
|
||||
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
status_led {
|
||||
label = "orangepi:red:status";
|
||||
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
r_gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sw_r_opc>;
|
||||
|
||||
sw4 {
|
||||
label = "sw4";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ir {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ir_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&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 = "PL3";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
/* USB VBUS is always on */
|
||||
status = "okay";
|
||||
};
|
|
@ -40,95 +40,56 @@
|
|||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun8i-h3.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>
|
||||
/* The Orange Pi Plus is an extended version of the Orange Pi 2 */
|
||||
#include "sun8i-h3-orangepi-2.dts"
|
||||
|
||||
/ {
|
||||
model = "Xunlong Orange Pi Plus";
|
||||
compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
reg_usb3_vbus: usb3-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
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";
|
||||
};
|
||||
pinctrl-0 = <&usb3_vbus_pin_a>;
|
||||
regulator-name = "usb3-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
r_gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
input-name = "sw4";
|
||||
&ehci3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sw_r_opc>;
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_pins>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sw4@0 {
|
||||
label = "sw4";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
&mmc2_8bit_pins {
|
||||
/* Increase drive strength for DDR modes */
|
||||
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
|
||||
/* eMMC is missing pull-ups */
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
&pio {
|
||||
leds_opc: led_pins@0 {
|
||||
allwinner,pins = "PA15";
|
||||
usb3_vbus_pin_a: usb3_vbus_pin@0 {
|
||||
allwinner,pins = "PG11";
|
||||
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 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
status = "okay";
|
||||
&usbphy {
|
||||
usb3_vbus-supply = <®_usb3_vbus>;
|
||||
};
|
||||
|
|
|
@ -269,6 +269,18 @@ mmc2_clk: clk@01c20090 {
|
|||
"mmc2_sample";
|
||||
};
|
||||
|
||||
usb_clk: clk@01c200cc {
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
compatible = "allwinner,sun8i-h3-usb-clk";
|
||||
reg = <0x01c200cc 0x4>;
|
||||
clocks = <&osc24M>;
|
||||
clock-output-names = "usb_phy0", "usb_phy1",
|
||||
"usb_phy2", "usb_phy3",
|
||||
"usb_ohci0", "usb_ohci1",
|
||||
"usb_ohci2", "usb_ohci3";
|
||||
};
|
||||
|
||||
mbus_clk: clk@01c2015c {
|
||||
#clock-cells = <0>;
|
||||
compatible = "allwinner,sun8i-a23-mbus-clk";
|
||||
|
@ -377,6 +389,107 @@ mmc2: mmc@01c11000 {
|
|||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
usbphy: phy@01c19400 {
|
||||
compatible = "allwinner,sun8i-h3-usb-phy";
|
||||
reg = <0x01c19400 0x2c>,
|
||||
<0x01c1a800 0x4>,
|
||||
<0x01c1b800 0x4>,
|
||||
<0x01c1c800 0x4>,
|
||||
<0x01c1d800 0x4>;
|
||||
reg-names = "phy_ctrl",
|
||||
"pmu0",
|
||||
"pmu1",
|
||||
"pmu2",
|
||||
"pmu3";
|
||||
clocks = <&usb_clk 8>,
|
||||
<&usb_clk 9>,
|
||||
<&usb_clk 10>,
|
||||
<&usb_clk 11>;
|
||||
clock-names = "usb0_phy",
|
||||
"usb1_phy",
|
||||
"usb2_phy",
|
||||
"usb3_phy";
|
||||
resets = <&usb_clk 0>,
|
||||
<&usb_clk 1>,
|
||||
<&usb_clk 2>,
|
||||
<&usb_clk 3>;
|
||||
reset-names = "usb0_reset",
|
||||
"usb1_reset",
|
||||
"usb2_reset",
|
||||
"usb3_reset";
|
||||
status = "disabled";
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
|
||||
ehci1: usb@01c1b000 {
|
||||
compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
|
||||
reg = <0x01c1b000 0x100>;
|
||||
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bus_gates 25>, <&bus_gates 29>;
|
||||
resets = <&ahb_rst 25>, <&ahb_rst 29>;
|
||||
phys = <&usbphy 1>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ohci1: usb@01c1b400 {
|
||||
compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
|
||||
reg = <0x01c1b400 0x100>;
|
||||
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bus_gates 29>, <&bus_gates 25>,
|
||||
<&usb_clk 17>;
|
||||
resets = <&ahb_rst 29>, <&ahb_rst 25>;
|
||||
phys = <&usbphy 1>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ehci2: usb@01c1c000 {
|
||||
compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
|
||||
reg = <0x01c1c000 0x100>;
|
||||
interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bus_gates 26>, <&bus_gates 30>;
|
||||
resets = <&ahb_rst 26>, <&ahb_rst 30>;
|
||||
phys = <&usbphy 2>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ohci2: usb@01c1c400 {
|
||||
compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
|
||||
reg = <0x01c1c400 0x100>;
|
||||
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bus_gates 30>, <&bus_gates 26>,
|
||||
<&usb_clk 18>;
|
||||
resets = <&ahb_rst 30>, <&ahb_rst 26>;
|
||||
phys = <&usbphy 2>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ehci3: usb@01c1d000 {
|
||||
compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
|
||||
reg = <0x01c1d000 0x100>;
|
||||
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bus_gates 27>, <&bus_gates 31>;
|
||||
resets = <&ahb_rst 27>, <&ahb_rst 31>;
|
||||
phys = <&usbphy 3>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ohci3: usb@01c1d400 {
|
||||
compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
|
||||
reg = <0x01c1d400 0x100>;
|
||||
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bus_gates 31>, <&bus_gates 27>,
|
||||
<&usb_clk 19>;
|
||||
resets = <&ahb_rst 31>, <&ahb_rst 27>;
|
||||
phys = <&usbphy 3>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pio: pinctrl@01c20800 {
|
||||
compatible = "allwinner,sun8i-h3-pinctrl";
|
||||
reg = <0x01c20800 0x400>;
|
||||
|
@ -417,6 +530,16 @@ mmc1_pins_a: mmc1@0 {
|
|||
allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc2_8bit_pins: mmc2_8bit {
|
||||
allwinner,pins = "PC5", "PC6", "PC8",
|
||||
"PC9", "PC10", "PC11",
|
||||
"PC12", "PC13", "PC14",
|
||||
"PC15", "PC16";
|
||||
allwinner,function = "mmc2";
|
||||
allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb_rst: reset@01c202c0 {
|
||||
|
|
Loading…
Reference in New Issue