Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp247859lqo; Thu, 9 May 2024 20:27:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQu2P/oAnVbZWlVBzCJZtlIKobyzmz3+XYcZf5QLTJtSP1pgf2ZwZJL6sZ/NR0Yty/tcKAhgnhVjwgH/5fJigIImg4KXrfgN40MRxIjQ== X-Google-Smtp-Source: AGHT+IG7aybiaQ6IEPb+6RA4GkkCPj4xcLaKbxqHGVIT4WXIPogtor/ZeL1QyrWEy9vWEoRKCw+w X-Received: by 2002:a05:6a20:9743:b0:1af:96e8:7b9c with SMTP id adf61e73a8af0-1afde1b7014mr1528549637.47.1715311658742; Thu, 09 May 2024 20:27:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715311658; cv=pass; d=google.com; s=arc-20160816; b=qg/Y74yZOrss8VQ4qQe9AG90/TpoG7yRalbvJssQe2leE2rc8Bp6JIiOoGEYOu9wMX hLNMB5BBM5+SeTcS8co0ND+4sHGG3Cbt94QjJHAllDF4EfTsirsk0pYeY0sa5UJKpeBc PKVX8PN6Ug17kuW0TwozDOlBMo+Kjbg3FxVkgt/FJK0PIYfOji1rbt6qxcP+IW/x7f75 maKa/Fo2uLAd1IC6DVIKlmCYqD7fdJrtB9NXEg+rVogRlyBpLAw4vEMg77frafX7pL/p FFen4gFenoM/nuS4QmpiWc9jZjcK3zqfnStjR2mvUT5OPzCHCytf7waowgDJAkqenyAy vpkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=jmv/eZ0oj6B9M++CEv1uezXK3yVeNwJfrJ1xXJUCHHw=; fh=CY6SLX+x1sR9Nr3rEOb6UuRghQk6skDByFXndZuNCts=; b=RYJAT9Hat1ZrMC/3JdMNe+7MN2K9LW77jD65KP/k9PNaT3NIXCIk1uJNkLZG/t6feP WeEHUc9ODDc3QdHsqXs3AjzmsEDW0uVPZNKH8gKuRcJkyYI/Hq4b8fvPrpKnkSaTZEH3 9+McfxCp5fpLQf3oHmMGIWY/rG2HdoVfxrKuyy+QMEyfmpHpdKzK2lerJc5guiVN4Wfz FaQOe8qhvQVQpRBQirtxHdoF1vwobVN5016GKnzs3zAqUjaaNW4v4Kq7eU6jjug9vK4G l8Bh0VIaizXwcvR0P+0cy46PndKRpvOPkr+vj003mKEpIBoYHsDHLlXddNhgCrwqBxXI rPuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=Jm0m7fbP; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-175247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf32ba7si28127735ad.272.2024.05.09.20.27.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 20:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=Jm0m7fbP; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-175247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4E209284043 for ; Fri, 10 May 2024 03:27:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B48F1494DE; Fri, 10 May 2024 03:27:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="Jm0m7fbP" Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.2]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B80F1148FE0; Fri, 10 May 2024 03:27:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.2 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715311651; cv=none; b=YrU+XhHcnVNevkjJ3jpsDc81CXelbsnXfEjVFVCAQzYkfffrumVz1bjkPpevXDQQiSAJ0hQvQxaX5ZNxEk8BHbqOuuA6pjVebu+nVwbDrFKCwEGEx5FEIiSwM1XRnEyY4jBYBcdOAGZEmZUvUK1yTO1d41dEmGWALj1grvxfvUY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715311651; c=relaxed/simple; bh=Z7MPoeMmZKPqqjt1uSdl2xiWuJE7dBoYnnwX8FfM10I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fNtIEsqemEcMjNNLPexHjZ4QD+0tdyv0V+exF6HbmQve1Mr/KUHNu6RPtP7Jwp41TgXkQyQQ/9fbgstrsf/zcAEGR7bBsObPBYRVB/RjCSsWi2dnsaG6LVRSuhRpDLd0qJtYjZ7glVuK61jdYgXC/KkJ8jOn4nLMI7Lr1PklYgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=Jm0m7fbP; arc=none smtp.client-ip=220.197.31.2 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=jmv/e Z0oj6B9M++CEv1uezXK3yVeNwJfrJ1xXJUCHHw=; b=Jm0m7fbPXu0lXqMbkZT9w IKXhJc7PNi/cQY/OTENlzVL6iZ7cXI0yh8O5Wk+32uWHQhi9swJPOx/cICXEq0Fw kPrGqbiOFhG7Pu/FXV1c48TADth5GCueSh/KOqndlFDFoa4bBdmv9z4hcwOzsYy4 GAiih1dCm64MfJXbDJX8xo= Received: from localhost.localdomain (unknown [223.160.225.215]) by gzga-smtp-mta-g2-5 (Coremail) with SMTP id _____wD3H9EDlD1mCPkAAQ--.22491S2; Fri, 10 May 2024 11:27:00 +0800 (CST) From: Slark Xiao To: manivannan.sadhasivam@linaro.org, loic.poulain@linaro.org Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Slark Xiao Subject: [PATCH] bus: mhi: host: Add Foxconn SDX72 related support Date: Fri, 10 May 2024 11:26:57 +0800 Message-Id: <20240510032657.789629-1-slark_xiao@163.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:_____wD3H9EDlD1mCPkAAQ--.22491S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxCFW3JFy7Xr4rGr4UZr45Awb_yoW5CrWUpF 4fZ3y5taykJrWFgFW8A34DGas5Jan3Cr9xKFnrKw1I9w1Fy3yYqFWkK342gFyYy34qqFyS yFykWa4a93WDJr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRHlkcUUUUU= X-CM-SenderInfo: xvod2y5b0lt0i6rwjhhfrp/1tbiowXaZGVODTtkoAAAsB Align with Qcom SDX72, add ready timeout item for Foxconn SDX72. And also, add firehose support since SDX72. Signed-off-by: Slark Xiao --- drivers/bus/mhi/host/pci_generic.c | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c index 08844ee79654..0fd94c193fc6 100644 --- a/drivers/bus/mhi/host/pci_generic.c +++ b/drivers/bus/mhi/host/pci_generic.c @@ -399,6 +399,8 @@ static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = { MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0), MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0), MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0), + MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0), + MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0), MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2), MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3), }; @@ -419,6 +421,16 @@ static const struct mhi_controller_config modem_foxconn_sdx55_config = { .event_cfg = mhi_foxconn_sdx55_events, }; +static const struct mhi_controller_config modem_foxconn_sdx72_config = { + .max_channels = 128, + .timeout_ms = 20000, + .ready_timeout_ms = 50000, + .num_channels = ARRAY_SIZE(mhi_foxconn_sdx55_channels), + .ch_cfg = mhi_foxconn_sdx55_channels, + .num_events = ARRAY_SIZE(mhi_foxconn_sdx55_events), + .event_cfg = mhi_foxconn_sdx55_events, +}; + static const struct mhi_pci_dev_info mhi_foxconn_sdx24_info = { .name = "foxconn-sdx24", .config = &modem_foxconn_sdx55_config, @@ -448,6 +460,16 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx65_info = { .sideband_wake = false, }; +static const struct mhi_pci_dev_info mhi_foxconn_sdx72_info = { + .name = "foxconn-sdx72", + .edl = "qcom/sdx72m/xbl_s_devprg_ns.melf", + .config = &modem_foxconn_sdx72_config, + .bar_num = MHI_PCI_DEFAULT_BAR_NUM, + .dma_data_width = 32, + .mru_default = 32768, + .sideband_wake = false, +}; + static const struct mhi_channel_config mhi_mv3x_channels[] = { MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 64, 0), MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 64, 0), @@ -680,6 +702,15 @@ static const struct pci_device_id mhi_pci_id_table[] = { /* DW5932e (sdx62), Non-eSIM */ { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f9), .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info }, + /* T99W515 (sdx72) */ + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe118), + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx72_info }, + /* DW5934e(sdx72), With eSIM */ + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe11d), + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx72_info }, + /* DW5934e(sdx72), Non-eSIM */ + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe11e), + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx72_info }, /* MV31-W (Cinterion) */ { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3), .driver_data = (kernel_ulong_t) &mhi_mv31_info }, -- 2.25.1