* [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC
@ 2022-02-09 23:11 Aidan MacDonald
2022-02-09 23:11 ` [PATCH 2/2] pwm: jz4740: Add support " Aidan MacDonald
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aidan MacDonald @ 2022-02-09 23:11 UTC (permalink / raw)
To: paul, robh+dt; +Cc: linux-mips, linux-pwm, devicetree, linux-kernel
The PWM hardware on the X1000 SoC is almost identical to other
Ingenic SoCs, so it can be used with only minor driver changes.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
Documentation/devicetree/bindings/timer/ingenic,tcu.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml b/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
index 7fb37eae9da7..d541cf2067bc 100644
--- a/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
+++ b/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
@@ -152,6 +152,7 @@ patternProperties:
- enum:
- ingenic,jz4740-pwm
- ingenic,jz4725b-pwm
+ - ingenic,x1000-pwm
- items:
- enum:
- ingenic,jz4760-pwm
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] pwm: jz4740: Add support for X1000 SoC
2022-02-09 23:11 [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC Aidan MacDonald
@ 2022-02-09 23:11 ` Aidan MacDonald
2022-02-14 12:02 ` Paul Cercueil
2022-02-11 17:08 ` [PATCH 1/2] dt-bindings: timer: Add PWM compatible " Rob Herring
2022-02-14 12:00 ` Paul Cercueil
2 siblings, 1 reply; 7+ messages in thread
From: Aidan MacDonald @ 2022-02-09 23:11 UTC (permalink / raw)
To: paul, robh+dt; +Cc: linux-mips, linux-pwm, devicetree, linux-kernel
The X1000 has the same TCU / PWM hardware as other Ingenic SoCs,
but it has only 5 channels.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++
drivers/pwm/pwm-jz4740.c | 5 +++++
2 files changed, 18 insertions(+)
diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi
index 8bd27edef216..0dcf37527c8e 100644
--- a/arch/mips/boot/dts/ingenic/x1000.dtsi
+++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
@@ -127,6 +127,19 @@ wdt: watchdog@0 {
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
+
+ pwm: pwm@40 {
+ compatible = "ingenic,x1000-pwm";
+ reg = <0x40 0x80>;
+
+ #pwm-cells = <3>;
+
+ clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>,
+ <&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>,
+ <&tcu TCU_CLK_TIMER4>;
+ clock-names = "timer0", "timer1", "timer2",
+ "timer3", "timer4";
+ };
};
rtc: rtc@10003000 {
diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c
index 23dc1fb770e2..a5fdf97c0d2e 100644
--- a/drivers/pwm/pwm-jz4740.c
+++ b/drivers/pwm/pwm-jz4740.c
@@ -256,10 +256,15 @@ static const struct soc_info __maybe_unused jz4725b_soc_info = {
.num_pwms = 6,
};
+static const struct soc_info __maybe_unused x1000_soc_info = {
+ .num_pwms = 5,
+};
+
#ifdef CONFIG_OF
static const struct of_device_id jz4740_pwm_dt_ids[] = {
{ .compatible = "ingenic,jz4740-pwm", .data = &jz4740_soc_info },
{ .compatible = "ingenic,jz4725b-pwm", .data = &jz4725b_soc_info },
+ { .compatible = "ingenic,x1000-pwm", .data = &x1000_soc_info },
{},
};
MODULE_DEVICE_TABLE(of, jz4740_pwm_dt_ids);
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC
2022-02-09 23:11 [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC Aidan MacDonald
2022-02-09 23:11 ` [PATCH 2/2] pwm: jz4740: Add support " Aidan MacDonald
@ 2022-02-11 17:08 ` Rob Herring
2022-02-14 12:00 ` Paul Cercueil
2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-02-11 17:08 UTC (permalink / raw)
To: Aidan MacDonald
Cc: linux-kernel, linux-pwm, devicetree, linux-mips, paul, robh+dt
On Wed, 09 Feb 2022 23:11:41 +0000, Aidan MacDonald wrote:
> The PWM hardware on the X1000 SoC is almost identical to other
> Ingenic SoCs, so it can be used with only minor driver changes.
>
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
> ---
> Documentation/devicetree/bindings/timer/ingenic,tcu.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC
2022-02-09 23:11 [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC Aidan MacDonald
2022-02-09 23:11 ` [PATCH 2/2] pwm: jz4740: Add support " Aidan MacDonald
2022-02-11 17:08 ` [PATCH 1/2] dt-bindings: timer: Add PWM compatible " Rob Herring
@ 2022-02-14 12:00 ` Paul Cercueil
2 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2022-02-14 12:00 UTC (permalink / raw)
To: Aidan MacDonald; +Cc: robh+dt, linux-mips, linux-pwm, devicetree, linux-kernel
Hi,
Le mer., févr. 9 2022 at 23:11:41 +0000, Aidan MacDonald
<aidanmacdonald.0x0@gmail.com> a écrit :
> The PWM hardware on the X1000 SoC is almost identical to other
> Ingenic SoCs, so it can be used with only minor driver changes.
>
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
> ---
> Documentation/devicetree/bindings/timer/ingenic,tcu.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
> b/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
> index 7fb37eae9da7..d541cf2067bc 100644
> --- a/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
> +++ b/Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
> @@ -152,6 +152,7 @@ patternProperties:
> - enum:
> - ingenic,jz4740-pwm
> - ingenic,jz4725b-pwm
> + - ingenic,x1000-pwm
> - items:
> - enum:
> - ingenic,jz4760-pwm
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] pwm: jz4740: Add support for X1000 SoC
2022-02-09 23:11 ` [PATCH 2/2] pwm: jz4740: Add support " Aidan MacDonald
@ 2022-02-14 12:02 ` Paul Cercueil
2022-02-24 13:40 ` Thierry Reding
0 siblings, 1 reply; 7+ messages in thread
From: Paul Cercueil @ 2022-02-14 12:02 UTC (permalink / raw)
To: Aidan MacDonald; +Cc: robh+dt, linux-mips, linux-pwm, devicetree, linux-kernel
Hi Aidan,
Le mer., févr. 9 2022 at 23:11:42 +0000, Aidan MacDonald
<aidanmacdonald.0x0@gmail.com> a écrit :
> The X1000 has the same TCU / PWM hardware as other Ingenic SoCs,
> but it has only 5 channels.
>
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
> ---
> arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++
> drivers/pwm/pwm-jz4740.c | 5 +++++
Please put the driver and device tree changes into separate patches.
Cheers,
-Paul
> 2 files changed, 18 insertions(+)
>
> diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi
> b/arch/mips/boot/dts/ingenic/x1000.dtsi
> index 8bd27edef216..0dcf37527c8e 100644
> --- a/arch/mips/boot/dts/ingenic/x1000.dtsi
> +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
> @@ -127,6 +127,19 @@ wdt: watchdog@0 {
> clocks = <&tcu TCU_CLK_WDT>;
> clock-names = "wdt";
> };
> +
> + pwm: pwm@40 {
> + compatible = "ingenic,x1000-pwm";
> + reg = <0x40 0x80>;
> +
> + #pwm-cells = <3>;
> +
> + clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>,
> + <&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>,
> + <&tcu TCU_CLK_TIMER4>;
> + clock-names = "timer0", "timer1", "timer2",
> + "timer3", "timer4";
> + };
> };
>
> rtc: rtc@10003000 {
> diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c
> index 23dc1fb770e2..a5fdf97c0d2e 100644
> --- a/drivers/pwm/pwm-jz4740.c
> +++ b/drivers/pwm/pwm-jz4740.c
> @@ -256,10 +256,15 @@ static const struct soc_info __maybe_unused
> jz4725b_soc_info = {
> .num_pwms = 6,
> };
>
> +static const struct soc_info __maybe_unused x1000_soc_info = {
> + .num_pwms = 5,
> +};
> +
> #ifdef CONFIG_OF
> static const struct of_device_id jz4740_pwm_dt_ids[] = {
> { .compatible = "ingenic,jz4740-pwm", .data = &jz4740_soc_info },
> { .compatible = "ingenic,jz4725b-pwm", .data = &jz4725b_soc_info },
> + { .compatible = "ingenic,x1000-pwm", .data = &x1000_soc_info },
> {},
> };
> MODULE_DEVICE_TABLE(of, jz4740_pwm_dt_ids);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] pwm: jz4740: Add support for X1000 SoC
2022-02-14 12:02 ` Paul Cercueil
@ 2022-02-24 13:40 ` Thierry Reding
2022-02-24 15:25 ` Paul Cercueil
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2022-02-24 13:40 UTC (permalink / raw)
To: Paul Cercueil, Aidan MacDonald
Cc: robh+dt, linux-mips, linux-pwm, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On Mon, Feb 14, 2022 at 12:02:26PM +0000, Paul Cercueil wrote:
> Hi Aidan,
>
> Le mer., févr. 9 2022 at 23:11:42 +0000, Aidan MacDonald
> <aidanmacdonald.0x0@gmail.com> a écrit :
> > The X1000 has the same TCU / PWM hardware as other Ingenic SoCs,
> > but it has only 5 channels.
> >
> > Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
> > ---
> > arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++
> > drivers/pwm/pwm-jz4740.c | 5 +++++
>
> Please put the driver and device tree changes into separate patches.
Seemed a shame not to take this, so I've manually removed the DTS
changes and applied this to the PWM tree.
Aidan, probably best to resend the DTS snippet as a separate patch,
unless Paul also wants to apply this manually.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] pwm: jz4740: Add support for X1000 SoC
2022-02-24 13:40 ` Thierry Reding
@ 2022-02-24 15:25 ` Paul Cercueil
0 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2022-02-24 15:25 UTC (permalink / raw)
To: Thierry Reding
Cc: Aidan MacDonald, robh+dt, linux-mips, linux-pwm, devicetree,
linux-kernel
Hi,
Le jeu., févr. 24 2022 at 14:40:51 +0100, Thierry Reding
<thierry.reding@gmail.com> a écrit :
> On Mon, Feb 14, 2022 at 12:02:26PM +0000, Paul Cercueil wrote:
>> Hi Aidan,
>>
>> Le mer., févr. 9 2022 at 23:11:42 +0000, Aidan MacDonald
>> <aidanmacdonald.0x0@gmail.com> a écrit :
>> > The X1000 has the same TCU / PWM hardware as other Ingenic SoCs,
>> > but it has only 5 channels.
>> >
>> > Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
>> > ---
>> > arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++
>> > drivers/pwm/pwm-jz4740.c | 5 +++++
>>
>> Please put the driver and device tree changes into separate patches.
>
> Seemed a shame not to take this, so I've manually removed the DTS
> changes and applied this to the PWM tree.
>
> Aidan, probably best to resend the DTS snippet as a separate patch,
> unless Paul also wants to apply this manually.
I am not the arch/mips/ maintainer, so a separate patch would be needed
anyway, yes.
Cheers,
-Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-24 15:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 23:11 [PATCH 1/2] dt-bindings: timer: Add PWM compatible for X1000 SoC Aidan MacDonald
2022-02-09 23:11 ` [PATCH 2/2] pwm: jz4740: Add support " Aidan MacDonald
2022-02-14 12:02 ` Paul Cercueil
2022-02-24 13:40 ` Thierry Reding
2022-02-24 15:25 ` Paul Cercueil
2022-02-11 17:08 ` [PATCH 1/2] dt-bindings: timer: Add PWM compatible " Rob Herring
2022-02-14 12:00 ` Paul Cercueil
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).