[PATCH v1 2/2] drm/xe: Support for I2C attached MCUs

Raag Jadav raag.jadav at intel.com
Fri May 30 16:02:23 UTC 2025


On Fri, May 30, 2025 at 05:17:44PM +0300, Heikki Krogerus wrote:
> Adding adaption/glue layer where the I2C host adapter
> (Synopsys DesignWare I2C adapter) and the I2C clients (the
> microcontroller units) are enumerated.
> 
> The microcontroller units (MCU) that are attached to the GPU
> depend on the OEM. The initially supported MCU will be the
> Add-In Management Controller (AMC).

...

> diff --git a/drivers/gpu/drm/xe/regs/xe_i2c_regs.h b/drivers/gpu/drm/xe/regs/xe_i2c_regs.h
> new file mode 100644
> index 000000000000..2acb55eeef0d
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/regs/xe_i2c_regs.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _XE_I2C_REGS_H_
> +#define _XE_I2C_REGS_H_
> +
> +#include "xe_reg_defs.h"
> +
> +#define SOC_BASE			0x280000

I just noticed we already have this in xe_pmt.h, so let's not duplicate
it. Perhaps move it to a common header (xe_regs.h) and reuse it in both
places?

> +#define I2C_CONFIG_SPACE_OFFSET		(SOC_BASE + 0xf6000)
> +#define I2C_MEM_SPACE_OFFSET		(SOC_BASE + 0xf7400)
> +#define I2C_BRIDGE_OFFSET		(SOC_BASE + 0xd9000)
> +
> +#define CLIENT_DISC_COOKIE		XE_REG(SOC_BASE + 0x0164)
> +#define CLIENT_DISC_ADDRESS		XE_REG(SOC_BASE + 0x0168)
> +
> +#endif /* _XE_I2C_REGS_H_ */

Raag


More information about the Intel-xe mailing list