* [PATCH] ARM: dts: sun8i: Add Orange Pi PC support
@ 2015-11-18 5:40 Chen-Yu Tsai
2015-11-20 14:40 ` Hans de Goede
2015-11-23 20:45 ` Maxime Ripard
0 siblings, 2 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2015-11-18 5:40 UTC (permalink / raw)
To: linux-arm-kernel
The Orange Pi PC is an SBC based on the Allwinner H3 SoC with a uSD slot,
3 USB ports directly from the SoC, a 10/100M ethernet port using the
SoC's integrated PHY, USB OTG, HDMI, a TRRS headphone jack for stereo out
and composite out, a microphone, an IR receiver, a CSI connector, 2 LEDs,
a 3 pin UART header, and a 40-pin GPIO header.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
This is based on Jens' H3 patches and Hans' H3 USB patches.
USB works nicely on this board.
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 106 +++++++++++++++++++++++++++++
2 files changed, 107 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4e8026e85b79..0ef528a7d845 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -661,6 +661,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a33-ippo-q8h-v1.2.dtb \
sun8i-a33-q8-tablet.dtb \
sun8i-a33-sinlinx-sina33.dtb \
+ sun8i-h3-orangepi-pc.dtb \
sun8i-h3-orangepi-plus.dtb
dtb-$(CONFIG_MACH_SUN9I) += \
sun9i-a80-optimus.dtb \
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
new file mode 100644
index 000000000000..4b25dcc3fdd2
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -0,0 +1,106 @@
+/*
+ * 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/pinctrl/sun4i-a10.h>
+
+/ {
+ model = "Xunlong Orange Pi PC";
+ compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ehci3 {
+ 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";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
+ status = "okay";
+};
+
+&usbphy {
+ /* USB VBUS is always on */
+ status = "okay";
+};
--
2.6.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: dts: sun8i: Add Orange Pi PC support
2015-11-18 5:40 [PATCH] ARM: dts: sun8i: Add Orange Pi PC support Chen-Yu Tsai
@ 2015-11-20 14:40 ` Hans de Goede
2015-11-23 20:45 ` Maxime Ripard
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2015-11-20 14:40 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 18-11-15 06:40, Chen-Yu Tsai wrote:
> The Orange Pi PC is an SBC based on the Allwinner H3 SoC with a uSD slot,
> 3 USB ports directly from the SoC, a 10/100M ethernet port using the
> SoC's integrated PHY, USB OTG, HDMI, a TRRS headphone jack for stereo out
> and composite out, a microphone, an IR receiver, a CSI connector, 2 LEDs,
> a 3 pin UART header, and a 40-pin GPIO header.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Thanks, I've added this to my sunxi-wip branch for now.
Regards,
Hans
> ---
>
> This is based on Jens' H3 patches and Hans' H3 USB patches.
> USB works nicely on this board.
>
> ---
> arch/arm/boot/dts/Makefile | 1 +
> arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 106 +++++++++++++++++++++++++++++
> 2 files changed, 107 insertions(+)
> create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 4e8026e85b79..0ef528a7d845 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -661,6 +661,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
> sun8i-a33-ippo-q8h-v1.2.dtb \
> sun8i-a33-q8-tablet.dtb \
> sun8i-a33-sinlinx-sina33.dtb \
> + sun8i-h3-orangepi-pc.dtb \
> sun8i-h3-orangepi-plus.dtb
> dtb-$(CONFIG_MACH_SUN9I) += \
> sun9i-a80-optimus.dtb \
> diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
> new file mode 100644
> index 000000000000..4b25dcc3fdd2
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
> @@ -0,0 +1,106 @@
> +/*
> + * 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/pinctrl/sun4i-a10.h>
> +
> +/ {
> + model = "Xunlong Orange Pi PC";
> + compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
> +
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +};
> +
> +&ehci1 {
> + status = "okay";
> +};
> +
> +&ehci2 {
> + status = "okay";
> +};
> +
> +&ehci3 {
> + 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";
> +};
> +
> +&uart0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_pins_a>;
> + status = "okay";
> +};
> +
> +&usbphy {
> + /* USB VBUS is always on */
> + status = "okay";
> +};
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: dts: sun8i: Add Orange Pi PC support
2015-11-18 5:40 [PATCH] ARM: dts: sun8i: Add Orange Pi PC support Chen-Yu Tsai
2015-11-20 14:40 ` Hans de Goede
@ 2015-11-23 20:45 ` Maxime Ripard
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2015-11-23 20:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Wed, Nov 18, 2015 at 01:40:33PM +0800, Chen-Yu Tsai wrote:
> +&usbphy {
> + /* USB VBUS is always on */
> + status = "okay";
> +};
You can tie it to reg_5v0 then :)
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151123/c3e08e4a/attachment-0001.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-23 20:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 5:40 [PATCH] ARM: dts: sun8i: Add Orange Pi PC support Chen-Yu Tsai
2015-11-20 14:40 ` Hans de Goede
2015-11-23 20:45 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).