From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EC2FC433FE for ; Fri, 8 Apr 2022 15:28:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237554AbiDHPaS (ORCPT ); Fri, 8 Apr 2022 11:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235594AbiDHPaR (ORCPT ); Fri, 8 Apr 2022 11:30:17 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2507E10FDF9 for ; Fri, 8 Apr 2022 08:28:11 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id f3so8676691pfe.2 for ; Fri, 08 Apr 2022 08:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1wXlO1/OweZPaHt8M+nzEA7n6raTEZFPMqSrFHsFy68=; b=MBHgOKWhgWG5n/O1LvUP1gmEucefc1d1UqihpPPHc/YMi20+QGU9jlYs+Ar+BKo2xv eHZucs1INCirCqPZj+jXdPX9MPIRwIM+glwQqYAcMfsFXuGsSSy1Y47RsD2i8YaTYESx GJtd11a1lGhywBBavZolL1ht9fgER0kt0gB1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1wXlO1/OweZPaHt8M+nzEA7n6raTEZFPMqSrFHsFy68=; b=6vKD3zLw/OHDJOVLV62RmijSMlGiSCGbkHCqPt7l19WZw3JeHvO/pL1Wn2AaA1tKdL Yrb8aKDxCYdLMvUQ+H8KoE7ZqzsJoJJQL2ecXAr69NmE1jlMcWQBq1bw3MCMyhMd9/eQ HFeSMaH5T/Oae4oFAQEBsogbLuYWWG4Lp2Z2o1jxD8l6UWK36Az0DVre1yOFRuYe+mgS Ig7hdQQ/fYZo0vQQtcbzfgg8CI3Z1CpDTl9rvetol98oR1YMOCzrSJ6+V9gHgN/kfvBl Js6oWZzDAfkaQFShkAm5Sm2bg/ezePqc690JcffKxPdlu52POM1HdbrpeTEBonjZP9vs Sc8w== X-Gm-Message-State: AOAM532QrI881D59DyhEn0ws14Cjjo0lb54uJs3feXecL2SO+2USu8mT Ndoy8ka/yUd9LSIhegCeHaH/2w== X-Google-Smtp-Source: ABdhPJw94w7jXnsvHlrKirC7rL9BHIBOthUmugLehPK83vyxfXwhKk6v5pdfs8vieWoC8xjP1vdL0g== X-Received: by 2002:a05:6a00:1a49:b0:505:7ab3:e5c7 with SMTP id h9-20020a056a001a4900b005057ab3e5c7mr4404001pfv.62.1649431690633; Fri, 08 Apr 2022 08:28:10 -0700 (PDT) Received: from localhost ([2620:15c:202:201:5944:d1ca:a1fe:33cc]) by smtp.gmail.com with UTF8SMTPSA id g15-20020a056a0023cf00b004e17e11cb17sm28018059pfc.111.2022.04.08.08.28.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Apr 2022 08:28:10 -0700 (PDT) Date: Fri, 8 Apr 2022 08:28:08 -0700 From: Matthias Kaehlcke To: Pavan Kondeti Cc: Sandeep Maheswaram , Rob Herring , Andy Gross , Bjorn Andersson , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , Mathias Nyman , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, quic_ppratap@quicinc.com, quic_kriskura@quicinc.com, quic_vpulyala@quicinc.com Subject: Re: [PATCH v12 6/6] arm64: dts: qcom: sc7280: Add wakeup-source property for USB node Message-ID: References: <1649321104-31322-1-git-send-email-quic_c_sanm@quicinc.com> <1649321104-31322-7-git-send-email-quic_c_sanm@quicinc.com> <20220408020239.GB26536@hu-pkondeti-hyd.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220408020239.GB26536@hu-pkondeti-hyd.qualcomm.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Apr 08, 2022 at 07:32:39AM +0530, Pavan Kondeti wrote: > On Thu, Apr 07, 2022 at 11:06:40AM -0700, Matthias Kaehlcke wrote: > > On Thu, Apr 07, 2022 at 02:15:04PM +0530, Sandeep Maheswaram wrote: > > > Adding wakeup-source property for USB controller in SC7280. > > > This property is added to inform that the USB controller is > > > wake up capable and to conditionally power down the phy during > > > system suspend. > > > > > > Signed-off-by: Sandeep Maheswaram > > > --- > > > arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > index f0b64be..046262a 100644 > > > --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > @@ -2916,6 +2916,7 @@ > > > phys = <&usb_1_hsphy>, <&usb_1_ssphy>; > > > phy-names = "usb2-phy", "usb3-phy"; > > > maximum-speed = "super-speed"; > > > + wakeup-source; > > > }; > > > }; > > > > Not all SC7280 boards may want to enable wakeup from USB, so this is > > probably best configured on a per-board basis. > > This wakeup capability is provided by the SoC. If a particular > board does not want to support, ideally it needs to be disabled from > user space. The capability is always there but some platforms choose to > disable it. I guess 'wakeup-source' is a bit of an edge case between hardware capability (which is certainly required to make wakeup work) and policy. arch/arm64/boot/dts/mediatek/mt2712-evb.dts and arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi are two example where 'wakeup-source' is set at the board level for a USB controller. It's also true that user space can disable wakeup as you said, and a board could also delete the property in its device tree if desired. With that I agree that setting 'wakeup-source' at the SoC level provides more flexibility and is more in line with the DT as hardware description. Reviewed-by: Matthias Kaehlcke