Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1056121rdf; Wed, 22 Nov 2023 04:41:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqm05pmUaG23pPAAPb9Wrc0SczZ0vvALivYjTRtr3SWvWARKeLYS9lxqAy/sizekmEYcrW X-Received: by 2002:a05:6a20:8906:b0:187:af0b:5768 with SMTP id i6-20020a056a20890600b00187af0b5768mr1954140pzg.1.1700656869408; Wed, 22 Nov 2023 04:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700656869; cv=none; d=google.com; s=arc-20160816; b=IEz66RuhjXpAZy39QsmXEiaZa8fiSwSVavH/P7paM03+fz1NfGurwQ8JMDmgMvpy2f Ew+PKt5eo3ChkDTvWJq+nrqM11s4clbibvv/+gKQEtWcmM/MTFEpI4/r51PRjr1GDbwW 2ImG9ZYKsCEziFAa0w6ut49c3zYjhH9E4zd+nBJWXye/YPw4+Aax+r0qEE6z1//FVf+S Qn7lst2R14eZ1yF9oDrePHn+Zylw44BFaLx1P7X6BMRnN2TAgQvAufs/NX65V3jjQ/6V j9lt3jl8axzxG943xhGKZkPu1RbuQlvCyj92W7O+uMM+jZZF8UhJwFzAusq2r2dQcueN HEIQ== 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=PWXoD1mFIQnIt1EZTIOx6QpvEQzMm64+vpD4by48BLE=; fh=1ndqQu9TN2NeubMezyPfztUO1hBQ/5jm/0fERnoIcQA=; b=skOQHw4pYlrGGo3OyrSC2jpCZbBX4NohqZJNyk71Xt204AqF9LkrhP7MPxw8ATAqPG 4G2JqA4yKtGX2b4hRctklbJrhaBAEK01Da/GlSWBY4V3mBHrq8NbVzMiZVN18o/I6O/v 55q11o4OOUbNq8CfXkoXde5IecMlytJv7eei7Jvy4EVMvIOGyar0iouhCfb4aJkI2rdL UxAbbfc03T8mfRgjqLjeKiL2FkhsYa3ghxxKu+8jFdKTv+BzVyGVDKdnz4JRkuYjjBWk zA2gbqxT49oAedFyxMUDBfVcFJMwZCmE4w6sqiUWHeWe927IHDv5VQhNTISPFLpxETrS J8Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="K3C/Nawl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b11-20020aa78ecb000000b006cb68d85220si8319552pfr.286.2023.11.22.04.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:41:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="K3C/Nawl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 2A59781C50BF; Wed, 22 Nov 2023 04:40:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344082AbjKVMkf (ORCPT + 99 others); Wed, 22 Nov 2023 07:40:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjKVMke (ORCPT ); Wed, 22 Nov 2023 07:40:34 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3950B1BC for ; Wed, 22 Nov 2023 04:40:30 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0C4FC433C7; Wed, 22 Nov 2023 12:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700656829; bh=tqEY6FGT5GYctEXe7gynUJuIohw71n++dptwt+BslSs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K3C/NawlMCzIOcW/f3jz9KXaVJ0msjYd0OAfdl07Vp6wvx6hRWeIKT0SyvWUP4HNY XrSUvS46oni2kvurfTrjQal7GlOwQOEFaoeN0HuoMBjWIx6Bs0KvClfBFOKtfmnP+x B02ngziHfxHNKgX4xHya/4P+Zfl6WnLhSMcZ0OKVtpayRT94nF3cC2/MSNoIgySw0R 2J6am9ButjfcBTx0DIMd0S4iv1DqLZWFN78B7m9Z3+V7F/VoYdkVCYZgLv+/rzc2dU nBBl6C34lwQ3jvEkN3jJZx7Ni8A53BMtv6V6tnzD9TET4qJTiyaXhe2dNaD3bDvMf6 YhbFFkRQiQWqw== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r5mX5-0000GT-38; Wed, 22 Nov 2023 13:40:44 +0100 Date: Wed, 22 Nov 2023 13:40:43 +0100 From: Johan Hovold To: Bjorn Andersson Cc: Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Thinh Nguyen , Felipe Balbi , Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krishna Kurapati PSSNV Subject: Re: [PATCH 10/12] dt-bindings: usb: qcom,dwc3: Introduce flattened qcom,dwc3 binding Message-ID: References: <20231016-dwc3-refactor-v1-0-ab4a84165470@quicinc.com> <20231016-dwc3-refactor-v1-10-ab4a84165470@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231016-dwc3-refactor-v1-10-ab4a84165470@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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 04:40:49 -0800 (PST) On Mon, Oct 16, 2023 at 08:11:18PM -0700, Bjorn Andersson wrote: > The Qualcomm USB block consists of three intertwined parts, the XHCI, > the DWC3 core and the Qualcomm DWC3 glue. The three parts can not be > operated independently, but the binding was for historical reasons split > to mimic the Linux driver implementation. > > The split binding also makes it hard to alter the implementation, as > properties and resources are split between the two nodes, in some cases > with some duplication. > > Introduce a new binding, with a single representation of the whole USB > block in one node. > > Signed-off-by: Bjorn Andersson > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,sc8280xp-dwc3 > + - qcom,sc8280xp-dwc3-mp The multiport implementation is not ready yet and this part of the binding has been reverted (similar for the multiport interrupts below). > + then: > + properties: > + clocks: > + maxItems: 9 > + clock-names: > + items: > + - const: cfg_noc > + - const: core > + - const: iface > + - const: sleep > + - const: mock_utmi > + - const: noc_aggr > + - const: noc_aggr_north > + - const: noc_aggr_south > + - const: noc_sys > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,sc8280xp-dwc3-mp > + then: > + properties: > + interrupts: > + maxItems: 14 > + interrupt-names: > + items: > + - const: pwr_event_1 > + - const: pwr_event_2 > + - const: pwr_event_3 > + - const: pwr_event_4 > + - const: dp_hs_phy_1 > + - const: dm_hs_phy_1 > + - const: dp_hs_phy_2 > + - const: dm_hs_phy_2 > + - const: dp_hs_phy_3 > + - const: dm_hs_phy_3 > + - const: dp_hs_phy_4 > + - const: dm_hs_phy_4 > + - const: ss_phy_1 > + - const: ss_phy_2 So same here. > + else: > + properties: > + interrupts: > + minItems: 1 > + items: > + - description: Common DWC3 interrupt > + - description: The interrupt that is asserted > + when a wakeup event is received on USB2 bus. > + - description: The interrupt that is asserted > + when a wakeup event is received on USB3 bus. > + - description: Wakeup event on DM line. > + - description: Wakeup event on DP line. I guess you may have copied this from the current binding but the descriptions here are not correct. The HS/SS interrupt comes from the PHYs in case the corresponding events have been enabled. I assume it can be used for connect/disconnect events as well as remote wakeup and whether to actually wake the system up on those is an implementation detail. Similar for DM/DP which represents the state of the data lines and that can be used to detect all sorts of events, not just remote wakeup. > + > + interrupt-names: > + minItems: 1 > + items: > + - const: dwc_usb3 > + - const: hs_phy_irq > + - const: ss_phy_irq > + - const: dm_hs_phy_irq > + - const: dp_hs_phy_irq And here you are now defining all of these interrupts for all the current SoCs it seems, despite not all of them actually having all of these at once. (The order also does not match the current devicetrees.) Some only have HS/SS, and it's not clear whether the HS interrupts are actually functional when a SoC is also using DP/DM. We're currently discussing this here: https://lore.kernel.org/lkml/ZVYTFi3Jnnljl48L@hovoldconsulting.com/ > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + usb@a600000 { > + compatible = "qcom,sdm845-dwc3", "qcom,dwc3", "snps,dwc3"; > + reg = <0x0a600000 0x200000>; > + snps,dis_u2_susphy_quirk; > + snps,dis_enblslpm_quirk; > + phys = <&usb_1_hsphy>, <&usb_1_ssphy>; > + phy-names = "usb2-phy", "usb3-phy"; > + Stray newline. > + }; > +... Johan