From mboxrd@z Thu Jan 1 00:00:00 1970 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 3F9D549219B for ; Tue, 19 May 2026 11:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779189165; cv=none; b=JjtFuXcF37G6fCNEu1A1LJ1fJoN7KGGe//ylgjvFWDXzQvXDq2R4GZAsHcnoI1B3c/SVjsGabVf+Kgb2XUuJVONcjRAUqr7LVZFgjd+8eC/bybFP6uDQ6ExpvWFN/8XrBv0XIK0qgj6vAFqReD0OK2H6IoCcmeRd3Y0Wex885jk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779189165; c=relaxed/simple; bh=lN4ebmOI56ySsRA5WjpBi796VYIXOpn2IRp3wLpyJiI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cbcNwb9R+afbWCvsXYDgAuwFt2seE7/D24pPe7a/WmNwqkELD/MIb+zlG3nE6boLXbsLOsQQjtC9Yd4HZqmbZ1O7qD94LPSlfQFjqMSnaOcODqvMZ0UMWKcrpo2Pvw8ohmg2MHvR2wF77oS/dI/JFTiMVauYbjZkL5Pbtd7lfgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=TIUL1VHQ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CeCwX4ND; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="TIUL1VHQ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CeCwX4ND" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64JA2x1A1392799 for ; Tue, 19 May 2026 11:12:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= a1XQr65IlqltbgM6x08wrUNNZlwpTYCCV54Ti+76Ka4=; b=TIUL1VHQ6SnO0XV+ 770eD2QJ5MlJ6irBsXZ27TInp9WnSdW1wyPZByNyEINog+Dva/c0um2m939AL08y nvlGxJh6VV67lRRsdFufJEVOQ+Ke4RezketMKdFt60vWEL90qnpM3ulFV2TjGIa6 jFwjStJ9z3zN6AB4dTtKjLM3BBwsILgODdloGC5bJoroAYoq3DML4Cz7k35mb3km jotEC/6xHI5aSXjUdU9ffOB+LSJXznOPF235WHbK9NJ4QFg10/6+n2TWruhlV88G lzzv4MJvCLVkluUNLjmk+OcMl9En8rJfYz/qNnHNJOW/ONpBIwbxEm8boVng3rc6 YhrJ9w== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e8ns488ut-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 19 May 2026 11:12:39 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-50e62562b6aso11450591cf.2 for ; Tue, 19 May 2026 04:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779189159; x=1779793959; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=a1XQr65IlqltbgM6x08wrUNNZlwpTYCCV54Ti+76Ka4=; b=CeCwX4NDlX/EaqiPim9rRpw/H0baTGqlzRZpfw2zKNj2U4Qn+cxR5ZUDBZ1uw/pLeE eUuHDzBhRg14jaRkDy710/H6bbbU4UJNaA45lxAPzNSlvntMHIG+Dd0V9eYqzRpKxSK2 9pULmE+CslJ/1NGXub6BTV/NjurE9v2C4VfYfUtLeULfasrGenHQzl9sZ3WuzhNu4tfY 32uJpRSV0cKED4be/f4xp64BCuUn8JPpYluucPcswnLJnuh6fBBPxBtFDzlOgn9Qdxf2 vu5mPyXuKcYiSHRWB9ikH41GCUN6m9jpq9TzUzBBMyM6VvYmbFiWpnX+cT1dWRbAMKc3 iniw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779189159; x=1779793959; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a1XQr65IlqltbgM6x08wrUNNZlwpTYCCV54Ti+76Ka4=; b=pXiFfxQrqxWIzF91aLEEkl+b9SYgaAgiaoN7b+irxrabPqrb3G62UhythA6Gpi6hGK BmoaMvKe4WdZ+tXO1lyr3asDL1Sjm3TMc/iVF9mHApgsADEiZGAm2OpxTZzOEcVs96Ys 9ofB9ySuLUpZyFCUlhLSBzeN1DAcOhReXCJ0KrX69wRGQOPA3bXeug1B/uJ3jdYEGW6k 2U32DInLHBSZrc2cQGaYS4uatSKxCPCZVdsWqlhXoUCB3Fx3EemKmf6ef/muvw7adnob VqP95n7kRQQNb93DdEXgdHGzwV9OKiAcK6wIDJPsHjiXtNj2EhMTY5BVLC5W+sOOGbf5 CmAA== X-Forwarded-Encrypted: i=1; AFNElJ+lfWL4Nr+H6R/bqrf7qwsRBvZeZ12NO0VA4W2ZKRjmwAZLoId1OJJ0/su3p5bMGCwqWAJVq1zx519pjmk=@vger.kernel.org X-Gm-Message-State: AOJu0YzIuwT6rndgREpT8I7RRODQk2yK9S6w6p5UyS5HQ9CoZhARAwGk WBgmG89+s7jbX+vePnWRYlUsB0x1mCt8kMC2cAApX44Z1esLYlgOwJzUv/EdNHatHLYdt5qwOOV Ch0BRUx3oJy1IFtgsdLYjJWkJ0TYo1oSUL7bqV54iLQ4SK/iLOhC54wPnQl1S62IGWvg= X-Gm-Gg: Acq92OE4rICWyX5PLJ5OQcvx3drNglSGKEJG5X+X1VS0JViaisg13a6rjFDQEUSkdOA HoLkXt3P3MkzCDTfxhtWsxGIbHhLcHjLsjh0iPrSCFumavG2hBmWNA3pSUazD2CMGR6Ose5ivLE XUMjSl3gMF1PM/Bpk1Yolr+VLNpzSEvpqqpAK76ha4p2nsVYvyVe6eHAc4KiqX0Tnr/Wm/ud1kE ZuejhSGJ8f8S3qBdqOEAH93j64Xwm+GN6ptNV6DYTTpUxwCuPVOgWOVqF0hO0ipxU4BDSk8Ts2G dCqrmmZapOl6h7vsgpp71WjSoWsQfXWsk24IsMJAtkPuIFxkvn0VxS28vn76mXivAW89esK2Mh5 P+M4SF+Iy2Ab9mYFCoND/7uvtyVTsymwH2AhCUzF3tSrb2wLe62VQbg8tXh40nG6XfPq2BgsFv5 ilL+pzACmwZk/mjw== X-Received: by 2002:ac8:7f10:0:b0:50d:ec32:b84f with SMTP id d75a77b69052e-5165a0c922dmr185565711cf.3.1779189158963; Tue, 19 May 2026 04:12:38 -0700 (PDT) X-Received: by 2002:ac8:7f10:0:b0:50d:ec32:b84f with SMTP id d75a77b69052e-5165a0c922dmr185565191cf.3.1779189158412; Tue, 19 May 2026 04:12:38 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bd4f4c631e2sm679135166b.28.2026.05.19.04.12.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 May 2026 04:12:37 -0700 (PDT) Message-ID: Date: Tue, 19 May 2026 13:12:34 +0200 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 0/6] usb: typec: add Qualcomm PMI8998 USB Type-C role-switch support To: taygoth , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Brown , Liam Girdwood , Wesley Cheng , Greg Kroah-Hartman , Heikki Krogerus , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue , Casey Connolly References: Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE5MDExMCBTYWx0ZWRfX+hERSvkHcDR2 amd+w7z4myQmjGlF7nQREx0blyRgIlE9WT6pIP8C8wDXp9hcy0TUwXE/xBgZXgf0ghXcqFx4WEK eUibFSn3+u2M9iWevr8Pxh4AiIkBD11uhwUCtIH1HJmcBZok6+i9pzw13doThFWj6vaNNfpr9u7 TDjrenMNnv3b9LRj/pachbEcIGUI951tGj27SyyfZmsJdQ+Zk7XfDEw8k96cWxAStKwsM4CCV6g RGwy4XEqGylsNQk2BwY+Mxytq5MXq7mW67xrT/2oFTVqzgbBZ+WxJN0WVDPPB0TO7ZVXmUrHm8r Nj6p5Fb8ZL6DM8OsM43hE935kQjiSXfT9FUQoC1mjqZDgHFpscmmrr/0xvy+eMmfRgt/JaQiQWD q0LVY851dVRw8k1UOZq0Uvk5Fuzcbdo8Mrec+KOQhpn89SUaLvLG7mpn15iPlcYL28X6KQXb+LE s/kRC1wnTypubo8Ta1Q== X-Authority-Analysis: v=2.4 cv=F6dnsKhN c=1 sm=1 tr=0 ts=6a0c45a7 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=A-Mz9B4pz0Xx8zSY_0oA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-GUID: 5ouR_DbIQ9dJpRUxCJ5Z6Ke27xz6tiA5 X-Proofpoint-ORIG-GUID: 5ouR_DbIQ9dJpRUxCJ5Z6Ke27xz6tiA5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-19_03,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 clxscore=1015 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605190110 On 5/18/26 10:22 PM, taygoth wrote: > This series adds USB Type-C role-switch support for the PMI8998 PMIC > used on SDM845 phones (OnePlus 6/6T, Xiaomi Poco F1, SHIFT 6mq), which > have been locked to USB peripheral mode under mainline kernels until > now. > > The PMI8998 SMB2 charger block integrates a Type-C detection unit at > SPMI offset 0x1300 that performs CC sensing, debounce and Rp/Rd > resolution entirely in hardware. The state is exposed through the > TYPE_C_STATUS_4 register and reported via a single consolidated > "type-c-change" interrupt. The new driver reads that status on every > interrupt and pushes the negotiated role to a usb_role_switch consumer > (dwc3), enabling automatic peripheral/host switching on cable change. > Because the hardware handles the Type-C state machine natively, no > software TCPM port manager is required. > > The Type-C block shares the SMB2 USBIN region with the already > mainlined qcom_pmi8998-charger driver. The two coexist on the shared > SPMI regmap without write conflict: the typec driver only reads > TYPE_C_STATUS_* and touches the IRQ enable bits at offsets > 0x130b-0x130f and 0x1367-0x1368. > > The PMI8998 USB OTG VBUS boost converter at offset 0x1100 has the > same CMD_OTG / OTG_CFG / OTG_CURRENT_LIMIT register layout as PM8150B, > so the existing drivers/regulator/qcom_usb_vbus-regulator can drive it > through a compatible cascade -- only the DT binding needs the new > compatible string added. > > Power Delivery is not implemented. The PMI8998 PDPHY block at offset > 0x1700 is register-identical to PM8150B and could be wired through > the existing drivers/usb/typec/tcpm/qcom code in a follow-up if PD > negotiation becomes a requirement. > > Tested-on: OnePlus 6T (sdm845-oneplus-fajita) running Mobian > 6.12-sdm845. FWIW 6.12 has been released 2 years ago and the sdm845 fork contains a lot of unrelated changes. Please give this a test on linux-next/master Konrad