mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
A patch series for moving MIPI-DSI driver for Exynos DRM to drm/bridge
directory so that I.MX SoC family can also share the same device driver. Samsung MIPI DSIM device is a common IP that can be used by Exynos and I.MX8M Mini/Nano/Plus SoC. Regarding this, this patch series has added several things below to existing MIPI DSI driver, - Add exynos_dsi_type enum type to provide controller data from different platforms. - Add two pipeline detection ways support - existing Exynos DSI child node and I.MX family of-graph port or ports. - Consider component and bridged based DRM drivers. - Add device tree binding support of I.MX family. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEENRKOoF7NhdPGpscnVzg0iQxDErgFAmQiTyAACgkQVzg0iQxD ErhBoRAAjZ80lFg2BNb79uE2DmWaS1DWwfil7rfdv1U7rpgEA2i7ffwmtU3Mpm/L TpAfZsgoosYx2f1FvvPC2PnKhOAn5uAHTXA8sajNMyzxh4EDVPzOmG44oin99SF6 TkkgDf8FAL9V/3gH0gwcv59Qfi4b/3d6wYErERe4xZK2dN54zw9vE70p3cVgmjen /faWgAI83bjdbxuFI7wgBA2d9LZXnUwLSYVQ4c5lDsO87blOCe0dOUo1bR34+cl1 jdP3fTpX+1pvaMKLtllFPdlYpiVwSu48WWuDUpJvar6lmv+kfJLuL6O9TtZncQ2Z wEHHRhxSrt3YXoOL2w1zZCvIRvuDVmTMJsMtUdMkQS2UvtesnVg6k/FtNsdndxI/ FRNw8qkYx631E92rh3828XOVz0V7hB0ZKRSw7cab4cPljpSKr4IUeq9BNSY0Qo0X mAoMLLp8ol8Yr2Fpq+6F/fp7gldsH4rVFqtHMTJ614wJXpFGZtOlV2YOxMQ5x1lD 6dp4TpEAWvIrOfbWGf0Tafw6ewzxhxCwuf9T/zG7BEj3Uns/AnCk6OZdOJFGkFA3 M18b6Y8c/ccgicH324Q5NKVR0wcLmrTRftUbKBREg8WX1a8tAynvclcijhBnWrOy Z8SzetsKPthBcJ0JIEqRsUAhb2HLRUJwzSJh3wJ6N7xdyRU5vto= =6pUP -----END PGP SIGNATURE----- Merge tag 'exynos-drm-next-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next A patch series for moving MIPI-DSI driver for Exynos DRM to drm/bridge directory so that I.MX SoC family can also share the same device driver. Samsung MIPI DSIM device is a common IP that can be used by Exynos and I.MX8M Mini/Nano/Plus SoC. Regarding this, this patch series has added several things below to existing MIPI DSI driver, - Add exynos_dsi_type enum type to provide controller data from different platforms. - Add two pipeline detection ways support - existing Exynos DSI child node and I.MX family of-graph port or ports. - Consider component and bridged based DRM drivers. - Add device tree binding support of I.MX family. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Inki Dae <inki.dae@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230328040524.49278-1-inki.dae@samsung.com
This commit is contained in:
commit
2fcc1fa5f9
|
|
@ -7,6 +7,8 @@ Required properties:
|
|||
"samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
|
||||
"samsung,exynos5422-mipi-dsi" /* for Exynos5422/5800 SoCs */
|
||||
"samsung,exynos5433-mipi-dsi" /* for Exynos5433 SoCs */
|
||||
"fsl,imx8mm-mipi-dsim" /* for i.MX8M Mini/Nano SoCs */
|
||||
"fsl,imx8mp-mipi-dsim" /* for i.MX8M Plus SoCs */
|
||||
- reg: physical base address and length of the registers set for the device
|
||||
- interrupts: should contain DSI interrupt
|
||||
- clocks: list of clock specifiers, must contain an entry for each required
|
||||
|
|
|
|||
|
|
@ -6624,6 +6624,15 @@ T: git git://anongit.freedesktop.org/drm/drm-misc
|
|||
F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml
|
||||
F: drivers/gpu/drm/panel/panel-samsung-db7430.c
|
||||
|
||||
DRM DRIVER FOR SAMSUNG MIPI DSIM BRIDGE
|
||||
M: Inki Dae <inki.dae@samsung.com>
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
M: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
S: Maintained
|
||||
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||
F: drivers/gpu/drm/bridge/samsung-dsim.c
|
||||
F: include/drm/bridge/samsung-dsim.h
|
||||
|
||||
DRM DRIVER FOR SAMSUNG S6D27A1 PANELS
|
||||
M: Markuss Broks <markuss.broks@gmail.com>
|
||||
S: Maintained
|
||||
|
|
|
|||
|
|
@ -220,6 +220,18 @@ config DRM_PARADE_PS8640
|
|||
The PS8640 is a high-performance and low-power
|
||||
MIPI DSI to eDP converter
|
||||
|
||||
config DRM_SAMSUNG_DSIM
|
||||
tristate "Samsung MIPI DSIM bridge driver"
|
||||
depends on COMMON_CLK
|
||||
depends on OF && HAS_IOMEM
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_MIPI_DSI
|
||||
select DRM_PANEL_BRIDGE
|
||||
help
|
||||
The Samsung MIPI DSIM bridge controller driver.
|
||||
This MIPI DSIM bridge can be found it on Exynos SoCs and
|
||||
NXP's i.MX8M Mini/Nano.
|
||||
|
||||
config DRM_SIL_SII8620
|
||||
tristate "Silicon Image SII8620 HDMI/MHL bridge"
|
||||
depends on OF
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v
|
|||
obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o
|
||||
obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o
|
||||
obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o
|
||||
obj-$(CONFIG_DRM_SAMSUNG_DSIM) += samsung-dsim.o
|
||||
obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o
|
||||
obj-$(CONFIG_DRM_SII902X) += sii902x.o
|
||||
obj-$(CONFIG_DRM_SII9234) += sii9234.o
|
||||
|
|
|
|||
1967
drivers/gpu/drm/bridge/samsung-dsim.c
Normal file
1967
drivers/gpu/drm/bridge/samsung-dsim.c
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -59,6 +59,7 @@ config DRM_EXYNOS_DSI
|
|||
depends on DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON
|
||||
select DRM_MIPI_DSI
|
||||
select DRM_PANEL
|
||||
select DRM_SAMSUNG_DSIM
|
||||
default n
|
||||
help
|
||||
This enables support for Exynos MIPI-DSI device.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
115
include/drm/bridge/samsung-dsim.h
Normal file
115
include/drm/bridge/samsung-dsim.h
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2022 Amarula Solutions(India)
|
||||
* Author: Jagan Teki <jagan@amarulasolutions.com>
|
||||
*/
|
||||
|
||||
#ifndef __SAMSUNG_DSIM__
|
||||
#define __SAMSUNG_DSIM__
|
||||
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_mipi_dsi.h>
|
||||
|
||||
struct samsung_dsim;
|
||||
|
||||
#define DSIM_STATE_ENABLED BIT(0)
|
||||
#define DSIM_STATE_INITIALIZED BIT(1)
|
||||
#define DSIM_STATE_CMD_LPM BIT(2)
|
||||
#define DSIM_STATE_VIDOUT_AVAILABLE BIT(3)
|
||||
|
||||
enum samsung_dsim_type {
|
||||
DSIM_TYPE_EXYNOS3250,
|
||||
DSIM_TYPE_EXYNOS4210,
|
||||
DSIM_TYPE_EXYNOS5410,
|
||||
DSIM_TYPE_EXYNOS5422,
|
||||
DSIM_TYPE_EXYNOS5433,
|
||||
DSIM_TYPE_IMX8MM,
|
||||
DSIM_TYPE_IMX8MP,
|
||||
DSIM_TYPE_COUNT,
|
||||
};
|
||||
|
||||
#define samsung_dsim_hw_is_exynos(hw) \
|
||||
((hw) >= DSIM_TYPE_EXYNOS3250 && (hw) <= DSIM_TYPE_EXYNOS5433)
|
||||
|
||||
struct samsung_dsim_transfer {
|
||||
struct list_head list;
|
||||
struct completion completed;
|
||||
int result;
|
||||
struct mipi_dsi_packet packet;
|
||||
u16 flags;
|
||||
u16 tx_done;
|
||||
|
||||
u8 *rx_payload;
|
||||
u16 rx_len;
|
||||
u16 rx_done;
|
||||
};
|
||||
|
||||
struct samsung_dsim_driver_data {
|
||||
const unsigned int *reg_ofs;
|
||||
unsigned int plltmr_reg;
|
||||
unsigned int has_freqband:1;
|
||||
unsigned int has_clklane_stop:1;
|
||||
unsigned int num_clks;
|
||||
unsigned int max_freq;
|
||||
unsigned int wait_for_reset;
|
||||
unsigned int num_bits_resol;
|
||||
unsigned int pll_p_offset;
|
||||
const unsigned int *reg_values;
|
||||
};
|
||||
|
||||
struct samsung_dsim_host_ops {
|
||||
int (*register_host)(struct samsung_dsim *dsim);
|
||||
void (*unregister_host)(struct samsung_dsim *dsim);
|
||||
int (*attach)(struct samsung_dsim *dsim, struct mipi_dsi_device *device);
|
||||
void (*detach)(struct samsung_dsim *dsim, struct mipi_dsi_device *device);
|
||||
irqreturn_t (*te_irq_handler)(struct samsung_dsim *dsim);
|
||||
};
|
||||
|
||||
struct samsung_dsim_plat_data {
|
||||
enum samsung_dsim_type hw_type;
|
||||
const struct samsung_dsim_host_ops *host_ops;
|
||||
};
|
||||
|
||||
struct samsung_dsim {
|
||||
struct mipi_dsi_host dsi_host;
|
||||
struct drm_bridge bridge;
|
||||
struct drm_bridge *out_bridge;
|
||||
struct device *dev;
|
||||
struct drm_display_mode mode;
|
||||
|
||||
void __iomem *reg_base;
|
||||
struct phy *phy;
|
||||
struct clk **clks;
|
||||
struct regulator_bulk_data supplies[2];
|
||||
int irq;
|
||||
struct gpio_desc *te_gpio;
|
||||
|
||||
u32 pll_clk_rate;
|
||||
u32 burst_clk_rate;
|
||||
u32 esc_clk_rate;
|
||||
u32 lanes;
|
||||
u32 mode_flags;
|
||||
u32 format;
|
||||
|
||||
int state;
|
||||
struct drm_property *brightness;
|
||||
struct completion completed;
|
||||
|
||||
spinlock_t transfer_lock; /* protects transfer_list */
|
||||
struct list_head transfer_list;
|
||||
|
||||
const struct samsung_dsim_driver_data *driver_data;
|
||||
const struct samsung_dsim_plat_data *plat_data;
|
||||
|
||||
void *priv;
|
||||
};
|
||||
|
||||
extern int samsung_dsim_probe(struct platform_device *pdev);
|
||||
extern int samsung_dsim_remove(struct platform_device *pdev);
|
||||
extern const struct dev_pm_ops samsung_dsim_pm_ops;
|
||||
|
||||
#endif /* __SAMSUNG_DSIM__ */
|
||||
Loading…
Reference in New Issue
Block a user