* [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2
@ 2014-05-03 18:35 Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 1/5] ARM: Kirkwood: Add board file for netxbig LEDs Andrew Lunn
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:35 UTC (permalink / raw)
To: linux-arm-kernel
v2:
Fix Memory size
Make Ethernet nodes simpler.
Andrew Lunn (5):
ARM: Kirkwood: Add board file for netxbig LEDs
ARM: Kirkwood: Add DT descriptions for net2big and net5big.
ARM: Kirkwood: Document net[25x]big compatible strings
ARM: mvebu: Add LaCie 2Big and 5Big Network v2
ARM: multi_v5: Enable LaCie 2Big and 5Big Network v2
.../devicetree/bindings/arm/marvell,kirkwood.txt | 3 +
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/kirkwood-net2big.dts | 30 ++++
arch/arm/boot/dts/kirkwood-net5big.dts | 83 +++++++++
arch/arm/boot/dts/kirkwood-netxbig.dtsi | 171 ++++++++++++++++++
arch/arm/configs/multi_v5_defconfig | 1 +
arch/arm/configs/mvebu_v5_defconfig | 1 +
arch/arm/mach-mvebu/Kconfig | 7 +
arch/arm/mach-mvebu/Makefile | 1 +
arch/arm/mach-mvebu/board-netxbig.c | 191 +++++++++++++++++++++
arch/arm/mach-mvebu/board.h | 6 +
arch/arm/mach-mvebu/kirkwood.c | 3 +
12 files changed, 499 insertions(+)
create mode 100644 arch/arm/boot/dts/kirkwood-net2big.dts
create mode 100644 arch/arm/boot/dts/kirkwood-net5big.dts
create mode 100644 arch/arm/boot/dts/kirkwood-netxbig.dtsi
create mode 100644 arch/arm/mach-mvebu/board-netxbig.c
--
2.0.0.rc0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/5] ARM: Kirkwood: Add board file for netxbig LEDs
2014-05-03 18:35 [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2 Andrew Lunn
@ 2014-05-03 18:35 ` Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big Andrew Lunn
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:35 UTC (permalink / raw)
To: linux-arm-kernel
There is currently no DT binding for the CPLD which controls the LEDs
on the Net 2Big and Net 5Big. So use a platform device.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/mach-mvebu/Kconfig | 7 ++
arch/arm/mach-mvebu/Makefile | 1 +
arch/arm/mach-mvebu/board-netxbig.c | 191 ++++++++++++++++++++++++++++++++++++
arch/arm/mach-mvebu/board.h | 6 ++
arch/arm/mach-mvebu/kirkwood.c | 3 +
5 files changed, 208 insertions(+)
create mode 100644 arch/arm/mach-mvebu/board-netxbig.c
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 3f73eecbcfb0..711ffd4fef85 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -97,6 +97,13 @@ config MACH_KIRKWOOD
Say 'Y' here if you want your kernel to support boards based
on the Marvell Kirkwood device tree.
+config MACH_NETXBIG
+ bool "LaCie 2Big and 5Big Network v2"
+ depends on MACH_KIRKWOOD
+ help
+ Say 'Y' here if you want your kernel to support the
+ LaCie 2Big and 5Big Network v2
+
config MACH_T5325
bool "HP T5325 thin client"
depends on MACH_KIRKWOOD
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index a63e43b6b451..014f32d87ebd 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -10,4 +10,5 @@ obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
+obj-$(CONFIG_MACH_NETXBIG) += board-netxbig.o
obj-$(CONFIG_MACH_T5325) += board-t5325.o
diff --git a/arch/arm/mach-mvebu/board-netxbig.c b/arch/arm/mach-mvebu/board-netxbig.c
new file mode 100644
index 000000000000..e6f2f547b1c7
--- /dev/null
+++ b/arch/arm/mach-mvebu/board-netxbig.c
@@ -0,0 +1,191 @@
+/*
+ * arch/arm/mach-mvbu/board-netxbig.c
+ *
+ * LaCie 2Big and 5Big Network v2 board setup
+ *
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * This program 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 program 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/leds-kirkwood-netxbig.h>
+#include "common.h"
+
+/*****************************************************************************
+ * GPIO extension LEDs
+ ****************************************************************************/
+
+/*
+ * The LEDs are controlled by a CPLD and can be configured through a GPIO
+ * extension bus:
+ *
+ * - address register : bit [0-2] -> GPIO [47-49]
+ * - data register : bit [0-2] -> GPIO [44-46]
+ * - enable register : GPIO 29
+ */
+
+static int netxbig_v2_gpio_ext_addr[] = { 47, 48, 49 };
+static int netxbig_v2_gpio_ext_data[] = { 44, 45, 46 };
+
+static struct netxbig_gpio_ext netxbig_v2_gpio_ext = {
+ .addr = netxbig_v2_gpio_ext_addr,
+ .num_addr = ARRAY_SIZE(netxbig_v2_gpio_ext_addr),
+ .data = netxbig_v2_gpio_ext_data,
+ .num_data = ARRAY_SIZE(netxbig_v2_gpio_ext_data),
+ .enable = 29,
+};
+
+/*
+ * Address register selection:
+ *
+ * addr | register
+ * ----------------------------
+ * 0 | front LED
+ * 1 | front LED brightness
+ * 2 | SATA LED brightness
+ * 3 | SATA0 LED
+ * 4 | SATA1 LED
+ * 5 | SATA2 LED
+ * 6 | SATA3 LED
+ * 7 | SATA4 LED
+ *
+ * Data register configuration:
+ *
+ * data | LED brightness
+ * -------------------------------------------------
+ * 0 | min (off)
+ * - | -
+ * 7 | max
+ *
+ * data | front LED mode
+ * -------------------------------------------------
+ * 0 | fix off
+ * 1 | fix blue on
+ * 2 | fix red on
+ * 3 | blink blue on=1 sec and blue off=1 sec
+ * 4 | blink red on=1 sec and red off=1 sec
+ * 5 | blink blue on=2.5 sec and red on=0.5 sec
+ * 6 | blink blue on=1 sec and red on=1 sec
+ * 7 | blink blue on=0.5 sec and blue off=2.5 sec
+ *
+ * data | SATA LED mode
+ * -------------------------------------------------
+ * 0 | fix off
+ * 1 | SATA activity blink
+ * 2 | fix red on
+ * 3 | blink blue on=1 sec and blue off=1 sec
+ * 4 | blink red on=1 sec and red off=1 sec
+ * 5 | blink blue on=2.5 sec and red on=0.5 sec
+ * 6 | blink blue on=1 sec and red on=1 sec
+ * 7 | fix blue on
+ */
+
+static int netxbig_v2_red_mled[NETXBIG_LED_MODE_NUM] = {
+ [NETXBIG_LED_OFF] = 0,
+ [NETXBIG_LED_ON] = 2,
+ [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE,
+ [NETXBIG_LED_TIMER1] = 4,
+ [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE,
+};
+
+static int netxbig_v2_blue_pwr_mled[NETXBIG_LED_MODE_NUM] = {
+ [NETXBIG_LED_OFF] = 0,
+ [NETXBIG_LED_ON] = 1,
+ [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE,
+ [NETXBIG_LED_TIMER1] = 3,
+ [NETXBIG_LED_TIMER2] = 7,
+};
+
+static int netxbig_v2_blue_sata_mled[NETXBIG_LED_MODE_NUM] = {
+ [NETXBIG_LED_OFF] = 0,
+ [NETXBIG_LED_ON] = 7,
+ [NETXBIG_LED_SATA] = 1,
+ [NETXBIG_LED_TIMER1] = 3,
+ [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE,
+};
+
+static struct netxbig_led_timer netxbig_v2_led_timer[] = {
+ [0] = {
+ .delay_on = 500,
+ .delay_off = 500,
+ .mode = NETXBIG_LED_TIMER1,
+ },
+ [1] = {
+ .delay_on = 500,
+ .delay_off = 1000,
+ .mode = NETXBIG_LED_TIMER2,
+ },
+};
+
+#define NETXBIG_LED(_name, maddr, mval, baddr) \
+ { .name = _name, \
+ .mode_addr = maddr, \
+ .mode_val = mval, \
+ .bright_addr = baddr }
+
+static struct netxbig_led net2big_v2_leds_ctrl[] = {
+ NETXBIG_LED("net2big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1),
+ NETXBIG_LED("net2big-v2:red:power", 0, netxbig_v2_red_mled, 1),
+ NETXBIG_LED("net2big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net2big-v2:red:sata0", 3, netxbig_v2_red_mled, 2),
+ NETXBIG_LED("net2big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net2big-v2:red:sata1", 4, netxbig_v2_red_mled, 2),
+};
+
+static struct netxbig_led_platform_data net2big_v2_leds_data = {
+ .gpio_ext = &netxbig_v2_gpio_ext,
+ .timer = netxbig_v2_led_timer,
+ .num_timer = ARRAY_SIZE(netxbig_v2_led_timer),
+ .leds = net2big_v2_leds_ctrl,
+ .num_leds = ARRAY_SIZE(net2big_v2_leds_ctrl),
+};
+
+static struct netxbig_led net5big_v2_leds_ctrl[] = {
+ NETXBIG_LED("net5big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1),
+ NETXBIG_LED("net5big-v2:red:power", 0, netxbig_v2_red_mled, 1),
+ NETXBIG_LED("net5big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net5big-v2:red:sata0", 3, netxbig_v2_red_mled, 2),
+ NETXBIG_LED("net5big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net5big-v2:red:sata1", 4, netxbig_v2_red_mled, 2),
+ NETXBIG_LED("net5big-v2:blue:sata2", 5, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net5big-v2:red:sata2", 5, netxbig_v2_red_mled, 2),
+ NETXBIG_LED("net5big-v2:blue:sata3", 6, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net5big-v2:red:sata3", 6, netxbig_v2_red_mled, 2),
+ NETXBIG_LED("net5big-v2:blue:sata4", 7, netxbig_v2_blue_sata_mled, 2),
+ NETXBIG_LED("net5big-v2:red:sata5", 7, netxbig_v2_red_mled, 2),
+};
+
+static struct netxbig_led_platform_data net5big_v2_leds_data = {
+ .gpio_ext = &netxbig_v2_gpio_ext,
+ .timer = netxbig_v2_led_timer,
+ .num_timer = ARRAY_SIZE(netxbig_v2_led_timer),
+ .leds = net5big_v2_leds_ctrl,
+ .num_leds = ARRAY_SIZE(net5big_v2_leds_ctrl),
+};
+
+static struct platform_device netxbig_v2_leds = {
+ .name = "leds-netxbig",
+ .id = -1,
+ .dev = {
+ .platform_data = &net2big_v2_leds_data,
+ },
+};
+
+void __init netxbig_init(void)
+{
+
+ if (of_machine_is_compatible("lacie,net5big"))
+ netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data;
+ platform_device_register(&netxbig_v2_leds);
+}
diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h
index de7f0a191394..f130d8079b68 100644
--- a/arch/arm/mach-mvebu/board.h
+++ b/arch/arm/mach-mvebu/board.h
@@ -19,4 +19,10 @@ void t5325_init(void);
static inline void t5325_init(void) {};
#endif
+#ifdef CONFIG_MACH_NETXBIG
+void netxbig_init(void);
+#else
+static inline void netxbig_init(void) {};
+#endif
+
#endif
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index 120207fc36f1..c0b4828970fc 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -183,6 +183,9 @@ static void __init kirkwood_dt_init(void)
if (of_machine_is_compatible("hp,t5325"))
t5325_init();
+ if (of_machine_is_compatible("lacie,netxbig"))
+ netxbig_init();
+
of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
}
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big.
2014-05-03 18:35 [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2 Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 1/5] ARM: Kirkwood: Add board file for netxbig LEDs Andrew Lunn
@ 2014-05-03 18:35 ` Andrew Lunn
2014-05-04 21:21 ` Sebastian Hesselbarth
2014-05-03 18:35 ` [PATCH v2 3/5] ARM: Kirkwood: Document net[25x]big compatible strings Andrew Lunn
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:35 UTC (permalink / raw)
To: linux-arm-kernel
Describe LaCie 2Big and 5Big Network v2 using device tree.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
v1->v2
Fix size of memory
Clean up ethernet nodes
s/at/atmel/
---
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/kirkwood-net2big.dts | 30 ++++++
arch/arm/boot/dts/kirkwood-net5big.dts | 83 ++++++++++++++++
arch/arm/boot/dts/kirkwood-netxbig.dtsi | 171 ++++++++++++++++++++++++++++++++
4 files changed, 286 insertions(+)
create mode 100644 arch/arm/boot/dts/kirkwood-net2big.dts
create mode 100644 arch/arm/boot/dts/kirkwood-net5big.dts
create mode 100644 arch/arm/boot/dts/kirkwood-netxbig.dtsi
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 35c146f31e46..79dd68d27621 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -118,6 +118,8 @@ kirkwood := \
kirkwood-lsxhl.dtb \
kirkwood-mplcec4.dtb \
kirkwood-mv88f6281gtw-ge.dtb \
+ kirkwood-net2big.dtb \
+ kirkwood-net5big.dtb \
kirkwood-netgear_readynas_duo_v2.dtb \
kirkwood-netgear_readynas_nv+_v2.dtb \
kirkwood-ns2.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-net2big.dts b/arch/arm/boot/dts/kirkwood-net2big.dts
new file mode 100644
index 000000000000..c3f5281a52f5
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-net2big.dts
@@ -0,0 +1,30 @@
+/*
+ * Device Tree file for LaCie 2Big Network v2
+ *
+ * Copyright (C) 2014
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on netxbig_v2-setup.c,
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+*/
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "kirkwood-netxbig.dtsi"
+
+/ {
+ model = "LaCie 2Big Network v2";
+ compatible = "lacie,net2big", "lacie,netxbig", "marvell,kirkwood-88f6192", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x10000000>;
+ };
+};
diff --git a/arch/arm/boot/dts/kirkwood-net5big.dts b/arch/arm/boot/dts/kirkwood-net5big.dts
new file mode 100644
index 000000000000..20abe7e37ca2
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-net5big.dts
@@ -0,0 +1,83 @@
+/*
+ * Device Tree file for LaCie 5Big Network v2
+ *
+ * Copyright (C) 2014
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on netxbig_v2-setup.c,
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+*/
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "kirkwood-netxbig.dtsi"
+
+/ {
+ model = "LaCie 5Big Network v2";
+ compatible = "lacie,net2big", "lacie,netxbig", "marvell,kirkwood-88f6192", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x20000000>;
+ };
+
+};
+
+®ulators {
+ regulator at 3 {
+ compatible = "regulator-fixed";
+ reg = <3>;
+ regulator-name = "hdd2power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
+ };
+
+ regulator at 4 {
+ compatible = "regulator-fixed";
+ reg = <4>;
+ regulator-name = "hdd3power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+ };
+
+ regulator at 5 {
+ compatible = "regulator-fixed";
+ reg = <5>;
+ regulator-name = "hdd4power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&mdio {
+ ethphy1: ethernet-phy at 1 {
+ reg = <0>;
+ };
+};
+
+ð1 {
+ status = "okay";
+ ethernet1-port at 0 {
+ phy-handle = <ðphy1>;
+ };
+};
+
diff --git a/arch/arm/boot/dts/kirkwood-netxbig.dtsi b/arch/arm/boot/dts/kirkwood-netxbig.dtsi
new file mode 100644
index 000000000000..604d7f4949af
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-netxbig.dtsi
@@ -0,0 +1,171 @@
+/*
+ * Device Tree common file for LaCie 2Big and 5Big Network v2
+ *
+ * Copyright (C) 2014
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on netxbig_v2-setup.c,
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+*/
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ ocp at f1000000 {
+ serial at 12000 {
+ status = "ok";
+ };
+
+ spi at 10600 {
+ pinctrl-0 = <&pmx_spi>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mxicy,mx25l4005a";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ mode = <0>;
+
+ partition at 0 {
+ reg = <0x0 0x80000>;
+ label = "u-boot";
+ };
+ };
+ };
+
+ sata at 80000 {
+ status = "okay";
+ nr-ports = <2>;
+ };
+
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /*
+ * button at 1 and button at 2 represent a three position rocker
+ * switch. Thus the conventional KEY_POWER does not fit
+ */
+ button at 1 {
+ label = "Back power switch (on|auto)";
+ linux,code = <KEY_ESC>;
+ linux,input-type = <5>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ button at 2 {
+ label = "Back power switch (auto|off)";
+ linux,code = <KEY_1>;
+ linux,input-type = <5>;
+ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+ };
+ button at 3 {
+ label = "Function button";
+ linux,code = <KEY_OPTION>;
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ regulators: regulators {
+ status = "okay";
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+
+ regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "hdd0power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+ };
+
+ regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "hdd1power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+ };
+
+ };
+};
+
+&mdio {
+ status = "okay";
+
+ ethphy0: ethernet-phy at 0 {
+ reg = <8>;
+ };
+
+ ethphy1: ethernet-phy at 1 {
+ reg = <0>;
+ };
+};
+
+ð0 {
+ status = "okay";
+ ethernet0-port at 0 {
+ phy-handle = <ðphy0>;
+ };
+};
+
+&pinctrl {
+ pinctrl-names = "default";
+
+ pmx_button_function: pmx-button-function {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+ pmx_button_power_off: pmx-button-power-off {
+ marvell,pins = "mpp15";
+ marvell,function = "gpio";
+ };
+ pmx_button_power_on: pmx-button-power-on {
+ marvell,pins = "mpp13";
+ marvell,function = "gpio";
+ };
+};
+
+&i2c0 {
+ pinctrl-0 = <&pmx_twsi0>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ eeprom at 50 {
+ compatible = "atmel,24c04";
+ pagesize = <16>;
+ reg = <0x50>;
+ };
+};
+
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/5] ARM: Kirkwood: Document net[25x]big compatible strings
2014-05-03 18:35 [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2 Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 1/5] ARM: Kirkwood: Add board file for netxbig LEDs Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big Andrew Lunn
@ 2014-05-03 18:35 ` Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 4/5] ARM: mvebu: Add LaCie 2Big and 5Big Network v2 Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 5/5] ARM: multi_v5: Enable " Andrew Lunn
4 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:35 UTC (permalink / raw)
To: linux-arm-kernel
Add the compatible strings for net2big and net5big to the list of
kirkwood boards.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
Documentation/devicetree/bindings/arm/marvell,kirkwood.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt
index 925ecbf6e7b7..01683a1564bb 100644
--- a/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt
+++ b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt
@@ -42,6 +42,9 @@ board. Currently known boards are:
"lacie,cloudbox"
"lacie,inetspace_v2"
"lacie,laplug"
+"lacie,net2big"
+"lacie,net5big"
+"lacie,netxbig"
"lacie,netspace_lite_v2"
"lacie,netspace_max_v2"
"lacie,netspace_mini_v2"
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 4/5] ARM: mvebu: Add LaCie 2Big and 5Big Network v2
2014-05-03 18:35 [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2 Andrew Lunn
` (2 preceding siblings ...)
2014-05-03 18:35 ` [PATCH v2 3/5] ARM: Kirkwood: Document net[25x]big compatible strings Andrew Lunn
@ 2014-05-03 18:35 ` Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 5/5] ARM: multi_v5: Enable " Andrew Lunn
4 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:35 UTC (permalink / raw)
To: linux-arm-kernel
Enable building LaCie 2Big and 5Big Network v2 in the mvebu v5 kernel.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
arch/arm/configs/mvebu_v5_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig
index 36484a37a1ca..58acd057e236 100644
--- a/arch/arm/configs/mvebu_v5_defconfig
+++ b/arch/arm/configs/mvebu_v5_defconfig
@@ -12,6 +12,7 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_ARCH_MVEBU=y
CONFIG_MACH_KIRKWOOD=y
CONFIG_MACH_T5325=y
+CONFIG_MACH_NETXBIG=y
# CONFIG_CPU_FEROCEON_OLD_ID is not set
CONFIG_PCI_MVEBU=y
CONFIG_PREEMPT=y
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 5/5] ARM: multi_v5: Enable LaCie 2Big and 5Big Network v2
2014-05-03 18:35 [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2 Andrew Lunn
` (3 preceding siblings ...)
2014-05-03 18:35 ` [PATCH v2 4/5] ARM: mvebu: Add LaCie 2Big and 5Big Network v2 Andrew Lunn
@ 2014-05-03 18:35 ` Andrew Lunn
4 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2014-05-03 18:35 UTC (permalink / raw)
To: linux-arm-kernel
Enable building LaCie 2Big and 5Big Network v2 in the multi v5 kernel.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/configs/multi_v5_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig
index aa3dfb084fed..cd3f1016ece3 100644
--- a/arch/arm/configs/multi_v5_defconfig
+++ b/arch/arm/configs/multi_v5_defconfig
@@ -12,6 +12,7 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_ARCH_MVEBU=y
CONFIG_MACH_KIRKWOOD=y
CONFIG_MACH_T5325=y
+CONFIG_MACH_NETXBIG=y
CONFIG_ARCH_MXC=y
CONFIG_MACH_IMX25_DT=y
CONFIG_MACH_IMX27_DT=y
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big.
2014-05-03 18:35 ` [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big Andrew Lunn
@ 2014-05-04 21:21 ` Sebastian Hesselbarth
2014-05-04 22:56 ` Andrew Lunn
0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-04 21:21 UTC (permalink / raw)
To: linux-arm-kernel
On 05/03/2014 08:35 PM, Andrew Lunn wrote:
> Describe LaCie 2Big and 5Big Network v2 using device tree.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v1->v2
> Fix size of memory
> Clean up ethernet nodes
> s/at/atmel/
> ---
[...]
> diff --git a/arch/arm/boot/dts/kirkwood-netxbig.dtsi b/arch/arm/boot/dts/kirkwood-netxbig.dtsi
> new file mode 100644
> index 000000000000..604d7f4949af
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-netxbig.dtsi
> @@ -0,0 +1,171 @@
> +/*
> + * Device Tree common file for LaCie 2Big and 5Big Network v2
> + *
> + * Copyright (C) 2014
> + *
> + * Andrew Lunn <andrew@lunn.ch>
> + *
> + * Based on netxbig_v2-setup.c,
> + * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> +*/
> +
> +#include "kirkwood.dtsi"
> +#include "kirkwood-6281.dtsi"
> +
> +/ {
> + chosen {
> + bootargs = "console=ttyS0,115200n8";
nit: add stdout-path = &uart0;
> + };
> +
> + ocp at f1000000 {
> + serial at 12000 {
> + status = "ok";
nit: s/ok/okay/
> + };
> +
> + spi at 10600 {
> + pinctrl-0 = <&pmx_spi>;
> + pinctrl-names = "default";
> + status = "okay";
> +
> + flash at 0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "mxicy,mx25l4005a";
> + reg = <0>;
> + spi-max-frequency = <20000000>;
> + mode = <0>;
> +
> + partition at 0 {
> + reg = <0x0 0x80000>;
> + label = "u-boot";
> + };
> + };
> + };
> +
> + sata at 80000 {
> + status = "okay";
> + nr-ports = <2>;
> + };
> +
> + };
> +
> + gpio_keys {
nit: s/gpio_keys/gpio-keys/
> + compatible = "gpio-keys";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + /*
> + * button at 1 and button at 2 represent a three position rocker
> + * switch. Thus the conventional KEY_POWER does not fit
> + */
> + button at 1 {
> + label = "Back power switch (on|auto)";
> + linux,code = <KEY_ESC>;
> + linux,input-type = <5>;
> + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
> + };
> + button at 2 {
> + label = "Back power switch (auto|off)";
> + linux,code = <KEY_1>;
> + linux,input-type = <5>;
> + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
> + };
> + button at 3 {
> + label = "Function button";
> + linux,code = <KEY_OPTION>;
> + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
> + };
> +
> + };
> +
> + gpio_poweroff {
nit: s/gpio_poweroff/gpio-poweroff/
If there is nothing more severe with this, I am sure Jason can
just squash in the nits.
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> + compatible = "gpio-poweroff";
> + gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
> + };
> +
> + regulators: regulators {
> + status = "okay";
> + compatible = "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + pinctrl-names = "default";
> +
> + regulator at 1 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "hdd0power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
> + };
> +
> + regulator at 2 {
> + compatible = "regulator-fixed";
> + reg = <2>;
> + regulator-name = "hdd1power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
> + };
> +
> + };
> +};
> +
> +&mdio {
> + status = "okay";
> +
> + ethphy0: ethernet-phy at 0 {
> + reg = <8>;
> + };
> +
> + ethphy1: ethernet-phy at 1 {
> + reg = <0>;
> + };
> +};
> +
> +ð0 {
> + status = "okay";
> + ethernet0-port at 0 {
> + phy-handle = <ðphy0>;
> + };
> +};
> +
> +&pinctrl {
> + pinctrl-names = "default";
> +
> + pmx_button_function: pmx-button-function {
> + marvell,pins = "mpp34";
> + marvell,function = "gpio";
> + };
> + pmx_button_power_off: pmx-button-power-off {
> + marvell,pins = "mpp15";
> + marvell,function = "gpio";
> + };
> + pmx_button_power_on: pmx-button-power-on {
> + marvell,pins = "mpp13";
> + marvell,function = "gpio";
> + };
> +};
> +
> +&i2c0 {
> + pinctrl-0 = <&pmx_twsi0>;
> + pinctrl-names = "default";
> + status = "okay";
> +
> + eeprom at 50 {
> + compatible = "atmel,24c04";
> + pagesize = <16>;
> + reg = <0x50>;
> + };
> +};
> +
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big.
2014-05-04 21:21 ` Sebastian Hesselbarth
@ 2014-05-04 22:56 ` Andrew Lunn
2014-05-04 23:12 ` Sebastian Hesselbarth
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2014-05-04 22:56 UTC (permalink / raw)
To: linux-arm-kernel
> > + chosen {
> > + bootargs = "console=ttyS0,115200n8";
>
> nit: add stdout-path = &uart0;
O.K. I had v1 of this patch before your cleanup, and forgot about
this.
> > + };
> > +
> > + ocp at f1000000 {
> > + serial at 12000 {
> > + status = "ok";
>
> nit: s/ok/okay/
I copied a bad example .dts files :-(
> > + };
> > +
> > + spi at 10600 {
> > + pinctrl-0 = <&pmx_spi>;
> > + pinctrl-names = "default";
> > + status = "okay";
> > +
> > + flash at 0 {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + compatible = "mxicy,mx25l4005a";
> > + reg = <0>;
> > + spi-max-frequency = <20000000>;
> > + mode = <0>;
> > +
> > + partition at 0 {
> > + reg = <0x0 0x80000>;
> > + label = "u-boot";
> > + };
> > + };
> > + };
> > +
> > + sata at 80000 {
> > + status = "okay";
> > + nr-ports = <2>;
> > + };
> > +
> > + };
> > +
> > + gpio_keys {
>
> nit: s/gpio_keys/gpio-keys/
>
I think this one is debatable. The documentation is called
gpio_keys.txt, and the example uses gpio_keys. I don't mind chaging it
in this file, but maybe you can submit a patch changing the example in
the documentation?
> > + gpio_poweroff {
>
> nit: s/gpio_poweroff/gpio-poweroff/
ACK.
> If there is nothing more severe with this, I am sure Jason can
> just squash in the nits.
This still needs to be tested on hardware, so there is a good chance
of a respin.
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big.
2014-05-04 22:56 ` Andrew Lunn
@ 2014-05-04 23:12 ` Sebastian Hesselbarth
0 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-04 23:12 UTC (permalink / raw)
To: linux-arm-kernel
On 05/05/2014 12:56 AM, Andrew Lunn wrote:
>>> + gpio_keys {
>>
>> nit: s/gpio_keys/gpio-keys/
>>
>
> I think this one is debatable. The documentation is called
> gpio_keys.txt, and the example uses gpio_keys. I don't mind chaging it
> in this file, but maybe you can submit a patch changing the example in
> the documentation?
Yes, it definitely is. Both label and node name are allowed to
contain _ and -. Maybe, we should see it is more like a common practice.
Anyway, all comments are nits for a reason :)
I can prepare a patch someday, if I don't forget about it.
Sebastian
>>> + gpio_poweroff {
>>
>> nit: s/gpio_poweroff/gpio-poweroff/
>
> ACK.
>
>> If there is nothing more severe with this, I am sure Jason can
>> just squash in the nits.
>
> This still needs to be tested on hardware, so there is a good chance
> of a respin.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-05-04 23:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 18:35 [PATCH v2 0/5] DT support for LaCie 2Big and 5Big Network v2 Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 1/5] ARM: Kirkwood: Add board file for netxbig LEDs Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 2/5] ARM: Kirkwood: Add DT descriptions for net2big and net5big Andrew Lunn
2014-05-04 21:21 ` Sebastian Hesselbarth
2014-05-04 22:56 ` Andrew Lunn
2014-05-04 23:12 ` Sebastian Hesselbarth
2014-05-03 18:35 ` [PATCH v2 3/5] ARM: Kirkwood: Document net[25x]big compatible strings Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 4/5] ARM: mvebu: Add LaCie 2Big and 5Big Network v2 Andrew Lunn
2014-05-03 18:35 ` [PATCH v2 5/5] ARM: multi_v5: Enable " Andrew Lunn
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.