From patchwork Mon Jul 30 11:52:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Rondini X-Patchwork-Id: 10548973 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 969EE13B8 for ; Mon, 30 Jul 2018 11:53:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8508B29A1B for ; Mon, 30 Jul 2018 11:53:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78E2E29B1E; Mon, 30 Jul 2018 11:53:43 +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 BF89B29A1B for ; Mon, 30 Jul 2018 11:53:42 +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=ErfJsd8aNYdfT14GX2nfTi4nSGxt1BpV2OAwSWNqz4Q=; b=KB9QqhWssBuq2X6ppn4bmxCOHQ ufKrdvHoNz0E00t7CtoePm+5GTCDuSkgF9gc3rMlIx1/lAmFYuT05dqVXRXs5AQ4b8kh2QzrqLtM/ mNpQ4jQBT9dz9zXIlnQrK7fBJgeCM6gFlYgFGMJO+h86v16iJB9l6F+4Mp0Ci8/EI3TB7J+AI4+PR 44n+n9/6HfGtG6ulKeaO/GuDgvwTr0sOiIt2+YJm1ECJ4XM6eBVQGUQORA8xOFhxjHffE2pbl/mAW 4SE/pWszXW6icz3BXReIxSPS6De2H+NrL63bv/BcXUs1bYTN1+AV/2Ear35fdFZ2jnYcCN6ckci7C OFf/gJtA==; 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 1fk6k7-0002Go-Vg; Mon, 30 Jul 2018 11:53:39 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fk6jr-0002Ev-9X for linux-arm-kernel@lists.infradead.org; Mon, 30 Jul 2018 11:53:24 +0000 Received: by mail-wr1-x444.google.com with SMTP id e7-v6so12551823wrs.9 for ; Mon, 30 Jul 2018 04:53:13 -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=ePSad14ErFT1RopEf8XCBP5pt12XwoD56B2u25eMSPk=; b=hXJjfrUIGize5hVsRUolLMfJwquXS57thsX8SdEeCyKBYq63KuL1EwjnRyjp6ffk4x DdUtFKbGdwoHsLgni8Avf8IEz+AqwTVBfbHxGJ3sTueAI3vOk6OrF/5ET0Cz6kQLHwBD uQuMn0EXdd1Qihc2MEPr9kW/qvPTgWHNfe3r0dMcR15tSBY68Kb3HRkptbCBiotQ4bW/ Z8Y3BlVq1hMd78ASUcml7MF8w8/qLlj+4e5PsMvEtvBW+D+s8m2zJsAMzM65xX/xhzeY 8vnXOFqNIdoRmJceXlAthPRhp3jFIhAyPUFqTwwecpDr08aX098IXUL85z8r5KcdA2Vp 1eKg== 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=ePSad14ErFT1RopEf8XCBP5pt12XwoD56B2u25eMSPk=; b=hnmj0tos+yyeTbSMvabz6A2G9dC+1Yog2Sv7LO+YQElm1IedmOhckie0CEnRfNjX0H OokeRR5sEK8wJIHKpq61HR46uMZqDL76wXnFA4+pgwF/ou0uvAUfBrASkBV2Mo223sSO ynoWTGifht7U75PvG5Dy6wvTDHrDWIOhLtPPn/aAEGUWgtuotZ1kzJ7aiGO8HK+Ai5Rd IVLK0tGoQ+eFOaDDzYxsNgtF0lZrfa8ngZeLAj9/JpF25kNukQt7E8Qp/Ad5yNC7/qyu OzzONwfG9i6vV+qn+Yrw3HXyakcQNQfonIqNKHZgdBkOKcyFT/tFsakNQxgruv5Iv6ec TGNQ== X-Gm-Message-State: AOUpUlHSEgHLwmUMG7xhqm/JdgBgCSQE8s65WkjgL2SE69PLAfyhYTen F7bMoktjYR3plvUWCHsJFHrON7E6mx9jvA== X-Google-Smtp-Source: AAOMgpdVlgZgV9cVkiNbOCjiYbisVafqKsCcKLdIzMZbeyOBkdH6h64ASeyaOjD4EDmHgZ1q6V6XkQ== X-Received: by 2002:adf:9996:: with SMTP id y22-v6mr18343803wrb.69.1532951591644; Mon, 30 Jul 2018 04:53:11 -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 68-v6sm15568130wmi.31.2018.07.30.04.53.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 04:53:10 -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 v2] ARM: dts: sun8i: Add initial Orangepi Zero Plus 2 H3 support Date: Mon, 30 Jul 2018 13:52:23 +0200 Message-Id: <20180730115223.14161-1-diego.rondini@kynetics.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180727125739.22871-1-diego.rondini@kynetics.com> References: <20180727125739.22871-1-diego.rondini@kynetics.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180730_045323_329662_3F6F7AFA X-CRM114-Status: GOOD ( 25.85 ) 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 - micrSD slot and 8GB eMMC - Debug TTL UART - HDMI - Wifi + BT - OTG+power supply Signed-off-by: Diego Rondini --- 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 | 146 ++++++++++++++++++ 2 files changed, 147 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..b18b3a5105ce --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -0,0 +1,146 @@ +/* + * 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"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + status = "okay"; +};