From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dt: sun7i: Add Banana Pi board
Date: Thu, 31 Jul 2014 12:29:29 +0200 [thread overview]
Message-ID: <53DA1A89.4000104@redhat.com> (raw)
In-Reply-To: <20140731095800.GA3952@lukather>
Hi,
On 07/31/2014 11:58 AM, Maxime Ripard wrote:
> Hi Hans,
>
> On Tue, Jul 29, 2014 at 07:02:28PM +0200, Hans de Goede wrote:
>> The Banana Pi is an A20 based development board using Raspberry Pi compatible
>> IO headers. It comes with 1 GB RAM, 1 Gb ethernet, 2x USB host, sata, hdmi
>> and stereo audio out + various expenansion headers:
>>
>> http://www.bananapi.org/
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> arch/arm/boot/dts/Makefile | 1 +
>> arch/arm/boot/dts/sun7i-a20-bananapi.dts | 183 +++++++++++++++++++++++++++++++
>> 2 files changed, 184 insertions(+)
>> create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index bdbc84a..440e037 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -379,6 +379,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>> sun6i-a31-hummingbird.dtb \
>> sun6i-a31-m9.dtb
>> dtb-$(CONFIG_MACH_SUN7I) += \
>> + sun7i-a20-bananapi.dtb \
>> sun7i-a20-cubieboard2.dtb \
>> sun7i-a20-cubietruck.dtb \
>> sun7i-a20-i12-tvbox.dtb \
>> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
>> new file mode 100644
>> index 0000000..0332b82
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
>> @@ -0,0 +1,183 @@
>> +/*
>> + * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
>> + *
>> + * The code contained herein is licensed under the GNU General Public
>> + * License. You may obtain a copy of the GNU General Public License
>> + * Version 2 or later at the following locations:
>> + *
>> + * http://www.opensource.org/licenses/gpl-license.html
>> + * http://www.gnu.org/copyleft/gpl.html
>> + */
>> +
>> +/dts-v1/;
>> +/include/ "sun7i-a20.dtsi"
>> +/include/ "sunxi-common-regulators.dtsi"
>> +
>> +/ {
>> + model = "LeMaker Banana Pi";
>> + compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
>> +
>> + soc at 01c00000 {
>> + spi0: spi at 01c05000 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&spi0_pins_a>;
>> + status = "okay";
>> + };
>> +
>> + mmc0: mmc at 01c0f000 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
>> + vmmc-supply = <®_vcc3v3>;
>> + bus-width = <4>;
>> + cd-gpios = <&pio 7 10 0>; /* PH10 */
>> + cd-inverted;
>> + status = "okay";
>> + };
>> +
>> + usbphy: phy at 01c13400 {
>> + usb1_vbus-supply = <®_usb1_vbus>;
>> + usb2_vbus-supply = <®_usb2_vbus>;
>> + status = "okay";
>> + };
>> +
>> + ehci0: usb at 01c14000 {
>> + status = "okay";
>> + };
>> +
>> + ohci0: usb at 01c14400 {
>> + status = "okay";
>> + };
>> +
>> + ahci: sata at 01c18000 {
>> + status = "okay";
>> + };
>> +
>> + ehci1: usb at 01c1c000 {
>> + status = "okay";
>> + };
>> +
>> + ohci1: usb at 01c1c400 {
>> + status = "okay";
>> + };
>> +
>> + pinctrl at 01c20800 {
>> + uart3_pins_bananapi: uart3_pin at 0 {
>> + allwinner,pins = "PH0", "PH1";
>> + allwinner,function = "uart3";
>> + allwinner,drive = <0>;
>> + allwinner,pull = <0>;
>> + };
>
> That node should be in the DTSI
I deliberately put it here because it is non standard, uart3
has 4 pins rx, tx, cts and rts, which can be mapped to either
PG6-9 or PH0-3 but here only 2 are used, it seemed appropriate
to put this inside the dts, if we start also taking pinctrl
variants where a subset of the pins are used into the dtsi
then we will end up with a lot of pinctrl entries there.
Note if you decide to take this as is, please
s/bananapi.org/lemaker.org/ in the commit message, bananapi.org
is an unofficial site, I should have put lemaker.org there.
Note btw that we already have this problem for spi1, the
current spi1_pins_a does not include the cs1 pin, because it
was added for use in sun7i-a20-olinuxino-micro.dts where
only cs0 is hooked up, but I decided to leave that as is for now.
Also the "primary" binding for spi2 is to PORTB, but
our spi2_pins_a binds it to PORTC, so it should be renamed
spi2_pins_b IMHO.
Regards,
Hans
WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH] ARM: dt: sun7i: Add Banana Pi board
Date: Thu, 31 Jul 2014 12:29:29 +0200 [thread overview]
Message-ID: <53DA1A89.4000104@redhat.com> (raw)
In-Reply-To: <20140731095800.GA3952@lukather>
Hi,
On 07/31/2014 11:58 AM, Maxime Ripard wrote:
> Hi Hans,
>
> On Tue, Jul 29, 2014 at 07:02:28PM +0200, Hans de Goede wrote:
>> The Banana Pi is an A20 based development board using Raspberry Pi compatible
>> IO headers. It comes with 1 GB RAM, 1 Gb ethernet, 2x USB host, sata, hdmi
>> and stereo audio out + various expenansion headers:
>>
>> http://www.bananapi.org/
>>
>> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>> arch/arm/boot/dts/Makefile | 1 +
>> arch/arm/boot/dts/sun7i-a20-bananapi.dts | 183 +++++++++++++++++++++++++++++++
>> 2 files changed, 184 insertions(+)
>> create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index bdbc84a..440e037 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -379,6 +379,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>> sun6i-a31-hummingbird.dtb \
>> sun6i-a31-m9.dtb
>> dtb-$(CONFIG_MACH_SUN7I) += \
>> + sun7i-a20-bananapi.dtb \
>> sun7i-a20-cubieboard2.dtb \
>> sun7i-a20-cubietruck.dtb \
>> sun7i-a20-i12-tvbox.dtb \
>> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
>> new file mode 100644
>> index 0000000..0332b82
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
>> @@ -0,0 +1,183 @@
>> +/*
>> + * Copyright 2014 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> + *
>> + * The code contained herein is licensed under the GNU General Public
>> + * License. You may obtain a copy of the GNU General Public License
>> + * Version 2 or later at the following locations:
>> + *
>> + * http://www.opensource.org/licenses/gpl-license.html
>> + * http://www.gnu.org/copyleft/gpl.html
>> + */
>> +
>> +/dts-v1/;
>> +/include/ "sun7i-a20.dtsi"
>> +/include/ "sunxi-common-regulators.dtsi"
>> +
>> +/ {
>> + model = "LeMaker Banana Pi";
>> + compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
>> +
>> + soc@01c00000 {
>> + spi0: spi@01c05000 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&spi0_pins_a>;
>> + status = "okay";
>> + };
>> +
>> + mmc0: mmc@01c0f000 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
>> + vmmc-supply = <®_vcc3v3>;
>> + bus-width = <4>;
>> + cd-gpios = <&pio 7 10 0>; /* PH10 */
>> + cd-inverted;
>> + status = "okay";
>> + };
>> +
>> + usbphy: phy@01c13400 {
>> + usb1_vbus-supply = <®_usb1_vbus>;
>> + usb2_vbus-supply = <®_usb2_vbus>;
>> + status = "okay";
>> + };
>> +
>> + ehci0: usb@01c14000 {
>> + status = "okay";
>> + };
>> +
>> + ohci0: usb@01c14400 {
>> + status = "okay";
>> + };
>> +
>> + ahci: sata@01c18000 {
>> + status = "okay";
>> + };
>> +
>> + ehci1: usb@01c1c000 {
>> + status = "okay";
>> + };
>> +
>> + ohci1: usb@01c1c400 {
>> + status = "okay";
>> + };
>> +
>> + pinctrl@01c20800 {
>> + uart3_pins_bananapi: uart3_pin@0 {
>> + allwinner,pins = "PH0", "PH1";
>> + allwinner,function = "uart3";
>> + allwinner,drive = <0>;
>> + allwinner,pull = <0>;
>> + };
>
> That node should be in the DTSI
I deliberately put it here because it is non standard, uart3
has 4 pins rx, tx, cts and rts, which can be mapped to either
PG6-9 or PH0-3 but here only 2 are used, it seemed appropriate
to put this inside the dts, if we start also taking pinctrl
variants where a subset of the pins are used into the dtsi
then we will end up with a lot of pinctrl entries there.
Note if you decide to take this as is, please
s/bananapi.org/lemaker.org/ in the commit message, bananapi.org
is an unofficial site, I should have put lemaker.org there.
Note btw that we already have this problem for spi1, the
current spi1_pins_a does not include the cs1 pin, because it
was added for use in sun7i-a20-olinuxino-micro.dts where
only cs0 is hooked up, but I decided to leave that as is for now.
Also the "primary" binding for spi2 is to PORTB, but
our spi2_pins_a binds it to PORTC, so it should be renamed
spi2_pins_b IMHO.
Regards,
Hans
next prev parent reply other threads:[~2014-07-31 10:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 17:02 [PATCH] ARM: dt: sun7i: Add Banana Pi board Hans de Goede
2014-07-29 17:02 ` Hans de Goede
2014-07-31 9:58 ` Maxime Ripard
2014-07-31 9:58 ` Maxime Ripard
2014-07-31 10:29 ` Hans de Goede [this message]
2014-07-31 10:29 ` Hans de Goede
2014-07-31 16:52 ` Maxime Ripard
2014-07-31 16:52 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DA1A89.4000104@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.