From patchwork Mon Sep 2 09:06:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11126215 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 9C1EF1399 for ; Mon, 2 Sep 2019 09:06:49 +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 83C7220644 for ; Mon, 2 Sep 2019 09:06:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83C7220644 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 B0E4A89AB6; Mon, 2 Sep 2019 09:06:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id E799889AB6 for ; Mon, 2 Sep 2019 09:06:46 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id y23so1047421lje.9 for ; Mon, 02 Sep 2019 02:06:46 -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=ayhIrTq0dYD1crX4bCnYCwEQ3J9YxfxzkKpNwwOjRhU=; b=k4pY183rK8rCH7WcibyG+cAXFAUQDHOu4H3fIBZeeNr+scFAi4Eu5axuPvWF11pH6X oxfDRtTLShr1yXfZlgNy+lP7gXavOicIc/GO3eYLRjvGxAAn1B1ewAlwSUjP6wmZjts0 sngClHG7G0sbkGJ98Y/dSKe0s4d4H8dHwEyCL5OKdp5YoMbHK1T+oTSewNseiiNt1uwq +D/0ovC+M4yrcGPYUZFVHQnEA7naR+Uav8hfU1xi1vqQnRnYO3ZTWx61oIH1HIBvd6vq POgwNX6f3bF3ll88l3iYJOoAWE1pq0X9Z1tqWAviUJSbZ/aVEab/lHVkblw3fK75hGSO bXcw== X-Gm-Message-State: APjAAAVD9j4rgR0ewWHHacxQznAC6DJcpArdpcGE8UbUPF/uu1XkdbQ1 CgcS7UIZkHGLuwWBSgNbNlntCg== X-Google-Smtp-Source: APXvYqxinO7cywWMdvwtgixZqruPokLKVNsJL4WagBKMUJnVPQ/plMIqS+6vYQCJqv1xk5igpllCVQ== X-Received: by 2002:a2e:42c9:: with SMTP id h70mr6166391ljf.88.1567415204890; Mon, 02 Sep 2019 02:06:44 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m3sm725034ljc.29.2019.09.02.02.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 02:06:43 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/panel: Add DT bindings for Sony ACX424AKP Date: Mon, 2 Sep 2019 11:06:32 +0200 Message-Id: <20190902090633.24239-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=ayhIrTq0dYD1crX4bCnYCwEQ3J9YxfxzkKpNwwOjRhU=; b=pvdgSVsXnsmLoeqY7Acklfd5TL4BuMOQzRiz9/n8bYqW+jPlVz5jH7EIr7BIzvsn8v JUazHV+FJyUTc0opXUX4sf98fM3ChTEKHZYALqUc1C2H/MQlFC55mIBgHCZ8K9ajBWDG yez4FnfzEldnSL3xTTNj1MYoUV4x7G7qSmzpZmfHT+aQq1lvqZ/itvyvaQ8NApStUn/l oZ5iSq4gf/HGsc4C9VMV/7jjjyBEGm0IKuigSdFkhVi5rqKU6GPo2O3RCydmzMQbi6Hd 38zMhHDRH0M2RGp+X8wZKExfwGHHILxKtM+YzA39xp9MtGTC1W34QWhFThFDvGSWVD4J el0g== 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 --- .../display/panel/sony,acx424akp.yaml | 53 +++++++++++++++++++ 1 file changed, 53 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..29f41fee1b69 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml @@ -0,0 +1,53 @@ +# 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# + +properties: + compatible: + const: sony,acx424akp + reg: true + port: true + reset-gpios: true + vddi-supply: + description: regulator that supplies the vddi voltage + dsi-command-mode: + type: boolean + description: + If this is specified, the panel will be used in command + mode instead of video mode. + +required: + - compatible + - reg + - port + - reset-gpios + - power-supply + +additionalProperties: false + +examples: + - | + panel@0 { + compatible = "sony,acx424akp"; + reg = <0>; + vddi-supply = <&foo>; + reset-gpios = <&foo_gpio 0 GPIO_ACTIVE_LOW>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + +... \ No newline at end of file From patchwork Mon Sep 2 09:06:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11126217 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 6EA441395 for ; Mon, 2 Sep 2019 09:06:55 +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 56CAC20644 for ; Mon, 2 Sep 2019 09:06:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56CAC20644 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 28F4289AB9; Mon, 2 Sep 2019 09:06:54 +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 F114A89AB9 for ; Mon, 2 Sep 2019 09:06:50 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id z21so9887591lfe.1 for ; Mon, 02 Sep 2019 02:06:50 -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=Vmr/ht5IYIBUcs9L8LKGf97yXpVO4QhW+1CQmiiyIqw=; b=P+nbOEUw36MIVSs3MVK3Gu1qMKa4NwvNcok3HxX4otK4Wj4bS6S256evRJqgTSUE6x chaI7pPyyVRZxrkw9lyHzRLl/2V3P290xpRr44/FTsnjvSzjmOj+yA0/19BKtRDC893D pBO3EpRpEAqCxGN21qO2BixknWz/6rumaBqBAwJLWQlTwJByueyBoSVdskDkrdrhenq9 K+UEiVEPjia9hKuR75SQ8IPaNWCnKI33SdYC0zixFj1WfGt+ybFrL7SIYcgJ70NMvfBD epvs+GEBjjuDIkoKd8c7H55ZoJOlDu5xWYydMEpEFXi4T+NsbreRDa5REIJL7mqqfqzT K3Iw== X-Gm-Message-State: APjAAAWgGpwj4oO8eZZ/kuW7YeBuXkjTQhq5TDpNW/tOgbMaxllndiFQ gCWL6kmaFEC8ux3Gj7Tig6NWyA== X-Google-Smtp-Source: APXvYqyeHM2IuvRnIvNXNWXKERi/+/9NYsbit60YQMjHH0eGVGWKkLbl4ywNPWxPsJZ71gmTGlSqgw== X-Received: by 2002:a19:a407:: with SMTP id q7mr15021178lfc.166.1567415209183; Mon, 02 Sep 2019 02:06:49 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m3sm725034ljc.29.2019.09.02.02.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 02:06:47 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/panel: Add driver for Sony ACX424AKP panel Date: Mon, 2 Sep 2019 11:06:33 +0200 Message-Id: <20190902090633.24239-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190902090633.24239-1-linus.walleij@linaro.org> References: <20190902090633.24239-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=Vmr/ht5IYIBUcs9L8LKGf97yXpVO4QhW+1CQmiiyIqw=; b=NoS4TCrL0VIz4GKLS6X9n6ghT8AAc494lGb+yiXg3MWlN119lyrmOz/P0mE2qlkEK0 Ce9P1r5L11u0njtw+1eXsLzG/smjBNtswcbD4TGRRHm4rt3ooLvhIrxr5qLRSeoClz2H JRTKkKK6bhfbUMZoUQ0A9MovJZenmSooEIvGdxytgBrHvmqUaWf+5ssh2owhKV+C5Awq 7LKF+KZoyeBuA+GJgLIN3/6gwOBGUOjM4i92j7W0DMSw/uF5cWM6rUf5ewHOuKk+Vdru bnTnuvjHPnMNekzbkL+K7HCuNh8oY8j/esp5wdcVMSoHu1+VBKy3nkaBs9ECxEP9aDKP uS+w== 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 --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sony-acx424akp.c | 530 +++++++++++++++++++ 3 files changed, 538 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 d9d931aa6e26..435388a874e2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -275,6 +275,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_TPO_TPG110 tristate "TPO TPG 800x400 panel" depends on OF && SPI && GPIOLIB diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index fb0cb3aaa9e6..9ed4d853267e 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -28,5 +28,6 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.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_TPO_TPG110) += panel-tpo-tpg110.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.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..807560d2a8ec --- /dev/null +++ b/drivers/gpu/drm/panel/panel-sony-acx424akp.c @@ -0,0 +1,530 @@ +// 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