Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1248355rda; Mon, 23 Oct 2023 07:07:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGS0ZkezRVdvpTsELkbyy8JO2Pc5cCtttUuyxCfEnDTv53Qw9LLLbmwWhVXJnfNAxf6qfxJ X-Received: by 2002:a05:6a00:b8e:b0:6be:4789:97ba with SMTP id g14-20020a056a000b8e00b006be478997bamr7508513pfj.3.1698070034579; Mon, 23 Oct 2023 07:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698070034; cv=none; d=google.com; s=arc-20160816; b=CQTHjIkvh95gRE33C1iD9c4JPI2tKsllreSKpdp519a0lApVdm5hlOgdjx0zFjIhR+ 7osyAeOUclCaAX0/lkoTCKmWZtKCn5SrAYJqnsdTSDKfaLtz1B2YZvM1v7E/pCk/twAG qy0VvBb1OweHpIm08XAcNheocQszBXCMjZx6l3oxrCrK0G+2oGVMR/bW6IkaYzkto5ig YoFtBXqLrJsiGLAS0PaSLcR1eHhBPiDqss/04xRWtCe8daCy8KhpItX6kuo90jHA5CDR hdeXauqxqsi3nVUSdEZSKXFaUUoP9rhqNbMF0FBS+GDNfcoU4PVJcKkl5n6IHtAPTeyT zAmw== 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=gQSGpj1hT5YxpLq1vGC4ToN3NA2FW4sjbvqBsIAS9WI=; fh=6zfQWYT84uMUkZK3d7KMOA01GAZ2SsielBpfOQKQ1Y4=; b=E8j2CKo7wmKIK6qIOG9sDP44xOCcmeSsabUWBY9hgClhrBFG10FbI76f5XaPl/Rwwc n6f2PE8bBlmOYjgC1iy59/mMbheD+TkDLb+n0EJ9gOZ6wqX6t68wuWHVTp0c3iFqxlZu w/y36G+IEucryO4xJjyeqGLTaLGjqiuguSENHw8MkRJFlzpWrOIhANv6EzveNzcf65wS 97kZlY38/oIAdtGuLg1YSuyA7PLQ0WuK9PPVrZOHSVB18ClXltG3KZMokgrmaV0zFLLP fDijfffOwmwdneZio9jZLjm/Jcxjkaqd17xIndskrxOFrl9lZtPUt/3d2vpnFaYq5+ep CPWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jY23vsQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g21-20020a056a0023d500b0068beee4922csi6622374pfc.23.2023.10.23.07.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:07:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jY23vsQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 67FD58069F07; Mon, 23 Oct 2023 07:07:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231628AbjJWOHC (ORCPT + 99 others); Mon, 23 Oct 2023 10:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbjJWOHB (ORCPT ); Mon, 23 Oct 2023 10:07:01 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B31C10A; Mon, 23 Oct 2023 07:07:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE822C433C8; Mon, 23 Oct 2023 14:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698070019; bh=EFCcj+kM49q/Fckkag31hERshVse68raKNrkQaF+5ZE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jY23vsQ5maPtg3WiklVBO5WrDgi3oiBq+nleb+bSxDOdxu7etyw40395PmLKcUXJQ /C7QPkQN4FBPAFmoYwMLym5TGfyvKZZwu5LQOo3KRKpjcCBOOZArTSNmTalM2O7WwI ROE7GQonuqIAHKpVD56N824eore4Y6NhWoAW3cJT+gftflAEmDrz7msTH+/ssAue12 hPVWxzoMdQmz+a/GdAbTnc+Z+fE6EyT1IUPJ3fMb80qkkB+yutnkPvmOsffjkuTPO+ 9rDAlCNGA46AHMd7hX4HXzzbhb7Fz+0Hdzqxy2V6vEDiZoHVIHjMPlXGT07nbteHqq qvLx+Cm4LPi8Q== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1quvaM-0000YI-0b; Mon, 23 Oct 2023 16:07:14 +0200 Date: Mon, 23 Oct 2023 16:07:14 +0200 From: Johan Hovold To: Krishna Kurapati PSSNV Cc: Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Felipe Balbi , Wesley Cheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_pkondeti@quicinc.com, quic_ppratap@quicinc.com, quic_jackp@quicinc.com, ahalaney@redhat.com, quic_shazhuss@quicinc.com Subject: Re: [PATCH v13 05/10] usb: dwc3: qcom: Refactor IRQ handling in QCOM Glue driver Message-ID: References: <20231007154806.605-1-quic_kriskura@quicinc.com> <20231007154806.605-6-quic_kriskura@quicinc.com> <14fc724c-bc99-4b5d-9893-3e5eff8895f7@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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]); Mon, 23 Oct 2023 07:07:05 -0700 (PDT) On Mon, Oct 23, 2023 at 04:54:11PM +0530, Krishna Kurapati PSSNV wrote: > On 10/23/2023 2:51 PM, Johan Hovold wrote: > > On Mon, Oct 23, 2023 at 12:11:45AM +0530, Krishna Kurapati PSSNV wrote: > >> On 10/20/2023 6:53 PM, Johan Hovold wrote: > >>> I also don't like the special handling of hs_phy_irq; if this is really > >>> just another name for the pwr_event_irq then this should be cleaned up > >>> before making the code more complicated than it needs to be. > >>> > >>> Make sure to clarify this before posting a new revision. > >> > >> hs_phy_irq is different from pwr_event_irq. > > > > How is it different and how are they used? > > > >> AFAIK, there is only one of this per controller. > > > > But previous controllers were all single port so this interrupt is > > likely also per-port, even if your comment below seems to suggest even > > SC8280XP has one, which is unexpected (and not described in the updated > > binding): > > > > Yes, all targets have the same IRQ's. Just that MP one's have > > multiple IRQ's of each type. But hs-phy_irq is only one in > > SC8280 as well. > > > > https://lore.kernel.org/lkml/70b2495f-1305-05b1-2039-9573d171fe24@quicinc.com/ > > > > Please clarify. > > > > For sure pwr_event_irq and hs_phy_irq are different. I assumed it was > per-controller and not per-phy because I took reference from software > code we have on downstream and hs_phy for multiport is not used > anywhere. I don't see any functionality implemented in downstream for > that IRQ. And it is only one for single port controllers. > > But I got the following info from HW page and these are all the > interrupts (on apss processor) for multiport (extra details removed): > > u_usb31_scnd_mvs_pipe_wrapper_usb31_power_event_irq_0 SYS_apcsQgicSPI[130] > u_usb31_scnd_mvs_pipe_wrapper_usb31_power_event_irq_1 SYS_apcsQgicSPI[135] > u_usb31_scnd_mvs_pipe_wrapper_usb31_power_event_irq_3 SYS_apcsQgicSPI[856] > u_usb31_scnd_mvs_pipe_wrapper_usb31_power_event_irq_2 SYS_apcsQgicSPI[857] > > u_usb31_scnd_mvs_pipe_wrapper_usb31_ctrl_irq[0] SYS_apcsQgicSPI[133] > u_usb31_scnd_mvs_pipe_wrapper_usb31_ctrl_irq[1] SYS_apcsQgicSPI[134] This second core interrupt is also missing in the updated binding... It is defined in the ACPI tables so presumably it is needed for the multiport controller. Do you have any more details on this one? > u_cm_usb3_uni_wrapper_mp0_usb3phy_debug_irq SYS_apcsQgicSPI[668] > u_usb31_scnd_mvs_pipe_wrapper_usb31_bam_irq[0] SYS_apcsQgicSPI[830] > u_cm_usb3_uni_wrapper_mp1_usb3phy_debug_irq SYS_apcsQgicSPI[855] > > u_usb31_scnd_mvs_pipe_wrapper_usb31_hs_phy_irq_0 SYS_apcsQgicSPI[131] > u_usb31_scnd_mvs_pipe_wrapper_usb31_hs_phy_irq_1 SYS_apcsQgicSPI[136] > u_usb31_scnd_mvs_pipe_wrapper_usb31_hs_phy_irq_3 SYS_apcsQgicSPI[859] > u_usb31_scnd_mvs_pipe_wrapper_usb31_hs_phy_irq_2 SYS_apcsQgicSPI[860] Ok, so at least we know hs_phy_irq and pwr_event_irq are distinct and both per-port. The ACPI tables do not seem to include these, but yeah, that doesn't say much more than that the Windows implementation doesn't currently use them either. > u_cm_dwc_usb2_hs0_usb2_dpse apps_pdc_irq_out[127] > u_cm_dwc_usb2_hs0_usb2_dmse apps_pdc_irq_out[126] > u_cm_dwc_usb2_hs1_usb2_dpse apps_pdc_irq_out[129] > u_cm_dwc_usb2_hs1_usb2_dmse apps_pdc_irq_out[128] > u_cm_dwc_usb2_hs2_usb2_dpse apps_pdc_irq_out[131] > u_cm_dwc_usb2_hs2_usb2_dmse apps_pdc_irq_out[130] > u_cm_dwc_usb2_hs3_usb2_dpse apps_pdc_irq_out[133] > u_cm_dwc_usb2_hs3_usb2_dmse apps_pdc_irq_out[132] > u_cm_usb3_uni_wrapper_mp0_qmp_usb3_lfps_rxterm_irq apps_pdc_irq_out[16] > u_cm_usb3_uni_wrapper_mp1_qmp_usb3_lfps_rxterm_irq apps_pdc_irq_out[17] > > Seems like there are 4 IRQ's for HS. Right. And I assume there are hs_phy_irqs also for the first two USB controllers on sc8280xp? Can you find out anything more about what hs_phy_irq is used for? It appears to be an HS wakeup interrupt like the dp/dm ones, but there are not really any details on how it is supposed to be used. Johan