Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6775503ybi; Mon, 8 Jul 2019 08:28:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzF/oTvwHW1mnhUOeAB/ygsYjCgOJNHiXFPYxKmIvLZtVl5d0YCiJ9STI2ArJv0iE07QpIb X-Received: by 2002:a17:90a:1a0d:: with SMTP id 13mr25319690pjk.99.1562599710686; Mon, 08 Jul 2019 08:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562599710; cv=none; d=google.com; s=arc-20160816; b=qKdJp32ZLYaE2tZzUFcglEP5CgK/dNam8L7CkxtszLH8fNtiHHtHzjm/fFI+6dmcps /7hFddlOqRzQYr/CRGdjfv1m5VwL3o8d/bGPsSee19EIK+kFxBIWgmnezBKT0TEUpKDX xUpGtwHncyx/5c0zjH6RLKW5LBJgIBqUY19hLY0wJasa8TspwYwNGgYU9kNvC5dednWX mdWGTWbkzpW6yLCDajiLP298bH9sivXcsVmdQ4uQfv8GZZrOKR7bjblTzp7VtDU0Gogj 7Rcc19HYsGaXvZQjK5+eNyJhIB7jSkvZx44f/cGr56GX8qJKObIvU82LmqBHyXw+Ob+9 0iSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/5MRjzRqaUGjrhBFjHxJCusOtBew5uCthHfQYabNy/k=; b=iql0dN3YErYiQGMpIvFoj25BE+cgOZsAWu6/iani8Wzeed+Qvvs0U2CIYIy4cHTSt6 PACtqmWpdUcyPvEXcvYqMOuhK3ZWnHV7LWCztL49CYOVAPcN4xapyLvmWNFlrVXxo7W+ 62yIKZJ40LN0dXqXxNK3buNKLy+JkEnoXnrCUdGIHVOUwiAahBK9TmGx5O9pL+99xPlP hJ/iyR4sK7TN9dTGio9Cdj4iauP1i+/y9zjD+7CoFSjIF5SYPL8APZQIv9z73QmaQXmY /Nb6sjC6Q1FNsfDdryv6DkmzoM7GhdVlLk+cZIFKVYKmupdE+mHgy+wZ3PwdL4NI/DWY yV4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r72si18984311pjb.33.2019.07.08.08.28.15; Mon, 08 Jul 2019 08:28:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731958AbfGHOqV (ORCPT + 99 others); Mon, 8 Jul 2019 10:46:21 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.83]:34781 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfGHOqU (ORCPT ); Mon, 8 Jul 2019 10:46:20 -0400 X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1OAA2UNf2AyOEF/R66y" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id V09459v68Ek7X7H (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Mon, 8 Jul 2019 16:46:07 +0200 (CEST) From: "H. Nikolaus Schaller" To: Mark Brown , Rob Herring , Mark Rutland , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren Cc: letux-kernel@openphoenux.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, "H. Nikolaus Schaller" , stable@vger.kernel.org Subject: [PATCH 2/2] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again Date: Mon, 8 Jul 2019 16:46:05 +0200 Message-Id: <8ae7cf816b22ef9cecee0d789fcf9e8a06495c39.1562597164.git.hns@goldelico.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" did introduce logic to centrally handle the legacy spi-cs-high property in combination with cs-gpios. This assumes that the polarity of the CS has to be inverted if spi-cs-high is missing, even and especially if non-legacy GPIO_ACTIVE_HIGH is specified. The DTS for the GTA04 was orginally introduced under the assumption that there is no need for spi-cs-high if the gpio is defined with proper polarity GPIO_ACTIVE_HIGH. This was not a problem until gpiolib changed the interpretation of GPIO_ACTIVE_HIGH and missing spi-cs-high. The effect is that the missing spi-cs-high is now interpreted as CS being low (despite GPIO_ACTIVE_HIGH) which turns off the SPI interface when the panel is to be programmed by the panel driver. Therefore, we have to add the redundant and legacy spi-cs-high property to properly pass through the legacy handler. Since this is nowhere documented in the bindings, we add some words of WARNING. Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller --- Documentation/devicetree/bindings/spi/spi-bus.txt | 6 ++++++ arch/arm/boot/dts/omap3-gta04.dtsi | 1 + 2 files changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index 1f6e86f787ef..982aa590058b 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt @@ -47,6 +47,10 @@ cs1 : native cs2 : &gpio1 1 0 cs3 : &gpio1 2 0 +WARNING: the polarity of cs-gpios may be inverted in some cases compared +to what is specified in the third parameter. In that case the spi-cs-high +property must be defined for slave nodes. + SPI slave nodes must be children of the SPI controller node. @@ -69,6 +73,8 @@ All slave nodes can contain the following optional properties: phase (CPHA) mode. - spi-cs-high - Empty property indicating device requires chip select active high. + WARNING: this is especially required even if the cs-gpios + define the gpio as GPIO_ACTIVE_HIGH - spi-3wire - Empty property indicating device requires 3-wire mode. - spi-lsb-first - Empty property indicating device requires LSB first mode. - spi-tx-bus-width - The bus width (number of data wires) that is used for MOSI. diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi index 9a9a29fe88ec..47bab8e1040e 100644 --- a/arch/arm/boot/dts/omap3-gta04.dtsi +++ b/arch/arm/boot/dts/omap3-gta04.dtsi @@ -124,6 +124,7 @@ spi-max-frequency = <100000>; spi-cpol; spi-cpha; + spi-cs-high; backlight= <&backlight>; label = "lcd"; -- 2.19.1