sunxi: initial 4.4 support
[openwrt/openwrt.git] / target / linux / sunxi / patches-4.4 / 104-2-dt-sun8i-add-orangepi-plus.patch
1 From dfcf8196de7411a5e7fd49795938b1bc8c56859c Mon Sep 17 00:00:00 2001
2 From: Jens Kuske <jenskuske@gmail.com>
3 Date: Fri, 4 Dec 2015 22:24:43 +0100
4 Subject: [PATCH] ARM: dts: sun8i: Add Orange Pi Plus support
5
6 The Orange Pi Plus is a SBC based on the Allwinner H3 SoC
7 with 8GB eMMC, multiple USB ports through a USB hub chip, SATA through
8 a USB-SATA bridge, one uSD slot, a 10/100/1000M ethernet port,
9 WiFi, HDMI, headphone jack, IR receiver, a microphone, a CSI connector
10 and a 40-pin GPIO header.
11
12 Signed-off-by: Jens Kuske <jenskuske@gmail.com>
13 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
14 ---
15 arch/arm/boot/dts/Makefile | 3 +-
16 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 77 ++++++++++++++++++++++++++++
17 2 files changed, 79 insertions(+), 1 deletion(-)
18 create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
19
20 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
21 index e8f44c7..cc7309b 100644
22 --- a/arch/arm/boot/dts/Makefile
23 +++ b/arch/arm/boot/dts/Makefile
24 @@ -661,7 +661,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
25 sun8i-a33-ga10h-v1.1.dtb \
26 sun8i-a33-ippo-q8h-v1.2.dtb \
27 sun8i-a33-q8-tablet.dtb \
28 - sun8i-a33-sinlinx-sina33.dtb
29 + sun8i-a33-sinlinx-sina33.dtb \
30 + sun8i-h3-orangepi-plus.dtb
31 dtb-$(CONFIG_MACH_SUN9I) += \
32 sun9i-a80-optimus.dtb \
33 sun9i-a80-cubieboard4.dtb
34 diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
35 new file mode 100644
36 index 0000000..e67df59
37 --- /dev/null
38 +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
39 @@ -0,0 +1,77 @@
40 +/*
41 + * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
42 + *
43 + * This file is dual-licensed: you can use it either under the terms
44 + * of the GPL or the X11 license, at your option. Note that this dual
45 + * licensing only applies to this file, and not this project as a
46 + * whole.
47 + *
48 + * a) This file is free software; you can redistribute it and/or
49 + * modify it under the terms of the GNU General Public License as
50 + * published by the Free Software Foundation; either version 2 of the
51 + * License, or (at your option) any later version.
52 + *
53 + * This file is distributed in the hope that it will be useful,
54 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
55 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 + * GNU General Public License for more details.
57 + *
58 + * Or, alternatively,
59 + *
60 + * b) Permission is hereby granted, free of charge, to any person
61 + * obtaining a copy of this software and associated documentation
62 + * files (the "Software"), to deal in the Software without
63 + * restriction, including without limitation the rights to use,
64 + * copy, modify, merge, publish, distribute, sublicense, and/or
65 + * sell copies of the Software, and to permit persons to whom the
66 + * Software is furnished to do so, subject to the following
67 + * conditions:
68 + *
69 + * The above copyright notice and this permission notice shall be
70 + * included in all copies or substantial portions of the Software.
71 + *
72 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
73 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
74 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
75 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
76 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
77 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
78 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
79 + * OTHER DEALINGS IN THE SOFTWARE.
80 + */
81 +
82 +/dts-v1/;
83 +#include "sun8i-h3.dtsi"
84 +#include "sunxi-common-regulators.dtsi"
85 +
86 +#include <dt-bindings/gpio/gpio.h>
87 +#include <dt-bindings/pinctrl/sun4i-a10.h>
88 +
89 +/ {
90 + model = "Xunlong Orange Pi Plus";
91 + compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
92 +
93 + aliases {
94 + serial0 = &uart0;
95 + };
96 +
97 + chosen {
98 + stdout-path = "serial0:115200n8";
99 + };
100 +};
101 +
102 +&mmc0 {
103 + pinctrl-names = "default";
104 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
105 + vmmc-supply = <&reg_vcc3v3>;
106 + bus-width = <4>;
107 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
108 + cd-inverted;
109 + status = "okay";
110 +};
111 +
112 +&uart0 {
113 + pinctrl-names = "default";
114 + pinctrl-0 = <&uart0_pins_a>;
115 + status = "okay";
116 +};