Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp12283805rwl; Tue, 3 Jan 2023 11:50:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXttiADYRWB1fSRdJtHF6dve4YrhbIw9r6sGWdGli09V5mHRiQz2A9kdtVs6yivqox1xutUx X-Received: by 2002:a05:6402:f05:b0:46f:9a53:fdcc with SMTP id i5-20020a0564020f0500b0046f9a53fdccmr53191777eda.12.1672775418312; Tue, 03 Jan 2023 11:50:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672775418; cv=none; d=google.com; s=arc-20160816; b=ggkeNK2F4Dv23Gb2t42ciHITNnDmGFFkB+hPUhDyDUf9EAaeEFqmu4wbdIP+U77ivD Kj6YSf7tVDdeRNyZ8fKsrur5SYU25w128zohBft1yx0FT9YT04mBISAen3oqx54vp7MQ yTJw5uloD98eoi+YcBomZsVqIQvdhivWKfj2Vp3ASTnqXdDHaFbgo6rlLUN8yEXJU+kk 4s7P+E2EE7Oj5hFa9uyK9K0FDVBT2p+FeFPv/bCO0CMFnoHYjEkkreEx/u1FmlAenjY9 lvIliUAY5FZnZs6xNFC5Db+kLf496fnd31Rago//a5pTDjT6khMVpKZL9XMvNvowRRgr GW+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BExW+ZIfPNWGUZpPAEMAFWx6ewvKDaV5if2Og4obvu4=; b=GLJ+Z809mdrA3SpGoKTADo1BD9hfgCDT132+qc0dsl9NWtNReGEQG2qg8+rHP6fMeu i8oUytM3gvTw64tfE569OdOrxb5oxuibJCkOfxCAbsCQs/+TljOGsA9bSpcbvn2H7bGi eWqW5xNgY5LXhM4eMARjZ99b4JiKglvut4yaVYeOnY7+MAAoN5eFsw5wfsPF/Y2f4fTc 7Hv0J6PWiCeZoGUUz9mA/OlFH4bytXwgK0xBPB5h7Jnt/y4aMXSU+gC7Qg56yzjbdJG3 RdQAgv7F3oiAei4w2JFjjzUX2ePMWauWpJRMjxUWowqSS/DV5yldlGZ+DOfoI3l0sHuh 0bqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HXhSvzMT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a056402274200b004849ca9e3e8si27370613edd.66.2023.01.03.11.50.04; Tue, 03 Jan 2023 11:50:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HXhSvzMT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238695AbjACS7N (ORCPT + 59 others); Tue, 3 Jan 2023 13:59:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238542AbjACS7L (ORCPT ); Tue, 3 Jan 2023 13:59:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF055DF24; Tue, 3 Jan 2023 10:59:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 886A5614E3; Tue, 3 Jan 2023 18:59:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E057CC433EF; Tue, 3 Jan 2023 18:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672772349; bh=+CJk9OwSCEk1H/q4t+TF4/vkdk8PvOEpM8L7jWrZOjY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HXhSvzMTqih359QbIxXdEIubg8JzAxZNkH/B6vmJPb2c83zUxlSbv05qAAdM3AqFZ RNsw6Yld/pCkKtNLx7J8sbT9vAoum/XkGKT8FtL6pHR70wr9pB+i9bhplgbtXK+W2A W9lIh+rQhP15L28U8ETt5QyyWUDYPgpWTZa3yWY0vvACcRqQmO9V24itMM6Hr/u0Xe uBH5pAUtuv09Lr0709haFcc9JlmebobKwechcad7RbIzxxXwt8o0KK+c4yw79wIwAq 4GL3DEJ3pVlHF+y2YoTM4zdUDx9z4qMF66Z1AjQP5gKeoA785mZp0Mb20u64PiHzke RrezfG9sGho/g== Received: by mail-vs1-f45.google.com with SMTP id a66so32705741vsa.6; Tue, 03 Jan 2023 10:59:09 -0800 (PST) X-Gm-Message-State: AFqh2kpJ0k93VTtEn//V3WveI87Cj5aqVfXuG2XLCJRsJ/Gxxft/+q4z cPmAEIBTM91/zSwcnVWyEnHknMZmF+8jgk6L4A== X-Received: by 2002:a05:6102:3546:b0:3c8:a6ed:faa8 with SMTP id e6-20020a056102354600b003c8a6edfaa8mr3777310vss.85.1672772348793; Tue, 03 Jan 2023 10:59:08 -0800 (PST) MIME-Version: 1.0 References: <20221219191038.1973807-1-robh@kernel.org> <87edsua5q4.fsf@balbi.sh> <878riy9ztm.fsf@balbi.sh> <20221223235712.h54lggnjjuu3weol@synopsys.com> <87o7rlffi7.fsf@balbi.sh> <87k028g6ol.fsf@balbi.sh> In-Reply-To: <87k028g6ol.fsf@balbi.sh> From: Rob Herring Date: Tue, 3 Jan 2023 12:58:57 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: usb: snps,dwc3: Allow power-domains property To: Felipe Balbi Cc: Thinh Nguyen , Heiko Stuebner , Greg Kroah-Hartman , Krzysztof Kozlowski , "linux-rockchip@lists.infradead.org" , Johan Jonker , "linux-arm-kernel@lists.infradead.org" , "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Fri, Dec 30, 2022 at 11:09 AM Felipe Balbi wrote: > > > Hi, > > Rob Herring writes: > >> >> > >> > Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 3 +++ > >> >> > >> > 1 file changed, 3 insertions(+) > >> >> > >> > > >> >> > >> > diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml > >> >> > >> > index 6d78048c4613..bcefd1c2410a 100644 > >> >> > >> > --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml > >> >> > >> > +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml > >> >> > >> > @@ -91,6 +91,9 @@ properties: > >> >> > >> > - usb2-phy > >> >> > >> > - usb3-phy > >> >> > >> > > >> >> > >> > + power-domains: > >> >> > >> > + maxItems: 1 > >> >> > >> > >> >> > >> AFAICT this can be incorrect. Also, you could have Cc the dwc3 > >> >> > >> maintainer to get comments. > >> >> > >> >> Felipe is correct. We have 2 power-domains: Core domain and PMU. > >> > > >> > Power management unit? Performance management unit? > >> > > >> > That doesn't change that the rk3399 is 1 and we're stuck with it. So I > >> > can say 1 or 2 domains, or we add the 2nd domain when someone needs > >> > it. > >> > >> Isn't the snps,dwc3.yaml document supposed to document dwc3's view of > >> the world? In that case, dwc3 expects 2 power domains. It just so > >> happens that in rk3399 they are fed from the same power supply, but > >> dwc3' still thinks there are two of them. No? > > > > Yes. That is how bindings *should* be. However, RK3399 defined one PD > > long ago and it's an ABI. So we are stuck with it. Everyone else put > > Are you confusing things, perhaps? DWC3, the block Synopsys licenses, > has, as Thinh confirmed, 2 internal power domains. How OEMs (TI, Intel, > Rockchip, Allwinner, etc) decide to integrate the IP into their systems > is something different. That is part of the (so-called) > wrapper. Different integrators will wrap Synopsys IP however they see > fit, as long as they can provide a suitable translation layer between > Synopsys own view of the world (its own interconnect implementation, of > which there are 3 to choose from, IIRC) and the rest of the SoC. > > Perhaps what RK3399 did was provide a single power domain at the wrapper > level that feeds both of DWC3's own power domains, but DWC3 itself still > has 2 power domains, that's not something rockchip can change without > risking the loss of support from Synopsys, as it would not be Synopsys > IP anymore. Again, none of this matters. I'm documenting what is already in use and an ABI, not what is correct. The time for correctness was when this binding was added. To move forward, how about something like this: power-domains: description: Really there are 2 PDs, but some implementations defined a single PD. minItems: 1 items: - description: core - description: PMU We unfortunately can't constrain this to Rockchip in the schema because that specific information is in the parent node. (kind of crappy descriptions too, but that's the amount of information I have.) > > power-domains in the parent because obviously the DWC3 has 0 > > power-domains. > > How did you come to this conclusion? By testing the schema against the in tree .dts files. To date, no one other than Rockchip has power-domains in the DWC3 node. Rob