From patchwork Tue Oct 30 22:14:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 10661691 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 214E213A4 for ; Tue, 30 Oct 2018 22:14:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BB1A2A944 for ; Tue, 30 Oct 2018 22:14:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF0A02A8DC; Tue, 30 Oct 2018 22:14:57 +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,RCVD_IN_DNSWL_NONE 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 6CDA82A8DC for ; Tue, 30 Oct 2018 22:14:57 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fYorx1cA9QBrMc0WnJ32s/Y3Z5dlPw1rA7VRypCz6e0=; b=LUPzaN+VeBAzJd t7c2avjjt57evhsw4vzqA0KunU9oIpYi4FMg9Ma1+1q/78+sNBWRWXgEboSXj+dlbIiaMb8sELzyo vqhsynH8lgNynU7esYjZtextn/fgb3Xq71/lSHCbun/xQk2GPjf6G11u0ayZ++PcexjypH2KO9pkP CglcDB6wO9kKuzWyW/Xqa1PDvZDawztaZKce+keboc7P9uErX7bT5HWw5DU2xiTWT3m/mASTIAWNA fZUwHpTidhewEhhGv2AEx1V8CLeE8QpnvdPfeAHdfmZ/S7xPGoLgSVtrUuIvWSPkF35SbBmKy2GSV xzkK4nvdrgx5HFTB3/dg==; 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 1gHcHo-0000gQ-OX; Tue, 30 Oct 2018 22:14:56 +0000 Received: from the.earth.li ([2001:41c8:10:b1f:c0ff:ee:15:900d]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHcHa-0000Pg-MI for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2018 22:14:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JJMEdzBMrNnJ7b5efrEICcCar/n7/EFpp+zoElJCmfo=; b=BJNytPjkFaWXR90inTbzQlrMn/ sALJvLeZzkIfli+C0ixu2XBKq5HwtmAfg1qW6r6KBxP1cgRc7ncpTIjpo2uzWjJ057depX8noYf2j wwL2BqPy6jGGxa1pbqO70tN1UAL/6HYggWjpwJCQvAe76JaghxSHZ/fi3f/1f6wZMYvG5Jg3A/28o CHcxXxtGbDz97ub+WHuCMoMjoWdY/hWVl1YFGA7KcHxQCZDaYfwN4k3QZ/PYzvp+Alpn2iVW/j6/v ayHcwh7/x4Tr/esG3eyTR23FFiaCbR69ckPJww1hI0IqGEchSuSOsoH2GXuUwb9iNHGjaMNrWAO7j NhyFW2jA==; Received: from noodles by the.earth.li with local (Exim 4.89) (envelope-from ) id 1gHcHO-0005Qh-SR; Tue, 30 Oct 2018 22:14:30 +0000 Date: Tue, 30 Oct 2018 22:14:30 +0000 From: Jonathan McDowell To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai Subject: [PATCHv2] ARM: dts: sun8i-h3: Add dts for the Mapleboard MP130 Message-ID: <20181030221430.wu5cxicyf4ub2boa@earth.li> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181030_151443_171157_34DB7A72 X-CRM114-Status: GOOD ( 15.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: , 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 The Mapleboard MP130 is a single board computer based on the Allwinner H3 SoC, with all schematics freely available. The Lite version includes 1GB main memory and 8GB eMMC. https://www.mapleboard.org/en (still mostly in Chinese even when English is selected) This DTS is based upon the DTS shipped with the board which uses mapleboard,mp130- prefixes instead of the allwinner,sun8i variants. v2: Fold in review comments from Maxime Ripard Signed-off-by: Jonathan McDowell --- arch/arm/boot/dts/Makefile | 1 + .../boot/dts/sun8i-h3-mapleboard-mp130.dts | 174 ++++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-h3-mapleboard-mp130.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index b5bd3de87c33..dcf1b9e7f71e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1035,6 +1035,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h3-bananapi-m2-plus.dtb \ sun8i-h3-beelink-x2.dtb \ sun8i-h3-libretech-all-h3-cc.dtb \ + sun8i-h3-mapleboard-mp130.dtb \ sun8i-h3-nanopi-m1.dtb \ sun8i-h3-nanopi-m1-plus.dtb \ sun8i-h3-nanopi-neo.dtb \ diff --git a/arch/arm/boot/dts/sun8i-h3-mapleboard-mp130.dts b/arch/arm/boot/dts/sun8i-h3-mapleboard-mp130.dts new file mode 100644 index 000000000000..13ad55be4454 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h3-mapleboard-mp130.dts @@ -0,0 +1,174 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2017 Centrum Embedded Systems, Jia-Bin Huang + * Copyright (C) 2018 Jonathan McDowell + */ + +/dts-v1/; +#include "sun8i-h3.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include +#include + +/ { + model = "MapleBoard MP130"; + compatible = "mapleboard,mp130", "allwinner,sun8i-h3"; + + aliases { + ethernet0 = &emac; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + + pwr_led { + label = "mp130:orange:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + status_led { + label = "mp130:orange:status"; + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; + }; + }; + + r_gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + + power { + label = "mp130:power"; + linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */ + }; + + user { + label = "mp130:user"; + linux,code = ; + gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&codec { + allwinner,audio-routing = + "Line Out", "LINEOUT", + "LINEIN", "Line In"; + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&ehci2 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac { + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; + allwinner,leds-active-low; + status = "okay"; +}; + +&ir { + pinctrl-names = "default"; + pinctrl-0 = <&ir_pins_a>; + status = "okay"; +}; + +&mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + cd-inverted; + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&ohci2 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&pio { + leds_pio: led_pins { + pins = "PA15"; + function = "gpio_out"; + }; +}; + +&r_pio { + leds_r_pio: led_pins { + pins = "PL10"; + function = "gpio_out"; + }; + + sw_r_pio: key_pins { + pins = "PL3", "PL4"; + function = "gpio_in"; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "disabled"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "disabled"; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; + status = "disabled"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + /* USB VBUS is always on */ + status = "okay"; +};