From patchwork Sat May 6 12:10:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 759299 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wKnfz2F95z9s8P for ; Sat, 6 May 2017 22:11:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="MJNHj1a6"; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2BE70B8062E; Sat, 6 May 2017 14:11:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sat, 6 May 2017 14:11:14 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7A728B803FE for ; Sat, 6 May 2017 14:11:12 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .linaro. - helo: .mail-lf0-f44.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sat, 6 May 2017 14:11:11 +0200 (CEST) Received: by mail-lf0-f44.google.com with SMTP id 99so14959765lfu.1 for ; Sat, 06 May 2017 05:11:11 -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; bh=jp2maGehqjQjl/Jg1XkjA2d7mB65VxBkLazttzETa+k=; b=MJNHj1a68+rbTM0E2Iur8y9u6LfpQFteJmkvxgovsx9/2mssR+ikOQhoA/aBMI9QXt Yt7JkuXLaD/Mb8GiCNflMiHmBL11m4WK9i3gC625ruvyH4Lpx9f02SOE52CZokZHXfwE GO5Se2V5MNaqwL0hwBuq6KrTtmtGJWWPBtjys= 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; bh=jp2maGehqjQjl/Jg1XkjA2d7mB65VxBkLazttzETa+k=; b=fZPyzclStGfploAuE9/FL34H5o1luCx5OxuODg6aen+LYZbslxXXugIRDiZTvnv+hG 1SN7RatMVeWEqs/4rypktsvHdgAM1e5kiIVvEf6Ci8pMOGFLCWOPFae0G/Iwk2Fn58Ii ncfd45tjaXp2o2K9qQgVMUrtmNVjhqGjiWMplXCuq8wVHduT37zFVTfEg2XGLAsw2C31 3cHClU5c9/r4LWRPferhso9bfcvo+t8Vn2GVOvUCrLHfIb83N3Hz2i6qq4zTxht7lxVy LIoevXPK+fRtjzflO7IkHm5kJlklWIPILOtXNF/Sw11vGoayeJRAmyPPLrB0OrsG5P7K xB1A== X-Gm-Message-State: AODbwcCE1UkMJJ7lNTE3SvcqzaVPAvD4MOeVJlhb4MZcii9puWju5eTD P4siTF5aZ90ZXjTX X-Received: by 10.25.77.79 with SMTP id a76mr116428lfb.121.1494072670805; Sat, 06 May 2017 05:11:10 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-777271d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.114.119]) by smtp.gmail.com with ESMTPSA id h192sm1571609lfg.56.2017.05.06.05.11.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 05:11:08 -0700 (PDT) From: Linus Walleij To: Tejun Heo , Bartlomiej Zolnierkiewicz , linux-ide@vger.kernel.org Date: Sat, 6 May 2017 14:10:50 +0200 Message-Id: <20170506121053.11554-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [OpenWrt-Devel] [PATCH 1/4] ata: Add DT bindings for Faraday Technology FTIDE010 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@openwrt.org, devicetree@vger.kernel.org, John Feng-Hsin Chiang , Paulius Zaleckas , Greentime Hu , Janos Laube , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This adds device tree bindings for the Faraday Technology FTIDE010 found in the Storlink/Storm/Cortina Systems Gemini SoC. I am not 100% sure that this part if from Faraday Technology but a lot points in that direction: - A later IDE interface called FTIDE020 exist and share some properties. - The SATA bridge has the same Built In Self Test (BIST) that the Faraday FTSATA100 seems to have, and it has version number 0100 in the device ID register, so this is very likely a FTSATA100 bundled with the FTIDE010. Cc: devicetree@vger.kernel.org Cc: John Feng-Hsin Chiang Cc: Greentime Hu Signed-off-by: Linus Walleij Acked-by: Hans Ulli Kroll --- Greentime: I think this may be interesting to you since the FTIDE020 will need the same bindings so we can probably just reuse them and maybe make the parser a library if you want to upstream the FTIDE020. Faraday people: I do not have it from a source that this hardware is really FTIDE010 but I would be VERY surprised if it is not. U-Boot has an FTIDE020 IDE controller synthesized in the Andestech platform, and it has a similar yet different register layout, featuring similar timing set-ups: http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/block/ftide020.h http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/block/ftide020.c --- .../devicetree/bindings/ata/faraday,ftide010.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/faraday,ftide010.txt diff --git a/Documentation/devicetree/bindings/ata/faraday,ftide010.txt b/Documentation/devicetree/bindings/ata/faraday,ftide010.txt new file mode 100644 index 000000000000..5048408c07c5 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/faraday,ftide010.txt @@ -0,0 +1,63 @@ +* Faraday Technology FTIDE010 PATA controller + +This controller is the first Faraday IDE interface block, used in the +StorLink SL2312 and SL3516, later known as the Cortina Systems Gemini +platform. The controller can do PIO modes 0 through 4, Multi-word DMA +(MWDM)modes 0 through 2 and Ultra DMA modes 0 through 6. + +On the Gemini platform, this PATA block is accompanied by a PATA to +SATA bridge in order to support SATA. This is why a phandle to that +controller is compulsory on that platform. + +The timing properties are unique per-SoC, not per-board. + +Required properties: +- compatible: should be one of + "cortina,gemini-pata", "faraday,ftide010" + "faraday,ftide010" +- interrupts: interrupt for the block +- reg: registers and size for the block + + The unit of the below required timings is two clock periods of the ATA + reference clock which is 30 nanoseconds per unit at 66MHz and 20 nanoseconds + per unit at 50 MHz. + +- faraday,pio-active-time: array of 5 elements for T2 timing for Mode 0, + 1, 2, 3 and 4. Range 0..15. +- faraday,pio-recovery-time: array of 5 elements for T2l timing for Mode 0, + 1, 2, 3 and 4. Range 0..15. +- faraday,mdma-50-active-time: array of 4 elements for Td timing for multi + word DMA, Mode 0, 1, and 2 at 50 MHz. Range 0..15. +- faraday,mdma-50-recovery-time: array of 4 elements for Tk timing for + multi word DMA, Mode 0, 1 and 2 at 50 MHz. Range 0..15. +- faraday,mdma-66-active-time: array of 4 elements for Td timing for multi + word DMA, Mode 0, 1 and 2 at 50 MHz. Range 0..15. +- faraday,mdma-66-recovery-time: array of 4 elements for Tk timing for + multi word DMA, Mode 0, 1 and 2 at 50 MHz. Range 0..15. +- faraday,udma-50-setup-time: array of 4 elements for Tvds timing for ultra + DMA, Mode 0, 1, 2, 3, 4 and 5 at 50 MHz. Range 0..7. +- faraday,udma-50-hold-time: array of 4 elements for Tdvh timing for + multi word DMA, Mode 0, 1, 2, 3, 4 and 5 at 50 MHz, Range 0..7. +- faraday,udma-66-setup-time: array of 4 elements for Tvds timing for multi + word DMA, Mode 0, 1, 2, 3, 4, 5 and 6 at 50 MHz. Range 0..7. +- faraday,udma-66-hold-time: array of 4 elements for Tdvh timing for + multi word DMA, Mode 0, 1, 2, 3, 4, 5 and 6 at 50 MHz. Range 0..7. + +Optional properties: +- clocks: a SoC clock running the peripheral. +- clock-names: should be set to "PCLK" for the peripheral clock. + +Required properties for "cortina,gemini-pata" compatible: +- sata: a phande to the Gemini PATA to SATA bridge, see + cortina,gemini-sata-bridge.txt for details. + +Example: + +ata@63000000 { + compatible = "cortina,gemini-pata", "faraday,ftide010"; + reg = <0x63000000 0x100>; + interrupts = <4 IRQ_TYPE_EDGE_RISING>; + clocks = <&gcc GEMINI_CLK_GATE_IDE>; + clock-names = "PCLK"; + sata = <&sata>; +};