From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09805C48BC2 for ; Sun, 27 Jun 2021 20:26:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFB7F619BF for ; Sun, 27 Jun 2021 20:26:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFB7F619BF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QEm77RmFXZWO+HMMJehnrdMNNt9+BmBg6ef2Noa8t/c=; b=oJxAhYr3vOJgh2 PiaFaeEpu4yQLIGbwQhygr6kxMIb6v7h/NtPtoc52L47yXRUGBlwKPByIR0T5OZmLDxiP8JV9HAIz Zm9YSGeEEj+QUzR9lnU2y8nf7+f7AUCbnDyXVMTuITrGoG+1NOJ6qlt0+rDnZ/VO1ZAAaQzl3pfL5 F7qPaA6M6xkP74QTsfo+c+d93CXQrwvFKJpp/jESjpslbLlG2dkIdQU4+xMFLa7qj+wP2mXdtWVE7 v2+kO1VK2+9xyPutHjnrX61vSrOHF75BGgUN8vwd7h1GMSvW5sQXo2OHqjn9a6M35Z80b3mKkR/iJ pk2JhNHy3iTl0lS8tf9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxbLq-0066UN-CV; Sun, 27 Jun 2021 20:25:58 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxbLd-0066T2-MJ; Sun, 27 Jun 2021 20:25:47 +0000 Received: by mail-ed1-x529.google.com with SMTP id m14so22250293edp.9; 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=Fo1b5jJe+U2YSvB0Zbb0c9lfIZS1kueT0/V0AF9HVeI1lQzV3WFlOCfxFc9rYlZyrT xGS1olJwTwUzORl9KVRRqqwMDuw58+4QRtjUte9z8vzcolxy5vYLop1KLpsd+cy6PiT+ kilcYYWI8skZgi1haVdr24w9fgeLywKkZrHUHi32sZf37e/1qSfCuJNBd6aorbP+c1a2 Y86wb6N09dhTzFowK3lug6p9mAoTW3LaCGtFTU7Zaj54OAMDxhtrVMzM8xVD+VgaxUoL 7VzThmXbcP98qtg97nQ3Lb4X4S3bQ5iOgYtoxv0D+8iiJjNSpDlyF+ifOBHAGCysBYWS NWTQ== X-Gm-Message-State: AOAM532BsZKgWjHuAWqWCphK702weKHQDppVgiZ5pCb7PRzZcC28v/6y XcHUVEAorVnI1yPewZdwKklUqx8JcuXieEEuHbM= X-Google-Smtp-Source: ABdhPJwr6Rc0LaKsO2ZI8Ag1Z2/TERum8nYsgvoqHGVvdsLrKU5BtJjQMKrI5h5ju+ajrEHfzhORg4vRB8Jzcur/CDw= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210627_132545_829463_F4858734 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,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.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0380CC49EAB for ; Sun, 27 Jun 2021 20:25:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCC9761AC0 for ; Sun, 27 Jun 2021 20:25:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231582AbhF0U2L (ORCPT ); Sun, 27 Jun 2021 16:28:11 -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-Google-Smtp-Source: ABdhPJwr6Rc0LaKsO2ZI8Ag1Z2/TERum8nYsgvoqHGVvdsLrKU5BtJjQMKrI5h5ju+ajrEHfzhORg4vRB8Jzcur/CDw= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EB76C48BC2 for ; Sun, 27 Jun 2021 20:27:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3198961AC0 for ; Sun, 27 Jun 2021 20:27:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3198961AC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lmw0WwTu3F9i09GDosVakOESwi6tcJNfVl/l2Ta6G3s=; b=FPqqVB0ZLs9AWf pGk4HaJIuJNUCdPJKkkmf9ZH9w2WQPPBS4469TbbC1fwo9qZ1tdUOKLy0ew3BDL3q59qjnoUwjbLX YStlKHjo8vPj+2S6fB4yEC9tqDd8RuHujS57QbPObW19VGVfLlXOkyxs9lGtK8Vdee7GjdVsfR/AD B+kMQER9vry2xJZsJHMSpadVrt3RRkJuVHYzq7Gb5xFnToldi7F5x+L7dVN0y36h6CcClx9c6ERnS 7zeePsref4VDxg3FcPl5DX38GAdsOGIW3bk6MVGGiNi/Y2fxFScHLwGEO6Uc5ir/DIEhdXNP5ka35 JmnpG53o4swri3kygYEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxbLh-0066Tk-KQ; Sun, 27 Jun 2021 20:25:49 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxbLd-0066T2-MJ; Sun, 27 Jun 2021 20:25:47 +0000 Received: by mail-ed1-x529.google.com with SMTP id m14so22250293edp.9; 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=Fo1b5jJe+U2YSvB0Zbb0c9lfIZS1kueT0/V0AF9HVeI1lQzV3WFlOCfxFc9rYlZyrT xGS1olJwTwUzORl9KVRRqqwMDuw58+4QRtjUte9z8vzcolxy5vYLop1KLpsd+cy6PiT+ kilcYYWI8skZgi1haVdr24w9fgeLywKkZrHUHi32sZf37e/1qSfCuJNBd6aorbP+c1a2 Y86wb6N09dhTzFowK3lug6p9mAoTW3LaCGtFTU7Zaj54OAMDxhtrVMzM8xVD+VgaxUoL 7VzThmXbcP98qtg97nQ3Lb4X4S3bQ5iOgYtoxv0D+8iiJjNSpDlyF+ifOBHAGCysBYWS NWTQ== X-Gm-Message-State: AOAM532BsZKgWjHuAWqWCphK702weKHQDppVgiZ5pCb7PRzZcC28v/6y XcHUVEAorVnI1yPewZdwKklUqx8JcuXieEEuHbM= X-Google-Smtp-Source: ABdhPJwr6Rc0LaKsO2ZI8Ag1Z2/TERum8nYsgvoqHGVvdsLrKU5BtJjQMKrI5h5ju+ajrEHfzhORg4vRB8Jzcur/CDw= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210627_132545_829463_F4858734 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5577EC48BC2 for ; Sun, 27 Jun 2021 20:25:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0620861C20 for ; Sun, 27 Jun 2021 20:25:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0620861C20 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tIR52G2E80Y5kLOawyKIQDs+Rg+ahePrKIeEeOJaI3c=; b=xtxsoaQ4gUfN9p r9+RUFZzzvFRD021CVEIMLHPSifIoY0o00CrGvHE7qYelbFyJpYElybhU8VYPel9gCXMX/ar2+Z07 C5ALE6tDCMM1N0smrbQmJ2BliuwpY+4eyE2W3mKJEdHvBYHDPbIOOgnDL3RnDDcJxSbFK25LVNHQk ZqZNpDN837XN7QkR7vwwmuprm6JgIc6cImayTLNxc8BF5n+4Wi4AKUZwij2bhxzC1PKIehXMTmRxx 33W7WFeVJ/7K62LzXxiS8+mpDcrQMkjbjan68q4TZBhk4SwHnbC4NzDC+YuCfkhwLFjElo98qXYHp RREoP8Eca/0QWYhin9nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxbLg-0066Tf-Gt; Sun, 27 Jun 2021 20:25:48 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxbLd-0066T2-MJ; Sun, 27 Jun 2021 20:25:47 +0000 Received: by mail-ed1-x529.google.com with SMTP id m14so22250293edp.9; 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=Fo1b5jJe+U2YSvB0Zbb0c9lfIZS1kueT0/V0AF9HVeI1lQzV3WFlOCfxFc9rYlZyrT xGS1olJwTwUzORl9KVRRqqwMDuw58+4QRtjUte9z8vzcolxy5vYLop1KLpsd+cy6PiT+ kilcYYWI8skZgi1haVdr24w9fgeLywKkZrHUHi32sZf37e/1qSfCuJNBd6aorbP+c1a2 Y86wb6N09dhTzFowK3lug6p9mAoTW3LaCGtFTU7Zaj54OAMDxhtrVMzM8xVD+VgaxUoL 7VzThmXbcP98qtg97nQ3Lb4X4S3bQ5iOgYtoxv0D+8iiJjNSpDlyF+ifOBHAGCysBYWS NWTQ== X-Gm-Message-State: AOAM532BsZKgWjHuAWqWCphK702weKHQDppVgiZ5pCb7PRzZcC28v/6y XcHUVEAorVnI1yPewZdwKklUqx8JcuXieEEuHbM= X-Google-Smtp-Source: ABdhPJwr6Rc0LaKsO2ZI8Ag1Z2/TERum8nYsgvoqHGVvdsLrKU5BtJjQMKrI5h5ju+ajrEHfzhORg4vRB8Jzcur/CDw= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210627_132545_829463_F4858734 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy