Commit 96b09e3e authored by Arnaud Ebalard's avatar Arnaud Ebalard Committed by Jason Cooper

ARM: mvebu: NETGEAR ReadyNAS 104 .dts cleanup

The patch does some cleanup work on NETGEAR ReadyNAS 104 .dts
file. Changes are listed below:

 - Completed conversion from value to macros for GPIO voltage level
 - Converted all numeric input key values to macros
 - Fixed all node names and labels to use respectively '-' and '_'
 - Made button names more explicit
 - Changed order of included files from general to local
 - Removed useless clocks and gpio-keys properties
 - Document ethernet PHY (Marvell 88E1318) via a comment
 - Made G762 clock node name unique by including g762 in it
Signed-off-by: default avatarArnaud Ebalard <arno@natisbad.org>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent b8f18162
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
/dts-v1/; /dts-v1/;
#include "armada-370.dtsi" #include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include "armada-370.dtsi"
/ { / {
model = "NETGEAR ReadyNAS 104"; model = "NETGEAR ReadyNAS 104";
...@@ -59,12 +60,12 @@ poweroff: poweroff { ...@@ -59,12 +60,12 @@ poweroff: poweroff {
marvell,function = "gpio"; marvell,function = "gpio";
}; };
backup_key_pin: backup-key-pin { backup_button_pin: backup-button-pin {
marvell,pins = "mpp52"; marvell,pins = "mpp52";
marvell,function = "gpio"; marvell,function = "gpio";
}; };
power_key_pin: power-key-pin { power_button_pin: power-button-pin {
marvell,pins = "mpp62"; marvell,pins = "mpp62";
marvell,function = "gpio"; marvell,function = "gpio";
}; };
...@@ -79,18 +80,18 @@ power_led_pin: power-led-pin { ...@@ -79,18 +80,18 @@ power_led_pin: power-led-pin {
marvell,function = "gpio"; marvell,function = "gpio";
}; };
reset_key_pin: reset-key-pin { reset_button_pin: reset-button-pin {
marvell,pins = "mpp65"; marvell,pins = "mpp65";
marvell,function = "gpio"; marvell,function = "gpio";
}; };
}; };
mdio { mdio {
phy0: ethernet-phy@0 { phy0: ethernet-phy@0 { /* Marvell 88E1318 */
reg = <0>; reg = <0>;
}; };
phy1: ethernet-phy@1 { phy1: ethernet-phy@1 { /* Marvell 88E1318 */
reg = <1>; reg = <1>;
}; };
}; };
...@@ -136,90 +137,85 @@ pca9554: pca9554@23 { ...@@ -136,90 +137,85 @@ pca9554: pca9554@23 {
}; };
clocks { clocks {
#address-cells = <1>; g762_clk: g762-oscillator {
#size-cells = <0>;
g762_clk: fixedclk {
compatible = "fixed-clock"; compatible = "fixed-clock";
#clock-cells = <0>; #clock-cells = <0>;
clock-frequency = <8192>; clock-frequency = <8192>;
}; };
}; };
gpio_leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
pinctrl-0 = <&backup_led_pin &power_led_pin>; pinctrl-0 = <&backup_led_pin &power_led_pin>;
pinctrl-names = "default"; pinctrl-names = "default";
blue_backup_led { blue-backup-led {
label = "rn104:blue:backup"; label = "rn104:blue:backup";
gpios = <&gpio1 31 0>; /* GPIO 63 Active High */ gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
default-state = "off"; default-state = "off";
}; };
blue_power_led { blue-power-led {
label = "rn104:blue:pwr"; label = "rn104:blue:pwr";
gpios = <&gpio2 0 1>; /* GPIO 64 Active Low */ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "keep"; linux,default-trigger = "keep";
}; };
sata1_led { blue-sata1-led {
label = "rn104:blue:sata1"; label = "rn104:blue:sata1";
gpios = <&pca9554 0 GPIO_ACTIVE_LOW>; gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
}; };
sata2_led { blue-sata2-led {
label = "rn104:blue:sata2"; label = "rn104:blue:sata2";
gpios = <&pca9554 1 GPIO_ACTIVE_LOW>; gpios = <&pca9554 1 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
}; };
sata3_led { blue-sata3-led {
label = "rn104:blue:sata3"; label = "rn104:blue:sata3";
gpios = <&pca9554 2 GPIO_ACTIVE_LOW>; gpios = <&pca9554 2 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
}; };
sata4_led { blue-sata4-led {
label = "rn104:blue:sata4"; label = "rn104:blue:sata4";
gpios = <&pca9554 3 GPIO_ACTIVE_LOW>; gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
}; };
}; };
gpio_keys { gpio-keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
#address-cells = <1>; pinctrl-0 = <&backup_button_pin
#size-cells = <0>; &power_button_pin
pinctrl-0 = <&backup_key_pin &reset_button_pin>;
&power_key_pin
&reset_key_pin>;
pinctrl-names = "default"; pinctrl-names = "default";
button@1 { backup-button {
label = "Backup Button"; label = "Backup Button";
linux,code = <133>; /* KEY_COPY */ linux,code = <KEY_COPY>;
gpios = <&gpio1 20 1>; gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
}; };
button@2 { power-button {
label = "Power Button"; label = "Power Button";
linux,code = <116>; /* KEY_POWER */ linux,code = <KEY_POWER>;
gpios = <&gpio1 30 0>; gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
}; };
button@3 { reset-button {
label = "Reset Button"; label = "Reset Button";
linux,code = <0x198>; /* KEY_RESTART */ linux,code = <KEY_RESTART>;
gpios = <&gpio2 1 1>; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
}; };
}; };
gpio_poweroff { gpio-poweroff {
compatible = "gpio-poweroff"; compatible = "gpio-poweroff";
pinctrl-0 = <&poweroff>; pinctrl-0 = <&poweroff>;
pinctrl-names = "default"; pinctrl-names = "default";
gpios = <&gpio1 28 1>; gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
}; };
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment