Skip to content

Commit efeab69

Browse files
committed
lg: x3: Optimus 4X HD and Optimus Vu support
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
1 parent db9826a commit efeab69

File tree

16 files changed

+1511
-0
lines changed

16 files changed

+1511
-0
lines changed

arch/arm/dts/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
229229
tegra30-beaver.dtb \
230230
tegra30-cardhu.dtb \
231231
tegra30-colibri.dtb \
232+
tegra30-lge-p880.dtb \
233+
tegra30-lge-p895.dtb \
232234
tegra30-tec-ng.dtb \
233235
tegra114-dalmore.dtb \
234236
tegra124-apalis.dtb \

arch/arm/dts/tegra30-lge-p880.dts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/dts-v1/;
3+
4+
#include "tegra30-lge-x3.dtsi"
5+
6+
/ {
7+
model = "LG Optimus 4X HD";
8+
compatible = "lge,p880", "nvidia,tegra30";
9+
10+
aliases {
11+
mmc1 = &sdmmc3; /* uSD slot */
12+
};
13+
14+
host1x@50000000 {
15+
status = "okay";
16+
dc@54200000 {
17+
status = "okay";
18+
rgb {
19+
status = "okay";
20+
21+
nvidia,panel = <&bridge>;
22+
23+
display-timings {
24+
timing@0 {
25+
/* 1280x720@60Hz */
26+
clock-frequency = <68000000>;
27+
hactive = <720>;
28+
vactive = <1280>;
29+
hfront-porch = <92>;
30+
hback-porch = <62>;
31+
hsync-len = <4>;
32+
vsync-len = <1>;
33+
vfront-porch = <6>;
34+
vback-porch = <3>;
35+
};
36+
};
37+
};
38+
};
39+
};
40+
41+
sdmmc3: sdhci@78000400 {
42+
status = "okay";
43+
bus-width = <4>;
44+
45+
cd-gpios = <&gpio TEGRA_GPIO(W, 5) GPIO_ACTIVE_LOW>;
46+
47+
vmmc-supply = <&vdd_usd>;
48+
vqmmc-supply = <&vdd_1v8_vio>;
49+
};
50+
51+
gpio-keyboard {
52+
key-volume-up {
53+
label = "Volume Up";
54+
gpios = <&gpio TEGRA_GPIO(O, 7) GPIO_ACTIVE_LOW>;
55+
linux,code = <KEY_UP>;
56+
};
57+
};
58+
59+
panel: panel {
60+
compatible = "jdi,dx12d100vm0eaa";
61+
62+
enable-gpios = <&gpio TEGRA_GPIO(Y, 0) GPIO_ACTIVE_HIGH>;
63+
reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
64+
65+
backlight = <&backlight>;
66+
bridge-spi = <&spi_bus>;
67+
};
68+
};

arch/arm/dts/tegra30-lge-p895.dts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/dts-v1/;
3+
4+
#include "tegra30-lge-x3.dtsi"
5+
6+
/ {
7+
model = "LG Optimus Vu";
8+
compatible = "lge,p895", "nvidia,tegra30";
9+
10+
host1x@50000000 {
11+
status = "okay";
12+
dc@54200000 {
13+
status = "okay";
14+
rgb {
15+
status = "okay";
16+
17+
nvidia,panel = <&bridge>;
18+
19+
display-timings {
20+
timing@0 {
21+
/* 1024x768@60Hz */
22+
clock-frequency = <62000000>;
23+
hactive = <768>;
24+
vactive = <1024>;
25+
hfront-porch = <116>;
26+
hback-porch = <81>;
27+
hsync-len = <5>;
28+
vsync-len = <2>;
29+
vfront-porch = <24>;
30+
vback-porch = <8>;
31+
};
32+
};
33+
};
34+
};
35+
};
36+
37+
gpio-keyboard {
38+
key-volume-up {
39+
label = "Volume Up";
40+
gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_LOW>;
41+
linux,code = <KEY_UP>;
42+
};
43+
};
44+
45+
panel: panel {
46+
compatible = "hitachi,tx13d100vm0eaa";
47+
48+
reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
49+
50+
vcc-supply = <&vcc_3v0_lcd>;
51+
iovcc-supply = <&iovcc_1v8_lcd>;
52+
53+
backlight = <&backlight>;
54+
bridge-spi = <&spi_bus>;
55+
};
56+
57+
regulators {
58+
compatible = "simple-bus";
59+
#address-cells = <1>;
60+
#size-cells = <0>;
61+
62+
vcc_3v0_lcd: regulator@0 {
63+
compatible = "regulator-fixed";
64+
reg = <0>;
65+
regulator-name = "vcc_3v0_lcd";
66+
regulator-min-microvolt = <3000000>;
67+
regulator-max-microvolt = <3000000>;
68+
gpio = <&gpio TEGRA_GPIO(BB, 0) GPIO_ACTIVE_HIGH>;
69+
enable-active-high;
70+
};
71+
72+
iovcc_1v8_lcd: regulator@1 {
73+
compatible = "regulator-fixed";
74+
reg = <1>;
75+
regulator-name = "iovcc_1v8_lcd";
76+
regulator-min-microvolt = <1800000>;
77+
regulator-max-microvolt = <1800000>;
78+
gpio = <&gpio TEGRA_GPIO(Y, 0) GPIO_ACTIVE_HIGH>;
79+
enable-active-high;
80+
};
81+
};
82+
};

arch/arm/dts/tegra30-lge-x3.dtsi

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
#include <dt-bindings/input/gpio-keys.h>
4+
#include <dt-bindings/input/linux-event-codes.h>
5+
6+
#include "tegra30.dtsi"
7+
8+
/ {
9+
chosen {
10+
stdout-path = &uartd;
11+
};
12+
13+
aliases {
14+
i2c0 = &pwr_i2c;
15+
i2c1 = &gen2_i2c;
16+
17+
mmc0 = &sdmmc4; /* eMMC */
18+
19+
rtc0 = &pmic;
20+
rtc1 = "/rtc@7000e000";
21+
22+
spi0 = &dsi_spi;
23+
24+
usb0 = &micro_usb;
25+
};
26+
27+
memory {
28+
device_type = "memory";
29+
reg = <0x80000000 0x40000000>;
30+
};
31+
32+
uartd: serial@70006300 {
33+
status = "okay";
34+
};
35+
36+
gen2_i2c: i2c@7000c400 {
37+
status = "okay";
38+
clock-frequency = <400000>;
39+
40+
backlight: lm3533@36 {
41+
compatible = "ti,lm3533";
42+
reg = <0x36>;
43+
44+
enable-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_HIGH>;
45+
};
46+
47+
muic@44 {
48+
compatible = "maxim,max14526-muic";
49+
reg = <0x44>;
50+
51+
maxim,ap-usb;
52+
53+
usif-gpios = <&gpio TEGRA_GPIO(Y, 3) GPIO_ACTIVE_HIGH>;
54+
dp2t-gpios = <&gpio TEGRA_GPIO(CC, 2) GPIO_ACTIVE_HIGH>;
55+
};
56+
};
57+
58+
pwr_i2c: i2c@7000d000 {
59+
status = "okay";
60+
clock-frequency = <400000>;
61+
62+
pmic: max77663@1c {
63+
compatible = "maxim,max77663";
64+
reg = <0x1c>;
65+
66+
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
67+
#interrupt-cells = <2>;
68+
interrupt-controller;
69+
70+
#gpio-cells = <2>;
71+
gpio-controller;
72+
73+
system-power-controller;
74+
75+
regulators {
76+
vdd_1v8_vio: sd2 {
77+
regulator-name = "vdd_1v8_gen";
78+
regulator-min-microvolt = <1800000>;
79+
regulator-max-microvolt = <1800000>;
80+
regulator-always-on;
81+
regulator-boot-on;
82+
};
83+
84+
vdd_usd: ldo3 {
85+
regulator-name = "vdd_sdmmc3";
86+
regulator-min-microvolt = <3000000>;
87+
regulator-max-microvolt = <3000000>;
88+
regulator-always-on;
89+
regulator-boot-on;
90+
};
91+
92+
vcore_emmc: ldo5 {
93+
regulator-name = "vdd_ddr_rx";
94+
regulator-min-microvolt = <2850000>;
95+
regulator-max-microvolt = <2850000>;
96+
regulator-always-on;
97+
regulator-boot-on;
98+
};
99+
};
100+
};
101+
};
102+
103+
dsi_spi: spi@7000dc00 {
104+
status = "okay";
105+
spi-max-frequency = <25000000>;
106+
107+
spi_bus: bridge-spi@2 {
108+
compatible = "lge,bridge-spi";
109+
reg = <2>;
110+
111+
spi-cpol;
112+
spi-cpha;
113+
114+
spi-max-frequency = <1000000>;
115+
};
116+
};
117+
118+
sdmmc4: sdhci@78000600 {
119+
status = "okay";
120+
bus-width = <8>;
121+
non-removable;
122+
123+
vmmc-supply = <&vcore_emmc>;
124+
vqmmc-supply = <&vdd_1v8_vio>;
125+
};
126+
127+
micro_usb: usb@7d000000 {
128+
status = "okay";
129+
dr_mode = "otg";
130+
};
131+
132+
clocks {
133+
compatible = "simple-bus";
134+
#address-cells = <1>;
135+
#size-cells = <0>;
136+
137+
clk32k_in: clock@0 {
138+
compatible = "fixed-clock";
139+
reg = <0>;
140+
#clock-cells = <0>;
141+
clock-frequency = <32768>;
142+
};
143+
};
144+
145+
gpio-keyboard {
146+
compatible = "gpio-kbd";
147+
148+
key-power {
149+
label = "Power";
150+
gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
151+
linux,code = <KEY_ENTER>;
152+
};
153+
154+
key-volume-down {
155+
label = "Volume Down";
156+
gpios = <&gpio TEGRA_GPIO(O, 4) GPIO_ACTIVE_LOW>;
157+
linux,code = <KEY_DOWN>;
158+
};
159+
};
160+
161+
bridge: bridge {
162+
compatible = "solomon,ssd2825";
163+
164+
enable-gpios = <&gpio TEGRA_GPIO(B, 1) GPIO_ACTIVE_HIGH>;
165+
reset-gpios = <&gpio TEGRA_GPIO(O, 2) GPIO_ACTIVE_HIGH>;
166+
167+
panel = <&panel>;
168+
};
169+
};

arch/arm/mach-tegra/tegra30/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ config TARGET_TRANSFORMER_T30
2828
bool "Asus Tegra30 Transformer board"
2929
select BOARD_LATE_INIT
3030

31+
config TARGET_X3_T30
32+
bool "LG X3 Tegra30 board"
33+
select BOARD_LATE_INIT
34+
3135
endchoice
3236

3337
config SYS_SOC
@@ -39,5 +43,6 @@ source "board/nvidia/beaver/Kconfig"
3943
source "board/nvidia/cardhu/Kconfig"
4044
source "board/toradex/colibri_t30/Kconfig"
4145
source "board/avionic-design/tec-ng/Kconfig"
46+
source "board/lg/x3-t30/Kconfig"
4247

4348
endif

board/lg/x3-t30/Kconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
if TARGET_X3_T30
2+
3+
config SYS_BOARD
4+
default "x3-t30"
5+
6+
config SYS_VENDOR
7+
default "lg"
8+
9+
config SYS_CONFIG_NAME
10+
default "x3-t30"
11+
12+
config DEVICE_P880
13+
bool "Enable support for LG Optimus 4X HD"
14+
default n
15+
help
16+
LG Optimus 4X HD derives from x3 board but has slight
17+
differences.
18+
19+
config DEVICE_P895
20+
bool "Enable support for LG Optimus Vu"
21+
default n
22+
help
23+
LG Optimus Vu derives from x3 board but has slight
24+
differences.
25+
26+
endif

board/lg/x3-t30/MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
X3 BOARD
2+
M: Svyatoslav Ryhel <clamor95@gmail.com>
3+
S: Maintained
4+
F: board/lg/x3-t30/
5+
F: include/configs/x3-t30.h
6+
F: configs/x3_t30_defconfig

board/lg/x3-t30/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
#
3+
# (C) Copyright 2010-2012
4+
# NVIDIA Corporation <www.nvidia.com>
5+
#
6+
# (C) Copyright 2021
7+
# Svyatoslav Ryhel <clamor95@gmail.com>
8+
9+
obj-$(CONFIG_SPL_BUILD) += x3-t30-spl.o
10+
11+
obj-y += x3-t30.o x3-late.o

0 commit comments

Comments
 (0)