From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161870AbcE3Tnp (ORCPT ); Mon, 30 May 2016 15:43:45 -0400 Received: from down.free-electrons.com ([37.187.137.238]:49199 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933361AbcE3Tno (ORCPT ); Mon, 30 May 2016 15:43:44 -0400 Date: Mon, 30 May 2016 21:43:40 +0200 From: Maxime Ripard To: luoyi.ly@gmail.com Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux@arm.linux.org.uk, wens@csie.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board Message-ID: <20160530194340.GE4908@lukather> References: <20160530123013.11575-1-luoyi.ly@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5Mfx4RzfBqgnTE/w" Content-Disposition: inline In-Reply-To: <20160530123013.11575-1-luoyi.ly@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5Mfx4RzfBqgnTE/w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi.ly@gmail.com wrote: > From: luoyi >=20 > Add support for the Bananapi M1 Plus A20 development board from sinovoip.= com.cn . > This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle f= or > OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir rece= iver, > 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sd= io wifi. What is the difference between the M1+ and the M1? >=20 > Signed-off-by: Luo Yi > --- > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 +++++++++++++++++= ++++++ > 2 files changed, 271 insertions(+) > create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts >=20 > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index e06a5ab..fde407f 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) +=3D \ > sun6i-a31s-yones-toptech-bs1078-v2.dtb > dtb-$(CONFIG_MACH_SUN7I) +=3D \ > sun7i-a20-bananapi.dtb \ > + sun7i-a20-bananapi-m1-plus.dtb \ > sun7i-a20-bananapro.dtb \ > sun7i-a20-cubieboard2.dtb \ > sun7i-a20-cubietruck.dtb \ > diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/= boot/dts/sun7i-a20-bananapi-m1-plus.dts > new file mode 100644 > index 0000000..b62fc1d > --- /dev/null > +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts > @@ -0,0 +1,270 @@ > +/* > + * Copyright 2016 Luo Yi > + *=20 > + * Thanks to the original work by Hans de Goede > + * > + * 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 "sun7i-a20.dtsi" > +#include "sunxi-common-regulators.dtsi" > +#include > +#include > + > +/ { > + model =3D "Banana Pi BPI-M1-Plus"; > + compatible =3D "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20"; > + > + aliases { > + serial0 =3D &uart0; > + }; > + > + chosen { > + stdout-path =3D "serial0:115200n8"; > + }; > + > + leds { > + compatible =3D "gpio-leds"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&led_pins_bananapi>; > + > + red { > + label =3D "bananapi:red:usr"; The first part the label is the board name, in that case that would be bananapi-m1-plus. > + gpios =3D <&pio 7 25 GPIO_ACTIVE_HIGH>; > + linux,default-trigger =3D "default-on"; So that's the power led? > + }; > + > + green { > + label =3D "bananapi:green:usr"; > + gpios =3D <&pio 7 24 GPIO_ACTIVE_HIGH>; > + linux,default-trigger =3D "heartbeat"; We don't enforce any trigger by default. > + > + }; > + }; > + > + reg_gmac_3v3: gmac-3v3 { > + compatible =3D "regulator-fixed"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&gmac_power_pin_bananapi>; > + regulator-name =3D "gmac-3v3"; > + regulator-min-microvolt =3D <3300000>; > + regulator-max-microvolt =3D <3300000>; > + startup-delay-us =3D <100000>; > + enable-active-high; > + gpio =3D <&pio 7 23 GPIO_ACTIVE_HIGH>; > + }; > + > + reg_vmmc3: vmmc3 { > + compatible =3D "regulator-fixed"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&vmmc3_pin_bananapi>; > + regulator-name =3D "vmmc3"; > + regulator-min-microvolt =3D <3300000>; > + regulator-max-microvolt =3D <3300000>; > + regulator-always-on; > + regulator-boot-on; > + enable-active-high; > + gpio =3D <&pio 7 22 GPIO_ACTIVE_HIGH>; > + }; You can use reg_vcc3v3 from sunxi-common-regulators.dtsi. > + > +}; > + > +&ahci { > + status =3D "okay"; > +}; > + > +&codec { > + status =3D "okay"; > +}; > + > +&ehci0 { > + status =3D "okay"; > +}; > + > +&ehci1 { > + status =3D "okay"; > +}; > + > +&ohci0 { > + status =3D "okay"; > +}; > + > +&ohci1 { > + status =3D "okay"; > +}; Please order your nodes alphabetically. > + > +&gmac { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&gmac_pins_rgmii_a>; > + phy =3D <&phy1>; > + phy-mode =3D "rgmii"; > + phy-supply =3D <®_gmac_3v3>; > + status =3D "okay"; > + > + phy1: ethernet-phy@1 { > + reg =3D <1>; > + }; > +}; > + > +&i2c0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&i2c0_pins_a>; > + status =3D "okay"; > + > + axp209: pmic@34 { > + compatible =3D "x-powers,axp209"; > + reg =3D <0x34>; > + interrupt-parent =3D <&nmi_intc>; > + interrupts =3D <0 IRQ_TYPE_LEVEL_LOW>; > + > + interrupt-controller; > + #interrupt-cells =3D <1>; > + }; > +}; > + > +&ir0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&ir0_rx_pins_a>; > + status =3D "okay"; > +}; > + > +&mmc0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; > + vmmc-supply =3D <®_vcc3v3>; > + bus-width =3D <4>; > + cd-gpios =3D <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ > + cd-inverted; > + status =3D "okay"; > +}; > + > +&mmc3 { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc3_pins_a>; > + vmmc-supply =3D <®_vmmc3>; > + bus-width =3D <4>; > + non-removable; > + enable-sdio-wakeup; > + status =3D "okay"; > + > + brcmf: bcrmf@1 { > + reg =3D <1>; > + compatible =3D "brcm,bcm4329-fmac"; > + interrupt-parent =3D <&pio>; > + interrupts =3D <7 15 IRQ_TYPE_LEVEL_LOW>;=20 > + interrupt-names =3D "host-wake"; > + }; > + > +}; > + > +&mmc3_pins_a { > + /* AP6210 requires pull-up */ > + allwinner,pull =3D ; > +}; > + > +&pio { > + gmac_power_pin_bananapi: gmac_power_pin@0 { > + allwinner,pins =3D "PH23"; > + allwinner,function =3D "gpio_out"; > + allwinner,drive =3D ; > + allwinner,pull =3D ; > + }; > + > + led_pins_bananapi: led_pins@0 { > + allwinner,pins =3D "PH24", "PG2"; > + allwinner,function =3D "gpio_out"; > + allwinner,drive =3D ; > + allwinner,pull =3D ; > + }; > + > + mmc0_cd_pin_bananapi: mmc0_cd_pin@0 { > + allwinner,pins =3D "PH10"; > + allwinner,function =3D "gpio_in"; > + allwinner,drive =3D ; > + allwinner,pull =3D ; > + }; > + > + usb1_vbus_pin_bananapi: usb1_vbus_pin@0 { > + allwinner,pins =3D "PH0"; > + allwinner,function =3D "gpio_out"; > + allwinner,drive =3D ; > + allwinner,pull =3D ; > + }; > + > + usb2_vbus_pin_bananapi: usb2_vbus_pin@0 { > + allwinner,pins =3D "PH1"; > + allwinner,function =3D "gpio_out"; > + allwinner,drive =3D ; > + allwinner,pull =3D ; > + }; > + > + vmmc3_pin_bananapi: vmmc3_pin@0 { > + allwinner,pins =3D "PH22"; > + allwinner,function =3D "gpio_out"; > + allwinner,drive =3D ; > + allwinner,pull =3D ; > + }; > +}; > + > +®_usb1_vbus { > + pinctrl-0 =3D <&usb1_vbus_pin_bananapi>; > + gpio =3D <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ > + status =3D "okay"; > +}; > + > +®_usb2_vbus { > + pinctrl-0 =3D <&usb2_vbus_pin_bananapi>; > + gpio =3D <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ > + status =3D "okay"; > +}; > + > +&uart0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&uart0_pins_a>; > + status =3D "okay"; > +}; > + > +&usbphy { > + usb1_vbus-supply =3D <®_usb1_vbus>; > + usb2_vbus-supply =3D <®_usb2_vbus>; > + status =3D "okay"; > +}; > --=20 > 2.8.3 > Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --5Mfx4RzfBqgnTE/w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXTJfsAAoJEBx+YmzsjxAguhoQAIB67L8FCM7Qe2KuT7+QkuRa wxLhLgqQRtDyD9Je6wg/6nUhOJbz14laG7MYXB4Jxri9eCeph4AJOKSnbsOnEHit vOQGCyu1PTToZhTPc89IKelERUMCtGDOeZPkjG/bX9Y+wqE/dKESV/g6tp7J6oka j0MmwOx3wfJSkzgZNYlpaEpZh+Zet2GWnQ8v+MUyYYePLh9bQPkM4o7T6cRLNfro 0nbAfQ690xYXLO8d3+Y0B46+LBl7hwvtIjbBEF1hK1VN1o0RVOK5ne7PYWyTaDJ5 nOR36MgS7IYZt6cVqJawIbZY6KtSv2J8V1rjndw3d7vFY4mrwLeQKeyRssRorL/K TftOlPD5oOAi/xZ9cwbowYZaLchQUXgL6bA1OJjpoU0P+qbq/hlQzBr8Cb5QyuAr HBkuC5sx7XmysgcLr4R9zZIzhGYXUv00mMKu0Tkg6jnwWECTIt+0c6nH4p977Q24 4dAmG21sE+kOpj2x5gquL4w95wOdPaxVEl44MExDcepRIROjrs978RCcS9esIoe7 Vx/ny1Q87MNP3cMxILYXR5l6HW0SDbKsFod9kAJ+I4/cYGpvbs1zTrRF7lqVGVbZ dSl4hbu6xm68TWYQ8Dm4+FZvlHRh0jruYSgk9Jg4WdG+rNRPoIlumGW0eRKATtM4 hhjXqxt6h0Y0thuu+BG3 =WsLm -----END PGP SIGNATURE----- --5Mfx4RzfBqgnTE/w--