ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board
Subsystems (3)
PATCH 1/1 ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
--- 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
arch/arm/boot/dts/Makefile +1 -0
@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ + sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +270 -0
270 lines not on this page · raw message
Signature · 1 line
2.8.3
Hi,
Quoted 6 lines · luoyi.ly at gmail.com
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
What is the difference between the M1+ and the M1?
Quoted 85 lines
Signed-off-by Luo Yi <[email protected]>--- 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.dtsarch/arm/boot/dts/Makefile +1
-0@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ + sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +59
-0@@ -0,0 +1,270 @@ +/* + * Copyright 2016 Luo Yi <[email protected]> + * + * Thanks to the original work by Hans de Goede <[email protected]> + * + * 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 <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + model = "Banana Pi BPI-M1-Plus"; + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20"; + + aliases { + serial0 = &uart0; + }; + + chosen {
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 69
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_bananapi>; + + red { + label = "bananapi:red:usr";
The first part the label is the board name, in that case that would be bananapi-m1-plus.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 71
Quoted 2 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +2
-0+ gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on";
So that's the power led?
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 77
Quoted 6 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +6
-0+ }; + + green { + label = "bananapi:green:usr"; + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat";
We don't enforce any trigger by default.
Quoted 18 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +18
-0+ + }; + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac_power_pin_bananapi>; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; + }; + + reg_vmmc3: vmmc3 { + compatible = "regulator-fixed";
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 105
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ pinctrl-names = "default"; + pinctrl-0 = <&vmmc3_pin_bananapi>; + regulator-name = "vmmc3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; + };
You can use reg_vcc3v3 from sunxi-common-regulators.dtsi.
Quoted 16 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +16
-0+ +}; + +&ahci { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 {
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 131
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +};
Please order your nodes alphabetically.
Quoted 142 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +139
-0+ +&gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_rgmii_a>; + phy = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; + + phy1: ethernet-phy at 1 { + reg = <1>; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + + interrupt-controller; + #interrupt-cells = <1>; + }; +}; + +&ir0 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_rx_pins_a>; + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ + cd-inverted; + status = "okay"; +}; + +&mmc3 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins_a>; + vmmc-supply = <®_vmmc3>; + bus-width = <4>; + non-removable; + enable-sdio-wakeup; + status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; + +}; + +&mmc3_pins_a { + /* AP6210 requires pull-up */ + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; +}; + +&pio { + gmac_power_pin_bananapi: gmac_power_pin at 0 { + allwinner,pins = "PH23"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + led_pins_bananapi: led_pins at 0 { + allwinner,pins = "PH24", "PG2"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + }; + + usb1_vbus_pin_bananapi: usb1_vbus_pin at 0 { + allwinner,pins = "PH0"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + usb2_vbus_pin_bananapi: usb2_vbus_pin at 0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + vmmc3_pin_bananapi: vmmc3_pin at 0 { + allwinner,pins = "PH22"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +}; + +®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_bananapi>; + gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ + status = "okay"; +}; + +®_usb2_vbus { + pinctrl-0 = <&usb2_vbus_pin_bananapi>; + gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +};Signature · 1 line
2.8.3
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160530/da12d889/attachment.sig>
Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
Quoted 10 lines
Hi,
Quoted 6 lines · luoyi.ly at gmail.com
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
What is the difference between the M1+ and the M1?
The M1+ is an updated version of the original Banana Pi. If you're interested
in the details, have a look at http://linux-sunxi.org/Banana_Pi#Variants . "BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which a .dts
already exists. Judging from .fex files, only a single pin assignment seems to
differ between the two (audio_pa_ctrl, PH26 vs. PH15).
Regards, B. Nortmann
A message that is not in the archive (sent off-list or not yet received): 574CA1ED.8050007-S0/[email protected]
bpi m1+'s i2s/spdif pinout is different with the bpi pro .
2016-05-31 4:26 GMT+08:00 Bernhard Nortmann <bernhard.nortmann-S0/[email protected]>:
Quoted 31 lines
Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
Quoted 15 lines
Hi,
Quoted 11 lines · On Mon, May 30, 2016 at 08:30:13PM +0800…
From: luoyi <[email protected]>
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 for
OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.Quoted 2 lines
What is the difference between the M1+ and the M1?
The M1+ is an updated version of the original Banana Pi. If you're interested
in the details, have a look at http://linux-sunxi.org/Banana_Pi#Variants . "BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which a .dts
already exists. Judging from .fex files, only a single pin assignment seems to
differ between the two (audio_pa_ctrl, PH26 vs. PH15).Regards, B. Nortmann
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Quoted 10 lines · Bernhard Nortmann
Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
Quoted 9 lines
Hi,
Quoted 6 lines · luoyi.ly at gmail.com
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
Quoted 8 lines
Quoted 1 line
What is the difference between the M1+ and the M1?
The M1+ is an updated version of the original Banana Pi. If you're interested in the details, have a look at
http://linux-sunxi.org/Banana_Pi#Variants . "BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which a .dts already exists. Judging from .fex files, only a single pin assignment seems to differ between the two (audio_pa_ctrl, PH26 vs. PH15).
Gee, that's confusing :)
I guess we should just include the banana pro DTB and change that pin (and the i2s pins Luo was mentionning).
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160531/eba0f737/attachment.sig>
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.
arch/arm/boot/dts/Makefile +1 -0
@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ + sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \
(quoted diff) +0 -0
b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file mode 100644
index 0000000..548ed31
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +266 -0
266 lines not on this page · raw message
2016-06-01 1:09 GMT+08:00 Maxime Ripard <[email protected]>:
Quoted 31 lines · Bernhard Nortmann
Quoted 10 lines
Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
Quoted 9 lines
Hi,
Quoted 6 lines · luoyi.ly at gmail.com
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
Quoted 8 lines
Quoted 1 line
What is the difference between the M1+ and the M1?
The M1+ is an updated version of the original Banana Pi. If you're interested in the details, have a look at
http://linux-sunxi.org/Banana_Pi#Variants . "BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which a .dts already exists. Judging from .fex files, only a single pin assignment seems to differ between the two (audio_pa_ctrl, PH26 vs. PH15).Gee, that's confusing :)
I guess we should just include the banana pro DTB and change that pin (and the i2s pins Luo was mentionning).
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Hi,
Quoted 3 lines · luoyi
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.
Quoted 276 lines
arch/arm/boot/dts/Makefile +1
-0@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ + sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +256
-0@@ -0,0 +1,266 @@ +/* + * Copyright 2016 Luo Yi <[email protected]> + * + * Thanks to the original work by Hans de Goede <[email protected]> + * + * 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 <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + model = "Banana Pi BPI-M1-Plus"; + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_bananapi>; + + green { + label = "bananapi:green:usr"; + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; + }; + + red { + label = "bananapi:red:usr"; + gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on"; + }; + + }; + + mmc3_pwrseq: mmc3_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pwrseq_pin_bananapim1plus>; + reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */ + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac_power_pin_bananapi>; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; + }; + +}; + +&ahci { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_rgmii_a>; + phy = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; + + phy1: ethernet-phy at 1 { + reg = <1>; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + + interrupt-controller; + #interrupt-cells = <1>; + }; +}; + +&ir0 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_rx_pins_a>; + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ + cd-inverted; + status = "okay"; +}; + +&mmc3 { + + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins_a>; + vmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&mmc3_pwrseq>; + bus-width = <4>; + non-removable; + enable-sdio-wakeup; + status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; + +}; + +&mmc3_pins_a { + /* AP6210 requires pull-up */ + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&pio { + gmac_power_pin_bananapi: gmac_power_pin at 0 { + allwinner,pins = "PH23"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + led_pins_bananapi: led_pins at 0 { + allwinner,pins = "PH24", "PG2"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + }; + + mmc3_pwrseq_pin_bananapim1plus: mmc3_pwrseq_pin at 0 { + allwinner,pins = "PH22"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + usb1_vbus_pin_bananapi: usb1_vbus_pin at 0 { + allwinner,pins = "PH0"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + usb2_vbus_pin_bananapi: usb2_vbus_pin at 0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + +}; + +®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_bananapi>; + gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ + status = "okay"; +}; + +®_usb2_vbus { + pinctrl-0 = <&usb2_vbus_pin_bananapi>; + gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ + status = "okay"; +}; + +&uart0 {
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 266
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +};
Please include the bananapro dts to not duplicate all the common parts.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160601/d214c323/attachment.sig>
Hi,
Quoted 76 lines · luoyi
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.
arch/arm/boot/dts/Makefile +1
-0@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ + sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +53
-0@@ -0,0 +1,266 @@ +/* + * Copyright 2016 Luo Yi <[email protected]> + * + * Thanks to the original work by Hans de Goede <[email protected]> + * + * 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 <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + model = "Banana Pi BPI-M1-Plus"; + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 63
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds {
Extra space at end of line.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 69
Quoted 6 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +6
-0+ compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_bananapi>; + + green { + label = "bananapi:green:usr";
The led labels should use the board name.
Quoted 161 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +161
-0+ gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; + }; + + red { + label = "bananapi:red:usr"; + gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on"; + }; + + }; + + mmc3_pwrseq: mmc3_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pwrseq_pin_bananapim1plus>; + reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */ + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac_power_pin_bananapi>; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; + }; + +}; + +&ahci { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_rgmii_a>; + phy = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; + + phy1: ethernet-phy at 1 { + reg = <1>; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + + interrupt-controller; + #interrupt-cells = <1>; + }; +}; + +&ir0 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_rx_pins_a>; + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ + cd-inverted; + status = "okay"; +}; + +&mmc3 { + + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins_a>; + vmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&mmc3_pwrseq>; + bus-width = <4>; + non-removable; + enable-sdio-wakeup; + status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; + +}; + +&mmc3_pins_a { + /* AP6210 requires pull-up */ + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&pio { + gmac_power_pin_bananapi: gmac_power_pin at 0 { + allwinner,pins = "PH23"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + led_pins_bananapi: led_pins at 0 { + allwinner,pins = "PH24", "PG2"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + }; + + mmc3_pwrseq_pin_bananapim1plus: mmc3_pwrseq_pin at 0 { + allwinner,pins = "PH22"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + usb1_vbus_pin_bananapi: usb1_vbus_pin at 0 { + allwinner,pins = "PH0"; + allwinner,function = "gpio_out";
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 240
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + usb2_vbus_pin_bananapi: usb2_vbus_pin at 0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + };
The schematics say USB1/2 VBUS is always on. No GPIO controls them.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 241
Quoted 1 line
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +1
-0+
Extra line.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 254
Quoted 13 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +13
-0+}; + +®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_bananapi>; + gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ + status = "okay"; +}; + +®_usb2_vbus { + pinctrl-0 = <&usb2_vbus_pin_bananapi>; + gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ + status = "okay"; +};
See above.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 264
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>;
You can leave these out.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 266
Quoted 2 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +2
-0+ status = "okay"; +};
Please send this patch, with the above comments fixed, as v3.
Thanks,
ChenYu
Quoted 32 lines
2016-06-01 1:09 GMT+08:00 Maxime Ripard <[email protected]>:
Quoted 31 lines · Bernhard Nortmann
Quoted 10 lines
Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
Quoted 9 lines
Hi,
Quoted 6 lines · luoyi.ly at gmail.com
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
Quoted 8 lines
Quoted 1 line
What is the difference between the M1+ and the M1?
The M1+ is an updated version of the original Banana Pi. If you're interested in the details, have a look at
http://linux-sunxi.org/Banana_Pi#Variants . "BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which a .dts already exists. Judging from .fex files, only a single pin assignment seems to differ between the two (audio_pa_ctrl, PH26 vs. PH15).Gee, that's confusing :)
I guess we should just include the banana pro DTB and change that pin (and the i2s pins Luo was mentionning).
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Hi,
Quoted 147 lines · Maxime Ripard
Hi,
Quoted 6 lines · luoyi.ly at gmail.com
From: luoyi <[email protected]>
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 for OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver, 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio wifi.
What is the difference between the M1+ and the M1?
Quoted 85 lines
Signed-off-by Luo Yi <[email protected]>--- 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.dtsarch/arm/boot/dts/Makefile +1
-0@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ + sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +59
-0@@ -0,0 +1,270 @@ +/* + * Copyright 2016 Luo Yi <[email protected]> + * + * Thanks to the original work by Hans de Goede <[email protected]> + * + * 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 <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + model = "Banana Pi BPI-M1-Plus"; + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20"; + + aliases { + serial0 = &uart0; + }; + + chosen {arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 69
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_bananapi>; + + red { + label = "bananapi:red:usr";The first part the label is the board name, in that case that would be bananapi-m1-plus.
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 71
Quoted 2 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +2
-0+ gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on";So that's the power led?
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 77
Quoted 6 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +6
-0+ }; + + green { + label = "bananapi:green:usr"; + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat";We don't enforce any trigger by default.
Quoted 22 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +22
-0+ + }; + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac_power_pin_bananapi>; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; + }; + + reg_vmmc3: vmmc3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&vmmc3_pin_bananapi>; + regulator-name = "vmmc3"; + regulator-min-microvolt = <3300000>;
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 105
Quoted 6 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +6
-0+ regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; + };You can use
reg_vcc3v3fromsunxi-common-regulators.dtsi.
This is a GPIO controlled one, not just a fixed regulator.
However, this is a misrepresentation of what is on the board.
PH22 here is connected to the REG_ON pin on the WiFi chip. So either you represent this as a GPIO toggled fixed regulator with a source from reg_vcc3v3, and use this as vmmc on mmc3. Or you use the pwrseq_simple bindings for this.
ChenYu
Quoted 180 lines
Quoted 17 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +16
-0+ +}; + +&ahci { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 {arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 131
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10
-0+ status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +};Please order your nodes alphabetically.
Quoted 140 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +139
-1+ +&gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_rgmii_a>; + phy = <&phy1>; + phy-mode = "rgmii"; + phy-supply = <®_gmac_3v3>; + status = "okay"; + + phy1: ethernet-phy at 1 { + reg = <1>; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + axp209: pmic at 34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + + interrupt-controller; + #interrupt-cells = <1>; + }; +}; + +&ir0 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_rx_pins_a>; + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ + cd-inverted; + status = "okay"; +}; + +&mmc3 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins_a>; + vmmc-supply = <®_vmmc3>; + bus-width = <4>; + non-removable; + enable-sdio-wakeup; + status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; + +}; + +&mmc3_pins_a { + /* AP6210 requires pull-up */ + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; +}; + +&pio { + gmac_power_pin_bananapi: gmac_power_pin at 0 { + allwinner,pins = "PH23"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + led_pins_bananapi: led_pins at 0 { + allwinner,pins = "PH24", "PG2"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + }; + + usb1_vbus_pin_bananapi: usb1_vbus_pin at 0 { + allwinner,pins = "PH0"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + usb2_vbus_pin_bananapi: usb2_vbus_pin at 0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + vmmc3_pin_bananapi: vmmc3_pin at 0 { + allwinner,pins = "PH22"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +}; + +®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_bananapi>; + gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ + status = "okay"; +}; + +®_usb2_vbus { + pinctrl-0 = <&usb2_vbus_pin_bananapi>; + gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +}; --Quoted 2 lines
2.8.3
Thanks!
Maxime--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com