From patchwork Fri Oct 16 15:40:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1383425 X-Patchwork-Delegate: trini@ti.com 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=CT2x6uP9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CCVj91WK3z9sSG for ; Sat, 17 Oct 2020 02:40:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A9CC882437; Fri, 16 Oct 2020 17:40:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="CT2x6uP9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19F9382469; Fri, 16 Oct 2020 17:40:24 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 3257982437 for ; Fri, 16 Oct 2020 17:40:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fparent@baylibre.com Received: by mail-wr1-x443.google.com with SMTP id s9so3402039wro.8 for ; Fri, 16 Oct 2020 08:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bOfEvPGGkRcNJTh1+bWuqLYZqWFZAMwSx1F3zBLDWuo=; b=CT2x6uP9GKDdNFokIGYRXVELcJjWs+WGG3cwQcmllNSjZvc+JP9fecsn65u6V/321y wQmu+HYujeSih+wNh+rVbjNRYw4kNgj53Pvt1kKy63epRmyaNMhz+mVBBWROTPDFLHpJ 7/c0uLMOvJ8HS76UX8/MwI3uXctmlnnxbOpxmOWzO5oKNl0vlM4Y0evdc3lLipmEilsI 7YQ5nmeZd2Vl3gOPZ5azAzuxqqLLQuhWuEdxj/PWeHwHetg8DpU9PG1ICbvH3Ktx6LcY ih7FIMWKp9W/U1kQjrSWa0UY6ZahHjfsk0k/rf+5XExRp1zz+1VQ0OtQQZNxpRRz6nEK PiQg== 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=bOfEvPGGkRcNJTh1+bWuqLYZqWFZAMwSx1F3zBLDWuo=; b=ehMPkkkK/unDQYOKpE3923FNgNTGiexHk6oHq1f8GZT3ezQ9w9EtTiaYrbyOdp1C7e 2HKyI6rqabhrdybdINCtbCCYbR2MWsxtAKTq/i6MapDOmFSq8wvqFTUKlvSWUk5u3FsK XnBOsFOL8if++nJ4TjPMmQNHjx3CvuBUDFE9eX7MLA1p4jm3Q4dgd9eQ8QPY3sDOiqUa v+QebXPLAzqSSz1Uqaj8A5xRA4T23B/Cn2r/Knh3WEaMZB53+XN0NDyHjUUPV5y0HWNH bKvhfoEtl1a8zlncp9PFDnlEDd+b12x8BMeiL2RKQcU9uHyr39z8u9nUN+VM8vIyA+un c8VQ== X-Gm-Message-State: AOAM531aukVmcEydOD7Gam1sMIitCIcdW8ocqLgJb8Q/FuZVg+rfGobs B7tEANoA5MlUFW8PGzTkN54YbeDfdyQcpw== X-Google-Smtp-Source: ABdhPJyTuQngBh0zUmTcR47lDayL+QJqQpnRqGmgt67HTL2mpUWQLAxSsBBkZVRdPdY4rrhQHZmZ2w== X-Received: by 2002:a5d:5743:: with SMTP id q3mr4520947wrw.167.1602862818532; Fri, 16 Oct 2020 08:40:18 -0700 (PDT) Received: from localhost.localdomain (211.163.185.81.rev.sfr.net. [81.185.163.211]) by smtp.gmail.com with ESMTPSA id n66sm3100020wmb.35.2020.10.16.08.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 08:40:17 -0700 (PDT) From: Fabien Parent To: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream@mediatek.com Cc: weijie.gao@mediatek.com, ryder.lee@mediatek.com, Fabien Parent Subject: [PATCH 1/5] arm: dts: mt8516: add support for USB Date: Fri, 16 Oct 2020 17:40:05 +0200 Message-Id: <20201016154009.3097917-2-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016154009.3097917-1-fparent@baylibre.com> References: <20201016154009.3097917-1-fparent@baylibre.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Add support for USB on mt8516 based SoC. Signed-off-by: Fabien Parent --- arch/arm/dts/mt8516.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/dts/mt8516.dtsi b/arch/arm/dts/mt8516.dtsi index 1c3358208614..c4577ceea386 100644 --- a/arch/arm/dts/mt8516.dtsi +++ b/arch/arm/dts/mt8516.dtsi @@ -123,6 +123,20 @@ status = "disabled"; }; + usb0: usb@11100000 { + compatible = "mediatek,mt8516-musb", + "mediatek,mt8518-musb"; + reg = <0x11100000 0x1000>; + interrupts = ; + interrupt-names = "mc"; + clocks = <&topckgen CLK_TOP_USB_PHY48M>, + <&topckgen_cg CLK_TOP_USBIF>, + <&topckgen_cg CLK_TOP_USB>, + <&topckgen_cg CLK_TOP_USB_1P>; + clock-names = "usbpll", "usbmcu", "usb", "icusb"; + status = "disabled"; + }; + uart0: serial@11005000 { compatible = "mediatek,hsuart"; reg = <0x11005000 0x1000>; From patchwork Fri Oct 16 15:40:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1383431 X-Patchwork-Delegate: trini@ti.com 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=ufmkWBcX; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CCVl63vDZz9sTq for ; Sat, 17 Oct 2020 02:42:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AF8C7824BE; Fri, 16 Oct 2020 17:40:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="ufmkWBcX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C7DF8824B5; Fri, 16 Oct 2020 17:40:32 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 A271282474 for ; Fri, 16 Oct 2020 17:40:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fparent@baylibre.com Received: by mail-wr1-x441.google.com with SMTP id s9so3402148wro.8 for ; Fri, 16 Oct 2020 08:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6W/QTjokz/tWZSWhoQNRldIuUFpfak23Rgmbtvv3Kv4=; b=ufmkWBcXWzLr4t+vJDurorMQY6OTxpXzgvH74l2V3YPaiAzxha/LxcAF50VlPiXsTB +6/qTs39haQQspfaTVgarT58C17t3zOUMtJfmo1RwNHBm3X1XVmu/78oWy6AVMDFyOLF /fIxAv8i3y9iTSlGGTfv68HFUvrYr0nsswYjbjRBdVz6rldBnqekXLz5BWK60Nm+bDT0 338LT4iGMlVGh6ItSXgafzmfo9rs6cBsTH5wZvbL/F2C58mIxgY4gsDEWNDOF8k93JRN Y9yz3Ret1Fj+ItDor0HQCIEk/+5ctxhjFS7DDG5smoGo84IWr3t/1SfpGZ+maZ45SH92 O3gA== 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=6W/QTjokz/tWZSWhoQNRldIuUFpfak23Rgmbtvv3Kv4=; b=JceAF31mDldxknBFexJdCA5U3oEQOs0mpPx4Jxe+NOJwNqbpk3QeQ/aG+SLvEE++xw 2v41K4QOEWmmNi2Z/7obWN2f4kW+5HUww+vpBa6iW6VHEmsmbCJaR+ahYEBW3mLNobx2 R3kPbMzJJWMPwNyihn6PhFX6FifnbxIcQ0aM7pvdvK3ip0B5yqypObKoqOcY7g+RDkcs GiyvcKWqFc0zidR1fm6flpe7Ua5zLCQ5ev9FJgwGFwohCdvcgKgWpZ3qyFa96wyqQYq9 v1BopNiPgZukFWLdEIJTMKYQM9+aDiQBQ506wU1L0ZCzCaf1TjRWEOvPNfrWbFA2T5W8 ERhg== X-Gm-Message-State: AOAM533CIVJ6wPsQnkWDAigc3FSmAMU8FOSk4ibrOsRDu4t+D+ZLzauS A++zWIPQCY0TbIZmFNhW+B/zZ5xT+MV8nA== X-Google-Smtp-Source: ABdhPJxx3wYDs2oZ42Hv3svkD4S9D3YunikUVjFLpN6BazJkF/W4aUK0DkcESfvF7DYKmGXLRWSouA== X-Received: by 2002:adf:e304:: with SMTP id b4mr4413956wrj.141.1602862820001; Fri, 16 Oct 2020 08:40:20 -0700 (PDT) Received: from localhost.localdomain (211.163.185.81.rev.sfr.net. [81.185.163.211]) by smtp.gmail.com with ESMTPSA id n66sm3100020wmb.35.2020.10.16.08.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 08:40:19 -0700 (PDT) From: Fabien Parent To: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream@mediatek.com Cc: weijie.gao@mediatek.com, ryder.lee@mediatek.com, Fabien Parent Subject: [PATCH 2/5] arm: dts: mt8516-pumpkin: enable usb port Date: Fri, 16 Oct 2020 17:40:06 +0200 Message-Id: <20201016154009.3097917-3-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016154009.3097917-1-fparent@baylibre.com> References: <20201016154009.3097917-1-fparent@baylibre.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Enable the USB port for MT8516 Pumpkin Board. Signed-off-by: Fabien Parent --- arch/arm/dts/mt8516-pumpkin.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/dts/mt8516-pumpkin.dts b/arch/arm/dts/mt8516-pumpkin.dts index cd43c1f5e32c..292b00f0ffb1 100644 --- a/arch/arm/dts/mt8516-pumpkin.dts +++ b/arch/arm/dts/mt8516-pumpkin.dts @@ -108,3 +108,13 @@ &watchdog { status = "okay"; }; + +&usb0 { + status = "okay"; + dr_mode = "peripheral"; + + usb_con_c: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + }; +}; From patchwork Fri Oct 16 15:40:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1383430 X-Patchwork-Delegate: trini@ti.com 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=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=oQDfOyuu; 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 4CCVkk0Cbtz9sTL for ; Sat, 17 Oct 2020 02:41:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5129C824A4; Fri, 16 Oct 2020 17:40:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="oQDfOyuu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 12C50824BC; Fri, 16 Oct 2020 17:40:32 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 5DB0882461 for ; Fri, 16 Oct 2020 17:40:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fparent@baylibre.com Received: by mail-wm1-x343.google.com with SMTP id k18so3400018wmj.5 for ; Fri, 16 Oct 2020 08:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lAZ/XCMfo4hWubyb1I2pDene6etQrIEna1J+RmHPPgM=; b=oQDfOyuuKrWpiNoVfLmVh23BQATGJwRSaspRFMhp9adtsxneDljItDvecF+PoxYzIk P/b7p3SbeolA8913oDJfIDl1Jr3WL16PfmgPtekCkqtSeG+IPhTuPEu2bFh9+dEkeFvD +yv53thmKNhSk3MOolBqxKkyLFMNLPf1VIPirjeKlGhTXPTZ+ncvhwz+Jmve7S5M+t6h 1izOdubJ0BD+fNnq1Vi6yloDDLges5ET6JTE+svSl5dmIFXlnYaI2aVE9iXOs2a+9EKG d7TPlflwMyEVMH8lom8aIgaq0a/z6CPXMogFVB4DdpjvcDLdQrNl3DJ+B7bggIm1i4ud GidA== 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=lAZ/XCMfo4hWubyb1I2pDene6etQrIEna1J+RmHPPgM=; b=qlZwUjEYieMoaRzZyDEj1zwEHMIn4fKaZMW0k66RtYgpbuqaAPsd7YMAWSPeASYrKn ghkmQUASl9GyXrS5uJnjbsFuqUKJdSsG/vlZ6pmT3H7rliGCcX+Q+k5dfUVzHpCA15VR +6rUVfUBh3J4g3AyVDe7H9sgYMViSuFW2HJKrWKe0v2EajJpBh3C8yE4mZFqso5PnnDu ZsFx9crGKcgFaiiKUtWCrbDLolqpeTVC7Cq3yOQUVFw87o5IvefmIuZTLQMBbFIsSGz5 XXAX33sjbGdSTfDXAEirBA5zFwq5iUqadntMwRO73eMGiN6yRLUqlpHEXVtqL2+WGget gyZg== X-Gm-Message-State: AOAM533EXKV6fqmJlEmILDFu90wMhw0er6Kje2IZDT2xTjd3QCr1jR7o MSGMSlhLeOqNDyZRZc1OHb3Ks7U41vukIw== X-Google-Smtp-Source: ABdhPJzBUfqxJlcw/8W1EWZs5fOGGY9edwxh714aKZCSkmHGMnsTUrmyRMaP1GdO5gggfnkmQjMdoA== X-Received: by 2002:a1c:7e82:: with SMTP id z124mr4366858wmc.8.1602862821488; Fri, 16 Oct 2020 08:40:21 -0700 (PDT) Received: from localhost.localdomain (211.163.185.81.rev.sfr.net. [81.185.163.211]) by smtp.gmail.com with ESMTPSA id n66sm3100020wmb.35.2020.10.16.08.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 08:40:20 -0700 (PDT) From: Fabien Parent To: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream@mediatek.com Cc: weijie.gao@mediatek.com, ryder.lee@mediatek.com, Fabien Parent Subject: [PATCH 3/5] board: mediatek: pumpkin: initialize usb device Date: Fri, 16 Oct 2020 17:40:07 +0200 Message-Id: <20201016154009.3097917-4-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016154009.3097917-1-fparent@baylibre.com> References: <20201016154009.3097917-1-fparent@baylibre.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Initialize USB device on pumpkin if it is enabled in the config. Signed-off-by: Fabien Parent --- board/mediatek/pumpkin/pumpkin.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/board/mediatek/pumpkin/pumpkin.c b/board/mediatek/pumpkin/pumpkin.c index 666e4d6a26fe..37daf1c51b92 100644 --- a/board/mediatek/pumpkin/pumpkin.c +++ b/board/mediatek/pumpkin/pumpkin.c @@ -4,8 +4,25 @@ */ #include +#include int board_init(void) { return 0; } + +int board_late_init(void) +{ + struct udevice *dev; + int ret; + + if (CONFIG_IS_ENABLED(USB_GADGET)) { + ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev); + if (ret) { + pr_err("%s: Cannot find USB device\n", __func__); + return ret; + } + } + + return 0; +} From patchwork Fri Oct 16 15:40:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1383428 X-Patchwork-Delegate: trini@ti.com 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=ih8Ct76F; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CCVjz5Hz2z9sSf for ; Sat, 17 Oct 2020 02:41:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8853824A6; Fri, 16 Oct 2020 17:40:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="ih8Ct76F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82FF98248B; Fri, 16 Oct 2020 17:40:26 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 8FCE482461 for ; Fri, 16 Oct 2020 17:40:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fparent@baylibre.com Received: by mail-wr1-x441.google.com with SMTP id h7so3440001wre.4 for ; Fri, 16 Oct 2020 08:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GnXZMRtC2c3Jp3V92/NgSnqaBrZWMs3LzHHi44GD6lE=; b=ih8Ct76Fzs5X2eSEWjGdskO30P8MK8a4LX/xLHuoosNqxTDX9moKZZBSi6l0+BrGrx dBs8AAhQjZ/RVPFxARMELNRbvlxLsDkYKEc71dI71dTA4+wAKE7bxxCft2RbcRWTYVwV 6gYHTTdw6VJfnI11JXKOvoUZoAqRruIqiewb/0jsS5R/m93LlxClr5PCSv7AAOxrrzyI INfoDvRvrvOebU8ByZX5qnTethgiTfSh4vFsgDlzC2faiX9lFY5zxJco0Dw7AsPb7kaF EK4XKhflr6s2bgfBxYchRnYtAA9YBGh4rSOlmPePsnZ8A+XwWwmXZci87IXBtFw2zpKu e0ow== 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=GnXZMRtC2c3Jp3V92/NgSnqaBrZWMs3LzHHi44GD6lE=; b=gTPCapFJAG8zEtKwAV56v1/mSRxcJ37R8Q/k2iu2p92vFgJmnXfDw4j22KijviKFMg YSp/MFcS/TSlZtiexVL7BCx+9gnBPdd+92qyFTKyYpaiob3qrMM9gHS7X5y49Xj/utRA fMMesmwJerYGeQko6vakTYYm0SC6kDpWlwSayfyoKbJyzJnNP4Vh7eUAY8aRI65FIMs8 FuByevhDiiYCSb/4vITqYs23m7+rKT5lyJHrG5jENA8y2Tz82DOvj7PqVg05H/d5qDyr wRSvHcxk+V/AErn6B3ViRct7GXGzw2gZLNzhMUlC9HtPA7nlhNUtc+IyQ2IeNk+kJXrg SU6Q== X-Gm-Message-State: AOAM531on0YCNsT+4urW7ZmK9j8+/8vFvEsySdEqON/uNS/pADqmqJ1U hcA/5KjSEaCWLT9xgDhftpJDf+FGcwhgHQ== X-Google-Smtp-Source: ABdhPJxtILJGHO1YH7CuHZ7P/bYODPnoVMsIgREipWaQMITQwNiThKVN1+ysE6eU44vyTin20RVvmg== X-Received: by 2002:a5d:67d2:: with SMTP id n18mr4590992wrw.310.1602862822916; Fri, 16 Oct 2020 08:40:22 -0700 (PDT) Received: from localhost.localdomain (211.163.185.81.rev.sfr.net. [81.185.163.211]) by smtp.gmail.com with ESMTPSA id n66sm3100020wmb.35.2020.10.16.08.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 08:40:22 -0700 (PDT) From: Fabien Parent To: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream@mediatek.com Cc: weijie.gao@mediatek.com, ryder.lee@mediatek.com, Fabien Parent Subject: [PATCH 4/5] configs: pumpkin: enable USB gadget Date: Fri, 16 Oct 2020 17:40:08 +0200 Message-Id: <20201016154009.3097917-5-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016154009.3097917-1-fparent@baylibre.com> References: <20201016154009.3097917-1-fparent@baylibre.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Enable USB gadget on pumpkin. This requires to also enable BOARD_LATE_INIT since the init is done in board_late_init function. Signed-off-by: Fabien Parent --- configs/pumpkin_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/pumpkin_defconfig b/configs/pumpkin_defconfig index 3d6af03d2209..94831adfa354 100644 --- a/configs/pumpkin_defconfig +++ b/configs/pumpkin_defconfig @@ -17,6 +17,7 @@ CONFIG_FIT=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_DEFAULT_FDT_FILE="mt8516-pumpkin" # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_LATE_INIT=y CONFIG_HUSH_PARSER=y # CONFIG_CMD_BDI is not set # CONFIG_CMD_CONSOLE is not set @@ -59,6 +60,13 @@ CONFIG_BAUDRATE=921600 CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_MTK_SERIAL=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_MUSB_MT85XX=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x0e8d +CONFIG_USB_GADGET_PRODUCT_NUM=0x201c CONFIG_WDT=y CONFIG_WDT_MTK=y # CONFIG_EFI_LOADER is not set From patchwork Fri Oct 16 15:40:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1383429 X-Patchwork-Delegate: trini@ti.com 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=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=qDj1kAKG; 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 4CCVkd4H9bz9sSf for ; Sat, 17 Oct 2020 02:41:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0DD7824B2; Fri, 16 Oct 2020 17:40:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="qDj1kAKG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BDAE88249C; Fri, 16 Oct 2020 17:40:29 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 ECC9B8244C for ; Fri, 16 Oct 2020 17:40:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fparent@baylibre.com Received: by mail-wr1-x443.google.com with SMTP id h7so3440069wre.4 for ; Fri, 16 Oct 2020 08:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2wIQMjtnjqM3XCa/2DiQwafiUblsDiMFm4masWqTAsw=; b=qDj1kAKGvWB9q6aFA3EZc4aCpBBuVtaSgPyftSSwE/jtuva4zTvaPvLGEs3qJJ8YrD bR8WtbdCKn/eKLWTmWyoVgsFnNfeKCt/6cxiLM8FeXmWuSpRMobOGDlaGDzdn3ANVMxp uMlV3zLhD17MdDwINzzuJ1en8BOAJodxc00LtJKa27Q6phxVFUTHtI9lUceoKDB632PS oe5sgYERCJgouHl8usNqdssSHBKbZ6j+upDfsaSMnlKqXU9/TrRvbDJ9Db9FIO7WofIo 1WW/iUnEX5zEAJF8Tc4rlAFpTC5SUwB3W/Sj905mPdo4qe+PWb00PtCsQXef/g3LtAh5 OztA== 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=2wIQMjtnjqM3XCa/2DiQwafiUblsDiMFm4masWqTAsw=; b=RVqL1YY+9tQzA7FpqVtcrbX+OTbVHRwJPoC/JGebBj6ixreQJcZP2tDMCPvMIJOuPZ f/E8Fkb1xDKUPHNvtmWEsWJklpdQ4lbOdeKrOArRZtpfBqVu6uL4druGy9QlKRzYatCQ v0dhEe2qM29bPi6ZMovkoQknsZXXyfeyXJs/cI7v3soIN4i/YxRhDbBorSQTXhh7UVCJ GdgeRD+dAbSAeBY5I/XkpuXOk4/vCUqtqNUt9X+du9Fn3LWUu8mtfy99u+uCTbcMbA3U RdecBOdVw4y/I+JjhD1xGTprJqx9p79Pkcr7Es1OMIUP/LB/27g63S4umdvOe71dhVej WILg== X-Gm-Message-State: AOAM530cClh59aQyM8GL8CXURRZkfWOAVU6YZfkCDbzW6slA6uYXv6Cj /yxYd5DXWDUkeMer3iLXvKkoVOSfUqaANw== X-Google-Smtp-Source: ABdhPJyuEnqG1qTuipEwbywrZDWsyTP0szAcaFek2RnvSTKMv37s5B21KYKUtC2nUhNFkVpPmKrkgQ== X-Received: by 2002:adf:a31a:: with SMTP id c26mr4440978wrb.378.1602862824233; Fri, 16 Oct 2020 08:40:24 -0700 (PDT) Received: from localhost.localdomain (211.163.185.81.rev.sfr.net. [81.185.163.211]) by smtp.gmail.com with ESMTPSA id n66sm3100020wmb.35.2020.10.16.08.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 08:40:23 -0700 (PDT) From: Fabien Parent To: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream@mediatek.com Cc: weijie.gao@mediatek.com, ryder.lee@mediatek.com, Fabien Parent Subject: [PATCH 5/5] configs: pumpkin: enable fastboot Date: Fri, 16 Oct 2020 17:40:09 +0200 Message-Id: <20201016154009.3097917-6-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201016154009.3097917-1-fparent@baylibre.com> References: <20201016154009.3097917-1-fparent@baylibre.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Enable fastboot commands for mt8516 pumpkin board. Signed-off-by: Fabien Parent --- configs/pumpkin_defconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configs/pumpkin_defconfig b/configs/pumpkin_defconfig index 94831adfa354..3f2cc6d023c1 100644 --- a/configs/pumpkin_defconfig +++ b/configs/pumpkin_defconfig @@ -46,8 +46,13 @@ CONFIG_CMD_PART=y # CONFIG_CMD_MISC is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set CONFIG_CLK=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x4d000000 +CONFIG_FASTBOOT_BUF_SIZE=0x4000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 +CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT=y # CONFIG_INPUT is not set CONFIG_DM_MMC=y # CONFIG_MMC_QUIRKS is not set