[PATCH v3 2/4] arm64: dts: imx8mq-nitrogen: add USB HOST support

Shawn Guo shawnguo at kernel.org
Mon May 10 19:22:23 PDT 2021


On Thu, Apr 01, 2021 at 01:23:54AM +0200, Adrien Grassein wrote:
> Add the description for the USB host port.
> This port is linked to a resettable USB HUB so handle
> this reset signal with a GPIO hog.
> 
> Signed-off-by: Adrien Grassein <adrien.grassein at gmail.com>
> ---
>  .../boot/dts/freescale/imx8mq-nitrogen.dts    | 30 +++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts b/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts
> index b46f45a82be1..04992cbba56e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts
> @@ -102,6 +102,14 @@ ethphy0: ethernet-phy at 4 {
>  	};
>  };
>  
> +&gpio1 {
> +	usb-host-reset-hog {
> +		gpio-hog;
> +		gpios = <14 GPIO_ACTIVE_HIGH>;
> +		output-high;
> +	};
> +};
> +
>  &i2c1 {
>  	clock-frequency = <400000>;
>  	pinctrl-names = "default";
> @@ -213,6 +221,22 @@ &usb3_phy0 {
>  	status = "okay";
>  };
>  
> +&usb_dwc3_1 {
> +	dr_mode = "host";
> +	status = "okay";
> +};
> +
> +/*
> + * On this board, USB host is connected to a resettable hub.
> + * The reset signal is connected to the GPIO <&gpio1 14 GPIO_ACTIVE_LOW>.
> + * You need to activate it in the bootloader or in the userspace.
> + */
> +&usb3_phy1 {
> +	status = "okay";

We usually end property list with 'status'.

Shawn

> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_usb3_1>;
> +};
> +
>  &usdhc1 {
>  	assigned-clocks = <&clk IMX8MQ_CLK_USDHC1>;
>  	assigned-clock-rates = <400000000>;
> @@ -388,6 +412,12 @@ MX8MQ_IOMUXC_GPIO1_IO13_USB1_OTG_OC		0x16
>  		>;
>  	};
>  
> +	pinctrl_usb3_1: usb3-1grp {
> +		fsl,pins = <
> +			MX8MQ_IOMUXC_GPIO1_IO14_GPIO1_IO14		0x16
> +		>;
> +	};
> +
>  	pinctrl_usdhc1: usdhc1grp {
>  		fsl,pins = <
>  			MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK			0x83
> -- 
> 2.25.1
> 



More information about the linux-arm-kernel mailing list