diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-08-18 14:02:16 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-08-22 15:00:48 -0400 |
commit | b32aea85144ff046b2f8f40c48113d1a06086239 (patch) | |
tree | 42e72d9e9db76e037846451b99ace5ac7e4bb678 | |
parent | a343dfdd9612855395cb6a65a8907dd7256ef80e (diff) |
ARM: dts: sun6i: Add sun6i-reference-design-tablet.dtsi
Just like with a13/a23/a33 most a31 tablets are derived from the same
reference design. Add a .dtsi file with all the common bits to avoid
endless copy and pasting of these.
The sun6i-reference-design-tablet.dtsi this commit adds is a copy
of sun6i-a31s-colorfly-e708-q1.dts with a few tablet specific bits
removed / left in sun6i-a31s-colorfly-e708-q1.dts.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r-- | arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | 147 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi | 193 |
2 files changed, 194 insertions, 146 deletions
diff --git a/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts b/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts index 34d8710a7c46..882a4d89fa22 100644 --- a/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts +++ b/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | |||
@@ -42,32 +42,11 @@ | |||
42 | 42 | ||
43 | /dts-v1/; | 43 | /dts-v1/; |
44 | #include "sun6i-a31s.dtsi" | 44 | #include "sun6i-a31s.dtsi" |
45 | #include "sunxi-common-regulators.dtsi" | 45 | #include "sun6i-reference-design-tablet.dtsi" |
46 | |||
47 | #include <dt-bindings/gpio/gpio.h> | ||
48 | #include <dt-bindings/input/input.h> | ||
49 | #include <dt-bindings/pinctrl/sun4i-a10.h> | ||
50 | 46 | ||
51 | / { | 47 | / { |
52 | model = "Colorfly E708 Q1 tablet"; | 48 | model = "Colorfly E708 Q1 tablet"; |
53 | compatible = "colorfly,e708-q1", "allwinner,sun6i-a31s"; | 49 | compatible = "colorfly,e708-q1", "allwinner,sun6i-a31s"; |
54 | |||
55 | aliases { | ||
56 | serial0 = &uart0; | ||
57 | }; | ||
58 | |||
59 | chosen { | ||
60 | stdout-path = "serial0:115200n8"; | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | &cpu0 { | ||
65 | cpu-supply = <®_dcdc3>; | ||
66 | }; | ||
67 | |||
68 | &ehci0 { | ||
69 | /* rtl8188etv wifi is connected here */ | ||
70 | status = "okay"; | ||
71 | }; | 50 | }; |
72 | 51 | ||
73 | &lradc { | 52 | &lradc { |
@@ -82,136 +61,12 @@ | |||
82 | }; | 61 | }; |
83 | }; | 62 | }; |
84 | 63 | ||
85 | &mmc0 { | ||
86 | pinctrl-names = "default"; | ||
87 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>; | ||
88 | vmmc-supply = <®_dcdc1>; | ||
89 | bus-width = <4>; | ||
90 | cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ | ||
91 | cd-inverted; | ||
92 | status = "okay"; | ||
93 | }; | ||
94 | |||
95 | &pio { | ||
96 | mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 { | ||
97 | allwinner,pins = "PA8"; | ||
98 | allwinner,function = "gpio_in"; | ||
99 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
100 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
101 | }; | ||
102 | |||
103 | usb0_id_detect_pin: usb0_id_detect_pin@0 { | ||
104 | allwinner,pins = "PA15"; | ||
105 | allwinner,function = "gpio_in"; | ||
106 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
107 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
108 | }; | ||
109 | }; | ||
110 | |||
111 | &p2wi { | ||
112 | status = "okay"; | ||
113 | |||
114 | axp22x: pmic@68 { | ||
115 | compatible = "x-powers,axp221"; | ||
116 | reg = <0x68>; | ||
117 | interrupt-parent = <&nmi_intc>; | ||
118 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
119 | drivevbus-supply = <®_vcc5v0>; | ||
120 | x-powers,drive-vbus-en; | ||
121 | }; | ||
122 | }; | ||
123 | |||
124 | #include "axp22x.dtsi" | ||
125 | |||
126 | ®_aldo3 { | ||
127 | regulator-always-on; | ||
128 | regulator-min-microvolt = <2700000>; | ||
129 | regulator-max-microvolt = <3300000>; | ||
130 | regulator-name = "avcc"; | ||
131 | }; | ||
132 | |||
133 | ®_dc1sw { | ||
134 | regulator-name = "vcc-lcd"; | ||
135 | }; | ||
136 | |||
137 | ®_dc5ldo { | ||
138 | regulator-always-on; | ||
139 | regulator-min-microvolt = <700000>; | ||
140 | regulator-max-microvolt = <1320000>; | ||
141 | regulator-name = "vdd-cpus"; /* This is an educated guess */ | ||
142 | }; | ||
143 | |||
144 | ®_dcdc1 { | ||
145 | regulator-always-on; | ||
146 | regulator-min-microvolt = <3000000>; | ||
147 | regulator-max-microvolt = <3000000>; | ||
148 | regulator-name = "vcc-3v0"; | ||
149 | }; | ||
150 | |||
151 | ®_dcdc2 { | ||
152 | regulator-min-microvolt = <700000>; | ||
153 | regulator-max-microvolt = <1320000>; | ||
154 | regulator-name = "vdd-gpu"; | ||
155 | }; | ||
156 | |||
157 | ®_dcdc3 { | ||
158 | regulator-always-on; | ||
159 | regulator-min-microvolt = <700000>; | ||
160 | regulator-max-microvolt = <1320000>; | ||
161 | regulator-name = "vdd-cpu"; | ||
162 | }; | ||
163 | |||
164 | ®_dcdc4 { | ||
165 | regulator-always-on; | ||
166 | regulator-min-microvolt = <700000>; | ||
167 | regulator-max-microvolt = <1320000>; | ||
168 | regulator-name = "vdd-sys-dll"; | ||
169 | }; | ||
170 | |||
171 | ®_dcdc5 { | ||
172 | regulator-always-on; | ||
173 | regulator-min-microvolt = <1500000>; | ||
174 | regulator-max-microvolt = <1500000>; | ||
175 | regulator-name = "vcc-dram"; | ||
176 | }; | ||
177 | |||
178 | ®_dldo1 { | ||
179 | regulator-min-microvolt = <3300000>; | ||
180 | regulator-max-microvolt = <3300000>; | ||
181 | regulator-name = "vcc-wifi"; | ||
182 | }; | ||
183 | |||
184 | ®_dldo2 { | 64 | ®_dldo2 { |
185 | regulator-min-microvolt = <1800000>; | 65 | regulator-min-microvolt = <1800000>; |
186 | regulator-max-microvolt = <1800000>; | 66 | regulator-max-microvolt = <1800000>; |
187 | regulator-name = "vcc-pg"; | 67 | regulator-name = "vcc-pg"; |
188 | }; | 68 | }; |
189 | 69 | ||
190 | ®_drivevbus { | ||
191 | regulator-name = "usb0-vbus"; | ||
192 | status = "okay"; | ||
193 | }; | ||
194 | |||
195 | &simplefb_lcd { | 70 | &simplefb_lcd { |
196 | vcc-lcd-supply = <®_dc1sw>; | ||
197 | vcc-pg-supply = <®_dldo2>; | 71 | vcc-pg-supply = <®_dldo2>; |
198 | }; | 72 | }; |
199 | |||
200 | &usb_otg { | ||
201 | dr_mode = "otg"; | ||
202 | status = "okay"; | ||
203 | }; | ||
204 | |||
205 | &usb_power_supply { | ||
206 | status = "okay"; | ||
207 | }; | ||
208 | |||
209 | &usbphy { | ||
210 | pinctrl-names = "default"; | ||
211 | pinctrl-0 = <&usb0_id_detect_pin>; | ||
212 | usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */ | ||
213 | usb0_vbus_power-supply = <&usb_power_supply>; | ||
214 | usb0_vbus-supply = <®_drivevbus>; | ||
215 | usb1_vbus-supply = <®_dldo1>; | ||
216 | status = "okay"; | ||
217 | }; | ||
diff --git a/arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi new file mode 100644 index 000000000000..0c434304e040 --- /dev/null +++ b/arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi | |||
@@ -0,0 +1,193 @@ | |||
1 | /* | ||
2 | * Copyright 2016 Hans de Goede <hdegoede@redhat.com> | ||
3 | * | ||
4 | * This file is dual-licensed: you can use it either under the terms | ||
5 | * of the GPL or the X11 license, at your option. Note that this dual | ||
6 | * licensing only applies to this file, and not this project as a | ||
7 | * whole. | ||
8 | * | ||
9 | * a) This file is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License as | ||
11 | * published by the Free Software Foundation; either version 2 of the | ||
12 | * License, or (at your option) any later version. | ||
13 | * | ||
14 | * This file is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * Or, alternatively, | ||
20 | * | ||
21 | * b) Permission is hereby granted, free of charge, to any person | ||
22 | * obtaining a copy of this software and associated documentation | ||
23 | * files (the "Software"), to deal in the Software without | ||
24 | * restriction, including without limitation the rights to use, | ||
25 | * copy, modify, merge, publish, distribute, sublicense, and/or | ||
26 | * sell copies of the Software, and to permit persons to whom the | ||
27 | * Software is furnished to do so, subject to the following | ||
28 | * conditions: | ||
29 | * | ||
30 | * The above copyright notice and this permission notice shall be | ||
31 | * included in all copies or substantial portions of the Software. | ||
32 | * | ||
33 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
34 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
35 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
36 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
37 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
38 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
39 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
40 | * OTHER DEALINGS IN THE SOFTWARE. | ||
41 | */ | ||
42 | |||
43 | #include "sunxi-common-regulators.dtsi" | ||
44 | |||
45 | #include <dt-bindings/gpio/gpio.h> | ||
46 | #include <dt-bindings/input/input.h> | ||
47 | #include <dt-bindings/pinctrl/sun4i-a10.h> | ||
48 | |||
49 | / { | ||
50 | aliases { | ||
51 | serial0 = &uart0; | ||
52 | }; | ||
53 | |||
54 | chosen { | ||
55 | stdout-path = "serial0:115200n8"; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | &cpu0 { | ||
60 | cpu-supply = <®_dcdc3>; | ||
61 | }; | ||
62 | |||
63 | &ehci0 { | ||
64 | /* Wifi is connected here */ | ||
65 | status = "okay"; | ||
66 | }; | ||
67 | |||
68 | &mmc0 { | ||
69 | pinctrl-names = "default"; | ||
70 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>; | ||
71 | vmmc-supply = <®_dcdc1>; | ||
72 | bus-width = <4>; | ||
73 | cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ | ||
74 | cd-inverted; | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | |||
78 | &pio { | ||
79 | mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 { | ||
80 | allwinner,pins = "PA8"; | ||
81 | allwinner,function = "gpio_in"; | ||
82 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
83 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
84 | }; | ||
85 | |||
86 | usb0_id_detect_pin: usb0_id_detect_pin@0 { | ||
87 | allwinner,pins = "PA15"; | ||
88 | allwinner,function = "gpio_in"; | ||
89 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
90 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
91 | }; | ||
92 | }; | ||
93 | |||
94 | &p2wi { | ||
95 | status = "okay"; | ||
96 | |||
97 | axp22x: pmic@68 { | ||
98 | compatible = "x-powers,axp221"; | ||
99 | reg = <0x68>; | ||
100 | interrupt-parent = <&nmi_intc>; | ||
101 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
102 | drivevbus-supply = <®_vcc5v0>; | ||
103 | x-powers,drive-vbus-en; | ||
104 | }; | ||
105 | }; | ||
106 | |||
107 | #include "axp22x.dtsi" | ||
108 | |||
109 | ®_aldo3 { | ||
110 | regulator-always-on; | ||
111 | regulator-min-microvolt = <2700000>; | ||
112 | regulator-max-microvolt = <3300000>; | ||
113 | regulator-name = "avcc"; | ||
114 | }; | ||
115 | |||
116 | ®_dc1sw { | ||
117 | regulator-name = "vcc-lcd"; | ||
118 | }; | ||
119 | |||
120 | ®_dc5ldo { | ||
121 | regulator-always-on; | ||
122 | regulator-min-microvolt = <700000>; | ||
123 | regulator-max-microvolt = <1320000>; | ||
124 | regulator-name = "vdd-cpus"; /* This is an educated guess */ | ||
125 | }; | ||
126 | |||
127 | ®_dcdc1 { | ||
128 | regulator-always-on; | ||
129 | regulator-min-microvolt = <3000000>; | ||
130 | regulator-max-microvolt = <3000000>; | ||
131 | regulator-name = "vcc-3v0"; | ||
132 | }; | ||
133 | |||
134 | ®_dcdc2 { | ||
135 | regulator-min-microvolt = <700000>; | ||
136 | regulator-max-microvolt = <1320000>; | ||
137 | regulator-name = "vdd-gpu"; | ||
138 | }; | ||
139 | |||
140 | ®_dcdc3 { | ||
141 | regulator-always-on; | ||
142 | regulator-min-microvolt = <700000>; | ||
143 | regulator-max-microvolt = <1320000>; | ||
144 | regulator-name = "vdd-cpu"; | ||
145 | }; | ||
146 | |||
147 | ®_dcdc4 { | ||
148 | regulator-always-on; | ||
149 | regulator-min-microvolt = <700000>; | ||
150 | regulator-max-microvolt = <1320000>; | ||
151 | regulator-name = "vdd-sys-dll"; | ||
152 | }; | ||
153 | |||
154 | ®_dcdc5 { | ||
155 | regulator-always-on; | ||
156 | regulator-min-microvolt = <1500000>; | ||
157 | regulator-max-microvolt = <1500000>; | ||
158 | regulator-name = "vcc-dram"; | ||
159 | }; | ||
160 | |||
161 | ®_dldo1 { | ||
162 | regulator-min-microvolt = <3300000>; | ||
163 | regulator-max-microvolt = <3300000>; | ||
164 | regulator-name = "vcc-wifi"; | ||
165 | }; | ||
166 | |||
167 | ®_drivevbus { | ||
168 | regulator-name = "usb0-vbus"; | ||
169 | status = "okay"; | ||
170 | }; | ||
171 | |||
172 | &simplefb_lcd { | ||
173 | vcc-lcd-supply = <®_dc1sw>; | ||
174 | }; | ||
175 | |||
176 | &usb_otg { | ||
177 | dr_mode = "otg"; | ||
178 | status = "okay"; | ||
179 | }; | ||
180 | |||
181 | &usb_power_supply { | ||
182 | status = "okay"; | ||
183 | }; | ||
184 | |||
185 | &usbphy { | ||
186 | pinctrl-names = "default"; | ||
187 | pinctrl-0 = <&usb0_id_detect_pin>; | ||
188 | usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */ | ||
189 | usb0_vbus_power-supply = <&usb_power_supply>; | ||
190 | usb0_vbus-supply = <®_drivevbus>; | ||
191 | usb1_vbus-supply = <®_dldo1>; | ||
192 | status = "okay"; | ||
193 | }; | ||