From patchwork Mon Feb 19 06:10:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puma Hsu X-Patchwork-Id: 20575 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1105237dyc; Sun, 18 Feb 2024 22:11:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVjH+rfGC6YPzxKIpDcppVEyY8PvwEjYSJXNnd84IscuEBpZoH3/rVWp9i0QjIpjqqA02hen12v9wApEfc900YBdF9osQ== X-Google-Smtp-Source: AGHT+IEklLjx2dvyfhQKQEtz1rNLfxzRlbYUL4QuSiMvCNmus3XWI3EWN6IhLOTUYyLDm7/WmFM0 X-Received: by 2002:a19:431e:0:b0:512:b396:6f03 with SMTP id q30-20020a19431e000000b00512b3966f03mr908483lfa.24.1708323098068; Sun, 18 Feb 2024 22:11:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708323098; cv=pass; d=google.com; s=arc-20160816; b=CwhPiCaqKMnL3HAwxTLLgLDREQN6LD/2qLD2ALmCIchXArKemtKRQGnL58pvGwfvvk jvBTxJPS3Qdu32AEqlQgTT+73TLUEOlkq2YIco2ysdobEGPDPvAJnvGZ/u5YLl5sfhMg mJHgAEQWOV5ngCJFLq19QYwfQ15JaoneDDlQDATuWX6OWlmJuLUgIBTNaZ/T7RoSv68w 6LwTV3LN3DMqo2iIE4S4fXoBP2TWPwHmCCGviyXd5UZrrX7VXf9SnPjQITQB3XDlam8f sD3SYN+iS55vMzXUAnXwjKXN5FskhsOnQGWZ6863ugSv04k4L4K5uuHNCzF3cMCChPZZ Mq9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=hHHSh71VeE7R522+653gkjpIftZNNCvUqKd1gyCW278=; fh=I7nPRyHKvgTmCkgNE2St670LbR2ENaGElKB/5Ly/kjI=; b=lsVzbraTq42i3IMFa7YpS+HALXImNYd83F62DWQQUgEdTbu3WHyhR66903SFYXGXYt 7L/uioBSLSbfEyWN/TKB0Ro2XczrpHfNtKFS0bgUiEd5Zp6sdIZAmyVjM/UIo5/vQuQ8 sa4CHQTjzRVdBx2v654CgAldPSgr96wOmvVoDL1/PW5soBGXDhTdHNvyD4oyFQwGVdIX jCzBZplrcpqxE5vF/315o6bssEZ7gFaQAxBJEJod2Z/na4XYltDYvCZjW3dBkqarpBv/ 8FxeCh77qs4uYq9cOJR2qhXZpIsskb7P4rKneVE3zMGyo8NJPCsz3IAXiVwO1sSaaxDT 7Obw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=lsAtvYQL; arc=pass (i=1 spf=pass spfdomain=flex--pumahsu.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-70757-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70757-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g21-20020a0564021ed500b0056458fa3b8fsi1074084edg.593.2024.02.18.22.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 22:11:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70757-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=lsAtvYQL; arc=pass (i=1 spf=pass spfdomain=flex--pumahsu.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-70757-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70757-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6CC971F21B96 for ; Mon, 19 Feb 2024 06:11:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF53A20335; Mon, 19 Feb 2024 06:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lsAtvYQL" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 832211CD0F for ; Mon, 19 Feb 2024 06:11:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708323062; cv=none; b=ZKD+tFVoJ3la2JSyM83wblkJgedSrX4cDKkPRCtYW6aQQoPBTQN7KIWcYDUrH3MkeEqanpg1oXw+3lZOol9P9a+aEEg3kixT/7N2cL2y6h9h2ENLdAsIls/6dSOpz7eihKPtQO//VA8k26YjeAoid25vgJxAa6iqoQ2MTNCL/rE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708323062; c=relaxed/simple; bh=jKHsvnkpUXR50TFr/Z3xsxv3/NQO7e19eRb0+AeBW30=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=Bl6cqhFfOKN6r1F0NwwJb0pJZxStzk431PNA5PpYogWMNHWNUu34ExT0vLkevTKZ8SdfphUUb3uw/fVrH25WmelWINV5eMW5nSsFxsPaUZeyOa030ZsiyPZPUZLOIePdBFDgedSS2WJSWsyJNfegcef3Qj5CfRk0SS0kC0NQE3Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--pumahsu.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lsAtvYQL; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--pumahsu.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-5f38d676cecso61733797b3.0 for ; Sun, 18 Feb 2024 22:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708323059; x=1708927859; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=hHHSh71VeE7R522+653gkjpIftZNNCvUqKd1gyCW278=; b=lsAtvYQLzBprysin85a+8rdSd0P4CrzOjKzmnpJadR/2rNyrm0GSl+1msRvDbTEb97 orCoYL/2AhABQWPtbeFaTdeWs22wKxJqPviFItRSJMLVHB2VhCYVhyC850w2wgKzyu8S poYHFzXixpJyC8L1P7NYyJPMOwAaBWxgUm+cRa66bmcQFCJhphTHOkZr2yn9C5c8ODYP iDse4ylOtPhan6TXzRoahd4AtLVBygPWI/bfLl1HuX8Coaj+DkmyGm8EjK4fyKu2tUMI 9RMkadd0E928dhQmtZ0s7Zi8AJ9IngnZ1OBBtESHSE3aAlI79B0shh4+AqgvutTocIog u8bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708323059; x=1708927859; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hHHSh71VeE7R522+653gkjpIftZNNCvUqKd1gyCW278=; b=eGcDFqG0gdG+SvkmEDsuc+ydlLVwZ8OILdgadkC1/aAm65xnGb52Trv6o5GB0by/MI KEwZ7dJuTVt1DIOOSpG0h2X9Q2LQHvt9NPjVlZZtJCNoPsvqGdhRRdLCXtFE6FqMpQGC Qo3K2iDH4w0Yli7rVsR1DkhncfZyxWUvKFX1x33reS0T0S2ojiNslR61gZ3fCROXqVlv gLR5iyEq/af1XCDecYQxngEzttiiHohxQMCVGucAFwdNhCpHgjhQ7Y6ZhWE97wNVvvhf i9QdxStO4LdWBXSpQmX2lMmgnlPznfQeBmj5b1+A4ZmJjrD8C0pQpfqZNNhvKZS5Q0Ka We+g== X-Forwarded-Encrypted: i=1; AJvYcCUmCls6OtYDcnahI4dOji9FW5KJmmc3ZFH9e5Iqpwi99od23jY7yXv5tjYtLjXePQI86plJdEqWZ8MU3fBySJ04lQ214yAv7WE5S6as X-Gm-Message-State: AOJu0YxdTziloGvporo0izGJo4gT9D5pZJI9nE7UAFVcMSbwmWrVryCo lFbMHyBE/iQsk0s2Hh+AT6taFZi/M6JvtN1MQ1v3W+jKX+5ptuzctl57ShUfMM0k2Mn9VB3mETW I5SjWSg== X-Received: from pumahsu-p620linsp01.ntc.corp.google.com ([2401:fa00:fc:202:c8b2:b71:a506:971a]) (user=pumahsu job=sendgmr) by 2002:a25:eb07:0:b0:dc6:b7c2:176e with SMTP id d7-20020a25eb07000000b00dc6b7c2176emr2679115ybs.4.1708323059705; Sun, 18 Feb 2024 22:10:59 -0800 (PST) Date: Mon, 19 Feb 2024 14:10:05 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240219061008.1761102-1-pumahsu@google.com> Subject: [PATCH 0/3] usb: xhci: Add support for Google XHCI controller From: Puma Hsu To: mathias.nyman@intel.com, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com Cc: badhri@google.com, royluo@google.com, howardyen@google.com, albertccwang@google.com, raychi@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Puma Hsu X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791306600597286742 X-GMAIL-MSGID: 1791306600597286742 In our SoC platform, we support allocating dedicated memory spaces other than system memory for XHCI, which also requires IOMMU mapping. The rest of driver probing and executing will use the generic xhci-plat driver, so we introduce a Google XHCI glue driver. Besides, we support USB dual roles and switch roles by generic dwc3 driver, but the dwc3 driver always probes xhci-plat driver by hardcode. We introduce an alternative for probing a XHCI glue driver. Puma Hsu (3): dt-bindings: usb: Add xhci glue driver support usb: xhci: Add support for Google XHCI controller MAINTAINERS: Add maintainer for Google USB XHCI driver .../devicetree/bindings/usb/usb-drd.yaml | 7 + MAINTAINERS | 6 + drivers/usb/dwc3/host.c | 8 +- drivers/usb/host/Kconfig | 6 + drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-goog.c | 154 ++++++++++++++++++ 6 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 drivers/usb/host/xhci-goog.c