drm/bridge: Support for Toshiba tc358768 RGB to DSI bridge
Subsystems (4)
v4 cover drm/bridge: Support for Toshiba tc358768 RGB to DSI bridge
Hi,
Changes since v3:
- bindings/example: Fixed the node name
- bindings/example: Added include for GPIO_ACTIVE_LOW and fixed up the gpio binding
- driver: Moved the label for goto in tc358768_calc_pll()
- driver: Replaced the refcounting of enabled with a simple bool as hw_enable() is only called from one place (tc358768_bridge_pre_enable)
- driver: Added Reviewed-by from Andrzej
Changes since v2:
- Implement pre_enable and post_disbale callbacks and move code from enable and disable callbacks.
- hw_enable/disable is removed from tc358768_dsi_host_transfer()
- Defines for DSI_CONFW accesses
- breakout from the loops (the check for it) is moved one level up in tc358768_calc_pll()
Changes since v1:
DT bindings document:
- Removed MaxItems for the regulators
- additionalProperties: false added to port@1
Driver:
- Year is now 2020
- Includes shorted
- The three letter members of the private struct documented 0 they are named as in the datasheet
- Error handling for the IO functions is following what sil-sii8620.c does
- regmap regcache is disabled along with refcache_sync() and volatile callback for regmap
- The hw enable and disable functions got separated
- Taken the suggested simplifactions from Andrzej for tc358768_calc_pll() and tc358768_dsi_host_transfer()
- The driver no longer stores the drm_display_mode, it relies on priv->bridge.encoder->crtc->state->adjusted_mode where it needs it
- tc358768_calc_pll() can be used for verification only to not modify the state
- refcounting added for hw enable state as a dsi transfer was shutting down the bridge when it was already enabled.
Tested on top of drm-next + LED backlight patches + DT patches on dra7-evm with osd101t2045 (panel-simple) and osd101t2587 panel drivers.
Cover letter from v1:
TC358768 is a parallel RGB to MIPI DSI bridge.
The initial driver supports MIPI_DSI_MODE_VIDEO, MIPI_DSI_FMT_RGB888 and only write is implemented for mipi_dsi_host_ops.transfer due to lack of hardware where other modes can be tested.
Regards,
Peter
---
Peter Ujfalusi (2):
dt-bindings: display: bridge: Add documentation for Toshiba tc358768 drm/bridge: Add tc358768 driver
.../display/bridge/toshiba,tc358768.yaml | 159 +++ drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 1044 +++++++++++++++++ 4 files changed, 1214 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml create mode 100644 drivers/gpu/drm/bridge/tc358768.c
Signature · 9 lines
Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 1/2 dt-bindings: display: bridge: Add documentation for Toshiba tc358768
TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge.
--- .../display/bridge/toshiba,tc358768.yaml | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml new file +159 -0
@@ -0,0 +1,159 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358768.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Toschiba TC358768/TC358778 Parallel RGB to MIPI DSI bridge + +maintainers: + - Peter Ujfalusi <[email protected]> + +description: | + The TC358768/TC358778 is bridge device which converts RGB to DSI. + +properties: + compatible: + enum: + - toshiba,tc358768 + - toshiba,tc358778 + + reg: + maxItems: 1 + description: base I2C address of the device + + reset-gpios: + maxItems: 1 + description: GPIO connected to active low RESX pin + + vddc-supply: + description: Regulator for 1.2V internal core power. + + vddmipi-supply: + description: Regulator for 1.2V for the MIPI. + + vddio-supply: + description: Regulator for 1.8V - 3.3V IO power. + + clocks: + maxItems: 1 + + clock-names: + const: refclk + + ports: + type: object + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + port@0: + type: object + additionalProperties: false + + description: | + Video port for RGB input + + properties: + reg: + const: 0 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + data-lines: + enum: [ 16, 18, 24 ] + + remote-endpoint: true + + required: + - reg + + port@1: + type: object + additionalProperties: false + + description: | + Video port for DSI output (panel or connector). + + properties: + reg: + const: 1 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + remote-endpoint: true + + required: + - reg + + required: + - "#address-cells" + - "#size-cells" + - port@0 + - port@1 + +required: + - compatible + - reg + - vddc-supply + - vddmipi-supply + - vddio-supply + - ports + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c1 { + #address-cells = <1>; + #size-cells = <0>; + + dsi_bridge: dsi-bridge@e { + compatible = "toshiba,tc358768"; + reg = <0xe>; + + clocks = <&tc358768_refclk>; + clock-names = "refclk"; + + reset-gpios = <&pcf_display_board 0 GPIO_ACTIVE_LOW>; + + vddc-supply = <&v1_2d>; + vddmipi-supply = <&v1_2d>; + vddio-supply = <&v3_3d>; + + dsi_bridge_ports: ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + rgb_in: endpoint { + remote-endpoint = <&dpi_out>; + data-lines = <24>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&lcd_in>; + }; + }; + }; + }; + }; +
Signature · 9 lines
Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 1/2] dt-bindings: display: bridge: Add documentation for Toshiba tc358768
Quoted 8 lines · Peter Ujfalusi
TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge.
Signed-off-by Peter Ujfalusi <[email protected]>--- .../display/bridge/toshiba,tc358768.yaml | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 2/2 drm/bridge: Add tc358768 driver
In reply to Peter UjfalusiAdd basic support for the Toshiba TC358768 RGB to DSI bridge. Not all the features of the TC358768 is implemented by the initial driver:MIPI_DSI_MODE_VIDEO and MIPI_DSI_FMT_RGB888 is only supported and tested.
Only write is implemented for mipi_dsi_host_ops.transfer.
--- drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 1044 +++++++++++++++++++++++++++++ 3 files changed, 1055 insertions(+) create mode 100644 drivers/gpu/drm/bridge/tc358768.c
drivers/gpu/drm/bridge/Kconfig +10 -0
@@ -122,6 +122,16 @@ config DRM_TOSHIBA_TC358767 ---help--- Toshiba TC358767 eDP bridge chip driver. +config DRM_TOSHIBA_TC358768 + tristate "Toshiba TC358768 MIPI DSI bridge" + depends on OF + select DRM_KMS_HELPER + select REGMAP_I2C + select DRM_PANEL + select DRM_MIPI_DSI + help + Toshiba TC358768AXBG/TC358778XBG DSI bridge chip driver. + config DRM_TI_TFP410 tristate "TI TFP410 DVI/HDMI bridge" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o +obj-$(CONFIG_DRM_TOSHIBA_TC358768) += tc358768.o obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o
drivers/gpu/drm/bridge/tc358768.c new file +1044 -0
1,044 lines not on this page · raw message
Signature · 9 lines
Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 58 lines · Peter Ujfalusi
Hi,
Changes since v3:
- bindings/example: Fixed the node name
- bindings/example: Added include forGPIO_ACTIVE_LOWand fixed up the gpio binding
- driver: Moved the label for goto intc358768_calc_pll()
- driver: Replaced the refcounting of enabled with a simple bool ashw_enable()is only called from one place (tc358768_bridge_pre_enable)
- driver: Added Reviewed-by from AndrzejChanges since v2:
- Implementpre_enableandpost_disbalecallbacks and move code from enable and disable callbacks.
- hw_enable/disable is removed fromtc358768_dsi_host_transfer()
- Defines forDSI_CONFWaccesses
- breakout from the loops (the check for it) is moved one level up intc358768_calc_pll()Changes since v1:
DT bindings document:
- Removed MaxItems for the regulators
- additionalProperties: false added to port@1Driver:
- Year is now 2020
- Includes shorted
- The three letter members of the private struct documented 0 they are named as in the datasheet
- Error handling for the IO functions is following whatsil-sii8620.cdoes
- regmap regcache is disabled along withrefcache_sync()and volatile callback for regmap
- The hw enable and disable functions got separated
- Taken the suggested simplifactions from Andrzej fortc358768_calc_pll()andtc358768_dsi_host_transfer()
- The driver no longer stores thedrm_display_mode, it relies onpriv->bridge.encoder->crtc->state->adjusted_modewhere it needs it
-tc358768_calc_pll()can be used for verification only to not modify the state
- refcounting added for hw enable state as a dsi transfer was shutting down the bridge when it was already enabled.Tested on top of drm-next + LED backlight patches + DT patches on dra7-evm with osd101t2045 (panel-simple) and osd101t2587 panel drivers.
Cover letter from v1:
TC358768 is a parallel RGB to MIPI DSI bridge.The initial driver supports
MIPI_DSI_MODE_VIDEO,MIPI_DSI_FMT_RGB888and only write is implemented for mipi_dsi_host_ops.transfer due to lack of hardware where other modes can be tested.Regards,
Peter
---
Peter Ujfalusi (2):
dt-bindings: display: bridge: Add documentation for Toshiba tc358768 drm/bridge: Add tc358768 driver
Quoted 8 lines
.../display/bridge/toshiba,tc358768.yaml | 159 +++ drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 1044 +++++++++++++++++ 4 files changed, 1214 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml create mode 100644 drivers/gpu/drm/bridge/tc358768.c
Applying to drm-misc-next
Neil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel