From patchwork Tue Mar 12 15:22:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10849445 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 C31941575 for ; Tue, 12 Mar 2019 15:42:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9DDC29837 for ; Tue, 12 Mar 2019 15:42:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A668F297E0; Tue, 12 Mar 2019 15:42:08 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 2C39929867 for ; Tue, 12 Mar 2019 15:42:08 +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=8oAc7Ls9SVErWXFMZfLB6H3J+lb33mGL32kbC5u7vDs=; b=vAtKdNvLGr0l+zO4nygyf1rmjj 6dT/PgW7bfOAs2DewjmEizo7ENSvp0c2n/Ud6xdtG/8aknaw0KN8dOi4pDNJAxkaU89xIw/J/VprP e9RksuuVFcdcuCsvyXm64dCo54qD4+Z208oTboNAZupgOGD6FhmFET6qspsTW9eNKEQ0XsnSvL1l2 lPXhn1IuvIt6te0fkJxzhy+4qwQWSIfEIvDV1/4jyPDTTFIYMqykXNpadaXQ88bWf6N/uvR6lBhG4 eoHGKfkSHEJ0GsMFxza9x/RtdwxlwwXX7VjzsV92l8JojrqeocS1AVsERBHD9JAGq2Fee2hU15uXy zAtkLPQQ==; 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 1h3jXa-0004W3-Kv; Tue, 12 Mar 2019 15:42:06 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3jXZ-00041k-6c for linux-arm-kernel@bombadil.infradead.org; Tue, 12 Mar 2019 15:42:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oGQGza235bwTARDzhJjCjfhIYEoOroPIlF5asqurA+k=; b=HngTrXB5xriR3zjoFrgXHbLTh W3ADNdbFsj5hbIPBj9Tcz/M/EVsbx349pI/TTyw2rXXoZYg0ITtkwabyNbGj++to7lLpPsx/71tTZ 4K62f2MujN7LhqT8kDzkIlOQCRLm1aySFNaS2TKF55pnt7n9LJl6fPdFVnzSEp0xkQAR/GJ9ShOj5 4D0v9lOwEio56zYDWrVzhTMpltSzvwr18yRvi+r/+XKI2SjvK7n9JVyNPOAKPuWUJjDuqwjXFSUOF qD1W2sBHUu4Rwkwdur61sQnUzu1Jb8aUF5zTfR240IpNyYu4JKlod8gtulxQ1JBm1I0Y0HFUwABk3 d9ODwoT0Q==; Received: from haggis.mythic-beasts.com ([2a00:1098:0:86:1000:0:2:1]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3jIq-0006AN-VY for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2019 15:26:54 +0000 Received: from [199.195.250.187] (port=59368 helo=hermes.aosc.io) by haggis.mythic-beasts.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1h3jIn-0002Ve-3x; Tue, 12 Mar 2019 15:26:49 +0000 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 6517A15FCC9; Tue, 12 Mar 2019 15:26:40 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Jagan Teki Subject: [PATCH 14/14] ARM: dts: sun8i: s3l: add support for Pine64 Single Cube Computer Date: Tue, 12 Mar 2019 23:22:56 +0800 Message-Id: <20190312152256.35574-15-icenowy@aosc.io> In-Reply-To: <20190312152256.35574-1-icenowy@aosc.io> References: <20190312152256.35574-1-icenowy@aosc.io> X-BlackCat-Spam-Score: 24 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190312_152653_079230_7A644570 X-CRM114-Status: GOOD ( 19.04 ) 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-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-sunxi@googlegroups.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 The Single Cube Computer kit by Pine64 is a development kit with Allwinner S3L SoC. It comes with a main board, an expansion board and a camera. The main board features a Micro-USB power-only jack, a USB Type-A port, an Ethernet port connected to the internal PHY of the SoC. A RGB LED port is reserved on the board. The expansion board features a TF slot, a microphone and a speaker connector with on-board amplifier. Add support for the kit, with features on the main board and the expansion board now. Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/Makefile | 1 + .../dts/sun8i-s3l-single-cube-computer.dts | 166 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-s3l-single-cube-computer.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f4f5aeaf3298..a77d1a000953 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1096,6 +1096,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-r16-nintendo-super-nes-classic.dtb \ sun8i-r16-parrot.dtb \ sun8i-r40-bananapi-m2-ultra.dtb \ + sun8i-s3l-single-cube-computer.dtb \ sun8i-t3-cqa3t-bv3.dtb \ sun8i-v3s-licheepi-zero.dtb \ sun8i-v3s-licheepi-zero-dock.dtb \ diff --git a/arch/arm/boot/dts/sun8i-s3l-single-cube-computer.dts b/arch/arm/boot/dts/sun8i-s3l-single-cube-computer.dts new file mode 100644 index 000000000000..a014de597c8a --- /dev/null +++ b/arch/arm/boot/dts/sun8i-s3l-single-cube-computer.dts @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2019 Icenowy Zheng + */ + +/dts-v1/; +#include "sun8i-s3l.dtsi" +#include + +/ { + model = "Pine64 Single Cube Computer"; + compatible = "pine64,single-cube-computer", "allwinner,sun8i-s3l"; + + aliases { + serial0 = &uart2; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led1 { + label = "pine64:green:led1"; + gpios = <&pio 1 11 GPIO_ACTIVE_LOW>; /* PB11 */ + }; + + led2 { + label = "pine64:green:led2"; + gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */ + }; + + led3 { + label = "pine64:green:led3"; + gpios = <&pio 1 12 GPIO_ACTIVE_LOW>; /* PB12 */ + }; + + led4 { + label = "pine64:green:led4"; + gpios = <&pio 1 13 GPIO_ACTIVE_LOW>; /* PB13 */ + }; + }; + + reg_vcc5v0: vcc5v0 { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + reg_vcc_wifi: vcc-wifi { + compatible = "regulator-fixed"; + regulator-name = "vcc-wifi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 WIFI-EN */ + vin-supply = <®_dcdc3>; + startup-delay-us = <200000>; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&pio 1 3 GPIO_ACTIVE_LOW>; /* PB3 WIFI-RST */ + post-power-on-delay-ms = <200>; + }; +}; + +&emac { + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; + status = "okay"; +}; + +&i2c0 { + status = "okay"; + + axp209: pmic@34 { + compatible = "x-powers,axp203", + "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&gic>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + }; +}; + +&mmc0 { + vmmc-supply = <®_dcdc3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <®_vcc_wifi>; + vqmmc-supply = <®_dcdc3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&pio { + vcc-pd-supply = <®_dcdc3>; + vcc-pe-supply = <®_ldo3>; +}; + +#include "axp209.dtsi" + +&ac_power_supply { + status = "okay"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + regulator-name = "vdd-sys-cpu-ephy"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +®_ldo3 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "vcc-pe"; +}; + +®_ldo4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avdd-mipi"; +}; + +&uart2 { + status = "okay"; +}; + +&usb_otg { + dr_mode = "host"; + status = "okay"; +}; + +&usbphy { + usb0_vbus-supply = <®_vcc5v0>; + status = "okay"; +};