From patchwork Fri May 19 23:05:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 100219 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp534835qge; Fri, 19 May 2017 16:05:35 -0700 (PDT) X-Received: by 10.99.127.83 with SMTP id p19mr12900468pgn.51.1495235135443; Fri, 19 May 2017 16:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495235135; cv=none; d=google.com; s=arc-20160816; b=xgVN6hB1TPPWY+FNDevRTtHaUwLPQSNnSNwRjesdMakFq3TjbFu0n5NMK8eP2sTMcA tMoEgOX6R1aKhgFGeOnZYQUTpZFmJ9hK6LFnxDSSar9zA67YOV5XRAZPsJvABUMVA6dD QWRmbPVeQnE99zF+IUu3u2UKLOQKRecRUXoSSpSKugb/hKocU8KWFkrcibK0iROn34m7 0MqOf7n0X0tFSbr2cNp6Z2XdRuHbNRTfgaG4aCmSSe3GAgfpYdkhOmfZTgm2sHbS6hpA bBdKsDNrQs3fYTXx4B85oPgYtNlwiJFUNvou3NUao6PD5Fij9csbtNxFRZd8rCwG0NjV LcDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ydxkHc9Ju7Wnn/Su54JaI74+mGV4eAcOXenvpd5tBtE=; b=f9eQP5rJ7WTyFjq4sWODx4q+zdlBmVC0ALmCq+lpPt/OJBdUk7RVp2XAIvlMXxn5yH MIQlC4TXcVt5nYErJ1aZWxjjjnKPDig5O3wFR6i9TO7fEoKNYl3BIm7A9dMv8cUJ1B3p 6cfAL25U03NmiuK+YLyw9IpOq0loWFvHYQsGub1XtfueYx2Ebba9pNKuGSNm35I/0k25 tY8QwQW3LTyv6xtxvRsSZMzDJH/ClgILY/zIUE2Q4zMDbtYL7E928Q0ss5jEMu91NQN0 2Ejf9jLO49k1WkbBgOI9yQu5QhU1ng0UKkCBNxc5+8xKhGTWLcV27SHbKJPVQxf420eh mSBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si9822472pga.187.2017.05.19.16.05.35; Fri, 19 May 2017 16:05:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756890AbdESXF2 (ORCPT + 7 others); Fri, 19 May 2017 19:05:28 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:35037 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756918AbdESXF0 (ORCPT ); Fri, 19 May 2017 19:05:26 -0400 Received: by mail-lf0-f53.google.com with SMTP id y126so7920838lfc.2 for ; Fri, 19 May 2017 16:05:25 -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=6ZQmWI/n79IUjvCqcmvjyljVarkXU+2mveCziqoIkiU=; b=WOWGtiW/+VaahcQOeCm8bnDNl+bXlQ5bs9BQb+9oQXbjDNiPM9VKEw8dmLVXCF/ubA RHwAfdoEVB8UZKdZ2FGuGBlmqaXfKt1lamqpyZdgrQP1o55TrVU4YQXvCp4TliHPmAe+ 3df0ACPnq0dY/FhZoDg22O4nn5R/0MjlNcu0g= 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=6ZQmWI/n79IUjvCqcmvjyljVarkXU+2mveCziqoIkiU=; b=B9nQA09h4/p2/ZNybXuNbf88MocQ9t2X2LY7gVSYYN6Xz+kYEaeQ9NbP8EjCrR1Ff/ YLHXiiXrW3fq8/1oxBbleqC0Zgr2+b78gN/aW52VrAb93FOd7ijO9cBG+Qo95ihYT2lp yVRW4KZkqJGKhbvYAMbK1ybKdKNjSN0rmDION3TAZCx8stcfQxYvQ5LdUWZpsMor3jXw eeKV1H4oh3uEOmMZNfIX4KtCN1qaR7EcTTVUgYIbCEfNSQsGbcjAbVx9Im4Qd97sJ2sN ve4xsDwqiLysfQ0ghylJPiL2583OAjmrt83utSuqNxOsSqcCuElZue67324dwBpcR1P5 yVbg== X-Gm-Message-State: AODbwcBDJg3ksIW+GuU7dfFNnN7Up6rQeyoaiLnjE3i09kqIGRho/6wM s1ad3A2qBVmDxyX+ X-Received: by 10.46.92.131 with SMTP id q125mr3330219ljb.57.1495235124479; Fri, 19 May 2017 16:05:24 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-787571d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.117.120]) by smtp.gmail.com with ESMTPSA id d10sm1175759lfb.38.2017.05.19.16.05.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 16:05:22 -0700 (PDT) From: Linus Walleij To: Tejun Heo , Bartlomiej Zolnierkiewicz , linux-ide@vger.kernel.org Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , Linus Walleij , devicetree@vger.kernel.org, John Feng-Hsin Chiang , Greentime Hu Subject: [PATCH 1/4] ata: Add DT bindings for Faraday Technology FTIDE010 Date: Sat, 20 May 2017 01:05:06 +0200 Message-Id: <20170519230509.16655-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 is 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 Acked-by: Hans Ulli Kroll Acked-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Cut the timings defintions from the device tree. Hard-code it in the driver instead, keeping the nice layout and configurability by making it easy to tweak the timings in the code. - Fix up some confused references to 50 MHz in 66 MHz properties. 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 | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/faraday,ftide010.txt -- 2.9.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/ata/faraday,ftide010.txt b/Documentation/devicetree/bindings/ata/faraday,ftide010.txt new file mode 100644 index 000000000000..a0c64a29104d --- /dev/null +++ b/Documentation/devicetree/bindings/ata/faraday,ftide010.txt @@ -0,0 +1,38 @@ +* 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 + +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>; +};