Skip to content

Commit ea9da83

Browse files
committed
Update to link MAX96724 phy 2 or pad 6 to IPU mipi port 0
ACPI: Update MAX96724 ACPI to link phy 2 or pad 6 for mipi port 0 Kernel: media: i2c: max96724: Update phy to id mapping media: pci: intel: ipu7: get source pad according to csi2 ep fwnode Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
1 parent 59c0461 commit ea9da83

3 files changed

Lines changed: 111 additions & 3 deletions

File tree

acpi/_max96724.dsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Device (DES0)
1515
}
1616
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
1717
{
18-
CSI2Bus(DeviceInitiated, 0, 4, "\\_SB.PC00.IPU0", 0,,,) // type 0 for CPHY, IPU0 local port 4 remote port 0
18+
CSI2Bus(DeviceInitiated, 0, 6, "\\_SB.PC00.IPU0", 0,,,) // type 0 for CPHY, IPU0 local port 6 remote port 0
1919
I2cSerialBusV2 (
2020
0x0027, // SlaveAddress
2121
ControllerInitiated, // SlaveMode
@@ -49,7 +49,7 @@ Device (DES0)
4949
Package () { "mipi-img-port-1", "PRT1" },
5050
Package () { "mipi-img-port-2", "PRT2" },
5151
Package () { "mipi-img-port-3", "PRT3" },
52-
Package () { "mipi-img-port-4", "PRT4" },
52+
Package () { "mipi-img-port-6", "PRT6" },
5353
}
5454
})
5555
Name (PRT0, Package()
@@ -94,7 +94,7 @@ Device (DES0)
9494

9595
})
9696

97-
Name (PRT4, Package()
97+
Name (PRT6, Package()
9898
{
9999
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
100100
Package ()
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
From 63a642d64af0678d4f03213139736f1eddf37424 Mon Sep 17 00:00:00 2001
2+
From: "Yew, Chang Ching" <chang.ching.yew@intel.com>
3+
Date: Wed, 5 Nov 2025 13:47:53 +0800
4+
Subject: [PATCH 61/62] media: pci: intel: ipu7: get source pad according to
5+
csi2 ep fwnode
6+
7+
Signed-off-by: He, Pengpeng <pengpengx.he@intel.com>
8+
Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
9+
---
10+
drivers/media/pci/intel/ipu7/ipu7-isys.c | 32 ++++++++++++++++++++----
11+
drivers/media/pci/intel/ipu7/ipu7-isys.h | 1 +
12+
2 files changed, 28 insertions(+), 5 deletions(-)
13+
14+
diff --git a/drivers/media/pci/intel/ipu7/ipu7-isys.c b/drivers/media/pci/intel/ipu7/ipu7-isys.c
15+
index 44e860d3db24e..54cd4075cd6e9 100644
16+
--- a/drivers/media/pci/intel/ipu7/ipu7-isys.c
17+
+++ b/drivers/media/pci/intel/ipu7/ipu7-isys.c
18+
@@ -67,9 +67,32 @@ isys_complete_ext_device_registration(struct ipu7_isys *isys,
19+
20+
v4l2_set_subdev_hostdata(sd, csi2);
21+
22+
- for (i = 0; i < sd->entity.num_pads; i++) {
23+
- if (sd->entity.pads[i].flags & MEDIA_PAD_FL_SOURCE)
24+
- break;
25+
+ if (csi2->ep) {
26+
+ struct fwnode_handle *ep_source;
27+
+
28+
+ ep_source = fwnode_graph_get_remote_endpoint(csi2->ep);
29+
+ if (!ep_source) {
30+
+ dev_warn(dev, "no remote endpoint for subdev\n");
31+
+ ret = -ENOENT;
32+
+ goto skip_unregister_subdev;
33+
+ }
34+
+
35+
+ i = media_entity_get_fwnode_pad(&sd->entity, ep_source,
36+
+ MEDIA_PAD_FL_SOURCE);
37+
+
38+
+ dev_dbg(&isys->adev->auxdev.dev, "%s: CSI2 ep %pfw\n", __func__,
39+
+ csi2->ep);
40+
+
41+
+ dev_dbg(&isys->adev->auxdev.dev,
42+
+ "%s: source pad %u for subdev %s\n", __func__, i,
43+
+ sd->name);
44+
+
45+
+ fwnode_handle_put(ep_source);
46+
+ } else {
47+
+ for (i = 0; i < sd->entity.num_pads; i++) {
48+
+ if (sd->entity.pads[i].flags & MEDIA_PAD_FL_SOURCE)
49+
+ break;
50+
+ }
51+
}
52+
53+
if (i == sd->entity.num_pads) {
54+
@@ -354,8 +377,7 @@ static int isys_notifier_init(struct ipu7_isys *isys)
55+
s_asd->csi2.port = vep.base.port;
56+
s_asd->csi2.nlanes = vep.bus.mipi_csi2.num_data_lanes;
57+
s_asd->csi2.bus_type = vep.bus_type;
58+
-
59+
- fwnode_handle_put(ep);
60+
+ s_asd->csi2.ep = ep;
61+
62+
continue;
63+
64+
diff --git a/drivers/media/pci/intel/ipu7/ipu7-isys.h b/drivers/media/pci/intel/ipu7/ipu7-isys.h
65+
index c9ca2fbb4d1e9..8b8555bf30cd9 100644
66+
--- a/drivers/media/pci/intel/ipu7/ipu7-isys.h
67+
+++ b/drivers/media/pci/intel/ipu7/ipu7-isys.h
68+
@@ -157,6 +157,7 @@ struct ipu7_isys_csi2_config {
69+
unsigned int nlanes;
70+
unsigned int port;
71+
enum v4l2_mbus_type bus_type;
72+
+ struct fwnode_handle *ep;
73+
};
74+
75+
struct ipu7_isys_subdev_i2c_info {
76+
--
77+
2.51.1
78+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From d4834931e4336c568b9b69892a116d70c63e0ed5 Mon Sep 17 00:00:00 2001
2+
From: "Yew, Chang Ching" <chang.ching.yew@intel.com>
3+
Date: Wed, 5 Nov 2025 13:50:17 +0800
4+
Subject: [PATCH 62/62] media: i2c: max96724: Update phy to id mapping
5+
6+
Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
7+
---
8+
drivers/media/i2c/maxim-serdes/max96724.c | 6 ++++++
9+
1 file changed, 6 insertions(+)
10+
11+
diff --git a/drivers/media/i2c/maxim-serdes/max96724.c b/drivers/media/i2c/maxim-serdes/max96724.c
12+
index 546b90555618b..0ade57eaa69d3 100644
13+
--- a/drivers/media/i2c/maxim-serdes/max96724.c
14+
+++ b/drivers/media/i2c/maxim-serdes/max96724.c
15+
@@ -307,6 +307,12 @@ static unsigned int max96724_phy_id(struct max_des *des, struct max_des_phy *phy
16+
if (phy->index == 1 && !des->phys[1].enabled)
17+
return 0;
18+
19+
+ if (phy->index == 2 && !des->phys[2].enabled)
20+
+ return 3;
21+
+
22+
+ if (phy->index == 3 && num_hw_data_lanes == 4)
23+
+ return 2;
24+
+
25+
return phy->index;
26+
}
27+
28+
--
29+
2.51.1
30+

0 commit comments

Comments
 (0)