Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2323107rdb; Thu, 21 Sep 2023 15:29:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+cENoit6j4cXcmqntPXATeHLzOpNS3iHEQA49arvLgRD/L5SvJtVa4UC1sk9jNXd4wBn7 X-Received: by 2002:a17:903:2303:b0:1c3:4073:bf80 with SMTP id d3-20020a170903230300b001c34073bf80mr7072080plh.0.1695335388521; Thu, 21 Sep 2023 15:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695335388; cv=none; d=google.com; s=arc-20160816; b=D9pohOBbfYhfBUb3OGS+r3P8Mxh1XFXnUUTi/ZFEB6hVMT7m0IIpni4aOS7T5bnnNJ Prm2LcehvuRDCekZ0TmJI42r4mCWBRsZkWEl3hMJyFyh8IuidvAcT3f6QPKzvRLgKh6l qT2sUZfSyfO4PTzjyQoGzwGLTq2hmgnrqeGkTke8HqEczWCjIn/PTr8R6ZtNwAkoDF0p iAu/EIHDNdKLM8PbJCfkX5RCKJWCf7fyKTl/tAqIw9r9S5Yi7CiD5r03r+z9ofprvWmt IqEOyYQ0zsUPLiYINztxQF9WDMqXUOWhAhwf1Ag/6DgZmNTJBOJh0YepXb3nmnLDsNwF VWAA== 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=s0MtmUBoFFRZ1KaXa+vO728c+OI89EgadZUVnpzkFf4=; fh=SuhKIMBVGZwsdBY4yfyEWMPamZg95enO5kO1ih3KxTs=; b=Wl1vWVmSoo0kLxAZWQn/iLfixBeAdSOyrsFHCweufYn9t5KQpMoYRTbDBdEVnhIQho n2rv3tuaqflLC50pyzbbNtSbtQccYw+51gxGn6hbRHNNPZLFFTuqbwxCbCj11OZ2BFOl txz77mSjxRhvo54bz7+gPTM1Ro/6AI+ys92Kexp/1Wqrn8arZx9yETwsWAshaUU20Rfw D2kseTsJLez9p7+IHFBFouFOsNJH1sz4lq15iMIiHpyDclVP/EKJeCv/D+TXS8E2vdUU aHpJEd2BIyJfwKHaZcH55KKXgkzCK1WZkEqEbBg/inL1ncBdfk4gLDYpCiR6F1rBt72x Ji7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X+BepzHe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id j18-20020a170902f25200b001b674055d72si2190333plc.621.2023.09.21.15.29.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 15:29:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X+BepzHe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 685C98251490; Thu, 21 Sep 2023 13:26:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231773AbjIUU03 (ORCPT + 99 others); Thu, 21 Sep 2023 16:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231787AbjIUU0H (ORCPT ); Thu, 21 Sep 2023 16:26:07 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7879900C5; Thu, 21 Sep 2023 10:46:13 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-405361bb9cdso8134805e9.0; Thu, 21 Sep 2023 10:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695318372; x=1695923172; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s0MtmUBoFFRZ1KaXa+vO728c+OI89EgadZUVnpzkFf4=; b=X+BepzHeCjzhs4L1DMOfAQowXf7P16VfBhNkIMv5oBZmVN6hluILGhsH24wymo/bI/ Tw2VcoP9DzWSqccJPAGDUAJSD0Bb4O6gfoKAm5+UOQiwS+3T31RQNnx6B+GpTSlOSKN4 sbDwpOvindodMv3vmv/b89A7MlTVD0ZHJX64iH0w93nF/9g9PExlyy/KKpz/orFej/TP C4CLmb+Xe8PvgbK8rKLlY/y13Gdo0mL0+PB7A3G3VFtdnOHW6r9KXDWMYslchm+xzeo1 1C50/PA3Rz1u0OOzEID5Ux6rLSx9+hIetETka1agqIrBvqu30XodBCBE2qZb/5XWSoXf b4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695318372; x=1695923172; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s0MtmUBoFFRZ1KaXa+vO728c+OI89EgadZUVnpzkFf4=; b=UUkSJGJap7Jzxp1YZDBdgURrCZa367a3CY7JcWH7AOfQ4TRL4/t9bx0yq4GJ2Ymp8L kbJukLJVmjvhtLpadlMga0Mw8EMmcdTK3tZzIww9cYAsmTI9cpdZj1k3HmkQBVqkjOX1 iQ7WR+dWmrR3PjCWjJlev9FDESpPDWJaRXh9WF8GSi5+01GRSqGU0OhDbVxkqLzZ2uXk c4fMWoVn/3zgd50s27IHoiatGV//YbeC496G1uFbA2yqc1YHjI7gTXES+6pOqSO2PMqT 7vedwjYyGlLIct14hAjy10a1DRLVYtLpz7M+mGf+ncb3IZVKO6HGwvf3ttwa92CoPsMo 6ezA== X-Gm-Message-State: AOJu0YzmUYSJb22WQf8uTP9+aB3vgy2Ds7/EuIMID9J5iaI8mCkmHs+L RTwH/spsftMTnIGKa94CkBPs+A0vrIhkU5ZNrNtZMWBZFV4= X-Received: by 2002:a2e:b713:0:b0:2b9:aa4d:3728 with SMTP id j19-20020a2eb713000000b002b9aa4d3728mr4606064ljo.29.1695302280319; Thu, 21 Sep 2023 06:18:00 -0700 (PDT) MIME-Version: 1.0 References: <20230918165958.2659-1-tmaimon77@gmail.com> <20230918165958.2659-2-tmaimon77@gmail.com> <20230919162837.GA4051010-robh@kernel.org> In-Reply-To: From: Tomer Maimon Date: Thu, 21 Sep 2023 16:17:48 +0300 Message-ID: Subject: Re: [PATCH v1 1/2] dt-binding: usb: ci-hdrc-usb2: document Nuvoton NPCM supprt To: Rob Herring Cc: Krzysztof Kozlowski , peter.chen@kernel.org, gregkh@linuxfoundation.org, krzysztof.kozlowski+dt@linaro.org, xu.yang_2@nxp.com, peng.fan@nxp.com, avifishman70@gmail.com, tali.perry1@gmail.com, joel@jms.id.au, venture@google.com, yuenn@google.com, benjaminfair@google.com, j.neuschaefer@gmx.net, openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.5 required=5.0 tests=DATE_IN_PAST_03_06,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Thu, 21 Sep 2023 13:26:34 -0700 (PDT) Hi Rob, Again thanks for your suggestion I took a look at the drivers/usb/roles and I am not sure it answers NPCM ChipIdae case. For example, in the NPCM845 we have ten UDC ChipIdea modules (UDC0-9). Only UDC8 and UDC9 are muxed with USB host0 and USB host1. NPCM UDC and NPCM USB host are different HW modules therefore different drivers. The ChipIdea driver uses its own internal USB role function to switch between ChipIdea UDC and ChipIdea USB host and we can't replace it with a unique NPCM USB role function also we need to set the mux only at the probe stage. This is why I have added nuvoton,sysgcr property to the NPCM ChipIdea driver. With the above do you think I should do it differently? On Wed, 20 Sept 2023 at 12:11, Tomer Maimon wrote: > > Thanks Rob, > > I will check drivers/usb/roles > > On Tue, 19 Sept 2023 at 19:28, Rob Herring wrote: > > > > On Tue, Sep 19, 2023 at 04:31:56PM +0300, Tomer Maimon wrote: > > > On Tue, 19 Sept 2023 at 15:39, Krzysztof Kozlowski > > > wrote: > > > > > > > > On 19/09/2023 07:14, Tomer Maimon wrote: > > > > >>> - nvidia,tegra20-ehci > > > > >>> - nvidia,tegra20-udc > > > > >>> - nvidia,tegra30-ehci > > > > >>> @@ -325,6 +326,20 @@ properties: > > > > >>> type: boolean > > > > >>> deprecated: true > > > > >>> > > > > >>> + nuvoton,sysgcr: > > > > >>> + $ref: /schemas/types.yaml#/definitions/phandle-array > > > > >>> + items: > > > > >>> + - items: > > > > >>> + - description: phandle to syscon that configures usb phy mux. > > > > >>> + - description: offset of usb phy mux selection. > > > > >>> + - description: mask usb phy mux selection. > > > > >>> + - description: value usb phy mux selection. > > > > >>> + description: > > > > >>> + A phandle to syscon with three arguments that configure usb phy mux. > > > > >>> + The argument one is the offset of usb phy mux selection, the argument two > > > > >>> + is the mask usb phy mux selection, the argument three is the mask usb phy > > > > >>> + mux selection. > > > > >> > > > > >> Sorry, you miss phy driver. Don't use syscon instead of proper hardware > > > > >> devices. > > > > > Sorry the role of nuvoton,sysgcr property is to handle a mux between > > > > > the different devices and not the handle the phy itself, handle the > > > > > mux done in the GCR. > > > > > Should we move the nuvoton,sysgcr description to another place in the > > > > > ci-hdrc-usb2.yaml > > > > > or > > > > > Should we use a different driver to handle the mux and call it from > > > > > the ci-hdrc-npcm driver, If yes which driver should we use? > > > > > > > > What is an "usb phy mux"? > > > We have USB phy that could be connected to USB host (different driver) > > > or it can be connected to the UDC driver(ChipIdea) > > > > Isn't that just role switching? There is a driver framework for that in > > drivers/usb/roles/. Though it doesn't seem widely used yet. > > > > Rob Best regards, Tomer