DT support for LaCie 2Big and 5Big Network v2
Subsystems (5)
Andrew Lunn
maintainerv2 cover DT support for LaCie 2Big and 5Big Network v2
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
Signature · 1 line
2.0.0.rc0
Andrew Lunn
maintainerPATCH v2 1/5 ARM: Kirkwood: Add board file for netxbig LEDs
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.
--- 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
arch/arm/mach-mvebu/Kconfig +7 -0
@@ -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
arch/arm/mach-mvebu/Makefile +1 -0
@@ -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
arch/arm/mach-mvebu/board-netxbig.c new file +191 -0
191 lines not on this page · raw message
arch/arm/mach-mvebu/board.h +6 -0
@@ -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
arch/arm/mach-mvebu/kirkwood.c +3 -0
@@ -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 ); }
Signature · 1 line
2.0.0.rc0
Andrew Lunn
maintainerPATCH v2 2/5 ARM: Kirkwood: Add DT descriptions for net2big and net5big.
In reply to Andrew LunnDescribe LaCie 2Big and 5Big Network v2 using device tree.
---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
arch/arm/boot/dts/Makefile +2 -0
@@ -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 \
arch/arm/boot/dts/kirkwood-net2big.dts new file +30 -0
@@ -0,0 +1,30 @@ +/* + * Device Tree file for LaCie 2Big Network v2 + * + * Copyright (C) 2014 + * + * Andrew Lunn <[email protected]> + * + * Based on netxbig_v2-setup.c, + * Copyright (C) 2010 Simon Guinot <[email protected]> + * + * 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>; + }; +};
arch/arm/boot/dts/kirkwood-net5big.dts new file +83 -0
83 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +171 -0
171 lines not on this page · raw message
Signature · 1 line
2.0.0.rc0
Sebastian Hesselbarth
maintainerPATCH v2 2/5 ARM: Kirkwood: Add DT descriptions for net2big and net5big.
Quoted 9 lines · Andrew Lunn
Describe LaCie 2Big and 5Big Network v2 using device tree.
Signed-off-by Andrew Lunn <[email protected]>---
v1->v2
Fix size of memory
Clean up ethernet nodes
s/at/atmel/
---
[...]
Quoted 17 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +11
-0@@ -0,0 +1,171 @@ +/* + * Device Tree common file for LaCie 2Big and 5Big Network v2 + * + * Copyright (C) 2014 + * + * Andrew Lunn <[email protected]> + * + * Based on netxbig_v2-setup.c, + * Copyright (C) 2010 Simon Guinot <[email protected]> + * + * This file is licensed under the terms of the GNU General Public
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 21
Quoted 10 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +10
-0+ * 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;
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 26
Quoted 5 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +5
-0+ }; + + ocp at f1000000 { + serial at 12000 { + status = "ok";
nit: s/ok/okay/
Quoted 20 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +20
-0+ }; + + 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"; + }; + };
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 56
Quoted 10 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +10
-0+ }; + + sata at 80000 { + status = "okay"; + nr-ports = <2>; + }; + + }; + + gpio_keys {
nit: s/gpio_keys/gpio-keys/
Quoted 19 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +19
-0+ 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>;
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 85
Quoted 10 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +10
-0+ }; + 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.
Quoted 87 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +86
-0+ 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>; + }; +}; +
Andrew Lunn
maintainerPATCH v2 2/5 ARM: Kirkwood: Add DT descriptions for net2big and net5big.
Quoted 4 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 21
Quoted 2 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +2
-0+ 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.
Quoted 7 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 26
Quoted 5 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +5
-0+ }; + + ocp at f1000000 { + serial at 12000 { + status = "ok";nit: s/ok/okay/
I copied a bad example .dts files :-(
Quoted 24 lines
Quoted 24 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +24
-0+ }; + + 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";
Quoted 9 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 56
Quoted 6 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +6
-0+ 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?
Quoted 3 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 85
Quoted 1 line
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +1
-0+ gpio_poweroff {nit: s/gpio_poweroff/gpio-poweroff/
ACK.
Quoted 2 lines
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
Sebastian Hesselbarth
maintainerPATCH v2 2/5 ARM: Kirkwood: Add DT descriptions for net2big and net5big.
Quoted 9 lines · Andrew Lunn
Quoted 4 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 56
Quoted 1 line
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +1
-0+ 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
Quoted 11 lines
Quoted 3 lines
arch/arm/boot/dts/kirkwood-netxbig.dtsi line 85
Quoted 1 line
arch/arm/boot/dts/kirkwood-netxbig.dtsi new file +1
-0+ gpio_poweroff {nit: s/gpio_poweroff/gpio-poweroff/
ACK.
Quoted 2 lines
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 Lunn
maintainerPATCH v2 3/5 ARM: Kirkwood: Document net[25x]big compatible strings
In reply to Andrew LunnAdd the compatible strings for net2big and net5big to the list of kirkwood boards.
--- Documentation/devicetree/bindings/arm/marvell,kirkwood.txt | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/arm/marvell,kirkwood.txt +3 -0
@@ -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"
Signature · 1 line
2.0.0.rc0
Andrew Lunn
maintainerPATCH v2 4/5 ARM: mvebu: Add LaCie 2Big and 5Big Network v2
In reply to Andrew LunnEnable building LaCie 2Big and 5Big Network v2 in the mvebu v5 kernel.
--- arch/arm/configs/mvebu_v5_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/mvebu_v5_defconfig +1 -0
@@ -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
Signature · 1 line
2.0.0.rc0
Andrew Lunn
maintainerPATCH v2 5/5 ARM: multi_v5: Enable LaCie 2Big and 5Big Network v2
In reply to Andrew LunnEnable building LaCie 2Big and 5Big Network v2 in the multi v5 kernel.
--- arch/arm/configs/multi_v5_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v5_defconfig +1 -0
@@ -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
Signature · 1 line
2.0.0.rc0