Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5029120pxj; Tue, 22 Jun 2021 13:29:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1kE7kq9/cMPVS151FZTGuiMySsE5woLAgbzKEowkLio4pkeUOQEvYw8PRC+CpOZ0gKzX9 X-Received: by 2002:aa7:db94:: with SMTP id u20mr7574760edt.381.1624393768225; Tue, 22 Jun 2021 13:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624393768; cv=none; d=google.com; s=arc-20160816; b=LUm0bFqsovJlPAAhuvanIgYnT/iQFgkzOEGcWFxdtBtlD8/uNE70Q+znTicWxWDh3W 6IV2TJyHxjifxqj8My4XKlfxositNBUWAC3+qrVgQ0k2QITzepIBl+TBht2BH/z2aQ95 rR97jJTZkeySwWwuqulUF8ZfWrPeVYKYKuPh9EQeybDWtgqJ79/PjQ1YJPxSAkentkrm O/FRMvStJNpEWW2j4YhFoy4UXa7dj1MrUVj79LZPIZppZd+3pn124sJG0al9KuQbB1CU Jfd9D55qMG6Y9LdC/iXK4dtR5zfk+r6UN/8SPS0oPEGW0rLQGxYcbfP8pR4MdLhzWzEW 4uhg== 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=X5CvNIGn+uveqQuIQS4du1ZTZMasSyyQsp7zluQgLD0=; b=pudH+FlLaVXaDKM0+DKgauPpj7wPnb4oFGUatYfcXXN0MAJ1BKpP+854ANi2mMPFKc IqZTEvt1kQIQROxzTdxu1wLjZaqt92gK2GGAfQ4OkY2+dB0cHcaHnXzwbhbKevCCszAN CijQ+48V0YalpJALVXzUAXGMIw5kyOeg1DSkkPg+LegO/DaNQ+PiQh1d728MQ73YcGCw ObL28RQYJovSZJpT4hKW0ADtnESbxufBN3kNbMo+pSE26aIoGSbJVTc+x9VXnwtoEtVn W1TbfjTwZ/VQaQ4+WMOjEcppN4tjECTn8uj+Lf21PST7+Uhn5vUPYnWb2ouO+FW+F46R C71Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=WciAeMDK; 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 q5si18480698edh.492.2021.06.22.13.29.05; Tue, 22 Jun 2021 13:29:28 -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=WciAeMDK; 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 S229769AbhFVUa2 (ORCPT + 99 others); Tue, 22 Jun 2021 16:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbhFVUa1 (ORCPT ); Tue, 22 Jun 2021 16:30:27 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EB40C061574 for ; Tue, 22 Jun 2021 13:28:10 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id m14so458727edp.9 for ; Tue, 22 Jun 2021 13:28:10 -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=X5CvNIGn+uveqQuIQS4du1ZTZMasSyyQsp7zluQgLD0=; b=WciAeMDK5MbomldMgX1vfqrUSPoIknmeADksmKJHf5vbClibwq6GSyQ7cK20HRctwb lESv/vzkxrRUDEyqIV+eRdPuWTa+ms8dKvrqKcL7hdPbSzWTE3WGQgkYCZyp+XxZV7Au X8/tHUVuMXfa/LaUfVFxuXxVznGVWmilATFg+LcMScJ7Fn0b2HUhOz94YTZjGfa9g5zH hHleS38ZfNJ62kzmN24LE9J0EzPPqCJNbUlDJV1SfvoqID9Aw3g6IBenHBVEJl4/lItK yC08xKEMbGMmGRQV6FY7v5KugN/g7VZhcROmj8H1Z4CHi5Hu6PRIQr/fcfQHK2dPx5fD GkGQ== 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=X5CvNIGn+uveqQuIQS4du1ZTZMasSyyQsp7zluQgLD0=; b=PKPlIQOqnq5WFX7f0c7/EbM1fhPedyqOEjGO6+Gxd1jVaB8lwR/SLLb86WMiEM4rN1 vrBCV4SNwAMzfxLKC3cMwyzGnkNqMsAc37sdMOEUmh8eoFeyQXjG8qmp9SeEwlxTjsSr pr/AVOKGxBg2J1Gis4a241hSm9MuAvMVCtfY+ynABWOl/Zg9OoTIhHRS0DmvguWSbXG2 RNbJS689AS908UxT5Htc4sK++pVM6wYERkJzI1kyUAy43XxdIVaEThmN67Sd9Pn4sGf9 9NenCmJT1BRmtdjgftXjkqhzxIHTXacFIyWJLjrzLhsAHTyGrOAViW6/07zBAh4tVnmp F8Tw== X-Gm-Message-State: AOAM531P2o3VzrH4Bzfey8XPrHneSyqanNjNs8ly1s6chJqpt2HnsDbT tGAB6SL9+wlCLj61x+4x4Xqeqdb7bv/NcOGbtQQ= X-Received: by 2002:aa7:d74b:: with SMTP id a11mr7669139eds.40.1624393688890; Tue, 22 Jun 2021 13:28:08 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-5-linux.amoon@gmail.com> In-Reply-To: From: Martin Blumenstingl Date: Tue, 22 Jun 2021 22:27:58 +0200 Message-ID: Subject: Re: [RFCv1 4/8] phy: amlogic: meson8b-usb2: Use phy set_mode 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 Mon, Jun 21, 2021 at 9:20 AM Anand Moon wrote: [...] > In order to enable USB phy we probably need to do a little bit > differently than the vendor kernel. I agree with you here, the vendor kernel is skipping most of the frameworks which we have available in mainline Linux > OTG port on Odroid C1+ and Odroid C2 server two purposes > 1 > It could act as USB host port. > 2 > It could be used as USB power on the devices, just like Raspberry pi. > What I meant is we need some driver code to protect the power to SbC. yep, so we need something that controls mode switching depending on the mode the VBUS regulator needs to be enabled (HOST) or disabled (DEVICE/PERIPHERAL). VBUS control however is not part of the PHY - in mainline Linux either the dwc2 driver or a USB connector driver are taking care of it. > So I saw your work on extcon, that's the reason I would like to void > any changes PHY right now. I believe that this specific PHY is unrelated to mode switching. Either it automatically detects the mode and changes it's settings internally or the PHY settings are the same for both modes. Since VBUS control is not the responsibility of the PHY this is certainly possible My changes are not ready yet but I'll ping you once I have something to test > I observe some failures like below. > [ 6.013859] dwc2 c9000000.usb: DWC OTG HCD URB Dequeue > [ 6.013897] dwc2 c9000000.usb: Called usb_hcd_giveback_urb() > [ 6.013902] dwc2 c9000000.usb: urb->status = -115 -115 is -EINPROGRESS but I am not sure if/when that's a bad thing or to be expected Best regards, Martin