From patchwork Fri Apr 7 09:13:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204640 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 28A04C6FD1D for ; Fri, 7 Apr 2023 10:18:44 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DKkXW4fXvR7pfZYAomOpri8iAJr5RQuW7RCtyGaBrSY=; b=0Nxq/VzLu8hhhF f5yoxi/MqyvhurwsQNcnJhzKD+1ysx6zml5IDkrDBdlcm03qVpZFiWZd4K9bCMWtstz5UUWd5TqDP 1ihyXtA92lKWkk/Ye1ZcccPqH3WVVm75maznCtSGqjfOpY5pYLr3I8TuApU+3Ixc/JWVojQQfD7E7 3L8O97qf54UPhfmDiTHZq/CZ4GjId7MP9ijzLDiZ/U93C4eeav1N2kaepaxUiOtoDE3qQftITXEtR vm1LJxDNCo5aGXiRHJB/1REa3ndHVqpqfHqE9Qb04KQCm+xYfzH5+bKjkqRVoXm/X94KcESuygjjQ aT/+lKfmunxhG5zXgRmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkjAO-009m6K-14; Fri, 07 Apr 2023 10:18:00 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiAa-009cv4-2K for linux-arm-kernel@lists.infradead.org; Fri, 07 Apr 2023 09:14:10 +0000 Received: by mail-wr1-x433.google.com with SMTP id r11so41797424wrr.12 for ; Fri, 07 Apr 2023 02:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680858844; x=1683450844; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7wuqJ3NJSgCZO0KTwOialPWQBgLhEbjc4bx2H+jW2qg=; b=HNuTTSYZbOUQAPBqHTfl7H0KFLeNCmBSAlxUlubupMhOHWwNQX7gFMQvX2qd+/g6Br Q8B2M9kpRg4kTYh0DpI408C8L+TLkj5J5eR7cNmIEninDkXt0vocGH1skpHpoa2seyqk Et6CPDUgY/OCG6gnfzrLD5Pd/lPKPqA2oMZAXeOf88P8xIvE9iWlwoo4HceMpDfMOina wElzOKii4Tw20GzTYGASf+eYnIAfjJQtU62qIlRuqkfmJCihiY+dur3rNbgD8hEZKX+I /k/MnCjIkLOpvbWLB8wtijx/K6jOQAPKGHL8qImw7PzXzwIqQeFfqObuehrh/ebLxWUR 1tbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680858844; x=1683450844; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7wuqJ3NJSgCZO0KTwOialPWQBgLhEbjc4bx2H+jW2qg=; b=1NAW6i0uM7aYWpKyDeko/9Uptxwp2b/IIBrtoqijicS6151gyH1MGXgQau1dWc18nJ IcShCRkTzCwvIWZChIDDJCzK0BrK1fP72zkVw2dbQmePtekPj3yfdCyn5hXR7lhpWEsa R42kBUNcX4/CXWfbD64RKRR+T0W9yXyaBu1oDBlZkuH1EUmELkzyyfH0p7dumM8XCT3o BEuOtyHbocWGVTbLJujnhMBavnv4Bo8USnmckvNR2ualYMKBpglLmKfpir6Fkgd4gRWY Cadqh/r+/goKmlr7lYKAdawG+M7ZKUZ1Wb+vtlfcQyjP0wEx3dbnPmxylK3cBRjsZBNG V8AA== X-Gm-Message-State: AAQBX9eka35Ud5/GyDl1EskDErhSAUs5Qr7bhmrOjgt9UY2C8c5otELE bIZkfaTaV61bW/gY1JfF51x0lw== X-Google-Smtp-Source: AKy350bxY50SgH2Hy5SgJ/V3cCDFecii0IL92XTMoom6qTEgvwZttd/LLHHjmQUF/RXNh0HfefYpNQ== X-Received: by 2002:adf:e643:0:b0:2ef:b32d:f54a with SMTP id b3-20020adfe643000000b002efb32df54amr523144wrn.33.1680858844242; Fri, 07 Apr 2023 02:14:04 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id k22-20020a7bc416000000b003f04f0c5a6fsm4026429wmi.26.2023.04.07.02.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:14:03 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:13:51 +0200 Subject: [PATCH v2 1/3] memory: mtk-smi: mt8365: Add SMI Support MIME-Version: 1.0 Message-Id: <20230407-smi-driver-v2-1-8da6683cdb5c@baylibre.com> References: <20230407-smi-driver-v2-0-8da6683cdb5c@baylibre.com> In-Reply-To: <20230407-smi-driver-v2-0-8da6683cdb5c@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1341; i=amergnat@baylibre.com; h=from:subject:message-id; bh=WjdOKn4CNCGCL7Lz1uy2ciMySKdsHm1qKtgJMaQs14k=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL97ZvbpRspLALhiKU8/NiiqCdZPzY7s3KtdRLwlQ I+nMncuJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/e2QAKCRArRkmdfjHURfqiD/ wIWom0hIvuKv5lKnL+jKLiTqW2HHBKLSlyk7G0nOr7xQbxRn3IA2QhwbhG0ngNdq86GffH/W0Pwlwy 8pXHY3lFHRZZe/GATtihD8WF9UGfngW2YxmzkR8/AYErq1JESIJHvW4pvDVEGUJQY3nAJ0A9I5hUCu llhZ2oQKp/eUYB2I35n5iEJMZbIVChJulAHMpfTrOsEoJHf9DMD+ZUsozwyASoPxUDkqNbgnjsvlxp +yN21T8U3N4YA7z7Li9DRTkdFzh+jNtM1tACIR7qdqJeH7WDWXIY7IaRmhBF1EdLUmNN8ZB9MWjO7p OoWSCwwwm8iZ2240G+ggOjOBI0yt6BbGaSNqjF3bQrUdGVKbSdUDRG5MauEkhDHq44eVn0cxjdpUL+ Z1qEQSbvML7lf6yGj4sMv6ztJKwFoslR1lEnAkjSLj6AgUaILci8Vyrj0eWZf9ZclOvzb07W5mv3/B U9O454Cf4uW89JcAOJNJzjo/w2a8NuJ6IqYESeWJsTBRKrJUlwszlT1XCkyqNdqzfgcyhso9jjzf0X oRtUUXRpHPP5RfIQ385xYAXAh5cvpt8iNgoncHY96XPn/i0gvXRZvW1ojdq6I0v1yS9vGeB/+YSUoK KuKQNa8zyDNK2EF/q24OQN2FCSA+U3xp17auk1jhvVhFX8al+l+ukXLJNNhw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230407_021408_778183_CE463EE0 X-CRM114-Status: GOOD ( 10.52 ) 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 MT8365 SMI common support. Reviewed-by: Yong Wu Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- drivers/memory/mtk-smi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index 5a9754442bc7..6523cb510518 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -713,6 +713,11 @@ static const struct mtk_smi_common_plat mtk_smi_sub_common_mt8195 = { .has_gals = true, }; +static const struct mtk_smi_common_plat mtk_smi_common_mt8365 = { + .type = MTK_SMI_GEN2, + .bus_sel = F_MMU1_LARB(2) | F_MMU1_LARB(4), +}; + static const struct of_device_id mtk_smi_common_of_ids[] = { {.compatible = "mediatek,mt2701-smi-common", .data = &mtk_smi_common_gen1}, {.compatible = "mediatek,mt2712-smi-common", .data = &mtk_smi_common_gen2}, @@ -728,6 +733,7 @@ static const struct of_device_id mtk_smi_common_of_ids[] = { {.compatible = "mediatek,mt8195-smi-common-vdo", .data = &mtk_smi_common_mt8195_vdo}, {.compatible = "mediatek,mt8195-smi-common-vpp", .data = &mtk_smi_common_mt8195_vpp}, {.compatible = "mediatek,mt8195-smi-sub-common", .data = &mtk_smi_sub_common_mt8195}, + {.compatible = "mediatek,mt8365-smi-common", .data = &mtk_smi_common_mt8365}, {} };