Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1611020imj; Thu, 14 Feb 2019 09:08:20 -0800 (PST) X-Google-Smtp-Source: AHgI3Iayx7PTbEzH3ArT0Cz+hMKttCovxj3SQbohtSDww6lcghc+NTPz4/tQIDdEKbxwF/NQjaw/ X-Received: by 2002:a17:902:930b:: with SMTP id bc11mr5304551plb.101.1550164100131; Thu, 14 Feb 2019 09:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550164100; cv=none; d=google.com; s=arc-20160816; b=slSJR6BLkQpDEEnGxyj+QDW2q7R2hXmJFaETBTCqzThFQHOnP7uE+02k2pbtO+E4aY qrkNx59zPt3dJwFWxQuF8CvOSSaC0OjlKJYXs9LZedR7MWbkXYHsTOGFhHqs9Lhx/ZV2 DyzPKL5xZTCDu8BHBYLaPIvFmSBPkd7wL/Lu9mlr+ekv1/nSEhSm7vek5y7B0x4uDICi NRIH5L4TpyXL5bzpgYvDswLOqO0y+KRA60Z/AxrkYccU8sZ44uuzn/DULLDy5SUbdmmY i3xIW5xRvEcapkkdV9X899WuQFUciNtJhj9Sgo7X1wft21gVxDcADIfVhMdpR8haGW6p nIvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=pZ/V9lOmswvYd30ZjqmIfNPMKESE5tja+pHGSh+T1tE=; b=UryJSGDCSYZJ16h542Vke5DMphMHsiwlpUrgkdFGlnlAH9w4XWjReFiqSXjKP3v6dQ hmq0SrKKNEZD9UMWNQXkUjbMXJ69nq0I74oUWUaNCWOSIjK7qS3y2cPDjLP1kijBsnLI iRLZy/+dM7e6HJ7BkSDx70dMibsvDzctifjud/l+Us33FcTbKrFy0/XfDqxV4lKyp6q9 O0GFdKXnICBj30kVwkRKkr7dFlJ9CVan10WgGZNg25ufljCsRUvfHzafOI28j5bI1zsG 2gXPqdTyn15X5BbfcUjBsCBSe+hBaXmUXMkxsSaMAtG9aQSQVTFCsIebp2fRQh1pJYBk IHIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j35si2832342pgl.223.2019.02.14.09.08.01; Thu, 14 Feb 2019 09:08:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389397AbfBNIa1 (ORCPT + 99 others); Thu, 14 Feb 2019 03:30:27 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:7095 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726218AbfBNIa1 (ORCPT ); Thu, 14 Feb 2019 03:30:27 -0500 X-UUID: 8514e1e8296745c7a032540dc0e0b3da-20190214 X-UUID: 8514e1e8296745c7a032540dc0e0b3da-20190214 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 374543498; Thu, 14 Feb 2019 16:30:19 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 14 Feb 2019 16:30:17 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 14 Feb 2019 16:30:16 +0800 Message-ID: <1550133016.12020.13.camel@mhfsdcap03> Subject: Re: [PATCH v4 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller From: Min Guo To: Rob Herring CC: Bin Liu , Mark Rutland , , , , "Greg Kroah-Hartman" , , , Matthias Brugger , Alan Stern , , , Date: Thu, 14 Feb 2019 16:30:16 +0800 In-Reply-To: <1548382046.4433.304.camel@mhfsdcap03> References: <1548073351-13739-1-git-send-email-min.guo@mediatek.com> <1548073351-13739-2-git-send-email-min.guo@mediatek.com> <20190121151417.GA19238@bogus> <1548149773.4433.284.camel@mhfsdcap03> <20190122143348.GF30080@uda0271908> <1548382046.4433.304.camel@mhfsdcap03> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Sorry to bother you again. Can I describe usb-connector in usb node like this? usb2: usb@11200000 { compatible = "mediatek,mt2701-musb"; "mediatek,mtk-musb"; reg = <0 0x11200000 0 0x1000>; ... usb_connector: musb_connector { compatible = "usb-b-connector"; label = "micro-USB"; type = "micro"; extcon = <&extcon_usb>; vbus-supply = <&usb_vbus>; }; }; Regards, Min. On Fri, 2019-01-25 at 10:07 +0800, Min Guo wrote: > Hi Bin, > > Thanks for your help. > > Hi Rob, > > I find that Samsung describes the usb-connector attribute in DTS, and > uses a private driver. > And try to write DTS as following: > > usb-connector node: > musb_con: musb_connector{ > compatible = "linux,extcon-usb-gpio","usb-b-connector"; > lable = "micro-USB"; > type = "micro"; > id-gpio = <&pio 44 GPIO_ACTIVE_HIGH> > vbus-supply = <&usb_vbus>; > port { > usb_to_connector: endpoint { > remote-endpoint = <&connector_to_usb>; > }; > }; > }; > > usb node: > &usb2{ > status = "okay"; > port { > connector_to_usb: endpoint { > remote-endpoint = <&usb_to_connector>; > }; > }; > } > > Can I describe usb-connector like this? Or can you give me some advices? > > Regards, > Min. > > On Tue, 2019-01-22 at 08:33 -0600, Bin Liu wrote: > > Hi Min, > > > > On Tue, Jan 22, 2019 at 05:36:13PM +0800, Min Guo wrote: > > > Hi Bin, > > > > > > Sorry to bother you again, I encounter a problem about the extcon > > > property. > > > > > > I don't find a common driver describing the usb-connector. Is > > > there any driver that I can refer to, specially the way to switch MUSB > > > controller between host and device mode? > > > If it needs to implement by myself, is it possible to emulate an > > > usb-connector driver by extcon-usb-gpio, and also use the notifier > > > mechanism or can you give me some advices? > > > > I am afraid I am unable to help you on this. I wasn't really pay > > attention when usb-connector was introduced and not sure how it can > > replace extcon. Now after read usb-connector.txt, it seems the binding > > only defines a/b/c-connector, but not ab-connector, and there is no > > enough information (at least for me) explaining how VBUS and ID fix into > > this usb-connector binding. > > > > Maybe Rob can provide some hint. > > > > Regards, > > -Bin. >