Skip to contentSkip to conversation

Tegra 2: add support for LG Optimus 2X P990

PATCH New Svyatoslav Ryhel 1 participant 10 messages Apr 14, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover Tegra 2: add support for LG Optimus 2X P990

Add support for LG Optimus 2X P990 Tegra 2 device along with drivers for PMIC complex, panels, video bridge and backlight led-controller found on this device.

Svyatoslav Ryhel (9):
gpio: tegra_gpio: implement rfree operation
power: pmic: add the base MAX8907 PMIC support
power: regulator: max9807: add regulator support
sysreset: implement MAX9807 sysreset functions
video: tegra: add 8-bit CPU driven protocol
video: panel: add Hitachi TX10D07VM0BAA MIPI DSI panel driver
video: panel: add LG LH400WV3-SD04 MIPI DSI panel driver
video: backlight: add Skyworks/Analogictech AAT2870 led controller
driver
board: lg: star: add Optimus 2X P990 support

 arch/arm/dts/Makefile                       |   1 +
 arch/arm/dts/tegra20-lg-star.dts            | 538 ++++++++++++++++++++
 arch/arm/include/asm/arch-tegra/dc.h        |  48 ++
 arch/arm/mach-tegra/tegra20/Kconfig         |   5 +
 board/lg/star/Kconfig                       |  16 +
 board/lg/star/MAINTAINERS                   |   7 +
 board/lg/star/Makefile                      |   9 +
 board/lg/star/star.c                        |  50 ++
 board/lg/star/star.env                      |  15 +
 configs/star_defconfig                      |  93 ++++
 doc/board/lg/index.rst                      |   1 +
 doc/board/lg/star.rst                       | 125 +++++
 drivers/gpio/tegra_gpio.c                   |  11 +
 drivers/power/pmic/Kconfig                  |   9 +
 drivers/power/pmic/Makefile                 |   1 +
 drivers/power/pmic/max8907.c                |  94 ++++
 drivers/power/regulator/Kconfig             |   9 +
 drivers/power/regulator/Makefile            |   1 +
 drivers/power/regulator/max8907_regulator.c | 249 +++++++++
 drivers/sysreset/Kconfig                    |   7 +
 drivers/sysreset/Makefile                   |   1 +
 drivers/sysreset/sysreset_max8907.c         |  37 ++
 drivers/video/Kconfig                       |  26 +
 drivers/video/Makefile                      |   3 +
 drivers/video/aat2870_backlight.c           | 132 +++++
 drivers/video/hitachi-tx10d07vm0baa.c       | 304 +++++++++++
 drivers/video/lg-lh400wv3-sd04.c            | 230 +++++++++
 drivers/video/tegra/Kconfig                 |  10 +
 drivers/video/tegra/Makefile                |   1 +
 drivers/video/tegra/cpu-bridge.c            | 325 ++++++++++++
 include/power/max8907.h                     |  77 +++
 31 files changed, 2435 insertions(+)
 create mode 100644 arch/arm/dts/tegra20-lg-star.dts
 create mode 100644 board/lg/star/Kconfig
 create mode 100644 board/lg/star/MAINTAINERS
 create mode 100644 board/lg/star/Makefile
 create mode 100644 board/lg/star/star.c
 create mode 100644 board/lg/star/star.env
 create mode 100644 configs/star_defconfig
 create mode 100644 doc/board/lg/star.rst
 create mode 100644 drivers/power/pmic/max8907.c
 create mode 100644 drivers/power/regulator/max8907_regulator.c
 create mode 100644 drivers/sysreset/sysreset_max8907.c
 create mode 100644 drivers/video/aat2870_backlight.c
 create mode 100644 drivers/video/hitachi-tx10d07vm0baa.c
 create mode 100644 drivers/video/lg-lh400wv3-sd04.c
 create mode 100644 drivers/video/tegra/cpu-bridge.c
 create mode 100644 include/power/max8907.h
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/9 gpio: tegra_gpio: implement rfree operation

Releasing a GPIO on Tegra necessitates changing its configuration to SFIO to activate its special function. Without this reconfiguration, the special function will be unavailable.

---
 drivers/gpio/tegra_gpio.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpio/tegra_gpio.c +11 -0
index b83df351e74..3d1e18854f2 100644
@@ -248,6 +248,16 @@ static int tegra_gpio_xlate(struct udevice *dev, struct gpio_desc *desc,
 	return 0;
 }
 
+static int tegra_gpio_rfree(struct udevice *dev, unsigned int offset)
+{
+	struct tegra_port_info *state = dev_get_priv(dev);
+
+	/* Set the pin as a SFIO */
+	set_config(state->base_gpio + offset, CFG_SFIO);
+
+	return 0;
+}
+
 static const struct dm_gpio_ops gpio_tegra_ops = {
 	.direction_input	= tegra_gpio_direction_input,
 	.direction_output	= tegra_gpio_direction_output,
@@ -255,6 +265,7 @@ static const struct dm_gpio_ops gpio_tegra_ops = {
 	.set_value		= tegra_gpio_set_value,
 	.get_function		= tegra_gpio_get_function,
 	.xlate			= tegra_gpio_xlate,
+	.rfree			= tegra_gpio_rfree,
 };
 
 /*
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/9 power: pmic: add the base MAX8907 PMIC support

In reply to Svyatoslav Ryhel

Add basic i2c based read/write functions to access PMIC registers.

---
 drivers/power/pmic/Kconfig   |  9 ++++++
 drivers/power/pmic/Makefile  |  1 +
 drivers/power/pmic/max8907.c | 53 ++++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+)
 create mode 100644 drivers/power/pmic/max8907.c
drivers/power/pmic/Kconfig +9 -0
index 5a61cd45b8c..ec7ccc3a63f 100644
@@ -184,6 +184,15 @@ config SPL_DM_PMIC_PFUZE100
 	This config enables implementation of driver-model pmic uclass features
 	for PMIC PFUZE100 in SPL. The driver implements read/write operations.
 
+config DM_PMIC_MAX8907
+	bool "Enable Driver Model for PMIC MAX8907"
+	---help---
+	This config enables implementation of driver-model pmic uclass features
+	for PMIC MAX8907. The driver implements read/write operations.
+	This is a Power Management IC with a decent set of peripherals from which
+	3 DC-to-DC Step-Down (SD) Regulators, 20 Low-Dropout Linear (LDO) Regulators,
+	Real-Time Clock (RTC) and more with I2C Compatible Interface.
+
 config DM_PMIC_MAX77663
 	bool "Enable Driver Model for PMIC MAX77663"
 	---help---
drivers/power/pmic/Makefile +1 -0
index 2210b1a64ae..6bebffb05a6 100644
@@ -7,6 +7,7 @@ obj-$(CONFIG_$(PHASE_)DM_PMIC) += pmic-uclass.o
 obj-$(CONFIG_$(PHASE_)DM_PMIC_FAN53555) += fan53555.o
 obj-$(CONFIG_$(PHASE_)DM_PMIC_DA9063) += da9063.o
 obj-$(CONFIG_$(PHASE_)DM_PMIC_MAX77663) += max77663.o
+obj-$(CONFIG_$(PHASE_)DM_PMIC_MAX8907) += max8907.o
 obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o
 obj-$(CONFIG_DM_PMIC_MAX8998) += max8998.o
 obj-$(CONFIG_DM_PMIC_MC34708) += mc34708.o
drivers/power/pmic/max8907.c new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/9 power: regulator: max9807: add regulator support

In reply to Svyatoslav Ryhel

Added a new regulator driver for the MAXIM MAX8907 PMIC, providing essential regulator functionalities and incorporated the necessary binding framework within the core PMIC driver.

---
 drivers/power/pmic/max8907.c                |  29 +++
 drivers/power/regulator/Kconfig             |   9 +
 drivers/power/regulator/Makefile            |   1 +
 drivers/power/regulator/max8907_regulator.c | 249 ++++++++++++++++++++
 include/power/max8907.h                     |  73 ++++++
 5 files changed, 361 insertions(+)
 create mode 100644 drivers/power/regulator/max8907_regulator.c
 create mode 100644 include/power/max8907.h
drivers/power/pmic/max8907.c +29 -0
index aeb6fe734e6..5d35957bf40 100644
@@ -6,6 +6,13 @@
 #include <dm.h>
 #include <dm/lists.h>
 #include <power/pmic.h>
+#include <power/max8907.h>
+
+static const struct pmic_child_info pmic_children_info[] = {
+	{ .prefix = "ldo", .driver = MAX8907_LDO_DRIVER },
+	{ .prefix = "sd", .driver = MAX8907_SD_DRIVER },
+	{ },
+};
 
 static int max8907_write(struct udevice *dev, uint reg, const uint8_t *buff, int len)
 {
@@ -35,6 +42,27 @@ static int max8907_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
 	return 0;
 }
 
+static int max8907_bind(struct udevice *dev)
+{
+	ofnode regulators_node;
+	int children;
+
+	regulators_node = dev_read_subnode(dev, "regulators");
+	if (!ofnode_valid(regulators_node)) {
+		log_err("%s regulators subnode not found!\n", dev->name);
+		return -ENXIO;
+	}
+
+	log_debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
+
+	children = pmic_bind_children(dev, regulators_node, pmic_children_info);
+	if (!children)
+		log_err("%s - no child found\n", dev->name);
+
+	/* Always return success for this device */
+	return 0;
+}
+
 static struct dm_pmic_ops max8907_ops = {
 	.read = max8907_read,
 	.write = max8907_write,
@@ -49,5 +77,6 @@ U_BOOT_DRIVER(pmic_max8907) = {
 	.name = "max8907_pmic",
 	.id = UCLASS_PMIC,
 	.of_match = max8907_ids,
+	.bind = max8907_bind,
 	.ops = &max8907_ops,
 };
drivers/power/regulator/Kconfig +9 -0
index bec2d2d7d49..8d971ed708a 100644
@@ -141,6 +141,15 @@ config SPL_REGULATOR_PWM
 	  This config enables implementation of driver-model regulator uclass
 	  features for PWM regulators in SPL.
 
+config DM_REGULATOR_MAX8907
+	bool "Enable Driver Model for REGULATOR MAX8907"
+	depends on DM_REGULATOR && DM_PMIC_MAX8907
+	---help---
+	This config enables implementation of driver-model regulator uclass
+	features for REGULATOR MAX8907. The driver supports both DC-to-DC
+	Step-Down (SD) Regulators and Low-Dropout Linear (LDO) Regulators
+	found in MAX8907 PMIC and implements get/set api for value and enable.
+
 config DM_REGULATOR_MAX77663
 	bool "Enable Driver Model for REGULATOR MAX77663"
 	depends on DM_REGULATOR && DM_PMIC_MAX77663
drivers/power/regulator/Makefile +1 -0
index 99affa235f3..c8d17a7ed1e 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_$(PHASE_)REGULATOR_AXP) += axp_regulator.o
 obj-$(CONFIG_$(PHASE_)REGULATOR_AXP_USB_POWER) += axp_usb_power.o
 obj-$(CONFIG_$(PHASE_)DM_REGULATOR_DA9063) += da9063.o
 obj-$(CONFIG_$(PHASE_)DM_REGULATOR_MAX77663) += max77663_regulator.o
+obj-$(CONFIG_$(PHASE_)DM_REGULATOR_MAX8907) += max8907_regulator.o
 obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o
 obj-$(CONFIG_DM_REGULATOR_NPCM8XX) += npcm8xx_regulator.o
 obj-$(CONFIG_$(PHASE_)DM_PMIC_PFUZE100) += pfuze100.o
drivers/power/regulator/max8907_regulator.c new file +249 -0

249 lines not on this page · raw message

include/power/max8907.h new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/9 sysreset: implement MAX9807 sysreset functions

In reply to Svyatoslav Ryhel

MAX8907 PMIC has embedded poweroff function used by some device to initiane device power off. Implement it as optional sysreset driver guarded by kconfig option and system-power-controller device tree property.

---
 drivers/power/pmic/max8907.c        | 14 ++++++++++-
 drivers/sysreset/Kconfig            |  7 ++++++
 drivers/sysreset/Makefile           |  1 +
 drivers/sysreset/sysreset_max8907.c | 37 +++++++++++++++++++++++++++++
 include/power/max8907.h             |  4 ++++
 5 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 drivers/sysreset/sysreset_max8907.c
drivers/power/pmic/max8907.c +13 -1
index 5d35957bf40..a7ef70177de 100644
@@ -45,7 +45,19 @@ static int max8907_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
 static int max8907_bind(struct udevice *dev)
 {
 	ofnode regulators_node;
-	int children;
+	int children, ret;
+
+	if (IS_ENABLED(CONFIG_SYSRESET_MAX8907) &&
+	    dev_read_bool(dev, "maxim,system-power-controller")) {
+		ret = device_bind_driver_to_node(dev, MAX8907_RST_DRIVER,
+						 "sysreset", dev_ofnode(dev),
+						 NULL);
+		if (ret) {
+			log_debug("%s: cannot bind SYSRESET (ret = %d)\n",
+				  __func__, ret);
+			return ret;
+		}
+	}
 
 	regulators_node = dev_read_subnode(dev, "regulators");
 	if (!ofnode_valid(regulators_node)) {
drivers/sysreset/Kconfig +7 -0
index 4972905482a..aa83073c96a 100644
@@ -131,6 +131,13 @@ config SYSRESET_MAX77663
 	help
 	  Enable system power management functions found in MAX77663 PMIC.
 
+config SYSRESET_MAX8907
+	bool "Enable support for MAX8907 PMIC System Reset"
+	depends on DM_PMIC_MAX8907
+	select SYSRESET_CMD_POWEROFF if CMD_POWEROFF
+	help
+	  Enable system power management functions found in MAX8907 PMIC.
+
 config SYSRESET_MICROBLAZE
 	bool "Enable support for Microblaze soft reset"
 	depends on MICROBLAZE
drivers/sysreset/Makefile +1 -0
index ded91a4d325..f5c78b25896 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_SYSRESET_CV1800B) += sysreset_cv1800b.o
 obj-$(CONFIG_$(PHASE_)POWEROFF_GPIO) += poweroff_gpio.o
 obj-$(CONFIG_$(PHASE_)SYSRESET_GPIO) += sysreset_gpio.o
 obj-$(CONFIG_$(PHASE_)SYSRESET_MAX77663) += sysreset_max77663.o
+obj-$(CONFIG_$(PHASE_)SYSRESET_MAX8907) += sysreset_max8907.o
 obj-$(CONFIG_SYSRESET_MPC83XX) += sysreset_mpc83xx.o
 obj-$(CONFIG_SYSRESET_MICROBLAZE) += sysreset_microblaze.o
 obj-$(CONFIG_SYSRESET_OCTEON) += sysreset_octeon.o
drivers/sysreset/sysreset_max8907.c new file +37 -0
new file mode 100644
index 00000000000..6f62af9bffe
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ *  Copyright(C) 2024 Svyatoslav Ryhel <[email protected]>
+ */
+
+#include <dm.h>
+#include <i2c.h>
+#include <errno.h>
+#include <sysreset.h>
+#include <power/pmic.h>
+#include <power/max8907.h>
+
+static int max8907_sysreset_request(struct udevice *dev, enum sysreset_t type)
+{
+	switch (type) {
+	case SYSRESET_POWER:
+	case SYSRESET_POWER_OFF:
+		/* MAX8907: PWR_OFF > RESET_CNFG */
+		pmic_clrsetbits(dev->parent, MAX8907_REG_RESET_CNFG,
+				MASK_POWER_OFF, MASK_POWER_OFF);
+		break;
+	default:
+		return -EPROTONOSUPPORT;
+	}
+
+	return -EINPROGRESS;
+}
+
+static struct sysreset_ops max8907_sysreset = {
+	.request = max8907_sysreset_request,
+};
+
+U_BOOT_DRIVER(sysreset_max8907) = {
+	.id	= UCLASS_SYSRESET,
+	.name	= MAX8907_RST_DRIVER,
+	.ops	= &max8907_sysreset,
+};
include/power/max8907.h +4 -0
index a19b25f44c0..a6e558e582c 100644
@@ -12,6 +12,7 @@
 /* Drivers name */
 #define MAX8907_LDO_DRIVER		"max8907_ldo"
 #define MAX8907_SD_DRIVER		"max8907_sd"
+#define MAX8907_RST_DRIVER		"max8907_rst"
 
 /* MAX8907 register map */
 #define MAX8907_REG_SDCTL1		0x04
@@ -39,6 +40,9 @@
 #define MAX8907_REG_LDOCTL18		0x72
 #define MAX8907_REG_LDOCTL20		0x9C
 
+#define MAX8907_REG_RESET_CNFG		0x0F
+#define   MASK_POWER_OFF		BIT(6)
+
 /* MAX8907 configuration values */
 #define MAX8907_CTL			0
 #define MAX8907_SEQCNT			1
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/9 video: tegra: add 8-bit CPU driven protocol

In reply to Svyatoslav Ryhel

Add support for 8-bit CPU driven (primary and secondary) display signal interface found in Tegra 2 and Tegra 3 SoC.

---
 arch/arm/include/asm/arch-tegra/dc.h |  48 ++++
 drivers/video/tegra/Kconfig          |  10 +
 drivers/video/tegra/Makefile         |   1 +
 drivers/video/tegra/cpu-bridge.c     | 325 +++++++++++++++++++++++++++
 4 files changed, 384 insertions(+)
 create mode 100644 drivers/video/tegra/cpu-bridge.c
arch/arm/include/asm/arch-tegra/dc.h +48 -0
index 2fd07403bdf..ab12cc9c7d0 100644
@@ -448,10 +448,19 @@ enum win_color_depth_id {
 #define LVS_OUTPUT_POLARITY_LOW		BIT(28)
 #define LSC0_OUTPUT_POLARITY_LOW	BIT(24)
 
+/* DC_COM_PIN_OUTPUT_SELECT6 0x31a */
+#define LDC_OUTPUT_SELECT_V_PULSE1	BIT(14) /* 100b */
+
 /* DC_DISP_DISP_SIGNAL_OPTIONS0 0x400 */
 #define H_PULSE0_ENABLE		BIT(8)
 #define H_PULSE1_ENABLE		BIT(10)
 #define H_PULSE2_ENABLE		BIT(12)
+#define V_PULSE0_ENABLE		BIT(16)
+#define V_PULSE1_ENABLE		BIT(18)
+#define V_PULSE2_ENABLE		BIT(19)
+#define V_PULSE3_ENABLE		BIT(20)
+#define M0_ENABLE		BIT(24)
+#define M1_ENABLE		BIT(26)
 
 /* DC_DISP_DISP_WIN_OPTIONS 0x402 */
 #define	CURSOR_ENABLE		BIT(16)
@@ -525,6 +534,28 @@ enum {
 	BASE_COLOR_SIZE_888,
 };
 
+/* DC_DISP_SHIFT_CLOCK_OPTIONS 0x431 */
+#define SC0_H_QUALIFIER_SHIFT	0
+#define SC1_H_QUALIFIER_SHIFT	16
+enum {
+	SC_H_QUALIFIER_DISABLE,
+	SC_H_QUALIFIER_NONE,
+	SC_H_QUALIFIER_HACTIVE,
+	SC_H_QUALIFIER_EXT_HACTIVE,
+	SC_H_QUALIFIER_HPULSE,
+	SC_H_QUALIFIER_EXT_HPULSE,
+};
+#define SC0_V_QUALIFIER_SHIFT	3
+#define SC1_V_QUALIFIER_SHIFT	19
+enum {
+	SC_V_QUALIFIER_NONE,
+	SC_V_QUALIFIER_RSVD,
+	SC_V_QUALIFIER_VACTIVE,
+	SC_V_QUALIFIER_EXT_VACTIVE,
+	SC_V_QUALIFIER_VPULSE,
+	SC_V_QUALIFIER_EXT_VPULSE,
+};
+
 /* DC_DISP_DATA_ENABLE_OPTIONS 0x432 */
 #define DE_SELECT_SHIFT		0
 #define DE_SELECT_MASK		(0x3 << DE_SELECT_SHIFT)
@@ -541,6 +572,23 @@ enum {
 	DE_CONTROL_ACTIVE_BLANK,
 };
 
+/* DC_DISP_INIT_SEQ_CONTROL 0x442 */
+#define SEND_INIT_SEQUENCE		BIT(0)
+#define INIT_SEQUENCE_MODE_SPI		BIT(1)
+#define INIT_SEQUENCE_MODE_PLCD		0x0
+#define INIT_SEQ_DC_SIGNAL_SHIFT	4
+#define INIT_SEQ_DC_SIGNAL_MASK		(0x7 << INIT_SEQ_DC_SIGNAL_SHIFT)
+enum {
+	NO_DC_SIGNAL,
+	DC_SIGNAL_VSYNC,
+	DC_SIGNAL_VPULSE0,
+	DC_SIGNAL_VPULSE1,
+	DC_SIGNAL_VPULSE2,
+	DC_SIGNAL_VPULSE3,
+};
+#define INIT_SEQ_DC_CONTROL_SHIFT	7
+#define FRAME_INIT_SEQ_CYCLES_SHIFT	8
+
 /* DC_WIN_WIN_OPTIONS 0x700 */
 #define H_DIRECTION		BIT(0)
 enum {
drivers/video/tegra/Kconfig +10 -0
index d3b8dbb2826..88607e0498b 100644
@@ -42,6 +42,16 @@ config TEGRA_BACKLIGHT_PWM
 	   Enable support for the Display Controller dependent PWM backlight
 	   found in the Tegra SoC and usually used with DSI panels.
 
+config TEGRA_8BIT_CPU_BRIDGE
+	bool "Enable 8 bit panel communication protocol for Tegra 20/30"
+	depends on VIDEO_BRIDGE && DM_GPIO
+	select VIDEO_TEGRA
+	select VIDEO_MIPI_DSI
+	help
+	   Tegra 20 and Tegra 30 feature 8 bit CPU driver panel control
+	   protocol. This option allows use it as a MIPI DSI bridge to
+	   set up and control compatible panel.
+
 config VIDEO_TEGRA124
 	bool "Enable video support on Tegra124"
 	help
drivers/video/tegra/Makefile +1 -0
index 3c50a0ba3c3..4995c93a8af 100644
@@ -5,5 +5,6 @@ obj-$(CONFIG_VIDEO_TEGRA) += dc.o
 obj-$(CONFIG_VIDEO_DSI_TEGRA) += dsi.o mipi.o mipi-phy.o
 obj-$(CONFIG_VIDEO_HDMI_TEGRA) += hdmi.o
 obj-$(CONFIG_TEGRA_BACKLIGHT_PWM) += dc-pwm-backlight.o
+obj-$(CONFIG_TEGRA_8BIT_CPU_BRIDGE) += cpu-bridge.o
 
 obj-${CONFIG_VIDEO_TEGRA124} += tegra124/
drivers/video/tegra/cpu-bridge.c new file +325 -0

325 lines not on this page · raw message

Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/9 video: panel: add Hitachi TX10D07VM0BAA MIPI DSI panel driver

In reply to Svyatoslav Ryhel

Hitachi TX10D07VM0BAA is a color active matrix TFT (Thin Film Transistor) liquid crystal display (LCD). The resolution of a 4" contains 480 x 800 pixels.

---
 drivers/video/Kconfig                 |   8 +
 drivers/video/Makefile                |   1 +
 drivers/video/hitachi-tx10d07vm0baa.c | 304 ++++++++++++++++++++++++++
 3 files changed, 313 insertions(+)
 create mode 100644 drivers/video/hitachi-tx10d07vm0baa.c
drivers/video/Kconfig +8 -0
index 73353944971..c2f6a72af42 100644
@@ -641,6 +641,14 @@ config VIDEO_LCD_TDO_TL070WSH30
 	Say Y here if you want to enable support for TDO TL070WSH30
 	1024x600 DSI video mode panel.
 
+config VIDEO_LCD_HITACHI_TX10D07VM0BAA
+	tristate "Hitachi TX10D07VM0BAA 480x800 MIPI DSI video mode panel"
+	depends on PANEL && BACKLIGHT
+	select VIDEO_MIPI_DSI
+	help
+	  Say Y here if you want to enable support for Hitachi TX10D07VM0BAA
+	  TFT-LCD module. The panel has a 480x800 resolution.
+
 config VIDEO_LCD_HITACHI_TX18D42VM
 	bool "Hitachi tx18d42vm LVDS LCD panel support"
 	---help---
drivers/video/Makefile +1 -0
index fbdb058647a..914ae885b70 100644
@@ -58,6 +58,7 @@ obj-$(CONFIG_VIDEO_IVYBRIDGE_IGD) += ivybridge_igd.o
 obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o
 obj-$(CONFIG_VIDEO_LCD_ENDEAVORU) += endeavoru-panel.o
 obj-$(CONFIG_VIDEO_LCD_HIMAX_HX8394) += himax-hx8394.o
+obj-$(CONFIG_VIDEO_LCD_HITACHI_TX10D07VM0BAA) += hitachi-tx10d07vm0baa.o
 obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o
 obj-$(CONFIG_VIDEO_LCD_LG_LD070WX3) += lg-ld070wx3.o
 obj-$(CONFIG_VIDEO_LCD_MOT) += mot-panel.o
drivers/video/hitachi-tx10d07vm0baa.c new file +304 -0

304 lines not on this page · raw message

Signature · 1 line
2.43.0
#7 lore raw

PATCH 7/9 video: panel: add LG LH400WV3-SD04 MIPI DSI panel driver

In reply to Svyatoslav Ryhel

LG LH400WV3-SD04 is a color active matrix TFT (Thin Film Transistor) liquid crystal display (LCD). The resolution of a 4" contains 480 x 800 pixels.

---
 drivers/video/Kconfig            |   8 ++
 drivers/video/Makefile           |   1 +
 drivers/video/lg-lh400wv3-sd04.c | 230 +++++++++++++++++++++++++++++++
 3 files changed, 239 insertions(+)
 create mode 100644 drivers/video/lg-lh400wv3-sd04.c
drivers/video/Kconfig +8 -0
index c2f6a72af42..3551aefae89 100644
@@ -554,6 +554,14 @@ config VIDEO_LCD_LG_LD070WX3
 	  Say Y here if you want to enable support for LG LD070WX3
 	  800x1280 DSI video mode panel.
 
+config VIDEO_LCD_LG_LH400WV3
+	bool "LH400WV3-SD04 DSI LCD panel support"
+	depends on PANEL && BACKLIGHT
+	select VIDEO_MIPI_DSI
+	help
+	  Say Y here if you want to enable support for LG LH400WV3
+	  480x800 DSI video mode panel.
+
 config VIDEO_LCD_RAYDIUM_RM68200
 	bool "RM68200 DSI LCD panel support"
 	select VIDEO_MIPI_DSI
drivers/video/Makefile +1 -0
index 914ae885b70..ccd791cac59 100644
@@ -61,6 +61,7 @@ obj-$(CONFIG_VIDEO_LCD_HIMAX_HX8394) += himax-hx8394.o
 obj-$(CONFIG_VIDEO_LCD_HITACHI_TX10D07VM0BAA) += hitachi-tx10d07vm0baa.o
 obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o
 obj-$(CONFIG_VIDEO_LCD_LG_LD070WX3) += lg-ld070wx3.o
+obj-$(CONFIG_VIDEO_LCD_LG_LH400WV3) += lg-lh400wv3-sd04.o
 obj-$(CONFIG_VIDEO_LCD_MOT) += mot-panel.o
 obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o
 obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o
drivers/video/lg-lh400wv3-sd04.c new file +230 -0

230 lines not on this page · raw message

Signature · 1 line
2.43.0
#8 lore raw

PATCH 8/9 video: backlight: add Skyworks/Analogictech AAT2870 led controller driver

In reply to Svyatoslav Ryhel

Add support for Skyworks AAT2870 LED Backlight Driver and Multiple LDO Lighting Management Unit. Only backlight is supported as for now. Supported backlight level range is from 2 to 255 with step of 1.

---
 drivers/video/Kconfig             |  10 +++
 drivers/video/Makefile            |   1 +
 drivers/video/aat2870_backlight.c | 132 ++++++++++++++++++++++++++++++
 3 files changed, 143 insertions(+)
 create mode 100644 drivers/video/aat2870_backlight.c
drivers/video/Kconfig +10 -0
index 3551aefae89..d855883fad9 100644
@@ -754,6 +754,16 @@ config ATMEL_HLCD
 	help
 	   HLCDC supports video output to an attached LCD panel.
 
+config BACKLIGHT_AAT2870
+	bool "Backlight Driver for AAT2870"
+	depends on BACKLIGHT
+	select DM_I2C
+	help
+	  Say Y to enable the backlight driver for Skyworks AAT2870 LED
+	  Backlight Driver and Multiple LDO Lighting Management Unit.
+	  Only backlight is supported as for now. Supported backlight
+	  level range is from 2 to 255 with step of 1.
+
 config BACKLIGHT_LM3532
 	bool "Backlight Driver for LM3532"
 	depends on BACKLIGHT
drivers/video/Makefile +1 -0
index ccd791cac59..a1bf92d9099 100644
@@ -29,6 +29,7 @@ obj-$(CONFIG_$(PHASE_)BMP) += bmp.o
 
 endif
 
+obj-$(CONFIG_BACKLIGHT_AAT2870) += aat2870_backlight.o
 obj-$(CONFIG_BACKLIGHT_LM3532) += lm3532_backlight.o
 obj-$(CONFIG_BACKLIGHT_LM3533) += lm3533_backlight.o
 obj-$(CONFIG_BACKLIGHT_LP855x) += lp855x_backlight.o
drivers/video/aat2870_backlight.c new file +132 -0

132 lines not on this page · raw message

Signature · 1 line
2.43.0
#9 lore raw

PATCH 9/9 board: lg: star: add Optimus 2X P990 support

In reply to Svyatoslav Ryhel

The LG Optimus 2X is a touchscreen-based, slate-sized smartphone designed and manufactured by LG that runs the Android operating system. The Optimus 2X features a 4" WVGA display, an Nvidia Tegra 2 dual-core chip, 512 MB of RAM and extendable 8 GB of internal storage. UART-B is default debug port.

---
 arch/arm/dts/Makefile               |   1 +
 arch/arm/dts/tegra20-lg-star.dts    | 538 ++++++++++++++++++++++++++++
 arch/arm/mach-tegra/tegra20/Kconfig |   5 +
 board/lg/star/Kconfig               |  16 +
 board/lg/star/MAINTAINERS           |   7 +
 board/lg/star/Makefile              |   9 +
 board/lg/star/star.c                |  50 +++
 board/lg/star/star.env              |  15 +
 configs/star_defconfig              |  93 +++++
 doc/board/lg/index.rst              |   1 +
 doc/board/lg/star.rst               | 125 +++++++
 11 files changed, 860 insertions(+)
 create mode 100644 arch/arm/dts/tegra20-lg-star.dts
 create mode 100644 board/lg/star/Kconfig
 create mode 100644 board/lg/star/MAINTAINERS
 create mode 100644 board/lg/star/Makefile
 create mode 100644 board/lg/star/star.c
 create mode 100644 board/lg/star/star.env
 create mode 100644 configs/star_defconfig
 create mode 100644 doc/board/lg/star.rst
arch/arm/dts/Makefile +1 -0
index 57d3dd98ffb..d46893c772c 100644
@@ -86,6 +86,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
 	tegra20-asus-tf101.dtb \
 	tegra20-asus-tf101g.dtb \
 	tegra20-harmony.dtb \
+	tegra20-lg-star.dtb \
 	tegra20-medcom-wide.dtb \
 	tegra20-motorola-daytona.dtb \
 	tegra20-motorola-olympus.dtb \
arch/arm/dts/tegra20-lg-star.dts new file +538 -0

538 lines not on this page · raw message

arch/arm/mach-tegra/tegra20/Kconfig +5 -0
index a79fdc25650..bedbedade7b 100644
@@ -54,6 +54,10 @@ config TARGET_SEABOARD
 	select TEGRA_LP0
 	select TEGRA_PMU
 
+config TARGET_STAR
+	bool "LG Tegra20 Star board"
+	select BOARD_LATE_INIT
+
 config TARGET_TEC
 	bool "Avionic Design Tamonten Evaluation Carrier"
 	select BOARD_LATE_INIT
@@ -88,6 +92,7 @@ source "board/compal/paz00/Kconfig"
 source "board/acer/picasso/Kconfig"
 source "board/avionic-design/plutux/Kconfig"
 source "board/nvidia/seaboard/Kconfig"
+source "board/lg/star/Kconfig"
 source "board/avionic-design/tec/Kconfig"
 source "board/asus/transformer-t20/Kconfig"
 source "board/compulab/trimslice/Kconfig"
board/lg/star/Kconfig new file +16 -0
new file mode 100644
index 00000000000..58523121750
@@ -0,0 +1,16 @@
+if TARGET_STAR
+
+config SYS_BOARD
+	default "star"
+
+config SYS_VENDOR
+	default "lg"
+
+config SYS_CONFIG_NAME
+	default "tegra"
+
+config TEGRA_BOARD_STRING
+	string "Default Tegra board name"
+	default "LG Star"
+
+endif
board/lg/star/MAINTAINERS new file +7 -0
new file mode 100644
index 00000000000..e2d6e904f02
@@ -0,0 +1,7 @@
+STAR BOARD
+M:	Svyatoslav Ryhel <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/tegra20-lg-star.dts
+F:	board/lg/star/
+F:	configs/star_defconfig
+F:	doc/board/lg/star.rst
board/lg/star/Makefile new file +9 -0
new file mode 100644
index 00000000000..3e6e9f4e41c
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+#  (C) Copyright 2010-2012
+#  NVIDIA Corporation <www.nvidia.com>
+#
+#  (C) Copyright 2024
+#  Svyatoslav Ryhel <[email protected]>
+
+obj-y += star.o
board/lg/star/star.c new file +50 -0

50 lines not on this page · raw message

board/lg/star/star.env new file +15 -0
new file mode 100644
index 00000000000..f2bf298a997
@@ -0,0 +1,15 @@
+#include <env/nvidia/prod_upd.env>
+
+button_cmd_0_name=Volume Down
+button_cmd_0=bootmenu
+partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}
+boot_dev=1
+
+bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu
+bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu
+bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu
+bootmenu_3=update bootloader=run flash_uboot
+bootmenu_4=reboot RCM=enterrcm
+bootmenu_5=reboot=reset
+bootmenu_6=power off=poweroff
+bootmenu_delay=-1
configs/star_defconfig new file +93 -0

93 lines not on this page · raw message

doc/board/lg/index.rst +1 -0
index 3af3681e0bb..2db0f2374ad 100644
@@ -6,4 +6,5 @@ LG
 .. toctree::
    :maxdepth: 2
 
+   star
    x3_t30
doc/board/lg/star.rst new file +125 -0

125 lines not on this page · raw message

Signature · 1 line
2.43.0