Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp54328rdb; Wed, 7 Feb 2024 21:08:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWDZ5Oz3X8qAqNnauRRybAWDfahKXCkqzK9ems/L9yCQ+CE3zdyFQWiYYKNjWRPhaIAjwSzGENnruZU8pRpVeHvtvPflZIIBEk7yDTu2Q== X-Google-Smtp-Source: AGHT+IHDDIZ0wkjBzprl1MipYYLcUW9tgv5tjzl6miZudQdwRlXxwjSFXxkRSGO/DcUEqiuiyZz0 X-Received: by 2002:a05:6a21:3981:b0:19c:9c9a:1b09 with SMTP id ad1-20020a056a21398100b0019c9c9a1b09mr9007103pzc.10.1707368892077; Wed, 07 Feb 2024 21:08:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707368892; cv=pass; d=google.com; s=arc-20160816; b=DNR2FK9Erg9lEhjKvlCoHwqTdqBgxKessUrhtJBscvMfv0AApBzVsbw8+EeL96oYNY a47zbPeNUSviSpliIqegWDkfTJXJznohQzQIX+giNhs90B4eh39/jgIulBYvYRHvLb1K yFB7ns3LMgI40U4fhwWYho20t4DjD0gz3/6susaQapfK8HI4vMgSTY81cFD8DwjfiIQu hfw4UigZROwoHxGiElImUGNVUClOSpcpuj3ONTREGG/vrSuLOMGREUUq0IQdaVXwar4k KURUgofmPpLRddHCpJh7JSmhvD/19JsZjw0tyj45tqYY2P7hzDKrZxYbJreIZOARWpuO kK5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=BGl5cCJqjAfFyHTLaY0IIsvguW7hmHHJY6/Dv3YRAjc=; fh=IZHZ9JTZ22/gFCQsMdW6jEEvcvZoTNVlGvgyGZMcX8o=; b=QDxsY4zHf5v4sfJl21MvxgmLSiB4jXo7N9TfULQN3BkSmOWWPUbtgzT1NoNzTtlOzU B+4Vv01LvCa+icxlFehKpR9IUo7/94lQCJNi6s8a55hPEbUBKAL3xKJWyd80w4pzUKiI XdmfIlnmlIbj6ZiRAVtchdS1HLVpM4JVL6lRpeCVOggCtlPifXkP9Im5kApa4qmrsVZT NEF6S3DGJF96sq5Pqqprp/gXjmqTKDcg4IQYwZ23Y7dQaR9FG7e+fS5ZNFDLacyFIRjf 6OXPujZZuu9U5xKbiOvpW7iOCECjqLiUxnXl/n8SvAFhKN9xHj6LdDfskUkeRQOR0vX2 wPDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=leZK4o2a; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-57472-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCVJcIAGvnCcm6/wzdyXtT+uRHL6SdX4ferg05/Ta1Kg1N0FGfZkvSuBKNeBZTEQonJ5A7BB+0jX3X/RRvMpGPbe36SZE0pvVfG/XF+wGA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id iq3-20020a17090afb4300b0029668a93dc8si590758pjb.58.2024.02.07.21.08.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 21:08:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57472-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=leZK4o2a; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-57472-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AE561281A6D for ; Thu, 8 Feb 2024 05:08:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8883167A10; Thu, 8 Feb 2024 05:08:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="leZK4o2a" Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12E9767C42 for ; Thu, 8 Feb 2024 05:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707368880; cv=none; b=qKKlHjt2ZBawrsGD9WcyRe3PaBH4EJ4rHnep8XpOfudEbs7KJtu77kuX8/bVz+EW46DV1oIIn5we+fUDAxxPRt1b3Ud262084rLMUZ5Nu2akNhgPgjtTsL44Mm8rWd2LMPvqC0iCdgf3aLeFU+tGi4AMwhsO02jQ04NepfDwUL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707368880; c=relaxed/simple; bh=necreP3eDdbdyn4Oyfj+vwKf7/O6xo4o+M2OSyCOT5Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=gyeF+BYbTLU3TJ5ez1BP3R2oWlsVV5JoXzwABSpfmddy20tBsaQ+/swxMQEiXi+H+DjaBNJVOZY7fN5hKOzwPyavQz4+ffbsaHLOKwa6tiPcfoEM30fEsaVWv4Ojqp5gTyRdkyiykNQVgU8NrAWGOuuml2zuRhL1SD8CaqaJXIY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=leZK4o2a; arc=none smtp.client-ip=209.85.128.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-6049fc02a19so6907687b3.0 for ; Wed, 07 Feb 2024 21:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707368878; x=1707973678; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BGl5cCJqjAfFyHTLaY0IIsvguW7hmHHJY6/Dv3YRAjc=; b=leZK4o2a5AP0SpV2/Tl4aKqKI5pFs+2qbaN6cFe6FXFJtpvVPfYUcT+1YdimXnrCdC l3BoP6tlz2qKrHUnL2H++74C4S09PgAaa+5Wz7o2zda5VA4gHwwmrHJhb6D9osWq8d8w ZPKI2v8gy7eS4n9pGXx2+amNeW0UT4Gkh6wrfEWgm/M+vXfFw37DYpGZD5jS+HSu/LL+ vD5Rxxa4pp9n/m+qATQkczuq6WVQHGzeW3hLso93++qjzqC66gDQwgIwVw8y6ZnIvcPi nTEYR4ATmGQtAgm9xuUkfG7GbdhauSe1sxDToqlOmt34AIcQaxY88phoiaGuX0m/6JE/ kwNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707368878; x=1707973678; 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=BGl5cCJqjAfFyHTLaY0IIsvguW7hmHHJY6/Dv3YRAjc=; b=BuDRXqMybsYoFARFEH+5MWm5/zjkSHxrfAySn4IaUwOStHLs1T77TwvUphX5+zPVFQ Af+4DuIX8XGunCwQjlKiVWETryjBmR9gldHNJGwvhKiFcWnYP9gn2K6L20LeW34x8C2p PNS85HnxlSk3JyTqqbYSN0+seq9KOCXv9PkXkBiCIlk7YpUcbjbwk9bRa2nL5BByEnb1 qxDds+GVRPhpv39LbogsSxahnpc+JSw9BhNMsdmOGxkIG8zeijZ2Z98erckoY8Dlci48 xvZyw18ciBARQXW4Aph6pZ11SYyCelG5j/WEwY11ITxR2wbLqnv6hDqTBA9VgMS33oJD X/pQ== X-Forwarded-Encrypted: i=1; AJvYcCW8WwXkYblqmOoTmBiwxsrH4jLj8/mSIkO+HMu4V7Bsy4dfempKhlhwpG71qpo36xR3i6/Fuz3at1Os+8mtgMyEwUMLCsN8ZoHoe61F X-Gm-Message-State: AOJu0Yw6iz80ARA3GklEiI4pbI7oEgidvNxJOdwhynIThu9yk5W8pjPO HGJ4ADgFnShdVRca8AdYboqpNEKbXronms9DfJZ1K8zKaqZjRkDzFGGFeSXB6BQ08yMuSzil2XG QfSv2mXeNks+1iLi8Q2T2EwGqp+i2kGiqJO8QGg== X-Received: by 2002:a0d:f701:0:b0:604:4e77:f291 with SMTP id h1-20020a0df701000000b006044e77f291mr7649124ywf.32.1707368877919; Wed, 07 Feb 2024 21:07:57 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240206114745.1388491-1-quic_kriskura@quicinc.com> <20240206114745.1388491-3-quic_kriskura@quicinc.com> <0470a930-d629-4467-b619-58d3e76f59a7@quicinc.com> <7500f1f8-1d97-4fa9-a7cd-7dea0ad52e00@quicinc.com> In-Reply-To: <7500f1f8-1d97-4fa9-a7cd-7dea0ad52e00@quicinc.com> From: Dmitry Baryshkov Date: Thu, 8 Feb 2024 07:07:46 +0200 Message-ID: Subject: Re: [PATCH 2/3] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports To: Krishna Kurapati PSSNV Cc: Krzysztof Kozlowski , Konrad Dybcio , Rob Herring , Bjorn Andersson , Conor Dooley , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com Content-Type: text/plain; charset="UTF-8" On Thu, 8 Feb 2024 at 06:48, Krishna Kurapati PSSNV wrote: > > > > On 2/8/2024 10:11 AM, Dmitry Baryshkov wrote: > > On Thu, 8 Feb 2024 at 04:40, Krishna Kurapati PSSNV > > wrote: > >> On 2/6/2024 6:54 PM, Dmitry Baryshkov wrote: > >>> On Tue, 6 Feb 2024 at 14:28, Krishna Kurapati PSSNV > >>> wrote: > >>>> > >>>> > >>>> > >>>> On 2/6/2024 5:43 PM, Dmitry Baryshkov wrote: > >>>>> On Tue, 6 Feb 2024 at 14:03, Krishna Kurapati wrote: > >>>>>> > >>>>>> Enable tertiary controller for SA8295P (based on SC8280XP). > >>>>>> Add pinctrl support for usb ports to provide VBUS to connected peripherals. > >>>>> > >>>>> These are not just pinctrl entries. They hide VBUS regulators. Please > >>>>> implement them properly as corresponding vbus regulators. > >>>>> > >>>> > >>>> Hi Dmitry. Apologies, can you elaborate on your comment. I thought this > >>>> implementation was fine as Konrad reviewed it in v13 [1]. I removed his > >>>> RB tag as I made one change of dropping "_state" in labels. > >>> > >>> My comment is pretty simple: if I'm not mistaken, your DT doesn't > >>> reflect your hardware design. > >>> You have actual VBUS regulators driven by these GPIO pins. Is this correct? > >>> If so, you should describe them properly in the device tree rather > >>> than describing them just as USB host's pinctrl state. > >>> > >> > >> Hi Dmitry, > >> > >> I have very little idea about the gpio controller regulators. I will > >> go through it and see how I can implement it. I just found this : > >> https://www.kernel.org/doc/Documentation/devicetree/bindings/regulator/gpio-regulator.txt > > > > Much simpler, it can be found at > > Documentation/devicetree/bindings/regulator/fixed-regulator.yaml > > Thanks for the reference. > > > > >> One query. If we model it as a regulator, do we need to add it as a > >> supply and call regulator_enable in dwc3_qcom probe again ? > > > > Not in probe(), but yes. It needs to be enabled when the VBUS has to > > be powered up, when the device is initialised or switched to the host > > mode, and disabled when the VBUS has to be powered down, if the device > > is being switched to the device mode. > > > > Actually since we never go to device mode, can't we just stick to this > pinctrl approach and skip turning on regulator in driver ? Scroll several emails back. DT should describe the hardware. Hardware has VBUS regulators. -- With best wishes Dmitry