From patchwork Thu Jan 26 19:35:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Code Kipper X-Patchwork-Id: 9539967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A5764601D7 for ; Thu, 26 Jan 2017 19:37:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A02BC281C3 for ; Thu, 26 Jan 2017 19:37:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 948F82833B; Thu, 26 Jan 2017 19:37:25 +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=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 1D6CD281C3 for ; Thu, 26 Jan 2017 19:37:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWprH-00023A-Vr; Thu, 26 Jan 2017 19:37:23 +0000 Received: from mail-lf0-f65.google.com ([209.85.215.65]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWprE-00021x-5t for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2017 19:37:22 +0000 Received: by mail-lf0-f65.google.com with SMTP id x1so24555857lff.0 for ; Thu, 26 Jan 2017 11:36:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AlIZKKO48PHbpCSF/fxL/LCw+As55UtggWD6SgsiQ8o=; b=GLYqKmjQa+adYZv2LerqNNaPOeFV5rvt5o+ojqjfCy6AGr9Uj7iMfdDN3XkrMlPLaj gRc0XaVmBdgBiNAxlx6KfsVjo3m0RDQZ8Lh+g3jUAMNSG7pSuyFqO0ZkRy8Gbg/CXjst 3ycSWu9stozcrIJUVt1th/gbrf5X4flNgZKPGcOAtSsbJkM9UsUdO6y+s7Q0VwBnpD9s Qa7VbPC+AIBSQXL2K2g8le/qy3lGTTFBHMyl/Js6eXbDw0EVdF2Tw0Zqy0Ake1jjeADz cbIrN9C+jKrOMhkPpVJdqYyK3GTwV7iLiyPH4/eFaXgjqEZxSpzEQGW7x5kHbYdQoF1B YJdw== 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; bh=AlIZKKO48PHbpCSF/fxL/LCw+As55UtggWD6SgsiQ8o=; b=tXY8ttgdFLV4OVpGmaXWQg7moCeQILP1AJhXorR/SzxffkJcDsIhxwN/LoCiKl/n9e p9p1WohxJPnC/TrmIvUyegvog8pHEVzZ8OBHzH/1K0i823BrayMmbUGqQJSAqND5SaYa Pb8RPnyMnOis5ZCR/p0lIoP0H1MTXuWXtk133c8kq9sz197z4VzDIE6rO4rLXAZyQTKL D6tXHapVNoiDMYIKLCAhrbqjwGLyDGv1gfgM02zV1Qhx2ToFlf4yyqhIMZaNv3gz4HIy 7MGZi//AIA5cIMPI9x0l9n0OwxGN4Jcx/p8gMovv6bDUT64R5rPYu0v/Kk/BG9s1aIC4 knmQ== X-Gm-Message-State: AIkVDXKPO0U389AVDTR7Hbi5y1F2AUJJmAI8D/QtAtPIwzYo5Ss8AZXWc3GRgq5iDQfkDw== X-Received: by 10.25.23.162 with SMTP id 34mr1327248lfx.174.1485459357433; Thu, 26 Jan 2017 11:35:57 -0800 (PST) Received: from localhost.localdomain (c80-217-9-219.bredband.comhem.se. [80.217.9.219]) by smtp.gmail.com with ESMTPSA id b145sm700393lfg.46.2017.01.26.11.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 11:35:56 -0800 (PST) From: codekipper@gmail.com To: maxime.ripard@free-electrons.com Subject: [linux-sunxi][PATCH v2] ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB Date: Thu, 26 Jan 2017 20:35:55 +0100 Message-Id: <20170126193555.17352-1-codekipper@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170126_113720_523442_5810DD62 X-CRM114-Status: GOOD ( 19.25 ) 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: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Marcus Cooper 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 From: Marcus Cooper The Beelink X2 is an STB based on the Allwinner H3 SoC with a uSD slot, 2 USB ports( 1 * USB-2 Host, 1 USB OTG), a 10/100M ethernet port using the SoC's integrated PHY, Wifi via an sdio wifi chip, HDMI, an IR receiver, a dual colour LED and an optical S/PDIF connector. Signed-off-by: Marcus Cooper --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 136 ++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e82869fdbf60..895974bd2aec 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -860,6 +860,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a83t-cubietruck-plus.dtb \ sun8i-h2-plus-orangepi-zero.dtb \ sun8i-h3-bananapi-m2-plus.dtb \ + sun8i-h3-beelink-x2.dtb \ sun8i-h3-nanopi-m1.dtb \ sun8i-h3-nanopi-neo.dtb \ sun8i-h3-orangepi-2.dtb \ diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts new file mode 100644 index 000000000000..1378e001fa5d --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2017 Marcus Cooper + * + * 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 "sunxi-common-regulators.dtsi" + +#include +#include +#include + +/ { + model = "Beelink X2"; + compatible = "roofull,beelink-x2", "allwinner,sun8i-h3"; + + aliases { + serial0 = &uart0; + /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ + ethernet1 = &sdiowifi; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + blue { + label = "beelink-x2:blue:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ + default-state = "on"; + }; + + red { + label = "beelink-x2:red:standby"; + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PL10 */ + }; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; +}; + +&ehci1 { + status = "okay"; +}; + +&ir { + pinctrl-names = "default"; + pinctrl-0 = <&ir_pins_a>; + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + cd-inverted; + status = "okay"; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; + + /* + * Explicitly define the sdio device, so that we can add an ethernet + * alias for it (which e.g. makes u-boot set a mac-address). + */ + sdiowifi: sdio_wifi@1 { + reg = <1>; + }; +}; + +&ohci1 { + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + /* USB VBUS is on as long as VCC-IO is on */ + status = "okay"; +};