board: sl28: add network variant 1 support
authorMichael Walle <michael@walle.cc>
Thu, 7 Jan 2021 23:08:57 +0000 (00:08 +0100)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 8 Feb 2021 08:31:15 +0000 (14:01 +0530)
This variant has one network port connected via RGMII and doesn't have
any TSN capabilities out-of-the-box. Instead it has all four SerDes
lanes available for customer use.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/arm/dts/Makefile
arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
arch/arm/dts/fsl-ls1028a-kontron-sl28-var1-u-boot.dtsi [new file with mode: 0644]
arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dts [new file with mode: 0644]
board/kontron/sl28/spl.c

index 858b79a..882ea02 100644 (file)
@@ -438,6 +438,7 @@ dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
        fsl-ls1012a-frdm.dtb \
        fsl-ls1012a-frwy.dtb
 dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \
+       fsl-ls1028a-kontron-sl28-var1.dtb \
        fsl-ls1028a-kontron-sl28-var3.dtb \
        fsl-ls1028a-kontron-sl28-var4.dtb \
 
index 84e974e..585753c 100644 (file)
                                };
 
                                fdt-2 {
+                                       description = "fsl-ls1028a-kontron-sl28-var1";
+                                       type = "flat_dt";
+                                       arch = "arm";
+                                       compression = "none";
+
+                                       blob {
+                                               filename = "arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dtb";
+                                       };
+                               };
+
+                               fdt-3 {
                                        description = "fsl-ls1028a-kontron-sl28-var3";
                                        type = "flat_dt";
                                        arch = "arm";
@@ -60,7 +71,7 @@
                                        };
                                };
 
-                               fdt-3 {
+                               fdt-4 {
                                        description = "fsl-ls1028a-kontron-sl28-var4";
                                        type = "flat_dt";
                                        arch = "arm";
                                };
 
                                conf-2 {
-                                       description = "fsl-ls1028a-kontron-sl28-var3";
+                                       description = "fsl-ls1028a-kontron-sl28-var1";
                                        firmware = "uboot";
                                        fdt = "fdt-2";
                                };
 
                                conf-3 {
-                                       description = "fsl-ls1028a-kontron-sl28-var4";
+                                       description = "fsl-ls1028a-kontron-sl28-var3";
                                        firmware = "uboot";
                                        fdt = "fdt-3";
                                };
+
+                               conf-4 {
+                                       description = "fsl-ls1028a-kontron-sl28-var4";
+                                       firmware = "uboot";
+                                       loadables = "uboot";
+                                       fdt = "fdt-4";
+                               };
                        };
                };
        };
                                firmware = "bl31";
                                loadables = "uboot";
                        };
+
+                       conf-4 {
+                               firmware = "bl31";
+                               loadables = "uboot";
+                       };
                };
        };
 };
                        conf-3 {
                                loadables = "uboot", "bl32";
                        };
+
+                       conf-4 {
+                               loadables = "uboot", "bl32";
+                       };
                };
        };
 };
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-var1-u-boot.dtsi b/arch/arm/dts/fsl-ls1028a-kontron-sl28-var1-u-boot.dtsi
new file mode 100644 (file)
index 0000000..98e8939
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
+#include "fsl-ls1028a-kontron-sl28-u-boot.dtsi"
+
+/ {
+       aliases {
+               ethernet0 = &enetc1;
+       };
+};
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dts b/arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dts
new file mode 100644 (file)
index 0000000..fe708bd
--- /dev/null
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Device Tree file for the Kontron SMARC-sAL28 board.
+ *
+ * This is for the network variant 1 which has one ethernet port. It is
+ * different than the base variant, which also has one port, but here the
+ * port is connected via RGMII. This port is not TSN aware.
+ * None of the  four SerDes lanes are used by the module, instead they are
+ * all led out to the carrier for customer use.
+ *
+ * Copyright (C) 2020 Michael Walle <michael@walle.cc>
+ *
+ */
+
+/dts-v1/;
+#include "fsl-ls1028a-kontron-sl28.dts"
+#include <dt-bindings/net/qca-ar803x.h>
+
+/ {
+       model = "Kontron SMARC-sAL28 (4 Lanes)";
+       compatible = "kontron,sl28-var1", "kontron,sl28", "fsl,ls1028a";
+};
+
+&enetc0 {
+       status = "disabled";
+       /delete-property/ phy-handle;
+};
+
+&enetc1 {
+       phy-handle = <&phy0>;
+       phy-mode = "rgmii-id";
+       status = "okay";
+};
+
+/delete-node/ &phy0;
+&mdio0 {
+       phy0: ethernet-phy@4 {
+               reg = <0x4>;
+               eee-broken-1000t;
+               eee-broken-100tx;
+
+               qca,clk-out-frequency = <125000000>;
+               qca,clk-out-strength = <AR803X_STRENGTH_FULL>;
+
+               vddio-supply = <&vddh>;
+
+               vddio: vddio-regulator {
+                       regulator-name = "VDDIO";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               };
+
+               vddh: vddh-regulator {
+                       regulator-name = "VDDH";
+               };
+       };
+};
index fa5829e..92f8342 100644 (file)
@@ -17,6 +17,8 @@ int board_fit_config_name_match(const char *name)
        int variant = sl28_variant();
 
        switch (variant) {
+       case 1:
+               return strcmp(name, "fsl-ls1028a-kontron-sl28-var1");
        case 3:
                return strcmp(name, "fsl-ls1028a-kontron-sl28-var3");
        case 4: