Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp435691imm; Fri, 31 Aug 2018 04:33:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZGcySG+wr3cgVZ4y3p+nm5LF/hyNYAgbJWrdHMnIOphbiW788UOW+9HMVuoZl/0KUVxvEM X-Received: by 2002:a63:eb53:: with SMTP id b19-v6mr13967394pgk.371.1535715195637; Fri, 31 Aug 2018 04:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535715195; cv=none; d=google.com; s=arc-20160816; b=PYoO44q4uKaabZhy6syD4l7kClpDB5I2cTcrx4ba/w4BfU8wMpv7qAiAdTU+Rn9Ux4 FEZJRejCu1QMM+P9NHltKsCvPVG5ZC2eeG7b9qzyWnZb+mkCp/NGQABtqedVzvRAy3eF oN/HrXJfvCtjr9Lm0r8g8kDfVpYbIEUC0fifWVa7oT8CIrK/5lyoO/uzCb5jLwmDm/nD cyKbr7f4gIdYUKrbq1N0wQVLwmV5EsrYxhR29SxjEUFzG59P+2mx1S+/+c52dtAbfV7+ K4BPQ/IX+GhvriQi9BacIyQiM1Liu1WadBQeGteoA4UutM9OmKnuSt5yX00ng/9owHXO ymPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=KW8GJf+OfR3vh5KT0z9ctRnhW9IhO1vlBZ9ucCcJ3Jo=; b=JnGTVZ8P/lyrOf3ZCE0U/VC1IgCDC/aJfcJEnI5QqrWxRvGh6YVDVF5YB1Auc6RZ7D gHma6tFZBFejTBsW+rgHxgri0CiF+SqeJK+rwKz81xENqj2xlFxeCj5N25jWvcTfkXKv kwlwkLut7adZi0SC4kfikW+2ZXmRsmUAuOzfATOWRhVCew8/izS3bu2i9560jiQsvSSD cCwc1mu9wVER3+yozOHoOBqkW2pU46QBCt4EvM1oHFGiDOq6A2Hi6rLlhoXPYaahOc10 DQEPR6mOmFsepU4IOV7cxpVKx9DwnNolXgRa2IEJ0SOm5dMNa9zjCpFYF7AijaYbhvsE v8TA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u42-v6si9773297pgn.86.2018.08.31.04.33.00; Fri, 31 Aug 2018 04:33:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728112AbeHaPi5 (ORCPT + 99 others); Fri, 31 Aug 2018 11:38:57 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34056 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeHaPi5 (ORCPT ); Fri, 31 Aug 2018 11:38:57 -0400 Received: by mail-ed1-f67.google.com with SMTP id u1-v6so8630969eds.1; Fri, 31 Aug 2018 04:31:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KW8GJf+OfR3vh5KT0z9ctRnhW9IhO1vlBZ9ucCcJ3Jo=; b=UTF9ZRhweWwQqeSvjcdELQcQmCXHCDu2TmR/PVDVdo39/H7abePdOhjansf3rc29lA Pom6NQnuFrz5hP0eYCBUZPzt0rnZQFWkCXESwrUb9P0OyIX6AhtGdoQtJQ1sUAGd2z6O Qdc3kTVPM73BvMxIrTXcJlC2BY6ReShngvvDE92R2hSr35ttrkwNRmHxDcRW3FlmMd12 kpIwtMFF8CIwrIJD1ccbyWzqdI4Pp6seIeGzG6rfcexYmG9lMP2c04wWrlAWxXeFPruQ rST4LP15wgb7ZGdGVZlQc4nQ1vYCYsbA5TPEXbXCt9AzjOzU8RH5TKOvFp6bF7HEfaYL EYng== X-Gm-Message-State: APzg51DrNkyAGnNxORl9ADDfti0WIqrt0P3hY+HUrwo1qcx0JYW78kX6 5KPiCI3MAsmkRvM9e4v8P+W4HJzwO+I= X-Received: by 2002:a50:8d5e:: with SMTP id t30-v6mr17735839edt.256.1535715112189; Fri, 31 Aug 2018 04:31:52 -0700 (PDT) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com. [74.125.82.46]) by smtp.gmail.com with ESMTPSA id g20-v6sm1614906edm.36.2018.08.31.04.31.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 04:31:50 -0700 (PDT) Received: by mail-wm0-f46.google.com with SMTP id s12-v6so4921595wmc.0; Fri, 31 Aug 2018 04:31:50 -0700 (PDT) X-Received: by 2002:a1c:f0a:: with SMTP id 10-v6mr4625417wmp.58.1535715109917; Fri, 31 Aug 2018 04:31:49 -0700 (PDT) MIME-Version: 1.0 References: <20180830190120.722-1-clabbe.montjoie@gmail.com> <20180830190120.722-10-clabbe.montjoie@gmail.com> <20180831073500.zubqpvar4yhjqrge@flea> <20180831075631.GB16301@Red> <20180831102021.idz42sfgldihpkrp@flea> <20180831105412.GD16301@Red> In-Reply-To: <20180831105412.GD16301@Red> From: Chen-Yu Tsai Date: Fri, 31 Aug 2018 19:31:37 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 09/13] ARM: dts: sun8i: r40: add sata node To: LABBE Corentin Cc: Maxime Ripard , axboe@kernel.dk, Hans de Goede , Kishon Vijay Abraham I , Mark Rutland , Rob Herring , devicetree , linux-arm-kernel , linux-ide@vger.kernel.org, linux-kernel , linux-sunxi , Icenowy Zheng Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 31, 2018 at 6:54 PM Corentin Labbe wrote: > > On Fri, Aug 31, 2018 at 12:20:21PM +0200, maxime.ripard@bootlin.com wrote: > > On Fri, Aug 31, 2018 at 09:56:31AM +0200, Corentin Labbe wrote: > > > On Fri, Aug 31, 2018 at 09:35:00AM +0200, Maxime Ripard wrote: > > > > On Thu, Aug 30, 2018 at 09:01:16PM +0200, Corentin Labbe wrote: > > > > > 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(+) > > > > > > > > > > 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>; > > > > > > > > Overlapping devices in the DTS is not ok. > > > > > > > > > > I do the same than arch/arm/boot/dts/berlin2.dtsi (sata@e90000 > > > phy@e900a0) > > > > > > But since it is not a good justification, it seems that regmap is my > > > only solution ? > > > > I'm not even sure why you are moving the phy out of its original node > > (and driver). > > > > For using the phy-supply already handled by the code. > The other choice is to add another xxx-supply to ahci_platform. > Or to use hackily port_regulator for this regulator. The PHY registers are in the AHCI's "vendor specific registers" region. Following that are the per-port registers, which the ahci driver will need access to. This doesn't look like it should deserve a separate device node. What's wrong with handling the regulator directly in the ahci-sunxi PHY init code? ChenYu