* [PATCH v2 0/8] Add Samsung Galaxy S4 support
@ 2026-04-27 19:34 Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
` (7 more replies)
0 siblings, 8 replies; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE, Dmitry Baryshkov, Konrad Dybcio
Add initial mainline support for the Samsung Galaxy S4, codenamed jflte.
This series adds the devicetree binding and board DTS, together with the
small driver and common DTS changes needed to boot the device with working
USB peripheral mode.
Tested on a Samsung Galaxy S4 GT-I9505. With this series the device boots
and supports UART, USB peripheral mode with USB networking, the front
notification LED and the physical buttons.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
Changes in v2:
- Keep the APQ8064 compatible list in qcom.yaml alphabetically sorted.
- Clarify the Qualcomm pinctrl commit message and include the failing hog
lookup trace seen on APQ8064.
- Clarify the MSM IOMMU commit message and include the NULL dereference
trace seen during IOMMU probe on APQ8064.
- Move the PM8921 USB ID extcon node to the end of the PM8921 child nodes.
- Reorder the jflte DTS nodes and pinctrl properties as requested by
reviewers.
- Add Reviewed-by/Acked-by tags collected on v1.
- Link to v1: https://lore.kernel.org/r/20260421-mainline-send-v1-sending-v1-0-bcb0857724de@alex-min.fr
---
Alexandre MINETTE (8):
dt-bindings: arm: qcom: Add Samsung Galaxy S4
dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
pinctrl: qcom: Register functions before enabling pinctrl
iommu/msm: Look up masters per IOMMU instance
extcon: qcom-spmi-misc: Add PM8921 compatible
ARM: dts: qcom: apq8064: Fix USB controller clocks
ARM: dts: qcom: pm8921: Add USB ID extcon
ARM: dts: qcom: Add Samsung Galaxy S4
Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
.../bindings/extcon/qcom,pm8941-misc.yaml | 17 +-
arch/arm/boot/dts/qcom/Makefile | 1 +
arch/arm/boot/dts/qcom/pm8921.dtsi | 7 +
.../boot/dts/qcom/qcom-apq8064-samsung-jflte.dts | 485 +++++++++++++++++++++
arch/arm/boot/dts/qcom/qcom-apq8064.dtsi | 18 +-
drivers/extcon/extcon-qcom-spmi-misc.c | 1 +
drivers/iommu/msm_iommu.c | 28 +-
drivers/pinctrl/qcom/pinctrl-msm.c | 15 +-
9 files changed, 546 insertions(+), 27 deletions(-)
---
base-commit: b4e07588e743c989499ca24d49e752c074924a9a
change-id: 20260421-mainline-send-v1-sending-289ec98e6dc1
Best regards,
--
Alexandre MINETTE <contact@alex-min.fr>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-28 6:54 ` Krzysztof Kozlowski
2026-04-27 19:34 ` [PATCH v2 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
` (6 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
Add the compatible for this Samsung smartphone, codenamed jflte.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index b4943123d2e4..b7e186ed2efc 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -39,6 +39,7 @@ properties:
- enum:
- asus,nexus7-flo
- lg,nexus4-mako
+ - samsung,jflte
- sony,xperia-yuga
- qcom,apq8064-cm-qs600
- qcom,apq8064-ifc6410
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-28 6:52 ` Krzysztof Kozlowski
2026-04-27 19:34 ` [PATCH v2 3/8] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
` (5 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
PM8921 provides USB ID detection through the USB_ID_IN interrupt, which
APQ8064 boards use for OTG role detection.
The Qualcomm PMIC misc extcon binding only needs the interrupt
description for this use case. Allow qcom,pm8921-misc without requiring
a register resource so boards can describe PM8921 USB ID detection.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
.../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
index 6b80518cbf62..4e3d0aadb83c 100644
--- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
+++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/extcon/qcom,pm8941-misc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Qualcomm Technologies, Inc. PM8941 USB ID Extcon device
+title: Qualcomm Technologies, Inc. PMIC USB ID Extcon device
maintainers:
- Guru Das Srinagesh <quic_gurus@quicinc.com>
@@ -15,8 +15,9 @@ description: |
properties:
compatible:
- items:
- - const: qcom,pm8941-misc
+ enum:
+ - qcom,pm8921-misc
+ - qcom,pm8941-misc
reg:
maxItems: 1
@@ -37,10 +38,18 @@ properties:
- const: usb_vbus
required:
- compatible
- - reg
- interrupts
- interrupt-names
+allOf:
+ - if:
+ properties:
+ compatible:
+ const: qcom,pm8941-misc
+ then:
+ required:
+ - reg
+
additionalProperties: false
examples:
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/8] pinctrl: qcom: Register functions before enabling pinctrl
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 4/8] iommu/msm: Look up masters per IOMMU instance Alexandre MINETTE via B4 Relay
` (4 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
pinctrl consumers can request states while the pinctrl core enables the
controller. On Qualcomm pinctrl drivers this can happen before the SoC
function list has been registered, which leaves the function table
incomplete during state lookup.
On APQ8064 this can fail while claiming pinctrl hogs:
apq8064-pinctrl 800000.pinctrl: invalid function ps_hold in map table
apq8064-pinctrl 800000.pinctrl: error claiming hogs: -22
apq8064-pinctrl 800000.pinctrl: could not claim hogs: -22
Register Qualcomm pinctrl with devm_pinctrl_register_and_init(), add the
SoC pin functions, and only then enable the pinctrl device.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
drivers/pinctrl/qcom/pinctrl-msm.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 45b3a2763eb8..a2a1e0835735 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -1593,11 +1593,11 @@ int msm_pinctrl_probe(struct platform_device *pdev,
pctrl->desc.pins = pctrl->soc->pins;
pctrl->desc.npins = pctrl->soc->npins;
- pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl);
- if (IS_ERR(pctrl->pctrl)) {
- dev_err(&pdev->dev, "Couldn't register pinctrl driver\n");
- return PTR_ERR(pctrl->pctrl);
- }
+ ret = devm_pinctrl_register_and_init(&pdev->dev, &pctrl->desc,
+ pctrl, &pctrl->pctrl);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret,
+ "Couldn't register pinctrl driver\n");
for (i = 0; i < soc_data->nfunctions; i++) {
func = &soc_data->functions[i];
@@ -1607,6 +1607,11 @@ int msm_pinctrl_probe(struct platform_device *pdev,
return ret;
}
+ ret = pinctrl_enable(pctrl->pctrl);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret,
+ "Couldn't enable pinctrl driver\n");
+
ret = msm_gpio_init(pctrl);
if (ret)
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 4/8] iommu/msm: Look up masters per IOMMU instance
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (2 preceding siblings ...)
2026-04-27 19:34 ` [PATCH v2 3/8] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
` (3 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
MSM IOMMU stores context descriptors on each IOMMU instance. Looking up
the descriptor through dev_iommu_priv_get() is not sufficient because a
device can reference multiple IOMMU provider nodes.
Look up the master from the target IOMMU ctx_list instead, and use the
same helper when probing and attaching devices. This avoids
dereferencing a NULL master when an IOMMU already has context entries
for another device, and keeps separate context descriptors for separate
IOMMU instances.
On APQ8064 this crashes during IOMMU probe while qcom_iommu_of_xlate()
adds stream IDs for a device referencing multiple IOMMU provider nodes.
The failure comes from insert_iommu_master() dereferencing a NULL master
after dev_iommu_priv_get() returns no context descriptor for the current
IOMMU instance:
Unable to handle kernel NULL pointer dereference at virtual address 00000088
PC is at qcom_iommu_of_xlate+0x84/0x174
Call trace:
qcom_iommu_of_xlate from of_iommu_configure+0x140/0x234
of_iommu_configure from of_dma_configure_id+0xec/0x3b0
of_dma_configure_id from platform_dma_configure+0xb0/0xcc
platform_dma_configure from __iommu_probe_device+0x270/0x450
__iommu_probe_device from probe_iommu_group+0x24/0x48
probe_iommu_group from bus_for_each_dev+0x7c/0xcc
bus_for_each_dev from iommu_device_register+0xcc/0x220
iommu_device_register from msm_iommu_probe+0x47c/0x578
This is required to boot APQ8064 boards using multiple IOMMU contexts.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
drivers/iommu/msm_iommu.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 0ad5ff431d5b..9c03878d0d2c 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -357,17 +357,25 @@ static int msm_iommu_domain_config(struct msm_priv *priv)
return 0;
}
+static struct msm_iommu_ctx_dev *find_iommu_master(struct msm_iommu_dev *iommu,
+ struct device *dev)
+{
+ struct msm_iommu_ctx_dev *master;
+
+ list_for_each_entry(master, &iommu->ctx_list, list)
+ if (master->of_node == dev->of_node)
+ return master;
+
+ return NULL;
+}
+
/* Must be called under msm_iommu_lock */
static struct msm_iommu_dev *find_iommu_for_dev(struct device *dev)
{
struct msm_iommu_dev *iommu, *ret = NULL;
- struct msm_iommu_ctx_dev *master;
list_for_each_entry(iommu, &qcom_iommu_devices, dev_node) {
- master = list_first_entry(&iommu->ctx_list,
- struct msm_iommu_ctx_dev,
- list);
- if (master->of_node == dev->of_node) {
+ if (find_iommu_master(iommu, dev)) {
ret = iommu;
break;
}
@@ -405,10 +413,7 @@ static int msm_iommu_attach_dev(struct iommu_domain *domain, struct device *dev,
spin_lock_irqsave(&msm_iommu_lock, flags);
list_for_each_entry(iommu, &qcom_iommu_devices, dev_node) {
- master = list_first_entry(&iommu->ctx_list,
- struct msm_iommu_ctx_dev,
- list);
- if (master->of_node == dev->of_node) {
+ if (find_iommu_master(iommu, dev)) {
ret = __enable_clocks(iommu);
if (ret)
goto fail;
@@ -601,10 +606,10 @@ static int insert_iommu_master(struct device *dev,
struct msm_iommu_dev **iommu,
const struct of_phandle_args *spec)
{
- struct msm_iommu_ctx_dev *master = dev_iommu_priv_get(dev);
+ struct msm_iommu_ctx_dev *master = find_iommu_master(*iommu, dev);
int sid;
- if (list_empty(&(*iommu)->ctx_list)) {
+ if (!master) {
master = kzalloc_obj(*master, GFP_ATOMIC);
if (!master) {
dev_err(dev, "Failed to allocate iommu_master\n");
@@ -612,7 +617,6 @@ static int insert_iommu_master(struct device *dev,
}
master->of_node = dev->of_node;
list_add(&master->list, &(*iommu)->ctx_list);
- dev_iommu_priv_set(dev, master);
}
for (sid = 0; sid < master->num_mids; sid++)
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (3 preceding siblings ...)
2026-04-27 19:34 ` [PATCH v2 4/8] iommu/msm: Look up masters per IOMMU instance Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
` (2 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE, Dmitry Baryshkov
From: Alexandre MINETTE <contact@alex-min.fr>
PM8921 provides USB ID detection through the USB_ID_IN interrupt, which
APQ8064 boards use for OTG role detection.
The Qualcomm PMIC misc extcon binding only needs the interrupt
description for this use case. Allow qcom,pm8921-misc without requiring
a register resource so boards can describe PM8921 USB ID detection.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/extcon/extcon-qcom-spmi-misc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c
index afaba5685c3d..6811d3383254 100644
--- a/drivers/extcon/extcon-qcom-spmi-misc.c
+++ b/drivers/extcon/extcon-qcom-spmi-misc.c
@@ -199,6 +199,7 @@ static SIMPLE_DEV_PM_OPS(qcom_usb_extcon_pm_ops,
qcom_usb_extcon_suspend, qcom_usb_extcon_resume);
static const struct of_device_id qcom_usb_extcon_dt_match[] = {
+ { .compatible = "qcom,pm8921-misc", },
{ .compatible = "qcom,pm8941-misc", },
{ }
};
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (4 preceding siblings ...)
2026-04-27 19:34 ` [PATCH v2 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
7 siblings, 0 replies; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE, Konrad Dybcio, Dmitry Baryshkov
From: Alexandre MINETTE <contact@alex-min.fr>
The APQ8064 HS USB controller nodes describe the transceiver clock as
"core", but the ChipIdea MSM glue expects "core" to be the controller
fabric clock and "fs" to be the transceiver clock.
This mismatch can leave the fabric clock disabled while the controller is
accessed. Some boards may tolerate that if the clock is already enabled
elsewhere, but it is not a correct description of the hardware.
Describe the RPM Daytona fabric clock as "core", the AHB clock as
"iface", and the transceiver clock as "fs" for all APQ8064 HS USB
controllers. Without this, USB does not probe reliably on Samsung Galaxy
S4 because the fabric clock remains disabled.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/boot/dts/qcom/qcom-apq8064.dtsi | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi
index 09062b2ad8ba..62ea38b7a652 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi
@@ -813,8 +813,10 @@ usb1: usb@12500000 {
reg = <0x12500000 0x200>,
<0x12500200 0x200>;
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&gcc USB_HS1_XCVR_CLK>, <&gcc USB_HS1_H_CLK>;
- clock-names = "core", "iface";
+ clocks = <&rpmcc RPM_DAYTONA_FABRIC_CLK>,
+ <&gcc USB_HS1_H_CLK>,
+ <&gcc USB_HS1_XCVR_CLK>;
+ clock-names = "core", "iface", "fs";
assigned-clocks = <&gcc USB_HS1_XCVR_CLK>;
assigned-clock-rates = <60000000>;
resets = <&gcc USB_HS1_RESET>;
@@ -844,8 +846,10 @@ usb3: usb@12520000 {
reg = <0x12520000 0x200>,
<0x12520200 0x200>;
interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&gcc USB_HS3_XCVR_CLK>, <&gcc USB_HS3_H_CLK>;
- clock-names = "core", "iface";
+ clocks = <&rpmcc RPM_DAYTONA_FABRIC_CLK>,
+ <&gcc USB_HS3_H_CLK>,
+ <&gcc USB_HS3_XCVR_CLK>;
+ clock-names = "core", "iface", "fs";
assigned-clocks = <&gcc USB_HS3_XCVR_CLK>;
assigned-clock-rates = <60000000>;
resets = <&gcc USB_HS3_RESET>;
@@ -875,8 +879,10 @@ usb4: usb@12530000 {
reg = <0x12530000 0x200>,
<0x12530200 0x200>;
interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&gcc USB_HS4_XCVR_CLK>, <&gcc USB_HS4_H_CLK>;
- clock-names = "core", "iface";
+ clocks = <&rpmcc RPM_DAYTONA_FABRIC_CLK>,
+ <&gcc USB_HS4_H_CLK>,
+ <&gcc USB_HS4_XCVR_CLK>;
+ clock-names = "core", "iface", "fs";
assigned-clocks = <&gcc USB_HS4_XCVR_CLK>;
assigned-clock-rates = <60000000>;
resets = <&gcc USB_HS4_RESET>;
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (5 preceding siblings ...)
2026-04-27 19:34 ` [PATCH v2 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-28 6:56 ` Krzysztof Kozlowski
2026-04-27 19:34 ` [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
7 siblings, 1 reply; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
Add the PM8921 USB ID interrupt as a disabled extcon provider. Boards
can enable it when their USB controller consumes the PMIC USB ID state
for OTG role detection.
The interrupt corresponds to PM8921 USB_ID_IN, block 6 bit 1.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
arch/arm/boot/dts/qcom/pm8921.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/pm8921.dtsi b/arch/arm/boot/dts/qcom/pm8921.dtsi
index 535cb6a2543f..30366536f580 100644
--- a/arch/arm/boot/dts/qcom/pm8921.dtsi
+++ b/arch/arm/boot/dts/qcom/pm8921.dtsi
@@ -121,6 +121,13 @@ ref_muxoff: adc-channel@f {
reg = <0x00 0x0f>;
};
};
+
+ usb_id: usb-detect {
+ compatible = "qcom,pm8921-misc";
+ interrupt-names = "usb_id";
+ interrupts-extended = <&pm8921 49 IRQ_TYPE_EDGE_BOTH>;
+ status = "disabled";
+ };
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (6 preceding siblings ...)
2026-04-27 19:34 ` [PATCH v2 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
@ 2026-04-27 19:34 ` Alexandre MINETTE via B4 Relay
2026-04-28 8:57 ` Konrad Dybcio
7 siblings, 1 reply; 16+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-27 19:34 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel, Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
Add a device tree for the Samsung Galaxy S4, codenamed jflte.
This has been tested on a Samsung Galaxy S4 GT-I9505. The initial support
covers UART, USB peripheral mode with USB networking, the front LED and
the physical buttons.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
arch/arm/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/qcom-apq8064-samsung-jflte.dts | 485 +++++++++++++++++++++
2 files changed, 486 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
index 32a44b02d2fa..c23c961f79e3 100644
--- a/arch/arm/boot/dts/qcom/Makefile
+++ b/arch/arm/boot/dts/qcom/Makefile
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8064-ifc6410.dtb \
qcom-apq8064-sony-xperia-lagan-yuga.dtb \
qcom-apq8064-asus-nexus7-flo.dtb \
+ qcom-apq8064-samsung-jflte.dtb \
qcom-apq8064-lg-nexus4-mako.dtb \
qcom-apq8074-dragonboard.dtb \
qcom-ipq4018-ap120c-ac.dtb \
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts
new file mode 100644
index 000000000000..2f10466077c7
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts
@@ -0,0 +1,485 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
+/ {
+ model = "Samsung Galaxy S4 (jflte)";
+ compatible = "samsung,jflte", "qcom,apq8064";
+ chassis-type = "handset";
+
+ aliases {
+ serial0 = &gsbi7_serial;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ ramoops@88d00000 {
+ compatible = "ramoops";
+ reg = <0x88d00000 0x100000>;
+ record-size = <0x20000>;
+ console-size = <0x20000>;
+ ftrace-size = <0x20000>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ key-home {
+ label = "Home";
+ gpios = <&pm8921_gpio 30 GPIO_ACTIVE_LOW>;
+ debounce-interval = <5>;
+ linux,code = <KEY_HOME>;
+ wakeup-source;
+ };
+
+ key-volume-up {
+ label = "Volume Up";
+ gpios = <&pm8921_gpio 35 GPIO_ACTIVE_LOW>;
+ debounce-interval = <5>;
+ linux,code = <KEY_VOLUMEUP>;
+ wakeup-source;
+ };
+
+ key-volume-down {
+ label = "Volume Down";
+ gpios = <&pm8921_gpio 37 GPIO_ACTIVE_LOW>;
+ debounce-interval = <5>;
+ linux,code = <KEY_VOLUMEDOWN>;
+ wakeup-source;
+ };
+ };
+
+ i2c-led {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm_pinmux 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm_pinmux 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@30 {
+ compatible = "panasonic,an30259a";
+ reg = <0x30>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@2 {
+ reg = <2>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@3 {
+ reg = <3>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+
+ i2c-muic {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm_pinmux 22 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&tlmm_pinmux 23 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <2>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ max77693: pmic@66 {
+ compatible = "maxim,max77693";
+ reg = <0x66>;
+ interrupt-parent = <&tlmm_pinmux>;
+ interrupts = <55 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-0 = <&muic_int_default_state>;
+ pinctrl-names = "default";
+
+ muic: muic {
+ compatible = "maxim,max77693-muic";
+ safeout1-supply = <&esafeout1_reg>;
+ safeout2-supply = <&esafeout2_reg>;
+ };
+
+ regulators {
+ esafeout1_reg: ESAFEOUT1 {
+ regulator-name = "ESAFEOUT1";
+ };
+
+ esafeout2_reg: ESAFEOUT2 {
+ regulator-name = "ESAFEOUT2";
+ };
+ };
+ };
+ };
+};
+
+&gsbi7 {
+ qcom,mode = <GSBI_PROT_I2C_UART>;
+
+ status = "okay";
+};
+
+&gsbi7_serial {
+ pinctrl-0 = <&gsbi7_uart_pin_a>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&pm8821 {
+ interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+ interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&riva {
+ pinctrl-0 = <&riva_wlan_pin_a>, <&riva_bt_pin_a>, <&riva_fm_pin_a>;
+ pinctrl-names = "default";
+
+ vddcx-supply = <&pm8921_s3>;
+ vddmx-supply = <&pm8921_l24>;
+ vddpx-supply = <&pm8921_s4>;
+
+ status = "okay";
+
+ iris {
+ vddxo-supply = <&pm8921_l4>;
+ vddrfa-supply = <&pm8921_s2>;
+ vddpa-supply = <&pm8921_l10>;
+ vdddig-supply = <&pm8921_lvs2>;
+ };
+};
+
+&rpm {
+ regulators {
+ compatible = "qcom,rpm-pm8921-regulators";
+
+ vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
+ vdd_l24-supply = <&pm8921_s1>;
+ vdd_l25-supply = <&pm8921_s1>;
+ vdd_l26-supply = <&pm8921_s7>;
+ vdd_l27-supply = <&pm8921_s7>;
+ vdd_l28-supply = <&pm8921_s7>;
+ vin_lvs1_3_6-supply = <&pm8921_s4>;
+ vin_lvs2-supply = <&pm8921_s1>;
+ vin_lvs4_5_7-supply = <&pm8921_s4>;
+
+ pm8921_l1: l1 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ bias-pull-down;
+ };
+
+ /* mipi_dsi.1-dsi1_pll_vdda */
+ pm8921_l2: l2 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ bias-pull-down;
+ };
+
+ /* msm_otg-HSUSB_3p3 */
+ pm8921_l3: l3 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3500000>;
+ bias-pull-down;
+ };
+
+ /* msm_otg-HSUSB_1p8 */
+ pm8921_l4: l4 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ /* msm_sdcc.1-sdc_vdd */
+ pm8921_l5: l5 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ bias-pull-down;
+ };
+
+ /* earjack_debug */
+ pm8921_l6: l6 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ bias-pull-down;
+ };
+
+ /* mipi_dsi.1-dsi_vci */
+ pm8921_l8: l8 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3000000>;
+ bias-pull-down;
+ };
+
+ /* wcnss_wlan.0-iris_vddpa */
+ pm8921_l10: l10 {
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <2900000>;
+ bias-pull-down;
+ };
+
+ /* mipi_dsi.1-dsi1_avdd */
+ pm8921_l11: l11 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ bias-pull-down;
+ };
+
+ /* touch_vdd */
+ pm8921_l15: l15 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ bias-pull-down;
+ };
+
+ /* slimport_dvdd */
+ pm8921_l18: l18 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ bias-pull-down;
+ };
+
+ /* touch_io */
+ pm8921_l22: l22 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ bias-pull-down;
+ };
+
+ /*
+ * mipi_dsi.1-dsi_vddio
+ * pil_qdsp6v4.1-pll_vdd
+ * pil_qdsp6v4.2-pll_vdd
+ * msm_ehci_host.0-HSUSB_1p8
+ * msm_ehci_host.1-HSUSB_1p8
+ */
+ pm8921_l23: l23 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ bias-pull-down;
+ };
+
+ /*
+ * tabla2x-slim-CDC_VDDA_A_1P2V
+ * tabla2x-slim-VDDD_CDC_D
+ */
+ pm8921_l24: l24 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1150000>;
+ bias-pull-down;
+ };
+
+ pm8921_l25: l25 {
+ regulator-min-microvolt = <1250000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-always-on;
+ bias-pull-down;
+ };
+
+ pm8921_l26: l26 {
+ regulator-min-microvolt = <375000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-always-on;
+ bias-pull-down;
+ };
+
+ pm8921_l27: l27 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ };
+
+ pm8921_l28: l28 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ bias-pull-down;
+ };
+
+ /* wcnss_wlan.0-iris_vddio */
+ pm8921_lvs1: lvs1 {
+ bias-pull-down;
+ };
+
+ /* wcnss_wlan.0-iris_vdddig */
+ pm8921_lvs2: lvs2 {
+ bias-pull-down;
+ };
+
+ pm8921_lvs3: lvs3 {
+ bias-pull-down;
+ };
+
+ pm8921_lvs4: lvs4 {
+ bias-pull-down;
+ };
+
+ pm8921_lvs5: lvs5 {
+ bias-pull-down;
+ };
+
+ /* mipi_dsi.1-dsi_iovcc */
+ pm8921_lvs6: lvs6 {
+ bias-pull-down;
+ };
+
+ /*
+ * pil_riva-pll_vdd
+ * lvds.0-lvds_vdda
+ * mipi_dsi.1-dsi1_vddio
+ * hdmi_msm.0-hdmi_vdda
+ */
+ pm8921_lvs7: lvs7 {
+ bias-pull-down;
+ };
+
+ pm8921_ncp: ncp {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ qcom,switch-mode-frequency = <1600000>;
+ };
+
+ /* Buck SMPS */
+ pm8921_s1: s1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ qcom,switch-mode-frequency = <3200000>;
+ bias-pull-down;
+ };
+
+ pm8921_s2: s2 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1300000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ };
+
+ /* msm otg HSUSB_VDDCX */
+ pm8921_s3: s3 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1150000>;
+ qcom,switch-mode-frequency = <4800000>;
+ bias-pull-down;
+ };
+
+ /*
+ * msm_sdcc.1-sdc-vdd_io
+ * tabla2x-slim-CDC_VDDA_RX
+ * tabla2x-slim-CDC_VDDA_TX
+ * tabla2x-slim-CDC_VDD_CP
+ * tabla2x-slim-VDDIO_CDC
+ */
+ pm8921_s4: s4 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
+ };
+
+ /*
+ * supply vdd_l26, vdd_l27, vdd_l28
+ */
+ pm8921_s7: s7 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1300000>;
+ qcom,switch-mode-frequency = <3200000>;
+ };
+
+ pm8921_s8: s8 {
+ regulator-min-microvolt = <2200000>;
+ regulator-max-microvolt = <2200000>;
+ qcom,switch-mode-frequency = <1600000>;
+ };
+ };
+};
+
+/* eMMC */
+&sdcc1 {
+ vmmc-supply = <&pm8921_l5>;
+ vqmmc-supply = <&pm8921_s4>;
+
+ status = "okay";
+};
+
+&pm8921_gpio {
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio30", "gpio35", "gpio37";
+ function = PMIC_GPIO_FUNC_NORMAL;
+ input-enable;
+ bias-pull-up;
+ power-source = <PM8921_GPIO_S4>;
+ };
+};
+
+&tlmm_pinmux {
+ gsbi7_uart_pin_a: gsbi7-uart-pin-active-state {
+ rx-pins {
+ pins = "gpio83";
+ function = "gsbi7";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ tx-pins {
+ pins = "gpio82";
+ function = "gsbi7";
+ drive-strength = <4>;
+ bias-disable;
+ };
+ };
+
+ muic_int_default_state: muic-int-default-state {
+ pins = "gpio55";
+ function = "gpio";
+ drive-strength = <2>;
+ input-enable;
+ bias-disable;
+ };
+};
+
+&usb_hs1_phy {
+ v3p3-supply = <&pm8921_l3>;
+ v1p8-supply = <&pm8921_l4>;
+ extcon = <&muic>;
+};
+
+&usb_id {
+ status = "okay";
+};
+
+&usb1 {
+ dr_mode = "otg";
+ extcon = <&muic>, <&usb_id>;
+
+ status = "okay";
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
2026-04-27 19:34 ` [PATCH v2 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
@ 2026-04-28 6:52 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-28 6:52 UTC (permalink / raw)
To: Alexandre MINETTE
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli, linux-arm-msm,
devicetree, linux-kernel, linux-gpio, iommu, phone-devel
On Mon, Apr 27, 2026 at 09:34:48PM +0200, Alexandre MINETTE wrote:
> PM8921 provides USB ID detection through the USB_ID_IN interrupt, which
> APQ8064 boards use for OTG role detection.
>
> The Qualcomm PMIC misc extcon binding only needs the interrupt
> description for this use case. Allow qcom,pm8921-misc without requiring
Bindings do not describe use case, but hardware. What is the interface
to PM8921? Is it on some bus or not?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4
2026-04-27 19:34 ` [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
@ 2026-04-28 6:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-28 6:54 UTC (permalink / raw)
To: Alexandre MINETTE
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli, linux-arm-msm,
devicetree, linux-kernel, linux-gpio, iommu, phone-devel
On Mon, Apr 27, 2026 at 09:34:47PM +0200, Alexandre MINETTE wrote:
> Add the compatible for this Samsung smartphone, codenamed jflte.
s/for this/for the Samsung Galaxy S4 with foo bar SoC, codenamed.../
There are also non-qcom Galaxy S4.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon
2026-04-27 19:34 ` [PATCH v2 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
@ 2026-04-28 6:56 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-28 6:56 UTC (permalink / raw)
To: Alexandre MINETTE
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, MyungJoo Ham, Chanwoo Choi, Guru Das Srinagesh,
Linus Walleij, Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
Kees Cook, Tony Luck, Guilherme G. Piccoli, linux-arm-msm,
devicetree, linux-kernel, linux-gpio, iommu, phone-devel
On Mon, Apr 27, 2026 at 09:34:53PM +0200, Alexandre MINETTE wrote:
> Add the PM8921 USB ID interrupt as a disabled extcon provider. Boards
> can enable it when their USB controller consumes the PMIC USB ID state
> for OTG role detection.
>
> The interrupt corresponds to PM8921 USB_ID_IN, block 6 bit 1.
>
> Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
> ---
> arch/arm/boot/dts/qcom/pm8921.dtsi | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/pm8921.dtsi b/arch/arm/boot/dts/qcom/pm8921.dtsi
> index 535cb6a2543f..30366536f580 100644
> --- a/arch/arm/boot/dts/qcom/pm8921.dtsi
> +++ b/arch/arm/boot/dts/qcom/pm8921.dtsi
> @@ -121,6 +121,13 @@ ref_muxoff: adc-channel@f {
> reg = <0x00 0x0f>;
> };
> };
> +
> + usb_id: usb-detect {
You should not mix non-addressable children with addressable. If you
really do not have address, but other children have, then probably this
is part of the main device, so should be folded into the parent node.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4
2026-04-27 19:34 ` [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
@ 2026-04-28 8:57 ` Konrad Dybcio
2026-05-01 7:41 ` MINETTE Alexandre
0 siblings, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2026-04-28 8:57 UTC (permalink / raw)
To: contact, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, MyungJoo Ham, Chanwoo Choi,
Guru Das Srinagesh, Linus Walleij, Rob Clark, Joerg Roedel,
Will Deacon, Robin Murphy, Kees Cook, Tony Luck,
Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel
On 4/27/26 9:34 PM, Alexandre MINETTE via B4 Relay wrote:
> From: Alexandre MINETTE <contact@alex-min.fr>
>
> Add a device tree for the Samsung Galaxy S4, codenamed jflte.
>
> This has been tested on a Samsung Galaxy S4 GT-I9505. The initial support
> covers UART, USB peripheral mode with USB networking, the front LED and
> the physical buttons.
>
> Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
> ---
> arch/arm/boot/dts/qcom/Makefile | 1 +
> .../boot/dts/qcom/qcom-apq8064-samsung-jflte.dts | 485 +++++++++++++++++++++
> 2 files changed, 486 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
> index 32a44b02d2fa..c23c961f79e3 100644
> --- a/arch/arm/boot/dts/qcom/Makefile
> +++ b/arch/arm/boot/dts/qcom/Makefile
> @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
> qcom-apq8064-ifc6410.dtb \
> qcom-apq8064-sony-xperia-lagan-yuga.dtb \
> qcom-apq8064-asus-nexus7-flo.dtb \
> + qcom-apq8064-samsung-jflte.dtb \
> qcom-apq8064-lg-nexus4-mako.dtb \
'l'g < 's'amsung
[...]
> + i2c-led {
> + compatible = "i2c-gpio";
> + sda-gpios = <&tlmm_pinmux 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> + scl-gpios = <&tlmm_pinmux 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
Have you tried setting up the I2C-GPIO busses as GSBI devices, like
I think I suggested the last time? This will potentially bring power
and latency benefits, since there's an actual bus controller
connected to these pins
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4
2026-04-28 8:57 ` Konrad Dybcio
@ 2026-05-01 7:41 ` MINETTE Alexandre
2026-05-04 7:40 ` Konrad Dybcio
0 siblings, 1 reply; 16+ messages in thread
From: MINETTE Alexandre @ 2026-05-01 7:41 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, MyungJoo Ham, Chanwoo Choi,
Guru Das Srinagesh, Linus Walleij, Rob Clark, Joerg Roedel,
Will Deacon, Robin Murphy, Kees Cook, Tony Luck,
Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel
Thanks a lot for the suggestion, I checked the downstream board files
and it does not look like these buses are wired for GSBI.
There, the MAX77693 bus is instantiated as a dedicated i2c-gpio bus on
GPIO 22/23, and the AN30259A LED bus as a dedicated i2c-gpio bus on
GPIO 6/7. The native APQ8064 GSBI2/GSBI3 I2C pins are different
(GPIO 24/25 and GPIO 8/9), so these two buses do not seem to be wired
to the GSBI controllers on jflte.
Regards,
--
MINETTE Alexandre
contact@alex-min.fr
Mar 28 avr 2026, à 10:57, Konrad Dybcio a écrit :
> On 4/27/26 9:34 PM, Alexandre MINETTE via B4 Relay wrote:
>> From: Alexandre MINETTE <contact@alex-min.fr>
>>
>> Add a device tree for the Samsung Galaxy S4, codenamed jflte.
>>
>> This has been tested on a Samsung Galaxy S4 GT-I9505. The initial support
>> covers UART, USB peripheral mode with USB networking, the front LED and
>> the physical buttons.
>>
>> Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
>> ---
>> arch/arm/boot/dts/qcom/Makefile | 1 +
>> .../boot/dts/qcom/qcom-apq8064-samsung-jflte.dts | 485 +++++++++++++++++++++
>> 2 files changed, 486 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
>> index 32a44b02d2fa..c23c961f79e3 100644
>> --- a/arch/arm/boot/dts/qcom/Makefile
>> +++ b/arch/arm/boot/dts/qcom/Makefile
>> @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
>> qcom-apq8064-ifc6410.dtb \
>> qcom-apq8064-sony-xperia-lagan-yuga.dtb \
>> qcom-apq8064-asus-nexus7-flo.dtb \
>> + qcom-apq8064-samsung-jflte.dtb \
>> qcom-apq8064-lg-nexus4-mako.dtb \
>
> 'l'g < 's'amsung
>
> [...]
>
>> + i2c-led {
>> + compatible = "i2c-gpio";
>> + sda-gpios = <&tlmm_pinmux 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> + scl-gpios = <&tlmm_pinmux 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>
> Have you tried setting up the I2C-GPIO busses as GSBI devices, like
> I think I suggested the last time? This will potentially bring power
> and latency benefits, since there's an actual bus controller
> connected to these pins
>
> Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4
2026-05-01 7:41 ` MINETTE Alexandre
@ 2026-05-04 7:40 ` Konrad Dybcio
2026-05-04 7:41 ` Konrad Dybcio
0 siblings, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2026-05-04 7:40 UTC (permalink / raw)
To: MINETTE Alexandre, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, MyungJoo Ham, Chanwoo Choi,
Guru Das Srinagesh, Linus Walleij, Rob Clark, Joerg Roedel,
Will Deacon, Robin Murphy, Kees Cook, Tony Luck,
Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel
On 5/1/26 9:41 AM, MINETTE Alexandre wrote:
> Thanks a lot for the suggestion, I checked the downstream board files
> and it does not look like these buses are wired for GSBI.
>
> There, the MAX77693 bus is instantiated as a dedicated i2c-gpio bus on
> GPIO 22/23, and the AN30259A LED bus as a dedicated i2c-gpio bus on
> GPIO 6/7. The native APQ8064 GSBI2/GSBI3 I2C pins are different
> (GPIO 24/25 and GPIO 8/9), so these two buses do not seem to be wired
> to the GSBI controllers on jflte.
What I meant is that the pins that the i2c-gpio nodes reference
are actually wired (inside the SoC) to the GSBI I2C controllers.
You'll notice that in drivers/pinctrl/qcom/pinctrl-apq8064.c,
there are bits like:
PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
which mean "function 0 is GPIO [implicitly in the macro], function
1 is mux to the GSBI controller"
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4
2026-05-04 7:40 ` Konrad Dybcio
@ 2026-05-04 7:41 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2026-05-04 7:41 UTC (permalink / raw)
To: MINETTE Alexandre, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, MyungJoo Ham, Chanwoo Choi,
Guru Das Srinagesh, Linus Walleij, Rob Clark, Joerg Roedel,
Will Deacon, Robin Murphy, Kees Cook, Tony Luck,
Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, iommu,
phone-devel
On 5/4/26 9:40 AM, Konrad Dybcio wrote:
> On 5/1/26 9:41 AM, MINETTE Alexandre wrote:
>> Thanks a lot for the suggestion, I checked the downstream board files
>> and it does not look like these buses are wired for GSBI.
>>
>> There, the MAX77693 bus is instantiated as a dedicated i2c-gpio bus on
>> GPIO 22/23, and the AN30259A LED bus as a dedicated i2c-gpio bus on
>> GPIO 6/7. The native APQ8064 GSBI2/GSBI3 I2C pins are different
>> (GPIO 24/25 and GPIO 8/9), so these two buses do not seem to be wired
>> to the GSBI controllers on jflte.
>
> What I meant is that the pins that the i2c-gpio nodes reference
> are actually wired (inside the SoC) to the GSBI I2C controllers.
>
> You'll notice that in drivers/pinctrl/qcom/pinctrl-apq8064.c,
> there are bits like:
>
> PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA),
>
> which mean "function 0 is GPIO [implicitly in the macro], function
> 1 is mux to the GSBI controller"
Unless you meant "these are indeed GSBI pins, but within that GSBIn
pingroup, those specific ones aren't assigned to SDA/SCL when
proto==I2C, to which I'm afraid I won't be able to find docs for (too
old)
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-05-04 7:41 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 19:34 [PATCH v2 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-04-28 6:54 ` Krzysztof Kozlowski
2026-04-27 19:34 ` [PATCH v2 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
2026-04-28 6:52 ` Krzysztof Kozlowski
2026-04-27 19:34 ` [PATCH v2 3/8] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 4/8] iommu/msm: Look up masters per IOMMU instance Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
2026-04-27 19:34 ` [PATCH v2 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
2026-04-28 6:56 ` Krzysztof Kozlowski
2026-04-27 19:34 ` [PATCH v2 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-04-28 8:57 ` Konrad Dybcio
2026-05-01 7:41 ` MINETTE Alexandre
2026-05-04 7:40 ` Konrad Dybcio
2026-05-04 7:41 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox