drm: Add support for Cadence MHDP DPI/DP bridge and J721E wrapper.
Subsystems (4)
cover drm: Add support for Cadence MHDP DPI/DP bridge and J721E wrapper.
This patch series adds new DRM driver for Cadence Display Port. The Cadence Display Port is also referred as MHDP (Mobile High Definition Link, High-Definition Multimedia Interface Display Port) Cadence Display Port complies with VESA DisplayPort (DP) and embedded Display Port (eDP) standards This driver implements Single Stream Transport (SST) support. Adds Texas Instruments SoC J721e specific wrapper and adds the device tree bindings in YAML format
The patch series has three patches which applies the changes in the below sequence
1. 001-dt-bindings-drm-bridge-Document-Cadence-MHDP-bridge-bindings-in-yaml-format Documents the bindings in yaml format.
2. 002-drm-bridge-Add-support-for-Cadence-MHDP-bridge
This patch adds new DRM driver for Cadence MHDP Display Port. The patch implements supports for single stream transport mode.
3. 003-drm-mhdp-add-j721e-wrapper
Add Texas Instruments (TI) j721e wrapper for mhdp. The wrapper configures mhdp clocks and muxes as required by SoC.
Yuti Amonkar (3):
dt-bindings: drm/bridge: Document Cadence MHDP bridge bindings in yaml
format
drm: bridge: Add support for Cadence MHDP DPI/DP bridge drm/mhdp: add j721e wrapper
.../bindings/display/bridge/cdns,mhdp.yaml | 101 + drivers/gpu/drm/bridge/Kconfig | 21 + drivers/gpu/drm/bridge/Makefile | 6 + drivers/gpu/drm/bridge/cdns-mhdp-j721e.c | 79 + drivers/gpu/drm/bridge/cdns-mhdp-j721e.h | 55 + drivers/gpu/drm/bridge/cdns-mhdp.c | 2243 ++++++++++++++++++++ drivers/gpu/drm/bridge/cdns-mhdp.h | 381 ++++ 7 files changed, 2886 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp-j721e.c create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp-j721e.h create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp.c create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp.h
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/3 dt-bindings: drm/bridge: Document Cadence MHDP bridge bindings in yaml format
Document the bindings used for the Cadence MHDP DPI/DP bridge in yaml format.
--- .../bindings/display/bridge/cdns,mhdp.yaml | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +101 -0
@@ -0,0 +1,101 @@ +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/bridge/cdns,mhdp.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Cadence MHDP bridge + +maintainers: + - Swapnil Jakhade <[email protected]> + - Yuti Amonkar <[email protected]> + +properties: + compatible: + items: + - const: ti,j721e-mhdp8546 + - const: cdns,mhdp8546 + + clocks: + items: + descrption: + DP bridge clock, it's used by the IP to know how to translate a number of + clock cycles into a time (which is used to comply with DP standard timings + and delays). + + reg: + items: + - description: + Register block of mhdptx abp registers upto PHY mapped area(AUX_CONFIG_P). + The AUX and PMA registers are mapped to associated phy driver. + - description: + Register block for DSS_EDP0_INTG_CFG_VP registers in case of TI J7 SoCs. + + phys: + description: see the Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml + + phy-names: + const: dpphy + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + description: phandle to the associated power domain + + ports: + type: object + description: + Ports as described in Documentation/devictree/bindings/graph.txt + properties: + port@0: + description: + input port representing the DP bridge input + + port@1: + description: + output port representing the DP bridge output + required: + - port@0 + - port@1 + +required: + - compatible + - clocks + - reg + - phys + - phy-names + - ports + +additionalProperties: false + +examples: + - | + mhdp: dp-bridge@f0fb000000 { + compatible = "ti,j721e-mhdp8546", "cdns,mhdp8546"; + reg = <0xf0 0xfb000000 0x0 0x1000000>, + <0xf0 0xfc000000 0x0 0x2000000>; + clocks = <&mhdp_clock>; + phys = <&dp_phy>; + phy-names = "dpphy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dp_bridge_input: endpoint { + remote-endpoint = <&xxx_dpi_output>; + }; + }; + + port@1 { + reg = <1>; + dp_bridge_output: endpoint { + remote-endpoint = <&xxx_dp_connector_input>; + }; + }; + }; + }; +...
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 1/3] dt-bindings: drm/bridge: Document Cadence MHDP bridge bindings in yaml format
Quoted 4 lines · Yuti Amonkar
Document the bindings used for the Cadence MHDP DPI/DP bridge in yaml format.
Signed-off-by Yuti Amonkar <[email protected]>
Couple of comments bellow.
Quoted 20 lines
--- .../bindings/display/bridge/cdns,mhdp.yaml | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yamlDocumentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +9
-0@@ -0,0 +1,101 @@ +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/bridge/cdns,mhdp.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Cadence MHDP bridge + +maintainers: + - Swapnil Jakhade <[email protected]>
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml line 19
Quoted 10 lines
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +10
-0+ - Yuti Amonkar <[email protected]> + +properties: + compatible: + items: + - const: ti,j721e-mhdp8546 + - const: cdns,mhdp8546 + + clocks: + items:
^^^^^^
No need for this, but "maxItems: 1" would probably make sense.
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml line 20
Quoted 1 line
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +1
-0+ descrption:
Typo in the key word. Please try "make dt_binding_check" (see Documentation/devicetree/writing-schema.rst) to run a formal check on your binding.
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml line 25
Quoted 5 lines
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +5
-0+ DP bridge clock, it's used by the IP to know how to translate a number of + clock cycles into a time (which is used to comply with DP standard timings + and delays). + + reg:
Add these here to make it explicit that there can be either 1 or 2 items.
maxItems: 2
minItems: 1
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml line 26
Quoted 1 line
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +1
-0+ items: ^^^^^^
This could probably be removed too.
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml line 31
Quoted 5 lines
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +5
-0+ - description: + Register block of mhdptx abp registers upto PHY mapped area(AUX_CONFIG_P). + The AUX and PMA registers are mapped to associated phy driver. + - description: + Register block for DSS_EDP0_INTG_CFG_VP registers in case of TI J7 SoCs.
It looks like the dt_binding_check accepts two descriptions, but I wonder how easy it is to understand that they are referring to the two reg items. Maybe we should add reg-names property to make things more explicit. For instance "mhdptx" and "j721e-intg".
Quoted 9 lines
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +9
-0+ + phys: + description: see the Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml + + phy-names: + const: dpphy + + interrupts: + maxItems: 1
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml line 50
Quoted 10 lines
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +10
-0+ + power-domains: + maxItems: 1 + description: phandle to the associated power domain + + ports: + type: object + description: + Ports as described in Documentation/devictree/bindings/graph.txt + properties:
I think you need
"#address-cells":
const: 1
"#size-cells":
const: 0here, and you should make them "requred".
Quoted 52 lines
Documentation/devicetree/bindings/display/bridge/cdns,mhdp.yaml new file +51
-0+ port@0: + description: + input port representing the DP bridge input + + port@1: + description: + output port representing the DP bridge output + required: + - port@0 + - port@1 + +required: + - compatible + - clocks + - reg + - phys + - phy-names + - ports + +additionalProperties: false + +examples: + - | + mhdp: dp-bridge@f0fb000000 { + compatible = "ti,j721e-mhdp8546", "cdns,mhdp8546"; + reg = <0xf0 0xfb000000 0x0 0x1000000>, + <0xf0 0xfc000000 0x0 0x2000000>; + clocks = <&mhdp_clock>; + phys = <&dp_phy>; + phy-names = "dpphy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dp_bridge_input: endpoint { + remote-endpoint = <&xxx_dpi_output>; + }; + }; + + port@1 { + reg = <1>; + dp_bridge_output: endpoint { + remote-endpoint = <&xxx_dp_connector_input>; + }; + }; + }; + }; +...
Signature · 6 lines
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 2/3 drm: bridge: Add support for Cadence MHDP DPI/DP bridge
In reply to Yuti AmonkarThis patch adds new DRM driver for Cadence MHDP DPTX IP used on J721e SoC. MHDP DPTX IP is the component that complies with VESA DisplayPort (DP) and embedded Display Port (eDP) standards.It integrates CPP (uCPU) running the embedded Firmware(FW) interfaced over APB interface. Basically, it takes a DPI stream as input and output it encoded in DP format. Currently, it supports only SST mode.
--- drivers/gpu/drm/bridge/Kconfig | 11 + drivers/gpu/drm/bridge/Makefile | 3 + drivers/gpu/drm/bridge/cdns-mhdp.c | 2231 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/cdns-mhdp.h | 380 ++++++ 4 files changed, 2625 insertions(+) create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp.c create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp.h
drivers/gpu/drm/bridge/Kconfig +11 -0
@@ -37,6 +37,17 @@ config DRM_CDNS_DSI Support Cadence DPI to DSI bridge. This is an internal bridge and is meant to be directly embedded in a SoC. +config DRM_CDNS_MHDP + tristate "Cadence DPI/DP bridge" + select DRM_KMS_HELPER + select DRM_PANEL_BRIDGE + depends on OF + help + Support Cadence DPI to DP bridge. This is an internal + bridge and is meant to be directly embedded in a SoC. + It takes a DPI stream as input and output it encoded + in DP format. + config DRM_DUMB_VGA_DAC tristate "Dumb VGA DAC Bridge support" depends on OF
drivers/gpu/drm/bridge/Makefile +3 -0
@@ -16,4 +16,7 @@ obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o +obj-$(CONFIG_DRM_CDNS_MHDP) += mhdp8546.o obj-y += synopsys/ + +mhdp8546-objs := cdns-mhdp.o
drivers/gpu/drm/bridge/cdns-mhdp.c new file +2231 -0
2,231 lines not on this page · raw message
drivers/gpu/drm/bridge/cdns-mhdp.h new file +380 -0
380 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
kbuild test robot
build botRe: [PATCH v1 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge
Thank you for the patch! Yet something to improve:
Hi Yuti,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-exynos/exynos-drm-next]
[also build test ERROR on v5.4 next-20191203]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yuti-Amonkar/drm-Add-support-for-Cadence-MHDP-DPI-DP-bridge-and-J721E-wrapper/20191203-230335 base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
All errors (new ones prefixed by >>):
>> drivers/gpu//drm/bridge/cdns-mhdp.c:20:10: fatal error: linux/phy/phy-dp.h: No such file or directory
#include <linux/phy/phy-dp.h>
^~~~~~~~~~~~~~~~~~~~compilation terminated.
vim +20 drivers/gpu//drm/bridge/cdns-mhdp.c
> 20 #include <linux/phy/phy-dp.h>
21 #include <linux/slab.h>
22 ---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
Re: [PATCH v1 2/3] drm: bridge: Add support for Cadence MHDP DPI/DP bridge
Quoted 20 lines · kbuild test robot
Hi Yuti,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-exynos/exynos-drm-next]
[also build test ERROR on v5.4 next-20191203]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]url: https://github.com/0day-ci/linux/commits/Yuti-Amonkar/drm-Add-support-for-Cadence-MHDP-DPI-DP-bridge-and-J721E-wrapper/20191203-230335 base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 7.5.0reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
Quoted 8 lines
If you fix the issue, kindly add following tag
Reported-by kbuild test robot <[email protected]>All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/gpu//drm/bridge/cdns-mhdp.c:20:10: fatal error:
linux/phy/phy-dp.h: No such file or directory#include <linux/phy/phy-dp.h> ^~~~~~~~~~~~~~~~~~~~
Hmmm, maybe we should after all we should put this series together with the torrent phy series [1], since the phy DisplayPort configuration options patch[2] is part of that series.
[1]
https://lists.freedesktop.org/archives/dri-devel/2019-December/247343.html
[2]
https://lists.freedesktop.org/archives/dri-devel/2019-December/247344.html
Kishon, any objections if the torren phy series with the phy dp options patch will be merged to mainline via drm tree with the cdns-mhdp patches (when we are done with the reviews)?
Best regards,
Jyri
Quoted 12 lines
compilation terminated.
vim +20 drivers/gpu//drm/bridge/cdns-mhdp.c
Quoted 1 line
20 #include <
linux/phy/phy-dp.h>21 #include <linux/slab.h> 22---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH 3/3 drm/mhdp: add j721e wrapper
In reply to Yuti AmonkarAdd j721e wrapper for mhdp, which sets up the clock and data muxes.
--- drivers/gpu/drm/bridge/Kconfig | 10 ++++ drivers/gpu/drm/bridge/Makefile | 3 ++ drivers/gpu/drm/bridge/cdns-mhdp-j721e.c | 79 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/cdns-mhdp-j721e.h | 55 ++++++++++++++++++++++ drivers/gpu/drm/bridge/cdns-mhdp.c | 14 +++++- drivers/gpu/drm/bridge/cdns-mhdp.h | 1 + 6 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp-j721e.c create mode 100644 drivers/gpu/drm/bridge/cdns-mhdp-j721e.h
drivers/gpu/drm/bridge/Kconfig +10 -0
@@ -48,6 +48,16 @@ config DRM_CDNS_MHDP It takes a DPI stream as input and output it encoded in DP format. +if DRM_CDNS_MHDP + +config DRM_CDNS_MHDP_J721E + bool "J721E Cadence DPI/DP wrapper support" + default y + help + Support J721E Cadence DPI/DP wrapper.It sets up + the clock and data muxes. +endif + config DRM_DUMB_VGA_DAC tristate "Dumb VGA DAC Bridge support" depends on OF
drivers/gpu/drm/bridge/Makefile +3 -0
@@ -20,3 +20,6 @@ obj-$(CONFIG_DRM_CDNS_MHDP) += mhdp8546.o obj-y += synopsys/ mhdp8546-objs := cdns-mhdp.o +ifeq ($(CONFIG_DRM_CDNS_MHDP_J721E),y) + mhdp8546-objs += cdns-mhdp-j721e.o +endif
drivers/gpu/drm/bridge/cdns-mhdp-j721e.c new file +79 -0
79 lines not on this page · raw message
drivers/gpu/drm/bridge/cdns-mhdp-j721e.h new file +55 -0
55 lines not on this page · raw message
drivers/gpu/drm/bridge/cdns-mhdp.c +13 -1
@@ -36,9 +36,21 @@#include <asm/unaligned.h> #include "cdns-mhdp.h" - +#include "cdns-mhdp-j721e.h" + +#ifdef CONFIG_DRM_CDNS_MHDP_J721E +static const struct mhdp_platform_ops mhdp_ti_j721e_ops = { + .init = cdns_mhdp_j721e_init, + .exit = cdns_mhdp_j721e_fini, + .enable = cdns_mhdp_j721e_enable, + .disable = cdns_mhdp_j721e_disable, +}; +#endif static const struct of_device_id mhdp_ids[] = { { .compatible ="cdns,mhdp8546" , }, +#ifdef CONFIG_DRM_CDNS_MHDP_J721E + { .compatible ="ti,j721e-mhdp8546" , .data = &mhdp_ti_j721e_ops }, +#endif {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mhdp_ids);
drivers/gpu/drm/bridge/cdns-mhdp.h +1 -0
@@ -335,6 +335,7 @@ struct mhdp_platform_ops {struct cdns_mhdp_device {void __iomem *regs; +void __iomem *j721e_regs;struct device *dev;struct clk *clk;
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel