]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: sl28: move to OF_UPSTREAM
authorMichael Walle <michael@walle.cc>
Wed, 6 Mar 2024 16:19:11 +0000 (17:19 +0100)
committerPeng Fan <peng.fan@nxp.com>
Tue, 23 Apr 2024 16:22:09 +0000 (00:22 +0800)
Use the new device devicetree files in dts/upstream/ and delete the old
ones. Still keep the -u-boot.dtsi with all u-boot specifics around.

There is one catch and that is fsl-ls1028a-kontron-sl28-var3.dts which
is not available upstream (yet!). For now, the base dts is used for this
variant as this only differ in the compatible and the (human readable)
model name.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dts [deleted file]
arch/arm/dts/fsl-ls1028a-kontron-sl28-var2.dts [deleted file]
arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dts [deleted file]
arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dts [deleted file]
arch/arm/dts/fsl-ls1028a-kontron-sl28.dts [deleted file]
board/kontron/sl28/spl.c
configs/kontron_sl28_defconfig

diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dts b/arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dts
deleted file mode 100644 (file)
index 7cd29ab..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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) 2021 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";
-};
-
-&enetc_mdio_pf3 {
-       /* Delete unused phy node */
-       /delete-node/ ethernet-phy@5;
-
-       phy0: ethernet-phy@4 {
-               reg = <0x4>;
-               eee-broken-1000t;
-               eee-broken-100tx;
-               qca,clk-out-frequency = <125000000>;
-               qca,clk-out-strength = <AR803X_STRENGTH_FULL>;
-               qca,keep-pll-enabled;
-               vddio-supply = <&vddio>;
-
-               vddio: vddio-regulator {
-                       regulator-name = "VDDIO";
-                       regulator-min-microvolt = <1800000>;
-                       regulator-max-microvolt = <1800000>;
-               };
-
-               vddh: vddh-regulator {
-                       regulator-name = "VDDH";
-               };
-       };
-};
-
-&enetc_port0 {
-       status = "disabled";
-       /* Delete the phy-handle to the old phy0 label */
-       /delete-property/ phy-handle;
-};
-
-&enetc_port1 {
-       phy-handle = <&phy0>;
-       phy-mode = "rgmii-id";
-       status = "okay";
-};
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-var2.dts b/arch/arm/dts/fsl-ls1028a-kontron-sl28-var2.dts
deleted file mode 100644 (file)
index 330e34f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Device Tree file for the Kontron SMARC-sAL28 board.
- *
- * This is for the network variant 2 which has two ethernet ports. These
- * ports are connected to the internal switch.
- *
- * Copyright (C) 2021 Michael Walle <michael@walle.cc>
- *
- */
-
-/dts-v1/;
-#include "fsl-ls1028a-kontron-sl28.dts"
-
-/ {
-       model = "Kontron SMARC-sAL28 (TSN-on-module)";
-       compatible = "kontron,sl28-var2", "kontron,sl28", "fsl,ls1028a";
-};
-
-&enetc_mdio_pf3 {
-       phy1: ethernet-phy@4 {
-               reg = <0x4>;
-               eee-broken-1000t;
-               eee-broken-100tx;
-       };
-};
-
-&enetc_port0 {
-       status = "disabled";
-       /*
-        * In the base device tree the PHY at address 5 was assigned for
-        * this port. On this module this PHY is connected to a switch
-        * port instead. Therefore, delete the phy-handle property here.
-        */
-       /delete-property/ phy-handle;
-};
-
-&enetc_port2 {
-       status = "okay";
-};
-
-&mscc_felix {
-       status = "okay";
-};
-
-&mscc_felix_port0 {
-       label = "swp0";
-       managed = "in-band-status";
-       phy-handle = <&phy0>;
-       phy-mode = "sgmii";
-       status = "okay";
-};
-
-&mscc_felix_port1 {
-       label = "swp1";
-       managed = "in-band-status";
-       phy-handle = <&phy1>;
-       phy-mode = "sgmii";
-       status = "okay";
-};
-
-&mscc_felix_port4 {
-       ethernet = <&enetc_port2>;
-       status = "okay";
-};
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dts b/arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dts
deleted file mode 100644 (file)
index 0c8b2af..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Device Tree file for the Kontron SMARC-sAL28 board.
- *
- * Copyright (C) 2019 Michael Walle <michael@walle.cc>
- *
- */
-
-/dts-v1/;
-#include "fsl-ls1028a-kontron-sl28.dts"
-
-/ {
-       model = "Kontron SMARC-sAL28 (Single PHY)";
-       compatible = "kontron,sl28-var3", "kontron,sl28", "fsl,ls1028a";
-};
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dts b/arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dts
deleted file mode 100644 (file)
index 9b5e92f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Device Tree file for the Kontron SMARC-sAL28 board.
- *
- * This is for the network variant 4 which has two ethernet ports. It
- * extends the base and provides one more port connected via RGMII.
- *
- * Copyright (C) 2021 Michael Walle <michael@walle.cc>
- *
- */
-
-/dts-v1/;
-#include "fsl-ls1028a-kontron-sl28.dts"
-#include <dt-bindings/net/qca-ar803x.h>
-
-/ {
-       model = "Kontron SMARC-sAL28 (Dual PHY)";
-       compatible = "kontron,sl28-var4", "kontron,sl28", "fsl,ls1028a";
-};
-
-&enetc_mdio_pf3 {
-       phy1: ethernet-phy@4 {
-               reg = <0x4>;
-               eee-broken-1000t;
-               eee-broken-100tx;
-               qca,clk-out-frequency = <125000000>;
-               qca,clk-out-strength = <AR803X_STRENGTH_FULL>;
-               qca,keep-pll-enabled;
-               vddio-supply = <&vddio>;
-
-               vddio: vddio-regulator {
-                       regulator-name = "VDDIO";
-                       regulator-min-microvolt = <1800000>;
-                       regulator-max-microvolt = <1800000>;
-               };
-
-               vddh: vddh-regulator {
-                       regulator-name = "VDDH";
-               };
-       };
-};
-
-&enetc_port1 {
-       phy-handle = <&phy1>;
-       phy-mode = "rgmii-id";
-       status = "okay";
-};
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28.dts b/arch/arm/dts/fsl-ls1028a-kontron-sl28.dts
deleted file mode 100644 (file)
index ab713b4..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Device Tree file for the Kontron SMARC-sAL28 board.
- *
- * Copyright (C) 2021 Michael Walle <michael@walle.cc>
- *
- */
-
-/dts-v1/;
-#include "fsl-ls1028a.dtsi"
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-
-/ {
-       model = "Kontron SMARC-sAL28";
-       compatible = "kontron,sl28", "fsl,ls1028a";
-
-       aliases {
-               crypto = &crypto;
-               serial0 = &duart0;
-               serial1 = &duart1;
-               serial2 = &lpuart1;
-               spi0 = &fspi;
-               spi1 = &dspi2;
-               mmc0 = &esdhc1;
-               mmc1 = &esdhc;
-               rtc0 = &rtc;
-               rtc1 = &ftm_alarm0;
-       };
-
-       buttons0 {
-               compatible = "gpio-keys";
-
-               power-button {
-                       interrupts-extended = <&sl28cpld_intc
-                                              4 IRQ_TYPE_EDGE_BOTH>;
-                       linux,code = <KEY_POWER>;
-                       label = "Power";
-               };
-
-               sleep-button {
-                       interrupts-extended = <&sl28cpld_intc
-                                              5 IRQ_TYPE_EDGE_BOTH>;
-                       linux,code = <KEY_SLEEP>;
-                       label = "Sleep";
-               };
-       };
-
-       buttons1 {
-               compatible = "gpio-keys-polled";
-               poll-interval = <200>;
-
-               lid-switch {
-                       linux,input-type = <EV_SW>;
-                       linux,code = <SW_LID>;
-                       gpios = <&sl28cpld_gpio3 4 GPIO_ACTIVE_LOW>;
-                       label = "Lid";
-               };
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-};
-
-&can0 {
-       status = "okay";
-};
-
-&dspi2 {
-       status = "okay";
-};
-
-&duart0 {
-       status = "okay";
-};
-
-&duart1 {
-       status = "okay";
-};
-
-&enetc_mdio_pf3 {
-       phy0: ethernet-phy@5 {
-               reg = <0x5>;
-               eee-broken-1000t;
-               eee-broken-100tx;
-       };
-};
-
-&enetc_port0 {
-       phy-handle = <&phy0>;
-       phy-mode = "sgmii";
-       managed = "in-band-status";
-       status = "okay";
-};
-
-&esdhc {
-       sd-uhs-sdr104;
-       sd-uhs-sdr50;
-       sd-uhs-sdr25;
-       sd-uhs-sdr12;
-       status = "okay";
-};
-
-&esdhc1 {
-       mmc-hs200-1_8v;
-       mmc-hs400-1_8v;
-       bus-width = <8>;
-       status = "okay";
-};
-
-&fspi {
-       status = "okay";
-
-       flash@0 {
-               compatible = "jedec,spi-nor";
-               m25p,fast-read;
-               spi-max-frequency = <133000000>;
-               reg = <0>;
-               /* The following setting enables 1-1-2 (CMD-ADDR-DATA) mode */
-               spi-rx-bus-width = <2>; /* 2 SPI Rx lines */
-               spi-tx-bus-width = <1>; /* 1 SPI Tx line */
-
-               partitions {
-                       compatible = "fixed-partitions";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       partition@0 {
-                               reg = <0x000000 0x010000>;
-                               label = "rcw";
-                               read-only;
-                       };
-
-                       partition@10000 {
-                               reg = <0x010000 0x1d0000>;
-                               label = "failsafe bootloader";
-                               read-only;
-                       };
-
-                       partition@200000 {
-                               reg = <0x200000 0x010000>;
-                               label = "configuration store";
-                       };
-
-                       partition@210000 {
-                               reg = <0x210000 0x1d0000>;
-                               label = "bootloader";
-                       };
-
-                       partition@3e0000 {
-                               reg = <0x3e0000 0x020000>;
-                               label = "bootloader environment";
-                       };
-               };
-       };
-};
-
-&gpio1 {
-       gpio-line-names =
-               "", "", "", "", "", "", "", "",
-               "", "", "", "", "", "", "", "",
-               "", "", "", "", "", "", "TDO", "TCK",
-               "", "", "", "", "", "", "", "";
-};
-
-&gpio2 {
-       gpio-line-names =
-               "", "", "", "", "", "", "TMS", "TDI",
-               "", "", "", "", "", "", "", "",
-               "", "", "", "", "", "", "", "",
-               "", "", "", "", "", "", "", "";
-};
-
-&i2c0 {
-       status = "okay";
-
-       rtc: rtc@32 {
-               compatible = "microcrystal,rv8803";
-               reg = <0x32>;
-       };
-
-       sl28cpld@4a {
-               compatible = "kontron,sl28cpld";
-               reg = <0x4a>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               watchdog@4 {
-                       compatible = "kontron,sl28cpld-wdt";
-                       reg = <0x4>;
-                       kontron,assert-wdt-timeout-pin;
-               };
-
-               hwmon@b {
-                       compatible = "kontron,sl28cpld-fan";
-                       reg = <0xb>;
-               };
-
-               sl28cpld_pwm0: pwm@c {
-                       compatible = "kontron,sl28cpld-pwm";
-                       reg = <0xc>;
-                       #pwm-cells = <2>;
-               };
-
-               sl28cpld_pwm1: pwm@e {
-                       compatible = "kontron,sl28cpld-pwm";
-                       reg = <0xe>;
-                       #pwm-cells = <2>;
-               };
-
-               sl28cpld_gpio0: gpio@10 {
-                       compatible = "kontron,sl28cpld-gpio";
-                       reg = <0x10>;
-                       interrupts-extended = <&gpio2 6
-                                              IRQ_TYPE_EDGE_FALLING>;
-
-                       gpio-controller;
-                       #gpio-cells = <2>;
-                       gpio-line-names =
-                               "GPIO0_CAM0_PWR_N", "GPIO1_CAM1_PWR_N",
-                               "GPIO2_CAM0_RST_N", "GPIO3_CAM1_RST_N",
-                               "GPIO4_HDA_RST_N", "GPIO5_PWM_OUT",
-                               "GPIO6_TACHIN", "GPIO7";
-
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-               };
-
-               sl28cpld_gpio1: gpio@15 {
-                       compatible = "kontron,sl28cpld-gpio";
-                       reg = <0x15>;
-                       interrupts-extended = <&gpio2 6
-                                              IRQ_TYPE_EDGE_FALLING>;
-
-                       gpio-controller;
-                       #gpio-cells = <2>;
-                       gpio-line-names =
-                               "GPIO8", "GPIO9", "GPIO10", "GPIO11",
-                               "", "", "", "";
-
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-               };
-
-               sl28cpld_gpio2: gpio@1a {
-                       compatible = "kontron,sl28cpld-gpo";
-                       reg = <0x1a>;
-
-                       gpio-controller;
-                       #gpio-cells = <2>;
-                       gpio-line-names =
-                               "LCD0 voltage enable",
-                               "LCD0 backlight enable",
-                               "eMMC reset", "LVDS bridge reset",
-                               "LVDS bridge power-down",
-                               "SDIO power enable",
-                               "", "";
-               };
-
-               sl28cpld_gpio3: gpio@1b {
-                       compatible = "kontron,sl28cpld-gpi";
-                       reg = <0x1b>;
-
-                       gpio-controller;
-                       #gpio-cells = <2>;
-                       gpio-line-names =
-                               "Power button", "Force recovery", "Sleep",
-                               "Battery low", "Lid state", "Charging",
-                               "Charger present", "";
-               };
-
-               sl28cpld_intc: interrupt-controller@1c {
-                       compatible = "kontron,sl28cpld-intc";
-                       reg = <0x1c>;
-                       interrupts-extended = <&gpio2 6
-                                              IRQ_TYPE_EDGE_FALLING>;
-
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-               };
-       };
-
-       eeprom@50 {
-               compatible = "atmel,24c32";
-               reg = <0x50>;
-               pagesize = <32>;
-       };
-};
-
-&i2c3 {
-       status = "okay";
-};
-
-&i2c4 {
-       status = "okay";
-
-       eeprom@50 {
-               compatible = "atmel,24c32";
-               reg = <0x50>;
-               pagesize = <32>;
-       };
-};
-
-&lpuart1 {
-       status = "okay";
-};
index ffaf517a8bbe05e354cdb3aa7eca04c2dcb3d109..80acde74956db0816da33b6f8d85b5af24ce5c6d 100644 (file)
@@ -47,15 +47,14 @@ int board_fit_config_name_match(const char *name)
 
        switch (variant) {
        case 1:
-               return strcmp(name, "fsl-ls1028a-kontron-sl28-var1");
+               return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var1");
        case 2:
-               return strcmp(name, "fsl-ls1028a-kontron-sl28-var2");
-       case 3:
-               return strcmp(name, "fsl-ls1028a-kontron-sl28-var3");
+               return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var2");
        case 4:
-               return strcmp(name, "fsl-ls1028a-kontron-sl28-var4");
+               return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var4");
+       case 3:
        default:
-               return strcmp(name, "fsl-ls1028a-kontron-sl28");
+               return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28");
        }
 }
 
index 639c5c6ce109344f70ae1580b4a36dd12273fa8d..adc1d501ba8249f7bee0ca1f49e82652772c87b9 100644 (file)
@@ -11,7 +11,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x1800eff0
 CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x3e0000
 CONFIG_ENV_SECT_SIZE=0x10000
-CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1028a-kontron-sl28"
+CONFIG_DEFAULT_DEVICE_TREE="freescale/fsl-ls1028a-kontron-sl28"
 CONFIG_SPL_TEXT_BASE=0x18010000
 CONFIG_SYS_FSL_SDHC_CLK_DIV=1
 CONFIG_OF_LIBFDT_OVERLAY=y
@@ -73,7 +73,8 @@ CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_RNG=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIST="fsl-ls1028a-kontron-sl28 fsl-ls1028a-kontron-sl28-var1 fsl-ls1028a-kontron-sl28-var2 fsl-ls1028a-kontron-sl28-var3 fsl-ls1028a-kontron-sl28-var4"
+CONFIG_OF_UPSTREAM=y
+CONFIG_OF_LIST="freescale/fsl-ls1028a-kontron-sl28 freescale/fsl-ls1028a-kontron-sl28-var1 freescale/fsl-ls1028a-kontron-sl28-var2 freescale/fsl-ls1028a-kontron-sl28-var4"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y