* [PATCH v16 0/9] Add PWM support for IPQ chipsets
@ 2025-10-01 14:04 George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 1/9] dt-bindings: pwm: add IPQ6018 binding George Moussalem via B4 Relay
` (10 more replies)
0 siblings, 11 replies; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach, George Moussalem,
Bjorn Andersson
Add PWM driver and binding support for IPQ chipsets.
Also, add nodes to add support for pwm in ipq6018, ipq5018, ipq5332, and
ipq9574.
I've picked up work based on Devi's last submission (v15) which dates
back to 05 October 2023 as below SoCs are still active.
V16:
Removed reg description in bindings as the offset is not relative to
the TCSR region anymore since simple-mfd support was dropped and PWM
nodes defined as their own nodes, not child nodes. Updated the example
too.
Dropped patch to add simple-mfd support to the qcom,tcsr bindings
Simplified code to calculate divs and duty cycle as per Uwe's comments
Removed unused pwm_chip struct from ipq_pwm_chip struct
Removed unnecessary cast as per Uwe's comment
Replaced devm_clk_get & clk_prepare_enable by devm_clk_get_enabled
Replaced pwmchip_add by devm_pwmchip_add and removed .remove function
Removed .owner from driver struct
Added compatibles to the bindings and nodes to the device trees to add
PWM support PWM in the IPQ5018, IPQ5332, and IPQ9574 SoCs
v15:
No change
v14:
Picked up the R-b tag
v13:
Updated the file name to match the compatible
Sorted the properties and updated the order in the required field
Dropped the syscon node from examples
v12:
Picked up the R-b tag
v11:
No change
v10:
No change
v9:
Add 'ranges' property to example (Rob)
Drop label in example (Rob)
v8:
Add size cell to 'reg' (Rob)
v7:
Use 'reg' instead of 'offset' (Rob)
Drop 'clock-names' and 'assigned-clock*' (Bjorn)
Use single cell address/size in example node (Bjorn)
Move '#pwm-cells' lower in example node (Bjorn)
List 'reg' as required
v6:
Device node is child of TCSR; remove phandle (Rob Herring)
Add assigned-clocks/assigned-clock-rates (Uwe Kleine-König)
v5: Use qcom,pwm-regs for phandle instead of direct regs (Bjorn
Andersson, Kathiravan T)
v4: Update the binding example node as well (Rob Herring's bot)
v3: s/qcom,pwm-ipq6018/qcom,ipq6018-pwm/ (Rob Herring)
v2: Make #pwm-cells const (Rob Herring)
V15:
Detailed Change logs are added to the respective patches.
V14 can be found at:
https://lore.kernel.org/linux-arm-msm/20231005043127.2690639-1-quic_devipriy@quicinc.com/
Devi Priya (4):
pwm: driver for qualcomm ipq6018 pwm block
dt-bindings: pwm: add IPQ6018 binding
dt-bindings: mfd: qcom,tcsr: Add simple-mfd support for IPQ6018
arm64: dts: qcom: ipq6018: add pwm node
.../devicetree/bindings/mfd/qcom,tcsr.yaml | 112 +++++--
.../bindings/pwm/qcom,ipq6018-pwm.yaml | 45 +++
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 15 +-
drivers/pwm/Kconfig | 12 +
drivers/pwm/Makefile | 1 +
drivers/pwm/pwm-ipq.c | 282 ++++++++++++++++++
6 files changed, 435 insertions(+), 32 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
create mode 100644 drivers/pwm/pwm-ipq.c
--
2.34.1
---
Devi Priya (3):
dt-bindings: pwm: add IPQ6018 binding
pwm: driver for qualcomm ipq6018 pwm block
arm64: dts: qcom: ipq6018: add pwm node
George Moussalem (6):
dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332
dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574
arm64: dts: qcom: ipq5018: add pwm node
arm64: dts: qcom: ipq5332: add pwm node
arm64: dts: qcom: ipq9574: add pwm node
.../devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 51 +++++
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 10 +
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 10 +
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 10 +
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 10 +
drivers/pwm/Kconfig | 12 ++
drivers/pwm/Makefile | 1 +
drivers/pwm/pwm-ipq.c | 214 +++++++++++++++++++++
8 files changed, 318 insertions(+)
---
base-commit: 846bd2225ec3cfa8be046655e02b9457ed41973e
change-id: 20250922-ipq-pwm-c8c75c147d52
Best regards,
--
George Moussalem <george.moussalem@outlook.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v16 1/9] dt-bindings: pwm: add IPQ6018 binding
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 2/9] pwm: driver for qualcomm ipq6018 pwm block George Moussalem via B4 Relay
` (9 subsequent siblings)
10 siblings, 0 replies; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach, Bjorn Andersson
From: Devi Priya <quic_devipriy@quicinc.com>
DT binding for the PWM block in Qualcomm IPQ6018 SoC.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Co-developed-by: Baruch Siach <baruch.siach@siklu.com>
Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
---
.../devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 44 ++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..1172f0b53fadc140482f9384a36020260df372b7
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/qcom,ipq6018-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm IPQ6018 PWM controller
+
+maintainers:
+ - Baruch Siach <baruch@tkos.co.il>
+
+properties:
+ compatible:
+ const: qcom,ipq6018-pwm
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ "#pwm-cells":
+ const: 2
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - "#pwm-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+
+ pwm: pwm@1941010 {
+ compatible = "qcom,ipq6018-pwm";
+ reg = <0x01941010 0x20>;
+ clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clock-rates = <100000000>;
+ #pwm-cells = <2>;
+ };
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 2/9] pwm: driver for qualcomm ipq6018 pwm block
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 1/9] dt-bindings: pwm: add IPQ6018 binding George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018 George Moussalem via B4 Relay
` (8 subsequent siblings)
10 siblings, 0 replies; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Baruch Siach, George Moussalem
From: Devi Priya <quic_devipriy@quicinc.com>
Driver for the PWM block in Qualcomm IPQ6018 line of SoCs. Based on
driver from downstream Codeaurora kernel tree. Removed support for older
(V1) variants because I have no access to that hardware.
Tested on IPQ5018 and IPQ6010 based hardware.
Co-developed-by: Baruch Siach <baruch.siach@siklu.com>
Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
v16:
Simplified code to calculate divs and duty cycle as per Uwe's comments
Removed unused pwm_chip struct from ipq_pwm_chip struct
Removed unnecessary cast as per Uwe's comment
Replaced devm_clk_get & clk_prepare_enable by devm_clk_get_enabled
Replaced pwmchip_add by devm_pwmchip_add and removed .remove function
Removed .owner from driver struct
v15:
No change
v14:
Picked up the R-b tag
v13:
Updated the file name to match the compatible
Sorted the properties and updated the order in the required field
Dropped the syscon node from examples
v12:
Picked up the R-b tag
v11:
No change
v10:
No change
v9:
Add 'ranges' property to example (Rob)
Drop label in example (Rob)
v8:
Add size cell to 'reg' (Rob)
v7:
Use 'reg' instead of 'offset' (Rob)
Drop 'clock-names' and 'assigned-clock*' (Bjorn)
Use single cell address/size in example node (Bjorn)
Move '#pwm-cells' lower in example node (Bjorn)
List 'reg' as required
v6:
Device node is child of TCSR; remove phandle (Rob Herring)
Add assigned-clocks/assigned-clock-rates (Uwe Kleine-König)
v5: Use qcom,pwm-regs for phandle instead of direct regs (Bjorn
Andersson, Kathiravan T)
v4: Update the binding example node as well (Rob Herring's bot)
v3: s/qcom,pwm-ipq6018/qcom,ipq6018-pwm/ (Rob Herring)
v2: Make #pwm-cells const (Rob Herring)
---
drivers/pwm/Kconfig | 12 +++
drivers/pwm/Makefile | 1 +
drivers/pwm/pwm-ipq.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 227 insertions(+)
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index c2fd3f4b62d9ea422a51a73fa87dc7a73703ebaf..33ac49251b3cc957bc356aa39199b748577d295f 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -337,6 +337,18 @@ config PWM_INTEL_LGM
To compile this driver as a module, choose M here: the module
will be called pwm-intel-lgm.
+config PWM_IPQ
+ tristate "IPQ PWM support"
+ depends on ARCH_QCOM || COMPILE_TEST
+ depends on HAVE_CLK && HAS_IOMEM
+ help
+ Generic PWM framework driver for IPQ PWM block which supports
+ 4 pwm channels. Each of the these channels can be configured
+ independent of each other.
+
+ To compile this driver as a module, choose M here: the module
+ will be called pwm-ipq.
+
config PWM_IQS620A
tristate "Azoteq IQS620A PWM support"
depends on MFD_IQS62X || COMPILE_TEST
diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index dfa8b4966ee19af18ea47080db4adf96c326f3d7..74e07f654d43dfee83e7bb3a49e41acf8ae011fc 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_PWM_IMX1) += pwm-imx1.o
obj-$(CONFIG_PWM_IMX27) += pwm-imx27.o
obj-$(CONFIG_PWM_IMX_TPM) += pwm-imx-tpm.o
obj-$(CONFIG_PWM_INTEL_LGM) += pwm-intel-lgm.o
+obj-$(CONFIG_PWM_IPQ) += pwm-ipq.o
obj-$(CONFIG_PWM_IQS620A) += pwm-iqs620a.o
obj-$(CONFIG_PWM_JZ4740) += pwm-jz4740.o
obj-$(CONFIG_PWM_KEEMBAY) += pwm-keembay.o
diff --git a/drivers/pwm/pwm-ipq.c b/drivers/pwm/pwm-ipq.c
new file mode 100644
index 0000000000000000000000000000000000000000..f1b195de3a6ddb0501256581c28213ab33da6716
--- /dev/null
+++ b/drivers/pwm/pwm-ipq.c
@@ -0,0 +1,214 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
+/*
+ * Copyright (c) 2016-2017, 2020 The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/pwm.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/math64.h>
+#include <linux/of_device.h>
+#include <linux/bitfield.h>
+#include <linux/units.h>
+
+/* The frequency range supported is 1 Hz to clock rate */
+#define IPQ_PWM_MAX_PERIOD_NS ((u64)NSEC_PER_SEC)
+
+/*
+ * The max value specified for each field is based on the number of bits
+ * in the pwm control register for that field
+ */
+#define IPQ_PWM_MAX_DIV 0xFFFF
+
+/*
+ * Two 32-bit registers for each PWM: REG0, and REG1.
+ * Base offset for PWM #i is at 8 * #i.
+ */
+#define IPQ_PWM_REG0 0
+#define IPQ_PWM_REG0_PWM_DIV GENMASK(15, 0)
+#define IPQ_PWM_REG0_HI_DURATION GENMASK(31, 16)
+
+#define IPQ_PWM_REG1 4
+#define IPQ_PWM_REG1_PRE_DIV GENMASK(15, 0)
+/*
+ * Enable bit is set to enable output toggling in pwm device.
+ * Update bit is set to reflect the changed divider and high duration
+ * values in register.
+ */
+#define IPQ_PWM_REG1_UPDATE BIT(30)
+#define IPQ_PWM_REG1_ENABLE BIT(31)
+
+struct ipq_pwm_chip {
+ struct clk *clk;
+ void __iomem *mem;
+};
+
+static struct ipq_pwm_chip *ipq_pwm_from_chip(struct pwm_chip *chip)
+{
+ return pwmchip_get_drvdata(chip);
+}
+
+static unsigned int ipq_pwm_reg_read(struct pwm_device *pwm, unsigned int reg)
+{
+ struct ipq_pwm_chip *ipq_chip = ipq_pwm_from_chip(pwm->chip);
+ unsigned int off = 8 * pwm->hwpwm + reg;
+
+ return readl(ipq_chip->mem + off);
+}
+
+static void ipq_pwm_reg_write(struct pwm_device *pwm, unsigned int reg,
+ unsigned int val)
+{
+ struct ipq_pwm_chip *ipq_chip = ipq_pwm_from_chip(pwm->chip);
+ unsigned int off = 8 * pwm->hwpwm + reg;
+
+ writel(val, ipq_chip->mem + off);
+}
+
+static void config_div_and_duty(struct pwm_device *pwm, unsigned int pre_div,
+ unsigned int pwm_div, unsigned long rate, u64 duty_ns,
+ bool enable)
+{
+ unsigned long hi_dur;
+ unsigned long val = 0;
+
+ /*
+ * high duration = pwm duty * (pwm div + 1)
+ * pwm duty = duty_ns / period_ns
+ */
+ hi_dur = div64_u64(duty_ns * rate, (pre_div + 1) * NSEC_PER_SEC);
+
+ val = FIELD_PREP(IPQ_PWM_REG0_HI_DURATION, hi_dur) |
+ FIELD_PREP(IPQ_PWM_REG0_PWM_DIV, pwm_div);
+ ipq_pwm_reg_write(pwm, IPQ_PWM_REG0, val);
+
+ val = FIELD_PREP(IPQ_PWM_REG1_PRE_DIV, pre_div);
+ ipq_pwm_reg_write(pwm, IPQ_PWM_REG1, val);
+
+ /* PWM enable toggle needs a separate write to REG1 */
+ val |= IPQ_PWM_REG1_UPDATE;
+ if (enable)
+ val |= IPQ_PWM_REG1_ENABLE;
+ ipq_pwm_reg_write(pwm, IPQ_PWM_REG1, val);
+}
+
+static int ipq_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
+ const struct pwm_state *state)
+{
+ struct ipq_pwm_chip *ipq_chip = ipq_pwm_from_chip(chip);
+ unsigned long rate = clk_get_rate(ipq_chip->clk);
+ unsigned int pre_div, pwm_div;
+ u64 period_ns, duty_ns;
+
+ if (state->polarity != PWM_POLARITY_NORMAL)
+ return -EINVAL;
+
+ if (state->period < DIV64_U64_ROUND_UP(NSEC_PER_SEC, rate))
+ return -ERANGE;
+
+ if ((unsigned long long)rate > 16ULL * GIGA)
+ return -EINVAL;
+
+ period_ns = min(state->period, IPQ_PWM_MAX_PERIOD_NS);
+ duty_ns = min(state->duty_cycle, period_ns);
+
+ /* Restrict pwm_div to 0xfffe for fine-grained duty cycle */
+ pwm_div = IPQ_PWM_MAX_DIV - 1;
+ /* Compute pre_div with rounding up to ensure accurate period */
+ pre_div = DIV64_U64_ROUND_UP(period_ns * rate, (u64)NSEC_PER_SEC * (pwm_div + 1));
+
+ if (pre_div > IPQ_PWM_MAX_DIV)
+ return -ERANGE;
+
+ /* Configure divider and duty cycle */
+ config_div_and_duty(pwm, pre_div, pwm_div, rate, duty_ns, state->enabled);
+
+ return 0;
+}
+
+static int ipq_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
+ struct pwm_state *state)
+{
+ struct ipq_pwm_chip *ipq_chip = ipq_pwm_from_chip(chip);
+ unsigned long rate = clk_get_rate(ipq_chip->clk);
+ unsigned int pre_div, pwm_div, hi_dur;
+ u64 effective_div, hi_div;
+ u32 reg0, reg1;
+
+ reg0 = ipq_pwm_reg_read(pwm, IPQ_PWM_REG0);
+ reg1 = ipq_pwm_reg_read(pwm, IPQ_PWM_REG1);
+
+ state->polarity = PWM_POLARITY_NORMAL;
+ state->enabled = reg1 & IPQ_PWM_REG1_ENABLE;
+
+ pwm_div = FIELD_GET(IPQ_PWM_REG0_PWM_DIV, reg0);
+ hi_dur = FIELD_GET(IPQ_PWM_REG0_HI_DURATION, reg0);
+ pre_div = FIELD_GET(IPQ_PWM_REG1_PRE_DIV, reg1);
+
+ /* No overflow here, both pre_div and pwm_div <= 0xffff */
+ effective_div = (pre_div + 1) * (pwm_div + 1);
+ state->period = DIV64_U64_ROUND_UP(effective_div * NSEC_PER_SEC, rate);
+
+ hi_div = hi_dur * (pre_div + 1);
+ state->duty_cycle = DIV64_U64_ROUND_UP(hi_div * NSEC_PER_SEC, rate);
+
+ return 0;
+}
+
+static const struct pwm_ops ipq_pwm_ops = {
+ .apply = ipq_pwm_apply,
+ .get_state = ipq_pwm_get_state,
+};
+
+static int ipq_pwm_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct ipq_pwm_chip *pwm;
+ struct pwm_chip *chip;
+ int ret;
+
+ chip = devm_pwmchip_alloc(dev, 4, sizeof(*pwm));
+ if (IS_ERR(chip))
+ return PTR_ERR(chip);
+ pwm = ipq_pwm_from_chip(chip);
+
+ pwm->mem = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(pwm->mem))
+ return dev_err_probe(dev, PTR_ERR(pwm->mem),
+ "regs map failed");
+
+ pwm->clk = devm_clk_get_enabled(dev, NULL);
+ if (IS_ERR(pwm->clk))
+ return dev_err_probe(dev, PTR_ERR(pwm->clk),
+ "failed to get clock");
+
+ chip->ops = &ipq_pwm_ops;
+ chip->npwm = 4;
+
+ ret = devm_pwmchip_add(dev, chip);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "failed to add pwm chip\n");
+
+ return ret;
+}
+
+static const struct of_device_id pwm_ipq_dt_match[] = {
+ { .compatible = "qcom,ipq6018-pwm", },
+ {}
+};
+MODULE_DEVICE_TABLE(of, pwm_ipq_dt_match);
+
+static struct platform_driver ipq_pwm_driver = {
+ .driver = {
+ .name = "ipq-pwm",
+ .of_match_table = pwm_ipq_dt_match,
+ },
+ .probe = ipq_pwm_probe,
+};
+
+module_platform_driver(ipq_pwm_driver);
+
+MODULE_LICENSE("GPL");
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 1/9] dt-bindings: pwm: add IPQ6018 binding George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 2/9] pwm: driver for qualcomm ipq6018 pwm block George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-05 17:07 ` George Moussalem
2025-10-08 13:31 ` Rob Herring (Arm)
2025-10-01 14:04 ` [PATCH v16 4/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332 George Moussalem via B4 Relay
` (7 subsequent siblings)
10 siblings, 2 replies; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
The IPQ5018 SoC contains a PWM block which is exactly the same as the
one found in IPQ6018. So let's add a compatible for IPQ5018 and use
IPQ6018 as the fallback.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
index 1172f0b53fadc140482f9384a36020260df372b7..acbdd952fcca53368e3b594544df8d3dae8a06b3 100644
--- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
@@ -11,7 +11,12 @@ maintainers:
properties:
compatible:
- const: qcom,ipq6018-pwm
+ oneOf:
+ - items:
+ - enum:
+ - qcom,ipq5018-pwm
+ - const: qcom,ipq6018-pwm
+ - const: qcom,ipq6018-pwm
reg:
maxItems: 1
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 4/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (2 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018 George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-08 13:28 ` Rob Herring (Arm)
2025-10-01 14:04 ` [PATCH v16 5/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574 George Moussalem via B4 Relay
` (6 subsequent siblings)
10 siblings, 1 reply; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
The IPQ5332 SoC contains a PWM block which is exactly the same as the
one found in IPQ6018. So let's add a compatible for IPQ5332 and use
IPQ6018 as the fallback.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
index acbdd952fcca53368e3b594544df8d3dae8a06b3..e00b9e01f4f89dd0d08610772c984a0e2725d154 100644
--- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
@@ -15,6 +15,7 @@ properties:
- items:
- enum:
- qcom,ipq5018-pwm
+ - qcom,ipq5332-pwm
- const: qcom,ipq6018-pwm
- const: qcom,ipq6018-pwm
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 5/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (3 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 4/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332 George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-08 13:28 ` Rob Herring (Arm)
2025-10-01 14:04 ` [PATCH v16 6/9] arm64: dts: qcom: ipq6018: add pwm node George Moussalem via B4 Relay
` (5 subsequent siblings)
10 siblings, 1 reply; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
The IPQ9574 SoC contains a PWM block which is exactly the same as the
one found in IPQ6018. So let's add a compatible for IPQ9574 and use
IPQ6018 as the fallback.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
index e00b9e01f4f89dd0d08610772c984a0e2725d154..48dd7d1b8f511b0dd2cbebc07f33cafc3655ce50 100644
--- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
@@ -16,6 +16,7 @@ properties:
- enum:
- qcom,ipq5018-pwm
- qcom,ipq5332-pwm
+ - qcom,ipq9574-pwm
- const: qcom,ipq6018-pwm
- const: qcom,ipq6018-pwm
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 6/9] arm64: dts: qcom: ipq6018: add pwm node
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (4 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 5/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574 George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-02 2:05 ` Dmitry Baryshkov
2025-10-01 14:04 ` [PATCH v16 7/9] arm64: dts: qcom: ipq5018: " George Moussalem via B4 Relay
` (4 subsequent siblings)
10 siblings, 1 reply; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach, George Moussalem
From: Devi Priya <quic_devipriy@quicinc.com>
Describe the PWM block on IPQ6018.
Although PWM is in the TCSR area, make pwm its own node as simple-mfd
has been removed from the bindings and as such hardware components
should have its own node.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Co-developed-by: Baruch Siach <baruch.siach@siklu.com>
Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index 40f1c262126eff3761430a47472b52d27f961040..84bc2dec2b22f9634d4ec926daeebb9b40cb112f 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -413,6 +413,16 @@ tcsr: syscon@1937000 {
reg = <0x0 0x01937000 0x0 0x21000>;
};
+ pwm: pwm@1941010 {
+ compatible = "qcom,ipq6018-pwm";
+ reg = <0x01941010 0x20>;
+ clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clock-rates = <100000000>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
usb2: usb@70f8800 {
compatible = "qcom,ipq6018-dwc3", "qcom,dwc3";
reg = <0x0 0x070f8800 0x0 0x400>;
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 7/9] arm64: dts: qcom: ipq5018: add pwm node
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (5 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 6/9] arm64: dts: qcom: ipq6018: add pwm node George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-02 2:06 ` Dmitry Baryshkov
2025-10-01 14:04 ` [PATCH v16 8/9] arm64: dts: qcom: ipq5332: " George Moussalem via B4 Relay
` (3 subsequent siblings)
10 siblings, 1 reply; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Describe the PWM block on IPQ5018.
Although PWM is in the TCSR area, make pwm its own node as simple-mfd
has been removed from the bindings and as such hardware components
should have its own node.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
index f024b3cba33f6100ac3f4d45598ff2356e026dcf..d4bdf2884aa7f73711cf8a37b7a4c4e7e54c503c 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -453,6 +453,16 @@ tcsr: syscon@1937000 {
reg = <0x01937000 0x21000>;
};
+ pwm: pwm@1941010 {
+ compatible = "qcom,ipq5018-pwm", "qcom,ipq6018-pwm";
+ reg = <0x01941010 0x20>;
+ clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clock-rates = <100000000>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
sdhc_1: mmc@7804000 {
compatible = "qcom,ipq5018-sdhci", "qcom,sdhci-msm-v5";
reg = <0x7804000 0x1000>;
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 8/9] arm64: dts: qcom: ipq5332: add pwm node
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (6 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 7/9] arm64: dts: qcom: ipq5018: " George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-02 2:06 ` Dmitry Baryshkov
2025-10-01 14:04 ` [PATCH v16 9/9] arm64: dts: qcom: ipq9574: " George Moussalem via B4 Relay
` (2 subsequent siblings)
10 siblings, 1 reply; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Describe the PWM block on IPQ5332.
Although PWM is in the TCSR area, make pwm its own node as simple-mfd
has been removed from the bindings and as such hardware components
should have its own node.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index 45fc512a3bab221c0d99f819294abf63369987da..4ff6e38521ed94fac0f4caac5c5b0d9be3704d7e 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -334,6 +334,16 @@ tcsr: syscon@1937000 {
reg = <0x01937000 0x21000>;
};
+ pwm: pwm@1941010 {
+ compatible = "qcom,ipq5332-pwm", "qcom,ipq6018-pwm";
+ reg = <0x01941010 0x20>;
+ clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clock-rates = <100000000>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
sdhc: mmc@7804000 {
compatible = "qcom,ipq5332-sdhci", "qcom,sdhci-msm-v5";
reg = <0x07804000 0x1000>, <0x07805000 0x1000>;
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v16 9/9] arm64: dts: qcom: ipq9574: add pwm node
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (7 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 8/9] arm64: dts: qcom: ipq5332: " George Moussalem via B4 Relay
@ 2025-10-01 14:04 ` George Moussalem via B4 Relay
2025-10-02 2:21 ` Dmitry Baryshkov
2025-10-01 23:42 ` [PATCH v16 0/9] Add PWM support for IPQ chipsets Rob Herring (Arm)
2025-10-03 9:04 ` Kathiravan Thirumoorthy
10 siblings, 1 reply; 25+ messages in thread
From: George Moussalem via B4 Relay @ 2025-10-01 14:04 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Describe the PWM block on IPQ9574.
Although PWM is in the TCSR area, make pwm its own node as simple-mfd
has been removed from the bindings and as such hardware components
should have its own node.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 86c9cb9fffc98fdd1b0b08e81428ce5e7bb87e17..8dba80d76d609a317a66f514c64ab8f5612e6938 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -449,6 +449,16 @@ tcsr: syscon@1937000 {
reg = <0x01937000 0x21000>;
};
+ pwm: pwm@1941010 {
+ compatible = "qcom,ipq9574-pwm", "qcom,ipq6018-pwm";
+ reg = <0x01941010 0x20>;
+ clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
+ assigned-clock-rates = <100000000>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
sdhc_1: mmc@7804000 {
compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5";
reg = <0x07804000 0x1000>,
--
2.51.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH v16 0/9] Add PWM support for IPQ chipsets
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (8 preceding siblings ...)
2025-10-01 14:04 ` [PATCH v16 9/9] arm64: dts: qcom: ipq9574: " George Moussalem via B4 Relay
@ 2025-10-01 23:42 ` Rob Herring (Arm)
2025-10-03 7:06 ` George Moussalem
2025-10-03 9:04 ` Kathiravan Thirumoorthy
10 siblings, 1 reply; 25+ messages in thread
From: Rob Herring (Arm) @ 2025-10-01 23:42 UTC (permalink / raw)
To: George Moussalem
Cc: Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, linux-pwm,
linux-kernel, Baruch Siach, Baruch Siach, Uwe Kleine-König,
Konrad Dybcio, linux-arm-msm, devicetree, Krzysztof Kozlowski,
Devi Priya
On Wed, 01 Oct 2025 18:04:16 +0400, George Moussalem wrote:
> Add PWM driver and binding support for IPQ chipsets.
> Also, add nodes to add support for pwm in ipq6018, ipq5018, ipq5332, and
> ipq9574.
>
> I've picked up work based on Devi's last submission (v15) which dates
> back to 05 October 2023 as below SoCs are still active.
>
> V16:
>
> Removed reg description in bindings as the offset is not relative to
> the TCSR region anymore since simple-mfd support was dropped and PWM
> nodes defined as their own nodes, not child nodes. Updated the example
> too.
>
> Dropped patch to add simple-mfd support to the qcom,tcsr bindings
>
> Simplified code to calculate divs and duty cycle as per Uwe's comments
>
> Removed unused pwm_chip struct from ipq_pwm_chip struct
>
> Removed unnecessary cast as per Uwe's comment
>
> Replaced devm_clk_get & clk_prepare_enable by devm_clk_get_enabled
>
> Replaced pwmchip_add by devm_pwmchip_add and removed .remove function
>
> Removed .owner from driver struct
>
> Added compatibles to the bindings and nodes to the device trees to add
> PWM support PWM in the IPQ5018, IPQ5332, and IPQ9574 SoCs
>
> v15:
>
> No change
>
> v14:
>
> Picked up the R-b tag
>
> v13:
>
> Updated the file name to match the compatible
>
> Sorted the properties and updated the order in the required field
>
> Dropped the syscon node from examples
>
> v12:
>
> Picked up the R-b tag
>
> v11:
>
> No change
>
> v10:
>
> No change
>
> v9:
>
> Add 'ranges' property to example (Rob)
>
> Drop label in example (Rob)
>
> v8:
>
> Add size cell to 'reg' (Rob)
>
> v7:
>
> Use 'reg' instead of 'offset' (Rob)
>
> Drop 'clock-names' and 'assigned-clock*' (Bjorn)
>
> Use single cell address/size in example node (Bjorn)
>
> Move '#pwm-cells' lower in example node (Bjorn)
>
> List 'reg' as required
>
> v6:
>
> Device node is child of TCSR; remove phandle (Rob Herring)
>
> Add assigned-clocks/assigned-clock-rates (Uwe Kleine-König)
>
> v5: Use qcom,pwm-regs for phandle instead of direct regs (Bjorn
> Andersson, Kathiravan T)
>
> v4: Update the binding example node as well (Rob Herring's bot)
>
> v3: s/qcom,pwm-ipq6018/qcom,ipq6018-pwm/ (Rob Herring)
>
> v2: Make #pwm-cells const (Rob Herring)
>
> V15:
> Detailed Change logs are added to the respective patches.
>
> V14 can be found at:
> https://lore.kernel.org/linux-arm-msm/20231005043127.2690639-1-quic_devipriy@quicinc.com/
>
> Devi Priya (4):
> pwm: driver for qualcomm ipq6018 pwm block
> dt-bindings: pwm: add IPQ6018 binding
> dt-bindings: mfd: qcom,tcsr: Add simple-mfd support for IPQ6018
> arm64: dts: qcom: ipq6018: add pwm node
>
> .../devicetree/bindings/mfd/qcom,tcsr.yaml | 112 +++++--
> .../bindings/pwm/qcom,ipq6018-pwm.yaml | 45 +++
> arch/arm64/boot/dts/qcom/ipq6018.dtsi | 15 +-
> drivers/pwm/Kconfig | 12 +
> drivers/pwm/Makefile | 1 +
> drivers/pwm/pwm-ipq.c | 282 ++++++++++++++++++
> 6 files changed, 435 insertions(+), 32 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> create mode 100644 drivers/pwm/pwm-ipq.c
>
> --
> 2.34.1
>
> ---
> Devi Priya (3):
> dt-bindings: pwm: add IPQ6018 binding
> pwm: driver for qualcomm ipq6018 pwm block
> arm64: dts: qcom: ipq6018: add pwm node
>
> George Moussalem (6):
> dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
> dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332
> dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574
> arm64: dts: qcom: ipq5018: add pwm node
> arm64: dts: qcom: ipq5332: add pwm node
> arm64: dts: qcom: ipq9574: add pwm node
>
> .../devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 51 +++++
> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 10 +
> arch/arm64/boot/dts/qcom/ipq5332.dtsi | 10 +
> arch/arm64/boot/dts/qcom/ipq6018.dtsi | 10 +
> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 10 +
> drivers/pwm/Kconfig | 12 ++
> drivers/pwm/Makefile | 1 +
> drivers/pwm/pwm-ipq.c | 214 +++++++++++++++++++++
> 8 files changed, 318 insertions(+)
> ---
> base-commit: 846bd2225ec3cfa8be046655e02b9457ed41973e
> change-id: 20250922-ipq-pwm-c8c75c147d52
>
> Best regards,
> --
> George Moussalem <george.moussalem@outlook.com>
>
>
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: using specified base-commit 846bd2225ec3cfa8be046655e02b9457ed41973e
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/qcom/' for 20251001-ipq-pwm-v16-0-300f237e0e68@outlook.com:
arch/arm64/boot/dts/qcom/ipq6018.dtsi:418.4-28: Warning (reg_format): /soc@0/pwm@1941010:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 2)
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: soc@0 (simple-bus): pwm@1941010:reg:0: [26480656, 32] is too short
from schema $id: http://devicetree.org/schemas/reg.yaml#
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 6/9] arm64: dts: qcom: ipq6018: add pwm node
2025-10-01 14:04 ` [PATCH v16 6/9] arm64: dts: qcom: ipq6018: add pwm node George Moussalem via B4 Relay
@ 2025-10-02 2:05 ` Dmitry Baryshkov
0 siblings, 0 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2025-10-02 2:05 UTC (permalink / raw)
To: george.moussalem
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach
On Wed, Oct 01, 2025 at 06:04:22PM +0400, George Moussalem via B4 Relay wrote:
> From: Devi Priya <quic_devipriy@quicinc.com>
>
> Describe the PWM block on IPQ6018.
>
> Although PWM is in the TCSR area, make pwm its own node as simple-mfd
> has been removed from the bindings and as such hardware components
> should have its own node.
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Co-developed-by: Baruch Siach <baruch.siach@siklu.com>
> Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
> Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> arch/arm64/boot/dts/qcom/ipq6018.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> index 40f1c262126eff3761430a47472b52d27f961040..84bc2dec2b22f9634d4ec926daeebb9b40cb112f 100644
> --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> @@ -413,6 +413,16 @@ tcsr: syscon@1937000 {
> reg = <0x0 0x01937000 0x0 0x21000>;
> };
>
> + pwm: pwm@1941010 {
> + compatible = "qcom,ipq6018-pwm";
> + reg = <0x01941010 0x20>;
It should be <0x0 0x01941010 0x0 0x20>;
> + clocks = <&gcc GCC_ADSS_PWM_CLK>;
> + assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
> + assigned-clock-rates = <100000000>;
> + #pwm-cells = <2>;
> + status = "disabled";
> + };
> +
> usb2: usb@70f8800 {
> compatible = "qcom,ipq6018-dwc3", "qcom,dwc3";
> reg = <0x0 0x070f8800 0x0 0x400>;
>
> --
> 2.51.0
>
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 7/9] arm64: dts: qcom: ipq5018: add pwm node
2025-10-01 14:04 ` [PATCH v16 7/9] arm64: dts: qcom: ipq5018: " George Moussalem via B4 Relay
@ 2025-10-02 2:06 ` Dmitry Baryshkov
0 siblings, 0 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2025-10-02 2:06 UTC (permalink / raw)
To: george.moussalem
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm, linux-pwm, devicetree, linux-kernel
On Wed, Oct 01, 2025 at 06:04:23PM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> Describe the PWM block on IPQ5018.
>
> Although PWM is in the TCSR area, make pwm its own node as simple-mfd
> has been removed from the bindings and as such hardware components
> should have its own node.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 8/9] arm64: dts: qcom: ipq5332: add pwm node
2025-10-01 14:04 ` [PATCH v16 8/9] arm64: dts: qcom: ipq5332: " George Moussalem via B4 Relay
@ 2025-10-02 2:06 ` Dmitry Baryshkov
0 siblings, 0 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2025-10-02 2:06 UTC (permalink / raw)
To: george.moussalem
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm, linux-pwm, devicetree, linux-kernel
On Wed, Oct 01, 2025 at 06:04:24PM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> Describe the PWM block on IPQ5332.
>
> Although PWM is in the TCSR area, make pwm its own node as simple-mfd
> has been removed from the bindings and as such hardware components
> should have its own node.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> arch/arm64/boot/dts/qcom/ipq5332.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 9/9] arm64: dts: qcom: ipq9574: add pwm node
2025-10-01 14:04 ` [PATCH v16 9/9] arm64: dts: qcom: ipq9574: " George Moussalem via B4 Relay
@ 2025-10-02 2:21 ` Dmitry Baryshkov
0 siblings, 0 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2025-10-02 2:21 UTC (permalink / raw)
To: george.moussalem
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm, linux-pwm, devicetree, linux-kernel
On Wed, Oct 01, 2025 at 06:04:25PM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> Describe the PWM block on IPQ9574.
>
> Although PWM is in the TCSR area, make pwm its own node as simple-mfd
> has been removed from the bindings and as such hardware components
> should have its own node.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 0/9] Add PWM support for IPQ chipsets
2025-10-01 23:42 ` [PATCH v16 0/9] Add PWM support for IPQ chipsets Rob Herring (Arm)
@ 2025-10-03 7:06 ` George Moussalem
2025-10-06 12:06 ` Konrad Dybcio
0 siblings, 1 reply; 25+ messages in thread
From: George Moussalem @ 2025-10-03 7:06 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, linux-pwm,
linux-kernel, Baruch Siach, Baruch Siach, Uwe Kleine-König,
Konrad Dybcio, linux-arm-msm, devicetree, Krzysztof Kozlowski,
Devi Priya
yeah, my bad. c/p error as I moved it out from the TCSR node.
Ran dt_binding_check on the yaml, did dtbs_check on ipq5018 so missed it
for ipq6018. Will be fixed in next version. Waiting for feedback on the
driver (Uwe's?) and on the dt bindings (Krzysztof's?) for adding
additional compatibles. Will then send out the next version..
thanks!
On 10/2/25 03:42, Rob Herring (Arm) wrote:
>
> On Wed, 01 Oct 2025 18:04:16 +0400, George Moussalem wrote:
>> Add PWM driver and binding support for IPQ chipsets.
>> Also, add nodes to add support for pwm in ipq6018, ipq5018, ipq5332, and
>> ipq9574.
>>
>> I've picked up work based on Devi's last submission (v15) which dates
>> back to 05 October 2023 as below SoCs are still active.
>>
>> V16:
>>
>> Removed reg description in bindings as the offset is not relative to
>> the TCSR region anymore since simple-mfd support was dropped and PWM
>> nodes defined as their own nodes, not child nodes. Updated the example
>> too.
>>
>> Dropped patch to add simple-mfd support to the qcom,tcsr bindings
>>
>> Simplified code to calculate divs and duty cycle as per Uwe's comments
>>
>> Removed unused pwm_chip struct from ipq_pwm_chip struct
>>
>> Removed unnecessary cast as per Uwe's comment
>>
>> Replaced devm_clk_get & clk_prepare_enable by devm_clk_get_enabled
>>
>> Replaced pwmchip_add by devm_pwmchip_add and removed .remove function
>>
>> Removed .owner from driver struct
>>
>> Added compatibles to the bindings and nodes to the device trees to add
>> PWM support PWM in the IPQ5018, IPQ5332, and IPQ9574 SoCs
>>
>> v15:
>>
>> No change
>>
>> v14:
>>
>> Picked up the R-b tag
>>
>> v13:
>>
>> Updated the file name to match the compatible
>>
>> Sorted the properties and updated the order in the required field
>>
>> Dropped the syscon node from examples
>>
>> v12:
>>
>> Picked up the R-b tag
>>
>> v11:
>>
>> No change
>>
>> v10:
>>
>> No change
>>
>> v9:
>>
>> Add 'ranges' property to example (Rob)
>>
>> Drop label in example (Rob)
>>
>> v8:
>>
>> Add size cell to 'reg' (Rob)
>>
>> v7:
>>
>> Use 'reg' instead of 'offset' (Rob)
>>
>> Drop 'clock-names' and 'assigned-clock*' (Bjorn)
>>
>> Use single cell address/size in example node (Bjorn)
>>
>> Move '#pwm-cells' lower in example node (Bjorn)
>>
>> List 'reg' as required
>>
>> v6:
>>
>> Device node is child of TCSR; remove phandle (Rob Herring)
>>
>> Add assigned-clocks/assigned-clock-rates (Uwe Kleine-König)
>>
>> v5: Use qcom,pwm-regs for phandle instead of direct regs (Bjorn
>> Andersson, Kathiravan T)
>>
>> v4: Update the binding example node as well (Rob Herring's bot)
>>
>> v3: s/qcom,pwm-ipq6018/qcom,ipq6018-pwm/ (Rob Herring)
>>
>> v2: Make #pwm-cells const (Rob Herring)
>>
>> V15:
>> Detailed Change logs are added to the respective patches.
>>
>> V14 can be found at:
>> https://lore.kernel.org/linux-arm-msm/20231005043127.2690639-1-quic_devipriy@quicinc.com/
>>
>> Devi Priya (4):
>> pwm: driver for qualcomm ipq6018 pwm block
>> dt-bindings: pwm: add IPQ6018 binding
>> dt-bindings: mfd: qcom,tcsr: Add simple-mfd support for IPQ6018
>> arm64: dts: qcom: ipq6018: add pwm node
>>
>> .../devicetree/bindings/mfd/qcom,tcsr.yaml | 112 +++++--
>> .../bindings/pwm/qcom,ipq6018-pwm.yaml | 45 +++
>> arch/arm64/boot/dts/qcom/ipq6018.dtsi | 15 +-
>> drivers/pwm/Kconfig | 12 +
>> drivers/pwm/Makefile | 1 +
>> drivers/pwm/pwm-ipq.c | 282 ++++++++++++++++++
>> 6 files changed, 435 insertions(+), 32 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
>> create mode 100644 drivers/pwm/pwm-ipq.c
>>
>> --
>> 2.34.1
>>
>> ---
>> Devi Priya (3):
>> dt-bindings: pwm: add IPQ6018 binding
>> pwm: driver for qualcomm ipq6018 pwm block
>> arm64: dts: qcom: ipq6018: add pwm node
>>
>> George Moussalem (6):
>> dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
>> dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332
>> dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574
>> arm64: dts: qcom: ipq5018: add pwm node
>> arm64: dts: qcom: ipq5332: add pwm node
>> arm64: dts: qcom: ipq9574: add pwm node
>>
>> .../devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 51 +++++
>> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 10 +
>> arch/arm64/boot/dts/qcom/ipq5332.dtsi | 10 +
>> arch/arm64/boot/dts/qcom/ipq6018.dtsi | 10 +
>> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 10 +
>> drivers/pwm/Kconfig | 12 ++
>> drivers/pwm/Makefile | 1 +
>> drivers/pwm/pwm-ipq.c | 214 +++++++++++++++++++++
>> 8 files changed, 318 insertions(+)
>> ---
>> base-commit: 846bd2225ec3cfa8be046655e02b9457ed41973e
>> change-id: 20250922-ipq-pwm-c8c75c147d52
>>
>> Best regards,
>> --
>> George Moussalem <george.moussalem@outlook.com>
>>
>>
>>
>
>
> My bot found new DTB warnings on the .dts files added or changed in this
> series.
>
> Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
> are fixed by another series. Ultimately, it is up to the platform
> maintainer whether these warnings are acceptable or not. No need to reply
> unless the platform maintainer has comments.
>
> If you already ran DT checks and didn't see these error(s), then
> make sure dt-schema is up to date:
>
> pip3 install dtschema --upgrade
>
>
> This patch series was applied (using b4) to base:
> Base: using specified base-commit 846bd2225ec3cfa8be046655e02b9457ed41973e
>
> If this is not the correct base, please add 'base-commit' tag
> (or use b4 which does this automatically)
>
> New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/qcom/' for 20251001-ipq-pwm-v16-0-300f237e0e68@outlook.com:
>
> arch/arm64/boot/dts/qcom/ipq6018.dtsi:418.4-28: Warning (reg_format): /soc@0/pwm@1941010:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 2)
> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: soc@0 (simple-bus): pwm@1941010:reg:0: [26480656, 32] is too short
> from schema $id: http://devicetree.org/schemas/reg.yaml#
>
>
>
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 0/9] Add PWM support for IPQ chipsets
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
` (9 preceding siblings ...)
2025-10-01 23:42 ` [PATCH v16 0/9] Add PWM support for IPQ chipsets Rob Herring (Arm)
@ 2025-10-03 9:04 ` Kathiravan Thirumoorthy
2025-10-03 9:30 ` George Moussalem
10 siblings, 1 reply; 25+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-10-03 9:04 UTC (permalink / raw)
To: george.moussalem, Uwe Kleine-König, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Baruch Siach, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach
On 10/1/2025 7:34 PM, George Moussalem via B4 Relay wrote:
> Add PWM driver and binding support for IPQ chipsets.
> Also, add nodes to add support for pwm in ipq6018, ipq5018, ipq5332, and
> ipq9574.
>
> I've picked up work based on Devi's last submission (v15) which dates
> back to 05 October 2023 as below SoCs are still active.
>
> V16:
>
> Removed reg description in bindings as the offset is not relative to
> the TCSR region anymore since simple-mfd support was dropped and PWM
> nodes defined as their own nodes, not child nodes. Updated the example
> too.
>
> Dropped patch to add simple-mfd support to the qcom,tcsr bindings
George, thanks for taking up this series.
Can you elaborate on why the qcom,tcsr binding change is dropped and
made the PWM as an independent node? IIUC, it should be child of TCSR
node. In V15, I see the qcom,tcsr binding is applied and *dropped only*
due to dependencies / lack of information on the "pwm-cells" property.
Thanks,
Kathiravan T.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 0/9] Add PWM support for IPQ chipsets
2025-10-03 9:04 ` Kathiravan Thirumoorthy
@ 2025-10-03 9:30 ` George Moussalem
2025-10-03 9:39 ` Kathiravan Thirumoorthy
0 siblings, 1 reply; 25+ messages in thread
From: George Moussalem @ 2025-10-03 9:30 UTC (permalink / raw)
To: Kathiravan Thirumoorthy, Uwe Kleine-König, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Baruch Siach, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach
Hi Kathiravan,
On 10/3/25 13:04, Kathiravan Thirumoorthy wrote:
>
> On 10/1/2025 7:34 PM, George Moussalem via B4 Relay wrote:
>> Add PWM driver and binding support for IPQ chipsets.
>> Also, add nodes to add support for pwm in ipq6018, ipq5018, ipq5332, and
>> ipq9574.
>>
>> I've picked up work based on Devi's last submission (v15) which dates
>> back to 05 October 2023 as below SoCs are still active.
>>
>> V16:
>>
>> Removed reg description in bindings as the offset is not relative to
>> the TCSR region anymore since simple-mfd support was dropped and PWM
>> nodes defined as their own nodes, not child nodes. Updated the example
>> too.
>>
>> Dropped patch to add simple-mfd support to the qcom,tcsr bindings
>
> George, thanks for taking up this series.
>
> Can you elaborate on why the qcom,tcsr binding change is dropped and
> made the PWM as an independent node? IIUC, it should be child of TCSR
> node. In V15, I see the qcom,tcsr binding is applied and *dropped only*
> due to dependencies / lack of information on the "pwm-cells" property.
Please see below patch where it was decided to drop simple-mfd as TCSR
is configuration only and any child devices should be defined outside of it:
https://lore.kernel.org/all/20220909091056.128949-1-krzysztof.kozlowski@linaro.org/
>
> Thanks,
>
> Kathiravan T.
>
Best regards,
George
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 0/9] Add PWM support for IPQ chipsets
2025-10-03 9:30 ` George Moussalem
@ 2025-10-03 9:39 ` Kathiravan Thirumoorthy
0 siblings, 0 replies; 25+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-10-03 9:39 UTC (permalink / raw)
To: George Moussalem, Uwe Kleine-König, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Baruch Siach, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel, Devi Priya,
Krzysztof Kozlowski, Baruch Siach
On 10/3/2025 3:00 PM, George Moussalem wrote:
> Hi Kathiravan,
>
> On 10/3/25 13:04, Kathiravan Thirumoorthy wrote:
>> On 10/1/2025 7:34 PM, George Moussalem via B4 Relay wrote:
>>> Add PWM driver and binding support for IPQ chipsets.
>>> Also, add nodes to add support for pwm in ipq6018, ipq5018, ipq5332, and
>>> ipq9574.
>>>
>>> I've picked up work based on Devi's last submission (v15) which dates
>>> back to 05 October 2023 as below SoCs are still active.
>>>
>>> V16:
>>>
>>> Removed reg description in bindings as the offset is not relative to
>>> the TCSR region anymore since simple-mfd support was dropped and PWM
>>> nodes defined as their own nodes, not child nodes. Updated the example
>>> too.
>>>
>>> Dropped patch to add simple-mfd support to the qcom,tcsr bindings
>> George, thanks for taking up this series.
>>
>> Can you elaborate on why the qcom,tcsr binding change is dropped and
>> made the PWM as an independent node? IIUC, it should be child of TCSR
>> node. In V15, I see the qcom,tcsr binding is applied and *dropped only*
>> due to dependencies / lack of information on the "pwm-cells" property.
> Please see below patch where it was decided to drop simple-mfd as TCSR
> is configuration only and any child devices should be defined outside of it:
> https://lore.kernel.org/all/20220909091056.128949-1-krzysztof.kozlowski@linaro.org/
Hmm... Sorry I missed to check this one. Thanks for pointing it out.
>
>
>> Thanks,
>>
>> Kathiravan T.
>>
> Best regards,
> George
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
2025-10-01 14:04 ` [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018 George Moussalem via B4 Relay
@ 2025-10-05 17:07 ` George Moussalem
2025-10-08 13:31 ` Rob Herring
2025-10-08 13:31 ` Rob Herring (Arm)
1 sibling, 1 reply; 25+ messages in thread
From: George Moussalem @ 2025-10-05 17:07 UTC (permalink / raw)
To: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Baruch Siach, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-msm, linux-pwm, devicetree, linux-kernel
Hi Krzysztof, Rob,
Since I have to submit another version anyways, I was thinking of
changing from a fallback compatible to a list of enums but wanted to get
your guidance on this. The driver needs not distinguish between the SoCs
and no SoC specific match data is needed. Would you prefer as proposed
in below patch or switch to enumerating them in the bindings and in the
driver?
On 10/1/25 18:04, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> The IPQ5018 SoC contains a PWM block which is exactly the same as the
> one found in IPQ6018. So let's add a compatible for IPQ5018 and use
> IPQ6018 as the fallback.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> index 1172f0b53fadc140482f9384a36020260df372b7..acbdd952fcca53368e3b594544df8d3dae8a06b3 100644
> --- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> @@ -11,7 +11,12 @@ maintainers:
>
> properties:
> compatible:
> - const: qcom,ipq6018-pwm
> + oneOf:
> + - items:
> + - enum:
> + - qcom,ipq5018-pwm
> + - const: qcom,ipq6018-pwm
> + - const: qcom,ipq6018-pwm
>
> reg:
> maxItems: 1
>
Best regards,
George
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 0/9] Add PWM support for IPQ chipsets
2025-10-03 7:06 ` George Moussalem
@ 2025-10-06 12:06 ` Konrad Dybcio
0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2025-10-06 12:06 UTC (permalink / raw)
To: George Moussalem, Rob Herring (Arm)
Cc: Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, linux-pwm,
linux-kernel, Baruch Siach, Baruch Siach, Uwe Kleine-König,
Konrad Dybcio, linux-arm-msm, devicetree, Krzysztof Kozlowski,
Devi Priya
On 10/3/25 9:06 AM, George Moussalem wrote:
> yeah, my bad. c/p error as I moved it out from the TCSR node.
> Ran dt_binding_check on the yaml, did dtbs_check on ipq5018 so missed it
> for ipq6018. Will be fixed in next version. Waiting for feedback on the
> driver (Uwe's?) and on the dt bindings (Krzysztof's?) for adding
> additional compatibles. Will then send out the next version..
Please see Greg's note on top-posting:
https://lore.kernel.org/all/20170823231800.GE5193@kroah.com/
Konrad
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 4/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332
2025-10-01 14:04 ` [PATCH v16 4/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332 George Moussalem via B4 Relay
@ 2025-10-08 13:28 ` Rob Herring (Arm)
0 siblings, 0 replies; 25+ messages in thread
From: Rob Herring (Arm) @ 2025-10-08 13:28 UTC (permalink / raw)
To: George Moussalem
Cc: Conor Dooley, Konrad Dybcio, Uwe Kleine-König, linux-pwm,
linux-arm-msm, Baruch Siach, Krzysztof Kozlowski, linux-kernel,
devicetree, Bjorn Andersson
On Wed, 01 Oct 2025 18:04:20 +0400, George Moussalem wrote:
> The IPQ5332 SoC contains a PWM block which is exactly the same as the
> one found in IPQ6018. So let's add a compatible for IPQ5332 and use
> IPQ6018 as the fallback.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 5/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574
2025-10-01 14:04 ` [PATCH v16 5/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574 George Moussalem via B4 Relay
@ 2025-10-08 13:28 ` Rob Herring (Arm)
0 siblings, 0 replies; 25+ messages in thread
From: Rob Herring (Arm) @ 2025-10-08 13:28 UTC (permalink / raw)
To: George Moussalem
Cc: Conor Dooley, linux-pwm, linux-arm-msm, Baruch Siach, devicetree,
linux-kernel, Bjorn Andersson, Uwe Kleine-König,
Konrad Dybcio, Krzysztof Kozlowski
On Wed, 01 Oct 2025 18:04:21 +0400, George Moussalem wrote:
> The IPQ9574 SoC contains a PWM block which is exactly the same as the
> one found in IPQ6018. So let's add a compatible for IPQ9574 and use
> IPQ6018 as the fallback.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
2025-10-05 17:07 ` George Moussalem
@ 2025-10-08 13:31 ` Rob Herring
0 siblings, 0 replies; 25+ messages in thread
From: Rob Herring @ 2025-10-08 13:31 UTC (permalink / raw)
To: George Moussalem
Cc: Uwe Kleine-König, Krzysztof Kozlowski, Conor Dooley,
Baruch Siach, Bjorn Andersson, Konrad Dybcio, linux-arm-msm,
linux-pwm, devicetree, linux-kernel
On Sun, Oct 05, 2025 at 09:07:39PM +0400, George Moussalem wrote:
> Hi Krzysztof, Rob,
>
> Since I have to submit another version anyways, I was thinking of
> changing from a fallback compatible to a list of enums but wanted to get
> your guidance on this. The driver needs not distinguish between the SoCs
> and no SoC specific match data is needed. Would you prefer as proposed
> in below patch or switch to enumerating them in the bindings and in the
> driver?
If the block is "the same" in newer versions as you said, then a
fallback is the correct choice. No match data or the same match data is
another clue.
Rob
>
> On 10/1/25 18:04, George Moussalem via B4 Relay wrote:
> > From: George Moussalem <george.moussalem@outlook.com>
> >
> > The IPQ5018 SoC contains a PWM block which is exactly the same as the
> > one found in IPQ6018. So let's add a compatible for IPQ5018 and use
> > IPQ6018 as the fallback.
> >
> > Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> > ---
> > Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> > index 1172f0b53fadc140482f9384a36020260df372b7..acbdd952fcca53368e3b594544df8d3dae8a06b3 100644
> > --- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> > @@ -11,7 +11,12 @@ maintainers:
> >
> > properties:
> > compatible:
> > - const: qcom,ipq6018-pwm
> > + oneOf:
> > + - items:
> > + - enum:
> > + - qcom,ipq5018-pwm
> > + - const: qcom,ipq6018-pwm
> > + - const: qcom,ipq6018-pwm
> >
> > reg:
> > maxItems: 1
> >
>
> Best regards,
> George
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018
2025-10-01 14:04 ` [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018 George Moussalem via B4 Relay
2025-10-05 17:07 ` George Moussalem
@ 2025-10-08 13:31 ` Rob Herring (Arm)
1 sibling, 0 replies; 25+ messages in thread
From: Rob Herring (Arm) @ 2025-10-08 13:31 UTC (permalink / raw)
To: George Moussalem
Cc: Uwe Kleine-König, Conor Dooley, Konrad Dybcio, Baruch Siach,
devicetree, Krzysztof Kozlowski, Bjorn Andersson, linux-kernel,
linux-pwm, linux-arm-msm
On Wed, 01 Oct 2025 18:04:19 +0400, George Moussalem wrote:
> The IPQ5018 SoC contains a PWM block which is exactly the same as the
> one found in IPQ6018. So let's add a compatible for IPQ5018 and use
> IPQ6018 as the fallback.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2025-10-08 13:31 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01 14:04 [PATCH v16 0/9] Add PWM support for IPQ chipsets George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 1/9] dt-bindings: pwm: add IPQ6018 binding George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 2/9] pwm: driver for qualcomm ipq6018 pwm block George Moussalem via B4 Relay
2025-10-01 14:04 ` [PATCH v16 3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018 George Moussalem via B4 Relay
2025-10-05 17:07 ` George Moussalem
2025-10-08 13:31 ` Rob Herring
2025-10-08 13:31 ` Rob Herring (Arm)
2025-10-01 14:04 ` [PATCH v16 4/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5332 George Moussalem via B4 Relay
2025-10-08 13:28 ` Rob Herring (Arm)
2025-10-01 14:04 ` [PATCH v16 5/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq9574 George Moussalem via B4 Relay
2025-10-08 13:28 ` Rob Herring (Arm)
2025-10-01 14:04 ` [PATCH v16 6/9] arm64: dts: qcom: ipq6018: add pwm node George Moussalem via B4 Relay
2025-10-02 2:05 ` Dmitry Baryshkov
2025-10-01 14:04 ` [PATCH v16 7/9] arm64: dts: qcom: ipq5018: " George Moussalem via B4 Relay
2025-10-02 2:06 ` Dmitry Baryshkov
2025-10-01 14:04 ` [PATCH v16 8/9] arm64: dts: qcom: ipq5332: " George Moussalem via B4 Relay
2025-10-02 2:06 ` Dmitry Baryshkov
2025-10-01 14:04 ` [PATCH v16 9/9] arm64: dts: qcom: ipq9574: " George Moussalem via B4 Relay
2025-10-02 2:21 ` Dmitry Baryshkov
2025-10-01 23:42 ` [PATCH v16 0/9] Add PWM support for IPQ chipsets Rob Herring (Arm)
2025-10-03 7:06 ` George Moussalem
2025-10-06 12:06 ` Konrad Dybcio
2025-10-03 9:04 ` Kathiravan Thirumoorthy
2025-10-03 9:30 ` George Moussalem
2025-10-03 9:39 ` Kathiravan Thirumoorthy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).