diff options
author | Olof Johansson <olof@lixom.net> | 2015-10-26 01:43:38 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2015-10-26 01:43:38 -0400 |
commit | 3d2ef3b3962c60e3b25de6a981127d95cb0be98b (patch) | |
tree | a7efc70a3dccd852d8d68ca53e3faec786c47d16 | |
parent | edd2a06d9c06a28f6f636929d586d17de835cd6b (diff) | |
parent | a5ea06d0bc123cc7f49d042fab60ddd3964764c8 (diff) |
Merge tag 'sunxi-dt-for-4.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt
Allwinner DT changes for 4.4, round 3
A bunch of new boards, but mostly enable the support for the Audio Codec
on the older SoCs (A10, A10s, A13, A20, R8) and enable it on various
boards.
* tag 'sunxi-dt-for-4.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
ARM: dts: sun6i: Add dts file for MSI Primo81 tablet
ARM: dts: sun6i: Add simplefb node labels to reference at board level
ARM: dts: sun4i: Enable audio codec on Marsboard A10.
ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
ARM: sun4i: Enable cubieboard audio codec
ARM: sun5i: chip: Enable the audio codec
ARM: sun4i: Enable audio-codec on Mele A1000
ARM: sun7i: Enable cubieboard2 audio codec
ARM: sun7i: dt: enable audio codec on Cubietruck
ARM: sun7i: Add sunxi codec device node
ARM: sun5i: Add the Audio codec DT node
ARM: sun4i: Add sunxi codec device node
ARM: sun7i: Add audio codec clock
ARM: sun5i: Add audio codec clock
ARM: sun4i: Add audio codec clock
ARM: sun7i: Add audio PLL
ARM: sun5i: Add audio PLL
ARM: sun4i: Add audio PLL
ARM: dts: sun7i: Enable USB DRC on pcDuino v3 Nano
ARM: dts: sun6i: Add support for Sinlinx A31s SDK board
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/boot/dts/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun4i-a10-a1000.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun4i-a10-marsboard.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 199 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun4i-a10.dtsi | 31 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun5i-r8-chip.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun5i.dtsi | 31 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun6i-a31.dtsi | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun6i-a31s-primo81.dts | 255 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi | 140 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 153 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 19 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20.dtsi | 31 |
16 files changed, 889 insertions, 3 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 1a8d79944013..4d5f825c575b 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -603,7 +603,8 @@ dtb-$(CONFIG_MACH_SUN4I) += \ | |||
603 | sun4i-a10-mk802ii.dtb \ | 603 | sun4i-a10-mk802ii.dtb \ |
604 | sun4i-a10-olinuxino-lime.dtb \ | 604 | sun4i-a10-olinuxino-lime.dtb \ |
605 | sun4i-a10-pcduino.dtb \ | 605 | sun4i-a10-pcduino.dtb \ |
606 | sun4i-a10-pcduino2.dtb | 606 | sun4i-a10-pcduino2.dtb \ |
607 | sun4i-a10-pov-protab2-ips9.dtb | ||
607 | dtb-$(CONFIG_MACH_SUN5I) += \ | 608 | dtb-$(CONFIG_MACH_SUN5I) += \ |
608 | sun5i-a10s-auxtek-t003.dtb \ | 609 | sun5i-a10s-auxtek-t003.dtb \ |
609 | sun5i-a10s-auxtek-t004.dtb \ | 610 | sun5i-a10s-auxtek-t004.dtb \ |
@@ -626,6 +627,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \ | |||
626 | sun6i-a31-m9.dtb \ | 627 | sun6i-a31-m9.dtb \ |
627 | sun6i-a31-mele-a1000g-quad.dtb \ | 628 | sun6i-a31-mele-a1000g-quad.dtb \ |
628 | sun6i-a31s-cs908.dtb \ | 629 | sun6i-a31s-cs908.dtb \ |
630 | sun6i-a31s-primo81.dtb \ | ||
631 | sun6i-a31s-sina31s.dtb \ | ||
629 | sun6i-a31s-sinovoip-bpi-m2.dtb \ | 632 | sun6i-a31s-sinovoip-bpi-m2.dtb \ |
630 | sun6i-a31s-yones-toptech-bs1078-v2.dtb | 633 | sun6i-a31s-yones-toptech-bs1078-v2.dtb |
631 | dtb-$(CONFIG_MACH_SUN7I) += \ | 634 | dtb-$(CONFIG_MACH_SUN7I) += \ |
diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts index 2630d78d9e04..97570cb7f2fc 100644 --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts | |||
@@ -93,6 +93,10 @@ | |||
93 | status = "okay"; | 93 | status = "okay"; |
94 | }; | 94 | }; |
95 | 95 | ||
96 | &codec { | ||
97 | status = "okay"; | ||
98 | }; | ||
99 | |||
96 | &ehci0 { | 100 | &ehci0 { |
97 | status = "okay"; | 101 | status = "okay"; |
98 | }; | 102 | }; |
diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts index 046a84d9719d..710e2ef516a8 100644 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts | |||
@@ -83,6 +83,10 @@ | |||
83 | status = "okay"; | 83 | status = "okay"; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | &codec { | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
86 | &cpu0 { | 90 | &cpu0 { |
87 | cpu-supply = <®_dcdc2>; | 91 | cpu-supply = <®_dcdc2>; |
88 | }; | 92 | }; |
diff --git a/arch/arm/boot/dts/sun4i-a10-marsboard.dts b/arch/arm/boot/dts/sun4i-a10-marsboard.dts index 9a012db79963..8e50723dbe02 100644 --- a/arch/arm/boot/dts/sun4i-a10-marsboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-marsboard.dts | |||
@@ -91,6 +91,10 @@ | |||
91 | status = "okay"; | 91 | status = "okay"; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | &codec { | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | |||
94 | &ehci0 { | 98 | &ehci0 { |
95 | status = "okay"; | 99 | status = "okay"; |
96 | }; | 100 | }; |
diff --git a/arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts b/arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts new file mode 100644 index 000000000000..82e69c3820a2 --- /dev/null +++ b/arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | |||
@@ -0,0 +1,199 @@ | |||
1 | /* | ||
2 | * Copyright 2015 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 | /dts-v1/; | ||
44 | #include "sun4i-a10.dtsi" | ||
45 | #include "sunxi-common-regulators.dtsi" | ||
46 | #include <dt-bindings/gpio/gpio.h> | ||
47 | #include <dt-bindings/input/input.h> | ||
48 | #include <dt-bindings/interrupt-controller/irq.h> | ||
49 | #include <dt-bindings/pinctrl/sun4i-a10.h> | ||
50 | |||
51 | / { | ||
52 | model = "Point of View Protab2-IPS9"; | ||
53 | compatible = "pov,protab2-ips9", "allwinner,sun4i-a10"; | ||
54 | |||
55 | aliases { | ||
56 | serial0 = &uart0; | ||
57 | }; | ||
58 | |||
59 | chosen { | ||
60 | stdout-path = "serial0:115200n8"; | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | &cpu0 { | ||
65 | cpu-supply = <®_dcdc2>; | ||
66 | }; | ||
67 | |||
68 | &ehci0 { | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
72 | &i2c0 { | ||
73 | pinctrl-names = "default"; | ||
74 | pinctrl-0 = <&i2c0_pins_a>; | ||
75 | status = "okay"; | ||
76 | |||
77 | axp209: pmic@34 { | ||
78 | reg = <0x34>; | ||
79 | interrupts = <0>; | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | #include "axp209.dtsi" | ||
84 | |||
85 | &i2c1 { | ||
86 | pinctrl-names = "default"; | ||
87 | pinctrl-0 = <&i2c1_pins_a>; | ||
88 | /* pull-ups and devices require AXP209 LDO3 */ | ||
89 | status = "failed"; | ||
90 | }; | ||
91 | |||
92 | &i2c2 { | ||
93 | pinctrl-names = "default"; | ||
94 | pinctrl-0 = <&i2c2_pins_a>; | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | |||
98 | &lradc { | ||
99 | vref-supply = <®_ldo2>; | ||
100 | status = "okay"; | ||
101 | |||
102 | button@400 { | ||
103 | label = "Volume Up"; | ||
104 | linux,code = <KEY_VOLUMEUP>; | ||
105 | channel = <0>; | ||
106 | voltage = <400000>; | ||
107 | }; | ||
108 | |||
109 | button@800 { | ||
110 | label = "Volume Down"; | ||
111 | linux,code = <KEY_VOLUMEDOWN>; | ||
112 | channel = <0>; | ||
113 | voltage = <800000>; | ||
114 | }; | ||
115 | }; | ||
116 | |||
117 | &mmc0 { | ||
118 | pinctrl-names = "default"; | ||
119 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; | ||
120 | vmmc-supply = <®_vcc3v3>; | ||
121 | bus-width = <4>; | ||
122 | cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ | ||
123 | cd-inverted; | ||
124 | status = "okay"; | ||
125 | }; | ||
126 | |||
127 | &otg_sram { | ||
128 | status = "okay"; | ||
129 | }; | ||
130 | |||
131 | &pio { | ||
132 | usb0_id_detect_pin: usb0_id_detect_pin@0 { | ||
133 | allwinner,pins = "PH4"; | ||
134 | allwinner,function = "gpio_in"; | ||
135 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
136 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
137 | }; | ||
138 | |||
139 | usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { | ||
140 | allwinner,pins = "PH5"; | ||
141 | allwinner,function = "gpio_in"; | ||
142 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
143 | allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; | ||
144 | }; | ||
145 | }; | ||
146 | |||
147 | ®_dcdc2 { | ||
148 | regulator-always-on; | ||
149 | regulator-min-microvolt = <1000000>; | ||
150 | regulator-max-microvolt = <1400000>; | ||
151 | regulator-name = "vdd-cpu"; | ||
152 | }; | ||
153 | |||
154 | ®_dcdc3 { | ||
155 | regulator-always-on; | ||
156 | regulator-min-microvolt = <1250000>; | ||
157 | regulator-max-microvolt = <1250000>; | ||
158 | regulator-name = "vdd-int-dll"; | ||
159 | }; | ||
160 | |||
161 | ®_ldo1 { | ||
162 | regulator-name = "vdd-rtc"; | ||
163 | }; | ||
164 | |||
165 | ®_ldo2 { | ||
166 | regulator-always-on; | ||
167 | regulator-min-microvolt = <3000000>; | ||
168 | regulator-max-microvolt = <3000000>; | ||
169 | regulator-name = "avcc"; | ||
170 | }; | ||
171 | |||
172 | ®_usb0_vbus { | ||
173 | status = "okay"; | ||
174 | }; | ||
175 | |||
176 | ®_usb1_vbus { | ||
177 | status = "okay"; | ||
178 | }; | ||
179 | |||
180 | &uart0 { | ||
181 | pinctrl-names = "default"; | ||
182 | pinctrl-0 = <&uart0_pins_a>; | ||
183 | status = "okay"; | ||
184 | }; | ||
185 | |||
186 | &usb_otg { | ||
187 | dr_mode = "otg"; | ||
188 | status = "okay"; | ||
189 | }; | ||
190 | |||
191 | &usbphy { | ||
192 | pinctrl-names = "default"; | ||
193 | pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; | ||
194 | usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ | ||
195 | usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ | ||
196 | usb0_vbus-supply = <®_usb0_vbus>; | ||
197 | usb1_vbus-supply = <®_usb1_vbus>; | ||
198 | status = "okay"; | ||
199 | }; | ||
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi index 1f3c51a08113..aa90f319309b 100644 --- a/arch/arm/boot/dts/sun4i-a10.dtsi +++ b/arch/arm/boot/dts/sun4i-a10.dtsi | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | #include <dt-bindings/thermal/thermal.h> | 46 | #include <dt-bindings/thermal/thermal.h> |
47 | 47 | ||
48 | #include <dt-bindings/clock/sun4i-a10-pll2.h> | ||
48 | #include <dt-bindings/dma/sun4i-a10.h> | 49 | #include <dt-bindings/dma/sun4i-a10.h> |
49 | #include <dt-bindings/pinctrl/sun4i-a10.h> | 50 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
50 | 51 | ||
@@ -195,6 +196,15 @@ | |||
195 | clock-output-names = "pll1"; | 196 | clock-output-names = "pll1"; |
196 | }; | 197 | }; |
197 | 198 | ||
199 | pll2: clk@01c20008 { | ||
200 | #clock-cells = <1>; | ||
201 | compatible = "allwinner,sun4i-a10-pll2-clk"; | ||
202 | reg = <0x01c20008 0x8>; | ||
203 | clocks = <&osc24M>; | ||
204 | clock-output-names = "pll2-1x", "pll2-2x", | ||
205 | "pll2-4x", "pll2-8x"; | ||
206 | }; | ||
207 | |||
198 | pll4: clk@01c20018 { | 208 | pll4: clk@01c20018 { |
199 | #clock-cells = <0>; | 209 | #clock-cells = <0>; |
200 | compatible = "allwinner,sun4i-a10-pll1-clk"; | 210 | compatible = "allwinner,sun4i-a10-pll1-clk"; |
@@ -481,6 +491,14 @@ | |||
481 | clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; | 491 | clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; |
482 | clock-output-names = "spi3"; | 492 | clock-output-names = "spi3"; |
483 | }; | 493 | }; |
494 | |||
495 | codec_clk: clk@01c20140 { | ||
496 | #clock-cells = <0>; | ||
497 | compatible = "allwinner,sun4i-a10-codec-clk"; | ||
498 | reg = <0x01c20140 0x4>; | ||
499 | clocks = <&pll2 SUN4I_A10_PLL2_1X>; | ||
500 | clock-output-names = "codec"; | ||
501 | }; | ||
484 | }; | 502 | }; |
485 | 503 | ||
486 | soc@01c00000 { | 504 | soc@01c00000 { |
@@ -1004,6 +1022,19 @@ | |||
1004 | status = "disabled"; | 1022 | status = "disabled"; |
1005 | }; | 1023 | }; |
1006 | 1024 | ||
1025 | codec: codec@01c22c00 { | ||
1026 | #sound-dai-cells = <0>; | ||
1027 | compatible = "allwinner,sun4i-a10-codec"; | ||
1028 | reg = <0x01c22c00 0x40>; | ||
1029 | interrupts = <30>; | ||
1030 | clocks = <&apb0_gates 0>, <&codec_clk>; | ||
1031 | clock-names = "apb", "codec"; | ||
1032 | dmas = <&dma SUN4I_DMA_NORMAL 19>, | ||
1033 | <&dma SUN4I_DMA_NORMAL 19>; | ||
1034 | dma-names = "rx", "tx"; | ||
1035 | status = "disabled"; | ||
1036 | }; | ||
1037 | |||
1007 | sid: eeprom@01c23800 { | 1038 | sid: eeprom@01c23800 { |
1008 | compatible = "allwinner,sun4i-a10-sid"; | 1039 | compatible = "allwinner,sun4i-a10-sid"; |
1009 | reg = <0x01c23800 0x10>; | 1040 | reg = <0x01c23800 0x10>; |
diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts index abf3ccb1a82c..530ab28e9ca2 100644 --- a/arch/arm/boot/dts/sun5i-r8-chip.dts +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts | |||
@@ -66,6 +66,10 @@ | |||
66 | }; | 66 | }; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | &codec { | ||
70 | status = "okay"; | ||
71 | }; | ||
72 | |||
69 | &ehci0 { | 73 | &ehci0 { |
70 | status = "okay"; | 74 | status = "okay"; |
71 | }; | 75 | }; |
diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi index 9ffee9bb70a7..59a9426e3bd4 100644 --- a/arch/arm/boot/dts/sun5i.dtsi +++ b/arch/arm/boot/dts/sun5i.dtsi | |||
@@ -44,6 +44,7 @@ | |||
44 | 44 | ||
45 | #include "skeleton.dtsi" | 45 | #include "skeleton.dtsi" |
46 | 46 | ||
47 | #include <dt-bindings/clock/sun4i-a10-pll2.h> | ||
47 | #include <dt-bindings/dma/sun4i-a10.h> | 48 | #include <dt-bindings/dma/sun4i-a10.h> |
48 | #include <dt-bindings/pinctrl/sun4i-a10.h> | 49 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
49 | 50 | ||
@@ -102,6 +103,15 @@ | |||
102 | clock-output-names = "pll1"; | 103 | clock-output-names = "pll1"; |
103 | }; | 104 | }; |
104 | 105 | ||
106 | pll2: clk@01c20008 { | ||
107 | #clock-cells = <1>; | ||
108 | compatible = "allwinner,sun5i-a13-pll2-clk"; | ||
109 | reg = <0x01c20008 0x8>; | ||
110 | clocks = <&osc24M>; | ||
111 | clock-output-names = "pll2-1x", "pll2-2x", | ||
112 | "pll2-4x", "pll2-8x"; | ||
113 | }; | ||
114 | |||
105 | pll4: clk@01c20018 { | 115 | pll4: clk@01c20018 { |
106 | #clock-cells = <0>; | 116 | #clock-cells = <0>; |
107 | compatible = "allwinner,sun4i-a10-pll1-clk"; | 117 | compatible = "allwinner,sun4i-a10-pll1-clk"; |
@@ -285,6 +295,14 @@ | |||
285 | clock-output-names = "usb_ohci0", "usb_phy"; | 295 | clock-output-names = "usb_ohci0", "usb_phy"; |
286 | }; | 296 | }; |
287 | 297 | ||
298 | codec_clk: clk@01c20140 { | ||
299 | #clock-cells = <0>; | ||
300 | compatible = "allwinner,sun4i-a10-codec-clk"; | ||
301 | reg = <0x01c20140 0x4>; | ||
302 | clocks = <&pll2 SUN4I_A10_PLL2_1X>; | ||
303 | clock-output-names = "codec"; | ||
304 | }; | ||
305 | |||
288 | mbus_clk: clk@01c2015c { | 306 | mbus_clk: clk@01c2015c { |
289 | #clock-cells = <0>; | 307 | #clock-cells = <0>; |
290 | compatible = "allwinner,sun5i-a13-mbus-clk"; | 308 | compatible = "allwinner,sun5i-a13-mbus-clk"; |
@@ -571,6 +589,19 @@ | |||
571 | status = "disabled"; | 589 | status = "disabled"; |
572 | }; | 590 | }; |
573 | 591 | ||
592 | codec: codec@01c22c00 { | ||
593 | #sound-dai-cells = <0>; | ||
594 | compatible = "allwinner,sun4i-a10-codec"; | ||
595 | reg = <0x01c22c00 0x40>; | ||
596 | interrupts = <30>; | ||
597 | clocks = <&apb0_gates 0>, <&codec_clk>; | ||
598 | clock-names = "apb", "codec"; | ||
599 | dmas = <&dma SUN4I_DMA_NORMAL 19>, | ||
600 | <&dma SUN4I_DMA_NORMAL 19>; | ||
601 | dma-names = "rx", "tx"; | ||
602 | status = "disabled"; | ||
603 | }; | ||
604 | |||
574 | sid: eeprom@01c23800 { | 605 | sid: eeprom@01c23800 { |
575 | compatible = "allwinner,sun4i-a10-sid"; | 606 | compatible = "allwinner,sun4i-a10-sid"; |
576 | reg = <0x01c23800 0x10>; | 607 | reg = <0x01c23800 0x10>; |
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index 83c18798cae0..b6ad7850fac6 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi | |||
@@ -61,7 +61,7 @@ | |||
61 | #size-cells = <1>; | 61 | #size-cells = <1>; |
62 | ranges; | 62 | ranges; |
63 | 63 | ||
64 | framebuffer@0 { | 64 | simplefb_hdmi: framebuffer@0 { |
65 | compatible = "allwinner,simple-framebuffer", | 65 | compatible = "allwinner,simple-framebuffer", |
66 | "simple-framebuffer"; | 66 | "simple-framebuffer"; |
67 | allwinner,pipeline = "de_be0-lcd0-hdmi"; | 67 | allwinner,pipeline = "de_be0-lcd0-hdmi"; |
@@ -69,7 +69,7 @@ | |||
69 | status = "disabled"; | 69 | status = "disabled"; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | framebuffer@1 { | 72 | simplefb_lcd: framebuffer@1 { |
73 | compatible = "allwinner,simple-framebuffer", | 73 | compatible = "allwinner,simple-framebuffer", |
74 | "simple-framebuffer"; | 74 | "simple-framebuffer"; |
75 | allwinner,pipeline = "de_be0-lcd0"; | 75 | allwinner,pipeline = "de_be0-lcd0"; |
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts new file mode 100644 index 000000000000..2d4250b1faf8 --- /dev/null +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts | |||
@@ -0,0 +1,255 @@ | |||
1 | /* | ||
2 | * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com> | ||
3 | * Copyright 2015 Karsten Merker <merker@debian.org> | ||
4 | * Copyright 2015 Chen-Yu Tsai <wens@csie.org> | ||
5 | * | ||
6 | * This file is dual-licensed: you can use it either under the terms | ||
7 | * of the GPL or the X11 license, at your option. Note that this dual | ||
8 | * licensing only applies to this file, and not this project as a | ||
9 | * whole. | ||
10 | * | ||
11 | * a) This file is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License as | ||
13 | * published by the Free Software Foundation; either version 2 of the | ||
14 | * License, or (at your option) any later version. | ||
15 | * | ||
16 | * This file is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * Or, alternatively, | ||
22 | * | ||
23 | * b) Permission is hereby granted, free of charge, to any person | ||
24 | * obtaining a copy of this software and associated documentation | ||
25 | * files (the "Software"), to deal in the Software without | ||
26 | * restriction, including without limitation the rights to use, | ||
27 | * copy, modify, merge, publish, distribute, sublicense, and/or | ||
28 | * sell copies of the Software, and to permit persons to whom the | ||
29 | * Software is furnished to do so, subject to the following | ||
30 | * conditions: | ||
31 | * | ||
32 | * The above copyright notice and this permission notice shall be | ||
33 | * included in all copies or substantial portions of the Software. | ||
34 | * | ||
35 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
36 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
37 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
38 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
39 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
40 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
41 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
42 | * OTHER DEALINGS IN THE SOFTWARE. | ||
43 | */ | ||
44 | |||
45 | /dts-v1/; | ||
46 | #include "sun6i-a31s.dtsi" | ||
47 | #include "sunxi-common-regulators.dtsi" | ||
48 | |||
49 | #include <dt-bindings/gpio/gpio.h> | ||
50 | #include <dt-bindings/input/input.h> | ||
51 | #include <dt-bindings/pinctrl/sun4i-a10.h> | ||
52 | |||
53 | / { | ||
54 | model = "MSI Primo81 tablet"; | ||
55 | compatible = "msi,primo81", "allwinner,sun6i-a31s"; | ||
56 | }; | ||
57 | |||
58 | &cpu0 { | ||
59 | cpu-supply = <®_dcdc3>; | ||
60 | }; | ||
61 | |||
62 | &ehci0 { | ||
63 | /* rtl8188etv wifi is connected here */ | ||
64 | status = "okay"; | ||
65 | }; | ||
66 | |||
67 | &i2c0 { | ||
68 | /* pull-ups and device VDDIO use AXP221 DLDO3 */ | ||
69 | pinctrl-names = "default"; | ||
70 | pinctrl-0 = <&i2c0_pins_a>; | ||
71 | status = "failed"; | ||
72 | }; | ||
73 | |||
74 | &i2c1 { | ||
75 | pinctrl-names = "default"; | ||
76 | pinctrl-0 = <&i2c1_pins_a>; | ||
77 | status = "okay"; | ||
78 | |||
79 | ctp@5d { | ||
80 | pinctrl-names = "default"; | ||
81 | pinctrl-0 = <>911_int_primo81>; | ||
82 | compatible = "goodix,gt911"; | ||
83 | reg = <0x5d>; | ||
84 | interrupt-parent = <&pio>; | ||
85 | interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */ | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | &i2c2 { | ||
90 | pinctrl-names = "default"; | ||
91 | pinctrl-0 = <&i2c2_pins_a>; | ||
92 | status = "okay"; | ||
93 | |||
94 | accelerometer@1c { | ||
95 | pinctrl-names = "default"; | ||
96 | pinctrl-0 = <&mma8452_int_primo81>; | ||
97 | compatible = "fsl,mma8452"; | ||
98 | reg = <0x1c>; | ||
99 | interrupt-parent = <&pio>; | ||
100 | interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */ | ||
101 | #io-channel-cells = <1>; | ||
102 | }; | ||
103 | }; | ||
104 | |||
105 | &lradc { | ||
106 | vref-supply = <®_aldo3>; | ||
107 | status = "okay"; | ||
108 | |||
109 | button@158 { | ||
110 | label = "Volume Up"; | ||
111 | linux,code = <KEY_VOLUMEUP>; | ||
112 | channel = <0>; | ||
113 | voltage = <158730>; | ||
114 | }; | ||
115 | |||
116 | button@349 { | ||
117 | label = "Volume Down"; | ||
118 | linux,code = <KEY_VOLUMEDOWN>; | ||
119 | channel = <0>; | ||
120 | voltage = <349206>; | ||
121 | }; | ||
122 | }; | ||
123 | |||
124 | &mmc0 { | ||
125 | pinctrl-names = "default"; | ||
126 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>; | ||
127 | vmmc-supply = <®_dcdc1>; | ||
128 | bus-width = <4>; | ||
129 | cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ | ||
130 | cd-inverted; | ||
131 | status = "okay"; | ||
132 | }; | ||
133 | |||
134 | &pio { | ||
135 | gt911_int_primo81: gt911_int_pin@0 { | ||
136 | allwinner,pins = "PA3"; | ||
137 | allwinner,function = "gpio_in"; | ||
138 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
139 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; | ||
140 | }; | ||
141 | |||
142 | mma8452_int_primo81: mma8452_int_pin@0 { | ||
143 | allwinner,pins = "PA9"; | ||
144 | allwinner,function = "gpio_in"; | ||
145 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
146 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
147 | }; | ||
148 | |||
149 | mmc0_cd_pin_primo81: mmc0_cd_pin@0 { | ||
150 | allwinner,pins = "PA8"; | ||
151 | allwinner,function = "gpio_in"; | ||
152 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
153 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
154 | }; | ||
155 | }; | ||
156 | |||
157 | &p2wi { | ||
158 | status = "okay"; | ||
159 | |||
160 | axp22x: pmic@68 { | ||
161 | compatible = "x-powers,axp221"; | ||
162 | reg = <0x68>; | ||
163 | interrupt-parent = <&nmi_intc>; | ||
164 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
165 | }; | ||
166 | }; | ||
167 | |||
168 | #include "axp22x.dtsi" | ||
169 | |||
170 | ®_aldo3 { | ||
171 | regulator-always-on; | ||
172 | regulator-min-microvolt = <2700000>; | ||
173 | regulator-max-microvolt = <3300000>; | ||
174 | regulator-name = "avcc"; | ||
175 | }; | ||
176 | |||
177 | ®_dc1sw { | ||
178 | regulator-min-microvolt = <3000000>; | ||
179 | regulator-max-microvolt = <3000000>; | ||
180 | regulator-name = "vcc-lcd"; | ||
181 | }; | ||
182 | |||
183 | ®_dc5ldo { | ||
184 | regulator-min-microvolt = <700000>; | ||
185 | regulator-max-microvolt = <1320000>; | ||
186 | regulator-name = "vdd-cpus"; /* This is an educated guess */ | ||
187 | }; | ||
188 | |||
189 | ®_dcdc1 { | ||
190 | regulator-always-on; | ||
191 | regulator-min-microvolt = <3000000>; | ||
192 | regulator-max-microvolt = <3000000>; | ||
193 | regulator-name = "vcc-3v0"; | ||
194 | }; | ||
195 | |||
196 | ®_dcdc2 { | ||
197 | regulator-min-microvolt = <700000>; | ||
198 | regulator-max-microvolt = <1320000>; | ||
199 | regulator-name = "vdd-gpu"; | ||
200 | }; | ||
201 | |||
202 | ®_dcdc3 { | ||
203 | regulator-always-on; | ||
204 | regulator-min-microvolt = <700000>; | ||
205 | regulator-max-microvolt = <1320000>; | ||
206 | regulator-name = "vdd-cpu"; | ||
207 | }; | ||
208 | |||
209 | ®_dcdc4 { | ||
210 | regulator-always-on; | ||
211 | regulator-min-microvolt = <700000>; | ||
212 | regulator-max-microvolt = <1320000>; | ||
213 | regulator-name = "vdd-sys-dll"; | ||
214 | }; | ||
215 | |||
216 | ®_dcdc5 { | ||
217 | regulator-always-on; | ||
218 | regulator-min-microvolt = <1500000>; | ||
219 | regulator-max-microvolt = <1500000>; | ||
220 | regulator-name = "vcc-dram"; | ||
221 | }; | ||
222 | |||
223 | ®_dldo1 { | ||
224 | regulator-min-microvolt = <3300000>; | ||
225 | regulator-max-microvolt = <3300000>; | ||
226 | regulator-name = "vcc-wifi"; | ||
227 | }; | ||
228 | |||
229 | ®_dldo3 { | ||
230 | regulator-min-microvolt = <2800000>; | ||
231 | regulator-max-microvolt = <2800000>; | ||
232 | regulator-name = "vddio-csi"; | ||
233 | }; | ||
234 | |||
235 | ®_eldo3 { | ||
236 | regulator-min-microvolt = <1080000>; | ||
237 | regulator-max-microvolt = <1320000>; | ||
238 | regulator-name = "vdd-mipi-bridge"; | ||
239 | }; | ||
240 | |||
241 | &simplefb_lcd { | ||
242 | vcc-lcd-supply = <®_dc1sw>; | ||
243 | vdd-mipi-bridge-supply = <®_eldo3>; | ||
244 | }; | ||
245 | |||
246 | &usb_otg { | ||
247 | /* otg support requires support for AXP221 usb-power-supply and GPIO */ | ||
248 | dr_mode = "host"; | ||
249 | status = "okay"; | ||
250 | }; | ||
251 | |||
252 | &usbphy { | ||
253 | usb1_vbus-supply = <®_dldo1>; | ||
254 | status = "okay"; | ||
255 | }; | ||
diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi b/arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi new file mode 100644 index 000000000000..ea69fb8ad4d8 --- /dev/null +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi | |||
@@ -0,0 +1,140 @@ | |||
1 | /* | ||
2 | * Copyright 2015 Chen-Yu Tsai <wens@csie.org> | ||
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 | /dts-v1/; | ||
44 | #include "sun6i-a31s.dtsi" | ||
45 | #include "sunxi-common-regulators.dtsi" | ||
46 | |||
47 | #include <dt-bindings/gpio/gpio.h> | ||
48 | #include <dt-bindings/pinctrl/sun4i-a10.h> | ||
49 | |||
50 | / { | ||
51 | model = "Sinlinx SinA31s Core Board"; | ||
52 | compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s"; | ||
53 | |||
54 | aliases { | ||
55 | serial0 = &uart0; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | &cpu0 { | ||
60 | cpu-supply = <®_dcdc3>; | ||
61 | }; | ||
62 | |||
63 | /* eMMC on core board */ | ||
64 | &mmc2 { | ||
65 | pinctrl-names = "default"; | ||
66 | pinctrl-0 = <&mmc2_8bit_emmc_pins>; | ||
67 | vmmc-supply = <®_dcdc1>; | ||
68 | bus-width = <8>; | ||
69 | non-removable; | ||
70 | status = "okay"; | ||
71 | }; | ||
72 | |||
73 | /* AXP221s PMIC on core board */ | ||
74 | &p2wi { | ||
75 | status = "okay"; | ||
76 | |||
77 | axp22x: pmic@68 { | ||
78 | compatible = "x-powers,axp221"; | ||
79 | reg = <0x68>; | ||
80 | interrupt-parent = <&nmi_intc>; | ||
81 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | ||
82 | }; | ||
83 | }; | ||
84 | |||
85 | #include "axp22x.dtsi" | ||
86 | |||
87 | ®_aldo3 { | ||
88 | regulator-always-on; | ||
89 | regulator-min-microvolt = <2700000>; | ||
90 | regulator-max-microvolt = <3300000>; | ||
91 | regulator-name = "avcc"; | ||
92 | }; | ||
93 | |||
94 | ®_dc5ldo { | ||
95 | regulator-min-microvolt = <700000>; | ||
96 | regulator-max-microvolt = <1320000>; | ||
97 | regulator-name = "vdd-cpus"; | ||
98 | }; | ||
99 | |||
100 | ®_dcdc1 { | ||
101 | regulator-always-on; | ||
102 | regulator-min-microvolt = <3000000>; | ||
103 | regulator-max-microvolt = <3000000>; | ||
104 | regulator-name = "vcc-3v0"; | ||
105 | }; | ||
106 | |||
107 | ®_dcdc2 { | ||
108 | regulator-min-microvolt = <700000>; | ||
109 | regulator-max-microvolt = <1320000>; | ||
110 | regulator-name = "vdd-gpu"; | ||
111 | }; | ||
112 | |||
113 | ®_dcdc3 { | ||
114 | regulator-always-on; | ||
115 | regulator-min-microvolt = <700000>; | ||
116 | regulator-max-microvolt = <1320000>; | ||
117 | regulator-name = "vdd-cpu"; | ||
118 | }; | ||
119 | |||
120 | ®_dcdc4 { | ||
121 | regulator-always-on; | ||
122 | regulator-min-microvolt = <700000>; | ||
123 | regulator-max-microvolt = <1320000>; | ||
124 | regulator-name = "vdd-sys-dll"; | ||
125 | }; | ||
126 | |||
127 | ®_dcdc5 { | ||
128 | regulator-always-on; | ||
129 | regulator-min-microvolt = <1500000>; | ||
130 | regulator-max-microvolt = <1500000>; | ||
131 | regulator-name = "vcc-dram"; | ||
132 | }; | ||
133 | |||
134 | /* UART0 pads available on core board */ | ||
135 | &uart0 { | ||
136 | pinctrl-names = "default"; | ||
137 | pinctrl-0 = <&uart0_pins_a>; | ||
138 | status = "okay"; | ||
139 | }; | ||
140 | |||
diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts new file mode 100644 index 000000000000..6ead2f5c847a --- /dev/null +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts | |||
@@ -0,0 +1,153 @@ | |||
1 | /* | ||
2 | * Copyright 2015 Chen-Yu Tsai <wens@csie.org> | ||
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 | /* The SinA31s development board has the SinA31s core board soldered on */ | ||
44 | #include "sun6i-a31s-sina31s-core.dtsi" | ||
45 | |||
46 | #include <dt-bindings/input/input.h> | ||
47 | |||
48 | / { | ||
49 | model = "Sinlinx SinA31s Development Board"; | ||
50 | compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s"; | ||
51 | |||
52 | chosen { | ||
53 | stdout-path = "serial0:115200n8"; | ||
54 | }; | ||
55 | |||
56 | leds { | ||
57 | compatible = "gpio-leds"; | ||
58 | pinctrl-names = "default"; | ||
59 | pinctrl-0 = <&led_pin_sina31s>; | ||
60 | |||
61 | status { | ||
62 | label = "sina31s:status:usr"; | ||
63 | gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ | ||
64 | }; | ||
65 | }; | ||
66 | }; | ||
67 | |||
68 | &ehci0 { | ||
69 | /* USB 2.0 4 port hub IC */ | ||
70 | status = "okay"; | ||
71 | }; | ||
72 | |||
73 | &ehci1 { | ||
74 | status = "okay"; | ||
75 | }; | ||
76 | |||
77 | &gmac { | ||
78 | pinctrl-names = "default"; | ||
79 | pinctrl-0 = <&gmac_pins_mii_a>; | ||
80 | phy = <&phy1>; | ||
81 | phy-mode = "mii"; | ||
82 | phy-supply = <®_dldo1>; | ||
83 | status = "okay"; | ||
84 | |||
85 | phy1: ethernet-phy@1 { | ||
86 | reg = <1>; | ||
87 | }; | ||
88 | }; | ||
89 | |||
90 | &ir { | ||
91 | pinctrl-names = "default"; | ||
92 | pinctrl-0 = <&ir_pins_a>; | ||
93 | status = "okay"; | ||
94 | }; | ||
95 | |||
96 | &lradc { | ||
97 | vref-supply = <®_aldo3>; | ||
98 | status = "okay"; | ||
99 | |||
100 | button@158 { | ||
101 | label = "Volume Up"; | ||
102 | linux,code = <KEY_VOLUMEUP>; | ||
103 | channel = <0>; | ||
104 | voltage = <158730>; | ||
105 | }; | ||
106 | |||
107 | button@349 { | ||
108 | label = "Volume Down"; | ||
109 | linux,code = <KEY_VOLUMEDOWN>; | ||
110 | channel = <0>; | ||
111 | voltage = <349206>; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | &mmc0 { | ||
116 | pinctrl-names = "default"; | ||
117 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>; | ||
118 | vmmc-supply = <®_dcdc1>; | ||
119 | bus-width = <4>; | ||
120 | cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */ | ||
121 | cd-inverted; | ||
122 | status = "okay"; | ||
123 | }; | ||
124 | |||
125 | &ohci1 { | ||
126 | status = "okay"; | ||
127 | }; | ||
128 | |||
129 | &pio { | ||
130 | led_pin_sina31s: led_pin@0 { | ||
131 | allwinner,pins = "PH13"; | ||
132 | allwinner,function = "gpio_out"; | ||
133 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
134 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; | ||
135 | }; | ||
136 | |||
137 | mmc0_cd_pin_sina31s: mmc0_cd_pin@0 { | ||
138 | allwinner,pins = "PA4"; | ||
139 | allwinner,function = "gpio_in"; | ||
140 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
141 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
142 | }; | ||
143 | }; | ||
144 | |||
145 | ®_dldo1 { | ||
146 | regulator-min-microvolt = <3300000>; | ||
147 | regulator-max-microvolt = <3300000>; | ||
148 | regulator-name = "vcc-gmac-phy"; | ||
149 | }; | ||
150 | |||
151 | &usbphy { | ||
152 | status = "okay"; | ||
153 | }; | ||
diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 9ff459bd38b3..1fa832d7b469 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | |||
@@ -84,6 +84,10 @@ | |||
84 | status = "okay"; | 84 | status = "okay"; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | &codec { | ||
88 | status = "okay"; | ||
89 | }; | ||
90 | |||
87 | &cpu0 { | 91 | &cpu0 { |
88 | cpu-supply = <®_dcdc2>; | 92 | cpu-supply = <®_dcdc2>; |
89 | }; | 93 | }; |
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index e6b019232a9e..8da939ab8350 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts | |||
@@ -101,6 +101,10 @@ | |||
101 | status = "okay"; | 101 | status = "okay"; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | &codec { | ||
105 | status = "okay"; | ||
106 | }; | ||
107 | |||
104 | &cpu0 { | 108 | &cpu0 { |
105 | cpu-supply = <®_dcdc2>; | 109 | cpu-supply = <®_dcdc2>; |
106 | }; | 110 | }; |
diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts index beac431aa594..1757a6ad74e9 100644 --- a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +++ b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | |||
@@ -142,6 +142,10 @@ | |||
142 | status = "okay"; | 142 | status = "okay"; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | &otg_sram { | ||
146 | status = "okay"; | ||
147 | }; | ||
148 | |||
145 | &pio { | 149 | &pio { |
146 | ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 { | 150 | ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 { |
147 | allwinner,pins = "PH2"; | 151 | allwinner,pins = "PH2"; |
@@ -157,6 +161,13 @@ | |||
157 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; | 161 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
158 | }; | 162 | }; |
159 | 163 | ||
164 | usb0_id_detect_pin: usb0_id_detect_pin@0 { | ||
165 | allwinner,pins = "PH4"; | ||
166 | allwinner,function = "gpio_in"; | ||
167 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | ||
168 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; | ||
169 | }; | ||
170 | |||
160 | usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 { | 171 | usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 { |
161 | allwinner,pins = "PD2"; | 172 | allwinner,pins = "PD2"; |
162 | allwinner,function = "gpio_out"; | 173 | allwinner,function = "gpio_out"; |
@@ -211,7 +222,15 @@ | |||
211 | status = "okay"; | 222 | status = "okay"; |
212 | }; | 223 | }; |
213 | 224 | ||
225 | &usb_otg { | ||
226 | dr_mode = "otg"; | ||
227 | status = "okay"; | ||
228 | }; | ||
229 | |||
214 | &usbphy { | 230 | &usbphy { |
231 | pinctrl-names = "default"; | ||
232 | pinctrl-0 = <&usb0_id_detect_pin>; | ||
233 | usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ | ||
215 | usb1_vbus-supply = <®_usb1_vbus>; | 234 | usb1_vbus-supply = <®_usb1_vbus>; |
216 | usb2_vbus-supply = <®_usb1_vbus>; | 235 | usb2_vbus-supply = <®_usb1_vbus>; |
217 | status = "okay"; | 236 | status = "okay"; |
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 3a68852f6706..e02eb720c4fc 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <dt-bindings/interrupt-controller/arm-gic.h> | 47 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
48 | #include <dt-bindings/thermal/thermal.h> | 48 | #include <dt-bindings/thermal/thermal.h> |
49 | 49 | ||
50 | #include <dt-bindings/clock/sun4i-a10-pll2.h> | ||
50 | #include <dt-bindings/dma/sun4i-a10.h> | 51 | #include <dt-bindings/dma/sun4i-a10.h> |
51 | #include <dt-bindings/pinctrl/sun4i-a10.h> | 52 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
52 | 53 | ||
@@ -199,6 +200,15 @@ | |||
199 | clock-output-names = "pll1"; | 200 | clock-output-names = "pll1"; |
200 | }; | 201 | }; |
201 | 202 | ||
203 | pll2: clk@01c20008 { | ||
204 | #clock-cells = <1>; | ||
205 | compatible = "allwinner,sun4i-a10-pll2-clk"; | ||
206 | reg = <0x01c20008 0x8>; | ||
207 | clocks = <&osc24M>; | ||
208 | clock-output-names = "pll2-1x", "pll2-2x", | ||
209 | "pll2-4x", "pll2-8x"; | ||
210 | }; | ||
211 | |||
202 | pll4: clk@01c20018 { | 212 | pll4: clk@01c20018 { |
203 | #clock-cells = <0>; | 213 | #clock-cells = <0>; |
204 | compatible = "allwinner,sun7i-a20-pll4-clk"; | 214 | compatible = "allwinner,sun7i-a20-pll4-clk"; |
@@ -491,6 +501,14 @@ | |||
491 | clock-output-names = "spi3"; | 501 | clock-output-names = "spi3"; |
492 | }; | 502 | }; |
493 | 503 | ||
504 | codec_clk: clk@01c20140 { | ||
505 | #clock-cells = <0>; | ||
506 | compatible = "allwinner,sun4i-a10-codec-clk"; | ||
507 | reg = <0x01c20140 0x4>; | ||
508 | clocks = <&pll2 SUN4I_A10_PLL2_1X>; | ||
509 | clock-output-names = "codec"; | ||
510 | }; | ||
511 | |||
494 | mbus_clk: clk@01c2015c { | 512 | mbus_clk: clk@01c2015c { |
495 | #clock-cells = <0>; | 513 | #clock-cells = <0>; |
496 | compatible = "allwinner,sun5i-a13-mbus-clk"; | 514 | compatible = "allwinner,sun5i-a13-mbus-clk"; |
@@ -1198,6 +1216,19 @@ | |||
1198 | status = "disabled"; | 1216 | status = "disabled"; |
1199 | }; | 1217 | }; |
1200 | 1218 | ||
1219 | codec: codec@01c22c00 { | ||
1220 | #sound-dai-cells = <0>; | ||
1221 | compatible = "allwinner,sun7i-a20-codec"; | ||
1222 | reg = <0x01c22c00 0x40>; | ||
1223 | interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; | ||
1224 | clocks = <&apb0_gates 0>, <&codec_clk>; | ||
1225 | clock-names = "apb", "codec"; | ||
1226 | dmas = <&dma SUN4I_DMA_NORMAL 19>, | ||
1227 | <&dma SUN4I_DMA_NORMAL 19>; | ||
1228 | dma-names = "rx", "tx"; | ||
1229 | status = "disabled"; | ||
1230 | }; | ||
1231 | |||
1201 | sid: eeprom@01c23800 { | 1232 | sid: eeprom@01c23800 { |
1202 | compatible = "allwinner,sun7i-a20-sid"; | 1233 | compatible = "allwinner,sun7i-a20-sid"; |
1203 | reg = <0x01c23800 0x200>; | 1234 | reg = <0x01c23800 0x200>; |