Commit c10d3290 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Kukjin Kim

ARM: dts: Use GPIO constants for flags cells in exynos4412 boards

The board DTS are using numeric values instead of the defined GPIO
constanst to express polarity, use them to make the DTS more clear.
Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene@kernel.org>
parent 39c1c413
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/clock/maxim,max77686.h> #include <dt-bindings/clock/maxim,max77686.h>
#include "exynos4412.dtsi" #include "exynos4412.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
chosen { chosen {
...@@ -30,7 +31,7 @@ gpio_keys { ...@@ -30,7 +31,7 @@ gpio_keys {
power_key { power_key {
interrupt-parent = <&gpx1>; interrupt-parent = <&gpx1>;
interrupts = <3 0>; interrupts = <3 0>;
gpios = <&gpx1 3 1>; gpios = <&gpx1 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
label = "power key"; label = "power key";
debounce-interval = <10>; debounce-interval = <10>;
...@@ -70,7 +71,7 @@ emmc_pwrseq: pwrseq { ...@@ -70,7 +71,7 @@ emmc_pwrseq: pwrseq {
pinctrl-0 = <&sd1_cd>; pinctrl-0 = <&sd1_cd>;
pinctrl-names = "default"; pinctrl-names = "default";
compatible = "mmc-pwrseq-emmc"; compatible = "mmc-pwrseq-emmc";
reset-gpios = <&gpk1 2 1>; reset-gpios = <&gpk1 2 GPIO_ACTIVE_LOW>;
}; };
camera { camera {
...@@ -181,7 +182,7 @@ &g2d { ...@@ -181,7 +182,7 @@ &g2d {
}; };
&hdmi { &hdmi {
hpd-gpio = <&gpx3 7 0>; hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&hdmi_hpd>; pinctrl-0 = <&hdmi_hpd>;
vdd-supply = <&ldo8_reg>; vdd-supply = <&ldo8_reg>;
...@@ -207,9 +208,9 @@ usb3503: usb3503@08 { ...@@ -207,9 +208,9 @@ usb3503: usb3503@08 {
compatible = "smsc,usb3503"; compatible = "smsc,usb3503";
reg = <0x08>; reg = <0x08>;
intn-gpios = <&gpx3 0 0>; intn-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
connect-gpios = <&gpx3 4 0>; connect-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpx3 5 0>; reset-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>;
initial-mode = <1>; initial-mode = <1>;
}; };
...@@ -482,7 +483,7 @@ &sdhci_2 { ...@@ -482,7 +483,7 @@ &sdhci_2 {
pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
pinctrl-names = "default"; pinctrl-names = "default";
vmmc-supply = <&ldo4_reg &ldo21_reg>; vmmc-supply = <&ldo4_reg &ldo21_reg>;
cd-gpios = <&gpk2 2 0>; cd-gpios = <&gpk2 2 GPIO_ACTIVE_HIGH>;
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
......
...@@ -27,7 +27,7 @@ leds { ...@@ -27,7 +27,7 @@ leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
led1 { led1 {
label = "led1:heart"; label = "led1:heart";
gpios = <&gpc1 0 1>; gpios = <&gpc1 0 GPIO_ACTIVE_LOW>;
default-state = "on"; default-state = "on";
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
......
...@@ -26,13 +26,13 @@ leds { ...@@ -26,13 +26,13 @@ leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
led1 { led1 {
label = "led1:heart"; label = "led1:heart";
gpios = <&gpc1 0 1>; gpios = <&gpc1 0 GPIO_ACTIVE_LOW>;
default-state = "on"; default-state = "on";
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
led2 { led2 {
label = "led2:mmc0"; label = "led2:mmc0";
gpios = <&gpc1 2 1>; gpios = <&gpc1 2 GPIO_ACTIVE_LOW>;
default-state = "on"; default-state = "on";
linux,default-trigger = "mmc0"; linux,default-trigger = "mmc0";
}; };
...@@ -44,7 +44,7 @@ gpio_keys { ...@@ -44,7 +44,7 @@ gpio_keys {
home_key { home_key {
interrupt-parent = <&gpx2>; interrupt-parent = <&gpx2>;
interrupts = <2 0>; interrupts = <2 0>;
gpios = <&gpx2 2 0>; gpios = <&gpx2 2 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_HOME>; linux,code = <KEY_HOME>;
label = "home key"; label = "home key";
debounce-interval = <10>; debounce-interval = <10>;
...@@ -57,7 +57,7 @@ regulator_p3v3 { ...@@ -57,7 +57,7 @@ regulator_p3v3 {
regulator-name = "p3v3_en"; regulator-name = "p3v3_en";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
gpio = <&gpa1 1 1>; gpio = <&gpa1 1 GPIO_ACTIVE_LOW>;
enable-active-high; enable-active-high;
regulator-always-on; regulator-always-on;
}; };
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
/dts-v1/; /dts-v1/;
#include "exynos4412.dtsi" #include "exynos4412.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
/ { / {
...@@ -45,7 +46,7 @@ mmc_reg: regulator@0 { ...@@ -45,7 +46,7 @@ mmc_reg: regulator@0 {
regulator-name = "VMEM_VDD_2.8V"; regulator-name = "VMEM_VDD_2.8V";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpx1 1 0>; gpio = <&gpx1 1 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
}; };
...@@ -107,13 +108,13 @@ s5m8767_pmic@66 { ...@@ -107,13 +108,13 @@ s5m8767_pmic@66 {
s5m8767,pmic-buck-default-dvs-idx = <3>; s5m8767,pmic-buck-default-dvs-idx = <3>;
s5m8767,pmic-buck-dvs-gpios = <&gpx2 3 0>, s5m8767,pmic-buck-dvs-gpios = <&gpx2 3 GPIO_ACTIVE_HIGH>,
<&gpx2 4 0>, <&gpx2 4 GPIO_ACTIVE_HIGH>,
<&gpx2 5 0>; <&gpx2 5 GPIO_ACTIVE_HIGH>;
s5m8767,pmic-buck-ds-gpios = <&gpm3 5 0>, s5m8767,pmic-buck-ds-gpios = <&gpm3 5 GPIO_ACTIVE_HIGH>,
<&gpm3 6 0>, <&gpm3 6 GPIO_ACTIVE_HIGH>,
<&gpm3 7 0>; <&gpm3 7 GPIO_ACTIVE_HIGH>;
s5m8767,pmic-buck2-dvs-voltage = <1250000>, <1200000>, s5m8767,pmic-buck2-dvs-voltage = <1250000>, <1200000>,
<1200000>, <1200000>, <1200000>, <1200000>,
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
/dts-v1/; /dts-v1/;
#include "exynos4412.dtsi" #include "exynos4412.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "FriendlyARM TINY4412 board based on Exynos4412"; model = "FriendlyARM TINY4412 board based on Exynos4412";
...@@ -31,26 +32,26 @@ leds { ...@@ -31,26 +32,26 @@ leds {
led1 { led1 {
label = "led1"; label = "led1";
gpios = <&gpm4 0 1>; gpios = <&gpm4 0 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
led2 { led2 {
label = "led2"; label = "led2";
gpios = <&gpm4 1 1>; gpios = <&gpm4 1 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
}; };
led3 { led3 {
label = "led3"; label = "led3";
gpios = <&gpm4 2 1>; gpios = <&gpm4 2 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
}; };
led4 { led4 {
label = "led4"; label = "led4";
gpios = <&gpm4 3 1>; gpios = <&gpm4 3 GPIO_ACTIVE_LOW>;
default-state = "off"; default-state = "off";
linux,default-trigger = "mmc0"; linux,default-trigger = "mmc0";
}; };
......
...@@ -65,7 +65,7 @@ cam_io_reg: voltage-regulator-1 { ...@@ -65,7 +65,7 @@ cam_io_reg: voltage-regulator-1 {
regulator-name = "CAM_SENSOR_A"; regulator-name = "CAM_SENSOR_A";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpm0 2 0>; gpio = <&gpm0 2 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -74,7 +74,7 @@ lcd_vdd3_reg: voltage-regulator-2 { ...@@ -74,7 +74,7 @@ lcd_vdd3_reg: voltage-regulator-2 {
regulator-name = "LCD_VDD_2.2V"; regulator-name = "LCD_VDD_2.2V";
regulator-min-microvolt = <2200000>; regulator-min-microvolt = <2200000>;
regulator-max-microvolt = <2200000>; regulator-max-microvolt = <2200000>;
gpio = <&gpc0 1 0>; gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -83,7 +83,7 @@ cam_af_reg: voltage-regulator-3 { ...@@ -83,7 +83,7 @@ cam_af_reg: voltage-regulator-3 {
regulator-name = "CAM_AF"; regulator-name = "CAM_AF";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpm0 4 0>; gpio = <&gpm0 4 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -92,7 +92,7 @@ ps_als_reg: voltage-regulator-5 { ...@@ -92,7 +92,7 @@ ps_als_reg: voltage-regulator-5 {
regulator-name = "LED_A_3.0V"; regulator-name = "LED_A_3.0V";
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <3000000>;
gpio = <&gpj0 5 0>; gpio = <&gpj0 5 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
}; };
...@@ -101,21 +101,21 @@ gpio-keys { ...@@ -101,21 +101,21 @@ gpio-keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
key-down { key-down {
gpios = <&gpx3 3 1>; gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
linux,code = <114>; linux,code = <114>;
label = "volume down"; label = "volume down";
debounce-interval = <10>; debounce-interval = <10>;
}; };
key-up { key-up {
gpios = <&gpx2 2 1>; gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
linux,code = <115>; linux,code = <115>;
label = "volume up"; label = "volume up";
debounce-interval = <10>; debounce-interval = <10>;
}; };
key-power { key-power {
gpios = <&gpx2 7 1>; gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
linux,code = <116>; linux,code = <116>;
label = "power"; label = "power";
debounce-interval = <10>; debounce-interval = <10>;
...@@ -123,7 +123,7 @@ key-power { ...@@ -123,7 +123,7 @@ key-power {
}; };
key-ok { key-ok {
gpios = <&gpx0 1 1>; gpios = <&gpx0 1 GPIO_ACTIVE_LOW>;
linux,code = <139>; linux,code = <139>;
label = "ok"; label = "ok";
debounce-inteval = <10>; debounce-inteval = <10>;
...@@ -198,7 +198,7 @@ max77693-fuel-gauge@36 { ...@@ -198,7 +198,7 @@ max77693-fuel-gauge@36 {
i2c_ak8975: i2c-gpio-0 { i2c_ak8975: i2c-gpio-0 {
compatible = "i2c-gpio"; compatible = "i2c-gpio";
gpios = <&gpy2 4 0>, <&gpy2 5 0>; gpios = <&gpy2 4 GPIO_ACTIVE_HIGH>, <&gpy2 5 GPIO_ACTIVE_HIGH>;
i2c-gpio,delay-us = <2>; i2c-gpio,delay-us = <2>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -207,13 +207,13 @@ i2c_ak8975: i2c-gpio-0 { ...@@ -207,13 +207,13 @@ i2c_ak8975: i2c-gpio-0 {
ak8975@0c { ak8975@0c {
compatible = "asahi-kasei,ak8975"; compatible = "asahi-kasei,ak8975";
reg = <0x0c>; reg = <0x0c>;
gpios = <&gpj0 7 0>; gpios = <&gpj0 7 GPIO_ACTIVE_HIGH>;
}; };
}; };
i2c_cm36651: i2c-gpio-2 { i2c_cm36651: i2c-gpio-2 {
compatible = "i2c-gpio"; compatible = "i2c-gpio";
gpios = <&gpf0 0 1>, <&gpf0 1 1>; gpios = <&gpf0 0 GPIO_ACTIVE_LOW>, <&gpf0 1 GPIO_ACTIVE_LOW>;
i2c-gpio,delay-us = <2>; i2c-gpio,delay-us = <2>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -359,7 +359,7 @@ panel@0 { ...@@ -359,7 +359,7 @@ panel@0 {
reg = <0>; reg = <0>;
vdd3-supply = <&lcd_vdd3_reg>; vdd3-supply = <&lcd_vdd3_reg>;
vci-supply = <&ldo25_reg>; vci-supply = <&ldo25_reg>;
reset-gpios = <&gpy4 5 0>; reset-gpios = <&gpy4 5 GPIO_ACTIVE_HIGH>;
power-on-delay= <50>; power-on-delay= <50>;
reset-delay = <100>; reset-delay = <100>;
init-delay = <100>; init-delay = <100>;
...@@ -446,7 +446,7 @@ s5k6a3@10 { ...@@ -446,7 +446,7 @@ s5k6a3@10 {
clocks = <&camera 1>; clocks = <&camera 1>;
clock-names = "extclk"; clock-names = "extclk";
samsung,camclk-out = <1>; samsung,camclk-out = <1>;
gpios = <&gpm1 6 0>; gpios = <&gpm1 6 GPIO_ACTIVE_HIGH>;
port { port {
is_s5k6a3_ep: endpoint { is_s5k6a3_ep: endpoint {
...@@ -488,8 +488,8 @@ &i2c_0 { ...@@ -488,8 +488,8 @@ &i2c_0 {
s5c73m3@3c { s5c73m3@3c {
compatible = "samsung,s5c73m3"; compatible = "samsung,s5c73m3";
reg = <0x3c>; reg = <0x3c>;
standby-gpios = <&gpm0 1 1>; /* ISP_STANDBY */ standby-gpios = <&gpm0 1 GPIO_ACTIVE_LOW>; /* ISP_STANDBY */
xshutdown-gpios = <&gpf1 3 1>; /* ISP_RESET */ xshutdown-gpios = <&gpf1 3 GPIO_ACTIVE_LOW>; /* ISP_RESET */
vdd-int-supply = <&buck9_reg>; vdd-int-supply = <&buck9_reg>;
vddio-cis-supply = <&ldo9_reg>; vddio-cis-supply = <&ldo9_reg>;
vdda-supply = <&ldo17_reg>; vdda-supply = <&ldo17_reg>;
...@@ -1241,7 +1241,7 @@ &rtc { ...@@ -1241,7 +1241,7 @@ &rtc {
&sdhci_2 { &sdhci_2 {
bus-width = <4>; bus-width = <4>;
cd-gpios = <&gpx3 4 0>; cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
cd-inverted; cd-inverted;
pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>; pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
pinctrl-names = "default"; pinctrl-names = "default";
...@@ -1268,7 +1268,7 @@ &serial_3 { ...@@ -1268,7 +1268,7 @@ &serial_3 {
&spi_1 { &spi_1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&spi1_bus>; pinctrl-0 = <&spi1_bus>;
cs-gpios = <&gpb 5 0>; cs-gpios = <&gpb 5 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
s5c73m3_spi: s5c73m3 { s5c73m3_spi: s5c73m3 {
......
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