From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754861AbdC3JJ2 (ORCPT ); Thu, 30 Mar 2017 05:09:28 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:36602 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753359AbdC3JEp (ORCPT ); Thu, 30 Mar 2017 05:04:45 -0400 From: Neil Armstrong To: dri-devel@lists.freedesktop.org, laurent.pinchart+renesas@ideasonboard.com, architt@codeaurora.org, mchehab@kernel.org Cc: Neil Armstrong , Jose.Abreu@synopsys.com, kieran.bingham@ideasonboard.com, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-media@vger.kernel.org, hans.verkuil@cisco.com, sakari.ailus@linux.intel.com Subject: [PATCH v5 0/6] drm: bridge: dw-hdmi: Add support for Custom PHYs Date: Thu, 30 Mar 2017 11:04:29 +0200 Message-Id: <1490864675-17336-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Amlogic GX SoCs implements a Synopsys DesignWare HDMI TX Controller in combination with a very custom PHY. Thanks to Laurent Pinchart's changes, the HW report the following : Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy) The following differs from common PHY integration as managed in the current driver : - Amlogic PHY is not configured through the internal I2C link - Amlogic PHY do not use the ENTMDS, SVSRET, PDDQ, ... signals from the controller - Amlogic PHY do not export HPD ands RxSense signals to the controller And finally, concerning the controller integration : - the Controller registers are not flat memory-mapped, and uses an addr+read/write register pair to write all registers. - Inputs only YUV444 pixel data Most of these uses case are implemented in Laurent Pinchart v5.1 patchset merged in drm-misc-next branch. This is why the following patchset implements : - Configure the Input format from the plat_data - Add PHY callback to handle HPD and RxSense out of the dw-hdmi driver To implement the input format handling, the Synopsys HDMIT TX Controller input V4L bus formats are used and missing formats + documentation are added. This patchset makes the Amlogic GX SoCs HDMI output successfully work, and is also tested on the RK3288 ACT8846 EVB Board. Changes since v4 at [5] : - Rebased on drm-misc-next at bd283d2f66c2 - Fix 4:2:0 bus formats naming - Renamed function fd_registered to i2c_init in dw-hdmi.c Changes since v3 at [4] : - Fix 4:2:0 bus formats naming - Add separate 36bit and 48bit tables for bus formats documentation - Added 4:2:0 bus config in hdmi_video_sample - Moved dw_hdmi documentation in a "bridge" subdir - Rebase on drm-misc-next at 62c58af32c93 Changes since v2 at [3] : - Rebase on laurent patch "Extract PHY interrupt setup to a function" - Reduce phy operations - Switch the V4L bus formats and encodings instead of custom enum Changes since v1 at [2] : - Drop patches submitted by laurent Changes since RFC at [1] : - Regmap fixup for 4bytes register access, tested on RK3288 SoC - Move phy callbacks to phy_ops and move Synopsys PHY calls into default ops - Move HDMI link data into shared header - Move Pixel Encoding enum to shared header [1] http://lkml.kernel.org/r/1484656294-6140-1-git-send-email-narmstrong@baylibre.com [2] http://lkml.kernel.org/r/1485774318-21916-1-git-send-email-narmstrong@baylibre.com [3] http://lkml.kernel.org/r/1488468572-31971-1-git-send-email-narmstrong@baylibre.com [4] http://lkml.kernel.org/r/1488904944-14285-1-git-send-email-narmstrong@baylibre.com [5] http://lkml.kernel.org/r/1490109161-20529-1-git-send-email-narmstrong@baylibre.com Laurent Pinchart (1): drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function Neil Armstrong (5): media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller documentation: media: Add documentation for new RGB and YUV bus formats drm: bridge: dw-hdmi: Switch to V4L bus format and encodings drm: bridge: dw-hdmi: Add Documentation on supported input formats drm: bridge: dw-hdmi: Move HPD handling to PHY operations Documentation/gpu/bridge/dw-hdmi.rst | 15 + Documentation/gpu/index.rst | 1 + Documentation/media/uapi/v4l/subdev-formats.rst | 871 +++++++++++++++++++++++- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 470 ++++++++----- include/drm/bridge/dw_hdmi.h | 68 ++ include/uapi/linux/media-bus-format.h | 13 +- 6 files changed, 1266 insertions(+), 172 deletions(-) create mode 100644 Documentation/gpu/bridge/dw-hdmi.rst -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Armstrong Subject: [PATCH v5 0/6] drm: bridge: dw-hdmi: Add support for Custom PHYs Date: Thu, 30 Mar 2017 11:04:29 +0200 Message-ID: <1490864675-17336-1-git-send-email-narmstrong@baylibre.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id E5CA76E032 for ; Thu, 30 Mar 2017 09:04:44 +0000 (UTC) Received: by mail-lf0-x22d.google.com with SMTP id x137so21946856lff.3 for ; Thu, 30 Mar 2017 02:04:44 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org, laurent.pinchart+renesas@ideasonboard.com, architt@codeaurora.org, mchehab@kernel.org Cc: Jose.Abreu@synopsys.com, linux-doc@vger.kernel.org, Neil Armstrong , kieran.bingham@ideasonboard.com, linux-kernel@vger.kernel.org, hans.verkuil@cisco.com, sakari.ailus@linux.intel.com, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org VGhlIEFtbG9naWMgR1ggU29DcyBpbXBsZW1lbnRzIGEgU3lub3BzeXMgRGVzaWduV2FyZSBIRE1J IFRYIENvbnRyb2xsZXIKaW4gY29tYmluYXRpb24gd2l0aCBhIHZlcnkgY3VzdG9tIFBIWS4KClRo YW5rcyB0byBMYXVyZW50IFBpbmNoYXJ0J3MgY2hhbmdlcywgdGhlIEhXIHJlcG9ydCB0aGUgZm9s bG93aW5nIDoKIERldGVjd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nZS9zeW5vcHN5cy9kdy1oZG1pLmMgICAgICAgfCA0NzAgKysrKysrKystLS0tLQog aW5jbHVkZS9kcm0vYnJpZGdlL2R3X2hkbWkuaCAgICAgICAgICAgICAgICAgICAgfCAgNjggKysK IGluY2x1ZGUvdWFwaS9saW51eC9tZWRpYS1idXMtZm9ybWF0LmggICAgICAgICAgIHwgIDEzICst CiA2IGZpbGVzIGNoYW5nZWQsIDEyNjYgaW5zZXJ0aW9ucygrKSwgMTcyIGRlbGV0aW9ucygtKQog Y3JlYXRlIG1vZGUgMTAwNjQ0IERvY3VtZW50YXRpb24vZ3B1L2JyaWRnZS9kdy1oZG1pLnJzdAoK LS0gCjEuOS4xCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f XwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1kZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcK aHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 From: narmstrong@baylibre.com (Neil Armstrong) Date: Thu, 30 Mar 2017 11:04:29 +0200 Subject: [PATCH v5 0/6] drm: bridge: dw-hdmi: Add support for Custom PHYs Message-ID: <1490864675-17336-1-git-send-email-narmstrong@baylibre.com> To: linus-amlogic@lists.infradead.org List-Id: linus-amlogic.lists.infradead.org The Amlogic GX SoCs implements a Synopsys DesignWare HDMI TX Controller in combination with a very custom PHY. Thanks to Laurent Pinchart's changes, the HW report the following : Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy) The following differs from common PHY integration as managed in the current driver : - Amlogic PHY is not configured through the internal I2C link - Amlogic PHY do not use the ENTMDS, SVSRET, PDDQ, ... signals from the controller - Amlogic PHY do not export HPD ands RxSense signals to the controller And finally, concerning the controller integration : - the Controller registers are not flat memory-mapped, and uses an addr+read/write register pair to write all registers. - Inputs only YUV444 pixel data Most of these uses case are implemented in Laurent Pinchart v5.1 patchset merged in drm-misc-next branch. This is why the following patchset implements : - Configure the Input format from the plat_data - Add PHY callback to handle HPD and RxSense out of the dw-hdmi driver To implement the input format handling, the Synopsys HDMIT TX Controller input V4L bus formats are used and missing formats + documentation are added. This patchset makes the Amlogic GX SoCs HDMI output successfully work, and is also tested on the RK3288 ACT8846 EVB Board. Changes since v4 at [5] : - Rebased on drm-misc-next at bd283d2f66c2 - Fix 4:2:0 bus formats naming - Renamed function fd_registered to i2c_init in dw-hdmi.c Changes since v3 at [4] : - Fix 4:2:0 bus formats naming - Add separate 36bit and 48bit tables for bus formats documentation - Added 4:2:0 bus config in hdmi_video_sample - Moved dw_hdmi documentation in a "bridge" subdir - Rebase on drm-misc-next at 62c58af32c93 Changes since v2 at [3] : - Rebase on laurent patch "Extract PHY interrupt setup to a function" - Reduce phy operations - Switch the V4L bus formats and encodings instead of custom enum Changes since v1 at [2] : - Drop patches submitted by laurent Changes since RFC at [1] : - Regmap fixup for 4bytes register access, tested on RK3288 SoC - Move phy callbacks to phy_ops and move Synopsys PHY calls into default ops - Move HDMI link data into shared header - Move Pixel Encoding enum to shared header [1] http://lkml.kernel.org/r/1484656294-6140-1-git-send-email-narmstrong at baylibre.com [2] http://lkml.kernel.org/r/1485774318-21916-1-git-send-email-narmstrong at baylibre.com [3] http://lkml.kernel.org/r/1488468572-31971-1-git-send-email-narmstrong at baylibre.com [4] http://lkml.kernel.org/r/1488904944-14285-1-git-send-email-narmstrong at baylibre.com [5] http://lkml.kernel.org/r/1490109161-20529-1-git-send-email-narmstrong at baylibre.com Laurent Pinchart (1): drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function Neil Armstrong (5): media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller documentation: media: Add documentation for new RGB and YUV bus formats drm: bridge: dw-hdmi: Switch to V4L bus format and encodings drm: bridge: dw-hdmi: Add Documentation on supported input formats drm: bridge: dw-hdmi: Move HPD handling to PHY operations Documentation/gpu/bridge/dw-hdmi.rst | 15 + Documentation/gpu/index.rst | 1 + Documentation/media/uapi/v4l/subdev-formats.rst | 871 +++++++++++++++++++++++- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 470 ++++++++----- include/drm/bridge/dw_hdmi.h | 68 ++ include/uapi/linux/media-bus-format.h | 13 +- 6 files changed, 1266 insertions(+), 172 deletions(-) create mode 100644 Documentation/gpu/bridge/dw-hdmi.rst -- 1.9.1