arm64: dts: freescale: imx8mm/imx8mq: mba8mx: Use PCIe clock generator
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 20 Feb 2024 14:23:06 +0000 (15:23 +0100)
committerShawn Guo <shawnguo@kernel.org>
Sun, 25 Feb 2024 12:44:59 +0000 (20:44 +0800)
PCIe reference clock is provided by Renesas 9FGV0441. Reference this
instead of a fixed-clock.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts
arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts
arch/arm64/boot/dts/freescale/mba8mx.dtsi

index ea6e8b85169f75c3dfefb45956976a1a713610de..01b632b220dc7411d300bc5a44e922da9802affc 100644 (file)
@@ -5,6 +5,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/phy/phy-imx8-pcie.h>
+
 #include "imx8mm-tqma8mqml.dtsi"
 #include "mba8mx.dtsi"
 
 };
 
 &pcie_phy {
-       clocks = <&pcie0_refclk>;
+       fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
+       fsl,clkreq-unsupported;
+       clocks = <&pcieclk 2>;
+       clock-names = "ref";
        status = "okay";
 };
 
+/* PCIe slot on X36 */
 &pcie0 {
        reset-gpio = <&expander0 14 GPIO_ACTIVE_LOW>;
-       clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&pcie0_refclk>,
+       clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&pcieclk 3>,
                 <&clk IMX8MM_CLK_PCIE1_AUX>;
        assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
-                               <&clk IMX8MM_CLK_PCIE1_CTRL>;
+                         <&clk IMX8MM_CLK_PCIE1_CTRL>;
        assigned-clock-rates = <10000000>, <250000000>;
        assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
-                               <&clk IMX8MM_SYS_PLL2_250M>;
+                                <&clk IMX8MM_SYS_PLL2_250M>;
        status = "okay";
 };
 
index b302daca4ce64e17f7fab22eaac666bd7229127a..b2e17d4f335ebb232e219e6db42da40ed5773bed 100644 (file)
                id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
        };
 
-       pcie0_refclk: pcie0-refclk {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <100000000>;
-       };
-
-       pcie1_refclk: pcie1-refclk {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <100000000>;
-       };
-
        reg_otg_vbus: regulator-otg-vbus {
                compatible = "regulator-fixed";
                pinctrl-names = "default";
        gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
 };
 
+/* PCIe slot on X36 */
 &pcie0 {
        reset-gpio = <&expander0 14 GPIO_ACTIVE_LOW>;
        clocks = <&clk IMX8MQ_CLK_PCIE1_ROOT>,
-                <&pcie0_refclk>,
-                <&clk IMX8MQ_CLK_PCIE1_PHY>,
+                <&pcieclk 3>,
+                <&pcieclk 2>,
                 <&clk IMX8MQ_CLK_PCIE1_AUX>;
        status = "okay";
 };
 
 /*
- * miniPCIe, also usable for cards with USB. Therefore configure the reset as
+ * miniPCIe on X28, also usable for cards with USB. Therefore configure the reset as
  * static gpio hog.
  */
 &pcie1 {
        clocks = <&clk IMX8MQ_CLK_PCIE2_ROOT>,
-                <&pcie1_refclk>,
-                <&clk IMX8MQ_CLK_PCIE2_PHY>,
+                <&pcieclk 1>,
+                <&pcieclk 0>,
                 <&clk IMX8MQ_CLK_PCIE2_AUX>;
        status = "okay";
 };
index e2bc53b8d39a8914c0caa9cbad8bbee90a249056..c82af672d18343d73cee193476dccab37249fcf1 100644 (file)
                stdout-path = &uart3;
        };
 
+       clk_xtal25: clk-xtal25 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <25000000>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
                };
        };
 
-       pcie0_refclk: pcie0-refclk {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <100000000>;
-       };
-
        reg_12v: regulator-12v {
                compatible = "regulator-fixed";
                regulator-name = "MBA8MX_12V";
                pagesize = <16>;
                vcc-supply = <&reg_vcc_3v3>;
        };
+
+       pcieclk: clk@68 {
+               compatible = "renesas,9fgv0441";
+               reg = <0x68>;
+               clocks = <&clk_xtal25>;
+               #clock-cells = <1>;
+       };
 };
 
 &i2c3 {