From patchwork Tue Jan 30 19:32:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 768124 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 4976F7B3D9 for ; Tue, 30 Jan 2024 19:33:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706643191; cv=none; b=Vb8uKK4I/aYBXLy5vinHva63q+eEEevuyBBGQVDOE6xo0/n+OuwYTxcXvDGKZujgg1KxCpBUfejpt2yKX/FY4Z3t3taPPLHSD+In7/9hA4uOCXpHby5SoZzBZJ/bu4rnrSAKhTKqn1gYjk6OUnpL7GRjIQLp93OyQEnM+2ZI+KI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706643191; c=relaxed/simple; bh=gTALmY1ibvA6Jtkm5qB1yZj76kmQUeK0FP623MAzOGQ=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=bXEZORBp4nwdKKkDRBG3Y9XL2YfZR5qi2vfKTs3oS1Aq8Q7cd0M64E2DEas361DkjJafAYmfBwIdSbCogOLIEfO7u9EoV6YxRLjxrCF3efA6+YwgFx7fhkJ55E34wMK+PMQ7/IONcWgAX6bg2VHxGsawifXMgKVKU8nNLtndhio= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kdd9OqWn; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kdd9OqWn" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5100cb238bcso7911600e87.3 for ; Tue, 30 Jan 2024 11:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706643187; x=1707247987; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=tEnSLoLi220+mC/dDdMZUm59oVdTAXtir30jTLPlVL8=; b=kdd9OqWnLT/FARqT+RsnA5Cqy+B3mjfAZkGTL3Dm140JFNXD62vvfC0mKOV8/CWQpA KG255Nb+n9pDfGfDt0dY/9GeExfbkCMHcpRtLpQVl7G8paU0HaZ2Kz/Vrl6bCSP6zUcl /45N255VPgqLpS9c8TtvA4WNU016pjOn8z89/hVDKE0xcrainwkwlyfO4jzWSyj6CxWx BgaUy13/jU7WvfGykXnQhf94cHSs4FrbOG9FI30AAxb1z+hCc18WkGtCEg4oFMs0PGQI 6ingeajqde1wlcJtJ3UsTVK4+TGgz1vg8FVnHw7doqz2KYqrGNvz0haWgoFZ7WGwjklC EdcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706643187; x=1707247987; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tEnSLoLi220+mC/dDdMZUm59oVdTAXtir30jTLPlVL8=; b=bDmd8UUXSP84bktPBI6FtqB1/c/JWhxdarJ/Q65LIhblkBqO5/W5vl4AkoYlwm4scY 3lDkCQpLTAdGhvzc0r32wGPpFrZeb5PhfVNp9WGJUFW1Zyoj9FbtT9qXa0OtTt5kokF4 3Om51pDxPYNQtJvjaOSV+AiopMXQoNWRXHAqbakX5EY8ct+HXOZEKN9VQmwI7lS5TC1I LWZDgT5GnEeS/djUexc+mkCnGB6xq/xAR9NbwEZzvoo1ILd8ClfkdSceWyoTNeDUctyp Opj+lSKsM3838TOdyLUBcDe7Th9BPic0LdzLLuWIerp4Oy0+LSUhHfHLCw8OGeo6Y2ln Xutw== X-Gm-Message-State: AOJu0Yy/dEehZNN+gEyiXniCz3uLL0L6zOXNqTORhtN3Ib4QMrWEXUz5 JQ7D2wNnbyXgSe/RFwmbo39gOOS/+is5iRdqqUS8UVX4TInKdxLsLpTeWvqDjYE= X-Google-Smtp-Source: AGHT+IE4LmyyKrYFNUgc2u4caIRB+1DkAm9YREubGqYrnHtiuhsnJgv7HXCPy+ds1gyzL506r76+DA== X-Received: by 2002:ac2:5b11:0:b0:50e:6c1d:5dee with SMTP id v17-20020ac25b11000000b0050e6c1d5deemr6157961lfn.33.1706643187329; Tue, 30 Jan 2024 11:33:07 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWFstMsJWadz62lZvjVYfOqBwvQLKPeVs4uhdxSYFBbrJWlUNH+Kq7VIuhwAKHhgppKE2qZ0PUCjUUCrvpt17A1ufW6H7d3+hdTPGpsj0ZIJhLXToO2GWOxAUYvLvtN01MWAzHGFLvDjE82L2048gRbs8Mn7NKX+Ox4b8CEuSQqSbzq4UTor0lK+AMgMCdqDDVL4gOCYnqPtN93w4JIAqFwj2SEu2/tVsU2LT/OBbyv9QtKcrP1WNdmbHFGGoQF1D8EKL2rsDM1Kg6EmAgTREHhtHw7lJycq2vn4/8KFQ26aMen72QCIa90NOhMkSINrMowOdlCZiWf2dP3zLs9plxefTV0jYBIcoypR+NGF6TlOBlqHgFDVQEwaiwx1BpWj1+ceoFH4dyeNB6Hnwm1Pz+O1bTk5EsknXVa79uwvah9zK5+MwRmYImf8DthaLp5rNlYqFfi3wIDcSQ+d+Iw2IszPfAOY18acTafFcFy0FM14mx3cV/k/2zROyZWVoeSbg2gLGfbdqjZhqavaxPr5rsAiJWSc2uOLxDuqhee8VTtcf5FU86IjB2m3YVIQtTcVm5h+GmHSSIP6vgMav+0hXqhQ+V9x57exM21uti2ntaF45rqnlDAGmESzWSsAzIFDgE2FsllH8HEn8AaB7DrMyNk9zd2/Zm0kgDer2M2+ZSE/ZE+9E17r2ql53I5NanU Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id u25-20020a05651220d900b0051119371e7csm366525lfr.120.2024.01.30.11.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 11:33:06 -0800 (PST) From: Dmitry Baryshkov Subject: [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Date: Tue, 30 Jan 2024 21:32:53 +0200 Message-Id: <20240130-pmi632-typec-v3-0-b05fe44f0a51@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOVOuWUC/33MQQ6CMBCF4auQrq1pZ6iAK+9hXFRaYBKlTUsaC eHuFhIXbFy+l/zfwqINZCO7FgsLNlEkN+aBp4K1gx57y8nkzUBAKaQE7t90QeDT7G3Ly7ZSiKI BrCuWEx9sR5+duz/yHihOLsy7nuT2/iA8QklywY2tTGdK1aDC24tGHdzZhZ5tUoJ/NeRa1mAar YVWz2O9rusXaA0/uecAAAA= To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman , Guenter Roeck , Heikki Krogerus Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, Dmitry Baryshkov , Krzysztof Kozlowski , Luca Weiss , Vladimir Zapolskiy X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2777; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=gTALmY1ibvA6Jtkm5qB1yZj76kmQUeK0FP623MAzOGQ=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBluU7xxwlT5ScISdUnOHH2TX7uG97SJ4h1IgCX4 40Ct0ayn3KJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZblO8QAKCRCLPIo+Aiko 1ekAB/9hUMv/ndpN+V2jmP+9lAodWkuJrLYMysXc1D3Z/rk0YCazA3gsQ8N37Cber3CS7JOc9rK SEHcCbZpvPEGtc52IRvFgByp76Wxcj6dFFLb3kRBNyrQ2ZxzgaGDmDUz97JZjejjM9Xa98fwFnw k6FHCvY5aZ8u9ldnb1TtsRh5HBgd4zuZAsWRyHO7v+YRQdgb3x0PRCUjqVksszJ7oe4rZdy6qDa rNwMyAZIR472Z4N8hPuNw7CTWou3GT+x0KVjeu3VhLrhIGQgMnZPpwm3Aqr6yE4rbE6XBGWDlDg 8vwE7Fi1nEpOjABQTOR/IMkxBx2TeLVZKOVGTNKkMxV1vny3 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The Qualcomm PMI632 PMIC (found on Qualcomm Robotics RB2 platform) doesn't support USB Power Delivery. However this PMIC still supports handling of the Type-C port (orientation detection, etc). Reuse exiting qcom-pmic-typec driver to support Type-C related functionality of this PMIC. Use this to enable USB-C connector support on the RB2 platform. Signed-off-by: Dmitry Baryshkov --- Changes in v3: - Added constraints to qcom,pmic-typec / reg property (Krzysztof) - Dropped merged TCPM and Qualcomm PHY patches - Link to v2: https://lore.kernel.org/r/20240113-pmi632-typec-v2-0-182d9aa0a5b3@linaro.org Changes in v2: - Split qcom_pmic_typec_pdphy_set_roles() changes to separate patch (Konrad) - Simplified devm_kzalloc / sizeof() argument (Konrad) - Made start / stop callbacks mandatory (Bryan) - Reworked Type-C port handling into a backend similar to PD PHY (Bryan) - Made more qcom-pmic-typec data static const (Bryan) - Squashed usbc PHY single-lane removal patch (Konrad) - Further usbc PHY cleanup (Konrad) - Fixed order of DT properties in pmi632.dtsi (Konrad) - Instead of specifying bogus PDOs for the port, specify pd-disable and typec-power-opmode properties for the connector - Moved orientation-switch / usb-dual-role properties to sm6115.dtsi (Konrad) - Linked usb_dwc3_ss and usb_qmpphy_usb_ss_in - Link to v1: https://lore.kernel.org/r/20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org --- Dmitry Baryshkov (5): dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block usb: typec: qcom-pmic-typec: add support for PMI632 PMIC arm64: dts: qcom: pmi632: define USB-C related blocks arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling Vladimir Zapolskiy (1): arm64: dts: qcom: sm6115: drop pipe clock selection .../regulator/qcom,usb-vbus-regulator.yaml | 9 ++- .../devicetree/bindings/usb/qcom,pmic-typec.yaml | 32 ++++++++- arch/arm64/boot/dts/qcom/pmi632.dtsi | 30 ++++++++ arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 50 +++++++++++++- arch/arm64/boot/dts/qcom/sm6115.dtsi | 44 +++++++++++- drivers/usb/typec/tcpm/qcom/Makefile | 3 +- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 30 ++++++-- .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h | 2 + .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c | 80 ++++++++++++++++++++++ 9 files changed, 266 insertions(+), 14 deletions(-) --- base-commit: 41d66f96d0f15a0a2ad6fa2208f6bac1a66cbd52 change-id: 20240112-pmi632-typec-4c7533092387 Best regards,