imx8qxp scfw (i2c1, uart3)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8qxp scfw (i2c1, uart3)

4,750件の閲覧回数
yoonseok
Contributor III

From imx8qxxp.

I'm going to write uart3 i2c1 on linux.

scfw board.c function board_system_config

static const sc_rsrc_t rsrc_list[10U] =
{
SC_R_SYSTEM,
SC_R_IRQSTR_M4_0,
SC_R_MU_5B,
SC_R_MU_8B,
SC_R_GPT_4,
RM_RANGE(SC_R_CAN_0, SC_R_CAN_2),
SC_R_I2C_1,
SC_R_FSPI_0,
SC_R_SECO_MU_4
};

/* List of pads */
static const sc_pad_t pad_list[8U] =
{
RM_RANGE(SC_P_ADC_IN1, SC_P_ADC_IN2),
RM_RANGE(SC_P_FLEXCAN0_RX, SC_P_FLEXCAN2_TX),
SC_P_USB_SS3_TC1,
SC_P_USB_SS3_TC3,
RM_RANGE(SC_P_QSPI0A_DATA0, SC_P_COMP_CTL_GPIO_1V8_3V3_QSPI0B)
};

Here, SC_R_I2C_1, SC_P_USB_SS3_TC1, and SC_P_USB_SS3_TC3 are, I2C1 crashes on Linux.
SC_R_CAN_2, SC_P_FLEXCAN2_RX, and SC_P_FLEXCAN2_TX collide with uart3 in linux.

static const sc_rsrc_t rsrc_list[10U] =
{
SC_R_SYSTEM,
SC_R_IRQSTR_M4_0,
SC_R_MU_5B,
SC_R_MU_8B,
SC_R_GPT_4,
// RM_RANGE(SC_R_CAN_0, SC_R_CAN_2),
// SC_R_I2C_1,
SC_R_FSPI_0,
SC_R_SECO_MU_4
};

/* List of pads */
static const sc_pad_t pad_list[8U] =
{
RM_RANGE(SC_P_ADC_IN1, SC_P_ADC_IN2),
RM_RANGE(SC_P_FLEXCAN0_RX, SC_P_FLEXCAN2_TX),
// SC_P_USB_SS3_TC1,
// SC_P_USB_SS3_TC3,
RM_RANGE(SC_P_QSPI0A_DATA0, SC_P_COMP_CTL_GPIO_1V8_3V3_QSPI0B)
};
When scfw.bin is created and executed in this way, uart3 tx does not work and i2c1 does not call peri pre-empted in the device tree, so it does not work.

Please help me.

Attach the partition table(partition.txt)

 

 

0 件の賞賛
返信
5 返答(返信)

3,833件の閲覧回数
dry
Senior Contributor I

@yoonseok  @igorpadykov 

.. and I can confirm what OP was saying, I have just changed that device tree as you have referred to, and while LP3 UART is on the Linux side and the dev file can be accessed, there is No traces / output that coming in /out that port ...

0 件の賞賛
返信

4,744件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Yoonseok

 

i2c1, uart3 are enabled in imx8x-mek.dtsi (linux image without m4)

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8x-mek.dt...

However they are disabled in imx8x-mek-rpmsg.dtsi (image with m4)

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8x-mek-rp...

So one can use i2c1, uart3 in linux without m4. If it is necessary to use image with m4, then

for enabling i2c1, uart3 it is necessary to follow below link, "Modifying default configuration"

(example for moving FlexCAN to A core partition) and move i2c1, uart3 to A35 partition

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/System-Controller-Firmware-101-Resource-...

 

Best regards
igor

0 件の賞賛
返信

4,722件の閲覧回数
yoonseok
Contributor III

When using i2c1 and uart3,
Are you saying that it is okay to change only dts(imx8x-mek.dtsi , imx8x-mek-rpmsg.dtsi ) without changing scfw?

0 件の賞賛
返信

4,727件の閲覧回数
yoonseok
Contributor III

As you said, I set up about uart3.

Uart3 is enabled. The following is a boot message.
There is no other setting related to uart3 in dtb.

printk: console [ttyLP0] enabled
[ 1.016702] printk: bootconsole [lpuart32] disabled
[ 1.016702] printk: bootconsole [lpuart32] disabled
[ 1.026845] fsl-lpuart 5a060000.serial: DMA tx channel request failed, operating without tx DMA
[ 1.035563] fsl-lpuart 5a060000.serial: DMA rx channel request failed, operating without rx DMA
[ 1.044807] 5a070000.serial: ttyLP1 at MMIO 0x5a070010 (irq = 47, base_baud = 5000000) is a FSL_LPUART
[ 1.055124] 5a080000.serial: ttyLP2 at MMIO 0x5a080010 (irq = 48, base_baud = 5000000) is a FSL_LPUART
[ 1.065142] imx8qxp-pinctrl scu:pinctrl: pin_config_set op failed for pin 110
[ 1.072304] fsl-lpuart 5a090000.serial: Error applying setting, reverse things back
[ 1.080247] 5a090000.serial: ttyLP3 at MMIO 0x5a090010 (irq = 49, base_baud = 5000000) is a FSL_LPUART
[ 1.154864] loop: module loaded
[ 1.163357] imx ahci driver is registered.
[ 1.178561] libphy: Fixed MDIO Bus: probed

0 件の賞賛
返信

4,740件の閲覧回数
yoonseok
Contributor III

on  imx8x-mek.dtsi   imx8x-mek-rpmsg.dtsi

I set i2c1 and uart3 enabled.

If flash.bin is created with scfw_tcm.bin distributed together in kernel, i2c will operate.
Of course, the following message comes out.

i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.1: new channel: 0x400 -> 0x1!
[ 2.555858] imx8qxp-pinctrl scu:pinctrl: pin_config_set op failed for pin 5
[ 2.562857] imx_rpmsg_i2c bus@5a000000:i2c-rpbus-1: Error applying setting, reverse things back
[ 2.572115] it6263_probe
[ 2.574944] it6263_probe 1111111111
[ 2.638142] it6263_probe 2222222222
[ 2.644344] it6263_probe 3333333333
[ 2.648496] it6263_probe 444444444
[ 2.652538] it6263_probe 555555555
[ 2.656594] it6263_probe 666666666
[ 2.662516] it6263_probe 7777777777
[ 2.682276] it6263_probe OK
[ 2.685838] imx_rpmsg_i2c bus@5a000000:i2c-rpbus-1: add I2C adapter i2c-rpmsg-adapter successfully

It6263 is connected to i2c1.


As above, if you make flash.bin with the newly created scfw_tcm.bin,
There's no error message, but kernel doesn't do anything about i2c1.
 

 

 

0 件の賞賛
返信