diff mbox series

[14/17] mips: dts: loongson1b: Add PWM timer clocksource

Message ID 20230729134318.1694467-15-keguang.zhang@gmail.com (mailing list archive)
State New
Headers show
Series MIPS: loongson32: Convert all platform devices to DT | expand

Commit Message

Keguang Zhang July 29, 2023, 1:43 p.m. UTC
Add the device node of PWM timer clocksource
for Loongson-1B boards.

Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
---
 arch/mips/boot/dts/loongson/loongson1b.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Krzysztof Kozlowski July 30, 2023, 8:27 a.m. UTC | #1
On 29/07/2023 15:43, Keguang Zhang wrote:
> Add the device node of PWM timer clocksource
> for Loongson-1B boards.

Don't split adding new DTS into many small commits. There is little
point in adding broken/incomplete DTS and immediately fix it. Just add
complete one. We do the same for each drivers and DTS is not different here.

It would be entirely different if you followed 'release early, release
often' approach, so release pieces as fast as you have them ready. You
decided to ignore that rule, so no, you don't get 20 commits fixing DTS
you added in first commit of the same patchset.



Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/mips/boot/dts/loongson/loongson1b.dtsi b/arch/mips/boot/dts/loongson/loongson1b.dtsi
index d7f5cebae0a9..624eb179b6f5 100644
--- a/arch/mips/boot/dts/loongson/loongson1b.dtsi
+++ b/arch/mips/boot/dts/loongson/loongson1b.dtsi
@@ -79,6 +79,16 @@  clkc: clock-controller@1fe78030 {
 		clocks = <&xtal>;
 		#clock-cells = <1>;
 	};
+
+	clocksource: timer@1fe5c030 {
+		compatible = "loongson,ls1b-pwmtimer";
+		reg = <0x1fe5c030 0x10>;
+
+		clocks = <&clkc LS1X_CLKID_APB>;
+
+		interrupt-parent = <&intc0>;
+		interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
+	};
 };
 
 &ahb {