kernel/3.18: update to version 3.18.25
[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 --- a/arch/arm/boot/dts/Makefile
21 +++ b/arch/arm/boot/dts/Makefile
22 @@ -660,7 +660,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
23 sun8i-a33-ga10h-v1.1.dtb \
24 sun8i-a33-ippo-q8h-v1.2.dtb \
25 sun8i-a33-q8-tablet.dtb \
26 - sun8i-a33-sinlinx-sina33.dtb
27 + sun8i-a33-sinlinx-sina33.dtb \
28 + sun8i-h3-orangepi-plus.dtb
29 dtb-$(CONFIG_MACH_SUN9I) += \
30 sun9i-a80-optimus.dtb \
31 sun9i-a80-cubieboard4.dtb
32 --- /dev/null
33 +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
34 @@ -0,0 +1,77 @@
35 +/*
36 + * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
37 + *
38 + * This file is dual-licensed: you can use it either under the terms
39 + * of the GPL or the X11 license, at your option. Note that this dual
40 + * licensing only applies to this file, and not this project as a
41 + * whole.
42 + *
43 + * a) This file is free software; you can redistribute it and/or
44 + * modify it under the terms of the GNU General Public License as
45 + * published by the Free Software Foundation; either version 2 of the
46 + * License, or (at your option) any later version.
47 + *
48 + * This file is distributed in the hope that it will be useful,
49 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
50 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 + * GNU General Public License for more details.
52 + *
53 + * Or, alternatively,
54 + *
55 + * b) Permission is hereby granted, free of charge, to any person
56 + * obtaining a copy of this software and associated documentation
57 + * files (the "Software"), to deal in the Software without
58 + * restriction, including without limitation the rights to use,
59 + * copy, modify, merge, publish, distribute, sublicense, and/or
60 + * sell copies of the Software, and to permit persons to whom the
61 + * Software is furnished to do so, subject to the following
62 + * conditions:
63 + *
64 + * The above copyright notice and this permission notice shall be
65 + * included in all copies or substantial portions of the Software.
66 + *
67 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
68 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
69 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
70 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
71 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
72 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
73 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
74 + * OTHER DEALINGS IN THE SOFTWARE.
75 + */
76 +
77 +/dts-v1/;
78 +#include "sun8i-h3.dtsi"
79 +#include "sunxi-common-regulators.dtsi"
80 +
81 +#include <dt-bindings/gpio/gpio.h>
82 +#include <dt-bindings/pinctrl/sun4i-a10.h>
83 +
84 +/ {
85 + model = "Xunlong Orange Pi Plus";
86 + compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
87 +
88 + aliases {
89 + serial0 = &uart0;
90 + };
91 +
92 + chosen {
93 + stdout-path = "serial0:115200n8";
94 + };
95 +};
96 +
97 +&mmc0 {
98 + pinctrl-names = "default";
99 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
100 + vmmc-supply = <&reg_vcc3v3>;
101 + bus-width = <4>;
102 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
103 + cd-inverted;
104 + status = "okay";
105 +};
106 +
107 +&uart0 {
108 + pinctrl-names = "default";
109 + pinctrl-0 = <&uart0_pins_a>;
110 + status = "okay";
111 +};