From cec7490d165e36475cdbf90f954099a3088d58e3 Mon Sep 17 00:00:00 2001 From: "Yew, Chang Ching" Date: Thu, 16 Oct 2025 03:36:04 +0800 Subject: [PATCH 1/5] Imaging ACPI config and upstream maxim-serdes GMSL Signed-off-by: Yew, Chang Ching --- acpi/README.md | 62 + acpi/_ipu.dsl | 27 + acpi/_max96724.dsl | 107 + acpi/isx031.dsl | 499 +++ .../0011-media-mc-Add-INTERNAL-pad-flag.patch | 96 + ...a-i2c-max96717-add-myself-as-maintai.patch | 44 + ...a-i2c-max96717-add-support-for-I2C-A.patch | 78 + ...a-i2c-max96717-add-support-for-pinct.patch | 135 + ...a-i2c-max96717-add-support-for-MAX92.patch | 43 + ...a-i2c-max96717-add-support-for-MAX96.patch | 41 + ...a-i2c-max96712-add-myself-as-maintai.patch | 48 + ...a-i2c-max96712-use-pattern-propertie.patch | 76 + ...a-i2c-max96712-add-support-for-I2C-A.patch | 76 + ...a-i2c-max96712-add-support-for-POC-s.patch | 40 + ...a-i2c-max96712-add-support-for-MAX96.patch | 44 + ...a-i2c-max96714-add-myself-as-maintai.patch | 44 + ...a-i2c-max96714-add-support-for-MAX96.patch | 41 + ...a-i2c-add-MAX9296A-MAX96716A-MAX9679.patch | 294 ++ ...xim-GMSL2-3-serializer-and-deseriali.patch | 720 ++++ ...d-Maxim-GMSL2-3-serializer-framework.patch | 2335 ++++++++++++ ...Maxim-GMSL2-3-deserializer-framework.patch | 3391 +++++++++++++++++ ...i2c-maxim-serdes-add-MAX96717-driver.patch | 1753 +++++++++ ...i2c-maxim-serdes-add-MAX96724-driver.patch | 1246 ++++++ ...i2c-maxim-serdes-add-MAX9296A-driver.patch | 1404 +++++++ ...g-disable-deprecated-MAX96712-driver.patch | 29 + ...staging-media-remove-MAX96712-driver.patch | 576 +++ ...033-media-i2c-remove-MAX96717-driver.patch | 1168 ++++++ ...034-media-i2c-remove-MAX96714-driver.patch | 1083 ++++++ ...serdes-max96717-Fix-gpio_chip-set-CB.patch | 28 + ...036-media-i2c-add-ACPI_ID-for-isx031.patch | 38 + ...7-media-i2c-add-ACPI-ID-for-max9296a.patch | 38 + ...8-media-i2c-add-ACPI-ID-for-max9295a.patch | 38 + ...9-media-i2c-add-ACPI-ID-for-max96724.patch | 38 + ...-media-i2c-isx031-add-fwnode-support.patch | 82 + ...-isx031-initialize-v4l2-subdev-state.patch | 37 + ...c-skip-unbind-if-no-subdev-available.patch | 36 + ..._async-Print-out-pending-sub-devices.patch | 65 + ...a-v4l2-subdev-Check-secondary-fwnode.patch | 31 + .../0045-i2c-atr-Add-fwnode-handling.patch | 54 + ...mux-Set-adapter-parent-to-own-device.patch | 44 + ...-identifier-for-ATR-and-MUX-adapters.patch | 61 + ...i-clear-dependency-for-MUX-or-ATR-ad.patch | 67 + ...serdes-max96717-add-acpi-condition-f.patch | 32 + ...c-i2c-atr-Get-adapter-id-from-fwnode.patch | 187 + ...e-create-static-numbered-adapter-for.patch | 31 + ...serdes-max_ser-retrieve-MUX-adapter-.patch | 44 + ...serdes-max_des-Add-conditional-check.patch | 85 + ...-serdes-max9296a-move-use_atr-to-ops.patch | 33 + ...axim-serdes-max9296a-update-register.patch | 28 + ...serdes-max9296a-update-phy-and-strea.patch | 48 + ...serdes-max_ser-retrieve-i2c-gate-fro.patch | 41 + .../0058-media-i2c-isx031-remove-field.patch | 27 + ...ipu6-isys-csi2-get-link-frequency-fr.patch | 53 + ...ipu7-isys-csi2-get-link-frequency-fr.patch | 53 + 54 files changed, 16819 insertions(+) create mode 100644 acpi/README.md create mode 100644 acpi/_ipu.dsl create mode 100644 acpi/_max96724.dsl create mode 100644 acpi/isx031.dsl create mode 100644 patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch create mode 100644 patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-myself-as-maintai.patch create mode 100644 patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch create mode 100644 patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch create mode 100644 patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch create mode 100644 patch/v6.17_iot/0016-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch create mode 100644 patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-myself-as-maintai.patch create mode 100644 patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch create mode 100644 patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch create mode 100644 patch/v6.17_iot/0020-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch create mode 100644 patch/v6.17_iot/0021-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch create mode 100644 patch/v6.17_iot/0022-dt-bindings-media-i2c-max96714-add-myself-as-maintai.patch create mode 100644 patch/v6.17_iot/0023-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch create mode 100644 patch/v6.17_iot/0024-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch create mode 100644 patch/v6.17_iot/0025-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch create mode 100644 patch/v6.17_iot/0026-media-i2c-add-Maxim-GMSL2-3-serializer-framework.patch create mode 100644 patch/v6.17_iot/0027-media-i2c-add-Maxim-GMSL2-3-deserializer-framework.patch create mode 100644 patch/v6.17_iot/0028-media-i2c-maxim-serdes-add-MAX96717-driver.patch create mode 100644 patch/v6.17_iot/0029-media-i2c-maxim-serdes-add-MAX96724-driver.patch create mode 100644 patch/v6.17_iot/0030-media-i2c-maxim-serdes-add-MAX9296A-driver.patch create mode 100644 patch/v6.17_iot/0031-arm64-defconfig-disable-deprecated-MAX96712-driver.patch create mode 100644 patch/v6.17_iot/0032-staging-media-remove-MAX96712-driver.patch create mode 100644 patch/v6.17_iot/0033-media-i2c-remove-MAX96717-driver.patch create mode 100644 patch/v6.17_iot/0034-media-i2c-remove-MAX96714-driver.patch create mode 100644 patch/v6.17_iot/0035-media-maxim-serdes-max96717-Fix-gpio_chip-set-CB.patch create mode 100644 patch/v6.17_iot/0036-media-i2c-add-ACPI_ID-for-isx031.patch create mode 100644 patch/v6.17_iot/0037-media-i2c-add-ACPI-ID-for-max9296a.patch create mode 100644 patch/v6.17_iot/0038-media-i2c-add-ACPI-ID-for-max9295a.patch create mode 100644 patch/v6.17_iot/0039-media-i2c-add-ACPI-ID-for-max96724.patch create mode 100644 patch/v6.17_iot/0040-media-i2c-isx031-add-fwnode-support.patch create mode 100644 patch/v6.17_iot/0041-media-i2c-isx031-initialize-v4l2-subdev-state.patch create mode 100644 patch/v6.17_iot/0042-media-v4l2_async-skip-unbind-if-no-subdev-available.patch create mode 100644 patch/v6.17_iot/0043-media-v4l2_async-Print-out-pending-sub-devices.patch create mode 100644 patch/v6.17_iot/0044-media-v4l2-subdev-Check-secondary-fwnode.patch create mode 100644 patch/v6.17_iot/0045-i2c-atr-Add-fwnode-handling.patch create mode 100644 patch/v6.17_iot/0046-i2c-i2c-mux-Set-adapter-parent-to-own-device.patch create mode 100644 patch/v6.17_iot/0047-i2c-add-identifier-for-ATR-and-MUX-adapters.patch create mode 100644 patch/v6.17_iot/0048-i2c-i2c-core-acpi-clear-dependency-for-MUX-or-ATR-ad.patch create mode 100644 patch/v6.17_iot/0049-media-i2c-maxim-serdes-max96717-add-acpi-condition-f.patch create mode 100644 patch/v6.17_iot/0050-i2c-i2c-atr-Get-adapter-id-from-fwnode.patch create mode 100644 patch/v6.17_iot/0051-i2c-i2c-core-base-create-static-numbered-adapter-for.patch create mode 100644 patch/v6.17_iot/0052-media-i2c-maxim-serdes-max_ser-retrieve-MUX-adapter-.patch create mode 100644 patch/v6.17_iot/0053-media-i2c-maxim-serdes-max_des-Add-conditional-check.patch create mode 100644 patch/v6.17_iot/0054-media-i2c-maxim-serdes-max9296a-move-use_atr-to-ops.patch create mode 100644 patch/v6.17_iot/0055-media-i2c-maxim-serdes-max9296a-update-register.patch create mode 100644 patch/v6.17_iot/0056-media-i2c-maxim-serdes-max9296a-update-phy-and-strea.patch create mode 100644 patch/v6.17_iot/0057-media-i2c-maxim-serdes-max_ser-retrieve-i2c-gate-fro.patch create mode 100644 patch/v6.17_iot/0058-media-i2c-isx031-remove-field.patch create mode 100644 patch/v6.17_iot/0059-media-pci-intel-ipu6-isys-csi2-get-link-frequency-fr.patch create mode 100644 patch/v6.17_iot/0060-media-pci-intel-ipu7-isys-csi2-get-link-frequency-fr.patch diff --git a/acpi/README.md b/acpi/README.md new file mode 100644 index 0000000..ba7f372 --- /dev/null +++ b/acpi/README.md @@ -0,0 +1,62 @@ +# Imaging ACPI Configuration SSDT +## Overview +This directory contains imaging specific ACPI SSDT ASL sources + +Table of sensor ASL sources +| File | Component | +|---------------|---------------------------------------------| +| isx031.dsl | 4x D3 ISX031 sensor with MAX9295 serializer | + +Table of common ASL include sources +| File | Component | +|---------------|-----------------------------| +| _ipu0.dsl | IPU7 | +| _max96724.dsl | MAX96724 GMSL2 deserializer | + +## How to compile ACPI ASL source +1. Install acpica tools version 20250807 https://github.com/acpica/acpica/releases/tag/20250807 +```sh + wget https://github.com/user-attachments/files/21674610/acpica-unix-20250807.tar.gz + tar zxf ../acpica-unix-20250807.tar.gz + cd acpica-unix-20250807/ + make + sudo make install + ``` + +2. Compile ASL source into AML file +```sh +iasl isx031.dsl +``` + +## How to load imaging SSDT at boot time +1. Create initramfs containing AML file +```sh +mkdir -p kernel/firmware/acpi/ +find kernel | cpio -H newc --create > img_ssdt.img +``` + +2. Copy initfamfs to /boot directory +```sh +sudo cp img_ssdt.img /boot +``` + +3. Add following line to /etc/default/grub for GRUB to load SSDT initramf +``` +GRUB_EARLY_INITRD_LINUX_CUSTOM="img_ssdt.img" +``` +4. Rebuild GRUB configuration +```sh +sudo update-grub +``` + +5. Reboot system and inspect loading of SSDT in kernel dmesg +```sh +dmesg | grep SSDT +``` +You should see +``` +[ 0.009303] ACPI: SSDT ACPI table found in initrd [kernel/firmware/acpi/isx031.aml][0x143d] +... +[ 0.009609] ACPI: Table Upgrade: install [SSDT- - IMG_PTL] +[ 0.009611] ACPI: SSDT 0x00000000678E6000 00143D (v02 IMG_PTL 20250920 INTL 20250404) +``` \ No newline at end of file diff --git a/acpi/_ipu.dsl b/acpi/_ipu.dsl new file mode 100644 index 0000000..14dc0fc --- /dev/null +++ b/acpi/_ipu.dsl @@ -0,0 +1,27 @@ +External (_SB.PC00.IPU0, DeviceObj) + +Scope (\_SB.PC00.IPU0) +{ + Name (_DSD, Package () /* method */ + { + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () { + Package () { "mipi-img-port-0", "PRT0" },// mipi port 0 to DES0 + Package () { "mipi-img-port-2", "PRT2" },// mipi port 2 to DES1 + }, + }) + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } } + }, + }) + Name (PRT2, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } } + }, + }) +} diff --git a/acpi/_max96724.dsl b/acpi/_max96724.dsl new file mode 100644 index 0000000..dec8ea0 --- /dev/null +++ b/acpi/_max96724.dsl @@ -0,0 +1,107 @@ +Device (DES1) +{ + Name (_UID, Zero) // _UID: Unique ID + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1139") + } + Method (_CID, 0, NotSerialized) // _CID: Compatible ID + { + Return ("INTC1139") + } + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 0, 4, "\\_SB.PC00.IPU0", 2,,,) // type 0 for CPHY, IPU0 local port 4 remote port 2 + I2cSerialBusV2 ( + 0x0027, // SlaveAddress + ControllerInitiated, // SlaveMode + 0x00061A80, // ConnectionSpeed + AddressingMode7Bit, // AddressingMode + "\\_SB.PC00.I2C2", // ResourceSource + 0x00, // ResourceSourceIndex + ResourceConsumer, // ResourceUsage + , // DescriptorName + Exclusive, // ShareType + ) + }) + + Name (_DEP, Package () // _DEP: Dependencies + { + \_SB.PC00.IPU0 + }) + + Name (_DSD, Package () + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "i2c-alias-pool", Package () { 0x44, 0x45, 0x46, 0x47 } }, + Package () { "i2c-adapter-pool", Package () { 0x20, 0x21, 0x22, 0x23 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser4 + Package () { "mipi-img-port-1", "PRT1" }, // to ser5 + Package () { "mipi-img-port-2", "PRT2" }, // to ser6 + Package () { "mipi-img-port-3", "PRT3" }, // to ser7 + Package () { "mipi-img-port-4", "PRT4" }, // to ipu0 + } + }) + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } }, + }, + }) + + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + + }) + + Name (PRT2, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } }, + }, + }) + + Name (PRT3, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + + }) + + Name (PRT4, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2 } }, + Package () { "mipi-img-link-frequencies", Package() { 1200000000 } }, // 1200 MHz + }, + }) +} diff --git a/acpi/isx031.dsl b/acpi/isx031.dsl new file mode 100644 index 0000000..f03b022 --- /dev/null +++ b/acpi/isx031.dsl @@ -0,0 +1,499 @@ +DefinitionBlock ("", "SSDT", 2, "", "IMG_PTL", 0x20250920) +{ + External (_SB.PC00, DeviceObj) + + Include ("_ipu.dsl") + + Scope (\_SB.PC00) + { + Include ("_max96724.dsl") + + Device (SER4) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 0,,,) // type 0 for DPHY, DES1 local port 1 remote port 0 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER4", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 0 }, // channel 0 + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + Package () { "mux-adapter", 0x30 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER5) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 1,,,) // type 0 for DPHY, DES1 local port 1 remote port 1 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER5", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 1 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + Package () { "mux-adapter", 0x31 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER6) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 2,,,) // type 0 for DPHY, DES1 local port 1 remote port 2 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER6", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 2 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + Package () { "mux-adapter", 0x32 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER7) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 3,,,) // type 0 for DPHY, DES1 local port 1 remote port 3 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER7", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 3 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + Package () { "mux-adapter", 0x33 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM4) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1031") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER4 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER4", 0,,,) // type 0 for DPHY, SER4 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER4", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER4, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM5) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1031") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER5 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER5", 0,,,) // type 0 for DPHY, SER5 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER5", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER5, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM6) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1031") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER6 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER6", 0,,,) // type 0 for DPHY, SER6 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER6", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER6, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM7) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1031") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER7 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER7", 0,,,) // type 0 for DPHY, SER7 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER7", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER7, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + } +} \ No newline at end of file diff --git a/patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch b/patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch new file mode 100644 index 0000000..e8b106f --- /dev/null +++ b/patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch @@ -0,0 +1,96 @@ +From 771d840df1a876270095b15a24ddc18e2523d7ea Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Fri, 18 Jul 2025 18:24:37 +0300 +Subject: [PATCH 11/61] media: mc: Add INTERNAL pad flag + +Internal source pads will be used as routing endpoints in V4L2 +[GS]_ROUTING IOCTLs, to indicate that the stream begins in the entity. +Internal source pads are pads that have both SINK and INTERNAL flags set. + +Also prevent creating links to pads that have been flagged as internal and +initialising SOURCE pads with INTERNAL flag set. + +Signed-off-by: Sakari Ailus +Reviewed-by: Tomi Valkeinen +--- + .../userspace-api/media/mediactl/media-types.rst | 8 ++++++++ + drivers/media/mc/mc-entity.c | 10 ++++++++-- + include/uapi/linux/media.h | 1 + + 3 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/Documentation/userspace-api/media/mediactl/media-types.rst b/Documentation/userspace-api/media/mediactl/media-types.rst +index 6332e8395263b..f55ef055bcf85 100644 +--- a/Documentation/userspace-api/media/mediactl/media-types.rst ++++ b/Documentation/userspace-api/media/mediactl/media-types.rst +@@ -361,6 +361,7 @@ Types and flags used to represent the media graph elements + .. _MEDIA-PAD-FL-SINK: + .. _MEDIA-PAD-FL-SOURCE: + .. _MEDIA-PAD-FL-MUST-CONNECT: ++.. _MEDIA-PAD-FL-INTERNAL: + + .. flat-table:: Media pad flags + :header-rows: 0 +@@ -381,6 +382,13 @@ Types and flags used to represent the media graph elements + enabled links even when this flag isn't set; the absence of the flag + doesn't imply there is none. + ++ * - ``MEDIA_PAD_FL_INTERNAL`` ++ - The internal flag indicates an internal pad that has no external ++ connections. Such a pad shall not be connected with a link. ++ ++ The internal flag may currently be present only in a source pad where ++ it indicates that the :ref:``stream `` ++ originates from within the entity. + + One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE`` + must be set for every pad. +diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c +index 0455909055820..d1feacc608072 100644 +--- a/drivers/media/mc/mc-entity.c ++++ b/drivers/media/mc/mc-entity.c +@@ -213,7 +213,9 @@ int media_entity_pads_init(struct media_entity *entity, u16 num_pads, + iter->index = i++; + + if (hweight32(iter->flags & (MEDIA_PAD_FL_SINK | +- MEDIA_PAD_FL_SOURCE)) != 1) { ++ MEDIA_PAD_FL_SOURCE)) != 1 || ++ (iter->flags & MEDIA_PAD_FL_INTERNAL && ++ !(iter->flags & MEDIA_PAD_FL_SINK))) { + ret = -EINVAL; + break; + } +@@ -1118,7 +1120,8 @@ int media_get_pad_index(struct media_entity *entity, u32 pad_type, + + for (i = 0; i < entity->num_pads; i++) { + if ((entity->pads[i].flags & +- (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE)) != pad_type) ++ (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE | ++ MEDIA_PAD_FL_INTERNAL)) != pad_type) + continue; + + if (entity->pads[i].sig_type == sig_type) +@@ -1148,6 +1151,9 @@ media_create_pad_link(struct media_entity *source, u16 source_pad, + return -EINVAL; + if (WARN_ON(!(sink->pads[sink_pad].flags & MEDIA_PAD_FL_SINK))) + return -EINVAL; ++ if (WARN_ON(source->pads[source_pad].flags & MEDIA_PAD_FL_INTERNAL) || ++ WARN_ON(sink->pads[sink_pad].flags & MEDIA_PAD_FL_INTERNAL)) ++ return -EINVAL; + + link = media_add_link(&source->links); + if (link == NULL) +diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h +index 1c80b1d6bbaf3..80cfd12a43fc1 100644 +--- a/include/uapi/linux/media.h ++++ b/include/uapi/linux/media.h +@@ -208,6 +208,7 @@ struct media_entity_desc { + #define MEDIA_PAD_FL_SINK (1U << 0) + #define MEDIA_PAD_FL_SOURCE (1U << 1) + #define MEDIA_PAD_FL_MUST_CONNECT (1U << 2) ++#define MEDIA_PAD_FL_INTERNAL (1U << 3) + + struct media_pad_desc { + __u32 entity; /* entity ID */ +-- +2.50.1 + diff --git a/patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-myself-as-maintai.patch b/patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-myself-as-maintai.patch new file mode 100644 index 0000000..bc28783 --- /dev/null +++ b/patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-myself-as-maintai.patch @@ -0,0 +1,44 @@ +From 960c65d747eb01419daab96301d2dba7ee894984 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:38 +0300 +Subject: [PATCH 12/61] dt-bindings: media: i2c: max96717: add myself as + maintainer + +Analog Devices is taking responsability for the maintenance of the Maxim +GMSL2/3 devices. +Add myself to the maintainers list and to the device tree bindings. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml | 1 + + MAINTAINERS | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index d1e8ba6e368ec..15ab37702a927 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -9,6 +9,7 @@ title: MAX96717 CSI-2 to GMSL2 Serializer + + maintainers: + - Julien Massot ++ - Cosmin Tanislav + + description: + The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input +diff --git a/MAINTAINERS b/MAINTAINERS +index 97d958c945e4f..d35d4654ce667 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14967,6 +14967,7 @@ F: drivers/media/i2c/max96714.c + + MAX96717 GMSL2 SERIALIZER DRIVER + M: Julien Massot ++M: Cosmin Tanislav + L: linux-media@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +-- +2.50.1 + diff --git a/patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch b/patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch new file mode 100644 index 0000000..9c96a93 --- /dev/null +++ b/patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch @@ -0,0 +1,78 @@ +From 03072d1d80e0d027f8491e3a9aad39f5c4e1687e Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:39 +0300 +Subject: [PATCH 13/61] dt-bindings: media: i2c: max96717: add support for I2C + ATR + +MAX96717 is capable of address translation for the connected I2C slaves. + +Add support for I2C ATR while keeping I2C gate for compatibility to +support this usecase. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max96717.yaml | 39 +++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index 15ab37702a927..167c3dd50683c 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -92,6 +92,30 @@ properties: + incoming GMSL2 link. Therefore, it supports an i2c-gate + subnode to configure a sensor. + ++ i2c-alias-pool: ++ maxItems: 2 ++ ++ i2c-atr: ++ type: object ++ additionalProperties: false ++ ++ properties: ++ '#address-cells': ++ const: 1 ++ ++ '#size-cells': ++ const: 0 ++ ++ patternProperties: ++ '^i2c@[01]$': ++ $ref: /schemas/i2c/i2c-controller.yaml# ++ unevaluatedProperties: false ++ properties: ++ reg: ++ items: ++ minimum: 0 ++ maximum: 1 ++ + required: + - compatible + - reg +@@ -99,6 +123,21 @@ required: + + additionalProperties: false + ++allOf: ++ - $ref: /schemas/i2c/i2c-atr.yaml# ++ ++ - anyOf: ++ - oneOf: ++ - required: [i2c-atr] ++ - required: [i2c-gate] ++ ++ - not: ++ required: [i2c-atr, i2c-gate] ++ ++dependentRequired: ++ i2c-atr: [i2c-alias-pool] ++ i2c-alias-pool: [i2c-atr] ++ + examples: + - | + #include +-- +2.50.1 + diff --git a/patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch b/patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch new file mode 100644 index 0000000..fccf6e4 --- /dev/null +++ b/patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch @@ -0,0 +1,135 @@ +From 37f8088c72da5630811c7a0e307976d020ac5c6c Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:40 +0300 +Subject: [PATCH 14/61] dt-bindings: media: i2c: max96717: add support for + pinctrl/pinconf + +MAX96717 is capable of configuring various pin properties. + +Add pinctrl/pinconf properties to support this usecase. + +Signed-off-by: Cosmin Tanislav +Reviewed-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max96717.yaml | 105 ++++++++++++++++++ + 1 file changed, 105 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index 167c3dd50683c..9afaa8a7a3f52 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -121,6 +121,111 @@ required: + - reg + - ports + ++patternProperties: ++ '-pins$': ++ type: object ++ additionalProperties: false ++ ++ properties: ++ function: ++ enum: [gpio, rclkout] ++ ++ pins: true ++ drive-open-drain: true ++ drive-push-pull: true ++ bias-disable: true ++ output-disable: true ++ output-enable: true ++ output-low: true ++ output-high: true ++ input-enable: true ++ ++ slew-rate: ++ description: | ++ Slew rate. ++ Rise and fall times represent the time needed for a GPIO to go ++ from 20% to 80% of VDDIO. ++ 0 - Fastest ++ rise: 1.0ns @ 1.8V, 0.6ns @ 3.3V, ++ fall: 0.8ns @ 1.8V, 0.5ns @ 3.3V ++ 1 - Fast ++ rise: 2.1ns @ 1.8V, 1.1ns @ 3.3V, ++ fall: 2.0ns @ 1.8V, 1.1ns @ 3.3V ++ 2 - Slow ++ rise: 4.0ns @ 1.8V, 2.3ns @3.3V, ++ fall: 10.0ns @ 1.8V, 5.0ns @3.3V ++ 3 - Slowest ++ rise: 9.0ns @ 1.8V, 5.0ns @3.3V, ++ fall: 10.0ns @ 1.8V, 5.0ns @3.3V ++ maximum: 3 ++ ++ bias-pull-up: ++ oneOf: ++ - type: boolean ++ description: Enable regular 40kOhm pull-up ++ - enum: [ 40000, 1000000 ] ++ description: Enable either the 40kOhm or the 1MOhm pull-up ++ ++ bias-pull-down: ++ oneOf: ++ - type: boolean ++ description: Enable regular 40kOhm pull-down ++ - enum: [ 40000, 1000000 ] ++ description: Enable either the 40kOhm or the 1MOhm pull-down ++ ++ maxim,jitter-compensation: ++ type: boolean ++ description: | ++ Enables jitter compensation. ++ Jitter compensation is used to minimize the jitter of the ++ signals transmitted from the deserializer to the serializer ++ by adding a fixed delay to every transition on the serializer ++ side. This can be used for pulse generation where timing is ++ critical. ++ ++ maxim,tx-id: ++ $ref: /schemas/types.yaml#/definitions/uint32 ++ description: ++ Enable transmission of the pin state from the serializer to ++ the deserializer using the specified identifier. ++ maximum: 31 ++ ++ maxim,rx-id: ++ $ref: /schemas/types.yaml#/definitions/uint32 ++ description: ++ Enable transmission of the pin state from the deserializer to ++ the serializer using the specified identifier. ++ maximum: 31 ++ ++ required: ++ - pins ++ - function ++ ++ allOf: ++ - $ref: /schemas/pinctrl/pincfg-node.yaml# ++ - $ref: /schemas/pinctrl/pinmux-node.yaml# ++ ++ - if: ++ properties: ++ function: ++ const: gpio ++ then: ++ properties: ++ pins: ++ items: ++ enum: [mfp0, mfp1, mfp2, mfp3, mfp4, mfp5, mfp6, mfp7, ++ mfp8, mfp9, mfp10] ++ ++ - if: ++ properties: ++ function: ++ const: rclkout ++ then: ++ properties: ++ pins: ++ items: ++ enum: [mfp2, mfp4] ++ + additionalProperties: false + + allOf: +-- +2.50.1 + diff --git a/patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch b/patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch new file mode 100644 index 0000000..647bee6 --- /dev/null +++ b/patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch @@ -0,0 +1,43 @@ +From 27515fa8b52a1dc6414e4b8161d696fd8701ea3c Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:41 +0300 +Subject: [PATCH 15/61] dt-bindings: media: i2c: max96717: add support for + MAX9295A + +MAX9295A is an older variant of the MAX96717 which does not support +tunnel mode. + +Document the compatibility. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + .../devicetree/bindings/media/i2c/maxim,max96717.yaml | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index 9afaa8a7a3f52..78ecbab8205a5 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -25,12 +25,17 @@ description: + + The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the + forward direction and 187.5Mbps in the reverse direction. ++ + MAX96717F only supports a fixed rate of 3Gbps in the forward direction. + ++ MAX9295A only supports pixel mode. ++ + properties: + compatible: + oneOf: +- - const: maxim,max96717f ++ - enum: ++ - maxim,max9295a ++ - maxim,max96717f + - items: + - enum: + - maxim,max96717 +-- +2.50.1 + diff --git a/patch/v6.17_iot/0016-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch b/patch/v6.17_iot/0016-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch new file mode 100644 index 0000000..af3e5dd --- /dev/null +++ b/patch/v6.17_iot/0016-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch @@ -0,0 +1,41 @@ +From 17e1093428dcd843dd1a629b0a51ccf03564e16d Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:42 +0300 +Subject: [PATCH 16/61] dt-bindings: media: i2c: max96717: add support for + MAX96793 + +MAX96793 is a newer variant of the MAX96717 which also supports GMSL3 +links. + +Document this compatibility. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + .../devicetree/bindings/media/i2c/maxim,max96717.yaml | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index 78ecbab8205a5..02a44db982852 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -30,6 +30,8 @@ description: + + MAX9295A only supports pixel mode. + ++ MAX96793 also supports GMSL3 mode. ++ + properties: + compatible: + oneOf: +@@ -39,6 +41,7 @@ properties: + - items: + - enum: + - maxim,max96717 ++ - maxim,max96793 + - const: maxim,max96717f + + '#gpio-cells': +-- +2.50.1 + diff --git a/patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-myself-as-maintai.patch b/patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-myself-as-maintai.patch new file mode 100644 index 0000000..bb16f67 --- /dev/null +++ b/patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-myself-as-maintai.patch @@ -0,0 +1,48 @@ +From 95e4d6cfef5e69a9ba79c40babb4c43b9c1bd83f Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:43 +0300 +Subject: [PATCH 17/61] dt-bindings: media: i2c: max96712: add myself as + maintainer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Analog Devices is taking responsability for the maintenance of the Maxim +GMSL2/3 devices. +Add myself to the maintainers list and to the device tree bindings. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Acked-by: Niklas Söderlund +--- + Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml | 1 + + MAINTAINERS | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index 26f85151afbd3..efdece2b33b96 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -9,6 +9,7 @@ title: Quad GMSL2 to CSI-2 Deserializer with GMSL1 Compatibility + + maintainers: + - Niklas Söderlund ++ - Cosmin Tanislav + + description: | + The MAX96712 deserializer converts GMSL2 or GMSL1 serial inputs into MIPI +diff --git a/MAINTAINERS b/MAINTAINERS +index d35d4654ce667..d2273e53e12af 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14953,6 +14953,7 @@ F: drivers/media/i2c/max9286.c + + MAX96712 QUAD GMSL2 DESERIALIZER DRIVER + M: Niklas Söderlund ++M: Cosmin Tanislav + L: linux-media@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +-- +2.50.1 + diff --git a/patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch b/patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch new file mode 100644 index 0000000..ef7cec9 --- /dev/null +++ b/patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch @@ -0,0 +1,76 @@ +From f4e602a673f39263163fe0d9f8e195b8ac29e70f Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:44 +0300 +Subject: [PATCH 18/61] dt-bindings: media: i2c: max96712: use pattern + properties for ports +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The MAX96712 and MAX96724 support up to 4 separate PHYs, depending on +the selected PHY configuration. Use patternProperties to document this. + +The input ports are all the same, use patternProperties for them. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Niklas Söderlund +Reviewed-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max96712.yaml | 29 +++++++------------ + 1 file changed, 10 insertions(+), 19 deletions(-) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index efdece2b33b96..f712d7cfc35f5 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -40,27 +40,15 @@ properties: + ports: + $ref: /schemas/graph.yaml#/properties/ports + +- properties: +- port@0: ++ patternProperties: ++ '^port@[0-3]$': + $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 0 ++ description: GMSL Input ports 0-3 + +- port@1: +- $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 1 +- +- port@2: +- $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 2 +- +- port@3: +- $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 3 +- +- port@4: ++ '^port@[4-7]$': + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false +- description: CSI-2 Output ++ description: CSI-2 Output port 0-3 + + properties: + endpoint: +@@ -78,8 +66,11 @@ properties: + - data-lanes + - bus-type + +- required: +- - port@4 ++ anyOf: ++ - required: [port@4] ++ - required: [port@5] ++ - required: [port@6] ++ - required: [port@7] + + required: + - compatible +-- +2.50.1 + diff --git a/patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch b/patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch new file mode 100644 index 0000000..a328609 --- /dev/null +++ b/patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch @@ -0,0 +1,76 @@ +From 2ef218708b5108bd534f846778182ba2f67e18a5 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:45 +0300 +Subject: [PATCH 19/61] dt-bindings: media: i2c: max96712: add support for I2C + ATR + +MAX96712 and MAX96724 have more than one GMSL2 link, and each link is +capable of connecting to a separate serializer. If these serializers +have the same CFG pins configuration, they will also have the same I2C +address, causing conflicts unless the deserializer changes the address +of the connected serializers. + +The MAX96712 and MAX96724 support changing the I2C address of the +connected serializers. + +Document this capability. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max96712.yaml | 31 +++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index f712d7cfc35f5..758c0223977d4 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -37,6 +37,30 @@ properties: + + enable-gpios: true + ++ i2c-alias-pool: ++ maxItems: 4 ++ ++ i2c-atr: ++ type: object ++ additionalProperties: false ++ ++ properties: ++ '#address-cells': ++ const: 1 ++ ++ '#size-cells': ++ const: 0 ++ ++ patternProperties: ++ '^i2c@[0-3]$': ++ $ref: /schemas/i2c/i2c-controller.yaml# ++ unevaluatedProperties: false ++ properties: ++ reg: ++ items: ++ minimum: 0 ++ maximum: 3 ++ + ports: + $ref: /schemas/graph.yaml#/properties/ports + +@@ -79,6 +103,13 @@ required: + + additionalProperties: false + ++allOf: ++ - $ref: /schemas/i2c/i2c-atr.yaml# ++ ++dependentRequired: ++ i2c-atr: [i2c-alias-pool] ++ i2c-alias-pool: [i2c-atr] ++ + examples: + - | + #include +-- +2.50.1 + diff --git a/patch/v6.17_iot/0020-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch b/patch/v6.17_iot/0020-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch new file mode 100644 index 0000000..ee853a2 --- /dev/null +++ b/patch/v6.17_iot/0020-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch @@ -0,0 +1,40 @@ +From 1999af33923b985231c2912e508638107f4bf4fc Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:46 +0300 +Subject: [PATCH 20/61] dt-bindings: media: i2c: max96712: add support for POC + supplies +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The GMSL links can carry power to the serializer when using coaxial +cables. + +Document this capability. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Niklas Söderlund +Reviewed-by: Rob Herring (Arm) +--- + .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index 758c0223977d4..b345305acc4c3 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -96,6 +96,10 @@ properties: + - required: [port@6] + - required: [port@7] + ++patternProperties: ++ '^port[0-3]-poc-supply$': ++ description: Regulator providing Power over Coax for GMSL ports ++ + required: + - compatible + - reg +-- +2.50.1 + diff --git a/patch/v6.17_iot/0021-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch b/patch/v6.17_iot/0021-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch new file mode 100644 index 0000000..19435e8 --- /dev/null +++ b/patch/v6.17_iot/0021-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch @@ -0,0 +1,44 @@ +From fcf484131d608f5dd91b57be880fc90a1265a71e Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:47 +0300 +Subject: [PATCH 21/61] dt-bindings: media: i2c: max96712: add support for + MAX96724F/R +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +MAX96724F/MAX96724R are a lower capability variant of the MAX96724 which +only support a fixed rate of 3Gbps in the forward direction. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Niklas Söderlund +--- + .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index b345305acc4c3..5dcafd46344cc 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -24,12 +24,17 @@ description: | + MAX96712 can be paired with first-generation 3.12Gbps or 1.5Gbps GMSL1 + serializers or operate up to 3.12Gbps with GMSL2 serializers in GMSL1 mode. + ++ MAX96724F and MAX96724R only support a fixed rate of 3Gbps in the forward ++ direction. ++ + properties: + compatible: + items: + - enum: + - maxim,max96712 + - maxim,max96724 ++ - maxim,max96724f ++ - maxim,max96724r + + reg: + description: I2C device address +-- +2.50.1 + diff --git a/patch/v6.17_iot/0022-dt-bindings-media-i2c-max96714-add-myself-as-maintai.patch b/patch/v6.17_iot/0022-dt-bindings-media-i2c-max96714-add-myself-as-maintai.patch new file mode 100644 index 0000000..a10afed --- /dev/null +++ b/patch/v6.17_iot/0022-dt-bindings-media-i2c-max96714-add-myself-as-maintai.patch @@ -0,0 +1,44 @@ +From a7af2baf8037b2d98ec36b21252a4e65a3e18185 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:48 +0300 +Subject: [PATCH 22/61] dt-bindings: media: i2c: max96714: add myself as + maintainer + +Analog Devices is taking responsability for the maintenance of the Maxim +GMSL2/3 devices. +Add myself to the maintainers list and to the device tree bindings. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml | 1 + + MAINTAINERS | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +index 3ace50e11921b..f53c72e5c5727 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +@@ -8,6 +8,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# + title: Maxim MAX96714 GMSL2 to CSI-2 Deserializer + + maintainers: ++ - Cosmin Tanislav + - Julien Massot + + description: +diff --git a/MAINTAINERS b/MAINTAINERS +index d2273e53e12af..a8fe0ebb78015 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14961,6 +14961,7 @@ F: drivers/staging/media/max96712/max96712.c + + MAX96714 GMSL2 DESERIALIZER DRIVER + M: Julien Massot ++M: Cosmin Tanislav + L: linux-media@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +-- +2.50.1 + diff --git a/patch/v6.17_iot/0023-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch b/patch/v6.17_iot/0023-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch new file mode 100644 index 0000000..effd3ea --- /dev/null +++ b/patch/v6.17_iot/0023-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch @@ -0,0 +1,41 @@ +From 2250ba7aa1320edaed9f9f3e9f0694d22333d1e8 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:49 +0300 +Subject: [PATCH 23/61] dt-bindings: media: i2c: max96714: add support for + MAX96714R + +MAX96714R is a lower capability variant of the MAX96714 which only +supports a fixed rate of 3Gbps in the forward direction. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + .../devicetree/bindings/media/i2c/maxim,max96714.yaml | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +index f53c72e5c5727..1c97624833ebd 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +@@ -23,7 +23,9 @@ description: + + The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the + forward direction and 187.5Mbps in the reverse direction. +- MAX96714F only supports a fixed rate of 3Gbps in the forward direction. ++ ++ MAX96714F and MAX96714R only support a fixed rate of 3Gbps in the forward ++ direction. + + properties: + compatible: +@@ -32,6 +34,7 @@ properties: + - items: + - enum: + - maxim,max96714 ++ - maxim,max96714r + - const: maxim,max96714f + + reg: +-- +2.50.1 + diff --git a/patch/v6.17_iot/0024-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch b/patch/v6.17_iot/0024-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch new file mode 100644 index 0000000..970a0a2 --- /dev/null +++ b/patch/v6.17_iot/0024-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch @@ -0,0 +1,294 @@ +From 50ba59ed8ff74e917d43f1fee5998d7e239091e1 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:50 +0300 +Subject: [PATCH 24/61] dt-bindings: media: i2c: add MAX9296A, MAX96716A, + MAX96792A + +The MAX9296A deserializer converts single or dual serial inputs to MIPI +CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps or 6Gbps +in the forward direction and 187.5Mbps in the reverse direction. +In GMSL1 mode, each serial link can be paired with 3.12Gbps or 1.5Gbps +GMSL1 serializers or operate up to 4.5Gbps with GMSL2 serializers with +GMSL1 backward compatibility. The MAX9296A supports mixed GMSL2 and +GMSL1 links. The serial inputs operate independently, allowing videos +with different timings and resolutions to be received on each input. + +MAX96716A supports both tunnel and pixel mode. +MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max9296a.yaml | 242 ++++++++++++++++++ + MAINTAINERS | 6 + + 2 files changed, 248 insertions(+) + create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml +new file mode 100644 +index 0000000000000..4f2b3b5b69cf4 +--- /dev/null ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml +@@ -0,0 +1,242 @@ ++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) ++# Copyright (C) 2024 Collabora Ltd. ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/media/i2c/maxim,max9296a.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Maxim MAX9296A GMSL2 to CSI-2 Deserializer ++ ++maintainers: ++ - Cosmin Tanislav ++ ++description: > ++ The MAX9296A deserializer converts single or dual serial inputs to ++ MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps ++ or 6Gbps in the forward direction and 187.5Mbps in the reverse ++ direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps ++ or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 ++ serializers with GMSL1 backward compatibility. The MAX9296A supports ++ mixed GMSL2 and GMSL1 links. The serial inputs operate independently, ++ allowing videos with different timings and resolutions to be received ++ on each input. ++ ++ MAX96716A supports both tunnel and pixel mode. ++ ++ MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. ++ ++properties: ++ compatible: ++ enum: ++ - maxim,max9296a ++ - maxim,max96716a ++ - maxim,max96792a ++ ++ reg: ++ maxItems: 1 ++ ++ powerdown-gpios: ++ maxItems: 1 ++ description: Specifier for the GPIO connected to the PWDNB pin. ++ ++ port0-poc-supply: ++ description: Regulator providing Power over Coax for GMSL port 0 ++ ++ port1-poc-supply: ++ description: Regulator providing Power over Coax for GMSL port 1 ++ ++ i2c-alias-pool: ++ maxItems: 2 ++ ++ i2c-atr: ++ type: object ++ additionalProperties: false ++ ++ properties: ++ '#address-cells': ++ const: 1 ++ ++ '#size-cells': ++ const: 0 ++ ++ patternProperties: ++ '^i2c@[0-1]$': ++ $ref: /schemas/i2c/i2c-controller.yaml# ++ unevaluatedProperties: false ++ properties: ++ reg: ++ items: ++ minimum: 0 ++ maximum: 1 ++ ++ ports: ++ $ref: /schemas/graph.yaml#/properties/ports ++ ++ patternProperties: ++ '^port@[0-1]$': ++ $ref: /schemas/graph.yaml#/properties/port ++ description: GMSL Input ports 0-1 ++ ++ '^port@[2-3]$': ++ $ref: /schemas/graph.yaml#/$defs/port-base ++ unevaluatedProperties: false ++ description: CSI-2 Output ports 0-1 ++ properties: ++ endpoint: ++ $ref: /schemas/media/video-interfaces.yaml# ++ unevaluatedProperties: false ++ ++ properties: ++ data-lanes: ++ minItems: 1 ++ maxItems: 4 ++ ++ lane-polarities: ++ minItems: 1 ++ maxItems: 5 ++ ++ link-frequencies: ++ maxItems: 1 ++ ++ required: ++ - data-lanes ++ ++ anyOf: ++ - required: ++ - port@2 ++ - required: ++ - port@3 ++ ++required: ++ - compatible ++ - reg ++ - ports ++ ++additionalProperties: false ++ ++allOf: ++ - $ref: /schemas/i2c/i2c-atr.yaml# ++ ++dependentRequired: ++ i2c-atr: [i2c-alias-pool] ++ i2c-alias-pool: [i2c-atr] ++ ++examples: ++ - | ++ #include ++ #include ++ ++ i2c { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ deserializer@28 { ++ compatible = "maxim,max9296a"; ++ reg = <0x28>; ++ powerdown-gpios = <&main_gpio0 37 GPIO_ACTIVE_LOW>; ++ ++ i2c-alias-pool = <0x40 0x41>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ des_gmsl_in_0: endpoint { ++ remote-endpoint = <&ser_0_gmsl_out>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ des_gmsl_in_1: endpoint { ++ remote-endpoint = <&ser_1_gmsl_out>; ++ }; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ des_csi_out: endpoint { ++ data-lanes = <1 2 3 4>; ++ link-frequencies = /bits/ 64 <400000000>; ++ remote-endpoint = <&csi_in>; ++ }; ++ }; ++ }; ++ ++ i2c-atr { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ serializer@40 { ++ compatible = "maxim,max96717", "maxim,max96717f"; ++ reg = <0x40>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #clock-cells = <0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ ser_0_csi_in: endpoint { ++ data-lanes = <1 2>; ++ remote-endpoint = <&sensor_0_out>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ ser_0_gmsl_out: endpoint { ++ remote-endpoint = <&des_gmsl_in_0>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ serializer@40 { ++ compatible = "maxim,max96717", "maxim,max96717f"; ++ reg = <0x40>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #clock-cells = <0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ ser_1_csi_in: endpoint { ++ data-lanes = <1 2>; ++ remote-endpoint = <&sensor_1_out>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ ser_1_gmsl_out: endpoint { ++ remote-endpoint = <&des_gmsl_in_1>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++... +diff --git a/MAINTAINERS b/MAINTAINERS +index a8fe0ebb78015..8ecc7cae81a3f 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14989,6 +14989,12 @@ S: Maintained + F: Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml + F: drivers/iio/proximity/mb1232.c + ++MAXIM GMSL2/3 SERIALIZERS AND DESERIALIZERS ++M: Cosmin Tanislav ++L: linux-media@vger.kernel.org ++S: Maintained ++F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml ++ + MAXIM MAX11205 DRIVER + M: Ramona Bolboaca + L: linux-iio@vger.kernel.org +-- +2.50.1 + diff --git a/patch/v6.17_iot/0025-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch b/patch/v6.17_iot/0025-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch new file mode 100644 index 0000000..a1bb4b2 --- /dev/null +++ b/patch/v6.17_iot/0025-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch @@ -0,0 +1,720 @@ +From 8b88e3bfb09858885315c9a8c80e90d83a7d09c5 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 18 Jul 2025 18:24:51 +0300 +Subject: [PATCH 25/61] media: i2c: add Maxim GMSL2/3 serializer and + deserializer framework + +These drivers are meant to be used as a common framework for Maxim +GMSL2/3 serializers and deserializers. + +This framework enables support for the following new features across +all the chips: + * Full Streams API support + * .get_frame_desc() + * .get_mbus_config() + * I2C ATR + * automatic GMSL link version negotiation + * automatic stream id selection + * automatic VC remapping + * automatic pixel mode / tunnel mode selection + * automatic double mode selection / data padding + * logging of internal state and chip status registers via .log_status() + * PHY modes + * serializer pinctrl + * TPG + +Signed-off-by: Cosmin Tanislav +--- + MAINTAINERS | 1 + + drivers/media/i2c/Kconfig | 2 + + drivers/media/i2c/Makefile | 1 + + drivers/media/i2c/maxim-serdes/Kconfig | 17 + + drivers/media/i2c/maxim-serdes/Makefile | 3 + + drivers/media/i2c/maxim-serdes/max_serdes.c | 413 ++++++++++++++++++++ + drivers/media/i2c/maxim-serdes/max_serdes.h | 183 +++++++++ + 7 files changed, 620 insertions(+) + create mode 100644 drivers/media/i2c/maxim-serdes/Kconfig + create mode 100644 drivers/media/i2c/maxim-serdes/Makefile + create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.c + create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.h + +diff --git a/MAINTAINERS b/MAINTAINERS +index 8ecc7cae81a3f..8ea583d4a58b1 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14994,6 +14994,7 @@ M: Cosmin Tanislav + L: linux-media@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml ++F: drivers/media/i2c/maxim-serdes/ + + MAXIM MAX11205 DRIVER + M: Ramona Bolboaca +diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig +index d7e8a0b986a32..52d22b93dde46 100644 +--- a/drivers/media/i2c/Kconfig ++++ b/drivers/media/i2c/Kconfig +@@ -1714,6 +1714,8 @@ config VIDEO_MAX96717 + To compile this driver as a module, choose M here: the + module will be called max96717. + ++source "drivers/media/i2c/maxim-serdes/Kconfig" ++ + endmenu + + endif # VIDEO_DEV +diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile +index 085c0e0e15dd9..22813cf584eff 100644 +--- a/drivers/media/i2c/Makefile ++++ b/drivers/media/i2c/Makefile +@@ -72,6 +72,7 @@ obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o + obj-$(CONFIG_VIDEO_MAX9286) += max9286.o + obj-$(CONFIG_VIDEO_MAX96714) += max96714.o + obj-$(CONFIG_VIDEO_MAX96717) += max96717.o ++obj-$(CONFIG_VIDEO_MAXIM_SERDES) += maxim-serdes/ + obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o + obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o + obj-$(CONFIG_VIDEO_MT9M001) += mt9m001.o +diff --git a/drivers/media/i2c/maxim-serdes/Kconfig b/drivers/media/i2c/maxim-serdes/Kconfig +new file mode 100644 +index 0000000000000..f5a4ca80a263b +--- /dev/null ++++ b/drivers/media/i2c/maxim-serdes/Kconfig +@@ -0,0 +1,17 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ ++config VIDEO_MAXIM_SERDES ++ tristate "Maxim GMSL2/3 Serializer and Deserializer support" ++ depends on VIDEO_DEV ++ depends on I2C ++ select I2C_ATR ++ select I2C_MUX ++ select MEDIA_CONTROLLER ++ select V4L2_FWNODE ++ select VIDEO_V4L2_SUBDEV_API ++ help ++ This driver supports the Maxim GMSL2/3 common Serializer and ++ Deserializer framework. ++ ++ To compile this driver as a module, choose M here: the module ++ will be called max_serdes. +diff --git a/drivers/media/i2c/maxim-serdes/Makefile b/drivers/media/i2c/maxim-serdes/Makefile +new file mode 100644 +index 0000000000000..630fbb486bab1 +--- /dev/null ++++ b/drivers/media/i2c/maxim-serdes/Makefile +@@ -0,0 +1,3 @@ ++# SPDX-License-Identifier: GPL-2.0 ++max-serdes-objs := max_serdes.o ++obj-$(CONFIG_VIDEO_MAXIM_SERDES) += max-serdes.o +diff --git a/drivers/media/i2c/maxim-serdes/max_serdes.c b/drivers/media/i2c/maxim-serdes/max_serdes.c +new file mode 100644 +index 0000000000000..bed70b8ce99a4 +--- /dev/null ++++ b/drivers/media/i2c/maxim-serdes/max_serdes.c +@@ -0,0 +1,413 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2025 Analog Devices Inc. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include