Skip to content

Commit 322eda2

Browse files
authored
Merge pull request #213 from Ultimaker/CES-3178_Add_Microchip_USB2514B_Device_tree_config
[CES-3178] Add Microchip USB2514B device tree config
2 parents 57e23d5 + 7030793 commit 322eda2

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

configs/sx8m_revB_config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5293,7 +5293,7 @@ CONFIG_USB_EHSET_TEST_FIXTURE=y
52935293
# CONFIG_USB_ISIGHTFW is not set
52945294
# CONFIG_USB_YUREX is not set
52955295
# CONFIG_USB_EZUSB_FX2 is not set
5296-
# CONFIG_USB_HUB_USB251XB is not set
5296+
CONFIG_USB_HUB_USB251XB=y
52975297
CONFIG_USB_HSIC_USB3503=y
52985298
# CONFIG_USB_HSIC_USB4604 is not set
52995299
# CONFIG_USB_LINK_LAYER_TEST is not set

dts/ultimainboard5-lvds.dtsi

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
fsl,pins = <
4242
MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29 0x080 /* GPIO4 / SAFETY_ENABLED (input) */
4343
MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x080 /* GPIO6 / SOM_BOOT (IMXRT BootMode Enable) */
44-
MX8MM_IOMUXC_SAI1_RXC_GPIO4_IO1 0x100 /* GPIO7 / USB RESET_HUB# */
44+
MX8MM_IOMUXC_SAI1_RXC_GPIO4_IO1 0x140 /* GPIO7 / USB RESET_HUB# */
4545
MX8MM_IOMUXC_SAI1_TXC_GPIO4_IO11 0x140 /* GPIO9 */
4646
MX8MM_IOMUXC_SAI1_TXFS_GPIO4_IO10 0x100 /* GPIO10 / U12 EEPROM WRITE PROTECT */
4747
MX8MM_IOMUXC_SAI1_MCLK_GPIO4_IO20 0x080 /* GPIO11 / SOM_nRST (IMXRT_nReset) */
@@ -116,6 +116,29 @@
116116
};
117117

118118
&i2c3 {
119+
/* CES-3178: The S6 camera appears to have power-up issues when the board is powered on with the camera connected.
120+
This was addressed in hardware (see ELS-458), but it introduced a worse side effect: the S8 camera now causes
121+
the i.MX8 USB Host Controller to freeze during boot (see ELS-462).
122+
123+
The root cause appears to be the time the S8 camera takes to power up. The Microchip USB2514B hub, when operating
124+
in standalone mode (not configured via I2C), uses a default POWER-ON TIME of 100 ms. This is the delay the hub
125+
waits before attempting to enumerate devices after enabling power to the port via the PRTPWR pins. For the S8 camera,
126+
100 ms does not seem sufficient for it to be fully ready for enumeration, leading to failures.
127+
128+
Connecting the USB2514B to the I2C bus and increasing the POWER-ON TIME to 110 ms resolves the issue. In this configuration,
129+
we set it to 200 ms to be on the safe side.
130+
*/
131+
132+
usb2514b@2c {
133+
compatible = "microchip,usb2514b";
134+
reg = <0x2c>;
135+
reset-gpios = <&gpio4 01 GPIO_ACTIVE_HIGH>;
136+
self-powered;
137+
individual-sensing;
138+
individual-port-switching;
139+
power-on-time-ms = <200>;
140+
};
141+
119142
tca6416@20 {
120143
compatible = "ti,tca6416";
121144
reg = <0x20>;
@@ -194,7 +217,7 @@
194217

195218
/* Set pin names for IMXRT control lines */
196219
&gpio4 {
197-
gpio-line-names = "TCA6416A_nINT", "", "", "", "", "", "", "RESET_OUT",
220+
gpio-line-names = "TCA6416A_nINT", "USB2514B_Reset", "", "", "", "", "", "RESET_OUT",
198221
"", "", "", "", "", "", "", "",
199222
"", "", "", "", "IMXRT_nReset", "", "", "",
200223
"", "", "", "", "IMXRT_BootMode_En", "SAFETY_ENABLED", "", "";

initramfs/init.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ check_and_set_eeprom_data()
286286
find_and_run_update()
287287
{
288288
SOFTWARE_INSTALL_MODE="update"
289+
FORCE_REBOOT_AFTER_UPDATE="no"
289290
if isBootingRestoreImage || [ "${FORCE_RESTORE_MODE}" = "yes" ]; then
290291
SOFTWARE_INSTALL_MODE="restore"
291292
fi
@@ -310,6 +311,7 @@ find_and_run_update()
310311
# If there is a file to trigger the restore mode, rename it to update and set the restore flag
311312
if [ -r "${UPDATE_SRC_MOUNT}/${RESTORE_TRIGGER_IMAGE}" ]; then
312313
SOFTWARE_INSTALL_MODE="restore"
314+
FORCE_REBOOT_AFTER_UPDATE="yes" # We can reboot after the update since there is no sd card inserted.
313315
mv "${UPDATE_SRC_MOUNT}/${RESTORE_TRIGGER_IMAGE}" "${UPDATE_SRC_MOUNT}/${UPDATE_IMAGE}"
314316
fi;
315317

@@ -372,7 +374,7 @@ find_and_run_update()
372374
fi
373375

374376
# After restore do not remove the file and loop endlessly
375-
if [ "${SOFTWARE_INSTALL_MODE}" = "restore" ]; then
377+
if [ "${SOFTWARE_INSTALL_MODE}" = "restore" ] && [ "${FORCE_REBOOT_AFTER_UPDATE}" = "no" ]; then
376378
restore_complete_loop
377379
fi
378380

0 commit comments

Comments
 (0)