From patchwork Sun Jun 4 08:50:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9764707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AFF1B602B6 for ; Sun, 4 Jun 2017 08:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FABC2833B for ; Sun, 4 Jun 2017 08:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 944C82838B; Sun, 4 Jun 2017 08:51:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EBC042833B for ; Sun, 4 Jun 2017 08:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8I2D0gJtMI4b8jJYcv6a6PhSy64ZLpQPpqpmHJjG+Ao=; b=gbafo2tA+WWzMiNKN5KhAjMroI QNjM9In0KH7DuUp5gQHrSz6ULe3KY53mAGZLfsNVqWApm5WcVn2zNo4yWyJqcYwbubAaBcbXHur/T jiNmonuiVhbCut3eazJvmwmnyOQePYq9Ouj7B6NJ5Thr/OLXP9hRnkfePtZ7vfkqkBjFabdUSbzV4 2XyS5eEkH21tu0SRNUGRcNviEEfy7BiV4ZLulpkdvKvyIxeVfiQ0bbLQMUtXERU+WhOvCXML444SQ uex8LgmXTlo2rGagk+RjqdWZIKAPyfE/ZsjH7xY3xXa3ZwRq4QK/sqGRZtoqc75ZDet+NROOcPvf4 KZIdjGAQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dHRFk-0005LL-FN; Sun, 04 Jun 2017 08:51:16 +0000 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dHRFP-0004q0-AB for linux-arm-kernel@lists.infradead.org; Sun, 04 Jun 2017 08:50:59 +0000 Received: by mail-lf0-x232.google.com with SMTP id c184so54520555lfe.2 for ; Sun, 04 Jun 2017 01:50:34 -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=kWiwbQxZJR7GFkBljuNO7FA7X2E6gY+HmCAFWInYEPI=; b=PrpXDYmSwjE02MDzDP+fpZNfYQlxu9yEnTkzy0/bwHG2jM55RVup999BDGshMuRveP rlTTV2QTfyMyRmhx4cGZa3PeIYwBgqhCOnqNORYJ3L7d1Gxu786VPJvsRPc/USFEbLl0 iMSAEz9umukA5wRZ0GLFW+3jpWSmqKwq7QAsM= 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=kWiwbQxZJR7GFkBljuNO7FA7X2E6gY+HmCAFWInYEPI=; b=k42y/FSdsVq6nrESDlVFzw1u4iohE27FC5zKfgzK/gFO7R7ZErCNsOT7UHZBMrxON2 4lq5hwSyZn85KnqK+X6HrR0tD+out6ImH7uB8LgY8agsSsdatlBZnkrOkkXKOePiCi5/ 6ztN633hroQvaiAKLxBaYMRyhr6YmOVGrTH1Ze3BCZ/WnHU1YCP4f1w0TkG1VPZ1EqqU x5QAGr8LBNBbuozfAJ6cPp4AiJLJHErmZih7RCySfwfcA/3MR7A9LdKibfOFGNN2nu8+ Ne4XR91ZCA+y2X55KW0eZ6uNyuZnadryyTBTmhYGEZDbLWcsgYcJZM8wA7DHez6kq25t AUog== X-Gm-Message-State: AODbwcADc73RO+PcmSyB3hpCju2s9kUnAVCJUcaTq43ZpRj9wZyY3yfE nxJwH3bewgBfFsMV X-Received: by 10.25.20.38 with SMTP id k38mr2399870lfi.142.1496566233250; Sun, 04 Jun 2017 01:50:33 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-047971d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.121.4]) by smtp.gmail.com with ESMTPSA id a88sm1440462ljb.54.2017.06.04.01.50.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jun 2017 01:50:31 -0700 (PDT) From: Linus Walleij To: Tejun Heo , Bartlomiej Zolnierkiewicz , linux-ide@vger.kernel.org Subject: [PATCH 4/4 v4] ARM: dts: add Gemini PATA/SATA support Date: Sun, 4 Jun 2017 10:50:09 +0200 Message-Id: <20170604085009.11902-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170604085009.11902-1-linus.walleij@linaro.org> References: <20170604085009.11902-1-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170604_015055_887050_60041BC4 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , John Feng-Hsin Chiang , Paulius Zaleckas , Hans Ulli Kroll , Greentime Hu , Janos Laube , Linus Walleij , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The NAS4229B and SQ201 Gemini systems have a PATA controller which is linked to a SATA bridge in the SoC. Enable both platforms to use the PATA/SATA devices. Cc: John Feng-Hsin Chiang Cc: Greentime Hu Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - No changes, just resending to keep the patch set together. ChangeLog v2->v3: - No changes, just resending to keep the patch set together. - Cut the timings also from the second device instance. ChangeLog v1->v2: - Cut the timings - we open code these in the driver instead. - Reference syscon node for clocks and resets as requested by the devicetree reviewers. - Use reset line #defines from the new header file. PATA maintainers: this file will be applied by me through the ARM SoC git tree. It is provided for reference only so you see how it will be used. --- arch/arm/boot/dts/gemini-nas4220b.dts | 10 ++++++++++ arch/arm/boot/dts/gemini-sq201.dts | 10 ++++++++++ arch/arm/boot/dts/gemini.dtsi | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) diff --git a/arch/arm/boot/dts/gemini-nas4220b.dts b/arch/arm/boot/dts/gemini-nas4220b.dts index 7668ba52158e..55f6a4f1f801 100644 --- a/arch/arm/boot/dts/gemini-nas4220b.dts +++ b/arch/arm/boot/dts/gemini-nas4220b.dts @@ -98,5 +98,15 @@ read-only; }; }; + + sata: sata@46000000 { + cortina,gemini-ata-muxmode = <0>; + cortina,gemini-enable-sata-bridge; + status = "okay"; + }; + + ata@63000000 { + status = "okay"; + }; }; }; diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts index 46309e79cc7b..4d200f0bcd45 100644 --- a/arch/arm/boot/dts/gemini-sq201.dts +++ b/arch/arm/boot/dts/gemini-sq201.dts @@ -93,6 +93,12 @@ }; }; + sata: sata@46000000 { + cortina,gemini-ata-muxmode = <0>; + cortina,gemini-enable-sata-bridge; + status = "okay"; + }; + pci@50000000 { status = "okay"; interrupt-map-mask = <0xf800 0 0 7>; @@ -114,5 +120,9 @@ <0x6000 0 0 3 &pci_intc 1>, <0x6000 0 0 4 &pci_intc 2>; }; + + ata@63000000 { + status = "okay"; + }; }; }; diff --git a/arch/arm/boot/dts/gemini.dtsi b/arch/arm/boot/dts/gemini.dtsi index 8e833744e855..49cce9e9d51f 100644 --- a/arch/arm/boot/dts/gemini.dtsi +++ b/arch/arm/boot/dts/gemini.dtsi @@ -83,6 +83,19 @@ clock-names = "PCLK", "EXTCLK"; }; + sata: sata@46000000 { + compatible = "cortina,gemini-sata-bridge"; + reg = <0x46000000 0x100>; + resets = <&syscon GEMINI_RESET_SATA0>, + <&syscon GEMINI_RESET_SATA1>; + reset-names = "sata0", "sata1"; + clocks = <&syscon GEMINI_CLK_GATE_SATA0>, + <&syscon GEMINI_CLK_GATE_SATA1>; + clock-names = "SATA0_PCLK", "SATA1_PCLK"; + syscon = <&syscon>; + status = "disabled"; + }; + intcon: interrupt-controller@48000000 { compatible = "faraday,ftintc010"; reg = <0x48000000 0x1000>; @@ -178,6 +191,28 @@ }; }; + ata@63000000 { + compatible = "cortina,gemini-pata", "faraday,ftide010"; + reg = <0x63000000 0x1000>; + interrupts = <4 IRQ_TYPE_EDGE_RISING>; + resets = <&syscon GEMINI_RESET_IDE>; + clocks = <&syscon GEMINI_CLK_GATE_IDE>; + clock-names = "PCLK"; + sata = <&sata>; + status = "disabled"; + }; + + ata@63400000 { + compatible = "cortina,gemini-pata", "faraday,ftide010"; + reg = <0x63400000 0x1000>; + interrupts = <5 IRQ_TYPE_EDGE_RISING>; + resets = <&syscon GEMINI_RESET_IDE>; + clocks = <&syscon GEMINI_CLK_GATE_IDE>; + clock-names = "PCLK"; + sata = <&sata>; + status = "disabled"; + }; + dma-controller@67000000 { compatible = "faraday,ftdma020", "arm,pl080", "arm,primecell"; /* Faraday Technology FTDMAC020 variant */