From patchwork Mon Dec 30 09:31:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 13923756 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 4BA8CE77188 for ; Tue, 31 Dec 2024 10:34:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2692A10E633; Tue, 31 Dec 2024 10:34:58 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by gabe.freedesktop.org (Postfix) with ESMTP id 2044910E366 for ; Mon, 30 Dec 2024 09:36:23 +0000 (UTC) Received: from loongson.cn (unknown [223.64.68.63]) by gateway (Coremail) with SMTP id _____8AxQK1naHJnC89bAA--.10184S3; Mon, 30 Dec 2024 17:31:19 +0800 (CST) Received: from localhost.localdomain (unknown [223.64.68.63]) by front1 (Coremail) with SMTP id qMiowMCxncVkaHJnp74NAA--.4295S2; Mon, 30 Dec 2024 17:31:17 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Lee Jones , Corey Minyard , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Huacai Chen , linux-kernel@vger.kernel.org, openipmi-developer@lists.sourceforge.net, dri-devel@lists.freedesktop.org, Xuerui Wang , loongarch@lists.linux.dev, Binbin Zhou Subject: [PATCH v1 0/4] LoongArch: Add Loongson-2K0500 BMC support Date: Mon, 30 Dec 2024 17:31:07 +0800 Message-ID: X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 X-CM-TRANSID: qMiowMCxncVkaHJn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IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8EoGPUUUUU== X-Mailman-Approved-At: Tue, 31 Dec 2024 10:34:56 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all: This patch set introduces the Loongson-2K0500 BMC. It is a PCIe device present on servers similar to the Loongson-3C6000. And it is a multifunctional device (MFD), such as display as a sub-function of it. For IPMI, according to the existing design, we use software simulation to implement the KCS interface registers: Stauts/Command/Data_Out/Data_In. Also since both host side and BMC side read and write kcs status, we use fifo pointer to ensure data consistency. For the display, based on simpledrm, the resolution is read from a fixed position in the BMC since the hardware does not support auto-detection of the resolution. Of course, we will try to support multiple resolutions later, through a vbios-like approach. Especially, for the BMC reset function, since the display will be disconnected when BMC reset, we made a special treatment of re-push. Based on this, I will present it in four patches: patch-1: BMC device PCI resource allocation. patch-2: IPMI implementation patch-3: display, based on simpledrm patch-4: BMC reboot support Thanks. Binbin Zhou (4): mfd: ls2kbmc: Introduce Loongson-2K BMC MFD Core driver ipmi: Add Loongson-2K BMC support drm/ls2kbmc: Add support for Loongson-2K BMC display drm/ls2kbmc: Add Loongson-2K BMC reset function support drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/ipmi_si.h | 8 + drivers/char/ipmi/ipmi_si_intf.c | 3 + drivers/char/ipmi/ipmi_si_ls2k.c | 250 +++++++++ drivers/gpu/drm/tiny/Kconfig | 18 + drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/ls2kbmc.c | 918 +++++++++++++++++++++++++++++++ drivers/mfd/Kconfig | 15 + drivers/mfd/Makefile | 2 + drivers/mfd/ls2kbmc-mfd.c | 145 +++++ 10 files changed, 1361 insertions(+) create mode 100644 drivers/char/ipmi/ipmi_si_ls2k.c create mode 100644 drivers/gpu/drm/tiny/ls2kbmc.c create mode 100644 drivers/mfd/ls2kbmc-mfd.c