From patchwork Fri Aug 3 07:56:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Rondini X-Patchwork-Id: 10554763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB391174A for ; Fri, 3 Aug 2018 07:58:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC3852BFED for ; Fri, 3 Aug 2018 07:58:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B05A12BFF1; Fri, 3 Aug 2018 07:58:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 147A42BFED for ; Fri, 3 Aug 2018 07:58:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=sTcWSO2yfCWb874qm2p0tzmxnUn2Te8gO3IpMhagAyk=; b=qHg9VYMLUal8B4RlN0LoqAASGC DVwIdTXPlNyFd1XvCwAlLL+zmC7nE8AiQFvNlQWcWcvLGKSLaWpvvkXxXE+SZUaKDocxSWZzyyDrQ 9smQVbcNEEI27jCDbfxrQvfW8gFX1nytmiUSJsz0aJ34tIKIAgJ1OTAUGMLhSsOUEsrRVJ/oa4AIk /KAYTJKD8GrmE/c7G8MHCdxScJbIX6Q9V7yKjZkMARaOTw5lNHCaCssZJjRtA5nBoZWp+wl4/sQKs i3Aq4srIQ61mLpyw0JzxVwT0Z5uWLyqXt4cIGzjTChWiIJK5Z2/TVWZgxVePEN61shwjmhs/h0F2V TSDmKuMw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flUyX-00066J-Ms; Fri, 03 Aug 2018 07:58:17 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flUyU-00064K-VH for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2018 07:58:16 +0000 Received: by mail-wm0-x244.google.com with SMTP id o11-v6so5246437wmh.2 for ; Fri, 03 Aug 2018 00:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kynetics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+jyTOKGf1ttXu/BD+3ayOEBxej5qVGJ20Mrm+C+fQm4=; b=B+m8HdYdlEJFRWUsLSEBByXac9YlFEh6/ujyRpgECfxW4k5HZJIe/8KUBY6EXbKh/a mRQwa4APxqvlaEwCOlxqihflU25WB+2TO3g7xGfziUOmHARc3SwFNsiIqxJ6VlG2RarG YIpU0xphc8kcBhsb/6HME0O1JcoHKX9qa1iohvXLd3vMkE9iN3q2Kuq4J4Ery19/ei4H oKM4+KlvrXEv8vyKUfebgqlg9VXc5uaST8+GUCJQ2x1lP65hJBclVhidhEngVUv9cgOL D2B/dJYejCglzGNXD3LIIfTUcx3LM0cO58Z8U6ciN2PMS8fb/B05szyJgxuFGKcKkqrH JCmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+jyTOKGf1ttXu/BD+3ayOEBxej5qVGJ20Mrm+C+fQm4=; b=JpK5ywFS2JW+xa3K1tpZkOtA/iMolattwYAgm4vbQPPZNrFgmBbzTBanCeyykmR3Wp naZ9HCUNJqQV4mBf7/3ib/7k2QQPSE3Z8BmYBoM7aviO/MLjscGLup/D7Aa1rnS0vmZm x/B1KVa4lzQoG2VEaLVWXJFH8aZZMgWQXLb3tyVbYfTE5WoR5VVMaDH6laUb9XVtioKm PNm2IKkJnq4hj+rRF0zBO8UQl/+Dg7Rqolt/eRCFw5eUJXBEKd2zJPTUzVdOfK52csHD vtqSMRwVqGyPL08YMkrk9Lkm1teOQU7ltoTQaQ7HCq1YNG0a4b6WzNj5Tkd3ovSC6FwO XJ9A== X-Gm-Message-State: AOUpUlFJAkVgfiISZX8WDf42oXBORSAtcBuje7rp3oDmYPcJOFsG4S/7 Ij0lv7VQbxv/XjW9T65MlWGBeg== X-Google-Smtp-Source: AAOMgpfu0Lw5NkWDZj6dJ1fFj7cqX/22aH9ssjtSe45Ig27L+96dC3ozQSskuUQDPFIr/Un26xdKlA== X-Received: by 2002:a1c:ec1b:: with SMTP id k27-v6mr4003646wmh.157.1533283082612; Fri, 03 Aug 2018 00:58:02 -0700 (PDT) Received: from localhost.localdomain.it (host57-224-static.7-79-b.business.telecomitalia.it. [79.7.224.57]) by smtp.gmail.com with ESMTPSA id 71-v6sm5750973wmq.17.2018.08.03.00.58.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 00:58:01 -0700 (PDT) From: Diego Rondini To: Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v3] ARM: dts: sun8i: Add initial Orangepi Zero Plus 2 H3 support Date: Fri, 3 Aug 2018 09:56:25 +0200 Message-Id: <20180803075625.13289-1-diego.rondini@kynetics.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730115223.14161-1-diego.rondini@kynetics.com> References: <20180730115223.14161-1-diego.rondini@kynetics.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180803_005815_014104_A8EA2048 X-CRM114-Status: GOOD ( 25.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Diego Rondini MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Orangepi Zero Plus 2 is an open-source single-board computer, available in two Allwinner SOC variants, H3 and H5. We add support for H3 variant here, as the H5 is already supported by sun50i-h5-orangepi-zero-plus2.dts. H3 Orangepi Zero Plus 2 has: - Quad-core Cortex-A7 - 512MB DDR3 - microSD slot and 8GB eMMC - Debug TTL UART - HDMI - Wifi + BT - OTG + power supply Signed-off-by: Diego Rondini --- Changes for v3: - removed uart1 node until we have working Bluetooth support Changes for v2: - add "-h3" suffix to compatible name - fix wrong "H5" in the commit message --- arch/arm/boot/dts/Makefile | 1 + .../boot/dts/sun8i-h3-orangepi-zero-plus2.dts | 140 ++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 37a3de760d40..03fb915f2337 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1024,6 +1024,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h3-orangepi-pc-plus.dtb \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ + sun8i-h3-orangepi-zero-plus2.dtb \ sun8i-r16-bananapi-m2m.dtb \ sun8i-r16-nintendo-nes-classic.dtb \ sun8i-r16-nintendo-super-nes-classic.dtb \ diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts new file mode 100644 index 000000000000..c834048c325e --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2017 Jagan Teki + * Copyright (C) 2018 Diego Rondini + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; + +#include "sun8i-h3.dtsi" + +#include + +/ { + model = "OrangePi Zero Plus2 H3"; + compatible = "xunlong,orangepi-zero-plus2-h3", "allwinner,sun8i-h3"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + connector { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; +}; + +&de { + status = "okay"; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>; + interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +};