These devices only have one SPI peripheral. And the chip select pin is
directly controlled by the SPI host hardware. Hence we don't need to
assign empty GPIO phandle for them. This patch also adjust the reg
address of the SPI peripheral node to follow the cs-gpios changes.
Signed-off-by: Shiji Yang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19845
Signed-off-by: Hauke Mehrtens <[email protected]>
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
- cs-gpios = <0>, <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
- spi_nand: spi_nand@1 {
+ spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
- reg = <1>;
+ reg = <0>;
spi-max-frequency = <52000000>;
spi-cal-enable;
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
- cs-gpios = <0>, <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
- cs-gpios = <0>, <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
- flash@1 {
+ flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
- reg = <1>;
+ reg = <0>;
spi-max-frequency = <52000000>;
spi-cal-enable;
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi_flash_pins>;
- cs-gpios = <0>, <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
- spi_nand: spi_nand@1 {
+ spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
- reg = <1>;
+ reg = <0>;
spi-max-frequency = <52000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi_flash_pins>;
- cs-gpios = <0>, <0>;
status = "okay";
flash@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <20000000>;
- };
-
- flash@1 {
compatible = "spi-nand";
- reg = <1>;
+ reg = <0>;
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
- cs-gpios = <0>, <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi_flash_pins>;
- cs-gpios = <0>, <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";