arm: dts: aspeed: Update SPI flash node settings
authorChin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Fri, 19 Aug 2022 09:01:07 +0000 (17:01 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 13 Sep 2022 16:08:40 +0000 (12:08 -0400)
For both AST2500 and AST2600, there are three
SPI controllers, FMC(Firmware Memory Controller),
SPI1 and SPI2. The clock source is HCLK. Following
is the basic information for ASPEED SPI controller.

AST2500:
  - FMC:
      CS number: 3
      controller reg: 0x1e620000 - 0x1e62ffff
      decoded address: 0x20000000 - 0x2fffffff

  - SPI1:
      CS number: 2
      controller reg: 0x1e630000 - 0x1e630fff
      decoded address: 0x30000000 - 0x37ffffff

  - SPI2:
      CS number: 2
      controller reg: 0x1e631000 - 0x1e631fff
      decoded address: 0x38000000 - 0x3fffffff

AST2600:
  - FMC:
      CS number: 3
      controller reg: 0x1e620000 - 0x1e62ffff
      decoded address: 0x20000000 - 0x2fffffff

  - SPI1:
      CS number: 2
      controller reg: 0x1e630000 - 0x1e630fff
      decoded address: 0x30000000 - 0x3fffffff

  - SPI2:
      CS number: 3
      controller reg: 0x1e631000 - 0x1e631fff
      decoded address: 0x50000000 - 0x5fffffff

Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
arch/arm/dts/ast2500-evb.dts
arch/arm/dts/ast2500.dtsi
arch/arm/dts/ast2600-evb.dts
arch/arm/dts/ast2600.dtsi

index cc57776..1fbacf9 100644 (file)
        pinctrl-0 = <&pinctrl_sd2_default>;
 };
 
+&fmc {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_fwspics1_default>;
+
+       flash@0 {
+               status = "okay";
+               spi-max-frequency = <50000000>;
+               spi-tx-bus-width = <2>;
+               spi-rx-bus-width = <2>;
+       };
+
+       flash@1 {
+               status = "okay";
+               spi-max-frequency = <50000000>;
+               spi-tx-bus-width = <2>;
+               spi-rx-bus-width = <2>;
+       };
+};
+
+&spi1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_spi1cs1_default>;
+
+       flash@0 {
+               status = "okay";
+               spi-max-frequency = <50000000>;
+               spi-tx-bus-width = <2>;
+               spi-rx-bus-width = <2>;
+       };
+};
+
 &i2c3 {
         status = "okay";
 
index cea08e6..320d2e5 100644 (file)
                ranges;
 
                fmc: flash-controller@1e620000 {
-                       reg = < 0x1e620000 0xc4
-                               0x20000000 0x10000000 >;
+                       reg = <0x1e620000 0xc4>, <0x20000000 0x10000000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2500-fmc";
+                       clocks = <&scu ASPEED_CLK_AHB>;
+                       num-cs = <3>;
                        status = "disabled";
-                       interrupts = <19>;
+
                        flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@1 {
                                reg = < 1 >;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@2 {
                                reg = < 2 >;
                                compatible = "jedec,spi-nor";
                };
 
                spi1: flash-controller@1e630000 {
-                       reg = < 0x1e630000 0xc4
-                               0x30000000 0x08000000 >;
+                       reg = <0x1e630000 0xc4>, <0x30000000 0x08000000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2500-spi";
+                       clocks = <&scu ASPEED_CLK_AHB>;
+                       num-cs = <2>;
                        status = "disabled";
+
                        flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@1 {
                                reg = < 1 >;
                                compatible = "jedec,spi-nor";
                };
 
                spi2: flash-controller@1e631000 {
-                       reg = < 0x1e631000 0xc4
-                               0x38000000 0x08000000 >;
+                       reg = <0x1e631000 0xc4>, <0x38000000 0x08000000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2500-spi";
+                       clocks = <&scu ASPEED_CLK_AHB>;
+                       num-cs = <2>;
                        status = "disabled";
+
                        flash@0 {
                                reg = < 0 >;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@1 {
                                reg = < 1 >;
                                compatible = "jedec,spi-nor";
index a9bba96..a097f32 100644 (file)
 
 &fmc {
        status = "okay";
-
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fmcquad_default>;
 
        flash@0 {
-               compatible = "spi-flash", "sst,w25q256";
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <4>;
@@ -85,7 +83,6 @@
        };
 
        flash@1 {
-               compatible = "spi-flash", "sst,w25q256";
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <4>;
@@ -93,7 +90,6 @@
        };
 
        flash@2 {
-               compatible = "spi-flash", "sst,w25q256";
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <4>;
 
 &spi1 {
        status = "okay";
-
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1abr_default
                        &pinctrl_spi1cs1_default &pinctrl_spi1wp_default
                        &pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
        flash@0 {
-               compatible = "spi-flash", "sst,w25q256";
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <4>;
 
 &spi2 {
        status = "okay";
-
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spi2_default &pinctrl_spi2cs1_default
                        &pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
        flash@0 {
-               compatible = "spi-flash", "sst,w25q256";
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <4>;
index ac8cd4d..8d91eed 100644 (file)
                };
 
                fmc: flash-controller@1e620000 {
-                       reg = < 0x1e620000 0xc4
-                               0x20000000 0x10000000 >;
+                       reg = <0x1e620000 0xc4>, <0x20000000 0x10000000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2600-fmc";
                        status = "disabled";
-                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&scu ASPEED_CLK_AHB>;
                        num-cs = <3>;
+
                        flash@0 {
-                               reg = < 0 >;
+                               reg = <0>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@1 {
-                               reg = < 1 >;
+                               reg = <1>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@2 {
-                               reg = < 2 >;
+                               reg = <2>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
                };
 
                spi1: flash-controller@1e630000 {
-                       reg = < 0x1e630000 0xc4
-                               0x30000000 0x08000000 >;
+                       reg = <0x1e630000 0xc4>, <0x30000000 0x10000000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2600-spi";
                        clocks = <&scu ASPEED_CLK_AHB>;
                        num-cs = <2>;
                        status = "disabled";
+
                        flash@0 {
-                               reg = < 0 >;
+                               reg = <0>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@1 {
-                               reg = < 1 >;
+                               reg = <1>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
                };
 
                spi2: flash-controller@1e631000 {
-                       reg = < 0x1e631000 0xc4
-                               0x50000000 0x08000000 >;
+                       reg = <0x1e631000 0xc4>, <0x50000000 0x10000000>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "aspeed,ast2600-spi";
                        clocks = <&scu ASPEED_CLK_AHB>;
                        num-cs = <3>;
                        status = "disabled";
+
                        flash@0 {
-                               reg = < 0 >;
+                               reg = <0>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@1 {
-                               reg = < 1 >;
+                               reg = <1>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };
+
                        flash@2 {
-                               reg = < 2 >;
+                               reg = <2>;
                                compatible = "jedec,spi-nor";
                                status = "disabled";
                        };