From patchwork Wed Jul 14 22:50:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12378007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33871C12002 for ; Wed, 14 Jul 2021 22:52:11 +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 01E49613C9 for ; Wed, 14 Jul 2021 22:52:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01E49613C9 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 20D1D6E46B; Wed, 14 Jul 2021 22:52:10 +0000 (UTC) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A9AC6E46B for ; Wed, 14 Jul 2021 22:52:09 +0000 (UTC) Received: by mail-lj1-x232.google.com with SMTP id u25so5765352ljj.11 for ; Wed, 14 Jul 2021 15:52:09 -0700 (PDT) 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=vc1795qvLpUqEdDnFv1A73y0n5CUCOk1ko3r9sb3Sx0=; b=nxc0PfF+vcpPyOd7wizP6Qq8XgwEGMvP+b0wo88UNeoTCIUvTu4QhMo2t7Yfw5pUdt WkLIfeTxJaOuf6Xi9NXmUM2+BPH07qole1NgZngPcaI0qRHcCI95amaJRsh9rk4mivV6 g8VQ5SHNrOIdqNEB3N9mXsZi3PQwHKm4UO4JeLWRAToht4FNhS8eq7mUIMUkvo23Cciz FPyHPl5qLuzw5YW0aKKroNZn6sc+EaHddghvNE/hFcEAk1rLFv0RECf7kKghA44lPE3d Ra9KaDIgRFONPbCvBdAVPH4AfVoLvtDqATNPZZ2cNfeODSBeer0EeUjbgN0W4aRqwiYS R9+Q== 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=vc1795qvLpUqEdDnFv1A73y0n5CUCOk1ko3r9sb3Sx0=; b=BZTpvUIUEgAUgJa3TeCa5zX5mA+pLQcL8rYA5y+gLu3yF+Kllegxb090DQQoTYkz1A 4Ixyy4h4HRBVHYa7n9cshGMNX9uJpi+F1lPrm4tZAw86TxWZa9igGOH4M15JKEyAOtMr LRcyefwOCdcOIAo8AooPIpTCo5Xi+JVFs3IQOC4/nzjVEwLLU9OZG9ukouJBVNj3psap RsFcyp4uvC0HgQuXQY56wwwgOm6aJk0y0sgXnbO8MMx5Yx7iVciKf+uKgHZSwFyrMN+F Fqa/oiv7SDol2eSgbhU1oUyK+3PEe2AYNB5h4dVHkFxMuaCAwkW2daIOCzKIeP8xyaKK R2KA== X-Gm-Message-State: AOAM530vKJe3SDQqpBn3Bf/SAiHMSFEvFLxXH/dwgD3OUqYPr0st8f3p bGcVRtbeZ7A0frdmHjxClK3Fng== X-Google-Smtp-Source: ABdhPJxDXhj2BLMGMjFb1MJmvVrRCVFza7h3BYAxpmGa8zBkaoag7+E02+PhIRS+h7Jp8yaKlFSUcw== X-Received: by 2002:a2e:80c2:: with SMTP id r2mr173089ljg.164.1626303127507; Wed, 14 Jul 2021 15:52:07 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id m4sm205984ljq.96.2021.07.14.15.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 15:52:06 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 1/2 v4] drm/panel: Add DT bindings for Samsung LMS380KF01 Date: Thu, 15 Jul 2021 00:50:01 +0200 Message-Id: <20210714225002.1065107-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Douglas Anderson , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , phone-devel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds device tree bindings for the Samsung Mobile Displays LMS380KF01 RGB DPI display panel. Cc: devicetree@vger.kernel.org Cc: phone-devel@vger.kernel.org Cc: Noralf Trønnes Reviewed-by: Sam Ravnborg Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Collect a few Reviewed-by's - Mention that the node must be an SPI child. - Indent example by 4 spaces. - Resend with the driver updates. ChangeLog v2->v3: - No changes just resending with the series. ChangeLog v1->v2: - Expect SPI bindings to be pulled in for the client and state spi-cpha: true etc. - Make port a required node. - Update the example to use a proper SPI controller (spi-gpio) so we get full validation of the example. --- .../display/panel/samsung,lms380kf01.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml diff --git a/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml b/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml new file mode 100644 index 000000000000..251f0c7115aa --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/samsung,lms380kf01.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung LMS380KF01 display panel + +description: The LMS380KF01 is a 480x800 DPI display panel from Samsung Mobile + Displays (SMD) utilizing the WideChips WS2401 display controller. It can be + used with internal or external backlight control. + The panel must obey the rules for a SPI slave device as specified in + spi/spi-controller.yaml + +maintainers: + - Linus Walleij + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: samsung,lms380kf01 + + reg: true + + interrupts: + description: provides an optional ESD (electrostatic discharge) + interrupt that signals abnormalities in the display hardware. + This can also be raised for other reasons like erroneous + configuration. + maxItems: 1 + + reset-gpios: true + + vci-supply: + description: regulator that supplies the VCI analog voltage + usually around 3.0 V + + vccio-supply: + description: regulator that supplies the VCCIO voltage usually + around 1.8 V + + backlight: true + + spi-cpha: true + + spi-cpol: true + + spi-max-frequency: + maximum: 1200000 + + port: true + +required: + - compatible + - reg + - spi-cpha + - spi-cpol + - port + +additionalProperties: false + +examples: + - | + #include + #include + + spi { + compatible = "spi-gpio"; + sck-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + miso-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + num-chipselects = <1>; + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "samsung,lms380kf01"; + spi-max-frequency = <1200000>; + spi-cpha; + spi-cpol; + reg = <0>; + vci-supply = <&lcd_3v0_reg>; + vccio-supply = <&lcd_1v8_reg>; + reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio>; + interrupts = <5 IRQ_TYPE_EDGE_RISING>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + }; + +...