* [PATCH 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
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..2ec9f8be9609 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -40,6 +40,7 @@ properties:
- asus,nexus7-flo
- lg,nexus4-mako
- sony,xperia-yuga
+ - samsung,jflte
- qcom,apq8064-cm-qs600
- qcom,apq8064-ifc6410
- const: qcom,apq8064
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 10:03 ` Konrad Dybcio
2026-04-21 9:45 ` [PATCH 3/8] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
` (5 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
PM8921 exposes USB ID state through the same interrupt-based logic as
PM8941, so it can use the same Qualcomm PMIC misc extcon binding.
Unlike PM8941, PM8921 does not need a register resource for this use
case, so allow qcom,pm8921-misc without requiring reg.
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] 11+ messages in thread* Re: [PATCH 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
2026-04-21 9:45 ` [PATCH 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
@ 2026-04-21 10:03 ` Konrad Dybcio
0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2026-04-21 10:03 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
On 4/21/26 11:45 AM, Alexandre MINETTE via B4 Relay wrote:
> From: Alexandre MINETTE <contact@alex-min.fr>
>
> PM8921 exposes USB ID state through the same interrupt-based logic as
> PM8941, so it can use the same Qualcomm PMIC misc extcon binding.
>
> Unlike PM8941, PM8921 does not need a register resource for this use
> case, so allow qcom,pm8921-misc without requiring reg.
That suggests this block doesn't really exist on the PM8921.. I
can't find any information that would suggest otherwise.
Perhaps what you're looking for is "linux,extcon-usb-gpio" or
"usb-b-connector"?
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/8] pinctrl: qcom: Register functions before enabling pinctrl
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 4/8] iommu/msm: Look up masters per IOMMU instance Alexandre MINETTE via B4 Relay
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
Register Qualcomm pinctrl with devm_pinctrl_register_and_init() so pin
functions can be added before the pinctrl device is enabled.
This lets pinmux_generic_add_pinfunction() populate the function list
before consumers request states during pinctrl_enable().
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] 11+ messages in thread* [PATCH 4/8] iommu/msm: Look up masters per IOMMU instance
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (2 preceding siblings ...)
2026-04-21 9:45 ` [PATCH 3/8] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
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.
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] 11+ messages in thread* [PATCH 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (3 preceding siblings ...)
2026-04-21 9:45 ` [PATCH 4/8] iommu/msm: Look up masters per IOMMU instance Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
Alexandre MINETTE
From: Alexandre MINETTE <contact@alex-min.fr>
PM8921 exposes USB ID state through the same interrupt-based logic as
PM8941, so it can use the existing Qualcomm PMIC misc extcon driver.
Add the PM8921 compatible so APQ8064 boards can describe USB ID
detection through the PM8921 interrupt controller.
Signed-off-by: Alexandre MINETTE <contact@alex-min.fr>
---
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] 11+ messages in thread* [PATCH 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (4 preceding siblings ...)
2026-04-21 9:45 ` [PATCH 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 12:52 ` Konrad Dybcio
2026-04-21 9:45 ` [PATCH 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
7 siblings, 1 reply; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
Alexandre MINETTE
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>
---
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] 11+ messages in thread* Re: [PATCH 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks
2026-04-21 9:45 ` [PATCH 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
@ 2026-04-21 12:52 ` Konrad Dybcio
0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2026-04-21 12:52 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
On 4/21/26 11:45 AM, Alexandre MINETTE via B4 Relay wrote:
> 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>
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (5 preceding siblings ...)
2026-04-21 9:45 ` [PATCH 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
2026-04-21 9:45 ` [PATCH 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
7 siblings, 0 replies; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
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..935383d6a594 100644
--- a/arch/arm/boot/dts/qcom/pm8921.dtsi
+++ b/arch/arm/boot/dts/qcom/pm8921.dtsi
@@ -41,6 +41,13 @@ rtc@11d {
allow-set-time;
};
+ usb_id: usb-detect {
+ compatible = "qcom,pm8921-misc";
+ interrupt-names = "usb_id";
+ interrupts-extended = <&pm8921 49 IRQ_TYPE_EDGE_BOTH>;
+ status = "disabled";
+ };
+
pm8921_keypad: keypad@148 {
compatible = "qcom,pm8921-keypad";
reg = <0x148>;
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 8/8] ARM: dts: qcom: Add Samsung Galaxy S4
2026-04-21 9:45 [PATCH 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
` (6 preceding siblings ...)
2026-04-21 9:45 ` [PATCH 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
@ 2026-04-21 9:45 ` Alexandre MINETTE via B4 Relay
7 siblings, 0 replies; 11+ messages in thread
From: Alexandre MINETTE via B4 Relay @ 2026-04-21 9:45 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,
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 | 484 +++++++++++++++++++++
2 files changed, 485 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..9e5faf7c086f
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts
@@ -0,0 +1,484 @@
+// 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-names = "default";
+ pinctrl-0 = <&gpio_keys_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-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-names = "default";
+ pinctrl-0 = <&muic_int_default_state>;
+
+ 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";
+ };
+ };
+ };
+ };
+
+ 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>;
+ };
+ };
+ };
+};
+
+&gsbi7 {
+ qcom,mode = <GSBI_PROT_I2C_UART>;
+
+ status = "okay";
+};
+
+&gsbi7_serial {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gsbi7_uart_pin_a>;
+
+ status = "okay";
+};
+
+&pm8821 {
+ interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+ interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&riva {
+ pinctrl-names = "default";
+ pinctrl-0 = <&riva_wlan_pin_a>, <&riva_bt_pin_a>, <&riva_fm_pin_a>;
+
+ 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] 11+ messages in thread