From patchwork Thu Aug 30 19:01:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145568 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252014ljw; Thu, 30 Aug 2018 12:01:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaX23EvSbJuAOFYc+YDM82GC6L06Nu8sNTCb5lcgZFWbWmg1wRehNsK+lyxVdT3kXRsKHxP X-Received: by 2002:a62:f40a:: with SMTP id r10-v6mr11726369pff.47.1535655695606; Thu, 30 Aug 2018 12:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655695; cv=none; d=google.com; s=arc-20160816; b=RDbsJYT2iLze9pv3wDuHEONiwWKLuhFZx6lSLYPV1rLut8ZARGB6MsWK3MAdAFCfES 60D5NLNZ24GRAJfNlUD5j4W2wZD21Nrk6WlsO5B9+fXFWVhD6ijl4ROiHs0l/iLSh1Lu z/yaKo1/CNT1kU+XBfBRWE38gKgjtV0gkhLdMvhOrO1hDu5kcGG9yWi1klnmqUljYFAj Z9MIkA7ZZfae1JtZT0lxQeDJGNKr3PTd2kpY06ruhoHhPyuA9NhdOWi7FFfaijnvvuLO EMYMTOJfcDXbsanutDXiFeIRawmJfr+rBS+DDdTnChNzhe33i085iNq/O/paG4tCXtNQ HQ7A== 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=k6iCbW8J+KgHVaSl644rAO8j84rXqhGHUryoNJ+DbzA=; b=QF5W4fc+tYOmpJXxaKzCZbBvKlBNEY7vE3yI0ITbIQ2lbVWTnOqQE5EeMyUGt9QwE7 xqrVCkVhflkOmyRQJGYKHaWHmCd26nG67oJOGSZA7onHJfpPsqfSC0FqvssNKw+/QQr0 5p0DeC8rkFrwI9tOjDls0lUmocMxAYfMv7hqTztyxws9jYEyumEskCnTWpKYF0jQSZav AGU0Z4ym25k9T9yBQ5FaVFfcquD0Dqcvso2Jxwr4mjUK5M+JrlNa8lTACpY7IiervwG6 SOB1mV2E7g/gL9ok3CiTacZ0GtY6RtRmzdCBOEJ4STXFFmBfc5xGE51FX0/cTyT/W3jL DAaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fubLOn3K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8-v6si7184193plb.83.2018.08.30.12.01.35; Thu, 30 Aug 2018 12:01:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fubLOn3K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727810AbeH3XFJ (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:09 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:51557 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbeH3XFI (ORCPT ); Thu, 30 Aug 2018 19:05:08 -0400 Received: by mail-wm0-f66.google.com with SMTP id y2-v6so3003338wma.1; Thu, 30 Aug 2018 12:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k6iCbW8J+KgHVaSl644rAO8j84rXqhGHUryoNJ+DbzA=; b=fubLOn3Kg3eBkI2XnydjEzDLAle1z7QmrP+9bU5aYuE3KmiHF3pP0dvRvZdHe3w1sh 8bpdl7fCulAbIX5DMD01i8LoWKyYmYJPXWZ/ZR+RGelz6SMps8GFfKE/eSM8php6clJl iBtVhBFXDqfzafEONPqgQRlzwlXARd3297VXecs4JggJMs91Xndbs5aDLTzh5GV2ajDp q1oyEPaCDBi1Kul5wGr8aQWRkQUPWOh8fM6ZcnHFW0gq0ayrnqk4hs27oR0sXdzV4xeH f+LUno5MHljvWtihgn9bAwZ/mf8E8dc9tl+58mTS202pMcC/N9+Miq10DTyOw79wP3tp 7POQ== 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=k6iCbW8J+KgHVaSl644rAO8j84rXqhGHUryoNJ+DbzA=; b=oOkaK+Uo3EXv2mDsqlGHO84fAHdQaPtFHPxXlVductGhUOJH2yGSkTGFdad+m4Jclj 5rP81N5I4XxAMKV7hMPHZxMYEvUlTn1HudhpPDDkA0wnUtMhf26rjn2tnP5fT/Gfgro5 W1Svvo1OXlyTwSjvqtZUzkAC56nTvDH1z7mcQEQpkUw7dL/WGOWFAhTK5hgJo/MARUOe OLobczcirDBwqRcYT6o3heuMC7rVVcj69LdvBDsWPexlz44/3raRg446RKdxVlFfyqfM XLSAplF48Wl47Yo4WWwujCxFk4pOcoke+B2kq1NQFw4COmiFDJxGPyZZc6Kp8OvsCwWj x81g== X-Gm-Message-State: APzg51Cp3shyEAArPjjouDVqLSCYOUjPS/slyg53rYj797HZ+tCA5F3B DKGffeC0Ntu94E40hwG8oRU= X-Received: by 2002:a1c:8145:: with SMTP id c66-v6mr2749219wmd.139.1535655689957; Thu, 30 Aug 2018 12:01:29 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:29 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 01/13] dt-bindings: ata: ahci-platform: fix indentation of target-supply Date: Thu, 30 Aug 2018 21:01:08 +0200 Message-Id: <20180830190120.722-2-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fix the indentation of target-supply's ':'. Signed-off-by: Corentin Labbe --- Documentation/devicetree/bindings/ata/ahci-platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.4 diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index 5d5bd456d9d9..b88820b4c01e 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt @@ -47,7 +47,7 @@ Sub-nodes required properties: - reg : the port number And at least one of the following properties: - phys : reference to the SATA PHY node -- target-supply : regulator for SATA target power +- target-supply : regulator for SATA target power Examples: sata@ffe08000 { From patchwork Thu Aug 30 19:01:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145580 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp253535ljw; Thu, 30 Aug 2018 12:02:38 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbwiac1n5vprsTn808+r4YHnAdhNjS/4Ap4GrMqlBOGkXr5l9L2y/Vn8ThjTPqSrwpuma4q X-Received: by 2002:a63:bd41:: with SMTP id d1-v6mr11016131pgp.309.1535655757972; Thu, 30 Aug 2018 12:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655757; cv=none; d=google.com; s=arc-20160816; b=1Bk2fW8XOUdoY2ViaJDbzg8tYECLIwK9155vyfXYnFIQO+Raw7NrtG5Rwsxte8jMIa 5aZFRZM9odaAwrBVHZeIrz0H9iiWd0ge64Wl3/FanSXUauI1pwhQQDiq9KpP4alnuuFY 6u/BtAv9ZBv8pOcUD7vxu5I3ulDBxgFKEvU/VfNAWOK5c30BjlBLgErkmICduZgq1LCy 7j+omGtqiQhEU9s7/1x6g8Z6/tYeKhmwH2dAZojAeO2OV2ACJr9tOTFJd2mWEYyapAOi 0hOsWC3wg5nXqkKWEnC+NzcuYzva25UwGl4ZRfFeKIN5+W1m7sTaLuusKMH7YDzIySuN eGMg== 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=t7Yy96h1CNLQsmpPB+gBtt+3MwMJX3o+4LyGaKYq94s=; b=iqFxI7RIHAudfbgrZFe6rFZHkCNIrB7zpBitqkVfbDAgNWG42ufXBN7qu3Jykk+GqJ EAp58djqgzN6fcROgk2/uhY8TzX3Kg3eC4EF0nCnkADZTKZMn3wu6PMIWf0JoVxKoYtf PzI2f8yGag/OOvAW3Uq4hSzn2JED47xKlEbGntkYOWeJroXS4gKfI8cZeBWuL6q2oF+y MCMwWLf8/A5ji/4K3zyb3+9TP/jG+RjPGGUqAiES9y/yauTp9W163Q30QHz+dxCAXd/C bisU1P+QSHz88lGIRhVNwh60RFB9FaezpVlP6uJaWXZ22aWkWVGMwX7rC84ATsqBKZ07 z4rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ovh2DSFQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18-v6si4638021plq.1.2018.08.30.12.02.37; Thu, 30 Aug 2018 12:02:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ovh2DSFQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727876AbeH3XFN (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:13 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35714 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbeH3XFK (ORCPT ); Thu, 30 Aug 2018 19:05:10 -0400 Received: by mail-wm0-f67.google.com with SMTP id o18-v6so3084850wmc.0; Thu, 30 Aug 2018 12:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t7Yy96h1CNLQsmpPB+gBtt+3MwMJX3o+4LyGaKYq94s=; b=Ovh2DSFQ3Cs6oLBB67ht6cSz4HYmGF8Wha89mOyuDPXkA1DktCSvtOe9hN5rJM0COS BqdbmOs3DP96TKpkimSVj+KN7d2D3YrtcPABUwXb7VS+YIshG7m0D0X9qlXfWUE5WPzQ fumVRD+JDD/7qTg9FPB+lWDdNyQSuT2/aERQEzH34edKn8K+oLj+6uX49dMym8abrtMS 5auJyHSU4SL8rfQCcfSL/B77phx64zqXzdkX+1ZlG5PSW+jGUVvUSOAiG9/QcA2gNIlQ 4cfntFdChWp7ZXQNx0uxZIJQoWDez6a8xLhtUG6/YweucdqC+/Gp+iLOg7i2Vr2fkqKp 7FCA== 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=t7Yy96h1CNLQsmpPB+gBtt+3MwMJX3o+4LyGaKYq94s=; b=rInyriQaT05Sn2a72D2vweNqrTwcTWZjIeCw63edfMYpsrkIis0/LpR+Bn1uip4cs3 plm/67Y/AO0JWn/ffcwljWVtdcUAqrCNyxL4ao+HrhKu6KVktFzZQbDdsqyJT1Wl24hU 8q7wCcc0e62nacfO5iF/0eTBFvHzy4pbwTb/qRyqyd3R1AKenyx3F5SeRk/Bxh7e8lk5 6yLI4Rbsm5RouwQEaheU9Qgmg0JgN0zPhfEzRJWNUWzw+SCRLJgyAiPdUtEyiaGtqJ99 /Zh6sWfozFMhE1KdZ9atc2eFEC5EfbcXLrHySoUWrjzgkTUEcUXTo7RW326MZk+D+gZm 63fg== X-Gm-Message-State: APzg51DnB4f4HyY2HBy4BpRBKtQFV5i1gNlqlfLD41ptHTL05KSdOkJF /J3SUtEeitEgS3SNE6TNQXs= X-Received: by 2002:a1c:908b:: with SMTP id s133-v6mr2706797wmd.69.1535655691915; Thu, 30 Aug 2018 12:01:31 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:30 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 02/13] ata: ahci_platform: add support for AHCI controller regulator Date: Thu, 30 Aug 2018 21:01:09 +0200 Message-Id: <20180830190120.722-3-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SoC R40 AHCI controller need a regulator to work. So this patch add a way to add an optional regulator on AHCI controller. Signed-off-by: Corentin Labbe --- drivers/ata/ahci.h | 1 + drivers/ata/libahci_platform.c | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) -- 2.16.4 diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 6a1515f0da40..1415f1012de5 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -352,6 +352,7 @@ struct ahci_host_priv { struct clk *clks[AHCI_MAX_CLKS]; /* Optional */ struct reset_control *rsts; /* Optional */ struct regulator **target_pwrs; /* Optional */ + struct regulator *ahci_regulator;/* Optional */ /* * If platform uses PHYs. There is a 1:1 relation between the port number and * the PHY position in this array. diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index c92c10d55374..a886b61476a3 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c @@ -139,7 +139,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_disable_clks); * ahci_platform_enable_regulators - Enable regulators * @hpriv: host private area to store config values * - * This function enables all the regulators found in + * This function enables all the regulators found in controller and * hpriv->target_pwrs, if any. If a regulator fails to be enabled, it * disables all the regulators already enabled in reverse order and * returns an error. @@ -151,6 +151,12 @@ int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv) { int rc, i; + if (hpriv->ahci_regulator) { + rc = regulator_enable(hpriv->ahci_regulator); + if (rc) + return rc; + } + for (i = 0; i < hpriv->nports; i++) { if (!hpriv->target_pwrs[i]) continue; @@ -167,6 +173,8 @@ int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv) if (hpriv->target_pwrs[i]) regulator_disable(hpriv->target_pwrs[i]); + if (hpriv->ahci_regulator) + regulator_disable(hpriv->ahci_regulator); return rc; } EXPORT_SYMBOL_GPL(ahci_platform_enable_regulators); @@ -175,7 +183,8 @@ EXPORT_SYMBOL_GPL(ahci_platform_enable_regulators); * ahci_platform_disable_regulators - Disable regulators * @hpriv: host private area to store config values * - * This function disables all regulators found in hpriv->target_pwrs. + * This function disables all regulators found in hpriv->target_pwrs and + * AHCI controller. */ void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv) { @@ -186,6 +195,9 @@ void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv) continue; regulator_disable(hpriv->target_pwrs[i]); } + + if (hpriv->ahci_regulator) + regulator_disable(hpriv->ahci_regulator); } EXPORT_SYMBOL_GPL(ahci_platform_disable_regulators); /** @@ -351,6 +363,7 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port, * * 1) mmio registers (IORESOURCE_MEM 0, mandatory) * 2) regulator for controlling the targets power (optional) + * regulator for controlling the AHCI controller (optional) * 3) 0 - AHCI_MAX_CLKS clocks, as specified in the devs devicetree node, * or for non devicetree enabled platforms a single clock * 4) resets, if flags has AHCI_PLATFORM_GET_RESETS (optional) @@ -408,6 +421,15 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev, hpriv->clks[i] = clk; } + hpriv->ahci_regulator = devm_regulator_get_optional(dev, "ahci"); + if (IS_ERR(hpriv->ahci_regulator)) { + rc = PTR_ERR(hpriv->ahci_regulator); + if (rc == -EPROBE_DEFER) + goto err_out; + rc = 0; + hpriv->ahci_regulator = NULL; + } + if (flags & AHCI_PLATFORM_GET_RESETS) { hpriv->rsts = devm_reset_control_array_get_optional_shared(dev); if (IS_ERR(hpriv->rsts)) { From patchwork Thu Aug 30 19:01:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145569 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252094ljw; Thu, 30 Aug 2018 12:01:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrZUdX1IxtpDHRqE0aqtLYiNzdJfGA25Xewve9DXrMCJwesXKRmNSyvpk9yjeDdz4vXJTh X-Received: by 2002:a63:40c7:: with SMTP id n190-v6mr11054861pga.116.1535655699690; Thu, 30 Aug 2018 12:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655699; cv=none; d=google.com; s=arc-20160816; b=xEdEhGOS88kTB1yiHStKgt68yiJ5hMvMfXoeimcNRHNOUo0hgAEQjAbSl5N8s7i2Oa Y/6ArVyK+tNZTgsgS2mRpsiCfKQhy/kOziJC2jfzEnALTQY/ZTx+g9mbKbFJGbf7+mDM ouWpMTMMiNDdSYjrxYzhPLpLzKqYhQ0XXaP+e9Gu54Z+aRvJN2cG+CaP0ssMqNi1YTeX W+VRzKko5OML1RVor/2YqCVkUl2OlwnHEElmAB60Yn/uQCAy+HLftZqWvWQq16NYgNyV lXNbZAY0sx+nVEjP4sn8IbbQLIEHhSTepjxNqfAttC2REqfulibysYA/GECUfDQWfBGo 1Gag== 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=/+HNfr3I0MzGHGd7Aj3LN1rm33wfTbHxswxtDehlIDw=; b=KiWq3rxVkKmGLYgCswepePPGYCM7XVIuTuZpEotKLPA1UXnYBUdBeNnKynNekTHAmj z9DWmuZMP7hCCaS6PIuInGNUvwxIqlK0oMb5OlVvvwDc5goj4LC3Y9uXkHoysktHwsuo SdgsSQmR7Q486kiaqLrqg5gYOOFo7b3J1ux8jgeD8Mv3wkwgdlaGuFXqpB58kJCXUS8J QPY4ybn1NkB6aEBDi8EwvF0KjwbzG8CY4ZteOdYFsLTvOxHtNw84t4/WCFjl/TAc9YrE EgYARDQhky+QRuAE36cdtHpk9+fvHE6J8nWiVgMYYDM4HowjEoOmvNngXDHwdUXYCrgp aObg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PThgoGAP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x69-v6si7683872pfe.318.2018.08.30.12.01.39; Thu, 30 Aug 2018 12:01:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PThgoGAP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbeH3XFN (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:13 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40861 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbeH3XFK (ORCPT ); Thu, 30 Aug 2018 19:05:10 -0400 Received: by mail-wr1-f68.google.com with SMTP id n2-v6so9012418wrw.7; Thu, 30 Aug 2018 12:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/+HNfr3I0MzGHGd7Aj3LN1rm33wfTbHxswxtDehlIDw=; b=PThgoGAPiljUk94JizmwB6pajpMFObk5uy970nta1s1e70QjLBSghpncln7/h8OklD 7cFkrrNca7sHbPDLGTeA2yaALPF++Syt4fhIbxUuG8rol66lXMQ5FrBCtzjJaugUenFK 7VdHho6Z7Nqd28SbUJY/qVafGEC5amkUfipD77lY4EUw7NZXYr4X+cyPq2pUJ0fE6wIe 4nhl/lsQJtNEnnNgvNFvh7140iLwhKbKF0x09SM7QflYTL8dk1DPcVJYB0moE5LFDtE/ CSKAvOQyvDreFuCGEkmNtBgVAe+pYIjKMRe6UI9nNSCn+wC72DBQ0BmguzOT5cO8IA+P dVZQ== 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=/+HNfr3I0MzGHGd7Aj3LN1rm33wfTbHxswxtDehlIDw=; b=ihM09bPNvJDBKIVu+TZzHcd2nFTzvonvsSfgVklhTePcbdXU1DlbA+ZZjkPgr6wyI7 s9hU/Dze3+ui+kN0rhvvORzXSGZIO4KqET+t3IIX1CMIKBAoOx0QTdhz+hqIk+m8q7ox 16h80dgALg23ViDc12t79xWePvupumPVK6TiRPH8AZ0KVh3Hl5T4iC1odavprDxto5PY 4RWlXYIYNrFtsQ+/BiuRi3xiHiIyhzLNMbzo+APfUQrQu6niCMKvXGab49hkJ3F2H7Us PjXcL8hepN2AM58CYqrLERj73TtRhkZeq/K/09GscjxHcsZTLdDR5X7HIRs+PHP7y1c6 RXWw== X-Gm-Message-State: APzg51B5tyexEhiqt8B6D4KKAtQdM8mN4B+M+MAvgSP4MFm9Odx4Y7sh H/xxxVsOTRIpRaI++5AXvhE= X-Received: by 2002:adf:fc44:: with SMTP id e4-v6mr8826662wrs.9.1535655693376; Thu, 30 Aug 2018 12:01:33 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:32 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 03/13] dt-bindings: ata: ahci-platform: document ahci-supply Date: Thu, 30 Aug 2018 21:01:10 +0200 Message-Id: <20180830190120.722-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch document the new optional ahci-supply. Signed-off-by: Corentin Labbe Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/ata/ahci-platform.txt | 1 + 1 file changed, 1 insertion(+) -- 2.16.4 diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index b88820b4c01e..f495774c8af9 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt @@ -33,6 +33,7 @@ Optional properties: - target-supply : regulator for SATA target power - phys : reference to the SATA PHY node - phy-names : must be "sata-phy" +- ahci-supply : regulator for AHCI controller - ports-implemented : Mask that indicates which ports that the HBA supports are available for software to use. Useful if PORTS_IMPL is not programmed by the BIOS, which is true with From patchwork Thu Aug 30 19:01:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145571 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252151ljw; Thu, 30 Aug 2018 12:01:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYC30DSzJx6J8wJATy7IhNY/HYJflhFYF3+pYndQcrTjNoCJcYGl4z5CsmOXmcJOlGhD40d X-Received: by 2002:a63:de10:: with SMTP id f16-v6mr10859917pgg.97.1535655702248; Thu, 30 Aug 2018 12:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655702; cv=none; d=google.com; s=arc-20160816; b=Qs4K7wT5i+gO1vRjrGXHYHeRVSe6dXENimNrGi+QkqukbSNVK2ulNP8g8h7Bedvtat 0oY1/3DUPHyQzpt/5KlCNyKSx8Cw4bjIYOpLVXwG1NFSgqP4l/jcL/YjNEWEAP+dfYky NErSJmwj2DYfWMsNs9/BGyFGrnQnoCavPB23Fy7VHVlLfOlA13VpmpQhih5zO0qbnpC9 bs7X+9+bE2h7Ngf102EvOr1STS2En1MZ/fdd9JbVVaPp0um9HpaD2pMtBc5/kY027Zps fpY9ALjYDyTKEURKhlHxvZOqyFZpNrHUw0a+ahQz8FfvV4Z3QcDCW2Hkwm78DSYnfvS4 zhkw== 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=nCUvOR+CglPRSFcIRVKkyPtD7xDCE0J9tFyuoHtZ2Wc=; b=aoI/uqwoPo98XVkx6OpHDOplP84ijeDyWiY9OIeD+jTA3LiiiDUmRMqs6eWxQY9ogR ZvMmyenUaHHWVThkVZUknd9LQj6Uj0gPg2Z+kyhM2+dKYg2q8apDVbduiig5aJXvho2x uU9BUuS9x1nA1PxT9IbEhY5abpTmjIiR1iQqoaaH4vzrgW+NQ70kYyXiKmBNkHYStgyi AjFe6izKK5NF4TSxSHgX1VZVYM5aPuoxX6bYqY8Ys3uX1UdfQnkfK0dRbQWDsbtWbaWR o4Ha2sawJ5rvoSkDwQ2IS405QkxZ6vv0F24gLUy3yfwZ1zT4j11DcijgxfBG+6gdky3z 0Avw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jUo/q3lB"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13-v6si7127973pll.337.2018.08.30.12.01.41; Thu, 30 Aug 2018 12:01:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jUo/q3lB"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728078AbeH3XFP (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:15 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:32854 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbeH3XFP (ORCPT ); Thu, 30 Aug 2018 19:05:15 -0400 Received: by mail-wr1-f68.google.com with SMTP id v90-v6so9031559wrc.0; Thu, 30 Aug 2018 12:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nCUvOR+CglPRSFcIRVKkyPtD7xDCE0J9tFyuoHtZ2Wc=; b=jUo/q3lBYvtwb49VFJf1fEWD56fDG6pi1fggtWxF1H58WqXQiec8vqxqK6EwpY2JRM naXFPqVAn+bu9OzpsJLzZxGYVHEI0JTtI1I+eSD7stUSFTlEhkhvVEddbKmDZ3IMFuf9 Ig/IxeWOmJWnHyXhv6jZdhqEmp+xb25kaGn+PqOLu5U8rvURudZDclAQ1SUQjGy069D0 Y0F9p14WxKq5qKwtV8dNDbfo8hZv5sK5qQ9rGQYlUVq7cYoxoxzp8AKmQ2SWslMzA31M hZojWGvS01Kvum0aAVVLoabiFzbqNqbbudJf28IRqqG2AW4ReUQ6KKcOza+YRKhxM8la 8lgw== 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=nCUvOR+CglPRSFcIRVKkyPtD7xDCE0J9tFyuoHtZ2Wc=; b=BsMWyBMV40fEqkuhuUaOWTCsYiQqiCxaOk3hQs4vnG0hgYtIXU19wLEsKWKkOyGvBy 1P3PUyjk+gT7+tzXZU0Sv5ENRyByGtgLfo5NsDNt3FQT9/zJOQ60VAQ22ENzynLgCSo/ s14IDx1i910VTNppdkrbSAuHfO+ZdTiySQFwwqFGqyxU4kJkTSwjALBfmIbughSAOqaM 1sgEJNPeunsNFRSS23nefvdiFPkIY8cBt84sqvBfHdS4KNfyyhGTGZvE4QBN038/mcl4 O675yH821mcpA8QcJyeYfUwyE/oLCjqBrPZFCDkZ6oKap6UOLULVTKf9GfRFfdcGsCBO unxQ== X-Gm-Message-State: APzg51CdtCONEX5T06cWJiQlhTD6+Jz5Q7a1TSgoyHr4cMzeOe4u63Aa aNkzawbGFOEWnnL1LaQEDJQ= X-Received: by 2002:a5d:488c:: with SMTP id g12-v6mr8636307wrq.0.1535655698019; Thu, 30 Aug 2018 12:01:38 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:37 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 06/13] dt-bindings: ata: update ahci_sunxi bindings Date: Thu, 30 Aug 2018 21:01:13 +0200 Message-Id: <20180830190120.722-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since phy code is moved from ahci_sunxi to a dedicated driver, the binding need to be updated with the new phy node requirement. Signed-off-by: Corentin Labbe --- Documentation/devicetree/bindings/ata/ahci-platform.txt | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.16.4 diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index f495774c8af9..aa6f4c745097 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt @@ -50,6 +50,14 @@ And at least one of the following properties: - phys : reference to the SATA PHY node - target-supply : regulator for SATA target power +Required properties for: +* allwinner,sun4i-a10-ahci +* allwinner,sun8i-r40-ahci +A port sub-node must be present and linked to a sata_phy. + +Required properties for allwinner,sun8i-r40-ahci +The reset and ahci-supply properties must be present. + Examples: sata@ffe08000 { compatible = "snps,spear-ahci"; From patchwork Thu Aug 30 19:01:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145572 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252160ljw; Thu, 30 Aug 2018 12:01:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZf8kruDPLmUE/BNmKv3p6LLXt87l5y+ppqK7Slegyj9QDcWJM5XKlJ+Z88qTJJgrC5eLFh X-Received: by 2002:a17:902:24e1:: with SMTP id l30-v6mr11546410plg.315.1535655703706; Thu, 30 Aug 2018 12:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655703; cv=none; d=google.com; s=arc-20160816; b=PC0qilj2p+vLjXRm7ZpZn+3mVJqZZnm79nQ6HH6RpDcZWRp/LFAPPPImM7kiBx7SLs ZIfbgSWzkUXOZ6O3WZmuixcFe525wBqWP0THALqlxkBqSulfEe3FYlaFcln+DBgHg2E0 QQ7ge43jwxQea8FQVVBjyHLCnDhAk1FgS1HM0ip6QWTwb/4qtq9fMIEDV3IjjYolefaP K6kkFOZHmHDTYsnt/n7f7s3NMIkU9OtMbFnDqeQWIb7WHE8z6HuHEpN2o39RI1XHIjOU 5WGxDjRIiCaPOAN6XFA7zSvzpx0zgRH+RnnnuU9iDloExQD6udgOJpddbna9gMO54gop h5WA== 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=I+V9O+J09+ESFMr1dY4PF7vqVL3mWhx37+fApLNutyc=; b=Qy0JhpdOKDCrw69gXdYIbLw1HbSpQlSXXG8RdzXy7f0ZvksDY/Uey4V1clgXjwgGQA Y9SlnXp4jfGauZnP+FLmt6icov0w0Fkdy5ggOoh8q0LviNQMieP19e5/C5Orb/ZE1uJX J1u1Wz+j7nvlFSINHCZf69HPl7trfmTv+DeDxzpvXV8OqX/w/qQeIp/rdI7n+jDfS4CV Lbb+8/m38NM3dMNAuGP5goRlV59tsMaUUxQn2qwK5hTtJHw3wRVUuDimm9QC100aQe6B We+D1e8n5807m82CLlfZDfpQKvUOTcu+T9iFelDXlQwDi5PTpT0vCvEm8j8Gcm7lFUXz gw3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fx03mtGo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13-v6si7127973pll.337.2018.08.30.12.01.43; Thu, 30 Aug 2018 12:01:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fx03mtGo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbeH3XFR (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:17 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37606 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbeH3XFR (ORCPT ); Thu, 30 Aug 2018 19:05:17 -0400 Received: by mail-wr1-f67.google.com with SMTP id u12-v6so9003265wrr.4; Thu, 30 Aug 2018 12:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I+V9O+J09+ESFMr1dY4PF7vqVL3mWhx37+fApLNutyc=; b=fx03mtGoum4+HwhhL/qhLqWiMq2R3CtQ7TeNNIDZbgOClIfZjN6In/lQFO4q8v2Dx4 jHy+JTHn1DcGr0fkWTXr1AtZdxhgPOuZItd66P/9T8rrft3xH6RDlLBGnCeq5g6Cu5NU jI9MbHnAXSTK9CLI72ms/8qk/Mw/DhfqGJPjUoR5uNew2tHoL5kcKNBUXuC3m0O2M8yQ 4QrvnQMWRONF2vI11Ngv+i/1LoF7+Q+koYCS6KJvc2lTENxT2ubMwnBoJyjL3qYkrSvb Cwzxz34Q0Sndhb1djxVkEDfU9qCmQIx7EIm1PVqZ37KUWL+tULALWe5pVAEuWsyzezXl uXkw== 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=I+V9O+J09+ESFMr1dY4PF7vqVL3mWhx37+fApLNutyc=; b=DqlWC29Kfoj/tGUDoFRckhpYHgbyUl0nNURSPHs0QAYYCL+vGcFJYxLiK1mFku1UM4 Y6ycXrdBFeVy+T8wWjZ17seIgPc4dH/T7u3XKeqhOrJAeLoDeeZn0mFjyQNH89Lr9Rfx p/FJhMz0geDcSfulSOhRe7dxei9sp19cI8HA7+nOxe6dTokqKYMuT1DDuHQcGO1P0w3v 4noZDkHNiFm6uEm02nzz/s7Qq6JE9m/xUCt8XVyEkIWN1rlr5iU7oIq8OSewC+TebIYJ AKZY97zN/giUxOFaJk77q51gRLFYcRIuo9yodOP11Y+a3ngkUASjD6YQVVwO1XfcQuIx 0l9w== X-Gm-Message-State: APzg51Az+yktSpq/QivE+HhcBD4wZfN1psxi1WH+iTpCIlk+Twvgohgw iGurbB0pnDRg+Qbx6lSz3aA= X-Received: by 2002:adf:f24e:: with SMTP id b14-v6mr7929996wrp.184.1535655699445; Thu, 30 Aug 2018 12:01:39 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:38 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 07/13] ata: ahci_sunxi: Bypass PHY init when using the new binding Date: Thu, 30 Aug 2018 21:01:14 +0200 Message-Id: <20180830190120.722-8-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new binding split sata in two (ahci + PHY). ahci_sunxi must not mess with PHY when the new binding is in use. So when we detect sub-nodes, bypass the PHY init code. This is a temporarly workaround for the period where DT and ata code will be merged from separate tree. When both new binding and PHY driver will be merged, a new patch which remove all PHY code from ahci_sunxi.c will be sent. Signed-off-by: Corentin Labbe --- drivers/ata/ahci_sunxi.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.16.4 diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index 631610b72aa5..a09d189c6dda 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c @@ -96,6 +96,15 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base) u32 reg_val; int timeout; + /* + * When using the new binding, the presence of a sata port node + * means that PHY is handled by the PHY driver. + * */ + if (of_get_child_count(dev->of_node)) { + dev_info(dev, "Bypassing PHY init\n"); + return 0; + } + /* This magic is from the original code */ writel(0, reg_base + AHCI_RWCR); msleep(5); From patchwork Thu Aug 30 19:01:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145578 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252875ljw; Thu, 30 Aug 2018 12:02:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYSOnR81WaZ0+YkM3GlKVDLFD+75udW+fDTRkq/OCE3C/Gw8IgksefeG5r7y2uytBCuS7u5 X-Received: by 2002:a63:5fc8:: with SMTP id t191-v6mr10962765pgb.183.1535655732567; Thu, 30 Aug 2018 12:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655732; cv=none; d=google.com; s=arc-20160816; b=HOFnrrxJ8cpg2emLDnuDn5xO0MI5khy3fTfxYOpY1W+ryp/dnSNGzULDKgSU3ViQCu Mp55IXgkNm81FYC5AhE0qVsE9PYWxeNBh8UJ8y5Ftp8P+wE3YfOtr6DLjJoPKentGgdh pNLd4BATHnjLSQ3vsL45wN63NW+FhU+9+r2e/rBspI8m0SSG50JafmnOR/+kumDt3sNE pkI5lydUwXKVRf40XcH8hA39FITISSqmIxMCJDfZ8ryBhuwuS9SzM5PxaE0y3Vl4ArWQ mAR+7MRgv8htjOQU4m5HVfUGXSlovCK9LiHo8/7J+ZWXzAkGl+vcC0czeAyxwKO4luIz OapA== 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=uNj/VFnQ8ClUwahEmW/nsQHB3Tb5wCIwIO0nNsAKcxw=; b=EPhILZPbpukbuUqfRrJYLWe/ab6w5Dn/a3fR9qSFSRwcxvFzhHXbbYtTXcRWIqPuHQ UHirc6ic+ViCmc+c1InyBhZbOhwU5FvZWdbUYxmdxpZ74fEIuqcFS1pa1s8tj8t8jcD/ AnFP5qejwPv/rw2XgYbyJFKGpA/aFBkT2xBGHUxndbSY3nmnY2MQF9enZF7k0f3Rp0Lm kOZ23dOwMlsabBYbl70SawQviYdNRPJUBOOuNYETHhu1TeuTDx5vAXwY/pwr15t15u+u jZbfFMRUSNPlDCqFWZ1eY114X1WHyueX+EwOQxniOlKljEJ65oGRbjkWVBkzO0jFrUBY OLyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FEZwUB3M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d41-v6si7063967pla.172.2018.08.30.12.02.12; Thu, 30 Aug 2018 12:02:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FEZwUB3M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728162AbeH3XFU (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:20 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42210 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbeH3XFU (ORCPT ); Thu, 30 Aug 2018 19:05:20 -0400 Received: by mail-wr1-f68.google.com with SMTP id v17-v6so9022741wrr.9; Thu, 30 Aug 2018 12:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uNj/VFnQ8ClUwahEmW/nsQHB3Tb5wCIwIO0nNsAKcxw=; b=FEZwUB3Mxqu3I2HveWXbgjeeLpkCRzAfpH7tKqoRBFDxUFALUdOmJ4mWYpohlzglL1 NtEPtxVQfhGjdM/CgpeFwYO8ZSDEvUsU9Z1hJhzfnruafzx8KtC55j1PbodUkPaxxyio //Erxs96nnV61D7JlMgLX601RDgoZ8V0wxuQKdPpX4/C9EUoXS5ByDyyLDnBZwH/Z8pR w16fSJ2+B4KZnXxPHHlKVSbF/D62UlGX12D9upR2ERu+VDYV5hkMxM329J8KOujbGLN/ maPOvYaQRyk0huvmRJe2crxeM4aCoNkW3CRCJWN/FhdC6x+/eUakkoRCY1N/mABWU9h0 8oUQ== 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=uNj/VFnQ8ClUwahEmW/nsQHB3Tb5wCIwIO0nNsAKcxw=; b=uK3SAXtm17QfWR9hJ6x/qSRHdbGmmYIbPutp8MWyLtWjwKJd0oOF9gyi4fXjoP1wdn YI/dI69xF6o9ehzxLgWeUbW/pvdZ9CUhx8MFyISmGhvgFRgHPOZzlacujlAyN+4khWvS LPCULDXigdz8TSVtdRDlMDHB/bcD9EquH4nscoSIaGqAx5ZrvWFFgjPaBx6LhrCAxYU6 SZOCyQfcLDkpKT/FP3RfIENyAiRICvNokUlfiC3mPhZjiaTA0P2mRMkhJgTNOeocsDf4 n9TtQnLg4pnFUMge3qw2l4nJEgSiY2nf2y7ah4ETNDHfM3lR0sXY5b5TtfpvX9gaKFD/ aieg== X-Gm-Message-State: APzg51BrxhrYGR2O0hi4mC3/UmZ+yOGlxyTEI/PQSs0SF6XGlI04+DRz Q4YH8C/A6V2TXqfHD1FBFsg= X-Received: by 2002:adf:a602:: with SMTP id k2-v6mr7952700wrc.181.1535655701025; Thu, 30 Aug 2018 12:01:41 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:40 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 08/13] ata: ahci_sunxi: add support for r40 Date: Thu, 30 Aug 2018 21:01:15 +0200 Message-Id: <20180830190120.722-9-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch add the r40 compatible to the ahci_sunxi's supported list of compatible. Since R40 need ahci_platform to handle the reset controller, we also add the new AHCI_PLATFORM_GET_RESETS flag for ahci_platform_get_resources(). This has no consequence for older platform (a10, a20) since the reset is optional. Signed-off-by: Corentin Labbe --- drivers/ata/ahci_sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.16.4 diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index a09d189c6dda..b8cf3a1be80b 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c @@ -190,7 +190,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev) struct ahci_host_priv *hpriv; int rc; - hpriv = ahci_platform_get_resources(pdev, 0); + hpriv = ahci_platform_get_resources(pdev, AHCI_PLATFORM_GET_RESETS); if (IS_ERR(hpriv)) return PTR_ERR(hpriv); @@ -259,6 +259,7 @@ static SIMPLE_DEV_PM_OPS(ahci_sunxi_pm_ops, ahci_platform_suspend, static const struct of_device_id ahci_sunxi_of_match[] = { { .compatible = "allwinner,sun4i-a10-ahci", }, + { .compatible = "allwinner,sun8i-r40-ahci", }, { }, }; MODULE_DEVICE_TABLE(of, ahci_sunxi_of_match); From patchwork Thu Aug 30 19:01:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145573 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252218ljw; Thu, 30 Aug 2018 12:01:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYGkvTrl7vAd54sOUxpdwLVt2Cxbsj3xu39HHWMvgMK//Rz5G+y4yuOQYxlEGflv0GEVJfW X-Received: by 2002:a65:6292:: with SMTP id f18-v6mr10774655pgv.85.1535655706900; Thu, 30 Aug 2018 12:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655706; cv=none; d=google.com; s=arc-20160816; b=CtSKz8/sYJgujcl8uziPipCC1hhC8yhrJfmwjb+bXjbkyBttScw8V6QfzCvvnnnAIq L5ImNjpzryxh2+3+b7IxTceBEP2YD3qGvu+iGQvft6ylqbS9Nm1omf6QZ1BrI1YcIQYo fTdJPlAZuwLjxlumYviHgP6pdPah7jDyFZ5Gd9cHQfcPpa+8SNhtEg40GrhbvHhzeVmq dNehmoG8xlKe3BS5V/bhk4RrXy6vb+LEh2YqrJAht911BLOxVgIZs/prwbGpt96akYBh ETEO53P4U7X5botowQGcsRxje96byK0cM33sVGeROA8E20UvmC+Vu92xsLAJBfG5IWTO +EvA== 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=qpn+V0z5TaoK+rCQvEV6gj7EtBpctPHnnDY7C6IV55A=; b=dA8sUBCGwHgB1ZMzVugYOHMAs5kNmZDMeLnX5S6eyxmjccjyTNmNHvGGYw9NxiaiyC TcW1JymBxIMsjpvkn2Hn/wc/43Xl8qgQXxpv8PGMSNCgub7fJIYWct4pamPJDz8BBdio E3/qTF7cRE6IzbUOhSSBnmLzY18oUXCfwt8SKOFWJ60krDs5WRfwDk9YJrvZdPy77XB+ QVmEMzvcaqagoaw5fCbgXBE8YADfDUr8/0GZMxZYuRuYhhhEGTAsFOUT/Om8QGU/J/4E PALKjbPEugi2Dx2opA37naR3NFyqvkbXWsiGRBMnkVQZyUGof1YMB5AWz5bv8oT6EmI/ ouUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="MKu/E/VK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59-v6si7116114plp.87.2018.08.30.12.01.46; Thu, 30 Aug 2018 12:01:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="MKu/E/VK"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728220AbeH3XFU (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:20 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:40396 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbeH3XFU (ORCPT ); Thu, 30 Aug 2018 19:05:20 -0400 Received: by mail-wm0-f65.google.com with SMTP id 207-v6so3042557wme.5; Thu, 30 Aug 2018 12:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qpn+V0z5TaoK+rCQvEV6gj7EtBpctPHnnDY7C6IV55A=; b=MKu/E/VKoTesFb4kDZjoXvEWLAK1SkUckVuiZ0xKt1zIFShbUEFE8aXAGfqIMlUeAq vsDkhu7VV9xNPStOe5WBw52JEN51Jy6u/0X7neLjIqRNfzElirChtpRQwZgogweYjLME 3r/ktmQC5RSh3lidLvcKbCL7d+IKD1KRGnKOPa7faD/wI1COTLegDW1XjIKa8tUrwp48 Yc6Mx0DLWNWBSKeplX956Om2LAem1kozSaBVRGaOkeFUQzQuLVpWc93Hd5rLuJ69R5bp DcrOMRjzhUulVPVQmIdE/ygC91NvzHT6HUj1dxf2G2Flqh6+v6k4CNAitJ/3U0Ce+kxe XlEg== 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=qpn+V0z5TaoK+rCQvEV6gj7EtBpctPHnnDY7C6IV55A=; b=Tnlpj2tj+uIQ5vGmVa+IWAs6WsqJg+QT05bqxp1CaXxJFUty7JMRSmjbyBRC0+7BQZ Qzn4PQ29szpCJ7UITyAKn9EWMr4GjjH8gtiQ5HVLOyM7p85Rq80AiYMgrt2suRwTRrkf a8nxMH73ns/VMFJBCRY2ckVn9yOd5JWkiVhiaZ03raT4PMUFU6kUne05IxR6uRbcduzA IlKH50jaGVkKfEkLlnhN2Pdc5ElMICcqNywhTyvkV5a3KRavBjTIU4pgbB2C1Zm7m3j9 79euHE0ZLHS8DSD/M2famgprI4FAMYATTvJQTtEqzDVOFhWkp/IiHgcb9UPw+f1nhnxc b2FA== X-Gm-Message-State: APzg51B8ljl9ihn4quEDmFgXuQcjI3NG6+0Y2lWgzXU9E26npGzE3WWe I7zDSmWbwqBfZmccWwFAITQ= X-Received: by 2002:a1c:a401:: with SMTP id n1-v6mr2828082wme.125.1535655702588; Thu, 30 Aug 2018 12:01:42 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:41 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH v4 09/13] ARM: dts: sun8i: r40: add sata node Date: Thu, 30 Aug 2018 21:01:16 +0200 Message-Id: <20180830190120.722-10-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org R40 have a sata controller which is the same as A20. This patch adds a DT node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-r40.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -- 2.16.4 diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi index 852c2ccc3268..d6b5820da850 100644 --- a/arch/arm/boot/dts/sun8i-r40.dtsi +++ b/arch/arm/boot/dts/sun8i-r40.dtsi @@ -550,6 +550,29 @@ #size-cells = <0>; }; + ahci: sata@1c18000 { + compatible = "allwinner,sun8i-r40-ahci"; + reg = <0x01c18000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>; + resets = <&ccu RST_BUS_SATA>; + resets-name = "ahci"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + sata_port: sata-port@0 { + reg = <0>; + phys = <&sata_phy>; + }; + }; + + sata_phy: sata-phy@1c180c0 { + compatible = "allwinner,sun8i-r40-sata-phy"; + reg = <0x1c180c0 0x200>; + #phy-cells = <0>; + }; + gmac: ethernet@1c50000 { compatible = "allwinner,sun8i-r40-gmac"; syscon = <&ccu>; From patchwork Thu Aug 30 19:01:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145574 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252277ljw; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY7rK2NFnDguVE7u1HZT+GiiOPs/aqYaqraqYBoBZmh+R/9dNcBDS/gK/CRh3cfr0mmml37 X-Received: by 2002:a17:902:900c:: with SMTP id a12-v6mr11533721plp.61.1535655709170; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655709; cv=none; d=google.com; s=arc-20160816; b=pogA8Bx46zrtHObkjx1XQGY6ACuoHwg8QQTaSG3r2yuPJRcU7jx29QdV8t2Pf/9g24 ZklfgxF2YE8TOywQHoyhnY0+dMqQLsN1ZpWKalfj00bI5w8ivf2B+fSIR7qdARlR7Pl/ eLG5VZZYlYxOBvgvfcE+Vzt1GhKw7of1M+EM4hzFHVtzHy2Hy/u3S6ersVCxNi1Wm3G0 ugmKktCCSRik2riW7BI/Laia5xriphBBwiF+dmHWTSpWO7YvTA9LXSHz+8hRYmyjfiE9 yik5YRZLc4IAmQabrfCBX3a9dhmlcDECOyYxKh724sTxAaewcCmr69ArIZJEvnUpC7I+ 9THw== 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=fVq+dyrEA8MCEaUSG6+R2JFZagictW0kEMK0uBAAtGE=; b=nd4h6zcoVUYZDHp1Ch1ua/7xowau4LNOzi/JiDr4n6PV3+J583f9zN/k+b/CWezwGr VVzlN3DDsWcthYBcCjtGBpq98CeFmdi1TKMFOmu4jydzJ+ITuGCqevPBnisk3lxJio28 ES9Zw3xrI73VAHP7zYERCPaCs8dI8NsIyHOy7hepfFCB9yh/O1Wy5ivcWLEW3t6ZZ1Bt hg+Zj8Wbu7/H2lipsf8d5a4fuaRh1ASsDZEVKTJ63KDZLsswIohMXc2lecTrwHQZA2Zd z4kdSH8gHsxmASy6C3pEU5TopKumx0sgfmNlJ3v35jGdvLFUpanUuqzIhj+viOdwhTqW XJBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Is3j/ums"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13-v6si7044854pgg.346.2018.08.30.12.01.48; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Is3j/ums"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728281AbeH3XFW (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:22 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:50975 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbeH3XFV (ORCPT ); Thu, 30 Aug 2018 19:05:21 -0400 Received: by mail-wm0-f68.google.com with SMTP id s12-v6so2999271wmc.0; Thu, 30 Aug 2018 12:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fVq+dyrEA8MCEaUSG6+R2JFZagictW0kEMK0uBAAtGE=; b=Is3j/umswbTely8NDeJXc6Ld/wz3HS6kpUDJMjL5/S6IgkLNI25iAb45sJojElciI8 1WdteNhHdUipNPzgpvijNRX40X+ooAhYRxfRKKxLFLyd8JwvqA1XZ2oNb7uZdVY+1xXI i4vX6TWqMbi1dGAh7xY8ttM+ZK+JzQ7VjFkbdpyki4PLUZHbBP4eChr6irZkg4kW+vFK 3HAl3LXdHxEYtfq7ToE17kDSdvkTtltuBxEmIJdCRvtJiEzLdZvCmxzkErDAI8byCW8t Kg7ChUAfILeMdZN/Axr8QgiP2EHi9IxrBvWK7YRl/n8DpB5WsLVQmHKGPp2/olT7n2he 2LOA== 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=fVq+dyrEA8MCEaUSG6+R2JFZagictW0kEMK0uBAAtGE=; b=AvbQzOBIT2Ez3hHBPAH0T2SapfJx6mqfCbTPmNcNs8XrrRPMmwsuNw4s1SwRsPS3Yp WWh6eZwxzIZ5wUbTOxEM6jFKO0lw5/QJhlXAbHDcEGZMcyY1N7ld8uYkFIEWr9W8kYVo eYdAfdiURR9nP7wyCmEtoGeDmriazZ2jIulRv98brrS9gl/L7UYKYK+s+/FVtBNfN2JT e7nVb7fFRRAbCmWpsCV+GrYIilM4o1qqlMBf8KkwLh+GMeKBIJNceqHa2oUAygcguinY eqUz/pze/9rjlgfDlqmcjEFCpxdBKmH8JnXwtv1MoF/9s9A33esGFuI35MAYTqrBN2QN 9fgw== X-Gm-Message-State: APzg51Cmk38fBuUKGHfqQOcDuDeYOf3S6HRl25gxegysmjovsjoeinW4 Bx0u8JGMfEs45RPBoVFDSDM= X-Received: by 2002:a1c:c7c3:: with SMTP id x186-v6mr2653722wmf.109.1535655704028; Thu, 30 Aug 2018 12:01:44 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:43 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 10/13] ARM: dts: sun8i: sun8i-r40-bananapi-m2-ultra: enable AHCI Date: Thu, 30 Aug 2018 21:01:17 +0200 Message-Id: <20180830190120.722-11-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch enable the AHCI controller. Since this controller need two regulator, this patch add them. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) -- 2.16.4 diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts index a891a387e8f1..b991b635c07d 100644 --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts @@ -105,6 +105,11 @@ }; }; +&ahci { + ahci-supply = <®_dldo4>; + status = "okay"; +}; + &de { status = "okay"; }; @@ -250,6 +255,22 @@ regulator-name = "vcc-wifi"; }; +®_dldo4 { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-name = "vdd2v5-sata"; +}; + +®_eldo3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "vdd1v2-sata"; +}; + +&sata_phy { + phy-supply = <®_eldo3>; +}; + &tcon_tv0 { status = "okay"; }; From patchwork Thu Aug 30 19:01:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145575 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252285ljw; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaY/jrAQWxBkGaDtbyVmXfHDc/LqGOAq4l6lQnnRjD2TbErThRIIFuDTVomCNjid9kU1ddc X-Received: by 2002:a62:1fdd:: with SMTP id l90-v6mr11601013pfj.121.1535655709651; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655709; cv=none; d=google.com; s=arc-20160816; b=piBv0sUhFj8srSMSzE1qP9jADsKYkgqP1MDXLa8zbzs4HV84Rxhm8gf5oQQRGP0Ait zFjH8yHKmTjZ558v5J0SIv2YMBDJCd8YoAAA00+EMfu2kvo0pGzqtyTpGKgN4fSM8O9N qspSYwjt/mv5CsY4JbLjDJJa6XkA3+jl7zTcLF+jT2keVoyLFBuyG5UXwJEzg2+rEy2M 8RDr8IGZlR77mZqupzRtjCx2exLiJkJRz9E3Q7NVxfg+nU4JNcKliKaHi058B/4cfDsW AFCuo7RfcNznFVd9AnPGjWib67QLTPmCoVLv7Xh740RbjV+kfRUI0hNUf9At/oTg8GGB tbBw== 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=lYF4vw+H13TqDhRHDPAO494ldTC/en088YlLmd8H0Lk=; b=XR8JJArm3XIcXlxcAA8KvdztS1noOiQvBrly4+4+CBSLu+NuOwo1Rc+3GktZy5TSej Ytnry8FeXDNmgSNkY0LOIL8Fo7QaB4ElROKla1WdxpXfBbDxIRT9NU+0VpbSNFTFMxxd w0iZswYZT48yies+gjrCknzsVAEdIYy52yYLG+eN9LVXoNXrFpP7/P1kEeiVGOErZnkT kzJa2FgMtXksBgacDj7tcNyaRRu8uQSck3tiZg/RkDBULwb/03EyGJDRbg4m5X2yrKyn q7ngu6CvQmb2YCQHXqj/ehlhMHp5+s/Mnk3qttKOx8UFpLU3ciru58aIxmC9mqgYfZHe jJ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qi9dUqFQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13-v6si7044854pgg.346.2018.08.30.12.01.49; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qi9dUqFQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728328AbeH3XFX (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:23 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32860 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbeH3XFW (ORCPT ); Thu, 30 Aug 2018 19:05:22 -0400 Received: by mail-wr1-f67.google.com with SMTP id v90-v6so9031855wrc.0; Thu, 30 Aug 2018 12:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lYF4vw+H13TqDhRHDPAO494ldTC/en088YlLmd8H0Lk=; b=qi9dUqFQ0tN5DJbV79V9Kio4t1mQfMyfMCviV1Nr9GRk51JH8S21uNzT+UoVRXvK7S EdG2YCFNWtMJ01um9n/4TztLeqdxY//dsKd+1m17PNIH1pRQLBW60hjQVRC/dnyHMf/I pzWhHymJLuimSDBzx4o7s/GHCXojDNuXzwgo2eI+7+RJsj+VnaRP8w/FiQwexS7AfXVM cTUXI8MWvmumb4CfwwmRVbDBQbwgtV6LihGBELT4NreQLhK1wwdIJueXwK2lef7zxe0J 0Tgccu6YnV6W1WGwiZzD0PGfL2Fuwji+zu6rhLxGF69tzdtyW9TQsRKDvrbTnalgIXkY K3Ug== 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=lYF4vw+H13TqDhRHDPAO494ldTC/en088YlLmd8H0Lk=; b=nmCa3sPP7cDIi2ttDmjq+fbWBgvFNjnS7oogt6ZEeS/HLcJihBmEwv4j/muwHDsq1d zky9Pq0lbi31E6bQJ+EydTjInTxTQe3WTeRIXKYa9v44eXzhHq6AyZwhej6xx4RAstS9 Jr9pzQ02oBeXMB2DuwfwPtnIvORSAOs3sRagB8k6i5klmE0gUbbArfhGV+uPXZ3+W5HR g12h5Swihw91wJAU/yvM/gqNf6zUZsAAVlUZ0PjjpoL0/C9/YxAGmjVqdlWuoXnYXo8b 6tDcW4LzuS1AnBXvRMfw2pnbHm2eX6upraHozP+tPbd1mgXb1ljsDiRMsB0rGAw4GLqa TP+Q== X-Gm-Message-State: APzg51DAWxic4ii5LBabNQOK4COQoR6pCfrKnsDk50Jb43EjbBPcG9r1 ddrgkdIEWjmsJUZq+X1hpB8= X-Received: by 2002:adf:9e06:: with SMTP id u6-v6mr8392154wre.51.1535655705436; Thu, 30 Aug 2018 12:01:45 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:44 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 11/13] ARM: dts: sun7i: a20: add sata-port/sata-phy nodes Date: Thu, 30 Aug 2018 21:01:18 +0200 Message-Id: <20180830190120.722-12-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch convert sun7i-a20 sata to the new binding which use a sata phy node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun7i-a20.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.16.4 diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 8f7e1e29841f..8ff28f7afa85 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -667,6 +667,19 @@ interrupts = ; clocks = <&ccu CLK_AHB_SATA>, <&ccu CLK_SATA>; status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + sata_port: sata-port@0 { + reg = <0>; + phys = <&sata_phy>; + }; + }; + + sata_phy: sata-phy@1c180c0 { + compatible = "allwinner,sun4i-a10-sata-phy"; + reg = <0x1c180c0 0x200>; + #phy-cells = <0>; }; ehci1: usb@1c1c000 { From patchwork Thu Aug 30 19:01:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145576 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252329ljw; Thu, 30 Aug 2018 12:01:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbIWWM7HsdIXlNdlln0XMtBA++b1fhCr0xyn8b/BaV/ZllV7XPOKj/vxiaWsEBuXFnkViLl X-Received: by 2002:a17:902:a507:: with SMTP id s7-v6mr11154810plq.303.1535655711375; Thu, 30 Aug 2018 12:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655711; cv=none; d=google.com; s=arc-20160816; b=EksNixGsjvZHi40U+jmYyAHIot/+aEsdW5gRQ+NOVUAlmzYnriyKx4uk01NaOzLoWX b9f+z6f2nt8UfJglQNZoa1WiBc9iRa3s++HarZE2Xxj1cxGUOejhowG6Lp7fKpK/owlN 1rpP3j1jT7Aj2sXuIGaPf24E9NqxZfsJhO6jTh5TpdVbjY9T+cjGl0cAWa6tMwDPefZg UybN1477lKB2Xg+ki9qDTU4g1GFDK2tP/zd52wHJ14M56v2KvaPOMl/Nqrvr+zOQEUaj 0hhSQrmmRt+PBTJ4BJH2qJsjcFLC+/X+N1Jxxy9JBOJXjSBmrgKzWQ/lcS3lJ/A2EQ3O AtKQ== 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=/Tdxgkt9CvsMDffYgLZwCBYAMe31gzmLe/ZAbH0KQ5c=; b=eK4O7OhzWfcdrDuOdfhFEWJKSS+qFHdLdYUS3nQ9omlhfQiKM+OB4bDf/fIZ0NXSTr 798cqZlxaBeaKu8v/i35RdbU41l1l+PDJeHaFwJCg2cDowMK8v3MhHQ5mKq5PHsRT9Ng OGlvn8R45pAkT3eCrmCeUVZIAk37XDxD4TNxEpk5LmUBGmEhyGXVFjy+mCJ3QV2LVul7 BoYYkAWgCMVpMyou/Es9GZEziLeY3tPrLWRjoxjwjgTbRY8yIU/3EiqHPdy+FmQf7oKv kq0FKM3DgMCBV8FHiWdyNkMLEH1N8R+8Gnn8HW0SsHOuRN528dMlHA5LRJr77Fi4+W+C bAaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bdVcOQBh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j124-v6si3724030pfb.191.2018.08.30.12.01.51; Thu, 30 Aug 2018 12:01:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bdVcOQBh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728359AbeH3XFZ (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:25 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37614 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbeH3XFY (ORCPT ); Thu, 30 Aug 2018 19:05:24 -0400 Received: by mail-wr1-f68.google.com with SMTP id u12-v6so9003549wrr.4; Thu, 30 Aug 2018 12:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/Tdxgkt9CvsMDffYgLZwCBYAMe31gzmLe/ZAbH0KQ5c=; b=bdVcOQBhDKg1YU7EuaVN50ehxdx8lwubQ6N2NC1qOENkXiSnFjX6M95te/1JvU+DLc 5a9zj1tpIOzhcGIo5rcHAANACJN2T/0abHljawknikpjNiZgqrWwDVVTvjszntiMm5BD nr8TFwV78fCiJ5XJYEKzG+ImdbIFI+lvLnad2pQb3LUcrxMiYkvB1lreOe3CENHZi6G9 QqmxA1JB9od6d39rAQG/4G0ZJpRZy333jdIGKxYUOjvTU7oWQ3H9q1eiY34H7VlyWRge zZXsH+vXL5OPCSozU+fiM8uHaw5Mssn9TGjoA6q+dcu6eeqG9hvyg5gBhnXY9mCGMCoV LlIw== 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=/Tdxgkt9CvsMDffYgLZwCBYAMe31gzmLe/ZAbH0KQ5c=; b=aIVvlM3vV1Fq+xtPqAPTysnLUb35HeL0O57cV7w3hHH5kpAduH/0uzG27CnMan4EHn Atft3DmR6B5v9I0rKyp9I29Clx58CqPaUqbqE6UbzXXs692L6xLFX1t2Bo4TmpCUI5Qu m+TemfgCa0AplTeoBmciuD8QF8P4PR7CmzxjLuDsoBGCmL25PnhM7VuczPMu9EkqMS2N 87oqkNGtpJ1sqRT7tgkOY9e1J09g/7GSGOVE8nrGyjMq93HZ+uVzunj3JkdWG2ZYFN29 HE6cHqIumPW12Diu5/Bh1D3s6cFsdyLVBMuDc9qgYfMRWb0P9elJLMB1/dMiETdNmTKd DY1A== X-Gm-Message-State: APzg51A9JWgz2zbvOpCSzpBpmDpDbF+Qa2Lx+Uoi/TCaiql6q4w3t+Nl 4tfPn06g2ydzh/o200fQGgE= X-Received: by 2002:adf:dcc1:: with SMTP id x1-v6mr8674417wrm.21.1535655706835; Thu, 30 Aug 2018 12:01:46 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:46 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 12/13] ARM: dts: sun4i: a10: add sata-port/sata-phy nodes Date: Thu, 30 Aug 2018 21:01:19 +0200 Message-Id: <20180830190120.722-13-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch convert sun4i-a10 sata to the new binding which use a sata phy node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun4i-a10.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.16.4 diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi index 3d62a8950720..52d5c2e79499 100644 --- a/arch/arm/boot/dts/sun4i-a10.dtsi +++ b/arch/arm/boot/dts/sun4i-a10.dtsi @@ -556,7 +556,20 @@ reg = <0x01c18000 0x1000>; interrupts = <56>; clocks = <&ccu CLK_AHB_SATA>, <&ccu CLK_SATA>; + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; + + sata_port: sata-port@0 { + reg = <0>; + phys = <&sata_phy>; + }; + }; + + sata_phy: sata_phy@1c180c0 { + compatible = "allwinner,sun4i-a10-sata-phy"; + reg = <0x01c180c0 0x200>; + #phy-cells = <0>; }; ehci1: usb@1c1c000 { From patchwork Thu Aug 30 19:01:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145577 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252387ljw; Thu, 30 Aug 2018 12:01:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZLSQ57sz9sHngNLnSts9w0ljrz4uEySBfHTLfnqT1TRqfl5vbpRSSbb7IVjv859vBPPWpN X-Received: by 2002:a17:902:8d91:: with SMTP id v17-v6mr11767288plo.9.1535655713968; Thu, 30 Aug 2018 12:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655713; cv=none; d=google.com; s=arc-20160816; b=YVMH/E3z/LiX6mGXpcx0iBQw5Qflk9U0QEl9uSXtrl+qo6a8fjChT68srVa8dRy5Xw Jt3hYUeZPPEar0fFlm6FKUtKSpYaYzXmRGyR4tYo99mjkUky+W9CIFxS/Gz2xN17yQSd 0lD4YfprRPL/T81TQISMx9XWZDHRM4bA6Y6IaOueDDb5gA/xf18/RbcfIlOo/goXKZDN K8Hs8M66F+EQf0tseGLUmWKIUT/qTmaBiSi3eKY9NmEuvcshreC2PYadOQsljS0LlPsY Nbih4AaXHIHINerdrsvnfTdlJS0JPJTdybRDfqjh1NrRpsrA8UM5IGUXASMfr5RCMOHU Mdug== 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=oe7h7xIfk8wXHX/0FC9e1cxcaJIngJnxvR4UbXqmMVg=; b=jH44iKzZtOxh7XknzF2kxL6JbiUbFamQFzSBexDNV+SCTHw7CgmB1cnsu/yN9xoSyG HdLudmfVDuFroqOyO6rrRxnRYOA7+o1+OaIleEP9WfVinIyYrkpsW/1NdrZ7abxEeXG/ Qic5Ou5YUCeVDjipCU+1yVSqX74a6xbiaV4xna+F7Xr2qPjWlNjjeEbQWGYE1I7Y0eKY rb97daaAjijIlrXGvkvrex3kNsHUYY/5DUV8hcRGiBI7v1czy8rmqROyZU8AcsezXU2b THDEOgFygIOU28Kh3CZedveS7yJerVPMEqiSN4KHEUtKmMgvyCHch4G3KcbC0UEomN34 Dm4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q9uev1PI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a93-v6si7527920pla.277.2018.08.30.12.01.53; Thu, 30 Aug 2018 12:01:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q9uev1PI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728379AbeH3XF1 (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:27 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36675 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbeH3XF0 (ORCPT ); Thu, 30 Aug 2018 19:05:26 -0400 Received: by mail-wm0-f68.google.com with SMTP id j192-v6so3079409wmj.1; Thu, 30 Aug 2018 12:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oe7h7xIfk8wXHX/0FC9e1cxcaJIngJnxvR4UbXqmMVg=; b=q9uev1PIjkWXxvAYB+XuPf9jmG/C5rOPO9UbUFkMk9LC1q7c00OERutFya7Ett7dCK b8felrkiQocDePiPHvzM8eVOQQGdeB+QHz6z61192uXqDGdQsxNzXlWylLM/ZVVt2qBI SfKEMDy7Y06yF+6n+4I9hzJjV4Pi1BKUqLg2YZE8vWxANnv4b9nxApH3P1i7NDWXErTX /xDlAIaJzNOAjzD/I9ZJXYpyCYN+L1asSoLDJNKSV6mCg6BDN6aeDf56vStIyqWx1CWe BDgcBKU/A2MAq0ZMMRP59BIvsw+v0LBeK06bArreMF8lgXl+j5ndwLJdNc1WGDvUpp1k kJ3Q== 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=oe7h7xIfk8wXHX/0FC9e1cxcaJIngJnxvR4UbXqmMVg=; b=fQqVEO2mTo11PCzvO97hYjk+hhU8e4QfRBP1ZVnsZrMKlJeFgy34M4LMzZfjz05Ma6 oaiC2MmLaZPkN7/9C6HP2JinjUO2/sqGyugF/frouIKA59+ZeuY6T8gQ2uZGCebsN2Gp zHTlz4iNhxQ+tYaZj7U7epA05rpuVgx5ENcYhSaQM55i9ioA6Sg40kJGp2U29j4vYXjk 78rn/sYCEvYjBik2celN/l3SDGYAC9J6sUgaiAHg2bc+AFnGFvbnjCvsjnvPKU83BVPd OAWO1lvw/cV2PV3k5tipTbrYZg/fx8X5Dq6sr+IyL4kQAxwym4mjC61SempLJQex3BTo IaxA== X-Gm-Message-State: APzg51Bmtj3iXbOoudW82iTltrMeVUYZg+pGFBjCkkoDy+gl85/3+q2E euk6hfH2fe496BF5vHiDplo= X-Received: by 2002:a1c:dc8b:: with SMTP id t133-v6mr2583188wmg.108.1535655708335; Thu, 30 Aug 2018 12:01:48 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:47 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 13/13 DONOTMERGE] ata: ahci_sunxi: remove PHY code Date: Thu, 30 Aug 2018 21:01:20 +0200 Message-Id: <20180830190120.722-14-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since PHY code is now handled by sun4i-a10-sata-phy, the code in ahci_sunxi is useless, remove it. Signed-off-by: Corentin Labbe --- drivers/ata/ahci_sunxi.c | 93 ------------------------------------------------ 1 file changed, 93 deletions(-) -- 2.16.4 diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index b8cf3a1be80b..af17f8ce65b2 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c @@ -58,15 +58,6 @@ MODULE_PARM_DESC(enable_pmp, #define AHCI_P0PHYCR 0x0178 #define AHCI_P0PHYSR 0x017c -static void sunxi_clrbits(void __iomem *reg, u32 clr_val) -{ - u32 reg_val; - - reg_val = readl(reg); - reg_val &= ~(clr_val); - writel(reg_val, reg); -} - static void sunxi_setbits(void __iomem *reg, u32 set_val) { u32 reg_val; @@ -86,81 +77,6 @@ static void sunxi_clrsetbits(void __iomem *reg, u32 clr_val, u32 set_val) writel(reg_val, reg); } -static u32 sunxi_getbits(void __iomem *reg, u8 mask, u8 shift) -{ - return (readl(reg) >> shift) & mask; -} - -static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base) -{ - u32 reg_val; - int timeout; - - /* - * When using the new binding, the presence of a sata port node - * means that PHY is handled by the PHY driver. - * */ - if (of_get_child_count(dev->of_node)) { - dev_info(dev, "Bypassing PHY init\n"); - return 0; - } - - /* This magic is from the original code */ - writel(0, reg_base + AHCI_RWCR); - msleep(5); - - sunxi_setbits(reg_base + AHCI_PHYCS1R, BIT(19)); - sunxi_clrsetbits(reg_base + AHCI_PHYCS0R, - (0x7 << 24), - (0x5 << 24) | BIT(23) | BIT(18)); - sunxi_clrsetbits(reg_base + AHCI_PHYCS1R, - (0x3 << 16) | (0x1f << 8) | (0x3 << 6), - (0x2 << 16) | (0x6 << 8) | (0x2 << 6)); - sunxi_setbits(reg_base + AHCI_PHYCS1R, BIT(28) | BIT(15)); - sunxi_clrbits(reg_base + AHCI_PHYCS1R, BIT(19)); - sunxi_clrsetbits(reg_base + AHCI_PHYCS0R, - (0x7 << 20), (0x3 << 20)); - sunxi_clrsetbits(reg_base + AHCI_PHYCS2R, - (0x1f << 5), (0x19 << 5)); - msleep(5); - - sunxi_setbits(reg_base + AHCI_PHYCS0R, (0x1 << 19)); - - timeout = 250; /* Power up takes aprox 50 us */ - do { - reg_val = sunxi_getbits(reg_base + AHCI_PHYCS0R, 0x7, 28); - if (reg_val == 0x02) - break; - - if (--timeout == 0) { - dev_err(dev, "PHY power up failed.\n"); - return -EIO; - } - udelay(1); - } while (1); - - sunxi_setbits(reg_base + AHCI_PHYCS2R, (0x1 << 24)); - - timeout = 100; /* Calibration takes aprox 10 us */ - do { - reg_val = sunxi_getbits(reg_base + AHCI_PHYCS2R, 0x1, 24); - if (reg_val == 0x00) - break; - - if (--timeout == 0) { - dev_err(dev, "PHY calibration failed.\n"); - return -EIO; - } - udelay(1); - } while (1); - - msleep(15); - - writel(0x7, reg_base + AHCI_RWCR); - - return 0; -} - static void ahci_sunxi_start_engine(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); @@ -186,7 +102,6 @@ static struct scsi_host_template ahci_platform_sht = { static int ahci_sunxi_probe(struct platform_device *pdev) { - struct device *dev = &pdev->dev; struct ahci_host_priv *hpriv; int rc; @@ -200,10 +115,6 @@ static int ahci_sunxi_probe(struct platform_device *pdev) if (rc) return rc; - rc = ahci_sunxi_phy_init(dev, hpriv->mmio); - if (rc) - goto disable_resources; - hpriv->flags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | AHCI_HFLAG_YES_NCQ; @@ -238,10 +149,6 @@ static int ahci_sunxi_resume(struct device *dev) if (rc) return rc; - rc = ahci_sunxi_phy_init(dev, hpriv->mmio); - if (rc) - goto disable_resources; - rc = ahci_platform_resume_host(dev); if (rc) goto disable_resources;