mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
99545b4bb1
This target adds support for the Allwinner D1 RISC-V based SoCs. - RISC-V single-core T-Head C906 (RV64GCV) - Tensilica HiFi4 DSP - DDR2/DDR3 support - 10/100/1000M ethernet - usual peripherals like USB2, SPI, I2C, PWM, etc. Four boards are supported: - Dongshan Nezha STU - 512Mb RAM - ethernet - LicheePi RV Dock - 512Mb RAM - wireless-only (RTL8723DS) - MangoPi MQ-Pro - 512Mb RAM - there are pads available for an SPI flash - wireless-only (RTL8723DS) - Nezha D1 - 512Mb/1Gb/2Gb RAM - 256Mb NAND flash - ethernet, wireless Installation: Standard SD-card installation via dd-ing the generated image to an SD-card of at least 256Mb. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
67 lines
1.8 KiB
Diff
67 lines
1.8 KiB
Diff
From 979271f803c1578087a965a2a4b845c87e7d922f Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Sun, 7 Aug 2022 19:14:21 -0500
|
|
Subject: [PATCH 108/117] drm: panel: cwd686: Add regulators
|
|
|
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
|
---
|
|
.../gpu/drm/panel/panel-clockwork-cwd686.c | 26 ++++++++++++++++++-
|
|
1 file changed, 25 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/panel/panel-clockwork-cwd686.c
|
|
+++ b/drivers/gpu/drm/panel/panel-clockwork-cwd686.c
|
|
@@ -20,7 +20,8 @@
|
|
struct cwd686 {
|
|
struct device *dev;
|
|
struct drm_panel panel;
|
|
- struct regulator *supply;
|
|
+ struct regulator *iovcc;
|
|
+ struct regulator *vci;
|
|
struct gpio_desc *enable_gpio;
|
|
struct gpio_desc *reset_gpio;
|
|
struct backlight_device *backlight;
|
|
@@ -279,6 +280,9 @@ static int cwd686_unprepare(struct drm_p
|
|
|
|
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
|
|
|
+ regulator_disable(ctx->vci);
|
|
+ regulator_disable(ctx->iovcc);
|
|
+
|
|
ctx->prepared = false;
|
|
|
|
return 0;
|
|
@@ -293,6 +297,18 @@ static int cwd686_prepare(struct drm_pan
|
|
if (ctx->prepared)
|
|
return 0;
|
|
|
|
+ err = regulator_enable(ctx->iovcc);
|
|
+ if (err) {
|
|
+ dev_err(ctx->dev, "failed to enable iovcc (%d)\n", err);
|
|
+ return err;
|
|
+ }
|
|
+
|
|
+ err = regulator_enable(ctx->vci);
|
|
+ if (err) {
|
|
+ dev_err(ctx->dev, "failed to enable vci (%d)\n", err);
|
|
+ return err;
|
|
+ }
|
|
+
|
|
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
|
/* T2 */
|
|
msleep(10);
|
|
@@ -402,6 +418,14 @@ static int cwd686_probe(struct mipi_dsi_
|
|
return err;
|
|
}
|
|
|
|
+ ctx->iovcc = devm_regulator_get(dev, "iovcc");
|
|
+ if (IS_ERR(ctx->iovcc))
|
|
+ return PTR_ERR(ctx->iovcc);
|
|
+
|
|
+ ctx->vci = devm_regulator_get(dev, "vci");
|
|
+ if (IS_ERR(ctx->vci))
|
|
+ return PTR_ERR(ctx->vci);
|
|
+
|
|
ctx->backlight = devm_of_find_backlight(dev);
|
|
if (IS_ERR(ctx->backlight))
|
|
return PTR_ERR(ctx->backlight);
|