Skip to content

Commit 6bac618

Browse files
khilmangregkh
authored andcommittedFeb 12, 2021
ANDROID: GKI: amlogic: add DTB overlays
Add Android DTB overlays for sei510, sei610, VIM3 and VIM3L. Copied from yukawa v5.10 kernel - repo: kernel/hikey-linaro - branch: amlogic-bmeson-5.10 Bug: 179406580 Change-Id: Ie257351f7dec6765feb162dff014eb1d97eb1039 Signed-off-by: Kevin Hilman <khilman@baylibre.com> (cherry picked from commit bb24b36 kernel/common android-mainline) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
1 parent 9eb5a3a commit 6bac618

6 files changed

+326
-8
lines changed
 

‎arch/arm64/boot/dts/amlogic/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# SPDX-License-Identifier: GPL-2.0
22
dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
33
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb
4+
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510-android.dtb
45
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
56
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
67
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb
78
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
89
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
10+
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3-android.dtb
911
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
1012
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
1113
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
@@ -45,6 +47,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
4547
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
4648
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
4749
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
50+
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610-android.dtb
4851
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
52+
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l-android.dtb
4953
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
5054
dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2020 BayLibre SAS. All rights reserved.
4+
*/
5+
6+
/dts-v1/;
7+
/plugin/;
8+
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
11+
#include <dt-bindings/input/input.h>
12+
#include <dt-bindings/interrupt-controller/irq.h>
13+
#include <dt-bindings/interrupt-controller/arm-gic.h>
14+
15+
/ {
16+
compatible = "seirobotics,sei510", "amlogic,g12a";
17+
model = "SEI Robotics SEI510";
18+
fragment@101 {
19+
target-path = "/";
20+
21+
__overlay__ {
22+
reserved-memory {
23+
#address-cells = <2>;
24+
#size-cells = <2>;
25+
ramoops@d000000 {
26+
compatible = "ramoops";
27+
reg = <0x0 0x0d000000 0x0 0x00100000>;
28+
record-size = <0x8000>;
29+
console-size = <0x8000>;
30+
ftrace-size = <0x0>;
31+
pmsg-size = <0x8000>;
32+
};
33+
};
34+
35+
adc_keys {
36+
button-onoff {
37+
linux,code = <BTN_0>;
38+
};
39+
};
40+
41+
cvbs-connector {
42+
status = "disabled";
43+
};
44+
};
45+
};
46+
};
47+
48+
&vddao_3v3_t {
49+
gpio-open-drain;
50+
};
51+
52+
&uart_A {
53+
bluetooth {
54+
interrupt-parent = <&gpio_intc>;
55+
interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
56+
interrupt-names = "host-wakeup";
57+
};
58+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2019 BayLibre SAS. All rights reserved.
4+
*/
5+
6+
/dts-v1/;
7+
/plugin/;
8+
9+
#include <dt-bindings/phy/phy.h>
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
12+
#include <dt-bindings/input/input.h>
13+
#include <dt-bindings/interrupt-controller/irq.h>
14+
15+
/ {
16+
compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b";
17+
model = "Khadas VIM3";
18+
fragment@101 {
19+
target-path = "/";
20+
__overlay__ {
21+
reserved-memory {
22+
#address-cells = <2>;
23+
#size-cells = <2>;
24+
ramoops@d000000 {
25+
compatible = "ramoops";
26+
reg = <0x0 0x0d000000 0x0 0x00100000>;
27+
record-size = <0x8000>;
28+
console-size = <0x8000>;
29+
ftrace-size = <0x0>;
30+
pmsg-size = <0x8000>;
31+
};
32+
};
33+
34+
};
35+
};
36+
};
37+
38+
&vcc_5v {
39+
gpio-open-drain;
40+
};
41+
42+
&uart_C {
43+
status = "okay";
44+
pinctrl-0 = <&uart_c_pins>;
45+
pinctrl-names = "default";
46+
};
47+
48+
&emmc_pwrseq{
49+
status = "okay";
50+
};
51+
52+
&sd_emmc_a {
53+
/* WiFi firmware requires power to be kept while in suspend */
54+
keep-power-in-suspend;
55+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2019 BayLibre SAS. All rights reserved.
4+
*/
5+
6+
/dts-v1/;
7+
/plugin/;
8+
9+
#include <dt-bindings/phy/phy.h>
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
12+
#include <dt-bindings/input/input.h>
13+
#include <dt-bindings/interrupt-controller/irq.h>
14+
15+
/ {
16+
compatible = "khadas,vim3l", "amlogic,sm1";
17+
model = "Khadas VIM3L";
18+
fragment@101 {
19+
target-path = "/";
20+
__overlay__ {
21+
reserved-memory {
22+
#address-cells = <2>;
23+
#size-cells = <2>;
24+
ramoops@d000000 {
25+
compatible = "ramoops";
26+
reg = <0x0 0x0d000000 0x0 0x00100000>;
27+
record-size = <0x8000>;
28+
console-size = <0x8000>;
29+
ftrace-size = <0x0>;
30+
pmsg-size = <0x8000>;
31+
};
32+
};
33+
};
34+
};
35+
};
36+
37+
&vcc_5v {
38+
gpio-open-drain;
39+
};
40+
41+
&uart_A {
42+
bluetooth {
43+
interrupt-parent = <&gpio_intc>;
44+
interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
45+
interrupt-names = "host-wakeup";
46+
};
47+
};
48+
49+
&uart_C {
50+
status = "disabled";
51+
pinctrl-0 = <&uart_c_pins>;
52+
pinctrl-names = "default";
53+
};
54+
55+
&emmc_pwrseq{
56+
status = "okay";
57+
};
58+
59+
&sd_emmc_a {
60+
/* WiFi firmware requires power to be kept while in suspend */
61+
keep-power-in-suspend;
62+
};
63+
64+
&spicc1 {
65+
status = "okay";
66+
pinctrl-names = "default";
67+
pinctrl-0 = <&spicc1_pins>;
68+
cs-gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
69+
#address-cells = <1>;
70+
#size-cells = <0>;
71+
72+
spidev@0 {
73+
compatible = "rohm,dh2228fv";
74+
reg = <0>;
75+
spi-max-frequency = <500000>;
76+
status = "okay";
77+
};
78+
79+
neonkey@0 {
80+
compatible = "nanohub";
81+
reg = <0>;
82+
spi-max-frequency = <500000>;
83+
84+
sensorhub,nreset-gpio = <&gpio GPIOA_0 0>;
85+
sensorhub,boot0-gpio = <&gpio GPIOA_3 0>; /* Fake */
86+
sensorhub,wakeup-gpio = <&gpio GPIOA_2 0>; /* A2 -> PB9 */
87+
sensorhub,irq1-gpio = <&gpio GPIOA_1 0>; /* A1 -> PB5 */
88+
interrupt-parent = <&gpio_intc>;
89+
interrupts = <62 IRQ_TYPE_EDGE_RISING>; /* A1 */
90+
/* sensorhub,spi-cs-gpio = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>; Optional */
91+
sensorhub,bl-addr = <0x08000000>;
92+
sensorhub,kernel-addr = <0x0800C000>;
93+
sensorhub,shared-addr = <0x08040000>;
94+
sensorhub,flash-banks = <0 0x08000000 0x04000>,
95+
<3 0x0800C000 0x04000>,
96+
<4 0x08010000 0x10000>,
97+
<5 0x08020000 0x20000>,
98+
<6 0x08040000 0x20000>,
99+
<7 0x08060000 0x20000>;
100+
sensorhub,num-flash-banks = <6>;
101+
status = "disabled";
102+
};
103+
104+
argonkey@0 {
105+
compatible = "nanohub";
106+
reg = <0>;
107+
spi-max-frequency = <500000>;
108+
spi-cpol;
109+
110+
sensorhub,nreset-gpio = <&gpio GPIOA_0 0>;
111+
sensorhub,boot0-gpio = <&gpio GPIOA_3 0>;
112+
sensorhub,wakeup-gpio = <&gpio GPIOA_1 0>; /* A1 -> PA0 */
113+
sensorhub,irq1-gpio = <&gpio GPIOA_2 0>; /* A2 -> PA1 */
114+
interrupt-parent = <&gpio_intc>;
115+
interrupts = <63 IRQ_TYPE_EDGE_RISING>; /* A2 */
116+
sensorhub,bl-addr = <0x08000000>;
117+
sensorhub,kernel-addr = <0x0800C000>;
118+
sensorhub,num-flash-banks = <4>;
119+
sensorhub,flash-banks = <0 0x08000000 0x04000>,
120+
<3 0x0800C000 0x04000>,
121+
<4 0x08010000 0x10000>,
122+
<5 0x08020000 0x20000>;
123+
sensorhub,shared-addr = <0x08040000>;
124+
sensorhub,num-shared-flash-banks = <6>;
125+
sensorhub,shared-flash-banks = <6 0x08040000 0x20000>,
126+
<7 0x08060000 0x20000>,
127+
<8 0x08080000 0x20000>,
128+
<9 0x080A0000 0x20000>,
129+
<10 0x080C0000 0x20000>,
130+
<11 0x080E0000 0x20000>;
131+
status = "disabled";
132+
};
133+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (c) 2020 BayLibre SAS. All rights reserved.
4+
*/
5+
6+
/dts-v1/;
7+
/plugin/;
8+
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
11+
#include <dt-bindings/input/input.h>
12+
#include <dt-bindings/interrupt-controller/irq.h>
13+
#include <dt-bindings/interrupt-controller/arm-gic.h>
14+
15+
/ {
16+
compatible = "seirobotics,sei610", "amlogic,sm1";
17+
model = "SEI Robotics SEI610";
18+
fragment@101 {
19+
target-path = "/";
20+
__overlay__ {
21+
22+
reserved-memory {
23+
#address-cells = <2>;
24+
#size-cells = <2>;
25+
ramoops@d000000 {
26+
compatible = "ramoops";
27+
reg = <0x0 0x0d000000 0x0 0x00100000>;
28+
record-size = <0x8000>;
29+
console-size = <0x8000>;
30+
ftrace-size = <0x0>;
31+
pmsg-size = <0x8000>;
32+
};
33+
};
34+
};
35+
};
36+
};
37+
38+
&vddao_3v3_t {
39+
gpio-open-drain;
40+
};
41+
42+
&emmc_pwrseq {
43+
status = "okay";
44+
};
45+
46+
&sd_emmc_a {
47+
/* WiFi firmware requires power to be kept while in suspend */
48+
keep-power-in-suspend;
49+
};
50+
51+
&uart_C {
52+
status = "disabled";
53+
pinctrl-0 = <&uart_c_pins>;
54+
pinctrl-names = "default";
55+
};
56+
57+
&spicc0 {
58+
status = "disabled";
59+
pinctrl-names = "default";
60+
pinctrl-0 = <&spicc0_x_pins>;
61+
cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
62+
#address-cells = <1>;
63+
#size-cells = <0>;
64+
65+
spidev@0 {
66+
compatible = "rohm,dh2228fv";
67+
reg = <0>;
68+
spi-max-frequency = <500000>;
69+
status = "disabled";
70+
};
71+
};

‎build.config.amlogic

+5-8
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,15 @@ POST_DEFCONFIG_CMDS="rm ${ROOT_DIR}/${KERNEL_DIR}/arch/arm64/configs/${DEFCONFIG
88
DTC_FLAGS="-@"
99

1010
MAKE_GOALS="${MAKE_GOALS}
11-
amlogic/meson-g12a-sei510.dtb
12-
amlogic/meson-sm1-sei610.dtb
13-
amlogic/meson-sm1-khadas-vim3l.dtb
14-
amlogic/meson-g12b-a311d-khadas-vim3.dtb
11+
dtbs
1512
"
1613

1714
FILES="${FILES}
1815
arch/arm64/boot/Image.lz4
19-
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dtb
20-
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dtb
21-
arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dtb
22-
arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb
16+
arch/arm64/boot/dts/amlogic/meson-g12a-sei510*.dtb
17+
arch/arm64/boot/dts/amlogic/meson-sm1-sei610*.dtb
18+
arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l*.dtb
19+
arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3*.dtb
2320
"
2421

2522
#

0 commit comments

Comments
 (0)
Please sign in to comment.