Add displays support for bsh-smm-s2/pro boards
Subsystems (9)
v2 cover Add displays support for bsh-smm-s2/pro boards
The series adds drivers for the displays used by bsh-smm-s2/pro boards. This required applying some patches to the samsung-dsim driver and the drm_bridge.c module.
Changes in v2:
- Add $ref to panel-common.yaml
- Drop port, reset-gpios, and backlight
- Set port and backlight ad required
- Replace additionalProperties with unevaluatedProperties
- Adjust the timings of the panel reset
- Adjust the mipi_dsi node based on the latest patches merged into the mainline in the dtsi files it includes.
- Added to the series the following patches:
- 0001 drm/bridge: Fix bridge disable logic
- 0002 drm/bridge: Fix a use case in the bridge disable logic
- 0003 samsung-dsim: enter display mode in the enable() callback
- 0004 drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting
Dario Binacchi (4):
drm/bridge: Fix bridge disable logic
drm/bridge: Fix a use case in the bridge disable logic
drm: bridge: samsung-dsim: enter display mode in the enable() callback
drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting
Michael Trimarchi (7):
dt-bindings: display: panel: Add synaptics r63353 panel controller drm/panel: Add Synaptics R63353 panel driver
dt-bindings: display: panel: Add Ilitek ili9805 panel controller drm/panel: Add Ilitek ILI9805 panel driver
dt-bindings: ili9805: add compatible string for Tianma TM041XDHG01 drm/panel: ilitek-ili9805: add support for Tianma TM041XDHG01 panel
arm64: dts: imx8mn-bsh-smm-s2/pro: add display setup
.../display/panel/ilitek,ili9805.yaml | 64 +++ .../display/panel/synaptics,r63353.yaml | 61 +++ MAINTAINERS | 12 + .../freescale/imx8mn-bsh-smm-s2-common.dtsi | 1 + .../freescale/imx8mn-bsh-smm-s2-display.dtsi | 121 +++++ drivers/gpu/drm/bridge/samsung-dsim.c | 14 +- drivers/gpu/drm/drm_bridge.c | 9 +- drivers/gpu/drm/panel/Kconfig | 18 + drivers/gpu/drm/panel/Makefile | 2 + drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 418 ++++++++++++++++++ .../gpu/drm/panel/panel-synaptics-r63353.c | 375 ++++++++++++++++ 11 files changed, 1088 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml create mode 100644 Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9805.c create mode 100644 drivers/gpu/drm/panel/panel-synaptics-r63353.c
Signature · 1 line
2.42.0
PATCH v2 1/11 drm/bridge: Fix bridge disable logic
As explained by the comment of the fixed code, we need to find the next bridge that hasn't set the "pre_enable_prev_first" flag to true. The code, on the contrary, was doing the opposite.
So, the order of disabling the bridges couldn't be altered as required by setting the "pre_enable_prev_first" flag to true.
---
(no changes since v1)
drivers/gpu/drm/drm_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_bridge.c +1 -1
@@ -686,7 +686,7 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge,*/ list_for_each_entry_from (next, &encoder->bridge_chain, chain_node) { -if (next->pre_enable_prev_first) { +if (!next->pre_enable_prev_first) { next =list_prev_entry (next, chain_node); limit = next;break ;
Signature · 1 line
2.42.0
PATCH v2 2/11 drm/bridge: Fix a use case in the bridge disable logic
In reply to Dario BinacchiThe patch fixes the code for finding the next bridge with the "pre_enable_prev_first" flag set to false. In case this condition is not verified, i. e. there is no subsequent bridge with the flag set to false, the whole bridge list is traversed, invalidating the "next" variable.
The use of a new iteration variable (i. e. "iter") ensures that the value of the "next" variable is not invalidated.
---
(no changes since v1)
drivers/gpu/drm/drm_bridge.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_bridge.c +5 -4
@@ -662,7 +662,7 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, struct drm_atomic_state *old_state) {struct drm_encoder *encoder; -struct drm_bridge *next, *limit; +struct drm_bridge *iter, *next, *limit;if (!bridge)return ;
@@ -680,14 +680,15 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge,* was enabled first, so disabled last */ limit = next; + iter = next;/* Find the next bridge that has NOT requested * prev to be enabled first / disabled last */ -list_for_each_entry_from (next, &encoder->bridge_chain, +list_for_each_entry_from (iter, &encoder->bridge_chain, chain_node) { -if (!next->pre_enable_prev_first) { - next =list_prev_entry (next, chain_node); +if (!iter->pre_enable_prev_first) { + next =list_prev_entry (iter, chain_node); limit = next;break ; }
Signature · 1 line
2.42.0
PATCH v2 3/11 drm: bridge: samsung-dsim: enter display mode in the enable() callback
In reply to Dario BinacchiThe synaptics-r63353 (panel-bridge) can only be configured in command mode. So, samsung-dsim (bridge) must not be in display mode during the prepare()/unprepare() of the panel-bridge. Setting the "pre_enable_prev_first" flag to true allows the prepare() of the panel-bridge to be called between the pre_enabled() and enabled() of the bridge. So, the bridge can enter display mode only in the enabled(). The unprepare() of the panel-bridge is instead called between the disable() and post_disable() of the bridge. So, the disable() must exit the display mode (i .e. enter command mode) to allow the panel-bridge to receive DSI commands.
samsung_dsim_atomic_pre_enable -> command mode r63353_panel_prepare -> send DSI commands samsung_dsim_atomic_enable -> enter display mode
samsung_dsim_atomic_disable -> exit display mode (command mode)r63353_panel_unprepare -> send DSI commandssamsung_dsim_atomic_post_disable
---
(no changes since v1)
drivers/gpu/drm/bridge/samsung-dsim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/samsung-dsim.c +5 -2
@@ -1494,7 +1494,6 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge,return ;samsung_dsim_set_display_mode (dsi); -samsung_dsim_set_display_enable (dsi, true); } }
@@ -1507,6 +1506,7 @@ static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,samsung_dsim_set_display_mode (dsi);samsung_dsim_set_display_enable (dsi, true); }else { +samsung_dsim_set_display_enable (dsi, true);samsung_dsim_set_stop_state (dsi, false); }
@@ -1524,6 +1524,8 @@ static void samsung_dsim_atomic_disable(struct drm_bridge *bridge,if (!samsung_dsim_hw_is_exynos (dsi->plat_data->hw_type))samsung_dsim_set_stop_state (dsi, true); +samsung_dsim_set_display_enable (dsi, false); + dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE ; }
@@ -1532,7 +1534,8 @@ static void samsung_dsim_atomic_post_disable(struct drm_bridge *bridge, {struct samsung_dsim *dsi =bridge_to_dsi (bridge); -samsung_dsim_set_display_enable (dsi, false); +if (!samsung_dsim_hw_is_exynos (dsi->plat_data->hw_type)) +samsung_dsim_set_stop_state (dsi, true); dsi->state &= ~DSIM_STATE_ENABLED ;pm_runtime_put_sync (dsi->dev);
Signature · 1 line
2.42.0
PATCH v2 4/11 drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting
In reply to Dario BinacchiThe patch completes the setting of CLKLANE_STOP for the imx8mn and imx8mp platforms (i. e. not exynos).
---
(no changes since v1)
drivers/gpu/drm/bridge/samsung-dsim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/bridge/samsung-dsim.c +6 -1
@@ -96,6 +96,7 @@#define DSIM_MFLUSH_VS BIT(29)/* This flag is valid only for exynos3250/3472/5260/5430 */ #define DSIM_CLKLANE_STOP BIT(30) +#define DSIM_NON_CONTINUOUS_CLKLANE BIT(31)/* DSIM_ESCMODE */ #define DSIM_TX_TRIGGER_RST BIT(4)
@@ -945,8 +946,12 @@ static int samsung_dsim_init_link(struct samsung_dsim *dsi)* power consumption. */ if (driver_data->has_clklane_stop && - dsi->mode_flags &MIPI_DSI_CLOCK_NON_CONTINUOUS ) + dsi->mode_flags &MIPI_DSI_CLOCK_NON_CONTINUOUS ) { +if (!samsung_dsim_hw_is_exynos (dsi->plat_data->hw_type)) + reg |=DSIM_NON_CONTINUOUS_CLKLANE ; + reg |=DSIM_CLKLANE_STOP ; + }samsung_dsim_write (dsi,DSIM_CONFIG_REG , reg); lanes_mask =BIT (dsi->lanes) -1 ;
Signature · 1 line
2.42.0
PATCH v2 5/11 dt-bindings: display: panel: Add synaptics r63353 panel controller
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
Add documentation for "synaptics,r63353" panel.
---
Changes in v2:
- Add $ref to panel-common.yaml
- Drop port, reset-gpios, and backlight
- Set port and backlight ad required
- Replace additionalProperties with unevaluatedProperties
.../display/panel/synaptics,r63353.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml
Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml new file +61 -0
@@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/synaptics,r63353.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synaptics R63353 based MIPI-DSI panels + +maintainers: + - Michael Trimarchi <[email protected]> + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - enum: + - sharp,ls068b3sx02 + - const: synaptics,r63353 + + avdd-supply: true + dvdd-supply: true + reg: true + +required: + - compatible + - avdd-supply + - dvdd-supply + - reg + - reset-gpios + - port + - backlight + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "sharp,ls068b3sx02", "synaptics,r63353"; + reg = <0>; + avdd-supply = <&avdd_display>; + dvdd-supply = <&dvdd_display>; + reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL05 */ + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&mipi_dsi_out>; + }; + }; + }; + }; + +...
Signature · 1 line
2.42.0
Re: [PATCH v2 05/11] dt-bindings: display: panel: Add synaptics r63353 panel controller
Quoted 6 lines · Dario Binacchi
From: Michael Trimarchi <[email protected]>
Add documentation for "synaptics,r63353" panel.
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Dario Binacchi <[email protected]>
Best regards,
Krzysztof
PATCH v2 6/11 drm/panel: Add Synaptics R63353 panel driver
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
The LS068B3SX02 panel is based on the Synaptics R63353 Controller. Add a driver for it.
---
Changes in v2:
- Adjust the timings of the panel reset
MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-synaptics-r63353.c | 375 ++++++++++++++++++ 4 files changed, 391 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-synaptics-r63353.c
MAINTAINERS +6 -0
@@ -6875,6 +6875,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.yaml F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR SYNAPTICS R63353 PANELS +M: Michael Trimarchi <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml +F: drivers/gpu/drm/panel/panel-synaptics-r63353.c + DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE M: Jagan Teki <[email protected]> S: Maintained
drivers/gpu/drm/panel/Kconfig +9 -0
@@ -735,6 +735,15 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_SYNAPTICS_R63353 + tristate "Synaptics R63353-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Synaptics R63353 controller. + config DRM_PANEL_SONY_ACX565AKM tristate "Sony ACX565AKM panel" depends on GPIOLIB && OF && SPI
drivers/gpu/drm/panel/Makefile +1 -0
@@ -74,6 +74,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt35521.o
drivers/gpu/drm/panel/panel-synaptics-r63353.c new file +375 -0
375 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH v2 7/11 dt-bindings: display: panel: Add Ilitek ili9805 panel controller
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
Add documentation for "ilitek,ili9805" panel.
---
Changes in v2:
- Add $ref to panel-common.yaml
- Drop port, reset-gpios, and backlight
- Set port and backlight ad required
- Replace additionalProperties with unevaluatedProperties
.../display/panel/ilitek,ili9805.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml
Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml new file +63 -0
@@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/ilitek,ili9805.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek ILI9805 based MIPI-DSI panels + +maintainers: + - Michael Trimarchi <[email protected]> + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - enum: + - giantplus,gpm1790a0 + - const: ilitek,ili9805 + + avdd-supply: true + dvdd-supply: true + power-supply: true + reg: true + +required: + - compatible + - avdd-supply + - dvdd-supply + - reg + - reset-gpios + - port + - backlight + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "giantplus,gpm1790a0", "ilitek,ili9805"; + reg = <0>; + power-supply = <®_display>; + avdd-supply = <&avdd_display>; + dvdd-supply = <&dvdd_display>; + reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL05 */ + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&mipi_dsi_out>; + }; + }; + }; + }; + +...
Signature · 1 line
2.42.0
Re: [PATCH v2 07/11] dt-bindings: display: panel: Add Ilitek ili9805 panel controller
Quoted 39 lines · Dario Binacchi
From: Michael Trimarchi <[email protected]>
Add documentation for "ilitek,ili9805" panel.
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Dario Binacchi <[email protected]>---
Changes in v2:
- Add $ref topanel-common.yaml
- Drop port, reset-gpios, and backlight
- Set port and backlight ad required
- Replace additionalProperties with unevaluatedProperties.../display/panel/ilitek,ili9805.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yamlDocumentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml new file +14
-0@@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/ilitek,ili9805.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek ILI9805 based MIPI-DSI panels + +maintainers: + - Michael Trimarchi <[email protected]> + +allOf: + - $ref: panel-common.yaml# +
Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml line 24
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml new file +10
-0+properties: + compatible: + items: + - enum: + - giantplus,gpm1790a0 + - const: ilitek,ili9805 + + avdd-supply: true + dvdd-supply: true + power-supply: true
I think power-supply is used as a generic name for cases when specific supplies are not defined. If you define some specific supplies, then don't use generic.
Best regards,
Krzysztof
PATCH v2 8/11 drm/panel: Add Ilitek ILI9805 panel driver
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
The GPM1790A0 panel is based on the Ilitek ILI9805 Controller. Add a driver for it.
---
(no changes since v1)
MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 365 +++++++++++++++++++ 4 files changed, 381 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9805.c
MAINTAINERS +6 -0
@@ -6647,6 +6647,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ilitek,ili9486.yaml F: drivers/gpu/drm/tiny/ili9486.c +DRM DRIVER FOR ILITEK ILI9805 PANELS +M: Michael Trimarchi <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml +F: drivers/gpu/drm/panel/panel-ilitek-ili9805.c + DRM DRIVER FOR JADARD JD9365DA-H3 MIPI-DSI LCD PANELS M: Jagan Teki <[email protected]> S: Maintained
drivers/gpu/drm/panel/Kconfig +9 -0
@@ -194,6 +194,15 @@ config DRM_PANEL_ILITEK_ILI9341 QVGA (240x320) RGB panels. support serial & parallel rgb interface. +config DRM_PANEL_ILITEK_ILI9805 + tristate "Ilitek ILI9805-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Ilitek ILI9805 controller. + config DRM_PANEL_ILITEK_ILI9881C tristate "Ilitek ILI9881C-based panels" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -17,6 +17,7 @@ obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9805) += panel-ilitek-ili9805.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9882T) += panel-ilitek-ili9882t.o obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) += panel-innolux-ej030na.o
drivers/gpu/drm/panel/panel-ilitek-ili9805.c new file +365 -0
365 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH v2 9/11 dt-bindings: ili9805: add compatible string for Tianma TM041XDHG01
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
Add Tianma TM041XDHG01 that utilizes an Ilitek ILI9805 controller chip, so its compatible string should be added to ilitek,ili9805 file.
Add the compatible string for it.
---
(no changes since v1)
.../devicetree/bindings/display/panel/ilitek,ili9805.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml +1 -0
@@ -17,6 +17,7 @@ properties: items: - enum: - giantplus,gpm1790a0 + - tianma,tm041xdhg01 - const: ilitek,ili9805 avdd-supply: true
Signature · 1 line
2.42.0
Re: [PATCH v2 09/11] dt-bindings: ili9805: add compatible string for Tianma TM041XDHG01
Quoted 21 lines · Dario Binacchi
From: Michael Trimarchi <[email protected]>
Add Tianma TM041XDHG01 that utilizes an Ilitek ILI9805 controller chip, so its compatible string should be added to ilitek,ili9805 file.
Add the compatible string for it.
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Dario Binacchi <[email protected]>---
(no changes since v1)
.../devicetree/bindings/display/panel/ilitek,ili9805.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml +0
-0
Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml properties: · line 20
Quoted 4 lines
Documentation/devicetree/bindings/display/panel/ilitek,ili9805.yaml +1
-0@@ -17,6 +17,7 @@ properties: items: - enum: - giantplus,gpm1790a0 + - tianma,tm041xdhg01
This should be squashed with previous patch.
Best regards,
Krzysztof
PATCH v2 10/11 drm/panel: ilitek-ili9805: add support for Tianma TM041XDHG01 panel
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
Tianma TM041XDHG01 utilizes the Ilitek ILI9805 controller.
Add this panel's initialzation sequence and timing to ILI9805 driver.
---
(no changes since v1)
drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+)
drivers/gpu/drm/panel/panel-ilitek-ili9805.c +53 -0
@@ -89,6 +89,36 @@ static const struct ili9805_instr gpm1780a0_init[] = { ILI9805_INSTR(0, 0xB9, 0x02, 0x00), }; +static const struct ili9805_instr tm041xdhg01_init[] = { +ILI9805_INSTR (100 ,ILI9805_EXTCMD_CMD_SET_ENABLE_REG ,ILI9805_SETEXTC_PARAMETER1 , +ILI9805_SETEXTC_PARAMETER2 ,ILI9805_SETEXTC_PARAMETER3 ), +ILI9805_INSTR (100 ,0xFD ,0x0F ,0x13 ,0x44 ,0x00 ), +ILI9805_INSTR (0 ,0xf8 ,0x18 ,0x02 ,0x02 ,0x18 ,0x02 ,0x02 ,0x30 ,0x01 , +0x01 ,0x30 ,0x01 ,0x01 ,0x30 ,0x01 ,0x01 ), +ILI9805_INSTR (0 ,0xB8 ,0x74 ), +ILI9805_INSTR (0 ,0xF1 ,0x00 ), +ILI9805_INSTR (0 ,0xF2 ,0x00 ,0x58 ,0x40 ), +ILI9805_INSTR (0 ,0xFC ,0x04 ,0x0F ,0x01 ), +ILI9805_INSTR (0 ,0xEB ,0x08 ,0x0F ), +ILI9805_INSTR (0 ,0xe0 ,0x01 ,0x0d ,0x15 ,0x0e ,0x0f ,0x0f ,0x0b ,0x08 ,0x04 , +0x07 ,0x0a ,0x0d ,0x0c ,0x15 ,0x0f ,0x08 ), +ILI9805_INSTR (0 ,0xe1 ,0x01 ,0x0d ,0x15 ,0x0e ,0x0f ,0x0f ,0x0b ,0x08 ,0x04 , +0x07 ,0x0a ,0x0d ,0x0c ,0x15 ,0x0f ,0x08 ), +ILI9805_INSTR (10 ,0xc1 ,0x15 ,0x03 ,0x03 ,0x31 ), +ILI9805_INSTR (10 ,0xB1 ,0x00 ,0x12 ,0x14 ), +ILI9805_INSTR (10 ,0xB4 ,0x02 ), +ILI9805_INSTR (0 ,0xBB ,0x14 ,0x55 ), +ILI9805_INSTR (0 ,MIPI_DCS_SET_ADDRESS_MODE ,0x0a ), +ILI9805_INSTR (0 ,MIPI_DCS_SET_PIXEL_FORMAT ,0x77 ), +ILI9805_INSTR (0 ,0x20 ), +ILI9805_INSTR (0 ,0xB0 ,0x00 ), +ILI9805_INSTR (0 ,0xB6 ,0x01 ), +ILI9805_INSTR (0 ,0xc2 ,0x11 ), +ILI9805_INSTR (0 ,0x51 ,0xFF ), +ILI9805_INSTR (0 ,0x53 ,0x24 ), +ILI9805_INSTR (0 ,0x55 ,0x00 ), +}; +static inline struct ili9805 *panel_to_ili9805 (struct drm_panel *panel) { return container_of(panel, struct ili9805, panel);
@@ -239,6 +269,20 @@ static const struct drm_display_mode gpm1780a0_timing = { .vtotal = 480 + 2 + 4 + 10, }; +static const struct drm_display_mode tm041xdhg01_timing = { + .clock =26227 , + + .hdisplay =480 , + .hsync_start =480 +10 , + .hsync_end =480 +10 +2 , + .htotal =480 +10 +2 +36 , + + .vdisplay =768 , + .vsync_start =768 +2 , + .vsync_end =768 +10 +4 , + .vtotal =768 +2 +4 +10 , +}; +static int ili9805_get_modes (struct drm_panel *panel,struct drm_connector *connector) {
@@ -343,8 +387,17 @@ static const struct ili9805_desc gpm1780a0_desc = { .height_mm = 65, }; +static const struct ili9805_desc tm041xdhg01_desc = { + .init = tm041xdhg01_init, + .init_length =ARRAY_SIZE (tm041xdhg01_init), + .mode = &tm041xdhg01_timing, + .width_mm =42 , + .height_mm =96 , +}; +static const struct of_device_id ili9805_of_match[] = { { .compatible ="giantplus,gpm1790a0" , .data = &gpm1780a0_desc }, + { .compatible ="tianma,tm041xdhg01" , .data = &tm041xdhg01_desc }, { } };MODULE_DEVICE_TABLE (of, ili9805_of_match);
Signature · 1 line
2.42.0
PATCH v2 11/11 arm64: dts: imx8mn-bsh-smm-s2/pro: add display setup
In reply to Dario BinacchiFrom: Michael Trimarchi <[email protected]>
Add the display and nodes required for its operation.
---
Changes in v2:
- Adjust the mipi_dsi node based on the latest patches merged into the mainline in the dtsi files it includes.
- Added to the series the following patches:
- 0001 drm/bridge: Fix bridge disable logic
- 0002 drm/bridge: Fix a use case in the bridge disable logic
- 0003 samsung-dsim: enter display mode in the enable() callback
- 0004 drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting
.../freescale/imx8mn-bsh-smm-s2-common.dtsi | 1 + .../freescale/imx8mn-bsh-smm-s2-display.dtsi | 121 ++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi +1 -0
@@ -7,6 +7,7 @@ /dts-v1/; #include "imx8mn.dtsi" +#include "imx8mn-bsh-smm-s2-display.dtsi" / { chosen {
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi new file +121 -0
121 lines not on this page · raw message
Signature · 1 line
2.42.0