Commit 4eb45558 authored by Andy Yan's avatar Andy Yan Committed by Heiko Stuebner

arm64: dts: rockchip: use pin constants to describe gpios

Use macros to describe gpios will make the dts easier to
read and write.
Signed-off-by: default avatarAndy Yan <andy.yan@rock-chips.com>
[converted interrupt-gpios and new rk3399-evb backlight]
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent b5d1c572
...@@ -90,7 +90,7 @@ backlight: backlight { ...@@ -90,7 +90,7 @@ backlight: backlight {
240 241 242 243 244 245 246 247 240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255>; 248 249 250 251 252 253 254 255>;
default-brightness-level = <128>; default-brightness-level = <128>;
enable-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&bl_en>; pinctrl-0 = <&bl_en>;
pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>; pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
...@@ -101,7 +101,7 @@ emmc_pwrseq: emmc-pwrseq { ...@@ -101,7 +101,7 @@ emmc_pwrseq: emmc-pwrseq {
compatible = "mmc-pwrseq-emmc"; compatible = "mmc-pwrseq-emmc";
pinctrl-0 = <&emmc_reset>; pinctrl-0 = <&emmc_reset>;
pinctrl-names = "default"; pinctrl-names = "default";
reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
}; };
keys: gpio-keys { keys: gpio-keys {
...@@ -111,7 +111,7 @@ keys: gpio-keys { ...@@ -111,7 +111,7 @@ keys: gpio-keys {
power { power {
wakeup-source; wakeup-source;
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
label = "GPIO Power"; label = "GPIO Power";
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
}; };
...@@ -121,7 +121,7 @@ power { ...@@ -121,7 +121,7 @@ power {
vcc_host: vcc-host-regulator { vcc_host: vcc-host-regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
enable-active-high; enable-active-high;
gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>; gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&host_vbus_drv>; pinctrl-0 = <&host_vbus_drv>;
regulator-name = "vcc_host"; regulator-name = "vcc_host";
...@@ -166,7 +166,7 @@ &gmac { ...@@ -166,7 +166,7 @@ &gmac {
phy-supply = <&vcc_lan>; phy-supply = <&vcc_lan>;
phy-mode = "rmii"; phy-mode = "rmii";
clock_in_out = "output"; clock_in_out = "output";
snps,reset-gpio = <&gpio3 12 0>; snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
snps,reset-active-low; snps,reset-active-low;
snps,reset-delays-us = <0 10000 1000000>; snps,reset-delays-us = <0 10000 1000000>;
pinctrl-names = "default"; pinctrl-names = "default";
......
...@@ -66,7 +66,7 @@ ext_gmac: gmac-clk { ...@@ -66,7 +66,7 @@ ext_gmac: gmac-clk {
ir: ir-receiver { ir: ir-receiver {
compatible = "gpio-ir-receiver"; compatible = "gpio-ir-receiver";
gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ir_int>; pinctrl-0 = <&ir_int>;
}; };
...@@ -77,7 +77,7 @@ keys: gpio-keys { ...@@ -77,7 +77,7 @@ keys: gpio-keys {
pinctrl-0 = <&pwr_key>; pinctrl-0 = <&pwr_key>;
power { power {
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
label = "GPIO Power"; label = "GPIO Power";
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
wakeup-source; wakeup-source;
...@@ -88,13 +88,13 @@ leds: gpio-leds { ...@@ -88,13 +88,13 @@ leds: gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue { blue {
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
label = "geekbox:blue:led"; label = "geekbox:blue:led";
default-state = "on"; default-state = "on";
}; };
red { red {
gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
label = "geekbox:red:led"; label = "geekbox:red:led";
default-state = "off"; default-state = "off";
}; };
...@@ -146,7 +146,7 @@ rk808: pmic@1b { ...@@ -146,7 +146,7 @@ rk808: pmic@1b {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pmic_int>, <&pmic_sleep>; pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
interrupt-parent = <&gpio0>; interrupt-parent = <&gpio0>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>; interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
rockchip,system-power-controller; rockchip,system-power-controller;
vcc1-supply = <&vcc_sys>; vcc1-supply = <&vcc_sys>;
vcc2-supply = <&vcc_sys>; vcc2-supply = <&vcc_sys>;
......
...@@ -61,7 +61,7 @@ emmc_pwrseq: emmc-pwrseq { ...@@ -61,7 +61,7 @@ emmc_pwrseq: emmc-pwrseq {
compatible = "mmc-pwrseq-emmc"; compatible = "mmc-pwrseq-emmc";
pinctrl-0 = <&emmc_reset>; pinctrl-0 = <&emmc_reset>;
pinctrl-names = "default"; pinctrl-names = "default";
reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
}; };
ext_gmac: external-gmac-clock { ext_gmac: external-gmac-clock {
...@@ -78,7 +78,7 @@ keys: gpio-keys { ...@@ -78,7 +78,7 @@ keys: gpio-keys {
power { power {
wakeup-source; wakeup-source;
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
label = "GPIO Power"; label = "GPIO Power";
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
}; };
...@@ -88,7 +88,7 @@ leds: gpio-leds { ...@@ -88,7 +88,7 @@ leds: gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
red { red {
gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
label = "orion:red:led"; label = "orion:red:led";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&led_ctl>; pinctrl-0 = <&led_ctl>;
...@@ -96,7 +96,7 @@ red { ...@@ -96,7 +96,7 @@ red {
}; };
blue { blue {
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
label = "orion:blue:led"; label = "orion:blue:led";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&stby_pwren>; pinctrl-0 = <&stby_pwren>;
...@@ -117,7 +117,7 @@ vcc_18: vcc18-regulator { ...@@ -117,7 +117,7 @@ vcc_18: vcc18-regulator {
/* supplies both host and otg */ /* supplies both host and otg */
vcc_host: vcc-host-regulator { vcc_host: vcc-host-regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
gpio = <&gpio0 4 GPIO_ACTIVE_LOW>; gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&host_vbus_drv>; pinctrl-0 = <&host_vbus_drv>;
regulator-name = "vcc_host"; regulator-name = "vcc_host";
...@@ -149,7 +149,7 @@ vcc_lan: vcc-lan-regulator { ...@@ -149,7 +149,7 @@ vcc_lan: vcc-lan-regulator {
vcc_sd: vcc-sd-regulator { vcc_sd: vcc-sd-regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vcc_sd"; regulator-name = "vcc_sd";
gpio = <&gpio3 11 GPIO_ACTIVE_LOW>; gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_io>; vin-supply = <&vcc_io>;
...@@ -217,7 +217,7 @@ &gmac { ...@@ -217,7 +217,7 @@ &gmac {
phy-mode = "rgmii"; phy-mode = "rgmii";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>; pinctrl-0 = <&rgmii_pins>;
snps,reset-gpio = <&gpio3 12 0>; snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
snps,reset-active-low; snps,reset-active-low;
snps,reset-delays-us = <0 10000 1000000>; snps,reset-delays-us = <0 10000 1000000>;
tx_delay = <0x30>; tx_delay = <0x30>;
......
...@@ -63,7 +63,7 @@ keys: gpio-keys { ...@@ -63,7 +63,7 @@ keys: gpio-keys {
pinctrl-0 = <&pwr_key>; pinctrl-0 = <&pwr_key>;
power { power {
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
label = "GPIO Power"; label = "GPIO Power";
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
wakeup-source; wakeup-source;
...@@ -105,7 +105,7 @@ rk808: pmic@1b { ...@@ -105,7 +105,7 @@ rk808: pmic@1b {
compatible = "rockchip,rk808"; compatible = "rockchip,rk808";
reg = <0x1b>; reg = <0x1b>;
interrupt-parent = <&gpio0>; interrupt-parent = <&gpio0>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>; interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pmic_int>, <&pmic_sleep>; pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
rockchip,system-power-controller; rockchip,system-power-controller;
...@@ -236,7 +236,7 @@ accelerometer@18 { ...@@ -236,7 +236,7 @@ accelerometer@18 {
compatible = "bosch,bma250"; compatible = "bosch,bma250";
reg = <0x18>; reg = <0x18>;
interrupt-parent = <&gpio2>; interrupt-parent = <&gpio2>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>; interrupts = <RK_PC1 IRQ_TYPE_LEVEL_LOW>;
}; };
}; };
...@@ -247,8 +247,8 @@ gsl1680: touchscreen@40 { ...@@ -247,8 +247,8 @@ gsl1680: touchscreen@40 {
compatible = "silead,gsl1680"; compatible = "silead,gsl1680";
reg = <0x40>; reg = <0x40>;
interrupt-parent = <&gpio3>; interrupt-parent = <&gpio3>;
interrupts = <28 IRQ_TYPE_EDGE_FALLING>; interrupts = <RK_PD4 IRQ_TYPE_EDGE_FALLING>;
power-gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>; power-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
touchscreen-size-x = <800>; touchscreen-size-x = <800>;
touchscreen-size-y = <1280>; touchscreen-size-y = <1280>;
silead,max-fingers = <5>; silead,max-fingers = <5>;
......
...@@ -61,7 +61,7 @@ emmc_pwrseq: emmc-pwrseq { ...@@ -61,7 +61,7 @@ emmc_pwrseq: emmc-pwrseq {
compatible = "mmc-pwrseq-emmc"; compatible = "mmc-pwrseq-emmc";
pinctrl-0 = <&emmc_reset>; pinctrl-0 = <&emmc_reset>;
pinctrl-names = "default"; pinctrl-names = "default";
reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
}; };
keys: gpio-keys { keys: gpio-keys {
...@@ -71,7 +71,7 @@ keys: gpio-keys { ...@@ -71,7 +71,7 @@ keys: gpio-keys {
power { power {
wakeup-source; wakeup-source;
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
label = "GPIO Power"; label = "GPIO Power";
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
}; };
...@@ -81,7 +81,7 @@ leds: gpio-leds { ...@@ -81,7 +81,7 @@ leds: gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
work { work {
gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
label = "r88:green:led"; label = "r88:green:led";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&led_ctl>; pinctrl-0 = <&led_ctl>;
...@@ -90,7 +90,7 @@ work { ...@@ -90,7 +90,7 @@ work {
ir: ir-receiver { ir: ir-receiver {
compatible = "gpio-ir-receiver"; compatible = "gpio-ir-receiver";
gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ir_int>; pinctrl-0 = <&ir_int>;
}; };
...@@ -104,10 +104,10 @@ sdio_pwrseq: sdio-pwrseq { ...@@ -104,10 +104,10 @@ sdio_pwrseq: sdio-pwrseq {
reset-gpios = reset-gpios =
/* BT_RST_N */ /* BT_RST_N */
<&gpio3 5 GPIO_ACTIVE_LOW>, <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>,
/* WL_REG_ON */ /* WL_REG_ON */
<&gpio3 4 GPIO_ACTIVE_LOW>; <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
}; };
vcc_18: vcc18-regulator { vcc_18: vcc18-regulator {
...@@ -124,7 +124,7 @@ vcc_18: vcc18-regulator { ...@@ -124,7 +124,7 @@ vcc_18: vcc18-regulator {
vcc_host: vcc-host-regulator { vcc_host: vcc-host-regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
enable-active-high; enable-active-high;
gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>; gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&host_vbus_drv>; pinctrl-0 = <&host_vbus_drv>;
regulator-name = "vcc_host"; regulator-name = "vcc_host";
...@@ -199,7 +199,7 @@ &gmac { ...@@ -199,7 +199,7 @@ &gmac {
phy-supply = <&vcc_lan>; phy-supply = <&vcc_lan>;
phy-mode = "rmii"; phy-mode = "rmii";
clock_in_out = "output"; clock_in_out = "output";
snps,reset-gpio = <&gpio3 12 0>; snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
snps,reset-active-low; snps,reset-active-low;
snps,reset-delays-us = <0 10000 1000000>; snps,reset-delays-us = <0 10000 1000000>;
pinctrl-names = "default"; pinctrl-names = "default";
......
...@@ -85,7 +85,7 @@ backlight: backlight { ...@@ -85,7 +85,7 @@ backlight: backlight {
240 241 242 243 244 245 246 247 240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255>; 248 249 250 251 252 253 254 255>;
default-brightness-level = <200>; default-brightness-level = <200>;
enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
pwms = <&pwm0 0 25000 0>; pwms = <&pwm0 0 25000 0>;
}; };
...@@ -128,7 +128,7 @@ vcc5v0_sys: vcc5v0-sys { ...@@ -128,7 +128,7 @@ vcc5v0_sys: vcc5v0-sys {
vcc5v0_host: vcc5v0-host-regulator { vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
enable-active-high; enable-active-high;
gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_host_en>; pinctrl-0 = <&vcc5v0_host_en>;
regulator-name = "vcc5v0_host"; regulator-name = "vcc5v0_host";
...@@ -163,7 +163,7 @@ &gmac { ...@@ -163,7 +163,7 @@ &gmac {
phy-mode = "rgmii"; phy-mode = "rgmii";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>; pinctrl-0 = <&rgmii_pins>;
snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>; snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low; snps,reset-active-low;
snps,reset-delays-us = <0 10000 50000>; snps,reset-delays-us = <0 10000 50000>;
tx_delay = <0x28>; tx_delay = <0x28>;
...@@ -196,7 +196,7 @@ &pcie_phy { ...@@ -196,7 +196,7 @@ &pcie_phy {
}; };
&pcie0 { &pcie0 {
ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
num-lanes = <4>; num-lanes = <4>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pcie_clkreqn>; pinctrl-0 = <&pcie_clkreqn>;
......
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