From patchwork Sat May 6 12:10:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 759304 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 3wKnh66k5Dz9s8P for ; Sat, 6 May 2017 22:12: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="enBqfjcy"; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C6E6EB91381; Sat, 6 May 2017 14:11:38 +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:38 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 37BCCB809F0 for ; Sat, 6 May 2017 14:11:23 +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-f50.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sat, 6 May 2017 14:11:22 +0200 (CEST) Received: by mail-lf0-f50.google.com with SMTP id 99so14961032lfu.1 for ; Sat, 06 May 2017 05:11:22 -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=6bbaaIaCFer3Og7foXWekkv+prtnIu0RqQ6GZkm0Vqs=; b=enBqfjcy8UwngjN2DRn/sTYdV8Q9lNYe9JqAnd1fhqzXIExsdI9nf0FePxb/Byy1mo duq7S4/K4HjBxFGRYD1/jtnxTlAEX33/+Xy62+O4BXjkFzhgBM+mT1exe2zY/GDug/PE jhDrOY/Z+rJmm3Aie6DH6qXYrvq3ohQ9CBI1o= 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=6bbaaIaCFer3Og7foXWekkv+prtnIu0RqQ6GZkm0Vqs=; b=jAtS43dPS3+N+l8xmn7lseqmezb9WgwwTnXpNiMpTaUpMZQm3KLJoTlb2pVswFodoU e8aqyUAbn8ekbxbe38nD+Z3VMCj/ZVxCKL07Zn/UOqKwW3dskOTlx0WtTZDyLaQfgle+ e8p2or4FEvQ6HIdzlVoqZYzk5iduut/cQtvb8S94+wgFwmyRahW3kuZYJR7uE/sopcvi +MSaZvRoIjBmVEC0qn3nDPTdGRvo02ewA16rVzAplAidms7pK1jPOVbLkpPOXHi2tdxC V3/2EBp0rIldAGQtGKo0QfscaNKj5QxtJ04bXtzkUQb1T2aGnqM8e4XxIY11bRn2Irzx n+dg== X-Gm-Message-State: AN3rC/7bMEUTYJXy3VFqRLzkrIwk5qB3Rno6IAm1NZQsj7h8E3IlkyKl +s/tSnKlGmgcP4w0 X-Received: by 10.25.43.1 with SMTP id r1mr20241576lfr.89.1494072682305; Sat, 06 May 2017 05:11:22 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 05:11:20 -0700 (PDT) From: Linus Walleij To: Tejun Heo , Bartlomiej Zolnierkiewicz , linux-ide@vger.kernel.org Date: Sat, 6 May 2017 14:10:53 +0200 Message-Id: <20170506121053.11554-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170506121053.11554-1-linus.walleij@linaro.org> References: <20170506121053.11554-1-linus.walleij@linaro.org> Subject: [OpenWrt-Devel] [PATCH 4/4] ARM: dts: add Gemini PATA/SATA support 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, 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" 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 Signed-off-by: Linus Walleij --- 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 | 56 +++++++++++++++++++++++++++++++++++ 3 files changed, 76 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 6fe678a68e31..a50ad49d38f5 100644 --- a/arch/arm/boot/dts/gemini.dtsi +++ b/arch/arm/boot/dts/gemini.dtsi @@ -89,6 +89,18 @@ clock-names = "PCLK", "EXTCLK"; }; + 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>; + status = "disabled"; + }; + intcon: interrupt-controller@48000000 { compatible = "faraday,ftintc010"; reg = <0x48000000 0x1000>; @@ -183,5 +195,49 @@ #interrupt-cells = <1>; }; }; + + ata@63000000 { + compatible = "cortina,gemini-pata", "faraday,ftide010"; + reg = <0x63000000 0x1000>; + interrupts = <4 IRQ_TYPE_EDGE_RISING>; + resets = <&rcon 2>; + clocks = <&gcc GEMINI_CLK_GATE_IDE>; + clock-names = "PCLK"; + sata = <&sata>; + status = "disabled"; + /* PIO timings assume 33 MHz bus speed */ + faraday,pio-active-time = <10>, <10>, <10>, <3>, <3>; + faraday,pio-recovery-time = <10>, <3>, <1>, <3>, <1>; + faraday,mdma-50-active-time = <6>, <2>, <2>; + faraday,mdma-50-recovery-time = <6>, <2>, <1>; + faraday,mdma-66-active-time = <8>, <3>, <3>; + faraday,mdma-66-recovery-time = <8>, <2>, <1>; + faraday,udma-50-setup-time = <3>, <3>, <2>, <2>, <1>, <1>; + faraday,udma-50-hold-time = <3>, <1>, <1>, <1>, <1>, <1>; + faraday,udma-66-setup-time = <4>, <4>, <3>, <2>, <1>, <1>, <1>; + faraday,udma-66-hold-time = <4>, <2>, <1>, <1>, <1>, <1>, <1>; + }; + + ata@63400000 { + compatible = "cortina,gemini-pata", "faraday,ftide010"; + reg = <0x63400000 0x1000>; + interrupts = <5 IRQ_TYPE_EDGE_RISING>; + resets = <&rcon 2>; + clocks = <&gcc GEMINI_CLK_GATE_IDE>; + clock-names = "PCLK"; + sata = <&sata>; + status = "disabled"; + /* PIO timings assume 33 MHz bus speed */ + faraday,pio-active-time = <10>, <10>, <10>, <3>, <3>; + faraday,pio-recovery-time = <10>, <3>, <1>, <3>, <1>; + faraday,mdma-50-active-time = <6>, <2>, <2>; + faraday,mdma-50-recovery-time = <6>, <2>, <1>; + faraday,mdma-66-active-time = <8>, <3>, <3>; + faraday,mdma-66-recovery-time = <8>, <2>, <1>; + faraday,udma-50-setup-time = <3>, <3>, <2>, <2>, <1>, <1>; + faraday,udma-50-hold-time = <3>, <1>, <1>, <1>, <1>, <1>; + faraday,udma-66-setup-time = <4>, <4>, <3>, <2>, <1>, <1>, <1>; + faraday,udma-66-hold-time = <4>, <2>, <1>, <1>, <1>, <1>, <1>; + }; }; };