Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1112973ybl; Fri, 31 Jan 2020 14:23:21 -0800 (PST) X-Google-Smtp-Source: APXvYqw4ioZBmdAyCLs/K55B+NZXjbUPQ9Cykj19XSBGqFuSBkEty1vSB7vxI4z8Mm8985RoLjiz X-Received: by 2002:a9d:7586:: with SMTP id s6mr9161709otk.342.1580509401532; Fri, 31 Jan 2020 14:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580509401; cv=none; d=google.com; s=arc-20160816; b=h4CGEQu1I7kFv5FEJRPh7rjDIpZ+8y4K6mqLuxARYort5MG77GYo8OuhED6nGIW12g tG3w54JnYU2V/Drp1pmu663qzRPcIiKGhqlWkygi9/TPM9ejMoBDsgVHe1Ny9ftSuM9c HSDNlpSjyPEP0DgEHWRTxqPKcQdckmLRZrfsDHQAdNJ9cKjQkYZQon0SSVQmruCOfz6D 4lLiEbWvLjhPb2sIzAfdjefxQBRnfglWQ64IIGmItP+nJRaQNnMWkYgo43i4I1rFQRfk SgFqtFt9M/ICoVoZpap8Rt1TEvBZmxVZ/ryly/kqpmcEbBzFh8pnKka+ahHpYQZXnUwg zXrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=wSzJwkvRpdC4ZPPv+f6r9mzu5IB7aUbc0urJg/jNjl0=; b=ykH3pH88bSvwj3qq9BVDVU0T843uP28al+VuKphy1VazqdueruWazlchO5pP8Vwsz1 GLsorT45SovRYVr4y97Cx0996YTMh5t8UKsG19VNfBUffiQjeeFF85KOawOj3zqcTNIA JLPiqFF5ECB3Q0unvZHy9rc0uhKwEporq+PHzc22MS6DUf393QCWkkGVjHmr94J7ys8/ 59ZZP/DXHJtKAH1X/tUPxTjiEQFGsUf5VX0rjyoCmF3X9KpE4/idaqEqAw9jNQGpa8Uq wopCcrO8IvUOBlHZRVPwty0O043PdcRsxdy4x+iFvZxL1RIOFi8rtOGDdXvMYU1ys+Uz eKrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OvvSE+y8; 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 f204si4654741oia.43.2020.01.31.14.23.10; Fri, 31 Jan 2020 14:23:21 -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=OvvSE+y8; 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 S1726708AbgAaWWO (ORCPT + 99 others); Fri, 31 Jan 2020 17:22:14 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40481 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbgAaWWL (ORCPT ); Fri, 31 Jan 2020 17:22:11 -0500 Received: by mail-pl1-f196.google.com with SMTP id y1so3302669plp.7; Fri, 31 Jan 2020 14:22:11 -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; bh=wSzJwkvRpdC4ZPPv+f6r9mzu5IB7aUbc0urJg/jNjl0=; b=OvvSE+y8ye7N5+THH0qJlSCGi+0ze3TVr0d66Lr4LxVdRTY2dX9KY49MXJGfmPM7hy p/AQMRMm+VODOVx7LIykMg9Lx8HultkxI+4uU5egTDebM61K3nQIgGEMATMocCS89oVD l+AmaqvNHtr9RA9fD6HKXKB1uf8JKrJGXkcVE/YCXfzuraxGj/8mRdTEDFVgPqYPWbdG RTLoBSjLblnzgthVJiaimoGdC8LKr1O06wx4snrajedYITdZmqaH0pxRFNEr1j8OKF1T PnEHyjz357A5h7EWqzJhYIERLoUxfBogs8J+8ucqlqky7dmV+irAU4V1r8SMxNfi7b4x pLbg== 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; bh=wSzJwkvRpdC4ZPPv+f6r9mzu5IB7aUbc0urJg/jNjl0=; b=pAWqTTfIglC7cQFaDzA128yiIt1p0LN24jn0VSYptmQQnFWi/L9VtshWW5TNoLYgIM T90y4Umpo9oyYKuVkUR6Jk8h3hU/SKMfssj5anpB57WUhXVVG0l1a3R9uq+C9c1Clw77 IYVJCT+8U0SveJdN48pbCzTqGgU+/IeUekF9K1JfL8YW8oYy74NichRRKkkI/qXFeMEl GFQd1t9F7k++Wo7rlTgDIxdh5Utj2+/Fi1WiZ6wU80jQTwTviolc8DbHDUDC/5eS0W7w 2Cfl+66eSjGs5fxlNqcIjFXOV+nLh3dXSw95Hd3Yq2HljoRBDY9Whj9WSW8Qwwz3xGzl kRYA== X-Gm-Message-State: APjAAAWeckKqNGkBNgAXq7yKBuRTvSDwH+nNRTAVGtcJXnZ5Q/J3R5lx 9w8rRYjGMEmCDPso87m1Vq8= X-Received: by 2002:a17:90a:c24c:: with SMTP id d12mr15158909pjx.113.1580509330716; Fri, 31 Jan 2020 14:22:10 -0800 (PST) Received: from taoren-ubuntu-R90MNF91.thefacebook.com ([2620:10d:c090:200::1:a521]) by smtp.gmail.com with ESMTPSA id v8sm11201515pff.151.2020.01.31.14.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2020 14:22:10 -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 Cc: Tao Ren Subject: [PATCH 2/3] usb: gadget: aspeed: add ast2600 vhub support Date: Fri, 31 Jan 2020 14:21:56 -0800 Message-Id: <20200131222157.20849-3-rentao.bupt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200131222157.20849-1-rentao.bupt@gmail.com> References: <20200131222157.20849-1-rentao.bupt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tao Ren Add AST2600 support in aspeed-vhub driver. There are 3 major differences between AST2500 and AST2600 vhub: - AST2600 supports 7 downstream ports while AST2500 supports 5. - AST2600 supports 21 generic endpoints while AST2500 supports 15. - EP0 data buffer's 8-byte DMA alignment restriction is removed from AST2600. Signed-off-by: Tao Ren Reviewed-by: Andrew Jeffery --- drivers/usb/gadget/udc/aspeed-vhub/Kconfig | 4 ++-- drivers/usb/gadget/udc/aspeed-vhub/core.c | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/Kconfig b/drivers/usb/gadget/udc/aspeed-vhub/Kconfig index 83ba8a2eb6af..605500b19cf3 100644 --- a/drivers/usb/gadget/udc/aspeed-vhub/Kconfig +++ b/drivers/usb/gadget/udc/aspeed-vhub/Kconfig @@ -4,5 +4,5 @@ config USB_ASPEED_VHUB depends on ARCH_ASPEED || COMPILE_TEST depends on USB_LIBCOMPOSITE help - USB peripheral controller for the Aspeed AST2500 family - SoCs supporting the "vHub" functionality and USB2.0 + USB peripheral controller for the Aspeed AST2400, AST2500 and + AST2600 family SoCs supporting the "vHub" functionality and USB2.0 diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c index 94081cc04113..c827bf420278 100644 --- a/drivers/usb/gadget/udc/aspeed-vhub/core.c +++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c @@ -42,6 +42,11 @@ static const struct ast_vhub_config ast2400_config = { .max_epns = 15, }; +static const struct ast_vhub_config ast2600_config = { + .max_ports = 7, + .max_epns = 21, +}; + static const struct of_device_id ast_vhub_dt_ids[] = { { .compatible = "aspeed,ast2400-usb-vhub", @@ -51,6 +56,10 @@ static const struct of_device_id ast_vhub_dt_ids[] = { .compatible = "aspeed,ast2500-usb-vhub", .data = &ast2400_config, }, + { + .compatible = "aspeed,ast2600-usb-vhub", + .data = &ast2600_config, + }, { } }; MODULE_DEVICE_TABLE(of, ast_vhub_dt_ids); -- 2.17.1