All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-25 19:26 ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki

From: Jagan Teki <jagan@amarulasolutions.com>

Orangepi Win/WinPlus is an open-source single-board computer
using the Allwinner A64 SOC.

A64 Orangepi Win/WinPlus has
- A64 Quad-core Cortex-A53 64bit
- 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
- Debug TTL UART
- Four USB 2.0
- HDMI
- LCD
- Audio and MIC
- Wifi + BT
- IR receiver
- 5V DC power supply

http://www.orangepi.org/OrangePiWin_WinPlus/

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/Makefile             |   1 +
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
 2 files changed, 103 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 244e8b7..4120ce9 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -1,5 +1,6 @@
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 
 always		:= $(dtb-y)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
new file mode 100644
index 0000000..b16e606
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Win/Win Plus";
+	compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins>;
+	vmmc-supply = <&reg_vcc3v3>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-25 19:26 ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jagan Teki

From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>

Orangepi Win/WinPlus is an open-source single-board computer
using the Allwinner A64 SOC.

A64 Orangepi Win/WinPlus has
- A64 Quad-core Cortex-A53 64bit
- 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
- Debug TTL UART
- Four USB 2.0
- HDMI
- LCD
- Audio and MIC
- Wifi + BT
- IR receiver
- 5V DC power supply

http://www.orangepi.org/OrangePiWin_WinPlus/

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/Makefile             |   1 +
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
 2 files changed, 103 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 244e8b7..4120ce9 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -1,5 +1,6 @@
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 
 always		:= $(dtb-y)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
new file mode 100644
index 0000000..b16e606
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-a64.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Win/Win Plus";
+	compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins>;
+	vmmc-supply = <&reg_vcc3v3>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-25 19:26 ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jagan Teki <jagan@amarulasolutions.com>

Orangepi Win/WinPlus is an open-source single-board computer
using the Allwinner A64 SOC.

A64 Orangepi Win/WinPlus has
- A64 Quad-core Cortex-A53 64bit
- 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
- Debug TTL UART
- Four USB 2.0
- HDMI
- LCD
- Audio and MIC
- Wifi + BT
- IR receiver
- 5V DC power supply

http://www.orangepi.org/OrangePiWin_WinPlus/

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/Makefile             |   1 +
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
 2 files changed, 103 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 244e8b7..4120ce9 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -1,5 +1,6 @@
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 
 always		:= $(dtb-y)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
new file mode 100644
index 0000000..b16e606
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Win/Win Plus";
+	compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins>;
+	vmmc-supply = <&reg_vcc3v3>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-25 19:26   ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki

From: Jagan Teki <jagan@amarulasolutions.com>

Orangepi Prime is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Prime has
- Quad-core Cortex-A53
- 2GB DDR3
- Debug TTL UART
- 1000M/100M Ethernet RJ45
- Three USB 2.0
- HDMI
- Audio and MIC
- Wifi + BT
- IR receiver
- HDMI
- Wifi + BT

http://www.orangepi.org/OrangePiPrime/

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/Makefile             |   1 +
 .../dts/allwinner/sun50i-h5-orangepi-prime.dts     | 100 +++++++++++++++++++++
 2 files changed, 101 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 4120ce9..bf7d3fe 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
new file mode 100644
index 0000000..9e98aac
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Prime";
+	compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x80000000>;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-25 19:26   ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jagan Teki

From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>

Orangepi Prime is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Prime has
- Quad-core Cortex-A53
- 2GB DDR3
- Debug TTL UART
- 1000M/100M Ethernet RJ45
- Three USB 2.0
- HDMI
- Audio and MIC
- Wifi + BT
- IR receiver
- HDMI
- Wifi + BT

http://www.orangepi.org/OrangePiPrime/

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/Makefile             |   1 +
 .../dts/allwinner/sun50i-h5-orangepi-prime.dts     | 100 +++++++++++++++++++++
 2 files changed, 101 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 4120ce9..bf7d3fe 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
new file mode 100644
index 0000000..9e98aac
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Prime";
+	compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x80000000>;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-25 19:26   ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jagan Teki <jagan@amarulasolutions.com>

Orangepi Prime is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Prime has
- Quad-core Cortex-A53
- 2GB DDR3
- Debug TTL UART
- 1000M/100M Ethernet RJ45
- Three USB 2.0
- HDMI
- Audio and MIC
- Wifi + BT
- IR receiver
- HDMI
- Wifi + BT

http://www.orangepi.org/OrangePiPrime/

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/Makefile             |   1 +
 .../dts/allwinner/sun50i-h5-orangepi-prime.dts     | 100 +++++++++++++++++++++
 2 files changed, 101 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 4120ce9..bf7d3fe 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
new file mode 100644
index 0000000..9e98aac
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Prime";
+	compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x80000000>;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/3] arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support
@ 2017-05-25 19:26   ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki

From: Jagan Teki <jagan@amarulasolutions.com>

Orangepi Zero Plus 2 is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Zero Plus 2 has
- Quad-core Cortex-A53
- 512MB DDR3
- Debug TTL UART
- HDMI
- Wifi + BT
- OTG+power supply

http://www.orangepi.org/OrangePiZeroPlus2/

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/Makefile             |  1 +
 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 88 ++++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index bf7d3fe..1648700 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
new file mode 100644
index 0000000..6dab1c4
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Zero Plus2";
+	compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x20000000>;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/3] arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support
@ 2017-05-25 19:26   ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jagan Teki

From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>

Orangepi Zero Plus 2 is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Zero Plus 2 has
- Quad-core Cortex-A53
- 512MB DDR3
- Debug TTL UART
- HDMI
- Wifi + BT
- OTG+power supply

http://www.orangepi.org/OrangePiZeroPlus2/

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/Makefile             |  1 +
 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 88 ++++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index bf7d3fe..1648700 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
new file mode 100644
index 0000000..6dab1c4
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Zero Plus2";
+	compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x20000000>;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/3] arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support
@ 2017-05-25 19:26   ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-25 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jagan Teki <jagan@amarulasolutions.com>

Orangepi Zero Plus 2 is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Zero Plus 2 has
- Quad-core Cortex-A53
- 512MB DDR3
- Debug TTL UART
- HDMI
- Wifi + BT
- OTG+power supply

http://www.orangepi.org/OrangePiZeroPlus2/

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm64/boot/dts/allwinner/Makefile             |  1 +
 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 88 ++++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index bf7d3fe..1648700 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
new file mode 100644
index 0000000..6dab1c4
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "OrangePi Zero Plus2";
+	compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x20000000>;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-25 22:30   ` André Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: André Przywara @ 2017-05-25 22:30 UTC (permalink / raw)
  To: jagannadh.teki, Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki, Icenowy Zheng

On 25/05/17 20:26, Jagan Teki wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Orangepi Win/WinPlus is an open-source single-board computer
> using the Allwinner A64 SOC.
> 
> A64 Orangepi Win/WinPlus has
> - A64 Quad-core Cortex-A53 64bit
> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
> - Debug TTL UART
> - Four USB 2.0

I take it those are connected to a hub chip, and the micro-USB socket is
connected as a true OTG socket?
So you should enable the usb_otg node, but without the host mode
override we use for the Pine64.

> - HDMI
> - LCD
> - Audio and MIC
> - Wifi + BT

It looks like Wifi + BT are soldered on the board, so you should at
least enable the proper UART connected to the Bluetooth chip, probably
also MMC1 (which is surely connected to the WiFi chip) should be
described as an SDIO node.

> - IR receiver
> - 5V DC power supply

I guess the board uses the AXP803 as well? You might want to coordinate
with Icenowy what to do to describe this as well, given that her patches
might go in before.

Cheers,
Andre.

> http://www.orangepi.org/OrangePiWin_WinPlus/
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>  2 files changed, 103 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index 244e8b7..4120ce9 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -1,5 +1,6 @@
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>  
>  always		:= $(dtb-y)
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> new file mode 100644
> index 0000000..b16e606
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> @@ -0,0 +1,102 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "OrangePi Win/Win Plus";
> +	compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pins>;
> +	status = "okay";
> +};
> +
> +&usbphy {
> +       status = "okay";
> +};
> +
> +&ohci1 {
> +       status = "okay";
> +};
> +
> +&ehci1 {
> +       status = "okay";
> +};
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-25 22:30   ` André Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: André Przywara @ 2017-05-25 22:30 UTC (permalink / raw)
  To: jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w, Maxime Ripard
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jagan Teki, Icenowy Zheng

On 25/05/17 20:26, Jagan Teki wrote:
> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> 
> Orangepi Win/WinPlus is an open-source single-board computer
> using the Allwinner A64 SOC.
> 
> A64 Orangepi Win/WinPlus has
> - A64 Quad-core Cortex-A53 64bit
> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
> - Debug TTL UART
> - Four USB 2.0

I take it those are connected to a hub chip, and the micro-USB socket is
connected as a true OTG socket?
So you should enable the usb_otg node, but without the host mode
override we use for the Pine64.

> - HDMI
> - LCD
> - Audio and MIC
> - Wifi + BT

It looks like Wifi + BT are soldered on the board, so you should at
least enable the proper UART connected to the Bluetooth chip, probably
also MMC1 (which is surely connected to the WiFi chip) should be
described as an SDIO node.

> - IR receiver
> - 5V DC power supply

I guess the board uses the AXP803 as well? You might want to coordinate
with Icenowy what to do to describe this as well, given that her patches
might go in before.

Cheers,
Andre.

> http://www.orangepi.org/OrangePiWin_WinPlus/
> 
> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>  2 files changed, 103 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index 244e8b7..4120ce9 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -1,5 +1,6 @@
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>  
>  always		:= $(dtb-y)
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> new file mode 100644
> index 0000000..b16e606
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> @@ -0,0 +1,102 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-a64.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "OrangePi Win/Win Plus";
> +	compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pins>;
> +	status = "okay";
> +};
> +
> +&usbphy {
> +       status = "okay";
> +};
> +
> +&ohci1 {
> +       status = "okay";
> +};
> +
> +&ehci1 {
> +       status = "okay";
> +};
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-25 22:30   ` André Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: André Przywara @ 2017-05-25 22:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 25/05/17 20:26, Jagan Teki wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Orangepi Win/WinPlus is an open-source single-board computer
> using the Allwinner A64 SOC.
> 
> A64 Orangepi Win/WinPlus has
> - A64 Quad-core Cortex-A53 64bit
> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
> - Debug TTL UART
> - Four USB 2.0

I take it those are connected to a hub chip, and the micro-USB socket is
connected as a true OTG socket?
So you should enable the usb_otg node, but without the host mode
override we use for the Pine64.

> - HDMI
> - LCD
> - Audio and MIC
> - Wifi + BT

It looks like Wifi + BT are soldered on the board, so you should at
least enable the proper UART connected to the Bluetooth chip, probably
also MMC1 (which is surely connected to the WiFi chip) should be
described as an SDIO node.

> - IR receiver
> - 5V DC power supply

I guess the board uses the AXP803 as well? You might want to coordinate
with Icenowy what to do to describe this as well, given that her patches
might go in before.

Cheers,
Andre.

> http://www.orangepi.org/OrangePiWin_WinPlus/
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>  2 files changed, 103 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index 244e8b7..4120ce9 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -1,5 +1,6 @@
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>  
>  always		:= $(dtb-y)
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> new file mode 100644
> index 0000000..b16e606
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
> @@ -0,0 +1,102 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "OrangePi Win/Win Plus";
> +	compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pins>;
> +	status = "okay";
> +};
> +
> +&usbphy {
> +       status = "okay";
> +};
> +
> +&ohci1 {
> +       status = "okay";
> +};
> +
> +&ehci1 {
> +       status = "okay";
> +};
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  3:54     ` Chen-Yu Tsai
  0 siblings, 0 replies; 33+ messages in thread
From: Chen-Yu Tsai @ 2017-05-26  3:54 UTC (permalink / raw)
  To: Jagan Teki
  Cc: André Przywara, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
	Jagan Teki, Icenowy Zheng

On Fri, May 26, 2017 at 6:30 AM, André Przywara <andre.przywara@arm.com> wrote:
> On 25/05/17 20:26, Jagan Teki wrote:
>> From: Jagan Teki <jagan@amarulasolutions.com>
>>
>> Orangepi Win/WinPlus is an open-source single-board computer
>> using the Allwinner A64 SOC.
>>
>> A64 Orangepi Win/WinPlus has
>> - A64 Quad-core Cortex-A53 64bit
>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>> - Debug TTL UART
>> - Four USB 2.0
>
> I take it those are connected to a hub chip, and the micro-USB socket is
> connected as a true OTG socket?
> So you should enable the usb_otg node, but without the host mode
> override we use for the Pine64.

Agreed. Unless OTG needs PMIC support.

>
>> - HDMI
>> - LCD
>> - Audio and MIC
>> - Wifi + BT
>
> It looks like Wifi + BT are soldered on the board, so you should at
> least enable the proper UART connected to the Bluetooth chip, probably
> also MMC1 (which is surely connected to the WiFi chip) should be
> described as an SDIO node.

Those probably need regulator support. Having them enabled together
might be better.

>
>> - IR receiver
>> - 5V DC power supply
>
> I guess the board uses the AXP803 as well? You might want to coordinate
> with Icenowy what to do to describe this as well, given that her patches
> might go in before.

Still waiting for NMI driver/bindings to be merged before I merge the dts
file changes. The mfd and regulator driver changes are already in -next.

>
> Cheers,
> Andre.
>
>> http://www.orangepi.org/OrangePiWin_WinPlus/

The URL is not going to be helpful if it goes offline.

Can someone provide schematics for this board? Without it there's really
no verification for what the device tree describes.

>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> ---
>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>  2 files changed, 103 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>> index 244e8b7..4120ce9 100644
>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>> @@ -1,5 +1,6 @@
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>
>>  always               := $(dtb-y)
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>> new file mode 100644
>> index 0000000..b16e606
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>> @@ -0,0 +1,102 @@
>> +/*
>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +
>> +/ {
>> +     model = "OrangePi Win/Win Plus";
>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>> +
>> +     aliases {
>> +             serial0 = &uart0;
>> +     };
>> +
>> +     chosen {
>> +             stdout-path = "serial0:115200n8";
>> +     };
>> +
>> +     soc {
>> +             reg_vcc3v3: vcc3v3 {
>> +                     compatible = "regulator-fixed";
>> +                     regulator-name = "vcc3v3";
>> +                     regulator-min-microvolt = <3300000>;
>> +                     regulator-max-microvolt = <3300000>;
>> +             };

This should be outside of the soc node. Furthermore, you should
not be doing full path overrides in the dts file. If you need
to reference a node, but it doesn't have a label, add the label
first.

>> +     };
>> +};
>> +
>> +&mmc0 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&mmc0_pins>;
>> +     vmmc-supply = <&reg_vcc3v3>;
>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;

Please add a comment after this denoting the pin name.

>> +     cd-inverted;
>> +     status = "okay";
>> +};
>> +
>> +&uart0 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&uart0_pins_a>;
>> +     status = "okay";
>> +};
>> +
>> +&i2c1 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&i2c1_pins>;
>> +     status = "okay";
>> +};
>> +
>> +&usbphy {
>> +       status = "okay";

No VBUS regulator supplies? Does the USB hub need a node?

Regards
ChenYu

>> +};
>> +
>> +&ohci1 {
>> +       status = "okay";
>> +};
>> +
>> +&ehci1 {
>> +       status = "okay";
>> +};
>>
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  3:54     ` Chen-Yu Tsai
  0 siblings, 0 replies; 33+ messages in thread
From: Chen-Yu Tsai @ 2017-05-26  3:54 UTC (permalink / raw)
  To: Jagan Teki
  Cc: André Przywara, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
	Jagan Teki, Icenowy Zheng

On Fri, May 26, 2017 at 6:30 AM, André Przywara <andre.przywara-AbSShOkvfpQ@public.gmane.orgm> wrote:
> On 25/05/17 20:26, Jagan Teki wrote:
>> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>
>> Orangepi Win/WinPlus is an open-source single-board computer
>> using the Allwinner A64 SOC.
>>
>> A64 Orangepi Win/WinPlus has
>> - A64 Quad-core Cortex-A53 64bit
>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>> - Debug TTL UART
>> - Four USB 2.0
>
> I take it those are connected to a hub chip, and the micro-USB socket is
> connected as a true OTG socket?
> So you should enable the usb_otg node, but without the host mode
> override we use for the Pine64.

Agreed. Unless OTG needs PMIC support.

>
>> - HDMI
>> - LCD
>> - Audio and MIC
>> - Wifi + BT
>
> It looks like Wifi + BT are soldered on the board, so you should at
> least enable the proper UART connected to the Bluetooth chip, probably
> also MMC1 (which is surely connected to the WiFi chip) should be
> described as an SDIO node.

Those probably need regulator support. Having them enabled together
might be better.

>
>> - IR receiver
>> - 5V DC power supply
>
> I guess the board uses the AXP803 as well? You might want to coordinate
> with Icenowy what to do to describe this as well, given that her patches
> might go in before.

Still waiting for NMI driver/bindings to be merged before I merge the dts
file changes. The mfd and regulator driver changes are already in -next.

>
> Cheers,
> Andre.
>
>> http://www.orangepi.org/OrangePiWin_WinPlus/

The URL is not going to be helpful if it goes offline.

Can someone provide schematics for this board? Without it there's really
no verification for what the device tree describes.

>>
>> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>> ---
>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>  2 files changed, 103 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>> index 244e8b7..4120ce9 100644
>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>> @@ -1,5 +1,6 @@
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>
>>  always               := $(dtb-y)
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>> new file mode 100644
>> index 0000000..b16e606
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>> @@ -0,0 +1,102 @@
>> +/*
>> + * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-a64.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +
>> +/ {
>> +     model = "OrangePi Win/Win Plus";
>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>> +
>> +     aliases {
>> +             serial0 = &uart0;
>> +     };
>> +
>> +     chosen {
>> +             stdout-path = "serial0:115200n8";
>> +     };
>> +
>> +     soc {
>> +             reg_vcc3v3: vcc3v3 {
>> +                     compatible = "regulator-fixed";
>> +                     regulator-name = "vcc3v3";
>> +                     regulator-min-microvolt = <3300000>;
>> +                     regulator-max-microvolt = <3300000>;
>> +             };

This should be outside of the soc node. Furthermore, you should
not be doing full path overrides in the dts file. If you need
to reference a node, but it doesn't have a label, add the label
first.

>> +     };
>> +};
>> +
>> +&mmc0 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&mmc0_pins>;
>> +     vmmc-supply = <&reg_vcc3v3>;
>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;

Please add a comment after this denoting the pin name.

>> +     cd-inverted;
>> +     status = "okay";
>> +};
>> +
>> +&uart0 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&uart0_pins_a>;
>> +     status = "okay";
>> +};
>> +
>> +&i2c1 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&i2c1_pins>;
>> +     status = "okay";
>> +};
>> +
>> +&usbphy {
>> +       status = "okay";

No VBUS regulator supplies? Does the USB hub need a node?

Regards
ChenYu

>> +};
>> +
>> +&ohci1 {
>> +       status = "okay";
>> +};
>> +
>> +&ehci1 {
>> +       status = "okay";
>> +};
>>
>

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  3:54     ` Chen-Yu Tsai
  0 siblings, 0 replies; 33+ messages in thread
From: Chen-Yu Tsai @ 2017-05-26  3:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 26, 2017 at 6:30 AM, Andr? Przywara <andre.przywara@arm.com> wrote:
> On 25/05/17 20:26, Jagan Teki wrote:
>> From: Jagan Teki <jagan@amarulasolutions.com>
>>
>> Orangepi Win/WinPlus is an open-source single-board computer
>> using the Allwinner A64 SOC.
>>
>> A64 Orangepi Win/WinPlus has
>> - A64 Quad-core Cortex-A53 64bit
>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>> - Debug TTL UART
>> - Four USB 2.0
>
> I take it those are connected to a hub chip, and the micro-USB socket is
> connected as a true OTG socket?
> So you should enable the usb_otg node, but without the host mode
> override we use for the Pine64.

Agreed. Unless OTG needs PMIC support.

>
>> - HDMI
>> - LCD
>> - Audio and MIC
>> - Wifi + BT
>
> It looks like Wifi + BT are soldered on the board, so you should at
> least enable the proper UART connected to the Bluetooth chip, probably
> also MMC1 (which is surely connected to the WiFi chip) should be
> described as an SDIO node.

Those probably need regulator support. Having them enabled together
might be better.

>
>> - IR receiver
>> - 5V DC power supply
>
> I guess the board uses the AXP803 as well? You might want to coordinate
> with Icenowy what to do to describe this as well, given that her patches
> might go in before.

Still waiting for NMI driver/bindings to be merged before I merge the dts
file changes. The mfd and regulator driver changes are already in -next.

>
> Cheers,
> Andre.
>
>> http://www.orangepi.org/OrangePiWin_WinPlus/

The URL is not going to be helpful if it goes offline.

Can someone provide schematics for this board? Without it there's really
no verification for what the device tree describes.

>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> ---
>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>  2 files changed, 103 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>> index 244e8b7..4120ce9 100644
>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>> @@ -1,5 +1,6 @@
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>
>>  always               := $(dtb-y)
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>> new file mode 100644
>> index 0000000..b16e606
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>> @@ -0,0 +1,102 @@
>> +/*
>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +
>> +/ {
>> +     model = "OrangePi Win/Win Plus";
>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>> +
>> +     aliases {
>> +             serial0 = &uart0;
>> +     };
>> +
>> +     chosen {
>> +             stdout-path = "serial0:115200n8";
>> +     };
>> +
>> +     soc {
>> +             reg_vcc3v3: vcc3v3 {
>> +                     compatible = "regulator-fixed";
>> +                     regulator-name = "vcc3v3";
>> +                     regulator-min-microvolt = <3300000>;
>> +                     regulator-max-microvolt = <3300000>;
>> +             };

This should be outside of the soc node. Furthermore, you should
not be doing full path overrides in the dts file. If you need
to reference a node, but it doesn't have a label, add the label
first.

>> +     };
>> +};
>> +
>> +&mmc0 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&mmc0_pins>;
>> +     vmmc-supply = <&reg_vcc3v3>;
>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;

Please add a comment after this denoting the pin name.

>> +     cd-inverted;
>> +     status = "okay";
>> +};
>> +
>> +&uart0 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&uart0_pins_a>;
>> +     status = "okay";
>> +};
>> +
>> +&i2c1 {
>> +     pinctrl-names = "default";
>> +     pinctrl-0 = <&i2c1_pins>;
>> +     status = "okay";
>> +};
>> +
>> +&usbphy {
>> +       status = "okay";

No VBUS regulator supplies? Does the USB hub need a node?

Regards
ChenYu

>> +};
>> +
>> +&ohci1 {
>> +       status = "okay";
>> +};
>> +
>> +&ehci1 {
>> +       status = "okay";
>> +};
>>
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  8:59       ` Andre Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: Andre Przywara @ 2017-05-26  8:59 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jagan Teki
  Cc: Maxime Ripard, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki, Icenowy Zheng

Hi,

On 26/05/17 04:54, Chen-Yu Tsai wrote:
> On Fri, May 26, 2017 at 6:30 AM, André Przywara <andre.przywara@arm.com> wrote:
>> On 25/05/17 20:26, Jagan Teki wrote:
>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>
>>> Orangepi Win/WinPlus is an open-source single-board computer
>>> using the Allwinner A64 SOC.
>>>
>>> A64 Orangepi Win/WinPlus has
>>> - A64 Quad-core Cortex-A53 64bit
>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>> - Debug TTL UART
>>> - Four USB 2.0
>>
>> I take it those are connected to a hub chip, and the micro-USB socket is
>> connected as a true OTG socket?
>> So you should enable the usb_otg node, but without the host mode
>> override we use for the Pine64.
> 
> Agreed. Unless OTG needs PMIC support.

Ah, good point. Quickly looking at the schematics [1] I see that
something's wrong there - could be me as well ...

The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
seems to be connected to GPIO PD7, according to the GPIO assignment table.
Each of the dual-socket host port pairs (connected to the HUB) have a
separate voltage regulator, ports 3 and 4 seems to be always enabled,
whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
Now this signal seems to be connected to PD7 as well, but this time
directly on the schematic, not in the table.

So either there is only one signal, connected to PD7, or one of the
lines is connected to another GPIO.

One could try to play around with PD7 in Linux and measure the voltage
on all the 5 USB connectors to shed some light on this.

>>> - HDMI
>>> - LCD
>>> - Audio and MIC
>>> - Wifi + BT
>>
>> It looks like Wifi + BT are soldered on the board, so you should at
>> least enable the proper UART connected to the Bluetooth chip, probably
>> also MMC1 (which is surely connected to the WiFi chip) should be
>> described as an SDIO node.
> 
> Those probably need regulator support. Having them enabled together
> might be better.

Good point, seems like DLDO4 and DLDO2 are responsible for this.

>>
>>> - IR receiver
>>> - 5V DC power supply
>>
>> I guess the board uses the AXP803 as well? You might want to coordinate
>> with Icenowy what to do to describe this as well, given that her patches
>> might go in before.
> 
> Still waiting for NMI driver/bindings to be merged before I merge the dts
> file changes. The mfd and regulator driver changes are already in -next.
> 
>>
>> Cheers,
>> Andre.
>>
>>> http://www.orangepi.org/OrangePiWin_WinPlus/
> 
> The URL is not going to be helpful if it goes offline.
> 
> Can someone provide schematics for this board? Without it there's really
> no verification for what the device tree describes.

Found them here [1].

>>>
>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>> ---
>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>>  2 files changed, 103 insertions(+)
>>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>>> index 244e8b7..4120ce9 100644
>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>> @@ -1,5 +1,6 @@
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>
>>>  always               := $(dtb-y)
>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>> new file mode 100644
>>> index 0000000..b16e606
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>> @@ -0,0 +1,102 @@
>>> +/*
>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>> +
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +
>>> +/ {
>>> +     model = "OrangePi Win/Win Plus";
>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>> +
>>> +     aliases {
>>> +             serial0 = &uart0;
>>> +     };
>>> +
>>> +     chosen {
>>> +             stdout-path = "serial0:115200n8";
>>> +     };
>>> +
>>> +     soc {
>>> +             reg_vcc3v3: vcc3v3 {
>>> +                     compatible = "regulator-fixed";
>>> +                     regulator-name = "vcc3v3";
>>> +                     regulator-min-microvolt = <3300000>;
>>> +                     regulator-max-microvolt = <3300000>;
>>> +             };
> 
> This should be outside of the soc node.

Agreed on that one.

> Furthermore, you should
> not be doing full path overrides in the dts file. If you need
> to reference a node, but it doesn't have a label, add the label
> first.

That shouldn't be needed if it's outside of the /soc node?

>>> +     };
>>> +};
>>> +
>>> +&mmc0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&mmc0_pins>;
>>> +     vmmc-supply = <&reg_vcc3v3>;
>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> 
> Please add a comment after this denoting the pin name.
> 
>>> +     cd-inverted;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&uart0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&uart0_pins_a>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&i2c1 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&i2c1_pins>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usbphy {
>>> +       status = "okay";
> 
> No VBUS regulator supplies?

The HSIC block in the SoC needs apparently to be driven by FLDO1.
The voltage regulator for two of the USB host ports is enabled by PD7
(or not, see above).

> Does the USB hub need a node?

Good question, given that two of the ports have their bus power
switchable, while the other two are always enabled. Do we express those
things in the DT?

Cheers,
Andre.

[1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
http://www.orangepi.org/downloadresources/

Can someone (without commercial and legal conflict potential) please
upload them to the sunxi Wiki?

> 
> Regards
> ChenYu
> 
>>> +};
>>> +
>>> +&ohci1 {
>>> +       status = "okay";
>>> +};
>>> +
>>> +&ehci1 {
>>> +       status = "okay";
>>> +};
>>>
>>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  8:59       ` Andre Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: Andre Przywara @ 2017-05-26  8:59 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jagan Teki
  Cc: Maxime Ripard, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki, Icenowy Zheng

Hi,

On 26/05/17 04:54, Chen-Yu Tsai wrote:
> On Fri, May 26, 2017 at 6:30 AM, André Przywara <andre.przywara@arm.com> wrote:
>> On 25/05/17 20:26, Jagan Teki wrote:
>>> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>>
>>> Orangepi Win/WinPlus is an open-source single-board computer
>>> using the Allwinner A64 SOC.
>>>
>>> A64 Orangepi Win/WinPlus has
>>> - A64 Quad-core Cortex-A53 64bit
>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>> - Debug TTL UART
>>> - Four USB 2.0
>>
>> I take it those are connected to a hub chip, and the micro-USB socket is
>> connected as a true OTG socket?
>> So you should enable the usb_otg node, but without the host mode
>> override we use for the Pine64.
> 
> Agreed. Unless OTG needs PMIC support.

Ah, good point. Quickly looking at the schematics [1] I see that
something's wrong there - could be me as well ...

The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
seems to be connected to GPIO PD7, according to the GPIO assignment table.
Each of the dual-socket host port pairs (connected to the HUB) have a
separate voltage regulator, ports 3 and 4 seems to be always enabled,
whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
Now this signal seems to be connected to PD7 as well, but this time
directly on the schematic, not in the table.

So either there is only one signal, connected to PD7, or one of the
lines is connected to another GPIO.

One could try to play around with PD7 in Linux and measure the voltage
on all the 5 USB connectors to shed some light on this.

>>> - HDMI
>>> - LCD
>>> - Audio and MIC
>>> - Wifi + BT
>>
>> It looks like Wifi + BT are soldered on the board, so you should at
>> least enable the proper UART connected to the Bluetooth chip, probably
>> also MMC1 (which is surely connected to the WiFi chip) should be
>> described as an SDIO node.
> 
> Those probably need regulator support. Having them enabled together
> might be better.

Good point, seems like DLDO4 and DLDO2 are responsible for this.

>>
>>> - IR receiver
>>> - 5V DC power supply
>>
>> I guess the board uses the AXP803 as well? You might want to coordinate
>> with Icenowy what to do to describe this as well, given that her patches
>> might go in before.
> 
> Still waiting for NMI driver/bindings to be merged before I merge the dts
> file changes. The mfd and regulator driver changes are already in -next.
> 
>>
>> Cheers,
>> Andre.
>>
>>> http://www.orangepi.org/OrangePiWin_WinPlus/
> 
> The URL is not going to be helpful if it goes offline.
> 
> Can someone provide schematics for this board? Without it there's really
> no verification for what the device tree describes.

Found them here [1].

>>>
>>> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>> ---
>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>>  2 files changed, 103 insertions(+)
>>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>>> index 244e8b7..4120ce9 100644
>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>> @@ -1,5 +1,6 @@
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>
>>>  always               := $(dtb-y)
>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>> new file mode 100644
>>> index 0000000..b16e606
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>> @@ -0,0 +1,102 @@
>>> +/*
>>> + * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-a64.dtsi"
>>> +
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +
>>> +/ {
>>> +     model = "OrangePi Win/Win Plus";
>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>> +
>>> +     aliases {
>>> +             serial0 = &uart0;
>>> +     };
>>> +
>>> +     chosen {
>>> +             stdout-path = "serial0:115200n8";
>>> +     };
>>> +
>>> +     soc {
>>> +             reg_vcc3v3: vcc3v3 {
>>> +                     compatible = "regulator-fixed";
>>> +                     regulator-name = "vcc3v3";
>>> +                     regulator-min-microvolt = <3300000>;
>>> +                     regulator-max-microvolt = <3300000>;
>>> +             };
> 
> This should be outside of the soc node.

Agreed on that one.

> Furthermore, you should
> not be doing full path overrides in the dts file. If you need
> to reference a node, but it doesn't have a label, add the label
> first.

That shouldn't be needed if it's outside of the /soc node?

>>> +     };
>>> +};
>>> +
>>> +&mmc0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&mmc0_pins>;
>>> +     vmmc-supply = <&reg_vcc3v3>;
>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> 
> Please add a comment after this denoting the pin name.
> 
>>> +     cd-inverted;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&uart0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&uart0_pins_a>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&i2c1 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&i2c1_pins>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usbphy {
>>> +       status = "okay";
> 
> No VBUS regulator supplies?

The HSIC block in the SoC needs apparently to be driven by FLDO1.
The voltage regulator for two of the USB host ports is enabled by PD7
(or not, see above).

> Does the USB hub need a node?

Good question, given that two of the ports have their bus power
switchable, while the other two are always enabled. Do we express those
things in the DT?

Cheers,
Andre.

[1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
http://www.orangepi.org/downloadresources/

Can someone (without commercial and legal conflict potential) please
upload them to the sunxi Wiki?

> 
> Regards
> ChenYu
> 
>>> +};
>>> +
>>> +&ohci1 {
>>> +       status = "okay";
>>> +};
>>> +
>>> +&ehci1 {
>>> +       status = "okay";
>>> +};
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  8:59       ` Andre Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: Andre Przywara @ 2017-05-26  8:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 26/05/17 04:54, Chen-Yu Tsai wrote:
> On Fri, May 26, 2017 at 6:30 AM, Andr? Przywara <andre.przywara@arm.com> wrote:
>> On 25/05/17 20:26, Jagan Teki wrote:
>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>
>>> Orangepi Win/WinPlus is an open-source single-board computer
>>> using the Allwinner A64 SOC.
>>>
>>> A64 Orangepi Win/WinPlus has
>>> - A64 Quad-core Cortex-A53 64bit
>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>> - Debug TTL UART
>>> - Four USB 2.0
>>
>> I take it those are connected to a hub chip, and the micro-USB socket is
>> connected as a true OTG socket?
>> So you should enable the usb_otg node, but without the host mode
>> override we use for the Pine64.
> 
> Agreed. Unless OTG needs PMIC support.

Ah, good point. Quickly looking at the schematics [1] I see that
something's wrong there - could be me as well ...

The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
seems to be connected to GPIO PD7, according to the GPIO assignment table.
Each of the dual-socket host port pairs (connected to the HUB) have a
separate voltage regulator, ports 3 and 4 seems to be always enabled,
whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
Now this signal seems to be connected to PD7 as well, but this time
directly on the schematic, not in the table.

So either there is only one signal, connected to PD7, or one of the
lines is connected to another GPIO.

One could try to play around with PD7 in Linux and measure the voltage
on all the 5 USB connectors to shed some light on this.

>>> - HDMI
>>> - LCD
>>> - Audio and MIC
>>> - Wifi + BT
>>
>> It looks like Wifi + BT are soldered on the board, so you should at
>> least enable the proper UART connected to the Bluetooth chip, probably
>> also MMC1 (which is surely connected to the WiFi chip) should be
>> described as an SDIO node.
> 
> Those probably need regulator support. Having them enabled together
> might be better.

Good point, seems like DLDO4 and DLDO2 are responsible for this.

>>
>>> - IR receiver
>>> - 5V DC power supply
>>
>> I guess the board uses the AXP803 as well? You might want to coordinate
>> with Icenowy what to do to describe this as well, given that her patches
>> might go in before.
> 
> Still waiting for NMI driver/bindings to be merged before I merge the dts
> file changes. The mfd and regulator driver changes are already in -next.
> 
>>
>> Cheers,
>> Andre.
>>
>>> http://www.orangepi.org/OrangePiWin_WinPlus/
> 
> The URL is not going to be helpful if it goes offline.
> 
> Can someone provide schematics for this board? Without it there's really
> no verification for what the device tree describes.

Found them here [1].

>>>
>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>> ---
>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>>  2 files changed, 103 insertions(+)
>>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>>> index 244e8b7..4120ce9 100644
>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>> @@ -1,5 +1,6 @@
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>
>>>  always               := $(dtb-y)
>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>> new file mode 100644
>>> index 0000000..b16e606
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>> @@ -0,0 +1,102 @@
>>> +/*
>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>> +
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +
>>> +/ {
>>> +     model = "OrangePi Win/Win Plus";
>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>> +
>>> +     aliases {
>>> +             serial0 = &uart0;
>>> +     };
>>> +
>>> +     chosen {
>>> +             stdout-path = "serial0:115200n8";
>>> +     };
>>> +
>>> +     soc {
>>> +             reg_vcc3v3: vcc3v3 {
>>> +                     compatible = "regulator-fixed";
>>> +                     regulator-name = "vcc3v3";
>>> +                     regulator-min-microvolt = <3300000>;
>>> +                     regulator-max-microvolt = <3300000>;
>>> +             };
> 
> This should be outside of the soc node.

Agreed on that one.

> Furthermore, you should
> not be doing full path overrides in the dts file. If you need
> to reference a node, but it doesn't have a label, add the label
> first.

That shouldn't be needed if it's outside of the /soc node?

>>> +     };
>>> +};
>>> +
>>> +&mmc0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&mmc0_pins>;
>>> +     vmmc-supply = <&reg_vcc3v3>;
>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> 
> Please add a comment after this denoting the pin name.
> 
>>> +     cd-inverted;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&uart0 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&uart0_pins_a>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&i2c1 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&i2c1_pins>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usbphy {
>>> +       status = "okay";
> 
> No VBUS regulator supplies?

The HSIC block in the SoC needs apparently to be driven by FLDO1.
The voltage regulator for two of the USB host ports is enabled by PD7
(or not, see above).

> Does the USB hub need a node?

Good question, given that two of the ports have their bus power
switchable, while the other two are always enabled. Do we express those
things in the DT?

Cheers,
Andre.

[1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
http://www.orangepi.org/downloadresources/

Can someone (without commercial and legal conflict potential) please
upload them to the sunxi Wiki?

> 
> Regards
> ChenYu
> 
>>> +};
>>> +
>>> +&ohci1 {
>>> +       status = "okay";
>>> +};
>>> +
>>> +&ehci1 {
>>> +       status = "okay";
>>> +};
>>>
>>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  9:03         ` Icenowy Zheng
  0 siblings, 0 replies; 33+ messages in thread
From: Icenowy Zheng @ 2017-05-26  9:03 UTC (permalink / raw)
  To: andre.przywara, Andre Przywara, Chen-Yu Tsai, Jagan Teki
  Cc: Maxime Ripard, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki, Icenowy Zheng



于 2017年5月26日 GMT+08:00 下午4:59:18, Andre Przywara <andre.przywara@arm.com> 写到:
>Hi,
>
>On 26/05/17 04:54, Chen-Yu Tsai wrote:
>> On Fri, May 26, 2017 at 6:30 AM, André Przywara
><andre.przywara@arm.com> wrote:
>>> On 25/05/17 20:26, Jagan Teki wrote:
>>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>>
>>>> Orangepi Win/WinPlus is an open-source single-board computer
>>>> using the Allwinner A64 SOC.
>>>>
>>>> A64 Orangepi Win/WinPlus has
>>>> - A64 Quad-core Cortex-A53 64bit
>>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>>> - Debug TTL UART
>>>> - Four USB 2.0
>>>
>>> I take it those are connected to a hub chip, and the micro-USB
>socket is
>>> connected as a true OTG socket?
>>> So you should enable the usb_otg node, but without the host mode
>>> override we use for the Pine64.
>> 
>> Agreed. Unless OTG needs PMIC support.
>
>Ah, good point. Quickly looking at the schematics [1] I see that
>something's wrong there - could be me as well ...
>
>The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
>seems to be connected to GPIO PD7, according to the GPIO assignment
>table.
>Each of the dual-socket host port pairs (connected to the HUB) have a
>separate voltage regulator, ports 3 and 4 seems to be always enabled,
>whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
>Now this signal seems to be connected to PD7 as well, but this time
>directly on the schematic, not in the table.
>
>So either there is only one signal, connected to PD7, or one of the
>lines is connected to another GPIO.
>
>One could try to play around with PD7 in Linux and measure the voltage
>on all the 5 USB connectors to shed some light on this.

Oh I found a problem here -- I seems to forget to enable vbus
detection and drivevbus on AXP803...

Let me add them in further patches.

I have a BPI M64, which has real OTG port.

>
>>>> - HDMI
>>>> - LCD
>>>> - Audio and MIC
>>>> - Wifi + BT
>>>
>>> It looks like Wifi + BT are soldered on the board, so you should at
>>> least enable the proper UART connected to the Bluetooth chip,
>probably
>>> also MMC1 (which is surely connected to the WiFi chip) should be
>>> described as an SDIO node.
>> 
>> Those probably need regulator support. Having them enabled together
>> might be better.
>
>Good point, seems like DLDO4 and DLDO2 are responsible for this.
>
>>>
>>>> - IR receiver
>>>> - 5V DC power supply
>>>
>>> I guess the board uses the AXP803 as well? You might want to
>coordinate
>>> with Icenowy what to do to describe this as well, given that her
>patches
>>> might go in before.
>> 
>> Still waiting for NMI driver/bindings to be merged before I merge the
>dts
>> file changes. The mfd and regulator driver changes are already in
>-next.
>> 
>>>
>>> Cheers,
>>> Andre.
>>>
>>>> http://www.orangepi.org/OrangePiWin_WinPlus/
>> 
>> The URL is not going to be helpful if it goes offline.
>> 
>> Can someone provide schematics for this board? Without it there's
>really
>> no verification for what the device tree describes.
>
>Found them here [1].
>
>>>>
>>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>> ---
>>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102
>+++++++++++++++++++++
>>>>  2 files changed, 103 insertions(+)
>>>>  create mode 100644
>arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
>b/arch/arm64/boot/dts/allwinner/Makefile
>>>> index 244e8b7..4120ce9 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>>> @@ -1,5 +1,6 @@
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb
>sun50i-a64-pine64.dtb
>>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>>
>>>>  always               := $(dtb-y)
>>>> diff --git
>a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> new file mode 100644
>>>> index 0000000..b16e606
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> @@ -0,0 +1,102 @@
>>>> +/*
>>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +
>>>> +/ {
>>>> +     model = "OrangePi Win/Win Plus";
>>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>>> +
>>>> +     aliases {
>>>> +             serial0 = &uart0;
>>>> +     };
>>>> +
>>>> +     chosen {
>>>> +             stdout-path = "serial0:115200n8";
>>>> +     };
>>>> +
>>>> +     soc {
>>>> +             reg_vcc3v3: vcc3v3 {
>>>> +                     compatible = "regulator-fixed";
>>>> +                     regulator-name = "vcc3v3";
>>>> +                     regulator-min-microvolt = <3300000>;
>>>> +                     regulator-max-microvolt = <3300000>;
>>>> +             };
>> 
>> This should be outside of the soc node.
>
>Agreed on that one.
>
>> Furthermore, you should
>> not be doing full path overrides in the dts file. If you need
>> to reference a node, but it doesn't have a label, add the label
>> first.
>
>That shouldn't be needed if it's outside of the /soc node?
>
>>>> +     };
>>>> +};
>>>> +
>>>> +&mmc0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&mmc0_pins>;
>>>> +     vmmc-supply = <&reg_vcc3v3>;
>>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>> 
>> Please add a comment after this denoting the pin name.
>> 
>>>> +     cd-inverted;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&uart0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&uart0_pins_a>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&i2c1 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&i2c1_pins>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&usbphy {
>>>> +       status = "okay";
>> 
>> No VBUS regulator supplies?
>
>The HSIC block in the SoC needs apparently to be driven by FLDO1.
>The voltage regulator for two of the USB host ports is enabled by PD7
>(or not, see above).
>
>> Does the USB hub need a node?
>
>Good question, given that two of the ports have their bus power
>switchable, while the other two are always enabled. Do we express those
>things in the DT?
>
>Cheers,
>Andre.
>
>[1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
>http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
>http://www.orangepi.org/downloadresources/
>
>Can someone (without commercial and legal conflict potential) please
>upload them to the sunxi Wiki?
>
>> 
>> Regards
>> ChenYu
>> 
>>>> +};
>>>> +
>>>> +&ohci1 {
>>>> +       status = "okay";
>>>> +};
>>>> +
>>>> +&ehci1 {
>>>> +       status = "okay";
>>>> +};
>>>>
>>>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  9:03         ` Icenowy Zheng
  0 siblings, 0 replies; 33+ messages in thread
From: Icenowy Zheng @ 2017-05-26  9:03 UTC (permalink / raw)
  To: andre.przywara-5wv7dgnIgG8
  Cc: Maxime Ripard, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Michael Trimarchi, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi, Jagan Teki, Icenowy Zheng



于 2017年5月26日 GMT+08:00 下午4:59:18, Andre Przywara <andre.przywara-5wv7dgnIgG8@public.gmane.org> 写到:
>Hi,
>
>On 26/05/17 04:54, Chen-Yu Tsai wrote:
>> On Fri, May 26, 2017 at 6:30 AM, André Przywara
><andre.przywara-5wv7dgnIgG8@public.gmane.org> wrote:
>>> On 25/05/17 20:26, Jagan Teki wrote:
>>>> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>>>
>>>> Orangepi Win/WinPlus is an open-source single-board computer
>>>> using the Allwinner A64 SOC.
>>>>
>>>> A64 Orangepi Win/WinPlus has
>>>> - A64 Quad-core Cortex-A53 64bit
>>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>>> - Debug TTL UART
>>>> - Four USB 2.0
>>>
>>> I take it those are connected to a hub chip, and the micro-USB
>socket is
>>> connected as a true OTG socket?
>>> So you should enable the usb_otg node, but without the host mode
>>> override we use for the Pine64.
>> 
>> Agreed. Unless OTG needs PMIC support.
>
>Ah, good point. Quickly looking at the schematics [1] I see that
>something's wrong there - could be me as well ...
>
>The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
>seems to be connected to GPIO PD7, according to the GPIO assignment
>table.
>Each of the dual-socket host port pairs (connected to the HUB) have a
>separate voltage regulator, ports 3 and 4 seems to be always enabled,
>whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
>Now this signal seems to be connected to PD7 as well, but this time
>directly on the schematic, not in the table.
>
>So either there is only one signal, connected to PD7, or one of the
>lines is connected to another GPIO.
>
>One could try to play around with PD7 in Linux and measure the voltage
>on all the 5 USB connectors to shed some light on this.

Oh I found a problem here -- I seems to forget to enable vbus
detection and drivevbus on AXP803...

Let me add them in further patches.

I have a BPI M64, which has real OTG port.

>
>>>> - HDMI
>>>> - LCD
>>>> - Audio and MIC
>>>> - Wifi + BT
>>>
>>> It looks like Wifi + BT are soldered on the board, so you should at
>>> least enable the proper UART connected to the Bluetooth chip,
>probably
>>> also MMC1 (which is surely connected to the WiFi chip) should be
>>> described as an SDIO node.
>> 
>> Those probably need regulator support. Having them enabled together
>> might be better.
>
>Good point, seems like DLDO4 and DLDO2 are responsible for this.
>
>>>
>>>> - IR receiver
>>>> - 5V DC power supply
>>>
>>> I guess the board uses the AXP803 as well? You might want to
>coordinate
>>> with Icenowy what to do to describe this as well, given that her
>patches
>>> might go in before.
>> 
>> Still waiting for NMI driver/bindings to be merged before I merge the
>dts
>> file changes. The mfd and regulator driver changes are already in
>-next.
>> 
>>>
>>> Cheers,
>>> Andre.
>>>
>>>> http://www.orangepi.org/OrangePiWin_WinPlus/
>> 
>> The URL is not going to be helpful if it goes offline.
>> 
>> Can someone provide schematics for this board? Without it there's
>really
>> no verification for what the device tree describes.
>
>Found them here [1].
>
>>>>
>>>> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>>> ---
>>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102
>+++++++++++++++++++++
>>>>  2 files changed, 103 insertions(+)
>>>>  create mode 100644
>arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
>b/arch/arm64/boot/dts/allwinner/Makefile
>>>> index 244e8b7..4120ce9 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>>> @@ -1,5 +1,6 @@
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb
>sun50i-a64-pine64.dtb
>>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>>
>>>>  always               := $(dtb-y)
>>>> diff --git
>a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> new file mode 100644
>>>> index 0000000..b16e606
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> @@ -0,0 +1,102 @@
>>>> +/*
>>>> + * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-a64.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +
>>>> +/ {
>>>> +     model = "OrangePi Win/Win Plus";
>>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>>> +
>>>> +     aliases {
>>>> +             serial0 = &uart0;
>>>> +     };
>>>> +
>>>> +     chosen {
>>>> +             stdout-path = "serial0:115200n8";
>>>> +     };
>>>> +
>>>> +     soc {
>>>> +             reg_vcc3v3: vcc3v3 {
>>>> +                     compatible = "regulator-fixed";
>>>> +                     regulator-name = "vcc3v3";
>>>> +                     regulator-min-microvolt = <3300000>;
>>>> +                     regulator-max-microvolt = <3300000>;
>>>> +             };
>> 
>> This should be outside of the soc node.
>
>Agreed on that one.
>
>> Furthermore, you should
>> not be doing full path overrides in the dts file. If you need
>> to reference a node, but it doesn't have a label, add the label
>> first.
>
>That shouldn't be needed if it's outside of the /soc node?
>
>>>> +     };
>>>> +};
>>>> +
>>>> +&mmc0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&mmc0_pins>;
>>>> +     vmmc-supply = <&reg_vcc3v3>;
>>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>> 
>> Please add a comment after this denoting the pin name.
>> 
>>>> +     cd-inverted;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&uart0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&uart0_pins_a>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&i2c1 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&i2c1_pins>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&usbphy {
>>>> +       status = "okay";
>> 
>> No VBUS regulator supplies?
>
>The HSIC block in the SoC needs apparently to be driven by FLDO1.
>The voltage regulator for two of the USB host ports is enabled by PD7
>(or not, see above).
>
>> Does the USB hub need a node?
>
>Good question, given that two of the ports have their bus power
>switchable, while the other two are always enabled. Do we express those
>things in the DT?
>
>Cheers,
>Andre.
>
>[1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
>http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
>http://www.orangepi.org/downloadresources/
>
>Can someone (without commercial and legal conflict potential) please
>upload them to the sunxi Wiki?
>
>> 
>> Regards
>> ChenYu
>> 
>>>> +};
>>>> +
>>>> +&ohci1 {
>>>> +       status = "okay";
>>>> +};
>>>> +
>>>> +&ehci1 {
>>>> +       status = "okay";
>>>> +};
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26  9:03         ` Icenowy Zheng
  0 siblings, 0 replies; 33+ messages in thread
From: Icenowy Zheng @ 2017-05-26  9:03 UTC (permalink / raw)
  To: linux-arm-kernel



? 2017?5?26? GMT+08:00 ??4:59:18, Andre Przywara <andre.przywara@arm.com> ??:
>Hi,
>
>On 26/05/17 04:54, Chen-Yu Tsai wrote:
>> On Fri, May 26, 2017 at 6:30 AM, Andr? Przywara
><andre.przywara@arm.com> wrote:
>>> On 25/05/17 20:26, Jagan Teki wrote:
>>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>>
>>>> Orangepi Win/WinPlus is an open-source single-board computer
>>>> using the Allwinner A64 SOC.
>>>>
>>>> A64 Orangepi Win/WinPlus has
>>>> - A64 Quad-core Cortex-A53 64bit
>>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>>> - Debug TTL UART
>>>> - Four USB 2.0
>>>
>>> I take it those are connected to a hub chip, and the micro-USB
>socket is
>>> connected as a true OTG socket?
>>> So you should enable the usb_otg node, but without the host mode
>>> override we use for the Pine64.
>> 
>> Agreed. Unless OTG needs PMIC support.
>
>Ah, good point. Quickly looking at the schematics [1] I see that
>something's wrong there - could be me as well ...
>
>The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
>seems to be connected to GPIO PD7, according to the GPIO assignment
>table.
>Each of the dual-socket host port pairs (connected to the HUB) have a
>separate voltage regulator, ports 3 and 4 seems to be always enabled,
>whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
>Now this signal seems to be connected to PD7 as well, but this time
>directly on the schematic, not in the table.
>
>So either there is only one signal, connected to PD7, or one of the
>lines is connected to another GPIO.
>
>One could try to play around with PD7 in Linux and measure the voltage
>on all the 5 USB connectors to shed some light on this.

Oh I found a problem here -- I seems to forget to enable vbus
detection and drivevbus on AXP803...

Let me add them in further patches.

I have a BPI M64, which has real OTG port.

>
>>>> - HDMI
>>>> - LCD
>>>> - Audio and MIC
>>>> - Wifi + BT
>>>
>>> It looks like Wifi + BT are soldered on the board, so you should at
>>> least enable the proper UART connected to the Bluetooth chip,
>probably
>>> also MMC1 (which is surely connected to the WiFi chip) should be
>>> described as an SDIO node.
>> 
>> Those probably need regulator support. Having them enabled together
>> might be better.
>
>Good point, seems like DLDO4 and DLDO2 are responsible for this.
>
>>>
>>>> - IR receiver
>>>> - 5V DC power supply
>>>
>>> I guess the board uses the AXP803 as well? You might want to
>coordinate
>>> with Icenowy what to do to describe this as well, given that her
>patches
>>> might go in before.
>> 
>> Still waiting for NMI driver/bindings to be merged before I merge the
>dts
>> file changes. The mfd and regulator driver changes are already in
>-next.
>> 
>>>
>>> Cheers,
>>> Andre.
>>>
>>>> http://www.orangepi.org/OrangePiWin_WinPlus/
>> 
>> The URL is not going to be helpful if it goes offline.
>> 
>> Can someone provide schematics for this board? Without it there's
>really
>> no verification for what the device tree describes.
>
>Found them here [1].
>
>>>>
>>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>> ---
>>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102
>+++++++++++++++++++++
>>>>  2 files changed, 103 insertions(+)
>>>>  create mode 100644
>arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
>b/arch/arm64/boot/dts/allwinner/Makefile
>>>> index 244e8b7..4120ce9 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>>> @@ -1,5 +1,6 @@
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb
>sun50i-a64-pine64.dtb
>>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>>
>>>>  always               := $(dtb-y)
>>>> diff --git
>a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> new file mode 100644
>>>> index 0000000..b16e606
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> @@ -0,0 +1,102 @@
>>>> +/*
>>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +
>>>> +/ {
>>>> +     model = "OrangePi Win/Win Plus";
>>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>>> +
>>>> +     aliases {
>>>> +             serial0 = &uart0;
>>>> +     };
>>>> +
>>>> +     chosen {
>>>> +             stdout-path = "serial0:115200n8";
>>>> +     };
>>>> +
>>>> +     soc {
>>>> +             reg_vcc3v3: vcc3v3 {
>>>> +                     compatible = "regulator-fixed";
>>>> +                     regulator-name = "vcc3v3";
>>>> +                     regulator-min-microvolt = <3300000>;
>>>> +                     regulator-max-microvolt = <3300000>;
>>>> +             };
>> 
>> This should be outside of the soc node.
>
>Agreed on that one.
>
>> Furthermore, you should
>> not be doing full path overrides in the dts file. If you need
>> to reference a node, but it doesn't have a label, add the label
>> first.
>
>That shouldn't be needed if it's outside of the /soc node?
>
>>>> +     };
>>>> +};
>>>> +
>>>> +&mmc0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&mmc0_pins>;
>>>> +     vmmc-supply = <&reg_vcc3v3>;
>>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>> 
>> Please add a comment after this denoting the pin name.
>> 
>>>> +     cd-inverted;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&uart0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&uart0_pins_a>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&i2c1 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&i2c1_pins>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&usbphy {
>>>> +       status = "okay";
>> 
>> No VBUS regulator supplies?
>
>The HSIC block in the SoC needs apparently to be driven by FLDO1.
>The voltage regulator for two of the USB host ports is enabled by PD7
>(or not, see above).
>
>> Does the USB hub need a node?
>
>Good question, given that two of the ports have their bus power
>switchable, while the other two are always enabled. Do we express those
>things in the DT?
>
>Cheers,
>Andre.
>
>[1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
>http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
>http://www.orangepi.org/downloadresources/
>
>Can someone (without commercial and legal conflict potential) please
>upload them to the sunxi Wiki?
>
>> 
>> Regards
>> ChenYu
>> 
>>>> +};
>>>> +
>>>> +&ohci1 {
>>>> +       status = "okay";
>>>> +};
>>>> +
>>>> +&ehci1 {
>>>> +       status = "okay";
>>>> +};
>>>>
>>>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
  2017-05-26  8:59       ` Andre Przywara
  (?)
@ 2017-05-26 11:15         ` Jagan Teki
  -1 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-26 11:15 UTC (permalink / raw)
  To: Andre Przywara, zhaoyifan
  Cc: Chen-Yu Tsai, Jagan Teki, Maxime Ripard, Rob Herring,
	Mark Rutland, Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
	Icenowy Zheng

+ zhaoyifan
(Added Orangepi member for data-sheet upload confirmation)

On Fri, May 26, 2017 at 2:29 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> Hi,
>
> On 26/05/17 04:54, Chen-Yu Tsai wrote:
>> On Fri, May 26, 2017 at 6:30 AM, André Przywara <andre.przywara@arm.com> wrote:
>>> On 25/05/17 20:26, Jagan Teki wrote:
>>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>>
>>>> Orangepi Win/WinPlus is an open-source single-board computer
>>>> using the Allwinner A64 SOC.
>>>>
>>>> A64 Orangepi Win/WinPlus has
>>>> - A64 Quad-core Cortex-A53 64bit
>>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>>> - Debug TTL UART
>>>> - Four USB 2.0
>>>
>>> I take it those are connected to a hub chip, and the micro-USB socket is
>>> connected as a true OTG socket?
>>> So you should enable the usb_otg node, but without the host mode
>>> override we use for the Pine64.
>>
>> Agreed. Unless OTG needs PMIC support.
>
> Ah, good point. Quickly looking at the schematics [1] I see that
> something's wrong there - could be me as well ...
>
> The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
> seems to be connected to GPIO PD7, according to the GPIO assignment table.
> Each of the dual-socket host port pairs (connected to the HUB) have a
> separate voltage regulator, ports 3 and 4 seems to be always enabled,
> whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
> Now this signal seems to be connected to PD7 as well, but this time
> directly on the schematic, not in the table.
>
> So either there is only one signal, connected to PD7, or one of the
> lines is connected to another GPIO.
>
> One could try to play around with PD7 in Linux and measure the voltage
> on all the 5 USB connectors to shed some light on this.
>
>>>> - HDMI
>>>> - LCD
>>>> - Audio and MIC
>>>> - Wifi + BT
>>>
>>> It looks like Wifi + BT are soldered on the board, so you should at
>>> least enable the proper UART connected to the Bluetooth chip, probably
>>> also MMC1 (which is surely connected to the WiFi chip) should be
>>> described as an SDIO node.
>>
>> Those probably need regulator support. Having them enabled together
>> might be better.
>
> Good point, seems like DLDO4 and DLDO2 are responsible for this.
>
>>>
>>>> - IR receiver
>>>> - 5V DC power supply
>>>
>>> I guess the board uses the AXP803 as well? You might want to coordinate
>>> with Icenowy what to do to describe this as well, given that her patches
>>> might go in before.
>>
>> Still waiting for NMI driver/bindings to be merged before I merge the dts
>> file changes. The mfd and regulator driver changes are already in -next.
>>
>>>
>>> Cheers,
>>> Andre.
>>>
>>>> http://www.orangepi.org/OrangePiWin_WinPlus/
>>
>> The URL is not going to be helpful if it goes offline.
>>
>> Can someone provide schematics for this board? Without it there's really
>> no verification for what the device tree describes.
>
> Found them here [1].
>
>>>>
>>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>> ---
>>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>>>  2 files changed, 103 insertions(+)
>>>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>>>> index 244e8b7..4120ce9 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>>> @@ -1,5 +1,6 @@
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>>
>>>>  always               := $(dtb-y)
>>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> new file mode 100644
>>>> index 0000000..b16e606
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> @@ -0,0 +1,102 @@
>>>> +/*
>>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +
>>>> +/ {
>>>> +     model = "OrangePi Win/Win Plus";
>>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>>> +
>>>> +     aliases {
>>>> +             serial0 = &uart0;
>>>> +     };
>>>> +
>>>> +     chosen {
>>>> +             stdout-path = "serial0:115200n8";
>>>> +     };
>>>> +
>>>> +     soc {
>>>> +             reg_vcc3v3: vcc3v3 {
>>>> +                     compatible = "regulator-fixed";
>>>> +                     regulator-name = "vcc3v3";
>>>> +                     regulator-min-microvolt = <3300000>;
>>>> +                     regulator-max-microvolt = <3300000>;
>>>> +             };
>>
>> This should be outside of the soc node.
>
> Agreed on that one.
>
>> Furthermore, you should
>> not be doing full path overrides in the dts file. If you need
>> to reference a node, but it doesn't have a label, add the label
>> first.
>
> That shouldn't be needed if it's outside of the /soc node?
>
>>>> +     };
>>>> +};
>>>> +
>>>> +&mmc0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&mmc0_pins>;
>>>> +     vmmc-supply = <&reg_vcc3v3>;
>>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>>
>> Please add a comment after this denoting the pin name.
>>
>>>> +     cd-inverted;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&uart0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&uart0_pins_a>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&i2c1 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&i2c1_pins>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&usbphy {
>>>> +       status = "okay";
>>
>> No VBUS regulator supplies?
>
> The HSIC block in the SoC needs apparently to be driven by FLDO1.
> The voltage regulator for two of the USB host ports is enabled by PD7
> (or not, see above).
>
>> Does the USB hub need a node?
>
> Good question, given that two of the ports have their bus power
> switchable, while the other two are always enabled. Do we express those
> things in the DT?
>
> Cheers,
> Andre.
>
> [1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
> http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
> http://www.orangepi.org/downloadresources/
>
> Can someone (without commercial and legal conflict potential) please
> upload them to the sunxi Wiki?

zhaoyifan, We would like to upload above data-sheets on sunxi wiki
like other boards did. Request your approval for the same?

thanks!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26 11:15         ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-26 11:15 UTC (permalink / raw)
  To: Andre Przywara, zhaoyifan
  Cc: Mark Rutland, devicetree, Catalin Marinas, linux-sunxi,
	Will Deacon, linux-kernel, Chen-Yu Tsai, Rob Herring,
	Icenowy Zheng, Maxime Ripard, Michael Trimarchi, Jagan Teki,
	linux-arm-kernel

+ zhaoyifan
(Added Orangepi member for data-sheet upload confirmation)

On Fri, May 26, 2017 at 2:29 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> Hi,
>
> On 26/05/17 04:54, Chen-Yu Tsai wrote:
>> On Fri, May 26, 2017 at 6:30 AM, André Przywara <andre.przywara@arm.com> wrote:
>>> On 25/05/17 20:26, Jagan Teki wrote:
>>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>>
>>>> Orangepi Win/WinPlus is an open-source single-board computer
>>>> using the Allwinner A64 SOC.
>>>>
>>>> A64 Orangepi Win/WinPlus has
>>>> - A64 Quad-core Cortex-A53 64bit
>>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>>> - Debug TTL UART
>>>> - Four USB 2.0
>>>
>>> I take it those are connected to a hub chip, and the micro-USB socket is
>>> connected as a true OTG socket?
>>> So you should enable the usb_otg node, but without the host mode
>>> override we use for the Pine64.
>>
>> Agreed. Unless OTG needs PMIC support.
>
> Ah, good point. Quickly looking at the schematics [1] I see that
> something's wrong there - could be me as well ...
>
> The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
> seems to be connected to GPIO PD7, according to the GPIO assignment table.
> Each of the dual-socket host port pairs (connected to the HUB) have a
> separate voltage regulator, ports 3 and 4 seems to be always enabled,
> whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
> Now this signal seems to be connected to PD7 as well, but this time
> directly on the schematic, not in the table.
>
> So either there is only one signal, connected to PD7, or one of the
> lines is connected to another GPIO.
>
> One could try to play around with PD7 in Linux and measure the voltage
> on all the 5 USB connectors to shed some light on this.
>
>>>> - HDMI
>>>> - LCD
>>>> - Audio and MIC
>>>> - Wifi + BT
>>>
>>> It looks like Wifi + BT are soldered on the board, so you should at
>>> least enable the proper UART connected to the Bluetooth chip, probably
>>> also MMC1 (which is surely connected to the WiFi chip) should be
>>> described as an SDIO node.
>>
>> Those probably need regulator support. Having them enabled together
>> might be better.
>
> Good point, seems like DLDO4 and DLDO2 are responsible for this.
>
>>>
>>>> - IR receiver
>>>> - 5V DC power supply
>>>
>>> I guess the board uses the AXP803 as well? You might want to coordinate
>>> with Icenowy what to do to describe this as well, given that her patches
>>> might go in before.
>>
>> Still waiting for NMI driver/bindings to be merged before I merge the dts
>> file changes. The mfd and regulator driver changes are already in -next.
>>
>>>
>>> Cheers,
>>> Andre.
>>>
>>>> http://www.orangepi.org/OrangePiWin_WinPlus/
>>
>> The URL is not going to be helpful if it goes offline.
>>
>> Can someone provide schematics for this board? Without it there's really
>> no verification for what the device tree describes.
>
> Found them here [1].
>
>>>>
>>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>> ---
>>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>>>  2 files changed, 103 insertions(+)
>>>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>>>> index 244e8b7..4120ce9 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>>> @@ -1,5 +1,6 @@
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>>
>>>>  always               := $(dtb-y)
>>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> new file mode 100644
>>>> index 0000000..b16e606
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> @@ -0,0 +1,102 @@
>>>> +/*
>>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +
>>>> +/ {
>>>> +     model = "OrangePi Win/Win Plus";
>>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>>> +
>>>> +     aliases {
>>>> +             serial0 = &uart0;
>>>> +     };
>>>> +
>>>> +     chosen {
>>>> +             stdout-path = "serial0:115200n8";
>>>> +     };
>>>> +
>>>> +     soc {
>>>> +             reg_vcc3v3: vcc3v3 {
>>>> +                     compatible = "regulator-fixed";
>>>> +                     regulator-name = "vcc3v3";
>>>> +                     regulator-min-microvolt = <3300000>;
>>>> +                     regulator-max-microvolt = <3300000>;
>>>> +             };
>>
>> This should be outside of the soc node.
>
> Agreed on that one.
>
>> Furthermore, you should
>> not be doing full path overrides in the dts file. If you need
>> to reference a node, but it doesn't have a label, add the label
>> first.
>
> That shouldn't be needed if it's outside of the /soc node?
>
>>>> +     };
>>>> +};
>>>> +
>>>> +&mmc0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&mmc0_pins>;
>>>> +     vmmc-supply = <&reg_vcc3v3>;
>>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>>
>> Please add a comment after this denoting the pin name.
>>
>>>> +     cd-inverted;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&uart0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&uart0_pins_a>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&i2c1 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&i2c1_pins>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&usbphy {
>>>> +       status = "okay";
>>
>> No VBUS regulator supplies?
>
> The HSIC block in the SoC needs apparently to be driven by FLDO1.
> The voltage regulator for two of the USB host ports is enabled by PD7
> (or not, see above).
>
>> Does the USB hub need a node?
>
> Good question, given that two of the ports have their bus power
> switchable, while the other two are always enabled. Do we express those
> things in the DT?
>
> Cheers,
> Andre.
>
> [1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
> http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
> http://www.orangepi.org/downloadresources/
>
> Can someone (without commercial and legal conflict potential) please
> upload them to the sunxi Wiki?

zhaoyifan, We would like to upload above data-sheets on sunxi wiki
like other boards did. Request your approval for the same?

thanks!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
@ 2017-05-26 11:15         ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-26 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

+ zhaoyifan
(Added Orangepi member for data-sheet upload confirmation)

On Fri, May 26, 2017 at 2:29 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> Hi,
>
> On 26/05/17 04:54, Chen-Yu Tsai wrote:
>> On Fri, May 26, 2017 at 6:30 AM, Andr? Przywara <andre.przywara@arm.com> wrote:
>>> On 25/05/17 20:26, Jagan Teki wrote:
>>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>>
>>>> Orangepi Win/WinPlus is an open-source single-board computer
>>>> using the Allwinner A64 SOC.
>>>>
>>>> A64 Orangepi Win/WinPlus has
>>>> - A64 Quad-core Cortex-A53 64bit
>>>> - 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
>>>> - Debug TTL UART
>>>> - Four USB 2.0
>>>
>>> I take it those are connected to a hub chip, and the micro-USB socket is
>>> connected as a true OTG socket?
>>> So you should enable the usb_otg node, but without the host mode
>>> override we use for the Pine64.
>>
>> Agreed. Unless OTG needs PMIC support.
>
> Ah, good point. Quickly looking at the schematics [1] I see that
> something's wrong there - could be me as well ...
>
> The OTG port has a voltage regulator enabled by USB0-DRVVBUS, which
> seems to be connected to GPIO PD7, according to the GPIO assignment table.
> Each of the dual-socket host port pairs (connected to the HUB) have a
> separate voltage regulator, ports 3 and 4 seems to be always enabled,
> whereas ports 1 and 2 are controlled by the USB1-DRVVBUS signal.
> Now this signal seems to be connected to PD7 as well, but this time
> directly on the schematic, not in the table.
>
> So either there is only one signal, connected to PD7, or one of the
> lines is connected to another GPIO.
>
> One could try to play around with PD7 in Linux and measure the voltage
> on all the 5 USB connectors to shed some light on this.
>
>>>> - HDMI
>>>> - LCD
>>>> - Audio and MIC
>>>> - Wifi + BT
>>>
>>> It looks like Wifi + BT are soldered on the board, so you should at
>>> least enable the proper UART connected to the Bluetooth chip, probably
>>> also MMC1 (which is surely connected to the WiFi chip) should be
>>> described as an SDIO node.
>>
>> Those probably need regulator support. Having them enabled together
>> might be better.
>
> Good point, seems like DLDO4 and DLDO2 are responsible for this.
>
>>>
>>>> - IR receiver
>>>> - 5V DC power supply
>>>
>>> I guess the board uses the AXP803 as well? You might want to coordinate
>>> with Icenowy what to do to describe this as well, given that her patches
>>> might go in before.
>>
>> Still waiting for NMI driver/bindings to be merged before I merge the dts
>> file changes. The mfd and regulator driver changes are already in -next.
>>
>>>
>>> Cheers,
>>> Andre.
>>>
>>>> http://www.orangepi.org/OrangePiWin_WinPlus/
>>
>> The URL is not going to be helpful if it goes offline.
>>
>> Can someone provide schematics for this board? Without it there's really
>> no verification for what the device tree describes.
>
> Found them here [1].
>
>>>>
>>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>> ---
>>>>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 102 +++++++++++++++++++++
>>>>  2 files changed, 103 insertions(+)
>>>>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
>>>> index 244e8b7..4120ce9 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>>>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>>>> @@ -1,5 +1,6 @@
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
>>>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>>>>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
>>>>
>>>>  always               := $(dtb-y)
>>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> new file mode 100644
>>>> index 0000000..b16e606
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> @@ -0,0 +1,102 @@
>>>> +/*
>>>> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-a64.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>>> +
>>>> +/ {
>>>> +     model = "OrangePi Win/Win Plus";
>>>> +     compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
>>>> +
>>>> +     aliases {
>>>> +             serial0 = &uart0;
>>>> +     };
>>>> +
>>>> +     chosen {
>>>> +             stdout-path = "serial0:115200n8";
>>>> +     };
>>>> +
>>>> +     soc {
>>>> +             reg_vcc3v3: vcc3v3 {
>>>> +                     compatible = "regulator-fixed";
>>>> +                     regulator-name = "vcc3v3";
>>>> +                     regulator-min-microvolt = <3300000>;
>>>> +                     regulator-max-microvolt = <3300000>;
>>>> +             };
>>
>> This should be outside of the soc node.
>
> Agreed on that one.
>
>> Furthermore, you should
>> not be doing full path overrides in the dts file. If you need
>> to reference a node, but it doesn't have a label, add the label
>> first.
>
> That shouldn't be needed if it's outside of the /soc node?
>
>>>> +     };
>>>> +};
>>>> +
>>>> +&mmc0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&mmc0_pins>;
>>>> +     vmmc-supply = <&reg_vcc3v3>;
>>>> +     cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>>
>> Please add a comment after this denoting the pin name.
>>
>>>> +     cd-inverted;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&uart0 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&uart0_pins_a>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&i2c1 {
>>>> +     pinctrl-names = "default";
>>>> +     pinctrl-0 = <&i2c1_pins>;
>>>> +     status = "okay";
>>>> +};
>>>> +
>>>> +&usbphy {
>>>> +       status = "okay";
>>
>> No VBUS regulator supplies?
>
> The HSIC block in the SoC needs apparently to be driven by FLDO1.
> The voltage regulator for two of the USB host ports is enabled by PD7
> (or not, see above).
>
>> Does the USB hub need a node?
>
> Good question, given that two of the ports have their bus power
> switchable, while the other two are always enabled. Do we express those
> things in the DT?
>
> Cheers,
> Andre.
>
> [1] http://www.orangepi.org/download/ORANGEPI-WIN-V1_1.pdf
> http://www.orangepi.org/download/ORANGEPI-Winplus-V1_3.pdf
> http://www.orangepi.org/downloadresources/
>
> Can someone (without commercial and legal conflict potential) please
> upload them to the sunxi Wiki?

zhaoyifan, We would like to upload above data-sheets on sunxi wiki
like other boards did. Request your approval for the same?

thanks!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:40     ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 33+ messages in thread
From: icenowy @ 2017-05-26 16:40 UTC (permalink / raw)
  To: jagannadh.teki
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
	Jagan Teki

在 2017-05-26 03:26,Jagan Teki 写道:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Orangepi Prime is an open-source single-board computer
> using the Allwinner h5 SOC.

Sorry but I have already added this board and it's
scheduled at 4.13.

> 
> H5 Orangepi Prime has
> - Quad-core Cortex-A53
> - 2GB DDR3
> - Debug TTL UART
> - 1000M/100M Ethernet RJ45
> - Three USB 2.0
> - HDMI
> - Audio and MIC
> - Wifi + BT
> - IR receiver
> - HDMI
> - Wifi + BT
> 
> http://www.orangepi.org/OrangePiPrime/
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>  .../dts/allwinner/sun50i-h5-orangepi-prime.dts     | 100 
> +++++++++++++++++++++
>  2 files changed, 101 insertions(+)
>  create mode 100644 
> arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
> b/arch/arm64/boot/dts/allwinner/Makefile
> index 4120ce9..bf7d3fe 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb 
> sun50i-a64-pine64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
> 
>  always		:= $(dtb-y)
>  subdir-y	:= $(dts-dirs)
> diff --git
> a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> new file mode 100644
> index 0000000..9e98aac
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> @@ -0,0 +1,100 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-h5.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "OrangePi Prime";
> +	compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		reg = <0x40000000 0x80000000>;
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&usbphy {
> +	status = "okay";
> +};
> +
> +&ohci1 {
> +	status = "okay";
> +};
> +
> +&ehci1 {
> +	status = "okay";
> +};
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:40     ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 33+ messages in thread
From: icenowy-h8G6r0blFSE @ 2017-05-26 16:40 UTC (permalink / raw)
  To: jagannadh.teki-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Jagan Teki

在 2017-05-26 03:26,Jagan Teki 写道:
> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> 
> Orangepi Prime is an open-source single-board computer
> using the Allwinner h5 SOC.

Sorry but I have already added this board and it's
scheduled at 4.13.

> 
> H5 Orangepi Prime has
> - Quad-core Cortex-A53
> - 2GB DDR3
> - Debug TTL UART
> - 1000M/100M Ethernet RJ45
> - Three USB 2.0
> - HDMI
> - Audio and MIC
> - Wifi + BT
> - IR receiver
> - HDMI
> - Wifi + BT
> 
> http://www.orangepi.org/OrangePiPrime/
> 
> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>  .../dts/allwinner/sun50i-h5-orangepi-prime.dts     | 100 
> +++++++++++++++++++++
>  2 files changed, 101 insertions(+)
>  create mode 100644 
> arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
> b/arch/arm64/boot/dts/allwinner/Makefile
> index 4120ce9..bf7d3fe 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb 
> sun50i-a64-pine64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
> 
>  always		:= $(dtb-y)
>  subdir-y	:= $(dts-dirs)
> diff --git
> a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> new file mode 100644
> index 0000000..9e98aac
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> @@ -0,0 +1,100 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.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 library 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 library 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 "sun50i-h5.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "OrangePi Prime";
> +	compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		reg = <0x40000000 0x80000000>;
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&usbphy {
> +	status = "okay";
> +};
> +
> +&ohci1 {
> +	status = "okay";
> +};
> +
> +&ehci1 {
> +	status = "okay";
> +};
> --
> 1.9.1

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:40     ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 33+ messages in thread
From: icenowy at aosc.io @ 2017-05-26 16:40 UTC (permalink / raw)
  To: linux-arm-kernel

? 2017-05-26 03:26?Jagan Teki ???
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Orangepi Prime is an open-source single-board computer
> using the Allwinner h5 SOC.

Sorry but I have already added this board and it's
scheduled at 4.13.

> 
> H5 Orangepi Prime has
> - Quad-core Cortex-A53
> - 2GB DDR3
> - Debug TTL UART
> - 1000M/100M Ethernet RJ45
> - Three USB 2.0
> - HDMI
> - Audio and MIC
> - Wifi + BT
> - IR receiver
> - HDMI
> - Wifi + BT
> 
> http://www.orangepi.org/OrangePiPrime/
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile             |   1 +
>  .../dts/allwinner/sun50i-h5-orangepi-prime.dts     | 100 
> +++++++++++++++++++++
>  2 files changed, 101 insertions(+)
>  create mode 100644 
> arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
> b/arch/arm64/boot/dts/allwinner/Makefile
> index 4120ce9..bf7d3fe 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb 
> sun50i-a64-pine64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
> 
>  always		:= $(dtb-y)
>  subdir-y	:= $(dts-dirs)
> diff --git
> a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> new file mode 100644
> index 0000000..9e98aac
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
> @@ -0,0 +1,100 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki <jteki@openedev.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 library 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 library 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 "sun50i-h5.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "OrangePi Prime";
> +	compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		reg = <0x40000000 0x80000000>;
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&usbphy {
> +	status = "okay";
> +};
> +
> +&ohci1 {
> +	status = "okay";
> +};
> +
> +&ehci1 {
> +	status = "okay";
> +};
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:44       ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-26 16:44 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
	Jagan Teki

On Fri, May 26, 2017 at 10:10 PM,  <icenowy@aosc.io> wrote:
> 在 2017-05-26 03:26,Jagan Teki 写道:
>>
>> From: Jagan Teki <jagan@amarulasolutions.com>
>>
>> Orangepi Prime is an open-source single-board computer
>> using the Allwinner h5 SOC.
>
>
> Sorry but I have already added this board and it's
> scheduled at 4.13.

Ohh, unfortunately I missed to find it on ML, can you point?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:44       ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-26 16:44 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi, Jagan Teki

On Fri, May 26, 2017 at 10:10 PM,  <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
> 在 2017-05-26 03:26,Jagan Teki 写道:
>>
>> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>
>> Orangepi Prime is an open-source single-board computer
>> using the Allwinner h5 SOC.
>
>
> Sorry but I have already added this board and it's
> scheduled at 4.13.

Ohh, unfortunately I missed to find it on ML, can you point?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:44       ` Jagan Teki
  0 siblings, 0 replies; 33+ messages in thread
From: Jagan Teki @ 2017-05-26 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 26, 2017 at 10:10 PM,  <icenowy@aosc.io> wrote:
> ? 2017-05-26 03:26?Jagan Teki ???
>>
>> From: Jagan Teki <jagan@amarulasolutions.com>
>>
>> Orangepi Prime is an open-source single-board computer
>> using the Allwinner h5 SOC.
>
>
> Sorry but I have already added this board and it's
> scheduled at 4.13.

Ohh, unfortunately I missed to find it on ML, can you point?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [linux-sunxi] [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:51         ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 33+ messages in thread
From: icenowy @ 2017-05-26 16:51 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Mark Rutland, devicetree, Catalin Marinas, linux-sunxi,
	Will Deacon, linux-kernel, Chen-Yu Tsai, Rob Herring, Jagan Teki,
	Maxime Ripard, Michael Trimarchi, linux-arm-kernel

在 2017-05-27 00:44,Jagan Teki 写道:
> On Fri, May 26, 2017 at 10:10 PM,  <icenowy@aosc.io> wrote:
>> 在 2017-05-26 03:26,Jagan Teki 写道:
>>> 
>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>> 
>>> Orangepi Prime is an open-source single-board computer
>>> using the Allwinner h5 SOC.
>> 
>> 
>> Sorry but I have already added this board and it's
>> scheduled at 4.13.
> 
> Ohh, unfortunately I missed to find it on ML, can you point?

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/501311.html

> 
> thanks!

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:51         ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 33+ messages in thread
From: icenowy-h8G6r0blFSE @ 2017-05-26 16:51 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Catalin Marinas,
	linux-sunxi, Will Deacon, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Chen-Yu Tsai, Rob Herring, Jagan Teki, Maxime Ripard,
	Michael Trimarchi,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

在 2017-05-27 00:44,Jagan Teki 写道:
> On Fri, May 26, 2017 at 10:10 PM,  <icenowy-h8G6r0blFSE@public.gmane.org> wrote:
>> 在 2017-05-26 03:26,Jagan Teki 写道:
>>> 
>>> From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
>>> 
>>> Orangepi Prime is an open-source single-board computer
>>> using the Allwinner h5 SOC.
>> 
>> 
>> Sorry but I have already added this board and it's
>> scheduled at 4.13.
> 
> Ohh, unfortunately I missed to find it on ML, can you point?

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/501311.html

> 
> thanks!

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [linux-sunxi] [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support
@ 2017-05-26 16:51         ` icenowy-h8G6r0blFSE
  0 siblings, 0 replies; 33+ messages in thread
From: icenowy at aosc.io @ 2017-05-26 16:51 UTC (permalink / raw)
  To: linux-arm-kernel

? 2017-05-27 00:44?Jagan Teki ???
> On Fri, May 26, 2017 at 10:10 PM,  <icenowy@aosc.io> wrote:
>> ? 2017-05-26 03:26?Jagan Teki ???
>>> 
>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>> 
>>> Orangepi Prime is an open-source single-board computer
>>> using the Allwinner h5 SOC.
>> 
>> 
>> Sorry but I have already added this board and it's
>> scheduled at 4.13.
> 
> Ohh, unfortunately I missed to find it on ML, can you point?

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/501311.html

> 
> thanks!

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2017-05-26 16:51 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 19:26 [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support Jagan Teki
2017-05-25 19:26 ` Jagan Teki
2017-05-25 19:26 ` Jagan Teki
2017-05-25 19:26 ` [PATCH 2/3] arm64: allwinner: h5: Add initial Orangepi Prime support Jagan Teki
2017-05-25 19:26   ` Jagan Teki
2017-05-25 19:26   ` Jagan Teki
2017-05-26 16:40   ` [linux-sunxi] " icenowy
2017-05-26 16:40     ` icenowy at aosc.io
2017-05-26 16:40     ` icenowy-h8G6r0blFSE
2017-05-26 16:44     ` [linux-sunxi] " Jagan Teki
2017-05-26 16:44       ` Jagan Teki
2017-05-26 16:44       ` Jagan Teki
2017-05-26 16:51       ` [linux-sunxi] " icenowy
2017-05-26 16:51         ` icenowy at aosc.io
2017-05-26 16:51         ` icenowy-h8G6r0blFSE
2017-05-25 19:26 ` [PATCH 3/3] arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support Jagan Teki
2017-05-25 19:26   ` Jagan Teki
2017-05-25 19:26   ` Jagan Teki
2017-05-25 22:30 ` [linux-sunxi] [PATCH 1/3] arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support André Przywara
2017-05-25 22:30   ` André Przywara
2017-05-25 22:30   ` André Przywara
2017-05-26  3:54   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-26  3:54     ` Chen-Yu Tsai
2017-05-26  3:54     ` Chen-Yu Tsai
2017-05-26  8:59     ` [linux-sunxi] " Andre Przywara
2017-05-26  8:59       ` Andre Przywara
2017-05-26  8:59       ` Andre Przywara
2017-05-26  9:03       ` [linux-sunxi] " Icenowy Zheng
2017-05-26  9:03         ` Icenowy Zheng
2017-05-26  9:03         ` Icenowy Zheng
2017-05-26 11:15       ` [linux-sunxi] " Jagan Teki
2017-05-26 11:15         ` Jagan Teki
2017-05-26 11:15         ` Jagan Teki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.