Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4302259pxu; Wed, 9 Dec 2020 13:33:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzX1prMSp4aDLmBrhd64wCKewLV+ZwogJRUkSLZk8rPyVcBVQ6WnMg83Kkq7uTkWixYvPsW X-Received: by 2002:a50:f089:: with SMTP id v9mr3979317edl.353.1607549635514; Wed, 09 Dec 2020 13:33:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607549635; cv=none; d=google.com; s=arc-20160816; b=kjMCUuRJlbxxMyOBIxlE2NVYSgTBKCf9lthv5vfUbgrgHSkU25imTfwxoclxgPUnX/ qSvsmWIqKQYUOjhwUZ6E1bOBXBhIdMs2QAHWpijKSSnDX0Ys/3dDWSOqIy5+i4JgqMsi fEa4Ixk3jtZOTLOHdYsf9QkHcU2mnoWs0Sf6/E3FZyvhyCstSsoC7BSFEA3EcWLrJjJR jXVszU4VmI8n01BCRktEPgxIzxTS+swwIK9rPqYNKwSGh9sPZ9hZOzosd/+7n7T727XD WDZQOlaO09N4Mh8EkwQLpKtIYJ3u1dJ+qvoHvTaA7OcLKcMqFEM6TgxlRzyiXBf3NpI5 5zEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/Y8EdRxn8dSpFUJIAxU90D9R+cEmBFpkuR2dcS1QMOQ=; b=tgug2BhwI7tJutdF9pTU9TBiaY9g0jP7gonWltb7ADBtiwAIcefAdt6VnO8rxQAMsd 847rEhJAAznu/eSdYJHXkRi2fz2D9LNWc5fJQT7PFjnMlkIhC/MWaNTRv2bl5jfHBrCt YR0d7FGij9NkI2Bk6N0b0fOZgNSNtTQtcJy2ye9CLBz/GcwvnZbI3Nn8Lpu/JO7TOoy0 n1bk+SY7oJIgBNVDRGkTyyoxnSysqyT3l5S4zI4/LAYlWSRZkXE96V7FW0B0ot6bDo3q 7pRlSMuc7EioFXtwg9PAHadnU2gV/PSiiTfGKgrpY+UZ2fSO9E5ATZai+ndYTz1WNqak VYJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uBH77reQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si1383840ejj.45.2020.12.09.13.33.32; Wed, 09 Dec 2020 13:33:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=uBH77reQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388036AbgLIV3F (ORCPT + 99 others); Wed, 9 Dec 2020 16:29:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727369AbgLIV3F (ORCPT ); Wed, 9 Dec 2020 16:29:05 -0500 Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED522C0613D6; Wed, 9 Dec 2020 13:28:24 -0800 (PST) Received: by mail-vk1-xa44.google.com with SMTP id i62so701268vkb.7; Wed, 09 Dec 2020 13:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/Y8EdRxn8dSpFUJIAxU90D9R+cEmBFpkuR2dcS1QMOQ=; b=uBH77reQ5WSxZogdoGv9vsLQcBmmvl9zfLpdFq5vGV10KH1T1L6oKowHBtOm3Y/pgL 7Yi2n+U8wcL4iUqmlFLAseOwQK9XJjsIQD75uYiT88bfq33rvY46LYdrSbvC/N0GsKO7 TbnSe/qJUteYvvy1yP6mGWiI1QUfkobGgrwmDQ3oPGWvg6j94ke6hn5q29xdXLZJcV7U w9Hf1RsJ1OOvBy54iPPp5ffksrmebhADRdhrvZoOGjMcTSUvktgleCUHVjCDiNgpwpFf 6Mf5QxS5oUFVqHwfjRtSU92E4qwe9o2wJ67PARiK+NWjeeyFJFYBsG6Jy4M1JlxjiNUS Q0aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/Y8EdRxn8dSpFUJIAxU90D9R+cEmBFpkuR2dcS1QMOQ=; b=MBPNAPXAOnGo+KKhqQyALi3fISIAP8XcgS7R0QjKhd8J0osSrRIdGZBkEqtEoiy9ed 4IzrSiBuQasORioH9/u4SB2ZblePq4mttw5tTxpTLCvrpv2frUcn7F5cwkpi5GK3EARo 0KuwFeljFapBOSAMMCQUvfQWY2xPhJMn/bWq+DK2l0RgibCxwsaqHiTOUzZ0xDYMAYXX +bOdxeABIhPyRkIT0WNSMx3tsLUXQJ6VxjN5u6l6u+/kLkILuhQqXWdG9qNwdZjNjLVZ aVs+6j2kg/VEYoJ2hCUEjOexlyBXo9mzgHS9FnMImeiXib7zeM0Bh5yOY/zghC2W2RrC m7aQ== X-Gm-Message-State: AOAM532EC1uhV6K8cGIFemhWl+PDYwcdyi5T8y5zcAs9Bo3WT/3qrxXh o4c3T0I0LZrEEWFmL1jVuLIdi2rigzgz98XEjPI= X-Received: by 2002:a1f:3a12:: with SMTP id h18mr4641949vka.23.1607549304008; Wed, 09 Dec 2020 13:28:24 -0800 (PST) MIME-Version: 1.0 References: <3bed61807fff6268789e7d411412fbc5cd6ffe2a.1607507863.git.hns@goldelico.com> <3FA1D050-3BD5-4A97-9D83-520CCF75D147@goldelico.com> <20201209210133.44ab9c97@aktux> <09D41BD9-F6BA-4566-8151-ACB3B2274B52@goldelico.com> In-Reply-To: <09D41BD9-F6BA-4566-8151-ACB3B2274B52@goldelico.com> From: Sven Van Asbroeck Date: Wed, 9 Dec 2020 16:28:12 -0500 Message-ID: Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors To: "H. Nikolaus Schaller" Cc: Andreas Kemnade , Mark Brown , Rob Herring , Linus Walleij , linux-spi , linux-gpio@vger.kernel.org, devicetree , Linux Kernel Mailing List , Discussions about the Letux Kernel , kernel@pyra-handheld.com, Lukas Wunner , Laurent Pinchart , Maxime Ripard Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 9, 2020 at 3:08 PM H. Nikolaus Schaller wrote: > > But I have tested with > > > spi->mode |= SPI_MODE_3; > > which should keep the mode intact. Right? That did not work either. > - make sure ("spi: fix client driver breakages when using GPIO descriptors") is in your tree - your panel's CS is active-low, so 'spi-cs-high' should be removed from its devicetree entry. In accordance with the rules as explained in commit message of 6953c57ab172. Also in accordance with the table you posted in this patch. When these two changes in place, your panel should work. I have tested this by mirroring your setup on my board: spi5-gpio { compatible = "spi-gpio"; #address-cells = <0x1>; #size-cells = <0x0>; pinctrl-names = "default"; pinctrl-0 = <&...>; sck-gpios = <&gpio... GPIO_ACTIVE_HIGH>; miso-gpios = <&gpio... GPIO_ACTIVE_HIGH>; mosi-gpios = <&gpio... GPIO_ACTIVE_HIGH>; cs-gpios = <&gpio... GPIO_ACTIVE_HIGH>; num-chipselects = <1>; ethernet-switch@0 { /* active low cs */ compatible = "micrel,ksz8795"; spi-max-frequency = <1000000>; reg = <0>; }; }; If this does not work for you, then what are we missing?