- Feb 11, 2025
-
-
Remove checking the mediatek,ufs-support-va09 property to decide whether to try to support the VA09 regulator handling and change the ufs_mtk_init_va09_pwr_ctrl() function to make it call devm_regulator_get_optional(): if the regulator is present, then we set the UFS_MTK_CAP_VA09_PWR_CTRL, effectively enabling the handling of the VA09 regulator based on that. Also, make sure to pass the return value of the call to devm_regulator_get_optional() to the probe function, so that if it returns a probe deferral, the appropriate action will be taken. While at it, remove the error print (disguised as info...) when the va09 regulator was not found. Fixes: ac8c2459 ("scsi: ufs-mediatek: Decouple features from platform bindings") Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
- Feb 06, 2025
-
-
AngeloGioacchino Del Regno authored
Now that all of the mmsys routing tables have been fixed, migrate all of them to use the MMSYS_ROUTE() macro: this will make sure that future additions to any of the tables for the currently supported SoCs are compile-time sanity checked, greatly reducing room for (way too common) mistakes. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
The mmsys driver reads the routing table and writes to the hardware `val & mask`, but multiple entries in the mmsys routing table for the MT8365 SoC are setting a 0x0 mask: this effectively writes .. nothing .. to the hardware. That would never work, and if the display controller was actually working with the mmsys doing no routing at all, that was only because the bootloader was correctly setting the display controller routing registers before booting the kernel, and the mmsys was never reset. Make this table to actually set the routing by adding the correct register masks to it. While at it, also change MOUT val definitions to BIT(x), as the MOUT registers are effectively checking for each bit to enable output to the corresponding HW. Please note that, for this SoC, only the MOUT registers are checking bits (as those can enable multiple outputs), while the others are purely reading a number to select an input. Fixes: bc3fc5c0 ("soc: mediatek: mmsys: add MT8365 support") Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
The mmsys routing table for this SoC was effectively missing initialization of the val variable of struct mtk_mmsys_routes: this means that `val` was incorrectly initialized to zero, hence the registers were wrongly initialized. Add the required regval to all of the entries of the routing table for this SoC to fix display controller functionality. Fixes: 060f7875 ("soc: mediatek: mmsys: Add support for MT8167 SoC") Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
- Feb 04, 2025
-
-
AngeloGioacchino Del Regno authored
This is a defconfig for all MediaTek Genio boards, running on ArchLinux, Debian or PostmarketOS. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
This board features multiple USB connectors: * One Type-C connector with Power Delivery and Alt. Modes; * One MicroUSB connector, also used for bootloader SW download; * One USB through the RaspberryPi-compatible pins header. Add configuration for the MTU3 controllers providing OTG support with role switching both on the MicroUSB port, RPi pins header, and the Type-C port found on this board. Moreover, add the Richtek RT1715 Type-C Power Delivery Controller which manages current source/sink, linked to the iTE IT5205 Type-C Alternate Mode Passive Mux, handling both mode switching between USB (up to 3.1 Gen2 10Gbps) and DisplayPort (four lanes, DP1.4, op to 8.1Gbps) and plug orientation switching. All USB ports reside on different controller instances, and all of them support host or gadget and can be configured as desired at runtime. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
The MT8188 SoC has three USB controllers, and all of them are behind the MTU3 DRD controller. Add the missing MTU3 nodes, default disabled, for all USB controllers and move the related XHCI nodes to be children of their MTU3 DRD to correctly describe the SoC. In order to retain USB functionality on all of the MT8188 and MT8390 boards, also move the vusb33 supply and enable the relevant MTU3 nodes with special attention to the MT8188 Geralt Chromebooks, where it was necessary to set the dr_mode of all MTU3 controllers to host to avoid interfering with the EC performing DRD on its own. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
During probe, the TCPC alert interrupts are getting masked to avoid unwanted interrupts during chip setup: this is ok to do but there is no unmasking happening at any later time, which means that the chip will not raise any interrupt, essentially making it not functional as, while internally it does perform all of the intended functions, it won't signal anything to the outside. Unmask the alert interrupts to fix functionality. Fixes: ce08eaeb ("staging: typec: rt1711h typec chip driver") Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add routing paths to support Display Stream Compression on the VDOSYS0 pipelines ending with DSI or DisplayPort (DP_INTF). Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
MT8188 uses DPI1 to output to the HDMI controller: add the Start of Frame and End of Frame configuration for the DPI1 IP to the tables to unblock generation and sending of these signals to the GCE. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
-
AngeloGioacchino Del Regno authored
Add the MediaTek CEC v2 Controller driver, found in SoCs equipped with the HDMIv2 Controller IP, like MT8195 and MT8188. In the MT8195 SoC the (single) CEC Controller is shared between the HDMI-TX and the HDMI-RX controllers, while in MT8188 this is used only for HDMI-TX (as there is no receiver in the latter). Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add a missing clock found in the VDO1 controller for the HDMI TX controller over DPI1. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
Nícolas F. R. A. Prado authored
This avoids a hang during boot when the platform sound driver is compiled as a module. Suggested-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Ariel D'Alessandro authored
Based on https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/ Currently supports: * mt8390-genio-700-evk Signed-off-by:
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
-
AngeloGioacchino Del Regno authored
The str_read_write() helper function is defined in the missing string_choices.h header: include it to resolve build failures. Fixes: f2c77f6e ("iommu/arm-smmu-v3: Use str_read_write helper w/ logs") Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add a node for the HDMI-A connector found on this board, then configure the display pipeline and enable the required DPI1 interface, HDMI controller, its integrated DDC and the HDMI PHY to enable support for the HDMI output provided by this EVK. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
The HDMI Controller is connected to the display pipeline through the secondary Display Parallel Interface instance (DPI1). Add nodes for DPI1, HDMI Controller, its integrated I2C DDC, and for the HDMI PHY, and keep them disabled by default. Boards providing this output are expected to enable the required nodes and configure the display pipeline to hook it up. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add a pinctrl configuration for the Touchscreen IC's power line to make sure that the pin is configured as GPIO and to stop relying on correct pin configuration from bootloader. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Configure the DSI0 display pipeline and add regulator, pinctrl and display node to enable the Startek KD070FHFID078 panel found on the MediaTek Genio 700 EVK. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
- Jan 16, 2025
-
-
AngeloGioacchino Del Regno authored
Add all of the Multimedia Data Path 3 (MDP3) related nodes including its Mutex instances, one for each VPPSYS block, and all of its DMA controllers, Film Grain (FG), HDR, Adaptive Ambient Light (AAL), Frame Resizer (RSZ), Tone Curve Conversion (TCC), Two-Dimensional Sharpness (TDSHP), and others, enabling the entire MDP3 macro-block. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add compatible strings for the FG, HDR, RSZ, STITCH, TCC, TDSHP and WROT hardware components found in MediaTek's MT8188 SoC. This hardware is compatible with MT8195. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add compatible strings for the AAL, COLOR, MERGE and PADDING hardware components found in MediaTek's MT8188 SoC. This hardware is compatible with MT8195. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add binding for the HDMI TX clock found in the VDO1 controller. While at it, also remove the unused CLK_VDO1_NR_CLK. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add a node for the third instance of the eMMC/SD/SDIO controller found on the MT8188 SoC and keep it disabled. It is expected that only boards that are using this controller instance will configure and enable it. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add nodes for the DSC0 and MERGE0 blocks, located in VDOSYS0 and necessary to add support for Display Stream Compression with a display pipeline that looks like: [other components] -> DSC0 -> MERGE0 -> Display Interface Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
This board can use a MIPI-DSI panel on the DSI0 connector: in preparation for adding an overlay for the Radxa Display 8HD, add a pipeline connecting VDOSYS0 components to DSI0. This pipeline remains disabled by default, as it is expected to be enabled only by a devicetree overlay that declares the actual DSI panel node, completing the graph. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add a definition for the on-board HDMI connector, enable and add the relevant configuration for the HDMI PHY and controller, and define the pins used by those. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
The base SoC devicetree now defines a display controller graph: connect the board specific outputs (eDP internal display, DP external display) to fully migrate Cherry and make it finally possible to make Chromebooks and other board types to coexist without per-board driver modifications. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
The display related IPs in MT8195 are flexible and support being interconnected with different instances of DDP IPs and/or with different DDP IPs, forming a full Display Data Path that ends with an actual display output, which is board specific. Add a common graph in the main mt8195.dtsi devicetree, which is shared between all of the currently supported boards. All boards featuring any display functionality will extend this common graph to hook the display controller of the SoC to their specific output port(s). Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add all of the nodes that are required to enable HDMI output, including ones describing the HDMI PHY, Controller and DDC, and the Digital Parallel Interface instance that is internally connected to the HDMI Controller. All of the added nodes are disabled by default as usage is board dependant. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add a driver for the Himax HX8279-D MIPI-DSI DriverIC with support for the Startek KX070FHFID078 7.0" 1200x1920 IPS panel, found on various MediaTek Genio Evaluation Kit boards. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Himax HX8279 is a Display DriverIC suitable for driving LCD MIPI-DSI panels. Describe this DriverIC and the Startek KD070FHFID078 panel found on newer revisions of the MediaTek Genio 510/700/1200 Evaluation Kits (EVK). Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
Cristian Ciocaltea authored
drm_atomic_helper_connector_hdmi_check() helper makes use of connector_state_get_mode() to obtain a drm_display_mode pointer, but it doesn't validate it, which may lead to a NULL pointer dereference in some cases, i.e. unloading a DRM module: [ 1002.910414] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [...] [ 1002.923833] Hardware name: Radxa ROCK 5B (DT) [ 1002.924819] pc : drm_match_cea_mode+0x30/0x280 [drm] [ 1002.925318] lr : hdmi_try_format_bpc+0x7c/0x580 [drm_display_helper] [...] [ 1002.932411] Call trace: [ 1002.932626] drm_match_cea_mode+0x30/0x280 [drm] (P) [ 1002.933120] hdmi_try_format_bpc+0x7c/0x580 [drm_display_helper] [ 1002.933662] drm_atomic_helper_connector_hdmi_check+0x10c/0x478 [drm_display_helper] [ 1002.934355] drm_bridge_connector_atomic_check+0x20/0x40 [drm_display_helper] [ 1002.934993] drm_atomic_helper_check_modeset+0x698/0xd28 [drm_kms_helper] [ 1002.935607] drm_atomic_helper_check+0x28/0xb8 [drm_kms_helper] [ 1002.936143] drm_atomic_check_only+0x794/0x988 [drm] [ 1002.936635] drm_atomic_commit+0x60/0xe0 [drm] [ 1002.937082] drm_atomic_helper_disable_all+0x184/0x218 [drm_kms_helper] [ 1002.937678] drm_atomic_helper_shutdown+0x90/0x150 [drm_kms_helper] [ 1002.938243] rockchip_drm_unbind+0x38/0x80 [rockchipdrm] [ 1002.938720] component_master_del+0xac/0xf8 [ 1002.939089] rockchip_drm_platform_remove+0x34/0x78 [rockchipdrm] [...] Add the missing NULL check before passing the mode pointer further. Fixes: f035f409 ("drm/connector: hdmi: Calculate TMDS character rate") Reviewed-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
-
- Jan 15, 2025
-
-
AngeloGioacchino Del Regno authored
Change the initialization data in the arrays of structure mtk_mmsys_routes to make use of the MMSYS_ROUTE() macro: this will make sure that each array entry's SEL value fits in its corresponding register mask with a compile time check. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Every MediaTek SoC with multimedia capabilities has an array of structure mtk_mmsys_routes that defines a multimedia connection between hardware components. This connection is activated by writing a (masked) value in each specific register, and the association between from->to path and value to write is expressed as an entry in that array. Failing to set the right path does not give any meaningful error and makes things to simply not work as the data will either not be retrieved from the right input port, or will be written to the wrong output port (or both): since a misconfiguration may effectively still be a possibly correct configuration at the HW level, this may be only giving side effects in terms of simply getting no functionality but, again, no errors. In order to reduce room for mistakes in declarations of the mmsys routes, add a macro that compile-time checks that the provided value does at least fit in the register mask. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
- Jan 14, 2025
-
-
AngeloGioacchino Del Regno authored
The VDO1_MERGE4 hardware (merge5 software component) should be set to enable output to DPI1_SEL by setting BIT(2) but, despite the intention being exactly that, this won't work because the declared register mask is wrong as it is set as GENMASK(1, 0). Register MERGE4_MOUT_EN in VDO1 has four used bits [3, 0] so fix the mask to reflect that. That, in turn, allows the mmsys driver to actually set BIT(2) in this register, fixing the MERGE4 output to DPI1 selection. Fixes: c0349314 ("soc: mediatek: Support MT8188 VDOSYS1 in mtk-mmsys") Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Implement the Automated Built-In Self-Test ABIST functionality provided by the HDMIv2 IP and expose it through the "hdmi_abist" debugfs file. Write "1" to this file to activate ABIST, or "0" to deactivate. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add an interlace_allowed bool member to struct mtk_hdmi_ver_conf which will be used to signal whether interlaced modes are supported by the bridge (in our case, the HDMI IP), and enable it for HDMIv2. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
AngeloGioacchino Del Regno authored
Add support for the newer HDMI-TX (Encoder) v2 and DDC v2 IPs found in MediaTek's MT8195, MT8188 SoC and their variants, and including support for display modes up to 4k60 and for HDMI Audio, as per the HDMI 2.0 spec. HDCP and CEC functionalities are also supported by this hardware, but are not included in this commit and that also poses a slight difference between the V2 and V1 controllers in how they handle Hotplug Detection (HPD). While the v1 controller was using the CEC controller to check HDMI cable connection and disconnection, in this driver the v2 one does not. This is due to the fact that on parts with v2 designs, like the MT8195 SoC, there is one CEC controller shared between the HDMI Transmitter (HDMI-TX) and Receiver (HDMI-RX): before eventually adding support to use the CEC HW to wake up the HDMI controllers it is necessary to have support for one TX, one RX *and* for both at the same time. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-