Skip to contentSkip to conversation

ARM: DTS support for Linkstation LS-WTGL (orion5x)

PATCH New Roger Shimizu 2 participants 8 messages Jul 14, 2015 – Jul 21, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: DTS support for Linkstation LS-WTGL (orion5x)

Dear Orion5x Maintainer,

I'd like to add DTS support for a bit older linkstation orion5x device, LS-WTGL. I have tested againt latest kernel next/dt branch on my box and it works fine. Please consider to merge. Thank you!

Cheers,
Roger

Roger Shimizu (2):
ARM: dts: add buffalo linkstation ls-wtgl
ARM: defconfig: add DT support for orion5x_defconfig

 arch/arm/boot/dts/Makefile                       |   1 +
 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 242 +++++++++++++++++++++++
 arch/arm/configs/orion5x_defconfig               |   4 +
 3 files changed, 247 insertions(+)
 create mode 100644 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 ARM: dts: add buffalo linkstation ls-wtgl

Add dts file to support Buffalo Linkstation LS-WTGL,
which is marvell orion5x based 2-bay 3.5" HDD NAS.
Product info:
- (JPN) http://buffalo.jp/products/catalog/storage/ls-wtgl_r1/
- (ENG) http://www.buffalotech.com/support-and-downloads/download/LinkStation_Pro_Duo_Manual_web.pdf

---
 arch/arm/boot/dts/Makefile                       |   1 +
 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 242 +++++++++++++++++++++++
 2 files changed, 243 insertions(+)
 create mode 100644 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts
arch/arm/boot/dts/Makefile +1 -0
index a8bf702..f3ddfa0 100644
@@ -464,6 +464,7 @@ dtb-$(CONFIG_SOC_DRA7XX) += \
 dtb-$(CONFIG_ARCH_ORION5X) += \
 	orion5x-lacie-d2-network.dtb \
 	orion5x-lacie-ethernet-disk-mini-v2.dtb \
+	orion5x-linkstation-lswtgl.dtb \
 	orion5x-maxtor-shared-storage-2.dtb \
 	orion5x-rd88f5182-nas.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += \
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +242 -0

242 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/2 ARM: dts: add buffalo linkstation ls-wtgl

Quoted 31 lines · Roger Shimizu

Add dts file to support Buffalo Linkstation LS-WTGL,
which is marvell orion5x based 2-bay 3.5" HDD NAS.
Product info:
- (JPN) http://buffalo.jp/products/catalog/storage/ls-wtgl_r1/
- (ENG) http://www.buffalotech.com/support-and-downloads/download/LinkStation_Pro_Duo_Manual_web.pdf

---
 arch/arm/boot/dts/Makefile                       |   1 +
 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 242 +++++++++++++++++++++++
 2 files changed, 243 insertions(+)
 create mode 100644 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts
arch/arm/boot/dts/Makefile +1 -0
index a8bf702..f3ddfa0 100644
@@ -464,6 +464,7 @@ dtb-$(CONFIG_SOC_DRA7XX) += \
 dtb-$(CONFIG_ARCH_ORION5X) += \
 	orion5x-lacie-d2-network.dtb \
 	orion5x-lacie-ethernet-disk-mini-v2.dtb \
+	orion5x-linkstation-lswtgl.dtb \
 	orion5x-maxtor-shared-storage-2.dtb \
 	orion5x-rd88f5182-nas.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += \
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +0 -0
new file mode 100644
index 0000000..6d021bd

arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts line 10

Quoted 10 lines
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +10 -0
@@ -0,0 +1,242 @@
+/*
+ * Device Tree file for Buffalo Linkstation LS-WTGL
+ *
+ * Copyright (C) 2015, Roger Shimizu <[email protected]>
+ *
+ * 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.
+ */

Hi Roger

Could you licence this under both GPL and X11? See the recent posting by Benjamin Cama for the WSGL.

Quoted 50 lines
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +50 -0
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "orion5x-mv88f5182.dtsi"
+
+/ {
+	model = "Buffalo Linkstation LS-WTGL";
+	compatible = "buffalo,lswtgl", "marvell,orion5x-88f5182", "marvell,orion5x";
+
+	memory { /* 64 MB */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+		linux,stdout-path = &uart0;
+	};
+
+	soc {
+		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
+		         <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
+			 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
+
+		internal-regs {
+			pinctrl: pinctrl at 10000 {
+				pinctrl-0 = <&pmx_usb_power &pmx_power_hdd
+					&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
+				pinctrl-names = "default";
+
+				pmx_led_power: pmx-leds {
+					marvell,pins = "mpp0";
+					marvell,function = "gpio";
+				};
+
+				pmx_led_alarm: pmx-leds {
+					marvell,pins = "mpp2";
+					marvell,function = "gpio";
+				};
+
+				pmx_led_info: pmx-leds {
+					marvell,pins = "mpp3";
+					marvell,function = "gpio";
+				};
+
+				pmx_power_hdd: pmx-power-hdd {
+					marvell,pins = "mpp1";
+					marvell,function = "gpio";

arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts line 70

Quoted 10 lines
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +10 -0
+				};
+
+				pmx_usb_power: pmx-usb-power {
+					marvell,pins = "mpp9";
+					marvell,function = "gpio";
+				};
+
+				pmx_sata0: pmx-sata0 {
+					marvell,pins = "mpp12";
+					//marvell,function = "gpio";

Please remove commented out lines.

arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts line 76

Quoted 6 lines
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +6 -0
+					marvell,function = "sata0";
+				};
+
+				pmx_sata1: pmx-sata1 {
+					marvell,pins = "mpp13";
+					//marvell,function = "gpio";

Same here.

arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts line 78

Quoted 2 lines
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts new file +2 -0
+					marvell,function = "sata1";
+				};

Otherwise this looks good.

Andrew

#3 lore raw

PATCH 2/2 ARM: defconfig: add DT support for orion5x_defconfig

In reply to Roger Shimizu

- add two DT-device entries into orion5x_defconfig
- enable EARLY_PRINTK because it's set in most "bootargs" setting for orion5x dts files. e.g.: 'bootargs = "console=ttyS0,115200n8
earlyprintk";'
- enable NETCONSOLE as module because it's helpful to check boot log when there's no serial connection

---
 arch/arm/configs/orion5x_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/orion5x_defconfig +4 -0
index 855143f..d1f533e 100644
@@ -14,8 +14,10 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_BSD_DISKLABEL=y
 CONFIG_ARCH_ORION5X=y
+CONFIG_ARCH_ORION5X_DT=y
 CONFIG_MACH_DB88F5281=y
 CONFIG_MACH_RD88F5182=y
+CONFIG_MACH_RD88F5182_DT=y
 CONFIG_MACH_KUROBOX_PRO=y
 CONFIG_MACH_DNS323=y
 CONFIG_MACH_TS209=y
@@ -81,6 +83,7 @@ CONFIG_NETDEVICES=y
 CONFIG_MII=y
 CONFIG_NET_DSA_MV88E6131=y
 CONFIG_NET_DSA_MV88E6123_61_65=y
+CONFIG_NETCONSOLE=m
 CONFIG_MV643XX_ETH=y
 CONFIG_MARVELL_PHY=y
 # CONFIG_INPUT_MOUSEDEV is not set
@@ -157,6 +160,7 @@ CONFIG_LATENCYTOP=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
 CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_EARLY_PRINTK=y
 CONFIG_CRYPTO_CBC=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_PCBC=m
Signature · 1 line
1.9.1
#4 lore raw

PATCH 2/2 ARM: defconfig: add DT support for orion5x_defconfig

Quoted 1 line · Roger Shimizu

- add two DT-device entries into orion5x_defconfig

This i agree with.

Quoted 3 lines

- enable EARLY_PRINTK because it's set in most "bootargs" setting for orion5x dts files. e.g.: 'bootargs = "console=ttyS0,115200n8
earlyprintk";'

This i'm somewhat against. Of the 113 defconfigs, only 10 enable it. There has also been a push to remove bootargs completely, since it is not needed if you set stdout-path.

Quoted 2 lines

- enable NETCONSOLE as module because it's helpful to check boot log when there's no serial connection

And only three enable this.

Andrew

#5 lore raw

PATCH 2/2 ARM: defconfig: add DT support for orion5x_defconfig

Dear Andrew,

Thanks for your feedback!

For config of "EARLY_PRINTK" and "NETCONSOLE", I understand your concern and I'll remove them.
However, I want to add another one, which I find it necessary to boot on my orion5x hardware:

CONFIG_ARM_ATAG_DTB_COMPAT=y

I need this because the uboot is quite old on that orion5x board and the only way to add DT support is to append the DTB at the end of zImage.
I guess other orion5x boards might be the same situation, so this config had better go into "orion5x_defconfig".
Let me know your opinion. Thank you!

Cheers,
Roger

#6 lore raw

PATCH 2/2 ARM: defconfig: add DT support for orion5x_defconfig

Quoted 10 lines · Roger Shimizu

Dear Andrew,

Thanks for your feedback!

For config of "EARLY_PRINTK" and "NETCONSOLE", I understand your concern and I'll remove them.
However, I want to add another one, which I find it necessary to boot on my orion5x hardware:

CONFIG_ARM_ATAG_DTB_COMPAT=y

Hi Roger

This one is .O.K.

Andrew

#7 lore raw

cover ARM: DTS support for Linkstation LS-WTGL (orion5x)

In reply to Roger Shimizu

Dear Andrew, Jason,

Could you help to review my patchset on Linkstation LS-WTGL (orion5x), please? Thank you and look forward to your feedback!

Cheers,
Roger

Quoted 22 lines · Roger Shimizu

Dear Orion5x Maintainer,

I'd like to add DTS support for a bit older linkstation orion5x device, LS-WTGL. I have tested againt latest kernel next/dt branch on my box and it works fine. Please consider to merge. Thank you!

Cheers,
Roger

Roger Shimizu (2):
ARM: dts: add buffalo linkstation ls-wtgl
ARM: defconfig: add DT support for orion5x_defconfig

 arch/arm/boot/dts/Makefile                       |   1 +
 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 242 +++++++++++++++++++++++
 arch/arm/configs/orion5x_defconfig               |   4 +
 3 files changed, 247 insertions(+)
 create mode 100644 arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts

--
1.9.1