oxnas: use dt-bindings macros for GPIO
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
This commit is contained in:
parent
c9512d564d
commit
9559a3304e
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "ox820.dtsi"
|
#include "ox820.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@ -31,7 +32,8 @@
|
|||||||
|
|
||||||
i2c-gpio {
|
i2c-gpio {
|
||||||
compatible = "i2c-gpio";
|
compatible = "i2c-gpio";
|
||||||
gpios = <&gpio1 9 0 &gpio1 10 0>;
|
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_i2c>;
|
pinctrl-0 = <&pinctrl_i2c>;
|
||||||
i2c-gpio,delay-us = <10>;
|
i2c-gpio,delay-us = <10>;
|
||||||
@ -52,12 +54,12 @@
|
|||||||
poll-interval = <100>;
|
poll-interval = <100>;
|
||||||
power {
|
power {
|
||||||
label = "power";
|
label = "power";
|
||||||
gpios = <&gpio0 11 1>;
|
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_POWER>;
|
linux,code = <KEY_POWER>;
|
||||||
};
|
};
|
||||||
reset {
|
reset {
|
||||||
label = "reset";
|
label = "reset";
|
||||||
gpios = <&gpio1 6 1>;
|
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_RESTART>;
|
linux,code = <KEY_RESTART>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -68,7 +70,7 @@
|
|||||||
pinctrl-0 = <&pinctrl_leds>;
|
pinctrl-0 = <&pinctrl_leds>;
|
||||||
led_status: status {
|
led_status: status {
|
||||||
label = "akitio:red:status";
|
label = "akitio:red:status";
|
||||||
gpios = <&gpio0 29 0>;
|
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,7 +78,7 @@
|
|||||||
compatible = "gpio-poweroff";
|
compatible = "gpio-poweroff";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_poweroff>;
|
pinctrl-0 = <&pinctrl_poweroff>;
|
||||||
gpios = <&gpio1 13 2>;
|
gpios = <&gpio1 13 GPIO_SINGLE_ENDED>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include "ox820.dtsi"
|
#include "ox820.dtsi"
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Cloud Engines PogoPlug Pro";
|
model = "Cloud Engines PogoPlug Pro";
|
||||||
@ -39,19 +40,19 @@
|
|||||||
|
|
||||||
led_status: blue {
|
led_status: blue {
|
||||||
label = "pogoplug:blue";
|
label = "pogoplug:blue";
|
||||||
gpios = <&gpio0 2 0>;
|
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "keep";
|
default-state = "keep";
|
||||||
};
|
};
|
||||||
|
|
||||||
led_warn: orange {
|
led_warn: orange {
|
||||||
label = "pogoplug:orange";
|
label = "pogoplug:orange";
|
||||||
gpios = <&gpio1 16 1>;
|
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||||
default-state = "keep";
|
default-state = "keep";
|
||||||
};
|
};
|
||||||
|
|
||||||
led_act: green {
|
led_act: green {
|
||||||
label = "pogoplug:green";
|
label = "pogoplug:green";
|
||||||
gpios = <&gpio1 17 1>;
|
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||||
default-state = "keep";
|
default-state = "keep";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "ox820.dtsi"
|
#include "ox820.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@ -37,12 +38,12 @@
|
|||||||
|
|
||||||
reset {
|
reset {
|
||||||
label = "reset";
|
label = "reset";
|
||||||
gpios = <&gpio1 11 1>;
|
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_RESTART>;
|
linux,code = <KEY_RESTART>;
|
||||||
};
|
};
|
||||||
copy {
|
copy {
|
||||||
label = "copy";
|
label = "copy";
|
||||||
gpios = <&gpio1 13 1>;
|
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_COPY>;
|
linux,code = <KEY_COPY>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -51,15 +52,15 @@
|
|||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
led_status: status {
|
led_status: status {
|
||||||
label = "zyxel:blue:status";
|
label = "zyxel:blue:status";
|
||||||
gpios = <&gpio1 5 0>;
|
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
led_warn: status2 {
|
led_warn: status2 {
|
||||||
label = "zyxel:red:status";
|
label = "zyxel:red:status";
|
||||||
gpios = <&gpio1 6 1>;
|
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
copy {
|
copy {
|
||||||
label = "zyxel:orange:copy";
|
label = "zyxel:orange:copy";
|
||||||
gpios = <&gpio1 8 1>;
|
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||||
trigger-sources = <&ehci_port1>, <&ehci_port2>;
|
trigger-sources = <&ehci_port1>, <&ehci_port2>;
|
||||||
linux,default-trigger = "usbport";
|
linux,default-trigger = "usbport";
|
||||||
};
|
};
|
||||||
@ -67,7 +68,8 @@
|
|||||||
|
|
||||||
i2c-gpio {
|
i2c-gpio {
|
||||||
compatible = "i2c-gpio";
|
compatible = "i2c-gpio";
|
||||||
gpios = <&gpio1 9 0 &gpio1 10 0>;
|
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||||
i2c-gpio,delay-us = <10>;
|
i2c-gpio,delay-us = <10>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user