From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932564AbcFAR67 (ORCPT ); Wed, 1 Jun 2016 13:58:59 -0400 Received: from down.free-electrons.com ([37.187.137.238]:49901 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751130AbcFAR65 (ORCPT ); Wed, 1 Jun 2016 13:58:57 -0400 Date: Wed, 1 Jun 2016 19:58:54 +0200 From: Maxime Ripard To: luoyi Cc: Bernhard Nortmann , linux@arm.linux.org.uk, Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board Message-ID: <20160601175854.GZ4908@lukather> References: <20160530123013.11575-1-luoyi.ly@gmail.com> <20160530194340.GE4908@lukather> <574CA1ED.8050007@web.de> <20160531170957.GM4908@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OesXTvlsfeLEOFyS" Content-Disposition: inline In-Reply-To: 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 --OesXTvlsfeLEOFyS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Jun 01, 2016 at 10:40:18AM +0800, luoyi wrote: > This is the new version of the patch. and I think maybe every board > should have their own dtb files. and we can you some cpp macro tricks > to merge their coressponding dts file. Please submit it as a new patch with send-email, with the version (using the -v option) and a log of your changes. >=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..548ed31 > --- /dev/null > +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts > @@ -0,0 +1,266 @@ > +/* > + * Copyright 2016 Luo Yi > + * > + * 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>; > + > + green { > + label =3D "bananapi:green:usr"; > + gpios =3D <&pio 7 24 GPIO_ACTIVE_HIGH>; > + }; > + > + red { > + label =3D "bananapi:red:usr"; > + gpios =3D <&pio 7 25 GPIO_ACTIVE_HIGH>; > + linux,default-trigger =3D "default-on"; > + }; > + > + }; > + > + mmc3_pwrseq: mmc3_pwrseq { > + compatible =3D "mmc-pwrseq-simple"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc3_pwrseq_pin_bananapim1plus>; > + reset-gpios =3D <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */ > + }; > + > + 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>; > + }; > + > +}; > + > +&ahci { > + status =3D "okay"; > +}; > + > +&codec { > + status =3D "okay"; > +}; > + > +&ehci0 { > + status =3D "okay"; > +}; > + > +&ehci1 { > + status =3D "okay"; > +}; > + > +&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 <®_vcc3v3>; > + mmc-pwrseq =3D <&mmc3_pwrseq>; > + 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>; > + interrupt-names =3D "host-wake"; > + }; > + > +}; > + > +&mmc3_pins_a { > + /* AP6210 requires pull-up */ > + allwinner,pull =3D ; > +}; > + > +&ohci0 { > + status =3D "okay"; > +}; > + > +&ohci1 { > + status =3D "okay"; > +}; > + > +&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 ; > + }; > + > + mmc3_pwrseq_pin_bananapim1plus: mmc3_pwrseq_pin@0 { > + allwinner,pins =3D "PH22"; > + allwinner,function =3D "gpio_out"; > + 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 ; > + }; > + > +}; > + > +®_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"; > +}; Please include the bananapro dts to not duplicate all the common parts. Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --OesXTvlsfeLEOFyS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXTyJeAAoJEBx+YmzsjxAgXYEQALwb0EV0FJPHlnoIJAsr+tT8 j7TgB+Cf+ixTxaZiq4coPgyBLDmZTz4pJXgvRORkiguOg3dS0JyPSzYo/20nCXPp ES7cNFR1hzsmtRhp4SbZ9ON6Avb1svahz65aD9hssoYV5jS/EoxWVtmDccvXK8nA Su2EmnA1Lt2EohCZhztpWoWgOi1pmYvcRTeY0f7+yy4WEM6k3dF00O3IPAQ3HRmz gIBJloEd3ky6Z4pZ2WtvmcBNoyoyweJSK+WexNE05IKrXS5lWaYAnIL8rB/l/RQO OGXt9tyqu7es8vK9bb9fHsLbKKiJmbTJ6WvTHmVm1JYMeR9741nfug+asm/eeb3z R2M6vb9wlDdEH1SKPL+VtI+UOTc0PH39+E6WUxTZKha7YzAEX24LbvfRwvhlf9JY rqlUg9y1E4lVSvilOgRmuT9SzJywKGYWNyq6n+FV0D2N48JmLejN3qdfjpR7cwss tzyqyrj7jlraMLBwXCcO3DfR1db3ELY4AxY9kH59x2GOGfU1fxPJ55X8L/VUjprM GeUIY/5nnbBcP1iwhaM7geThWmTME77wPJhSVEGT5v/fEtifwVlagqXQbBnx24aZ 9DA5fKv0B/B4fGmC6TDuClJj4ny6If2+fG/ogMbygafZjjQl9RPTi8WdntlXLzns hZ9rnVYW8jw8hoepGUcL =Szye -----END PGP SIGNATURE----- --OesXTvlsfeLEOFyS--