Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp17029ybf; Thu, 27 Feb 2020 15:05:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxfbffZzr9zeMJDjJkJ5Yp/qPIGUjoxOANBk4TTCd0oJlYemNZ28UWutpQ31I5/xKrfGLva X-Received: by 2002:aca:b284:: with SMTP id b126mr1057322oif.79.1582844737426; Thu, 27 Feb 2020 15:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582844737; cv=none; d=google.com; s=arc-20160816; b=vcu5GGzm+Z5wqv8d8DTDVbPVgGReuefHppLEtVWg/OTU9o8Vx4Y9pFsSqy23uEVhjx YqarxPdVEgclnLyMU49pfUvi6byReJuMG41cbq1bgji/tLEQJBbk3nOZrgJOqwTb5ru9 SHhj/pxfPzIr2zBxwMvY5OvDkNmCiKqDT5Wt6sbw2lYUyhQ+bpshzFYs63ClYkkz7/8E Pr8Bii/kjbY0m6p8C5dWwt9kRLGhXi/tsK86EhGFw2xVTJeSElZbFLEAp0NoZKy4B9IK WzcR3H1W7wB96Ce2nn8Y4OQV/XTYNnOBci5AtDR7/XRJSvUWW1Y1LhQfctrHPJ5XPxNW SdmQ== 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=Bk/8S/Z3TX6gpAJL/01qav03pWjPrUS9+WLbM4tWfRA=; b=NrjaVSoUk8JVi3+Ct1eycFRDB7jHd6GZlQT1hxkh9bfx0z0ptyj6BUghcJkCMFpHWl KhvRxcJN+pw0crcRUH7PFG19K6zVYXbH2Vakxzvb0fbnNOdLt+Z/cTiMB3uBVvjSx5sc 95YICeV+T77x56kzfKKINtYkojgwlY6XCkvVTapL1fbVIkGX+RsdXesRNf0ihwsvYg3i OqxetLKTx27KHh/WbuVVGy2GNtsBsaLm51DYDD4sJXCOhxCVriPY4mIso3HCKdGMzTLk fuZD0Sz4447h38TWkNeTnHoD5W1CQzuKcnAVFUCGpMVFtPLEHDwgxbpUUVOPsO7AwuN8 XA0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D3uxW57B; 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 a13si370871otq.201.2020.02.27.15.05.24; Thu, 27 Feb 2020 15:05:37 -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=D3uxW57B; 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 S1729849AbgB0XFR (ORCPT + 99 others); Thu, 27 Feb 2020 18:05:17 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43838 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbgB0XFR (ORCPT ); Thu, 27 Feb 2020 18:05:17 -0500 Received: by mail-pg1-f194.google.com with SMTP id u12so442841pgb.10; Thu, 27 Feb 2020 15:05:16 -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=Bk/8S/Z3TX6gpAJL/01qav03pWjPrUS9+WLbM4tWfRA=; b=D3uxW57B0O2ZCS13ox+7bG3kfYJ5dm/5SQnmvP4FvWhMrFCseDKD7aHRX77YVxLIeK QmXQXLgi+BnIuBKkThmncjPPcuDErTVpgwIJInw2WrOKFBUl74O14clRUCo0uKUasRG2 jHFO9WNnbVQI5EgXyYuRbBazh7hxKpeywV9Pewb4YiMMN3rsNkp3XDAXHVyhCAFV0b/J HkE3e7EbQif7P6K7MEumvanCMAPKGqR7osu4IrHNXTFkYZUgtnm6eDQA9i0SF0BaiHuF umwDNdSfJi8ud1Yac4Hu2BOp6j2iWu8BmIrGqz9CXAgOBxaG3LPsdKXZWCRQRhJMU7aj kBfg== 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=Bk/8S/Z3TX6gpAJL/01qav03pWjPrUS9+WLbM4tWfRA=; b=DEhascdTjvS1ytbfMw8zRWZL3NhIxMyrFF7yB/KZRBxd+ShlGNPwRK1ZBL2/okI+Jv b1NUMBYoyyQV+us53wx+of3++gLaNQqKJbhDhocrmjZUcLG0BrSfkodmAiNviNyMmPHy EEIe8BPV2MRv3kxIdwqvK27wry4nKxK+JwasABdCCrTkyPRf40taAVPhWpcYytCDolCq KpeFSrzVg4AYvC7jxisXJqIrMYavr6OqqOddIwXSKXd+ObNNtGF97jjVGl+H/zDlxzGV qkw4X2BLRXn59MG7tEHlYGFAWS4qB8zRbZZrg0/vCZQ2/cMtzdeMLmc+fsxC2J22ngzG wwfQ== X-Gm-Message-State: APjAAAVnKUECtFSn6s9rbhXYYigIsIG4WB8hJOG2MoIPBQR/WiR2Ii2I BelNOBC8cWrrC0KawPY48IgXJDKlv1w= X-Received: by 2002:a63:5fd5:: with SMTP id t204mr1541214pgb.265.1582844715754; Thu, 27 Feb 2020 15:05:15 -0800 (PST) Received: from taoren-ubuntu-R90MNF91.thefacebook.com ([2620:10d:c090:500::4:d8f5]) by smtp.gmail.com with ESMTPSA id w2sm8275975pfw.43.2020.02.27.15.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 15:05:15 -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 v5 0/7] aspeed-g6: enable usb support Date: Thu, 27 Feb 2020 15:05:00 -0800 Message-Id: <20200227230507.8682-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 includes vhub's usb descriptors in struct "ast_vhub": all usb descriptor changes will go to the per-vhub instance instead of touching the global default descriptors. Patch #2 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 #3 enables ast2600 support in aspeed-vhub usb gadget driver. Patch #4 adds USB devices and according pin groups in aspeed-g6 dtsi. Patch #5 and #6 add vhub port/endpoint properties into aspeed-g4 and aspeed-g5 dtsi. Patch #7 adds device tree binding document for aspeed usb-vhub driver. Tao Ren (7): usb: gadget: aspeed: support per-vhub usb descriptors usb: gadget: aspeed: read vhub properties from device tree usb: gadget: aspeed: add ast2600 vhub support ARM: dts: aspeed-g6: add usb functions ARM: dts: aspeed-g5: add vhub port and endpoint properties ARM: dts: aspeed-g4: add vhub port and endpoint properties dt-bindings: usb: add documentation for aspeed usb-vhub .../bindings/usb/aspeed,usb-vhub.yaml | 71 +++++++++++++++++++ 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 | 58 ++++++++++----- drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 43 +++++++---- 11 files changed, 284 insertions(+), 71 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/aspeed,usb-vhub.yaml -- 2.17.1