Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp559533imm; Wed, 10 Oct 2018 00:09:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV600TmdjXEHjq673midjLGKC1hVPnUkqjf1WFa8mhPni0U3VvrrD15Odn52tXq0rLWy6LJKt X-Received: by 2002:a62:3a43:: with SMTP id h64-v6mr33392745pfa.119.1539155354343; Wed, 10 Oct 2018 00:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539155354; cv=none; d=google.com; s=arc-20160816; b=FaJasc250QEFDhQJSq75FeJzaaNnqIvJuZGnOyxxtYlcOdQw7F00ve9jJz/4al4tt3 N5yi2wu0PYpjUiUHPZ8ir+wcYjzcZvUZjuBB9QRcP3zIVRXTOeANdDzNGTY59I6V4cb+ Y4vUDdEkpuNShF82dOsIeRLwJaaKEsL3uXZ2Cxq+qM7QfIhpCaAWEpkpDhwLieFs01ND IigNcO8nNitg/74pgcIAFjr8NPpFHT9CsGmx93KyrPjR11+uwW29DrOsNpxhTMz1mbSG V9Kch6W56RaXbGhrEIXZgRFn12fkx8YnG6HpvHp5jNAsK3zw2UgUfBPf5NyH/ctwvNa3 mhSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=w+hHEAoJ5hpaW+ULiHQyz7VhyKbzrteZy7qUlDaIHNA=; b=mDvchG7QeEsKvEfCh+Ow0u6Pjem1rCOql4wIY9xm/Jh9lgvc9tOaJdSoRZLrbBUOcW BB/XSgdPZaKmGh+JZXUIMYoJD9NgcclP9j2kXTRhAVNQqe7jSoTO+Z4eJwnRIDwyy7wo QwqbaKH4OH7i/lzs0esdNhLTdgE2Ee6vQyJE3b/tUkdRB4gvjJJFkFeYdXfzWlakIF33 Bfe4kMGFUXYBxGZP8/rprtomdLjUgt6xUKFWIfjbk5/FI52BEHvMSFV9ehbKohL3OD8l 9n5nSTtZu0GR7RNvRbttZC7Cei5wwJjjzLFkBr++Fj9+USgD19xdYHpziIunyRHNntfd RlgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="oMY/3ZyO"; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si22674542plt.278.2018.10.10.00.08.59; Wed, 10 Oct 2018 00:09:14 -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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="oMY/3ZyO"; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbeJJO3U (ORCPT + 99 others); Wed, 10 Oct 2018 10:29:20 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:52148 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbeJJO3U (ORCPT ); Wed, 10 Oct 2018 10:29:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1539155313; x=1570691313; h=from:to:cc:subject:date:message-id:mime-version; bh=w+hHEAoJ5hpaW+ULiHQyz7VhyKbzrteZy7qUlDaIHNA=; b=oMY/3ZyOxP63hgz3GP29txgGxCTAqHx00M7mTP9GcA4Xal/QqDGLduSZ IJce/wjYHwwQwJ0ES+ZaTFbrl7eaY+twwVmzKoHYxIvpJzcFFfKp/59iC Pg6bZanhP7LqYUiO+mun6ABMdzJWFK1K42+FY/mPCLLDzpiThC3xD2tqi c=; X-IronPort-AV: E=Sophos;i="5.54,363,1534809600"; d="scan'208";a="763082265" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2a-6e2fc477.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Oct 2018 07:08:31 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2a-6e2fc477.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w9A78SoF096446 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 10 Oct 2018 07:08:30 GMT Received: from EX13D01EUB001.ant.amazon.com (10.43.166.194) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 10 Oct 2018 07:08:29 +0000 Received: from udc4a3e82dbc15a031435.hfa14.amazon.com (10.43.160.4) by EX13D01EUB001.ant.amazon.com (10.43.166.194) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 10 Oct 2018 07:08:24 +0000 From: Talel Shenhar To: , , , , , CC: , , , "David Woodhouse" Subject: [PATCH 1/2] dt-bindings: spi: dw: add cs-override property Date: Wed, 10 Oct 2018 10:08:12 +0300 Message-ID: <1539155293-21750-1-git-send-email-talel@amazon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.4] X-ClientProxiedBy: EX13d09UWC004.ant.amazon.com (10.43.162.114) To EX13D01EUB001.ant.amazon.com (10.43.166.194) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the dw-apb-ssi binding document, to add an optional 'cs-override' devicetree property. This property adds the ability for dw spi controller driver to work with the dw spi controller found on Alpine chips. The dw spi controller has an auto-deselect of Chip-Select, in case there is no data inside the Tx FIFO. While working on platforms with Alpine chips, auto-deselect mode causes an issue for some spi devices that can't handle the Chip-Select deselect in the middle of a transaction. It is a normal behavior for a Tx FIFO to be empty in the middle of a transaction, due to busy cpu. In the Alpine chip family an option to change the default behavior was added to the original dw spi controller to prevent this issue of de-asserting Chip-Select once TX FIFO is empty. The change was to allow SW to force the Chip-Select. With this change, as long as the Slave Enable Register is asserted, the Chip-Select will be asserted. As a result, it is necessary to deselect the Slave Select Register once the transaction is done. This feature is enabled via a device property called 'cs-override'. Once the driver identifies the 'cs-override' property, it enables the hw fixup logic, by writing to a dedicated register found in the IP reserved area and will starts deselecting the Slave Select Register when the transfer ends. Signed-off-by: Talel Shenhar Signed-off-by: David Woodhouse --- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt index 642d3fb..dd366f5 100644 --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt @@ -14,6 +14,8 @@ Optional properties: - num-cs : The number of chipselects. If omitted, this will default to 4. - reg-io-width : The I/O register width (in bytes) implemented by this device. Supported values are 2 or 4 (the default). +- cs-override: Enable explicit Chip-Select deselect during transfer instead of + default auto-deselect upon tx FIFO becoming empty. Child nodes as per the generic SPI binding. -- 2.7.4