From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 60E97391846 for ; Mon, 18 May 2026 20:23:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779135791; cv=none; b=NRwrh+kh2l342ZuQzd7/u0N7LfmUDba7amcLyPcYy5ah//2IQreiMsRTWMZKaY2tBvm3HaVaYY1iX07y/V4w1UhBFY6Sg8Xx3k5Nn1TrEbBijn0DtEX1NxGz+buSwUW/AbVNOgjzE9B1r6H+RSpy1GrVgHwIL7H+Czunf6jJz0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779135791; c=relaxed/simple; bh=xgChc86S/ky0hTX1WHgw+ITaDh9vre+/OuTho3WUOIU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YQuY3Raq4Fdn/SRAd0AtUfPt4eHnrHCmDIqoDFXR0bAQRZaCtazePddcSF2g+YBlQs5Q3Wo4ven41jh8ymNChqx3ap3yRyiYTeivFmLmcVuI389X+T4BcWGP5suJkLCghcrJIaedBwNjmqHVGpWFiOIrzudUtSjmYdksuI8JdoI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fzxtwpUZ; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fzxtwpUZ" Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5aa0da74eaaso3617642e87.1 for ; Mon, 18 May 2026 13:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779135785; x=1779740585; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K+gznpkaSXk+Nx5SKTS+MzsNikKdxnv7goUi1xVYfHc=; b=fzxtwpUZDYCDvuwfiHAQeeWnO5BJMe7Pcw0EVEfLvJ7vwbeIHgQezBzhH+aIBJ3abN VyK/Jlm7KQIyoBJ3oU/y2IsFMjqrwfEBWHP8K5aU/TPYmklkyRU+4Cd5wHJiIJFAVOU5 esSrflyKAosviPnVBCVaszt0O14G+KfmWbVapChrKBROSJYJbtEMwhSqdnv/upmHxYaj K5uoLgyay9FXk5lSu/HCKHlpH6/+Ut4vzg5BynDnhLvYfrW1MkGLEotikZYusEoRN6/j TjvhWo6n+7rUboZ/ptV7dA7ttNQ7wLjMHDA5mGqaku8/svxiKc3ogkcv0MsTKKWcCdXw ELdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779135785; x=1779740585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K+gznpkaSXk+Nx5SKTS+MzsNikKdxnv7goUi1xVYfHc=; b=Ni7nNbg+VwKyajt4xG22+ZDAklQeEp/Rox5aD8r0U7vB3lwjS1sd2JI2oEXnyw0ef/ HMngUmqyIMCPFqKD+cjorKXIXheN+rQ+urlAj1fmw1Y+Y5WMIzHMUXSWzXaL5Ge+fC+H iQLB4bGLI8bOi2pjAfl9a097zR28mkXGvZofrt6Z/Yb+za8FD+kL8TaWg0V9BE3ECssw QCadvfQ/7gnmSmMwQO7vnS085FOhKauEHym7G/n0r+L8N+7HPtAQzqwFR5MhGNiTSfE8 +mo9fx/HWB9//U/ZWt9di9ziEHDU64HF6x3/ibcNwECH/krNivIiXcw5SsjYPQaUZ4KC xvGA== X-Forwarded-Encrypted: i=1; AFNElJ+ahXZkY9SsS7wOk65TcjnG2pHhXvzYbsQIQ9+6aWmicnjfjX390GLxxkg52xQoKtIdWcnKtSYpNS0g1ro=@vger.kernel.org X-Gm-Message-State: AOJu0YwC+A8U4gLjYEF3nyhSPwTtTbSM6ouEAfEKYDnUctExCkeZ/8E/ xdUYs5BPG+yQr+JAL3+HIbPspwtFkHoaMOQzI61UixXb+t/N1/l7PRT3 X-Gm-Gg: Acq92OFFt1U/6OETgaERNOcvCgiI6MK2g4fAo27iJFX1T2dY55Pt38MmnVQDXB5w6zP RfZbAa2Aqy82AkL0I1yeyzJu5RAja94PBvhIl86fDDOfFUH4MQ5T92iQVlmmoIAIUNWYZHcr+Ku JP+/EDc3Ev2vvpaQGgO0pav7XwaT+/HEmMMU/3A7tXZrpCS+zL6G6wQ8d1MT5H8l9tLRhSSQ8Sc J8TvUf6pVvFDnfRAsxZ+BAAbRa1mCYgaTXnSe1dm8HjlB8PVqpVXqjMISG872ga9jGgaN0XjxUD AJD4OoNxemLtd5urEYNaMxGOFxD4AaornJ/3rpUga99k9sEX1YmIN9zGoHzy3EniYW8NRU7hJLI 2m6DrkwaMNyyW46yWGFKLefWd+o0gJYJFN6YoE/89Nln9ZbEI01XodJRPL+TgLt1n/FBpz4ck05 Sdt4WXfl1lK2s+IPHx8C52RzxEhCVtGNv7Ux7fpYA6WJs9O4W+tFw= X-Received: by 2002:a05:6512:1044:b0:5a8:837a:2a98 with SMTP id 2adb3069b0e04-5a8ffc6705bmr6263143e87.14.1779135785334; Mon, 18 May 2026 13:23:05 -0700 (PDT) Received: from localhost.localdomain ([90.157.113.57]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-395887b42f8sm15225061fa.36.2026.05.18.13.23.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 May 2026 13:23:03 -0700 (PDT) From: taygoth To: 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 Subject: [PATCH 2/6] dt-bindings: usb: add Qualcomm PMI8998 Type-C controller Date: Tue, 19 May 2026 01:22:47 +0500 Message-ID: <5f4271701066943ead54f82003ab282c4b39f3da.1779127507.git.taygoth@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PMI8998 PMIC integrates a USB Type-C detection block in its SMB2 charger USBIN region at offset 0x1300. The block performs CC sensing, debounce and Rp/Rd resolution in hardware and reports role changes through a single consolidated "type-c-change" interrupt. This is architecturally distinct from the qcom,pmic-typec binding (PM8150B / PMI632 family) which exposes a granular 8-16 IRQ topology fanned out per Type-C event for a software TCPM state machine. PMI8998 has neither the per-event IRQs nor a register layout compatible with the TCPM code path, so this binding describes a separate hardware- managed role-switch controller. Signed-off-by: taygoth --- .../bindings/usb/qcom,pmi8998-typec.yaml | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmi8998-typec.yaml diff --git a/Documentation/devicetree/bindings/usb/qcom,pmi8998-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmi8998-typec.yaml new file mode 100644 index 000000000000..f2814f5ce3de --- /dev/null +++ b/Documentation/devicetree/bindings/usb/qcom,pmi8998-typec.yaml @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/qcom,pmi8998-typec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PMI8998 USB Type-C role-switch controller + +maintainers: + - Maxim Furman + +description: + The PMI8998 PMIC integrates a USB Type-C detection block inside its SMB2 + charger USBIN region at offset 0x1300. CC sensing, debounce and Rp/Rd + resolution are performed in hardware, and the negotiated role is reported + through a single consolidated "type-c-change" interrupt. + + This block is distinct from the TCPM-based qcom,pmic-typec controllers + (PM8150B, PMI632, etc.) — PMI8998 lacks the granular per-event interrupt + topology those parts expose and the driver therefore translates the + hardware-decided role directly into a usb_role_switch_set_role() call + rather than running a software TCPM state machine. Power Delivery is not + supported by this binding. + +properties: + compatible: + const: qcom,pmi8998-typec + + reg: + maxItems: 1 + description: Type-C SPMI register base offset (typically 0x1300). + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: type-c-change + + vdd-vbus-supply: + description: + VBUS source regulator enabled when the controller transitions to + USB host mode so bus-powered downstream peripherals can be powered. + + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - interrupt-names + - connector + +additionalProperties: false + +examples: + - | + #include + + pmic { + #address-cells = <1>; + #size-cells = <0>; + + typec@1300 { + compatible = "qcom,pmi8998-typec"; + reg = <0x1300>; + + interrupts = <0x2 0x13 0x7 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "type-c-change"; + + vdd-vbus-supply = <&pmi8998_vbus>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + power-role = "dual"; + data-role = "dual"; + try-power-role = "sink"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + pmi8998_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + }; + }; + }; + }; +... -- 2.47.3