Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2938165pxv; Sun, 27 Jun 2021 13:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS5kKfPlwz+GF/aGmHh/Z0Vn+Wzfv3NwFTo6WcSjERnMj5ImAxEHWGWyh0jxRTepai3ZmB X-Received: by 2002:a17:906:cc59:: with SMTP id mm25mr21110039ejb.331.1624826672383; Sun, 27 Jun 2021 13:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624826672; cv=none; d=google.com; s=arc-20160816; b=tENaT25MiF1G/T+vO+z+N1MUkhm7b9eo6PlRWh6cVNHOIe+drryQXh09lxAF+H+SI8 Fh2ZNgXeINItVXq0Jy7wbpnrfctegtNyPtiZYdWnvP5QDpftpXtQk/1M2OvyIf2zVibL +Njfdu1ofKCsLE43BAbEm0rixlm7wQvPn84yuuPRS1A+OWkOxW++WLo8VG6sGyln8fT9 9Sh1GrvPIKaPXUDqi2qmFUGC7wv/mkBFXF6I9vyxG2X/nCupH4kAayk98d0ZC2cOSorT qAjbT18GCSbVFpmiVCBn34sN5QoAqeKX5op3CxYCE5iMpTInq1W/5cDkBB46bxCSrpQn xBLg== 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=e/Zn1I2M+Wt1TmihQs535Y+fjsrSFYX9XLAbFt7QxGI=; b=mTFWnhdaXYIE707gHnU5eN7S5J4ftPMzeDcQkghv09rvqi9huevwG8V6Acuy7bdFo4 +rRvuaVEGtsxjj80Pt8FJUFVdnPVKvzUYH7Fjyk7TlKY42uvMME2GOXmcjhWRRoHo6t0 Ybk0+TQwjg+2gZwpFurIXiGNikFu3npJPPjFdL00uTh3QNhm4CZ2EtAuTsHVIrDBl66Z Gt55gEXKxVw70X02WxygTmIamFlb3rIOApDjCOtOqI747r73RmZPQbjkuN/PToQC1ISi WK9avMEPcsP6l+nPos/lb/sT+MkU6duv/WB+mCvxRvs774wA2fNn/s/AAEpncAzRGD71 e86A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=mQU+QpAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si12386180eds.371.2021.06.27.13.44.08; Sun, 27 Jun 2021 13:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=mQU+QpAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231566AbhF0U2K (ORCPT + 99 others); Sun, 27 Jun 2021 16:28:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbhF0U2K (ORCPT ); Sun, 27 Jun 2021 16:28:10 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8776EC061574 for ; Sun, 27 Jun 2021 13:25:45 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id c7so22231533edn.6 for ; Sun, 27 Jun 2021 13:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e/Zn1I2M+Wt1TmihQs535Y+fjsrSFYX9XLAbFt7QxGI=; b=mQU+QpABF4SUnwGx7zw4zY0rpx9/ZaLTR2ImzkDUwpnixcF/AYS2w+8NYxUUor+e/0 EH+Fp9fNRXUNwZ3aDNLgl7V+SlqTJpW57h+W/XRlTc9tgGJQxETpA/SsvoMepiW1ZJ+n CIT8MQPzvJlEGukHWj33UVrCGvFV9S0J/7KH1R7rJ18G5ExTfVGD8M++f/13cNP6Yp43 ILyiurn7sqDk/4kp22q426Dn57jvrTkkGU2U1Tcq3r34tHHccLcLZdS9CuOY0W9HWHq3 +cgqB5zRX/2Lmlp/vYaaXQrEBZhVaZ0L4u7nhgdqaW0tTq3wxSkptTXjMIuRxdyMSvES XTYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e/Zn1I2M+Wt1TmihQs535Y+fjsrSFYX9XLAbFt7QxGI=; b=Z5v2Ov5vdXs+85farSq/kMaHAq4DZwH9U9mZSIYFYdSrboGgiRYSFfl7aM4tII48gD rEug+hEjcmc1FikntG8JMkkUfiiY6pLBBGGZMr7r0Sfrj5dMBm1pmcyCAnJq47st3shm 4WsjWDM/7igcs1hSnkU1PDs6P/IcBpp2SNATELEoF3W5Z2ZU1CJCiYsofdpeH6vHzAJX vGn2fgURmgY+AFoTQALWN2BX/ed1L0cf4RB1lmA7vl8g3eraidv3Vh9dUf9YxpctlWg/ hEnhxhaXewDNAzrPjbVcskVeDxkQXqzax8Rxfl9rdCFk10CbPzN0yS/gjGGsoex7VN9h X2Aw== X-Gm-Message-State: AOAM533bisgxjW8i4GZNmo1T/TlaOKePGWfGXFYxHh0o3CfVSgyxd6y/ jyfVp8PHJntAKzvfnb6NjPEd/DSAnBoJh8e0Rns= X-Received: by 2002:a05:6402:706:: with SMTP id w6mr28300727edx.176.1624825543911; Sun, 27 Jun 2021 13:25:43 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-7-linux.amoon@gmail.com> In-Reply-To: From: Martin Blumenstingl Date: Sun, 27 Jun 2021 22:25:33 +0200 Message-ID: Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function To: Anand Moon Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel , linux-amlogic@lists.infradead.org, Linux Kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anand, On Sun, Jun 27, 2021 at 10:07 PM Anand Moon wrote: [...] > Sorry for the delay. > We could switch the reset logic to > *devm_reset_control_get_optional_exclusive* as below > to fix the reset line, since both the dwc2 c90c0000.usb and c9040000.usb > will have their own context to reset control register, it means the > reset line is not share > between two USB PHY nodes. This is something I don't understand. As discussed in our previous mails reset_control_reset in case of the USB PHY driver (which uses the RESET_USB_OTG reset line for *both* PHYs) is equivalent to the following code in the vendor kernel: aml_cbus_update_bits(0x1102, 0x1<<2, 0x1<<2) We have two PHYs but only one reset line. So in my own words I describe the reset line as being shared. > > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > + priv->reset = devm_reset_control_get_optional_exclusive(&pdev->dev, > + "reset"); Have you boot-tested this? Without any .dts changes this will return NULL because there's no reset-names = "reset"; in the .dts(i). If you replace "reset" with NULL then I assume that the second PHY will fail to obtain the reset line because it's shared between two devices but we're trying to obtain it exclusively for both (PHYs). Best regards, Martin