]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: dts: sophgo: Add spi nor flash controller node
authorKongyang Liu <seashell11234455@gmail.com>
Sat, 20 Apr 2024 07:08:24 +0000 (15:08 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 1 May 2024 16:01:18 +0000 (00:01 +0800)
Add spi nor flash controller node for cv18xx SoCs

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/dts/cv1800b-milkv-duo.dts
arch/riscv/dts/cv18xx.dtsi

index f6ae8828f37a7eee194c62b59fa70b609dc1c11a..e7cc0e8bd147383b20b030612bb0f6252183ba55 100644 (file)
        no-sdio;
 };
 
+&spif {
+       status = "okay";
+
+       spiflash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <75000000>;
+               spi-tx-bus-width = <4>;
+               spi-rx-bus-width = <4>;
+               m25p,fast-read;
+       };
+};
+
 &uart0 {
        status = "okay";
 };
index 5e83ee18539c3b60e4b787e16314668179f3ebf0..4b0143450e863878c3efd13a6696900cd211e12a 100644 (file)
                #clock-cells = <0x0>;
        };
 
+       spif_clk: spi-flash-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <300000000>;
+               clock-output-names = "spif_clk";
+               #clock-cells = <0>;
+       };
+
        soc {
                compatible = "simple-bus";
                interrupt-parent = <&plic>;
                        status = "disabled";
                };
 
+               spif: spi-nor@10000000 {
+                       compatible = "sophgo,cv1800b-spif";
+                       reg = <0x10000000 0x10000000>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       clocks = <&spif_clk>;
+                       interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
+               };
+
                plic: interrupt-controller@70000000 {
                        reg = <0x70000000 0x4000000>;
                        interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;