* [PATCH 0/4] Use DT to define more of the DNS320 & DNS325
@ 2012-07-19 20:30 ` Jamie Lentin
0 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: Andrew Lunn, Jason; +Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel
Thanks to sterling work by Andrew Lunn, more code has been turned into
devicetree bindings. The following takes what he's done, moves common
parts into a DT include file, adds LED and key bindings for both the
DNS320 and DNS325. It has been tested on both devices.
This patchset replaces the DNS32? work in his patchset:-
git://github.com/lunn/linux.git v3.5-rc7-for-next-v3
I've not modified Andrew's DNS325 temperature sensor patch but
included it in the patchset to make it more obvious I've tested it.
Thanks!
Andrew Lunn (1):
ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
Jamie Lentin (3):
kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
arch/arm/boot/dts/kirkwood-dns320.dts | 67 +++++++---------
arch/arm/boot/dts/kirkwood-dns325.dts | 71 ++++++++---------
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 69 +++++++++++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 138 ---------------------------------
4 files changed, 127 insertions(+), 218 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-dnskw.dtsi
--
1.7.10.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/4] Use DT to define more of the DNS320 & DNS325
@ 2012-07-19 20:30 ` Jamie Lentin
0 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: linux-arm-kernel
Thanks to sterling work by Andrew Lunn, more code has been turned into
devicetree bindings. The following takes what he's done, moves common
parts into a DT include file, adds LED and key bindings for both the
DNS320 and DNS325. It has been tested on both devices.
This patchset replaces the DNS32? work in his patchset:-
git://github.com/lunn/linux.git v3.5-rc7-for-next-v3
I've not modified Andrew's DNS325 temperature sensor patch but
included it in the patchset to make it more obvious I've tested it.
Thanks!
Andrew Lunn (1):
ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
Jamie Lentin (3):
kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
arch/arm/boot/dts/kirkwood-dns320.dts | 67 +++++++---------
arch/arm/boot/dts/kirkwood-dns325.dts | 71 ++++++++---------
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 69 +++++++++++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 138 ---------------------------------
4 files changed, 127 insertions(+), 218 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-dnskw.dtsi
--
1.7.10.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
2012-07-19 20:30 ` Jamie Lentin
@ 2012-07-19 20:30 ` Jamie Lentin
-1 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: Andrew Lunn, Jason; +Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel
From: Andrew Lunn <andrew@lunn.ch>
Now that we have I2C support in DT, describe the LM75 in
the DT file for the DNS325.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns325.dts | 8 ++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 15 ++-------------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index 10bc819..e040d6c 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -16,6 +16,14 @@
};
ocp@f1000000 {
+ i2c@11000 {
+ status = "okay";
+
+ lm75: lm75@48 {
+ compatible = "national,lm75";
+ reg = <0x48>;
+ };
+ };
serial@12000 {
clock-frequency = <200000000>;
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 179f4b3..1c97efa 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -14,7 +14,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/i2c.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/of.h>
@@ -153,13 +152,6 @@ static struct platform_device dns320_led_device = {
},
};
-static struct i2c_board_info dns325_i2c_board_info[] __initdata = {
- {
- I2C_BOARD_INFO("lm75", 0x48),
- },
- /* Something at 0x0c also */
-};
-
static struct gpio_keys_button dnskw_button_pins[] = {
{
.code = KEY_POWER,
@@ -241,17 +233,14 @@ void __init dnskw_init(void)
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
- kirkwood_i2c_init();
platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
- if (of_machine_is_compatible("dlink,dns-325")) {
- i2c_register_board_info(0, dns325_i2c_board_info,
- ARRAY_SIZE(dns325_i2c_board_info));
+ if (of_machine_is_compatible("dlink,dns-325"))
platform_device_register(&dns325_led_device);
- } else if (of_machine_is_compatible("dlink,dns-320"))
+ else if (of_machine_is_compatible("dlink,dns-320"))
platform_device_register(&dns320_led_device);
/* Register power-off GPIO. */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/4] ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
@ 2012-07-19 20:30 ` Jamie Lentin
0 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: linux-arm-kernel
From: Andrew Lunn <andrew@lunn.ch>
Now that we have I2C support in DT, describe the LM75 in
the DT file for the DNS325.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns325.dts | 8 ++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 15 ++-------------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index 10bc819..e040d6c 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -16,6 +16,14 @@
};
ocp at f1000000 {
+ i2c at 11000 {
+ status = "okay";
+
+ lm75: lm75 at 48 {
+ compatible = "national,lm75";
+ reg = <0x48>;
+ };
+ };
serial at 12000 {
clock-frequency = <200000000>;
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 179f4b3..1c97efa 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -14,7 +14,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/i2c.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/of.h>
@@ -153,13 +152,6 @@ static struct platform_device dns320_led_device = {
},
};
-static struct i2c_board_info dns325_i2c_board_info[] __initdata = {
- {
- I2C_BOARD_INFO("lm75", 0x48),
- },
- /* Something at 0x0c also */
-};
-
static struct gpio_keys_button dnskw_button_pins[] = {
{
.code = KEY_POWER,
@@ -241,17 +233,14 @@ void __init dnskw_init(void)
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
- kirkwood_i2c_init();
platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
- if (of_machine_is_compatible("dlink,dns-325")) {
- i2c_register_board_info(0, dns325_i2c_board_info,
- ARRAY_SIZE(dns325_i2c_board_info));
+ if (of_machine_is_compatible("dlink,dns-325"))
platform_device_register(&dns325_led_device);
- } else if (of_machine_is_compatible("dlink,dns-320"))
+ else if (of_machine_is_compatible("dlink,dns-320"))
platform_device_register(&dns320_led_device);
/* Register power-off GPIO. */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
2012-07-19 20:30 ` Jamie Lentin
@ 2012-07-19 20:30 ` Jamie Lentin
-1 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: Andrew Lunn, Jason; +Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel
Replace code in board-dnskw with the equivalent devicetree bindings.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns320.dts | 25 +++++++++
arch/arm/boot/dts/kirkwood-dns325.dts | 25 +++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 90 ---------------------------------
3 files changed, 50 insertions(+), 90 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index f2a9808..a81c3a9 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -15,6 +15,31 @@
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
+ gpio-leds {
+ compatible = "gpio-leds";
+ blue-power {
+ label = "dns320:blue:power";
+ gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
+ linux,default-trigger = "default-on";
+ };
+ blue-usb {
+ label = "dns320:blue:usb";
+ gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */
+ };
+ orange-l_hdd {
+ label = "dns320:orange:l_hdd";
+ gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */
+ };
+ orange-r_hdd {
+ label = "dns320:orange:r_hdd";
+ gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */
+ };
+ orange-usb {
+ label = "dns320:orange:usb";
+ gpios = <&gpio1 3 1>; /* GPIO 35 Active Low */
+ };
+ };
+
ocp@f1000000 {
serial@12000 {
clock-frequency = <166666667>;
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index e040d6c..421dcab 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -15,6 +15,31 @@
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
+ gpio-leds {
+ compatible = "gpio-leds";
+ white-power {
+ label = "dns325:white:power";
+ gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
+ linux,default-trigger = "default-on";
+ };
+ white-usb {
+ label = "dns325:white:usb";
+ gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */
+ };
+ red-l_hdd {
+ label = "dns325:red:l_hdd";
+ gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */
+ };
+ red-r_hdd {
+ label = "dns325:red:r_hdd";
+ gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */
+ };
+ red-usb {
+ label = "dns325:red:usb";
+ gpios = <&gpio0 29 1>; /* GPIO 29 Active Low */
+ };
+ };
+
ocp@f1000000 {
i2c@11000 {
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 1c97efa..aac9c90 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -68,90 +68,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
0
};
-static struct gpio_led dns325_led_pins[] = {
- {
- .name = "dns325:white:power",
- .gpio = 26,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
- .name = "dns325:white:usb",
- .gpio = 43,
- .active_low = 1,
- },
- {
- .name = "dns325:red:l_hdd",
- .gpio = 28,
- .active_low = 1,
- },
- {
- .name = "dns325:red:r_hdd",
- .gpio = 27,
- .active_low = 1,
- },
- {
- .name = "dns325:red:usb",
- .gpio = 29,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data dns325_led_data = {
- .num_leds = ARRAY_SIZE(dns325_led_pins),
- .leds = dns325_led_pins,
-};
-
-static struct platform_device dns325_led_device = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &dns325_led_data,
- },
-};
-
-static struct gpio_led dns320_led_pins[] = {
- {
- .name = "dns320:blue:power",
- .gpio = 26,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
- .name = "dns320:blue:usb",
- .gpio = 43,
- .active_low = 1,
- },
- {
- .name = "dns320:orange:l_hdd",
- .gpio = 28,
- .active_low = 1,
- },
- {
- .name = "dns320:orange:r_hdd",
- .gpio = 27,
- .active_low = 1,
- },
- {
- .name = "dns320:orange:usb",
- .gpio = 35,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data dns320_led_data = {
- .num_leds = ARRAY_SIZE(dns320_led_pins),
- .leds = dns320_led_pins,
-};
-
-static struct platform_device dns320_led_device = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &dns320_led_data,
- },
-};
-
static struct gpio_keys_button dnskw_button_pins[] = {
{
.code = KEY_POWER,
@@ -237,12 +153,6 @@ void __init dnskw_init(void)
platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
- if (of_machine_is_compatible("dlink,dns-325"))
- platform_device_register(&dns325_led_device);
-
- else if (of_machine_is_compatible("dlink,dns-320"))
- platform_device_register(&dns320_led_device);
-
/* Register power-off GPIO. */
if (gpio_request(36, "dnskw:power:off") == 0
&& gpio_direction_output(36, 0) == 0)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
@ 2012-07-19 20:30 ` Jamie Lentin
0 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: linux-arm-kernel
Replace code in board-dnskw with the equivalent devicetree bindings.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns320.dts | 25 +++++++++
arch/arm/boot/dts/kirkwood-dns325.dts | 25 +++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 90 ---------------------------------
3 files changed, 50 insertions(+), 90 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index f2a9808..a81c3a9 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -15,6 +15,31 @@
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
+ gpio-leds {
+ compatible = "gpio-leds";
+ blue-power {
+ label = "dns320:blue:power";
+ gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
+ linux,default-trigger = "default-on";
+ };
+ blue-usb {
+ label = "dns320:blue:usb";
+ gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */
+ };
+ orange-l_hdd {
+ label = "dns320:orange:l_hdd";
+ gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */
+ };
+ orange-r_hdd {
+ label = "dns320:orange:r_hdd";
+ gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */
+ };
+ orange-usb {
+ label = "dns320:orange:usb";
+ gpios = <&gpio1 3 1>; /* GPIO 35 Active Low */
+ };
+ };
+
ocp at f1000000 {
serial at 12000 {
clock-frequency = <166666667>;
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index e040d6c..421dcab 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -15,6 +15,31 @@
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
+ gpio-leds {
+ compatible = "gpio-leds";
+ white-power {
+ label = "dns325:white:power";
+ gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
+ linux,default-trigger = "default-on";
+ };
+ white-usb {
+ label = "dns325:white:usb";
+ gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */
+ };
+ red-l_hdd {
+ label = "dns325:red:l_hdd";
+ gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */
+ };
+ red-r_hdd {
+ label = "dns325:red:r_hdd";
+ gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */
+ };
+ red-usb {
+ label = "dns325:red:usb";
+ gpios = <&gpio0 29 1>; /* GPIO 29 Active Low */
+ };
+ };
+
ocp at f1000000 {
i2c at 11000 {
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 1c97efa..aac9c90 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -68,90 +68,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
0
};
-static struct gpio_led dns325_led_pins[] = {
- {
- .name = "dns325:white:power",
- .gpio = 26,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
- .name = "dns325:white:usb",
- .gpio = 43,
- .active_low = 1,
- },
- {
- .name = "dns325:red:l_hdd",
- .gpio = 28,
- .active_low = 1,
- },
- {
- .name = "dns325:red:r_hdd",
- .gpio = 27,
- .active_low = 1,
- },
- {
- .name = "dns325:red:usb",
- .gpio = 29,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data dns325_led_data = {
- .num_leds = ARRAY_SIZE(dns325_led_pins),
- .leds = dns325_led_pins,
-};
-
-static struct platform_device dns325_led_device = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &dns325_led_data,
- },
-};
-
-static struct gpio_led dns320_led_pins[] = {
- {
- .name = "dns320:blue:power",
- .gpio = 26,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
- .name = "dns320:blue:usb",
- .gpio = 43,
- .active_low = 1,
- },
- {
- .name = "dns320:orange:l_hdd",
- .gpio = 28,
- .active_low = 1,
- },
- {
- .name = "dns320:orange:r_hdd",
- .gpio = 27,
- .active_low = 1,
- },
- {
- .name = "dns320:orange:usb",
- .gpio = 35,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data dns320_led_data = {
- .num_leds = ARRAY_SIZE(dns320_led_pins),
- .leds = dns320_led_pins,
-};
-
-static struct platform_device dns320_led_device = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &dns320_led_data,
- },
-};
-
static struct gpio_keys_button dnskw_button_pins[] = {
{
.code = KEY_POWER,
@@ -237,12 +153,6 @@ void __init dnskw_init(void)
platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
- if (of_machine_is_compatible("dlink,dns-325"))
- platform_device_register(&dns325_led_device);
-
- else if (of_machine_is_compatible("dlink,dns-320"))
- platform_device_register(&dns320_led_device);
-
/* Register power-off GPIO. */
if (gpio_request(36, "dnskw:power:off") == 0
&& gpio_direction_output(36, 0) == 0)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
2012-07-19 20:30 ` Jamie Lentin
@ 2012-07-19 20:30 ` Jamie Lentin
-1 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: Andrew Lunn, Jason; +Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel
A lot of device setup is shared between DNS-320 and DNS-325, move the
definitions into a common include.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns320.dts | 42 +----------------------------
arch/arm/boot/dts/kirkwood-dns325.dts | 42 +----------------------------
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 48 +++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 82 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-dnskw.dtsi
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index a81c3a9..d41e204 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -1,6 +1,6 @@
/dts-v1/;
-/include/ "kirkwood.dtsi"
+/include/ "kirkwood-dnskw.dtsi"
/ {
model = "D-Link DNS-320 NAS (Rev A1)";
@@ -50,45 +50,5 @@
clock-frequency = <166666667>;
status = "okay";
};
-
- sata@80000 {
- status = "okay";
- nr-ports = <2>;
- };
-
- nand@3000000 {
- status = "okay";
-
- partition@0 {
- label = "u-boot";
- reg = <0x0000000 0x100000>;
- read-only;
- };
-
- partition@100000 {
- label = "uImage";
- reg = <0x0100000 0x500000>;
- };
-
- partition@600000 {
- label = "ramdisk";
- reg = <0x0600000 0x500000>;
- };
-
- partition@b00000 {
- label = "image";
- reg = <0x0b00000 0x6600000>;
- };
-
- partition@7100000 {
- label = "mini firmware";
- reg = <0x7100000 0xa00000>;
- };
-
- partition@7b00000 {
- label = "config";
- reg = <0x7b00000 0x500000>;
- };
- };
};
};
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index 421dcab..2662efc 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -1,6 +1,6 @@
/dts-v1/;
-/include/ "kirkwood.dtsi"
+/include/ "kirkwood-dnskw.dtsi"
/ {
model = "D-Link DNS-325 NAS (Rev A1)";
@@ -53,45 +53,5 @@
clock-frequency = <200000000>;
status = "okay";
};
-
- sata@80000 {
- status = "okay";
- nr-ports = <2>;
- };
-
- nand@3000000 {
- status = "okay";
-
- partition@0 {
- label = "u-boot";
- reg = <0x0000000 0x100000>;
- read-only;
- };
-
- partition@100000 {
- label = "uImage";
- reg = <0x0100000 0x500000>;
- };
-
- partition@600000 {
- label = "ramdisk";
- reg = <0x0600000 0x500000>;
- };
-
- partition@b00000 {
- label = "image";
- reg = <0x0b00000 0x6600000>;
- };
-
- partition@7100000 {
- label = "mini firmware";
- reg = <0x7100000 0xa00000>;
- };
-
- partition@7b00000 {
- label = "config";
- reg = <0x7b00000 0x500000>;
- };
- };
};
};
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
new file mode 100644
index 0000000..067672c
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -0,0 +1,48 @@
+/include/ "kirkwood.dtsi"
+
+/ {
+ model = "D-Link DNS NASes (kirkwood-based)";
+ compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+
+ ocp@f1000000 {
+ sata@80000 {
+ status = "okay";
+ nr-ports = <2>;
+ };
+
+ nand@3000000 {
+ status = "okay";
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0000000 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "uImage";
+ reg = <0x0100000 0x500000>;
+ };
+
+ partition@600000 {
+ label = "ramdisk";
+ reg = <0x0600000 0x500000>;
+ };
+
+ partition@b00000 {
+ label = "image";
+ reg = <0x0b00000 0x6600000>;
+ };
+
+ partition@7100000 {
+ label = "mini firmware";
+ reg = <0x7100000 0xa00000>;
+ };
+
+ partition@7b00000 {
+ label = "config";
+ reg = <0x7b00000 0x500000>;
+ };
+ };
+ };
+};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
@ 2012-07-19 20:30 ` Jamie Lentin
0 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:30 UTC (permalink / raw)
To: linux-arm-kernel
A lot of device setup is shared between DNS-320 and DNS-325, move the
definitions into a common include.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns320.dts | 42 +----------------------------
arch/arm/boot/dts/kirkwood-dns325.dts | 42 +----------------------------
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 48 +++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 82 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-dnskw.dtsi
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index a81c3a9..d41e204 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -1,6 +1,6 @@
/dts-v1/;
-/include/ "kirkwood.dtsi"
+/include/ "kirkwood-dnskw.dtsi"
/ {
model = "D-Link DNS-320 NAS (Rev A1)";
@@ -50,45 +50,5 @@
clock-frequency = <166666667>;
status = "okay";
};
-
- sata at 80000 {
- status = "okay";
- nr-ports = <2>;
- };
-
- nand at 3000000 {
- status = "okay";
-
- partition at 0 {
- label = "u-boot";
- reg = <0x0000000 0x100000>;
- read-only;
- };
-
- partition at 100000 {
- label = "uImage";
- reg = <0x0100000 0x500000>;
- };
-
- partition at 600000 {
- label = "ramdisk";
- reg = <0x0600000 0x500000>;
- };
-
- partition at b00000 {
- label = "image";
- reg = <0x0b00000 0x6600000>;
- };
-
- partition at 7100000 {
- label = "mini firmware";
- reg = <0x7100000 0xa00000>;
- };
-
- partition at 7b00000 {
- label = "config";
- reg = <0x7b00000 0x500000>;
- };
- };
};
};
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index 421dcab..2662efc 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -1,6 +1,6 @@
/dts-v1/;
-/include/ "kirkwood.dtsi"
+/include/ "kirkwood-dnskw.dtsi"
/ {
model = "D-Link DNS-325 NAS (Rev A1)";
@@ -53,45 +53,5 @@
clock-frequency = <200000000>;
status = "okay";
};
-
- sata at 80000 {
- status = "okay";
- nr-ports = <2>;
- };
-
- nand at 3000000 {
- status = "okay";
-
- partition at 0 {
- label = "u-boot";
- reg = <0x0000000 0x100000>;
- read-only;
- };
-
- partition at 100000 {
- label = "uImage";
- reg = <0x0100000 0x500000>;
- };
-
- partition at 600000 {
- label = "ramdisk";
- reg = <0x0600000 0x500000>;
- };
-
- partition at b00000 {
- label = "image";
- reg = <0x0b00000 0x6600000>;
- };
-
- partition at 7100000 {
- label = "mini firmware";
- reg = <0x7100000 0xa00000>;
- };
-
- partition at 7b00000 {
- label = "config";
- reg = <0x7b00000 0x500000>;
- };
- };
};
};
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
new file mode 100644
index 0000000..067672c
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -0,0 +1,48 @@
+/include/ "kirkwood.dtsi"
+
+/ {
+ model = "D-Link DNS NASes (kirkwood-based)";
+ compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+
+ ocp at f1000000 {
+ sata at 80000 {
+ status = "okay";
+ nr-ports = <2>;
+ };
+
+ nand at 3000000 {
+ status = "okay";
+
+ partition at 0 {
+ label = "u-boot";
+ reg = <0x0000000 0x100000>;
+ read-only;
+ };
+
+ partition at 100000 {
+ label = "uImage";
+ reg = <0x0100000 0x500000>;
+ };
+
+ partition at 600000 {
+ label = "ramdisk";
+ reg = <0x0600000 0x500000>;
+ };
+
+ partition at b00000 {
+ label = "image";
+ reg = <0x0b00000 0x6600000>;
+ };
+
+ partition at 7100000 {
+ label = "mini firmware";
+ reg = <0x7100000 0xa00000>;
+ };
+
+ partition at 7b00000 {
+ label = "config";
+ reg = <0x7b00000 0x500000>;
+ };
+ };
+ };
+};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
2012-07-19 20:30 ` Jamie Lentin
@ 2012-07-19 20:31 ` Jamie Lentin
-1 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:31 UTC (permalink / raw)
To: Andrew Lunn, Jason; +Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel
Move description of GPIO keys on both the DNS320 and DNS325 into DT.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 21 +++++++++++++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 37 ---------------------------------
2 files changed, 21 insertions(+), 37 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 067672c..2bad626 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -4,6 +4,27 @@
model = "D-Link DNS NASes (kirkwood-based)";
compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ button@1 {
+ label = "Power button";
+ linux,code = <116>;
+ gpios = <&gpio1 2 1>;
+ };
+ button@2 {
+ label = "USB unmount button";
+ linux,code = <161>;
+ gpios = <&gpio1 15 1>;
+ };
+ button@3 {
+ label = "Reset button";
+ linux,code = <0x198>;
+ gpios = <&gpio1 16 1>;
+ };
+ };
+
ocp@f1000000 {
sata@80000 {
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index aac9c90..4ab3506 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -19,7 +19,6 @@
#include <linux/of.h>
#include <linux/gpio.h>
#include <linux/input.h>
-#include <linux/gpio_keys.h>
#include <linux/gpio-fan.h>
#include <linux/leds.h>
#include <asm/mach-types.h>
@@ -68,41 +67,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
0
};
-static struct gpio_keys_button dnskw_button_pins[] = {
- {
- .code = KEY_POWER,
- .gpio = 34,
- .desc = "Power button",
- .active_low = 1,
- },
- {
- .code = KEY_EJECTCD,
- .gpio = 47,
- .desc = "USB unmount button",
- .active_low = 1,
- },
- {
- .code = KEY_RESTART,
- .gpio = 48,
- .desc = "Reset button",
- .active_low = 1,
- },
-};
-
-static struct gpio_keys_platform_data dnskw_button_data = {
- .buttons = dnskw_button_pins,
- .nbuttons = ARRAY_SIZE(dnskw_button_pins),
-};
-
-static struct platform_device dnskw_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- .dev = {
- .platform_data = &dnskw_button_data,
- }
-};
-
/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
static struct gpio_fan_speed dnskw_fan_speed[] = {
{ 0, 0 },
@@ -150,7 +114,6 @@ void __init dnskw_init(void)
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
- platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
/* Register power-off GPIO. */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
@ 2012-07-19 20:31 ` Jamie Lentin
0 siblings, 0 replies; 10+ messages in thread
From: Jamie Lentin @ 2012-07-19 20:31 UTC (permalink / raw)
To: linux-arm-kernel
Move description of GPIO keys on both the DNS320 and DNS325 into DT.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dnskw.dtsi | 21 +++++++++++++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 37 ---------------------------------
2 files changed, 21 insertions(+), 37 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 067672c..2bad626 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -4,6 +4,27 @@
model = "D-Link DNS NASes (kirkwood-based)";
compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ button at 1 {
+ label = "Power button";
+ linux,code = <116>;
+ gpios = <&gpio1 2 1>;
+ };
+ button at 2 {
+ label = "USB unmount button";
+ linux,code = <161>;
+ gpios = <&gpio1 15 1>;
+ };
+ button at 3 {
+ label = "Reset button";
+ linux,code = <0x198>;
+ gpios = <&gpio1 16 1>;
+ };
+ };
+
ocp at f1000000 {
sata at 80000 {
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index aac9c90..4ab3506 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -19,7 +19,6 @@
#include <linux/of.h>
#include <linux/gpio.h>
#include <linux/input.h>
-#include <linux/gpio_keys.h>
#include <linux/gpio-fan.h>
#include <linux/leds.h>
#include <asm/mach-types.h>
@@ -68,41 +67,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
0
};
-static struct gpio_keys_button dnskw_button_pins[] = {
- {
- .code = KEY_POWER,
- .gpio = 34,
- .desc = "Power button",
- .active_low = 1,
- },
- {
- .code = KEY_EJECTCD,
- .gpio = 47,
- .desc = "USB unmount button",
- .active_low = 1,
- },
- {
- .code = KEY_RESTART,
- .gpio = 48,
- .desc = "Reset button",
- .active_low = 1,
- },
-};
-
-static struct gpio_keys_platform_data dnskw_button_data = {
- .buttons = dnskw_button_pins,
- .nbuttons = ARRAY_SIZE(dnskw_button_pins),
-};
-
-static struct platform_device dnskw_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- .dev = {
- .platform_data = &dnskw_button_data,
- }
-};
-
/* Fan: ADDA AD045HB-G73 40mm 6000rpm at 5v */
static struct gpio_fan_speed dnskw_fan_speed[] = {
{ 0, 0 },
@@ -150,7 +114,6 @@ void __init dnskw_init(void)
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
- platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
/* Register power-off GPIO. */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-07-19 20:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 20:30 [PATCH 0/4] Use DT to define more of the DNS320 & DNS325 Jamie Lentin
2012-07-19 20:30 ` Jamie Lentin
2012-07-19 20:30 ` [PATCH 1/4] ARM: Kirkwood: Describe DNS325 temperature sensor in DT Jamie Lentin
2012-07-19 20:30 ` Jamie Lentin
2012-07-19 20:30 ` [PATCH 2/4] kirkwood: Replace DNS-320/DNS-325 leds with dt bindings Jamie Lentin
2012-07-19 20:30 ` Jamie Lentin
2012-07-19 20:30 ` [PATCH 3/4] ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi Jamie Lentin
2012-07-19 20:30 ` Jamie Lentin
2012-07-19 20:31 ` [PATCH 4/4] ARM: Kirkwood: Describe DNS32? gpio-keys in DT Jamie Lentin
2012-07-19 20:31 ` Jamie Lentin
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.