From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Subject: Re: [PATCH 5/5] ARM: dts: brcmstb: add nodes for SATA controller and PHY Date: Thu, 19 Mar 2015 12:10:25 +0100 Message-ID: <550AAEA1.5080301@redhat.com> References: <1426728222-8197-1-git-send-email-computersforpeace@gmail.com> <1426728222-8197-5-git-send-email-computersforpeace@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426728222-8197-5-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Brian Norris , Tejun Heo , Kishon Vijay Abraham I Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Gregory Fong , Florian Fainelli , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-ide@vger.kernel.org Hi, On 19-03-15 02:23, Brian Norris wrote: > Signed-off-by: Brian Norris > --- > Light dependency on: > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331921.html > for the surrounding text. > > arch/arm/boot/dts/bcm7445.dtsi | 36 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm/boot/dts/bcm7445.dtsi > index 9eaeac8dce1b..7a7c4d8c2afe 100644 > --- a/arch/arm/boot/dts/bcm7445.dtsi > +++ b/arch/arm/boot/dts/bcm7445.dtsi > @@ -108,6 +108,42 @@ > brcm,int-map-mask = <0x25c>, <0x7000000>; > brcm,int-fwd-mask = <0x70000>; > }; > + > + sata@f045a000 { > + compatible = "brcm,bcm7445-ahci", "brcm,sata3-ahci"; > + reg-names = "ahci", "top-ctrl"; > + reg = <0x45a000 0xa9c>, <0x458040 0x24>; Why not simply drop the second register range here, and the minimal top-ctrl poking you need in the phy driver's phy_init function ? This avoids the weird / ugly register overlap with the phy driver, and I think you can then just use the ahci_platform driver unmodified. > + interrupts = ; > + #address-cells = <1>; > + #size-cells = <0>; > + > + sata0: sata-port@0 { > + reg = <0>; > + phys = <&sata_phy 0>; > + }; > + > + sata1: sata-port@1 { > + reg = <1>; > + phys = <&sata_phy 1>; > + }; > + }; > + > + sata_phy: sata-phy@f0458100 { > + compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3"; > + reg = <0x458100 0x1e00>, <0x45804c 0x10>; Why not simply use: reg = <0x458000 0x2000>, to me it seems that what you should really be using here. > + reg-names = "phy", "port-ctrl"; > + #phy-cells = <1>; > + #address-cells = <0x1>; > + #size-cells = <0x0>; > + > + sata-phy@0 { > + reg = <0>; > + }; > + > + sata-phy@1 { > + reg = <1>; > + }; > + }; > }; > > smpboot { > Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: hdegoede@redhat.com (Hans de Goede) Date: Thu, 19 Mar 2015 12:10:25 +0100 Subject: [PATCH 5/5] ARM: dts: brcmstb: add nodes for SATA controller and PHY In-Reply-To: <1426728222-8197-5-git-send-email-computersforpeace@gmail.com> References: <1426728222-8197-1-git-send-email-computersforpeace@gmail.com> <1426728222-8197-5-git-send-email-computersforpeace@gmail.com> Message-ID: <550AAEA1.5080301@redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On 19-03-15 02:23, Brian Norris wrote: > Signed-off-by: Brian Norris > --- > Light dependency on: > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331921.html > for the surrounding text. > > arch/arm/boot/dts/bcm7445.dtsi | 36 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm/boot/dts/bcm7445.dtsi > index 9eaeac8dce1b..7a7c4d8c2afe 100644 > --- a/arch/arm/boot/dts/bcm7445.dtsi > +++ b/arch/arm/boot/dts/bcm7445.dtsi > @@ -108,6 +108,42 @@ > brcm,int-map-mask = <0x25c>, <0x7000000>; > brcm,int-fwd-mask = <0x70000>; > }; > + > + sata at f045a000 { > + compatible = "brcm,bcm7445-ahci", "brcm,sata3-ahci"; > + reg-names = "ahci", "top-ctrl"; > + reg = <0x45a000 0xa9c>, <0x458040 0x24>; Why not simply drop the second register range here, and the minimal top-ctrl poking you need in the phy driver's phy_init function ? This avoids the weird / ugly register overlap with the phy driver, and I think you can then just use the ahci_platform driver unmodified. > + interrupts = ; > + #address-cells = <1>; > + #size-cells = <0>; > + > + sata0: sata-port at 0 { > + reg = <0>; > + phys = <&sata_phy 0>; > + }; > + > + sata1: sata-port at 1 { > + reg = <1>; > + phys = <&sata_phy 1>; > + }; > + }; > + > + sata_phy: sata-phy at f0458100 { > + compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3"; > + reg = <0x458100 0x1e00>, <0x45804c 0x10>; Why not simply use: reg = <0x458000 0x2000>, to me it seems that what you should really be using here. > + reg-names = "phy", "port-ctrl"; > + #phy-cells = <1>; > + #address-cells = <0x1>; > + #size-cells = <0x0>; > + > + sata-phy at 0 { > + reg = <0>; > + }; > + > + sata-phy at 1 { > + reg = <1>; > + }; > + }; > }; > > smpboot { > Regards, Hans From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261AbbCSLLN (ORCPT ); Thu, 19 Mar 2015 07:11:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46746 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbbCSLLJ (ORCPT ); Thu, 19 Mar 2015 07:11:09 -0400 Message-ID: <550AAEA1.5080301@redhat.com> Date: Thu, 19 Mar 2015 12:10:25 +0100 From: Hans de Goede User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Brian Norris , Tejun Heo , Kishon Vijay Abraham I CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Gregory Fong , Florian Fainelli , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Subject: Re: [PATCH 5/5] ARM: dts: brcmstb: add nodes for SATA controller and PHY References: <1426728222-8197-1-git-send-email-computersforpeace@gmail.com> <1426728222-8197-5-git-send-email-computersforpeace@gmail.com> In-Reply-To: <1426728222-8197-5-git-send-email-computersforpeace@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 19-03-15 02:23, Brian Norris wrote: > Signed-off-by: Brian Norris > --- > Light dependency on: > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/331921.html > for the surrounding text. > > arch/arm/boot/dts/bcm7445.dtsi | 36 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm/boot/dts/bcm7445.dtsi > index 9eaeac8dce1b..7a7c4d8c2afe 100644 > --- a/arch/arm/boot/dts/bcm7445.dtsi > +++ b/arch/arm/boot/dts/bcm7445.dtsi > @@ -108,6 +108,42 @@ > brcm,int-map-mask = <0x25c>, <0x7000000>; > brcm,int-fwd-mask = <0x70000>; > }; > + > + sata@f045a000 { > + compatible = "brcm,bcm7445-ahci", "brcm,sata3-ahci"; > + reg-names = "ahci", "top-ctrl"; > + reg = <0x45a000 0xa9c>, <0x458040 0x24>; Why not simply drop the second register range here, and the minimal top-ctrl poking you need in the phy driver's phy_init function ? This avoids the weird / ugly register overlap with the phy driver, and I think you can then just use the ahci_platform driver unmodified. > + interrupts = ; > + #address-cells = <1>; > + #size-cells = <0>; > + > + sata0: sata-port@0 { > + reg = <0>; > + phys = <&sata_phy 0>; > + }; > + > + sata1: sata-port@1 { > + reg = <1>; > + phys = <&sata_phy 1>; > + }; > + }; > + > + sata_phy: sata-phy@f0458100 { > + compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3"; > + reg = <0x458100 0x1e00>, <0x45804c 0x10>; Why not simply use: reg = <0x458000 0x2000>, to me it seems that what you should really be using here. > + reg-names = "phy", "port-ctrl"; > + #phy-cells = <1>; > + #address-cells = <0x1>; > + #size-cells = <0x0>; > + > + sata-phy@0 { > + reg = <0>; > + }; > + > + sata-phy@1 { > + reg = <1>; > + }; > + }; > }; > > smpboot { > Regards, Hans