linux-postmarketos-exynos5: use exynos5-mainline repo to get src (MR 3675)
Patches are merged in that repo, so we then no longer have to keep them in the pmaports repo. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
a85c880974
commit
a0678836a1
34 changed files with 5 additions and 2313 deletions
|
@ -1,34 +0,0 @@
|
|||
From 3ac942aa2d00ee837d2630794654e78e52d8b491 Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Wed, 10 Feb 2021 06:11:09 +0000
|
||||
Subject: [PATCH 01/33] ODROID-COMMON: gpu/drm: Add Hardkernel 3.2" LCD driver
|
||||
to ili9341 driver
|
||||
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
Change-Id: I890f0369126eda88ef16723efec828cd85d25b53
|
||||
---
|
||||
drivers/gpu/drm/tiny/ili9341.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/tiny/ili9341.c b/drivers/gpu/drm/tiny/ili9341.c
|
||||
index 5b8cc770ee7b..97f342c53f31 100644
|
||||
--- a/drivers/gpu/drm/tiny/ili9341.c
|
||||
+++ b/drivers/gpu/drm/tiny/ili9341.c
|
||||
@@ -162,12 +162,14 @@ static const struct drm_driver ili9341_driver = {
|
||||
|
||||
static const struct of_device_id ili9341_of_match[] = {
|
||||
{ .compatible = "adafruit,yx240qv29" },
|
||||
+ { .compatible = "hardkernel,hktft32" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ili9341_of_match);
|
||||
|
||||
static const struct spi_device_id ili9341_id[] = {
|
||||
{ "yx240qv29", 0 },
|
||||
+ { "hktft32", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, ili9341_id);
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,426 +0,0 @@
|
|||
From b0cff15a7f5d1e6fac51089e3613f9f20027a7a6 Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Tue, 9 Feb 2021 13:27:41 +0900
|
||||
Subject: [PATCH 02/33] ODROID-COMMON: gpu/drm: Add new Tiny DRM driver with
|
||||
Ili9488
|
||||
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
Change-Id: I6e4f783ab642cc735ef445d010afb1cd930757c6
|
||||
---
|
||||
drivers/gpu/drm/tiny/Kconfig | 13 +
|
||||
drivers/gpu/drm/tiny/Makefile | 1 +
|
||||
drivers/gpu/drm/tiny/ili9488_pio.c | 366 +++++++++++++++++++++++++++++
|
||||
3 files changed, 380 insertions(+)
|
||||
create mode 100644 drivers/gpu/drm/tiny/ili9488_pio.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig
|
||||
index 627d637a1e7e..3a0f50a094e3 100644
|
||||
--- a/drivers/gpu/drm/tiny/Kconfig
|
||||
+++ b/drivers/gpu/drm/tiny/Kconfig
|
||||
@@ -147,6 +147,19 @@ config TINYDRM_ILI9486
|
||||
|
||||
If M is selected the module will be called ili9486.
|
||||
|
||||
+config TINYDRM_ILI9488_PIO
|
||||
+ tristate "DRM support for ILI9488 display panels (8bit PIO)"
|
||||
+ depends on DRM
|
||||
+ select DRM_KMS_HELPER
|
||||
+ select DRM_KMS_CMA_HELPER
|
||||
+ select DRM_MIPI_DBI
|
||||
+ select BACKLIGHT_CLASS_DEVICE
|
||||
+ help
|
||||
+ DRM driver for th following Ilitek ILI9488 panels:
|
||||
+ * Hardkernel 3.5" 480x320 TFT (HKTFT 3.5")
|
||||
+
|
||||
+ If M is selected the module will be called hktft35.
|
||||
+
|
||||
config TINYDRM_MI0283QT
|
||||
tristate "DRM support for MI0283QT"
|
||||
depends on DRM && SPI
|
||||
diff --git a/drivers/gpu/drm/tiny/Makefile b/drivers/gpu/drm/tiny/Makefile
|
||||
index 1d9d6227e7ab..2d617bb921c7 100644
|
||||
--- a/drivers/gpu/drm/tiny/Makefile
|
||||
+++ b/drivers/gpu/drm/tiny/Makefile
|
||||
@@ -11,6 +11,7 @@ obj-$(CONFIG_TINYDRM_ILI9163) += ili9163.o
|
||||
obj-$(CONFIG_TINYDRM_ILI9225) += ili9225.o
|
||||
obj-$(CONFIG_TINYDRM_ILI9341) += ili9341.o
|
||||
obj-$(CONFIG_TINYDRM_ILI9486) += ili9486.o
|
||||
+obj-$(CONFIG_TINYDRM_ILI9488_PIO) += ili9488_pio.o
|
||||
obj-$(CONFIG_TINYDRM_MI0283QT) += mi0283qt.o
|
||||
obj-$(CONFIG_TINYDRM_REPAPER) += repaper.o
|
||||
obj-$(CONFIG_TINYDRM_ST7586) += st7586.o
|
||||
diff --git a/drivers/gpu/drm/tiny/ili9488_pio.c b/drivers/gpu/drm/tiny/ili9488_pio.c
|
||||
new file mode 100644
|
||||
index 000000000000..f3a0b1fb885a
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/tiny/ili9488_pio.c
|
||||
@@ -0,0 +1,366 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+/*
|
||||
+ * DRM driver for Hardkernel 3.5 ISP TFT display
|
||||
+ *
|
||||
+ * Copyright 2021 Dongjin Kim <tobetter@gmail.com>
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/dma-buf.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/property.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <video/mipi_display.h>
|
||||
+
|
||||
+#include <drm/drm_atomic_helper.h>
|
||||
+#include <drm/drm_damage_helper.h>
|
||||
+#include <drm/drm_drv.h>
|
||||
+#include <drm/drm_fb_cma_helper.h>
|
||||
+#include <drm/drm_fb_helper.h>
|
||||
+#include <drm/drm_fourcc.h>
|
||||
+#include <drm/drm_gem_atomic_helper.h>
|
||||
+#include <drm/drm_gem_cma_helper.h>
|
||||
+#include <drm/drm_gem_framebuffer_helper.h>
|
||||
+#include <drm/drm_managed.h>
|
||||
+#include <drm/drm_mipi_dbi.h>
|
||||
+#include <drm/drm_rect.h>
|
||||
+
|
||||
+#define ILI9488_COLUMN_ADDR 0x2a
|
||||
+#define ILI9488_PAGE_ADDR 0x2b
|
||||
+#define ILI9488_MEMORY_WRITE 0x2c
|
||||
+#define ILI9488_ITFCTR1 0xb0
|
||||
+#define ILI9488_FRMCTR1 0xb1
|
||||
+#define ILI9488_PWCTRL1 0xc2
|
||||
+#define ILI9488_VMCTRL1 0xc5
|
||||
+#define ILI9488_PGAMCTRL 0xe0
|
||||
+#define ILI9488_NGAMCTRL 0xe1
|
||||
+#define ILI9488_MADCTL_BGR BIT(3)
|
||||
+#define ILI9488_MADCTL_MV BIT(5)
|
||||
+#define ILI9488_MADCTL_MX BIT(6)
|
||||
+#define ILI9488_MADCTL_MY BIT(7)
|
||||
+
|
||||
+struct ili9488_data {
|
||||
+ struct mipi_dbi_dev *dbidev;
|
||||
+ struct gpio_desc *wr;
|
||||
+ struct gpio_desc *cs;
|
||||
+ struct gpio_desc *db[8];
|
||||
+ void __iomem *membase;
|
||||
+ u32 mask;
|
||||
+ u32 bits[8];
|
||||
+ u32 bits_wr;
|
||||
+};
|
||||
+
|
||||
+static struct ili9488_data *pdata;
|
||||
+static u32 *rgb;
|
||||
+
|
||||
+static u32 ili9488_rgb565_to_gpiobus(struct ili9488_data *pdata, u8 color)
|
||||
+{
|
||||
+ int i;
|
||||
+ u32 value = 0;
|
||||
+
|
||||
+ for (i = 0; i < 8; i++) {
|
||||
+ if (color & 1)
|
||||
+ value |= pdata->bits[i];
|
||||
+ else
|
||||
+ value &= ~(pdata->bits[i]);
|
||||
+ color >>= 1;
|
||||
+ }
|
||||
+
|
||||
+ return value;
|
||||
+}
|
||||
+
|
||||
+static int ili9488_bus_write(struct mipi_dbi *dbi, u8 data)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ if (pdata->membase) {
|
||||
+ u32 v = (readl(pdata->membase) & ~pdata->mask) | *(rgb + data);
|
||||
+ writel(v, pdata->membase);
|
||||
+ writel(v | pdata->bits_wr, pdata->membase);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ gpiod_set_value(pdata->wr, 0);
|
||||
+ for (i = 0; i < 8; i++) {
|
||||
+ gpiod_set_value(pdata->db[i], data & 1);
|
||||
+ data >>= 1;
|
||||
+ }
|
||||
+ gpiod_set_value(pdata->wr, 1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ili9488_command(struct mipi_dbi *dbi, u8 *cmd, u8 *par, size_t num)
|
||||
+{
|
||||
+ u8 *p = par;
|
||||
+
|
||||
+ gpiod_set_value(dbi->dc, 0);
|
||||
+ ili9488_bus_write(dbi, *cmd);
|
||||
+ gpiod_set_value(dbi->dc, 1);
|
||||
+
|
||||
+ while (num--)
|
||||
+ ili9488_bus_write(dbi, *p++);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void ili9488_pipe_enable(struct drm_simple_display_pipe *pipe,
|
||||
+ struct drm_crtc_state *crtc_state,
|
||||
+ struct drm_plane_state *plane_state)
|
||||
+{
|
||||
+ struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
|
||||
+ struct mipi_dbi *dbi = &dbidev->dbi;
|
||||
+ u8 addr_mode;
|
||||
+ int ret, idx;
|
||||
+
|
||||
+ if (!drm_dev_enter(pipe->crtc.dev, &idx))
|
||||
+ return;
|
||||
+
|
||||
+ ret = mipi_dbi_poweron_reset(dbidev);
|
||||
+ if (ret < 0)
|
||||
+ goto out_exit;
|
||||
+ if (ret == 1)
|
||||
+ goto out_enable;
|
||||
+
|
||||
+ gpiod_set_value(pdata->cs, 0);
|
||||
+
|
||||
+ mipi_dbi_command(dbi, ILI9488_ITFCTR1, 0x00);
|
||||
+ mipi_dbi_command(dbi, MIPI_DCS_EXIT_SLEEP_MODE);
|
||||
+ msleep(250);
|
||||
+
|
||||
+ mipi_dbi_command(dbi, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
|
||||
+ mipi_dbi_command(dbi, ILI9488_PWCTRL1, 0x33);
|
||||
+ mipi_dbi_command(dbi, ILI9488_VMCTRL1, 0x00, 0x1e, 0x80, 0x00);
|
||||
+ mipi_dbi_command(dbi, ILI9488_FRMCTR1, 0xb0, 0x11);
|
||||
+ mipi_dbi_command(dbi, ILI9488_PGAMCTRL,
|
||||
+ 0x00, 0x04, 0x0e, 0x08, 0x17, 0x0a, 0x40, 0x79,
|
||||
+ 0x4d, 0x07, 0x0e, 0x0a, 0x1a, 0x1d, 0x0f);
|
||||
+ mipi_dbi_command(dbi, ILI9488_NGAMCTRL,
|
||||
+ 0x00, 0x1b, 0x1f, 0x02, 0x10, 0x05, 0x32, 0x34,
|
||||
+ 0x43, 0x02, 0x0a, 0x09, 0x33, 0x37, 0x0f);
|
||||
+ mipi_dbi_command(dbi, MIPI_DCS_SET_DISPLAY_ON);
|
||||
+ msleep(100);
|
||||
+
|
||||
+ out_enable:
|
||||
+ switch (dbidev->rotation) {
|
||||
+ case 90:
|
||||
+ addr_mode = ILI9488_MADCTL_MY;
|
||||
+ break;
|
||||
+ case 180:
|
||||
+ addr_mode = ILI9488_MADCTL_MV;
|
||||
+ break;
|
||||
+ case 270:
|
||||
+ addr_mode = ILI9488_MADCTL_MX;
|
||||
+ break;
|
||||
+ default:
|
||||
+ addr_mode = ILI9488_MADCTL_MV | ILI9488_MADCTL_MY |
|
||||
+ ILI9488_MADCTL_MX;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ addr_mode |= ILI9488_MADCTL_BGR;
|
||||
+ mipi_dbi_command(dbi, MIPI_DCS_SET_ADDRESS_MODE, addr_mode);
|
||||
+ mipi_dbi_enable_flush(dbidev, crtc_state, plane_state);
|
||||
+
|
||||
+out_exit:
|
||||
+ drm_dev_exit(idx);
|
||||
+}
|
||||
+
|
||||
+static const struct drm_simple_display_pipe_funcs ili9488_pipe_funcs = {
|
||||
+ .enable = ili9488_pipe_enable,
|
||||
+ .disable = mipi_dbi_pipe_disable,
|
||||
+ .update = mipi_dbi_pipe_update,
|
||||
+ .prepare_fb = drm_gem_simple_display_pipe_prepare_fb,
|
||||
+};
|
||||
+
|
||||
+static const struct drm_display_mode ili9488_mode = {
|
||||
+ DRM_SIMPLE_MODE(480, 320, 73, 49),
|
||||
+};
|
||||
+
|
||||
+DEFINE_DRM_GEM_CMA_FOPS(ili9488_fops);
|
||||
+
|
||||
+static struct drm_driver ili9488_driver = {
|
||||
+ .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
||||
+ .fops = &ili9488_fops,
|
||||
+ DRM_GEM_CMA_DRIVER_OPS_VMAP,
|
||||
+ .name = "ili9488",
|
||||
+ .desc = "Ilitek ILI9488",
|
||||
+ .date = "20210201",
|
||||
+ .major = 1,
|
||||
+ .minor = 0,
|
||||
+};
|
||||
+
|
||||
+static int ili9488_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+ struct mipi_dbi *dbi;
|
||||
+ struct drm_device *drm;
|
||||
+ struct mipi_dbi_dev *dbidev;
|
||||
+ int ret;
|
||||
+ int i;
|
||||
+ u32 rotation = 0;
|
||||
+ struct resource res;
|
||||
+ char str[32];
|
||||
+
|
||||
+ pdata = devm_kzalloc(dev, sizeof(struct ili9488_data), GFP_KERNEL);
|
||||
+ if (!pdata)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ dbidev = devm_drm_dev_alloc(dev, &ili9488_driver,
|
||||
+ struct mipi_dbi_dev, drm);
|
||||
+ if (IS_ERR(dbidev))
|
||||
+ return PTR_ERR(dbidev);
|
||||
+
|
||||
+ dbi = &dbidev->dbi;
|
||||
+ drm = &dbidev->drm;
|
||||
+
|
||||
+ dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
|
||||
+ if (IS_ERR(dbi->reset)) {
|
||||
+ DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n");
|
||||
+ return PTR_ERR(dbi->reset);
|
||||
+ }
|
||||
+
|
||||
+ dbi->dc = devm_gpiod_get(dev, "dc", GPIOD_OUT_LOW);
|
||||
+ if (IS_ERR(dbi->dc)) {
|
||||
+ DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n");
|
||||
+ return PTR_ERR(dbi->dc);
|
||||
+ }
|
||||
+
|
||||
+ pdata->wr = devm_gpiod_get(dev, "wr", GPIOD_OUT_HIGH);
|
||||
+ if (IS_ERR(pdata->wr)) {
|
||||
+ DRM_DEV_ERROR(dev, "Failed to get gpio 'wr'\n");
|
||||
+ return PTR_ERR(pdata->wr);
|
||||
+ }
|
||||
+
|
||||
+ pdata->cs = devm_gpiod_get(dev, "cs", GPIOD_OUT_LOW);
|
||||
+ if (IS_ERR(pdata->cs)) {
|
||||
+ DRM_DEV_ERROR(dev, "Failed to get gpio 'cs'\n");
|
||||
+ return PTR_ERR(pdata->cs);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < 8; i++) {
|
||||
+ struct gpio_desc *desc;
|
||||
+ int gpio = of_get_named_gpio(np, "db-gpios", i);
|
||||
+ if (gpio < 0)
|
||||
+ break; /* FIXME */
|
||||
+
|
||||
+ desc = gpio_to_desc(gpio);
|
||||
+
|
||||
+ devm_gpio_request(dev, gpio, NULL);
|
||||
+ gpiod_direction_output(desc, 1);
|
||||
+
|
||||
+ pdata->db[i] = desc;
|
||||
+ }
|
||||
+
|
||||
+ ret = of_address_to_resource(np, 0, &res);
|
||||
+ if (!ret) {
|
||||
+ pdata->membase = devm_ioremap(dev, res.start,
|
||||
+ resource_size(&res));
|
||||
+ if (!IS_ERR(pdata->membase)) {
|
||||
+ for (i = 0; i < 8; i++) {
|
||||
+ sprintf(str, "db-bits-%d", i);
|
||||
+ ret = of_property_read_u32(np, str,
|
||||
+ &pdata->bits[i]);
|
||||
+ if (ret)
|
||||
+ continue;
|
||||
+ pdata->mask |= pdata->bits[i];
|
||||
+ }
|
||||
+
|
||||
+ ret = of_property_read_u32(np, "db-bits-wr",
|
||||
+ &pdata->bits_wr);
|
||||
+ if (!ret)
|
||||
+ pdata->mask |= pdata->bits_wr;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ dbidev->backlight = devm_of_find_backlight(dev);
|
||||
+ if (IS_ERR(dbidev->backlight))
|
||||
+ return PTR_ERR(dbidev->backlight);
|
||||
+
|
||||
+ device_property_read_u32(dev, "rotation", &rotation);
|
||||
+
|
||||
+ rgb = devm_kzalloc(dev, sizeof(u32) * 256, GFP_KERNEL);
|
||||
+ if (rgb) {
|
||||
+ u32 *p = rgb;
|
||||
+ for (i = 0; i < 256; i++)
|
||||
+ *p++ = ili9488_rgb565_to_gpiobus(pdata, i);
|
||||
+ }
|
||||
+
|
||||
+ gpiod_set_value(pdata->wr, 1);
|
||||
+ gpiod_set_value(dbi->dc, 0);
|
||||
+
|
||||
+ /* override the command function set in mipi_dbi_spi_init() */
|
||||
+ dbi->command = ili9488_command;
|
||||
+ dbi->read_commands = NULL;
|
||||
+ dbi->swap_bytes = true;
|
||||
+
|
||||
+ ret = mipi_dbi_dev_init(dbidev, &ili9488_pipe_funcs,
|
||||
+ &ili9488_mode, rotation);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ drm_mode_config_reset(drm);
|
||||
+
|
||||
+ ret = drm_dev_register(drm, 0);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, pdata);
|
||||
+ pdata->dbidev = dbidev;
|
||||
+
|
||||
+ drm_fbdev_generic_setup(drm, 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ili9488_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct ili9488_data *pdata = platform_get_drvdata(pdev);
|
||||
+ struct mipi_dbi_dev *dbidev = pdata->dbidev;
|
||||
+ struct drm_device *drm = &dbidev->drm;
|
||||
+
|
||||
+ drm_dev_unplug(drm);
|
||||
+ drm_atomic_helper_shutdown(drm);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id ili9488_dt_ids[] = {
|
||||
+ { .compatible = "ili9488", 0 },
|
||||
+ { .compatible = "hardkernel,ili9488", 0 },
|
||||
+ { },
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, ili9488_dt_ids);
|
||||
+
|
||||
+static struct platform_driver ili9488_platform_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "ili9488",
|
||||
+ .of_match_table = ili9488_dt_ids,
|
||||
+ },
|
||||
+ .probe = ili9488_probe,
|
||||
+ .remove = ili9488_remove,
|
||||
+};
|
||||
+
|
||||
+static int __init ili9488_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&ili9488_platform_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit ili9488_exit(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&ili9488_platform_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(ili9488_init);
|
||||
+module_exit(ili9488_exit);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Ilitek ILI9488 DRM driver (8bit PIO mode)");
|
||||
+MODULE_AUTHOR("Dongjin Kim <tobetter@gmail.com>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
From f4daf923030a9068466ac0630b7c3dc14f32ee1a Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Wed, 30 Jun 2021 11:38:33 +0900
|
||||
Subject: [PATCH 03/33] ODROID-COMMON: hwmon: (pwm-fan): fix to add
|
||||
'pwm1_enable' to set PWM fan mode
|
||||
|
||||
Change-Id: If0562f497703b8660206dad80d7933902bbf53e4
|
||||
---
|
||||
drivers/hwmon/pwm-fan.c | 67 +++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 61 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
|
||||
index f12b9a28a232..383a24316985 100644
|
||||
--- a/drivers/hwmon/pwm-fan.c
|
||||
+++ b/drivers/hwmon/pwm-fan.c
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/hwmon.h>
|
||||
+#include <linux/hwmon-sysfs.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
@@ -44,6 +45,7 @@ struct pwm_fan_ctx {
|
||||
unsigned int pwm_fan_max_state;
|
||||
unsigned int *pwm_fan_cooling_levels;
|
||||
struct thermal_cooling_device *cdev;
|
||||
+ int enable;
|
||||
|
||||
struct hwmon_chip_info info;
|
||||
struct hwmon_channel_info fan_channel;
|
||||
@@ -99,6 +101,10 @@ static int __set_pwm(struct pwm_fan_ctx *ctx, unsigned long pwm)
|
||||
struct pwm_state *state = &ctx->pwm_state;
|
||||
|
||||
mutex_lock(&ctx->lock);
|
||||
+
|
||||
+ if (!ctx->enable)
|
||||
+ pwm = MAX_PWM;
|
||||
+
|
||||
if (ctx->pwm_value == pwm)
|
||||
goto exit_set_pwm_err;
|
||||
|
||||
@@ -183,6 +189,51 @@ static const struct hwmon_ops pwm_fan_hwmon_ops = {
|
||||
.write = pwm_fan_write,
|
||||
};
|
||||
|
||||
+static ssize_t enable_store(struct device *dev,
|
||||
+ struct device_attribute *attr,
|
||||
+ const char *buf, size_t count)
|
||||
+{
|
||||
+ struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
|
||||
+ int err;
|
||||
+ unsigned long val;
|
||||
+
|
||||
+ err = kstrtoul(buf, 10, &val);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ mutex_lock(&ctx->lock);
|
||||
+ ctx->enable = val;
|
||||
+ mutex_unlock(&ctx->lock);
|
||||
+
|
||||
+ err = __set_pwm(ctx, ctx->pwm_fan_cooling_levels[ctx->pwm_fan_state]);
|
||||
+
|
||||
+ return err ? err : count;
|
||||
+}
|
||||
+
|
||||
+static ssize_t enable_show(struct device *dev, struct device_attribute *attr,
|
||||
+ char *buf)
|
||||
+{
|
||||
+ struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
|
||||
+
|
||||
+ return sprintf(buf, "%u\n", ctx->enable);
|
||||
+}
|
||||
+
|
||||
+static SENSOR_DEVICE_ATTR_RW(pwm1_enable, enable, 0);
|
||||
+
|
||||
+static struct attribute *pwm_fan_attrs[] = {
|
||||
+ &sensor_dev_attr_pwm1_enable.dev_attr.attr,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static const struct attribute_group pwm_fan_group = {
|
||||
+ .attrs = pwm_fan_attrs,
|
||||
+};
|
||||
+
|
||||
+static const struct attribute_group *pwm_fan_groups[] = {
|
||||
+ &pwm_fan_group,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
/* thermal cooling device callbacks */
|
||||
static int pwm_fan_get_max_state(struct thermal_cooling_device *cdev,
|
||||
unsigned long *state)
|
||||
@@ -214,7 +265,7 @@ static int
|
||||
pwm_fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
|
||||
{
|
||||
struct pwm_fan_ctx *ctx = cdev->devdata;
|
||||
- int ret;
|
||||
+ int ret = 0;
|
||||
|
||||
if (!ctx || (state > ctx->pwm_fan_max_state))
|
||||
return -EINVAL;
|
||||
@@ -222,10 +273,12 @@ pwm_fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
|
||||
if (state == ctx->pwm_fan_state)
|
||||
return 0;
|
||||
|
||||
- ret = __set_pwm(ctx, ctx->pwm_fan_cooling_levels[state]);
|
||||
- if (ret) {
|
||||
- dev_err(&cdev->device, "Cannot set pwm!\n");
|
||||
- return ret;
|
||||
+ if (ctx->enable >= 2) {
|
||||
+ ret = __set_pwm(ctx, ctx->pwm_fan_cooling_levels[state]);
|
||||
+ if (ret) {
|
||||
+ dev_err(&cdev->device, "Cannot set pwm!\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
}
|
||||
|
||||
ctx->pwm_fan_state = state;
|
||||
@@ -316,6 +369,8 @@ static int pwm_fan_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(ctx->pwm))
|
||||
return dev_err_probe(dev, PTR_ERR(ctx->pwm), "Could not get PWM\n");
|
||||
|
||||
+ ctx->enable = 2;
|
||||
+
|
||||
platform_set_drvdata(pdev, ctx);
|
||||
|
||||
ctx->reg_en = devm_regulator_get_optional(dev, "fan");
|
||||
@@ -434,7 +489,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
|
||||
ctx->info.info = channels;
|
||||
|
||||
hwmon = devm_hwmon_device_register_with_info(dev, "pwmfan",
|
||||
- ctx, &ctx->info, NULL);
|
||||
+ ctx, &ctx->info, pwm_fan_groups);
|
||||
if (IS_ERR(hwmon)) {
|
||||
dev_err(dev, "Failed to register hwmon device\n");
|
||||
return PTR_ERR(hwmon);
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
From dad5c84f831dd32525f96b68314ad8a84b59f993 Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Thu, 10 Sep 2020 11:01:33 +0900
|
||||
Subject: [PATCH 04/33] ODROID-COMMON: gpu/drm: add new display resolution
|
||||
2560x1440
|
||||
|
||||
Signed-off-by: Joy Cho <joy.cho@hardkernel.com>
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_vclk.c | 18 ++++++++++++++++++
|
||||
drivers/gpu/drm/meson/meson_venc.c | 5 +++--
|
||||
2 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c
|
||||
index 2a82119eb58e..eb4c251d79b7 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_vclk.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_vclk.c
|
||||
@@ -357,6 +357,8 @@ enum {
|
||||
MESON_VCLK_HDMI_594000,
|
||||
/* 2970 /1 /1 /1 /5 /1 => /1 /2 */
|
||||
MESON_VCLK_HDMI_594000_YUV420,
|
||||
+/* 4830 /2 /1 /2 /5 /1 => /1 /1 */
|
||||
+ MESON_VCLK_HDMI_241500,
|
||||
};
|
||||
|
||||
struct meson_vclk_params {
|
||||
@@ -467,6 +469,18 @@ struct meson_vclk_params {
|
||||
.vid_pll_div = VID_PLL_DIV_5,
|
||||
.vclk_div = 1,
|
||||
},
|
||||
+ [MESON_VCLK_HDMI_241500] = {
|
||||
+ .pll_freq = 4830000,
|
||||
+ .phy_freq = 2415000,
|
||||
+ .venc_freq = 241500,
|
||||
+ .vclk_freq = 241500,
|
||||
+ .pixel_freq = 241500,
|
||||
+ .pll_od1 = 2,
|
||||
+ .pll_od2 = 1,
|
||||
+ .pll_od3 = 2,
|
||||
+ .vid_pll_div = VID_PLL_DIV_5,
|
||||
+ .vclk_div = 1,
|
||||
+ },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
||||
@@ -873,6 +887,10 @@ static void meson_vclk_set(struct meson_drm *priv, unsigned int pll_base_freq,
|
||||
m = 0xf7;
|
||||
frac = vic_alternate_clock ? 0x8148 : 0x10000;
|
||||
break;
|
||||
+ case 4830000:
|
||||
+ m = 0xc9;
|
||||
+ frac = 0xd560;
|
||||
+ break;
|
||||
}
|
||||
|
||||
meson_hdmi_pll_set_params(priv, m, frac, od1, od2, od3);
|
||||
diff --git a/drivers/gpu/drm/meson/meson_venc.c b/drivers/gpu/drm/meson/meson_venc.c
|
||||
index 3c55ed003359..559ab3b5e212 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_venc.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_venc.c
|
||||
@@ -866,10 +866,11 @@ meson_venc_hdmi_supported_mode(const struct drm_display_mode *mode)
|
||||
DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC))
|
||||
return MODE_BAD;
|
||||
|
||||
- if (mode->hdisplay < 640 || mode->hdisplay > 1920)
|
||||
+ /* support higher resolution than 1920x1080 */
|
||||
+ if (mode->hdisplay < 640 || mode->hdisplay > 2560)
|
||||
return MODE_BAD_HVALUE;
|
||||
|
||||
- if (mode->vdisplay < 480 || mode->vdisplay > 1200)
|
||||
+ if (mode->vdisplay < 480 || mode->vdisplay > 1600)
|
||||
return MODE_BAD_VVALUE;
|
||||
|
||||
return MODE_OK;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From e31cbb53e5a1deeb3d5e3d1803db45d3044be9e4 Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Wed, 3 Nov 2021 18:57:00 +0900
|
||||
Subject: [PATCH 05/33] ODROID-COMMON: Revert "drm/dbi: Print errors for
|
||||
mipi_dbi_command()"
|
||||
|
||||
This reverts commit 3f5aa5ac0b0f9704f0c60f5fbbbcdc8c043d6eb6.
|
||||
---
|
||||
include/drm/drm_mipi_dbi.h | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h
|
||||
index dad2f187b64b..4a396950cfc6 100644
|
||||
--- a/include/drm/drm_mipi_dbi.h
|
||||
+++ b/include/drm/drm_mipi_dbi.h
|
||||
@@ -191,12 +191,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb,
|
||||
#define mipi_dbi_command(dbi, cmd, seq...) \
|
||||
({ \
|
||||
const u8 d[] = { seq }; \
|
||||
- struct device *dev = &(dbi)->spi->dev; \
|
||||
- int ret; \
|
||||
- ret = mipi_dbi_command_stackbuf(dbi, cmd, d, ARRAY_SIZE(d)); \
|
||||
- if (ret) \
|
||||
- dev_err_ratelimited(dev, "error %d when sending command %#02x\n", ret, cmd); \
|
||||
- ret; \
|
||||
+ mipi_dbi_command_stackbuf(dbi, cmd, d, ARRAY_SIZE(d)); \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
From 82b437f743ee4be704e1fe2b2779a5c67a02f626 Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Wed, 17 Nov 2021 03:25:51 +0900
|
||||
Subject: [PATCH 06/33] ODROID-COMMON: add '--symbol' to device tree compiler
|
||||
|
||||
This change is to create device tree node '__symbol__' to support device
|
||||
treey overlay features, *.dtbo won't be applied without this node.
|
||||
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
Change-Id: I3b6102c925e871947f16e7c570563011101f5f86
|
||||
---
|
||||
scripts/Makefile.lib | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 9f69ecdd7977..84149c324d2c 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -290,7 +290,7 @@ quiet_cmd_gzip = GZIP $@
|
||||
# DTC
|
||||
# ---------------------------------------------------------------------------
|
||||
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||
-DTC_FLAGS += -Wno-interrupt_provider
|
||||
+DTC_FLAGS += -Wno-interrupt_provider --symbol
|
||||
|
||||
# Disable noisy checks by default
|
||||
ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
From 82fa57d6032ea78e3af65d4037aa272cf78c49da Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Wed, 17 Nov 2021 13:17:51 +0900
|
||||
Subject: [PATCH 07/33] ODROID-COMMON: phy/realtek: add Wake-on-Lan to Realtek
|
||||
PHY
|
||||
|
||||
Wake-On-Lan can set with 'ethtool'
|
||||
$ sudo ethtool -s eth0 wol u
|
||||
|
||||
Check if 'Wake-on' is set with 'u'
|
||||
$ sudo ethtool eth0 | grep Wake
|
||||
Supports Wake-on: ug
|
||||
Wake-on: u
|
||||
|
||||
In order to wake from remote, run 'wakeonlan' with IP address:
|
||||
$ wakeonlan 00:1e:06:42:45:32
|
||||
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
Change-Id: I8ade81ab50d8d886e2908b9cec543e3bf8cc7abd
|
||||
---
|
||||
.../ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 ++
|
||||
drivers/net/phy/realtek.c | 34 +++++++++++++++++++
|
||||
2 files changed, 36 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
index abfb3cd5958d..8f7f1f6ae392 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
@@ -771,6 +771,8 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
||||
priv->wolopts = wol->wolopts;
|
||||
mutex_unlock(&priv->lock);
|
||||
|
||||
+ phy_ethtool_set_wol(dev->phydev, wol);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
|
||||
index a5671ab896b3..f832992d80fd 100644
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/phy.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <linux/etherdevice.h>
|
||||
|
||||
#define RTL821x_PHYSR 0x11
|
||||
#define RTL821x_PHYSR_DUPLEX BIT(13)
|
||||
@@ -228,7 +229,11 @@ static int rtl8211f_config_intr(struct phy_device *phydev)
|
||||
|
||||
val = RTL8211F_INER_LINK_STATUS;
|
||||
err = phy_write_paged(phydev, 0xa42, RTL821x_INER, val);
|
||||
+
|
||||
+ phy_modify_paged(phydev, 0xd40, 0x16, BIT(5), 0);
|
||||
} else {
|
||||
+ phy_modify_paged(phydev, 0xd40, 0x16, 0, BIT(5));
|
||||
+
|
||||
val = 0;
|
||||
err = phy_write_paged(phydev, 0xa42, RTL821x_INER, val);
|
||||
if (err)
|
||||
@@ -329,6 +334,34 @@ static int rtl8211c_config_init(struct phy_device *phydev)
|
||||
CTL1000_ENABLE_MASTER | CTL1000_AS_MASTER);
|
||||
}
|
||||
|
||||
+static int rtl8211f_set_wol(struct phy_device *phydev,
|
||||
+ struct ethtool_wolinfo *wol)
|
||||
+{
|
||||
+ struct net_device *netdev = phydev->attached_dev;
|
||||
+ const u8 *mac = (const u8 *)netdev->dev_addr;
|
||||
+
|
||||
+ if ((wol->wolopts & (WAKE_MAGIC | WAKE_UCAST)) == 0) {
|
||||
+ disable_irq_wake(phydev->irq);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if ((wol->wolopts & WAKE_UCAST)
|
||||
+ && is_valid_ether_addr(mac)) {
|
||||
+ phy_write_paged(phydev, 0xd8c, 0x10, (mac[1] << 8) | mac[0]);
|
||||
+ phy_write_paged(phydev, 0xd8c, 0x11, (mac[3] << 8) | mac[2]);
|
||||
+ phy_write_paged(phydev, 0xd8c, 0x12, (mac[5] << 8) | mac[4]);
|
||||
+ }
|
||||
+
|
||||
+ if (wol->wolopts & WAKE_MAGIC) {
|
||||
+ phy_write_paged(phydev, 0xd8a, 0x10, 0x1000);
|
||||
+ phy_write_paged(phydev, 0xd8a, 0x11, 0x9fff);
|
||||
+ }
|
||||
+
|
||||
+ enable_irq_wake(phydev->irq);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rtl8211f_config_init(struct phy_device *phydev)
|
||||
{
|
||||
struct rtl821x_priv *priv = phydev->priv;
|
||||
@@ -921,6 +954,7 @@ static struct phy_driver realtek_drvs[] = {
|
||||
.handle_interrupt = rtl8211f_handle_interrupt,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtl821x_resume,
|
||||
+ .set_wol = rtl8211f_set_wol,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
}, {
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
From fc8960852d45d8b710687d147e322609fdfc4626 Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Thu, 9 Nov 2017 22:09:37 -0500
|
||||
Subject: [PATCH 08/33] ARM: exynos: add machine description for ODROID-XU3/4
|
||||
|
||||
Change-Id: Ice75e06366f107f761504512a84fb92affffb124
|
||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||||
[ grimler: bring up to 5.16, fix init_late->pm_init ]
|
||||
Signed-off-by: Henrik Grimler <henrik@grimler.se>
|
||||
---
|
||||
arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
|
||||
index 8b48326be9fd..e4e1a2c76ed9 100644
|
||||
--- a/arch/arm/mach-exynos/exynos.c
|
||||
+++ b/arch/arm/mach-exynos/exynos.c
|
||||
@@ -220,3 +220,31 @@ DT_MACHINE_START(EXYNOS_DT, "Samsung Exynos (Flattened Device Tree)")
|
||||
.dt_compat = exynos_dt_compat,
|
||||
.dt_fixup = exynos_dt_fixup,
|
||||
MACHINE_END
|
||||
+
|
||||
+#define ODROID_MACHINE_START(name, compat) \
|
||||
+ DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
|
||||
+ .l2c_aux_val = 0x3c400001, \
|
||||
+ .l2c_aux_mask = 0xc20fffff, \
|
||||
+ .smp = smp_ops(exynos_smp_ops), \
|
||||
+ .map_io = exynos_init_io, \
|
||||
+ .init_early = exynos_firmware_init, \
|
||||
+ .init_irq = exynos_init_irq, \
|
||||
+ .init_machine = exynos_dt_machine_init, \
|
||||
+ .init_late = exynos_pm_init, \
|
||||
+ .dt_compat = compat, \
|
||||
+ .dt_fixup = exynos_dt_fixup, \
|
||||
+ MACHINE_END
|
||||
+
|
||||
+static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
|
||||
+ "hardkernel,odroid-xu3",
|
||||
+ "hardkernel,odroid-xu3-lite",
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
|
||||
+ "hardkernel,odroid-xu4",
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
|
||||
+ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
From 71338d5aba7111fdbeb51487abd05bb6d0619ba8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
|
||||
Date: Fri, 30 Nov 2012 17:05:40 -0800
|
||||
Subject: [PATCH 09/33] ARM: decompressor: Flush tlb before swiching domain 0
|
||||
to client mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If the bootloader used a page table that is incompatible with domain 0
|
||||
in client mode, and boots with the mmu on, then swithing domain 0 to
|
||||
client mode causes a fault if we don't flush the tlb after updating
|
||||
the page table pointer.
|
||||
|
||||
v2: Add ISB before loading dacr.
|
||||
|
||||
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
||||
---
|
||||
arch/arm/boot/compressed/head.S | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
|
||||
index bf79f2f78d23..083e59d474fe 100644
|
||||
--- a/arch/arm/boot/compressed/head.S
|
||||
+++ b/arch/arm/boot/compressed/head.S
|
||||
@@ -896,6 +896,8 @@ __armv7_mmu_cache_on:
|
||||
bic r6, r6, #1 << 31 @ 32-bit translation system
|
||||
bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0
|
||||
mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
|
||||
+ mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
|
||||
+ mcr p15, 0, r0, c7, c5, 4 @ ISB
|
||||
mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
|
||||
mcrne p15, 0, r6, c2, c0, 2 @ load ttb control
|
||||
#endif
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,164 +0,0 @@
|
|||
From a60b595873e36af9ff321808f409051906a7c6d5 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Sat, 5 Feb 2022 03:19:07 +0200
|
||||
Subject: [PATCH 10/33] ASoC: samsung: snow: add jack detection
|
||||
|
||||
Add jack detection support with two GPIOs:
|
||||
- samsung,hp-det;
|
||||
- samsung,mic-det.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
sound/soc/samsung/snow.c | 94 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 94 insertions(+)
|
||||
|
||||
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
|
||||
index 02372109c251..e0232dd2afdb 100644
|
||||
--- a/sound/soc/samsung/snow.c
|
||||
+++ b/sound/soc/samsung/snow.c
|
||||
@@ -3,10 +3,12 @@
|
||||
// ASoC machine driver for Snow boards
|
||||
|
||||
#include <linux/clk.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
+#include <sound/jack.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
@@ -22,6 +24,37 @@ SND_SOC_DAILINK_DEFS(links,
|
||||
struct snow_priv {
|
||||
struct snd_soc_dai_link dai_link;
|
||||
struct clk *clk_i2s_bus;
|
||||
+ struct gpio_desc *gpiod_hp_det;
|
||||
+ struct gpio_desc *gpiod_mic_det;
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_jack snow_hp_jack;
|
||||
+
|
||||
+static struct snd_soc_jack_pin snow_hp_jack_pins[] = {
|
||||
+ { .pin = "Headphone Jack", .mask = SND_JACK_HEADPHONE },
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_jack_gpio snow_hp_jack_gpio = {
|
||||
+ .name = "Headphones detection",
|
||||
+ .report = SND_JACK_HEADPHONE,
|
||||
+ .debounce_time = 150,
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_jack snow_mic_jack;
|
||||
+
|
||||
+static struct snd_soc_jack_pin snow_mic_jack_pins[] = {
|
||||
+ { .pin = "Mic Jack", .mask = SND_JACK_MICROPHONE },
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_jack_gpio snow_mic_jack_gpio = {
|
||||
+ .name = "Microphone detection",
|
||||
+ .report = SND_JACK_MICROPHONE,
|
||||
+ .debounce_time = 150,
|
||||
+};
|
||||
+
|
||||
+static const struct snd_soc_dapm_widget snow_dapm_widgets[] = {
|
||||
+ SND_SOC_DAPM_HP("Headphone Jack", NULL),
|
||||
+ SND_SOC_DAPM_MIC("Mic Jack", NULL),
|
||||
};
|
||||
|
||||
static int snow_card_hw_params(struct snd_pcm_substream *substream,
|
||||
@@ -105,9 +138,56 @@ static int snow_late_probe(struct snd_soc_card *card)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
+ struct snow_priv *priv = snd_soc_card_get_drvdata(card);
|
||||
+ const char *jack_name;
|
||||
+ int err;
|
||||
|
||||
rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]);
|
||||
|
||||
+ if (priv->gpiod_hp_det) {
|
||||
+ jack_name = "Headphones";
|
||||
+
|
||||
+ err = snd_soc_card_jack_new(card, jack_name,
|
||||
+ SND_JACK_HEADPHONE,
|
||||
+ &snow_hp_jack,
|
||||
+ snow_hp_jack_pins,
|
||||
+ ARRAY_SIZE(snow_hp_jack_pins));
|
||||
+ if (err) {
|
||||
+ dev_err(rtd->dev,
|
||||
+ "Headphones Jack creation failed: %d\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ snow_hp_jack_gpio.desc = priv->gpiod_hp_det;
|
||||
+
|
||||
+ err = snd_soc_jack_add_gpios(&snow_hp_jack, 1,
|
||||
+ &snow_hp_jack_gpio);
|
||||
+ if (err)
|
||||
+ dev_err(rtd->dev, "Headphones GPIOs not added: %d\n", err);
|
||||
+ }
|
||||
+
|
||||
+ if (priv->gpiod_mic_det) {
|
||||
+ jack_name = "Microphone";
|
||||
+
|
||||
+ err = snd_soc_card_jack_new(card, jack_name,
|
||||
+ SND_JACK_MICROPHONE,
|
||||
+ &snow_mic_jack,
|
||||
+ snow_mic_jack_pins,
|
||||
+ ARRAY_SIZE(snow_mic_jack_pins));
|
||||
+ if (err) {
|
||||
+ dev_err(rtd->dev,
|
||||
+ "Microphone Jack creation failed: %d\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ snow_mic_jack_gpio.desc = priv->gpiod_mic_det;
|
||||
+
|
||||
+ err = snd_soc_jack_add_gpios(&snow_mic_jack, 1,
|
||||
+ &snow_mic_jack_gpio);
|
||||
+ if (err)
|
||||
+ dev_err(rtd->dev, "Microphone GPIOs not added: %d\n", err);
|
||||
+ }
|
||||
+
|
||||
/* In the multi-codec case codec_dais 0 is MAX98095 and 1 is HDMI. */
|
||||
codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
|
||||
@@ -129,6 +209,7 @@ static int snow_probe(struct platform_device *pdev)
|
||||
struct device_node *cpu, *codec;
|
||||
struct snd_soc_dai_link *link;
|
||||
struct snow_priv *priv;
|
||||
+ struct gpio_desc *gpiod;
|
||||
int ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
@@ -137,6 +218,16 @@ static int snow_probe(struct platform_device *pdev)
|
||||
|
||||
link = &priv->dai_link;
|
||||
|
||||
+ gpiod = devm_gpiod_get_optional(dev, "samsung,hp-det", GPIOD_IN);
|
||||
+ priv->gpiod_hp_det = gpiod;
|
||||
+ if (IS_ERR(gpiod))
|
||||
+ return PTR_ERR(gpiod);
|
||||
+
|
||||
+ gpiod = devm_gpiod_get_optional(dev, "samsung,mic-det", GPIOD_IN);
|
||||
+ priv->gpiod_mic_det = gpiod;
|
||||
+ if (IS_ERR(gpiod))
|
||||
+ return PTR_ERR(gpiod);
|
||||
+
|
||||
link->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
|
||||
SND_SOC_DAIFMT_CBS_CFS;
|
||||
|
||||
@@ -154,6 +245,9 @@ static int snow_probe(struct platform_device *pdev)
|
||||
card->num_links = 1;
|
||||
card->dev = dev;
|
||||
|
||||
+ card->dapm_widgets = snow_dapm_widgets;
|
||||
+ card->num_dapm_widgets = ARRAY_SIZE(snow_dapm_widgets);
|
||||
+
|
||||
/* Try new DT bindings with HDMI support first. */
|
||||
cpu = of_get_child_by_name(dev->of_node, "cpu");
|
||||
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
From 794790c910e44045e62a2e49180726257d34c5ce Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Fri, 31 Dec 2021 09:43:18 +0200
|
||||
Subject: [PATCH 11/33] ARM: dts: exynos: snow: add mmc aliases
|
||||
|
||||
Add aliases for eMMC, SD card and WiFi, so nubmers will not be
|
||||
changed anymore.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
index c15ecfc4077d..ceaa5b258c3f 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
@@ -15,6 +15,10 @@
|
||||
/ {
|
||||
aliases {
|
||||
i2c104 = &i2c_104;
|
||||
+
|
||||
+ mmc0 = &mmc_0; /* eMMC */
|
||||
+ mmc1 = &mmc_2; /* SD */
|
||||
+ mmc2 = &mmc_3; /* WiFi */
|
||||
};
|
||||
|
||||
memory@40000000 {
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
From b9e5ebe2f564488ad89642d7b30b3553515ada3b Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Fri, 31 Dec 2021 11:28:32 +0200
|
||||
Subject: [PATCH 12/33] ARM: dts: exynos: peach-pit: add mmc aliases
|
||||
|
||||
Add aliases for eMMC, SD card and WiFi, so numbers will not be
|
||||
changed anymore.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5420-peach-pit.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
index d6434ec86022..88b5ebf09d19 100644
|
||||
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
@@ -31,6 +31,10 @@ / {
|
||||
aliases {
|
||||
/* Assign 20 so we don't get confused w/ builtin ones */
|
||||
i2c20 = &i2c_tunnel;
|
||||
+
|
||||
+ mmc0 = &mmc_0; /* eMMC */
|
||||
+ mmc1 = &mmc_2; /* uSD */
|
||||
+ mmc2 = &mmc_1; /* WiFi */
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From b048d2a86d98a2296a769ed474bdf0ec95fba923 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Mon, 14 Mar 2022 21:44:47 +0200
|
||||
Subject: [PATCH 13/33] ARM: dts: exynos: peach-pi: add mmc aliases
|
||||
|
||||
Add aliases for eMMC, SD card and WiFi, so nubmers will not be
|
||||
changed anymore.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
Tested-by: Valentine Iourine <iourine@iourine.msk.su>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
index 4ee76281979c..6a143ad3b69f 100644
|
||||
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
@@ -29,6 +29,10 @@ / {
|
||||
aliases {
|
||||
/* Assign 20 so we don't get confused w/ builtin ones */
|
||||
i2c20 = &i2c_tunnel;
|
||||
+
|
||||
+ mmc0 = &mmc_0; /* eMMC */
|
||||
+ mmc1 = &mmc_2; /* SD */
|
||||
+ mmc2 = &mmc_1; /* WiFi */
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 574ac772586ff0cfa2f7757f83c34b2a82f23262 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Fri, 31 Dec 2021 11:20:23 +0200
|
||||
Subject: [PATCH 14/33] ARM: dts: exynos: snow: use num-interpolated-steps for
|
||||
backlight
|
||||
|
||||
Use num-interpolated-steps in backlight node to get more
|
||||
brightness levels.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
index ceaa5b258c3f..e3eac74f0572 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
@@ -201,8 +201,9 @@ xxti {
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 1000000 0>;
|
||||
- brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
|
||||
- default-brightness-level = <7>;
|
||||
+ brightness-levels = <1 255>;
|
||||
+ num-interpolated-steps = <254>;
|
||||
+ default-brightness-level = <254>;
|
||||
enable-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
|
||||
power-supply = <&fet1>;
|
||||
pinctrl-0 = <&pwm0_out>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 850f0c05c7d0b49c29f359148d0a15f9b0466994 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Fri, 31 Dec 2021 11:29:56 +0200
|
||||
Subject: [PATCH 15/33] ARM: dts: exynos: peach-pit: use num-interpolated-steps
|
||||
for backlight
|
||||
|
||||
Use num-interpolated-steps in backlight node to get more
|
||||
brightness levels.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5420-peach-pit.dts | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
index 88b5ebf09d19..9ea70ece4190 100644
|
||||
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
@@ -40,8 +40,9 @@ aliases {
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 1000000 0>;
|
||||
- brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
|
||||
- default-brightness-level = <7>;
|
||||
+ brightness-levels = <1 255>;
|
||||
+ num-interpolated-steps = <254>;
|
||||
+ default-brightness-level = <254>;
|
||||
power-supply = <&tps65090_fet1>;
|
||||
pinctrl-0 = <&pwm0_out>;
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 43cc207f0a691c0e6eb992c555a369b001c07b99 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Mon, 14 Mar 2022 21:46:55 +0200
|
||||
Subject: [PATCH 16/33] ARM: dts: exynos: peach-pi: use num-interpolated-steps
|
||||
for backlight
|
||||
|
||||
Use num-interpolated-steps in backlight node to get more
|
||||
brightness levels.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
Tested-by: Valentine Iourine <iourine@iourine.msk.su>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5800-peach-pi.dts | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
index 6a143ad3b69f..7c21ac377ed4 100644
|
||||
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
@@ -38,8 +38,9 @@ aliases {
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 1000000 0>;
|
||||
- brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
|
||||
- default-brightness-level = <7>;
|
||||
+ brightness-levels = <1 255>;
|
||||
+ num-interpolated-steps = <254>;
|
||||
+ default-brightness-level = <254>;
|
||||
enable-gpios = <&gpx2 2 GPIO_ACTIVE_HIGH>;
|
||||
power-supply = <&tps65090_fet1>;
|
||||
pinctrl-0 = <&pwm0_out>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
From 59355514e15d480d45bb19402cc0350d85fa709e Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Fri, 31 Dec 2021 11:30:32 +0200
|
||||
Subject: [PATCH 17/33] ARM: dts: exynos: peach-pit: enable GPU
|
||||
|
||||
Enable GPU for this device.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5420-peach-pit.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
index 9ea70ece4190..c97fa1a5bf50 100644
|
||||
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
@@ -194,6 +194,11 @@ &fimd {
|
||||
samsung,invert-vclk;
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ status = "okay";
|
||||
+ mali-supply = <&buck4_reg>;
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 6c2538cfa5bf744d5d9f19ea55a4cbd9fc62606a Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Thu, 9 Jun 2022 05:41:59 +0300
|
||||
Subject: [PATCH 18/33] ARM: dts: exynos: peach-pi: enable GPU
|
||||
|
||||
Enable GPU for this device.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
Tested-by: Valentine Iourine <iourine@iourine.msk.su>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5800-peach-pi.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
index 7c21ac377ed4..e528a677026c 100644
|
||||
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
@@ -203,6 +203,11 @@ &fimd {
|
||||
samsung,invert-vclk;
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ status = "okay";
|
||||
+ mali-supply = <&buck4_reg>;
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From ed67431a80704bf316df6e0848b9392c6220a7c9 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Tue, 1 Feb 2022 12:57:32 +0200
|
||||
Subject: [PATCH 19/33] HACK: ARM: dts: exynos: snow: disable HDMI audio
|
||||
|
||||
When enabling Internal Microphone, HDMI codec results in:
|
||||
[ 730.054945] hdmi-audio-codec hdmi-audio-codec.14.auto: Only one simultaneous stream supported!
|
||||
[ 730.054961] hdmi-audio-codec hdmi-audio-codec.14.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
|
||||
[ 730.054978] Primary: soc_pcm_open() failed (-22)
|
||||
---
|
||||
arch/arm/boot/dts/exynos5250-snow-rev5.dts | 2 +-
|
||||
arch/arm/boot/dts/exynos5250-snow.dts | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow-rev5.dts b/arch/arm/boot/dts/exynos5250-snow-rev5.dts
|
||||
index 0a47597d6f0d..74f6d45885ad 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow-rev5.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow-rev5.dts
|
||||
@@ -27,7 +27,7 @@ cpu {
|
||||
};
|
||||
|
||||
codec {
|
||||
- sound-dai = <&max98090 0>, <&hdmi>;
|
||||
+ sound-dai = <&max98090 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
|
||||
index 906aa7aae710..4c2c3e9f1467 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow.dts
|
||||
@@ -25,7 +25,7 @@ cpu {
|
||||
};
|
||||
|
||||
codec {
|
||||
- sound-dai = <&max98095 0>, <&hdmi>;
|
||||
+ sound-dai = <&max98095 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
From 3e584005d738f13246b0b01eee5587cd259a3cc6 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Tue, 1 Feb 2022 12:14:02 +0200
|
||||
Subject: [PATCH 20/33] HACK: ARM: dts: exynos: peach-pit: disable HDMI audio
|
||||
|
||||
When enabling Internal Microphone, HDMI codec results in:
|
||||
[ 730.054945] hdmi-audio-codec hdmi-audio-codec.14.auto: Only one simultaneous stream supported!
|
||||
[ 730.054961] hdmi-audio-codec hdmi-audio-codec.14.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
|
||||
[ 730.054978] Primary: soc_pcm_open() failed (-22)
|
||||
---
|
||||
arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
index c97fa1a5bf50..b45a47120213 100644
|
||||
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
@@ -99,7 +99,7 @@ cpu {
|
||||
};
|
||||
|
||||
codec {
|
||||
- sound-dai = <&max98090>, <&hdmi>;
|
||||
+ sound-dai = <&max98090>;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From b431b9951639e6b2e7b91cdde47a18b96f0a9319 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Mon, 14 Mar 2022 21:49:18 +0200
|
||||
Subject: [PATCH 21/33] HACK: ARM: dts: exynos: peach-pi: disable HDMI audio
|
||||
|
||||
When enabling Internal Microphone, HDMI codec results in:
|
||||
[ 730.054945] hdmi-audio-codec hdmi-audio-codec.14.auto: Only one simultaneous stream supported!
|
||||
[ 730.054961] hdmi-audio-codec hdmi-audio-codec.14.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22
|
||||
[ 730.054978] Primary: soc_pcm_open() failed (-22)
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
Tested-by: Valentine Iourine <iourine@iourine.msk.su>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
index e528a677026c..73b2616bd095 100644
|
||||
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
@@ -99,7 +99,7 @@ cpu {
|
||||
};
|
||||
|
||||
codec {
|
||||
- sound-dai = <&max98091>, <&hdmi>;
|
||||
+ sound-dai = <&max98091>;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From 4d14ea70fa35e70979afc11523e54dc106528f34 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Wed, 5 Jan 2022 16:13:53 +0200
|
||||
Subject: [PATCH 22/33] ARM: dts: exynos: snow: add atmel mxt touchpad
|
||||
|
||||
Add Atmel mXT touchpad (like peach chromebooks) as it is used in
|
||||
some revisions (probably rev5 only).
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
index e3eac74f0572..47ab5a17d4f2 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
@@ -451,6 +451,21 @@ trackpad@67 {
|
||||
interrupt-parent = <&gpx1>;
|
||||
wakeup-source;
|
||||
};
|
||||
+
|
||||
+ /* Atmel mXT which is used in some revisions */
|
||||
+ trackpad@4b {
|
||||
+ compatible = "atmel,maxtouch";
|
||||
+ reg = <0x4b>;
|
||||
+ interrupt-parent = <&gpx1>;
|
||||
+ interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ wakeup-source;
|
||||
+ linux,gpio-keymap = <KEY_RESERVED
|
||||
+ KEY_RESERVED
|
||||
+ KEY_RESERVED /* GPIO0 */
|
||||
+ KEY_RESERVED /* GPIO1 */
|
||||
+ KEY_RESERVED /* GPIO2 */
|
||||
+ BTN_LEFT>; /* GPIO3 */
|
||||
+ };
|
||||
};
|
||||
|
||||
/*
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
From 5b83e89b631392b2ad2f8b06f9c8f1ceda3d2808 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Sat, 5 Feb 2022 03:33:17 +0200
|
||||
Subject: [PATCH 23/33] ARM: dts: exynos: snow: add jack detection
|
||||
|
||||
Add GPIOs for headphones and microphone detection.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
index 47ab5a17d4f2..817b48c924f0 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
@@ -178,6 +178,11 @@ charger {
|
||||
|
||||
sound {
|
||||
samsung,i2s-controller = <&i2s0>;
|
||||
+ samsung,hp-det-gpios = <&gpx2 2 GPIO_ACTIVE_HIGH>;
|
||||
+ samsung,mic-det-gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_det_gpio &mic_det_gpio>;
|
||||
};
|
||||
|
||||
usb3_vbus_reg: regulator-usb3 {
|
||||
@@ -635,6 +640,20 @@ ec_irq: ec-irq-pins {
|
||||
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
};
|
||||
|
||||
+ mic_det_gpio: mic-det-gpio-pins {
|
||||
+ samsung,pins = "gpx2-0";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
+ };
|
||||
+
|
||||
+ hp_det_gpio: hp-det-gpio-pins {
|
||||
+ samsung,pins = "gpx2-2";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
|
||||
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
+ };
|
||||
+
|
||||
tps65090_irq: tps65090-irq-pins {
|
||||
samsung,pins = "gpx2-6";
|
||||
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
From 3eebd4eb1d28bee517062dab9b635ea934c095c5 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Sat, 5 Feb 2022 03:34:45 +0200
|
||||
Subject: [PATCH 24/33] ARM: dts: exynos: peach-pit: add jack detection
|
||||
|
||||
Add GPIOs for headphones and microphone detection.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5420-peach-pit.dts | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
index b45a47120213..18cadd6b4ef1 100644
|
||||
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
|
||||
@@ -93,6 +93,11 @@ sound {
|
||||
samsung,model = "Peach-Pit-I2S-MAX98090";
|
||||
samsung,i2s-controller = <&i2s0>;
|
||||
samsung,audio-codec = <&max98090>;
|
||||
+ samsung,hp-det-gpios = <&gpx2 1 GPIO_ACTIVE_HIGH>;
|
||||
+ samsung,mic-det-gpios = <&gpx1 7 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_det_gpio &mic_det_gpio>;
|
||||
|
||||
cpu {
|
||||
sound-dai = <&i2s0 0>;
|
||||
@@ -835,6 +840,20 @@ ec_irq: ec-irq-pins {
|
||||
samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
|
||||
};
|
||||
|
||||
+ mic_det_gpio: mic-det-gpio-pins {
|
||||
+ samsung,pins = "gpx1-7";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
|
||||
+ };
|
||||
+
|
||||
+ hp_det_gpio: hp-det-gpio-pins {
|
||||
+ samsung,pins = "gpx2-1";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
|
||||
+ };
|
||||
+
|
||||
tps65090_irq: tps65090-irq-pins {
|
||||
samsung,pins = "gpx2-5";
|
||||
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From 78b5f75209f38ef9bb48778d62ca6ada08dddb43 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Mon, 14 Mar 2022 21:57:44 +0200
|
||||
Subject: [PATCH 25/33] ARM: dts: exynos: peach-pi: add jack detection
|
||||
|
||||
Add GPIOs for headphones and microphone detection.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
Tested-by: Valentine Iourine <iourine@iourine.msk.su>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5800-peach-pi.dts | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
index 73b2616bd095..82192987a0cb 100644
|
||||
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
|
||||
@@ -93,6 +93,11 @@ sound {
|
||||
samsung,model = "Peach-Pi-I2S-MAX98091";
|
||||
samsung,i2s-controller = <&i2s0>;
|
||||
samsung,audio-codec = <&max98091>;
|
||||
+ samsung,hp-det-gpios = <&gpx2 1 GPIO_ACTIVE_HIGH>;
|
||||
+ samsung,mic-det-gpios = <&gpx1 7 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_det_gpio &mic_det_gpio>;
|
||||
|
||||
cpu {
|
||||
sound-dai = <&i2s0 0>;
|
||||
@@ -817,6 +822,20 @@ ec_irq: ec-irq-pins {
|
||||
samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
|
||||
};
|
||||
|
||||
+ mic_det_gpio: mic-det-gpio-pins {
|
||||
+ samsung,pins = "gpx1-7";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
|
||||
+ };
|
||||
+
|
||||
+ hp_det_gpio: hp-det-gpio-pins {
|
||||
+ samsung,pins = "gpx2-1";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
|
||||
+ };
|
||||
+
|
||||
tps65090_irq: tps65090-irq-pins {
|
||||
samsung,pins = "gpx2-5";
|
||||
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
From 1e08ea66bcca6d1444740a700bf6099b3ebc52c1 Mon Sep 17 00:00:00 2001
|
||||
From: Anton Bambura <jenneron@protonmail.com>
|
||||
Date: Fri, 29 Jul 2022 03:25:26 +0300
|
||||
Subject: [PATCH 26/33] ARM: dts: exynos: snow: add usb hub
|
||||
|
||||
This device has a USB Hub which camera and modem are connected to.
|
||||
Add support for it.
|
||||
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 23 +++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
index 817b48c924f0..4ea63c44d86e 100644
|
||||
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
|
||||
@@ -81,6 +81,22 @@ i2c_104: i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
+ usb-hub@8 {
|
||||
+ compatible = "smsc,usb3503a";
|
||||
+ reg = <0x08>;
|
||||
+
|
||||
+ reset-gpios = <&gpe1 0 GPIO_ACTIVE_LOW>;
|
||||
+ disabled-ports = <3>;
|
||||
+ initial-mode = <1>;
|
||||
+
|
||||
+ clock-names = "refclk";
|
||||
+ clocks = <&pmu_system_controller 0>;
|
||||
+ refclk-frequency = <24000000>;
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&usb_hub_reset>;
|
||||
+ };
|
||||
+
|
||||
battery: sbs-battery@b {
|
||||
compatible = "sbs,sbs-battery";
|
||||
reg = <0xb>;
|
||||
@@ -704,6 +720,13 @@ arb_our_claim: arb-our-claim-pins {
|
||||
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
};
|
||||
+
|
||||
+ usb_hub_reset: usb-hub-reset-pins {
|
||||
+ samsung,pins = "gpe1-0";
|
||||
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
|
||||
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&pmu_system_controller {
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 1f97da1240132e98415a267ec5e420ebad1cd3f4 Mon Sep 17 00:00:00 2001
|
||||
From: Dongwon Kim <dongwon.kim@intel.com>
|
||||
Date: Thu, 10 Jun 2021 14:36:59 -0700
|
||||
Subject: [PATCH 27/33] drm: set DRM_RENDER_ALLOW flag on
|
||||
DRM_IOCTL_MODE_CREATE/DESTROY_DUMB ioctls
|
||||
|
||||
Render clients should be able to create/destroy dumb object to import
|
||||
and use it as render buffer in case the default DRM device is different
|
||||
from the render device (i.e. kmsro).
|
||||
|
||||
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_ioctl.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
|
||||
index 51fcf1298023..8984c60037b2 100644
|
||||
--- a/drivers/gpu/drm/drm_ioctl.c
|
||||
+++ b/drivers/gpu/drm/drm_ioctl.c
|
||||
@@ -672,9 +672,9 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb_ioctl, 0),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_PAGE_FLIP, drm_mode_page_flip_ioctl, DRM_MASTER),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_DIRTYFB, drm_mode_dirtyfb_ioctl, DRM_MASTER),
|
||||
- DRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_DUMB, drm_mode_create_dumb_ioctl, 0),
|
||||
+ DRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_DUMB, drm_mode_create_dumb_ioctl, DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_MAP_DUMB, drm_mode_mmap_dumb_ioctl, 0),
|
||||
- DRM_IOCTL_DEF(DRM_IOCTL_MODE_DESTROY_DUMB, drm_mode_destroy_dumb_ioctl, 0),
|
||||
+ DRM_IOCTL_DEF(DRM_IOCTL_MODE_DESTROY_DUMB, drm_mode_destroy_dumb_ioctl, DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_GETPROPERTIES, drm_mode_obj_get_properties_ioctl, 0),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_SETPROPERTY, drm_mode_obj_set_property_ioctl, DRM_MASTER),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_MODE_CURSOR2, drm_mode_cursor2_ioctl, DRM_MASTER),
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
From 51ce6fc90efde5b3290215de7c4d1eaa5f81de77 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Golikov <Paullo612@ya.ru>
|
||||
Date: Mon, 6 Jun 2022 17:57:53 +0300
|
||||
Subject: [PATCH 28/33] ARM/dma-mapping: implement ->alloc_noncontiguous
|
||||
|
||||
Implement support for allocating a non-contiguous DMA region.
|
||||
Implementation is based on one in ma-iommu driver.
|
||||
|
||||
Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
|
||||
---
|
||||
arch/arm/mm/dma-mapping.c | 59 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 59 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index 82ffac621854..56851c86ad46 100644
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -1759,6 +1759,63 @@ static void arm_iommu_unmap_sg(struct device *dev,
|
||||
__iommu_unmap_sg(dev, sg, nents, dir, attrs, false);
|
||||
}
|
||||
|
||||
+static struct sg_table *arm_iommu_alloc_noncontiguous(struct device *dev,
|
||||
+ size_t size, enum dma_data_direction dir, gfp_t gfp,
|
||||
+ unsigned long attrs)
|
||||
+{
|
||||
+ struct dma_sgt_handle *sh;
|
||||
+ int count;
|
||||
+
|
||||
+ sh = kmalloc(sizeof(*sh), gfp);
|
||||
+ if (!sh)
|
||||
+ return NULL;
|
||||
+
|
||||
+ size = PAGE_ALIGN(size);
|
||||
+ count = size >> PAGE_SHIFT;
|
||||
+
|
||||
+ /*
|
||||
+ * Following is a work-around (a.k.a. hack) to prevent pages
|
||||
+ * with __GFP_COMP being passed to split_page() which cannot
|
||||
+ * handle them. The real problem is that this flag probably
|
||||
+ * should be 0 on ARM as it is not supported on this
|
||||
+ * platform; see CONFIG_HUGETLBFS.
|
||||
+ */
|
||||
+ gfp &= ~(__GFP_COMP);
|
||||
+
|
||||
+ sh->pages = __iommu_alloc_buffer(dev, size, gfp, attrs, false);
|
||||
+ if (!sh->pages)
|
||||
+ goto err_sh;
|
||||
+
|
||||
+ if (sg_alloc_table_from_pages(&sh->sgt, sh->pages, count, 0, size,
|
||||
+ GFP_KERNEL))
|
||||
+ goto err_buffer;
|
||||
+
|
||||
+ if (__iommu_map_sg(dev, sh->sgt.sgl, sh->sgt.orig_nents, dir, attrs,
|
||||
+ false) < 1)
|
||||
+ goto err_free_sg;
|
||||
+
|
||||
+ return &sh->sgt;
|
||||
+
|
||||
+err_free_sg:
|
||||
+ sg_free_table(&sh->sgt);
|
||||
+err_buffer:
|
||||
+ __iommu_free_buffer(dev, sh->pages, size, attrs);
|
||||
+err_sh:
|
||||
+ kfree(sh);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void arm_iommu_free_noncontiguous(struct device *dev, size_t size,
|
||||
+ struct sg_table *sgt, enum dma_data_direction dir)
|
||||
+{
|
||||
+ struct dma_sgt_handle *sh = sgt_handle(sgt);
|
||||
+
|
||||
+ __iommu_unmap_sg(dev, sgt->sgl, sgt->orig_nents, dir, 0, false);
|
||||
+ __iommu_free_buffer(dev, sh->pages, PAGE_ALIGN(size), 0);
|
||||
+ sg_free_table(&sh->sgt);
|
||||
+ kfree(sh);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* arm_iommu_sync_sg_for_cpu
|
||||
* @dev: valid struct device pointer
|
||||
@@ -1996,6 +2053,8 @@ static const struct dma_map_ops iommu_ops = {
|
||||
|
||||
.map_page = arm_iommu_map_page,
|
||||
.unmap_page = arm_iommu_unmap_page,
|
||||
+ .alloc_noncontiguous = arm_iommu_alloc_noncontiguous,
|
||||
+ .free_noncontiguous = arm_iommu_free_noncontiguous,
|
||||
.sync_single_for_cpu = arm_iommu_sync_single_for_cpu,
|
||||
.sync_single_for_device = arm_iommu_sync_single_for_device,
|
||||
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
From f5b3aa3001bceb883319ddae6d5eff8ca27b2489 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Golikov <Paullo612@ya.ru>
|
||||
Date: Mon, 6 Jun 2022 18:18:35 +0300
|
||||
Subject: [PATCH 29/33] iommu/io-pgtable-arm: Fix coherency support for Mali
|
||||
LPAE
|
||||
|
||||
Mali T628r0p1 which may be found in Samsung Exynos 5422 SOC is
|
||||
definitely not dma coherent, and it is not happy with PTE_SH_OS bit set
|
||||
by default in commit 728da60da7c1 ("iommu/io-pgtable-arm: Support
|
||||
coherency for Mali LPAE"). Use PTE_SH_IS by default for non dma
|
||||
coherent Mali GPUs.
|
||||
|
||||
Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
|
||||
---
|
||||
drivers/iommu/io-pgtable-arm.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
|
||||
index 94ff319ae8ac..9ac55085e141 100644
|
||||
--- a/drivers/iommu/io-pgtable-arm.c
|
||||
+++ b/drivers/iommu/io-pgtable-arm.c
|
||||
@@ -457,9 +457,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
|
||||
* "outside the GPU" (i.e. either the Inner or System domain in CPU
|
||||
* terms, depending on coherency).
|
||||
*/
|
||||
- if (prot & IOMMU_CACHE && data->iop.fmt != ARM_MALI_LPAE)
|
||||
+ if (prot & IOMMU_CACHE ||
|
||||
+ (data->iop.fmt == ARM_MALI_LPAE && !data->iop.cfg.coherent_walk))
|
||||
pte |= ARM_LPAE_PTE_SH_IS;
|
||||
- else
|
||||
+ else if (data->iop.fmt == ARM_MALI_LPAE)
|
||||
pte |= ARM_LPAE_PTE_SH_OS;
|
||||
|
||||
if (prot & IOMMU_NOEXEC)
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From 9ae5ee2c5b01d3ef00b17cc3fc03c054f60fd57a Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Golikov <Paullo612@ya.ru>
|
||||
Date: Mon, 6 Jun 2022 18:00:28 +0300
|
||||
Subject: [PATCH 30/33] media: s5p-mfc: Allow cache hints for queues
|
||||
|
||||
Passing V4L2_MEMORY_FLAG_NON_COHERENT from userspace significantly
|
||||
improves video rendering performance on Exynos 5422 (Odroid XU4).
|
||||
|
||||
Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
|
||||
[jenneron@protonmail.com: rebase]
|
||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||
---
|
||||
drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
|
||||
index 761341934925..e33863d9ae2d 100644
|
||||
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
|
||||
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
|
||||
@@ -861,6 +861,7 @@ static int s5p_mfc_open(struct file *file)
|
||||
q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
|
||||
q->mem_ops = &vb2_dma_contig_memops;
|
||||
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
||||
+ q->allow_cache_hints = 1;
|
||||
ret = vb2_queue_init(q);
|
||||
if (ret) {
|
||||
mfc_err("Failed to initialize videobuf2 queue(capture)\n");
|
||||
@@ -896,6 +897,7 @@ static int s5p_mfc_open(struct file *file)
|
||||
q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
|
||||
q->mem_ops = &vb2_dma_contig_memops;
|
||||
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
||||
+ q->allow_cache_hints = 1;
|
||||
ret = vb2_queue_init(q);
|
||||
if (ret) {
|
||||
mfc_err("Failed to initialize videobuf2 queue(output)\n");
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
From 666787ba57ab5fbcd30ba7ea2612867441c5156e Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Golikov <Paullo612@ya.ru>
|
||||
Date: Mon, 6 Jun 2022 18:32:57 +0300
|
||||
Subject: [PATCH 31/33] soc: samsung: pm_domains: Bring back old driver
|
||||
implementation
|
||||
|
||||
Using new implementation decreases Mali GPU performance significantly
|
||||
(with both KBase and Panfrost drivers).
|
||||
|
||||
Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
|
||||
---
|
||||
drivers/soc/samsung/pm_domains.c | 97 ++++++++++++++++----------------
|
||||
1 file changed, 49 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
|
||||
index d07f3c9d6903..1022d40eb700 100644
|
||||
--- a/drivers/soc/samsung/pm_domains.c
|
||||
+++ b/drivers/soc/samsung/pm_domains.c
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
-#include <linux/pm_runtime.h>
|
||||
+#include <linux/sched.h>
|
||||
|
||||
struct exynos_pm_domain_config {
|
||||
/* Value for LOCAL_PWR_CFG and STATUS fields for each domain */
|
||||
@@ -72,15 +72,15 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
|
||||
return exynos_pd_power(domain, false);
|
||||
}
|
||||
|
||||
-static const struct exynos_pm_domain_config exynos4210_cfg = {
|
||||
+static const struct exynos_pm_domain_config exynos4210_cfg __initconst = {
|
||||
.local_pwr_cfg = 0x7,
|
||||
};
|
||||
|
||||
-static const struct exynos_pm_domain_config exynos5433_cfg = {
|
||||
+static const struct exynos_pm_domain_config exynos5433_cfg __initconst = {
|
||||
.local_pwr_cfg = 0xf,
|
||||
};
|
||||
|
||||
-static const struct of_device_id exynos_pm_domain_of_match[] = {
|
||||
+static const struct of_device_id exynos_pm_domain_of_match[] __initconst = {
|
||||
{
|
||||
.compatible = "samsung,exynos4210-pd",
|
||||
.data = &exynos4210_cfg,
|
||||
@@ -91,7 +91,7 @@ static const struct of_device_id exynos_pm_domain_of_match[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
-static const char *exynos_get_domain_name(struct device_node *node)
|
||||
+static __init const char *exynos_get_domain_name(struct device_node *node)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
@@ -100,44 +100,60 @@ static const char *exynos_get_domain_name(struct device_node *node)
|
||||
return kstrdup_const(name, GFP_KERNEL);
|
||||
}
|
||||
|
||||
-static int exynos_pd_probe(struct platform_device *pdev)
|
||||
+static __init int exynos4_pm_init_power_domain(void)
|
||||
{
|
||||
- const struct exynos_pm_domain_config *pm_domain_cfg;
|
||||
- struct device *dev = &pdev->dev;
|
||||
- struct device_node *np = dev->of_node;
|
||||
- struct of_phandle_args child, parent;
|
||||
- struct exynos_pm_domain *pd;
|
||||
- int on, ret;
|
||||
+ struct device_node *np;
|
||||
+ const struct of_device_id *match;
|
||||
|
||||
- pm_domain_cfg = of_device_get_match_data(dev);
|
||||
- pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
|
||||
- if (!pd)
|
||||
- return -ENOMEM;
|
||||
+ for_each_matching_node_and_match(np, exynos_pm_domain_of_match, &match) {
|
||||
+ const struct exynos_pm_domain_config *pm_domain_cfg;
|
||||
+ struct exynos_pm_domain *pd;
|
||||
+ int on;
|
||||
|
||||
- pd->pd.name = exynos_get_domain_name(np);
|
||||
- if (!pd->pd.name)
|
||||
- return -ENOMEM;
|
||||
+ pm_domain_cfg = match->data;
|
||||
|
||||
- pd->base = of_iomap(np, 0);
|
||||
- if (!pd->base) {
|
||||
- kfree_const(pd->pd.name);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
+ pd = kzalloc(sizeof(*pd), GFP_KERNEL);
|
||||
+ if (!pd) {
|
||||
+ of_node_put(np);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ pd->pd.name = exynos_get_domain_name(np);
|
||||
+ if (!pd->pd.name) {
|
||||
+ kfree(pd);
|
||||
+ of_node_put(np);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
|
||||
- pd->pd.power_off = exynos_pd_power_off;
|
||||
- pd->pd.power_on = exynos_pd_power_on;
|
||||
- pd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg;
|
||||
+ pd->base = of_iomap(np, 0);
|
||||
+ if (!pd->base) {
|
||||
+ pr_warn("%s: failed to map memory\n", __func__);
|
||||
+ kfree_const(pd->pd.name);
|
||||
+ kfree(pd);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ pd->pd.power_off = exynos_pd_power_off;
|
||||
+ pd->pd.power_on = exynos_pd_power_on;
|
||||
+ pd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg;
|
||||
|
||||
- on = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg;
|
||||
+ on = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg;
|
||||
+
|
||||
+ pm_genpd_init(&pd->pd, NULL, !on);
|
||||
+ of_genpd_add_provider_simple(np, &pd->pd);
|
||||
+ }
|
||||
|
||||
- pm_genpd_init(&pd->pd, NULL, !on);
|
||||
- ret = of_genpd_add_provider_simple(np, &pd->pd);
|
||||
+ /* Assign the child power domains to their parents */
|
||||
+ for_each_matching_node(np, exynos_pm_domain_of_match) {
|
||||
+ struct of_phandle_args child, parent;
|
||||
|
||||
- if (ret == 0 && of_parse_phandle_with_args(np, "power-domains",
|
||||
- "#power-domain-cells", 0, &parent) == 0) {
|
||||
child.np = np;
|
||||
child.args_count = 0;
|
||||
|
||||
+ if (of_parse_phandle_with_args(np, "power-domains",
|
||||
+ "#power-domain-cells", 0,
|
||||
+ &parent) != 0)
|
||||
+ continue;
|
||||
+
|
||||
if (of_genpd_add_subdomain(&parent, &child))
|
||||
pr_warn("%pOF failed to add subdomain: %pOF\n",
|
||||
parent.np, child.np);
|
||||
@@ -146,21 +162,6 @@ static int exynos_pd_probe(struct platform_device *pdev)
|
||||
parent.np, child.np);
|
||||
}
|
||||
|
||||
- pm_runtime_enable(dev);
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static struct platform_driver exynos_pd_driver = {
|
||||
- .probe = exynos_pd_probe,
|
||||
- .driver = {
|
||||
- .name = "exynos-pd",
|
||||
- .of_match_table = exynos_pm_domain_of_match,
|
||||
- .suppress_bind_attrs = true,
|
||||
- }
|
||||
-};
|
||||
-
|
||||
-static __init int exynos4_pm_init_power_domain(void)
|
||||
-{
|
||||
- return platform_driver_register(&exynos_pd_driver);
|
||||
+ return 0;
|
||||
}
|
||||
core_initcall(exynos4_pm_init_power_domain);
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 5930985413db76f3f7974a27e8bd9d6445c1b51d Mon Sep 17 00:00:00 2001
|
||||
From: Henrik Grimler <henrik@grimler.se>
|
||||
Date: Sun, 16 Jan 2022 16:13:44 +0100
|
||||
Subject: [PATCH 32/33] dt-bindings: arm: samsung: document Klimt LTE board
|
||||
binding
|
||||
|
||||
Add binding for Galaxy Tab S 8.4" LTE variant, based on Exynos 5420
|
||||
with codename klimt-lte. The tablet has similar hardware to Klimt
|
||||
WiFi but with:
|
||||
|
||||
* an Intel 6360 modem
|
||||
* a sim-card reader
|
||||
* a TMD3782 light sensor, instead of Capella CM3323
|
||||
* a Semtech SX9500 proximity sensor
|
||||
|
||||
Signed-off-by: Henrik Grimler <henrik@grimler.se>
|
||||
---
|
||||
.../devicetree/bindings/arm/samsung/samsung-boards.yaml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
|
||||
index faea33e4f731..b4113621d1cb 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
|
||||
@@ -142,6 +142,7 @@ properties:
|
||||
- insignal,arndale-octa # Insignal Arndale Octa
|
||||
- samsung,chagall-wifi # Samsung SM-T800
|
||||
- samsung,klimt-wifi # Samsung SM-T700
|
||||
+ - samsung,klimt-lte # Samsung SM-T705
|
||||
- samsung,smdk5420 # Samsung SMDK5420 eval
|
||||
- const: samsung,exynos5420
|
||||
- const: samsung,exynos5
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
From 9af6db610a340c17f067f2364518eb8eb2441905 Mon Sep 17 00:00:00 2001
|
||||
From: Henrik Grimler <henrik@grimler.se>
|
||||
Date: Sun, 16 Jan 2022 16:29:43 +0100
|
||||
Subject: [PATCH 33/33] ARM: dts: Add support for Samsung Klimt LTE
|
||||
|
||||
Klimt LTE has the product name Samsung Galaxy Tab S 8.4". Board is
|
||||
based on Exynos 5420, and has similar hardware to Klimt WiFi and
|
||||
Chagall WiFi.
|
||||
|
||||
Signed-off-by: Henrik Grimler <henrik@grimler.se>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/exynos5420-klimt-lte.dts | 83 ++++++++++++++++++++++
|
||||
2 files changed, 84 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/exynos5420-klimt-lte.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 7c16f8a2b738..ea6f652612d8 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -225,6 +225,7 @@ dtb-$(CONFIG_ARCH_EXYNOS5) += \
|
||||
exynos5420-peach-pit.dtb \
|
||||
exynos5420-smdk5420.dtb \
|
||||
exynos5420-chagall-wifi.dtb \
|
||||
+ exynos5420-klimt-lte.dtb \
|
||||
exynos5420-klimt-wifi.dtb \
|
||||
exynos5422-odroidhc1.dtb \
|
||||
exynos5422-odroidxu3.dtb \
|
||||
diff --git a/arch/arm/boot/dts/exynos5420-klimt-lte.dts b/arch/arm/boot/dts/exynos5420-klimt-lte.dts
|
||||
new file mode 100644
|
||||
index 000000000000..2a9af1f18de7
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/exynos5420-klimt-lte.dts
|
||||
@@ -0,0 +1,83 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Samsung's Exynos5420 Klimt LTE board device tree source
|
||||
+ *
|
||||
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
|
||||
+ * http://www.samsung.com
|
||||
+ * Copyright (c) 2022 Henrik Grimler
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "exynos5420-galaxy-tab-common.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Samsung Klimt LTE based on Exynos5420";
|
||||
+ compatible = "samsung,klimt-lte", "samsung,exynos5420", \
|
||||
+ "samsung,exynos5";
|
||||
+};
|
||||
+
|
||||
+&ldo15_reg {
|
||||
+ regulator-name = "VDD_LEDA_2V8";
|
||||
+ regulator-min-microvolt = <2800000>;
|
||||
+ regulator-max-microvolt = <2800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldo17_reg {
|
||||
+ regulator-name = "VDD_VCI_3V0";
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldo28_reg {
|
||||
+ regulator-name = "VDD3_1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldo29_reg {
|
||||
+ regulator-name = "VDDR_1V6";
|
||||
+ regulator-min-microvolt = <1600000>;
|
||||
+ regulator-max-microvolt = <1600000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldo31_reg {
|
||||
+ regulator-name = "VDD_GRIP_1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldo32_reg {
|
||||
+ regulator-name = "VDD_TSP_1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc_2 {
|
||||
+ sd-uhs-sdr104;
|
||||
+};
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -10,7 +10,7 @@ pkgdesc="Mainline kernel fork for Samsung Exynos5 devices"
|
|||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="${pkgname#linux-}"
|
||||
url="https://kernel.org"
|
||||
url="https://gitlab.com/exynos5-mainline/linux"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps
|
||||
pmb:cross-native
|
||||
|
@ -36,44 +36,12 @@ case $pkgver in
|
|||
*.*.*) _kernver=${pkgver%.0};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
_tag="v${pkgver//_/-}-exynos5"
|
||||
source="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${pkgver//_/-}.tar.xz
|
||||
$pkgname-$_tag.tar.bz2::$url/-/archive/$_tag/linux-$_tag.tar.bz2
|
||||
$_config
|
||||
0001-ODROID-COMMON-gpu-drm-Add-Hardkernel-3.2-LCD-driver-.patch
|
||||
0002-ODROID-COMMON-gpu-drm-Add-new-Tiny-DRM-driver-with-I.patch
|
||||
0003-ODROID-COMMON-hwmon-pwm-fan-fix-to-add-pwm1_enable-t.patch
|
||||
0004-ODROID-COMMON-gpu-drm-add-new-display-resolution-256.patch
|
||||
0005-ODROID-COMMON-Revert-drm-dbi-Print-errors-for-mipi_d.patch
|
||||
0006-ODROID-COMMON-add-symbol-to-device-tree-compiler.patch
|
||||
0007-ODROID-COMMON-phy-realtek-add-Wake-on-Lan-to-Realtek.patch
|
||||
0008-ARM-exynos-add-machine-description-for-ODROID-XU3-4.patch
|
||||
0009-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch
|
||||
0010-ASoC-samsung-snow-add-jack-detection.patch
|
||||
0011-ARM-dts-exynos-snow-add-mmc-aliases.patch
|
||||
0012-ARM-dts-exynos-peach-pit-add-mmc-aliases.patch
|
||||
0013-ARM-dts-exynos-peach-pi-add-mmc-aliases.patch
|
||||
0014-ARM-dts-exynos-snow-use-num-interpolated-steps-for-b.patch
|
||||
0015-ARM-dts-exynos-peach-pit-use-num-interpolated-steps-.patch
|
||||
0016-ARM-dts-exynos-peach-pi-use-num-interpolated-steps-f.patch
|
||||
0017-ARM-dts-exynos-peach-pit-enable-GPU.patch
|
||||
0018-ARM-dts-exynos-peach-pi-enable-GPU.patch
|
||||
0019-HACK-ARM-dts-exynos-snow-disable-HDMI-audio.patch
|
||||
0020-HACK-ARM-dts-exynos-peach-pit-disable-HDMI-audio.patch
|
||||
0021-HACK-ARM-dts-exynos-peach-pi-disable-HDMI-audio.patch
|
||||
0022-ARM-dts-exynos-snow-add-atmel-mxt-touchpad.patch
|
||||
0023-ARM-dts-exynos-snow-add-jack-detection.patch
|
||||
0024-ARM-dts-exynos-peach-pit-add-jack-detection.patch
|
||||
0025-ARM-dts-exynos-peach-pi-add-jack-detection.patch
|
||||
0026-ARM-dts-exynos-snow-add-usb-hub.patch
|
||||
0027-drm-set-DRM_RENDER_ALLOW-flag-on-DRM_IOCTL_MODE_CREA.patch
|
||||
0028-ARM-dma-mapping-implement-alloc_noncontiguous.patch
|
||||
0029-iommu-io-pgtable-arm-Fix-coherency-support-for-Mali-.patch
|
||||
0030-media-s5p-mfc-Allow-cache-hints-for-queues.patch
|
||||
0031-soc-samsung-pm_domains-Bring-back-old-driver-impleme.patch
|
||||
0032-dt-bindings-arm-samsung-document-Klimt-LTE-board-bin.patch
|
||||
0033-ARM-dts-Add-support-for-Samsung-Klimt-LTE.patch
|
||||
"
|
||||
builddir="$srcdir/linux-${_kernver//_/-}"
|
||||
builddir="$srcdir/linux-$_tag"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
@ -101,39 +69,6 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
1872e2cf8cdd6e0033ce69f26f25526a30c237d220c02b20829fca31d6068fb816de2f2e5fd41f6807648cef8f28ddda392b199c7b1c3b48b2460c840fa1e150 linux-5.18.5.tar.xz
|
||||
59cdc82bf4a2fb255aeb05e3554dd95b27b1c4835fcff7e7347dbc9464d1593e0325bd8ee0eb9e8e46ac48e3af7da3795b81f67e76f8384d8fdd69f59d3745ae linux-postmarketos-exynos5-v5.18.5-exynos5.tar.bz2
|
||||
28014dffd66921421bfff49e90436e6672191228a76119da196ed0b86b8525f611176074efc056e8438fe284b8aabd1d31fab389f978ba9cdfc018f6b50606e8 config-postmarketos-exynos5.armv7
|
||||
c64b6638fe2550a094d248e7b46b7af816d9adbeb3b23b154102dc1a8be1eaba7197ec121ac6a228d813ba0bad891c2619b4c5413960ffdf5f764930f639ccd1 0001-ODROID-COMMON-gpu-drm-Add-Hardkernel-3.2-LCD-driver-.patch
|
||||
e094932b129f9cff1c1eae504116fe945deffaeaf549bc0ecd16c45823d0d95354f3646e291b9f6c8a9ebbbd98ee85870a690d949dab49762f65a2f5fa7c49f2 0002-ODROID-COMMON-gpu-drm-Add-new-Tiny-DRM-driver-with-I.patch
|
||||
47ddd260cb8f335991d8f885d5cf6134125b7f7d09794b6a875d92494666c60ddd7ae77463b97721fadf18b7f838f1a03a21389aa36c4de50ace6babac90f804 0003-ODROID-COMMON-hwmon-pwm-fan-fix-to-add-pwm1_enable-t.patch
|
||||
67bd8b613cac1e776c7751820865621de4fb41a0d7705a76062f6015b93d1cd1ee83e43509a100e9547a6d8a000aa2ac3e83ade6320428feee15aa0444a67b96 0004-ODROID-COMMON-gpu-drm-add-new-display-resolution-256.patch
|
||||
e6abd3e588f873c95a3b8681ac69a6ef7653f43bbab1e86d611aa3ffa192fb35d87a6b655b9f281b6fa5f6f24e27a62e772fb848b00671ed2aaff9675e6a7708 0005-ODROID-COMMON-Revert-drm-dbi-Print-errors-for-mipi_d.patch
|
||||
b238199d081338e77e590397ee32d78b364f98e65b07f6ec446a03bbd3c7a139c938640654e27b63e83febb28028e305484d4f39b0158f03efb172ae31acb85e 0006-ODROID-COMMON-add-symbol-to-device-tree-compiler.patch
|
||||
61f2d0e869bd4d13837e61ba8445e924b02b4052c01f21c6bf8f5bf6bf07530fa67f3e1dcdbb2e1ace9a3a2be41cd5148fa3305d8faa358052a80501625f6ac9 0007-ODROID-COMMON-phy-realtek-add-Wake-on-Lan-to-Realtek.patch
|
||||
dc2776122128270b2a873a67bbecf0dffe7fc79859c666e3f8d4c89d403db1fe50cf228a967930f1f642b4a878e2fababcb2cce95a570fd65aa116a5af24f0b3 0008-ARM-exynos-add-machine-description-for-ODROID-XU3-4.patch
|
||||
58906bb29fc84c07c4392d258ac4bfaca0934b0e0c353ec5729289a82d75bb79a7a26700c66e1bbc5e0349637a55c8c14413fba622041f61fdeb4da70e7c99ad 0009-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch
|
||||
57596e30241092464fc9cb1398047f1d69ad9dc2d2b7ac7a909e037a3906370965c9387564986647c9b1b251448f29f78a1f45376574569aa08de57b50b2c2fe 0010-ASoC-samsung-snow-add-jack-detection.patch
|
||||
a38bc6dd01cc643639b421dcbbb06ab6d09f7c7ab73635ead31ff0ae21914a87c4dd832009d01e1674edf812f61a36bc0404682616f41369687eca712e2dc56f 0011-ARM-dts-exynos-snow-add-mmc-aliases.patch
|
||||
662ccd76149922bbfb5771ca13fa211f281ffb13961841999d9f7b078b2b1adc67d7c36eac08ee45b38b6f0a94c23a87056be797ad31ad523ebccdb76f5c2cd5 0012-ARM-dts-exynos-peach-pit-add-mmc-aliases.patch
|
||||
aa402acabd260c6076b257d8fb214b577687843b182aae8ce3ee29dfffe3cd3f86fcc43e52e6a2c10a8fd0b8b3cbdab6d6829d45d3fac56716f8f7e273c24bf2 0013-ARM-dts-exynos-peach-pi-add-mmc-aliases.patch
|
||||
32dff4f2c6e8c80969c5196507829335ca8f12a1df3f2a753cf9395ce06e354125a6508b13f39ec04934bbaa41d058e9a43a1480d4232f3e768cd38b91759b30 0014-ARM-dts-exynos-snow-use-num-interpolated-steps-for-b.patch
|
||||
dc54e1f8c815f7a24a9e06648ea4209725441008f116fe50f4c9117175d5d18397c376d219ac6b0831388dd70f586b979ed75978132b5be7d3fbb93d58a9bfa9 0015-ARM-dts-exynos-peach-pit-use-num-interpolated-steps-.patch
|
||||
584519c9a88316f29ed4ea9b4e473d0c7b8a6acae77ada10de798a11c1fa69d82e304b4480ce4e196ec732c1c973ebdcb6722b976dc6ec03621503ad9eef1b98 0016-ARM-dts-exynos-peach-pi-use-num-interpolated-steps-f.patch
|
||||
6451de185150f3a662300f934cd71806e362380c135f4a992a3acb7fcacd9058b2b0407dd6a2279d60458e92740c6c7eda59a1ac4b547486e79254b13b071efc 0017-ARM-dts-exynos-peach-pit-enable-GPU.patch
|
||||
eb26d9b3e6bd26ac448c528e7e50dabeab7b714195a4d524a50db37d60d44b4f024e3f65abe59b3062feb65bee8c684778dc1ca2a38e795c83ee9d8f3b1b5945 0018-ARM-dts-exynos-peach-pi-enable-GPU.patch
|
||||
391d682843187e58f321fc51e4796d452081bec20ad0fbdd4766c8b5d8a2a743d92579677a53d8584b5f2e972ab0ac98f3b9fff8ae202d892566abd92588b5a8 0019-HACK-ARM-dts-exynos-snow-disable-HDMI-audio.patch
|
||||
fd5fe4b7e0a46a7475a3ccb67372835eb0d8fd7c7fe556b3f6ba737c5c297829748d1e2f4b9909cba1a4c65a6c552c1efdb038ddd35939973e7e5b7ea4a4a20f 0020-HACK-ARM-dts-exynos-peach-pit-disable-HDMI-audio.patch
|
||||
86e8706aa7fd0e802a05de1c5fab6a3048853bb9dc824eab4c522310e0dc99b05f400ad3a100f7f9009411b2c1cc4ae5558dee5b560cb4c81eb8dec7543faca1 0021-HACK-ARM-dts-exynos-peach-pi-disable-HDMI-audio.patch
|
||||
a6678ea58da13f7a8d9dd9127c4a7453d5b00f91ef2a53d2dbce20285d1478539187c68fe68f1f2e291ca7914e8c09b8ea4629d99d07d7944ece82f17480b8d3 0022-ARM-dts-exynos-snow-add-atmel-mxt-touchpad.patch
|
||||
1635817e35e26c4d40cc9373361cedb46f1fd6325871cf1b1cd9c8cfa52869cf8f0d7043e2ab861896fe298e29ff7523ebb1fd71cd00a6868315d001d9aa16d5 0023-ARM-dts-exynos-snow-add-jack-detection.patch
|
||||
1d952aabafd7e885e8e1f2ee53d4f82d634ca48df4f9c7536d52d4c73f2606fca07e6a963dd65a0f99e607ec954f2c99075dca85ea3a25b583db13a8d9159963 0024-ARM-dts-exynos-peach-pit-add-jack-detection.patch
|
||||
312426ee2ce6c31f28374ac6b43e373c61a735ba9c064e79494e953a64adcbfe989aeb120480f942f945a2896992ed7712ebc63d3bfa966f55b8510762aa703e 0025-ARM-dts-exynos-peach-pi-add-jack-detection.patch
|
||||
9d54e0fd3550c86c51f42888f0eadbd1820aa0de1c2aa6d616b735943726a53c9c50490cb53af2739216cf27d98eafbc31731fbae5096d0e599c1af134e15ae3 0026-ARM-dts-exynos-snow-add-usb-hub.patch
|
||||
3e0f029bb73918169b47cfc14545a6d226118a1b85d9033dfa3943cd45d4568ee9bebde24db21060092177eda3becec138856b12ede2f4953f2c2fa9614e3617 0027-drm-set-DRM_RENDER_ALLOW-flag-on-DRM_IOCTL_MODE_CREA.patch
|
||||
c0eef95b54101623e49172310d71eacff803465025c8350b64ab4628d3449455fa79e96ea803a8105efed2241c6fb98b79c9883b19ae86f407b87c2a0b1e2255 0028-ARM-dma-mapping-implement-alloc_noncontiguous.patch
|
||||
844862cdf4aae3e673c51faf48735382d03cb7312884fa0fa050245898c15cd618ebf5aa3e996e978a2d125b61212a3614f38572a42abc76a0bcde1d970f5c23 0029-iommu-io-pgtable-arm-Fix-coherency-support-for-Mali-.patch
|
||||
343b7aa611249712e22c02dfd4ef54b23ab0fdc750c6cb6630bde3eee9496ccb60afb409fcf9da4c2211541852fa516238432cc240bcfd4d50566d117714f1e6 0030-media-s5p-mfc-Allow-cache-hints-for-queues.patch
|
||||
52aff179b2f87a423d2ea9ab7f002a094bbf1d90ca6037e6038e8ed754acd1124673842add125c1dbec34dab790b648e0cc6b4b578423457411c379d200253dc 0031-soc-samsung-pm_domains-Bring-back-old-driver-impleme.patch
|
||||
19a0ec83153f8660566919f2bf54058495686e2d1b5cefe4571264df8cd4c5131ff0da45e81a89e414a0978e5a58d59a57d9756feaba02f42db2fdb4c21e4c41 0032-dt-bindings-arm-samsung-document-Klimt-LTE-board-bin.patch
|
||||
5f3f50ba65e517672311dd25edba6c6c7ec25afcd57e185437f6fb17dfee3cb2e457cc832f09f2848955eeca702093fe93c9341ddd52050acc7a6ba861775fe1 0033-ARM-dts-Add-support-for-Samsung-Klimt-LTE.patch
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue