Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1445779rdb; Fri, 16 Feb 2024 17:07:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+Bz268O154NDIuukLQylpMfyNoeU9V1EhWSrJjgmVNMiOXUIRRdT7WU5GY+pOjtXEPUJvplYCRrMg3HugxVXJycZL5mmFhocXS09+RQ== X-Google-Smtp-Source: AGHT+IFgQHYzlSgL7Fu9AZ6x0o1vutvorjWOA9IbiX/W4yFU+K/pKHYzWC6PohXHTqX565OgiVBH X-Received: by 2002:a05:6808:6408:b0:3c0:3e52:d145 with SMTP id fg8-20020a056808640800b003c03e52d145mr7443237oib.25.1708132029039; Fri, 16 Feb 2024 17:07:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708132029; cv=pass; d=google.com; s=arc-20160816; b=aaIBZockp1I1gJyLCY/Yee6yJ2n093zAzaskim0vA24NbZuqpddnO50JG0O2UIIVJC ChyhFOMm5Wlz0oj0xrAMElKv0UD9frV3i5YGi9wbHmmIIyNLN7qJ48UpMzPPjlOrdxI7 aTd8xaAMXNpUd5zznlpdSqDROtKUJGaOXeK/4Yo7Jzp5HnEuNVT4XvLbb2deSPsfvr6h sHzpE1ea/Y9d0FsIpMo8+hHYBBcxntJbaXOvBqnTkc9Z7eBk14xXXUzklsf7av7fQi0D VQ2HeSse3SiwIZ6wbYsWzdl9VkZOE+6/HnPSfOdvBdZ5ARf9w2JnepfYcovQ97vv5ZQs 9yog== 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=HT931xXHpjEVVCsIg8ym8dsdNr3qjjA3Pmduj1s/d8k=; fh=YjLOdBYhrkX1VSLmJLNJfJU+/wvex7q4v88Txbpddwk=; b=HePk5Sv4ZMU08aXc4hMH9Fdqy5kw9XyRRZUMIFKY+I9CgmBjaLmEpQl550iZaLFSak czUUjH9RPFc4RtPyDBd83G7i1UVfuWSH0sAN0UKxne4neVEuPUWnk9mhS3d1Pj/LxwLq XBZmkrYp4XcSNS1Hcit+ynZEZ7W/6nMNFbTPjYbjk9PtwcHLg3JbaBLeSNDRMS0tc4w0 IllECtlm74WjFadxTypYXxFAHOlmpjouGQ9GSF7+eNhnsn0yA1kM+bQyftjXJRp4nZgF T23ulqoSUQKB4zIsySeNHkPdIRoh4bei0H2cRfqkC8EWdxkYfHDnzELk+DXh9LS8U7Jj CSGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q+TJZHRZ; 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-69619-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69619-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a12-20020a05622a064c00b0042c66cea37dsi1212514qtb.336.2024.02.16.17.07.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:07:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69619-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q+TJZHRZ; 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-69619-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69619-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B92721C20D48 for ; Sat, 17 Feb 2024 01:07:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05ECC1A58E; Sat, 17 Feb 2024 01:01:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="q+TJZHRZ" Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (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 041061CA9F for ; Sat, 17 Feb 2024 01:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131703; cv=none; b=sVGR873uKzguXrlYmanIw+1MwLOkE7sYDVuA3Jpp8ey5JSqZjT3yAh1B5eN3LprMm2TvMWQPl667EwhqVpxGXB0IjbhO7X352TRHLTAGR36bsF8o0+EoXfZdQkGSm5IckRhyH4/lcL3zc3YZVppn/mTX1FtynqrrCGMBlDJlubk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131703; c=relaxed/simple; bh=3fOi1RpEFfGtHQFy2nY0FxbZDHwiclU4pVgSPHtzLqc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=r/CHQ8ltI7bWoFCMvVY0TlqGEq9ED4eBb+OVlXHRERmWinbzAyKyeTD5rqNM/OxnSHsrant6sEMHS6caGYL56ngr6eowpP355EsxLpdT0n1jbi4kiBfqvcMNUz3BKm5d07CH6Ta+xFo8svQWTV8q/dJfxzYBZ2V3Dxeo1BSi/Ek= 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=q+TJZHRZ; arc=none smtp.client-ip=209.85.128.178 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-f178.google.com with SMTP id 00721157ae682-6080a3eecd4so5360047b3.2 for ; Fri, 16 Feb 2024 17:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708131701; x=1708736501; 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=HT931xXHpjEVVCsIg8ym8dsdNr3qjjA3Pmduj1s/d8k=; b=q+TJZHRZVcjXo2+Ctqgxz+iV99kkYlBizvXr9x1eSwvJhHxcx675kKrCPUIkPDieWx lDrnBbNXXY1Q6YHTAEg/ahkU5oUltX07dxpeWfrdowocayoYkvYMSSlJBhn4MDwOnVHk jLpGlZ29m3f6+qTZHqNY8hjD2906b9WVKXkSED03owyUgdY5w5tKH5OeQuX2csG4nryZ K5LuEkuSyr9fbUBAAQ+pXFl5ARaqqlQr3lr4iaw7EZwH6LF4en4kasOlh6xpt3OFaaXv Ub/55xseomWQnyEXlW3o6VoV8pZUVxgQo5uAF7q9PL5lLbgJ+I40kG8cOwVfj9qhxIEZ HrSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708131701; x=1708736501; 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=HT931xXHpjEVVCsIg8ym8dsdNr3qjjA3Pmduj1s/d8k=; b=XaNF0AGSZHMvs421jHiv80j+CBSdYjEbIUaGmkm2z+w4xDIn6bpJhB4yGMgMWXvuXn cL+bSX/F/Nhw6FCQ6QiHggUl3sXNVW/Zp2vAeZY3sL3+LpfKmGMj/720dSsgBEJHBSsN 4G1PshaXAqtMmOvEVcqqFl0+aqQ9nRKM3Y1GXKngp1yEWImQDxtMrgz69FtCWyyr9POS l6ywuJ1PwsLRX50lS7BKeMtDgdY5REaVOheiV/4Q0KzVnQLfc45vx64o9zhSHTvCY3R1 Ezt1LLwT1+waRSfxVvEj53OYoplLtsvQy2ppMVl8WH3OhbBT59rgjLO4pjqcH+vWQFiR +7TA== X-Forwarded-Encrypted: i=1; AJvYcCXTvajTuEScgDf5shkxj0yV/BPEn+EtJIo8oIA/qw26Jn6lxrrCWTeNhqgfTtpxGXk5YiTgrRKv6JswahPakK4WAZV/mEb/DdrBxdwF X-Gm-Message-State: AOJu0YyaTUZDVXh7M/PruhwR2ocm1VBJEAkFMhaOfLP4ebnsTjLpLZDy F5cW4SCHDGmxd7TXYw9RwRN5sqML1BuSqra8h5O8mqnSmcZmxw2z6qmQIicTYCq9K3G6O3XrmUF x8QVc8Bddq2Z4gc9N7yGU2u0BSJjSB+HwxKUcMQ== X-Received: by 2002:a81:7b43:0:b0:605:a557:6b47 with SMTP id w64-20020a817b43000000b00605a5576b47mr6835757ywc.12.1708131700957; Fri, 16 Feb 2024 17:01:40 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240213082724.1789096-1-quic_kriskura@quicinc.com> <20240213082724.1789096-3-quic_kriskura@quicinc.com> <1a033944-9361-4576-8807-35a68c1e8548@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Sat, 17 Feb 2024 03:01:29 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports To: Bjorn Andersson Cc: Krzysztof Kozlowski , 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 Content-Type: text/plain; charset="UTF-8" On Sat, 17 Feb 2024 at 01:33, Bjorn Andersson wrote: > > 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 think vbus can be toggled from the dwc3 controller itself rather than from the PHY. > > > I would like this to be properly modelled, but it seems reasonable to > punt that to the todo list for now. -- With best wishes Dmitry