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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1E36C05027 for ; Sun, 19 Feb 2023 19:49:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 546C482A24; Sun, 19 Feb 2023 20:49:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="KabR2too"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4104481F59; Sun, 19 Feb 2023 20:49:03 +0100 (CET) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 08FDF8572C for ; Sun, 19 Feb 2023 20:49:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chf.fritz@googlemail.com Received: by mail-ed1-x533.google.com with SMTP id ek25so4110371edb.7 for ; Sun, 19 Feb 2023 11:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:reply-to:from:subject:message-id:from:to:cc :subject:date:message-id:reply-to; bh=o+Q9W2tOUnFV0qa2SfzMVEmSOxzGTEkCkQfPzB2SVlU=; b=KabR2tooPnt5AWf+Gh+RqkQDbRk+uHVhketnDflUvB8pY8vWAosnS/0Yos23gr4cWh fP5LCNdMZYpQDm7FjpVzEGrzXZpoX9tcV0QLVEm5u7oNihZo6FvjnfBdKtMev+M/xp+o u5cwS5KdHvkrdBQ1QndoZvF2wBiDbPVdBt+Kt9Zq5uJJtnNEtW3knR8t5BES3Wrkn6ck HJih95ThFBSuERyRS3OjZEHTtHfj0VVRxOK0g67gg9MbxE+SC1ssXf+uc9xTvrhmGMjH oUdMv2BA/mI8KurTfa0Id4ii7qbuUG2RIcr1fpsx2ZX769rl93/caVmZOFQY+QYgpmPm +RZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:reply-to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o+Q9W2tOUnFV0qa2SfzMVEmSOxzGTEkCkQfPzB2SVlU=; b=v+D1bAL/4+TfN6Mb/vRMKUhaEfNzyoZ/0LMnVJ0Z5MC8tF1PjOnerZ/YmWM9Gj1GjZ fzVAths9L3UWTL+9QL5O65Qg3ZYDnUj9VP18Zl/5q7u/gpxflPzNFaYQQzT2e2acJcj0 IJV7iJgoYn6eCP7xZ4gpqxZYNuDbTJheYtDwihM59UvHFocCL+Zo0n0OHyxRQ5CpQhrg MoOAE2eJ++Hw6gDtj0yziwMNQFRJXDT5rlUqDvEy9D97qaPqe6KJIk0H+AKqBIrkyq+h yRtk1P5JdrcB4c3vjBEkUzQNuGPOwruceQjF+px5WxCqvk9CvxxV0r0yR5ZpiwPrjaGY U+WA== X-Gm-Message-State: AO0yUKVBMLQq0yJADQ7qJ4nbVr50+PmhPYSy/bsWqLBJl+HK1Fo/voiy PTs/UnwzZR70WOsIpDJb+BE= X-Google-Smtp-Source: AK7set+a0jGSJCEfAfiVT9HstL6vhz6FegAvIhC9TxLVQPw+R9khDdA5znHGJjBNnmbup2sh9F2V5g== X-Received: by 2002:aa7:dcce:0:b0:4ad:7a9f:a9f0 with SMTP id w14-20020aa7dcce000000b004ad7a9fa9f0mr308675edu.22.1676836139427; Sun, 19 Feb 2023 11:48:59 -0800 (PST) Received: from mars.fritz.box ([2a02:8070:b80:7760:b352:6d7:c693:9659]) by smtp.gmail.com with ESMTPSA id m30-20020a50d7de000000b004acc61206cfsm395662edj.33.2023.02.19.11.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 11:48:58 -0800 (PST) Message-ID: Subject: Re: [PATCH v4 0/2] arm: dts: rockchip: rk3399: usb: ehci: Fix EHCI probe in rk3399 to access peripherals by USB 2. From: Christoph Fritz To: Xavier Drudis Ferran Cc: Simon Glass , Philipp Tomsich , Kever Yang , Lukasz Majewski , Sean Anderson , Marek Vasut , u-boot@lists.denx.de Date: Sun, 19 Feb 2023 20:48:57 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1+deb11u1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: chf.fritz@googlemail.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hello Xavier > The first patch in the series (identical to v3) just registers usb2phy > as a clock driver (device_bind_driver() didn't work but > device_bind_driver_to_node() did), without any specific operations, so > that ehci-generic.c finds it and is happy. It worked in my tests on a > Rock Pi 4 B+ (rk3399). > > Since Marek Vasut objected to an operationless driver[4], the second > patch adds enable and disable operations adapted from linux prepare > and unprepare operations (and round_rate(), which doesn't seem very > useful anyway since it's a fixed clock). Since there're no users of > this clock in u-boot, I can't see any difference in my tests with only > the first patch or both, so I can't be sure it really works if it's > ever needed, but it's hopefully more complete. > I have tested both of your patches on an rk3399: without patches applied: | starting USB... | Bus usb@fe380000: ehci_generic usb@fe380000: Failed to get clocks (ret=-19) | Port not available. with patches applied: | starting USB... | Bus usb@fe380000: USB EHCI 1.00 | Bus usb@fe3c0000: USB EHCI 1.00 | Bus usb@fe800000: Register 2000140 NbrPorts 2 'usb stop' still makes u-boot hang, but with your patches applied following output gets printed before: | => usb stop | stopping USB.. | device_remove: Device 'usb@fe380000' failed to remove, but children are gone | device_remove: Device 'usb@fe3c0000' failed to remove, but children are gone Without CONFIG_USB_EHCI_HCD 'usb stop' works just fine. Thanks -- Christoph