All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2014-12-27  7:37 ` Siarhei Siamashka
  0 siblings, 0 replies; 30+ messages in thread
From: Siarhei Siamashka @ 2014-12-27  7:37 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/Makefile               |  3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 95 ++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c486545..f363938 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -464,7 +464,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-colombus.dtb \
 	sun6i-a31-hummingbird.dtb \
 	sun6i-a31-m9.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bootsetup.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..a5e8562
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this library; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+/include/ "sun6i-a31s.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	chosen {
+		bootargs = "earlyprintk console=ttyS0,115200";
+	};
+
+	soc@01c00000 {
+		mmc0: mmc@01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+			vmmc-supply = <&reg_vcc3v0>;
+			bus-width = <4>;
+			cd-gpios = <&pio 0 8 0>; /* PA8 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		usbphy: phy@01c19400 {
+			status = "okay";
+		};
+
+		ehci0: usb@01c1a000 {
+			/* rtl8188etv wifi is connected here */
+			status = "okay";
+		};
+
+		pio: pinctrl@01c20800 {
+			mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
+				allwinner,pins = "PA8";
+				allwinner,function = "gpio_in";
+				allwinner,drive = <0>;
+				allwinner,pull = <1>;
+			};
+		};
+
+		uart0: serial@01c28000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins_a>;
+			status = "okay";
+		};
+	};
+};
-- 
2.0.4

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

* [PATCH 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2014-12-27  7:37 ` Siarhei Siamashka
  0 siblings, 0 replies; 30+ messages in thread
From: Siarhei Siamashka @ 2014-12-27  7:37 UTC (permalink / raw)
  To: linux-arm-kernel

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
---
 arch/arm/boot/dts/Makefile               |  3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 95 ++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c486545..f363938 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -464,7 +464,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-colombus.dtb \
 	sun6i-a31-hummingbird.dtb \
 	sun6i-a31-m9.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bootsetup.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..a5e8562
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this library; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+/include/ "sun6i-a31s.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	chosen {
+		bootargs = "earlyprintk console=ttyS0,115200";
+	};
+
+	soc at 01c00000 {
+		mmc0: mmc at 01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+			vmmc-supply = <&reg_vcc3v0>;
+			bus-width = <4>;
+			cd-gpios = <&pio 0 8 0>; /* PA8 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		usbphy: phy at 01c19400 {
+			status = "okay";
+		};
+
+		ehci0: usb at 01c1a000 {
+			/* rtl8188etv wifi is connected here */
+			status = "okay";
+		};
+
+		pio: pinctrl at 01c20800 {
+			mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
+				allwinner,pins = "PA8";
+				allwinner,function = "gpio_in";
+				allwinner,drive = <0>;
+				allwinner,pull = <1>;
+			};
+		};
+
+		uart0: serial at 01c28000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins_a>;
+			status = "okay";
+		};
+	};
+};
-- 
2.0.4

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

* [PATCH 2/2] ARM: dts: sun7i: Add dts file for MSI Primo73 tablet
  2014-12-27  7:37 ` Siarhei Siamashka
@ 2014-12-27  7:37     ` Siarhei Siamashka
  -1 siblings, 0 replies; 30+ messages in thread
From: Siarhei Siamashka @ 2014-12-27  7:37 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

The MSI Primo73 is an A20 based tablet, with 1G RAM, 16G NAND,
1024x600 TN LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3000 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo73

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/Makefile              |  3 +-
 arch/arm/boot/dts/sun7i-a20-primo73.dts | 94 +++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f363938..7822e8b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -477,7 +477,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-olinuxino-lime.dtb \
 	sun7i-a20-olinuxino-lime2.dtb \
 	sun7i-a20-olinuxino-micro.dtb \
-	sun7i-a20-pcduino3.dtb
+	sun7i-a20-pcduino3.dtb \
+	sun7i-a20-primo73.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-a23-ippo-q8h-v5.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
new file mode 100644
index 0000000..8a09b24
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this library; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * 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/ "sun7i-a20.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo73 tablet";
+	compatible = "msi,primo73", "allwinner,sun7i-a20";
+
+	soc@01c00000 {
+		mmc0: mmc@01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+			vmmc-supply = <&reg_vcc3v3>;
+			bus-width = <4>;
+			cd-gpios = <&pio 7 1 0>; /* PH1 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		usbphy: phy@01c13400 {
+			usb2_vbus-supply = <&reg_usb2_vbus>;
+			status = "okay";
+		};
+
+		ehci1: usb@01c1c000 {
+			/* rtl8188etv wifi is connected here */
+			status = "okay";
+		};
+
+		pinctrl@01c20800 {
+			usb2_vbus_pin_a: usb2_vbus_pin@0 {
+				allwinner,pins = "PH12";
+			};
+		};
+
+		uart0: serial@01c28000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins_a>;
+			status = "okay";
+		};
+	};
+
+	reg_usb2_vbus: usb2-vbus {
+		gpio = <&pio 7 12 0>; /* PH12 */
+		status = "okay";
+	};
+};
-- 
2.0.4

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

* [PATCH 2/2] ARM: dts: sun7i: Add dts file for MSI Primo73 tablet
@ 2014-12-27  7:37     ` Siarhei Siamashka
  0 siblings, 0 replies; 30+ messages in thread
From: Siarhei Siamashka @ 2014-12-27  7:37 UTC (permalink / raw)
  To: linux-arm-kernel

The MSI Primo73 is an A20 based tablet, with 1G RAM, 16G NAND,
1024x600 TN LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3000 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo73

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
---
 arch/arm/boot/dts/Makefile              |  3 +-
 arch/arm/boot/dts/sun7i-a20-primo73.dts | 94 +++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f363938..7822e8b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -477,7 +477,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-olinuxino-lime.dtb \
 	sun7i-a20-olinuxino-lime2.dtb \
 	sun7i-a20-olinuxino-micro.dtb \
-	sun7i-a20-pcduino3.dtb
+	sun7i-a20-pcduino3.dtb \
+	sun7i-a20-primo73.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-a23-ippo-q8h-v5.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
new file mode 100644
index 0000000..8a09b24
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this library; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * 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/ "sun7i-a20.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo73 tablet";
+	compatible = "msi,primo73", "allwinner,sun7i-a20";
+
+	soc at 01c00000 {
+		mmc0: mmc at 01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+			vmmc-supply = <&reg_vcc3v3>;
+			bus-width = <4>;
+			cd-gpios = <&pio 7 1 0>; /* PH1 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		usbphy: phy at 01c13400 {
+			usb2_vbus-supply = <&reg_usb2_vbus>;
+			status = "okay";
+		};
+
+		ehci1: usb at 01c1c000 {
+			/* rtl8188etv wifi is connected here */
+			status = "okay";
+		};
+
+		pinctrl at 01c20800 {
+			usb2_vbus_pin_a: usb2_vbus_pin at 0 {
+				allwinner,pins = "PH12";
+			};
+		};
+
+		uart0: serial at 01c28000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins_a>;
+			status = "okay";
+		};
+	};
+
+	reg_usb2_vbus: usb2-vbus {
+		gpio = <&pio 7 12 0>; /* PH12 */
+		status = "okay";
+	};
+};
-- 
2.0.4

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

* Re: [PATCH 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2014-12-27  7:37 ` Siarhei Siamashka
@ 2015-01-08  9:52     ` Maxime Ripard
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-01-08  9:52 UTC (permalink / raw)
  To: Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 6090 bytes --]

Hi Siarhei,

On Sat, Dec 27, 2014 at 09:37:20AM +0200, Siarhei Siamashka wrote:
> The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> (both volume buttons are also connected to the UBOOT_SEL pin). The
> external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> OTG and 3.5mm headphone jack. More details are available at
>     http://linux-sunxi.org/MSI_Primo81
> 
> This initial dts file only provides support for mmc, wifi and uart
> (there is no external connector for uart though). Graphics can be used
> via simplefb. However, without usb otg, there are no reasonable means
> to handle user input yet.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  arch/arm/boot/dts/Makefile               |  3 +-
>  arch/arm/boot/dts/sun6i-a31s-primo81.dts | 95 ++++++++++++++++++++++++++++++++
>  2 files changed, 97 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index c486545..f363938 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -464,7 +464,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  	sun6i-a31-colombus.dtb \
>  	sun6i-a31-hummingbird.dtb \
>  	sun6i-a31-m9.dtb \
> -	sun6i-a31s-cs908.dtb
> +	sun6i-a31s-cs908.dtb \
> +	sun6i-a31s-primo81.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  	sun7i-a20-bananapi.dtb \
>  	sun7i-a20-bootsetup.dtb \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 0000000..a5e8562
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,95 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@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.
> + *
> + *     You should have received a copy of the GNU General Public
> + *     License along with this library; if not, write to the Free
> + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
> + *     MA 02110-1301 USA
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +/include/ "sun6i-a31s.dtsi"
> +/include/ "sunxi-common-regulators.dtsi"
>
> +
> +/ {
> +	model = "MSI Primo81 tablet";
> +	compatible = "msi,primo81", "allwinner,sun6i-a31s";
> +
> +	chosen {
> +		bootargs = "earlyprintk console=ttyS0,115200";
> +	};
> +
> +	soc@01c00000 {
> +		mmc0: mmc@01c0f000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
> +			vmmc-supply = <&reg_vcc3v0>;
> +			bus-width = <4>;
> +			cd-gpios = <&pio 0 8 0>; /* PA8 */
> +			cd-inverted;
> +			status = "okay";
> +		};
> +
> +		usbphy: phy@01c19400 {
> +			status = "okay";
> +		};
> +
> +		ehci0: usb@01c1a000 {
> +			/* rtl8188etv wifi is connected here */
> +			status = "okay";
> +		};
> +
> +		pio: pinctrl@01c20800 {
> +			mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
> +				allwinner,pins = "PA8";
> +				allwinner,function = "gpio_in";
> +				allwinner,drive = <0>;
> +				allwinner,pull = <1>;
> +			};
> +		};
> +
> +		uart0: serial@01c28000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&uart0_pins_a>;
> +			status = "okay";
> +		};
> +	};
> +};
> -- 
> 2.0.4
> 

These two patches look very good overall. 

There's two things about the two of them though:
  - We just switched to using the DT includes, please use them for
    your GPIO flags and pinctrl drive strength and pull
    configurations.
  - We will switch soon to using the kind of syntax used for example
    by TI in their DTSes (you can look at the beaglebone black for an
    good example.), it would be great if you could use that in your
    two DTSes, in order to avoid changing everything again in a near
    future.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-01-08  9:52     ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-01-08  9:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Siarhei,

On Sat, Dec 27, 2014 at 09:37:20AM +0200, Siarhei Siamashka wrote:
> The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> (both volume buttons are also connected to the UBOOT_SEL pin). The
> external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> OTG and 3.5mm headphone jack. More details are available at
>     http://linux-sunxi.org/MSI_Primo81
> 
> This initial dts file only provides support for mmc, wifi and uart
> (there is no external connector for uart though). Graphics can be used
> via simplefb. However, without usb otg, there are no reasonable means
> to handle user input yet.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> ---
>  arch/arm/boot/dts/Makefile               |  3 +-
>  arch/arm/boot/dts/sun6i-a31s-primo81.dts | 95 ++++++++++++++++++++++++++++++++
>  2 files changed, 97 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index c486545..f363938 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -464,7 +464,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  	sun6i-a31-colombus.dtb \
>  	sun6i-a31-hummingbird.dtb \
>  	sun6i-a31-m9.dtb \
> -	sun6i-a31s-cs908.dtb
> +	sun6i-a31s-cs908.dtb \
> +	sun6i-a31s-primo81.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  	sun7i-a20-bananapi.dtb \
>  	sun7i-a20-bootsetup.dtb \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 0000000..a5e8562
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,95 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.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.
> + *
> + *     You should have received a copy of the GNU General Public
> + *     License along with this library; if not, write to the Free
> + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
> + *     MA 02110-1301 USA
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +/include/ "sun6i-a31s.dtsi"
> +/include/ "sunxi-common-regulators.dtsi"
>
> +
> +/ {
> +	model = "MSI Primo81 tablet";
> +	compatible = "msi,primo81", "allwinner,sun6i-a31s";
> +
> +	chosen {
> +		bootargs = "earlyprintk console=ttyS0,115200";
> +	};
> +
> +	soc at 01c00000 {
> +		mmc0: mmc at 01c0f000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
> +			vmmc-supply = <&reg_vcc3v0>;
> +			bus-width = <4>;
> +			cd-gpios = <&pio 0 8 0>; /* PA8 */
> +			cd-inverted;
> +			status = "okay";
> +		};
> +
> +		usbphy: phy at 01c19400 {
> +			status = "okay";
> +		};
> +
> +		ehci0: usb at 01c1a000 {
> +			/* rtl8188etv wifi is connected here */
> +			status = "okay";
> +		};
> +
> +		pio: pinctrl at 01c20800 {
> +			mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
> +				allwinner,pins = "PA8";
> +				allwinner,function = "gpio_in";
> +				allwinner,drive = <0>;
> +				allwinner,pull = <1>;
> +			};
> +		};
> +
> +		uart0: serial at 01c28000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&uart0_pins_a>;
> +			status = "okay";
> +		};
> +	};
> +};
> -- 
> 2.0.4
> 

These two patches look very good overall. 

There's two things about the two of them though:
  - We just switched to using the DT includes, please use them for
    your GPIO flags and pinctrl drive strength and pull
    configurations.
  - We will switch soon to using the kind of syntax used for example
    by TI in their DTSes (you can look at the beaglebone black for an
    good example.), it would be great if you could use that in your
    two DTSes, in order to avoid changing everything again in a near
    future.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150108/cca53a8b/attachment-0001.sig>

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

* [PATCH V2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-01-08  9:52     ` Maxime Ripard
@ 2015-06-14 18:55       ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-14 18:55 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

Maxime Ripard wrote:
> On Sat, Dec 27, 2014 at 09:37:20AM +0200, Siarhei Siamashka wrote:
> > The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> > 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> > rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> > and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> > (both volume buttons are also connected to the UBOOT_SEL pin). The
> > external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> > OTG and 3.5mm headphone jack. More details are available at
> >     http://linux-sunxi.org/MSI_Primo81
> >
> > This initial dts file only provides support for mmc, wifi and uart
> > (there is no external connector for uart though). Graphics can be used
> > via simplefb. However, without usb otg, there are no reasonable means
> > to handle user input yet.
[...]
> These two patches look very good overall.
> 
> There's two things about the two of them though:
>   - We just switched to using the DT includes, please use them for
>     your GPIO flags and pinctrl drive strength and pull
>     configurations.
>   - We will switch soon to using the kind of syntax used for example
>     by TI in their DTSes (you can look at the beaglebone black for an
>     good example.), it would be great if you could use that in your
>     two DTSes, in order to avoid changing everything again in a near
>     future.

As far as I can see nobody has taken this up until now, so I have
slightly reworked Siarhei's original patch:

- changed the numeric pinctrl and gpio values to their symbolic
  equivalents

- changed the include syntax from /include/ to #include to make
  the dts build with current kernels.

I have current u-boot master working on the tablet (booted from
SD card), with console on the LCD, USB-OTG-support and a USB
keyboard.  A defconfig patch for OTG+keyboard support has been
submitted to the u-boot list.

Unfortunately I have not yet had much luck with the kernel.
I try to get Hans de Goede's sunxi-wip branch
(https://github.com/jwrdegoede/linux-sunxi/tree/sunxi-wip) to
work on the Primo81, but I have not yet been able to get any
kernel output on the LCD.  Debugging this is slightly difficult
as I currently lack an SD breakout board, so I have no way to
get a serial console for now.

Siarhei, could you perhaps give Hans' sunxi-wip branch a try on
your Primo81? AFAIK you have a breakout board for it.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.

-- 
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] 30+ messages in thread

* [PATCH V2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-14 18:55       ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-14 18:55 UTC (permalink / raw)
  To: linux-arm-kernel

Maxime Ripard wrote:
> On Sat, Dec 27, 2014 at 09:37:20AM +0200, Siarhei Siamashka wrote:
> > The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> > 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> > rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> > and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> > (both volume buttons are also connected to the UBOOT_SEL pin). The
> > external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> > OTG and 3.5mm headphone jack. More details are available at
> >     http://linux-sunxi.org/MSI_Primo81
> >
> > This initial dts file only provides support for mmc, wifi and uart
> > (there is no external connector for uart though). Graphics can be used
> > via simplefb. However, without usb otg, there are no reasonable means
> > to handle user input yet.
[...]
> These two patches look very good overall.
> 
> There's two things about the two of them though:
>   - We just switched to using the DT includes, please use them for
>     your GPIO flags and pinctrl drive strength and pull
>     configurations.
>   - We will switch soon to using the kind of syntax used for example
>     by TI in their DTSes (you can look at the beaglebone black for an
>     good example.), it would be great if you could use that in your
>     two DTSes, in order to avoid changing everything again in a near
>     future.

As far as I can see nobody has taken this up until now, so I have
slightly reworked Siarhei's original patch:

- changed the numeric pinctrl and gpio values to their symbolic
  equivalents

- changed the include syntax from /include/ to #include to make
  the dts build with current kernels.

I have current u-boot master working on the tablet (booted from
SD card), with console on the LCD, USB-OTG-support and a USB
keyboard.  A defconfig patch for OTG+keyboard support has been
submitted to the u-boot list.

Unfortunately I have not yet had much luck with the kernel.
I try to get Hans de Goede's sunxi-wip branch
(https://github.com/jwrdegoede/linux-sunxi/tree/sunxi-wip) to
work on the Primo81, but I have not yet been able to get any
kernel output on the LCD.  Debugging this is slightly difficult
as I currently lack an SD breakout board, so I have no way to
get a serial console for now.

Siarhei, could you perhaps give Hans' sunxi-wip branch a try on
your Primo81? AFAIK you have a breakout board for it.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten f?r Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.

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

* [PATCH V2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-14 18:55       ` Karsten Merker
@ 2015-06-14 18:55           ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-14 18:55 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
---

Changes since V1:

  - Use symbolic instead of numeric pinctrl values as requested
    by Maxime Ripard.
  - Change the include syntax from /include/ to #include to make
    the dts build with current kernels.

 arch/arm/boot/dts/Makefile               |  3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 96 ++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 867e6e3..31686c7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..8ac0bdd
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+ * Copyright 2015 Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this library; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	chosen {
+		bootargs = "earlyprintk console=ttyS0,115200";
+	};
+
+	soc@01c00000 {
+		mmc0: mmc@01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+			vmmc-supply = <&reg_vcc3v0>;
+			bus-width = <4>;
+			cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		usbphy: phy@01c19400 {
+			status = "okay";
+		};
+
+		ehci0: usb@01c1a000 {
+			/* rtl8188etv wifi is connected here */
+			status = "okay";
+		};
+
+		pio: pinctrl@01c20800 {
+			mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
+				allwinner,pins = "PA8";
+				allwinner,function = "gpio_in";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+			};
+		};
+
+		uart0: serial@01c28000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins_a>;
+			status = "okay";
+		};
+	};
+};
-- 
2.1.4

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

* [PATCH V2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-14 18:55           ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-14 18:55 UTC (permalink / raw)
  To: linux-arm-kernel

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Karsten Merker <merker@debian.org>
---

Changes since V1:

  - Use symbolic instead of numeric pinctrl values as requested
    by Maxime Ripard.
  - Change the include syntax from /include/ to #include to make
    the dts build with current kernels.

 arch/arm/boot/dts/Makefile               |  3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 96 ++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 867e6e3..31686c7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..8ac0bdd
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
+ * Copyright 2015 Karsten Merker <merker@debian.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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this library; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	chosen {
+		bootargs = "earlyprintk console=ttyS0,115200";
+	};
+
+	soc at 01c00000 {
+		mmc0: mmc at 01c0f000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+			vmmc-supply = <&reg_vcc3v0>;
+			bus-width = <4>;
+			cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+			cd-inverted;
+			status = "okay";
+		};
+
+		usbphy: phy at 01c19400 {
+			status = "okay";
+		};
+
+		ehci0: usb at 01c1a000 {
+			/* rtl8188etv wifi is connected here */
+			status = "okay";
+		};
+
+		pio: pinctrl at 01c20800 {
+			mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
+				allwinner,pins = "PA8";
+				allwinner,function = "gpio_in";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+			};
+		};
+
+		uart0: serial at 01c28000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&uart0_pins_a>;
+			status = "okay";
+		};
+	};
+};
-- 
2.1.4

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

* Re: [PATCH V2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-14 18:55           ` Karsten Merker
@ 2015-06-16  9:40               ` Maxime Ripard
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-16  9:40 UTC (permalink / raw)
  To: Karsten Merker
  Cc: Siarhei Siamashka,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 6443 bytes --]

Hi Karsten,

On Sun, Jun 14, 2015 at 08:55:06PM +0200, Karsten Merker wrote:
> The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> (both volume buttons are also connected to the UBOOT_SEL pin). The
> external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> OTG and 3.5mm headphone jack. More details are available at
>     http://linux-sunxi.org/MSI_Primo81
> 
> This initial dts file only provides support for mmc, wifi and uart
> (there is no external connector for uart though). Graphics can be used
> via simplefb. However, without usb otg, there are no reasonable means
> to handle user input yet.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
> ---
> 
> Changes since V1:
> 
>   - Use symbolic instead of numeric pinctrl values as requested
>     by Maxime Ripard.
>   - Change the include syntax from /include/ to #include to make
>     the dts build with current kernels.
> 
>  arch/arm/boot/dts/Makefile               |  3 +-
>  arch/arm/boot/dts/sun6i-a31s-primo81.dts | 96 ++++++++++++++++++++++++++++++++
>  2 files changed, 98 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 867e6e3..31686c7 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  	sun6i-a31-i7.dtb \
>  	sun6i-a31-m9.dtb \
>  	sun6i-a31-mele-a1000g-quad.dtb \
> -	sun6i-a31s-cs908.dtb
> +	sun6i-a31s-cs908.dtb \
> +	sun6i-a31s-primo81.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  	sun7i-a20-bananapi.dtb \
>  	sun7i-a20-bananapro.dtb \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 0000000..8ac0bdd
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,96 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> + * Copyright 2015 Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@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.
> + *
> + *     You should have received a copy of the GNU General Public
> + *     License along with this library; if not, write to the Free
> + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
> + *     MA 02110-1301 USA
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +#include "sun6i-a31s.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +/ {
> +	model = "MSI Primo81 tablet";
> +	compatible = "msi,primo81", "allwinner,sun6i-a31s";
> +
> +	chosen {
> +		bootargs = "earlyprintk console=ttyS0,115200";

earlyprintk should be removed from the default bootargs, and the
default console is set up using the stdout-path property these days.

> +	};
> +
> +	soc@01c00000 {
> +		mmc0: mmc@01c0f000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
> +			vmmc-supply = <&reg_vcc3v0>;
> +			bus-width = <4>;
> +			cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
> +			cd-inverted;
> +			status = "okay";
> +		};
> +
> +		usbphy: phy@01c19400 {
> +			status = "okay";
> +		};
> +
> +		ehci0: usb@01c1a000 {
> +			/* rtl8188etv wifi is connected here */
> +			status = "okay";
> +		};
> +
> +		pio: pinctrl@01c20800 {
> +			mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
> +				allwinner,pins = "PA8";
> +				allwinner,function = "gpio_in";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +			};
> +		};
> +
> +		uart0: serial@01c28000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&uart0_pins_a>;
> +			status = "okay";
> +		};
> +	};
> +};

What I meant in my previous review was to use the syntax

&uart0 {
       some-property;
};

Instead of duplicating the tree structure like you're doing
here. We've converted all the DT to that, so you can look around and
see how it's done in other boards (note that the nodes should be
sorted by alphabetical order).

Thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH V2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-16  9:40               ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-16  9:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Karsten,

On Sun, Jun 14, 2015 at 08:55:06PM +0200, Karsten Merker wrote:
> The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> (both volume buttons are also connected to the UBOOT_SEL pin). The
> external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> OTG and 3.5mm headphone jack. More details are available at
>     http://linux-sunxi.org/MSI_Primo81
> 
> This initial dts file only provides support for mmc, wifi and uart
> (there is no external connector for uart though). Graphics can be used
> via simplefb. However, without usb otg, there are no reasonable means
> to handle user input yet.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> Signed-off-by: Karsten Merker <merker@debian.org>
> ---
> 
> Changes since V1:
> 
>   - Use symbolic instead of numeric pinctrl values as requested
>     by Maxime Ripard.
>   - Change the include syntax from /include/ to #include to make
>     the dts build with current kernels.
> 
>  arch/arm/boot/dts/Makefile               |  3 +-
>  arch/arm/boot/dts/sun6i-a31s-primo81.dts | 96 ++++++++++++++++++++++++++++++++
>  2 files changed, 98 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 867e6e3..31686c7 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  	sun6i-a31-i7.dtb \
>  	sun6i-a31-m9.dtb \
>  	sun6i-a31-mele-a1000g-quad.dtb \
> -	sun6i-a31s-cs908.dtb
> +	sun6i-a31s-cs908.dtb \
> +	sun6i-a31s-primo81.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  	sun7i-a20-bananapi.dtb \
>  	sun7i-a20-bananapro.dtb \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 0000000..8ac0bdd
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,96 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
> + * Copyright 2015 Karsten Merker <merker@debian.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.
> + *
> + *     You should have received a copy of the GNU General Public
> + *     License along with this library; if not, write to the Free
> + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
> + *     MA 02110-1301 USA
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +#include "sun6i-a31s.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +/ {
> +	model = "MSI Primo81 tablet";
> +	compatible = "msi,primo81", "allwinner,sun6i-a31s";
> +
> +	chosen {
> +		bootargs = "earlyprintk console=ttyS0,115200";

earlyprintk should be removed from the default bootargs, and the
default console is set up using the stdout-path property these days.

> +	};
> +
> +	soc at 01c00000 {
> +		mmc0: mmc at 01c0f000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
> +			vmmc-supply = <&reg_vcc3v0>;
> +			bus-width = <4>;
> +			cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
> +			cd-inverted;
> +			status = "okay";
> +		};
> +
> +		usbphy: phy at 01c19400 {
> +			status = "okay";
> +		};
> +
> +		ehci0: usb at 01c1a000 {
> +			/* rtl8188etv wifi is connected here */
> +			status = "okay";
> +		};
> +
> +		pio: pinctrl at 01c20800 {
> +			mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
> +				allwinner,pins = "PA8";
> +				allwinner,function = "gpio_in";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +			};
> +		};
> +
> +		uart0: serial at 01c28000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&uart0_pins_a>;
> +			status = "okay";
> +		};
> +	};
> +};

What I meant in my previous review was to use the syntax

&uart0 {
       some-property;
};

Instead of duplicating the tree structure like you're doing
here. We've converted all the DT to that, so you can look around and
see how it's done in other boards (note that the nodes should be
sorted by alphabetical order).

Thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150616/8315d91e/attachment.sig>

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

* [RFC PATCH V3] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-16  9:40               ` Maxime Ripard
@ 2015-06-16 19:11                 ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-16 19:11 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

On Tue, Jun 16, 2015 at 11:40:27AM +0200, Maxime Ripard wrote:

> What I meant in my previous review was to use the syntax
> 
> &uart0 {
>        some-property;
> };
>   
> Instead of duplicating the tree structure like you're doing
> here. We've converted all the DT to that, so you can look around and
> see how it's done in other boards (note that the nodes should be
> sorted by alphabetical order).

Ah, sorry, I had misunderstood your original email in this regard.
Following is a reworked version of the patch.

Changelog:

Version 1
=========
- Original patch by Siarhei Siamashka

Version 2
=========
- Use symbolic instead of numeric pinctrl values.

- Change the include syntax from /include/ to #include to make
  the dts build with current kernels.

Version 3
=========
- Use labels for nodes with modifications in relation to the dtsi
  instead of replicating the tree structure.

- Remove the FSF address from the license header as done in
  http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
  for the other dts files to remove a checkpatch warning.

- Add msi to the vendor prefix list.

- Remove earlyprintk from the default kernel commandline.

- Replace the console kernel commandline parameter by a
  /chosen/stdout-path node and add an alias serial0 -> uart0.

I have tagged this patch RFC as I am unsure what to do with the
/chosen/stdout-path node. For now, I have set Siarhei's original
choice (first serial port), but I am unsure whether this is the
right thing to do as the Primo81 does by default not have a
user-accessible serial port.  The only way to get a serial
console is to either break the case open and find some test
points that carry the RX/TX lines (which with the Primo81 case
poses a high risk of breaking the display glass), or to use an SD
card breakout board and change the pinmuxing for the SD card pins
to the "serial" function.  The latter would not work without
modifying the dts, so the SD-breakout case doesn't really count
for setting the default stdout-path in the general use case.

On the other hand, setting stdout-path to the serial port does
not seem to influence getting a a boot console on the LCD when
booting from a simplefb-capable u-boot, so there is probably no
harm in doing it.

Comments welcome :-).

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.

-- 
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] 30+ messages in thread

* [RFC PATCH V3] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-16 19:11                 ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-16 19:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 16, 2015 at 11:40:27AM +0200, Maxime Ripard wrote:

> What I meant in my previous review was to use the syntax
> 
> &uart0 {
>        some-property;
> };
>   
> Instead of duplicating the tree structure like you're doing
> here. We've converted all the DT to that, so you can look around and
> see how it's done in other boards (note that the nodes should be
> sorted by alphabetical order).

Ah, sorry, I had misunderstood your original email in this regard.
Following is a reworked version of the patch.

Changelog:

Version 1
=========
- Original patch by Siarhei Siamashka

Version 2
=========
- Use symbolic instead of numeric pinctrl values.

- Change the include syntax from /include/ to #include to make
  the dts build with current kernels.

Version 3
=========
- Use labels for nodes with modifications in relation to the dtsi
  instead of replicating the tree structure.

- Remove the FSF address from the license header as done in
  http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
  for the other dts files to remove a checkpatch warning.

- Add msi to the vendor prefix list.

- Remove earlyprintk from the default kernel commandline.

- Replace the console kernel commandline parameter by a
  /chosen/stdout-path node and add an alias serial0 -> uart0.

I have tagged this patch RFC as I am unsure what to do with the
/chosen/stdout-path node. For now, I have set Siarhei's original
choice (first serial port), but I am unsure whether this is the
right thing to do as the Primo81 does by default not have a
user-accessible serial port.  The only way to get a serial
console is to either break the case open and find some test
points that carry the RX/TX lines (which with the Primo81 case
poses a high risk of breaking the display glass), or to use an SD
card breakout board and change the pinmuxing for the SD card pins
to the "serial" function.  The latter would not work without
modifying the dts, so the SD-breakout case doesn't really count
for setting the default stdout-path in the general use case.

On the other hand, setting stdout-path to the serial port does
not seem to influence getting a a boot console on the LCD when
booting from a simplefb-capable u-boot, so there is probably no
harm in doing it.

Comments welcome :-).

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten f?r Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.

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

* [RFC PATCH V3] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-16 19:11                 ` Karsten Merker
@ 2015-06-16 19:11                     ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-16 19:11 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
---
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/Makefile                         |  3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts           | 94 ++++++++++++++++++++++
 3 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6a99dda..c415c2b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -127,6 +127,7 @@ mitsubishi	Mitsubishi Electric Corporation
 mosaixtech	Mosaix Technologies, Inc.
 moxa	Moxa
 mpl	MPL AG
+msi	Micro-Star International Co. Ltd.
 mti	Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
 mundoreader	Mundo Reader S.L.
 murata	Murata Manufacturing Co., Ltd.
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 867e6e3..31686c7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..9c9b4bf
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+ * Copyright 2015 Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+};
+
+&ehci0 {
+	/* rtl8188etv wifi is connected here */
+	status = "okay";
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
+		allwinner,pins = "PA8";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.1.4

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

* [RFC PATCH V3] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-16 19:11                     ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-16 19:11 UTC (permalink / raw)
  To: linux-arm-kernel

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Karsten Merker <merker@debian.org>
---
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/Makefile                         |  3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts           | 94 ++++++++++++++++++++++
 3 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6a99dda..c415c2b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -127,6 +127,7 @@ mitsubishi	Mitsubishi Electric Corporation
 mosaixtech	Mosaix Technologies, Inc.
 moxa	Moxa
 mpl	MPL AG
+msi	Micro-Star International Co. Ltd.
 mti	Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
 mundoreader	Mundo Reader S.L.
 murata	Murata Manufacturing Co., Ltd.
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 867e6e3..31686c7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..9c9b4bf
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
+ * Copyright 2015 Karsten Merker <merker@debian.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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+};
+
+&ehci0 {
+	/* rtl8188etv wifi is connected here */
+	status = "okay";
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
+		allwinner,pins = "PA8";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.1.4

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

* Re: [RFC PATCH V3] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-16 19:11                 ` Karsten Merker
@ 2015-06-18 11:58                     ` Maxime Ripard
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-18 11:58 UTC (permalink / raw)
  To: Karsten Merker
  Cc: Siarhei Siamashka,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2653 bytes --]

Hi,

On Tue, Jun 16, 2015 at 09:11:08PM +0200, Karsten Merker wrote:
> On Tue, Jun 16, 2015 at 11:40:27AM +0200, Maxime Ripard wrote:
> 
> > What I meant in my previous review was to use the syntax
> > 
> > &uart0 {
> >        some-property;
> > };
> >   
> > Instead of duplicating the tree structure like you're doing
> > here. We've converted all the DT to that, so you can look around and
> > see how it's done in other boards (note that the nodes should be
> > sorted by alphabetical order).
> 
> Ah, sorry, I had misunderstood your original email in this regard.
> Following is a reworked version of the patch.
> 
> Changelog:
> 
> Version 1
> =========
> - Original patch by Siarhei Siamashka
> 
> Version 2
> =========
> - Use symbolic instead of numeric pinctrl values.
> 
> - Change the include syntax from /include/ to #include to make
>   the dts build with current kernels.
> 
> Version 3
> =========
> - Use labels for nodes with modifications in relation to the dtsi
>   instead of replicating the tree structure.
> 
> - Remove the FSF address from the license header as done in
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
>   for the other dts files to remove a checkpatch warning.
> 
> - Add msi to the vendor prefix list.
> 
> - Remove earlyprintk from the default kernel commandline.
> 
> - Replace the console kernel commandline parameter by a
>   /chosen/stdout-path node and add an alias serial0 -> uart0.

Next time, pleas try to keep the changelog with your patch, it's much
easier to read.

And please make the vendor prefix change a different patch.

> I have tagged this patch RFC as I am unsure what to do with the
> /chosen/stdout-path node. For now, I have set Siarhei's original
> choice (first serial port), but I am unsure whether this is the
> right thing to do as the Primo81 does by default not have a
> user-accessible serial port.  The only way to get a serial
> console is to either break the case open and find some test
> points that carry the RX/TX lines (which with the Primo81 case
> poses a high risk of breaking the display glass), or to use an SD
> card breakout board and change the pinmuxing for the SD card pins
> to the "serial" function.  The latter would not work without
> modifying the dts, so the SD-breakout case doesn't really count
> for setting the default stdout-path in the general use case.

Having that as a comment on top of whatever uart you've been using
would be great, so that people know where to look at on their device
to find it.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [RFC PATCH V3] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-18 11:58                     ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-18 11:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Jun 16, 2015 at 09:11:08PM +0200, Karsten Merker wrote:
> On Tue, Jun 16, 2015 at 11:40:27AM +0200, Maxime Ripard wrote:
> 
> > What I meant in my previous review was to use the syntax
> > 
> > &uart0 {
> >        some-property;
> > };
> >   
> > Instead of duplicating the tree structure like you're doing
> > here. We've converted all the DT to that, so you can look around and
> > see how it's done in other boards (note that the nodes should be
> > sorted by alphabetical order).
> 
> Ah, sorry, I had misunderstood your original email in this regard.
> Following is a reworked version of the patch.
> 
> Changelog:
> 
> Version 1
> =========
> - Original patch by Siarhei Siamashka
> 
> Version 2
> =========
> - Use symbolic instead of numeric pinctrl values.
> 
> - Change the include syntax from /include/ to #include to make
>   the dts build with current kernels.
> 
> Version 3
> =========
> - Use labels for nodes with modifications in relation to the dtsi
>   instead of replicating the tree structure.
> 
> - Remove the FSF address from the license header as done in
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
>   for the other dts files to remove a checkpatch warning.
> 
> - Add msi to the vendor prefix list.
> 
> - Remove earlyprintk from the default kernel commandline.
> 
> - Replace the console kernel commandline parameter by a
>   /chosen/stdout-path node and add an alias serial0 -> uart0.

Next time, pleas try to keep the changelog with your patch, it's much
easier to read.

And please make the vendor prefix change a different patch.

> I have tagged this patch RFC as I am unsure what to do with the
> /chosen/stdout-path node. For now, I have set Siarhei's original
> choice (first serial port), but I am unsure whether this is the
> right thing to do as the Primo81 does by default not have a
> user-accessible serial port.  The only way to get a serial
> console is to either break the case open and find some test
> points that carry the RX/TX lines (which with the Primo81 case
> poses a high risk of breaking the display glass), or to use an SD
> card breakout board and change the pinmuxing for the SD card pins
> to the "serial" function.  The latter would not work without
> modifying the dts, so the SD-breakout case doesn't really count
> for setting the default stdout-path in the general use case.

Having that as a comment on top of whatever uart you've been using
would be great, so that people know where to look at on their device
to find it.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150618/3793c082/attachment.sig>

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

* [PATCH V4 0/2] MSI Primo 81 dts
  2015-06-18 11:58                     ` Maxime Ripard
@ 2015-06-23 17:02                       ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-23 17:02 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

Hello,

following is V4 of the patchset to add MSI Primo 81 devicetree data.

Regards,
Karsten

Karsten Merker (2):
  ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  devicetree: Add msi to the vendor-prefix list

 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts           | 103 +++++++++++++++++++++
 3 files changed, 106 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

-- 
2.1.4

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

* [PATCH V4 0/2] MSI Primo 81 dts
@ 2015-06-23 17:02                       ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-23 17:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

following is V4 of the patchset to add MSI Primo 81 devicetree data.

Regards,
Karsten

Karsten Merker (2):
  ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  devicetree: Add msi to the vendor-prefix list

 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts           | 103 +++++++++++++++++++++
 3 files changed, 106 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

-- 
2.1.4

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

* [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-23 17:02                       ` Karsten Merker
@ 2015-06-23 17:02                           ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-23 17:02 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
---
Changelog:

Version 1
=========
- Original patch by Siarhei Siamashka

Version 2
=========
- Use symbolic instead of numeric pinctrl values.

- Change the include syntax from /include/ to #include to make
  the dts build with current kernels.

Version 3
=========
- Use labels for nodes with modifications in relation to the dtsi
  instead of replicating the tree structure.

- Remove the FSF address from the license header as done in
  http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
  for the other dts files to remove a checkpatch warning.

- Add msi to the vendor prefix list.

- Remove earlyprintk from the default kernel commandline.

- Replace the console kernel commandline parameter by a
  /chosen/stdout-path node and add an alias serial0 -> uart0.

Version 4
=========
- Split out the vendor prefix documentation into a separate patch.

- Add a comment regarding the uart0 accessibility to the corresponding
  entry in the dts.

 arch/arm/boot/dts/Makefile               |   3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 103 +++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 867e6e3..31686c7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..bd15ee1
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+ * Copyright 2015 Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+};
+
+&ehci0 {
+	/* rtl8188etv wifi is connected here */
+	status = "okay";
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
+		allwinner,pins = "PA8";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+};
+
+&uart0 {
+	/* The default uart0 pins (PH20: TX, PH21: RX) are not accessible
+	 * on an external connector. Possible ways to get physical access
+	 * to uart0 include:
+	 * - disabling mmc0, changing the pinmuxing for the SD card pins
+	 *   to the uart0 function (PF2: TX, PF4: RX) and using an SD card
+	 *   breakout board
+	 * - opening the case and finding appropriate test points connected
+	 *   to PH20 and PH21
+	 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.1.4

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

* [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-23 17:02                           ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-23 17:02 UTC (permalink / raw)
  To: linux-arm-kernel

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
(both volume buttons are also connected to the UBOOT_SEL pin). The
external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
OTG and 3.5mm headphone jack. More details are available at
    http://linux-sunxi.org/MSI_Primo81

This initial dts file only provides support for mmc, wifi and uart
(there is no external connector for uart though). Graphics can be used
via simplefb. However, without usb otg, there are no reasonable means
to handle user input yet.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Karsten Merker <merker@debian.org>
---
Changelog:

Version 1
=========
- Original patch by Siarhei Siamashka

Version 2
=========
- Use symbolic instead of numeric pinctrl values.

- Change the include syntax from /include/ to #include to make
  the dts build with current kernels.

Version 3
=========
- Use labels for nodes with modifications in relation to the dtsi
  instead of replicating the tree structure.

- Remove the FSF address from the license header as done in
  http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
  for the other dts files to remove a checkpatch warning.

- Add msi to the vendor prefix list.

- Remove earlyprintk from the default kernel commandline.

- Replace the console kernel commandline parameter by a
  /chosen/stdout-path node and add an alias serial0 -> uart0.

Version 4
=========
- Split out the vendor prefix documentation into a separate patch.

- Add a comment regarding the uart0 accessibility to the corresponding
  entry in the dts.

 arch/arm/boot/dts/Makefile               |   3 +-
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 103 +++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 867e6e3..31686c7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 0000000..bd15ee1
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
+ * Copyright 2015 Karsten Merker <merker@debian.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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+};
+
+&ehci0 {
+	/* rtl8188etv wifi is connected here */
+	status = "okay";
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
+		allwinner,pins = "PA8";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+};
+
+&uart0 {
+	/* The default uart0 pins (PH20: TX, PH21: RX) are not accessible
+	 * on an external connector. Possible ways to get physical access
+	 * to uart0 include:
+	 * - disabling mmc0, changing the pinmuxing for the SD card pins
+	 *   to the uart0 function (PF2: TX, PF4: RX) and using an SD card
+	 *   breakout board
+	 * - opening the case and finding appropriate test points connected
+	 *   to PH20 and PH21
+	 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
-- 
2.1.4

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

* [PATCH V4 2/2] devicetree: Add msi to the vendor-prefix list
  2015-06-23 17:02                       ` Karsten Merker
@ 2015-06-23 17:02                           ` Karsten Merker
  -1 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-23 17:02 UTC (permalink / raw)
  To: Maxime Ripard, Siarhei Siamashka
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Karsten Merker

Document the the "msi" (Micro-Star International Co. Ltd.) vendor prefix
which is used in sun6i-a31s-primo81.dts.

Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6a99dda..c415c2b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -127,6 +127,7 @@ mitsubishi	Mitsubishi Electric Corporation
 mosaixtech	Mosaix Technologies, Inc.
 moxa	Moxa
 mpl	MPL AG
+msi	Micro-Star International Co. Ltd.
 mti	Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
 mundoreader	Mundo Reader S.L.
 murata	Murata Manufacturing Co., Ltd.
-- 
2.1.4

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

* [PATCH V4 2/2] devicetree: Add msi to the vendor-prefix list
@ 2015-06-23 17:02                           ` Karsten Merker
  0 siblings, 0 replies; 30+ messages in thread
From: Karsten Merker @ 2015-06-23 17:02 UTC (permalink / raw)
  To: linux-arm-kernel

Document the the "msi" (Micro-Star International Co. Ltd.) vendor prefix
which is used in sun6i-a31s-primo81.dts.

Signed-off-by: Karsten Merker <merker@debian.org>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6a99dda..c415c2b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -127,6 +127,7 @@ mitsubishi	Mitsubishi Electric Corporation
 mosaixtech	Mosaix Technologies, Inc.
 moxa	Moxa
 mpl	MPL AG
+msi	Micro-Star International Co. Ltd.
 mti	Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
 mundoreader	Mundo Reader S.L.
 murata	Murata Manufacturing Co., Ltd.
-- 
2.1.4

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

* Re: [PATCH V4 2/2] devicetree: Add msi to the vendor-prefix list
  2015-06-23 17:02                           ` Karsten Merker
@ 2015-06-25 10:42                               ` Maxime Ripard
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-25 10:42 UTC (permalink / raw)
  To: Karsten Merker
  Cc: Siarhei Siamashka,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On Tue, Jun 23, 2015 at 07:02:29PM +0200, Karsten Merker wrote:
> Document the the "msi" (Micro-Star International Co. Ltd.) vendor prefix
> which is used in sun6i-a31s-primo81.dts.
> 
> Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH V4 2/2] devicetree: Add msi to the vendor-prefix list
@ 2015-06-25 10:42                               ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-25 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 23, 2015 at 07:02:29PM +0200, Karsten Merker wrote:
> Document the the "msi" (Micro-Star International Co. Ltd.) vendor prefix
> which is used in sun6i-a31s-primo81.dts.
> 
> Signed-off-by: Karsten Merker <merker@debian.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150625/0856970a/attachment-0001.sig>

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

* Re: [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
  2015-06-23 17:02                           ` Karsten Merker
@ 2015-06-25 10:44                               ` Maxime Ripard
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-25 10:44 UTC (permalink / raw)
  To: Karsten Merker
  Cc: Siarhei Siamashka,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 6991 bytes --]

On Tue, Jun 23, 2015 at 07:02:28PM +0200, Karsten Merker wrote:
> The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> (both volume buttons are also connected to the UBOOT_SEL pin). The
> external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> OTG and 3.5mm headphone jack. More details are available at
>     http://linux-sunxi.org/MSI_Primo81
> 
> This initial dts file only provides support for mmc, wifi and uart
> (there is no external connector for uart though). Graphics can be used
> via simplefb. However, without usb otg, there are no reasonable means
> to handle user input yet.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
> ---
> Changelog:
> 
> Version 1
> =========
> - Original patch by Siarhei Siamashka
> 
> Version 2
> =========
> - Use symbolic instead of numeric pinctrl values.
> 
> - Change the include syntax from /include/ to #include to make
>   the dts build with current kernels.
> 
> Version 3
> =========
> - Use labels for nodes with modifications in relation to the dtsi
>   instead of replicating the tree structure.
> 
> - Remove the FSF address from the license header as done in
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
>   for the other dts files to remove a checkpatch warning.
> 
> - Add msi to the vendor prefix list.
> 
> - Remove earlyprintk from the default kernel commandline.
> 
> - Replace the console kernel commandline parameter by a
>   /chosen/stdout-path node and add an alias serial0 -> uart0.
> 
> Version 4
> =========
> - Split out the vendor prefix documentation into a separate patch.
> 
> - Add a comment regarding the uart0 accessibility to the corresponding
>   entry in the dts.
> 
>  arch/arm/boot/dts/Makefile               |   3 +-
>  arch/arm/boot/dts/sun6i-a31s-primo81.dts | 103 +++++++++++++++++++++++++++++++
>  2 files changed, 105 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 867e6e3..31686c7 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  	sun6i-a31-i7.dtb \
>  	sun6i-a31-m9.dtb \
>  	sun6i-a31-mele-a1000g-quad.dtb \
> -	sun6i-a31s-cs908.dtb
> +	sun6i-a31s-cs908.dtb \
> +	sun6i-a31s-primo81.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  	sun7i-a20-bananapi.dtb \
>  	sun7i-a20-bananapro.dtb \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 0000000..bd15ee1
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,103 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> + * Copyright 2015 Karsten Merker <merker-8fiUuRrzOP0dnm+yROfE0A@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 "sun6i-a31s.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +/ {
> +	model = "MSI Primo81 tablet";
> +	compatible = "msi,primo81", "allwinner,sun6i-a31s";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +};
> +
> +&ehci0 {
> +	/* rtl8188etv wifi is connected here */

No need to mention it, it's what discoverable buses are made for.

> +	status = "okay";
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
> +	vmmc-supply = <&reg_vcc3v0>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&pio {
> +	mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
> +		allwinner,pins = "PA8";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +	};
> +};
> +
> +&uart0 {
> +	/* The default uart0 pins (PH20: TX, PH21: RX) are not accessible
> +	 * on an external connector. Possible ways to get physical access
> +	 * to uart0 include:
> +	 * - disabling mmc0, changing the pinmuxing for the SD card pins
> +	 *   to the uart0 function (PF2: TX, PF4: RX) and using an SD card
> +	 *   breakout board
> +	 * - opening the case and finding appropriate test points connected
> +	 *   to PH20 and PH21
> +	 */

You already made a choice here, so just document the choice you
made. I'm guessing from what you said that it's the latter, in which
case please document which test points you're talking about.

Thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-25 10:44                               ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-25 10:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 23, 2015 at 07:02:28PM +0200, Karsten Merker wrote:
> The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
> 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
> rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
> and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
> (both volume buttons are also connected to the UBOOT_SEL pin). The
> external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
> OTG and 3.5mm headphone jack. More details are available at
>     http://linux-sunxi.org/MSI_Primo81
> 
> This initial dts file only provides support for mmc, wifi and uart
> (there is no external connector for uart though). Graphics can be used
> via simplefb. However, without usb otg, there are no reasonable means
> to handle user input yet.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> Signed-off-by: Karsten Merker <merker@debian.org>
> ---
> Changelog:
> 
> Version 1
> =========
> - Original patch by Siarhei Siamashka
> 
> Version 2
> =========
> - Use symbolic instead of numeric pinctrl values.
> 
> - Change the include syntax from /include/ to #include to make
>   the dts build with current kernels.
> 
> Version 3
> =========
> - Use labels for nodes with modifications in relation to the dtsi
>   instead of replicating the tree structure.
> 
> - Remove the FSF address from the license header as done in
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/340437.html
>   for the other dts files to remove a checkpatch warning.
> 
> - Add msi to the vendor prefix list.
> 
> - Remove earlyprintk from the default kernel commandline.
> 
> - Replace the console kernel commandline parameter by a
>   /chosen/stdout-path node and add an alias serial0 -> uart0.
> 
> Version 4
> =========
> - Split out the vendor prefix documentation into a separate patch.
> 
> - Add a comment regarding the uart0 accessibility to the corresponding
>   entry in the dts.
> 
>  arch/arm/boot/dts/Makefile               |   3 +-
>  arch/arm/boot/dts/sun6i-a31s-primo81.dts | 103 +++++++++++++++++++++++++++++++
>  2 files changed, 105 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 867e6e3..31686c7 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -552,7 +552,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  	sun6i-a31-i7.dtb \
>  	sun6i-a31-m9.dtb \
>  	sun6i-a31-mele-a1000g-quad.dtb \
> -	sun6i-a31s-cs908.dtb
> +	sun6i-a31s-cs908.dtb \
> +	sun6i-a31s-primo81.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  	sun7i-a20-bananapi.dtb \
>  	sun7i-a20-bananapro.dtb \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 0000000..bd15ee1
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,103 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
> + * Copyright 2015 Karsten Merker <merker@debian.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 "sun6i-a31s.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +/ {
> +	model = "MSI Primo81 tablet";
> +	compatible = "msi,primo81", "allwinner,sun6i-a31s";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +};
> +
> +&ehci0 {
> +	/* rtl8188etv wifi is connected here */

No need to mention it, it's what discoverable buses are made for.

> +	status = "okay";
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
> +	vmmc-supply = <&reg_vcc3v0>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&pio {
> +	mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
> +		allwinner,pins = "PA8";
> +		allwinner,function = "gpio_in";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +	};
> +};
> +
> +&uart0 {
> +	/* The default uart0 pins (PH20: TX, PH21: RX) are not accessible
> +	 * on an external connector. Possible ways to get physical access
> +	 * to uart0 include:
> +	 * - disabling mmc0, changing the pinmuxing for the SD card pins
> +	 *   to the uart0 function (PF2: TX, PF4: RX) and using an SD card
> +	 *   breakout board
> +	 * - opening the case and finding appropriate test points connected
> +	 *   to PH20 and PH21
> +	 */

You already made a choice here, so just document the choice you
made. I'm guessing from what you said that it's the latter, in which
case please document which test points you're talking about.

Thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150625/5ee85fb1/attachment-0001.sig>

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

* Re: [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
       [not found]                               ` <20150625172219.GA1773@excalibur.cnev.de>
@ 2015-06-28 20:25                                     ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-28 20:25 UTC (permalink / raw)
  To: Karsten Merker
  Cc: Siarhei Siamashka,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4380 bytes --]

On Thu, Jun 25, 2015 at 07:22:19PM +0200, Karsten Merker wrote:
> > > +&ehci0 {
> > > +	/* rtl8188etv wifi is connected here */
> > 
> > No need to mention it, it's what discoverable buses are made for.
> 
> Hello Maxime,
> 
> using the same reasoning that caused you to ask for a description
> of the uart0 config (no external connector available, so why is
> there a uart0 enabled and how is it usable), I think it makes
> sense to leave this comment in the dts.  The Primo 81 doesn't
> have any external USB host connectors and the fact that the
> internal Realtek USB WLAN chip is connected there is the only
> reason that the EHCI controller gets enabled in the dts at all. 
> If you really prefer, I'll remove the comment in a V5; in that
> case please let me know.

Except that you have no way to magically find out where you're
supposed to get the UART from, while the WiFi module will be magically
discovered, reported in the logs, without any kind of user
interaction, and you actually don't even care.

> > > +&uart0 {
> > > +	/* The default uart0 pins (PH20: TX, PH21: RX) are not accessible
> > > +	 * on an external connector. Possible ways to get physical access
> > > +	 * to uart0 include:
> > > +	 * - disabling mmc0, changing the pinmuxing for the SD card pins
> > > +	 *   to the uart0 function (PF2: TX, PF4: RX) and using an SD card
> > > +	 *   breakout board
> > > +	 * - opening the case and finding appropriate test points connected
> > > +	 *   to PH20 and PH21
> > > +	 */
> > 
> > You already made a choice here, so just document the choice you
> > made. I'm guessing from what you said that it's the latter, in which
> > case please document which test points you're talking about.
> 
> Upwards in this thread you wrote:
> > [Karsten Merker wrote]
> > > I have tagged this patch RFC as I am unsure what to do with the
> > > /chosen/stdout-path node. For now, I have set Siarhei's original
> > > choice (first serial port), but I am unsure whether this is the
> > > right thing to do as the Primo81 does by default not have a
> > > user-accessible serial port.  The only way to get a serial
> > > console is to either break the case open and find some test
> > > points that carry the RX/TX lines (which with the Primo81 case
> > > poses a high risk of breaking the display glass), or to use an SD
> > > card breakout board and change the pinmuxing for the SD card pins
> > > to the "serial" function.  The latter would not work without
> > > modifying the dts, so the SD-breakout case doesn't really count
> > > for setting the default stdout-path in the general use case.
> >
> > Having that as a comment on top of whatever uart you've been using
> > would be great, so that people know where to look at on their device
> > to find it.
> 
> Maybe I have misunderstood you, but to my understanding the
> comment I added represents exactly what you asked me to do above?

Sorry if I haven't been clear enough.

> I cannot tell which test points carry the TX/RX lines from PH20
> and PH21 as I have not opened the case (and to my knowledge
> nobody else @linunx-sunxi has done that), due to the fact that
> the Primo 81 doesn't have one of typical cheap two-part plastic
> cases which can be easily opened without destroying anything, but
> a one-part aluminum case which fits tightly with the display
> glass.  To pry open the aluminium case one would have to apply
> pressure to the glass and I don't want to void my warranty and
> risk breaking the display while doing that.
>
> The u-boot and the android kernel that come preinstalled on the
> tablet use PH20 and PH21 for uart0, so there is an extremely high
> probability that there are test points on the board that carry
> these lines, but I cannot tell which ones.

So you enable a device that you have never actually tested, and you
document a procedure you have never seen to be working? I really hope
the rest of the DTS is not made that way too.

> So the same question as above: if you really want me to do
> that, I'll remove the SD card breakout info in a V5 (just tell me
> so), but I think it makes sense to leave it in the dts.

Don't enable what you haven't tested, or anything that isn't used for
what it's been intended to. Which means don't put any UART on there.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
@ 2015-06-28 20:25                                     ` Maxime Ripard
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Ripard @ 2015-06-28 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 25, 2015 at 07:22:19PM +0200, Karsten Merker wrote:
> > > +&ehci0 {
> > > +	/* rtl8188etv wifi is connected here */
> > 
> > No need to mention it, it's what discoverable buses are made for.
> 
> Hello Maxime,
> 
> using the same reasoning that caused you to ask for a description
> of the uart0 config (no external connector available, so why is
> there a uart0 enabled and how is it usable), I think it makes
> sense to leave this comment in the dts.  The Primo 81 doesn't
> have any external USB host connectors and the fact that the
> internal Realtek USB WLAN chip is connected there is the only
> reason that the EHCI controller gets enabled in the dts at all. 
> If you really prefer, I'll remove the comment in a V5; in that
> case please let me know.

Except that you have no way to magically find out where you're
supposed to get the UART from, while the WiFi module will be magically
discovered, reported in the logs, without any kind of user
interaction, and you actually don't even care.

> > > +&uart0 {
> > > +	/* The default uart0 pins (PH20: TX, PH21: RX) are not accessible
> > > +	 * on an external connector. Possible ways to get physical access
> > > +	 * to uart0 include:
> > > +	 * - disabling mmc0, changing the pinmuxing for the SD card pins
> > > +	 *   to the uart0 function (PF2: TX, PF4: RX) and using an SD card
> > > +	 *   breakout board
> > > +	 * - opening the case and finding appropriate test points connected
> > > +	 *   to PH20 and PH21
> > > +	 */
> > 
> > You already made a choice here, so just document the choice you
> > made. I'm guessing from what you said that it's the latter, in which
> > case please document which test points you're talking about.
> 
> Upwards in this thread you wrote:
> > [Karsten Merker wrote]
> > > I have tagged this patch RFC as I am unsure what to do with the
> > > /chosen/stdout-path node. For now, I have set Siarhei's original
> > > choice (first serial port), but I am unsure whether this is the
> > > right thing to do as the Primo81 does by default not have a
> > > user-accessible serial port.  The only way to get a serial
> > > console is to either break the case open and find some test
> > > points that carry the RX/TX lines (which with the Primo81 case
> > > poses a high risk of breaking the display glass), or to use an SD
> > > card breakout board and change the pinmuxing for the SD card pins
> > > to the "serial" function.  The latter would not work without
> > > modifying the dts, so the SD-breakout case doesn't really count
> > > for setting the default stdout-path in the general use case.
> >
> > Having that as a comment on top of whatever uart you've been using
> > would be great, so that people know where to look at on their device
> > to find it.
> 
> Maybe I have misunderstood you, but to my understanding the
> comment I added represents exactly what you asked me to do above?

Sorry if I haven't been clear enough.

> I cannot tell which test points carry the TX/RX lines from PH20
> and PH21 as I have not opened the case (and to my knowledge
> nobody else @linunx-sunxi has done that), due to the fact that
> the Primo 81 doesn't have one of typical cheap two-part plastic
> cases which can be easily opened without destroying anything, but
> a one-part aluminum case which fits tightly with the display
> glass.  To pry open the aluminium case one would have to apply
> pressure to the glass and I don't want to void my warranty and
> risk breaking the display while doing that.
>
> The u-boot and the android kernel that come preinstalled on the
> tablet use PH20 and PH21 for uart0, so there is an extremely high
> probability that there are test points on the board that carry
> these lines, but I cannot tell which ones.

So you enable a device that you have never actually tested, and you
document a procedure you have never seen to be working? I really hope
the rest of the DTS is not made that way too.

> So the same question as above: if you really want me to do
> that, I'll remove the SD card breakout info in a V5 (just tell me
> so), but I think it makes sense to leave it in the dts.

Don't enable what you haven't tested, or anything that isn't used for
what it's been intended to. Which means don't put any UART on there.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150628/a2df72d7/attachment.sig>

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

end of thread, other threads:[~2015-06-28 20:25 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-27  7:37 [PATCH 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet Siarhei Siamashka
2014-12-27  7:37 ` Siarhei Siamashka
     [not found] ` <1419665841-22629-1-git-send-email-siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-12-27  7:37   ` [PATCH 2/2] ARM: dts: sun7i: Add dts file for MSI Primo73 tablet Siarhei Siamashka
2014-12-27  7:37     ` Siarhei Siamashka
2015-01-08  9:52   ` [PATCH 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet Maxime Ripard
2015-01-08  9:52     ` Maxime Ripard
2015-06-14 18:55     ` [PATCH V2] " Karsten Merker
2015-06-14 18:55       ` Karsten Merker
     [not found]       ` <1434308106-27704-1-git-send-email-merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2015-06-14 18:55         ` Karsten Merker
2015-06-14 18:55           ` Karsten Merker
     [not found]           ` <1434308106-27704-2-git-send-email-merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2015-06-16  9:40             ` Maxime Ripard
2015-06-16  9:40               ` Maxime Ripard
2015-06-16 19:11               ` [RFC PATCH V3] " Karsten Merker
2015-06-16 19:11                 ` Karsten Merker
     [not found]                 ` <1434481869-9432-1-git-send-email-merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2015-06-16 19:11                   ` Karsten Merker
2015-06-16 19:11                     ` Karsten Merker
2015-06-18 11:58                   ` Maxime Ripard
2015-06-18 11:58                     ` Maxime Ripard
2015-06-23 17:02                     ` [PATCH V4 0/2] MSI Primo 81 dts Karsten Merker
2015-06-23 17:02                       ` Karsten Merker
     [not found]                       ` <1435078949-3383-1-git-send-email-merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2015-06-23 17:02                         ` [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet Karsten Merker
2015-06-23 17:02                           ` Karsten Merker
     [not found]                           ` <1435078949-3383-2-git-send-email-merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2015-06-25 10:44                             ` Maxime Ripard
2015-06-25 10:44                               ` Maxime Ripard
     [not found]                               ` <20150625172219.GA1773@excalibur.cnev.de>
     [not found]                                 ` <20150625172219.GA1773-Hlt6eto4P0pdWf7zwHaZWbNAH6kLmebB@public.gmane.org>
2015-06-28 20:25                                   ` Maxime Ripard
2015-06-28 20:25                                     ` Maxime Ripard
2015-06-23 17:02                         ` [PATCH V4 2/2] devicetree: Add msi to the vendor-prefix list Karsten Merker
2015-06-23 17:02                           ` Karsten Merker
     [not found]                           ` <1435078949-3383-3-git-send-email-merker-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2015-06-25 10:42                             ` Maxime Ripard
2015-06-25 10:42                               ` Maxime Ripard

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.