From patchwork Thu Jul 1 21:36:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 469113 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp772189jao; Thu, 1 Jul 2021 14:38:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJUTCyonXpBKuqyKrvrHs7qS788iyI/DWTl2WiwnM0Vd9Knbx5kG99ZmcIf1DrTW2GwUCT X-Received: by 2002:a02:272d:: with SMTP id g45mr1602196jaa.104.1625175504926; Thu, 01 Jul 2021 14:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625175504; cv=none; d=google.com; s=arc-20160816; b=m1UvaI1pM3JsJK5CMk0dDmE+b/UeeB5STaXOt+laHUSkeb6nCQDYG/8cTXzNYy1vyx cF2jUQvf3t4DBBS457ruA8ntIr4dwAHuLHHLfV27SElAczPP3mIUCgK221lS17AVu8Fr 3SXQ3xrCmLz49hlK6Ir++qKtVq/sC9yg/26OBE6T0sIxnRz7jFUnfOglNq0SNDftehza s69Xy5g887PV39Qhn+A33kYenfkOZihp1f0DJW4v+fF70GATHGrG9w6cGWHpcyTP2Mzl eLYp46/tSUDuM/hxgO14PAeBtjqAY7UWa7I0bHwWQiDBWdP5YpTwgnvqJlEb5jxFflTB wi3Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=QiNn8WEhtCBIq1rsfM6PoISeVVaGraw5Z7kWHh+wx5o=; b=afv3fWxUm+z6UoEwug8g3hTHpq5bl6NBEmDpzhBIT4wDY9XTbjqnuMv9kqtIn79S9M +1Sg+9IzdPsacxTN1tXcdHIiBMG8Pd34PfbkQEUfopX5dwN0cuf19MWbvZNp7klDz5gj 9X/UiHN2MgvJioIlt/7bKtnUKrGNV4E4cITwNu8jDhdpmsdkDvRMkeMzK61uiN25iAX1 BxC2qyuNCn7q1fWvy1g2AvQOBC4WxawWstMMwB81Jzycm6LDjIcrQ2TdsIIuZteWOuzW QyigoDr9SGwdt8oomaS1Ui7CToENQxU1TcTN/aF1DOw7mZvP1ck0D1Os/cNW0w8Ry1g6 hC7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JqmwLN2M; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si1028345ill.10.2021.07.01.14.38.24; Thu, 01 Jul 2021 14:38:24 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b=JqmwLN2M; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234183AbhGAVkz (ORCPT + 7 others); Thu, 1 Jul 2021 17:40:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbhGAVky (ORCPT ); Thu, 1 Jul 2021 17:40:54 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1F2C061762 for ; Thu, 1 Jul 2021 14:38:23 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id u20so10413867ljo.12 for ; Thu, 01 Jul 2021 14:38:23 -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=QiNn8WEhtCBIq1rsfM6PoISeVVaGraw5Z7kWHh+wx5o=; b=JqmwLN2M2erNRkHR+GXtJfvqyKLZCwbSMepixBsR2CIDgF8LoS6jgUdesNvivpmlmq HkhlQCEarlKUijpESJEUmIvl0MYHstzrIDlJ63kIb230fuohVlE//5H2osICvaNprZTA D0XC/c9ako4ddjeCiyqk3BJ88SY529kbayITCcbhDIC/BQBLjWznrtF+5XIIRpfC150n fSvl75+pomMtvRMAsk5y1dYmKYb9UDGpNBptVkYCBigxqWkrejI7kZFWBtgwwm8IgBq3 wE5x8dKGaO8R4S6sPbVTj6s/D4vS4CIbjMOphhpLq3UjPJ6Xypem7H08cGz3SxCfLSjf 4ArA== 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=QiNn8WEhtCBIq1rsfM6PoISeVVaGraw5Z7kWHh+wx5o=; b=lcJUrYQirEVvr/d+chSw7HFEoInXVaDdhvZPPPprqiYIxuLKudZ/da/IP+ILUU90/r ZGFEr5N2kXei5MN5nXoJy6viYs5755ikmJHcjcjgppoHidYqxR8W0CvQri+jX9aGwRgV 0T1Dbqeq126x6Ps4sB02wuMrZkJwCjTy44Pjj9L1IURkjQ0lCz256avYtPYCvB0ngLm2 nFllLaeeefJFIgkx+khPKm41IDoz654xtRijliZJ/OslRp5TwIOieerIFeU0RFM4qB17 WICPTLVdv5DjounBbH3mLzxPTedw43OooNxt/WNWSIBZ2RU/3j7kh/kOHJ/xncqEol5c 8/7g== X-Gm-Message-State: AOAM530cQerPMUwNne2VVeY/oycSZX/UhPoGpBVgeV8pLCa8wQ2IFAXh N2EwSC+mhB55wkvKJPYOpWIVTw== X-Received: by 2002:a2e:a276:: with SMTP id k22mr1148638ljm.465.1625175501296; Thu, 01 Jul 2021 14:38:21 -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 b5sm81131lfv.3.2021.07.01.14.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 14:38:20 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Cc: Linus Walleij , Douglas Anderson , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , devicetree@vger.kernel.org Subject: [PATCH] drm/panel: Fix up DT bindings for Samsung lms397kf04 Date: Thu, 1 Jul 2021 23:36:18 +0200 Message-Id: <20210701213618.3818821-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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: Douglas Anderson Cc: Noralf Trønnes Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- .../display/panel/samsung,lms397kf04.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -- 2.31.1 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 {