From patchwork Tue Sep 13 14:01:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12974816 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7789AC54EE9 for ; Tue, 13 Sep 2022 14:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=03H3ee1Ubs1zECyOi/c2dhFR2xcXRQaeaGbS06sLYb8=; b=rxVgCADlCAuPxm hW/SRI1FsVUrH12ml1V09gHuZ/Y41uWsHmIcePzEY6aAmt3lr+RsdGEJBkmPJrv2eWvWDuJDo+QIJ sdV6DrI60xPzIxXtG8yTgCTNqbqXUqIWJek8pOuy7ChyAMQ9+J6ZMlVYmsmRryBtVw0vq++mXg2na yuHHgV5l1XjpUbOxWBTeyxQTQ3V3oCOhO8dZe68mnnQWLor2yShy3MTyE8Xi95losZpO0cUak5xLy EfDT6OnmfNO1yhEZbepp2hgcTD4a05QNcfWFV+hMgjLYSv1L8nt+pM+Cvus+AuVWEqfZwE5g/wmUS L3tEKeVQHOfzB40JHcug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY6Uo-00BBux-Al; Tue, 13 Sep 2022 14:02:38 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY6UM-00BB8p-KB; Tue, 13 Sep 2022 14:02:12 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 281E96602006; Tue, 13 Sep 2022 15:02:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663077726; bh=ErT3ESbOa0vk9bZS+9TSr45Pf6iZdWC5H+hlE0INnY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RJYmSs73FepwOwIMBcXJo14SVTarVl0tD9gnZ1PTlzIo2FTtmK1owHlvYSENheeBF opGwe37fjNsT4xRnC3Lg50PKtRmhjbxEmr5u3i1Yc+djPcqstgBvwN89imroO0+9w2 L92faVBBCMJMKpX5mC8ZNXEzpFYWJb4NiU8+WBaTy98atXRHukmMLya5Ay9bEXNNb+ HTzKRA3YPzCwFWsffE3cMkU+3AOdT0bVG6PbWIzznpWKWxhHgd8YVgC85RPanwH/hy WPApudvvt+iWgH2UCDJrzeGjFq5IUQSvPXUSegNf8Pu40KUuBwg444gEsl+B5aGdKs Uo8obMwIWxARg== From: AngeloGioacchino Del Regno To: robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, chunkuang.hu@kernel.org, jason-jh.lin@mediatek.com, rex-bc.chen@mediatek.com, moudy.ho@mediatek.com, allen-kh.cheng@mediatek.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795 Date: Tue, 13 Sep 2022 16:01:20 +0200 Message-Id: <20220913140121.403637-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913140121.403637-1-angelogioacchino.delregno@collabora.com> References: <20220913140121.403637-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220913_070210_807793_A9C3E7B9 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add compatible for MT6795 Helio X10 SoC. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring --- .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml index 234fa5dc07c2..9241e5fc7cff 100644 --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml @@ -26,6 +26,7 @@ properties: enum: - mediatek,mt2701-disp-mutex - mediatek,mt2712-disp-mutex + - mediatek,mt6795-disp-mutex - mediatek,mt8167-disp-mutex - mediatek,mt8173-disp-mutex - mediatek,mt8183-disp-mutex From patchwork Tue Sep 13 14:01:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12974814 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9C785C6FA82 for ; Tue, 13 Sep 2022 14:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=bphUm5VLu147ARUhEPrpT9EhQM29tax9r+28OFVoALc=; b=rfKb/p8KN/pWSm VYXIUxpcqWPGuOWSyWAYTtp5WuG9LZIsa1ENrqahsSK7ehEn6Ikcw9C4I7skxSIs/xkZcW4QE3XjE wNmNpDtjUhRNBhoF6cFWD08xkOjshYsuc16j6ieGCJuxbTyO6b/1HKJzhFm2hko2K6k2ktCsn9pWd GOwp7b4i9UAGMVH4Po6W8XuvOP1zH+M4T9fCNOkDJBo/z3JbvR+PIFIHd6KIOxnrLYlTXZCSI5NMR mm6qYaA7rhX7mBO87TgCbU+zIfQmI9dbCX2y+wKt8CvHlE92quRSauekrx8SsTNCmfK5QmhOh1a9L xaAC6a2AHj2+7X95Y8Iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY6UO-00BBGb-Ej; Tue, 13 Sep 2022 14:02:12 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oY6UL-00BBAu-On; Tue, 13 Sep 2022 14:02:11 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0ADB46602016; Tue, 13 Sep 2022 15:02:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663077727; bh=fiGIiNykQrjpzh1k5qa71sltsz5JgetWMFsEzWdQqUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QIP/l+02X2HOzkBv4sasLj1bbI5kuH2esQsBfcnTt7BM2GYmaIgiwnV7h1Zi7i7+c 2NSq3boPtXFBxSxyxiKZQOYc/fprhlVw3qSZ2+1L0fnctMFEmYkSGP+YOwm6/ciLQB E/33CLOzJ4mY7BgZS7Cx2KwwZD4ZIXd8H6J5zFz2a+x3zHi61M+j4WKbt50VQioLbN U2A9gLs50gbNA2CoyPG5sTw6zIUO+CmJ9pRsBsXAXTv4T/zZ0By8D8I93moxQf4VbY uCbL+XM+JPqBxLfCW5PPtdbEZnA61WNHdmGVtjZYIzszz0CdtwzBS/rtQT+S8lPEWf Wrr9vIks6FAPA== From: AngeloGioacchino Del Regno To: robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, chunkuang.hu@kernel.org, jason-jh.lin@mediatek.com, rex-bc.chen@mediatek.com, moudy.ho@mediatek.com, allen-kh.cheng@mediatek.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/2] soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex Date: Tue, 13 Sep 2022 16:01:21 +0200 Message-Id: <20220913140121.403637-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913140121.403637-1-angelogioacchino.delregno@collabora.com> References: <20220913140121.403637-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220913_070210_053782_636F9E5A X-CRM114-Status: GOOD ( 10.14 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org MT6795 has the same mutex mod/sof register layout as MT2712 and MT8173, but supports only four SOF, as it has two DSI and one DPI. Support is added by reusing most of the MT8173 data, with the addition of a mt6795-specific SOF array (and devicetree compatible, of course). Signed-off-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mtk-mutex.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c index e82421386335..eb021e347753 100644 --- a/drivers/soc/mediatek/mtk-mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -433,6 +433,13 @@ static const unsigned int mt2712_mutex_sof[DDP_MUTEX_SOF_MAX] = { [MUTEX_SOF_DSI3] = MUTEX_SOF_DSI3, }; +static const unsigned int mt6795_mutex_sof[DDP_MUTEX_SOF_MAX] = { + [MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE, + [MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0, + [MUTEX_SOF_DSI1] = MUTEX_SOF_DSI1, + [MUTEX_SOF_DPI0] = MUTEX_SOF_DPI0, +}; + static const unsigned int mt8167_mutex_sof[DDP_MUTEX_SOF_MAX] = { [MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE, [MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0, @@ -487,6 +494,13 @@ static const struct mtk_mutex_data mt2712_mutex_driver_data = { .mutex_sof_reg = MT2701_MUTEX0_SOF0, }; +static const struct mtk_mutex_data mt6795_mutex_driver_data = { + .mutex_mod = mt8173_mutex_mod, + .mutex_sof = mt6795_mutex_sof, + .mutex_mod_reg = MT2701_MUTEX0_MOD0, + .mutex_sof_reg = MT2701_MUTEX0_SOF0, +}; + static const struct mtk_mutex_data mt8167_mutex_driver_data = { .mutex_mod = mt8167_mutex_mod, .mutex_sof = mt8167_mutex_sof, @@ -865,6 +879,8 @@ static const struct of_device_id mutex_driver_dt_match[] = { .data = &mt2701_mutex_driver_data}, { .compatible = "mediatek,mt2712-disp-mutex", .data = &mt2712_mutex_driver_data}, + { .compatible = "mediatek,mt6795-disp-mutex", + .data = &mt6795_mutex_driver_data}, { .compatible = "mediatek,mt8167-disp-mutex", .data = &mt8167_mutex_driver_data}, { .compatible = "mediatek,mt8173-disp-mutex",