aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Yan <andy.yan@rock-chips.com>2016-10-22 08:59:04 -0400
committerHeiko Stuebner <heiko@sntech.de>2017-01-02 08:25:10 -0500
commit4eb45558909e922757555ed65362c4701885d8a5 (patch)
tree5917759a94a0c9360c8d87be8fb2c8361e287639
parentb5d1c57299734f5b54035ef2e61706b83041f20c (diff)
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: Andy Yan <andy.yan@rock-chips.com> [converted interrupt-gpios and new rk3399-evb backlight] Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi10
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts10
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts14
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts10
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3368-r88.dts16
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3399-evb.dts8
6 files changed, 34 insertions, 34 deletions
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi b/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
index fff8b1931f26..4772917c5f7e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
@@ -90,7 +90,7 @@
90 240 241 242 243 244 245 246 247 90 240 241 242 243 244 245 246 247
91 248 249 250 251 252 253 254 255>; 91 248 249 250 251 252 253 254 255>;
92 default-brightness-level = <128>; 92 default-brightness-level = <128>;
93 enable-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; 93 enable-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
94 pinctrl-names = "default"; 94 pinctrl-names = "default";
95 pinctrl-0 = <&bl_en>; 95 pinctrl-0 = <&bl_en>;
96 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>; 96 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
@@ -101,7 +101,7 @@
101 compatible = "mmc-pwrseq-emmc"; 101 compatible = "mmc-pwrseq-emmc";
102 pinctrl-0 = <&emmc_reset>; 102 pinctrl-0 = <&emmc_reset>;
103 pinctrl-names = "default"; 103 pinctrl-names = "default";
104 reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 104 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
105 }; 105 };
106 106
107 keys: gpio-keys { 107 keys: gpio-keys {
@@ -111,7 +111,7 @@
111 111
112 power { 112 power {
113 wakeup-source; 113 wakeup-source;
114 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 114 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
115 label = "GPIO Power"; 115 label = "GPIO Power";
116 linux,code = <KEY_POWER>; 116 linux,code = <KEY_POWER>;
117 }; 117 };
@@ -121,7 +121,7 @@
121 vcc_host: vcc-host-regulator { 121 vcc_host: vcc-host-regulator {
122 compatible = "regulator-fixed"; 122 compatible = "regulator-fixed";
123 enable-active-high; 123 enable-active-high;
124 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>; 124 gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
125 pinctrl-names = "default"; 125 pinctrl-names = "default";
126 pinctrl-0 = <&host_vbus_drv>; 126 pinctrl-0 = <&host_vbus_drv>;
127 regulator-name = "vcc_host"; 127 regulator-name = "vcc_host";
@@ -166,7 +166,7 @@
166 phy-supply = <&vcc_lan>; 166 phy-supply = <&vcc_lan>;
167 phy-mode = "rmii"; 167 phy-mode = "rmii";
168 clock_in_out = "output"; 168 clock_in_out = "output";
169 snps,reset-gpio = <&gpio3 12 0>; 169 snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
170 snps,reset-active-low; 170 snps,reset-active-low;
171 snps,reset-delays-us = <0 10000 1000000>; 171 snps,reset-delays-us = <0 10000 1000000>;
172 pinctrl-names = "default"; 172 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
index e5eeca2c2456..e631d424f08e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
@@ -66,7 +66,7 @@
66 66
67 ir: ir-receiver { 67 ir: ir-receiver {
68 compatible = "gpio-ir-receiver"; 68 compatible = "gpio-ir-receiver";
69 gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; 69 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
70 pinctrl-names = "default"; 70 pinctrl-names = "default";
71 pinctrl-0 = <&ir_int>; 71 pinctrl-0 = <&ir_int>;
72 }; 72 };
@@ -77,7 +77,7 @@
77 pinctrl-0 = <&pwr_key>; 77 pinctrl-0 = <&pwr_key>;
78 78
79 power { 79 power {
80 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 80 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
81 label = "GPIO Power"; 81 label = "GPIO Power";
82 linux,code = <KEY_POWER>; 82 linux,code = <KEY_POWER>;
83 wakeup-source; 83 wakeup-source;
@@ -88,13 +88,13 @@
88 compatible = "gpio-leds"; 88 compatible = "gpio-leds";
89 89
90 blue { 90 blue {
91 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; 91 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
92 label = "geekbox:blue:led"; 92 label = "geekbox:blue:led";
93 default-state = "on"; 93 default-state = "on";
94 }; 94 };
95 95
96 red { 96 red {
97 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 97 gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
98 label = "geekbox:red:led"; 98 label = "geekbox:red:led";
99 default-state = "off"; 99 default-state = "off";
100 }; 100 };
@@ -146,7 +146,7 @@
146 pinctrl-names = "default"; 146 pinctrl-names = "default";
147 pinctrl-0 = <&pmic_int>, <&pmic_sleep>; 147 pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
148 interrupt-parent = <&gpio0>; 148 interrupt-parent = <&gpio0>;
149 interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 149 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
150 rockchip,system-power-controller; 150 rockchip,system-power-controller;
151 vcc1-supply = <&vcc_sys>; 151 vcc1-supply = <&vcc_sys>;
152 vcc2-supply = <&vcc_sys>; 152 vcc2-supply = <&vcc_sys>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
index ff5a40399d02..fac116acc12f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
@@ -61,7 +61,7 @@
61 compatible = "mmc-pwrseq-emmc"; 61 compatible = "mmc-pwrseq-emmc";
62 pinctrl-0 = <&emmc_reset>; 62 pinctrl-0 = <&emmc_reset>;
63 pinctrl-names = "default"; 63 pinctrl-names = "default";
64 reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 64 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
65 }; 65 };
66 66
67 ext_gmac: external-gmac-clock { 67 ext_gmac: external-gmac-clock {
@@ -78,7 +78,7 @@
78 78
79 power { 79 power {
80 wakeup-source; 80 wakeup-source;
81 gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; 81 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
82 label = "GPIO Power"; 82 label = "GPIO Power";
83 linux,code = <KEY_POWER>; 83 linux,code = <KEY_POWER>;
84 }; 84 };
@@ -88,7 +88,7 @@
88 compatible = "gpio-leds"; 88 compatible = "gpio-leds";
89 89
90 red { 90 red {
91 gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>; 91 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
92 label = "orion:red:led"; 92 label = "orion:red:led";
93 pinctrl-names = "default"; 93 pinctrl-names = "default";
94 pinctrl-0 = <&led_ctl>; 94 pinctrl-0 = <&led_ctl>;
@@ -96,7 +96,7 @@
96 }; 96 };
97 97
98 blue { 98 blue {
99 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; 99 gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
100 label = "orion:blue:led"; 100 label = "orion:blue:led";
101 pinctrl-names = "default"; 101 pinctrl-names = "default";
102 pinctrl-0 = <&stby_pwren>; 102 pinctrl-0 = <&stby_pwren>;
@@ -117,7 +117,7 @@
117 /* supplies both host and otg */ 117 /* supplies both host and otg */
118 vcc_host: vcc-host-regulator { 118 vcc_host: vcc-host-regulator {
119 compatible = "regulator-fixed"; 119 compatible = "regulator-fixed";
120 gpio = <&gpio0 4 GPIO_ACTIVE_LOW>; 120 gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
121 pinctrl-names = "default"; 121 pinctrl-names = "default";
122 pinctrl-0 = <&host_vbus_drv>; 122 pinctrl-0 = <&host_vbus_drv>;
123 regulator-name = "vcc_host"; 123 regulator-name = "vcc_host";
@@ -149,7 +149,7 @@
149 vcc_sd: vcc-sd-regulator { 149 vcc_sd: vcc-sd-regulator {
150 compatible = "regulator-fixed"; 150 compatible = "regulator-fixed";
151 regulator-name = "vcc_sd"; 151 regulator-name = "vcc_sd";
152 gpio = <&gpio3 11 GPIO_ACTIVE_LOW>; 152 gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
153 regulator-min-microvolt = <1800000>; 153 regulator-min-microvolt = <1800000>;
154 regulator-max-microvolt = <3300000>; 154 regulator-max-microvolt = <3300000>;
155 vin-supply = <&vcc_io>; 155 vin-supply = <&vcc_io>;
@@ -217,7 +217,7 @@
217 phy-mode = "rgmii"; 217 phy-mode = "rgmii";
218 pinctrl-names = "default"; 218 pinctrl-names = "default";
219 pinctrl-0 = <&rgmii_pins>; 219 pinctrl-0 = <&rgmii_pins>;
220 snps,reset-gpio = <&gpio3 12 0>; 220 snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
221 snps,reset-active-low; 221 snps,reset-active-low;
222 snps,reset-delays-us = <0 10000 1000000>; 222 snps,reset-delays-us = <0 10000 1000000>;
223 tx_delay = <0x30>; 223 tx_delay = <0x30>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
index 85f7a243d744..8cdb3bff9c55 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
@@ -63,7 +63,7 @@
63 pinctrl-0 = <&pwr_key>; 63 pinctrl-0 = <&pwr_key>;
64 64
65 power { 65 power {
66 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 66 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
67 label = "GPIO Power"; 67 label = "GPIO Power";
68 linux,code = <KEY_POWER>; 68 linux,code = <KEY_POWER>;
69 wakeup-source; 69 wakeup-source;
@@ -105,7 +105,7 @@
105 compatible = "rockchip,rk808"; 105 compatible = "rockchip,rk808";
106 reg = <0x1b>; 106 reg = <0x1b>;
107 interrupt-parent = <&gpio0>; 107 interrupt-parent = <&gpio0>;
108 interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 108 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
109 pinctrl-names = "default"; 109 pinctrl-names = "default";
110 pinctrl-0 = <&pmic_int>, <&pmic_sleep>; 110 pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
111 rockchip,system-power-controller; 111 rockchip,system-power-controller;
@@ -236,7 +236,7 @@
236 compatible = "bosch,bma250"; 236 compatible = "bosch,bma250";
237 reg = <0x18>; 237 reg = <0x18>;
238 interrupt-parent = <&gpio2>; 238 interrupt-parent = <&gpio2>;
239 interrupts = <17 IRQ_TYPE_LEVEL_LOW>; 239 interrupts = <RK_PC1 IRQ_TYPE_LEVEL_LOW>;
240 }; 240 };
241}; 241};
242 242
@@ -247,8 +247,8 @@
247 compatible = "silead,gsl1680"; 247 compatible = "silead,gsl1680";
248 reg = <0x40>; 248 reg = <0x40>;
249 interrupt-parent = <&gpio3>; 249 interrupt-parent = <&gpio3>;
250 interrupts = <28 IRQ_TYPE_EDGE_FALLING>; 250 interrupts = <RK_PD4 IRQ_TYPE_EDGE_FALLING>;
251 power-gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>; 251 power-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
252 touchscreen-size-x = <800>; 252 touchscreen-size-x = <800>;
253 touchscreen-size-y = <1280>; 253 touchscreen-size-y = <1280>;
254 silead,max-fingers = <5>; 254 silead,max-fingers = <5>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
index eed1ef6669ff..7134181f1dc2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
@@ -61,7 +61,7 @@
61 compatible = "mmc-pwrseq-emmc"; 61 compatible = "mmc-pwrseq-emmc";
62 pinctrl-0 = <&emmc_reset>; 62 pinctrl-0 = <&emmc_reset>;
63 pinctrl-names = "default"; 63 pinctrl-names = "default";
64 reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 64 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
65 }; 65 };
66 66
67 keys: gpio-keys { 67 keys: gpio-keys {
@@ -71,7 +71,7 @@
71 71
72 power { 72 power {
73 wakeup-source; 73 wakeup-source;
74 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 74 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
75 label = "GPIO Power"; 75 label = "GPIO Power";
76 linux,code = <KEY_POWER>; 76 linux,code = <KEY_POWER>;
77 }; 77 };
@@ -81,7 +81,7 @@
81 compatible = "gpio-leds"; 81 compatible = "gpio-leds";
82 82
83 work { 83 work {
84 gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>; 84 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
85 label = "r88:green:led"; 85 label = "r88:green:led";
86 pinctrl-names = "default"; 86 pinctrl-names = "default";
87 pinctrl-0 = <&led_ctl>; 87 pinctrl-0 = <&led_ctl>;
@@ -90,7 +90,7 @@
90 90
91 ir: ir-receiver { 91 ir: ir-receiver {
92 compatible = "gpio-ir-receiver"; 92 compatible = "gpio-ir-receiver";
93 gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; 93 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
94 pinctrl-names = "default"; 94 pinctrl-names = "default";
95 pinctrl-0 = <&ir_int>; 95 pinctrl-0 = <&ir_int>;
96 }; 96 };
@@ -104,10 +104,10 @@
104 104
105 reset-gpios = 105 reset-gpios =
106 /* BT_RST_N */ 106 /* BT_RST_N */
107 <&gpio3 5 GPIO_ACTIVE_LOW>, 107 <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>,
108 108
109 /* WL_REG_ON */ 109 /* WL_REG_ON */
110 <&gpio3 4 GPIO_ACTIVE_LOW>; 110 <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
111 }; 111 };
112 112
113 vcc_18: vcc18-regulator { 113 vcc_18: vcc18-regulator {
@@ -124,7 +124,7 @@
124 vcc_host: vcc-host-regulator { 124 vcc_host: vcc-host-regulator {
125 compatible = "regulator-fixed"; 125 compatible = "regulator-fixed";
126 enable-active-high; 126 enable-active-high;
127 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>; 127 gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
128 pinctrl-names = "default"; 128 pinctrl-names = "default";
129 pinctrl-0 = <&host_vbus_drv>; 129 pinctrl-0 = <&host_vbus_drv>;
130 regulator-name = "vcc_host"; 130 regulator-name = "vcc_host";
@@ -199,7 +199,7 @@
199 phy-supply = <&vcc_lan>; 199 phy-supply = <&vcc_lan>;
200 phy-mode = "rmii"; 200 phy-mode = "rmii";
201 clock_in_out = "output"; 201 clock_in_out = "output";
202 snps,reset-gpio = <&gpio3 12 0>; 202 snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
203 snps,reset-active-low; 203 snps,reset-active-low;
204 snps,reset-delays-us = <0 10000 1000000>; 204 snps,reset-delays-us = <0 10000 1000000>;
205 pinctrl-names = "default"; 205 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
index 3040a989d699..42033bcc614c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
@@ -85,7 +85,7 @@
85 240 241 242 243 244 245 246 247 85 240 241 242 243 244 245 246 247
86 248 249 250 251 252 253 254 255>; 86 248 249 250 251 252 253 254 255>;
87 default-brightness-level = <200>; 87 default-brightness-level = <200>;
88 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 88 enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
89 pwms = <&pwm0 0 25000 0>; 89 pwms = <&pwm0 0 25000 0>;
90 }; 90 };
91 91
@@ -128,7 +128,7 @@
128 vcc5v0_host: vcc5v0-host-regulator { 128 vcc5v0_host: vcc5v0-host-regulator {
129 compatible = "regulator-fixed"; 129 compatible = "regulator-fixed";
130 enable-active-high; 130 enable-active-high;
131 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; 131 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
132 pinctrl-names = "default"; 132 pinctrl-names = "default";
133 pinctrl-0 = <&vcc5v0_host_en>; 133 pinctrl-0 = <&vcc5v0_host_en>;
134 regulator-name = "vcc5v0_host"; 134 regulator-name = "vcc5v0_host";
@@ -163,7 +163,7 @@
163 phy-mode = "rgmii"; 163 phy-mode = "rgmii";
164 pinctrl-names = "default"; 164 pinctrl-names = "default";
165 pinctrl-0 = <&rgmii_pins>; 165 pinctrl-0 = <&rgmii_pins>;
166 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>; 166 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
167 snps,reset-active-low; 167 snps,reset-active-low;
168 snps,reset-delays-us = <0 10000 50000>; 168 snps,reset-delays-us = <0 10000 50000>;
169 tx_delay = <0x28>; 169 tx_delay = <0x28>;
@@ -196,7 +196,7 @@
196}; 196};
197 197
198&pcie0 { 198&pcie0 {
199 ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; 199 ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
200 num-lanes = <4>; 200 num-lanes = <4>;
201 pinctrl-names = "default"; 201 pinctrl-names = "default";
202 pinctrl-0 = <&pcie_clkreqn>; 202 pinctrl-0 = <&pcie_clkreqn>;