From patchwork Tue Jul 24 16:36:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10542467 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 AC49B157A for ; Tue, 24 Jul 2018 16:38:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A5F229010 for ; Tue, 24 Jul 2018 16:38:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EAE729018; Tue, 24 Jul 2018 16:38:05 +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 1A75029019 for ; Tue, 24 Jul 2018 16:38:05 +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: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:In-Reply-To: References:List-Owner; bh=BvQZgnacKWOW6uLCUK2PhvrzQTg4OLfk0h1seETM6y4=; b=DV1 pxDhufBudkW8FDC795jn6uliKW76HO43Gz9D16WbF2nV3GIANOlezueB/rBxhWcai7aQh8plxUY0H zgcV4jE/Y6geeQvVcxFv0yte1Rmu10VPrSnsByuu/blitO26g22nZIJJqkpc4pZ3Ooff+MCFagXoX HzR9WzMHwr6tBtvbbA9XRc85t/2HfVnZ0f5dfpPapk0KpOfeY8Hm1pdQvGMOZLZD5xyVXEJa2KUqK 5YP/rdeIqzCwCHLfzrIHKWWntzdn7fGSc2wfDPs/QVEFMEN1vToxvtvoh53Cg/fdogmlasBr7EW/V k08g83ch6mhUNsro+ewTgEPbxORLcEw==; 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 1fi0Jx-0003m0-Pt; Tue, 24 Jul 2018 16:37:57 +0000 Received: from bisque.maple.relay.mailchannels.net ([23.83.214.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fi0Jt-0003jo-U7 for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 16:37:55 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 721CB5C2BF5; Tue, 24 Jul 2018 16:37:41 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.19.194]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 349855C2F77; Tue, 24 Jul 2018 16:37:40 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Tue, 24 Jul 2018 16:37:41 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Abortive-Abortive: 22ceb7a345a41eb8_1532450260817_3403848107 X-MC-Loop-Signature: 1532450260817:1806277068 X-MC-Ingress-Time: 1532450260816 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 4FA8A9F734; Tue, 24 Jul 2018 16:37:29 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai Subject: [PATCH] ARM: dts: sun8i: r40/v40: rewrite BPi M2 Berry DTS to rebase on M2 Ultra Date: Wed, 25 Jul 2018 00:36:55 +0800 Message-Id: <20180724163655.61365-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_093754_133470_E53BCAE6 X-CRM114-Status: GOOD ( 16.59 ) 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-kernel@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 Banana Pi designs the BPi M2 Berry board to be software compatible with BPi M2 Ultra, so it's based on M2 Ultra with some function cuts, including: - 2048MiB DRAM -> 1024MiB (this should be proceed by the bootloader); - dropped a LED; - dropped eMMC; - dropped USB2 and connect USB1 to a 4-port HUB. Thus we can make the M2 Berry device tree based on the M2 Ultra, rather than write one from scratch. Signed-off-by: Icenowy Zheng --- .../boot/dts/sun8i-v40-bananapi-m2-berry.dts | 141 +++--------------- 1 file changed, 24 insertions(+), 117 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts index 35859d8f3267..b740c659e623 100644 --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts @@ -40,143 +40,50 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -/dts-v1/; -#include "sun8i-r40.dtsi" - -#include +#include "sun8i-r40-bananapi-m2-ultra.dts" / { model = "Banana Pi M2 Berry"; compatible = "sinovoip,bpi-m2-berry", "allwinner,sun8i-r40"; - aliases { - serial0 = &uart0; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - leds { - compatible = "gpio-leds"; - - pwr-led { - label = "bananapi:red:pwr"; - gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - - user-led { - label = "bananapi:green:user"; - gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; - }; - }; - - reg_vcc5v0: vcc5v0 { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */ - enable-active-high; - }; - - wifi_pwrseq: wifi_pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */ + /* M2 Berry dropped blue LED due to size */ + /delete-node/ user-led-blue; }; }; &ehci1 { /* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */ - status = "okay"; -}; - -&i2c0 { - status = "okay"; - - axp22x: pmic@68 { - compatible = "x-powers,axp221"; - reg = <0x34>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - }; -}; - -#include "axp22x.dtsi" - -®_aldo3 { - regulator-always-on; - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <3300000>; - regulator-name = "avcc"; -}; - -®_dcdc1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v0"; -}; - -®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1300000>; - regulator-name = "vdd-cpu"; -}; - -®_dcdc3 { - regulator-always-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1300000>; - regulator-name = "vdd-sys"; -}; - -®_dcdc5 { - regulator-always-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vcc-dram"; -}; - -®_dldo1 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-wifi-io"; }; -®_dldo2 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-wifi"; +&ehci2 { + /* + * M2 Berry dropped wiring out USB2, due to all USB port is + * from a hub at USB1. + */ + status = "disabled"; }; -&mmc0 { - vmmc-supply = <®_dcdc1>; - bus-width = <4>; - cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */ - status = "okay"; +&mmc2 { + /* M2 Berry has no eMMC */ + status = "disabled"; }; -&mmc1 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc1_pg_pins>; - vmmc-supply = <®_dldo2>; - vqmmc-supply = <®_dldo1>; - mmc-pwrseq = <&wifi_pwrseq>; - bus-width = <4>; - non-removable; - status = "okay"; +&ohci1 { + /* + * M2 Berry have a Hub connected to the USB1 pins, so no USB1.1 device + * can be directly connected to the USB1 port, thus the OHCI controller + * can be disabled. + */ + status = "disabled"; }; -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; +&ohci2 { + /* See comments at &ehci2 */ + status = "disabled"; }; &usbphy { - usb1_vbus-supply = <®_vcc5v0>; - status = "okay"; + /* See comments at &ehci2 */ + /delete-property/ usb2_vbus-supply; };