]> www.infradead.org Git - users/willy/xarray.git/commitdiff
riscv: dts: spacemit: Acquire clocks for UART
authorYixun Lan <dlan@gentoo.org>
Thu, 24 Apr 2025 07:48:09 +0000 (15:48 +0800)
committerYixun Lan <dlan@gentoo.org>
Wed, 14 May 2025 03:43:51 +0000 (11:43 +0800)
The K1 SoC features two clocks for UART controller, Acquire them
explicitly in the driver. Also it is required to remove the
clock-frequency properties from the uart node, otherwise the new
clock properties are ignored by of_platform_serial_setup() in "8250_of.c".

Reviewed-by: Alex Elder <elder@riscstar.com>
Reviewed-by: Haylen Chu <heylenay@4d2.org>
Link: https://lore.kernel.org/r/20250424-05-dts-clock-v2-2-17d83a705c4c@gentoo.org
Signed-off-by: Yixun Lan <dlan@gentoo.org>
arch/riscv/boot/dts/spacemit/k1.dtsi

index 6f3d100781f5b38839591e6fd5e1b17d4aedfcb2..2c7aa9b37fee27afe839346b45983fc5070031cf 100644 (file)
                uart0: serial@d4017000 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017000 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART0>,
+                                <&syscon_apbc CLK_UART0_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <42>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart2: serial@d4017100 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017100 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART2>,
+                                <&syscon_apbc CLK_UART2_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <44>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart3: serial@d4017200 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017200 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART3>,
+                                <&syscon_apbc CLK_UART3_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <45>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart4: serial@d4017300 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017300 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART4>,
+                                <&syscon_apbc CLK_UART4_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <46>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart5: serial@d4017400 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017400 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART5>,
+                                <&syscon_apbc CLK_UART5_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <47>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart6: serial@d4017500 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017500 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART6>,
+                                <&syscon_apbc CLK_UART6_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <48>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart7: serial@d4017600 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017600 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART7>,
+                                <&syscon_apbc CLK_UART7_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <49>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart8: serial@d4017700 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017700 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART8>,
+                                <&syscon_apbc CLK_UART8_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <50>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";
                uart9: serial@d4017800 {
                        compatible = "spacemit,k1-uart", "intel,xscale-uart";
                        reg = <0x0 0xd4017800 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_UART9>,
+                                <&syscon_apbc CLK_UART9_BUS>;
+                       clock-names = "core", "bus";
                        interrupts = <51>;
-                       clock-frequency = <14857000>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        status = "disabled";