Skip to content

drm/tegra: Add support for Tegra20/Tegra30 8-bit CPU interface

Svyatoslav Ryhel dri-devel linux-devicetree linux-tegra lkml 8 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest12 patches 0 repliesNew
  2. v712 patches 0 repliesSuperseded
  3. v610 patches 26 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v511 patches8 repliesSuperseded
v47 patches14 repliesApplied
v37 patches3 repliesSuperseded
v27 patches1 replySuperseded
v16 patches31 repliesSuperseded

Changes in v8 from the cover letter

- return of_node_get() in devm_mipi_dbi_device_register
- add mipi_dbi_write_buffer_multi() and mipi_dbi_write_seq_multi()
- remove return doc from void function
- replace disable() removal in panel with mipi_dbi_write_seq_multi() conversion
- removed of_node_get() in tegra_dc_dbi_probe() for dbi node
- switch to drm_bridge_clear_and_put() in tegra_dbi_host_detach()
- add check if DC is idle before reconfiguring pins
- restored original tegra_dbi_atomic_disable() operation from v5
---

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12drm: Add MIPI DBI bus support for MIPI DBI Type A and Bdrivers/gpu/drm/Makefile drivers/gpu/drm/drm_mipi_dbi_bus.c include/drm/drm_mipi_dbi_bus.h+436 -10 replies
2/12drm/panel: panel-hitachi-tx10d07vm0baa: Convert to use MIPI DBI busdrivers/gpu/drm/panel/panel-hitachi-tx10d07vm0baa.c+12 -130 replies
3/12drm/panel: panel-hitachi-tx10d07vm0baa: Convert to mipi_dbi_write_seq_multi()drivers/gpu/drm/panel/panel-hitachi-tx10d07vm0baa.c+101 -1120 replies
4/12drm/panel: panel-lg-lh400wv3: Convert to use MIPI DBI busdrivers/gpu/drm/panel/panel-lg-lh400wv3.c+13 -140 replies
5/12drm/panel: panel-lg-lh400wv3: Convert to mipi_dbi_write_seq_multi()drivers/gpu/drm/panel/panel-lg-lh400wv3.c+40 -510 replies
6/12drm/tegra: dc: Add elements required by Tegra MIPI DBIdrivers/gpu/drm/tegra/dc.h+183 -110 replies
7/12dt-bindings: display: tegra: Document Tegra20 DSI portDocumentation/devicetree/bindings/display/tegra/nvidia,tegra20-dsi.yaml+6 -00 replies
8/12drm/tegra: output: Make panel parsing configurabledrivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c +3 more+32 -300 replies
9/12drm/tegra: Convert to use atomic versions of drm_encoder_helper_funcsdrivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c drivers/gpu/drm/tegra/rgb.c +1 more+60 -210 replies
10/12drm/tegra: rgb: Parameterize configuration based on bus flagsdrivers/gpu/drm/tegra/rgb.c+35 -40 replies
11/12dt-bindings: display: tegra: Document 8-bit CPU parallel interfaceDocumentation/devicetree/bindings/display/tegra/nvidia,tegra20-dbi.yaml Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dc.yaml+123 -00 replies
12/12drm/tegra: Add support for 8-bit CPU interfacedrivers/gpu/drm/tegra/Kconfig drivers/gpu/drm/tegra/Makefile drivers/gpu/drm/tegra/dbi.c +2 more+601 -00 replies

Reviews trailers per patch

2 of 12 patches have a Reviewed-by or Acked-by.

PatchRob Herring (Arm)
1/12
2/12
3/12
4/12
5/12
6/12
7/12R-b
8/12
9/12
10/12
11/12R-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 00/12] drm/tegra: Add support for Tegra20/Tegra30 8-bit CPU interface

The display controller in Tegra20/30 SoCs features an 8-bit SPI interface that closely resembles the MIPI DBI Type B protocol and is referred to as '8-bit CPU'.

Add MIPI DBI bus support along with 2 DBI Type B panels used in LG Optimus 2X which work with the 8-bit CPU interface.

Convert rgb, dsi, hdmi and sor to use atomic versions of drm_encoder_helper_funcs needed for bridge state requesting. Refactor and expand DC header. Add DC parametrization options needed for fine tuning by bridges. Make panel parsing by tegra_output_probe() optional and document optional DSI port. Add 8-bit CPU interface in form of a bridge linking to RGB port.

---
Changes in v2:
- convert enums in the dc header into definitions list
- add check in RGB if bridge_state is not NULL, if yes, use default flags
- inverted FLAG_PIXDATA_SAMPLE flag setup logic since default value is set to be on NEGEDGE while v1 set default to be on POSEDGE
- 8bit-cpu schema renamed to dbi, removed compaible and set as DC child
- expanded list of required properties
- 8bit-cpu bridge remodelled into dbi interface as DC child
- improve gpio handling
- rework attach to get drvdata from parent
- add panel supplies description
- split panel driver into per-panel drivers
- get DBI interface from the patent directly

I have deliberately left GPIO parsing from device tree since it seems to be the most convenient and mainstream method of working with GPIOs.

Changes in v3:
- rgb: fix default bus_flags to match original behavior
- dbi-schema: remove compatible from required props remove dc@54200000 wrapper from example
restrict dbi nodes for tegra20/tegra30 only
- dbi: remove unused idx from tegra_dbi_priv
wrap dbi registration in dc with devm_add_action_or_reset() separate dbi into separate object
export tegra_dc_commit() and trace_dc_readl()/dc_readl()

Changes in v4:
- reorder patches to avoid errors on checking dbi schema
- dbi schema renamed to nvidia,tegra20-dbi for consistency
- fix DC_DISP_V_PULSE0_POSITION_* > DC_DISP_V_PULSE1_POSITION_*
- add MODULE_ALIAS
- swap width and height in panels
- dropped use of init-sequence and gpios
- dbi driver reworked to use only DC to operate pins

Changes in v5:
- added commit modelling DBI bus (suggested by Mikko Perttunen)
- hitachi and lg panels converted to mipi_dbi_driver
- dc header refactored and completed
- added commit documenting DSI controller port
- added commit which converts drm_encoder_helper_funcs to use atomic enable/disable
- added commit which makes panel parsing in tegra_output_probe() optional
- dbi command/data converted to enum
- dc com pins are now backed up into drivers private structure
- magic numbers replaced with pin defines
- dropped tegra_dc_readl() from tegra_dbi_pin_set
- tegra_dbi_pin_set() accepts boolean third argument
- tegra_dbi_write() second argument converted to use tegra_dbi_dc_signal enum
- used field_get() to extract pin value
- extended comment regarding init sequence
- nvidia,index > generic reg property
- adjusted tegra_dbi_atomic_enable() to properly handle shadowed registers
- switched to use of_drm_get_bridge_by_endpoint() since panels are auto-wrapped into bridge now
- added support for mipi_dbi_host_ops
- added resource managed helper to register DBI device and provided to DC via header
- dbi.o built with all other tegra drm files

Changes in v6:
- improved descriptions of new framework
- mipi dbi bus commit authorship was changed with Mikko's permission
- panel commits swapped with mipi dbi panel conversion commits
- fixed tegra_output_probe() for hdmi
- added CONFIG_DRM_MIPI_DBI select into CONFIG_DRM_TEGRA
- devm_drm_bridge_add() moved into bridge probe to avoid possible issues with deferred panel probing
- setting LDC pin to V Pulse 1 moved before GPIO pin reconfiguration
- DC_CMD_STATE_ACCESS is set to read and write in tegra_dbi_atomic_disable()
- platform_driver_register() does not error out if driver is registered

Changes in v7:
- reduce changes in the panels when converting to mipi dbi
- dropped of_node_get() in devm_mipi_dbi_device_register
- remove enable()/disable() operations and add prep prev bridge flag
- drop add DC header changes, add only strictly needed by the dbi
- dropped tegra_dbi_iface and reg_entry enums
- dropped reg from struct tegra_dbi_priv, com_pin_backup converted to u32
- interface dropped from struct tegra_dbi_interface and init call added
- BIT macro converted to PIN_UNMASK in the tegra_dbi_pin_set()
- init functions and tegra_dbi_interface structure moved before probe
- tegra_dbi_atomic_enable() split into pre_enable() and enable() phases to squeeze interface into existing framework
- DC_CMD_STATE_ACCESS and setting active true moved into init functions
- reg reading moved before bridge allocation
- reg renamed to nvidia,interface

Changes in v8:
- return of_node_get() in devm_mipi_dbi_device_register
- add mipi_dbi_write_buffer_multi() and mipi_dbi_write_seq_multi()
- remove return doc from void function
- replace disable() removal in panel with mipi_dbi_write_seq_multi() conversion
- removed of_node_get() in tegra_dc_dbi_probe() for dbi node
- switch to drm_bridge_clear_and_put() in tegra_dbi_host_detach()
- add check if DC is idle before reconfiguring pins
- restored original tegra_dbi_atomic_disable() operation from v5
---

Svyatoslav Ryhel (12):
drm: Add MIPI DBI bus support for MIPI DBI Type A and B drm/panel: panel-hitachi-tx10d07vm0baa: Convert to use MIPI DBI bus drm/panel: panel-hitachi-tx10d07vm0baa: Convert to
mipi_dbi_write_seq_multi()
drm/panel: panel-lg-lh400wv3: Convert to use MIPI DBI bus drm/panel: panel-lg-lh400wv3: Convert to mipi_dbi_write_seq_multi() drm/tegra: dc: Add elements required by Tegra MIPI DBI
dt-bindings: display: tegra: Document Tegra20 DSI port drm/tegra: output: Make panel parsing configurable drm/tegra: Convert to use atomic versions of drm_encoder_helper_funcs drm/tegra: rgb: Parameterize configuration based on bus flags
dt-bindings: display: tegra: Document 8-bit CPU parallel interface drm/tegra: Add support for 8-bit CPU interface

 .../display/tegra/nvidia,tegra20-dbi.yaml     | 108 ++++
 .../display/tegra/nvidia,tegra20-dc.yaml      |  15 +
 .../display/tegra/nvidia,tegra20-dsi.yaml     |   6 +
 drivers/gpu/drm/Makefile                      |   2 +-
 drivers/gpu/drm/drm_mipi_dbi_bus.c            | 287 +++++++++
 .../drm/panel/panel-hitachi-tx10d07vm0baa.c   | 234 ++++---
 drivers/gpu/drm/panel/panel-lg-lh400wv3.c     | 114 ++--
 drivers/gpu/drm/tegra/Kconfig                 |   1 +
 drivers/gpu/drm/tegra/Makefile                |   1 +
 drivers/gpu/drm/tegra/dbi.c                   | 592 ++++++++++++++++++
 drivers/gpu/drm/tegra/dc.c                    |   4 +
 drivers/gpu/drm/tegra/dc.h                    | 197 +++++-
 drivers/gpu/drm/tegra/drm.h                   |   2 +-
 drivers/gpu/drm/tegra/dsi.c                   |  22 +-
 drivers/gpu/drm/tegra/hdmi.c                  |  22 +-
 drivers/gpu/drm/tegra/output.c                |  52 +-
 drivers/gpu/drm/tegra/rgb.c                   |  64 +-
 drivers/gpu/drm/tegra/sor.c                   |  20 +-
 include/drm/drm_mipi_dbi_bus.h                | 148 +++++
 19 files changed, 1638 insertions(+), 253 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dbi.yaml
 create mode 100644 drivers/gpu/drm/drm_mipi_dbi_bus.c
 create mode 100644 drivers/gpu/drm/tegra/dbi.c
 create mode 100644 include/drm/drm_mipi_dbi_bus.h
Signature · 1 line
2.53.0