Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1119608rdh; Fri, 24 Nov 2023 05:47:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGt8+lcnpVLfwQmt1WaAoU1jyYK3e54/X8F9hL+wBlB4kmOl1uKkVtD6ateAIqxRT3tIV1m X-Received: by 2002:a17:90b:1a8d:b0:280:c9a1:861e with SMTP id ng13-20020a17090b1a8d00b00280c9a1861emr3082626pjb.13.1700833677961; Fri, 24 Nov 2023 05:47:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700833677; cv=none; d=google.com; s=arc-20160816; b=cX+VzXJePA5QEiOpo0EeXEzLrdf+3OZHW6Qzui/0Yjwl6zCLU7/aaZlhySRPB0OCFb Xfyvv5ym6WNTPgTAHujyY4FDNfjkuflNbLwpAvaloDKX/gMWD19nF5fpPTKacEtAue+8 vOyU50XHuIcYN6Cr3hTmkze8mGcOlEeXH/C5thlVzvNec1vaokcJoxTlhrrzEgDDEdnl ndVRkwDl6HEpgVQZaviwHUrb0XuBTGuwhePIV2QVv2jf8Yt5DFxcfdi2dkDqCQ7EvOQ0 ajFqTuSkTn/OH807o9VdzYnEbzwW88HXTN6gsbprS+kAYrnMiwFi1i1xqW98X8/aNyG+ +gsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=caJdt6S2Rq6Opxuzy0Ae+utfcAt7y5G7p4TvCcCyZTM=; fh=Ogdn2SWkcYUt3TprLFTST5f+HChzEPLKtTE+PgwcK80=; b=Xcd7FDrXkEoFjoc4q5ZFVvBeS1BVaW77R/xjrPZZCcASnFzMVJFuzVtqgUMObMVARN A4Jx6DaZceK8uGb2Elsc4aeG8EN05VBLiWJMXLHMatR03BnTMFgE3fcFF9bYgw93IQG7 a7ud753Y4zh2ZJUTI6KMX1yOdQ7/5ycyY3FdbLPBaPAGaRY/3XAbFyEcVX1oNKPW4Upl +J8hJclmMtn+Iem/EU+P85hHEhgy1GwoZbQcxqYt0cRp/icBtNi6P+fuosfoUp2Q7QLG GkPHdqhGVhpQwdxbxZXafRIjGslWM7/khAEUybCCGVERCygsZ3PEmNkBIn2/vyE6JzP9 k3Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o9CzBtB2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id gp23-20020a17090adf1700b0026b31ed4895si4168409pjb.29.2023.11.24.05.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 05:47:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o9CzBtB2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 83B9E80A91A9; Fri, 24 Nov 2023 05:45:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbjKXNph (ORCPT + 99 others); Fri, 24 Nov 2023 08:45:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbjKXNpg (ORCPT ); Fri, 24 Nov 2023 08:45:36 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A1C71BE for ; Fri, 24 Nov 2023 05:45:42 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C789FC433C7; Fri, 24 Nov 2023 13:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700833541; bh=EzqT4v8vZXGnSVX9M8qsp06zVhLbFhH0kYlZVwhXdTc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o9CzBtB2XVBvWvf4qEK3/cdglI9Ej7m5YdPkCvTE+vmSq5ifMZ2s4WhZWi1FX+EXn TRyZ00bY4BMjVSHD4o4EYG5nFg6paKOdsFYqoXpj0ZYYd/4/m6FZN03E28fvxwYaa0 g217e4oJwaTF2ou1LKMh5Fyn0oVi8xOHeExMJ3HE2SKEFeCuj/E/syDZMFAHBvC74o w3qn/gPd+hCVGb4mXNnmDwlHA4rSNFL5BAY+onlyPUL9JrJp3IbyKG5IMZ7VknUqRe mi9L9uzoAZY9rvSSx6sh1Nttv1AWD+eMAnnA3MsIXVqT64ts57gqtq0fSmqvnbGmV9 yECsf5Sc3zlRw== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r6WVN-0000to-1Y; Fri, 24 Nov 2023 14:46:02 +0100 Date: Fri, 24 Nov 2023 14:46:01 +0100 From: Johan Hovold To: Krishna Kurapati PSSNV Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , quic_wcheng@quicinc.com, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com Subject: Re: [PATCH 1/6] dt-bindings: usb: dwc3: Clean up hs_phy_irq in bindings Message-ID: References: <20231122191335.3058-1-quic_kriskura@quicinc.com> <1192d91f-11bf-44af-953a-14e08e2b6ca8@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1192d91f-11bf-44af-953a-14e08e2b6ca8@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 24 Nov 2023 05:45:51 -0800 (PST) On Fri, Nov 24, 2023 at 05:32:37PM +0530, Krishna Kurapati PSSNV wrote: > > > > Thanks for sorting this out. > > > > It seems like we have a few combinations of these interrupts and we > > should probably try to define the order for these once and for all and > > update the current devicetrees to match (even if it means adding new > > interrupts in the middle). > > > > Instead of adding separate compatibles for the controllers without SS > > support, I suggest keeping that interrupt last as an optional one. > > > > But IIUC we essentially have something like: > > > > qusb2-: > > > > - const: qusb2_phy > > - const: pwr_event > > - const: ss_phy_irq (optional) > > > > qusb2: > > > > - const: hs_phy_irq > > - const: qusb2_phy > > - const: pwr_event > > - const: ss_phy_irq (optional) > > > > qusb2+: > > > > - const: hs_phy_irq > > - const: qusb2_phy > > - const: dp_hs_phy_irq > > - const: dm_hs_phy_irq > > - const: pwr_event > > - const: ss_phy_irq (optional) > > > > This combination doesn't exist. So we can skip this one. Ok, good. I thought you said some QUSB2 platforms used DP/DM, but I guess that means they don't have the qusb2_phy interrupt then. > > femto-: > > - const: dp_hs_phy_irq > > - const: dm_hs_phy_irq > > - const: pwr_event > > - const: ss_phy_irq (optional) > > > > femto: > > - const: hs_phy_irq > > - const: dp_hs_phy_irq > > - const: dm_hs_phy_irq > > - const: pwr_event > > - const: ss_phy_irq (optional) > > > > Does this look like it would cover all of our currents SoCs? > > > > Do all of them have the pwr_event interrupt? > > Yes. From whatever targets I was able to find, only one of them didn't > have the power_event irq. Rest all of them had. I will recheck that > particular one again. Please do. The driver polls the corresponding status register on all platforms currently, and perhaps this interrupt can one day be used to get rid of the polling. > > Note that DP comes before DM above as that seems like the natural order > > of these (plus before minus). > > > > Now if the HS interrupt is truly unusable, I guess we can consider > > dropping it throughout and the above becomes just three permutations > > instead, which can even be expressed along the lines of: > > Infact, I wanted to do this but since you mentioned before that if HW > has it, we must describe it, I kept it in. But since this functionality > is confirmed to be mutually exclusive of qusb2/{dp/dm}, I am aligned to > skip it in bindings and drop it in DT. As I mentioned elsewhere, it depends on whether it can be used at all. Not simply whether there is some other mechanism that can be used in its stead. Such a decision should be left up to the implementation. That's why I said "truly unusable" above. It's still not clear to me whether that is the case or not. > > - anyOf: > > - items: > > - const: qusb2_phy > > - items: > > - const: dp_hs_phy_irq > > - const: dm_hs_phy_irq > > - const: pwr_event > > - const: ss_phy_irq (optional) > > > > This must cover all cases AFAIK. How about we keep pwr_event also > optional for time being. The ones I am not able to find also would come > up under still binding block. No, we should avoid that if we can as with two many optional things, these quickly gets messy (one optional interrupt at the end is fine and can be expressed using min/maxItems). If the "qusb2+" combination above isn't needed, then we're down to four permutations, which is few enough to be spelled out explicitly even if we decide that the hs_phy_irq should be kept in. Without hs_phy_irq, it seems there's really only two permutations. Johan