Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2708466rdb; Wed, 15 Nov 2023 08:22:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhRPgfu18C1/uxVDKDGwbJRbuCIY/o3waEAGELps60eysaw6l+TgYiXIxcD1HfMa2hy/Qo X-Received: by 2002:a17:90a:7e83:b0:27d:a105:d9a0 with SMTP id j3-20020a17090a7e8300b0027da105d9a0mr11116655pjl.12.1700065359473; Wed, 15 Nov 2023 08:22:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700065359; cv=none; d=google.com; s=arc-20160816; b=roJdswzMuuUOMSe25d5OWlWuamtpjC+cM/JZIo5hD7i12oeOSiXQLAL9nwHw+w453q g4jka4y45sBh2VzAuOHlQEx5ApCto/4ZyH4Q0txNbCD29Dwf9JyoQsdfHINusPiDm2rO AYCeMD9AVtywMP5d2MXf3Z2R8YuoiRdWwRTXeb+hn1n0zuN390ygBfK4oTcLG3PThCYV TnNN8cLQMm8Jj3TAyztqLNYhJ5rmYdmS7xuV49dtX2w4c22Mtf2ZednP6qK7Nrxeyh0r f87HEMlXVZhzvRNeC1TTWW0RiNp8gsyueyAh7bD0BC9AsHSHTfMBsJH4HLDPlmk+H/CY 3IwA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=mrtVoA6DkvA27sYnHwPaQSdHgnqWH534a2nbNHAYwXo=; fh=+9RUNFgujsNW/j9eY6Rlx/ej4WmPj20qhD9jLum5dlg=; b=usDmB1LkO0iVQf+Wu/yImCv3MWlHSxrK01fc4RXxrwiZpuDzF+RJLbsqQJJV8VHm+y +cs0Vs8tUrSwF/r7Ip0svbMEaodXbCjOQ8P89hrA1gBZEM5JcKuKrNSkp55/mCBgkLjZ W4T1wY1BL2zPDWVlF6G8CoZPoTOyrDL4o2ANPvEaWVflyUYLJ7Afh/nh+9dPc4dEJqrC Rq7qnsCRDqsDpmkQRLZgXZFe4TpJiWa/Uf3IHQUs079444Uas9fVxm5+y9/wDZvlIcSF 1rI0NhaIQSCYqg/jtqHIjb+aYmUmLisnaqEFAQNFQ6ob/IZyrYsDa9JsX+SjfhHX9LRh ZKRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NBq9k02L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id fz21-20020a17090b025500b002801a3de64csi77544pjb.97.2023.11.15.08.22.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 08:22:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NBq9k02L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8D2C48020CDE; Wed, 15 Nov 2023 08:22:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231734AbjKOQWW (ORCPT + 99 others); Wed, 15 Nov 2023 11:22:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232278AbjKOQWT (ORCPT ); Wed, 15 Nov 2023 11:22:19 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D0241A3 for ; Wed, 15 Nov 2023 08:22:15 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c5087d19a6so85261261fa.0 for ; Wed, 15 Nov 2023 08:22:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700065333; x=1700670133; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mrtVoA6DkvA27sYnHwPaQSdHgnqWH534a2nbNHAYwXo=; b=NBq9k02LuCSVCaWroURQ3mjqTaiXCXrIC1EwyDiDjmMIu6Jr1wWz1JpgRDh5qIRAV0 NIXA5HIqJdoRWReurugzgHtZX48aVLM+z5b+Y7SAHaDTyklXdkbGedvsBJW5fzyNmfsG bKG7NsjaE1h2on7ZOsbg2TlTpBM+qLmZAW/sEGyw/ThiC/MbTsiBTsu5LDcepTdCEhvu SkhcXZnKKUFBpp6jVqVa54lM2xkYroyq6EB7lh8xX70EcvCqIgL/KPHPpxFeNr44Fmke jiXz+Fzxg5i9YU6Lpk+IFryrIpT08bWOxMjic0ANBZG0HOVF9GuQaDqS/FYOUeqU8Dyp KI6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700065333; x=1700670133; h=content-transfer-encoding:in-reply-to: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=mrtVoA6DkvA27sYnHwPaQSdHgnqWH534a2nbNHAYwXo=; b=dUHxSJJiMNcb3lwwd75LnRlrJIXr8j2TdomQu3z/R1wNcySIfGG/xF9+MxjTZIODQV iL/i6N0XEtUto5UV/garmA5gKEDXvrj7Q34mZPkiDUGoLRU/JdOLOjbIejIWfQFNhBRb u9V3+hm//hsxc/9fuPFFCYSlkpztwkcRgIRQUpezUf2PTWd0ZE38UrYWrzg31X9muJob Z8JZ3O3S7A0rV5SjkPKO+hbWo+yzzgsNX3hU2CTTEE0a0BB4on+PUZDwgoXkDYH5nTSy uN7HiDkh7wnyr0Dk3gUe2ty6OK0uHaJa5RFmHrArLwIq5NJ/fNsoBLDSifAFFKyTOek/ XBsA== X-Gm-Message-State: AOJu0YyPIHIdz0rxlYSIRT+ie1h5TnlDG2PxqOJNXAezhm6Tj4FoticY Kw1KQsn92OGUf5vwyd+SRBn3Cg== X-Received: by 2002:a05:651c:1251:b0:2c6:f173:7d90 with SMTP id h17-20020a05651c125100b002c6f1737d90mr4430353ljh.12.1700065333646; Wed, 15 Nov 2023 08:22:13 -0800 (PST) Received: from [172.30.204.150] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id k8-20020a05651c0a0800b002bce77e4ddfsm1699622ljq.97.2023.11.15.08.22.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Nov 2023 08:22:13 -0800 (PST) Message-ID: <1f7674ea-ed79-48b1-b577-1596e6fe57d2@linaro.org> Date: Wed, 15 Nov 2023 17:22:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] clk: qcom: ipq6018: add USB GDSCs Content-Language: en-US To: Robert Marko Cc: agross@kernel.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Kathiravan Thirumoorthy References: <20231025104457.628109-1-robimarko@gmail.com> <20231025104457.628109-2-robimarko@gmail.com> <20c8cfde-3f55-45c5-bc23-21979ac9680d@linaro.org> <4243a841-5509-4d04-8ec7-191f2ba5677a@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 08:22:36 -0800 (PST) On 11/13/23 13:50, Robert Marko wrote: > On Mon, 13 Nov 2023 at 12:58, Konrad Dybcio wrote: >> >> On 11.11.2023 12:28, Robert Marko wrote: >>> On Tue, 7 Nov 2023 at 22:51, Konrad Dybcio wrote: >>>> >>>> >>>> >>>> On 10/31/23 10:01, Robert Marko wrote: >>>>> On Mon, 30 Oct 2023 at 22:12, Konrad Dybcio wrote: >>>>>> >>>>>> On 30.10.2023 21:37, Robert Marko wrote: >>>>>>> On Mon, 30 Oct 2023 at 20:37, Konrad Dybcio wrote: >>>>>>>> >>>>>>>> On 29.10.2023 12:04, Robert Marko wrote: >>>>>>>>> On Wed, 25 Oct 2023 at 12:45, Robert Marko wrote: >>>>>>>>>> >>>>>>>>>> IPQ6018 has GDSC-s for each of the USB ports, so lets define them as such >>>>>>>>>> and drop the curent code that is de-asserting the USB GDSC-s as part of >>>>>>>>>> the GCC probe. >>>>>>>>>> >>>>>>>>>> Signed-off-by: Robert Marko >>>>>>>>> >>>>>>>>> Unfortunately, after testing on multiple devices I hit the same GDSC >>>>>>>>> issue I had a long time ago >>>>>>>>> that was the reason I did not send this upstream. >>>>>>>>> It seems that USB3 port GDSC (USB0 GDSC in code) works just fine, >>>>>>>>> however the USB2 one >>>>>>>>> (USB1 GDSC in code) it is stuck off and USB2 port will fail due to this: >>>>>>>>> 1.607531] ------------[ cut here ]------------ >>>>>>>>> [ 1.607559] usb1_gdsc status stuck at 'off' >>>>>>>>> [ 1.607592] WARNING: CPU: 0 PID: 35 at gdsc_toggle_logic+0x16c/0x174 >>>>>>>>> [ 1.615120] Modules linked in: >>>>>>>> Can you dump GDSCR (the entire 32-bit register) at boot and when toggling? >>>>>>> >>>>>>> Sure, here it is: >>>>>>> [ 0.023760] qcom,gcc-ipq6018 1800000.gcc: reg: 0x3e078 val: 0x8222004 init >>>>>>> [ 0.023782] qcom,gcc-ipq6018 1800000.gcc: reg: 0x3f078 val: 0x8222004 init >>>>>>> [ 0.988626] qcom,gcc-ipq6018 1800000.gcc: reg: 0x3f078 val: >>>>>>> 0x8282000 before toggle >>>>>>> [ 1.202506] qcom,gcc-ipq6018 1800000.gcc: reg: 0x3f078 val: >>>>>>> 0x8282000 after toggle >>>>>>> [ 1.207208] qcom,gcc-ipq6018 1800000.gcc: reg: 0x3e078 val: >>>>>>> 0xa0282000 before toggle >>>>>> Any chance >>>>>> >>>>>> .en_few_wait_val = 0x2 >>>>>> >>>>>> (turning BIT(19) into BIT(17)) >>>>>> >>>>>> will make a difference? >>>>> >>>>> Sadly, it makes no difference and GDSC status bit newer comes up which is >>>>> rather weird as USB0 one seems to work just fine. >>>> What if you add clk_ignore_unused? >>> >>> To the USB1 master clock or? >> That's a command line parameter, effectively setting it on all clks. > > Oh that, I understand now. > >> >>> >>> There is definitively something broken regarding the GDSC as >>> GDSC_STATE bits (30-27) >>> change from 0 to something on the USB0 GDSC but on GDSC1 they are 0 even after >>> SW_OVERRIDE BIT(2) is set to 1, and the POWER BIT(31) newer changes to 1. >>> >>> However, if you manually set BIT(2) to 1 then the USB1 master clock >>> can come up so >>> GDSC seems to work. >>> USB1 (The USB2.0 HS) port is still broken after this if USB mass storage is used >>> but that was present before the GDSC changes as well and I still need >>> to figure out >>> which quirk is missing for this. >> Please try clk_ignore_unused and see if toggling the GDSC is still broken. > > Sadly, passing clk_ignore_unused in the bootargs doesn't help, GDSC is > still stuck off. Hm, so it looks like there's no clock dependency for this GDSC.. Maybe some regulator needs to be turned on? Can you try to add regulator-always-on to all vregs and retry? (and keep clk_ignore_unused to be sure) Konrad