From patchwork Thu Sep 16 15:58:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 513025 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1427384jao; Thu, 16 Sep 2021 10:24:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEXlg/0zm9m8gkTGl54B2JLs3/Rj7SHt+qtqQhcCTQ7sFUoFtzYEDZtVvqQBxUh7r4lmYp X-Received: by 2002:a50:d9c9:: with SMTP id x9mr1372807edj.179.1631813051816; Thu, 16 Sep 2021 10:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631813051; cv=none; d=google.com; s=arc-20160816; b=An0JVdhxGYCNl3GarqC2LDGbIOJ0aG/zFWorIidRobJ1nLLC98hxrjZjq3N1Txs6rZ D6sT0tJxy3KeFzeB0igkYa9XvD3i79rgVgHxhlqADLPhTDxA1LxqbQL5s7MvPVISR/Ls ULxjqENsQ0xg9o/La+8TQDfG4sKhwJYDZGJdLFkLNgpGQNOlOsbmyAeI2WZY3tVFQjCu rFdJ+/VnItD7M5CVO9NalQiVeYVxtFkSFbRadgSTlCHSqohb4aMweygPk0LTBnCXamkd nUiAwMjNn4O0v8N5rfs1DWjjwUfe5Wch2Smwo8AcqDYstTDHnY3X266HBs2FKL8GQOQ1 l9/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MvLhiVIcAk5/JXNPCTswbApGjTmk/MkzuNdZIFsxJws=; b=Sl/nnAWMlSkZZZjf4ZDL2HdFBnVbjnklzEmtXKoAl0Y8rRM/0mAFtvq0SwXfFVkjmK +sH9jyzSU3jhgLQaXP/tGZhjvBqRiG5SLVNcqWqAhkR9DwgxVbeTVBtueAyWEOTBy1lf uEMBmEnq2Ms335T7YsO0YaV38xWxYGUKQ5wVUzEA2x03eZBpkGNenXHzxUUE6qT8hlUv +eI0M4ymY/DBIJsCzFs1skkq8etHDa9Ehp4aQZ+UorNac9Yi+HIRSGQnmxZVWC2TMiFo w5Dc+W+QJWewMAdo3LuUDb0e9SvHcdaNxuzu9Cy8i7k2kG5k8+866p08fXAZHM2AcbKU eScg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PviFyakP; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si4010182edt.269.2021.09.16.10.24.11; Thu, 16 Sep 2021 10:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PviFyakP; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347735AbhIPRZN (ORCPT + 11 others); Thu, 16 Sep 2021 13:25:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:44344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347104AbhIPRWu (ORCPT ); Thu, 16 Sep 2021 13:22:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 08CEF61A2F; Thu, 16 Sep 2021 16:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810594; bh=NU5ZOx0naDK85oG0/HUbMQFEYp7Zrotfi5JaGSGDnmc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PviFyakPMUB9lc9DShIgpQLRbk9e9GBiUqZR6dtiLrpIjHtWh+xClSTp8G/QKP31m w82Zmz0x01FV8oe/22ESmTcSOT8ycMtj20i7jYzijK1FryybSAV47+iulTp7/Is+JT fqttcTSGD2N6xVeyG7KgO3wsSDNXEcJL12DaCZwc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?Noralf_Tr=C3=B8nnes?= , devicetree@vger.kernel.org, Linus Walleij , Sam Ravnborg , Douglas Anderson , Sasha Levin Subject: [PATCH 5.14 166/432] drm/panel: Fix up DT bindings for Samsung lms397kf04 Date: Thu, 16 Sep 2021 17:58:35 +0200 Message-Id: <20210916155816.371280765@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Linus Walleij [ Upstream commit 710fa9aa16321f2ffdd8383f6f780c9cc1e5a197 ] Improve the bindings and make them more usable: - Pick in spi-cpha and spi-cpol from the SPI node parent, this will specify that we are "type 3" in the device tree rather than hardcoding it in the operating system. - Drop the u32 ref from the SPI frequency: comes in from the SPI host bindings. - Make spi-cpha, spi-cpol and port compulsory. - Update the example with a real-world SPI controller, spi-gpio. Cc: Noralf Trønnes Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Sam Ravnborg Reviewed-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20210701213618.3818821-1-linus.walleij@linaro.org Signed-off-by: Sasha Levin --- .../display/panel/samsung,lms397kf04.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -- 2.30.2 diff --git a/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml b/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml index 4cb75a5f2e3a..cd62968426fb 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml @@ -33,8 +33,11 @@ properties: backlight: true + spi-cpha: true + + spi-cpol: true + spi-max-frequency: - $ref: /schemas/types.yaml#/definitions/uint32 description: inherited as a SPI client node, the datasheet specifies maximum 300 ns minimum cycle which gives around 3 MHz max frequency maximum: 3000000 @@ -44,6 +47,9 @@ properties: required: - compatible - reg + - spi-cpha + - spi-cpol + - port additionalProperties: false @@ -52,15 +58,23 @@ examples: #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,lms397kf04"; spi-max-frequency = <3000000>; + spi-cpha; + spi-cpol; reg = <0>; vci-supply = <&lcd_3v0_reg>; vccio-supply = <&lcd_1v8_reg>; - reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>; backlight = <&ktd259>; port {