From patchwork Mon Mar 16 04:16:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harigovindan P X-Patchwork-Id: 11439687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D60A139A for ; Mon, 16 Mar 2020 04:16:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 269AF2072A for ; Mon, 16 Mar 2020 04:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728464AbgCPEQy (ORCPT ); Mon, 16 Mar 2020 00:16:54 -0400 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:51707 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbgCPEQy (ORCPT ); Mon, 16 Mar 2020 00:16:54 -0400 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 16 Mar 2020 09:46:50 +0530 Received: from harigovi-linux.qualcomm.com ([10.204.66.157]) by ironmsg02-blr.qualcomm.com with ESMTP; 16 Mar 2020 09:46:50 +0530 Received: by harigovi-linux.qualcomm.com (Postfix, from userid 2332695) id 2F8432854; Mon, 16 Mar 2020 09:46:49 +0530 (IST) From: Harigovindan P To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Harigovindan P , robdclark@gmail.com, seanpaul@chromium.org, sean@poorly.run Subject: [PATCH v7 1/2] dt-bindings: display: add visionox rm69299 panel variant Date: Mon, 16 Mar 2020 09:46:46 +0530 Message-Id: <20200316041647.27953-2-harigovi@codeaurora.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200316041647.27953-1-harigovi@codeaurora.org> References: <20200316041647.27953-1-harigovi@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add bindings for visionox rm69299 panel. Signed-off-by: Harigovindan P --- Changes in v2: - Removed unwanted properties from description. - Creating source files without execute permissions(Rob Herring). Changes in v3: - Changing txt file into yaml Changes in v4: - Updating license identifier. - Moving yaml file inside panel directory. - Removing pinctrl entries. - Adding documentation for reset-gpios. Changes in v5: - No changes. Updated 2/2 Patch. Changes in v6: - Removing patternProperties. - Added " |" after description. - Setting port and reset-gpios to true. - Removing @ae94000 for dsi node. Changes in v7: - Added reg property. .../display/panel/visionox,rm69299.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml diff --git a/Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml b/Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml new file mode 100644 index 000000000000..6ea1a7be3787 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/visionox,rm69299.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Visionox model RM69299 Panels Device Tree Bindings. + +maintainers: + - Harigovindan P + +description: | + This binding is for display panels using a Visionox RM692999 panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: visionox,rm69299-1080p-display + + reg: + maxItems: 1 + + vdda-supply: + description: | + Phandle of the regulator that provides the vdda supply voltage. + + vdd3p3-supply: + description: | + Phandle of the regulator that provides the vdd3p3 supply voltage. + + ports: + type: object + description: | + A node containing DSI input & output port nodes with endpoint + definitions as documented in + Documentation/devicetree/bindings/media/video-interfaces.txt + Documentation/devicetree/bindings/graph.txt + properties: + port: true + + reset-gpios: true + +required: + - compatible + - reg + - vdda-supply + - vdd3p3-supply + - reset-gpios + +additionalProperties: false + +examples: + - | + dsi { + reg = <0x0ae94000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "visionox,rm69299-1080p-display"; + reg = <0x0ae94000 0x400>; + + vdda-supply = <&src_pp1800_l8c>; + vdd3p3-supply = <&src_pp2800_l18a>; + + reset-gpios = <&pm6150l_gpio 3 0>; + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + panel0_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; + }; + +... From patchwork Mon Mar 16 04:16:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harigovindan P X-Patchwork-Id: 11439689 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E5B06CA for ; Mon, 16 Mar 2020 04:16:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 136E320722 for ; Mon, 16 Mar 2020 04:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728964AbgCPEQz (ORCPT ); Mon, 16 Mar 2020 00:16:55 -0400 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:23551 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbgCPEQz (ORCPT ); Mon, 16 Mar 2020 00:16:55 -0400 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 16 Mar 2020 09:46:51 +0530 Received: from harigovi-linux.qualcomm.com ([10.204.66.157]) by ironmsg02-blr.qualcomm.com with ESMTP; 16 Mar 2020 09:46:50 +0530 Received: by harigovi-linux.qualcomm.com (Postfix, from userid 2332695) id EEE0C284A; Mon, 16 Mar 2020 09:46:49 +0530 (IST) From: Harigovindan P To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Harigovindan P , robdclark@gmail.com, seanpaul@chromium.org, sean@poorly.run Subject: [PATCH v7 2/2] drm/panel: add support for rm69299 visionox panel driver Date: Mon, 16 Mar 2020 09:46:47 +0530 Message-Id: <20200316041647.27953-3-harigovi@codeaurora.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200316041647.27953-1-harigovi@codeaurora.org> References: <20200316041647.27953-1-harigovi@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for Visionox panel driver. Signed-off-by: Harigovindan P Reviewed-by: Matthias Kaehlcke --- Changes in v2: - Dropping redundant space in Kconfig(Sam Ravnborg). - Changing structure for include files(Sam Ravnborg). - Removing backlight related code and functions(Sam Ravnborg). - Removing repeated printing of error message(Sam Ravnborg). - Adding drm_connector as an argument for get_modes function. Changes in v3: - Adding arguments for drm_panel_init to support against mainline. Changes in v4: - Removing error messages from regulator_set_load. - Removing dev struct entry. - Removing checks. - Dropping empty comment lines. Changes in v5: - Removing unused struct member variables. - Removing blank lines. - Fixed indentation. - Invoking dsi_detach and panel_remove while early exiting from probe. Changes in v6: - Changed "35597" to "rm69299" for power_on function. - Removing rm69299_config since it supports single type of panel for now. - Fixed alignment. - Using goto statements when regulator_set_load fails. Changes in v7: - Added new goto statement when regulator_set_load fails. drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-visionox-rm69299.c | 295 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-visionox-rm69299.c +MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index ae44ac2ec106..7b696f304a99 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -389,6 +389,14 @@ config DRM_PANEL_TRULY_NT35597_WQXGA Say Y here if you want to enable support for Truly NT35597 WQXGA Dual DSI Video Mode panel +config DRM_PANEL_VISIONOX_RM69299 + tristate "Visionox RM69299" + depends on OF + depends on DRM_MIPI_DSI + help + Say Y here if you want to enable support for Visionox + RM69299 DSI Video Mode panel. + config DRM_PANEL_XINPENG_XPP055C272 tristate "Xinpeng XPP055C272 panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 7c4d3c581fd4..9f11d067a6b2 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -41,4 +41,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o +obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c new file mode 100644 index 000000000000..0f877d21fdf2 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c @@ -0,0 +1,295 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include + +#include