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 9B7F5C48BDF for ; Fri, 18 Jun 2021 20:06:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D9EE613C2 for ; Fri, 18 Jun 2021 20:06:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232943AbhFRUJH (ORCPT ); Fri, 18 Jun 2021 16:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbhFRUJG (ORCPT ); Fri, 18 Jun 2021 16:09:06 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E059DC061574 for ; Fri, 18 Jun 2021 13:06:56 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id t7so10162086edd.5 for ; Fri, 18 Jun 2021 13:06:56 -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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=NkcH1LO5w4su6nqdC6W+7rrRp4CL85LjmCG4Xm9yjd68m/9Qu+lZD/z92BsQP8JIFT rnQNsTX5bLt9tO05Yg5lD58qMlFRQe0oFo0EXj81q5Y1UAXZ8vVNN+ZKY/7o0JumIp4g m6laKU+RGHL626SDXA0pPxO3WwVGtR55PmY3gLFLazY0NmL4tompZZnpUNvpZQitC/ac EIhxE/KEfCAzsZFF3hazazsBGqFPLd0qJTK5NZv8mQUXil25YRSS0XdtC1zjE1q/3ioh GzibQePBbyWvj3biOHS9oVhvWi0R6eXe0AgFA+CkVdTr80uIpkFzzpkpOlXCTf2mH66g UtUA== 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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=lnz+gtcpoHHPmkTCU+VGjrUu+D8IUdJ36tpKgHCBm4XQ7SCe0+H3xlJd6LZ4FoCwuN ZyS0ZpkV3JgJCoxVHtw69yl6U53Sm0FzU+8vCVA+XTS4WB+cx4JbDQGQtZMexuruqWo/ nsvQ56j4kkL6TgSam91T/SyLw7Ga2PsN38+R+h3BOaeQ7Rrbg8YQTy3L8doKrRpNUv68 2dThzAYTRydmXwLq4ijKAGr+vplOVBfdt6ZWM7ia4EsfAU79cVTB65MTkIoB7ObGoUSY ldGae5R8kirRdVSnPQd3ytt0ODhxsiGMY7eK+7oxDNcOK4EFDgLoWC5qazG+3v0rXVn8 1fPQ== X-Gm-Message-State: AOAM530x1kYMnEIjbgJmXhXbf3yt3IdwCr7fS7AXLMBJvsales/t6JD4 MlGzNUqwVJWMwVTCNX/T6qjPpYwv7cN7W0pRlaE= X-Google-Smtp-Source: ABdhPJy/eX13COPO4fwgWcbKjgdq/roFKgUhw73XmjuLqQVOrKeFvYgYKC+Ud97JzQ6PtlAQofSyde0mLEhzq7onpSI= X-Received: by 2002:aa7:c790:: with SMTP id n16mr7323619eds.98.1624046815446; Fri, 18 Jun 2021 13:06:55 -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: Fri, 18 Jun 2021 22:06:44 +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 Fri, Jun 18, 2021 at 5:33 PM Anand Moon wrote: [...] > > For shared resets (like the one we have here) reset_control_reset will > > only trigger the reset line once until all drivers using that reset > > line are unloaded. > > So effectively this new phy_ops.reset callback will be a no-op. > > I know his register is shared between two USB IPs, > but I have not observed any issues. have you checked at which point we're then actually triggering the reset? I assume that you will find that the reset is only triggered for the very first power_on/init call - which makes this patch effectively a no-op (yes, we're calling reset_control_reset then, but that doesn't mean that a reset is triggered on hardware level - see drivers/reset/core.c at around line 346). [...] > > > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > > > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); > > I think this breaks compatibility with existing .dtbs and our > > dt-bindings (as we're not documenting a "reset-names" property). > > What is the goal of this one? > > > > OK, If we pass NULL over here there is the possibility > USB phy will not get registered. I don't understand why - with NULL everything is working fine for me. Also no matter which name you give to the reset line (in reset-names), it will be the same reset line in all cases. If it's the same reset line before and after: why is this needed? 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.7 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, URIBL_BLOCKED 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 0C88AC48BE8 for ; Fri, 18 Jun 2021 20:07:18 +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 CAC3461284 for ; Fri, 18 Jun 2021 20:07:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAC3461284 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=p2dfTDnKMFES/q+UF4RzKhJ7ZkhwRKAIoxiGy3C+QLw=; b=nY1qsAXZheY1TN yQOrJ+eo7LOVjF0E1N6rxVmgiAkH3tzexTdN10usbybkjV9DAKMgkLmR+i75m5+ore8Me+wmv0xqu ukR2oByUnz4F8gMlACLdRZ2kP/CcZDSn6n2WS4y0tmvJcJ1YZcd+6XXuC3II5YPZl7UwRpB3BBfvU jQi5k7yMdc86iYUH1miVWjzbjo5tygEzbmIrzVEJdI95nqNsniYlSOrT5KNBwW1taFhtD/44NqyyG 0t9PefvPBbvyiV96KzS0Kul3G6K6g5B4078zsFLYhjstoMo58pBSNlQNOtvPHLtyRx7C22gcF/PoA MtsE22Ph1xvqPVcdEADA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKli-00FPeW-NN; Fri, 18 Jun 2021 20:07:10 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKlU-00FPcK-U6; Fri, 18 Jun 2021 20:06:58 +0000 Received: by mail-ed1-x52f.google.com with SMTP id df12so7693813edb.2; Fri, 18 Jun 2021 13:06:56 -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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=NkcH1LO5w4su6nqdC6W+7rrRp4CL85LjmCG4Xm9yjd68m/9Qu+lZD/z92BsQP8JIFT rnQNsTX5bLt9tO05Yg5lD58qMlFRQe0oFo0EXj81q5Y1UAXZ8vVNN+ZKY/7o0JumIp4g m6laKU+RGHL626SDXA0pPxO3WwVGtR55PmY3gLFLazY0NmL4tompZZnpUNvpZQitC/ac EIhxE/KEfCAzsZFF3hazazsBGqFPLd0qJTK5NZv8mQUXil25YRSS0XdtC1zjE1q/3ioh GzibQePBbyWvj3biOHS9oVhvWi0R6eXe0AgFA+CkVdTr80uIpkFzzpkpOlXCTf2mH66g UtUA== 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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=LeKlaR9YhZgmPNmdHhIrhlQXuVot25mWziFC+ObPpTf8nwtManNXcfV2pg2ZwzcrT6 dkCqiiEDuu4cM02lhRrtscM+YmTeoY9eic7E2gMPyNRHVXdBSit361W9OCsnabjXw9PP /ssjL9n3sbE8GzgkKnf/lDNUNsgyFbH8iU7pq79tdrcS0VA5ktry0G0SnaYrXrxLxe32 GtOgXMvazik3t8NwaJrmJDAoHncE2koYk5mZlzoaQ79GGFCwNS7CS3n2WcNhJ5RXdvGR lWe95nmtwsA/aopc9oHnycikn6LTYB8ps9Mq0DKN29rHI0cMeRoJCTbEIKqhZtPlu3a9 2VyA== X-Gm-Message-State: AOAM531+dlurFhiDFXQeBGrdoNcXhQEiYyPrK34BY4jK8AImsStL49XP dj4jPHp+lM+0y2r/f8Bp9WqJIWEJqbRBErGnpPY= X-Google-Smtp-Source: ABdhPJy/eX13COPO4fwgWcbKjgdq/roFKgUhw73XmjuLqQVOrKeFvYgYKC+Ud97JzQ6PtlAQofSyde0mLEhzq7onpSI= X-Received: by 2002:aa7:c790:: with SMTP id n16mr7323619eds.98.1624046815446; Fri, 18 Jun 2021 13:06:55 -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: Fri, 18 Jun 2021 22:06:44 +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-20210618_130657_031527_B02FBE90 X-CRM114-Status: GOOD ( 15.53 ) 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 Fri, Jun 18, 2021 at 5:33 PM Anand Moon wrote: [...] > > For shared resets (like the one we have here) reset_control_reset will > > only trigger the reset line once until all drivers using that reset > > line are unloaded. > > So effectively this new phy_ops.reset callback will be a no-op. > > I know his register is shared between two USB IPs, > but I have not observed any issues. have you checked at which point we're then actually triggering the reset? I assume that you will find that the reset is only triggered for the very first power_on/init call - which makes this patch effectively a no-op (yes, we're calling reset_control_reset then, but that doesn't mean that a reset is triggered on hardware level - see drivers/reset/core.c at around line 346). [...] > > > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > > > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); > > I think this breaks compatibility with existing .dtbs and our > > dt-bindings (as we're not documenting a "reset-names" property). > > What is the goal of this one? > > > > OK, If we pass NULL over here there is the possibility > USB phy will not get registered. I don't understand why - with NULL everything is working fine for me. Also no matter which name you give to the reset line (in reset-names), it will be the same reset line in all cases. If it's the same reset line before and after: why is this needed? 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=-0.7 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, URIBL_BLOCKED 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 5512CC48BE8 for ; Fri, 18 Jun 2021 20:07:00 +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 1D4F0613D1 for ; Fri, 18 Jun 2021 20:07:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D4F0613D1 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=aaTbKR+LnKoqSgQMrbBf4lUdBRZvfBV7A4th2gYwPCg=; b=ZnmR3bWVEGpfpg Zs5ufTXz3jnTwD35KL9cagDsyAFepZOnckvxYE+7TJuyoVSQkpeU3jKuOT9eCczfVUTENPu6wqz8A 7+hdI5XtqX5djJk4rWB7gMQojEP5C0XPSw7/O/0sbn+NYM840atck6qF/+eyTpiWcjsNxhAijPiAz YGY9OEAC3e9xtNvKMgv9JrR1AH2hWcsAS07OPGOepVM2n6AkTGIfCfFi/Vq3f5gqYjsi5isRzyZYy VoRrJleLS8oCdbOP0D9gWSYIL84SZtSKYKAJw1I+9OXgrWnzkl6UbKoJdBYrKtpyI5hfwn1/m98C4 zVCa/8q4qvrNmoco1ycQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKlX-00FPd1-IL; Fri, 18 Jun 2021 20:06:59 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKlU-00FPcK-U6; Fri, 18 Jun 2021 20:06:58 +0000 Received: by mail-ed1-x52f.google.com with SMTP id df12so7693813edb.2; Fri, 18 Jun 2021 13:06:56 -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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=NkcH1LO5w4su6nqdC6W+7rrRp4CL85LjmCG4Xm9yjd68m/9Qu+lZD/z92BsQP8JIFT rnQNsTX5bLt9tO05Yg5lD58qMlFRQe0oFo0EXj81q5Y1UAXZ8vVNN+ZKY/7o0JumIp4g m6laKU+RGHL626SDXA0pPxO3WwVGtR55PmY3gLFLazY0NmL4tompZZnpUNvpZQitC/ac EIhxE/KEfCAzsZFF3hazazsBGqFPLd0qJTK5NZv8mQUXil25YRSS0XdtC1zjE1q/3ioh GzibQePBbyWvj3biOHS9oVhvWi0R6eXe0AgFA+CkVdTr80uIpkFzzpkpOlXCTf2mH66g UtUA== 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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=LeKlaR9YhZgmPNmdHhIrhlQXuVot25mWziFC+ObPpTf8nwtManNXcfV2pg2ZwzcrT6 dkCqiiEDuu4cM02lhRrtscM+YmTeoY9eic7E2gMPyNRHVXdBSit361W9OCsnabjXw9PP /ssjL9n3sbE8GzgkKnf/lDNUNsgyFbH8iU7pq79tdrcS0VA5ktry0G0SnaYrXrxLxe32 GtOgXMvazik3t8NwaJrmJDAoHncE2koYk5mZlzoaQ79GGFCwNS7CS3n2WcNhJ5RXdvGR lWe95nmtwsA/aopc9oHnycikn6LTYB8ps9Mq0DKN29rHI0cMeRoJCTbEIKqhZtPlu3a9 2VyA== X-Gm-Message-State: AOAM531+dlurFhiDFXQeBGrdoNcXhQEiYyPrK34BY4jK8AImsStL49XP dj4jPHp+lM+0y2r/f8Bp9WqJIWEJqbRBErGnpPY= X-Google-Smtp-Source: ABdhPJy/eX13COPO4fwgWcbKjgdq/roFKgUhw73XmjuLqQVOrKeFvYgYKC+Ud97JzQ6PtlAQofSyde0mLEhzq7onpSI= X-Received: by 2002:aa7:c790:: with SMTP id n16mr7323619eds.98.1624046815446; Fri, 18 Jun 2021 13:06:55 -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: Fri, 18 Jun 2021 22:06:44 +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-20210618_130657_031527_B02FBE90 X-CRM114-Status: GOOD ( 15.53 ) 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 Fri, Jun 18, 2021 at 5:33 PM Anand Moon wrote: [...] > > For shared resets (like the one we have here) reset_control_reset will > > only trigger the reset line once until all drivers using that reset > > line are unloaded. > > So effectively this new phy_ops.reset callback will be a no-op. > > I know his register is shared between two USB IPs, > but I have not observed any issues. have you checked at which point we're then actually triggering the reset? I assume that you will find that the reset is only triggered for the very first power_on/init call - which makes this patch effectively a no-op (yes, we're calling reset_control_reset then, but that doesn't mean that a reset is triggered on hardware level - see drivers/reset/core.c at around line 346). [...] > > > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > > > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); > > I think this breaks compatibility with existing .dtbs and our > > dt-bindings (as we're not documenting a "reset-names" property). > > What is the goal of this one? > > > > OK, If we pass NULL over here there is the possibility > USB phy will not get registered. I don't understand why - with NULL everything is working fine for me. Also no matter which name you give to the reset line (in reset-names), it will be the same reset line in all cases. If it's the same reset line before and after: why is this needed? Best regards, Martin -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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.7 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, URIBL_BLOCKED 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 E3230C48BDF for ; Fri, 18 Jun 2021 20:08:47 +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 A7C35613C1 for ; Fri, 18 Jun 2021 20:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7C35613C1 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=pcVcblk/831AI35GTfUnQTtpHh6eiDDJXtCMMya0qCI=; b=B3V5Sr2IUbAgJW AIZHKvLrCImYpyahL2dRRtbcZGXqI++3MQVXlPfgCw51r/uFoskhyfFv43CKVZpyFtnIYrvjBggJF KSoSfCfxNEtb8yTFxIR4HqYNenNZsPbMBRMPCXC60WS6Lp6bVCKzeWv/8Pdwh+stbBi5oN6R47AXp zfMz/y8HwR39lQ5BZ7/0kdk0hGj3D8/BsgB6BmBihUcN63VM5CUW1Ix6wB22m3T/IuRvDouOPRib0 XEwVODusWW+/xZZCYUr5ER4oXcbNrRy8VSAW0t01afT344BpXhvslmVoaL8fg32yDxlJoHuxnl459 vPV8LVW8TO7yvfcgl1Xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKlY-00FPdB-Un; Fri, 18 Jun 2021 20:07:01 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKlU-00FPcK-U6; Fri, 18 Jun 2021 20:06:58 +0000 Received: by mail-ed1-x52f.google.com with SMTP id df12so7693813edb.2; Fri, 18 Jun 2021 13:06:56 -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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=NkcH1LO5w4su6nqdC6W+7rrRp4CL85LjmCG4Xm9yjd68m/9Qu+lZD/z92BsQP8JIFT rnQNsTX5bLt9tO05Yg5lD58qMlFRQe0oFo0EXj81q5Y1UAXZ8vVNN+ZKY/7o0JumIp4g m6laKU+RGHL626SDXA0pPxO3WwVGtR55PmY3gLFLazY0NmL4tompZZnpUNvpZQitC/ac EIhxE/KEfCAzsZFF3hazazsBGqFPLd0qJTK5NZv8mQUXil25YRSS0XdtC1zjE1q/3ioh GzibQePBbyWvj3biOHS9oVhvWi0R6eXe0AgFA+CkVdTr80uIpkFzzpkpOlXCTf2mH66g UtUA== 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=jd6Y9FdRbI8WadsWZ8AlDZHBohYqsQzy8vJ8yBRlmjY=; b=LeKlaR9YhZgmPNmdHhIrhlQXuVot25mWziFC+ObPpTf8nwtManNXcfV2pg2ZwzcrT6 dkCqiiEDuu4cM02lhRrtscM+YmTeoY9eic7E2gMPyNRHVXdBSit361W9OCsnabjXw9PP /ssjL9n3sbE8GzgkKnf/lDNUNsgyFbH8iU7pq79tdrcS0VA5ktry0G0SnaYrXrxLxe32 GtOgXMvazik3t8NwaJrmJDAoHncE2koYk5mZlzoaQ79GGFCwNS7CS3n2WcNhJ5RXdvGR lWe95nmtwsA/aopc9oHnycikn6LTYB8ps9Mq0DKN29rHI0cMeRoJCTbEIKqhZtPlu3a9 2VyA== X-Gm-Message-State: AOAM531+dlurFhiDFXQeBGrdoNcXhQEiYyPrK34BY4jK8AImsStL49XP dj4jPHp+lM+0y2r/f8Bp9WqJIWEJqbRBErGnpPY= X-Google-Smtp-Source: ABdhPJy/eX13COPO4fwgWcbKjgdq/roFKgUhw73XmjuLqQVOrKeFvYgYKC+Ud97JzQ6PtlAQofSyde0mLEhzq7onpSI= X-Received: by 2002:aa7:c790:: with SMTP id n16mr7323619eds.98.1624046815446; Fri, 18 Jun 2021 13:06:55 -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: Fri, 18 Jun 2021 22:06:44 +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-20210618_130657_031527_B02FBE90 X-CRM114-Status: GOOD ( 15.53 ) 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 Fri, Jun 18, 2021 at 5:33 PM Anand Moon wrote: [...] > > For shared resets (like the one we have here) reset_control_reset will > > only trigger the reset line once until all drivers using that reset > > line are unloaded. > > So effectively this new phy_ops.reset callback will be a no-op. > > I know his register is shared between two USB IPs, > but I have not observed any issues. have you checked at which point we're then actually triggering the reset? I assume that you will find that the reset is only triggered for the very first power_on/init call - which makes this patch effectively a no-op (yes, we're calling reset_control_reset then, but that doesn't mean that a reset is triggered on hardware level - see drivers/reset/core.c at around line 346). [...] > > > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > > > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); > > I think this breaks compatibility with existing .dtbs and our > > dt-bindings (as we're not documenting a "reset-names" property). > > What is the goal of this one? > > > > OK, If we pass NULL over here there is the possibility > USB phy will not get registered. I don't understand why - with NULL everything is working fine for me. Also no matter which name you give to the reset line (in reset-names), it will be the same reset line in all cases. If it's the same reset line before and after: why is this needed? Best regards, Martin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel