From patchwork Thu Mar 11 11:34:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12130993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C52B5C433E0 for ; Thu, 11 Mar 2021 11:35:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F2C564FAB for ; Thu, 11 Mar 2021 11:35:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F2C564FAB Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=GZrajyCa57DhEBDM1DjO+BCd2GemG5ayuiYvZZRzPhE=; b=Ev6uJgjyrRzA9FJMDNptW3bMZm LAxgwmCdDTbeLZpF+fMTo6SRakFzTt8miqM1RsjOOFCZTk+j7shKgBdAPfztXu7FXfWmLq/TqP0Jg 2BujCt8LcAO49wGa6v0c4hQtrQib4z7F3vkB8X9nEX0ZYII4OSWT15qOj7HPy+T0d9TtPY11FoSeT kgJ0gC99ZtUH2iC0DdlNEacUq0fTATjpJvmRGEl2bXawturPALkWSTft6/c5n8yAs5wJW4Z7VtPri cB1U4WyTnGqUNkyh/M5s/l6aKBokk50K3k4tqqvBelQkQ18ljbDVhH52VSVQNJ3kGB84i+pTNVjoF gAcWmw6w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKJah-008wMf-Oy; Thu, 11 Mar 2021 11:34:55 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKJad-008wLE-3j for linux-riscv@lists.infradead.org; Thu, 11 Mar 2021 11:34:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1615462491; x=1646998491; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fiVlYIat51VcqGO3igsLjcxXXnwW/lh7Rsk9mNXPSB8=; b=coKlyuyfkZCKSKVgbQ/OFgJGdtsoRmEX9GLK3GGKM6rXgA8lUzCaq2U+ Iyhqrsk+Y60rBw/ococFL0TW+pCe6csZf6xaAXO7mbMHg8638yzAq4ueP ZePJ9tFhHcagWYVG18lO89EngVBcn9MbKWKsuta6tZSPmN/iQzIhoDHpy J2Qf6owhVcCPA2kAURsyPzCMcTLl6/wVjjEskMFjlayaUa5r0kw2o6rZa oWNDSmkAvfyiESaN/GXsGZ4Ce9czDfkmhEnwHMdAemDfcp3AeGOw+EsA1 vWU1HaKWbgA2ZiVoRHb1HDsquOU1tXQ8sasD1OBPCzgQwjubxDiPuNs9Q w==; IronPort-SDR: 5BpOAVA2gXd7yTa3rO/ZUPhgtNT1qvLBHWXa+pmILb4bKYc1iGcio4kVJInku8oRmo+G+K9hsb iqufWWJGGXyj+3ut5NbGYtN6YGR7SO+PF2fM7A/C/V9eoJn6mDZAzgKt6fSFDgUKa27mORu8hu VyUy6uTYL/9mgIy9ePar5gjLPUxAzVpsbRLqaT0CLZIi2bc7FRv4gGX8o2NXRIKGGQHKpA91II whIJGJn3APAUIIEAVaSQROjeTUNi88xkhsHcIM+5o/njV2t31peNFk3R3rBMPZRE2H5KvB29HX Qqo= X-IronPort-AV: E=Sophos;i="5.81,240,1610434800"; d="scan'208";a="109596648" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Mar 2021 04:34:46 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 11 Mar 2021 04:34:34 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Thu, 11 Mar 2021 04:34:31 -0700 From: To: , , , , , , , , CC: , , , , , , Conor Dooley Subject: [PATCH v4 0/5] Add support for the PolarFire SoC system controller Date: Thu, 11 Mar 2021 11:34:31 +0000 Message-ID: <20210311113431.15378-1-conor.dooley@microchip.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_113451_706668_5AD1479F X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley This patch series adds support for the system controller on the PolarFire SoC, using the mailbox framework. A Microchip directory in the SoC subsystem has been created to hold the mailbox client driver and will be used for future service drivers. These drivers are gated by the kconfig option: CONFIG_SOC_MICROCHIP_POLARFIRE, so this patch series depends on Atish Patra's PolarFire SoC support patches which introduce it. It further depends on the MAINTAINERS entry created in the same series. Changes from v3: * Fixed mboxes reference in dt binding for mailbox client * Bug fixes and cleanup from Jonathan Neuschäfer's feedback on mailbox-mpfs.c & mpfs-sys-controller.c * Renamed dt binding files to match compatible strings * Removed PFSoC gating condition on drivers/soc/microchip subdirectory * Converted all size based operations to bytes for consistency * Converted response array to a structure, enabling support for more complex services that return a status instead of/alongside a payload. Changes from v2: * Further reworked dt bindings to satisfy errors and feedback (hopefully phandle array is the correct type for the mboxes) * Full maintainers entry moved to Atish's PFSoC support series, this series now only adds mailbox driver * Converted config options from MPFS to POLARFIRE_SOC so they are more recognisable * Further simplified driver code from feedback Changes from v1: * Squashed header into first patch * Fixed DT binding warnings & small fixes * Cleaned up drivers from feedback Conor Dooley (5): mbox: add polarfire soc system controller mailbox dt-bindings: add bindings for polarfire soc mailbox soc: add polarfire soc system controller dt-bindings: add bindings for polarfire soc system controller MAINTAINERS: add entry for polarfire soc mailbox driver .../microchip,polarfire-soc-mailbox.yaml | 47 +++ ...icrochip,polarfire-soc-sys-controller.yaml | 36 +++ MAINTAINERS | 1 + drivers/mailbox/Kconfig | 12 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mailbox-mpfs.c | 277 ++++++++++++++++++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/microchip/Kconfig | 10 + drivers/soc/microchip/Makefile | 1 + drivers/soc/microchip/mpfs-sys-controller.c | 127 ++++++++ include/soc/microchip/mpfs.h | 57 ++++ 12 files changed, 572 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/microchip,polarfire-soc-mailbox.yaml create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml create mode 100644 drivers/mailbox/mailbox-mpfs.c create mode 100644 drivers/soc/microchip/Kconfig create mode 100644 drivers/soc/microchip/Makefile create mode 100644 drivers/soc/microchip/mpfs-sys-controller.c create mode 100644 include/soc/microchip/mpfs.h