From patchwork Wed Jan 23 15:12:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 10777357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53117913 for ; Wed, 23 Jan 2019 15:12:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4144B2CD2B for ; Wed, 23 Jan 2019 15:12:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 355582CE28; Wed, 23 Jan 2019 15:12:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB2882CE06 for ; Wed, 23 Jan 2019 15:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t+lTZd5qMAteI4oym/41aIHssbs5NwbBu8Srz/Z6CX8=; b=Nsp1YbtNYWDkfv wcxkxsdz/SlAoyNUeu/MOgKl4PmYAqm/N0e1lDE5F1lMRMsanNgRlQGB1eLKvKiz1AL6HDcYjk3d7 ESCaDJJKRMlrMMhFIjGlBm8arPg4avqfFEU1usd4iOrSmKzLYoq690gHraq9Yv61EQ4Bu580wi+lJ JZAzWwrrsdc3UZbk17e2l+o+XpiDk+0StIEMwlFHejzuao5YHKQakx8x+MVsM7To3CwOQ4AqwVv7r rR7xG9rNiqnJ8pSGx7SIfbMJfgTEGktfsxXM4G4M2pWvs14HkyLfkBuqoyH+Cy4ExK7qPQ1qDI5Ta dw4BxBeATQwcYIty7FvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmKCq-0003so-EH; Wed, 23 Jan 2019 15:12:44 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmKCn-0003rp-34; Wed, 23 Jan 2019 15:12:43 +0000 Received: by mail-pg1-x543.google.com with SMTP id v28so1191411pgk.10; Wed, 23 Jan 2019 07:12:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+ltNVYcC6CkDbXmacb4vM3Xb4R9iKDUJk3cvtKU9Vkw=; b=Shd8ATuXHOENy4yxqV9u/fdY8+QjiykPRBSFzhvO+drMSv7DXV2XIT38Iv/PC6Fdr+ d+GoNhUh2NjwE3Bg2fmcKhj/kEgVcwD/w3VlsQsYuXvUis5bmZMjb+e/3gswrX0yyH+A /+YLg70wu1GmoqMCItw4aS833hEUY98faggUcHOBENBt6nD2MnXG9zykMbO76jvbhal/ r/gGqDHlVu3Qd0bsliQHw80vNFtb6hwsQYY0Ccrbn0SzVLEP6SNrKjD6LhjjWtDFR8+n Qb69JDtGmB0hnLuIYOmwk+pAEWRrPNcAIBTlWpSISS4BfwDgqzYKePU517vT2LvUpE+O 6NAA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=+ltNVYcC6CkDbXmacb4vM3Xb4R9iKDUJk3cvtKU9Vkw=; b=okHI6eA7K64rzZ631ZeCW8wkQYQPTRW5MI/uQg5ZQpzFMtNHJI05W0H7DSAU/FRaKb 69+vkSlLdWEO7wSy+fmmvV1Qpe+jVeYt6S2vpBqqNh45HGZc3vQA6ClM8gbVlJMC70n5 Sxnfl/VNQNiytY0wpXqNYHSeuXaKtYADoIJJrpkW/a6lOmzTdtKt6ZC3R1BDhpu0bxmU ccavcXix3E02gBZNEe+EuCBJkjTaQCn8duMu19mbQwBZN4lZPVeDAsjj3oJOL+NNqqaM NaLe7NAzAS7XIC7nS8EE2z3RrsqVYvWLIxVpP1QzWgpsZ4xNrt+jkpHFD+T53g1DRHcd B4sg== X-Gm-Message-State: AJcUukcWf0cFnwqym6LW1TGNyW0vlbISGhC4/C6t2n9K0M0TdMXa+VsG r7A+OJYYoFVKSRguW0DAtiDXdNCa X-Google-Smtp-Source: ALg8bN6z1EqnfX0EW8KZXDhQmFCm/nm+rYoTZiMWD2tbmCfKhfRfR9pKc+4Z6evbttkt5ZK6BqHfFg== X-Received: by 2002:a62:6503:: with SMTP id z3mr2241122pfb.169.1548256360169; Wed, 23 Jan 2019 07:12:40 -0800 (PST) Received: from localhost.localdomain ([103.51.74.133]) by smtp.gmail.com with ESMTPSA id v9sm24772468pfe.49.2019.01.23.07.12.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 07:12:39 -0800 (PST) From: Anand Moon To: linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Subject: [RFCv1 1/3] phy: meson8b-usb2: Enable otg phy controller on Meson8b SoCs Date: Wed, 23 Jan 2019 15:12:07 +0000 Message-Id: <20190123151209.2080-2-linux.amoon@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190123151209.2080-1-linux.amoon@gmail.com> References: <20190123151209.2080-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190123_071241_249050_36A3AFD2 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Kishon Vijay Abraham I , Rob Herring , Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Meson8b support two USB phy controller, one with otg port and other usb host controller. USB OTG controller ie. otg port can be used to power on board or host port for usb device. Changes enable usb otg host controller when dr_mode is set to otg. Currenly otg port can be used to power on the board. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Cc: Kevin Hilman Signed-off-by: Anand Moon --- New patch in this series. --TOTO enable OTG port to work as host. --Currently we can power on the board from this OTG port. /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M |__ Port 3: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 3: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M |__ Port 3: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 480M |__ Port 3: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M --- drivers/phy/amlogic/phy-meson8b-usb2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c index 9c01b7e19b06..1333c77e9172 100644 --- a/drivers/phy/amlogic/phy-meson8b-usb2.c +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c @@ -109,6 +109,7 @@ #define RESET_COMPLETE_TIME 500 #define ACA_ENABLE_COMPLETE_TIME 50 +#define DCD_ENABLE_COMPLETE_TIME 10 struct phy_meson8b_usb2_priv { void __iomem *regs; @@ -188,6 +189,20 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) udelay(ACA_ENABLE_COMPLETE_TIME); + if (phy_meson8b_usb2_read(priv, REG_ADP_BC) & + REG_ADP_BC_ACA_PIN_FLOAT) { + dev_warn(&phy->dev, "USB ID detect failed!\n"); + clk_disable_unprepare(priv->clk_usb); + clk_disable_unprepare(priv->clk_usb_general); + return -EINVAL; + } + } else if (priv->dr_mode == USB_DR_MODE_OTG) { + phy_meson8b_usb2_mask_bits(priv, REG_ADP_BC, + REG_ADP_BC_DCD_ENABLE, + REG_ADP_BC_DCD_ENABLE); + + udelay(DCD_ENABLE_COMPLETE_TIME); + if (phy_meson8b_usb2_read(priv, REG_ADP_BC) & REG_ADP_BC_ACA_PIN_FLOAT) { dev_warn(&phy->dev, "USB ID detect failed!\n"); From patchwork Wed Jan 23 15:12:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 10777361 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF5C113B4 for ; Wed, 23 Jan 2019 15:13:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8D642CE4E for ; Wed, 23 Jan 2019 15:13:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CF3F2CE53; Wed, 23 Jan 2019 15:13:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 392C02CE42 for ; Wed, 23 Jan 2019 15:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yuf8+RNB3jOXw3hro4/lvaJC6jIBR+H2qwYZysAqWC4=; b=TRtU7LTSIVXY2r f7VM0WwSr/xwljkN9V3H1QSrhAPGPC5EBk+1R8odQYMQKHaaL37P9hFAm+3MgGxrmEW/Cyd6dMnzu iGaZ7Z/ZS6VnQO1ceJgW4tB5N9oAZpI0sR3y0XdfzNEoF2vdHkUbLsPZ6PpTXBw/1aOamQ/nxSq/z QkoJ/FW2zmZ0wGcPUb/ZWZ2Z6Dn+YEf6byiGBZPmw+TFuXKHWOxQrUoIYgLOocx0kqdedHHVRiAPM qxjdnhEId5r0I3g9eo9a4eHleF7/fD8tAohlxNwecxgD37DZt/S2gLVXY47jiDuI1schQoL/bsSXD D7BiIeFhihPGSMvqszIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmKDD-0004BS-Fs; Wed, 23 Jan 2019 15:13:07 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmKCq-0003ss-Oq; Wed, 23 Jan 2019 15:12:52 +0000 Received: by mail-pl1-x641.google.com with SMTP id g9so1326030plo.3; Wed, 23 Jan 2019 07:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pfLooB/O2lngy8XNJ7ymPuTZs17F4K8WiubH/3VL7po=; b=U/tk8Ju764NMOYteaqMOFJvaQFTLli7pnMauiw+GFwORrMtDA/dg9zEx4i0zLdR6Sb o6O0YPX+pW3XGGi1ts6l+zGX63JLk1Mg2qvBsuzxByw+NRojdf2fUgZPDo86GXAuru05 IEjP8ids0Mpn6zactF/SyiDnt64nX1ZtHzI8g4Mj0F3fdBSBhlwoUGm2m+YNXhjppmf/ 9+V+Vw8P6+NXFuTwCRVl8XeMGU3rVH0uYCDfGY8t1yIXxufdkJaVyMvDQyJRia8wezOu NnDxPLkojBScp0ERfQ2kH493YZNUU6TjDsAd1D2MZynWoASUjqMYsujPiM1fbsjSA8h8 zYcQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=pfLooB/O2lngy8XNJ7ymPuTZs17F4K8WiubH/3VL7po=; b=ZRpD0hJnAj8tGBsORMD0Hri88g/MrJAdpAvPfQYaSS0av6kKDBZnWbg9wP2PEztfh9 jDW5atwmN6eFgfwVnbet+5EqwaPM+r1jQNFzC0WeV9Fq7MR4pwiDwstVLM3hpqe01OnV UdbI0098Bb1tg5f1UaLfY3J5AAqSBaXfRu8MRAteznwILCKJxVxob8NEC2d9QxUouR+P leMqfovTSi1BTi7n9gWlnaUl3zuJikrzkPcz5So4HgQy+1/FoyNVYmUWgYPiFQ2vRIgE nMLej8nLaP8WHT/RQdRyqAMMu7T3Q5O0G+YaX1thrJYSnlOnxI62TL1N0kG79IuHVbW0 TcFQ== X-Gm-Message-State: AJcUukfVIGHY26j9iaCtIZh/IeNKkmkkLhEVU8/aw5JFSgDCbAndahq2 9MCiYKUna4dsn5cGZIAoU3pugMRh X-Google-Smtp-Source: ALg8bN5bU+iHdNinzeAQuQUW5nOYLv8kZqVuIB34AyJdAS/Tv08UM08whGcuUq6Rzvj2cFEWWDbvSQ== X-Received: by 2002:a17:902:2dc3:: with SMTP id p61mr2521996plb.166.1548256363733; Wed, 23 Jan 2019 07:12:43 -0800 (PST) Received: from localhost.localdomain ([103.51.74.133]) by smtp.gmail.com with ESMTPSA id v9sm24772468pfe.49.2019.01.23.07.12.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 07:12:43 -0800 (PST) From: Anand Moon To: linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Subject: [RFCv1 2/3] ARM: dts: meson8b: odroidc1: fix USB power supplies for phy Date: Wed, 23 Jan 2019 15:12:08 +0000 Message-Id: <20190123151209.2080-3-linux.amoon@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190123151209.2080-1-linux.amoon@gmail.com> References: <20190123151209.2080-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190123_071245_106373_778CC828 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Kishon Vijay Abraham I , Rob Herring , Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch enables the USB Host controller (USB0) and the relative USB0 PHY. From the shematics GPIOAO.BIT5 gpio input for the PWREN signal of the USB_OTG controller (usb0) which is also linked to USB_HOST controller (usb1). Add missing phy-supply link to both USB0 and USB1 phy controller This changes fixed the power issue on usb ports. Changes help fix usb reset warning. [ 821.991470] usb 1-1.2: reset high-speed USB device number 3 using dwc2 [ 825.243385] usb 1-1.2: reset high-speed USB device number 3 using dwc2 [ 828.151310] usb 1-1.2: reset high-speed USB device number 3 using dwc2 [ 830.991241] usb 1-1.2: reset high-speed USB device number 3 using dwc2 Fixes: 2eb79a4d15ff ("ARM: dts: meson: enabling the USB Host controller on Odroid-C1/C1+ board") Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Cc: Kevin Hilman Signed-off-by: Anand Moon --- Changes from previous patch. Fix the subject and commit message as per Martin's request --Add the signal name in the comment --Replace vbus-supply with phy-supply linking the power supply to phy node as pointed by Marine which a PWREN signal in the USB_HOST controller (usb1) USB_VBUS 4 2 0 unknown 5000mV 0mA 5000mV 5000mV phy-c1108820.phy.1 2 0mA 0mV 0mV phy-c1108800.phy.0 2 0mA 0mV 0mV --- arch/arm/boot/dts/meson8b-odroidc1.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 58669abda259..bfa472a679d9 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -83,6 +83,22 @@ regulator-max-microvolt = <5000000>; }; + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + vin-supply = <&p5v0>; + + /* + * signal name from schematics: PWREN + */ + gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + tflash_vdd: regulator-tflash_vdd { /* * signal name from schematics: TFLASH_VDD_EN @@ -295,8 +311,18 @@ pinctrl-names = "default"; }; +&usb0_phy { + status = "okay"; + phy-supply = <&usb_vbus>; +}; + &usb1_phy { status = "okay"; + phy-supply = <&usb_vbus>; +}; + +&usb0 { + status = "okay"; }; &usb1 { From patchwork Wed Jan 23 15:12:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 10777363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 55DE4913 for ; Wed, 23 Jan 2019 15:13:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43C892CE29 for ; Wed, 23 Jan 2019 15:13:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3752B2CE43; Wed, 23 Jan 2019 15:13:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7B2912CE2F for ; Wed, 23 Jan 2019 15:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EkPUrbcK2VPFaYQhomKt6QQDxBSh+Vl6aeK0K8QaW0o=; b=oZIt6iLFI+UC/0 mJkYGzQfHPep/dIgNfqwz+REeHqBe487gk16BwRgD2PbltKxvQWRZ3hrDIVNZKGOf1GcNj/OFjCsG h0JXwj5HkzucN1Km6/jdg+y24mAiwvyLilgYmxr+Om/w0j2VM8TxS/1sfiVfQGIQHcTbGgdOnMeE2 2VnvGNJ9NxD7mZm0QhKEnqPmWkbjREJTx10mMJSGM6W975hokkOdAcnsEk7mLODv7bhP4hpguxm/D R5gbYaa/EsjWbiYzQAA3qguLqOOHMjflOi8ZSmZgv+9tHuy/4aPmlk1jENqSj7juwcMFP2bqnRIgH 2CXuF4RZ8/AdXUp3z+BA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmKDR-0004Lm-KD; Wed, 23 Jan 2019 15:13:21 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmKCu-0003wD-53; Wed, 23 Jan 2019 15:12:55 +0000 Received: by mail-pl1-x641.google.com with SMTP id a14so1305349plm.12; Wed, 23 Jan 2019 07:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SsI2Oo5b+BTLRrtwVfiZrN//xsqFal3BRU4y2fjWF/U=; b=IeYDCG5izP4yT2qHZf9iIV9qG6SWyIw6VBe0m6k8yU6SISfW7sCFq8zPCbf7KTAxlo //2w07f59PsQa2CcABObUHig1EcmliXbOw8F3bpDUBNVvftKdgbxf2UF68Tpes00VSYs 8XXjBmwenlwx8jFlDC9MPnsZfPbA3EQvaEApws2lzBjYFWKIArGTBeBNtFCt69Vs13Zi 9NYqcwFti+QDq8+yLKOKDF1ir78+eL4ZREbkumrgQDO3mJhhZE6CJhLv43w4Nnw38MME PvU8mce49Ami9cI6E+gdDDI/r0mLwwWZmZdUPtdwgkAGbVjcDy4ZE+7xu1Lgy52q84lS WClg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=SsI2Oo5b+BTLRrtwVfiZrN//xsqFal3BRU4y2fjWF/U=; b=bWCgm1eTutRwZ7B4i84azD5BCGdkokGmcgCZfBql2GxDaI6HCTx4NimiPI+Nuq9N9q De16xU2hSaZBxnfVFg67fFtQAcwokMUYdo5RoE/+H49xizdJSv95/IMR1XtQczPpqGwO 3FDwc5R579t3P5ygbsqzudEjhy41BKJLWoSyUduEwZS1i3sQ2v0m2ZmQXpe3WuHVWH1Y NDdA7kXcGkRMmN1UffAiGO64STRNwgjWui7YRdKkuA7wK+yIBbNJGyIN/s7D13+yPN/2 jCWFIPz5/eZ7goS+ZhV4GLs4EHr12F4DUVHJDctwVNMGlG5OKGINRqGKKoLxy3TtPoYO 9dSQ== X-Gm-Message-State: AJcUukdA2e2NiIGyEyp5jQCqtb3k/E3sdKTRzwz2fG/uuEmuYJeJ8/An PlE8sQEoF8nxJ7YezJfKAyenPl5C X-Google-Smtp-Source: ALg8bN5y5UemPS70Q/kz1U0LbopJSZ5IWUeS137w9iYDNKHoW0AMgMGAOHFONTuaP7dL4VH2QMVQhA== X-Received: by 2002:a17:902:850c:: with SMTP id bj12mr2536937plb.46.1548256367290; Wed, 23 Jan 2019 07:12:47 -0800 (PST) Received: from localhost.localdomain ([103.51.74.133]) by smtp.gmail.com with ESMTPSA id v9sm24772468pfe.49.2019.01.23.07.12.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 07:12:46 -0800 (PST) From: Anand Moon To: linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Subject: [RFCv1 3/3] ARM: dts: meson8b: odroidc1: enable the OTG capable USB controller Date: Wed, 23 Jan 2019 15:12:09 +0000 Message-Id: <20190123151209.2080-4-linux.amoon@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190123151209.2080-1-linux.amoon@gmail.com> References: <20190123151209.2080-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190123_071248_472159_E9CCE394 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Kishon Vijay Abraham I , Rob Herring , Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Override the dr_mode from "host" to "otg" for USB_HOST controller (usb0) changes help usb_phy0->usb0 initialization of OTG bus port. Changes fix the below warning. [ 1.810267] phy phy-c1108800.phy.0: USB ID detect failed! [ 1.814333] phy phy-c1108800.phy.0: phy poweron failed --> -22 [ 1.820178] ------------[ cut here ]------------ [ 1.824758] WARNING: CPU: 0 PID: 29 at drivers/regulator/core.c:2054 _regulator_put.part.8+0xf8/0xfc [ 1.833884] Modules linked in: [ 1.836907] CPU: 0 PID: 29 Comm: kworker/0:1 Not tainted 5.0.0-rc3-xc1ml #1 [ 1.843849] Hardware name: Amlogic Meson platform [ 1.848552] Workqueue: events deferred_probe_work_func [ 1.853683] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 1.861404] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 1.868610] [] (dump_stack) from [] (__warn.part.3+0xbc/0xd8) [ 1.876074] [] (__warn.part.3) from [] (warn_slowpath_null+0x44/0x4c) [ 1.884236] [] (warn_slowpath_null) from [] (_regulator_put.part.8+0xf8/0xfc) [ 1.893093] [] (_regulator_put.part.8) from [] (regulator_put+0x28/0x38) [ 1.901516] [] (regulator_put) from [] (regulator_bulk_free+0x28/0x38) [ 1.909770] [] (regulator_bulk_free) from [] (release_nodes+0x1bc/0x200) [ 1.918191] [] (release_nodes) from [] (really_probe+0x110/0x2cc) [ 1.926005] [] (really_probe) from [] (driver_probe_device+0x60/0x16c) [ 1.934256] [] (driver_probe_device) from [] (bus_for_each_drv+0x80/0xc4) [ 1.942766] [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x138) [ 1.951015] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [ 1.959180] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x8c) [ 1.968127] [] (deferred_probe_work_func) from [] (process_one_work+0x218/0x504) [ 1.977243] [] (process_one_work) from [] (worker_thread+0x2a8/0x5bc) [ 1.985404] [] (worker_thread) from [] (kthread+0x14c/0x154) [ 1.992785] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 1.999987] Exception stack(0xee0dbfb0 to 0xee0dbff8) [ 2.005027] bfa0: 00000000 00000000 00000000 00000000 [ 2.013191] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.021353] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 2.027984] ---[ end trace 81270e5c573fd4b5 ]--- [ 2.032661] ------------[ cut here ]------------ [ 2.037162] WARNING: CPU: 0 PID: 29 at drivers/regulator/core.c:2054 _regulator_put.part.8+0xf8/0xfc [ 2.046296] Modules linked in: [ 2.049331] CPU: 0 PID: 29 Comm: kworker/0:1 Tainted: G W 5.0.0-rc3-xc1ml #1 [ 2.057647] Hardware name: Amlogic Meson platform [ 2.062344] Workqueue: events deferred_probe_work_func [ 2.067471] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2.075197] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 2.082405] [] (dump_stack) from [] (__warn.part.3+0xbc/0xd8) [ 2.089871] [] (__warn.part.3) from [] (warn_slowpath_null+0x44/0x4c) [ 2.098034] [] (warn_slowpath_null) from [] (_regulator_put.part.8+0xf8/0xfc) [ 2.106891] [] (_regulator_put.part.8) from [] (regulator_put+0x28/0x38) [ 2.115314] [] (regulator_put) from [] (regulator_bulk_free+0x28/0x38) [ 2.123566] [] (regulator_bulk_free) from [] (release_nodes+0x1bc/0x200) [ 2.131988] [] (release_nodes) from [] (really_probe+0x110/0x2cc) [ 2.139802] [] (really_probe) from [] (driver_probe_device+0x60/0x16c) [ 2.148054] [] (driver_probe_device) from [] (bus_for_each_drv+0x80/0xc4) [ 2.156564] [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x138) [ 2.164813] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [ 2.172978] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x8c) [ 2.181923] [] (deferred_probe_work_func) from [] (process_one_work+0x218/0x504) [ 2.191040] [] (process_one_work) from [] (worker_thread+0x2a8/0x5bc) [ 2.199201] [] (worker_thread) from [] (kthread+0x14c/0x154) [ 2.206582] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 2.213785] Exception stack(0xee0dbfb0 to 0xee0dbff8) [ 2.218824] bfa0: 00000000 00000000 00000000 00000000 [ 2.226989] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.235151] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 2.241774] ---[ end trace 81270e5c573fd4b6 ]--- [ 2.246415] dwc2: probe of c9040000.usb failed with error -22 Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Cc: Kevin Hilman Signed-off-by: Anand Moon --- Changes from previous patch. Fix the subject and commit message as per Martin's request --Fix the commit message. --TODO: allthough the bus port is initialization, but their is not usb device detected on the otg port. --- arch/arm/boot/dts/meson8b-odroidc1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index bfa472a679d9..a41912039522 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -323,6 +323,7 @@ &usb0 { status = "okay"; + dr_mode = "otg"; }; &usb1 {