* [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL
@ 2023-05-19 10:43 Lukasz Majewski
2023-05-19 10:43 ` [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes Lukasz Majewski
` (15 more replies)
0 siblings, 16 replies; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski, Bharat Gooty, Masahiro Yamada, Pali Rohár,
Rayagonda Kokatanur, Simon Glass, Stefan Roese
This patch series fixes i.MX28 based XEA board to utilize DM_SERIAL
Changes:
- Patches 1-3 - fix DTS (after Linux update) to debrick XEA
- Patches 4-8 - prepare XEA's DTS to support DM_SERIAL
- Patches 9-11 - fixes serial_pl01x.c driver (as this driver is
used by XEA, I would prefer to have this in a single
patchset - otherwise board may be bricked
- Patches 12-14 - XEA and imx28 generic code fixes to support
DM_SERIAL with OF_PLATDATA
- Patches 15-16 - config modification to support DM_SERIAL
CI:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=44&view=results
Applied on top of u-boot/master branch
SHA1: 6e1852ca2c418e2536ead4b51c4d84a59926b3f1
Lukasz Majewski (16):
dts: xea: Delete not used in u-boot DTS nodes
dts: xea: Provide missing FEC required properties (mac0 and
reg_fec_3v3)
defconfig: xea: Change default spi-nor memory bus to 2
spl: xea: Provide stub DM driver for imx28 clocks
dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL)
dts: xea: Add u-boot specific 'type' property to duart
dts: xea: Remove clocks property from debug UART on XEA
dts: xea: Disable 'clks' node for xea (imx287)
serial: pl01x: Change OF_CONTROL to OF_REAL
serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA
serial: pl01x: Modify pending callback to test if transmit FIFO is
empty
arm: mxs: Prevent serial console init when in very early SPL boot code
arm: xea: Call spl_early_init() before DM serial console is enabled in
SPL
arm: Kconfig: Switch XEA (imx287 based) board to use
CONFIG_PL01X_SERIAL
config: xea: Enable DM_SERIAL for the XEA (imx287 based) board
config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot
arch/arm/Kconfig | 2 +-
arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 6 ++--
arch/arm/dts/imx28-xea-u-boot.dtsi | 45 +++++++++++++++++++++++++
arch/arm/mach-imx/mxs/Kconfig | 1 +
board/liebherr/xea/xea.c | 20 ++++++++++-
configs/imx28_xea_defconfig | 5 +--
configs/imx28_xea_sb_defconfig | 2 ++
drivers/serial/serial_pl01x.c | 16 +++++++--
include/dm/platform_data/serial_pl01x.h | 4 +++
9 files changed, 93 insertions(+), 8 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:43 ` sbabic
2023-05-19 10:43 ` [PATCH v1 02/16] dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3) Lukasz Majewski
` (14 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
After the re-sync with Linux Kernel's DTS
(SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e), the XEA's
descripion has nodes and properties, which are NOT utilized
in the u-boot.
To avoid confusion - those are deleted.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/dts/imx28-xea-u-boot.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/dts/imx28-xea-u-boot.dtsi b/arch/arm/dts/imx28-xea-u-boot.dtsi
index f6488154d8..22dd7bc8a8 100644
--- a/arch/arm/dts/imx28-xea-u-boot.dtsi
+++ b/arch/arm/dts/imx28-xea-u-boot.dtsi
@@ -12,6 +12,11 @@
*/
#include "imx28-u-boot.dtsi"
/ {
+ aliases {
+ /delete-property/ spi1;
+ /delete-property/ usbphy0;
+ /delete-property/ usbphy1;
+ };
apb@80000000 {
bootph-pre-ram;
@@ -34,6 +39,8 @@
};
&pinctrl {
+ /delete-property/ pinctrl-names;
+ /delete-property/ pinctrl-0;
bootph-pre-ram;
};
@@ -46,3 +53,12 @@
spi-max-frequency = <40000000>;
bootph-pre-ram;
};
+
+/delete-node/ &ssp2;
+/delete-node/ &usb0;
+/delete-node/ &usbphy0;
+/delete-node/ &usb1;
+/delete-node/ &usbphy1;
+/delete-node/ &hog_pins_a;
+/delete-node/ &hog_pins_tiva;
+/delete-node/ &hog_pins_coding;
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 02/16] dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3)
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
2023-05-19 10:43 ` [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:47 ` sbabic
2023-05-19 10:43 ` [PATCH v1 03/16] defconfig: xea: Change default spi-nor memory bus to 2 Lukasz Majewski
` (13 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
After the commit (SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e) some
u-boot specific XEA FEC related properties have been replaced by ones
from the Linux kernel.
To be more specific - XEA board (and imx287 in general) has built L2
switch connected to FEC, which needs some special treatment.
In u-boot it is handled with 'mac0' node, whereas Linux uses dedicated
switch DTS node.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/dts/imx28-xea-u-boot.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm/dts/imx28-xea-u-boot.dtsi b/arch/arm/dts/imx28-xea-u-boot.dtsi
index 22dd7bc8a8..9f1e261b2f 100644
--- a/arch/arm/dts/imx28-xea-u-boot.dtsi
+++ b/arch/arm/dts/imx28-xea-u-boot.dtsi
@@ -38,12 +38,34 @@
bootph-pre-ram;
};
+&mac0 {
+ phy-mode = "rmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mac0_pins_a>;
+ phy-supply = <®_fec_3v3>;
+ phy-reset-gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+ phy-reset-duration = <1>;
+ phy-reset-post-delay = <1>;
+ status = "okay";
+
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+};
+
&pinctrl {
/delete-property/ pinctrl-names;
/delete-property/ pinctrl-0;
bootph-pre-ram;
};
+®_fec_3v3 {
+ gpio = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+};
+
&ssp0 {
bootph-pre-ram;
};
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 03/16] defconfig: xea: Change default spi-nor memory bus to 2
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
2023-05-19 10:43 ` [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes Lukasz Majewski
2023-05-19 10:43 ` [PATCH v1 02/16] dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3) Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:45 ` sbabic
2023-05-19 10:43 ` [PATCH v1 04/16] spl: xea: Provide stub DM driver for imx28 clocks Lukasz Majewski
` (12 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
After the re-sync with Linux kernel (v6.0) of the XEA DTS
(SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e) the alias
for SPI bus, to which SPI-NOR memory is connected, has changed from
'spi3' to 'spi2'.
To be in sync with current u-boot's xea dts, the default bus number
(which allows running 'sf probe' without any extra parameters given)
has been adjusted.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
configs/imx28_xea_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig
index 06dd6b1f0e..4a217b1f91 100644
--- a/configs/imx28_xea_defconfig
+++ b/configs/imx28_xea_defconfig
@@ -95,7 +95,7 @@ CONFIG_MMC_MXS=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_DM_SPI_FLASH=y
-CONFIG_SF_DEFAULT_BUS=3
+CONFIG_SF_DEFAULT_BUS=2
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_SPANSION=y
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 04/16] spl: xea: Provide stub DM driver for imx28 clocks
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (2 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 03/16] defconfig: xea: Change default spi-nor memory bus to 2 Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:44 ` sbabic
2023-05-19 10:43 ` [PATCH v1 05/16] dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL) Lukasz Majewski
` (11 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
This code fixes following WARNING:
DTOC spl/dts/dt-plat.c
fsl_imx28_clkctrl: WARNING: the driver fsl_imx28_clkctrl was not found in the driver list
As imx28 doesn't yet support common clock framework, this prevents from
DTOC warnings during SPL build.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
board/liebherr/xea/xea.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 38e841c5f6..ed2b39f70e 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -203,5 +203,22 @@ int ft_board_setup(void *blob, struct bd_info *bd)
return 0;
}
#endif
-
+/*
+ * NOTE:
+ *
+ * IMX28 clock "stub" DM driver!
+ *
+ * Only used for SPL stage, which is NOT using DM; serial and
+ * eMMC configuration.
+ */
+static const struct udevice_id imx28_clk_ids[] = {
+ { .compatible = "fsl,imx28-clkctrl", },
+ { }
+};
+
+U_BOOT_DRIVER(fsl_imx28_clkctrl) = {
+ .name = "fsl_imx28_clkctrl",
+ .id = UCLASS_CLK,
+ .of_match = imx28_clk_ids,
+};
#endif /* CONFIG_SPL_BUILD */
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 05/16] dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL)
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (3 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 04/16] spl: xea: Provide stub DM driver for imx28 clocks Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:42 ` sbabic
2023-05-19 10:43 ` [PATCH v1 06/16] dts: xea: Add u-boot specific 'type' property to duart Lukasz Majewski
` (10 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
After enabling DM_SERIAL for XEA board, the same serial shall be used
in the SPL (with SPL_OF_PLATDATA support).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/dts/imx28-xea-u-boot.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/imx28-xea-u-boot.dtsi b/arch/arm/dts/imx28-xea-u-boot.dtsi
index 9f1e261b2f..e40a6d240c 100644
--- a/arch/arm/dts/imx28-xea-u-boot.dtsi
+++ b/arch/arm/dts/imx28-xea-u-boot.dtsi
@@ -34,6 +34,10 @@
bootph-pre-ram;
};
+&duart {
+ bootph-pre-ram;
+};
+
&gpio0 {
bootph-pre-ram;
};
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 06/16] dts: xea: Add u-boot specific 'type' property to duart
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (4 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 05/16] dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL) Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:46 ` sbabic
2023-05-19 10:43 ` [PATCH v1 07/16] dts: xea: Remove clocks property from debug UART on XEA Lukasz Majewski
` (9 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
The DM_SERIAL implicitly requires CONFIG_PL01X_SERIAL, which
allows support for both serial IP block versions (i.e. PL011 and
PL010).
The decision about used IP block is based on the compatible string,
when DM is used.
In the XEA, the OF_PLATDATA is used to allow usage of serial driver in
the SPL (as the size of SPL is crucial). In this case one cannot extract
the type of IP block from .data field (corresponding to compatible) and
it must be explicitly read at probe from dtoc generated, u-boot specific
property.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/dts/imx28-xea-u-boot.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/dts/imx28-xea-u-boot.dtsi b/arch/arm/dts/imx28-xea-u-boot.dtsi
index e40a6d240c..50289cf6d7 100644
--- a/arch/arm/dts/imx28-xea-u-boot.dtsi
+++ b/arch/arm/dts/imx28-xea-u-boot.dtsi
@@ -36,6 +36,7 @@
&duart {
bootph-pre-ram;
+ type = <1>; /* TYPE_PL011 */
};
&gpio0 {
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 07/16] dts: xea: Remove clocks property from debug UART on XEA
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (5 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 06/16] dts: xea: Add u-boot specific 'type' property to duart Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:43 ` sbabic
2023-05-19 10:43 ` [PATCH v1 08/16] dts: xea: Disable 'clks' node for xea (imx287) Lukasz Majewski
` (8 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
The imx287 SoC doesn't support common clock framework (CCF), so the
'clocks' property is removed to avoid early (i.e. in SPL) errors when
SPL_OF_PLATDATA is used.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/dts/imx28-xea-u-boot.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/dts/imx28-xea-u-boot.dtsi b/arch/arm/dts/imx28-xea-u-boot.dtsi
index 50289cf6d7..52fec31fbb 100644
--- a/arch/arm/dts/imx28-xea-u-boot.dtsi
+++ b/arch/arm/dts/imx28-xea-u-boot.dtsi
@@ -35,6 +35,7 @@
};
&duart {
+ /delete-property/ clocks;
bootph-pre-ram;
type = <1>; /* TYPE_PL011 */
};
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 08/16] dts: xea: Disable 'clks' node for xea (imx287)
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (6 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 07/16] dts: xea: Remove clocks property from debug UART on XEA Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:42 ` sbabic
2023-05-19 10:43 ` [PATCH v1 09/16] serial: pl01x: Change OF_CONTROL to OF_REAL Lukasz Majewski
` (7 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
As imx28 family of SoCs is NOT supporting the Common Clock Framework (CCF)
the 'clks' property shall NOT be enabled by default.
Without this change u-boot proper before relocation tries to bind driver
(which doesn't exists) for this device. As a result, pre-relocation DTB
parsing is finished with error and the board hangs in a very early stage
of u-boot proper boot process.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/dts/imx28-xea-u-boot.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/dts/imx28-xea-u-boot.dtsi b/arch/arm/dts/imx28-xea-u-boot.dtsi
index 52fec31fbb..bdbeca528c 100644
--- a/arch/arm/dts/imx28-xea-u-boot.dtsi
+++ b/arch/arm/dts/imx28-xea-u-boot.dtsi
@@ -32,6 +32,7 @@
&clks {
bootph-pre-ram;
+ status = "disable";
};
&duart {
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 09/16] serial: pl01x: Change OF_CONTROL to OF_REAL
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (7 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 08/16] dts: xea: Disable 'clks' node for xea (imx287) Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:45 ` sbabic
2023-05-19 10:43 ` [PATCH v1 10/16] serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA Lukasz Majewski
` (6 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski, Pali Rohár, Simon Glass, Stefan Roese
Before this change, building this driver for SPL with enabled SPL_DM_SERIAL
was problematic, as '-Wunused-const-variable=' warning was visible.
Now, the code is only considered when u-boot proper is build.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
drivers/serial/serial_pl01x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index f5468353e1..18332c2192 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -331,7 +331,7 @@ static const struct dm_serial_ops pl01x_serial_ops = {
.setbrg = pl01x_serial_setbrg,
};
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_REAL)
static const struct udevice_id pl01x_serial_id[] ={
{.compatible = "arm,pl011", .data = TYPE_PL011},
{.compatible = "arm,pl010", .data = TYPE_PL010},
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 10/16] serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (8 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 09/16] serial: pl01x: Change OF_CONTROL to OF_REAL Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:42 ` sbabic
2023-05-19 10:43 ` [PATCH v1 11/16] serial: pl01x: Modify pending callback to test if transmit FIFO is empty Lukasz Majewski
` (5 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski, Pali Rohár, Simon Glass, Stefan Roese
This commit prepares the pl01x serial driver to be used with
SPL_OF_PLATDATA enabled.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
drivers/serial/serial_pl01x.c | 12 ++++++++++++
include/dm/platform_data/serial_pl01x.h | 4 ++++
2 files changed, 16 insertions(+)
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 18332c2192..dbf2b2df34 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -291,8 +291,16 @@ int pl01x_serial_probe(struct udevice *dev)
struct pl01x_serial_plat *plat = dev_get_plat(dev);
struct pl01x_priv *priv = dev_get_priv(dev);
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+ struct dtd_serial_pl01x *dtplat = &plat->dtplat;
+
+ priv->regs = (struct pl01x_regs *)dtplat->reg[0];
+ plat->type = dtplat->type;
+#else
priv->regs = (struct pl01x_regs *)plat->base;
+#endif
priv->type = plat->type;
+
if (!plat->skip_init)
return pl01x_generic_serial_init(priv->regs, priv->type);
else
@@ -380,8 +388,10 @@ int pl01x_serial_of_to_plat(struct udevice *dev)
U_BOOT_DRIVER(serial_pl01x) = {
.name = "serial_pl01x",
.id = UCLASS_SERIAL,
+#if CONFIG_IS_ENABLED(OF_REAL)
.of_match = of_match_ptr(pl01x_serial_id),
.of_to_plat = of_match_ptr(pl01x_serial_of_to_plat),
+#endif
.plat_auto = sizeof(struct pl01x_serial_plat),
.probe = pl01x_serial_probe,
.ops = &pl01x_serial_ops,
@@ -389,6 +399,8 @@ U_BOOT_DRIVER(serial_pl01x) = {
.priv_auto = sizeof(struct pl01x_priv),
};
+DM_DRIVER_ALIAS(serial_pl01x, arm_pl011)
+DM_DRIVER_ALIAS(serial_pl01x, arm_pl010)
#endif
#if defined(CONFIG_DEBUG_UART_PL010) || defined(CONFIG_DEBUG_UART_PL011)
diff --git a/include/dm/platform_data/serial_pl01x.h b/include/dm/platform_data/serial_pl01x.h
index e3d4e308a1..811697ce5c 100644
--- a/include/dm/platform_data/serial_pl01x.h
+++ b/include/dm/platform_data/serial_pl01x.h
@@ -20,7 +20,11 @@ enum pl01x_type {
* @skip_init: Don't attempt to change port configuration (also means @clock
* is ignored)
*/
+#include <dt-structs.h>
struct pl01x_serial_plat {
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+ struct dtd_serial_pl01x dtplat;
+#endif
unsigned long base;
enum pl01x_type type;
unsigned int clock;
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 11/16] serial: pl01x: Modify pending callback to test if transmit FIFO is empty
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (9 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 10/16] serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:45 ` sbabic
2023-05-19 10:43 ` [PATCH v1 12/16] arm: mxs: Prevent serial console init when in very early SPL boot code Lukasz Majewski
` (4 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski, Pali Rohár, Simon Glass, Stefan Roese
Before this change the FR_TXFF (Transmit FIFO full) bit (5 in
HW_UARTDBG_FR) has been used to assess if there is still data pending
to be sent via UART.
This approach is problematic, as it may happen that serial is in the
middle of transmission (so the TX FIFO is NOT full anymore) and this
test returns true infinitely. As a result, for example in _serial_flush()
DM serial function we are locked in endless while().
The fix here is to test explicitly if the TX FIFO is empty.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
drivers/serial/serial_pl01x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index dbf2b2df34..428a4d210d 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -329,7 +329,7 @@ int pl01x_serial_pending(struct udevice *dev, bool input)
if (input)
return pl01x_tstc(priv->regs);
else
- return fr & UART_PL01x_FR_TXFF ? 0 : 1;
+ return fr & UART_PL01x_FR_TXFE ? 0 : 1;
}
static const struct dm_serial_ops pl01x_serial_ops = {
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 12/16] arm: mxs: Prevent serial console init when in very early SPL boot code
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (10 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 11/16] serial: pl01x: Modify pending callback to test if transmit FIFO is empty Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:44 ` sbabic
2023-05-19 10:43 ` [PATCH v1 13/16] arm: xea: Call spl_early_init() before DM serial console is enabled in SPL Lukasz Majewski
` (3 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
When DM_SERIAL is enabled on mxs (i.e. imx28) platform, the console
early initialization must be postponed until the driver model is
correctly setup.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 763d79e803..5598c552ab 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -128,8 +128,10 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
- mxs_spl_console_init();
- debug("SPL: Serial Console Initialised\n");
+ if (!CONFIG_IS_ENABLED(DM_SERIAL)) {
+ mxs_spl_console_init();
+ debug("SPL: Serial Console Initialised\n");
+ }
mxs_power_init();
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 13/16] arm: xea: Call spl_early_init() before DM serial console is enabled in SPL
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (11 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 12/16] arm: mxs: Prevent serial console init when in very early SPL boot code Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:47 ` sbabic
2023-05-19 10:43 ` [PATCH v1 14/16] arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL Lukasz Majewski
` (2 subsequent siblings)
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
The in-spl enabled DM serial console requires the board setup to be
able to parse SPL_OF_PLATDATA based serial driver (pl01x) for the
imx28 based XEA board.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
board/liebherr/xea/xea.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index ed2b39f70e..e4d2eb65cc 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -62,6 +62,7 @@ static void init_clocks(void)
void board_init_f(ulong arg)
{
init_clocks();
+ spl_early_init();
preloader_console_init();
}
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 14/16] arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (12 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 13/16] arm: xea: Call spl_early_init() before DM serial console is enabled in SPL Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:47 ` sbabic
2023-05-19 10:43 ` [PATCH v1 15/16] config: xea: Enable DM_SERIAL for the XEA (imx287 based) board Lukasz Majewski
2023-05-19 10:43 ` [PATCH v1 16/16] config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot Lukasz Majewski
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski, Bharat Gooty, Masahiro Yamada,
Rayagonda Kokatanur
The CONFIG_PL011 used by all other ARCH_MX28 based boards is not
supporting DM_SERIAL. Instead, other define - namely CONFIG_PL01X_SERIAL
shall be used by boards supporting DM_SERIAL.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
arch/arm/Kconfig | 2 +-
arch/arm/mach-imx/mxs/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 99264a6478..4604d41410 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -919,7 +919,7 @@ config ARCH_MX28
bool "NXP i.MX28 family"
select CPU_ARM926EJS
select GPIO_EXTRA_HEADER
- select PL011_SERIAL
+ select PL011_SERIAL if !TARGET_XEA
select MACH_IMX
select SUPPORT_SPL
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
index b2026a3758..ded16aac46 100644
--- a/arch/arm/mach-imx/mxs/Kconfig
+++ b/arch/arm/mach-imx/mxs/Kconfig
@@ -45,6 +45,7 @@ config TARGET_MX28EVK
config TARGET_XEA
bool "Support XEA"
+ select PL01X_SERIAL
endchoice
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 15/16] config: xea: Enable DM_SERIAL for the XEA (imx287 based) board
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (13 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 14/16] arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:44 ` sbabic
2023-05-19 10:43 ` [PATCH v1 16/16] config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot Lukasz Majewski
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
The XEA board now supports the DM_SERIAL feature in u-boot.
The SPL is using the SPL_OF_PLATDATA - i.e. NOT SPL_DM_SERIAL to
reduce the overall size of the SPL binary.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
configs/imx28_xea_defconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig
index 4a217b1f91..b4a051a859 100644
--- a/configs/imx28_xea_defconfig
+++ b/configs/imx28_xea_defconfig
@@ -113,7 +113,8 @@ CONFIG_PINCTRL_MXS=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
-CONFIG_CONS_INDEX=0
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MXS_SPI=y
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 16/16] config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
` (14 preceding siblings ...)
2023-05-19 10:43 ` [PATCH v1 15/16] config: xea: Enable DM_SERIAL for the XEA (imx287 based) board Lukasz Majewski
@ 2023-05-19 10:43 ` Lukasz Majewski
2023-07-11 19:45 ` sbabic
15 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2023-05-19 10:43 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, Tom Rini, u-boot, Marek Vasut,
NXP u-boot
Cc: Lukasz Majewski
The single binary version of u-boot for XEA board is used to debrick and
factory programming.
The produced u-boot.sb is a single file, which allows having fully
operational u-boot prompt loaded with imx287 ROM.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
configs/imx28_xea_sb_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/imx28_xea_sb_defconfig b/configs/imx28_xea_sb_defconfig
index bb7bf5d9da..a43183444d 100644
--- a/configs/imx28_xea_sb_defconfig
+++ b/configs/imx28_xea_sb_defconfig
@@ -94,7 +94,9 @@ CONFIG_PINCTRL_MXS=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_CONS_INDEX=0
+CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MXS_SPI=y
--
2.30.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH v1 08/16] dts: xea: Disable 'clks' node for xea (imx287)
2023-05-19 10:43 ` [PATCH v1 08/16] dts: xea: Disable 'clks' node for xea (imx287) Lukasz Majewski
@ 2023-07-11 19:42 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:42 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> As imx28 family of SoCs is NOT supporting the Common Clock Framework (CCF)
> the 'clks' property shall NOT be enabled by default.
> Without this change u-boot proper before relocation tries to bind driver
> (which doesn't exists) for this device. As a result, pre-relocation DTB
> parsing is finished with error and the board hangs in a very early stage
> of u-boot proper boot process.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 10/16] serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA
2023-05-19 10:43 ` [PATCH v1 10/16] serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA Lukasz Majewski
@ 2023-07-11 19:42 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:42 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> This commit prepares the pl01x serial driver to be used with
> SPL_OF_PLATDATA enabled.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 05/16] dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL)
2023-05-19 10:43 ` [PATCH v1 05/16] dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL) Lukasz Majewski
@ 2023-07-11 19:42 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:42 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> After enabling DM_SERIAL for XEA board, the same serial shall be used
> in the SPL (with SPL_OF_PLATDATA support).
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes
2023-05-19 10:43 ` [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes Lukasz Majewski
@ 2023-07-11 19:43 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:43 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> After the re-sync with Linux Kernel's DTS
> (SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e), the XEA's
> descripion has nodes and properties, which are NOT utilized
> in the u-boot.
> To avoid confusion - those are deleted.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 07/16] dts: xea: Remove clocks property from debug UART on XEA
2023-05-19 10:43 ` [PATCH v1 07/16] dts: xea: Remove clocks property from debug UART on XEA Lukasz Majewski
@ 2023-07-11 19:43 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:43 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> The imx287 SoC doesn't support common clock framework (CCF), so the
> 'clocks' property is removed to avoid early (i.e. in SPL) errors when
> SPL_OF_PLATDATA is used.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 12/16] arm: mxs: Prevent serial console init when in very early SPL boot code
2023-05-19 10:43 ` [PATCH v1 12/16] arm: mxs: Prevent serial console init when in very early SPL boot code Lukasz Majewski
@ 2023-07-11 19:44 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:44 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> When DM_SERIAL is enabled on mxs (i.e. imx28) platform, the console
> early initialization must be postponed until the driver model is
> correctly setup.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 15/16] config: xea: Enable DM_SERIAL for the XEA (imx287 based) board
2023-05-19 10:43 ` [PATCH v1 15/16] config: xea: Enable DM_SERIAL for the XEA (imx287 based) board Lukasz Majewski
@ 2023-07-11 19:44 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:44 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> The XEA board now supports the DM_SERIAL feature in u-boot.
> The SPL is using the SPL_OF_PLATDATA - i.e. NOT SPL_DM_SERIAL to
> reduce the overall size of the SPL binary.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 04/16] spl: xea: Provide stub DM driver for imx28 clocks
2023-05-19 10:43 ` [PATCH v1 04/16] spl: xea: Provide stub DM driver for imx28 clocks Lukasz Majewski
@ 2023-07-11 19:44 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:44 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> This code fixes following WARNING:
> DTOC spl/dts/dt-plat.c
> fsl_imx28_clkctrl: WARNING: the driver fsl_imx28_clkctrl was not found in the driver list
> As imx28 doesn't yet support common clock framework, this prevents from
> DTOC warnings during SPL build.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 16/16] config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot
2023-05-19 10:43 ` [PATCH v1 16/16] config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot Lukasz Majewski
@ 2023-07-11 19:45 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:45 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> The single binary version of u-boot for XEA board is used to debrick and
> factory programming.
> The produced u-boot.sb is a single file, which allows having fully
> operational u-boot prompt loaded with imx287 ROM.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 11/16] serial: pl01x: Modify pending callback to test if transmit FIFO is empty
2023-05-19 10:43 ` [PATCH v1 11/16] serial: pl01x: Modify pending callback to test if transmit FIFO is empty Lukasz Majewski
@ 2023-07-11 19:45 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:45 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> Before this change the FR_TXFF (Transmit FIFO full) bit (5 in
> HW_UARTDBG_FR) has been used to assess if there is still data pending
> to be sent via UART.
> This approach is problematic, as it may happen that serial is in the
> middle of transmission (so the TX FIFO is NOT full anymore) and this
> test returns true infinitely. As a result, for example in _serial_flush()
> DM serial function we are locked in endless while().
> The fix here is to test explicitly if the TX FIFO is empty.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 03/16] defconfig: xea: Change default spi-nor memory bus to 2
2023-05-19 10:43 ` [PATCH v1 03/16] defconfig: xea: Change default spi-nor memory bus to 2 Lukasz Majewski
@ 2023-07-11 19:45 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:45 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> After the re-sync with Linux kernel (v6.0) of the XEA DTS
> (SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e) the alias
> for SPI bus, to which SPI-NOR memory is connected, has changed from
> 'spi3' to 'spi2'.
> To be in sync with current u-boot's xea dts, the default bus number
> (which allows running 'sf probe' without any extra parameters given)
> has been adjusted.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 09/16] serial: pl01x: Change OF_CONTROL to OF_REAL
2023-05-19 10:43 ` [PATCH v1 09/16] serial: pl01x: Change OF_CONTROL to OF_REAL Lukasz Majewski
@ 2023-07-11 19:45 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:45 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> Before this change, building this driver for SPL with enabled SPL_DM_SERIAL
> was problematic, as '-Wunused-const-variable=' warning was visible.
> Now, the code is only considered when u-boot proper is build.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 06/16] dts: xea: Add u-boot specific 'type' property to duart
2023-05-19 10:43 ` [PATCH v1 06/16] dts: xea: Add u-boot specific 'type' property to duart Lukasz Majewski
@ 2023-07-11 19:46 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:46 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> The DM_SERIAL implicitly requires CONFIG_PL01X_SERIAL, which
> allows support for both serial IP block versions (i.e. PL011 and
> PL010).
> The decision about used IP block is based on the compatible string,
> when DM is used.
> In the XEA, the OF_PLATDATA is used to allow usage of serial driver in
> the SPL (as the size of SPL is crucial). In this case one cannot extract
> the type of IP block from .data field (corresponding to compatible) and
> it must be explicitly read at probe from dtoc generated, u-boot specific
> property.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 14/16] arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL
2023-05-19 10:43 ` [PATCH v1 14/16] arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL Lukasz Majewski
@ 2023-07-11 19:47 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:47 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> The CONFIG_PL011 used by all other ARCH_MX28 based boards is not
> supporting DM_SERIAL. Instead, other define - namely CONFIG_PL01X_SERIAL
> shall be used by boards supporting DM_SERIAL.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 13/16] arm: xea: Call spl_early_init() before DM serial console is enabled in SPL
2023-05-19 10:43 ` [PATCH v1 13/16] arm: xea: Call spl_early_init() before DM serial console is enabled in SPL Lukasz Majewski
@ 2023-07-11 19:47 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:47 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> The in-spl enabled DM serial console requires the board setup to be
> able to parse SPL_OF_PLATDATA based serial driver (pl01x) for the
> imx28 based XEA board.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v1 02/16] dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3)
2023-05-19 10:43 ` [PATCH v1 02/16] dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3) Lukasz Majewski
@ 2023-07-11 19:47 ` sbabic
0 siblings, 0 replies; 33+ messages in thread
From: sbabic @ 2023-07-11 19:47 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
> After the commit (SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e) some
> u-boot specific XEA FEC related properties have been replaced by ones
> from the Linux kernel.
> To be more specific - XEA board (and imx287 in general) has built L2
> switch connected to FEC, which needs some special treatment.
> In u-boot it is handled with 'mac0' node, whereas Linux uses dedicated
> switch DTS node.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2023-07-11 19:58 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 10:43 [PATCH v1 00/16] arm: xea: Update i.MX28 XEA board to use DM_SERIAL Lukasz Majewski
2023-05-19 10:43 ` [PATCH v1 01/16] dts: xea: Delete not used in u-boot DTS nodes Lukasz Majewski
2023-07-11 19:43 ` sbabic
2023-05-19 10:43 ` [PATCH v1 02/16] dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3) Lukasz Majewski
2023-07-11 19:47 ` sbabic
2023-05-19 10:43 ` [PATCH v1 03/16] defconfig: xea: Change default spi-nor memory bus to 2 Lukasz Majewski
2023-07-11 19:45 ` sbabic
2023-05-19 10:43 ` [PATCH v1 04/16] spl: xea: Provide stub DM driver for imx28 clocks Lukasz Majewski
2023-07-11 19:44 ` sbabic
2023-05-19 10:43 ` [PATCH v1 05/16] dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL) Lukasz Majewski
2023-07-11 19:42 ` sbabic
2023-05-19 10:43 ` [PATCH v1 06/16] dts: xea: Add u-boot specific 'type' property to duart Lukasz Majewski
2023-07-11 19:46 ` sbabic
2023-05-19 10:43 ` [PATCH v1 07/16] dts: xea: Remove clocks property from debug UART on XEA Lukasz Majewski
2023-07-11 19:43 ` sbabic
2023-05-19 10:43 ` [PATCH v1 08/16] dts: xea: Disable 'clks' node for xea (imx287) Lukasz Majewski
2023-07-11 19:42 ` sbabic
2023-05-19 10:43 ` [PATCH v1 09/16] serial: pl01x: Change OF_CONTROL to OF_REAL Lukasz Majewski
2023-07-11 19:45 ` sbabic
2023-05-19 10:43 ` [PATCH v1 10/16] serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA Lukasz Majewski
2023-07-11 19:42 ` sbabic
2023-05-19 10:43 ` [PATCH v1 11/16] serial: pl01x: Modify pending callback to test if transmit FIFO is empty Lukasz Majewski
2023-07-11 19:45 ` sbabic
2023-05-19 10:43 ` [PATCH v1 12/16] arm: mxs: Prevent serial console init when in very early SPL boot code Lukasz Majewski
2023-07-11 19:44 ` sbabic
2023-05-19 10:43 ` [PATCH v1 13/16] arm: xea: Call spl_early_init() before DM serial console is enabled in SPL Lukasz Majewski
2023-07-11 19:47 ` sbabic
2023-05-19 10:43 ` [PATCH v1 14/16] arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL Lukasz Majewski
2023-07-11 19:47 ` sbabic
2023-05-19 10:43 ` [PATCH v1 15/16] config: xea: Enable DM_SERIAL for the XEA (imx287 based) board Lukasz Majewski
2023-07-11 19:44 ` sbabic
2023-05-19 10:43 ` [PATCH v1 16/16] config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot Lukasz Majewski
2023-07-11 19:45 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox