U-Boot PCI driver for mx6sxsabresd
Marek Vasut
marex at denx.de
Tue Jan 28 18:14:06 CET 2020
On 1/28/20 6:11 PM, Pedro Jardim wrote:
> Hi Marek,
Hi,
> I saw your commit c5773ccdca8a ("pci: imx: Add iMX6SX compatible") and
> I've been trying to convert the PCI driver to DM_PCI on a mx6sxsabresd board.
>
> I did the following changes:
>
> --git a/arch/arm/dts/imx6sx-sdb.dtsi b/arch/arm/dts/imx6sx-sdb.dtsi
> index da815527a7..f5b0e9ee3f 100644
> --- a/arch/arm/dts/imx6sx-sdb.dtsi
> +++ b/arch/arm/dts/imx6sx-sdb.dtsi
> @@ -78,6 +78,17 @@
> enable-active-high;
> };
>
> + reg_pcie_gpio: regulator-pcie-gpio {
> + compatible = "regulator-fixed";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_pcie_reg>;
> + regulator-name = "MPCIE_3V3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + gpio = <&gpio2 1 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> reg_usb_otg2_vbus: regulator at 2 {
> compatible = "regulator-fixed";
> reg = <2>;
> @@ -154,6 +165,14 @@
> status = "okay";
> };
>
> +&pcie {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_pcie>;
> + reset-gpio = <&gpio2 0 GPIO_ACTIVE_LOW>;
> + vpcie-supply = <®_pcie_gpio>;
^
Is this even a valid DT ?
[...]
> diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
> index 5150e3a837..6ce7e01b5f 100644
> --- a/configs/mx6sxsabresd_defconfig
> +++ b/configs/mx6sxsabresd_defconfig
> @@ -68,3 +68,4 @@ CONFIG_USB_STORAGE=y
> CONFIG_USB_HOST_ETHER=y
> CONFIG_USB_ETHER_ASIX=y
> CONFIG_VIDEO=y
> +CONFIG_DM_PCI=y
You might need DM regulator somewhere. Take a look at what VINING 2000
does there, the PCI worked on that one.
> diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
> index 55aace1c6e..52aaa82fbc 100644
> --- a/include/configs/mx6sxsabresd.h
> +++ b/include/configs/mx6sxsabresd.h
> @@ -166,12 +166,10 @@
> #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
> #endif
>
> -#ifdef CONFIG_CMD_PCI
> #define CONFIG_PCI_SCAN_SHOW
> #define CONFIG_PCIE_IMX
> #define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(2, 0)
> #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1)
> -#endif
>
> #define CONFIG_IMX_THERMAL
>
> Which obtained the following output:
>
> => pci enum
> => pci 0
> No such bus
> => pci 1
> No such bus
>
> Before the DM conversion. Do you have any suggestions as to why the
> PCI device is not detected after the DM_PCI conversion? Are you able
> to get i.MX6SX to detect PCI devices when using DM_PCI?
Yep, see above.
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list