From patchwork Thu Oct 24 11:43:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11209169 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 DA3DF1515 for ; Thu, 24 Oct 2019 11:43:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C27E120679 for ; Thu, 24 Oct 2019 11:43:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C27E120679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A26A6E2F0; Thu, 24 Oct 2019 11:43:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 292E16E2E3 for ; Thu, 24 Oct 2019 11:43:12 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id 21so9932670lft.10 for ; Thu, 24 Oct 2019 04:43:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YA2/6tugEUXajeImGkJKBKEZmtx66gdb7sqhmJwslGY=; b=Pk5rUegzNtFKxZ03L3vhdsY8nG1PKamPEvDlapDmPUffIx7JcOnzop9OMkAjVWGsv9 ZUPujFX/7yHThxRrMHGeGCOdPS3hr+h9WjfR5xsTcur0nidw1+xlLBxK3v/MewO798Ss at0yN/hfX00MctXlHVN5V69PYzmi9qIdaqE2FAVxCatdX91QBSBbHtynx+HS9mW44UnY vDdVDL4IkZ2MQYKS9Sg78qZ3HPJi2COIko53ADjXd0aBoVpQAMbCNcJT+1hcqPnapPuH 92J9+0vFe2avbSUJxswaYUfl4NoAPxSGMvbiu7CpsiLTBWGYSWLpNzpcCZNI1nluf2iV kG/g== X-Gm-Message-State: APjAAAXjnzVJLcZjiQL6Ad5AtjHoupUpTxq0ia/K2pE/lpPWQZ2phGjq aburAFuP8mp7QeE+tTB4SMXFKA== X-Google-Smtp-Source: APXvYqx8kdrGIfury192V5XJYpRNsCP56CqynHKeZKfMOB1fdCbLg4LcLpygidy1qE2MCVmHRS5ULw== X-Received: by 2002:ac2:5443:: with SMTP id d3mr24940890lfn.58.1571917390330; Thu, 24 Oct 2019 04:43:10 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e14sm4001846ljb.75.2019.10.24.04.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 04:43:09 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 1/3 v4] drm/panel: Add generic DSI panel YAML bindings Date: Thu, 24 Oct 2019 13:43:03 +0200 Message-Id: <20191024114305.15581-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YA2/6tugEUXajeImGkJKBKEZmtx66gdb7sqhmJwslGY=; b=iDAJ/s2TGKVZ6cOgbobRLZao9OgQZQi4YmUL9dKbcSs9e/KS4Niu41OX1MSx/i5GY7 PPhVqnHLpGXdNJAiKdPcVumOOKcYfz//oupiPnFZCbsLrtNYDgkYZy0Cirn3qvpxjb20 5iIKRqM0RltwLAddbhLY4hIK0961eF/WNoi5rAE9X5r3ZtDdqL6z2cF7ge8/NS82H4AO YJUxt+tlC9o5KD60L1uGr8CoFCx9qB8gEZPlXyB1S7rAxB6TlxYJOghSGRVJBiqKJ4f7 IjN4SwgefFkxpBLTKCgS3tvS+QsdWyDy217bxwUsQFWJFJJpEQuiU4sFgTpW21s5junV mqPw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds a starting point for processing and defining generic bindings used by DSI panels. We just define one single bool property to force the panel into video mode for now. Cc: devicetree@vger.kernel.org Suggested-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Rename into display/dsi-controller.yaml - Require a virtual channel number for the DSI panel, as DSI have this 2-bit virtual address field. - Bring in some but not all properties from the existing MIPI DSI bindings. This schema can be used with simpler panels but not complex panels with multiple virtual channels for the moment. Let's handle it when we get there. - Add an example. ChangeLog v2->v3: - Make a more complete DSI panel binding including the controller and its address-cells and size-cells and a pattern for the panel nodes. The panel is one per DSI master, the reg property is compulsory but should always be 0 (as far as I can tell) as only one panel can be connected. The bus doesn't really have any addresses for the panel, the address/reg notation seems to be cargo-culted from the port graphs and is not necessary to parse some device trees, it is used to tell whether the node is a panel or not rather than any addressing. - I have no idea how many displays you can daisychain on a single DSI master, I just guess 15 will be enough. The MIPI-specs are memberwalled. Someone who knows can tell perhaps? ChangeLog v1->v2: - New patch after feedback. --- .../bindings/display/dsi-controller.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/dsi-controller.yaml diff --git a/Documentation/devicetree/bindings/display/dsi-controller.yaml b/Documentation/devicetree/bindings/display/dsi-controller.yaml new file mode 100644 index 000000000000..2a6d872a40c5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/dsi-controller.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-dsi-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for DSI Display Panels + +maintainers: + - Linus Walleij + +description: | + This document defines device tree properties common to DSI, Display + Serial Interface panels. It doesn't constitute a device tree binding + specification by itself but is meant to be referenced by device tree + bindings. + + When referenced from panel device tree bindings the properties defined in + this document are defined as follows. The panel device tree bindings are + responsible for defining whether each property is required or optional. + + Notice: this binding concerns DSI panels connected directly to a master + without any intermediate port graph to the panel. Each DSI master + can control exactly one panel. They should all just have a node "panel" + for their panel with their reg-property set to 0. + +properties: + $nodename: + pattern: "^dsi-controller(@.*)?$" + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^panel@[0-3]$": + type: object + + properties: + reg: + minimum: 0 + maximum: 3 + description: + The virtual channel number of a DSI peripheral. Must be in the range + from 0 to 3, as DSI uses a 2-bit addressing scheme. Some DSI + peripherals respond to more than a single virtual channel. In that + case the reg property can take multiple entries, one for each virtual + channel that the peripheral responds to. + + clock-master: + type: boolean + description: + Should be enabled if the host is being used in conjunction with + another DSI host to drive the same peripheral. Hardware supporting + such a configuration generally requires the data on both the busses + to be driven by the same clock. Only the DSI host instance + controlling this clock should contain this property. + + enforce-video-mode: + type: boolean + description: + The best option is usually to run a panel in command mode, as this + gives better control over the panel hardware. However for different + reasons like broken hardware, missing features or testing, it may be + useful to be able to force a command mode-capable panel into video + mode. + + required: + - reg + +examples: + - | + dsi-controller@55aa55aa { + compatible = "acme,foo"; + reg = <0x55aa55aa>; + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "acme,bar"; + reg = <0>; + vddi-supply = <&foo>; + reset-gpios = <&foo_gpio 0 GPIO_ACTIVE_LOW>; + }; + }; + +... From patchwork Thu Oct 24 11:43:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11209171 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 42951112B for ; Thu, 24 Oct 2019 11:43:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AEFB20679 for ; Thu, 24 Oct 2019 11:43:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AEFB20679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 047E86E2F3; Thu, 24 Oct 2019 11:43:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id E00A16E2E3 for ; Thu, 24 Oct 2019 11:43:13 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id g3so6651520lfb.11 for ; Thu, 24 Oct 2019 04:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y6qwseFf3sOEzysjfxOCeatUxazVlV6E5726z4gpfTk=; b=J7uES+4Du0W21oqztZD3lNBRgtqvIwF+k2mdKq8DmPm3dpj6bfAteYVFo+jlJQpeRB gZwZNgwod4t2tQWGQi2I8y5sMFShDnhNFSB6tnuPvPHt4hcv1taI4wXYMtBWmNbhV2OY RcSm11eyl7iCd61q/mRtUIu/HdEOKCrGEmMMiALZbOVvMWhxK/i0Ai3qzUpFugILhq2c XIQO2Xz+4dNTPxRLaa4DYyX54lgx9T9tBx1/M+vj/jf/RrRq8TNEqClxC8cijCI3IqCq f6AMX/0sCVfPPeg52ooUq0B6iNs4yZ9DViCZyAf7I/IZaZRyJ03VwOCFG8+p0g7YWUDW QKyw== X-Gm-Message-State: APjAAAUQmH1aPowElOsm8ELcbcS4aAxsl37e2xYJ7nHv30S+JMEYvCJu ZEXEpJ90+AbQUGUxp6LZgvwJusYck4o= X-Google-Smtp-Source: APXvYqwApy6iTTlUo7LyKjHSge1hqKfP9JTwipM9xBhCzAcimzQLZisjM3ga4wJey8II3bDv8+mD1A== X-Received: by 2002:a19:651b:: with SMTP id z27mr24607041lfb.117.1571917392144; Thu, 24 Oct 2019 04:43:12 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e14sm4001846ljb.75.2019.10.24.04.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 04:43:11 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 2/3 v4] drm/panel: Add DT bindings for Sony ACX424AKP Date: Thu, 24 Oct 2019 13:43:04 +0200 Message-Id: <20191024114305.15581-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191024114305.15581-1-linus.walleij@linaro.org> References: <20191024114305.15581-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y6qwseFf3sOEzysjfxOCeatUxazVlV6E5726z4gpfTk=; b=dN9+UiU2TiIaFv1ECG8dz2AKCpyynB8QkW7md/WXneHG+ISMq7AOoyaWnBLRx6PmAY wXWWnF3wjJYAdwfg3HzJfX9UwYP9NvatBJyQpbjP/e+Tuc7RJbuqP9ArqxbPjtwGNikj tFn26MVd/P/b7ieBc3YSzBJV8fdanYQ2Zv4qzqR8TctDjFINFboEs6WGkCJa4sS2H0Hq 02QOjA6Xds3Gcpjct994FJ8a2Nhqp8byEzloxr+5qdwusSGfrh3Daj52ZfgFAx9cUUBf AXtxTJn2f6upA6wyfmm32/YAowtwNgXf2IJgpqk4DysQdfOWhpHtPts87nW8wC3Rj1+W sMfw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds device tree bindings for the Sony ACX424AKP panel. Let's use YAML. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Adjust to adjusted DSI bindings. ChangeLog v2->v3: - Put the example inside a dsi-controller so we have a complete example that verifies to the DSI panel generic binding. ChangeLog v1->v2: - Suggest a stand-alone YAML bindings file for DSI panels in a separate patch, and use that to reference the boolean "enforce-video-mode" attribute for DSI panels --- .../display/panel/sony,acx424akp.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml diff --git a/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml b/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml new file mode 100644 index 000000000000..a2f49b9a5958 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/sony,acx424akp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sony ACX424AKP 4" 480x864 AMOLED panel + +maintainers: + - Linus Walleij + +allOf: + - $ref: panel-common.yaml# + - $ref: ../dsi-controller.yaml# + +properties: + compatible: + const: sony,acx424akp + reg: true + port: true + reset-gpios: true + vddi-supply: + description: regulator that supplies the vddi voltage + enforce-video-mode: true + +required: + - compatible + - reg + - port + - reset-gpios + - power-supply + +additionalProperties: false + +examples: + - | + dsi-controller@0 { + compatible = "foo"; + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "sony,acx424akp"; + reg = <0>; + vddi-supply = <&foo>; + reset-gpios = <&foo_gpio 0 GPIO_ACTIVE_LOW>; + }; + }; + +... \ No newline at end of file From patchwork Thu Oct 24 11:43:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11209173 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 3FD551515 for ; Thu, 24 Oct 2019 11:43:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 282D820679 for ; Thu, 24 Oct 2019 11:43:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 282D820679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A63F6E2E3; Thu, 24 Oct 2019 11:43:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id C63776E2F2 for ; Thu, 24 Oct 2019 11:43:15 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id d1so24619370ljl.13 for ; Thu, 24 Oct 2019 04:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HocbHkVryxQKKYD4eJZYx0TKKDYaGAurOyeG5XutFxE=; b=jticXYNFVPgb1g/hUtnzulJwMI3ViipqAE3OXxlCxC3r2aCgAczTl+3SwHNdFOFkCK zqHfXcFs07xDUiqRZJnPc3+kh7i8I2Z1ifu5U3PS61OOVNTLUvJOK5GnfsdCEswnxTRI XLe10M2O1PLkfQfKYDNyfd7K8mPvpfR/gx/Y8nn4f2bP0g+53pZ6iJZkCQL7wlU56HWF 6DdqQgv/1vuFLvZ2HHoLEnLsjwW2J31SaHp6Qpzc2uowPA177i7M87SrBG2Tau+7LSkg /qWAcVMyAPfMNKuruwEMsNG1rnQbtSqVD20pdVPUriqnpfSmK1xmTM072eo5mu/QT+92 5cFA== X-Gm-Message-State: APjAAAWsA8EvXHQshX5q0DThLqy7bBpGHB7gr0L0grNiM0yIgQwhn27M aqFyBDcNOa+i+d+MLodbYOCIHA== X-Google-Smtp-Source: APXvYqxcgyF29QcGwMHLxkC16T3aLMAI6U+cDeZMwCvAE/EXkBuqDis0fZWqudY01GEyThZ5mTPcjA== X-Received: by 2002:a2e:9e85:: with SMTP id f5mr26487084ljk.203.1571917393741; Thu, 24 Oct 2019 04:43:13 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e14sm4001846ljb.75.2019.10.24.04.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 04:43:13 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 3/3 v4] drm/panel: Add driver for Sony ACX424AKP panel Date: Thu, 24 Oct 2019 13:43:05 +0200 Message-Id: <20191024114305.15581-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191024114305.15581-1-linus.walleij@linaro.org> References: <20191024114305.15581-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HocbHkVryxQKKYD4eJZYx0TKKDYaGAurOyeG5XutFxE=; b=k81rwmW70iZcnMNYDKoKql86Z5v2JtegX+HhBvBItjDaDP3ZaiQ1ZSdT5DE3S3W3uP yG3acCQfCrLo+x9H9Gw6GzLkSyf0lfPNyoSx0dK2uSNkbXm8azMMJswWwxCi0VLvNsUw SleFhz5+rIP1gSZS/DtTr2YKGy1okQDFdtUmegnKW1TU0mx9OaStHLhLQWJiUZQDgO1v 8pw+ejFNn4bnI4D16+orvdiqEcfiBIw2ps+NtfPfdttMUe772lLCp46UbYNhG+n75XMA 8gAcPIs5u3QZpi50nV6uCoILDb6aZJf8iih6WB5DHFIA1FHwtT6+kY0DdhhszSELaxI8 xPmA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The Sony ACX424AKP is a command/videomode DSI panel for mobile devices. It is used on the ST-Ericsson HREF520 reference design. We support video mode by default, but it is possible to switch the panel into command mode by using the bool property "dsi-command-mode". Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - No changes just resending with the new binding updates. ChangeLog v2->v3: - No changes just resending with the new binding updates. ChangeLog v1->v2: - Fix up the ID read function to split into reading header, version and ID, store the version in the struct. - Get rid of a surplus semicolon found by the build robot while rewriting the above code. - Use unsigned int in probe() loop. - Set vrefresh to 60Hz, as good as any, the measured vrefresh in continous command mode is ~117 Hz. - Use a different for() idiom while retrying to read ID 5 times. - Drop the sync pulse setting, we are not using this, this panel uses an event. - Use the generic "enforce-video-mode" for video mode enforcement. --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sony-acx424akp.c | 542 +++++++++++++++++++ include/video/mipi_display.h | 1 + 4 files changed, 551 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-sony-acx424akp.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index f152bc4eeb53..959df5bea7d2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -316,6 +316,13 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_SONY_ACX424AKP + tristate "Sony ACX424AKP DSI command mode panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + config DRM_PANEL_SONY_ACX565AKM tristate "Sony ACX565AKM panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index b6cd39fe0f20..0b51793e3b43 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o diff --git a/drivers/gpu/drm/panel/panel-sony-acx424akp.c b/drivers/gpu/drm/panel/panel-sony-acx424akp.c new file mode 100644 index 000000000000..96a1450b699e --- /dev/null +++ b/drivers/gpu/drm/panel/panel-sony-acx424akp.c @@ -0,0 +1,542 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * MIPI-DSI Sony ACX424AKP panel driver. This is a 480x864 + * AMOLED panel with a command-only DSI interface. + * + * Copyright (C) Linaro Ltd. 2019 + * Author: Linus Walleij + * Based on code and know-how from Marcus Lorentzon + * Copyright (C) ST-Ericsson SA 2010 + */ + +#include +#include +#include +#include +#include