summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorJonathan Doman <jonathan.doman@intel.com>2021-04-05 19:11:50 +0300
committerJae Hyun Yoo <jae.hyun.yoo@linux.intel.com>2021-11-05 10:22:15 +0300
commitef296e510a999f30a4e6876a5fe380c2fa38e7a2 (patch)
tree9d4f60cbc3ae1142996602a5edce7ffee6f3d66b /drivers/i3c
parentce5e97f06c185fd6896fa9273c44fcfe6bf550b0 (diff)
downloadlinux-ef296e510a999f30a4e6876a5fe380c2fa38e7a2.tar.xz
Update I3C bus device list
To support communication with NVDIMM controllers, add definitions for these I3C devices. Each bus now has two definitions for each DIMM slot. If populated with a DDR5 DIMM, the SPD Hub device will be used to gather temperature readings. If populated with an NVDIMM, we'll only need to talk to the controller sitting behind the hub (local device type 1011b), to read temperature and use the FW mailbox. This also removes some logic in the I3C driver which restricts use of certain addresses due to signal integrity paranoia. An NVDIMM controller in slot 6 of any bus is blocked by this logic, and unfortunately we don't have any control over the static address scheme used on the SPD bus, so the restriction must be removed. Tested: Probed I3C busses successfully with DIMMs installed in busses 0 and 1: $ gpioset $(gpiofind FM_SPD_SWITCH_CTRL_N)=1 $ echo 1e7a2000.i3c0 > /sys/bus/platform/drivers/dw-i3c-master/bind $ echo 1e7a3000.i3c1 > /sys/bus/platform/drivers/dw-i3c-master/bind $ ls /dev/i3c* /dev/i3c-0-3c000000000 /dev/i3c-0-3c000000001 /dev/i3c-0-3c000000002 /dev/i3c-0-3c000000003 /dev/i3c-0-3c000000004 /dev/i3c-0-3c000000005 /dev/i3c-0-3c000000006 /dev/i3c-0-3c000000007 /dev/i3c-0-3c000000008 /dev/i3c-0-3c000000009 /dev/i3c-0-3c00000000a /dev/i3c-0-3c00000000b /dev/i3c-0-3c00000000c /dev/i3c-0-3c00000000d /dev/i3c-0-3c00000000e /dev/i3c-1-3c000000000 /dev/i3c-1-3c000000001 /dev/i3c-1-3c000000002 /dev/i3c-1-3c000000003 /dev/i3c-1-3c000000004 /dev/i3c-1-3c000000005 /dev/i3c-1-3c000000006 /dev/i3c-1-3c000000007 /dev/i3c-1-3c000000008 /dev/i3c-1-3c000000009 /dev/i3c-1-3c00000000a /dev/i3c-1-3c00000000b /dev/i3c-1-3c00000000c /dev/i3c-1-3c00000000d /dev/i3c-1-3c00000000e Change-Id: I016450edad1ed4ec981500f04122976f1647b8ee Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 93fe5e5736b4..c6b60be02562 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -2165,7 +2165,7 @@ static int of_populate_i3c_bus(struct i3c_master_controller *master)
struct device *dev = &master->dev;
struct device_node *i3cbus_np = dev->of_node;
struct device_node *node;
- int ret;
+ int ret, i;
u32 val;
if (!i3cbus_np)
@@ -2174,6 +2174,13 @@ static int of_populate_i3c_bus(struct i3c_master_controller *master)
if (of_get_property(i3cbus_np, "jdec-spd", NULL))
master->jdec_spd = 1;
+ /* For SPD bus, undo unnecessary address reservations. */
+ if (master->jdec_spd) {
+ for (i = 0; i < 7; i++)
+ i3c_bus_set_addr_slot_status(&master->bus, I3C_BROADCAST_ADDR ^ BIT(i),
+ I3C_ADDR_SLOT_FREE);
+ }
+
for_each_available_child_of_node(i3cbus_np, node) {
ret = of_i3c_master_add_dev(master, node);
if (ret) {