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

ARM: dts: Use GPIO constants for flags cells in exynos4120 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 de77e52d
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
/dts-v1/; /dts-v1/;
#include "exynos4210.dtsi" #include "exynos4210.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;
}; };
}; };
...@@ -57,35 +58,35 @@ gpio_keys { ...@@ -57,35 +58,35 @@ gpio_keys {
up { up {
label = "Up"; label = "Up";
gpios = <&gpx2 0 1>; gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_UP>; linux,code = <KEY_UP>;
gpio-key,wakeup; gpio-key,wakeup;
}; };
down { down {
label = "Down"; label = "Down";
gpios = <&gpx2 1 1>; gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_DOWN>; linux,code = <KEY_DOWN>;
gpio-key,wakeup; gpio-key,wakeup;
}; };
back { back {
label = "Back"; label = "Back";
gpios = <&gpx1 7 1>; gpios = <&gpx1 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_BACK>; linux,code = <KEY_BACK>;
gpio-key,wakeup; gpio-key,wakeup;
}; };
home { home {
label = "Home"; label = "Home";
gpios = <&gpx1 6 1>; gpios = <&gpx1 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOME>; linux,code = <KEY_HOME>;
gpio-key,wakeup; gpio-key,wakeup;
}; };
menu { menu {
label = "Menu"; label = "Menu";
gpios = <&gpx1 5 1>; gpios = <&gpx1 5 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MENU>; linux,code = <KEY_MENU>;
gpio-key,wakeup; gpio-key,wakeup;
}; };
...@@ -94,7 +95,7 @@ menu { ...@@ -94,7 +95,7 @@ menu {
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
status { status {
gpios = <&gpx1 3 1>; gpios = <&gpx1 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
}; };
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
/dts-v1/; /dts-v1/;
#include "exynos4210.dtsi" #include "exynos4210.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "Samsung smdkv310 evaluation board based on Exynos4210"; model = "Samsung smdkv310 evaluation board based on Exynos4210";
...@@ -182,7 +183,7 @@ &serial_3 { ...@@ -182,7 +183,7 @@ &serial_3 {
}; };
&spi_2 { &spi_2 {
cs-gpios = <&gpc1 2 0>; cs-gpios = <&gpc1 2 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
w25x80@0 { w25x80@0 {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
/dts-v1/; /dts-v1/;
#include "exynos4210.dtsi" #include "exynos4210.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "Samsung Trats based on Exynos4210"; model = "Samsung Trats based on Exynos4210";
...@@ -39,7 +40,7 @@ vemmc_reg: regulator-0 { ...@@ -39,7 +40,7 @@ vemmc_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 = <&gpk0 2 0>; gpio = <&gpk0 2 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -48,7 +49,7 @@ tsp_reg: regulator-1 { ...@@ -48,7 +49,7 @@ tsp_reg: regulator-1 {
regulator-name = "TSP_FIXED_VOLTAGES"; regulator-name = "TSP_FIXED_VOLTAGES";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpl0 3 0>; gpio = <&gpl0 3 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -57,7 +58,7 @@ cam_af_28v_reg: regulator-2 { ...@@ -57,7 +58,7 @@ cam_af_28v_reg: regulator-2 {
regulator-name = "8M_AF_2.8V_EN"; regulator-name = "8M_AF_2.8V_EN";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpk1 1 0>; gpio = <&gpk1 1 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -66,7 +67,7 @@ cam_io_en_reg: regulator-3 { ...@@ -66,7 +67,7 @@ cam_io_en_reg: regulator-3 {
regulator-name = "CAM_IO_EN"; regulator-name = "CAM_IO_EN";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpe2 1 0>; gpio = <&gpe2 1 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -75,7 +76,7 @@ cam_io_12v_reg: regulator-4 { ...@@ -75,7 +76,7 @@ cam_io_12v_reg: regulator-4 {
regulator-name = "8M_1.2V_EN"; regulator-name = "8M_1.2V_EN";
regulator-min-microvolt = <1200000>; regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>; regulator-max-microvolt = <1200000>;
gpio = <&gpe2 5 0>; gpio = <&gpe2 5 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -84,7 +85,7 @@ vt_core_15v_reg: regulator-5 { ...@@ -84,7 +85,7 @@ vt_core_15v_reg: regulator-5 {
regulator-name = "VT_CORE_1.5V"; regulator-name = "VT_CORE_1.5V";
regulator-min-microvolt = <1500000>; regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>; regulator-max-microvolt = <1500000>;
gpio = <&gpe2 2 0>; gpio = <&gpe2 2 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
}; };
...@@ -93,21 +94,21 @@ gpio-keys { ...@@ -93,21 +94,21 @@ gpio-keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
vol-down-key { vol-down-key {
gpios = <&gpx2 1 1>; gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
linux,code = <114>; linux,code = <114>;
label = "volume down"; label = "volume down";
debounce-interval = <10>; debounce-interval = <10>;
}; };
vol-up-key { vol-up-key {
gpios = <&gpx2 0 1>; gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
linux,code = <115>; linux,code = <115>;
label = "volume up"; label = "volume up";
debounce-interval = <10>; debounce-interval = <10>;
}; };
power-key { power-key {
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>;
...@@ -115,7 +116,7 @@ power-key { ...@@ -115,7 +116,7 @@ power-key {
}; };
ok-key { ok-key {
gpios = <&gpx3 5 1>; gpios = <&gpx3 5 GPIO_ACTIVE_LOW>;
linux,code = <352>; linux,code = <352>;
label = "ok"; label = "ok";
debounce-interval = <10>; debounce-interval = <10>;
...@@ -218,7 +219,7 @@ panel@0 { ...@@ -218,7 +219,7 @@ panel@0 {
compatible = "samsung,s6e8aa0"; compatible = "samsung,s6e8aa0";
vdd3-supply = <&vcclcd_reg>; vdd3-supply = <&vcclcd_reg>;
vci-supply = <&vlcd_reg>; vci-supply = <&vlcd_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>;
...@@ -304,9 +305,9 @@ max8997_pmic@66 { ...@@ -304,9 +305,9 @@ max8997_pmic@66 {
max8997,pmic-ignore-gpiodvs-side-effect; max8997,pmic-ignore-gpiodvs-side-effect;
max8997,pmic-buck125-default-dvs-idx = <0>; max8997,pmic-buck125-default-dvs-idx = <0>;
max8997,pmic-buck125-dvs-gpios = <&gpx0 5 0>, max8997,pmic-buck125-dvs-gpios = <&gpx0 5 GPIO_ACTIVE_HIGH>,
<&gpx0 6 0>, <&gpx0 6 GPIO_ACTIVE_HIGH>,
<&gpl0 0 0>; <&gpl0 0 GPIO_ACTIVE_HIGH>;
max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>, max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
<1250000>, <1200000>, <1250000>, <1200000>,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
/dts-v1/; /dts-v1/;
#include "exynos4210.dtsi" #include "exynos4210.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "Samsung Universal C210 based on Exynos4210 rev0"; model = "Samsung Universal C210 based on Exynos4210 rev0";
...@@ -65,7 +66,7 @@ vemmc_reg: voltage-regulator { ...@@ -65,7 +66,7 @@ vemmc_reg: voltage-regulator {
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 = <&gpe1 3 0>; gpio = <&gpe1 3 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -73,21 +74,21 @@ gpio-keys { ...@@ -73,21 +74,21 @@ gpio-keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
vol-up-key { vol-up-key {
gpios = <&gpx2 0 1>; gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
linux,code = <115>; linux,code = <115>;
label = "volume up"; label = "volume up";
debounce-interval = <1>; debounce-interval = <1>;
}; };
vol-down-key { vol-down-key {
gpios = <&gpx2 1 1>; gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
linux,code = <114>; linux,code = <114>;
label = "volume down"; label = "volume down";
debounce-interval = <1>; debounce-interval = <1>;
}; };
config-key { config-key {
gpios = <&gpx2 2 1>; gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
linux,code = <171>; linux,code = <171>;
label = "config"; label = "config";
debounce-interval = <1>; debounce-interval = <1>;
...@@ -95,14 +96,14 @@ config-key { ...@@ -95,14 +96,14 @@ config-key {
}; };
camera-key { camera-key {
gpios = <&gpx2 3 1>; gpios = <&gpx2 3 GPIO_ACTIVE_LOW>;
linux,code = <212>; linux,code = <212>;
label = "camera"; label = "camera";
debounce-interval = <1>; debounce-interval = <1>;
}; };
power-key { power-key {
gpios = <&gpx2 7 1>; gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
linux,code = <116>; linux,code = <116>;
label = "power"; label = "power";
debounce-interval = <1>; debounce-interval = <1>;
...@@ -110,7 +111,7 @@ power-key { ...@@ -110,7 +111,7 @@ power-key {
}; };
ok-key { ok-key {
gpios = <&gpx3 5 1>; gpios = <&gpx3 5 GPIO_ACTIVE_LOW>;
linux,code = <352>; linux,code = <352>;
label = "ok"; label = "ok";
debounce-interval = <1>; debounce-interval = <1>;
...@@ -122,7 +123,7 @@ tsp_reg: voltage-regulator { ...@@ -122,7 +123,7 @@ tsp_reg: voltage-regulator {
regulator-name = "TSP_2_8V"; regulator-name = "TSP_2_8V";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
gpio = <&gpe2 3 0>; gpio = <&gpe2 3 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
...@@ -131,17 +132,17 @@ spi-lcd { ...@@ -131,17 +132,17 @@ spi-lcd {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
gpio-sck = <&gpy3 1 0>; gpio-sck = <&gpy3 1 GPIO_ACTIVE_HIGH>;
gpio-mosi = <&gpy3 3 0>; gpio-mosi = <&gpy3 3 GPIO_ACTIVE_HIGH>;
num-chipselects = <1>; num-chipselects = <1>;
cs-gpios = <&gpy4 3 0>; cs-gpios = <&gpy4 3 GPIO_ACTIVE_HIGH>;
lcd@0 { lcd@0 {
compatible = "samsung,ld9040"; compatible = "samsung,ld9040";
reg = <0>; reg = <0>;
vdd3-supply = <&ldo7_reg>; vdd3-supply = <&ldo7_reg>;
vci-supply = <&ldo17_reg>; vci-supply = <&ldo17_reg>;
reset-gpios = <&gpy4 5 0>; reset-gpios = <&gpy4 5 GPIO_ACTIVE_HIGH>;
spi-max-frequency = <1200000>; spi-max-frequency = <1200000>;
spi-cpol; spi-cpol;
spi-cpha; spi-cpha;
...@@ -218,13 +219,13 @@ hdmi_en: voltage-regulator-hdmi-5v { ...@@ -218,13 +219,13 @@ hdmi_en: voltage-regulator-hdmi-5v {
regulator-name = "HDMI_5V"; regulator-name = "HDMI_5V";
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
gpio = <&gpe0 1 0>; gpio = <&gpe0 1 GPIO_ACTIVE_HIGH>;
enable-active-high; enable-active-high;
}; };
hdmi_ddc: i2c-ddc { hdmi_ddc: i2c-ddc {
compatible = "i2c-gpio"; compatible = "i2c-gpio";
gpios = <&gpe4 2 0 &gpe4 3 0>; gpios = <&gpe4 2 GPIO_ACTIVE_HIGH &gpe4 3 GPIO_ACTIVE_HIGH>;
i2c-gpio,delay-us = <100>; i2c-gpio,delay-us = <100>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -267,7 +268,7 @@ fimd_dpi_ep: endpoint { ...@@ -267,7 +268,7 @@ fimd_dpi_ep: endpoint {
}; };
&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>;
hdmi-en-supply = <&hdmi_en>; hdmi-en-supply = <&hdmi_en>;
...@@ -311,7 +312,8 @@ vdd_arm_reg: pmic@60 { ...@@ -311,7 +312,8 @@ vdd_arm_reg: pmic@60 {
compatible = "maxim,max8952"; compatible = "maxim,max8952";
reg = <0x60>; reg = <0x60>;
max8952,vid-gpios = <&gpx0 3 0>, <&gpx0 4 0>; max8952,vid-gpios = <&gpx0 3 GPIO_ACTIVE_HIGH>,
<&gpx0 4 GPIO_ACTIVE_HIGH>;
max8952,default-mode = <0>; max8952,default-mode = <0>;
max8952,dvs-mode-microvolt = <1250000>, <1200000>, max8952,dvs-mode-microvolt = <1250000>, <1200000>,
<1050000>, <950000>; <1050000>, <950000>;
...@@ -330,13 +332,13 @@ pmic@66 { ...@@ -330,13 +332,13 @@ pmic@66 {
reg = <0x66>; reg = <0x66>;
max8998,pmic-buck1-default-dvs-idx = <0>; max8998,pmic-buck1-default-dvs-idx = <0>;
max8998,pmic-buck1-dvs-gpios = <&gpx0 5 0>, max8998,pmic-buck1-dvs-gpios = <&gpx0 5 GPIO_ACTIVE_HIGH>,
<&gpx0 6 0>; <&gpx0 6 GPIO_ACTIVE_HIGH>;
max8998,pmic-buck1-dvs-voltage = <1100000>, <1000000>, max8998,pmic-buck1-dvs-voltage = <1100000>, <1000000>,
<1100000>, <1000000>; <1100000>, <1000000>;
max8998,pmic-buck2-default-dvs-idx = <0>; max8998,pmic-buck2-default-dvs-idx = <0>;
max8998,pmic-buck2-dvs-gpio = <&gpe2 0 0>; max8998,pmic-buck2-dvs-gpio = <&gpe2 0 GPIO_ACTIVE_HIGH>;
max8998,pmic-buck2-dvs-voltage = <1200000>, <1100000>; max8998,pmic-buck2-dvs-voltage = <1200000>, <1100000>;
regulators { regulators {
...@@ -551,7 +553,7 @@ &sdhci_2 { ...@@ -551,7 +553,7 @@ &sdhci_2 {
pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>; pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
pinctrl-names = "default"; pinctrl-names = "default";
vmmc-supply = <&ldo5_reg>; vmmc-supply = <&ldo5_reg>;
cd-gpios = <&gpx3 4 0>; cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
cd-inverted; cd-inverted;
status = "okay"; status = "okay";
}; };
......
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