Re: [RFC v2 5/5] arm64: dts: imx8mq-evk: Enable PCIE0 interface

From: Lucas Stach
Date: Fri Feb 08 2019 - 04:54:28 EST


Am Donnerstag, den 07.02.2019, 16:29 -0800 schrieb Andrey Smirnov:
> Enable PCIE0 interface connected to BCM4356 WiFi/Bluetooth module.
>
> > Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
> Cc: Fabio Estevam <fabio.estevam@xxxxxxx>
> Cc: Chris Healy <cphealy@xxxxxxxxx>
> Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> Cc: Leonard Crestez <leonard.crestez@xxxxxxx>
> Cc: "A.s. Dong" <aisheng.dong@xxxxxxx>
> Cc: Richard Zhu <hongxing.zhu@xxxxxxx>
> Cc: linux-imx@xxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
> Âarch/arm64/boot/dts/freescale/imx8mq-evk.dts | 34 ++++++++++++++++++++
> Â1 file changed, 34 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> index 64acccc4bfcb..20afdb9ffdd9 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> @@ -31,6 +31,12 @@
> Â gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
> Â enable-active-high;
> Â };
> +
> + pcie0_refclk: pcie0-refclk {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <100000000>;
> + };
> Â};
> Â
> Â&fec1 {
> @@ -40,6 +46,14 @@
> > Â status = "okay";
> Â};
> Â
> +&gpio5 {
> +Â wl-reg-on {
> + gpio-hog;
> + gpios = <29 GPIO_ACTIVE_HIGH>;
> + output-high;
> + };
> +};
> +
> Â&i2c1 {
> > Â clock-frequency = <100000>;
> > Â pinctrl-names = "default";
> @@ -131,6 +145,18 @@
> > Â };
> Â};
> Â
> +&pcie0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_pcie0>;
> + reset-gpio = <&gpio5 28 GPIO_ACTIVE_LOW>;
> + clocks = <&clk IMX8MQ_CLK_PCIE1_ROOT>,
> + Â<&clk IMX8MQ_CLK_PCIE1_AUX>,
> + Â<&clk IMX8MQ_CLK_PCIE1_PHY>,
> + Â<&pcie0_refclk>;
> + clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
> + status = "okay";
> +};

>From a PCIe PoV I think this is fine. Please send a patch for the PCIe
driver to use the pcie_aux clock.

> +
> Â&uart1 {
> Â pinctrl-names = "default";
> Â pinctrl-0 = <&pinctrl_uart1>;
> @@ -195,6 +221,14 @@
> Â >;
> Â };
> Â
> + pinctrl_pcie0: pcie0grp {
> + fsl,pins = <
> + MX8MQ_IOMUXC_I2C4_SCL_PCIE1_CLKREQ_B 0x76
> + MX8MQ_IOMUXC_UART4_TXD_GPIO5_IO29 0x16

Shouldn't this GPIO be separated in a pinctrl group for gpio5?

> + MX8MQ_IOMUXC_UART4_RXD_GPIO5_IO28 0x16
> + >;
> + };
> +
> Â pinctrl_reg_usdhc2: regusdhc2grpgpio {
> Â fsl,pins = <
> Â MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41