Add support for Tianma nt36672a video mode panel
Subsystems (4)
cover Add support for Tianma nt36672a video mode panel
Some Poco F1 phones from Xiaomi have an nt36672a video mode panel; add support for the same.
Most of the panel data is taken from downstream panel dts, and is converted to drm-panel based driver by me.
It has been validated with v5.8-rc5 on Poco F1 phone; my tree with other dependent patches is here [1]
[1]: https://git.linaro.org/people/sumit.semwal/linux-dev.git/log/?h=dev/poco-panel-upstreaming
Sumit Semwal (2):
dt-bindings: display: panel: Add bindings for Tianma nt36672a panel
drm: panel: Add tianma nt36672a panel driver
.../display/panel/tianma,nt36672a.yaml | 110 +++ MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tianma-nt36672a.c | 859 ++++++++++++++++++ 5 files changed, 988 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml create mode 100644 drivers/gpu/drm/panel/panel-tianma-nt36672a.c
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/2 dt-bindings: display: panel: Add bindings for Tianma nt36672a panel
The nt36672a panel from Tianma is a FHD+ panel with a resolution of 1080x2246 and 6.18 inches size. It is found in some of the Poco F1 phones.
--- .../display/panel/tianma,nt36672a.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +110 -0
@@ -0,0 +1,110 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/tianma,nt36672a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tianma model NT36672A DSI Panel display driver + +maintainers: + - Sumit Semwal <[email protected]> + +description: | + The nt36672a panel from Tianma is a FHD+ LCD display panel with a resolution + of 1080x2246. It is a video mode DSI panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: tianma,nt36672a + + reg: + description: DSI virtual channel of the peripheral + + reset-gpios: + description: phandle of gpio for reset line - This should be 8mA, gpio + can be configured using mux, pinctrl, pinctrl-names (active high) + + vddio-supply: + description: phandle of the regulator that provides the supply voltage + Power IC supply + + vddpos-supply: + description: phandle of the positive boost supply regulator + + vddneg-supply: + description: phandle of the negative boost supply regulator + + pinctrl-names: + description: Pinctrl for panel active and suspend + + pinctrl-0: + description: Active pinctrls + + pinctrl-1: + description: Suspend pinctrls + + ports: + type: object + properties: + port@0: + type: object + description: DSI input port driven by master DSI + properties: + reg: + const: 0 + + required: + - reg + +required: + - compatible + - reg + - vddi0-supply + - vddpos-supply + - vddneg-supply + - reset-gpios + - pinctrl-names + - pinctrl-0 + - pinctrl-1 + - ports + +unevaluatedProperties: false + +examples: + - |+ + #include <dt-bindings/gpio/gpio.h> + dsi0 { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "tianma,nt36672a"; + reg = <0>; + vddi0-supply = <&vreg_l14a_1p88>; + vddpos-supply = <&lab>; + vddneg-supply = <&ibb>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "panel_active", "panel_suspend"; + pinctrl-0 = <&sde_dsi_active>; + pinctrl-1 = <&sde_dsi_suspend>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + tianma_nt36672a_in_0: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; + }; + +...
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerRe: [PATCH 1/2] dt-bindings: display: panel: Add bindings for Tianma nt36672a panel
Quoted 52 lines · Sumit Semwal
The nt36672a panel from Tianma is a FHD+ panel with a resolution of 1080x2246 and 6.18 inches size. It is found in some of the Poco F1 phones.
Signed-off-by Sumit Semwal <[email protected]>--- .../display/panel/tianma,nt36672a.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yamlDocumentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +37
-0@@ -0,0 +1,110 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/tianma,nt36672a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tianma model NT36672A DSI Panel display driver + +maintainers: + - Sumit Semwal <[email protected]> + +description: | + The nt36672a panel from Tianma is a FHD+ LCD display panel with a resolution + of 1080x2246. It is a video mode DSI panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: tianma,nt36672a + + reg: + description: DSI virtual channel of the peripheral + + reset-gpios: + description: phandle of gpio for reset line - This should be 8mA, gpio + can be configured using mux, pinctrl, pinctrl-names (active high) + + vddio-supply: + description: phandle of the regulator that provides the supply voltage + Power IC supply + + vddpos-supply: + description: phandle of the positive boost supply regulator + + vddneg-supply:
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml line 47
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +10
-0+ description: phandle of the negative boost supply regulator + + pinctrl-names: + description: Pinctrl for panel active and suspend + + pinctrl-0: + description: Active pinctrls + + pinctrl-1: + description: Suspend pinctrls
I think the pinctrl should go in the DSI controller node, not the display unless it is settings for 'reset-gpios'.
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml line 60
Quoted 13 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +13
-0+ + ports: + type: object + properties: + port@0: + type: object + description: DSI input port driven by master DSI + properties: + reg: + const: 0 + + required: + - reg
For a single port, you can do just 'port' (without ports node).
Quoted 9 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +9
-0+ +required: + - compatible + - reg + - vddi0-supply + - vddpos-supply + - vddneg-supply + - reset-gpios + - pinctrl-names
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml line 79
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +10
-0+ - pinctrl-0 + - pinctrl-1 + - ports + +unevaluatedProperties: false + +examples: + - |+ + #include <dt-bindings/gpio/gpio.h> + dsi0 {
dsi {
Quoted 34 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +31
-0+ #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "tianma,nt36672a"; + reg = <0>; + vddi0-supply = <&vreg_l14a_1p88>; + vddpos-supply = <&lab>; + vddneg-supply = <&ibb>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "panel_active", "panel_suspend"; + pinctrl-0 = <&sde_dsi_active>; + pinctrl-1 = <&sde_dsi_suspend>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + tianma_nt36672a_in_0: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; + }; + +...Signature · 1 line
2.27.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/2] dt-bindings: display: panel: Add bindings for Tianma nt36672a panel
Hello Rob,
Thanks for the review!
Quoted 59 lines · Rob Herring
Quoted 57 lines · Sumit Semwal
The nt36672a panel from Tianma is a FHD+ panel with a resolution of 1080x2246 and 6.18 inches size. It is found in some of the Poco F1 phones.
Signed-off-by Sumit Semwal <[email protected]>--- .../display/panel/tianma,nt36672a.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yamlDocumentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +42
-0@@ -0,0 +1,110 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/tianma,nt36672a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tianma model NT36672A DSI Panel display driver + +maintainers: + - Sumit Semwal <[email protected]> + +description: | + The nt36672a panel from Tianma is a FHD+ LCD display panel with a resolution + of 1080x2246. It is a video mode DSI panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: tianma,nt36672a + + reg: + description: DSI virtual channel of the peripheral + + reset-gpios: + description: phandle of gpio for reset line - This should be 8mA, gpio + can be configured using mux, pinctrl, pinctrl-names (active high) + + vddio-supply: + description: phandle of the regulator that provides the supply voltage + Power IC supply + + vddpos-supply: + description: phandle of the positive boost supply regulator + + vddneg-supply: + description: phandle of the negative boost supply regulator + + pinctrl-names: + description: Pinctrl for panel active and suspend +
Quoted 8 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml line 47
Quoted 5 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +5
-0+ pinctrl-0: + description: Active pinctrls + + pinctrl-1: + description: Suspend pinctrlsI think the pinctrl should go in the DSI controller node, not the display unless it is settings for 'reset-gpios'.
Yes, from the downstream code, this seems to be for reset-gpios.
Quoted 16 lines
Quoted 4 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +3
-0+ + ports: + type: objectDocumentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml line 60
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +10
-0+ properties: + port@0: + type: object + description: DSI input port driven by master DSI + properties: + reg: + const: 0 + + required: + - regFor a single port, you can do just 'port' (without ports node).
Thanks; will update in next version.
Quoted 49 lines
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +9
-0+ +required: + - compatible + - reg + - vddi0-supply + - vddpos-supply + - vddneg-supply + - reset-gpios + - pinctrl-namesDocumentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml line 79
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +10
-0+ - pinctrl-0 + - pinctrl-1 + - ports + +unevaluatedProperties: false + +examples: + - |+ + #include <dt-bindings/gpio/gpio.h> + dsi0 {dsi {
Quoted 26 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +26
-0+ #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "tianma,nt36672a"; + reg = <0>; + vddi0-supply = <&vreg_l14a_1p88>; + vddpos-supply = <&lab>; + vddneg-supply = <&ibb>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "panel_active", "panel_suspend"; + pinctrl-0 = <&sde_dsi_active>; + pinctrl-1 = <&sde_dsi_suspend>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + tianma_nt36672a_in_0: endpoint { + remote-endpoint = <&dsi0_out>; + }; + };
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file +5
-1+ }; + }; + }; + +... --2.27.0
Best,
Sumit.
PATCH 2/2 drm: panel: Add tianma nt36672a panel driver
In reply to Sumit SemwalSome Poco F1 phones have an LCD panel from Tianma, model nt36672a, with a resolution of 1080x2246 that operates in DSI video mode.
Add the drm panel driver for it.
During testing, Benni Steini <[email protected]> helped us fix the reset sequence timing (from 10ms to 20ms), to get the bootanimation to work on Android.
--- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tianma-nt36672a.c | 859 ++++++++++++++++++ 4 files changed, 878 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tianma-nt36672a.c
MAINTAINERS +7 -0
@@ -5544,6 +5544,13 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.txt F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR TIANMA NT36672A PANELS +M: Sumit Semwal <[email protected]> +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: Documentation/devicetree/bindings/display/panel/tianma,nt36672a-panel.yaml +F: drivers/gpu/drm/panel/panel-tianma-nt36672a.c + DRM DRIVER FOR TDFX VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/tdfx/
drivers/gpu/drm/panel/Kconfig +11 -0
@@ -437,6 +437,17 @@ config DRM_PANEL_TPO_TD043MTEA1 Say Y here if you want to enable support for TPO TD043MTEA1 800x480 4.3" panel (found on the OMAP3 Pandora board). +config DRM_PANEL_TIANMA_FHD_NT36672A + tristate "TIANMA NT36672A panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Tianma NT36672A + panel. It is seen mostly in Xiaomi Poco F1 mobile phone. + The panel has a 1080x2246 resolution and uses 24 bit RGB per pixel. + It provides a MIPI DSI interface to the host. + config DRM_PANEL_TPO_TPG110 tristate "TPO TPG 800x400 panel" depends on OF && SPI && GPIOLIB
drivers/gpu/drm/panel/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o +obj-$(CONFIG_DRM_PANEL_TIANMA_FHD_NT36672A) += panel-tianma-nt36672a.o obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o
drivers/gpu/drm/panel/panel-tianma-nt36672a.c new file +859 -0
859 lines not on this page · raw message
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel