Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6516878ybv; Wed, 12 Feb 2020 13:57:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxyKhgWVBhoBuS+BkUS3hH0IYCFIWhNIYWVovkHhgRfqBaHokevhsKVKd1bRcf4t+REJ0z5 X-Received: by 2002:aca:5486:: with SMTP id i128mr849108oib.12.1581544669111; Wed, 12 Feb 2020 13:57:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581544669; cv=none; d=google.com; s=arc-20160816; b=GCiDyHK+h1+8mv7F6R2YQSTJGrcO9x6YQhOTbhaW80Exa68tYH9Url7ad4blEqsM/Y 3ekL/Qzsz1gJtNHWHUke4MUdld1U1j6wh9PoI4eTKI0swyN8xwsh119Ae9yTkV/uwECA 59ZneOdBlwRJDB5fqbauNqPS49nj694Bhxyz6kRN/dsioukoLlpaRCNxDfOz/Wm9WgL1 sJCGOzNqGu5odfxE0CnADYoxu79F7StuVqiacHhVZbAmxi/sbCFU9SvXSM9GtRpN34EA As2vPlml44AKcOSUlM4SZNFx7kBj8ubVhcEKf+Nclnc36T3W4pkyZ18y2+jA8arRPomb E5Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=fnUhPBKcSJIh4dSE9ZDVA1HmaYlN0KtrojiReV2ykb0=; b=r5aD04aE+YqiQxtiMlh8i+d5njoltYaDZ8oOd5vPyw43gazXko3n16TsNGppnB73dh eTxqXGtCRdXsU6uLbh37mx80onP8q+4xq8iE9Ib/R4CP1w85Gjo18zxMT2NRGZ8A7l/1 3l3Px3ziAxZhDvAuZJhy2g6wetC9EaK0gb1kUflff5ImOgP6SGgeWWOzlSPPV7AYzpml Ay8F81OxseKwoCPQKSD2PRzvV8oIcBYCYAVyDB+fyapbyfwHNQrTyDBNh++lXVQumTsg s2D2PWzB/f5dZUHIxpkF5OX+FkgYtrpUZZFyaFFWq7k1CHskeivCLYgMJo7iBlorV+aa N5Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cu2HVdgF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si78777ots.99.2020.02.12.13.57.35; Wed, 12 Feb 2020 13:57:49 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cu2HVdgF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729097AbgBLV52 (ORCPT + 99 others); Wed, 12 Feb 2020 16:57:28 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:50911 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727791AbgBLV51 (ORCPT ); Wed, 12 Feb 2020 16:57:27 -0500 Received: by mail-pj1-f65.google.com with SMTP id r67so1449921pjb.0; Wed, 12 Feb 2020 13:57:27 -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; bh=fnUhPBKcSJIh4dSE9ZDVA1HmaYlN0KtrojiReV2ykb0=; b=cu2HVdgFsneUjNAodwp0mnQFtoeN6mjv2Ze87w4aV7ChgNbJ8jExut24J2vW66PS6T koVG7aLqf7ULojlqtp726KnUimqivbcuoUV9NtssprL5ko3YprdPY5xvqnlkTdPaIU/r 8sM5Sd0Qpm6pjQxOwAl9BQbYkjdRX7X68XoEgg8aDvvtGHrTBoVcR05S8hcmY3wT23FZ T4Q3nCX9mPO7fNbwnOSAJqdM8mt/maw+2dkLhWpkNJSgWQaOGZTea+Jlfky6SrNUIQ4k 1gqChzMwo5bt8sp/VLS/L4gnilV6Mhufl+oV3miS3u82WSBHBCTpb3KSoBpHxOn28S+A 2UwA== 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=fnUhPBKcSJIh4dSE9ZDVA1HmaYlN0KtrojiReV2ykb0=; b=LUNAjQn7kxW/oM/CWKbvsctCcnlup/2QXdaFm/96dFVK0Tect7Y8q1ShhuctNriuad uDYiNKhwlgbybZDkyH2zo6UDr7pinw56KYt8Tpuy4+VC0h0m5XnD8Z1gQAXQhu5hP+3p eRfnnVr+e+EmJaaaHLIswDP8caWlaBprkfTD7/VT8mZ3t77oOqtSKdWxlkB2AdmMPXvr Pb4WdpPvl4rsXTpAlmtL99QZdf/veaAtoDcrs+23cyD+KVt/4BJ373Be8qra5Os8a/Bv WTWdONnZyhZ+FvIb4GldTTbBAe1KMxEZK2gFCIqi7jd9LPH1vJXw2NRhDGcgqrD68GO8 Npfg== X-Gm-Message-State: APjAAAXItVH4eh7If3DSdsY8HG9prW7VymCJkvdIo/JTgtKw5xsiLXEw Js7AkRB7Fw3u4aqz26j3zpg= X-Received: by 2002:a17:90a:fe02:: with SMTP id ck2mr1313325pjb.10.1581544646327; Wed, 12 Feb 2020 13:57:26 -0800 (PST) Received: from taoren-ubuntu-R90MNF91.thefacebook.com ([2620:10d:c090:200::3:533f]) by smtp.gmail.com with ESMTPSA id r6sm214431pfh.91.2020.02.12.13.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 13:57:25 -0800 (PST) From: rentao.bupt@gmail.com To: Felipe Balbi , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , Benjamin Herrenschmidt , Chunfeng Yun , Colin Ian King , Stephen Boyd , Rob Herring , Mark Rutland , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, taoren@fb.com Cc: Tao Ren Subject: [PATCH v2 0/5] aspeed-g6: enable usb support Date: Wed, 12 Feb 2020 13:57:12 -0800 Message-Id: <20200212215717.9474-1-rentao.bupt@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tao Ren The patch series aims at enabling USB Host and Gadget support on AST2600 platforms. Patch #1 replaces hardcoded vhub port/endpoint number with device tree properties, so that it's more convenient to add support for ast2600-vhub which provides more downstream ports and endpoints. Patch #2 and #3 add vhub port/endpoint properties into aspeed-g4 and aspeed-g5 dtsi. Patch #4 enables ast2600 support in aspeed-vhub usb gadget driver. Patch #5 adds USB devices and according pin groups in aspeed-g6 dtsi. The patch series is sanity tested on AST2520 (Yamp) BMC and AST2600-A0 eval board: - AST2520: created 5 gadget devices with 15 endpoints, and all of them can be enumerated from usb-host side. - AST2600: created 7 gadget devices with 20 endpoints, and all of them can be enumerated from usb-host side. Tao Ren (5): usb: gadget: aspeed: read vhub properties from device tree ARM: dts: aspeed-g4: add vhub port and endpoint properties ARM: dts: aspeed-g5: add vhub port and endpoint properties usb: gadget: aspeed: add ast2600 vhub support ARM: dts: aspeed-g6: add usb functions arch/arm/boot/dts/aspeed-g4.dtsi | 2 + arch/arm/boot/dts/aspeed-g5.dtsi | 2 + arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi | 25 ++++++++ arch/arm/boot/dts/aspeed-g6.dtsi | 45 ++++++++++++++ drivers/usb/gadget/udc/aspeed-vhub/Kconfig | 4 +- drivers/usb/gadget/udc/aspeed-vhub/core.c | 71 ++++++++++++++-------- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 30 ++++++--- drivers/usb/gadget/udc/aspeed-vhub/epn.c | 4 +- drivers/usb/gadget/udc/aspeed-vhub/hub.c | 26 +++++--- drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 23 +++---- 10 files changed, 170 insertions(+), 62 deletions(-) -- 2.17.1