ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
PATCH 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
Here're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- turn on power led from initial state, by change pin to active_high from active_low.
- fix for alarm pin of gpio-fan.
--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts +4 -5
@@ -1,7 +1,8 @@ /* * Device Tree file for Buffalo Linkstation LS-WTGL * - * Copyright (C) 2015, Roger Shimizu <[email protected]> + * Copyright (C) 2015, 2016 + * Roger Shimizu <[email protected]> * * 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
@@ -69,8 +70,6 @@ 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 {
@@ -161,7 +160,7 @@ led at 1 { label = "lswtgl:blue:power"; - gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; }; led at 2 {
@@ -188,7 +187,7 @@ 3250 1 5000 0>; - alarm-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; restart_poweroff {
Signature · 1 line
2.1.4
PATCH 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
Quoted 1 line · Roger Shimizu
Sorry, I forgot to append the "Fixes" tag, as below.
Cheers,
Roger
PATCH v2 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
In reply to Roger ShimizuHere're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- keep initial state of power led
- fix for alarm pin of gpio-fan.
--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts +4 -4
@@ -1,7 +1,8 @@ /* * Device Tree file for Buffalo Linkstation LS-WTGL * - * Copyright (C) 2015, Roger Shimizu <[email protected]> + * Copyright (C) 2015, 2016 + * Roger Shimizu <[email protected]> * * 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
@@ -69,8 +70,6 @@ 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 {
@@ -162,6 +161,7 @@ led at 1 { label = "lswtgl:blue:power"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + default-state = "keep"; }; led at 2 {
@@ -188,7 +188,7 @@ 3250 1 5000 0>; - alarm-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; restart_poweroff {
Signature · 1 line
2.1.4
PATCH v2 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
Quoted 11 lines · Roger Shimizu
Here're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- keep initial state of power led
- fix for alarm pin of gpio-fan.Fixes dc57844a736f ("ARM: dts: orion5x: add buffalo linkstation ls-wtgl")Signed-off-by Roger Shimizu <[email protected]>--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Dear Andrew,
Could you kindly review this patch, please?
It's fixing the similar things as for kirkwood-lswxl.dts [0], which is already reviewed OK.
Thank you all the time!
[0]: http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/400933.html
Cheers
PATCH v2 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
In reply to Roger ShimizuQuoted 8 lines · Roger Shimizu
Here're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- keep initial state of power led
- fix for alarm pin of gpio-fan.Fixes dc57844a736f ("ARM: dts: orion5x: add buffalo linkstation ls-wtgl")Signed-off-by Roger Shimizu <[email protected]>
Andrew
Quoted 47 lines
--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts +4
-4@@ -1,7 +1,8 @@ /* * Device Tree file for Buffalo Linkstation LS-WTGL * - * Copyright (C) 2015, Roger Shimizu <[email protected]> + * Copyright (C) 2015, 2016 + * Roger Shimizu <[email protected]> * * 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@@ -69,8 +70,6 @@ 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 {@@ -162,6 +161,7 @@ led at 1 { label = "lswtgl:blue:power"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + default-state = "keep"; }; led at 2 {@@ -188,7 +188,7 @@ 3250 1 5000 0>; - alarm-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; restart_poweroff {Signature · 1 line
2.1.4
PATCH v2 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
In reply to Roger ShimizuHi Roger,
Quoted 8 lines · Roger Shimizu
Here're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- keep initial state of power led
- fix for alarm pin of gpio-fan.Fixes dc57844a736f ("ARM: dts: orion5x: add buffalo linkstation ls-wtgl")Signed-off-by Roger Shimizu <[email protected]>
Applied on mvebu/fixes with Andrew Reviewed-by tag
Thanks,
Gregory
Quoted 47 lines
--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts +4
-4@@ -1,7 +1,8 @@ /* * Device Tree file for Buffalo Linkstation LS-WTGL * - * Copyright (C) 2015, Roger Shimizu <[email protected]> + * Copyright (C) 2015, 2016 + * Roger Shimizu <[email protected]> * * 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@@ -69,8 +70,6 @@ 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 {@@ -162,6 +161,7 @@ led at 1 { label = "lswtgl:blue:power"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + default-state = "keep"; }; led at 2 {@@ -188,7 +188,7 @@ 3250 1 5000 0>; - alarm-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; restart_poweroff {Signature · 1 line
2.1.4
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
Dear Andrew, Gregory,
Quoted 10 lines · Gregory CLEMENT
Hi Roger,
Quoted 6 lines · Roger Shimizu
Here're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- keep initial state of power led
- fix for alarm pin of gpio-fan.
Quoted 4 lines
Quoted 2 lines
Fixes dc57844a736f ("ARM: dts: orion5x: add buffalo linkstation ls-wtgl")Signed-off-by Roger Shimizu <[email protected]>Applied on mvebu/fixes with Andrew Reviewed-by tag
Thanks for the review and apply of my patch!
After this patch, now there's not any error/warning in dmesg. I feel great!
However, there's still one thing missing, the MTD, which stores the u-boot environment.
Maybe you're not the right person to ask this question, but I believe you know how to reach the right one.
Please help, or forward to the right person for me. Thank you!
For the kirkwood based Linkstation, such as LS-WXL or LS-WVL, the MTD is a spi/m25p40 device.
But for LS-WTGL orion5x based Linkstation, I tried a few ways, still cannot get the MTD device out.
I also referred the orion5x-rd88f5182-nas.dts, to add devbus_bootcs/devbus_cs1, but didn't work.
The MTD working kernel is a patch for kernel 2.6, which is not DTB,
but in lagacy way.
The patch can be get from:
- https://github.com/rogers0/linux-2.6_squeeze-security/blob/master/debian/patches/features/arm/ls-produo/01_ls-produo_driver.patch
MTD related part seems like:
+#define LSPRODUO_NOR_BOOT_BASE 0xf4000000
+#define LSPRODUO_NOR_BOOT_SIZE SZ_256K
+static struct resource lsproduo_nor_flash_resource = {
+ .flags = IORESOURCE_MEM,
+ .start = LSPRODUO_NOR_BOOT_BASE,
+ .end = LSPRODUO_NOR_BOOT_BASE + LSPRODUO_NOR_BOOT_SIZE - 1, +};
+static struct platform_device lsproduo_nor_flash = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &lsproduo_nor_flash_data,
+ },
+ .num_resources = 1,
+ .resource = &lsproduo_nor_flash_resource, +};
+ orion5x_setup_dev_boot_win(LSPRODUO_NOR_BOOT_BASE,
+ LSPRODUO_NOR_BOOT_SIZE);
+ platform_device_register(&lsproduo_nor_flash);
I'd appreciate your help!
Cheers,
Roger
PATCH v2 1/1 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
Quoted 34 lines · Roger Shimizu
However, there's still one thing missing, the MTD, which stores the u-boot environment.
Maybe you're not the right person to ask this question, but I believe you know how to reach the right one.
Please help, or forward to the right person for me. Thank you!For the kirkwood based Linkstation, such as LS-WXL or LS-WVL, the MTD is a spi/m25p40 device.
But for LS-WTGL orion5x based Linkstation, I tried a few ways, still cannot get the MTD device out.I also referred the
orion5x-rd88f5182-nas.dts, to add devbus_bootcs/devbus_cs1, but didn't work.The MTD working kernel is a patch for kernel 2.6, which is not DTB,
but in lagacy way.
The patch can be get from:
- https://github.com/rogers0/linux-2.6_squeeze-security/blob/master/debian/patches/features/arm/ls-produo/01_ls-produo_driver.patchMTD related part seems like:
(quoted diff) +10
-0+#define LSPRODUO_NOR_BOOT_BASE 0xf4000000 +#define LSPRODUO_NOR_BOOT_SIZE SZ_256K +static struct resource lsproduo_nor_flash_resource = { + .flags = IORESOURCE_MEM, + .start = LSPRODUO_NOR_BOOT_BASE, + .end = LSPRODUO_NOR_BOOT_BASE + LSPRODUO_NOR_BOOT_SIZE - 1, +}; +static struct platform_device lsproduo_nor_flash = { + .name = "physmap-flash", + .id = 0,
Review
Quoted 10 lines
(quoted diff) +9
-0+ .dev = { + .platform_data = &lsproduo_nor_flash_data, + }, + .num_resources = 1, + .resource = &lsproduo_nor_flash_resource, +}; + orion5x_setup_dev_boot_win(LSPRODUO_NOR_BOOT_BASE, + LSPRODUO_NOR_BOOT_SIZE); + platform_device_register(&lsproduo_nor_flash);
I solved mtd problem by myself.
I read drivers/mtd/maps/physmap_of.c, then find the supported list of flash type in struct of_device_id of_flash_match: cfi-flash, jedec-flash, mtd-ram, mtd-rom, direct-mapped.
I previous refered the type in orion5x-rd88f5182-nas.dts is "cfi-flash", as which I mentioned it never worked.
After I tired to use "jedec-flash", the mtd is working, dmesg as following:
[ 12.863750] Found: SST 39LF020 [ 12.866834] f4000000.flash: Found 1 x8 devices at 0x0 in 8-bit bank [ 12.873194] number of JEDEC chips: 1 [ 12.895609] 3 ofpart partitions found on MTD device f4000000.flash [ 12.901868] Creating 3 MTD partitions on "f4000000.flash": [ 12.907454] 0x000000000000-0x000000030000 : "header" [ 12.915764] 0x000000030000-0x00000003f000 : "uboot" [ 12.924022] 0x00000003f000-0x000000040000 : "uboot_env"
So I'll send patch to update orion5x-linkstation-lswtgl.dts soon.
Cheers,
Signature · 2 lines
Roger Shimizu, GMT +9 Tokyo PGP/GPG: 17B3ACB1