stock OpenWRT
[ 0.700000] m25p80 spi32766.0: w25q256 (32768 Kbytes)
[ 0.700000] 4 ofpart partitions found on MTD device spi32766.0
[ 0.710000] Creating 4 MTD partitions on "spi32766.0":
[ 0.710000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.720000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.730000] 0x000000040000-0x000000050000 : "factory"
[ 0.740000] 0x000000050000-0x000002000000 : "firmware"
[ 0.740000] 0x0000001655a1-0x000002000000 : "rootfs"
[ 0.750000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.760000] mtd: device 4 (rootfs) set to be root filesystem
[ 0.770000] mtd: partition "rootfs_data" created automatically, ofs=0x690000, len=0x1970000
[ 0.780000] 0x000000690000-0x000002000000 : "rootfs_data"
df -h after mount_root
Filesystem Size Used Available Use% Mounted on
rootfs 25.4M 748.0K 24.7M 3% /
/dev/root 5.3M 5.3M 0 100% /rom
tmpfs 61.8M 244.0K 61.5M 0% /tmp
/dev/mtdblock5 25.4M 748.0K 24.7M 3% /overlay
overlayfs:/overlay 25.4M 748.0K 24.7M 3% /
tmpfs 512.0K 0 512.0K 0% /dev
my image after changing .dts
[ 0.824772] spi spi0.0: force spi mode3
[ 0.829291] m25p80 spi0.0: w25q256 (32768 Kbytes)
[ 0.834130] 4 ofpart partitions found on MTD device spi0.0
[ 0.839765] Creating 4 MTD partitions on "spi0.0":
[ 0.844668] 0x000000000000-0x000000030000 : "u-boot"
[ 0.851518] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.858842] 0x000000040000-0x000000050000 : "factory"
[ 0.865836] 0x000000050000-0x000001000000 : "firmware"
[ 0.957243] 2 uimage-fw partitions found on MTD device firmware
[ 0.963328] 0x000000050000-0x00000019f7fd : "kernel"
[ 0.970073] 0x00000019f7fd-0x000001000000 : "rootfs"
[ 0.976978] mtd: device 5 (rootfs) set to be root filesystem
[ 0.982968] 1 squashfs-split partitions found on MTD device rootfs
[ 0.989299] 0x000000810000-0x000001000000 : "rootfs_data"
df -h after mount_root
/dev/root 6656 6656 0 100% /rom
tmpfs 62824 56 62768 0% /tmp
tmpfs 62824 80 62744 0% /tmp/root
tmpfs 512 0 512 0% /dev
/dev/mtdblock6 8128 368 7760 5% /overlay
overlayfs:/overlay 8128 368 7760 5% /
original (china) received from manufacturer
/dts-v1/;
/include/ "mt7620a.dtsi"
/ {
compatible = "ralink,we826", "ralink,mt7620a-soc";
model = "OpenWrt";
palmbus@10000000 {
sysc@0 {
ralink,gpiomux = "i2c", "jtag";
ralink,uartmux = "gpio";
ralink,wdtmux = <1>;
};
gpio0: gpio@600 {
status = "okay";
};
gpio1: gpio@638 {
status = "okay";
};
gpio3: gpio@688 {
status = "okay";
};
spi@b00 {
status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "w25q256";
reg = <0 0>;
linux,modalias = "m25p80", "w25q256";
spi-max-frequency = <10000000>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
ethernet@10100000 {
mtd-mac-address = <&factory 0x4>;
ralink,port-map = "llllw";
};
pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group ="i2c", "uartf", "wled", "spi refclk";
ralink,function = "gpio";
};
pa {
ralink,group = "pa";
ralink,function = "pa";
};
};
};
ehci@101c0000 {
status = "okay";
};
ohci@101c1000 {
status = "okay";
};
sdhci@10130000 {
status = "okay";
};
pcie@10140000 {
status = "okay";
};
gpio-leds {
compatible = "gpio-leds";
sys {
label = "we826:sys";
gpios = <&gpio1 14 1>;
};
wlan {
label = "we826:wlan";
gpios = <&gpio3 0 1>;
};
wps {
label = "we826:wps";
gpios = <&gpio1 15 0>;
};
};
gpio-keys-polled {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
reset {
label = "reset";
gpios = <&gpio0 13 0>;
linux,code = <0x101>;
};
};
};
changes between original .dts from OpenWRT defconfig and my .dts changed after received .dts from manufacturer
29c29
< m25p80@0 {
---
> en25q128@0 {
32c32
< compatible = "w25q256";
---
> compatible = "w25q128";
34c34
< linux,modalias = "m25p80", "w25q256";
---
> linux,modalias = "m25p80";
97c97
< gpios = <&gpio1 14 1>;
---
> gpios = <&gpio1 14 0>;
116,117c116,117
< gpios = <&gpio0 13 0>;
< linux,code = <0x101>;
---
> gpios = <&gpio0 1 1>;
> linux,code = <0x198>;