From patchwork Tue Jun 23 17:02:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karsten Merker X-Patchwork-Id: 6662511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 288E49F1C1 for ; Tue, 23 Jun 2015 17:06:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1743820636 for ; Tue, 23 Jun 2015 17:06:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F154C20627 for ; Tue, 23 Jun 2015 17:06:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z7Rd3-0001Tk-Oe; Tue, 23 Jun 2015 17:04:57 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z7RcV-0001FA-4M for linux-arm-kernel@lists.infradead.org; Tue, 23 Jun 2015 17:04:24 +0000 Received: from excalibur.cnev.de ([78.34.113.161]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0LwVGF-1Z2BM014b1-018LEL; Tue, 23 Jun 2015 19:03:59 +0200 Received: from localhost ([127.0.0.1] helo=excalibur.cnev.de) by excalibur.cnev.de with esmtp (Exim 4.84) (envelope-from ) id 1Z7Rc6-0000tJ-Ir; Tue, 23 Jun 2015 19:03:58 +0200 From: Karsten Merker To: Maxime Ripard , Siarhei Siamashka Subject: [PATCH V4 1/2] ARM: dts: sun6i: Add dts file for MSI Primo81 tablet Date: Tue, 23 Jun 2015 19:02:28 +0200 Message-Id: <1435078949-3383-2-git-send-email-merker@debian.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435078949-3383-1-git-send-email-merker@debian.org> References: <20150618115838.GL11732@lukather> <1435078949-3383-1-git-send-email-merker@debian.org> X-Provags-ID: V03:K0:E3bSvTpQ+MwbtEDX+QJ+DO0xCB7T9GsSbW/a6l8bMm9PhcT2zxP Cyzkhx2/fK9Mya2QytJEM/l8eDQSYiJE96yY5c0X+yH2vx9CErC6IoSlbsSnx5SQ0wbRu4n pBPXRTJWqMGfk3z126uoMCuCEz+yDCGwJGNJc24dbGZVh6y529uFfISpjiJoF5jgI3kxH05 bDhpMPg8X1QLvbPA4q+Mg== X-UI-Out-Filterresults: notjunk:1; V01:K0:nyq3wD4Ht7Q=:KdRHh/0ZcnUnSl7u7vD5r2 xGkNknxn9ao7B9qYb/vvwwDn21/+o7vS37WZIHsyujQHZfrR8w20xbWAr63gkw6iVDNrocbru +InsgdqG5x4eUsjuZnsPIRb2I0Wi6MLHO9i1uFVEKGawxZFB//gM0gfMAN2DbSk48Pr0PqFYQ 4Xm94pglfMXDI58+u0zu82aSZyrk+vuWxJg2HgvY8YsQeMXCg1BH8YJOuBB1s1jVVugZlohL1 A3M0Yr0Ccpo8WZMicA9YaizSyy0o16dDzuCbKyOQtDteMCOiP7S3vSuwxV42n4aeESg1HYd6a AYLcLhY+OzsqLFxANGv7X9NtjemCoT1wTr2zu1BTYbwc/PhEzta6fhtu6G82YQ/ULE3CNufsu IPqEr8aj1y//kK3J7DtU8nuKtqBhQ7rho+6344pOyQS2USmhlhaiysGHRz/X92+9gCIn34GaP F9WUryDYEFrTEy/SeyJhGYwS2IjgxuNBNpd8JyWI1/WQKW1Lj2kyXad49fpZyDe0oggySzKG0 JaUFXdE9AHObR/fjOQ1mzD+btKk+37OM24bQBM31Bx4ZT9w6kpwOgRHaP8TTmFuzW5d9IeDLj CFFPLcucPJg8LDxYLk1diwV4cWE77c+L7jPjx8iCpcwMZPlGPC26fD9ocmBM2evRFEbC6pujR 83qad1qTEmJjfeNp6yDuMC3rF X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150623_100423_619264_18D11DE7 X-CRM114-Status: GOOD ( 24.19 ) X-Spam-Score: -1.9 (-) Cc: Karsten Merker , devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Karsten Merker --- 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 + * Copyright 2015 Karsten Merker + * + * 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 = <®_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 = ; + allwinner,pull = ; + }; +}; + +&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"; +};