#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "an7581.dtsi"
+#include "an758x-nokia_xg-040g-common.dtsi"
/ {
- aliases {
- label-mac-device = &gdm1;
-
- led-boot = &led_power_green;
- led-failsafe = &led_power_green;
- led-running = &led_power_green;
- led-upgrade = &led_power_green;
-
- serial0 = &uart1;
- };
-
- chosen {
- bootargs = "console=ttyS0,115200 earlycon";
- stdout-path = "serial0:115200n8";
- linux,usable-memory-range =
- <0x0 0x80200000 0x0 0x1fe00000>;
- };
-
gpio-keys {
compatible = "gpio-keys";
};
};
- memory@80000000 {
- device_type = "memory";
- reg = <0x0 0x80000000 0x0 0x20000000>;
- };
-
reg_3p3v: regulator-3p3v {
compatible = "regulator-fixed";
regulator-always-on;
};
};
-ð {
- status = "okay";
-};
-
-ð_pcs {
- status = "okay";
-};
-
-&i2c0 {
- status = "okay";
-};
-
&mdio {
/* Airoha EN8811 2.5Gbps phy */
en8811: ethernet-phy@f {
};
};
-&npu {
- status = "okay";
-};
-
-&pon_pcs {
- status = "okay";
-};
-
-&snfi {
- status = "okay";
-};
-
-/*
- * SkyHigh ML02G300WHI00
- */
-&spi_nand {
- /*
- * ECC must be aligned with bootloader to prevent read errors.
- * Stock fw also uses NAND_ECC_NONE.
- */
- nand-ecc-mode = "none";
- nand-ecc-step-size = <2048>;
- nand-ecc-strength = <0>;
-
- partitions: partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- };
-};
-
-&gdm1 {
- status = "okay";
-
- nvmem-cell-names = "mac-address";
- nvmem-cells = <&macaddr_factory_3e (0)>;
-};
-
&switch {
status = "okay";
// SPDX-License-Identifier: GPL-2.0-only OR MIT
#include "an7581-nokia_xg-040g-md-common.dtsi"
+#include "an758x-nokia_xg-040g-ubi-parts.dtsi"
/ {
model = "Nokia XG-040G-MD (UBI)";
compatible = "nokia,xg-040g-md-ubi", "airoha,an7581",
"airoha,en7581";
-
- chosen {
- rootdisk = <&ubi_fit>;
- };
-};
-
-&partitions {
- partition@0_all {
- label = "all_flash";
- reg = <0x0 0x10000000>;
- read-only;
- };
-
- partition@0 {
- label = "bl2";
- reg = <0x0 0x20000>;
- read-only;
- };
-
- partition@20000 {
- label = "ubi";
- reg = <0x20000 0xffe0000>;
- compatible = "linux,ubi";
-
- volumes {
- ubi-volume-bosa {
- volname = "bosa";
- };
-
- ubi-volume-factory {
- volname = "ri";
-
- nvmem-layout {
- compatible = "fixed-layout";
-
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_factory_3e: macaddr@3e {
- compatible = "mac-base";
- reg = <0x3e 0x6>;
- #nvmem-cell-cells = <1>;
- };
- };
- };
-
- ubi_fit: ubi-volume-fit {
- volname = "fit";
- };
-
- ubi-volume-fip {
- volname = "fip";
- };
-
- ubi_env: ubi-volume-ubootenv {
- volname = "ubootenv";
- };
-
- ubi_env2: ubi-volume-ubootenv2 {
- volname = "ubootenv2";
- };
- };
- };
-};
-
-&ubi_env {
- nvmem-layout {
- compatible = "u-boot,env-redundant-bool-layout";
- };
-};
-
-&ubi_env2 {
- nvmem-layout {
- compatible = "u-boot,env-redundant-bool-layout";
- };
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
#include "an7581-nokia_xg-040g-md-common.dtsi"
+#include "an758x-nokia_xg-040g-stock-parts.dtsi"
/ {
model = "Nokia XG-040G-MD";
compatible = "nokia,xg-040g-md", "airoha,an7581", "airoha,en7581";
-
- virtual_flash {
- compatible = "mtd-concat";
- devices = <&ubi4 &ubi1 &ubi2 &ubi3 &ubi5 &ubi6>;
-
- partitions {
- compatible = "fixed-partitions";
-
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- label = "ubi";
- reg = <0x0 0x0>;
- };
- };
- };
-};
-
-&partitions {
- partition@0_all {
- label = "all_flash";
- reg = <0x0 0xeba0000>;
- read-only;
- };
-
- partition@0 {
- label = "bootloader";
- reg = <0x0 0x80000>;
- read-only;
- };
-
- partition@60000 {
- label = "u-boot-env";
- reg = <0x60000 0x20000>;
- };
-
- partition@80000 {
- label = "romfile";
- reg = <0x80000 0x40000>;
- read-only;
- };
-
- partition@c0000 {
- label = "nsb_1";
- reg = <0xc0000 0x2880000>;
-
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- label = "kernel";
- reg = <0x0 0x800000>;
- };
-
- ubi1: partition@800000 {
- label = "rootfs_1";
- reg = <0x800000 0x2080000>;
- };
- };
-
- ubi2: partition@2940000 {
- label = "nsb_2";
- reg = <0x2940000 0x2880000>;
- };
-
- partition@51c0000 {
- label = "bosa";
- reg = <0x51c0000 0x40000>;
- read-only;
- };
-
- partition@5200000 {
- label = "ri";
- reg = <0x5200000 0x40000>;
- read-only;
-
- nvmem-layout {
- compatible = "fixed-layout";
-
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_factory_3e: macaddr@3e {
- compatible = "mac-base";
- reg = <0x3e 0x6>;
- #nvmem-cell-cells = <1>;
- };
- };
- };
-
- partition@5240000 {
- label = "flag";
- reg = <0x5240000 0x40000>;
- read-only;
- };
-
- partition@5280000 {
- label = "flagback";
- reg = <0x5280000 0x40000>;
- read-only;
- };
-
- ubi3: partition@52c0000 {
- label = "config";
- reg = <0x52c0000 0xa00000>;
- };
-
- ubi4: partition@5cc0000 {
- label = "data";
- reg = <0x5cc0000 0x80e0000>;
- };
-
- ubi5: partition@dda0000 {
- label = "oopsfs";
- reg = <0xdda0000 0x400000>;
- };
-
- partition@e1a0000 {
- label = "log";
- reg = <0xe1a0000 0xa00000>;
-
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- ubi6: partition@0 {
- label = "log_truncated";
- reg = <0x0 0x9c0000>;
- };
-
- /*
- * Must be excluded from ubi. Otherwise the data
- * will be broken after U-Boot 'bootflag swap'
- * command call. This command writes bootflag at
- * 0xeb60000 (boot_flag_addr).
- */
- partition@9c0000 {
- label = "bootflag";
- reg = <0x9c0000 0x40000>;
- read-only;
- };
- };
};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+/ {
+ aliases {
+ label-mac-device = &gdm1;
+
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+
+ serial0 = &uart1;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200 earlycon";
+ stdout-path = "serial0:115200n8";
+ linux,usable-memory-range =
+ <0x0 0x80200000 0x0 0x1fe00000>;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x0 0x80000000 0x0 0x20000000>;
+ };
+};
+
+ð {
+ status = "okay";
+};
+
+ð_pcs {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+};
+
+&npu {
+ status = "okay";
+};
+
+&pon_pcs {
+ status = "okay";
+};
+
+&snfi {
+ status = "okay";
+};
+
+&spi_nand {
+ /*
+ * ECC must be aligned with bootloader to prevent read errors.
+ * Stock fw also uses NAND_ECC_NONE.
+ */
+ nand-ecc-mode = "none";
+ nand-ecc-step-size = <2048>;
+ nand-ecc-strength = <0>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+};
+
+&gdm1 {
+ status = "okay";
+
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_factory_3e (0)>;
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+/ {
+ virtual_flash {
+ compatible = "mtd-concat";
+ devices = <&ubi4 &ubi1 &ubi2 &ubi3 &ubi5 &ubi6>;
+
+ partitions {
+ compatible = "fixed-partitions";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "ubi";
+ reg = <0x0 0x0>;
+ };
+ };
+ };
+};
+
+&partitions {
+ partition@0_all {
+ label = "all_flash";
+ reg = <0x0 0xeba0000>;
+ read-only;
+ };
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "u-boot-env";
+ reg = <0x60000 0x20000>;
+ };
+
+ partition@80000 {
+ label = "romfile";
+ reg = <0x80000 0x40000>;
+ read-only;
+ };
+
+ partition@c0000 {
+ label = "nsb_1";
+ reg = <0xc0000 0x2880000>;
+
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "kernel";
+ reg = <0x0 0x800000>;
+ };
+
+ ubi1: partition@800000 {
+ label = "rootfs_1";
+ reg = <0x800000 0x2080000>;
+ };
+ };
+
+ ubi2: partition@2940000 {
+ label = "nsb_2";
+ reg = <0x2940000 0x2880000>;
+ };
+
+ partition@51c0000 {
+ label = "bosa";
+ reg = <0x51c0000 0x40000>;
+ read-only;
+ };
+
+ partition@5200000 {
+ label = "ri";
+ reg = <0x5200000 0x40000>;
+ read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_3e: macaddr@3e {
+ compatible = "mac-base";
+ reg = <0x3e 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+
+ partition@5240000 {
+ label = "flag";
+ reg = <0x5240000 0x40000>;
+ read-only;
+ };
+
+ partition@5280000 {
+ label = "flagback";
+ reg = <0x5280000 0x40000>;
+ read-only;
+ };
+
+ ubi3: partition@52c0000 {
+ label = "config";
+ reg = <0x52c0000 0xa00000>;
+ };
+
+ ubi4: partition@5cc0000 {
+ label = "data";
+ reg = <0x5cc0000 0x80e0000>;
+ };
+
+ ubi5: partition@dda0000 {
+ label = "oopsfs";
+ reg = <0xdda0000 0x400000>;
+ };
+
+ partition@e1a0000 {
+ label = "log";
+ reg = <0xe1a0000 0xa00000>;
+
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ ubi6: partition@0 {
+ label = "log_truncated";
+ reg = <0x0 0x9c0000>;
+ };
+
+ /*
+ * Must be excluded from ubi. Otherwise the data
+ * will be broken after U-Boot 'bootflag swap'
+ * command call. This command writes bootflag at
+ * 0xeb60000 (boot_flag_addr).
+ */
+ partition@9c0000 {
+ label = "bootflag";
+ reg = <0x9c0000 0x40000>;
+ read-only;
+ };
+ };
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+/ {
+ chosen {
+ rootdisk = <&ubi_fit>;
+ };
+};
+
+&partitions {
+ partition@0_all {
+ label = "all_flash";
+ reg = <0x0 0x10000000>;
+ read-only;
+ };
+
+ partition@0 {
+ label = "bl2";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "ubi";
+ reg = <0x20000 0xffe0000>;
+ compatible = "linux,ubi";
+
+ volumes {
+ ubi-volume-bosa {
+ volname = "bosa";
+ };
+
+ ubi-volume-factory {
+ volname = "ri";
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_3e: macaddr@3e {
+ compatible = "mac-base";
+ reg = <0x3e 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+
+ ubi_fit: ubi-volume-fit {
+ volname = "fit";
+ };
+
+ ubi-volume-fip {
+ volname = "fip";
+ };
+
+ ubi_env: ubi-volume-ubootenv {
+ volname = "ubootenv";
+ };
+
+ ubi_env2: ubi-volume-ubootenv2 {
+ volname = "ubootenv2";
+ };
+ };
+ };
+};
+
+&ubi_env {
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool-layout";
+ };
+};
+
+&ubi_env2 {
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool-layout";
+ };
+};