devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk
@ 2023-08-06 19:06 Adam Ford
  2023-08-06 22:03 ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Ford @ 2023-08-06 19:06 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, cstevens, Adam Ford, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Geert Uytterhoeven, Magnus Damm,
	devicetree, linux-kernel, linux-renesas-soc

There is a I2C controlled 100MHz Reference clock used by the PCIe
controller. Configure this clock's DIF1 output to be used by
the PCIe.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
index 06e91297fb16..332269dedeee 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
@@ -23,6 +23,12 @@ chosen {
 		stdout-path = &uart2;
 	};
 
+	clk_xtal25: clk-xtal25 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+
 	connector {
 		compatible = "usb-c-connector";
 		label = "USB-C";
@@ -246,6 +252,13 @@ pca6416_3: gpio@20 {
 		interrupt-controller;
 		#interrupt-cells = <2>;
 	};
+
+	pcieclk: clk@68 {
+		compatible = "renesas,9fgv0241";
+		reg = <0x68>;
+		clocks = <&clk_xtal25>;
+		#clock-cells = <1>;
+	};
 };
 
 &i2c3 {
@@ -372,8 +385,9 @@ &pcie {
 };
 
 &pcie_phy {
+	fsl,clkreq-unsupported;
 	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
-	clocks = <&pcie0_refclk>;
+	clocks = <&pcieclk 1>;
 	clock-names = "ref";
 	status = "okay";
 };
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk
  2023-08-06 19:06 [PATCH] arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk Adam Ford
@ 2023-08-06 22:03 ` Fabio Estevam
  2023-08-06 22:20   ` Adam Ford
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2023-08-06 22:03 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, aford, cstevens, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Geert Uytterhoeven,
	Magnus Damm, devicetree, linux-kernel, linux-renesas-soc

Hi Adam,

On Sun, Aug 6, 2023 at 4:06 PM Adam Ford <aford173@gmail.com> wrote:

>  &pcie_phy {
> +       fsl,clkreq-unsupported;
>         fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
> -       clocks = <&pcie0_refclk>;

Should the pcie0_refclk node be also removed? It seems to be unused
after this patch.

> +       clocks = <&pcieclk 1>;

Isn't clocks = <&pcieclk>; (without the extra 1) enough?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk
  2023-08-06 22:03 ` Fabio Estevam
@ 2023-08-06 22:20   ` Adam Ford
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Ford @ 2023-08-06 22:20 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-arm-kernel, aford, cstevens, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Geert Uytterhoeven,
	Magnus Damm, devicetree, linux-kernel, linux-renesas-soc

On Sun, Aug 6, 2023 at 5:03 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Adam,
>
> On Sun, Aug 6, 2023 at 4:06 PM Adam Ford <aford173@gmail.com> wrote:
>
> >  &pcie_phy {
> > +       fsl,clkreq-unsupported;
> >         fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
> > -       clocks = <&pcie0_refclk>;
>
> Should the pcie0_refclk node be also removed? It seems to be unused
> after this patch.

Oops, you're right.  I will send a V2.

>
> > +       clocks = <&pcieclk 1>;
>
> Isn't clocks = <&pcieclk>; (without the extra 1) enough?

The clock generator has two outputs called DIF0 and DIF1.  This
hardware uses DIF1 for the reference clock, so I need to specify
output 1.

adam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-06 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-06 19:06 [PATCH] arm64: dts: imx8mp-beacon: Configure 100MHz PCIe Ref Clk Adam Ford
2023-08-06 22:03 ` Fabio Estevam
2023-08-06 22:20   ` Adam Ford

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).