arm64: dts: freescale: imx95-toradex-smarc: Support Cortex M7
Subsystems (2)
PATCH 1/1 arm64: dts: freescale: imx95-toradex-smarc: Support Cortex M7
From: Emanuele Ghidoli <[email protected]>
Enable Cortex M7, the vring nodes, a mailbox and reserve DDR memory for the M7. The remoteproc framework is so capable to load and run the M7 firmware.
--- .../dts/freescale/imx95-toradex-smarc.dtsi | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +50 -0
@@ -42,6 +42,16 @@ clk_serdes_eth_ref: clock-eth-ref { enable-gpios = <&som_gpio_expander_1 13 GPIO_ACTIVE_HIGH>; }; + cm7: remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + }; + connector { compatible = "gpio-usb-b-connector", "usb-b-connector"; /* SMARC P64 - USB0_OTG_ID */
@@ -156,6 +166,42 @@ linux_cma: linux,cma { alloc-ranges = <0 0x80000000 0 0x7f000000>; linux,cma-default; }; + + m7_reserved: memory@80000000 { + reg = <0 0x80000000 0 0x1000000>; + no-map; + }; + + rsc_table: memory@88220000 { + reg = <0 0x88220000 0 0x1000>; + no-map; + }; + + vdev0vring0: memory@88000000 { + reg = <0 0x88000000 0 0x8000>; + no-map; + }; + + vdev0vring1: memory@88008000 { + reg = <0 0x88008000 0 0x8000>; + no-map; + }; + + vdev1vring0: memory@88010000 { + reg = <0 0x88010000 0 0x8000>; + no-map; + }; + + vdev1vring1: memory@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + vdevbuffer: memory@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + }; }; };
@@ -572,6 +618,10 @@ &lpuart3 { pinctrl-0 = <&pinctrl_uart3>; }; +&mu7 { + status = "okay"; +}; + /* SMARC MDIO, shared between all ethernet ports */ &netc_emdio { pinctrl-names = "default";
Signature · 1 line
2.43.0
Frank Li
maintainerQuoted 33 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable Cortex M7, the vring nodes, a mailbox and reserve DDR memory for the M7. The remoteproc framework is so capable to load and run the M7 firmware.
Signed-off-by Emanuele Ghidoli <[email protected]>--- .../dts/freescale/imx95-toradex-smarc.dtsi | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +10
-0@@ -42,6 +42,16 @@ clk_serdes_eth_ref: clock-eth-ref { enable-gpios = <&som_gpio_expander_1 13 GPIO_ACTIVE_HIGH>; }; + cm7: remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + }; + connector { compatible = "gpio-usb-b-connector", "usb-b-connector"; /* SMARC P64 - USB0_OTG_ID */
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi linux_cma: linux,cma { · line 175
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +7
-0@@ -156,6 +166,42 @@ linux_cma: linux,cma { alloc-ranges = <0 0x80000000 0 0x7f000000>; linux,cma-default; }; + + m7_reserved: memory@80000000 { + reg = <0 0x80000000 0 0x1000000>; + no-map; + }; + + rsc_table: memory@88220000 {
I remember driver use hardcode rsc-table, I suggest fan pan to update driver to support memory-region-names to avoid use hidden ABI.
Fan peng, what's current status?
Frank
Quoted 46 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +33
-1+ reg = <0 0x88220000 0 0x1000>; + no-map; + }; + + vdev0vring0: memory@88000000 { + reg = <0 0x88000000 0 0x8000>; + no-map; + }; + + vdev0vring1: memory@88008000 { + reg = <0 0x88008000 0 0x8000>; + no-map; + }; + + vdev1vring0: memory@88010000 { + reg = <0 0x88010000 0 0x8000>; + no-map; + }; + + vdev1vring1: memory@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + vdevbuffer: memory@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + }; }; };@@ -572,6 +618,10 @@ &lpuart3 { pinctrl-0 = <&pinctrl_uart3>; }; +&mu7 { + status = "okay"; +}; + /* SMARC MDIO, shared between all ethernet ports */ &netc_emdio { pinctrl-names = "default"; --2.43.0
Quoted 88 lines · Frank Li
Quoted 33 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Enable Cortex M7, the vring nodes, a mailbox and reserve DDR memory for the M7. The remoteproc framework is so capable to load and run the M7 firmware.
Signed-off-by Emanuele Ghidoli <[email protected]>--- .../dts/freescale/imx95-toradex-smarc.dtsi | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +10
-0@@ -42,6 +42,16 @@ clk_serdes_eth_ref: clock-eth-ref { enable-gpios = <&som_gpio_expander_1 13 GPIO_ACTIVE_HIGH>; }; + cm7: remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + }; + connector { compatible = "gpio-usb-b-connector", "usb-b-connector"; /* SMARC P64 - USB0_OTG_ID */arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi linux_cma: linux,cma { · line 175
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +7
-0@@ -156,6 +166,42 @@ linux_cma: linux,cma { alloc-ranges = <0 0x80000000 0 0x7f000000>; linux,cma-default; }; + + m7_reserved: memory@80000000 { + reg = <0 0x80000000 0 0x1000000>; + no-map; + }; + + rsc_table: memory@88220000 {I remember driver use hardcode rsc-table, I suggest fan pan to update driver to support memory-region-names to avoid use hidden ABI.
Fan peng, what's current status?
Frank
Quoted 36 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +29
-0+ reg = <0 0x88220000 0 0x1000>; + no-map; + }; + + vdev0vring0: memory@88000000 { + reg = <0 0x88000000 0 0x8000>; + no-map; + }; + + vdev0vring1: memory@88008000 { + reg = <0 0x88008000 0 0x8000>; + no-map; + }; + + vdev1vring0: memory@88010000 { + reg = <0 0x88010000 0 0x8000>; + no-map; + }; + + vdev1vring1: memory@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + vdevbuffer: memory@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + }; }; };@@ -572,6 +618,10 @@ &lpuart3 { pinctrl-0 = <&pinctrl_uart3>; };
Quoted 10 lines
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +4
-1+&mu7 { + status = "okay"; +}; + /* SMARC MDIO, shared between all ethernet ports */ &netc_emdio { pinctrl-names = "default"; --2.43.0
Thanks Frank. You’re right.
I spotted that my patch is not working as expected, due to a last minute renaming on my side.
I’ll rework the patch accordingly and send a v2 to align to current expected naming.
Emanuele
Frank Li
maintainerFrom: Frank Li (AI-BOT) <[email protected]>
AI bot review and may be useless.
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi clk_serdes_eth_ref: clock-eth-ref { · line 53
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +9
-0+ cm7: remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + };
Line 51 exceeds 80 columns; consider breaking memory-region into multiple lines for readability.
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi linux_cma: linux,cma { · line 173
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +4
-0+ m7_reserved: memory@80000000 { + reg = <0 0x80000000 0 0x1000000>; + no-map; + };
Consider adding a comment explaining the 16 MB reservation size and purpose (firmware load address, etc.).
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi linux_cma: linux,cma { · line 178
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +4
-0+ rsc_table: memory@88220000 { + reg = <0 0x88220000 0 0x1000>; + no-map; + };
Consider documenting why rsc_table is placed at this specific offset relative to m7_reserved.
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi linux_cma: linux,cma { · line 204
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +5
-0+ vdevbuffer: memory@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + };
Verify that the 1 MB vdevbuffer size is sufficient for the expected virtio traffic between A55 and M7.
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi &lpuart3 { · line 623
Quoted 3 lines
+&mu7 {
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +2
-0+ status = "okay"; +};
Ensure mu7 node is defined elsewhere in the base device tree; this patch only enables it without defining its properties.
Quoted 4 lines · Frank Li
From: Frank Li (AI-BOT) <[email protected]>
AI bot review and may be useless.
..
Quoted 8 lines
---
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi &lpuart3 { · line 623
Quoted 3 lines
+&mu7 {
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +2
-0+ status = "okay"; +};Ensure mu7 node is defined elsewhere in the base device tree; this patch only enables it without defining its properties.
What? That's useless comment. Stop sending such feedback. It is just WRONG.
Best regards,
Krzysztof
Quoted 6 lines · Frank Li
From: Frank Li (AI-BOT) <[email protected]>
AI bot review and may be useless.
---
Quoted 11 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi clk_serdes_eth_ref: clock-eth-ref { · line 53
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +9
-0+ cm7: remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + };Line 51 exceeds 80 columns; consider breaking memory-region into multiple lines for readability.
Frank please relax your bot!
As of commit bdc48fa11e46f867ea ("checkpatch/coding-style: deprecate 80-column warning")
there is no such requirement for wrapping at 80 chars anymore.
<snip>
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi &lpuart3 { · line 623
Quoted 3 lines
+&mu7 {
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +2
-0+ status = "okay"; +};Ensure mu7 node is defined elsewhere in the base device tree; this patch only enables it without defining its properties.
Well it should fail compilation if mu7 was not defined? Sometimes this comments can be confusing so please
review them carefully before replying.
Quoted 10 lines · Frank Li
Review
Quoted 4 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
(quoted diff) +2
-0+ + rsc_table: memory@88220000 {I remember driver use hardcode rsc-table, I suggest fan pan to update driver to support memory-region-names to avoid use hidden ABI.
Fan peng, what's current status?
It is delayed because of the i.MX95 remoteproc patchset. And i.MX94/952 is still on my list as higher priority, so the moving to memory-region-names will be after that.
Regards
Peng
Quoted 49 lines
Frank
Quoted 46 lines
arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi +33
-1+ reg = <0 0x88220000 0 0x1000>; + no-map; + }; + + vdev0vring0: memory@88000000 { + reg = <0 0x88000000 0 0x8000>; + no-map; + }; + + vdev0vring1: memory@88008000 { + reg = <0 0x88008000 0 0x8000>; + no-map; + }; + + vdev1vring0: memory@88010000 { + reg = <0 0x88010000 0 0x8000>; + no-map; + }; + + vdev1vring1: memory@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + vdevbuffer: memory@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + }; }; };@@ -572,6 +618,10 @@ &lpuart3 { pinctrl-0 = <&pinctrl_uart3>; }; +&mu7 { + status = "okay"; +}; + /* SMARC MDIO, shared between all ethernet ports */ &netc_emdio { pinctrl-names = "default"; --2.43.0