Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 709ECC48BDF for ; Sun, 20 Jun 2021 20:11:08 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E85F661156 for ; Sun, 20 Jun 2021 20:11:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E85F661156 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 89BEC82893; Sun, 20 Jun 2021 22:11:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1624219864; bh=4NT4s+xOeHycZaXL1KVOyFthFLYuWSna/aBEDMXszCM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=y7tNbmC+lyK6Yuz8tiSoU3exRya0WsY22D9XuZJ5sW5UZWzg4J8FNKk48jTdVHXGz 5TW7NHyfv+rpNGYaKodXbSO2AwY7Rl076bxQYDyX4LX72Y86NYyYtKTWImmdcAy6zs beBMgxfb+HzKnLOz8Tk1VX5tRDxFqrRqY2BkIfJz0bUn8luUBm0IHGwnOLhcL7dNXg BMlGQHdg2ChkUOFtiZ6A8FY60GfCAlbdT887IaBZninxwaus6yNwIdSfSaBIQhqjVB yfqizS/lYoyu7SxITMqgXVfVJOc9s4XT3Vh31dfqLD/uISEXjui5tkBBUgnsl3Ab3b cVFDMLJ+7b6Rg== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 8A20580C67; Sun, 20 Jun 2021 22:11:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1624219862; bh=4NT4s+xOeHycZaXL1KVOyFthFLYuWSna/aBEDMXszCM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=BnhpIOl5EYqi/8FIy+McZ/HFTs/cQmTOSl09v7QlZkkoVsVpaAXBXFJRVvWpfBY/7 cTnFdFuawGp7lmZaQ/g5WQLBKEGfFuDyWLB/vkW7q6F5uPxo0TROu5HbSCoodZu9HE 0Alk7/ietzTv8WSv2s+xAE7MpehrQrXNeXA+Ga0rBQIHJcBJ7T1bgX4ny4i1k81eGR KY4OqPXpwnQqItbAw8xkUoMFjp4pkuxJ7MFTDl49iY9dhObHRKB2sE0XjtdlcBRUX9 e8KqNKyVesQglxVMIxHUi+t2VwJ0EVrpv2ZfWGv3Jn9eVQjBqzN0c87i/KWwx01xC1 8qPtd8xyU57bA== Subject: Re: [PATCH 2/2] usb: ehci-mx6: Do not fail when 'reg' is not found To: Fabio Estevam Cc: u-boot@lists.denx.de, sbabic@denx.de, ye.li@nxp.com, peng.fan@nxp.com References: <20210620150052.1628256-1-festevam@denx.de> <20210620150052.1628256-2-festevam@denx.de> From: Marek Vasut Message-ID: Date: Sun, 20 Jun 2021 22:11:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210620150052.1628256-2-festevam@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 6/20/21 5:00 PM, Fabio Estevam wrote: > Unlike imx6, on imx7 the USB PHY is described as: > > usbphynop1: usbphynop1 { > compatible = "usb-nop-xceiv"; > clocks = <&clks IMX7D_USB_PHY1_CLK>; > clock-names = "main_clk"; > #phy-cells = <0>; > }; > > which does not have the 'reg' property. > > Do not return an error when the 'reg' property is not found > for the USB PHY. > > This fixes USB gadget regression on a imx7s-warp board. > > Successfully tested the "ums 0 mmc 0" command on two boards: > imx7s-warp and imx6dl-pico-pi. > > Signed-off-by: Fabio Estevam > --- > drivers/usb/host/ehci-mx6.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c > index 48b5c8b0c53c..c3e4170513ec 100644 > --- a/drivers/usb/host/ehci-mx6.c > +++ b/drivers/usb/host/ehci-mx6.c > @@ -583,7 +583,7 @@ static int mx6_parse_dt_addrs(struct udevice *dev) > > addr = (void __iomem *)fdtdec_get_addr(blob, phy_off, "reg"); > if ((fdt_addr_t)addr == FDT_ADDR_T_NONE) > - return -EINVAL; > + addr = NULL; > > priv->phy_addr = addr; I applied both, but this looks very much like mx8mm which also uses nop-phy . So I think what would be even nicer is if you could try and enable CONFIG_PHY , patch the DT to specify phys = <&usbphynop1>; instead of fsl,usbphy = <&usbphynop1>; and see whether that works. You can have a look at how the usb was enabled on the verdin board. Maybe then we can get rid of some of those ifdefs and switch to generic EHCI PHY etc.