Skip to content

Commit 3e01103

Browse files
committed
Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/late
Pull "Amlogic DT updates for v4.11, round 2" from Kevin Hilman: - add SAR ADC driver - add ADC laddered keys to meson-gxbb-p200 board * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxbb-p200: add ADC laddered keys ARM64: dts: meson: meson-gx: add the SAR ADC ARM64: dts: meson-gxl: add the pwm_ao_b pin ARM64: dts: meson-gx: add the missing pwm_AO_ab node clk: gxbb: fix CLKID_ETH defined twice ARM64: dts: meson-gxl: rename Nexbox A95x for consistency clk: gxbb: add the SAR ADC clocks and expose them dt-bindings: amlogic: Add WeTek boards ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play dt-bindings: vendor-prefix: Add wetek vendor prefix ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes ARM64: dts: meson-gxbb-vega-s95: Add LED ARM64: dts: meson-gx: add the serial CTS and RTS pin groups ARM64: dts: meson-gx: add the missing uart_AO_B clk: meson-gxbb: Export HDMI clocks ARM64: dts: meson-gxm: add SCPI configuration for GXM ARM64: dts: meson-gx: move the SCPI and SRAM nodes to meson-gx
2 parents d0f7de9 + 6b6a186 commit 3e01103

File tree

17 files changed

+523
-66
lines changed

17 files changed

+523
-66
lines changed

Documentation/devicetree/bindings/arm/amlogic.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Board compatible values:
4040
- "hardkernel,odroid-c2" (Meson gxbb)
4141
- "amlogic,p200" (Meson gxbb)
4242
- "amlogic,p201" (Meson gxbb)
43+
- "wetek,hub" (Meson gxbb)
44+
- "wetek,play2" (Meson gxbb)
4345
- "amlogic,p212" (Meson gxl s905x)
4446
- "amlogic,p230" (Meson gxl s905d)
4547
- "amlogic,p231" (Meson gxl s905d)

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ virtio Virtual I/O Device Specification, developed by the OASIS consortium
320320
vivante Vivante Corporation
321321
voipac Voipac Technologies s.r.o.
322322
wd Western Digital Corp.
323+
wetek WeTek Electronics, limited.
323324
wexler Wexler
324325
winbond Winbond Electronics corp.
325326
wlf Wolfson Microelectronics

arch/arm64/boot/dts/amlogic/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p201.dtb
55
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
66
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
77
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
8+
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-hub.dtb
9+
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-play2.dtb
810
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
911
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
1012
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
11-
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb
12-
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q200.dtb
13-
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q201.dtb
13+
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
14+
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
15+
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
1416
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
1517

1618
always := $(dtb-y)

arch/arm64/boot/dts/amlogic/meson-gx.dtsi

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
reg = <0x0 0x0>;
6666
enable-method = "psci";
6767
next-level-cache = <&l2>;
68+
clocks = <&scpi_dvfs 0>;
6869
};
6970

7071
cpu1: cpu@1 {
@@ -73,6 +74,7 @@
7374
reg = <0x0 0x1>;
7475
enable-method = "psci";
7576
next-level-cache = <&l2>;
77+
clocks = <&scpi_dvfs 0>;
7678
};
7779

7880
cpu2: cpu@2 {
@@ -81,6 +83,7 @@
8183
reg = <0x0 0x2>;
8284
enable-method = "psci";
8385
next-level-cache = <&l2>;
86+
clocks = <&scpi_dvfs 0>;
8487
};
8588

8689
cpu3: cpu@3 {
@@ -89,6 +92,7 @@
8992
reg = <0x0 0x3>;
9093
enable-method = "psci";
9194
next-level-cache = <&l2>;
95+
clocks = <&scpi_dvfs 0>;
9296
};
9397

9498
l2: l2-cache0 {
@@ -153,6 +157,28 @@
153157
};
154158
};
155159

160+
scpi {
161+
compatible = "amlogic,meson-gxbb-scpi", "arm,scpi-pre-1.0";
162+
mboxes = <&mailbox 1 &mailbox 2>;
163+
shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
164+
165+
scpi_clocks: clocks {
166+
compatible = "arm,scpi-clocks";
167+
168+
scpi_dvfs: scpi_clocks@0 {
169+
compatible = "arm,scpi-dvfs-clocks";
170+
#clock-cells = <1>;
171+
clock-indices = <0>;
172+
clock-output-names = "vcpu";
173+
};
174+
};
175+
176+
scpi_sensors: sensors {
177+
compatible = "arm,scpi-sensors";
178+
#thermal-sensor-cells = <1>;
179+
};
180+
};
181+
156182
soc {
157183
compatible = "simple-bus";
158184
#address-cells = <2>;
@@ -211,6 +237,14 @@
211237
status = "disabled";
212238
};
213239

240+
saradc: adc@8680 {
241+
compatible = "amlogic,meson-saradc";
242+
reg = <0x0 0x8680 0x0 0x34>;
243+
#io-channel-cells = <1>;
244+
interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
245+
status = "disabled";
246+
};
247+
214248
pwm_ef: pwm@86c0 {
215249
compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
216250
reg = <0x0 0x086c0 0x0 0x10>;
@@ -264,6 +298,25 @@
264298
#address-cells = <0>;
265299
};
266300

301+
sram: sram@c8000000 {
302+
compatible = "amlogic,meson-gxbb-sram", "mmio-sram";
303+
reg = <0x0 0xc8000000 0x0 0x14000>;
304+
305+
#address-cells = <1>;
306+
#size-cells = <1>;
307+
ranges = <0 0x0 0xc8000000 0x14000>;
308+
309+
cpu_scp_lpri: scp-shmem@0 {
310+
compatible = "amlogic,meson-gxbb-scp-shmem";
311+
reg = <0x13000 0x400>;
312+
};
313+
314+
cpu_scp_hpri: scp-shmem@200 {
315+
compatible = "amlogic,meson-gxbb-scp-shmem";
316+
reg = <0x13400 0x400>;
317+
};
318+
};
319+
267320
aobus: aobus@c8100000 {
268321
compatible = "simple-bus";
269322
reg = <0x0 0xc8100000 0x0 0x100000>;
@@ -279,6 +332,21 @@
279332
status = "disabled";
280333
};
281334

335+
uart_AO_B: serial@4e0 {
336+
compatible = "amlogic,meson-uart";
337+
reg = <0x0 0x004e0 0x0 0x14>;
338+
interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
339+
clocks = <&xtal>;
340+
status = "disabled";
341+
};
342+
343+
pwm_AO_ab: pwm@550 {
344+
compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
345+
reg = <0x0 0x00550 0x0 0x10>;
346+
#pwm-cells = <3>;
347+
status = "disabled";
348+
};
349+
282350
ir: ir@580 {
283351
compatible = "amlogic,meson-gxbb-ir";
284352
reg = <0x0 0x00580 0x0 0x40>;

arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,64 @@
4545
/dts-v1/;
4646

4747
#include "meson-gxbb-p20x.dtsi"
48+
#include <dt-bindings/input/input.h>
4849

4950
/ {
5051
compatible = "amlogic,p200", "amlogic,meson-gxbb";
5152
model = "Amlogic Meson GXBB P200 Development Board";
53+
54+
avdd18_usb_adc: regulator-avdd18_usb_adc {
55+
compatible = "regulator-fixed";
56+
regulator-name = "AVDD18_USB_ADC";
57+
regulator-min-microvolt = <1800000>;
58+
regulator-max-microvolt = <1800000>;
59+
};
60+
61+
adc_keys {
62+
compatible = "adc-keys";
63+
io-channels = <&saradc 0>;
64+
io-channel-names = "buttons";
65+
keyup-threshold-microvolt = <1800000>;
66+
67+
button-home {
68+
label = "Home";
69+
linux,code = <KEY_HOME>;
70+
press-threshold-microvolt = <900000>; /* 50% */
71+
};
72+
73+
button-esc {
74+
label = "Esc";
75+
linux,code = <KEY_ESC>;
76+
press-threshold-microvolt = <684000>; /* 38% */
77+
};
78+
79+
button-up {
80+
label = "Volume Up";
81+
linux,code = <KEY_VOLUMEUP>;
82+
press-threshold-microvolt = <468000>; /* 26% */
83+
};
84+
85+
button-down {
86+
label = "Volume Down";
87+
linux,code = <KEY_VOLUMEDOWN>;
88+
press-threshold-microvolt = <252000>; /* 14% */
89+
};
90+
91+
button-menu {
92+
label = "Menu";
93+
linux,code = <KEY_MENU>;
94+
press-threshold-microvolt = <0>; /* 0% */
95+
};
96+
};
5297
};
5398

5499
&i2c_B {
55100
status = "okay";
56101
pinctrl-0 = <&i2c_b_pins>;
57102
pinctrl-names = "default";
58103
};
104+
105+
&saradc {
106+
status = "okay";
107+
vref-supply = <&avdd18_usb_adc>;
108+
};

arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@
5353
stdout-path = "serial0:115200n8";
5454
};
5555

56+
leds {
57+
compatible = "gpio-leds";
58+
59+
blue {
60+
label = "vega-s95:blue:on";
61+
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
62+
default-state = "on";
63+
panic-indicator;
64+
};
65+
};
66+
5667
usb_vbus: regulator-usb0-vbus {
5768
compatible = "regulator-fixed";
5869

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* Copyright (c) 2016 BayLibre, Inc.
3+
* Author: Neil Armstrong <[email protected]>
4+
*
5+
* This file is dual-licensed: you can use it either under the terms
6+
* of the GPL or the X11 license, at your option. Note that this dual
7+
* licensing only applies to this file, and not this project as a
8+
* whole.
9+
*
10+
* a) This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU General Public License as
12+
* published by the Free Software Foundation; either version 2 of the
13+
* License, or (at your option) any later version.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
* GNU General Public License for more details.
19+
*
20+
* Or, alternatively,
21+
*
22+
* b) Permission is hereby granted, free of charge, to any person
23+
* obtaining a copy of this software and associated documentation
24+
* files (the "Software"), to deal in the Software without
25+
* restriction, including without limitation the rights to use,
26+
* copy, modify, merge, publish, distribute, sublicense, and/or
27+
* sell copies of the Software, and to permit persons to whom the
28+
* Software is furnished to do so, subject to the following
29+
* conditions:
30+
*
31+
* The above copyright notice and this permission notice shall be
32+
* included in all copies or substantial portions of the Software.
33+
*
34+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41+
* OTHER DEALINGS IN THE SOFTWARE.
42+
*/
43+
44+
/dts-v1/;
45+
46+
#include "meson-gxbb-p20x.dtsi"
47+
48+
/ {
49+
compatible = "wetek,hub", "amlogic,meson-gxbb";
50+
model = "WeTek Hub";
51+
52+
leds {
53+
compatible = "gpio-leds";
54+
55+
system {
56+
label = "wetek-play:system-status";
57+
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
58+
default-state = "on";
59+
panic-indicator;
60+
};
61+
};
62+
63+
cvbs-connector {
64+
status = "disabled";
65+
};
66+
};

0 commit comments

Comments
 (0)