Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1414361rdb; Fri, 16 Feb 2024 15:33:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXqaiFt/NqNx3qQ/Yv6E5TA1iXB8vcPYZO3P89dJ25zucME61FF+zdFuAs5wiYgYO8Ou0Bh6ZjBZ8FSws4WKLpC0OmBAvEuISv3PrrHJA== X-Google-Smtp-Source: AGHT+IHg4rkjPa8gfPKVAyJVlFd1HivCwCQb76RaNp8TrtcbbVIbvFNvCFRg4gc7b8RK9WAQuFAH X-Received: by 2002:a05:622a:1101:b0:42d:c9fb:1db5 with SMTP id e1-20020a05622a110100b0042dc9fb1db5mr11012889qty.25.1708126392283; Fri, 16 Feb 2024 15:33:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708126392; cv=pass; d=google.com; s=arc-20160816; b=h4Kp3ZIS4ywIT74UWwOSUCPk+QejoVfgqznCsR39FporAVqyx43X6AwdE5tLrZCTKw ztpcM2UCJ4T+AuVTJQqGR16QT4Q82bPNsi6L7aif3xaD5dxXMNcuWNwDCmDYkmZdRTh1 PjVKj+DWN5dsSWgpKWHgwF0IdDPHpBIKuZTN2SNY8CLVIhSOto4kEV4wLjYdGUrj2/mR FkR2PCj6t1UGJ4kudxemG4nzU0RRWDOcmojwPeib0q2zC0a6eu6O7Ij43wrkmujxyisC D5IZAlTbAmK3A4YyYB8H8yKxaPXsav9ItxvQRHxrUhV14SVvPcD+ZrZ5NDcqzyhoo2Wv FoLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=k0BrGSYQKpMrY1jV93zr5/aT1t5KyLT01Uu9Pa/z67M=; fh=nDm0j5UBHvp52j+tc0txJ6KbYV98BSLjLln3oaAFP/Q=; b=ASaHdlbXLIKEnrYmuBLhP+QbtwdMRFqUwmnC+ZoFVvXxOUwAzBs26+ewYNCbnWhQu2 dVs0ObWFJxoMZkM+gundCIy33KH8WeaPYlLtEliQFgfpgKKucRb6o9XRIri9hbckhUdC 8jOxBjZQ0CfpY1U7E17+dNVSA7RAnvo0LaoC15SXXhqGTwdla2hiHeKQiCDLwlOKoOyI fw08ypAohszMTEnlHGxj/IiySFE8xkPXzZEqtmVJDHUF91xkyyZLOKR6dJ50Iwf1UDtl xY9Q5EUMMvMzpSZQhVjTbLRHLIo3dvdlgbHi4h86MNvTPBYRQbj9slXLBjybHe7gW8nJ W77Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DOHzZTAK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g5-20020ac842c5000000b0042dc2c18439si883004qtm.729.2024.02.16.15.33.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 15:33:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DOHzZTAK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EED5D1C21ED1 for ; Fri, 16 Feb 2024 23:33:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73AE4148FE7; Fri, 16 Feb 2024 23:33:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DOHzZTAK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D45639856; Fri, 16 Feb 2024 23:33:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708126382; cv=none; b=JQ/SijuPGO3lZ+0FT3igybLATaSbmOHjqYuwhAr/smoW4HtDfQvQCiJWvWNgkJYZ4Iyj0lo/vUR3VHuJJFJ0fXtWk5CpA1VAUveuw9ZmddvxmnvrZ46lD6fcB5VxwaLfkZiiYj44Ie+v4dUoelOoUsyVwM2EqIGng+3/NWxGFkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708126382; c=relaxed/simple; bh=eqVzyEMsGzU657cg5/N5H+3Tf21cigAxeHyuccXXgEw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WMmuuD781GV7+f68zdMBL/OOLaUGaQvGqeOCGV8Llb6MT0jIYcRqCx8LP5nZPOptsXnCfDZDSHwSupOEvERZVuljeeZzxGhKkuYgAXWn/+7BsMpRdN2M7LUKr9bQm/kaShPtxPpc0FlkgFJDXoNQyeRrEEVpkVcPKFeli6UIEV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DOHzZTAK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14EDEC433C7; Fri, 16 Feb 2024 23:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708126382; bh=eqVzyEMsGzU657cg5/N5H+3Tf21cigAxeHyuccXXgEw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DOHzZTAKXDMXVosB9ZTMu4Vk/VyP/ne+gcWYQw0EtOFXZqpynenXuhA/3PJUB4qNW Ia1LBgtti9/hEfOTDKQeXusVVjevKoi+g7dILsjdCphDv7F1HGJU7TkFKm2DhmCVnf eEy/uNUOknF08EHNhXM5zCRZ7hjfrnm7D1NVMaWZ7RZBEGZh+VBbyG/2I3dF5+zgkx s4J981HBjC7TLcZUYVUpABzR2yvdL44rmmORY8UhYeuOEpLt39o5TUfH60v4TLAmGU d8s92TIxRY8SJTeK36DWAEWVb5XrK1kFbsDRDmzlczZSSHLpuq4U/0X5VUZKDOx17Q mG/P4X4cFo8YQ== Date: Fri, 16 Feb 2024 17:32:59 -0600 From: Bjorn Andersson To: Krzysztof Kozlowski Cc: Krishna Kurapati , Krzysztof Kozlowski , Rob Herring , Konrad Dybcio , Conor Dooley , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com Subject: Re: [PATCH v2 2/2] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports Message-ID: References: <20240213082724.1789096-1-quic_kriskura@quicinc.com> <20240213082724.1789096-3-quic_kriskura@quicinc.com> <1a033944-9361-4576-8807-35a68c1e8548@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a033944-9361-4576-8807-35a68c1e8548@linaro.org> On Thu, Feb 15, 2024 at 09:19:39AM +0100, Krzysztof Kozlowski wrote: > On 15/02/2024 03:41, Bjorn Andersson wrote: > > On Tue, Feb 13, 2024 at 09:39:51AM +0100, Krzysztof Kozlowski wrote: > >> On 13/02/2024 09:27, Krishna Kurapati wrote: > >>> Multiport USB controller (host-only) of SA8295 ADP has 4 Type-A ports > >>> exposed for connecting peripherals. The VBUS to these peripherals is > >>> provided by TPS2559QWDRCTQ1 regulators connected to these ports. Each > >>> regulator has an enable pin controlled by PMM8540. Since these regulators > >>> are GPIO controlled regulators, model them as fixed regulators and keep > >>> them Always-On at boot since we are wakeup capable and we don't need to > >>> turn them off on suspend. Also since we don't enter device mode, these > >>> regulators can be kept on. > >>> > >>> Signed-off-by: Krishna Kurapati > >>> --- > >>> arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 83 ++++++++++++++++++++++++ > >>> 1 file changed, 83 insertions(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > >>> index fd253942e5e5..49418843c214 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > >>> @@ -9,6 +9,7 @@ > >>> #include > >>> #include > >>> #include > >>> +#include > >>> > >>> #include "sa8540p.dtsi" > >>> #include "sa8540p-pmics.dtsi" > >>> @@ -108,6 +109,46 @@ edp3_connector_in: endpoint { > >>> }; > >>> }; > >>> }; > >>> + > >>> + regulator-usb2-vbus { > >>> + compatible = "regulator-fixed"; > >>> + regulator-name = "USB2_VBUS"; > >>> + gpio = <&pmm8540c_gpios 9 GPIO_ACTIVE_HIGH>; > >>> + pinctrl-0 = <&usb2_en>; > >>> + pinctrl-names = "default"; > >>> + enable-active-high; > >>> + regulator-always-on; > >>> + }; > >>> + > >>> + regulator-usb3-vbus { > >>> + compatible = "regulator-fixed"; > >>> + regulator-name = "USB3_VBUS"; > >>> + gpio = <&pmm8540e_gpios 5 GPIO_ACTIVE_HIGH>; > >>> + pinctrl-0 = <&usb3_en>; > >>> + pinctrl-names = "default"; > >>> + enable-active-high; > >>> + regulator-always-on; > >>> + }; > >>> + > >>> + regulator-usb4-vbus { > >>> + compatible = "regulator-fixed"; > >>> + regulator-name = "USB4_VBUS"; > >>> + gpio = <&pmm8540g_gpios 5 GPIO_ACTIVE_HIGH>; > >>> + pinctrl-0 = <&usb4_en>; > >>> + pinctrl-names = "default"; > >>> + enable-active-high; > >>> + regulator-always-on; > >>> + }; > >>> + > >>> + regulator-usb5-vbus { > >>> + compatible = "regulator-fixed"; > >>> + regulator-name = "USB5_VBUS"; > >>> + gpio = <&pmm8540g_gpios 9 GPIO_ACTIVE_HIGH>; > >>> + pinctrl-0 = <&usb5_en>; > >>> + pinctrl-names = "default"; > >>> + enable-active-high; > >>> + regulator-always-on; > >> > >> Why all these regulators are always on? If USB controller does not probe > >> for any reason, why keeping them enabled? These must not be always-on, > >> but instead used by connector as VBUS supply (or by whatever you have > >> there for USB). > >> > > > > I'm not too concerned about keeping the lights on in this scenario, but > > if we can describe this properly let's do so (and let's do so on other > > boards with connectors as well). > > > > We'd have a set of usb-a-connector nodes, that we can tie to the nodes > > in the USB/phy, and the supply. But so far we've associated a connector > > with a port manager, here we don't have one of those, so where would the > > node reside and who should acquire and drive the vbus-supply? > > usb-connector binding has vbus-supply and its node could be top-level. Introducing usb-connector nodes toplevel, with vbus-supply sounds reasonable. But to my knowledge there's today no way to acquire a handle to that regulator, unless you have a struct device for the connector node. > However don't some USB phys also take that regulator? > I don't think it's appropriate to add the supply to any of the phys, some of the connectors has 2 phys others has 1 phy. Representing the vbus in the connector but driving it from the phy (we will need to figure out which one) sounds reasonable. We just need to make sure this doesn't conflict with the fact that some TCPM implementations also seems to drive vbus. I would like this to be properly modelled, but it seems reasonable to punt that to the todo list for now. Regards, Bjorn > Best regards, > Krzysztof >