Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
FRDM iMX95 上的 JTAG 大家好 我最近刚买了 FRDM iMx95,我很好奇如何使用 JTAG 来调试这个板 根据原理图,JTAG 接口在此处的第 6 个测试点引脚上暴露出来  在板布局上,在这里 我该如何将 JTAG 连接到它,需要进行任何返工吗?那么,这个 JTAG 是否支持对所有 A55、M33 和 M7 核心进行调试?  我应该在这里用哪个设备,看来我们有 6 针但它是 2x3 而不是 1x6 如果有任何设置 JTAG 的指南或文档,我将不胜感激 谢谢!!   Linux Re: JTAG on FRDM iMX95 你好 你的理解是正确的。 如原理图所示,需要添加 DNP 电阻和一个用于调试器的连接器。 顺祝商祺! Re: JTAG on FRDM iMX95 你好, 感谢您的确认@JorgeCas 摘要:请帮忙解决 JTAG 问题“DAP:无法启动系统功率域。” 我已经对 3 个电阻进行了改造,并测量了引脚,它成功上拉了。 需要注意的是,要启用 JTAG,我需要在设备树中禁用 LPUART5,因为它使用相同的引脚(我按照 imx95-19x19-jtag.dtb 中的修改方式进行修改),否则 TMS(测试点 49)将始终为低电平。 diff --git a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts index c45f28efb568..598e16af0ebd 100644 --- a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts +++ b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts @@ -520,7 +520,7 @@ &lpuart5 { /* BT */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart5>; - status = "okay"; + status = "disabled"; bluetooth { compatible = "nxp,88w8987-bt"; 接下来我需要找到针脚为 1.27mm 的连接器。我花了一些时间才找到这个用弹簧针测试的PCB板,它有6个引脚,完美匹配。 这是我目前的配置。 看起来有点乱,但连接没问题,我检查了硬件状态,看起来不错。 J-Link>ShowHWStatus VTref=3.324V ITarget=0mA TCK=1 TDI=1 TDO=0 TMS=0 TRES=1 TRST=1 Supported target interface speeds: - 120 MHz/n, (n>=8). => 15000kHz, 13333kHz, 12000kHz, ... - Adaptive clocking 我尝试使用这两条命令连接 A55 和 M33,但出现同样的问题,显示“ DAP:无法启动系统功率域”。 zk47@ltu:~$ JLinkExe -device MIMX9516_M33 -if JTAG -speed 200 SEGGER J-Link Commander V9.42 (Compiled May 6 2026 12:36:02) DLL version V9.42, compiled May 6 2026 12:35:00 zk47@ltu:~$ JLinkExe -device MIMX9516_A55 -if JTAG -speed 200 我做错了什么? 或许是我的JLink设备不好用,MCU-Link Pro可以替代它吗?MCU-Link Pro 可以调试 A55 和 M 内核吗? 我还是更倾向于通过 JTAG 进行调试,因为我手头已经有了 JTAG。请帮忙 如果你们计划为 FRDM iMX95 添加 JTAG 文档指南,请尽快更新,就像 FRDM iMX93 一样。 Re: JTAG on FRDM iMX95 亲爱的@JorgeCas 有任何更新吗?我可以使用MCU-Link Pro调试所有A55、M33和M7核心吗? Re: JTAG on FRDM iMX95 你好 很抱歉耽搁了这么久。 我们建议您使用 MACRAIGOR Systems、Wind River 或 ARM 的任何调试器。 NXP 团队使用 Lauterbach Trace32 作为 Cortex-A 内核的调试工具,而 J-link 用于 Cortex-M 内核。 对于 i.MX95,要使用 CM7 或 CA55 脚本,前提是 SM 已经在i.MX设备上运行。它采用 CM33 进行资源管理和网络安全,它是开源的,符合 Arm 的硬件资源管理标准,其代码(在很多情况下)旨在对硬件进行分区,并将资源分配给 Cortex-A 或 Cortex-M7。 您可以将此文档用作参考。 在 i.MX 8M、i.MX 8ULP 和 i.MX 9 上使用 VS Code 调试 Cortex-M 如果经过以上检查后问题仍然存在,请检查适配器是否存在硬件问题。 顺祝商祺!  Re: JTAG on FRDM iMX95 亲爱的@JorgeCas 感谢你的回复。 好吧,硬件可能确实是问题所在,但我仍然对这些事情感到疑惑。 能否提供一张您调试设置的图片?我不太清楚连接这些测试点的官方方法是什么。我们需要使用这种东西吗? 2. 文档只针对调试核心 M,不针对核心 A。您能否提供更多关于“使用 Trace32、JLink 或MACRAIGOR调试 Linux 核心 A”的指南,就像您所说的那样? 3.虽然与本帖无关,但请问FRDM iMX95 Pro的预计发布日期是什么时候? Re: JTAG on FRDM iMX95 你好 1. 我们现有的测试用板没有进行任何修改,因为如果需要 JTAG,我们会使用 EVK 而不是 FRDM 板。建议尽可能使用较短的导线连接电路板和调试器,以确保良好的连接和信号完整性。 正如你在这篇文章中看到的,这个问题是通过将更短的电缆焊接到电路板上解决的。 2. 由于每个制造商都使用自己的流程和脚本与处理器连接,因此该信息在探针手册中。我们这边没有关于这些探针连接的文档。 3. 很遗憾,我们没有这方面的信息,建议您查看我们的官方网站以获取更多更新信息。 顺祝商祺! Re: JTAG on FRDM iMX95 亲爱的@bbggl 我仍然无法让它在 FRDM iMX95 主板上运行。当我升级到 FRDM iMX95 Pro 时,它的引脚布局更加混乱。我不再研究这些板上的 JTAG 接口了。 正如@JorgeCas建议的那样,你应该问问这个帖子里的作者,因为他们说他们成功地做到了。 Re: JTAG on FRDM iMX95 @Zk47T你好,我想问一下你是否成功调试了板上的 Cortex 内核,以及你是否可以与我分享一些建议。 我目前在调试 M7 内核时也遇到了同样的问题,希望得到一些帮助。 谢谢! Re: JTAG on FRDM iMX95 谢谢你的回复,我已经联系了另一位作者。 你们最终决定采用什么样的调试设置?是否有其他类似 MCU Link 或 EVK 板的设备效果更好,或者您是否使用过其他方法?
查看全文
ホストPC上のSPIGenを使用してFRDMPT2001EVMのDRVENピンとRESETBピンを駆動できません こんにちは、 KTFRDMPT2001EVMUG.pdfに従ってFRDM-KL25Zボードを設定し、ケーブルでPCに接続しました。FRDM-KL25Z基板上の青色LEDが点灯します。ホストPCのSPIGenで*.spiファイルを読み込んだ後、通常通りレジスタをダウンロードし読み書きできるようになりました。しかし、DRVENとRESETBのピンはデフォルトのままです。 SPIGenパネルやGUIのボタンを使って、基板上の対応するピンを高くまたは低く動かすことはできません。 この問題をどう解決すればいいでしょうか?お返事ありがとうございます! PT2001 FRDM-KL25Z Re: Unable to drive DRVEN and RESETB pins on FRDMPT2001EVM using SPIGen on the host PC こんにちは、Lex( @LexLiu ) SPIGen SWでFRDMPT2001EVMのDRVENピンとRESETBピンの両方を駆動する際の問題について、この質問についてご協力いただけますか? よろしくお願いします! BRs、トーマス
查看全文
mcxn947 加密区指定可范围么,程序内部フラッシュ加密区 暗号化や署名は特定のフラッシュ空間の範囲に適用できますか? 暗号化されたフラッシュ領域内におけるプログラム自身の読み書き動作は、以前とどのように異なりますか(読み戻されるデータは暗号文ですか?書き込まれるデータは平文ですか?)? OTAアップグレードの際、チップの暗号化/復号に適合するアーキテクチャを競合なくするにはどうすればよいのでしょうか? Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 こんにちは、 まず明確にしておきたいのは、暗号化が有効になると、チップ上で実行されているプログラムがフラッシュメモリに書き込む際、書き込まれるデータは平文ですが、最終的にフラッシュメモリに保存されるのは暗号文です。そして、チップ上で実行されているプログラムがフラッシュメモリ内の暗号文を読み取ると、平文として出力されます。 正しい 上記の観点に基づくと: そして、Secure Provisioningソフトウェアが読み取るSBファイルは暗号文であり、シリアルISP経由でチップの純正ISP ROMブートローダーに送られるものも暗号文でなければなりません(そうでなければ論理的な欠陥が生じます)。工場出荷時のISP ROMブートローダーは、シリアル通信で受信した暗号文を平文に復号化し、その平文データをフラッシュメモリに書き込みますが、最終的にフラッシュメモリに保存されたデータは再び暗号化され、暗号文になります。 つまり、ISPプログラミング中、工場出荷時のISP ROMブートローダーはまず復号化を行い、次に暗号化を行うため、復号化と暗号化の往復処理が行われる。 もう少し詳しく説明させてください。 はい、SBファイルは暗号化されているため、フラッシュメモリに書き込む前にROMで復号化する必要があります。しかし、SBファイルはOEMと製造工場間のファームウェアを保護するために、完全に独立して暗号化されています。 フラッシュメモリのプログラミング(内蔵型か外付け型かを問わず)はまた別の話で、全く使用されないか、あるいは異なるアルゴリズム、初期ベクトルなどを用いて使用されます。 よろしくお願いいたします。 リボル Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 まず明確にしておきたいのは、暗号化が有効になると、チップ上で実行されているプログラムがフラッシュメモリに書き込む際、書き込まれるデータは平文ですが、最終的にフラッシュメモリに保存されるのは暗号文です。そして、チップ上で実行されているプログラムがフラッシュメモリ内の暗号文を読み取ると、平文として出力されます。   上記の観点に基づくと: そして、Secure Provisioningソフトウェアが読み取るSBファイルは暗号文であり、シリアルISP経由でチップの純正ISP ROMブートローダーに送られるものも暗号文でなければなりません(そうでなければ論理的な欠陥が生じます)。工場出荷時のISP ROMブートローダーは、シリアル通信で受信した暗号文を平文に復号化し、その平文データをフラッシュメモリに書き込みますが、最終的にフラッシュメモリに保存されたデータは再び暗号化され、暗号文になります。 つまり、ISPプログラミング中、工場出荷時のISP ROMブートローダーはまず復号化を行い、次に暗号化を行うため、復号化と暗号化の往復処理が行われる。                           Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 こんにちは、 MCXNデバイスの場合: 暗号化や署名は特定のフラッシュ空間の範囲に適用できますか? SECツール: - アプリケーション全体に署名 - 暗号化領域は製品のライフ期間中に一度設定され、FUTUREのアップデート(アプリの拡張)のために予約を取る必要があります。 暗号化されたフラッシュ領域内におけるプログラム自身の読み書き動作は、以前とどのように異なりますか(読み戻されるデータは暗号文ですか?書き込まれるデータは平文ですか?)? 暗号化/復号化はリアルタイムで行われます。アプリがフラッシュメモリから読み込む場合、そのことを気にする必要はありません。透過的に処理されます。アプリケーション自体から暗号化されたフラッシュ領域に書き込むことについては、調査が必要です。注意点があるかはわかりません。 OTAアップグレードの際、チップの暗号化/復号に適合するアーキテクチャを競合なくするにはどうすればよいのでしょうか? 前述のとおり、暗号化には適切なサイズのメモリ領域を指定する必要があります。もしアプリケーションが暗号化領域を超えた場合、OTAは動作しますが、暗号化圏外のアプリ部分だけが動作し、IPアドレスは暗号化で保護されません。 よろしくお願いいたします。 リボル
查看全文
PROMO Coupon Hi, Why is my promo coupon 'ADCWFBXT' not valid for the FRDM-MCXN236. Pramod Joglekar [email protected] Development Board FRDM-Training Re: PROMO Coupon Please note that the coupon ADCWFBXT was valid until December 30th, 2025. As stated at our website: FRDM to Innovate - On us!    Wishing you a nice day. Re: PROMO Coupon Even I am not able to use the promo coupon for FRDM-MCXN236.
查看全文
camera on imx93 board Hi,      I am try to turn on topaz2m camera on imx93 platform board. when I  try to drive camera to output data, v412-ctl is stuck. I enabled the debug printing in CSI driver, get below result.  # v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=GREY; setsid -f v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1 topaz2m 1-0010: mbus_fmt: 2001 mxc-mipi-csi2.0: format: 0x2001 bypass csc input fmt GREY output fmt GREY dwc-mipi-csi2-host 4ae00000.csi: enter enable=1 dwc-mipi-csi2-host 4ae00000.csi: data_type:0x1e, virtual chan: 0 dwc-mipi-csi2-host 4ae00000.csi: hsa_time=0, hbp_time=0, hsd_time=0, hline_time=1280 dwc-mipi-csi2-host 4ae00000.csi: ipi mode: camera, color_mode: color mode 48 dwc-mipi-csi2-host 4ae00000.csi: format: 0x2001, w/h=(1920, 1080) dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 Version: 0x3135302a dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 lanes: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 HOST RESETN: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT STATUS MAIN: 0x40000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS2: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY CFG: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY MODE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT STATUS AP MAIN: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS VC1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS VC2: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY SHUTDOWN: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY RESET: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY RX STATUS: 0x30000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY STOP STATUS: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY TEST CTRL0: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY TEST CTRL1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG PATTERN HIGH: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG PATTERN WIDTH: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG CONFIG: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG ENABLE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG STATUS: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI MODE: 0x1010000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI VCID: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI DATA TYPE: 0x1e dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI SOFT RESET: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI ADV FEATURE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PHY_FATAL: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PKT_FATAL: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PHY: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_IPI_FATAL: 0x7f dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_BNDRY_FRAME_FATAL: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_SEQ_FRAME_FATAL: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_DATA_ID: 0x0 dwc-mipi-csi2-host 4ae00000.csi: gasket: CAMERA MUX: 0x10150 dwc-mipi-csi2-host 4ae00000.csi: gasket: CSI REG: 0x22c1c dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI pixel ctrl: 0xe07 dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI pixel cnt: 0x0 dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI line cnt: 0x0 ~# /unit_tests/memtool 4ae00140 1 E Reading 0x1 count starting at address 0x4AE00140 0x4AE00140: 00000020 # cat /sys/kernel/debug/clk/cam_pix_root/clk_rate 300000000 from the above result, can see: 1. INT_ST_IPI_FATAL is set, which show fatal IPI interrupt is triggered.  2. IPI interrupt status register shows FIFO is full (data overflow causes data lose) Is the result indicates the pixel clock is not fast enough? but I set it already very high (300000000) /*************************************************************************************** * camera - CSI@4ae00000 - topaz2m: 0x10@I2C2@44350000 * 1. power pin: OSM U6 P0_7 * 2. reset pin: OSM U6 P0_6 * 3. bus-type: 4 (MEDIA_BUS_TYPE_CSI2_DPHY) * 4. cfg-clk-range: 28 (24M) https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/ov5640-support-on-i-mx93-with-6-12-20-bsp/ta-p/2129317 * 5. hs-clk-range: 0x2b (1500M, imx93 RM page 4542) * 6. data-lanes: 2 **************************************************************************************/ set_node_property(&mipi_csi_ep, remote-endpoint, <&edp_from_mipi_csi_topaz2m>); set_node_property(&mipi_csi_ep, hs-clk-range, <0x2c>); set_node_property(&mipi_csi, assigned-clock-rates, comma(<300000000>, <24000000>)); &lpi2c2 { topaz2m_csi0: topaz2m@10 { compatible = "teledyne,topaz2m"; reg = <0x10>; lid-gpio = <&gpioex_osm_u6 7 GPIO_ACTIVE_HIGH>; pwdn-gpio = <&gpioex_osm_u6 6 GPIO_ACTIVE_HIGH>; csi_id = <0>; mclk = <24000000>; port { edp_from_mipi_csi_topaz2m: endpoint { remote-endpoint = <&mipi_csi_ep>; }; }; }; }; Do you help to share some suggestion so I can go next? Best regards. Johnson Linux Multimedia Re: camera on imx93 board Hi @joanxie ,       kernel version is 6.6.52.      In my previous post, I share related dts already. anyway, I share here again. #include "imx93-11x11-evk.dts" #define set_node_property(n, p, v) n { p = v ; } /*************************************************************************************** * camera - CSI@4ae00000 - topaz2m: 0x10@I2C2@44350000 * 1. power pin: OSM U6 P0_7 * 2. reset pin: OSM U6 P0_6 * 3. bus-type: 4 (MEDIA_BUS_TYPE_CSI2_DPHY) * 4. cfg-clk-range: 28 (24M) https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/ov5640-support-on-i-mx93-with-6-12-20-bsp/ta-p/2129317 * 5. hs-clk-range: 0x2b (1500M, imx93 RM page 4542) * 6. data-lanes: 2 **************************************************************************************/ set_node_property(&mipi_csi_ep, remote-endpoint, <&edp_from_mipi_csi_topaz2m>); set_node_property(&mipi_csi_ep, hs-clk-range, <0x2c>); set_node_property(&mipi_csi, assigned-clock-rates, comma(<300000000>, <24000000>)); &lpi2c2 { topaz2m_csi0: topaz2m@10 { compatible = "teledyne,topaz2m"; reg = <0x10>; lid-gpio = <&gpioex_osm_u6 7 GPIO_ACTIVE_HIGH>; pwdn-gpio = <&gpioex_osm_u6 6 GPIO_ACTIVE_HIGH>; csi_id = <0>; mclk = <24000000>; port { edp_from_mipi_csi_topaz2m: endpoint { remote-endpoint = <&mipi_csi_ep>; }; }; }; }; Also there is some patch to CSI/ISI driver. CSI patch is I added for imx93, ISI patch is also used on imx8mp and validate working. diff --git a/drivers/staging/media/imx/dwc-mipi-csi2.c b/drivers/staging/media/imx/dwc-mipi-csi2.c index 8a24b0231596..4a29d422d1f1 100644 --- a/drivers/staging/media/imx/dwc-mipi-csi2.c +++ b/drivers/staging/media/imx/dwc-mipi-csi2.c @@ -33,12 +33,12 @@ #include #include #include - +#undef dev_dbg /* * DWC MIPI CSI2 Host registers */ #define DWC_MIPI_CSI2_VERSION 0x0 - +#define dev_dbg dev_info #define DWC_MIPI_CSI2_N_LANES 0x4 #define DWC_MIPI_CSI2_N_LANES_N_LANES(x) ((x) & 0x7) @@ -401,6 +401,12 @@ static const struct csi2h_pix_format dwc_csi2h_formats[] = { }, { .code = MEDIA_BUS_FMT_SBGGR12_1X12, .fmt_reg = 0x2C, + }, { + .code = MEDIA_BUS_FMT_Y8_1X8, + .fmt_reg = 0x2A, + }, { + .code = MEDIA_BUS_FMT_Y10_1X10, + .fmt_reg = 0x2B, }, { /* sentinel */ } @@ -702,12 +708,14 @@ static void disp_mix_gasket_config(struct dwc_mipi_csi2_host *csi2h) fmt_val = DT_YUV422_8; break; case MEDIA_BUS_FMT_SBGGR8_1X8: + case MEDIA_BUS_FMT_Y8_1X8: fmt_val = DT_RAW8; break; case MEDIA_BUS_FMT_SBGGR10_1X10: case MEDIA_BUS_FMT_SGBRG10_1X10: case MEDIA_BUS_FMT_SGRBG10_1X10: case MEDIA_BUS_FMT_SRGGB10_1X10: + case MEDIA_BUS_FMT_Y10_1X10: fmt_val = DT_RAW10; break; case MEDIA_BUS_FMT_SBGGR12_1X12: diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c index c3d6bbeed6a2..ddcac91c84e2 100644 --- a/drivers/staging/media/imx/imx8-isi-cap.c +++ b/drivers/staging/media/imx/imx8-isi-cap.c @@ -54,7 +54,19 @@ struct mxc_isi_fmt mxc_isi_src_formats[] = { .memplanes = 1, .colplanes = 1, .align = 2, - } + }, { + .name = "Grey8 (Y8)", + .fourcc = V4L2_PIX_FMT_GREY, + .depth = { 8 }, + .memplanes = 1, + .colplanes = 1, + }, { + .name = "Grey10 (Y10)", + .fourcc = V4L2_PIX_FMT_Y10, + .depth = { 16 }, + .memplanes = 1, + .colplanes = 1, + }, }; struct mxc_isi_fmt *mxc_isi_get_format(unsigned int index) @@ -100,6 +112,10 @@ struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt) sd_fmt->format.code == MEDIA_BUS_FMT_UYVY8_1X16|| sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_2X8) index = 1; + else if (sd_fmt->format.code == MEDIA_BUS_FMT_Y8_1X8) + index = 2; + else if (sd_fmt->format.code == MEDIA_BUS_FMT_Y10_1X10) + index = 3; else index = 0; return &mxc_isi_src_formats[index]; @@ -752,7 +768,7 @@ static int mxc_isi_capture_release(struct file *file) struct vb2_queue *q = vdev->queue; int ret = -1; - if (!isi_cap->is_link_setup) + if (!isi_cap->is_link_setup || atomic_read(&mxc_isi->usage_count) == 0) return 0; if (isi_cap->is_streaming[isi_cap->id]) @@ -961,6 +977,10 @@ static int mxc_isi_source_fmt_init(struct mxc_isi_cap_dev *isi_cap) src_fmt.pad = source_pad->index; src_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; src_fmt.format.code = MEDIA_BUS_FMT_UYVY8_1X16; + bool is_rgb(u32 pix_fmt); + bool is_yuv(u32 pix_fmt); + if (!is_rgb(dst_f->fmt->fourcc) && !is_yuv(dst_f->fmt->fourcc)) + src_fmt.format.code = dst_f->fmt->mbus_code; src_fmt.format.width = dst_f->width; src_fmt.format.height = dst_f->height; ret = v4l2_subdev_call(src_sd, pad, set_fmt, NULL, &src_fmt); @@ -1693,6 +1713,7 @@ static int mxc_isi_register_cap_device(struct mxc_isi_cap_dev *isi_cap, goto err_ctrl_free; vdev->ctrl_handler = &isi_cap->ctrls.handler; + v4l2_dev->ctrl_handler = &isi_cap->ctrls.handler; v4l2_info(v4l2_dev, "Registered %s as /dev/%s\n", vdev->name, video_device_node_name(vdev)); @@ -1924,3 +1945,9 @@ MODULE_DESCRIPTION("IMX8 Image Sensor Interface Capture driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("ISI Capture"); MODULE_VERSION("1.0"); + +// patch +// line 57-69: mxc_isi_src_formats[], add 2 formats for topaz2m camera +// line 115-118: mxc_isi_get_src_fmt(), add supporting 2 formats for topaz2m camera +// line 980-983: mxc_isi_source_fmt_init(), supporting get format from mbus_code +// line 1716: mxc_isi_register_cap_device(), pass ctrl handler to v4l2_dev diff --git a/drivers/staging/media/imx/imx8-isi-fmt.c b/drivers/staging/media/imx/imx8-isi-fmt.c index db11c809a3d3..16a6317b87e2 100644 --- a/drivers/staging/media/imx/imx8-isi-fmt.c +++ b/drivers/staging/media/imx/imx8-isi-fmt.c @@ -97,7 +97,26 @@ struct mxc_isi_fmt mxc_isi_out_formats[] = { .colplanes = 1, .align = 2, .mbus_code = MEDIA_BUS_FMT_RGB888_1X24, - } + }, { + .name = "Grey8 (Y8)", + .fourcc = V4L2_PIX_FMT_GREY, + .depth = { 8 }, + .color = MXC_ISI_OUT_FMT_RAW8, + .memplanes = 1, + .colplanes = 1, + .mbus_code = MEDIA_BUS_FMT_Y8_1X8, + }, { + .name = "Grey10 (Y10)", + .fourcc = V4L2_PIX_FMT_Y10, + .depth = { 16 }, + .color = MXC_ISI_OUT_FMT_RAW10, + .memplanes = 1, + .colplanes = 1, + .mbus_code = MEDIA_BUS_FMT_Y10_1X10, + }, }; size_t mxc_isi_out_formats_size = ARRAY_SIZE(mxc_isi_out_formats); + +// patch +// line 100-116: mxc_isi_out_formats[], add 2 formats for topaz2m camera diff --git a/drivers/staging/media/imx/imx8-isi-hw.c b/drivers/staging/media/imx/imx8-isi-hw.c index f3b2b98798be..cee34d389309 100644 --- a/drivers/staging/media/imx/imx8-isi-hw.c +++ b/drivers/staging/media/imx/imx8-isi-hw.c @@ -103,7 +103,7 @@ static void printk_pixelformat(char *prefix, int val) (val >> 24) & 0xff); } -static bool is_rgb(u32 pix_fmt) +bool is_rgb(u32 pix_fmt) { if ((pix_fmt == V4L2_PIX_FMT_RGB565) || (pix_fmt == V4L2_PIX_FMT_RGB24) || @@ -120,7 +120,7 @@ static bool is_rgb(u32 pix_fmt) return false; } -static bool is_yuv(u32 pix_fmt) +bool is_yuv(u32 pix_fmt) { if ((pix_fmt == V4L2_PIX_FMT_YUYV) || (pix_fmt == V4L2_PIX_FMT_YUV32) || @@ -812,3 +812,7 @@ void mxc_isi_m2m_start_read(struct mxc_isi_dev *mxc_isi) writel(val, mxc_isi->regs + CHNL_MEM_RD_CTRL); } EXPORT_SYMBOL_GPL(mxc_isi_m2m_start_read); + +// patch +// line 106: is_rgb() discard static declaration so can used outside. +// line 123: is_yuv() discard static declaration so can used outside. Best regards. Johnson Re: camera on imx93 board do you mind sharing the dts file with me? let me double check it, and what bsp version do you use? Re: camera on imx93 board sorry for my delay, there is some issue with community, I missed the message, do you fix this issue?  Re: camera on imx93 board Hi @joanxie ,      Not yet.      Limited for the condition, I have only the data sheet of the camera, no reference manual of the camera and no high speed oscilloscope to measure the actual frequency of the lanes. from the datasheet, the lane speed is 1.2G. so for 2 lanes and RAW8 case, the pixel speed might be 1.2G x 2 / 8 = 300M, is it right?     If it's the case, how do I need to configure CSI/ISP clock to avoid the FIFO overflow? Best regards. Johnson  Re: camera on imx93 board @joanxie : 1.  I have make CSI test mode working correctly with ppi_pg_enable。when preview, I see vertical test pattern. 2. Now I am stucking in the situation that when I preview with topaz2m camera, all the data I dumped with v4l2-ctl is 0.      below is some important register value dumped during dumping data, not seeing any error or fatal. note that the camera is working on imx8mp platform.      first register dump:      INT_ST_MAIN : 4ae0000c 0x00000000      PHY_RX : 4ae00048 0x00010000      PHY_STOPSTATE : 4ae0004c 0x00010003      PIXEL_CNT : 4ac10044 0x000000C1      CHNL_OUT_BUF1_ADDR_Y: 4ae40070 0xB3200000      CHNL_OUT_BUF2_ADDR_Y: 4ae4008c 0xB2C00000    second register dump:    INT_ST_MAIN : 4ae0000c 0x00000000    PHY_RX : 4ae00048 0x00030000    PHY_STOPSTATE : 4ae0004c 0x00000000    PIXEL_CNT : 4ac10044 0x00000131    CHNL_OUT_BUF1_ADDR_Y: 4ae40070 0xB3F00000    CHNL_OUT_BUF2_ADDR_Y: 4ae4008c 0xB2C00000     Do you have any idea why all data ISI output is 0xff, anything I missed out? Best regards. Johnson
查看全文
Resets from unknown sources MCXN947 I have a device with an MCXN947.  It's running FreeRTOS.  Using LPTMR, it periodically goes into power-down mode, wakes up on the timer interrupt, maybe does a few things, then goes back into power-down mode.  Something like this:         vTaskSuspendAll();      // FreeRTOS         PM_EnterLowPower(); // LPTMR interrupt will wake us up         xTaskResumeAll();       // FreeRTOS There's really only one other task running when it wakes up and it does some I2C comms. The problem is that the processor occasionally resets (can't reliably reproduce).  The CMC SRS register reads 0x00004010, a warm SW reset.  Code isn't calling reset anywhere, maybe NXP's assert() or FreeRTOS's configASSERT(). Are there other internal sources could be causing a SW reset? MCXN Re: Resets from unknown sources MCXN947 Hello @robert_hines  Yes, it is very likely related. Please first refer to ERR051704 and ERR051993 for verification.   Alice_Yang_0-1789719190798.pngAlice_Yang_0-1789719190798.png Also, SSRS contains cumulative status information, so it should be analyzed together with the current SRS value.   Thank you.   BR Alice Re: Resets from unknown sources MCXN947 The SSRS register reads 0x00004430, so the RSTACK bit is set; could ERR051704 cause that? Re: Resets from unknown sources MCXN947 Would this errata (MCXN_1P02G) cause resets? ERR051704 DCDC: Failure changing to Low drive-strength mode Re: Resets from unknown sources MCXN947 Changing the active voltage to midvoltage (and high drive strength) and the low-power voltage to overdrive (and low drive strength) while dropping in and out of power-down mode once a second, did increase the number of resets, all of the form: SRS 0x00004010 SSRS 0x00004430 It would be nice if NXP could describe the downstream effects of the errata so I could be more confident this is the source of these spurious resets. Re: Resets from unknown sources MCXN947 Hello @robert_hines  Thanks for your testing and feedback. Based on your test results, the observed behavior is very similar to the issue described in ERR051704. While I'm sorry NXP does not currently provide a more detailed description of the downstream effects of this issue. I recommend validating the workaround provided in ERR051704. If you continue to experience any issues after applying the workaround, please feel free to contact me. Thank you. Alice
查看全文
启用 Falcon 模式下的安全启动(内核版本 6.12.49)|| iMX8MP_EVK 大家好, 请问您能帮我启用Falcon模式下的安全启动吗? 我已成功借助 meta-imx-fastboot GitHub 代码库实现了 Falcon 模式。但是,我发现 meta-imx-fastboot 的实现会 在 Falcon 模式启动过程中 有意移除 OP-TEE 。 由于我的用例也需要用到 OP-TEE,我在 NXP 论坛上提出了一个问题, @elena_popa提供了一个保留并启用 OP-TEE 的解决方案。我附上了论坛链接供您参考。 目前,我在启用 安全启动 时遇到了问题 ,因为我找不到任何关于我的当前内核版本在 Falcon 模式下启用安全启动的文档。 环境详情: 主板: i.MX8M Plus EVK(i.MX8MP EVK) 内核版本: 6.12.49 Yocto 环境:基于 Yocto 的 NXP 电路板支持包。 启动模式:猎鹰模式 要求:猎鹰模式 + OP-TEE + 安全启动 Yocto Project Re: Enable Secure Boot in Falcon Mode (6.12.49 - Kernel Version) || iMX8MP_EVK 你好, 请问您遇到了什么错误? 顺祝商祺!
查看全文
プロモーションクーポン こんにちは、 私のプロモーションクーポン「ADCWFBXT」がFRDM-MCXN236に有効でないのはなぜですか? プラモド・ジョグレカール [email protected] 開発ボード FRDMトレーニング Re: PROMO Coupon 私もFRDM-MCXN236のプロモーションクーポンを使うことができませんでした。 Re: PROMO Coupon クーポンコードADCWFBXTは2025年12月30日まで有効でしたのでご注意ください。当社のウェブサイトに記載されているとおり、 FRDMはイノベーションを推進します。費用は当社が負担します!   良い一日をお過ごしください。
查看全文
Re: S32G274A LLCE CAN 現在、自社開発のボードはマルチコアモードで動作しています。1つのA53コアは他のデバイスとのネットワーク通信タスクに使用され、他の複数のA53コアはバス通信ドライバを実行します。各バスタイプはそれぞれ別のA53コアを使用します。問題が発生しました。現在のLLCE CANリカバリ操作は、LLCE CANモードを停止してから再開するように構成されています。実際のほとんどのシナリオでは通信は復旧できますが、バスリカバリが頻繁に実行される場合があり、他のA53コアの正常な動作に影響を与えます(ネットワーク通信タスクが中断されます)。質問は、LLCE CANバスリカバリにはどのような方法があるか、また、LLCE CANを別のコアで実行しても他のコアに影響を与えるのはなぜか、ということです。バージョン情報は、S32G_LLCE_1_0_9、SW32G_RTD_4.4_4.0.2_P04_D2312です。 Re: S32G274A LLCE CAN こんにちは、 @JACK_Q こんにちは ソフトウェアおよびハードウェアのテスト環境について、詳細な説明をいただけますでしょうか? 1. あなたのシステムでは、MコアとAコアは同時に使用されていますか?M7コアはどのようなタスクを実行しますか?どのソフトウェアパッケージに依存していますか? 2. あなたの説明によると、A53側の各コアはそれぞれ独自のタスクを実行しているようですが、どのようなソフトウェアが動作していますか?Linux BSPでしょうか? BR チェイン
查看全文
Difference between S32K1_S32M24X and S32K1 RTD packages? I am developing for the S32K116. I noticed while going through the S32DS Extensions an dUpdates that I have two S32K1 packages installed: "S32K1_S32M24X Real-Time Drivers AUTOSAR R21-11 Version 3.0.0 QLP06" and "S32K1 Real-Time Drivers AUTOSAR R21-11 Version 3.0.0 QLP06" What is the difference between the two? If they do the same for my case, which one should I keep/uninstall? I tried removing one of them (the S32K1 one) but then my projects couldn't load their .mex files anymore. Re: Difference between S32K1_S32M24X and S32K1 RTD packages? Hi @daniel_meier  Although the packages may appear similar, they have dependencies between themselves and with S32DS, and are not intended to be treated as standalone components that can be used independently of one another. Therefore, we recommend reinstalling the package and keeping both packages installed to ensure proper project functionality. BR, VaneB
查看全文
iMX93ボード上のカメラ こんにちは、 私はimx93プラットフォームボード上でtopaz2mカメラを起動しようとしています。カメラを駆動してデータを出力しようとすると、v412-ctlが停止します。CSIドライバでデバッグ出力を有効にしたところ、以下の結果が得られました。 # v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=GREY; setsid -f v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1 topaz2m 1-0010: mbus_fmt: 2001 mxc-mipi-csi2.0: format: 0x2001 bypass csc input fmt GREY output fmt GREY dwc-mipi-csi2-host 4ae00000.csi: enter enable=1 dwc-mipi-csi2-host 4ae00000.csi: data_type:0x1e, virtual chan: 0 dwc-mipi-csi2-host 4ae00000.csi: hsa_time=0, hbp_time=0, hsd_time=0, hline_time=1280 dwc-mipi-csi2-host 4ae00000.csi: ipi mode: camera, color_mode: color mode 48 dwc-mipi-csi2-host 4ae00000.csi: format: 0x2001, w/h=(1920, 1080) dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 Version: 0x3135302a dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 lanes: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 HOST RESETN: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT STATUS MAIN: 0x40000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS2: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY CFG: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY MODE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT STATUS AP MAIN: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS VC1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS VC2: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY SHUTDOWN: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY RESET: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY RX STATUS: 0x30000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY STOP STATUS: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY TEST CTRL0: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY TEST CTRL1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG PATTERN HIGH: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG PATTERN WIDTH: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG CONFIG: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG ENABLE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG STATUS: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI MODE: 0x1010000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI VCID: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI DATA TYPE: 0x1e dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI SOFT RESET: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI ADV FEATURE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PHY_FATAL: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PKT_FATAL: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PHY: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_IPI_FATAL: 0x7f dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_BNDRY_FRAME_FATAL: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_SEQ_FRAME_FATAL: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_DATA_ID: 0x0 dwc-mipi-csi2-host 4ae00000.csi: gasket: CAMERA MUX: 0x10150 dwc-mipi-csi2-host 4ae00000.csi: gasket: CSI REG: 0x22c1c dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI pixel ctrl: 0xe07 dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI pixel cnt: 0x0 dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI line cnt: 0x0 ~# /unit_tests/memtool 4ae00140 1 E Reading 0x1 count starting at address 0x4AE00140 0x4AE00140: 00000020 # cat /sys/kernel/debug/clk/cam_pix_root/clk_rate 300000000 上記の結果から、次のことがわかります。 1. INT_ST_IPI_FATALが設定されており、致命的なIPI割り込みがトリガーされたことを示しています。 2. IPI割り込みステータスレジスタがFIFOが満杯であることを示しています(データオーバーフローによりデータ損失が発生します)。 この結果はピクセルクロックの速度が十分ではないことを示しているのでしょうか?しかし、既に非常に高い値(300000000)に設定しています。 /*************************************************************************************** * camera - CSI@4ae00000 - topaz2m: 0x10@I2C2@44350000 * 1. power pin: OSM U6 P0_7 * 2. reset pin: OSM U6 P0_6 * 3. bus-type: 4 (MEDIA_BUS_TYPE_CSI2_DPHY) * 4. cfg-clk-range: 28 (24M) https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/ov5640-support-on-i-mx93-with-6-12-20-bsp/ta-p/2129317 * 5. hs-clk-range: 0x2b (1500M, imx93 RM page 4542) * 6. data-lanes: 2 **************************************************************************************/ set_node_property(&mipi_csi_ep, remote-endpoint, <&edp_from_mipi_csi_topaz2m>); set_node_property(&mipi_csi_ep, hs-clk-range, <0x2c>); set_node_property(&mipi_csi, assigned-clock-rates, comma(<300000000>, <24000000>)); &lpi2c2 { topaz2m_csi0: topaz2m@10 { compatible = "teledyne,topaz2m"; reg = <0x10>; lid-gpio = <&gpioex_osm_u6 7 GPIO_ACTIVE_HIGH>; pwdn-gpio = <&gpioex_osm_u6 6 GPIO_ACTIVE_HIGH>; csi_id = <0>; mclk = <24000000>; port { edp_from_mipi_csi_topaz2m: endpoint { remote-endpoint = <&mipi_csi_ep>; }; }; }; }; 次に進むにあたって、何かアドバイスをいただけますか? よろしくお願いいたします。 ジョンソン Linux マルチメディア Re: camera on imx93 board こんにちは、 @joanxie さん。 カーネルのバージョンは6.6.52です。 前回の投稿で、関連するデータシートを既に共有しました。とにかく、ここでまた共有します。 #include "imx93-11x11-evk.dts" #define set_node_property(n, p, v) n { p = v ; } /*************************************************************************************** * camera - CSI@4ae00000 - topaz2m: 0x10@I2C2@44350000 * 1. power pin: OSM U6 P0_7 * 2. reset pin: OSM U6 P0_6 * 3. bus-type: 4 (MEDIA_BUS_TYPE_CSI2_DPHY) * 4. cfg-clk-range: 28 (24M) https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/ov5640-support-on-i-mx93-with-6-12-20-bsp/ta-p/2129317 * 5. hs-clk-range: 0x2b (1500M, imx93 RM page 4542) * 6. data-lanes: 2 **************************************************************************************/ set_node_property(&mipi_csi_ep, remote-endpoint, <&edp_from_mipi_csi_topaz2m>); set_node_property(&mipi_csi_ep, hs-clk-range, <0x2c>); set_node_property(&mipi_csi, assigned-clock-rates, comma(<300000000>, <24000000>)); &lpi2c2 { topaz2m_csi0: topaz2m@10 { compatible = "teledyne,topaz2m"; reg = <0x10>; lid-gpio = <&gpioex_osm_u6 7 GPIO_ACTIVE_HIGH>; pwdn-gpio = <&gpioex_osm_u6 6 GPIO_ACTIVE_HIGH>; csi_id = <0>; mclk = <24000000>; port { edp_from_mipi_csi_topaz2m: endpoint { remote-endpoint = <&mipi_csi_ep>; }; }; }; }; また、CSI/ISIドライバにもいくつかのパッチが適用されています。CSIパッチはimx93用に追加したもので、ISIパッチもimx8mpで使用し、動作確認済みです。 diff --git a/drivers/staging/media/imx/dwc-mipi-csi2.c b/drivers/staging/media/imx/dwc-mipi-csi2.c index 8a24b0231596..4a29d422d1f1 100644 --- a/drivers/staging/media/imx/dwc-mipi-csi2.c +++ b/drivers/staging/media/imx/dwc-mipi-csi2.c @@ -33,12 +33,12 @@ #include #include #include - +#undef dev_dbg /* * DWC MIPI CSI2 Host registers */ #define DWC_MIPI_CSI2_VERSION 0x0 - +#define dev_dbg dev_info #define DWC_MIPI_CSI2_N_LANES 0x4 #define DWC_MIPI_CSI2_N_LANES_N_LANES(x) ((x) & 0x7) @@ -401,6 +401,12 @@ static const struct csi2h_pix_format dwc_csi2h_formats[] = { }, { .code = MEDIA_BUS_FMT_SBGGR12_1X12, .fmt_reg = 0x2C, + }, { + .code = MEDIA_BUS_FMT_Y8_1X8, + .fmt_reg = 0x2A, + }, { + .code = MEDIA_BUS_FMT_Y10_1X10, + .fmt_reg = 0x2B, }, { /* sentinel */ } @@ -702,12 +708,14 @@ static void disp_mix_gasket_config(struct dwc_mipi_csi2_host *csi2h) fmt_val = DT_YUV422_8; break; case MEDIA_BUS_FMT_SBGGR8_1X8: + case MEDIA_BUS_FMT_Y8_1X8: fmt_val = DT_RAW8; break; case MEDIA_BUS_FMT_SBGGR10_1X10: case MEDIA_BUS_FMT_SGBRG10_1X10: case MEDIA_BUS_FMT_SGRBG10_1X10: case MEDIA_BUS_FMT_SRGGB10_1X10: + case MEDIA_BUS_FMT_Y10_1X10: fmt_val = DT_RAW10; break; case MEDIA_BUS_FMT_SBGGR12_1X12: diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c index c3d6bbeed6a2..ddcac91c84e2 100644 --- a/drivers/staging/media/imx/imx8-isi-cap.c +++ b/drivers/staging/media/imx/imx8-isi-cap.c @@ -54,7 +54,19 @@ struct mxc_isi_fmt mxc_isi_src_formats[] = { .memplanes = 1, .colplanes = 1, .align = 2, - } + }, { + .name = "Grey8 (Y8)", + .fourcc = V4L2_PIX_FMT_GREY, + .depth = { 8 }, + .memplanes = 1, + .colplanes = 1, + }, { + .name = "Grey10 (Y10)", + .fourcc = V4L2_PIX_FMT_Y10, + .depth = { 16 }, + .memplanes = 1, + .colplanes = 1, + }, }; struct mxc_isi_fmt *mxc_isi_get_format(unsigned int index) @@ -100,6 +112,10 @@ struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt) sd_fmt->format.code == MEDIA_BUS_FMT_UYVY8_1X16|| sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_2X8) index = 1; + else if (sd_fmt->format.code == MEDIA_BUS_FMT_Y8_1X8) + index = 2; + else if (sd_fmt->format.code == MEDIA_BUS_FMT_Y10_1X10) + index = 3; else index = 0; return &mxc_isi_src_formats[index]; @@ -752,7 +768,7 @@ static int mxc_isi_capture_release(struct file *file) struct vb2_queue *q = vdev->queue; int ret = -1; - if (!isi_cap->is_link_setup) + if (!isi_cap->is_link_setup || atomic_read(&mxc_isi->usage_count) == 0) return 0; if (isi_cap->is_streaming[isi_cap->id]) @@ -961,6 +977,10 @@ static int mxc_isi_source_fmt_init(struct mxc_isi_cap_dev *isi_cap) src_fmt.pad = source_pad->index; src_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; src_fmt.format.code = MEDIA_BUS_FMT_UYVY8_1X16; + bool is_rgb(u32 pix_fmt); + bool is_yuv(u32 pix_fmt); + if (!is_rgb(dst_f->fmt->fourcc) && !is_yuv(dst_f->fmt->fourcc)) + src_fmt.format.code = dst_f->fmt->mbus_code; src_fmt.format.width = dst_f->width; src_fmt.format.height = dst_f->height; ret = v4l2_subdev_call(src_sd, pad, set_fmt, NULL, &src_fmt); @@ -1693,6 +1713,7 @@ static int mxc_isi_register_cap_device(struct mxc_isi_cap_dev *isi_cap, goto err_ctrl_free; vdev->ctrl_handler = &isi_cap->ctrls.handler; + v4l2_dev->ctrl_handler = &isi_cap->ctrls.handler; v4l2_info(v4l2_dev, "Registered %s as /dev/%s\n", vdev->name, video_device_node_name(vdev)); @@ -1924,3 +1945,9 @@ MODULE_DESCRIPTION("IMX8 Image Sensor Interface Capture driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("ISI Capture"); MODULE_VERSION("1.0"); + +// patch +// line 57-69: mxc_isi_src_formats[], add 2 formats for topaz2m camera +// line 115-118: mxc_isi_get_src_fmt(), add supporting 2 formats for topaz2m camera +// line 980-983: mxc_isi_source_fmt_init(), supporting get format from mbus_code +// line 1716: mxc_isi_register_cap_device(), pass ctrl handler to v4l2_dev diff --git a/drivers/staging/media/imx/imx8-isi-fmt.c b/drivers/staging/media/imx/imx8-isi-fmt.c index db11c809a3d3..16a6317b87e2 100644 --- a/drivers/staging/media/imx/imx8-isi-fmt.c +++ b/drivers/staging/media/imx/imx8-isi-fmt.c @@ -97,7 +97,26 @@ struct mxc_isi_fmt mxc_isi_out_formats[] = { .colplanes = 1, .align = 2, .mbus_code = MEDIA_BUS_FMT_RGB888_1X24, - } + }, { + .name = "Grey8 (Y8)", + .fourcc = V4L2_PIX_FMT_GREY, + .depth = { 8 }, + .color = MXC_ISI_OUT_FMT_RAW8, + .memplanes = 1, + .colplanes = 1, + .mbus_code = MEDIA_BUS_FMT_Y8_1X8, + }, { + .name = "Grey10 (Y10)", + .fourcc = V4L2_PIX_FMT_Y10, + .depth = { 16 }, + .color = MXC_ISI_OUT_FMT_RAW10, + .memplanes = 1, + .colplanes = 1, + .mbus_code = MEDIA_BUS_FMT_Y10_1X10, + }, }; size_t mxc_isi_out_formats_size = ARRAY_SIZE(mxc_isi_out_formats); + +// patch +// line 100-116: mxc_isi_out_formats[], add 2 formats for topaz2m camera diff --git a/drivers/staging/media/imx/imx8-isi-hw.c b/drivers/staging/media/imx/imx8-isi-hw.c index f3b2b98798be..cee34d389309 100644 --- a/drivers/staging/media/imx/imx8-isi-hw.c +++ b/drivers/staging/media/imx/imx8-isi-hw.c @@ -103,7 +103,7 @@ static void printk_pixelformat(char *prefix, int val) (val >> 24) & 0xff); } -static bool is_rgb(u32 pix_fmt) +bool is_rgb(u32 pix_fmt) { if ((pix_fmt == V4L2_PIX_FMT_RGB565) || (pix_fmt == V4L2_PIX_FMT_RGB24) || @@ -120,7 +120,7 @@ static bool is_rgb(u32 pix_fmt) return false; } -static bool is_yuv(u32 pix_fmt) +bool is_yuv(u32 pix_fmt) { if ((pix_fmt == V4L2_PIX_FMT_YUYV) || (pix_fmt == V4L2_PIX_FMT_YUV32) || @@ -812,3 +812,7 @@ void mxc_isi_m2m_start_read(struct mxc_isi_dev *mxc_isi) writel(val, mxc_isi->regs + CHNL_MEM_RD_CTRL); } EXPORT_SYMBOL_GPL(mxc_isi_m2m_start_read); + +// patch +// line 106: is_rgb() discard static declaration so can used outside. +// line 123: is_yuv() discard static declaration so can used outside. よろしくお願いいたします。 ジョンソン Re: camera on imx93 board dtsファイルを共有していただけませんか?確認させてください。また、使用しているbspのバージョンは何ですか? Re: camera on imx93 board 返信が遅れて申し訳ありません。コミュニティに問題が発生しており、メッセージを見逃してしまいました。この問題は解決しましたか? Re: camera on imx93 board こんにちは、 @joanxie さん。 まだ。 状況的に制約があり、カメラのデータシートしか持っておらず、カメラのリファレンスマニュアルはなく、レーンの実際の周波数を測定するための高速オシロスコープもありません。データシートによると、車線速度は1.2Gです。つまり、2レーンでRAW8 CASEの場合、ピクセル速度は1.2G x 2 / 8 = 300Mになるということでしょうか? もしそうであれば、FIFOオーバーフローを回避するために、CSI/ISPクロックをどのように設定すればよいでしょうか? よろしくお願いいたします。 ジョンソン Re: camera on imx93 board @joanxie : 1. ppi_pg_enable を使用して CSI テスト モードが正しく動作するようにしました。プレビューすると、垂直のテスト パターンが表示されます。 2. 現在、topaz2mカメラでプレビューすると、v4l2-ctlでダンプしたすべてのデータが0になるという状況に陥っています。 以下は、データダンプ中にダンプされた重要なレジスタ値の一部です。エラーや致命的な問題は発生していません。カメラはIMX8MPプラットフォーム上で動作しています。 最初のレジスタダンプ: INT_ST_MAIN : 4ae0000c 0x00000000 PHY_RX : 4ae00048 0x00010000 PHY_STOPSTATE : 4ae0004c 0x00010003 PIXEL_CNT : 4ac10044 0x000000C1 CHNL_OUT_BUF1_ADDR_Y: 4ae40070 0xB3200000 CHNL_OUT_BUF2_ADDR_Y: 4ae4008c 0xB2C00000 2番目のレジスタダンプ: INT_ST_MAIN:4ae0000c 0x00000000 PHY_RX : 4ae00048 0x00030000 PHY_STOPSTATE:4ae0004c 0x00000000 PIXEL_CNT : 4ac10044 0x00000131 CHNL_OUT_BUF1_ADDR_Y:4ae40070 0xB3F00000 CHNL_OUT_BUF2_ADDR_Y:4ae4008c 0xB2C00000 なぜすべてのデータISI出力が0xffなのか、何か見落としていることはありますか? よろしくお願いいたします。 ジョンソン
查看全文
Enable Secure Boot in Falcon Mode (6.12.49 - Kernel Version) || iMX8MP_EVK Hi Team, Could you please help me enable Secure Boot in Falcon Mode? I have successfully achieved Falcon Mode with the help of the meta-imx-fastboot GitHub repository. However, I observed that the meta-imx-fastboot implementation intentionally removes OP-TEE during the Falcon Mode boot flow. Since OP-TEE is also required for my use case, I raised a query on the NXP forum, where @elena_popa provided a solution to retain and enable OP-TEE. I have attached the forum link for reference. Currently, I am facing an issue with enabling Secure Boot, as I could not find any document for Secure Boot with falcon mode for my current kernel version. Environment details: Board: i.MX8M Plus EVK (i.MX8MP EVK) Kernel Version: 6.12.49 Yocto Environment: Yocto-based NXP BSP Boot Mode: Falcon Mode Requirement: Falcon Mode + OP-TEE + Secure Boot Yocto Project Re: Enable Secure Boot in Falcon Mode (6.12.49 - Kernel Version) || iMX8MP_EVK Hello, Could you please share which error are you getting? Best regards.
查看全文
imx93 板上的摄像头 您好, 我正在尝试在 imx93 平台板上打开 topaz2M 摄像头。当我尝试驱动摄像头输出数据时,v412-ctl 被卡住了。我在 CSI 驱动程序中启用了调试打印功能,结果如下。 # v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=GREY; setsid -f v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1 topaz2m 1-0010: mbus_fmt: 2001 mxc-mipi-csi2.0: format: 0x2001 bypass csc input fmt GREY output fmt GREY dwc-mipi-csi2-host 4ae00000.csi: enter enable=1 dwc-mipi-csi2-host 4ae00000.csi: data_type:0x1e, virtual chan: 0 dwc-mipi-csi2-host 4ae00000.csi: hsa_time=0, hbp_time=0, hsd_time=0, hline_time=1280 dwc-mipi-csi2-host 4ae00000.csi: ipi mode: camera, color_mode: color mode 48 dwc-mipi-csi2-host 4ae00000.csi: format: 0x2001, w/h=(1920, 1080) dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 Version: 0x3135302a dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 lanes: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 HOST RESETN: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT STATUS MAIN: 0x40000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS2: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY CFG: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY MODE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT STATUS AP MAIN: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS VC1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DATA IDS VC2: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY SHUTDOWN: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY RESET: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY RX STATUS: 0x30000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY STOP STATUS: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY TEST CTRL0: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 DPHY TEST CTRL1: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG PATTERN HIGH: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG PATTERN WIDTH: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG CONFIG: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG ENABLE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 PPI PG STATUS: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI MODE: 0x1010000 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI VCID: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI DATA TYPE: 0x1e dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI SOFT RESET: 0x1 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 IPI ADV FEATURE: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PHY_FATAL: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PKT_FATAL: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_PHY: 0x3 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_IPI_FATAL: 0x7f dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_BNDRY_FRAME_FATAL: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_SEQ_FRAME_FATAL: 0x0 dwc-mipi-csi2-host 4ae00000.csi: DWC CSI2 INT_MSK_DATA_ID: 0x0 dwc-mipi-csi2-host 4ae00000.csi: gasket: CAMERA MUX: 0x10150 dwc-mipi-csi2-host 4ae00000.csi: gasket: CSI REG: 0x22c1c dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI pixel ctrl: 0xe07 dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI pixel cnt: 0x0 dwc-mipi-csi2-host 4ae00000.csi: gasket: MIPI -> ISI line cnt: 0x0 ~# /unit_tests/memtool 4ae00140 1 E Reading 0x1 count starting at address 0x4AE00140 0x4AE00140: 00000020 # cat /sys/kernel/debug/clk/cam_pix_root/clk_rate 300000000 从上述结果可以看出 1。设置了 INT_ST_IPI_FATAL,显示触发了致命的 IPI 中断。 2.IPI 中断状态寄存器显示 FIFO 已满(数据溢出导致数据丢失) 结果是否表明像素时钟不够快?但我已经设置得非常高了(300000000) /*************************************************************************************** * camera - CSI@4ae00000 - topaz2m: 0x10@I2C2@44350000 * 1. power pin: OSM U6 P0_7 * 2. reset pin: OSM U6 P0_6 * 3. bus-type: 4 (MEDIA_BUS_TYPE_CSI2_DPHY) * 4. cfg-clk-range: 28 (24M) https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/ov5640-support-on-i-mx93-with-6-12-20-bsp/ta-p/2129317 * 5. hs-clk-range: 0x2b (1500M, imx93 RM page 4542) * 6. data-lanes: 2 **************************************************************************************/ set_node_property(&mipi_csi_ep, remote-endpoint, <&edp_from_mipi_csi_topaz2m>); set_node_property(&mipi_csi_ep, hs-clk-range, <0x2c>); set_node_property(&mipi_csi, assigned-clock-rates, comma(<300000000>, <24000000>)); &lpi2c2 { topaz2m_csi0: topaz2m@10 { compatible = "teledyne,topaz2m"; reg = <0x10>; lid-gpio = <&gpioex_osm_u6 7 GPIO_ACTIVE_HIGH>; pwdn-gpio = <&gpioex_osm_u6 6 GPIO_ACTIVE_HIGH>; csi_id = <0>; mclk = <24000000>; port { edp_from_mipi_csi_topaz2m: endpoint { remote-endpoint = <&mipi_csi_ep>; }; }; }; }; 您是否可以提供一些建议,以便我下一步的行程? 顺祝商祺! Johnson Linux 多媒体 Re: camera on imx93 board 你好@joanxie、 内核版本为 6.6.52。 在上一篇文章中,我已经分享了相关的 dts。总之,我在这里再次分享。 #include "imx93-11x11-evk.dts" #define set_node_property(n, p, v) n { p = v ; } /*************************************************************************************** * camera - CSI@4ae00000 - topaz2m: 0x10@I2C2@44350000 * 1. power pin: OSM U6 P0_7 * 2. reset pin: OSM U6 P0_6 * 3. bus-type: 4 (MEDIA_BUS_TYPE_CSI2_DPHY) * 4. cfg-clk-range: 28 (24M) https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/ov5640-support-on-i-mx93-with-6-12-20-bsp/ta-p/2129317 * 5. hs-clk-range: 0x2b (1500M, imx93 RM page 4542) * 6. data-lanes: 2 **************************************************************************************/ set_node_property(&mipi_csi_ep, remote-endpoint, <&edp_from_mipi_csi_topaz2m>); set_node_property(&mipi_csi_ep, hs-clk-range, <0x2c>); set_node_property(&mipi_csi, assigned-clock-rates, comma(<300000000>, <24000000>)); &lpi2c2 { topaz2m_csi0: topaz2m@10 { compatible = "teledyne,topaz2m"; reg = <0x10>; lid-gpio = <&gpioex_osm_u6 7 GPIO_ACTIVE_HIGH>; pwdn-gpio = <&gpioex_osm_u6 6 GPIO_ACTIVE_HIGH>; csi_id = <0>; mclk = <24000000>; port { edp_from_mipi_csi_topaz2m: endpoint { remote-endpoint = <&mipi_csi_ep>; }; }; }; }; 此外,CSI/ISI 驱动程序也有一些补丁。我为 imx93 添加了 CSI 补丁,在 imx8mp 上也使用了 ISI 补丁,并验证了其有效性。 diff --git a/drivers/staging/media/imx/dwc-mipi-csi2.c b/drivers/staging/media/imx/dwc-mipi-csi2.c index 8a24b0231596..4a29d422d1f1 100644 --- a/drivers/staging/media/imx/dwc-mipi-csi2.c +++ b/drivers/staging/media/imx/dwc-mipi-csi2.c @@ -33,12 +33,12 @@ #include #include #include - +#undef dev_dbg /* * DWC MIPI CSI2 Host registers */ #define DWC_MIPI_CSI2_VERSION 0x0 - +#define dev_dbg dev_info #define DWC_MIPI_CSI2_N_LANES 0x4 #define DWC_MIPI_CSI2_N_LANES_N_LANES(x) ((x) & 0x7) @@ -401,6 +401,12 @@ static const struct csi2h_pix_format dwc_csi2h_formats[] = { }, { .code = MEDIA_BUS_FMT_SBGGR12_1X12, .fmt_reg = 0x2C, + }, { + .code = MEDIA_BUS_FMT_Y8_1X8, + .fmt_reg = 0x2A, + }, { + .code = MEDIA_BUS_FMT_Y10_1X10, + .fmt_reg = 0x2B, }, { /* sentinel */ } @@ -702,12 +708,14 @@ static void disp_mix_gasket_config(struct dwc_mipi_csi2_host *csi2h) fmt_val = DT_YUV422_8; break; case MEDIA_BUS_FMT_SBGGR8_1X8: + case MEDIA_BUS_FMT_Y8_1X8: fmt_val = DT_RAW8; break; case MEDIA_BUS_FMT_SBGGR10_1X10: case MEDIA_BUS_FMT_SGBRG10_1X10: case MEDIA_BUS_FMT_SGRBG10_1X10: case MEDIA_BUS_FMT_SRGGB10_1X10: + case MEDIA_BUS_FMT_Y10_1X10: fmt_val = DT_RAW10; break; case MEDIA_BUS_FMT_SBGGR12_1X12: diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c index c3d6bbeed6a2..ddcac91c84e2 100644 --- a/drivers/staging/media/imx/imx8-isi-cap.c +++ b/drivers/staging/media/imx/imx8-isi-cap.c @@ -54,7 +54,19 @@ struct mxc_isi_fmt mxc_isi_src_formats[] = { .memplanes = 1, .colplanes = 1, .align = 2, - } + }, { + .name = "Grey8 (Y8)", + .fourcc = V4L2_PIX_FMT_GREY, + .depth = { 8 }, + .memplanes = 1, + .colplanes = 1, + }, { + .name = "Grey10 (Y10)", + .fourcc = V4L2_PIX_FMT_Y10, + .depth = { 16 }, + .memplanes = 1, + .colplanes = 1, + }, }; struct mxc_isi_fmt *mxc_isi_get_format(unsigned int index) @@ -100,6 +112,10 @@ struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt) sd_fmt->format.code == MEDIA_BUS_FMT_UYVY8_1X16|| sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_2X8) index = 1; + else if (sd_fmt->format.code == MEDIA_BUS_FMT_Y8_1X8) + index = 2; + else if (sd_fmt->format.code == MEDIA_BUS_FMT_Y10_1X10) + index = 3; else index = 0; return &mxc_isi_src_formats[index]; @@ -752,7 +768,7 @@ static int mxc_isi_capture_release(struct file *file) struct vb2_queue *q = vdev->queue; int ret = -1; - if (!isi_cap->is_link_setup) + if (!isi_cap->is_link_setup || atomic_read(&mxc_isi->usage_count) == 0) return 0; if (isi_cap->is_streaming[isi_cap->id]) @@ -961,6 +977,10 @@ static int mxc_isi_source_fmt_init(struct mxc_isi_cap_dev *isi_cap) src_fmt.pad = source_pad->index; src_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; src_fmt.format.code = MEDIA_BUS_FMT_UYVY8_1X16; + bool is_rgb(u32 pix_fmt); + bool is_yuv(u32 pix_fmt); + if (!is_rgb(dst_f->fmt->fourcc) && !is_yuv(dst_f->fmt->fourcc)) + src_fmt.format.code = dst_f->fmt->mbus_code; src_fmt.format.width = dst_f->width; src_fmt.format.height = dst_f->height; ret = v4l2_subdev_call(src_sd, pad, set_fmt, NULL, &src_fmt); @@ -1693,6 +1713,7 @@ static int mxc_isi_register_cap_device(struct mxc_isi_cap_dev *isi_cap, goto err_ctrl_free; vdev->ctrl_handler = &isi_cap->ctrls.handler; + v4l2_dev->ctrl_handler = &isi_cap->ctrls.handler; v4l2_info(v4l2_dev, "Registered %s as /dev/%s\n", vdev->name, video_device_node_name(vdev)); @@ -1924,3 +1945,9 @@ MODULE_DESCRIPTION("IMX8 Image Sensor Interface Capture driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("ISI Capture"); MODULE_VERSION("1.0"); + +// patch +// line 57-69: mxc_isi_src_formats[], add 2 formats for topaz2m camera +// line 115-118: mxc_isi_get_src_fmt(), add supporting 2 formats for topaz2m camera +// line 980-983: mxc_isi_source_fmt_init(), supporting get format from mbus_code +// line 1716: mxc_isi_register_cap_device(), pass ctrl handler to v4l2_dev diff --git a/drivers/staging/media/imx/imx8-isi-fmt.c b/drivers/staging/media/imx/imx8-isi-fmt.c index db11c809a3d3..16a6317b87e2 100644 --- a/drivers/staging/media/imx/imx8-isi-fmt.c +++ b/drivers/staging/media/imx/imx8-isi-fmt.c @@ -97,7 +97,26 @@ struct mxc_isi_fmt mxc_isi_out_formats[] = { .colplanes = 1, .align = 2, .mbus_code = MEDIA_BUS_FMT_RGB888_1X24, - } + }, { + .name = "Grey8 (Y8)", + .fourcc = V4L2_PIX_FMT_GREY, + .depth = { 8 }, + .color = MXC_ISI_OUT_FMT_RAW8, + .memplanes = 1, + .colplanes = 1, + .mbus_code = MEDIA_BUS_FMT_Y8_1X8, + }, { + .name = "Grey10 (Y10)", + .fourcc = V4L2_PIX_FMT_Y10, + .depth = { 16 }, + .color = MXC_ISI_OUT_FMT_RAW10, + .memplanes = 1, + .colplanes = 1, + .mbus_code = MEDIA_BUS_FMT_Y10_1X10, + }, }; size_t mxc_isi_out_formats_size = ARRAY_SIZE(mxc_isi_out_formats); + +// patch +// line 100-116: mxc_isi_out_formats[], add 2 formats for topaz2m camera diff --git a/drivers/staging/media/imx/imx8-isi-hw.c b/drivers/staging/media/imx/imx8-isi-hw.c index f3b2b98798be..cee34d389309 100644 --- a/drivers/staging/media/imx/imx8-isi-hw.c +++ b/drivers/staging/media/imx/imx8-isi-hw.c @@ -103,7 +103,7 @@ static void printk_pixelformat(char *prefix, int val) (val >> 24) & 0xff); } -static bool is_rgb(u32 pix_fmt) +bool is_rgb(u32 pix_fmt) { if ((pix_fmt == V4L2_PIX_FMT_RGB565) || (pix_fmt == V4L2_PIX_FMT_RGB24) || @@ -120,7 +120,7 @@ static bool is_rgb(u32 pix_fmt) return false; } -static bool is_yuv(u32 pix_fmt) +bool is_yuv(u32 pix_fmt) { if ((pix_fmt == V4L2_PIX_FMT_YUYV) || (pix_fmt == V4L2_PIX_FMT_YUV32) || @@ -812,3 +812,7 @@ void mxc_isi_m2m_start_read(struct mxc_isi_dev *mxc_isi) writel(val, mxc_isi->regs + CHNL_MEM_RD_CTRL); } EXPORT_SYMBOL_GPL(mxc_isi_m2m_start_read); + +// patch +// line 106: is_rgb() discard static declaration so can used outside. +// line 123: is_yuv() discard static declaration so can used outside. 顺祝商祺! Johnson Re: camera on imx93 board 你介意和我分享 dts 文件吗?让我仔细检查一下,你使用的是什么版本的 bsp? Re: camera on imx93 board 抱歉,社区出了点问题,我错过了消息,你们能解决这个问题吗? Re: camera on imx93 board 你好@joanxie、 还没有。 视情况而定,我只有摄像机的数据表,没有摄像机的参考手册,也没有用于测量车道实际频率的高速示波器。根据数据表,车道速度为 1.2G。因此,在 2 条通道和 RAW8 的情况下,像素速度可能为 1.2G x 2 / 8 = 300M,对吗? 如果是这样,我需要如何配置 CSI/ISP 时钟才能避免 FIFO 溢出? 顺祝商祺! 约翰逊 Re: camera on imx93 board @joanxie : 1. 我已经通过启用 ppi_pg_enable 使 CSI 测试模式正常工作。预览时,我看到了垂直测试图案。 2. 现在我遇到的情况是,当我使用 topaz2m 相机预览时,我用 v4l2-ctl 导出的所有数据都是 0。 以下是转储数据时转储的一些重要寄存器值,未发现任何错误或致命错误。请注意,该相机运行在 imx8mp 平台上。 首次寄存器转储: INT_ST_MAIN:4ae0000c 0x00000000 PHY_RX:4ae00048 0x00010000 PHY_STOPSTATE:4ae0004c 0x00010003 像素计数:4ac10044 0x000000C1 CHNL_OUT_BUF1_ADDR_Y: 4ae40070 0xB3200000 CHNL_OUT_BUF2_ADDR_Y: 4ae4008c 0xB2C00000 第二个寄存器转储: INT_ST_MAIN:4ae0000c 0x00000000 PHY_RX:4ae00048 0x00030000 PHY_STOPSTATE:4ae0004c 0x00000000 像素计数:4ac10044 0x00000131 CHNL_OUT_BUF1_ADDR_Y: 4ae40070 0xB3F00000 CHNL_OUT_BUF2_ADDR_Y: 4ae4008c 0xB2C00000 你知道为什么所有数据 ISI 输出都是 0xff 吗?是不是我漏掉了什么? 顺祝商祺! Johnson
查看全文
mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 Can encryption and signing be applied to a specified range of flash space? How does the program's own read/write behavior within the encrypted flash region differ from before (is the data read back ciphertext? is the data written plaintext?)? During OTA upgrades, how can the architecture be made to match the chip's encryption/decryption without conflicts? Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 Hello, To be clear first: once encryption is enabled, when a program running on the chip writes to flash, the data it writes is plaintext, but what is ultimately stored in flash is ciphertext; when the ciphertext in flash is read by a program running on the chip, it comes out as plaintext. Correct Based on above viewpoint : Then, the SB file read by your Secure Provisioning software is ciphertext, and what is sent over serial ISP to the chip’s factory ISP ROM bootloader must also be ciphertext (otherwise there would be a logical flaw). The factory ISP ROM bootloader decrypts the ciphertext received over serial into plaintext, and then writes the plaintext data into flash, but ultimately the data stored in flash is encrypted again, becoming ciphertext. In other words, during ISP programming, the factory ISP ROM bootloader first decrypts and then encrypts, going through a decrypt-then-encrypt round trip. Let me put more light into this: yes SB file is encrypted and must be decrypted by ROM before writing to Flash. But SB file is encrypted completely independently, to protect the firmware between the OEM and manufacturing facility. Programming flash, either internal or external, is different story and either is not used at all or is used with different algorithm, initial vector, etc. Regards, Libor Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 To be clear first: once encryption is enabled, when a program running on the chip writes to flash, the data it writes is plaintext, but what is ultimately stored in flash is ciphertext; when the ciphertext in flash is read by a program running on the chip, it comes out as plaintext.   Based on above  viewpoint : Then, the SB file read by your Secure Provisioning software is ciphertext, and what is sent over serial ISP to the chip’s factory ISP ROM bootloader must also be ciphertext (otherwise there would be a logical flaw). The factory ISP ROM bootloader decrypts the ciphertext received over serial into plaintext, and then writes the plaintext data into flash, but ultimately the data stored in flash is encrypted again, becoming ciphertext. In other words, during ISP programming, the factory ISP ROM bootloader first decrypts and then encrypts, going through a decrypt-then-encrypt round trip.                           Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 Hi, For MCXN devices: Can encryption and signing be applied to a specified range of flash space? SEC tool: - signs whole application - encryption region is configured once in the product lifetime, you need to make a reserve for future updates (increased size of app) How does the program's own read/write behavior within the encrypted flash region differ from before (is the data read back ciphertext? is the data written plaintext?)? Encryption/decryption is on-the-fly. App reading from flash does not need to care, it is transparent. About writing to encrypted flash region from the application itself, you need to investigate, I'm not sure if there are any caveats. During OTA upgrades, how can the architecture be made to match the chip's encryption/decryption without conflicts? As mentioned above, you need to specify reasonable size of memory region for encryption. If you application exceeds the encrypted region, OTA will work, only the part of the app that will be outside of encrypted area will still work, only your IP won't be protected by the encryption. Regards, Libor
查看全文
促销优惠券 您好, 为什么我的促销优惠券“ADCWFBXT”对FRDM-MCXN236无效? 普拉莫德·乔格卡 [email protected] 开发板 FRDM 培训 Re: PROMO Coupon 连我都无法使用FRDM-MCXN236 的促销优惠券。 Re: PROMO Coupon 请注意,优惠券 ADCWFBXT 的有效期至 2025 年 12 月 30 日。正如我们网站上所说: FRDM 创新——由我们负责!   祝您今天愉快。
查看全文
Re: S32G274A LLCE CAN 当前自研板运行在多核模式下,1个A53核是用来和其他设备网络通信任务的,还有几个A53跑的是一些总线通信的驱动,每个类型的总线单独使用一个A53核。现在出现了一个问题是当前给LLCE CAN配置的恢复操作是设置LLCE CAN的模式先stop再start,在实际运行的场景大部分可以恢复通信的,但是有的时候会频繁的执行总线恢复以至于到影响其他的A53正常运行(网络通信任务中断)。想问的是LLCE CAN有那些方法可以总线恢复,还有是为什么LLCE CAN已经单独放置一个核运行还会影响到其他的核。以下是版本信息:S32G_LLCE_1_0_9;SW32G_RTD_4.4_4.0.2_P04_D2312 Re: S32G274A LLCE CAN Hello, @JACK_Q  您好 麻烦您详细介绍一下您的软硬件测试环境: 1. 在您的系统中,是M核和A核端同时使用吗?M7核运行什么任务?基于哪些软件包? 2. A53端从您的描述来看,每个核都有自己的任务,请问是运行的什么软件?是否是Linux BSP? BR Chenyin
查看全文
Falconモードでセキュアブートを有効にする(カーネルバージョン6.12.49)|| iMX8MP_EVK チームの皆さん、こんにちは。 Falcon ModeでSecure Boot を有効にするのを手伝ってもらえます か? meta-imx-fastboot GitHubリポジトリ の助けを借りて、Falcon Modeの実現に成功しました 。しかし、meta-imx-fastbootの実装では 、Falcon Modeのブートフロー中に 意図的に OP-TEE が削除されていることがわかりました。 OP-TEEも私のユースケースに必要なので、NXPフォーラムで質問をしました。@elena_popa OP-TEEを保持・有効化するソリューションを提供してくれました。参考のためにフォーラム のリンク を添付しました。 現在、Secure Bootを有効にする際に問題に直面しています 現在のカーネルバージョンでファルコンモード付きのセキュアブートに関するドキュメントが見つからなかったためです。 環境詳細: ボード: i.MX8M Plus EVK(i.MX8MP EVK) カーネルバージョン: 6.12.49 Yocto Environment: Yocto拠点のNXP BSP ブートモード:ファルコンモード 要件:ファルコンモード + OP-TEE + セキュアブート Yocto Project Re: Enable Secure Boot in Falcon Mode (6.12.49 - Kernel Version) || iMX8MP_EVK こんにちは、 どのエラーが出ているのか教えていただけますか? よろしくお願いいたします。
查看全文
mcxn947加密区域可以指定范围,程序内部如何访问flash加密区域 能否对指定范围的闪存空间进行加密和签名? 程序在加密闪存区域内的读/写行为与之前有何不同(读取回的数据是密文吗?写入的数据是明文吗?)? 在 OTA 升级过程中,如何使架构与芯片的加密/解密相匹配而不发生冲突? Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 你好, 首先要明确一点:一旦启用加密,当芯片上运行的程序向闪存写入数据时,写入的数据是明文,但最终存储在闪存中的是密文;当芯片上运行的程序读取闪存中的密文时,读取出来的却是明文。 正常 基于以上观点: 然后,您的安全配置软件读取的 SB 文件是密文,通过串行 ISP 发送到芯片的工厂 ISP ROM 引导加载程序的内容也必须是密文(否则就会出现逻辑缺陷)。工厂 ISP ROM 引导加载程序将通过串口接收的密文解密为明文,然后将明文数据写入闪存,但最终存储在闪存中的数据又会被加密,变成密文。 换句话说,在 ISP 编程期间,工厂 ISP ROM 引导加载程序首先进行解密,然后再进行加密,经历一个解密再加密的往返过程。 让我再详细解释一下: 是的,SB 文件已加密,必须先由 ROM 解密才能写入 Flash。但SB文件是完全独立加密的,以保护OEM厂商和制造工厂之间的固件安全。 对闪存(无论是内部闪存还是外部闪存)进行编程是另一回事,要么根本不使用闪存,要么使用不同的算法、初始向量等。 此致, 伦敦银行间同业拆借利率 (Libor) Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 首先要明确一点:一旦启用加密,当芯片上运行的程序向闪存写入数据时,写入的数据是明文,但最终存储在闪存中的是密文;当芯片上运行的程序读取闪存中的密文时,读取出来的却是明文。   基于以上观点: 然后,您的安全配置软件读取的 SB 文件是密文,通过串行 ISP 发送到芯片的工厂 ISP ROM 引导加载程序的内容也必须是密文(否则就会出现逻辑缺陷)。工厂 ISP ROM 引导加载程序将通过串口接收的密文解密为明文,然后将明文数据写入闪存,但最终存储在闪存中的数据又会被加密,变成密文。 换句话说,在 ISP 编程期间,工厂 ISP ROM 引导加载程序首先进行解密,然后再进行加密,经历一个解密再加密的往返过程。                           Re: mcxn947 加密区域可以指定范围么,程序内部如何访问flash加密区 您好, 对于 MCXN 设备: 能否对指定范围的闪存空间进行加密和签名? 高效密码学标准\(SEC\)工具: - 签署整个申请 - 加密区域在产品生命周期内只需配置一次,您需要预留空间以备将来更新(应用程序体积增大)之需。 程序在加密闪存区域内的读/写行为与之前有何不同(读取回的数据是密文吗?写入的数据是明文吗?)? 加密/解密是即时进行的。应用程序从闪存读取数据无需关心,它是透明的。关于从应用程序本身写入加密闪存区域的问题,你需要进行调查,我不确定是否存在任何注意事项。 在 OTA 升级过程中,如何使架构与芯片的加密/解密相匹配而不发生冲突? 如上所述,您需要指定合理大小的加密内存区域。如果您的应用程序超出加密区域,OTA 更新仍可运行,但只有应用程序超出加密区域的部分仍可运行,您的 IP 地址将不再受加密保护。 此致, 伦敦银行间同业拆借利率 (Libor)
查看全文
S32K1_S32M24X 和 S32K1 RTD 封装有什么区别? 我正在为S32K116进行开发。 我在检查 S32DS 扩展和更新时注意到,我安装了两个 S32K1 软件包: “S32K1_S32M24X 实时驱动程序 AUTOSAR R21-11 版本 3.0.0”QLP06” 和 S32K1 实时驱动程序 AUTOSAR R21-11 版本 3.0.0QLP06“ 两者之间有什么区别? 如果他们也对我的情况这样做,我应该保留哪个/卸载哪个? 我尝试移除其中一个(S32K1),但之后我的项目就无法加载它们的 .mex 文件了。文件不再存在。 Re: Difference between S32K1_S32M24X and S32K1 RTD packages? 嗨@daniel_meier 虽然这些软件包看起来可能很相似,但它们彼此之间以及与 S32DS 之间存在依赖关系,因此不应被视为可以彼此独立使用的独立组件。 因此,我们建议重新安装该软件包,并保持两个软件包都已安装,以确保项目功能正常。 BR,VaneB
查看全文
FreeMaster Lite NODE Redに新しいノードを統合することは不可能です 親愛なるみんな FreeMaster Liteを使用してNode-REDにウィジェットを統合したいと考えています。NXPのトレーニング終了後 FreeMASTER Lite 1.1 + Node-RED統合 https://www.nxp.com/design/design-center/training/TIP-FREEMASTER-LITE-NODE-RED (@ minute 0:40)ウィジェットは設定 -> 管理パレットにアクセスすることで追加されるべきであることが示されています。しかし、最新のFreeMaster LiteインストールにはPalett管理オプションがなく、NXPのサイトからダウンロードしたばかりです どんなサポートでも感謝します パオロ Re: Impossible to integrare new node in FreeMaster Lite NODE Red こんにちは、@pberna67 さん。 FreeMASTER Lite バージョン1.5.1を使用しているか確認していただけますか: 2.png2.png2.png また、Node-REDのバージョンは4.0.9です。 1.png1.png1.png クリーンインストールをして「パレット管理」オプションにアクセスできました。 ちょっと確認しますが、ユーザーフォルダから「.node_red」フォルダを削除(または名前変更)して、古いNode-REDの設定が最新のインストールに干渉していないか確認してみてはどうでしょうか。 それでも解決しない場合は、追加の詳細を教えてもらえますか: FreeMASTER Liteは、スタンドアロンインストーラーから実行していますか、それともFreeMASTER 3.2本体に同梱されているインストーラーから実行していますか? お使いのホストOSは何ですか? 外部にNode-REDをインストールしていますか? 敬具、 イウリアン Re: Impossible to integrare new node in FreeMaster Lite NODE Red 親愛なるイウリアン 迅速なご回答ありがとうございます! 私が使用しているFreeMASTERは、FreeMASTER Liteバージョン1.5.1であることを確認します。 pberna67_0-1790026466167.pngpberna67_0-1790026466167.png Node-REDのバージョンは4.09です。 pberna67_1-1790026600039.pngpberna67_1-1790026600039.png FreeMASTER Liteは、スタンドアロンインストーラーから実行していますか、それともFreeMASTER 3.2本体に同梱されているインストーラーから実行していますか? インストールしたパッケージは以下の通りです: pberna67_2-1790027196038.pngpberna67_2-1790027196038.png それ以前にFreeMASTERパッケージは一切インストールされていませんでした。 お使いのホストOSは何ですか? まだWindows 10です 外部にNode-REDをインストールしていますか? いいえ、していません よろしくお願いします。 パオロ Re: Impossible to integrare new node in FreeMaster Lite NODE Red こんにちは、@pberna67 さん。 Node-REDのドキュメントを確認しましたが、NPMがインストールされていない場合に起こる動作のようです。パレット管理機能は、依存関係のダウンロードとインストールにNPMツールを使用しています。 NPMは別途インストールする必要があります。Node-REDコミュニティにはこのトピックについて詳しく説明しているスレッドがあります: https://discourse.nodered.org/t/why-isn't-manage-palette-showing-up/27219/9 お役に立てば幸いです。 イウリアン Re: Impossible to integrare new node in FreeMaster Lite NODE Red 親愛なるイウリアン どこにもnpmプログラムがインストールされているのが見当たりません。node-redパッケージもインストールする必要がありますか?それともすべてインストールすればいいのですが、 ? Node-REDの一部は動作するのに、一部は動作しないというのは奇妙です。あなたが示したスレッドには、追加コンポーネントNPMのインストール方法が示されていません。他に何かアイデアはありますか? 宣言されています: https://www.nxp.com/design/design-center/software/development-software/freemaster-run-time-debugging-tool:FREEMASTER FreeMasterはグラフィカルユーザーインターフェース(GUI)ガイド 設計ツールとの連携機能を備えています。FreeMasterのGUIビルダーに関する事例や、その他の統合に関する詳細情報はありますか? よろしくお願いいたします パオロ
查看全文