From patchwork Fri May 19 23:05:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 100220 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp535077qge; Fri, 19 May 2017 16:06:25 -0700 (PDT) X-Received: by 10.84.232.204 with SMTP id x12mr14131805plm.77.1495235185053; Fri, 19 May 2017 16:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495235185; cv=none; d=google.com; s=arc-20160816; b=jaC2UcnqVkVJ76gZN+V09p9FIxOLsUZWGVf16s3bDbQhnBVM0x/rTE6F5fJ2j0Fkst aZ2XiPiVMg1amCJhID3NzeVej3B2jWV+gUYM1dTKVcBqmyKJlha2M62yCv2e3nEgAyjT 0xnC/IMNJi0O9/5/wTP9IduHekezs5vZRQsLg9zsaxfg3igmYPMr1B1gT0OJVHEObwwT XwRMaM+XuvT2B1B1V0GI9GTPsJ3mkgjDaF6srlrWA1vufSsLy/aT1rFLaV06PoIIDtCE H2/wSMwM/OwzYK1kiSoHWXEQFDeNBXpkdHs5asGS6XRN1iX5olF/bXENpAXPpI0V+kZ9 fHSA== 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=0OUUlso3928mLOGi6qh3iTEXGqij2lrH+TcCWYIgsCkxDNLEkGR2R92j/lDbrs0vAI d+Rv+GyXN7N/i0GJjpbnh6Gb45ex4JYkDNKpSmU32EYjhpdbB6RipmWILsOQCX6n/iRQ bsk/0Y+3qoTSKWy2F04LT/ZXfOEhV1z7kA9mN+UUPhfyGisyZIvvIYYQ+7gCxW4taBx2 FWt1xbUtWznIvQHp3NM5JITnbNqK4WhQjVyDjum4FA6wct8pHOW5qyT12zsFuKM7RqN3 Jhy7Ru38v39j0FwnMfiF9P3jdg6tqLRXQm7mWtyuwysdftwTQ65hgm+WRTr/0/ioAyGC HzFw== 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 i13si9686942pgc.265.2017.05.19.16.06.24; Fri, 19 May 2017 16:06:25 -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 S1757199AbdESXGK (ORCPT + 7 others); Fri, 19 May 2017 19:06:10 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:34507 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757173AbdESXGH (ORCPT ); Fri, 19 May 2017 19:06:07 -0400 Received: by mail-lf0-f53.google.com with SMTP id 99so7955506lfu.1 for ; Fri, 19 May 2017 16:06:06 -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=CZQQznsAhTe7knJPm/fFXDu+JTjEe1HpERjsfC3fzTV+ZfSqIU0QFw6/PBEmtOhPCW OKTE6iVLHl3VK4TBp7eNTjd5TAqWUhsGjXecTV8UUwbQIVJbvv3wBKzce8Bq0dxuix6H 9zz3vOC7RX+bE9ujx1rfzSd/DjxrJt/MYRYOY= 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=m8dr8P0EDu7mKhxET4epwXYSoaRguRr6ItwMEF2QFbQsMJr4J+L8i049y6Z4eka2vm tjyyt307ZJOARkwuClcz2Cxv/8f6sHgAhBI0n4sS9lzFw3LSEalOGpHcA86bopRwlxVl u5bhlPu1IX9cQ9kUe0K1ktSfthsqNQ17nm1ax6FRMKmaOjJeLnd+25SReYXqXf17Ho3/ wpPe+RU7formRhWAPMokB/skLiRQ4D1XJTvm6I1LJhcPMuHzKR6IK3xG1L9+6dcQzw65 7TtyKXAKyPvC8AiDO7e3X0h7m1jZTE9zQaNbx3dn3noKZQLUpfuja9po/SmYAk35wz3p orVQ== X-Gm-Message-State: AODbwcAioO1tcypY3G++hGOAaJF4mN5LTL73TEhbL+xH/PNgMLgZKosR 8W8m2tlupj+NNpoT X-Received: by 10.46.69.69 with SMTP id s66mr3122170lja.110.1495235166037; Fri, 19 May 2017 16:06:06 -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 b62sm1172825lfe.39.2017.05.19.16.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 16:06:04 -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 v2] ata: Add DT bindings for Faraday Technology FTIDE010 Date: Sat, 20 May 2017 01:05:57 +0200 Message-Id: <20170519230600.16782-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>; +}; From patchwork Fri May 19 23:05:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 100221 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp535080qge; Fri, 19 May 2017 16:06:25 -0700 (PDT) X-Received: by 10.98.67.86 with SMTP id q83mr4236306pfa.68.1495235185372; Fri, 19 May 2017 16:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495235185; cv=none; d=google.com; s=arc-20160816; b=b8dB5ebtkBp480gFhxJb2iEYvk/ZhWJVjBw3x1kHCIfx9YX9QW3W0618S9pssc/GIJ 739wAORTFnkNVbiGs24Xa+O8C3pJLYpCN3EFkBqhY2baMhiclVxD959UMe0mLcBbjDJE kkkbrW23aqzDRehhzFNx5Qvsjuv2j9O4FS/S+Mn1LtqeRSuA/SQPR9VUM6B123BSSDP1 otz34w/AHIPf6sifznSO+6x5Q/nRjym5t9R3926cxltKfdbxVMPrqlvg2sl9khO7ckPQ 1pzlaorzPdzhFTqDL8ugijxXlzjBxAanRwEETZ0XAidjOmXWdoXcV77Uh9l77DEQbQA0 D/yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=umL5auOCXH0SqJedWDl+1Amj4KJYk2pkHF16xurxty4=; b=XEWSgx6NL0TfnmCG6UsoePcBBtbq+/dTbB5p5ZdSqM3Vz9DoUx6upU1yHidl6mb3BK LqtDbKE9lNkpTmQ6LIA89nyjB1M50MYVm/Lob85i8WDczJL6uNqOUtlmQMxsB78M4E7D K6kMav9mznvzeTtjZ+iqwFSfe7X3GAab+B6zv+B0rt6onPO8tL0d8szLKxFBMv1Vvv2J o+obILu3kxsChE2oU0VVo8YYca6bDBggmFnpbNsl78GdrogN9Qn0P0HRNpzvqq5ACM4O hYmY6+4ieJZGaCLAXyKBzXstCK26LerQoWHc7ojKNN6hckxHswAFlaFzmEgcz16Yxwke NM4Q== 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 i13si9686942pgc.265.2017.05.19.16.06.25; Fri, 19 May 2017 16:06:25 -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 S1757206AbdESXGQ (ORCPT + 7 others); Fri, 19 May 2017 19:06:16 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:36858 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757174AbdESXGQ (ORCPT ); Fri, 19 May 2017 19:06:16 -0400 Received: by mail-lf0-f46.google.com with SMTP id h4so7974123lfj.3 for ; Fri, 19 May 2017 16:06:15 -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:in-reply-to:references; bh=fYAQfO1sIbOUATKkIcseBhTKrqATCX7FGU4BT4QrglM=; b=dFrVJuYR94f4rXKidfp7NcbsxwhU4z267PMGbWN4PYK6Dvosrx1qV49tD9KjCAmWl1 o9Len/Qshrzov5s9CBEi2z8eyFZzHscpNSVIqcrvbuRAJIv138RNuKY+uzX/eucLTpo4 2j0RRXt/he/CRcpX1aTzPZARtVCBaXzoiTQCs= 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; bh=fYAQfO1sIbOUATKkIcseBhTKrqATCX7FGU4BT4QrglM=; b=bFqOBaUKo/4vYGslJoVu/qiovEy7xtCHbRtZWvJZ//P7ij38ywHXFHqM76h8m2dm5C JIWo0Vk1lcYwB2JmtZkObYzlAf63iUj9haTg/sNGnlhN5IqLa2/B0OcUpmlrzUjpS4t2 e21USlCGxGMLeybAK2MEXFWsYMOqmg5R+YKruG7nq+PKXYsaDd6K8d4Z/0EUzoGjI5T+ JqCKRLVgWs0qleBby/9HYRa5591xkn9VJ4t0ct/d5zKBLJb78OvB6FAE9YswpZlulDA2 ai41rGPACJzzYYev04LV18W1vJAPF1FLEqBXzFLJfNsCgZakaRP54MgbOitSU2jtUkTI 6SqQ== X-Gm-Message-State: AODbwcCiRnMF9RW1O0ZXu5LkaNTm0LraxhtdJNVExEh29ATtXLMlMM3z bHiCUQCrAkkVZIxU X-Received: by 10.46.87.2 with SMTP id l2mr2456075ljb.122.1495235174270; Fri, 19 May 2017 16:06:14 -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 b62sm1172825lfe.39.2017.05.19.16.06.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 16:06:12 -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 2/4 v2] ata: Add DT bindings for the Gemini SATA bridge Date: Sat, 20 May 2017 01:05:58 +0200 Message-Id: <20170519230600.16782-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170519230600.16782-1-linus.walleij@linaro.org> References: <20170519230600.16782-1-linus.walleij@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the Cortina Systems Gemini PATA to SATA bridge. 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: - Fix ata0 misspelled as ata1 in one place. --- .../bindings/ata/cortina,gemini-sata-bridge.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.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/cortina,gemini-sata-bridge.txt b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt new file mode 100644 index 000000000000..1c3d3cc70051 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt @@ -0,0 +1,55 @@ +* Cortina Systems Gemini SATA Bridge + +The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that +takes two Faraday Technology FTIDE010 PATA controllers and bridges +them in different configurations to two SATA ports. + +Required properties: +- compatible: should be + "cortina,gemini-sata-bridge" +- reg: registers and size for the block +- resets: phandles to the reset lines for both SATA bridges +- reset-names: must be "sata0", "sata1" +- clocks: phandles to the compulsory peripheral clocks +- clock-names: must be "SATA0_PCLK", "SATA1_PCLK" +- syscon: a phandle to the global Gemini system controller +- cortina,gemini-ata-muxmode: tell the desired multiplexing mode for + the ATA controller and SATA bridges. Values 0..3: + Mode 0: ata0 master <-> sata0 + ata1 master <-> sata1 + ata0 slave interface brought out on IDE pads + Mode 1: ata0 master <-> sata0 + ata1 master <-> sata1 + ata1 slave interface brought out on IDE pads + Mode 2: ata1 master <-> sata1 + ata1 slave <-> sata0 + ata0 master and slave interfaces brought out + on IDE pads + Mode 3: ata0 master <-> sata0 + ata0 slave <-> sata1 + ata1 master and slave interfaces brought out + on IDE pads + +Optional boolean properties: +- cortina,gemini-enable-ide-pins: enables the PATA to IDE connection. + The muxmode setting decides whether ATA0 or ATA1 is brought out, + and whether master, slave or both interfaces get brought out. +- cortina,gemini-enable-sata-bridge: enables the PATA to SATA bridge + inside the Gemnini SoC. The Muxmode decides what PATA blocks will + be muxed out and how. + +Example: + +sata: sata@46000000 { + compatible = "cortina,gemini-sata-bridge"; + reg = <0x46000000 0x100>; + resets = <&rcon 26>, <&rcon 27>; + reset-names = "sata0", "sata1"; + clocks = <&gcc GEMINI_CLK_GATE_SATA0>, + <&gcc GEMINI_CLK_GATE_SATA1>; + clock-names = "SATA0_PCLK", "SATA1_PCLK"; + syscon = <&syscon>; + cortina,gemini-ata-muxmode = <3>; + cortina,gemini-enable-ide-pins; + cortina,gemini-enable-sata-bridge; +};