Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp465488pxb; Wed, 15 Sep 2021 06:14:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh6OUIKTpdf9pAEeSgx3PKHRYoqbCsHrUUiPWMp1XTFcA4iXA7G1n0duzvVP1c2D4AEDYB X-Received: by 2002:a17:906:5acb:: with SMTP id x11mr24540644ejs.514.1631711677807; Wed, 15 Sep 2021 06:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631711677; cv=none; d=google.com; s=arc-20160816; b=UGkvxVttFWzZW2LfChZa9otkcxTUIENZytdq2mJYqI/yOLLcub/+4BlUrideUway2K Vg1s/m0uTT8u5ULSgi+V6ARtJbMVkHM7rDaFJCd68cbRh4LGNCu5KOAoGrRiUQZZsfMI EhNQTPysfy5nTJMSer9iEW3VTcc7rkh8kDW8ofRSer8kad/RkqUT9+zPsgX+9YZPeBkq BKdA1tJzed0aJ26J3QYOHN6Pwho3obgZJ5/8JmQsosA0sANIOYx1rZCkqNsGLeZksYTG hbr55nkB2XSOERriR73sIptsx8gdK0BiZRW03LPpBxw9UP8dRG/yDjucf8l0IlaT4OFU XtyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KBbDubYEZkK4EyTpYjNurpjIgcG78KGxHFN1Bt0+Jx8=; b=gXWwf5hXXjq5cWI7sc5XqbUk2ZuqJJ0nWCqb/hG3PkdmpWylF6ntkyRXfbT4UOFsjr fbBeyfNluM1ldISlWiLASrBeOBJHu9x6eAsjZAa88nG3a4Ht+sXX9nCSwVCSIx9jERae KWm6eArKdnG2NKY0QBGxVyI9pYDGWrJOnUNkS6TVg4ohRrjCtSWsO+7Lgn20LXdRDsxl hiOAJBPyPbWwaRqXZdl3WsVC8vb/E893vhq5zyveWuihATFYDip5Kqcm2ecKkWvGUgQP HY3J7RZ1IjPXLL2f4HNMc1w2h15xrcw8BsuAHArJmWabX99T/QBC9po1F8N26dlHSTs4 GPfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nnxzt6Mk; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si16617560ejt.408.2021.09.15.06.14.12; Wed, 15 Sep 2021 06:14:37 -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=@kernel.org header.s=k20201202 header.b=Nnxzt6Mk; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233460AbhIONNr (ORCPT + 99 others); Wed, 15 Sep 2021 09:13:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:48786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233238AbhIONNr (ORCPT ); Wed, 15 Sep 2021 09:13:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D6A9960EE9; Wed, 15 Sep 2021 13:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631711548; bh=Tgj6lWad0kfmypMmQ8v100CX104+68bT6piB1POZn7c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Nnxzt6MkP7YiKDZqB2wuAHUa5ZLPfaNmsIEupx5IW23dL/E3ja+7mchQBgXEqy9LR XfFSyOF3g/4CP7Mm5oiKdisJvbz+XdytpqxT+KUJpMs6r7XPacjo9OWBycIMQaMG2D lbJG8gT824xCCbYmKdXos/u7pg3y/xMsyrLrk1HWGgOWLEopf9PWxNq0FK1gC0JTJg rbqN1OeDPISd553gqFuhtZ4BJZ0EUNyftWDCii3sXV750R7FWzLgm+a5oPBCwWHpba +LiZ4PGRD7z8RmXCW3tNIL5x3BPfhh/QmvAAdp6Yy61ZB9pBbcETv7nkSOPPuDF0pt np1PNhXcJ/uBw== Date: Wed, 15 Sep 2021 15:12:24 +0200 From: Mauro Carvalho Chehab To: Rob Herring , John Stultz Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/4] Make USB ports to work on HiKey960/970 Message-ID: <20210915151224.33e89d4f@coco.lan> In-Reply-To: References: X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Em Fri, 3 Sep 2021 11:28:31 +0200 Mauro Carvalho Chehab escreveu: > Hi Rob, > > It follows the patchset adding a DT schema needed to power on and to > use the integrated USB hub found on HiKey 960 and Hikey 970 boards. > > Besides each board use a different chip for the hub, on both they're > controlled the same way. Such boards come with an integrated 4-port > USB hub on it, set on what it seems to be a non-standard way: on both > implementations, the USB type-C port is used to detect the USB role. > > When in host mode, the 3.3V power supply (VDD33 pins) for the hub > are disabled. That disables the USB I/O on type-A ports. > > When USB type-C is on device mode, the OTG is switched via a GPIO pin > to device mode, and the hub is powered on. > > A Type-C power supply line is also controlled depending on the role. Gentile ping. Regards, Mauro > > - > > The entire series which contains the remaining patches to support > PCI and USB on HiKey970, and USB on HiKey960 is at: > > https://github.com/mchehab/linux/commits/linux-master > > The patches needed by the USB on HiKey970 were already merged > upstream. So, the above branch applies on the top of Linux master > branch. > > Tested on HiKey 960: > > $ lsusb > Bus 002 Device 002: ID 0424:5734 Standard Microsystems Corp. > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub > Bus 001 Device 004: ID 0424:2740 Standard Microsystems Corp. > Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver > Bus 001 Device 002: ID 0424:2734 Standard Microsystems Corp. > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > > Tested on HiKey 970: > > $ lsusb > Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub > Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) > Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > > v4: > - Improved description at the DT schema; > - Use just one compatible, as there's no difference between > HiKey 960 and 970 with regards to how the hub should be > controlled; > - parse usb-role-switch property at the driver; > - make the properties that depends on usb-role-switch optional. > > v3: > - The examples at the dt-bindings were updated to reflect > the actual DTS content and won't produce any warnings; > - Added John Stultz SoB to Hikey960 DTS patch; > - Added a patch for the mux hub driver for it to work with > the newer schema; > > John Stultz (1): > arm64: dts: hisilicon: Add usb mux hub for hikey960 > > Mauro Carvalho Chehab (2): > misc: hisi_hikey_usb: change the DT schema > arm64: dts: hisilicon: Add usb mux hub for hikey970 > > Yu Chen (1): > dt-bindings: misc: add schema for USB hub on Kirin devices > > .../bindings/misc/hisilicon,hikey-usb.yaml | 87 +++++++++++++ > .../boot/dts/hisilicon/hi3660-hikey960.dts | 35 +++++- > .../boot/dts/hisilicon/hi3670-hikey970.dts | 23 ++++ > drivers/misc/hisi_hikey_usb.c | 119 +++++++++--------- > 4 files changed, 206 insertions(+), 58 deletions(-) > create mode 100644 Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml > Thanks, Mauro