Hack BBS
[全部のスレッド一覧][新規投稿][記事の削除・変更]
[Home Page]
返信投稿はタイトルのリンクをクリックして下さい
スレッド【No.6246】の中の記事をすべて表示しています
【No.6246】のスレッド
14/10/16(木) 23:29:45 投稿者[通りすがり] [No.6246]のスレッド内
- 【No.6246】 タイトル[LS-VLシリーズのkernel3.17.1パッチ]
この記事がスレッドの最初です
- バニラはmach-kirkwoodをmach-mvebuに統合してくれたおかげで私のLS-XHLが起動しません(泣)
88f6282のLS-VLはばっちり動かしましたのでpatchを載せます。
「make mvebu_v5_defconfig」と「System Type --->[*] Marvell Engineering Business Unit (MVEBU) SoCs --->[*] Marvell Kirkwood boards [*] Buffalo LS-VL Series」を忘れずに。
DTBをつかうので、
# make kirkwood-lsvl.dtb
# cat arch/arm/boot/zImage arch/arm/boot//dts/kirkwood-lsvl.dtb > arch/arm/boot/zImage_w_dtb
# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-3.0' -d arch/arm/boot/zImage_w_dtb arch/arm/boot/uImage.buffalo
kernelでコマンド渡せるので、MTDもdebian謹製「uboot-envtools」でいじくれます。
-----
--- linux-3.17.1/arch/arm/tools/mach-types.orig 2014-10-16 18:35:51.463599000 +0900
+++ linux-3.17.1/arch/arm/tools/mach-types 2014-10-16 18:47:17.293599000 +0900
@@ -118,6 +118,7 @@
omap_osk MACH_OMAP_OSK OMAP_OSK 515
tosa MACH_TOSA TOSA 520
avila MACH_AVILA AVILA 526
+lsvl MACH_LINKSTATION_LSVL LINKSTATION_LSVL 527
edb9302 MACH_EDB9302 EDB9302 538
husky MACH_HUSKY HUSKY 543
shepherd MACH_SHEPHERD SHEPHERD 545
--- linux-3.17.1/arch/arm/boot/dts/Makefile.orig 2014-10-16 18:34:46.163599000 +0900
+++ linux-3.17.1/arch/arm/boot/dts/Makefile 2014-10-16 18:51:38.813599000 +0900
@@ -126,6 +126,7 @@
kirkwood-laplug.dtb \
kirkwood-lschlv2.dtb \
kirkwood-lsxhl.dtb \
+ kirkwood-lsvl.dtb \
kirkwood-mplcec4.dtb \
kirkwood-mv88f6281gtw-ge.dtb \
kirkwood-net2big.dtb \
--- /dev/null 2014-10-16 17:33:40.698012000 +0900
+++ linux-3.17.1/arch/arm/boot/dts/kirkwood-lsvl.dts 2014-10-16 18:32:38.813599000 +0900
@@ -0,0 +1,240 @@
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+
+/ {
+ model = "Buffalo Linkstation LS-VL";
+ compatible = "buffalo,lsvl", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x10000000>;
+ };
+
+ ocp@f1000000 {
+ serial@12000 {
+ status = "okay";
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ stdout-path = &uart0;
+ };
+
+ ocp@f1000000 {
+ pinctrl: pin-controller@10000 {
+ pmx_power_hdd: pmx-power-hdd {
+ marvell,pins = "mpp8";
+ marvell,function = "gpio";
+ };
+ pmx_usb_vbus: pmx-usb-vbus {
+ marvell,pins = "mpp12";
+ marvell,function = "gpo";
+ };
+ pmx_fan_high: pmx-fan-high {
+ marvell,pins = "mpp16";
+ marvell,function = "gpio";
+ };
+ pmx_fan_low: pmx-fan-low {
+ marvell,pins = "mpp17";
+ marvell,function = "gpio";
+ };
+ pmx_led_function_blue: pmx-led-function-blue {
+ marvell,pins = "mpp39";
+ marvell,function = "gpio";
+ };
+ pmx_led_alarm: pmx-led-alarm {
+ marvell,pins = "mpp36";
+ marvell,function = "gpio";
+ };
+ pmx_led_function_red: pmx-led-function_red {
+ marvell,pins = "mpp37";
+ marvell,function = "gpio";
+ };
+ pmx_led_info: pmx-led-info {
+ marvell,pins = "mpp38";
+ marvell,function = "gpio";
+ };
+ pmx_led_power: pmx-led-power {
+ marvell,pins = "mpp40";
+ marvell,function = "gpio";
+ };
+ pmx_fan_lock: pmx-fan-lock {
+ marvell,pins = "mpp43";
+ marvell,function = "gpio";
+ };
+ pmx_button_function: pmx-button-function {
+ marvell,pins = "mpp45";
+ marvell,function = "gpio";
+ };
+ pmx_power_switch: pmx-power-switch {
+ marvell,pins = "mpp46";
+ marvell,function = "gpio";
+ };
+ pmx_power_auto_switch: pmx-power-auto-switch {
+ marvell,pins = "mpp47";
+ marvell,function = "gpio";
+ };
+
+ };
+ sata@80000 {
+ status = "okay";
+ nr-ports = <1>;
+ };
+
+ spi@10600 {
+ status = "okay";
+
+ m25p40@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "m25p40";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ mode = <0>;
+
+ partition@0 {
+ reg = <0x0 0x60000>;
+ label = "uboot";
+ read-only;
+ };
+
+ partition@60000 {
+ reg = <0x60000 0x10000>;
+ label = "dtb";
+ read-only;
+ };
+
+ partition@70000 {
+ reg = <0x70000 0x10000>;
+ label = "uboot_env";
+ };
+ };
+ };
+ };
+
+ gpio_leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
+ &pmx_led_info &pmx_led_power
+ &pmx_led_function_blue>;
+ pinctrl-names = "default";
+
+ led@1 {
+ label = "lsvl:red:alarm";
+ gpios = <&gpio0 36 GPIO_ACTIVE_LOW>;
+ };
+
+ led@2 {
+ label = "lsvl:red:func";
+ gpios = <&gpio0 37 GPIO_ACTIVE_LOW>;
+ };
+
+ led@3 {
+ label = "lsvl:amber:info";
+ gpios = <&gpio0 38 GPIO_ACTIVE_LOW>;
+ };
+
+ led@4 {
+ label = "lsvl:blue:func";
+ gpios = <&gpio0 39 GPIO_ACTIVE_LOW>;
+ };
+
+ led@5 {
+ label = "lsvl:blue:power";
+ gpios = <&gpio0 40 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&pmx_button_function &pmx_power_switch
+ &pmx_power_auto_switch>;
+ pinctrl-names = "default";
+
+ button@1 {
+ label = "Function Button";
+ linux,code = <KEY_OPTION>;
+ gpios = <&gpio0 45 GPIO_ACTIVE_LOW>;
+ };
+ button@2 {
+ label = "Power-on Switch";
+ linux,code = <KEY_RESERVED>;
+ linux,input-type = <5>;
+ gpios = <&gpio0 46 GPIO_ACTIVE_LOW>;
+ };
+ button@3 {
+ label = "Power-auto Switch";
+ linux,code = <KEY_ESC>;
+ linux,input-type = <5>;
+ gpios = <&gpio0 47 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_fan {
+ compatible = "gpio-fan";
+ pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW
+ &gpio0 16 GPIO_ACTIVE_LOW>;
+ gpio-fan,speed-map = <0 3
+ 1500 2
+ 3250 1
+ 5000 0>;
+ alarm-gpios = <&gpio0 43 GPIO_ACTIVE_HIGH>;
+ };
+
+ restart_poweroff {
+ compatible = "restart-poweroff";
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>;
+ pinctrl-names = "default";
+
+ usb_power: regulator@1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "USB Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 12 0>;
+ };
+ hdd_power: regulator@2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "HDD Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 8 0>;
+ };
+ };
+};
+
+&mdio {
+ status = "okay";
+
+ ethphy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
+
+ð0 {
+ status = "okay";
+ ethernet0-port@0 {
+ phy-handle = <ðphy0>;
+ };
+};
+
--- linux-3.17.1/arch/arm/mach-mvebu/Kconfig.orig 2014-10-16 18:34:30.893599000 +0900
+++ linux-3.17.1/arch/arm/mach-mvebu/Kconfig 2014-10-16 19:05:14.273599000 +0900
@@ -102,6 +102,13 @@
Say 'Y' here if you want your kernel to support boards based
on the Marvell Kirkwood device tree.
+config MACH_LINKSTATION_LSVL
+ bool "Buffalo LS-VL Series"
+ depends on MACH_KIRKWOOD
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo LS-VL Series.
+
config MACH_NETXBIG
bool "LaCie 2Big and 5Big Network v2"
depends on MACH_KIRKWOOD
--- linux-3.17.1/arch/arm/mach-mvebu/Makefile.orig 2014-10-16 18:35:15.273599000 +0900
+++ linux-3.17.1/arch/arm/mach-mvebu/Makefile 2014-10-16 19:06:00.893599000 +0900
@@ -13,4 +13,5 @@
obj-$(CONFIG_MACH_DOVE) += dove.o
obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
+obj-$(CONFIG_MACH_LINKSTATION_LSVL) += board-lsvl.o
obj-$(CONFIG_MACH_NETXBIG) += netxbig.o
--- linux-3.17.1/arch/arm/mach-mvebu/board.h.orig 2014-10-16 18:39:07.693599000 +0900
+++ linux-3.17.1/arch/arm/mach-mvebu/board.h 2014-10-16 18:58:03.803599000 +0900
@@ -13,6 +13,12 @@
#ifndef __ARCH_MVEBU_BOARD_H
#define __ARCH_MVEBU_BOARD_H
+#ifdef CONFIG_MACH_LINKSTATION_LSVL
+void lsvl_init(void);
+#else
+static inline void lsvl_init(void) {};
+#endif
+
#ifdef CONFIG_MACH_NETXBIG
void netxbig_init(void);
#else
--- linux-3.17.1/arch/arm/mach-mvebu/kirkwood.c.orig 2014-10-16 18:36:19.043599000 +0900
+++ linux-3.17.1/arch/arm/mach-mvebu/kirkwood.c 2014-10-16 22:58:24.196673000 +0900
@@ -180,6 +180,9 @@
kirkwood_pm_init();
kirkwood_dt_eth_fixup();
+ if (of_machine_is_compatible("buffalo,lsvl"))
+ lsvl_init();
+
if (of_machine_is_compatible("lacie,netxbig"))
netxbig_init();
--- /dev/null 2014-10-16 21:54:30.736509000 +0900
+++ linux-3.17.1/arch/arm/mach-mvebu/board-lsvl.c 2014-10-16 18:37:31.223599000 +0900
@@ -0,0 +1,175 @@
+/*
+ * arch/arm/mach-mvbu/board-lsvl.c
+ *
+ * Buffalo LS-VL Series Setup
+ *
+ * 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 <linux/kernel.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include "common.h"
+
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/gpio-fan.h>
+
+/*****************************************************************************
+ * General Setup
+ ****************************************************************************/
+//LEDs
+#define LSVL_GPIO_LED_ALARM 36
+#define LSVL_GPIO_LED_FUNC_RED 37
+#define LSVL_GPIO_LED_INFO 38
+#define LSVL_GPIO_LED_FUNC_BLUE 39
+#define LSVL_GPIO_LED_PWR 40
+
+// Keys
+#define LSVL_GPIO_KEY_FUNC 45
+#define LSVL_GPIO_KEY_POWER 46
+#define LSVL_GPIO_KEY_AUTOPOWER 47
+
+//Fan
+#define LSVL_GPIO_FAN_HIGH 16
+#define LSVL_GPIO_FAN_LOW 17
+#define LSVL_GPIO_FAN_LOCK 43
+
+/*****************************************************************************
+ * LEDs attached to GPIO
+ ****************************************************************************/
+static struct gpio_led lsvl_led_pins[] = {
+ {
+ .name = "lsvl:red:alarm",
+ .gpio = LSVL_GPIO_LED_ALARM,
+ },
+ {
+ .name = "lsvl:red:func",
+ .gpio = LSVL_GPIO_LED_FUNC_RED,
+ },
+ {
+ .name = "lsvl:amber:info",
+ .gpio = LSVL_GPIO_LED_INFO,
+ },
+ {
+ .name = "lsvl:blue:func",
+ .gpio = LSVL_GPIO_LED_FUNC_BLUE,
+ },
+
+ {
+ .name = "lsvl:blue:power",
+ .default_trigger = "default-on",
+ .gpio = LSVL_GPIO_LED_PWR,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_led_platform_data lsvl_led_data = {
+ .leds = lsvl_led_pins,
+ .num_leds = ARRAY_SIZE(lsvl_led_pins),
+};
+
+static struct platform_device lsvl_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &lsvl_led_data,
+ }
+};
+
+
+/*****************************************************************************
+ * GPIO Attached Keys
+ ****************************************************************************/
+static struct gpio_keys_button lsvl_buttons[] = {
+ {
+ .type = EV_SW,
+ .code = KEY_RESERVED,
+ .gpio = LSVL_GPIO_KEY_POWER,
+ .desc = "Power-on Switch",
+ .active_low = 1,
+ }, {
+ .type = EV_SW,
+ .code = KEY_ESC,
+ .gpio = LSVL_GPIO_KEY_AUTOPOWER,
+ .desc = "Power-auto Switch",
+ .active_low = 1,
+ }, {
+ .type = EV_KEY,
+ .code = KEY_OPTION,
+ .gpio = LSVL_GPIO_KEY_FUNC,
+ .desc = "Function Button",
+ .active_low = 1,
+ },
+};
+
+static struct gpio_keys_platform_data lsvl_button_data = {
+ .buttons = lsvl_buttons,
+ .nbuttons = ARRAY_SIZE(lsvl_buttons),
+};
+
+static struct platform_device lsvl_button_device = {
+ .name = "gpio-keys",
+ .id = -1,
+ .num_resources = 0,
+ .dev = {
+ .platform_data = &lsvl_button_data,
+ },
+};
+
+/*****************************************************************************
+ * GPIO Fan
+ ****************************************************************************/
+static struct gpio_fan_alarm lsvl_alarm = {
+ .gpio = LSVL_GPIO_FAN_LOCK,
+};
+
+static struct gpio_fan_speed lsvl_speeds[] = {
+ {
+ .rpm = 0,
+ .ctrl_val = 3,
+ }, {
+ .rpm = 1500,
+ .ctrl_val = 1,
+ }, {
+ .rpm = 3250,
+ .ctrl_val = 2,
+ }, {
+ .rpm = 5000,
+ .ctrl_val = 0,
+ }
+};
+
+static int lsvl_gpio_list[] = {
+ LSVL_GPIO_FAN_HIGH, LSVL_GPIO_FAN_LOW,
+};
+
+static struct gpio_fan_platform_data lsvl_fan_data = {
+ .num_ctrl = ARRAY_SIZE(lsvl_gpio_list),
+ .ctrl = lsvl_gpio_list,
+ .alarm = &lsvl_alarm,
+ .num_speed = ARRAY_SIZE(lsvl_speeds),
+ .speed = lsvl_speeds,
+};
+
+static struct platform_device lsvl_fan_device = {
+ .name = "gpio-fan",
+ .id = -1,
+ .num_resources = 0,
+ .dev = {
+ .platform_data = &lsvl_fan_data,
+ },
+};
+
+
+void __init lsvl_init(void)
+{
+ platform_device_register(&lsvl_button_device);
+ platform_device_register(&lsvl_leds);
+ platform_device_register(&lsvl_fan_device);
+}
14/10/29(水) 20:28:40 投稿者[BabaPena] [No.6246]のスレッド内
- 【No.6252】 タイトル[Re: LS-VLシリーズのkernel3.17.1パッチ]
【No.6246】に対する返信
- >バニラはmach-kirkwoodをmach-mvebuに統合してくれたおかげで私のLS-XHLが起動しません(泣)
>88f6282のLS-VLはばっちり動かしましたのでpatchを載せます。
>「make mvebu_v5_defconfig」と「System Type --->[*] Marvell Engineering Business Unit (MVEBU) SoCs --->[*] Marvell Kirkwood boards [*] Buffalo LS-VL Series」を忘れずに。
>DTBをつかうので、
># make kirkwood-lsvl.dtb
># cat arch/arm/boot/zImage arch/arm/boot//dts/kirkwood-lsvl.dtb > arch/arm/boot/zImage_w_dtb
># mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-3.0' -d arch/arm/boot/zImage_w_dtb arch/arm/boot/uImage.buffalo
>kernelでコマンド渡せるので、MTDもdebian謹製「uboot-envtools」でいじくれます。
>
>-----
>--- linux-3.17.1/arch/arm/tools/mach-types.orig 2014-10-16 18:35:51.463599000 +0900
>+++ linux-3.17.1/arch/arm/tools/mach-types 2014-10-16 18:47:17.293599000 +0900
>@@ -118,6 +118,7 @@
> omap_osk MACH_OMAP_OSK OMAP_OSK 515
> tosa MACH_TOSA TOSA 520
> avila MACH_AVILA AVILA 526
>+lsvl MACH_LINKSTATION_LSVL LINKSTATION_LSVL 527
> edb9302 MACH_EDB9302 EDB9302 538
> husky MACH_HUSKY HUSKY 543
> shepherd MACH_SHEPHERD SHEPHERD 545
>--- linux-3.17.1/arch/arm/boot/dts/Makefile.orig 2014-10-16 18:34:46.163599000 +0900
>+++ linux-3.17.1/arch/arm/boot/dts/Makefile 2014-10-16 18:51:38.813599000 +0900
>@@ -126,6 +126,7 @@
> kirkwood-laplug.dtb \
> kirkwood-lschlv2.dtb \
> kirkwood-lsxhl.dtb \
>+ kirkwood-lsvl.dtb \
> kirkwood-mplcec4.dtb \
> kirkwood-mv88f6281gtw-ge.dtb \
> kirkwood-net2big.dtb \
>--- /dev/null 2014-10-16 17:33:40.698012000 +0900
>+++ linux-3.17.1/arch/arm/boot/dts/kirkwood-lsvl.dts 2014-10-16 18:32:38.813599000 +0900
>@@ -0,0 +1,240 @@
>+/dts-v1/;
>+
>+#include "kirkwood.dtsi"
>+#include "kirkwood-6282.dtsi"
>+
>+/ {
>+ model = "Buffalo Linkstation LS-VL";
>+ compatible = "buffalo,lsvl", "marvell,kirkwood-88f6282", "marvell,kirkwood";
>+
>+ memory {
>+ device_type = "memory";
>+ reg = <0x00000000 0x10000000>;
>+ };
>+
>+ ocp@f1000000 {
>+ serial@12000 {
>+ status = "okay";
>+ };
>+ };
>+
>+ chosen {
>+ bootargs = "console=ttyS0,115200n8 earlyprintk";
>+ stdout-path = &uart0;
>+ };
>+
>+ ocp@f1000000 {
>+ pinctrl: pin-controller@10000 {
>+ pmx_power_hdd: pmx-power-hdd {
>+ marvell,pins = "mpp8";
>+ marvell,function = "gpio";
>+ };
>+ pmx_usb_vbus: pmx-usb-vbus {
>+ marvell,pins = "mpp12";
>+ marvell,function = "gpo";
>+ };
>+ pmx_fan_high: pmx-fan-high {
>+ marvell,pins = "mpp16";
>+ marvell,function = "gpio";
>+ };
>+ pmx_fan_low: pmx-fan-low {
>+ marvell,pins = "mpp17";
>+ marvell,function = "gpio";
>+ };
>+ pmx_led_function_blue: pmx-led-function-blue {
>+ marvell,pins = "mpp39";
>+ marvell,function = "gpio";
>+ };
>+ pmx_led_alarm: pmx-led-alarm {
>+ marvell,pins = "mpp36";
>+ marvell,function = "gpio";
>+ };
>+ pmx_led_function_red: pmx-led-function_red {
>+ marvell,pins = "mpp37";
>+ marvell,function = "gpio";
>+ };
>+ pmx_led_info: pmx-led-info {
>+ marvell,pins = "mpp38";
>+ marvell,function = "gpio";
>+ };
>+ pmx_led_power: pmx-led-power {
>+ marvell,pins = "mpp40";
>+ marvell,function = "gpio";
>+ };
>+ pmx_fan_lock: pmx-fan-lock {
>+ marvell,pins = "mpp43";
>+ marvell,function = "gpio";
>+ };
>+ pmx_button_function: pmx-button-function {
>+ marvell,pins = "mpp45";
>+ marvell,function = "gpio";
>+ };
>+ pmx_power_switch: pmx-power-switch {
>+ marvell,pins = "mpp46";
>+ marvell,function = "gpio";
>+ };
>+ pmx_power_auto_switch: pmx-power-auto-switch {
>+ marvell,pins = "mpp47";
>+ marvell,function = "gpio";
>+ };
>+
>+ };
>+ sata@80000 {
>+ status = "okay";
>+ nr-ports = <1>;
>+ };
>+
>+ spi@10600 {
>+ status = "okay";
>+
>+ m25p40@0 {
>+ #address-cells = <1>;
>+ #size-cells = <1>;
>+ compatible = "m25p40";
>+ reg = <0>;
>+ spi-max-frequency = <25000000>;
>+ mode = <0>;
>+
>+ partition@0 {
>+ reg = <0x0 0x60000>;
>+ label = "uboot";
>+ read-only;
>+ };
>+
>+ partition@60000 {
>+ reg = <0x60000 0x10000>;
>+ label = "dtb";
>+ read-only;
>+ };
>+
>+ partition@70000 {
>+ reg = <0x70000 0x10000>;
>+ label = "uboot_env";
>+ };
>+ };
>+ };
>+ };
>+
>+ gpio_leds {
>+ compatible = "gpio-leds";
>+ pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
>+ &pmx_led_info &pmx_led_power
>+ &pmx_led_function_blue>;
>+ pinctrl-names = "default";
>+
>+ led@1 {
>+ label = "lsvl:red:alarm";
>+ gpios = <&gpio0 36 GPIO_ACTIVE_LOW>;
>+ };
>+
>+ led@2 {
>+ label = "lsvl:red:func";
>+ gpios = <&gpio0 37 GPIO_ACTIVE_LOW>;
>+ };
>+
>+ led@3 {
>+ label = "lsvl:amber:info";
>+ gpios = <&gpio0 38 GPIO_ACTIVE_LOW>;
>+ };
>+
>+ led@4 {
>+ label = "lsvl:blue:func";
>+ gpios = <&gpio0 39 GPIO_ACTIVE_LOW>;
>+ };
>+
>+ led@5 {
>+ label = "lsvl:blue:power";
>+ gpios = <&gpio0 40 GPIO_ACTIVE_LOW>;
>+ default-state = "keep";
>+ };
>+ };
>+
>+ gpio_keys {
>+ compatible = "gpio-keys";
>+ pinctrl-0 = <&pmx_button_function &pmx_power_switch
>+ &pmx_power_auto_switch>;
>+ pinctrl-names = "default";
>+
>+ button@1 {
>+ label = "Function Button";
>+ linux,code = <KEY_OPTION>;
>+ gpios = <&gpio0 45 GPIO_ACTIVE_LOW>;
>+ };
>+ button@2 {
>+ label = "Power-on Switch";
>+ linux,code = <KEY_RESERVED>;
>+ linux,input-type = <5>;
>+ gpios = <&gpio0 46 GPIO_ACTIVE_LOW>;
>+ };
>+ button@3 {
>+ label = "Power-auto Switch";
>+ linux,code = <KEY_ESC>;
>+ linux,input-type = <5>;
>+ gpios = <&gpio0 47 GPIO_ACTIVE_LOW>;
>+ };
>+ };
>+
>+ gpio_fan {
>+ compatible = "gpio-fan";
>+ pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
>+ pinctrl-names = "default";
>+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW
>+ &gpio0 16 GPIO_ACTIVE_LOW>;
>+ gpio-fan,speed-map = <0 3
>+ 1500 2
>+ 3250 1
>+ 5000 0>;
>+ alarm-gpios = <&gpio0 43 GPIO_ACTIVE_HIGH>;
>+ };
>+
>+ restart_poweroff {
>+ compatible = "restart-poweroff";
>+ };
>+
>+ regulators {
>+ compatible = "simple-bus";
>+ #address-cells = <1>;
>+ #size-cells = <0>;
>+ pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>;
>+ pinctrl-names = "default";
>+
>+ usb_power: regulator@1 {
>+ compatible = "regulator-fixed";
>+ reg = <1>;
>+ regulator-name = "USB Power";
>+ regulator-min-microvolt = <5000000>;
>+ regulator-max-microvolt = <5000000>;
>+ enable-active-high;
>+ regulator-always-on;
>+ regulator-boot-on;
>+ gpio = <&gpio0 12 0>;
>+ };
>+ hdd_power: regulator@2 {
>+ compatible = "regulator-fixed";
>+ reg = <2>;
>+ regulator-name = "HDD Power";
>+ regulator-min-microvolt = <5000000>;
>+ regulator-max-microvolt = <5000000>;
>+ enable-active-high;
>+ regulator-always-on;
>+ regulator-boot-on;
>+ gpio = <&gpio0 8 0>;
>+ };
>+ };
>+};
>+
>+&mdio {
>+ status = "okay";
>+
>+ ethphy0: ethernet-phy@0 {
>+ reg = <0>;
>+ };
>+};
>+
>+ð0 {
>+ status = "okay";
>+ ethernet0-port@0 {
>+ phy-handle = <ðphy0>;
>+ };
>+};
>+
>--- linux-3.17.1/arch/arm/mach-mvebu/Kconfig.orig 2014-10-16 18:34:30.893599000 +0900
>+++ linux-3.17.1/arch/arm/mach-mvebu/Kconfig 2014-10-16 19:05:14.273599000 +0900
>@@ -102,6 +102,13 @@
> Say 'Y' here if you want your kernel to support boards based
> on the Marvell Kirkwood device tree.
>
>+config MACH_LINKSTATION_LSVL
>+ bool "Buffalo LS-VL Series"
>+ depends on MACH_KIRKWOOD
>+ help
>+ Say 'Y' here if you want your kernel to support the
>+ Buffalo LS-VL Series.
>+
> config MACH_NETXBIG
> bool "LaCie 2Big and 5Big Network v2"
> depends on MACH_KIRKWOOD
>--- linux-3.17.1/arch/arm/mach-mvebu/Makefile.orig 2014-10-16 18:35:15.273599000 +0900
>+++ linux-3.17.1/arch/arm/mach-mvebu/Makefile 2014-10-16 19:06:00.893599000 +0900
>@@ -13,4 +13,5 @@
>
> obj-$(CONFIG_MACH_DOVE) += dove.o
> obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
>+obj-$(CONFIG_MACH_LINKSTATION_LSVL) += board-lsvl.o
> obj-$(CONFIG_MACH_NETXBIG) += netxbig.o
>--- linux-3.17.1/arch/arm/mach-mvebu/board.h.orig 2014-10-16 18:39:07.693599000 +0900
>+++ linux-3.17.1/arch/arm/mach-mvebu/board.h 2014-10-16 18:58:03.803599000 +0900
>@@ -13,6 +13,12 @@
> #ifndef __ARCH_MVEBU_BOARD_H
> #define __ARCH_MVEBU_BOARD_H
>
>+#ifdef CONFIG_MACH_LINKSTATION_LSVL
>+void lsvl_init(void);
>+#else
>+static inline void lsvl_init(void) {};
>+#endif
>+
> #ifdef CONFIG_MACH_NETXBIG
> void netxbig_init(void);
> #else
>--- linux-3.17.1/arch/arm/mach-mvebu/kirkwood.c.orig 2014-10-16 18:36:19.043599000 +0900
>+++ linux-3.17.1/arch/arm/mach-mvebu/kirkwood.c 2014-10-16 22:58:24.196673000 +0900
>@@ -180,6 +180,9 @@
> kirkwood_pm_init();
> kirkwood_dt_eth_fixup();
>
>+ if (of_machine_is_compatible("buffalo,lsvl"))
>+ lsvl_init();
>+
> if (of_machine_is_compatible("lacie,netxbig"))
> netxbig_init();
>
>--- /dev/null 2014-10-16 21:54:30.736509000 +0900
>+++ linux-3.17.1/arch/arm/mach-mvebu/board-lsvl.c 2014-10-16 18:37:31.223599000 +0900
>@@ -0,0 +1,175 @@
>+/*
>+ * arch/arm/mach-mvbu/board-lsvl.c
>+ *
>+ * Buffalo LS-VL Series Setup
>+ *
>+ * 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 <linux/kernel.h>
>+#include <linux/of.h>
>+#include <linux/platform_device.h>
>+#include "common.h"
>+
>+#include <linux/leds.h>
>+#include <linux/gpio.h>
>+#include <linux/gpio_keys.h>
>+#include <linux/input.h>
>+#include <linux/gpio-fan.h>
>+
>+/*****************************************************************************
>+ * General Setup
>+ ****************************************************************************/
>+//LEDs
>+#define LSVL_GPIO_LED_ALARM 36
>+#define LSVL_GPIO_LED_FUNC_RED 37
>+#define LSVL_GPIO_LED_INFO 38
>+#define LSVL_GPIO_LED_FUNC_BLUE 39
>+#define LSVL_GPIO_LED_PWR 40
>+
>+// Keys
>+#define LSVL_GPIO_KEY_FUNC 45
>+#define LSVL_GPIO_KEY_POWER 46
>+#define LSVL_GPIO_KEY_AUTOPOWER 47
>+
>+//Fan
>+#define LSVL_GPIO_FAN_HIGH 16
>+#define LSVL_GPIO_FAN_LOW 17
>+#define LSVL_GPIO_FAN_LOCK 43
>+
>+/*****************************************************************************
>+ * LEDs attached to GPIO
>+ ****************************************************************************/
>+static struct gpio_led lsvl_led_pins[] = {
>+ {
>+ .name = "lsvl:red:alarm",
>+ .gpio = LSVL_GPIO_LED_ALARM,
>+ },
>+ {
>+ .name = "lsvl:red:func",
>+ .gpio = LSVL_GPIO_LED_FUNC_RED,
>+ },
>+ {
>+ .name = "lsvl:amber:info",
>+ .gpio = LSVL_GPIO_LED_INFO,
>+ },
>+ {
>+ .name = "lsvl:blue:func",
>+ .gpio = LSVL_GPIO_LED_FUNC_BLUE,
>+ },
>+
>+ {
>+ .name = "lsvl:blue:power",
>+ .default_trigger = "default-on",
>+ .gpio = LSVL_GPIO_LED_PWR,
>+ .active_low = 1,
>+ },
>+};
>+
>+static struct gpio_led_platform_data lsvl_led_data = {
>+ .leds = lsvl_led_pins,
>+ .num_leds = ARRAY_SIZE(lsvl_led_pins),
>+};
>+
>+static struct platform_device lsvl_leds = {
>+ .name = "leds-gpio",
>+ .id = -1,
>+ .dev = {
>+ .platform_data = &lsvl_led_data,
>+ }
>+};
>+
>+
>+/*****************************************************************************
>+ * GPIO Attached Keys
>+ ****************************************************************************/
>+static struct gpio_keys_button lsvl_buttons[] = {
>+ {
>+ .type = EV_SW,
>+ .code = KEY_RESERVED,
>+ .gpio = LSVL_GPIO_KEY_POWER,
>+ .desc = "Power-on Switch",
>+ .active_low = 1,
>+ }, {
>+ .type = EV_SW,
>+ .code = KEY_ESC,
>+ .gpio = LSVL_GPIO_KEY_AUTOPOWER,
>+ .desc = "Power-auto Switch",
>+ .active_low = 1,
>+ }, {
>+ .type = EV_KEY,
>+ .code = KEY_OPTION,
>+ .gpio = LSVL_GPIO_KEY_FUNC,
>+ .desc = "Function Button",
>+ .active_low = 1,
>+ },
>+};
>+
>+static struct gpio_keys_platform_data lsvl_button_data = {
>+ .buttons = lsvl_buttons,
>+ .nbuttons = ARRAY_SIZE(lsvl_buttons),
>+};
>+
>+static struct platform_device lsvl_button_device = {
>+ .name = "gpio-keys",
>+ .id = -1,
>+ .num_resources = 0,
>+ .dev = {
>+ .platform_data = &lsvl_button_data,
>+ },
>+};
>+
>+/*****************************************************************************
>+ * GPIO Fan
>+ ****************************************************************************/
>+static struct gpio_fan_alarm lsvl_alarm = {
>+ .gpio = LSVL_GPIO_FAN_LOCK,
>+};
>+
>+static struct gpio_fan_speed lsvl_speeds[] = {
>+ {
>+ .rpm = 0,
>+ .ctrl_val = 3,
>+ }, {
>+ .rpm = 1500,
>+ .ctrl_val = 1,
>+ }, {
>+ .rpm = 3250,
>+ .ctrl_val = 2,
>+ }, {
>+ .rpm = 5000,
>+ .ctrl_val = 0,
>+ }
>+};
>+
>+static int lsvl_gpio_list[] = {
>+ LSVL_GPIO_FAN_HIGH, LSVL_GPIO_FAN_LOW,
>+};
>+
>+static struct gpio_fan_platform_data lsvl_fan_data = {
>+ .num_ctrl = ARRAY_SIZE(lsvl_gpio_list),
>+ .ctrl = lsvl_gpio_list,
>+ .alarm = &lsvl_alarm,
>+ .num_speed = ARRAY_SIZE(lsvl_speeds),
>+ .speed = lsvl_speeds,
>+};
>+
>+static struct platform_device lsvl_fan_device = {
>+ .name = "gpio-fan",
>+ .id = -1,
>+ .num_resources = 0,
>+ .dev = {
>+ .platform_data = &lsvl_fan_data,
>+ },
>+};
>+
>+
>+void __init lsvl_init(void)
>+{
>+ platform_device_register(&lsvl_button_device);
>+ platform_device_register(&lsvl_leds);
>+ platform_device_register(&lsvl_fan_device);
>+}
>
Thanks to the author for shared patch. A lot of time trying to make a patch, but I should issue.
Output from dmesg overflows with the following message:
----------------------------------------------------------------------
mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
----------------------------------------------------------------------
I understand the problem is solved with a patch file i2c-mv64xxx.c I found a solution here:
http://code.google.com/p/alt-f/source/browse/branches/0.1RC4.1/toolchain/kernel-headers/linux-3.10.32-i2c-mv64xxx.c.patch
Unfortunately, this patch is applicable only for kernel 3.10.X
Please if you have a solution for kernel 3.17 share it.
Thanks!
14/11/02(日) 01:15:42 投稿者[BabaPena] [No.6246]のスレッド内
- 【No.6256】 タイトル[Re: TO BabaPena]
【No.6255】に対する返信
- Thanks for your reply!
I have no comment about the errors you’ve mentioned, because I’ve never experienced such.
I’m guessing that there’s probably some sort of error on menuconfig level.
As for the endless restarting I did mention in my previous post that I’m sure it does exist
for all Marvell network adapter devices, even for those that by default are supported by
Mainline Kernel. Error messages begin to pile up a few minutes after the restart of the
device and for 24 hours they reach 850+ lines within dmseg. This can be easily seen without
serial access even if Webmin is not installed in the terminal with the command:
dmesg | grep -i eth0 (or eth1) . The problem shouldn’t be underestimated, because due to that
CPU time is being taken and the logs of all installed applications which are monitoring
the network begin to fill up with unnecessary trash.
14/11/02(日) 19:14:34 投稿者[通りすがり] [No.6246]のスレッド内
- 【No.6257】 タイトル[Re: TO BabaPena]
【No.6256】に対する返信
- I'm sorry,I had been a misunderstanding .
I don't have these Ethernet errors on LS-XHL,LS-VL.
if you're connected to the network with LS-VL, you will not wrong "make menuconfig".
Network related settings will not be.
Did You delete "/etc/udev/rules.d/70-persistent-net.rules"?
Becouse LS-XHL has changed from eth1 to eth0.(From Kernel 3.16)
But if You have LS-VL,You should deleted "/etc/udev/rules.d/70-persistent-net.rules",too.
In the first place,I don't understand what you are talking about device!
Anyway,I write "make menuconfig" settings・
-----
-*- Enable the block layer --->
Partition Types --->
[*] Advanced partition selection
[*] EFI GUID Partition support
[*] Command line partition support
System Type --->
[*] Marvell Engineering Business Unit (MVEBU) SoCs --->
[*] Marvell Kirkwood boards
[*] Buffalo LS-VL Series
Boot options --->
[*]Use appended device tree blob to zImage (EXPERIMENTAL)
[*] Supplement the appended DTB with traditional ATAG information
Kernel command line type (Use bootloader kernel arguments
Device Drivers --->
<M>Hardware Monitoring support --->
<M> GPIO fan
File systems --->
<*> The Extended 4 (ext4) filesystem
[*] Use ext4 for ext2/ext3 file systems (NEW)
-----
make mvebu_v5_defconfig make menuconfig zImage modules kirkwood-lsvl.dtb modules_install
cat arch/arm/boot/zImage arch/arm/boot/dts/kirkwood-lsvl.dtb >arch/arm/boot/zImage_w_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-3.0' -d arch/arm/boot/zImage_w_dtb arch/arm/boot/uImage.buffalo
14/10/28(火) 04:31:40 投稿者[toyo36jeff] [No.6246]のスレッド内
- 【No.6250】 タイトル[kernel3.17.1パッチの公開ありがとうございます]
【No.6246】に対する返信
- 自分なりに、コンパイルした流れをまとめました。
@ カーネル3.17.1をダウンロードし、解凍する。
Aパッチを当てる。(変更する。)
B make mrproperを実行する。
C make mvebu_v5_defconfigを実行する。
D make ARCH=arm menuconfigを実行する。
ここで、「System Type --->[*] Marvell Engineering Business Unit (MVEBU) SoCs --->[*] Marvell Kirkwood boards [*] Buffalo LS-VL Series」
また、File systemsのところで、XFS filesystem supportにチェックを入れる。
E make ARCH=arm zImageを実行する。
F make kirkwood-lsvl.dtb を実行する。
G cat arch/arm/boot/zImage arch/arm/boot//dts/kirkwood-lsvl.dtb > arch/arm/boot/zImage_w_dtbを実行する。
H mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-3.0' -d arch/arm/boot/zImage_w_dtb arch/arm/boot/uImage.buffalo を実行する。
I make ARCH=arm modules を実行する。
J make ARCH=arm modules_install INSTALL_MOD_PATH=my_modulesを実行する。
K 空のinitrd.buffaloとHで出来たuImage.buffaloを/bootに置く。
L my_modules/lib/modules内の3.17.1を/lib/modules/に丸ごとコピーする。
M depmod -aを実行する。
なにか、ご指摘があればお願いします。
それと、initrd.buffaloですけど、私が以前LS-HGLのコンパイルで使った「空のinitrd.buffalo」でOKでしょうか。コンパイルまでで、まだ、カーネルの入れ替えはいていません。
14/10/28(火) 09:53:41 投稿者[通りすがり] [No.6246]のスレッド内
- 【No.6251】 タイトル[Re: kernel3.17.1パッチの公開ありがとうございます]
【No.6250】に対する返信
- 初物kernelに「make mrproper」は不要。
セルフコンパイルならmodules_installに「INSTALL_MOD_PATH=my_modules」つけて「cp」するのは煩雑。
空のinitrd.buffaloはARMなので行けそうだけど拾い物なら、自分で作った方が吉。
検索すれば偉大なる先人達のページが見つかるはずです。
14/10/26(日) 21:45:13 投稿者[通りすがり] [No.6246]のスレッド内
- 【No.6249】 タイトル[kernel3.16からARM armv5telのtcp-segmentation-offload デフォルトでONなのでご注意を]
【No.6246】に対する返信
- 特にsambaは使い物になりません。
対策は
# ethtool -K eth0 tso off
恒久的に無効にするには
# vi /etc/udev/rules.d/50-eth.rules
---
# Disable TCP segmentation offload due to bugs
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/sbin/ethtool -K %k tso off"
---
※xhlとchlは「eth1」になります。
確認は、
# ethtool -k eth0 | grep tcp
---
tcp-segmentation-offload: off
tx-tcp-segmentation: off
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]