aboutsummaryrefslogtreecommitdiff
path: root/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch')
-rw-r--r--target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch134
1 files changed, 134 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch b/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
new file mode 100644
index 0000000000..280fc5957e
--- /dev/null
+++ b/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
@@ -0,0 +1,134 @@
+--- a/arch/arm/boot/dts/armada-370-synology-ds213j.dts
++++ b/arch/arm/boot/dts/armada-370-synology-ds213j.dts
+@@ -31,6 +31,7 @@
+
+ chosen {
+ stdout-path = "serial0:115200n8";
++ append-rootblock = "nullparameter="; /* override the bootloader args */
+ };
+
+ memory@0 {
+@@ -94,6 +95,8 @@
+ status = "okay";
+ phy = <&phy1>;
+ phy-mode = "sgmii";
++ nvmem-cells = <&macaddr_vendor_0>;
++ nvmem-cell-names = "mac-address";
+ };
+
+ sata@a0000 {
+@@ -175,6 +178,24 @@
+ gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+ };
+ };
++
++ virtual_flash {
++ compatible = "mtd-concat";
++
++ devices = <&mtd_kernel &mtd_gap &mtd_gap2>;
++
++ partitions {
++ compatible = "fixed-partitions";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ partition@0 {
++ compatible = "openwrt,uimage", "denx,uimage";
++ label = "firmware";
++ reg = <0x0 0x0>;
++ };
++ };
++ };
+ };
+
+ &mdio {
+@@ -265,48 +286,52 @@
+ reg = <0>; /* Chip select 0 */
+ spi-max-frequency = <20000000>;
+
+- /*
+- * Warning!
+- *
+- * Synology u-boot uses its compiled-in environment
+- * and it seems Synology did not care to change u-boot
+- * default configuration in order to allow saving a
+- * modified environment at a sensible location. So,
+- * if you do a 'saveenv' under u-boot, your modified
+- * environment will be saved at 1MB after the start
+- * of the flash, i.e. in the middle of the uImage.
+- * For that reason, it is strongly advised not to
+- * change the default environment, unless you know
+- * what you are doing.
+- */
+- partition@0 { /* u-boot */
+- label = "RedBoot";
+- reg = <0x00000000 0x000c0000>; /* 768KB */
+- };
++ partitions {
++ compatible = "fixed-partitions";
+
+- partition@c0000 { /* uImage */
+- label = "zImage";
+- reg = <0x000c0000 0x002d0000>; /* 2880KB */
+- };
++ partition@0 { /* u-boot */
++ label = "u-boot";
++ reg = <0x00000000 0x000c0000>; /* 768KB */
++ read-only;
++ };
+
+- partition@390000 { /* uInitramfs */
+- label = "rd.gz";
+- reg = <0x00390000 0x00440000>; /* 4250KB */
+- };
++ mtd_gap: partition@c0000 { /* gap */
++ label = "gap";
++ reg = <0x000c0000 0x00040000>; /* 256KB */
++ };
+
+- partition@7d0000 { /* MAC address and serial number */
+- label = "vendor";
+- reg = <0x007d0000 0x00010000>; /* 64KB */
+- };
++ partition@100000 { /* u-boot-env */
++ label = "u-boot-env";
++ reg = <0x00100000 0x00010000>; /* 64KB */
++ };
+
+- partition@7e0000 {
+- label = "RedBoot config";
+- reg = <0x007e0000 0x00010000>; /* 64KB */
+- };
++ mtd_kernel: partition@110000 {
++ label = "kernel";
++ reg = <0x00110000 0x006c0000>; /* 6912KB */
++ };
+
+- partition@7f0000 {
+- label = "FIS directory";
+- reg = <0x007f0000 0x00010000>; /* 64KB */
++ partition@7d0000 { /* MAC address and serial number */
++ reg = <0x007d0000 0x00010000>; /* 64KB */
++ label = "vendor";
++ read-only;
++
++ compatible = "nvmem-cells";
++
++ nvmem-layout {
++ compatible = "fixed-layout";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ macaddr_vendor_0: macaddr@0 {
++ reg = <0x0 0x6>;
++ };
++ };
++ };
++
++ mtd_gap2: partition@7e0000 {
++ label = "gap2";
++ reg = <0x007e0000 0x00020000>; /* 128KB */
++ };
+ };
+ };
+ };