Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp366584rdh; Thu, 23 Nov 2023 06:10:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDmdBpVqOsUTsGKWWpDCWg8LeqbM1j7b0JqI3j8JKowiqR0yZmS2SnW+tuJMlG8Mnpsl9C X-Received: by 2002:a05:6a20:8f03:b0:18b:5b7e:6b9 with SMTP id b3-20020a056a208f0300b0018b5b7e06b9mr5141750pzk.2.1700748638635; Thu, 23 Nov 2023 06:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700748638; cv=none; d=google.com; s=arc-20160816; b=ppYHZAWm2EoVkzV+anVxicNz2wM2q0jL0wroHww/z/H7/WISxQwLTPeKkCjbXmlpv6 OL7XrIJkH9tbN3XjQe8ZzVDBiSMUjw53vA7uym1OcKETNe37a7s+AL1fPA2AfdYgwUz5 Fs8dt5ETJL3o8yXVK7H52xbcOLXWmTER658wl+hon0QOpQYTfqutm3pAqxsShA3k+U1V lj2lh/kYUVkC8j+UUtNPzlbHqGGjEsMIMRsIgf1vD4FaihTJ6HgQbXXrMVjM6FcuaS4+ Mzgs42FZ3lg36afVYmoiVGNwDqVfOXcbJsgtmSV/+7WOhEQAPinBwiqIf14W0jHO/LKM XdJQ== 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=HBIjnFYjYPCtlqyiDRPfvmre6sagek1kdmvUp9ZQF2M=; fh=TbsX9iGOQfSIIm+tniCRE4AnkBtadz34uJzYDHEDmHE=; b=NLVS6a4Hj0pB/N5A+qb2LS0qrvCje3eDcmd2vD73Mn7FFRQw9fLA+VBKE/8Pwhrt7W NMA8ltc9R/0cMslqI/m+BZq0938mA81nErolaBGSErqwcggv6Z7zcvKah0FiqPQesFeM l89JAsTxUHfDR4+dqiyH8bRHMs+/FJuneKU9sNdLsEhIPSc4fKatoEZJZeF/WLTA3P6x SpOAa/UmDtyICgCdsQ11JvvdmUmujVRXN7j5Y7vgVba9AomTpBe9H9gqerkvWGLoBexM tsvhZ3ZxRhlEVS17KmWMnctdEiPx15gBVDGyn6E7qqNta3hOLeYgCPQ5VL78+HmftMe5 i2rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmJclWsN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j1-20020a056a00234100b006c4d1f10b8asi1355026pfj.99.2023.11.23.06.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 06:10:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmJclWsN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id A5697829C9B5; Thu, 23 Nov 2023 06:10:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345702AbjKWOKT (ORCPT + 99 others); Thu, 23 Nov 2023 09:10:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345691AbjKWOKS (ORCPT ); Thu, 23 Nov 2023 09:10:18 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 448331A8 for ; Thu, 23 Nov 2023 06:10:25 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB586C433C8; Thu, 23 Nov 2023 14:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700748624; bh=/bWFQ4N/SZVD3lkJ8hFU61wZaZzFy0Eh+DF7PZpyN60=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jmJclWsNN8+MbXNXEpB/y3Ja7MjWIPlJnhva92TOcXsIjY5RXgFUIFpSu0rk5/wxx zSVWMn9rOuDzq5VNDFoP+AMh4wPYnAUD1AYyqKyL8UeRhPECBB3Iy0UfB8xUEY0BGq hXf4U1selniFGco61iHTJM+Q784IIjXFQ4RjHmKXqQc6TV52mi/7N3zH9+AQDRg7YZ M+4wfkiGwoEeSZdIxcgQsJw50nelrsEqIQJqL68f7rbnJSoTH5iEoq2n1msiZFOCd7 3Ug3diljOuFHP0Bz4nwqhA725R6t29m2pc1KKv57dfloIDzyneT8j1JttmAyu3NWNL CVjRoQ4+yhs8Q== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r6APi-000555-0P; Thu, 23 Nov 2023 15:10:42 +0100 Date: Thu, 23 Nov 2023 15:10:42 +0100 From: Johan Hovold To: Krishna Kurapati 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122191335.3058-1-quic_kriskura@quicinc.com> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 06:10:34 -0800 (PST) On Thu, Nov 23, 2023 at 12:43:35AM +0530, Krishna Kurapati wrote: > The high speed related interrupts present on QC targets are as follows: > > dp/dm Irq's > These IRQ's directly reflect changes on the DP/DM pads of the SoC. These > are used as wakeup interrupts only on SoCs with non-QUSBb2 targets with > exception of SDM670/SDM845/SM6350. > > qusb2_phy irq > SoCs with QUSB2 PHY do not have separate DP/DM IRQs and expose only a > single IRQ whose behavior can be modified by the QUSB2PHY_INTR_CTRL > register. The required DPSE/DMSE configuration is done in > QUSB2PHY_INTR_CTRL register of phy address space. > > hs_phy_irq > This is completely different from the above two and is present on all > targets with exception of a few IPQ ones. The interrupt is not enabled by > default and its functionality is mutually exclusive of qusb2_phy on QUSB > targets and DP/DM on femto phy targets. > > The DTs of several QUSB2 PHY based SoCs incorrectly define "hs_phy_irq" > when they should have been "qusb2_phy_irq". On Femto phy targets, the > "hs_phy_irq" mentioned is either the actual "hs_phy_irq" or "pwr_event", > neither of which would never be triggered directly are non-functional > currently. The implementation tries to clean up this issue by addressing > the discrepencies involved and fixing the hs_phy_irq's in respective DT's. 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) 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? 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: - anyOf: - items: - const: qusb2_phy - items: - const: dp_hs_phy_irq - const: dm_hs_phy_irq - const: pwr_event - const: ss_phy_irq (optional) Johan