From patchwork Wed May 6 07:50:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1284156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=heoIEtYi; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49H80b39ccz9sSr for ; Wed, 6 May 2020 17:50:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7BEF081E98; Wed, 6 May 2020 09:50:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="heoIEtYi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F2C6581E98; Wed, 6 May 2020 09:50:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 A364A81C75 for ; Wed, 6 May 2020 09:50:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jagan@amarulasolutions.com Received: by mail-pf1-x442.google.com with SMTP id f7so582282pfa.9 for ; Wed, 06 May 2020 00:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=iQ3nIJxJLce/t/uR84gAbO4APCoR2Xl1NH4LAypUwwM=; b=heoIEtYigaKwf+3LfGwquUKOACsPlsmt4Rg4ChkVXcaQjwWaemFo4dS/fEIpGNeT0e y7Gp0Awry3LwpLJkU9tLkA9XhjAdWVv2cpA//hM3xQWi74EqhK7p0XnRRrjYUoNZqZ14 FUPkCU7Nz5LYkoChHKgYBVYeue1HgE5JmDbIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iQ3nIJxJLce/t/uR84gAbO4APCoR2Xl1NH4LAypUwwM=; b=MCW/uJl4i75mRHp7fJzzgDQfihz+NzBE0qbmkEjb8zgkSiZ1OahmyaVG5pEs+SE0pA fLLQzEHOvj3wWV3yWnvatjbQMW4J2wYLjt9ZBVize8zO1FGli9auYnmUulrZdHrHOrxt yF0Q7aELLOCP0ZvwtQsHD+Ou74+scZe4zNQRnja7tZp38WGN2Vu76CXkhkzInZOsSyIA t7/khH+2qSioZ0ZshwCJM0pKRguqL9Bpen6ob0WFLYFHxaJrnioK3DPjFIwr3qJb4ojR pMkztDYvkPw3C2UQx3C+jTPWN4l1PrgD9gPSiBB9RJldidbDK1pMRW4qrZ4R/ML/jkDG DN/Q== X-Gm-Message-State: AGi0Pubj6kVuJm2NVYuMvy0tRjy6ri7oe657KOrLq7ukFwW0kYzlnFqG Av7KGaBOToqm0EvZF10imwfttQ== X-Google-Smtp-Source: APiQypJ7aWydM8MLynF9h59sGTMmBJ6h+tU4i+KMNcW+iFaD5uELvxacykqjqDaM1pFqrbES6KPF1Q== X-Received: by 2002:a65:4c41:: with SMTP id l1mr6008887pgr.43.1588751443810; Wed, 06 May 2020 00:50:43 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:c598:8eeb:af7:7f36]) by smtp.gmail.com with ESMTPSA id y186sm1011133pfy.66.2020.05.06.00.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 00:50:43 -0700 (PDT) From: Jagan Teki To: kever.yang@rock-chips.com, philipp.tomsich@theobroma-systems.com, Simon Glass , Frank Wang , wmc@rock-chips.com, chenjh@rock-chips.com, heiko@sntech.de Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, Belisko Marek , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 0/7] rockchip: PHY drivers (USB) Date: Wed, 6 May 2020 13:20:18 +0530 Message-Id: <20200506075025.1677-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This is next following series from previous PHY drivers on rockchip [1]. And also tested on top of Frank 'USB 3.0' series [2] from patches 0/9 to 6/9. With this USB 3.0 Host port seems to detecting USB storage but need more testing on other modes as well. Log on rock960 and NanoPC-t4: rock960 => usb start starting USB... Bus usb@fe380000: USB EHCI 1.00 Bus usb@fe3c0000: USB EHCI 1.00 Bus dwc3: usb maximum-speed not found Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 scanning bus usb@fe380000 for devices... 1 USB Device(s) found scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found scanning bus dwc3 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found rock960 => usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) u-boot EHCI Host Controller 1 Hub (480 Mb/s, 0mA) u-boot EHCI Host Controller 1 Hub (5 Gb/s, 0mA) | U-Boot XHCI Host Controller | +-2 Mass Storage (480 Mb/s, 200mA) Generic Mass Storage 789CDB36 => usb start starting USB... Bus usb@fe380000: USB EHCI 1.00 Bus usb@fe3c0000: USB EHCI 1.00 Bus dwc3: usb maximum-speed not found dwc3_of_parse: In Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 Bus dwc3: usb maximum-speed not found dwc3_of_parse: In Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 scanning bus usb@fe380000 for devices... 1 USB Device(s) found scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found scanning bus dwc3 for devices... 1 USB Device(s) found scanning bus dwc3 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found => usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) u-boot EHCI Host Controller 1 Hub (480 Mb/s, 0mA) u-boot EHCI Host Controller 1 Hub (5 Gb/s, 0mA) U-Boot XHCI Host Controller 1 Hub (5 Gb/s, 0mA) | U-Boot XHCI Host Controller | +-2 Mass Storage (480 Mb/s, 200mA) Generic Mass Storage 789CDB36 [2] https://patchwork.ozlabs.org/project/uboot/cover/20200430021620.25772-1-frank.wang@rock-chips.com/ [1] https://patchwork.ozlabs.org/project/uboot/cover/20200430214529.18887-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (7): clk: rk3399: Enable/Disable the USB2PHY clk clk: rk3399: Set empty for TCPHY assigned-clocks clk: rk3399: Enable/Disable TCPHY clocks phy: rockchip: Add Rockchip USB2PHY driver arm64: dts: rk3399: Move u2phy into root port phy: rockchip: Add Rockchip USB TypeC PHY driver usb: dwc3: add dis_del_phy_power_chg_quirk arch/arm/dts/rk3399.dtsi | 108 +-- drivers/Makefile | 1 + drivers/clk/rockchip/clk_rk3399.c | 38 + drivers/phy/Kconfig | 1 + drivers/phy/rockchip/Kconfig | 21 + drivers/phy/rockchip/Makefile | 7 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 312 +++++++ drivers/phy/rockchip/phy-rockchip-typec.c | 796 ++++++++++++++++++ drivers/usb/dwc3/core.c | 6 + drivers/usb/dwc3/core.h | 1 + include/dwc3-uboot.h | 1 + 11 files changed, 1238 insertions(+), 54 deletions(-) create mode 100644 drivers/phy/rockchip/Kconfig create mode 100644 drivers/phy/rockchip/Makefile create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb2.c create mode 100644 drivers/phy/rockchip/phy-rockchip-typec.c