From patchwork Tue Oct 22 10:41:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Usyskin X-Patchwork-Id: 13845558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED826D1CDD5 for ; Tue, 22 Oct 2024 10:53:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CFA710E656; Tue, 22 Oct 2024 10:53:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jSbdXl2f"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1AEE610E306; Tue, 22 Oct 2024 10:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729594431; x=1761130431; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=X8W2PZaMjTbO7L4oT2o41c/8RKlDJ2p+caMbV4wPX+M=; b=jSbdXl2fVzbREf+7QTpvFkyB7DuHH2HM2b2Ed40AlKlgiuRNJIw96vwZ Rbr/nBKcxxgP8/ktC5ARhxCZ6JJHc5jZqv3NjlLWnKXkjLuX7K7Nd0Jfh 50uJXAtComwuZ+TrIWm6lGsvoqSOoAd3XtKIorFVK1Rw1yjxyVUstdKb/ 1XHak0ZX+KW+g4vdpA1fzBU+FVpua5tNCNnGrEjE3DlOrgp6t5r4Vi9n4 DsOYP+6YJnX6+wyRPxn8msfPYxWfzL6sougLeou/kSbbtTluIuKC8MBrC kEAarRd3UXC5Z4b4Ve8ch3ZKFYbPkJJsiHiqosGkHCBS0076dWP/6z2T2 A==; X-CSE-ConnectionGUID: yyeF412YRCuPYS2Wtn/dWg== X-CSE-MsgGUID: tzUpDcuKROyL6feFcrHAyw== X-IronPort-AV: E=McAfee;i="6700,10204,11232"; a="39704945" X-IronPort-AV: E=Sophos;i="6.11,223,1725346800"; d="scan'208";a="39704945" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa105.fm.intel.com with ESMTP; 22 Oct 2024 03:53:39 -0700 X-CSE-ConnectionGUID: UREAHlpEQralW+/fzp3LJw== X-CSE-MsgGUID: 0rHqH6V4T7es1JCTrMAaZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,223,1725346800"; d="scan'208";a="79847576" Received: from sannilnx-dsk.jer.intel.com ([10.12.231.107]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2024 03:53:06 -0700 From: Alexander Usyskin To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jani Nikula , Joonas Lahtinen , Tvrtko Ursulin Cc: Oren Weil , linux-mtd@lists.infradead.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Alexander Usyskin Subject: [PATCH 00/10] mtd: add driver for Intel discrete graphics Date: Tue, 22 Oct 2024 13:41:09 +0300 Message-ID: <20241022104119.3149051-1-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add driver for access to Intel discrete graphics card internal NVM device. Expose device on auxiliary bus by i915 and Xe drivers and provide mtd driver to register this device with MTD framework. This is a rewrite of "drm/i915/spi: spi access for discrete graphics" and "spi: add driver for Intel discrete graphics" series with connection to the Xe driver and splitting the spi driver part to separate module in mtd subsystem. This series intended to be pushed through drm-xe-next. Alexander Usyskin (10): mtd: add driver for intel graphics non-volatile memory device mtd: intel-dg: implement region enumeration mtd: intel-dg: implement access functions mtd: intel-dg: register with mtd mtd: intel-dg: align 64bit read and write mtd: intel-dg: wake card on operations drm/i915/nvm: add nvm device for discrete graphics drm/i915/nvm: add support for access mode drm/xe/nvm: add on-die non-volatile memory device drm/xe/nvm: add support for access mode MAINTAINERS | 7 + drivers/gpu/drm/i915/Makefile | 4 + drivers/gpu/drm/i915/i915_driver.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_nvm.c | 119 ++++ drivers/gpu/drm/i915/intel_nvm.h | 15 + drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/regs/xe_gsc_regs.h | 4 + drivers/gpu/drm/xe/xe_device.c | 3 + drivers/gpu/drm/xe/xe_device_types.h | 8 + drivers/gpu/drm/xe/xe_heci_gsc.c | 5 +- drivers/gpu/drm/xe/xe_nvm.c | 131 ++++ drivers/gpu/drm/xe/xe_nvm.h | 15 + drivers/gpu/drm/xe/xe_pci.c | 5 + drivers/mtd/devices/Kconfig | 11 + drivers/mtd/devices/Makefile | 1 + drivers/mtd/devices/mtd-intel-dg.c | 843 ++++++++++++++++++++++++++ include/linux/intel_dg_nvm_aux.h | 27 + 19 files changed, 1205 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_nvm.c create mode 100644 drivers/gpu/drm/i915/intel_nvm.h create mode 100644 drivers/gpu/drm/xe/xe_nvm.c create mode 100644 drivers/gpu/drm/xe/xe_nvm.h create mode 100644 drivers/mtd/devices/mtd-intel-dg.c create mode 100644 include/linux/intel_dg_nvm_aux.h