]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
k210: dts: add missing power bus clocks
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 1 Mar 2022 10:35:40 +0000 (10:35 +0000)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 15 Mar 2022 09:43:11 +0000 (17:43 +0800)
Linux drivers for many of the K210 peripherals depend on the power bus
clock to be specified. Add the missing clocks and their names to avoid
problems when booting Linux using u-boot DT.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
arch/riscv/dts/k210.dtsi

index 7dc2785a3e10fc4fd858ae1c89044f40ce074838..5c88c8ea8ea2cfcb2afd13ff8ea05a6e0f3cb1d4 100644 (file)
                                compatible = "canaan,k210-gpio",
                                             "snps,dw-apb-gpio";
                                reg = <0x50200000 0x80>;
-                               clocks = <&sysclk K210_CLK_GPIO>;
+                               clocks = <&sysclk K210_CLK_APB0>,
+                                        <&sysclk K210_CLK_GPIO>;
+                               clock-names = "bus", "db";
                                resets = <&sysrst K210_RST_GPIO>;
                                status = "disabled";
 
                                             "snps,dw-apb-uart";
                                reg = <0x50210000 0x100>;
                                interrupts = <11>;
-                               clocks = <&sysclk K210_CLK_UART1>;
+                               clocks = <&sysclk K210_CLK_UART1>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "baudclk", "apb_pclk";
                                resets = <&sysrst K210_RST_UART1>;
                                reg-io-width = <4>;
                                reg-shift = <2>;
                                             "snps,dw-apb-uart";
                                reg = <0x50220000 0x100>;
                                interrupts = <12>;
-                               clocks = <&sysclk K210_CLK_UART2>;
+                               clocks = <&sysclk K210_CLK_UART2>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "baudclk", "apb_pclk";
                                resets = <&sysrst K210_RST_UART2>;
                                reg-io-width = <4>;
                                reg-shift = <2>;
                                             "snps,dw-apb-uart";
                                reg = <0x50230000 0x100>;
                                interrupts = <13>;
-                               clocks = <&sysclk K210_CLK_UART3>;
+                               clocks = <&sysclk K210_CLK_UART3>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "baudclk", "apb_pclk";
                                resets = <&sysrst K210_RST_UART3>;
                                reg-io-width = <4>;
                                reg-shift = <2>;
                                spi-slave;
                                reg = <0x50240000 0x100>;
                                interrupts = <2>;
-                               clocks = <&sysclk K210_CLK_SPI2>;
+                               clocks = <&sysclk K210_CLK_SPI2>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI2>;
                                spi-max-frequency = <25000000>;
                                status = "disabled";
                                             "snps,designware-i2c";
                                reg = <0x50280000 0x100>;
                                interrupts = <8>;
-                               clocks = <&sysclk K210_CLK_I2C0>;
+                               clocks = <&sysclk K210_CLK_I2C0>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "ref", "pclk";
                                resets = <&sysrst K210_RST_I2C0>;
                                status = "disabled";
                        };
                                             "snps,designware-i2c";
                                reg = <0x50290000 0x100>;
                                interrupts = <9>;
-                               clocks = <&sysclk K210_CLK_I2C1>;
+                               clocks = <&sysclk K210_CLK_I2C1>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "ref", "pclk";
                                resets = <&sysrst K210_RST_I2C1>;
                                status = "disabled";
                        };
                                             "snps,designware-i2c";
                                reg = <0x502A0000 0x100>;
                                interrupts = <10>;
-                               clocks = <&sysclk K210_CLK_I2C2>;
+                               clocks = <&sysclk K210_CLK_I2C2>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "ref", "pclk";
                                resets = <&sysrst K210_RST_I2C2>;
                                status = "disabled";
                        };
                        fpioa: pinmux@502B0000 {
                                compatible = "canaan,k210-fpioa";
                                reg = <0x502B0000 0x100>;
-                               clocks = <&sysclk K210_CLK_FPIOA>;
+                               clocks = <&sysclk K210_CLK_FPIOA>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "ref", "pclk";
                                resets = <&sysrst K210_RST_FPIOA>;
                                canaan,k210-sysctl = <&sysctl>;
                                canaan,k210-power-offset = <K210_SYSCTL_POWER_SEL>;
                                             "snps,dw-apb-timer";
                                reg = <0x502D0000 0x100>;
                                interrupts = <14 15>;
-                               clocks = <&sysclk K210_CLK_TIMER0>;
-                               clock-names = "timer";
+                               clocks = <&sysclk K210_CLK_TIMER0>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "timer", "pclk";
                                resets = <&sysrst K210_RST_TIMER0>;
                                status = "disabled";
                        };
                                             "snps,dw-apb-timer";
                                reg = <0x502E0000 0x100>;
                                interrupts = <16 17>;
-                               clocks = <&sysclk K210_CLK_TIMER1>;
-                               clock-names = "timer";
+                               clocks = <&sysclk K210_CLK_TIMER1>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "timer", "pclk";
                                resets = <&sysrst K210_RST_TIMER1>;
                                status = "disabled";
                        };
                                             "snps,dw-apb-timer";
                                reg = <0x502F0000 0x100>;
                                interrupts = <18 19>;
-                               clocks = <&sysclk K210_CLK_TIMER2>;
-                               clock-names = "timer";
+                               clocks = <&sysclk K210_CLK_TIMER2>,
+                                        <&sysclk K210_CLK_APB0>;
+                               clock-names = "timer", "pclk";
                                resets = <&sysrst K210_RST_TIMER2>;
                                status = "disabled";
                        };
                                compatible = "canaan,k210-wdt", "snps,dw-wdt";
                                reg = <0x50400000 0x100>;
                                interrupts = <21>;
-                               clocks = <&sysclk K210_CLK_WDT0>;
+                               clocks = <&sysclk K210_CLK_WDT0>,
+                                        <&sysclk K210_CLK_APB1>;
+                               clock-names = "tclk", "pclk";
                                resets = <&sysrst K210_RST_WDT0>;
                        };
 
                                compatible = "canaan,k210-wdt", "snps,dw-wdt";
                                reg = <0x50410000 0x100>;
                                interrupts = <22>;
-                               clocks = <&sysclk K210_CLK_WDT1>;
+                               clocks = <&sysclk K210_CLK_WDT1>,
+                                        <&sysclk K210_CLK_APB1>;
+                               clock-names = "tclk", "pclk";
                                resets = <&sysrst K210_RST_WDT1>;
                                status = "disabled";
                        };
                                compatible = "canaan,k210-sysctl",
                                             "syscon", "simple-mfd";
                                reg = <0x50440000 0x100>;
+                               clocks = <&sysclk K210_CLK_APB1>;
+                               clock-names = "pclk";
                                reg-io-width = <4>;
                                u-boot,dm-pre-reloc;
 
                                             "snps,dw-apb-ssi";
                                reg = <0x52000000 0x100>;
                                interrupts = <1>;
-                               clocks = <&sysclk K210_CLK_SPI0>;
-                               clock-names = "ssi_clk";
+                               clocks = <&sysclk K210_CLK_SPI0>,
+                                        <&sysclk K210_CLK_APB2>;
+                               clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI0>;
                                spi-max-frequency = <25000000>;
                                num-cs = <4>;
                                             "snps,dw-apb-ssi";
                                reg = <0x53000000 0x100>;
                                interrupts = <2>;
-                               clocks = <&sysclk K210_CLK_SPI1>;
-                               clock-names = "ssi_clk";
+                               clocks = <&sysclk K210_CLK_SPI1>,
+                                        <&sysclk K210_CLK_APB2>;
+                               clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI1>;
                                spi-max-frequency = <25000000>;
                                num-cs = <4>;
                                             "snps,dwc-ssi-1.01a";
                                reg = <0x54000000 0x200>;
                                interrupts = <4>;
-                               clocks = <&sysclk K210_CLK_SPI3>;
-                               clock-names = "ssi_clk";
+                               clocks = <&sysclk K210_CLK_SPI3>,
+                                        <&sysclk K210_CLK_APB2>;
+                               clock-names = "ssi_clk", "pclk";
                                resets = <&sysrst K210_RST_SPI3>;
                                /* Could possibly go up to 200 MHz */
                                spi-max-frequency = <100000000>;