drm: bridge: add ssd2825 RGB/DSI bridge support
Subsystems (4)
v5 cover drm: bridge: add ssd2825 RGB/DSI bridge support
Solomon SSD2825 is a RGB to MIPI DSI bridge used in LG Optimus 4D P880 and LG Optimus Vu P895
---
Changes on switching from v4 to v5:
- rebased on top of drm-misc-next with adjustments to fit
Changes on switching from v3 to v4:
- no changes, resend
Changes on switching from v2 to v3:
- added mutex guard
- configuration register flags parametrized using panel flags
- removed unneded debug messages
- removed unimplemented modes checks
- added check for maximum pixel row length
- use types header
- remove ssd2825_to_ns
- shift bridge setup into atomic pre-enable
- cleaned default values of hzd and hpd
Changes on switching from v1 to v2:
- added description for clock
- removed clock-names
- added boundries for hs-zero-delay-ns and hs-prep-delay-ns
- added mutex lock for host transfers
- converted to atomic ops
- get drm_display_mode mode with atomic helpers
- parameterized INTERFACE_CTRL_REG_6 configuration
- added video mode validation and fixup
- removed clock name
- switched to devm_regulator_bulk_get_const
- added default timings
---
Svyatoslav Ryhel (2):
dt-bindings: display: bridge: Document Solomon SSD2825
drm: bridge: Add support for Solomon SSD2825 RGB/DSI bridge
.../display/bridge/solomon,ssd2825.yaml | 141 +++ drivers/gpu/drm/bridge/Kconfig | 13 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ssd2825.c | 812 ++++++++++++++++++ 4 files changed, 967 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/solomon,ssd2825.yaml create mode 100644 drivers/gpu/drm/bridge/ssd2825.c
Signature · 1 line
2.48.1
PATCH v5 1/2 dt-bindings: display: bridge: Document Solomon SSD2825
Add bindings for Solomon SSD2825 MIPI master bridge chip that connects an application processor with traditional parallel LCD interface and an LCD driver with MIPI slave interface. The SSD2825 supports both parallel RGB interface and serial SPI interface.
--- .../display/bridge/solomon,ssd2825.yaml | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/solomon,ssd2825.yaml
Documentation/devicetree/bindings/display/bridge/solomon,ssd2825.yaml new file +141 -0
@@ -0,0 +1,141 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/solomon,ssd2825.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Solomon SSD2825 RGB to MIPI-DSI bridge + +maintainers: + - Svyatoslav Ryhel <[email protected]> + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: solomon,ssd2825 + + reg: + maxItems: 1 + + reset-gpios: true + + dvdd-supply: + description: Regulator for 1.2V digital power supply. + + avdd-supply: + description: Regulator for 1.2V analog power supply. + + vddio-supply: + description: Regulator for 1.8V IO power supply. + + spi-max-frequency: + maximum: 1000000 + + spi-cpha: true + spi-cpol: true + + clocks: + maxItems: 1 + description: Reference TX_CLK used before PLL is locked. + + solomon,hs-zero-delay-ns: + description: + HS zero delay period + minimum: 0 + maximum: 1700 + default: 133 + + solomon,hs-prep-delay-ns: + description: + HS prep delay period + minimum: 0 + maximum: 1728 + default: 40 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Video port for RGB input + + properties: + endpoint: + $ref: /schemas/graph.yaml#/$defs/endpoint-base + unevaluatedProperties: false + + properties: + bus-width: + enum: [ 16, 18, 24 ] + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: + Video port for DSI output (panel or connector) + + required: + - port@0 + - port@1 + +required: + - compatible + - ports + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + spi { + #address-cells = <1>; + #size-cells = <0>; + + dsi@2 { + compatible = "solomon,ssd2825"; + reg = <2>; + + spi-max-frequency = <1000000>; + + spi-cpha; + spi-cpol; + + reset-gpios = <&gpio 114 GPIO_ACTIVE_LOW>; + + dvdd-supply = <&vdd_1v2>; + avdd-supply = <&vdd_1v2>; + vddio-supply = <&vdd_1v8_io>; + + solomon,hs-zero-delay-ns = <300>; + solomon,hs-prep-delay-ns = <65>; + + clocks = <&ssd2825_tx_clk>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + bridge_input: endpoint { + remote-endpoint = <&dpi_output>; + bus-width = <24>; + }; + }; + + port@1 { + reg = <1>; + + bridge_output: endpoint { + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + };
Signature · 1 line
2.48.1
PATCH v5 2/2 drm: bridge: Add support for Solomon SSD2825 RGB/DSI bridge
In reply to Svyatoslav RyhelSSD2825 is a cost-effective MIPI Bridge Chip solution targeting mainly smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS panel technologies for smartphone applications.
--- drivers/gpu/drm/bridge/Kconfig | 13 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ssd2825.c | 812 +++++++++++++++++++++++++++++++ 3 files changed, 826 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ssd2825.c
drivers/gpu/drm/bridge/Kconfig +13 -0
@@ -316,6 +316,19 @@ config DRM_SIMPLE_BRIDGE Support for non-programmable DRM bridges, such as ADI ADV7123, TI THS8134 and THS8135 or passive resistor ladder DACs. +config DRM_SOLOMON_SSD2825 + tristate "SSD2825 RGB/DSI bridge" + depends on SPI_MASTER && OF + select DRM_MIPI_DSI + select DRM_KMS_HELPER + select DRM_PANEL + help + Say Y here if you want support for the Solomon SSD2825 RGB/DSI + SPI bridge driver. + + Say M here if you want to support this hardware as a module. + The module will be named "solomon-ssd2825". + config DRM_THINE_THC63LVD1024 tristate "Thine THC63LVD1024 LVDS decoder bridge" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o obj-$(CONFIG_DRM_SII9234) += sii9234.o obj-$(CONFIG_DRM_SIMPLE_BRIDGE) += simple-bridge.o +obj-$(CONFIG_DRM_SOLOMON_SSD2825) += ssd2825.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358762) += tc358762.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o
drivers/gpu/drm/bridge/ssd2825.c new file +812 -0
812 lines not on this page · raw message
Signature · 1 line
2.48.1
Re: [PATCH v5 2/2] drm: bridge: Add support for Solomon SSD2825 RGB/DSI bridge
Le 06/05/2025 à 11:33, Svyatoslav Ryhel a écrit :
Quoted 4 lines
SSD2825 is a cost-effective MIPI Bridge Chip solution targeting mainly smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS panel technologies for smartphone applications.
Hi,
...
drivers/gpu/drm/bridge/Kconfig config DRM_SIMPLE_BRIDGE · line 330
Quoted 12 lines
drivers/gpu/drm/bridge/Kconfig +12
-0+config DRM_SOLOMON_SSD2825 + tristate "SSD2825 RGB/DSI bridge" + depends on SPI_MASTER && OF + select DRM_MIPI_DSI + select DRM_KMS_HELPER + select DRM_PANEL + help + Say Y here if you want support for the Solomon SSD2825 RGB/DSI + SPI bridge driver. + + Say M here if you want to support this hardware as a module. + The module will be named "solomon-ssd2825".
Is it "solomon-ssd2825" or just "ssd2825"?
Quoted 4 lines
+
configDRM_THINE_THC63LVD1024
tristate "Thine THC63LVD1024 LVDS decoder bridge" depends on OF
...
Quoted 19 lines
drivers/gpu/drm/bridge/ssd2825.c new file +19
-0+static int ssd2825_read_raw (struct ssd2825_priv *priv,u8 cmd,u16 *data) +{ +struct spi_device *spi = priv->spi; +struct spi_message msg; +struct spi_transfer xfer[2 ]; +u8 tx_buf[2 ]; +u8 rx_buf[2 ]; +int ret; + +memset (&xfer,0 ,sizeof (xfer)); + + tx_buf[1 ] = (cmd &0xFF00 ) >>8 ; + tx_buf[0 ] = (cmd &0x00FF ); + + xfer[0 ].tx_buf = tx_buf; + xfer[0 ].bits_per_word =9 ; + xfer[0 ].len =2 ; + + xfer[1 ].rx_buf = rx_buf;
drivers/gpu/drm/bridge/ssd2825.c line 248
Quoted 10 lines
drivers/gpu/drm/bridge/ssd2825.c new file +10
-0+ xfer[1 ].bits_per_word =16 ; + xfer[1 ].len =2 ; + +spi_message_init (&msg); +spi_message_add_tail (&xfer[0 ], &msg); +spi_message_add_tail (&xfer[1 ], &msg); + + ret =spi_sync (spi, &msg); +if (ret) +dev_err (&spi->dev,"spi_sync_read failed %d\n" , ret);
Maybe, just spi_sync in the message?
drivers/gpu/drm/bridge/ssd2825.c line 252
Quoted 4 lines
drivers/gpu/drm/bridge/ssd2825.c new file +4
-0+ + *data = rx_buf[1 ] | (rx_buf[0 ] <<8 ); + +return 0 ;
Is it on purpose that ret is never returned?
Is it safe to update *data if ret is not 0?
Quoted 1 line
+}
...
CJ
Re: [PATCH v5 2/2] drm: bridge: Add support for Solomon SSD2825 RGB/DSI bridge
вт, 6 трав. 2025 р. о 20:49 Christophe JAILLET
<[email protected]> пише:
Quoted 65 lines · Svyatoslav Ryhel
Quoted 4 lines
SSD2825 is a cost-effective MIPI Bridge Chip solution targeting mainly smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS panel technologies for smartphone applications.
Hi,
...
drivers/gpu/drm/bridge/Kconfig config DRM_SIMPLE_BRIDGE · line 330
Quoted 12 lines
drivers/gpu/drm/bridge/Kconfig +12
-0+config DRM_SOLOMON_SSD2825 + tristate "SSD2825 RGB/DSI bridge" + depends on SPI_MASTER && OF + select DRM_MIPI_DSI + select DRM_KMS_HELPER + select DRM_PANEL + help + Say Y here if you want support for the Solomon SSD2825 RGB/DSI + SPI bridge driver. + + Say M here if you want to support this hardware as a module. + The module will be named "solomon-ssd2825".Is it "solomon-ssd2825" or just "ssd2825"?
Quoted 4 lines
+
configDRM_THINE_THC63LVD1024
tristate "Thine THC63LVD1024 LVDS decoder bridge" depends on OF...
Quoted 19 lines
drivers/gpu/drm/bridge/ssd2825.c new file +19
-0+static int ssd2825_read_raw (struct ssd2825_priv *priv,u8 cmd,u16 *data) +{ +struct spi_device *spi = priv->spi; +struct spi_message msg; +struct spi_transfer xfer[2 ]; +u8 tx_buf[2 ]; +u8 rx_buf[2 ]; +int ret; + +memset (&xfer,0 ,sizeof (xfer)); + + tx_buf[1 ] = (cmd &0xFF00 ) >>8 ; + tx_buf[0 ] = (cmd &0x00FF ); + + xfer[0 ].tx_buf = tx_buf; + xfer[0 ].bits_per_word =9 ; + xfer[0 ].len =2 ; + + xfer[1 ].rx_buf = rx_buf;drivers/gpu/drm/bridge/ssd2825.c line 248
Quoted 10 lines
drivers/gpu/drm/bridge/ssd2825.c new file +10
-0+ xfer[1 ].bits_per_word =16 ; + xfer[1 ].len =2 ; + +spi_message_init (&msg); +spi_message_add_tail (&xfer[0 ], &msg); +spi_message_add_tail (&xfer[1 ], &msg); + + ret =spi_sync (spi, &msg); +if (ret) +dev_err (&spi->dev,"spi_sync_read failed %d\n" , ret);Maybe, just
spi_syncin the message?
Quoted 10 lines
drivers/gpu/drm/bridge/ssd2825.c line 252
Quoted 4 lines
drivers/gpu/drm/bridge/ssd2825.c new file +4
-0+ + *data = rx_buf[1 ] | (rx_buf[0 ] <<8 ); + +return 0 ;Is it on purpose that ret is never returned?
Is it safe to update *data if ret is not 0?Quoted 1 line
+}
Acknowledged, thank you
Quoted 3 lines
...
CJ