Skip to content

Commit 158d088

Browse files
authored
Merge pull request #217 from Ultimaker/SEM-703_Rendering_with_vivante
[SEM-703] Use open source GPU driver
2 parents b9cf174 + 38e0db0 commit 158d088

File tree

2 files changed

+50
-19
lines changed

2 files changed

+50
-19
lines changed

configs/sx8m_defconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ CONFIG_DRM_IMX_DCNANO=y
654654
CONFIG_DRM_IMX95_DPU=y
655655
CONFIG_DRM_IMX_DCSS=y
656656
CONFIG_DRM_IMX_CDNS_MHDP=y
657-
CONFIG_DRM_ETNAVIV=m
657+
CONFIG_DRM_ETNAVIV=y
658658
CONFIG_DRM_HISI_HIBMC=m
659659
CONFIG_DRM_HISI_KIRIN=m
660660
CONFIG_DRM_MXSFB=y
@@ -972,7 +972,6 @@ CONFIG_TEE=y
972972
CONFIG_OPTEE=y
973973
CONFIG_MUX_MMIO=y
974974
CONFIG_MXC_SIM=y
975-
CONFIG_MXC_GPU_VIV=y
976975
CONFIG_MXC_EMVSIM=y
977976
CONFIG_MXC_VIDEO_WAVE6=y
978977
CONFIG_EXT2_FS=y

dts/ultimainboard5-lvds.dtsi

Lines changed: 49 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,46 @@
2727
};
2828

2929

30+
/* SEM-703: Overwriting the existing NXP gpu node to use the GCNanoUltra GPU
31+
The IMX8 mini we're using has two GPU's one for 3D rendering and one for 2D blitting.
32+
For our application only 3D rendering is needed. When enabling both the 2D and 3D core,
33+
we're running into memory crashes which seem related to the amount of memory used by both
34+
chips.
35+
*/
36+
&gpu {
37+
compatible = "vivante,gc";
38+
reg = <0x0 0x38000000 0x0 0x8000>;
39+
40+
/* Limit to ONE interrupt (The 3D Core IRQ) */
41+
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
42+
43+
/* Etnaviv looks for "core", "shader", "bus", "reg" */
44+
clocks = <&clk IMX8MM_CLK_GPU3D_ROOT>, /* core */
45+
<&clk IMX8MM_CLK_GPU3D_ROOT>, /* shader */
46+
<&clk IMX8MM_CLK_GPU_BUS_ROOT>, /* bus */
47+
<&clk IMX8MM_CLK_GPU_AHB>; /* reg */
48+
49+
clock-names = "core", "shader", "bus", "reg";
50+
51+
power-domains = <&pgc_gpu>;
52+
status = "okay";
53+
};
54+
55+
/* Define the subsystem with just this single node */
56+
/ {
57+
gpu-subsystem {
58+
compatible = "fsl,imx-gpu-subsystem";
59+
cores = <&gpu>;
60+
status = "okay";
61+
};
62+
};
3063
/* Remove pins used in Ultiboard 5 from generic GPIOs pinctrl settings of imx8mm. */
3164
&pinctrl_gpio1 {
3265
fsl,pins = <
3366
MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x140 /* GPIO0 / CSI0 PWR */
3467
MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x140 /* TEST# */
3568
MX8MM_IOMUXC_SAI1_RXD0_GPIO4_IO2 0x140 /* GPIO12 */
36-
MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3 0x140 /* GPIO13 */
69+
MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3 0x140 /* GPIO13 */
3770
>;
3871
};
3972

@@ -55,9 +88,9 @@
5588
};
5689

5790
/* SEM-503: We need to connect the IMX8MM pad UART3_RXD and UART3_TXD to the GPIO5 controller,
58-
removing them from the UART1 controller. So we need to re-define these pin control groups
91+
removing them from the UART1 controller. So we need to re-define these pin control groups
5992
here, since it is not possible to delete a pin from a fsl,pin array */
60-
93+
6194
&pinctrl_gpio5 {
6295
fsl,pins = <
6396
MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4 0x140 /* GPIO5 / PWMOUT */
@@ -80,7 +113,7 @@
80113
>;
81114
};
82115

83-
116+
84117
/* Add GPIOs pinctrl for Ultboard 5. */
85118

86119
/* GPIO PAD setting */
@@ -98,10 +131,10 @@
98131
MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x100 /* GPIO3 / CSI1 RST / Led-0 Kernel Heartbeat */
99132
>;
100133
};
101-
134+
102135
pinctrl_i2c3_tca6416: i2c3_tca6416 {
103136
fsl,pins = <
104-
MX8MM_IOMUXC_SAI1_RXFS_GPIO4_IO0 0x080 /* GPIO8 / U35 - TCA6416 INT */
137+
MX8MM_IOMUXC_SAI1_RXFS_GPIO4_IO0 0x080 /* GPIO8 / U35 - TCA6416 INT */
105138
>;
106139
};
107140
};
@@ -128,7 +161,7 @@
128161
Connecting the USB2514B to the I2C bus and increasing the POWER-ON TIME to 110 ms resolves the issue. In this configuration,
129162
we set it to 200 ms to be on the safe side.
130163
*/
131-
164+
132165
usb2514b@2c {
133166
compatible = "microchip,usb2514b";
134167
reg = <0x2c>;
@@ -138,7 +171,7 @@
138171
individual-port-switching;
139172
power-on-time-ms = <200>;
140173
};
141-
174+
142175
tca6416@20 {
143176
compatible = "ti,tca6416";
144177
reg = <0x20>;
@@ -148,12 +181,12 @@
148181
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
149182
gpio-controller;
150183
#gpio-cells = <2>;
151-
gpio-line-names = "VCC5_EXT_EN", "VCC5_EXT_OK", "VCC5_FAN_EN", "VCC5_FAN_OK",
152-
"HDMI_PWR_EN", "HDMI_PWR_OK", "VCC5_PH_EN", "VCC5_PH_OK",
153-
"VCC24_HP_PG", "VCC24_MOT_PG", "LVDS_PWR_EN", "LVDS_PWR_OK",
184+
gpio-line-names = "VCC5_EXT_EN", "VCC5_EXT_OK", "VCC5_FAN_EN", "VCC5_FAN_OK",
185+
"HDMI_PWR_EN", "HDMI_PWR_OK", "VCC5_PH_EN", "VCC5_PH_OK",
186+
"VCC24_HP_PG", "VCC24_MOT_PG", "LVDS_PWR_EN", "LVDS_PWR_OK",
154187
"SAFETY_BTN_STATUS", "SAFETY_RESET", "VCC24_PH_EN", "VCC24_MOT_EN";
155188
};
156-
189+
157190
cabin_light: pca9632@61 {
158191
compatible = "nxp,pca9632";
159192
#address-cells = <1>;
@@ -217,9 +250,9 @@
217250

218251
/* Set pin names for IMXRT control lines */
219252
&gpio4 {
220-
gpio-line-names = "TCA6416A_nINT", "USB2514B_Reset", "", "", "", "", "", "RESET_OUT",
221-
"", "", "", "", "", "", "", "",
222-
"", "", "", "", "IMXRT_nReset", "", "", "",
253+
gpio-line-names = "TCA6416A_nINT", "USB2514B_Reset", "", "", "", "", "", "RESET_OUT",
254+
"", "", "", "", "", "", "", "",
255+
"", "", "", "", "IMXRT_nReset", "", "", "",
223256
"", "", "", "", "IMXRT_BootMode_En", "SAFETY_ENABLED", "", "";
224257
};
225258

@@ -228,7 +261,7 @@
228261
/* SEM-503: The IMX8MM UART3_RXD pad (SMARC P138) is connected to the UMBus Drive Enable pin. It should be connected to VCC5 in HW,
229262
but up to now (2025-01-22) the current ultimainboard 5 still has it connected to wired to the SoM, without any specific
230263
reason / purpose. So here we claim this pin as gpio-hog and set it to high level and then it cannot be changed in runtime */
231-
264+
232265
umbus_drive_enable_hog {
233266
gpio-hog;
234267
gpios = <26 GPIO_ACTIVE_HIGH>;
@@ -280,4 +313,3 @@
280313
status = "disabled";
281314
};
282315
};
283-

0 commit comments

Comments
 (0)