devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH v2 7/9] arm64: dts: imx8mp: add HSIO power-domains
Date: Mon, 21 Feb 2022 11:05:00 +0100	[thread overview]
Message-ID: <3e9d3135d9d838cb58e828478145704b9cb7f58d.camel@pengutronix.de> (raw)
In-Reply-To: <YhCfAJbLkrzS9rIz@pendragon.ideasonboard.com>

Hi Laurent,

Am Samstag, dem 19.02.2022 um 09:40 +0200 schrieb Laurent Pinchart:
> Hi Lucas,
> 
> Thank you for the patch.
> 
> On Mon, Feb 07, 2022 at 08:25:45PM +0100, Lucas Stach wrote:
> > This adds the GPC and HSIO blk-ctrl nodes providing power control for
> > the high-speed (USB and PCIe) IOs.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mp.dtsi | 63 ++++++++++++++++++++---
> >  1 file changed, 57 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > index 6b840c05dd77..dc488a147d0c 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > @@ -4,6 +4,7 @@
> >   */
> >  
> >  #include <dt-bindings/clock/imx8mp-clock.h>
> > +#include <dt-bindings/power/imx8mp-power.h>
> >  #include <dt-bindings/gpio/gpio.h>
> >  #include <dt-bindings/input/input.h>
> >  #include <dt-bindings/interrupt-controller/arm-gic.h>
> > @@ -475,6 +476,44 @@ src: reset-controller@30390000 {
> >  				interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
> >  				#reset-cells = <1>;
> >  			};
> > +
> > +			gpc: gpc@303a0000 {
> > +				compatible = "fsl,imx8mp-gpc";
> > +				reg = <0x303a0000 0x10000>;
> 
> According to the reference manual, the GPC occupies 4kB, not 64kB.

Right, will fix.

> 
> > +				interrupt-parent = <&gic>;
> > +				interrupt-controller;
> > +				#interrupt-cells = <3>;
> > +
> > +				pgc {
> > +					#address-cells = <1>;
> > +					#size-cells = <0>;
> > +
> 
> We're working on support for the MEDIAMIX power domains, which we'll
> rebase on top of this. In case the HSIO part still needs more work,
> could you split this patch in two, with one patch that adds the PGC,
> with an empty pgc nodde, and a second patch that adds the HSIO-related
> power domains ? The first one could then be merged faster (it would be
> great if it could get in v5.18).

I don't think the HSIO part is controversial. It seems to work well in
my testing and DT binding is already reviewed. Not sure if someone is
going to review it properly, but I hope that we can land it together
with the reset of this series.

> 
> > +					pgc_pcie_phy: power-domain@1 {
> > +						#power-domain-cells = <0>;
> > +						reg = <IMX8MP_POWER_DOMAIN_PCIE_PHY>;
> > +					};
> > +
> > +					pgc_usb1_phy: power-domain@2 {
> > +						#power-domain-cells = <0>;
> > +						reg = <IMX8MP_POWER_DOMAIN_USB1_PHY>;
> > +					};
> > +
> > +					pgc_usb2_phy: power-domain@3 {
> > +						#power-domain-cells = <0>;
> > +						reg = <IMX8MP_POWER_DOMAIN_USB2_PHY>;
> > +					};
> > +
> > +					pgc_hsiomix: power-domains@17 {
> > +						#power-domain-cells = <0>;
> > +						reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
> > +						clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
> > +							 <&clk IMX8MP_CLK_HSIO_ROOT>;
> > +						assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
> > +						assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
> > +						assigned-clock-rates = <500000000>;
> > +					};
> > +				};
> > +			};
> >  		};
> >  
> >  		aips2: bus@30400000 {
> > @@ -908,6 +947,20 @@ ddr-pmu@3d800000 {
> >  			interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> >  		};
> >  
> > +		hsio_blk_ctrl: blk-ctrl@32f10000 {
> > +			compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon";
> > +			reg = <0x32f10000 0x24>;
> > +			clocks = <&clk IMX8MP_CLK_USB_ROOT>,
> > +				 <&clk IMX8MP_CLK_PCIE_ROOT>;
> > +			clock-names = "usb", "pcie";
> > +			power-domains = <&pgc_hsiomix>, <&pgc_hsiomix>,
> > +					<&pgc_usb1_phy>, <&pgc_usb2_phy>,
> > +					<&pgc_hsiomix>, <&pgc_pcie_phy>;
> 
> Would it be useful to rework the driver to avoid specifying the same
> parent power domain multiple times in DT ?

I don't think so. That's the pattern we used for all the other blk-
ctrls, where each virtual power-domain in the blk-ctrl has its own
handle to a upstream GPC power domain. I don't see why we would want to
change this now.

Regards,
Lucas

> 
> > +			power-domain-names = "bus", "usb", "usb-phy1",
> > +					     "usb-phy2", "pcie", "pcie-phy";
> > +			#power-domain-cells = <1>;
> > +		};
> > +
> >  		usb3_phy0: usb-phy@381f0040 {
> >  			compatible = "fsl,imx8mp-usb-phy";
> >  			reg = <0x381f0040 0x40>;
> > @@ -915,6 +968,7 @@ usb3_phy0: usb-phy@381f0040 {
> >  			clock-names = "phy";
> >  			assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
> >  			assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
> > +			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY1>;
> >  			#phy-cells = <0>;
> >  			status = "disabled";
> >  		};
> > @@ -926,6 +980,7 @@ usb3_0: usb@32f10100 {
> >  				 <&clk IMX8MP_CLK_USB_ROOT>;
> >  			clock-names = "hsio", "suspend";
> >  			interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
> > +			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
> >  			#address-cells = <1>;
> >  			#size-cells = <1>;
> >  			dma-ranges = <0x40000000 0x40000000 0xc0000000>;
> > @@ -939,9 +994,6 @@ usb_dwc3_0: usb@38100000 {
> >  					 <&clk IMX8MP_CLK_USB_CORE_REF>,
> >  					 <&clk IMX8MP_CLK_USB_ROOT>;
> >  				clock-names = "bus_early", "ref", "suspend";
> > -				assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
> > -				assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
> > -				assigned-clock-rates = <500000000>;
> >  				interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
> >  				phys = <&usb3_phy0>, <&usb3_phy0>;
> >  				phy-names = "usb2-phy", "usb3-phy";
> > @@ -957,6 +1009,7 @@ usb3_phy1: usb-phy@382f0040 {
> >  			clock-names = "phy";
> >  			assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
> >  			assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
> > +			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY2>;
> >  			#phy-cells = <0>;
> >  		};
> >  
> > @@ -967,6 +1020,7 @@ usb3_1: usb@32f10108 {
> >  				 <&clk IMX8MP_CLK_USB_ROOT>;
> >  			clock-names = "hsio", "suspend";
> >  			interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
> > +			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
> >  			#address-cells = <1>;
> >  			#size-cells = <1>;
> >  			dma-ranges = <0x40000000 0x40000000 0xc0000000>;
> > @@ -980,9 +1034,6 @@ usb_dwc3_1: usb@38200000 {
> >  					 <&clk IMX8MP_CLK_USB_CORE_REF>,
> >  					 <&clk IMX8MP_CLK_USB_ROOT>;
> >  				clock-names = "bus_early", "ref", "suspend";
> > -				assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
> > -				assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
> > -				assigned-clock-rates = <500000000>;
> >  				interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
> >  				phys = <&usb3_phy1>, <&usb3_phy1>;
> >  				phy-names = "usb2-phy", "usb3-phy";
> > 
> 



  parent reply	other threads:[~2022-02-21 10:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 19:25 [PATCH v2 1/9] soc: imx: gpcv2: add PGC control register indirection Lucas Stach
2022-02-07 19:25 ` [PATCH v2 2/9] dt-bindings: power: add defines for i.MX8MP power domain Lucas Stach
2022-02-11 16:27   ` Rob Herring
2022-02-13  2:03   ` Shawn Guo
2022-02-07 19:25 ` [PATCH v2 3/9] soc: imx: gpcv2: add support for i.MX8MP power domains Lucas Stach
2022-02-18 23:02   ` Laurent Pinchart
2022-02-20 11:35     ` Laurent Pinchart
2022-02-21 10:09       ` Lucas Stach
2022-02-21 10:57         ` Laurent Pinchart
2022-02-07 19:25 ` [PATCH v2 4/9] dt-bindings: power: imx8mp: add defines for HSIO blk-ctrl domains Lucas Stach
2022-02-11 16:28   ` Rob Herring
2022-02-13  2:03   ` Shawn Guo
2022-02-07 19:25 ` [PATCH v2 5/9] dt-bindings: soc: add binding for i.MX8MP HSIO blk-ctrl Lucas Stach
2022-02-11 16:29   ` Rob Herring
2022-02-13  2:04   ` Shawn Guo
2022-02-07 19:25 ` [PATCH v2 6/9] soc: imx: add " Lucas Stach
2022-02-18 21:26   ` Laurent Pinchart
2022-02-18 21:47     ` Lucas Stach
2022-02-21 11:29   ` Laurent Pinchart
2022-02-25 10:52     ` Lucas Stach
2022-02-07 19:25 ` [PATCH v2 7/9] arm64: dts: imx8mp: add HSIO power-domains Lucas Stach
2022-02-19  7:40   ` Laurent Pinchart
2022-02-20  5:56     ` Laurent Pinchart
2022-02-21 11:30       ` Laurent Pinchart
2022-02-21 10:05     ` Lucas Stach [this message]
2022-02-21 11:01       ` Laurent Pinchart
2022-02-07 19:25 ` [PATCH v2 8/9] arm64: dts: imx8mp: add GPU power domains Lucas Stach
2022-02-21 11:34   ` Laurent Pinchart
2022-02-07 19:25 ` [PATCH v2 9/9] arm64: dts: imx8mp: add GPU nodes Lucas Stach
2022-02-08 15:06   ` (EXT) " Alexander Stein
2022-02-21 11:42   ` Laurent Pinchart
2022-02-19  7:32 ` [PATCH v2 1/9] soc: imx: gpcv2: add PGC control register indirection Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e9d3135d9d838cb58e828478145704b9cb7f58d.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=patchwork-lst@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).