Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp202535rdd; Tue, 9 Jan 2024 01:04:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7AWLjx2Ra8rX1x+eeCv1U3SEUh/82jMAT7BryznERCdPhVnPF7I0YzVTYzzPsYYvwPlKh X-Received: by 2002:a05:6e02:17cf:b0:360:800c:963f with SMTP id z15-20020a056e0217cf00b00360800c963fmr8281641ilu.30.1704791040881; Tue, 09 Jan 2024 01:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704791040; cv=none; d=google.com; s=arc-20160816; b=UNKJRtNwUCu+2n/9J0y55zW5kDkV0oW5jyrWGXfnSlZwl0uB+NtFr4/XlwiFcaxqJF t+Lqg7A+jdKZNMKE9gR7Tq1JBpSaXZKmTP5tjNAoEWfYDnfuOuhIbSs7P9HzZEG4RBWx POjBd/bWe5S1xmLBV89Ei7JbOzo35cRfhNklc4tYv4gW8HRLjbeYFTn0mB/IdylC2woK UOXXeV3ktaHFtxa91TS5MYtJP5S2Eer2M5IddKziRwrBP5OjiaamGLaVotWoY2zW31/4 mdXbiTRxrnv7j7+U9zIUTgUWiUMJSar5Y10URJ4nSzRDVQO8BxwsZ599b+K3gIWZP1jd jthg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=BGibbLuPsp6YqJ9RGSe1cHagl2jLZ2fUPegRL4mMGKs=; fh=/aBpIsUrCQgRorqSMLSPVKjYspi8PSfUdL57iDGCBYw=; b=Mm90EZ+HhRzxTdtpaVPnp3getGaVxWscqM9TTNrALOIqHQYZb5BDDAakkxzvKOmC/q 1lRGIqibZa2Bp/1Qne1FLQz8Cq3M+5LtLH30Stkn1qCWPeowmekwgNsU6mPYpqrWM1Lh GRLyhNafXPdZl8qpOY5aOK9hsRAhUKAJXYLLvHlffsxN12jnyG/JFr2eb2bq+hnvjUk+ apcfH5Xpf5YiCbQxkWb2WvgEj/fh6bWWHn+plAMjWK7YuW5g+O61NJwcZGp0/avY/7BQ +6PsIs9uvJGmfr0t0t7HXjHR3OQuuOZDoxD3Y6XKS+Pv5qLt4Kbd6KwLlpE+RDXQqSvr KhxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SuhjkCPm; spf=pass (google.com: domain of linux-kernel+bounces-20610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d1-20020a656201000000b005cee02702fcsi1158343pgv.14.2024.01.09.01.04.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:04:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SuhjkCPm; spf=pass (google.com: domain of linux-kernel+bounces-20610-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 13B0EB26DB1 for ; Tue, 9 Jan 2024 08:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 784362E840; Tue, 9 Jan 2024 08:43:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SuhjkCPm" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 398C92E636; Tue, 9 Jan 2024 08:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4096fE0p006338; Tue, 9 Jan 2024 08:43:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=BGibbLuPsp6YqJ9RGSe1cHagl2jLZ2fUPegRL4mMGKs=; b=Su hjkCPmGfC9mIlqDcxdKxhVpvVCMtFIqmk3qiOG48qOe93iC7AqWGse1H3Re9rhO/ xGW4DQfGeRBtkcaTZwqWuSuty0Tc++3hodT+Zgf5u+ppYpzrZlNhNQphj5xC9Arm /X6sKkRrW9HN5bDRYWyjoMp8Wn8yB/0eBiFt5lunTcqz6NPD8TqrSppnbL7hs9rh nk3PgYCFHHpdwPw/momyqggqKCcOFffOPFIN19AFAAY64ow1uzwwAFAO/BSFUlBH aECfqq9ukbVIkouqP6cOYQEA/aOgJ6097y6UpHRde3htF6JQkOQkIerCFbwXyCls t+3qCdg9J1EF0Ssz4/PA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vgwq1rjxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jan 2024 08:43:19 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4098hIn8022107 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Jan 2024 08:43:18 GMT Received: from [10.253.78.145] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 9 Jan 2024 00:43:15 -0800 Message-ID: <78b0b2c0-20b5-4682-8020-335395d0af68@quicinc.com> Date: Tue, 9 Jan 2024 16:43:13 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] bus: mhi: host: Add sysfs entry to force device to enter EDL Content-Language: en-US To: Jeffrey Hugo , CC: , , , , , Bhaumik Bhatt References: <1703490474-84730-1-git-send-email-quic_qianyu@quicinc.com> From: Qiang Yu In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: sMM0X-rw5YV5v5z0lL21EP0t4MCX79PI X-Proofpoint-ORIG-GUID: sMM0X-rw5YV5v5z0lL21EP0t4MCX79PI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 suspectscore=0 malwarescore=0 adultscore=0 phishscore=0 impostorscore=0 mlxlogscore=706 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401090068 On 1/2/2024 11:31 PM, Jeffrey Hugo wrote: > On 12/25/2023 12:47 AM, Qiang Yu wrote: >> From: Bhaumik Bhatt >> >> Forcing the device (eg. SDX75) to enter Emergency Download Mode involves >> writing the 0xEDEDEDED cookie to the channel 91 doorbell register and >> forcing an SOC reset afterwards. Allow users of the MHI bus to >> exercise the >> sequence using a sysfs entry. > > I don't see this documented in the spec anywhere.  Is this standard > behavior for all MHI devices? This is documented in MHI spec v1.2, 13.2 Emergency download (EDL) mode cookie. So I think it is standard behavior. At least, SDX65 and SDX75 support it. > > What about devices that don't support EDL mode? > > How should the host avoid using this special cookie when EDL mode is > not desired? Can I include another flag in mhi_pci_dev_info and mhi_controller and check this flag before writing EDL cookie? > > -Jeff