Commit graph

10 commits

Author SHA1 Message Date
awinia 59616c830f Reimplement dsi85 as DRM bridge (squashed). (#1)
* Reimplement dsi85 as DRM bridge (squashed).

- blunt import of preliminary bridge driver

- make dsi85 a kernel extension instead of a module to circumvent problems
  with DRM init order

- make i2c matchstring match our DTS

- find and use associated drm_panel

- add hardcoded DSI85 init in bridge-enable

- Do not drm_connector_register yet at bridge_attach time (unlike
  other bridge drivers)

- Add a mipi_dsi_device to configure #lanes

The DSI host wants to know the number of lanes, and guesses 1 lane if
not given. The old attempt using just panel-simple was easy; a panel
declared as DSI panel in panel-simple gets a mipi_dsi_device which it
can configure.

This driver follows the example of the adv7533 driver and creates its
own mipi_dsi_device, where it places a hard-coded number of lanes.

- cleanup

* Compute DSI85 register values from Panel

At bridge_mode_set time, fill all logical DSI85 registers from panel
parameters and constant assumptions, then write logical registers to
physical registers.

Still needs override for a few logical registers: related to DSI
clock, and related to horizontal parameters which our panel_simple
contains with factor 2 to force proper DSI timings.

* compute DSI input clock from DT attributes and mode

* add debugging mode_fixup handler to bridge

* add DT attrs for more DSI85 registers

sync delay, DSI clock divider.

And cleanup.

* remove bridge_mode_fixup debug helper

* use DRM logging macros uniformly

* Derive sync polarity from panel's flags

but make sure that DSI always uses standard polarity; fix that in the
mode_fixup callback.

* fix computation of dsi_clk_divider

Code assumed wrong bit position in 0x0B, but with the right bit
position, the divider is trivial to compute from existing
params. There goes one DT attribute.

* make LVDS regs 0x19..0x1B configurable by DT

* add documentation
2017-05-18 11:27:11 +02:00
Moritz Bitsch 241f587f41 update dsi rate for fixed dsi clock 2017-03-29 14:45:39 +02:00
Moritz Bitsch ed061181c4 fix pixel rate for dsi
we need to push data for two LVDS channels
2017-03-08 09:35:59 +01:00
Moritz Bitsch a226fe4fcb add testpattern registers for 1920x1080 2017-02-27 15:17:09 +01:00
Moritz Bitsch e25c6b0018 use reviewed values 2017-02-16 16:14:39 +01:00
Moritz Bitsch 00ce924477 use timings for 445Mhz dsi clock 2017-02-15 10:52:42 +01:00
Moritz Bitsch 7e0409fff6 Prepare for normal operation
* use DSI HS clock (300mhz assumed)
2017-02-08 14:38:38 +01:00
Moritz Bitsch 068c5ac881 use external ref clock 2017-02-08 12:55:05 +01:00
Moritz Bitsch 6a759173c5 clean up code
* use static pattern gen mode
2017-02-08 11:34:39 +01:00
Moritz Bitsch 4aef94c064 initial import of dsi85 driver
this driver is based on the omap dss dsi85 driver
2017-02-06 16:03:41 +01:00