Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1170910rdg; Fri, 11 Aug 2023 12:04:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEHN+WVQbD2VUrFBy0pidvJVUnPKO+pVTn0TImqVCkkUEG8Aoq8/FB9IaHt67JRM1Q+X8J X-Received: by 2002:a17:902:da81:b0:1b6:79e3:636d with SMTP id j1-20020a170902da8100b001b679e3636dmr2839024plx.58.1691780663873; Fri, 11 Aug 2023 12:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691780663; cv=none; d=google.com; s=arc-20160816; b=GPC2DuuHFU70m67JrqKqFuGda0xYhkVlXlmgFUHMqpwxvYQDP03PIuB4wbVtVIsPPN ToRBI2hazVjDGoibX7FIhJyAmq9HBCf9A76Uo6EDmNbg6BalflqIzkcXKhga3jclO/Nt k/AhFsU30XFtNnWTOFIemI1RbavLms439tNAeNjDsECHkcKjdpZsCH/UCixzRA8HyAc/ +w1O6ILb0eB4gN5lgG1+5c1xF+3LF5h4PmzTv92wUN2UZDrQgsF13mwbUwaxKJ0hE3IA L0zFy9XOQXyPh6mZyieyQtGpgGeaLWyFmU2HGXHWpznL8hZmpCfZNrQM7KQSSFWjf+dE vOdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=D3Gp+IMxKZDgNVcIGMPfvwovFcia/kmOZd2YqdHgfkQ=; fh=+swl0qOB6TZj0l3da7WlVg6lJ2YpZ1zH2t4U55EMvmU=; b=RbICL/sOZj22u5XNdISOL4ftqFB1fvhpRU3SMqC59JuDtpvOrESgcN1zlTIUV+J6Sq H3/4uTBJR/Qy4nQNnWOErFCuqSvtPIvIK8DoPi03xJLdbFMjhIB3JRogMn8rwC6WklV6 xdnPh7iNpu6Msd02zbmFoDB1+CLDjIxcHjP0WrWamkuoH8FDbIyye/iU8ZGVcl6uqZpQ ITJSdH7P4fLEabHUX33KaitmiRVCuJ93Jrabn8Xd65/0AMK7MCiRsY8bxf5PO7rCPKbw xd04XL6vWLLbLLTqfS4zLWgU92/73SN6eqtoyYFVp4cfnDjJ/oeletgV8La2E/pWnjM2 IBfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cocZxpQ4; 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 li11-20020a170903294b00b001bda93595d9si2801844plb.604.2023.08.11.12.04.10; Fri, 11 Aug 2023 12:04:23 -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=cocZxpQ4; 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 S232555AbjHKQs0 (ORCPT + 99 others); Fri, 11 Aug 2023 12:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232467AbjHKQsW (ORCPT ); Fri, 11 Aug 2023 12:48:22 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FED130C1 for ; Fri, 11 Aug 2023 09:48:21 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4fe8c16c1b4so3410388e87.2 for ; Fri, 11 Aug 2023 09:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691772499; x=1692377299; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=D3Gp+IMxKZDgNVcIGMPfvwovFcia/kmOZd2YqdHgfkQ=; b=cocZxpQ4GuklgdXgwDuYn/2XPc8o51powTaZwkhviGPsGcBQrvhxfVG5OAhXxd5hr2 0/m8MF0H643+5Sm0Ptg5cIh8RWGp+5Gh4Cm2v0Nic4S8rP+BgInMTspc+lu9eQtk27iG Prs1DoIdO3kekxKplftc7KUaoJveaN79I//OdMNoxQaFhzxjti9BAoxCnTfytCQLIj2w oZ5+HN0YoRiZIKumZdBcLEreu/4PIJ1jfVFEvloLWFU1uDBiaDvZLNu1RTQmanyASwof BbbTL239CmLGGWrFPq/lAqcznHOlkF+Lp/7B3awUJrDKNdDou5Y8Kg1DcK0OA3pCv3bR Qw6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691772499; x=1692377299; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D3Gp+IMxKZDgNVcIGMPfvwovFcia/kmOZd2YqdHgfkQ=; b=c7mxQJ+afy4QaxUvYjy8IUqqkAuplH6lUSPn6CKZRmAKSPaGtz1v4mpgOUqHrPsd9i KtvhwTWZHMQUiVQgJgrpFps7afPJfoG/5kuVXJuq5bTLasLClp9I3G7rIr0fLe5dnhdY Xizx47/Q7hw1wx+l6DKudKBAfTF5c+3pJlx53NrxDHn1IKUVEkOM3leS7nB1fWb806Vs +IKGGywAq8FWTCX6Srlkz+XOpnDVHIewtsjJEDRuqxOOdJWhQgmnqD+ZY9zWuLDAo5TG 3o3roByrRSXVP+PypkPM1SZdrLpARG1E/sQ4oE+D/kJh+jZ6OjzfJIAly7ozf2ATxhM+ d/cg== X-Gm-Message-State: AOJu0YxW3MbH7wpfwfTWHi5sbXm3EuzGSXFD9l+HyEKudgHj5XG7v2uy kxRhezQPVRN+PVJVu2n45buAiA== X-Received: by 2002:ac2:4e08:0:b0:4fe:551:3d3c with SMTP id e8-20020ac24e08000000b004fe05513d3cmr2620732lfr.36.1691772499423; Fri, 11 Aug 2023 09:48:19 -0700 (PDT) Received: from [192.168.1.101] (abyj188.neoplus.adsl.tpnet.pl. [83.9.29.188]) by smtp.gmail.com with ESMTPSA id o2-20020ac24942000000b004fe27212a6asm785748lfi.308.2023.08.11.09.48.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Aug 2023 09:48:18 -0700 (PDT) Message-ID: Date: Fri, 11 Aug 2023 18:48:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 6/9] usb: dwc3: qcom: Add multiport controller support for qcom wrapper Content-Language: en-US To: Johan Hovold Cc: Krishna Kurapati PSSNV , Wesley Cheng , Jack Pham , Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Felipe Balbi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_pkondeti@quicinc.com, quic_ppratap@quicinc.com, ahalaney@redhat.com References: <20230514054917.21318-1-quic_kriskura@quicinc.com> <20230514054917.21318-7-quic_kriskura@quicinc.com> <26ae15d1-4e13-3ab7-6844-3a7d3ed03af4@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxw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Kdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 21.07.2023 14:54, Johan Hovold wrote: > On Fri, Jul 21, 2023 at 02:10:07PM +0200, Konrad Dybcio wrote: >> On 21.07.2023 13:16, Johan Hovold wrote: >>> On Fri, Jul 14, 2023 at 04:08:45PM +0530, Krishna Kurapati PSSNV wrote: >>>> On 7/14/2023 2:30 PM, Johan Hovold wrote: >>>>> On Mon, Jul 03, 2023 at 12:35:48AM +0530, Krishna Kurapati PSSNV wrote: >>>>>> On 6/27/2023 9:13 PM, Johan Hovold wrote: >>>>>>> On Wed, Jun 07, 2023 at 02:16:37PM +0200, Johan Hovold wrote: >>>>>>>> On Sun, May 14, 2023 at 11:19:14AM +0530, Krishna Kurapati wrote: >>>>> >>>>>>>>> - val = readl(qcom->qscratch_base + PWR_EVNT_IRQ_STAT_REG); >>>>>>>>> - if (!(val & PWR_EVNT_LPM_IN_L2_MASK)) >>>>>>>>> - dev_err(qcom->dev, "HS-PHY not in L2\n"); >>>>>>>>> + for (i = 0; i < dwc->num_usb2_ports; i++) { >>>>>>>>> + val = readl(qcom->qscratch_base + pwr_evnt_irq_stat_reg_offset[i]); >>>>>>>>> + if (!(val & PWR_EVNT_LPM_IN_L2_MASK)) >>>>>>>>> + dev_err(qcom->dev, "HS-PHY%d not in L2\n", i); >>>>>>>>> + } >>>>>>> >>>>>>>> When testing this on the X13s I get: >>>>>>>> >>>>>>>> dwc3-qcom a4f8800.usb: HS-PHY2 not in L2 > >> Sidenote, I get this on any Qcom device on any platform I try >> to enter suspend on, without these MP patches. > > Ok, that might provide some hint. But on sc8280xp (X13s) we only get it > on one of the four MP ports (i.e. on one out of six ports in total). > > While on sa8295p-adp there are no such errors on any port. I've been playing with 8450 and it looks like snps,dis_u2_susphy_quirk causes this error. The downstream tree contains this property and I'm inclined to believe it means that this platforms should define it (as the devicetrees are machine-generated to a degree, AFAIK), especially since this quirk does the exact same thing on a known-working downstream, namely unsetting DWC3_GUSB2PHYCFG_SUSPHY. Digging a bit deeper, dwc3-msm-core [1], the downstream version of dwc3-qcom performs a bit of a dance in a couple of places.. Look for that register name. Unfortunately I have little idea what the "USB2 suspend phy" is.. is it a PHY used in suspend? Is it the suspension of the USB2 PHY? No clue. [1] https://git.codelinaro.org/clo/la/kernel/msm-5.10/-/blob/KERNEL.PLATFORM.1.0.r2-08800-WAIPIOLE.0/drivers/usb/dwc3/dwc3-msm-core.c Konrad