* [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80
@ 2015-10-15 14:28 Hans de Goede
2015-10-15 14:28 ` [PATCH 2/3] ARM: dts: sun6i: Add mmc2_pins_a pinmux setting to sun6i-a31.dtsi Hans de Goede
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Hans de Goede @ 2015-10-15 14:28 UTC (permalink / raw)
To: linux-arm-kernel
When the gpio interrupt bindings where changed to add a bank to the
specifier list, the r_pio nodes of A23/A31/A33 where not updated to
match and neither was the pio node of the A80, this fixes this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/sun6i-a31.dtsi | 2 +-
arch/arm/boot/dts/sun8i-a23-a33.dtsi | 1 +
arch/arm/boot/dts/sun9i-a80.dtsi | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index 98359f3..a97274a8 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -1102,7 +1102,7 @@
resets = <&apb0_rst 0>;
gpio-controller;
interrupt-controller;
- #interrupt-cells = <2>;
+ #interrupt-cells = <3>;
#size-cells = <0>;
#gpio-cells = <3>;
diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index 828aaf5..ddb9890 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -647,6 +647,7 @@
resets = <&apb0_rst 0>;
gpio-controller;
interrupt-controller;
+ #interrupt-cells = <3>;
#address-cells = <1>;
#size-cells = <0>;
#gpio-cells = <3>;
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 5908e3d..1118bf5 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -594,7 +594,7 @@
clocks = <&apb0_gates 5>;
gpio-controller;
interrupt-controller;
- #interrupt-cells = <2>;
+ #interrupt-cells = <3>;
#size-cells = <0>;
#gpio-cells = <3>;
--
2.5.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] ARM: dts: sun6i: Add mmc2_pins_a pinmux setting to sun6i-a31.dtsi
2015-10-15 14:28 [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Hans de Goede
@ 2015-10-15 14:28 ` Hans de Goede
2015-10-15 14:28 ` [PATCH 3/3] ARM: dts: sun6i: Add a dts file for the Sinovoip BPI-M2 board Hans de Goede
2015-10-15 14:38 ` [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Arnd Bergmann
2 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2015-10-15 14:28 UTC (permalink / raw)
To: linux-arm-kernel
Add a pinmux setting for using mmc2 in regular 4 bit mode.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/sun6i-a31.dtsi | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index a97274a8..83c1879 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -691,7 +691,15 @@
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
- mmc2_8bit_emmc_pins: mmc2 at 0 {
+ mmc2_pins_a: mmc2 at 0 {
+ allwinner,pins = "PC6", "PC7", "PC8", "PC9",
+ "PC10", "PC11";
+ allwinner,function = "mmc2";
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
+
+ mmc2_8bit_emmc_pins: mmc2 at 1 {
allwinner,pins = "PC6", "PC7", "PC8", "PC9",
"PC10", "PC11", "PC12",
"PC13", "PC14", "PC15",
--
2.5.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] ARM: dts: sun6i: Add a dts file for the Sinovoip BPI-M2 board
2015-10-15 14:28 [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Hans de Goede
2015-10-15 14:28 ` [PATCH 2/3] ARM: dts: sun6i: Add mmc2_pins_a pinmux setting to sun6i-a31.dtsi Hans de Goede
@ 2015-10-15 14:28 ` Hans de Goede
2015-10-17 16:24 ` Maxime Ripard
2015-10-15 14:38 ` [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Arnd Bergmann
2 siblings, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2015-10-15 14:28 UTC (permalink / raw)
To: linux-arm-kernel
The Sinovoip BPI-M2 is a SBC board based on the A31s SoC it features
1G RAM, a microsd slot, Gbit ethernet, 4 usb-a USB-2 ports, ir receiver,
stereo headphone jack and hdmi video output.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 194 +++++++++++++++++++++++
2 files changed, 195 insertions(+)
create mode 100644 arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 389f30d..46a163d 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -612,6 +612,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
sun6i-a31-m9.dtb \
sun6i-a31-mele-a1000g-quad.dtb \
sun6i-a31s-cs908.dtb \
+ sun6i-a31s-sinovoip-bpi-m2.dtb \
sun6i-a31s-yones-toptech-bs1078-v2.dtb
dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-bananapi.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
new file mode 100644
index 0000000..db7fa13
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
+ *
+ * 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 library 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 library 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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Sinovoip BPI-M2";
+ compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31s";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins_bpi_m2>;
+
+ blue {
+ label = "bpi-m2:blue:usr";
+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+ };
+
+ green {
+ label = "bpi-m2:green:usr";
+ gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
+ };
+
+ red {
+ label = "bpi-m2:red:usr";
+ gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>; /* PG5 */
+ };
+ };
+
+ mmc2_pwrseq: mmc2_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_pwrseq_pin_bpi_m2>;
+ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 WIFI_EN */
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&gmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_bpi_m2>;
+ phy = <&phy1>;
+ phy-mode = "rgmii";
+ snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
+ snps,reset-active-low;
+ snps,reset-delays-us = <0 10000 30000>;
+ status = "okay";
+
+ phy1: ethernet-phy at 1 {
+ reg = <1>;
+ };
+};
+
+&ir {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_pins_a>;
+ status = "okay";
+};
+
+&mmc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bpi_m2>;
+ vmmc-supply = <®_vcc3v0>;
+ bus-width = <4>;
+ cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
+ cd-inverted;
+ status = "okay";
+};
+
+&mmc0_pins_a {
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_pins_a>;
+ vmmc-supply = <®_vcc3v0>;
+ mmc-pwrseq = <&mmc2_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+
+ brcmf: bcrmf at 1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 5 IRQ_TYPE_LEVEL_LOW>; /* PL5 */
+ interrupt-names = "host-wake";
+ };
+};
+
+&mmc2_pins_a {
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&pio {
+ gmac_phy_reset_pin_bpi_m2: gmac_phy_reset_pin at 0 {
+ allwinner,pins = "PA21";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
+ led_pins_bpi_m2: led_pins at 0 {
+ allwinner,pins = "PG5", "PG10", "PG11";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
+ mmc0_cd_pin_bpi_m2: mmc0_cd_pin at 0 {
+ allwinner,pins = "PA4";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
+};
+
+&r_pio {
+ mmc2_pwrseq_pin_bpi_m2: mmc2_pwrseq_pin at 0 {
+ allwinner,pins = "PL8";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
--
2.5.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80
2015-10-15 14:28 [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Hans de Goede
2015-10-15 14:28 ` [PATCH 2/3] ARM: dts: sun6i: Add mmc2_pins_a pinmux setting to sun6i-a31.dtsi Hans de Goede
2015-10-15 14:28 ` [PATCH 3/3] ARM: dts: sun6i: Add a dts file for the Sinovoip BPI-M2 board Hans de Goede
@ 2015-10-15 14:38 ` Arnd Bergmann
2015-10-15 14:55 ` [linux-sunxi] " Hans de Goede
2 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2015-10-15 14:38 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 15 October 2015 16:28:45 Hans de Goede wrote:
> When the gpio interrupt bindings where changed to add a bank to the
> specifier list, the r_pio nodes of A23/A31/A33 where not updated to
> match and neither was the pio node of the A80, this fixes this.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
Is this safe to apply by itself? I don't see any interrupts references
to these nodes, so I assume it's fine, but if there are any cross-dependencies
we need more careful planning.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* [linux-sunxi] Re: [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80
2015-10-15 14:38 ` [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Arnd Bergmann
@ 2015-10-15 14:55 ` Hans de Goede
0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2015-10-15 14:55 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 15-10-15 16:38, Arnd Bergmann wrote:
> On Thursday 15 October 2015 16:28:45 Hans de Goede wrote:
>> When the gpio interrupt bindings where changed to add a bank to the
>> specifier list, the r_pio nodes of A23/A31/A33 where not updated to
>> match and neither was the pio node of the A80, this fixes this.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>
>
> Is this safe to apply by itself? I don't see any interrupts references
> to these nodes, so I assume it's fine, but if there are any cross-dependencies
> we need more careful planning.
Should be safe to apply by itself, later patches in this series introduce
the first interrupt users of these nodes, which is what made me notice
the mistake in them.
Regards,
Hans
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] ARM: dts: sun6i: Add a dts file for the Sinovoip BPI-M2 board
2015-10-15 14:28 ` [PATCH 3/3] ARM: dts: sun6i: Add a dts file for the Sinovoip BPI-M2 board Hans de Goede
@ 2015-10-17 16:24 ` Maxime Ripard
0 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2015-10-17 16:24 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 15, 2015 at 04:28:47PM +0200, Hans de Goede wrote:
> The Sinovoip BPI-M2 is a SBC board based on the A31s SoC it features
> 1G RAM, a microsd slot, Gbit ethernet, 4 usb-a USB-2 ports, ir receiver,
> stereo headphone jack and hdmi video output.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied the three patches, thanks!
Maxime
--
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: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151017/838bb770/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-17 16:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 14:28 [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Hans de Goede
2015-10-15 14:28 ` [PATCH 2/3] ARM: dts: sun6i: Add mmc2_pins_a pinmux setting to sun6i-a31.dtsi Hans de Goede
2015-10-15 14:28 ` [PATCH 3/3] ARM: dts: sun6i: Add a dts file for the Sinovoip BPI-M2 board Hans de Goede
2015-10-17 16:24 ` Maxime Ripard
2015-10-15 14:38 ` [PATCH 1/3] ARM: dts: sunxi: Fix interrupt-cells for [r]pio on A23/A31/A33/A80 Arnd Bergmann
2015-10-15 14:55 ` [linux-sunxi] " Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).