Skip to contentSkip to conversation

imx: Fixes for i.MX53 based HSC|DDC boards

PATCH New Lukasz Majewski 3 participants 9 messages Feb 26, 2020 – Apr 19, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover imx: Fixes for i.MX53 based HSC|DDC boards

This short patch series fixes i.MX53 based boards from K+P, namely HSC and DDC.

It also requires a USB fix patch:
"usb: ehci-mx5: Fix bus enumeration for DM case"
https://patchwork.ozlabs.org/patch/1119811/

Travis-CI:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/654970410

Applied on top of SHA1: 133276f14acfbad4268acd19a70d3cda0a60b5e3

Lukasz Majewski (4):
config: cosmetic: Cleanup of imx53 - HSC and DDC config file
dts: imx: Add fixed-link property to HSC and DDC (imx53) devices
config: imx: Enable CONFIG_PHY_FIXED on HSC and DDC i.MX53 boards
imx: pmic: Set proper pmic name for iMX53 HSC|DDC boards

 arch/arm/dts/imx53-kp-u-boot.dtsi | 7 +++++++
 board/k+p/kp_imx53/kp_imx53.c     | 2 +-
 configs/kp_imx53_defconfig        | 3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/4 config: cosmetic: Cleanup of imx53 - HSC and DDC config file

This change was introduced after running make savedefconfig on newest master U-Boot (SHA1: 8e51bf746a11d7f67416859).

---

 configs/kp_imx53_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/kp_imx53_defconfig +1 -1
index 8f3a938a85..f29dec0161 100644
@@ -5,6 +5,7 @@ CONFIG_TARGET_KP_IMX53=y
 CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_OFFSET_REDUND=0x102000
 # CONFIG_CMD_BMODE is not set
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx53loco/imximage.cfg"
@@ -32,7 +33,6 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx53-kp"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
-CONFIG_ENV_OFFSET_REDUND=0x102000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
 CONFIG_I2C_DEFAULT_BUS_NUMBER=0x1
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/4 dts: imx: Add fixed-link property to HSC and DDC (imx53) devices

In reply to Lukasz Majewski

Those two boards are supposed to be run with a single u-boot binary. There are notable differences though - HSC uses DSA switch (which phy_id == 0x0) and DCC (DP83848C).

After the commit 3bf135b6c367
("drivers: net: phy: Ignore PHY ID 0 during PHY probing") the PHY devices with phy_id == 0 are not created in U-Boot anymore. This caused regression on HSC.

To fix this problem - the fec's 'fixed-link' node has been introduced and the phy_id is not assessed anymore. This approach works on both boards.

---

 arch/arm/dts/imx53-kp-u-boot.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/dts/imx53-kp-u-boot.dtsi +7 -0
index acab9b3657..a112db9d1a 100644
@@ -5,6 +5,13 @@
  * SPDX-License-Identifier:     GPL-2.0+ or X11
  */
 
+&fec {
+	fixed-link { /* RMII fixed link for both HSC|DDC */
+		speed = <100>;
+		full-duplex;
+	};
+};
+
 &pmic {
 	u-boot,i2c-transaction-bytes = <3>;
 };
Signature · 1 line
2.20.1
#3 lore raw

PATCH 2/4 dts: imx: Add fixed-link property to HSC and DDC (imx53) devices

Quoted 10 lines

Those two boards are supposed to be run with a single u-boot binary. There are notable differences though - HSC uses DSA switch (which phy_id == 0x0) and DCC (DP83848C).
After the commit 3bf135b6c367
("drivers: net: phy: Ignore PHY ID 0 during PHY probing") the PHY devices with phy_id == 0 are not created in U-Boot anymore. This caused regression on HSC.
To fix this problem - the fec's 'fixed-link' node has been introduced and the phy_id is not assessed anymore. This approach works on both boards.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 3/4 config: imx: Enable CONFIG_PHY_FIXED on HSC and DDC i.MX53 boards

In reply to Lukasz Majewski

The CONFIG_PHY_FIXED is necessary to allow DSA switch work in U-Boot after the
commit 3bf135b6c367 ("drivers: net: phy: Ignore PHY ID 0 during PHY probing").

This particular device - LAN9303 - returns phy_id == 0. With CONFIG_PHY_FIXED enabled HSC and DDC boards work again with the same U-Boot binary.

---

 configs/kp_imx53_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/kp_imx53_defconfig +1 -0
index f29dec0161..096ba53236 100644
@@ -40,6 +40,7 @@ CONFIG_FSL_ESDHC_IMX=y
 CONFIG_MTD=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_SMSC=y
+CONFIG_PHY_FIXED=y
 CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
Signature · 1 line
2.20.1
#5 lore raw

PATCH 3/4 config: imx: Enable CONFIG_PHY_FIXED on HSC and DDC i.MX53 boards

Quoted 7 lines

The CONFIG_PHY_FIXED is necessary to allow DSA switch work in U-Boot after the
commit 3bf135b6c367 ("drivers: net: phy: Ignore PHY ID 0 during PHY probing"). This particular device - LAN9303 - returns phy_id == 0. With CONFIG_PHY_FIXED enabled HSC and DDC boards work again with the same U-Boot binary.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#6 lore raw

PATCH 4/4 imx: pmic: Set proper pmic name for iMX53 HSC|DDC boards

In reply to Lukasz Majewski

After the
commit 4213609cc7fb ("drivers: core: use strcmp when find device by name") the exact DTS node name for PMIC device must be provided.

This patch fixes this issue by providing full DTS node name ('mc34708 at 8').

---

 board/k+p/kp_imx53/kp_imx53.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/k+p/kp_imx53/kp_imx53.c +1 -1
index 2f57310e27..eb5b67d1e6 100644
@@ -48,7 +48,7 @@ static int power_init(void)
 	struct udevice *dev;
 	int ret;
 
-	ret = pmic_get("mc34708", &dev);
+	ret = pmic_get("mc34708 at 8", &dev);
 	if (ret) {
 		printf("%s: mc34708 not found !\n", __func__);
 		return ret;
Signature · 1 line
2.20.1
#7 lore raw

PATCH 4/4 imx: pmic: Set proper pmic name for iMX53 HSC|DDC boards

Quoted 7 lines · Lukasz Majewski

After the
commit 4213609cc7fb ("drivers: core: use strcmp when find device by name") the exact DTS node name for PMIC device must be provided.

This patch fixes this issue by providing full DTS node name ('mc34708 at 8').

Quoted 19 lines

---

 board/k+p/kp_imx53/kp_imx53.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/k+p/kp_imx53/kp_imx53.c +1 -1
index 2f57310e27..eb5b67d1e6 100644
@@ -48,7 +48,7 @@ static int power_init(void)
 	struct udevice *dev;
 	int ret;
 
-	ret = pmic_get("mc34708", &dev);
+	ret = pmic_get("mc34708 at 8", &dev);
 	if (ret) {
 		printf("%s: mc34708 not found !\n", __func__);
 		return ret;
#8 lore raw

PATCH 4/4 imx: pmic: Set proper pmic name for iMX53 HSC|DDC boards

In reply to Lukasz Majewski
Quoted 6 lines

After the
commit 4213609cc7fb ("drivers: core: use strcmp when find device by name") the exact DTS node name for PMIC device must be provided.
This patch fixes this issue by providing full DTS node name ('mc34708 at 8').

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================