From patchwork Mon Sep 14 15:35:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1363731 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=M+c5I2J9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bqr7r1KM9z9sPB for ; Tue, 15 Sep 2020 01:36:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4DB848234D; Mon, 14 Sep 2020 17:35:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="M+c5I2J9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A79BC82337; Mon, 14 Sep 2020 17:35:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 12C1A81996 for ; Mon, 14 Sep 2020 17:35:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id w16so494428qkj.7 for ; Mon, 14 Sep 2020 08:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oalsoODhrfBQC9HqYw8mvWfKoqwrIovgaeigazRXo9Y=; b=M+c5I2J9DR8HZLAc92M8QFB6AFHJnmqOKPc1kwcS6k6Zt1JcrNTenm4YKP5GEudMs4 HxaaxDDCVGNTEe3cO4iZ0Ej4Cr8JOJ7zp4Rm5LbG1bAGfcL4yIem5xVrul+VBlYSZc3O tVMOkAGgGNJPo2Ay72BJPye3Kjn2COsj27mgtzUPAwE+HqQh0ezupvEo8nGIgllOa5OM e1HV7fEHX9BFjOlpKR17LHraPCSFHZ5dXdJYxpy01pafX+YJPKttHWdTAmXp4r2hoRDK wCN9NDiFT0Uq0qH/FoBGdqYtk1oL4JZMs4kFaQP76DbjWZ+RV2jL5SRo1lAr7YQePcVu rpVA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=oalsoODhrfBQC9HqYw8mvWfKoqwrIovgaeigazRXo9Y=; b=bybFcjRRC2TW+3RJmohOcU1Pzhm27F+UbYVsr6WqXsoV3OWetj2eK/MzlVUlZeCIjZ 0ngA3L0JNxwlPp1JYXrXae68G+nK25/QxLcsY6hSgrBURa0GkWeG5x8hOiFTVHfX05xz wBtep1WSosO9N6E4PDF4e9TpypGJgGl2DV61jqmVX+U4/A/6EmNxz0ymIU6ONpQ4CPqg +85Fg5ZPmjtLx+ry0LzF2Lun2VO7FeBv33pQOmfHwIJLE4Ry+Lnw1CyTMDX4Ip4q9e1e Y+tZUei5TlBklQHG80iOMM6dXLaGtt0RB8jW1RIpnw2aECGaogny3u9hFR0ea/bwsgJe 6FjQ== X-Gm-Message-State: AOAM5333d81mhYNLAJpZCblOBVwkq0h7VujwVuwfA6LjmvTq+SmlCZRa zubGsqRy86h+K/+5xhjh8LICiCDGy2UPMV23 X-Google-Smtp-Source: ABdhPJw9G1CZjYE/jkpE5331SS8QKUrbEik+qAFU25HSrhK2mQsdFBYl4r1QbmfaonK9NuTclBN3tw== X-Received: by 2002:a37:a414:: with SMTP id n20mr13540407qke.332.1600097726779; Mon, 14 Sep 2020 08:35:26 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id b34sm15246955qtc.73.2020.09.14.08.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 08:35:26 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de, uboot-snps-arc@synopsys.com Cc: Marek Vasut , Horatiu Vultur , Eugeniy Paltsev , Jagan Teki , Heinrich Schuchardt , Sean Anderson Subject: [PATCH v3 07/10] spi: dw: Document devicetree binding Date: Mon, 14 Sep 2020 11:35:00 -0400 Message-Id: <20200914153503.91983-8-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200914153503.91983-1-seanga2@gmail.com> References: <20200914153503.91983-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This documentation has been taken from Linux commit 3d7db0f11c7a ("spi: dw: Refactor mid_spi_dma_setup() to separate DMA and IRQ config"), immediately before the file was deleted and replaced with a yaml version. Additional compatible strings from newer versions have been added, as well as a few U-Boot-specific ones. Signed-off-by: Sean Anderson --- Changes in v3: - Synchronize compatible strings between docs and driver Changes in v2: - Document new compatible strings - Split off from ctrlr0 commit .../spi/snps,dw-apb-ssi.txt | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 doc/device-tree-bindings/spi/snps,dw-apb-ssi.txt diff --git a/doc/device-tree-bindings/spi/snps,dw-apb-ssi.txt b/doc/device-tree-bindings/spi/snps,dw-apb-ssi.txt new file mode 100644 index 0000000000..8d2888fbe3 --- /dev/null +++ b/doc/device-tree-bindings/spi/snps,dw-apb-ssi.txt @@ -0,0 +1,56 @@ +Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface +and Synopsys DesignWare High Performance Synchronous Serial Interface + +Required properties: +- compatible : One of + "altr,socfpga-spi", + "altr,socfpga-arria10-spi", + "canaan,kendryte-k210-spi", + "canaan,kendryte-k210-ssi", + "intel,stratix10-spi", + "intel,agilex-spi", + "mscc,ocelot-spi", + or "mscc,jaguar2-spi"; + and one of + "snps,dw-apb-ssi-3.20a", + "snps,dw-apb-ssi-3.22a", + "snps,dw-apb-ssi-3.23", + "snps,dw-apb-ssi-4.00a", + "snps,dw-apb-ssi-4.01", + or "snps,dwc-ssi-1.01a". + "snps,dw-apb-ssi" may also be used, but is deprecated in favor of specific + version strings. +- reg : The register base for the controller. For "mscc,-spi", a second + register set is required (named ICPU_CFG:SPI_MST) +- #address-cells : <1>, as required by generic SPI binding. +- #size-cells : <0>, also as required by generic SPI binding. +- clocks : phandles for the clocks, see the description of clock-names below. + The phandle for the "ssi_clk" is required. The phandle for the "pclk" clock + is optional. If a single clock is specified but no clock-name, it is the + "ssi_clk" clock. If both clocks are listed, the "ssi_clk" must be first. + +Optional properties: +- clock-names : Contains the names of the clocks: + "ssi_clk", for the core clock used to generate the external SPI clock. + "pclk", the interface clock, required for register access. +- cs-gpios : Specifies the gpio pins to be used for chipselects. +- 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). + +Child nodes as per the generic SPI binding. + +Example: + + spi@fff00000 { + compatible = "altr,socfpga-arria10-spi", + "snps,dw-apb-ssi-4.00a", "snps,dw-apb-ssi"; + reg = <0xfff00000 0x1000>; + interrupts = <0 154 4>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&spi_m_clk>; + num-cs = <2>; + cs-gpios = <&gpio0 13 0>, + <&gpio0 14 0>; + };