Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6217941rwr; Mon, 24 Apr 2023 16:06:34 -0700 (PDT) X-Google-Smtp-Source: AKy350bbxD5m3bdReAVJCT7uD+rX7CE2qhe5Rjq2bneFYrSuKFj64+DsAbEWkh3qMRcemYvWjk9O X-Received: by 2002:a17:902:f547:b0:1a0:6690:d3d1 with SMTP id h7-20020a170902f54700b001a06690d3d1mr18739839plf.6.1682377594453; Mon, 24 Apr 2023 16:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682377594; cv=none; d=google.com; s=arc-20160816; b=HsgWdhFrVvVaS+27sNxxlmLDwv8tLVf1TPGI4iL0ohHBQqZPNVRDoihlv9Mg61I/Q8 iLrs6Wf/lGn7sd6Ph+j+bAyCNVXsQEqllbODWMto9uw2lHIS0Nbos74nSqtvkfjqihRh yJ1xHQk0HumsesronQn4Shqh27Qt8wmKEbsaTE5mP0D9Z0Fo6sKQAiEy6fdLDRzAohoG BirM+5b2+uenCyfW3jSqPblRJ1gIIGoYUVJR2zOXzGU+ey0OvXs5SvbbYtgflL/2l1qq TdI0p3xmHwTM2+DmavMi++1+qi95ypZGfggWhTr6YKrjuK/Iz0A41FsctqLVcs6SgD1E IMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xRrth/2rPlHJRD57ZDquRzBPnCdvHhyHdVMWOLBhruc=; b=xp9M2PDsV8wS8jukedD9AvMGnPAr8NxsnD/n2MDjWpMcOehu6lVhVlwH89sP2c4qss hXgLNpwIhCKAq4ckbMQhObwTHpv+Vrx9e3VAMzwRQGW6p/Ykx46foI0rkgTEiRYqHe1C EdXMd75CvnlbvpDs5OqqZMUGuSTi+e2uHCEOGRJN1l6Ga6Kk144blrDLHov9Nlaw52nV 0VYfgAf+VYNmSgQjYQqFIR+Hi3GDyYPNV0VOvUq9zDBeuFzZlZQttGZfREXQh77hWBJA kjWJnOmWEpJPN7Ijtlft3fHBhd/CZxoTwQUC3gTxR1lDRPmxZwsX1678PkoymqF/vT8F 4n5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pwTi6X4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902c40c00b001a66a0f12b7si14086575plk.236.2023.04.24.16.06.20; Mon, 24 Apr 2023 16:06:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pwTi6X4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232892AbjDXXDr (ORCPT + 99 others); Mon, 24 Apr 2023 19:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbjDXXDp (ORCPT ); Mon, 24 Apr 2023 19:03:45 -0400 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17DDB93F6 for ; Mon, 24 Apr 2023 16:03:44 -0700 (PDT) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-54fae5e9ec7so57186897b3.1 for ; Mon, 24 Apr 2023 16:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682377423; x=1684969423; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xRrth/2rPlHJRD57ZDquRzBPnCdvHhyHdVMWOLBhruc=; b=pwTi6X4Nah2HOzAB1Ma+a9krICtX2pHckFVINb88v52GBWheZ7jNNAHDVo8Dnp5zsZ wuJDfJTRWf9GdX6CanriP+Pu1yBthY4U12nueDOM1sq+a9AYrud+7bkuee8qPbzhqQNS eSF8AfTN5oMY3xh7hUEhIiu5DCIlMS8bs+rduoF78daKpkxi+ykuz0ImcKQt4grSnFyx O3tIl8t1S3YoAf+71PDzbzsIStpGrhiNCSpgRfO8l1LD20TmV+aOAm4DdrhMmbHJXXtM 9nWRUsfqJeEv+wO+5qHzsDsCN5nmk6Mg96rCymIFnFZk+Az51S7i5tUAwERWVkxY3c1p dK2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682377423; x=1684969423; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xRrth/2rPlHJRD57ZDquRzBPnCdvHhyHdVMWOLBhruc=; b=GPAzRyye5G03LreKhzOI/3o/QOxFKXcY4W5w1YACIJWioitWzPv1fVhF29Fz6+KWon /dovTJqOiKoeDMXHqNG/o/GkkM5U1DzHPZtcyx/hwslGg/Bl8B+ye96jpLeYocbjU1+P Z87/NGbgdZTguccLYB+A0AKSVzBYY7VyH96pKg11A/T5SvHUWoD/YK+0vDifgGmsm50u iPtrWxzs9mEuMr3LrxCmQ+9Iciy+gNH4Pea6uKveg4feX+nDRPcstERu5D5U72oiDiV/ 7MfNLkhf6nBmnXS3LGSacK8erCed/3+Z76hQ0X4X2DeaCMu9CJfOcnnesAX/GJdvRQEO 7rNQ== X-Gm-Message-State: AAQBX9c0VNxGpLNPv55+ZVysiw5X0CAV60Ve7GTG7TJiGjR7bdGqaaI9 fzX6XBVl5gYEw07VeFshZ5ZOhrDBxLObptZjdXrlqg== X-Received: by 2002:a0d:e68b:0:b0:54f:9e41:df5a with SMTP id p133-20020a0de68b000000b0054f9e41df5amr9223949ywe.15.1682377423165; Mon, 24 Apr 2023 16:03:43 -0700 (PDT) MIME-Version: 1.0 References: <20230421133922.8520-1-quic_shazhuss@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Tue, 25 Apr 2023 02:03:32 +0300 Message-ID: Subject: Re: [PATCH v1 0/6] arm64: qcom: sa8775p: add support for USB To: Adrien Thierry Cc: Shazad Hussain , agross@kernel.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Greg Kroah-Hartman , Wesley Cheng , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Apr 2023 at 01:36, Adrien Thierry wrote: > > Hi Shazad, > > On Fri, Apr 21, 2023 at 07:09:15PM +0530, Shazad Hussain wrote: > > Update relavent DT bindings for USB, add new config to the phy driver, > > add USB and PHY nodes to the .dtsi and enable them in the board .dts > > for the sa8775p-ride platform. > > > > Shazad Hussain (6): > > dt-bindings: usb: qcom,dwc3: Add bindings for SA8775P > > dt-bindings: phy: qcom,usb-snps-femto-v2: Add bindings for SA8775P > > dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: Add SA8775P USB PHY > > binding > > phy: qcom-qmp: Add SA8775P USB3 UNI phy > > arm64: dts: qcom: sa8775p: add USB nodes > > arm64: dts: qcom: sa8775p-ride: enable USB nodes > > > > .../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 1 + > > .../bindings/phy/qcom,usb-snps-femto-v2.yaml | 1 + > > .../devicetree/bindings/usb/qcom,dwc3.yaml | 5 + > > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 92 +++++++ > > arch/arm64/boot/dts/qcom/sa8775p.dtsi | 239 +++++++++++++++++- > > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 45 ++++ > > 6 files changed, 381 insertions(+), 2 deletions(-) > > > > -- > > 2.17.1 > > > > Thanks for posting this. I tested the series on the sa8775p, and it seems > initialization for the controller at a400000 sometimes fails with a > timeout (-110) error: > > dwc3 a400000.usb: Adding to iommu group 2 > xhci-hcd xhci-hcd.0.auto: xHCI Host Controller > xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 > xhci-hcd xhci-hcd.0.auto: can't setup: -110 > xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered > xhci-hcd: probe of xhci-hcd.0.auto failed with error -110 Semi-random suggestion, but could you please try using clk_regmap_phy_mux/clk_regmap_phy_mux_ops for USB pipe clk src? > dwc3 a600000.usb: Adding to iommu group 3 > dwc3 a800000.usb: Adding to iommu group 4 > xhci-hcd xhci-hcd.1.auto: xHCI Host Controller > xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1 > xhci-hcd xhci-hcd.1.auto: hcc params 0x0110ffc5 hci version 0x110 quirks 0x0000000000010010 > xhci-hcd xhci-hcd.1.auto: irq 162, io mem 0x0a800000 > xhci-hcd xhci-hcd.1.auto: xHCI Host Controller > xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2 > xhci-hcd xhci-hcd.1.auto: Host supports USB 3.1 Enhanced SuperSpeed > hub 1-0:1.0: USB hub found > hub 1-0:1.0: 1 port detected > usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. > hub 2-0:1.0: USB hub found > hub 2-0:1.0: 1 port detected > > In this case, only usb devices for a800000 are showing: > > dracut:/# ls -alh /sys/bus/usb/devices > total 0 > drwxr-xr-x 2 root root 0 Feb 27 00:00 . > drwxr-xr-x 4 root root 0 Feb 27 00:00 .. > lrwxrwxrwx 1 root root 0 Feb 27 00:00 1-0:1.0 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.1.auto/usb1/1-0:1.0 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 2-0:1.0 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.1.auto/usb2/2-0:1.0 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 usb1 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.1.auto/usb1 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 usb2 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.1.auto/usb2 > > This happens approximately 1 out of 2 reboots. Here's the kernel output > when initialization succeeds: > > dwc3 a600000.usb: Adding to iommu group 2 > dwc3 a800000.usb: Adding to iommu group 3 > xhci-hcd xhci-hcd.0.auto: xHCI Host Controller > xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 > xhci-hcd xhci-hcd.0.auto: hcc params 0x0110ffc5 hci version 0x110 quirks 0x0000000000010010 > xhci-hcd xhci-hcd.0.auto: irq 161, io mem 0x0a800000 > xhci-hcd xhci-hcd.0.auto: xHCI Host Controller > xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 > xhci-hcd xhci-hcd.0.auto: Host supports USB 3.1 Enhanced SuperSpeed > hub 1-0:1.0: USB hub found > hub 1-0:1.0: 1 port detected > usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. > hub 2-0:1.0: USB hub found > hub 2-0:1.0: 1 port detected > dwc3 a400000.usb: Adding to iommu group 4 > xhci-hcd xhci-hcd.1.auto: xHCI Host Controller > xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3 > xhci-hcd xhci-hcd.1.auto: USB3 root hub has no ports > xhci-hcd xhci-hcd.1.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000000010010 > xhci-hcd xhci-hcd.1.auto: irq 162, io mem 0x0a400000 > hub 3-0:1.0: USB hub found > hub 3-0:1.0: 1 port detected > > And the list of usb devices: > > dracut:/# ls -alh /sys/bus/usb/devices > total 0 > drwxr-xr-x 2 root root 0 Feb 27 00:00 . > drwxr-xr-x 4 root root 0 Feb 27 00:00 .. > lrwxrwxrwx 1 root root 0 Feb 27 00:00 1-0:1.0 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.0.auto/usb1/1-0:1.0 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 2-0:1.0 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.0.auto/usb2/2-0:1.0 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 3-0:1.0 -> ../../../devices/platform/soc@0/a4f8800.usb/a400000.usb/xhci-hcd.1.auto/usb3/3-0:1.0 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 usb1 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.0.auto/usb1 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 usb2 -> ../../../devices/platform/soc@0/a8f8800.usb/a800000.usb/xhci-hcd.0.auto/usb2 > lrwxrwxrwx 1 root root 0 Feb 27 00:00 usb3 -> ../../../devices/platform/soc@0/a4f8800.usb/a400000.usb/xhci-hcd.1.auto/usb3 > > Have you also encountered this? > > Best, > > Adrien > -- With best wishes Dmitry