From patchwork Mon Mar 27 08:36:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75294 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1358906vqo; Mon, 27 Mar 2023 01:42:10 -0700 (PDT) X-Google-Smtp-Source: AKy350aCfsFLQNMh3Mgm6khin/8atOsB9usV+uOyztx0RHhupemYxZNX+87iycWCMouiFU6peK/B X-Received: by 2002:a17:902:e84e:b0:1a1:8860:70e5 with SMTP id t14-20020a170902e84e00b001a1886070e5mr12987265plg.57.1679906530068; Mon, 27 Mar 2023 01:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906530; cv=none; d=google.com; s=arc-20160816; b=eEmWRGBuM+uh+T8SOWz4C3hVpO0UTsWso6+HCb0wfKj3QvQWCjWZ4Z+iYZQLGX/n3Z RquyYE708vzTwmY26084OzUv16WETaSHR+0hJQbZCsMkqSz5FQCuBfTePTwBwYx0ALSF 6QT3mRbYnW5GeIiN2SmvfnGaegfhYDL4IWeC2CD53eOEreNh8mHvxPEfvHcUfZ58PMun K3jj+Sh10Gd8P2+ZY94Jd7YecDwmm725yoIv39OccdNqI54vQPxChggy8tbxRiZXLusn tkm7sj2tUDJK64VLg49QEQRmR8DNnm8/qvd1pCDQPXy6CSOBNy6xGwswsGdzKwNA8e+T XfvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2E+BrxZ1f4fQghU1DrSribu+7UPbIKwG+2O4gNTnqiY=; b=yXt5TQX4NBqHueegn4GfmYYcWVTlfCnaFb0HgLMBRMBcryQEjAe8iwd4y2hGVpj7bs pkeuuXUlfCYcjXpy5dpwcuAnzaCF9YyCYcO2jrVKswNczmo8WmyoYeHu15IeqChEdfYm r3kpaAvdAJBM3iaOlSLbu6ktmU1O4Bg3pRbDeicAhae4vg541jutOmC9nYp+tydXqMCZ lt10H4zIoTloxgaGopCLKPXB1PEa0d7eKes+a03SUk5RgTzZpH7J2npeyqr/K6HtOq43 9wq57mK02RWi8wL/esklM8wNNv61jr2rwQzP5oZVhL41OtEddhJMZ3yX5+OG8/W7tVAL Jl/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=AMQLNfpd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz21-20020a170902ef9500b0019316d9e4c8si26986248plb.373.2023.03.27.01.41.55; Mon, 27 Mar 2023 01:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=AMQLNfpd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233315AbjC0Iks (ORCPT + 99 others); Mon, 27 Mar 2023 04:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233080AbjC0Ikd (ORCPT ); Mon, 27 Mar 2023 04:40:33 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C75B51BFE; Mon, 27 Mar 2023 01:36:55 -0700 (PDT) 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 C635C6602087; Mon, 27 Mar 2023 09:36:53 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906214; bh=DtLoKecTBQhhvopNsM7M95mpXjvK5USiGMoYC7Oej4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AMQLNfpdiOHJBlTfeyPx2aMe1IDW9rlMZzONNCG9rvabvwE11ZiBibQDljIzz/M7/ ECOT/PqeHbC8yLfrD1QmcU3bu5nGG8gtMKKPonEPnsQ0OW9AqSEXder+q2PGv+nBp3 di4YRaq6FdxJHAlQn9MKhzTjri+SvUxTXMUE5d3e9aeZKRMgt81uqSUaD12Exsp5Br FkL0OtV7FZV+zXP8xeVVj2P0qbe9dlu9LM//1vroUY1CRReZsFnF/rCwq/kWtJVcUq JshW+0eQ9eTKnTJrNGhwFKGxUrU0azqXWyyFyp3pYwx0gensR7wKdxWyc0Q9SiFo83 l7UZYfM7dnLCw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 01/17] arm64: dts: mediatek: mt6795: Add Frequency Hopping Controller node Date: Mon, 27 Mar 2023 10:36:31 +0200 Message-Id: <20230327083647.22017-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509669497166676?= X-GMAIL-MSGID: =?utf-8?q?1761509669497166676?= Add FHCTL node but keep it disabled as the PLL clocks that should be handled through FHCTL and the Spread Spectrum Clocking parameters are board specific. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index b3fc76d837a9..4d2119751572 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -310,6 +310,12 @@ systimer: timer@10200670 { clock-names = "clk13m"; }; + fhctl: clock-controller@10209f00 { + compatible = "mediatek,mt6795-fhctl"; + reg = <0 0x10209f00 0 0x100>; + status = "disabled"; + }; + gic: interrupt-controller@10221000 { compatible = "arm,gic-400"; #interrupt-cells = <3>; From patchwork Mon Mar 27 08:36:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75303 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359193vqo; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) X-Google-Smtp-Source: AKy350ak1ItGPyxLFj1ycuf6DsDoOkfi6N2xjUMCI+vWdMTfnLWR+NN2/GTumntQ9oPTaNt6tGm3 X-Received: by 2002:aa7:9af6:0:b0:623:c117:f20e with SMTP id y22-20020aa79af6000000b00623c117f20emr10233348pfp.19.1679906567709; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906567; cv=none; d=google.com; s=arc-20160816; b=A+NhyBr+DxRV2hEZK5f0jiNSWKwEyikz+nszLS6ELgQ19Pu23Onx++NerWfCDq57vr VdFST0fpfI0wstK2IC/QgCr4s3Sf0pmc6X82vD9GBa2JJLHoVIPnjJWuwWf2va6KEm17 ULgxEvohl5wCcu45V4Y5e/5xVtqFan0KiOaqPoOzM233Qtg8UJAXF0udTNSEqfioD9Qg LEgRip86hBNx2d08y2Y9zqnDA11mAKKL9JM9wtAnwqRq8OXFAbc9GK6KfRSDuRTDqua8 JBikPz6Xmd5zqJy7kLhVL2uUywb5EQG3liSyletSathKVll+wd28tXfdqTyK61Tozev+ qs7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pTyKzKyUA94hSyf0ksiUxTZTBVUSTUIL5Qpnhzgn19s=; b=J0gcRZZLQZsE09lKOxTUbRy94MGAEdn6md0TWyHH37B/CWiWPNwBNxwizTVE6t9VjX OQFCwF0tFO3DUk2BT6zfdQOaBGVMKT76n6qg9zBJsdylb6LrXjZ+W9Lk48U3LmHzo663 9UJQI/AEZRjOsiMyHaITVuQdd5RmOLSEfQl5Kp3i2xjCLCu4O5+tMghcw7k19fBec1D4 D3ogr52Hs2hc5/eRgGIhb1Ya224U5YK4dBN2GmtgznpU4FAa8rdG+2sKJ6CyWE0H/paE UtGCDRv3hqoMEqRyJzFCVEp6sI/1L8wx1ChAgsDo1JVzd8f0tmoj6Vu4dY6msXUCTSB8 qvkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=aKvdW67m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a056a00228d00b005a84d4b045esi28184927pfe.118.2023.03.27.01.42.35; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=aKvdW67m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233444AbjC0ImE (ORCPT + 99 others); Mon, 27 Mar 2023 04:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233089AbjC0Ike (ORCPT ); Mon, 27 Mar 2023 04:40:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B119235A2; Mon, 27 Mar 2023 01:36:56 -0700 (PDT) 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 B5F5E660308B; Mon, 27 Mar 2023 09:36:54 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906215; bh=NomHwJjqmoIPLlLZ3+9R0/l6R9Kvr/DrQn2Y01kmsNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aKvdW67m47+IyhI0RzD0fa3Bs0TAWLxFlgyzU04BCqOx4zfcs5RKILed7DOh+Bm/B O3I5aMLMAnqeMtYBsMP300/IyAWrKOvoVXzBOli7N4MNXHDTVXlDwsGkh/wJnI6qZX N9gMFS2SjSChYOy+nCZ5r3zi5wPqHW2bl9g6zjVrsLBg/+sgS7ji0/TI7+j7QkRVki rxNiywvQhaeCjA1Sby+cQWty4r4BLtuFgcvz+cyxdPpbfpRVbD/aDfq7/vc35QQecb dwwRc5CwDDDWoHmtlcaaerfJQbiFxUE3Q65uqaWdtuk9JOBiFLrGCCeOl0whshwHNZ LrWH64shgjvRw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 02/17] arm64: dts: mediatek: mt6795: Add apmixedsys syscon node Date: Mon, 27 Mar 2023 10:36:32 +0200 Message-Id: <20230327083647.22017-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509709310388536?= X-GMAIL-MSGID: =?utf-8?q?1761509709310388536?= Add the APMIXEDSYS node, providing a syscon to the APMIXED iospace and also providing PLLs. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index 4d2119751572..26d640e1bfb6 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -310,6 +310,12 @@ systimer: timer@10200670 { clock-names = "clk13m"; }; + apmixedsys: syscon@10209000 { + compatible = "mediatek,mt6795-apmixedsys", "syscon"; + reg = <0 0x10209000 0 0x1000>; + #clock-cells = <1>; + }; + fhctl: clock-controller@10209f00 { compatible = "mediatek,mt6795-fhctl"; reg = <0 0x10209f00 0 0x100>; From patchwork Mon Mar 27 08:36:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75302 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359190vqo; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) X-Google-Smtp-Source: AK7set+g79U++aCYi8JsZ6iFE+s8V/8+K4JCj661vyO7+oej5xT66ivEvFwljittsorUz3MhZw8g X-Received: by 2002:a05:6a20:98a7:b0:d9:dd69:47e3 with SMTP id jk39-20020a056a2098a700b000d9dd6947e3mr9786465pzb.23.1679906567328; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906567; cv=none; d=google.com; s=arc-20160816; b=K2wk0kP7lPoHVE4vwStQzn0HOkk3g1b6h9k7y2zpy5Jj3+Gx1to0RWsjvj6ct22e9y OGaNHXbwYyTARfLeOjDBd4UFna3zPX69PlAJgI3NTPAvLH225dDs8SF/RoUFr+ESr8Gj GNjFGWmwmbvNSwf76a1jAd0afXVSUIC9mHxuAJMtKPwMDAk7M6+uyYQ2/oHgd7mKwn86 e+9Rx8rjhXnGQxJFMIL94FZi2WEOp8Ax8/o+bw2uI/pf3aLzDJJO6W9TeNDmzykpdKxG xZIAHzGk/JO0IF0faXj9zITHIz7Opa5cPnRlI0ii8FLxxUxezS0xIP9gtnSojxXjLHtB GZCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Leyd8D2nRHtjpbORXUngUPB1GU9NSyALdF0HPadNxJM=; b=MKWJvN3aZG0y0jzNg5OeTjgrjJzFLs1tGSDnbmxPr2+LpDsHVUc/Xa95F3M4zLZDLA 8CWzZNR+GU1NW5eqxBPllKcpDZgU1nUbx1rHJulT63dUDOYGqH2InYwkO8I8kIV1hNLy rKnSsvLG/SwqCK9F4EYFmEtZKz3FgD1X9PmlIdbBdcNG9mvqgcIjN6QGRIVBVvoyfLIO oqfixj5N7YOZeD0zm2MXJmZVWoDpE8JzPxGpkBtYn4ptrfL7HRGkltH2VUA+FDYza5Dk I/KyoSs5BCPzm9anUXkvAw4EWOsvLAeeSJsQcUzku7hJPeSyYlJTarbd8ehKGe2xR51y e1hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KtrLlYCB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a631553000000b0051323fa9cdbsi7298007pgv.665.2023.03.27.01.42.35; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KtrLlYCB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233441AbjC0ImB (ORCPT + 99 others); Mon, 27 Mar 2023 04:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233092AbjC0Ike (ORCPT ); Mon, 27 Mar 2023 04:40:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 971D635A9; Mon, 27 Mar 2023 01:36:57 -0700 (PDT) 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 AA06966030DA; Mon, 27 Mar 2023 09:36:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906216; bh=WzRAN9wdA273tqZEI1XBRQYQ34kkvCmE+TRLQXkcUfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KtrLlYCBHpTkJoPbpSiqdiv1eWgoXbGH6ejgegbEdZ8g1+eXFuuQwPUUcwv2zpaw+ avQ2umUGre0wutECVyiHYYq1JMshDVuiFgSz8/WwWpGD7WKCXab+2zXfbUjMW1eXWP iUE1n2rNU8Oa/3js7vpBzMZqePlrh20ETm9og2MlI4V3Zuen9LbeKEsZHZe4S/+Vux aLS7vaBIZLxhc5b/qBIOPf5WI+5TbDanCacPV5tszT2KvY8Z79NGUz+OAk5efP7d36 cff2oS+/7FAA8Ea7hV6UjVpTW6+G4BzPuSbQM4if8pLeO/OK8qa/RdhP7LzGAwB9FD iqPbPXaL9KSAg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 03/17] arm64: dts: mediatek: mt6795: xperia-m5: Enable Frequency Hopping Date: Mon, 27 Mar 2023 10:36:33 +0200 Message-Id: <20230327083647.22017-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509708959262499?= X-GMAIL-MSGID: =?utf-8?q?1761509708959262499?= Enable FHCTL with Spread Spectrum for MAINPLL, MPLL and MSDCPLL as found on the downstream kernel for this smartphone. Which one to enable, and at what SSC percentage, was found by dumping the debugging data from a running downstream kernel and checking the downstream code. /proc/freqhopping # cat status FH status: =============================================== id == fh_status == pll_status == setting_id == curr_freq == user_defined 0 0 1 0 1599000 0 1 0 1 0 1716000 0 2 1 1 2 1092000 0 3 1 1 2 2912000 0 4 1 0 2 1600000 0 5 0 0 0 0 0 6 0 1 0 1518002 0 7 0 0 0 0 0 8 0 0 0 0 0 Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index d3415527d389..52ce3284a46f 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -48,6 +48,13 @@ bootloader-region@46000000 { }; }; +&fhctl { + clocks = <&apmixedsys CLK_APMIXED_MAINPLL>, <&apmixedsys CLK_APMIXED_MPLL>, + <&apmixedsys CLK_APMIXED_MSDCPLL>; + mediatek,hopping-ssc-percent = <8>, <5>, <8>; + status = "okay"; +}; + &pio { uart0_pins: uart0-pins { pins-rx { From patchwork Mon Mar 27 08:36:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1358961vqo; Mon, 27 Mar 2023 01:42:17 -0700 (PDT) X-Google-Smtp-Source: AK7set+33qnWY9+wbwPk36LuMihkWtlx81PE4/JxTbE5mB2yx8zXjX+/jRA2zrEJjAtLK5kTVcM0 X-Received: by 2002:a62:7b0d:0:b0:5ce:ef1b:a8b with SMTP id w13-20020a627b0d000000b005ceef1b0a8bmr11126589pfc.30.1679906537400; Mon, 27 Mar 2023 01:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906537; cv=none; d=google.com; s=arc-20160816; b=bBtkCQqTMJK3l6mYPcjtmjPrfKsXcgVIE3ZnfQYCzbBJjs/2BoTDZsfd0vzSQO+a+U +jNKYWTx3TVOCURLoU7n1CqPft6emAqdMwvbfNVqeZ3JQQZYMm4I3/KkI0orUsnXy1DB qpc46FudQnIXcxWcRtnEIo7okEXDRK8kzRO52OkzX4u3BiiGA+LIWBdnAbYYIizyMbMQ rK5zZ7LRaBbsrw14Kb4AAN4ITH3JUJzQK3A7aL0uanLKL/vNAQStYcWQrR5RGDKF7T9z PXEnJqZCNFaztumFRsIcyLeNtiGjKBA0XV5tl63CTzE/Chf2jFljttfLXuJTWQLN+1Fv msOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r3PiF0lCUBj02UX+EZBLJjyi2r1RA1XbCSu3yCJnP9U=; b=xATyuGi+Yoc/2i8tmMCpXfGMu2Jmrw81cjbHIdBPPVUgvLlreDJJI+HFxXhKrTm/r4 4oojKAxVYQ9BP7bYAgUI6M5Kj3myRD1q/JeKl6yzA0GYo4nMoB/FrhhhOLIiu7ZhnO1G AoYBs2i4dRqe9M5y8A78fy6bL/IxXDUsy8zbbxqB2FtrbAne9qz1AXMIhw8tefbHjt0Y 15lVZ9/85Pa0gp1opWIjSP8KIo/YazwJEEvDt25qi1XIw+8d6LnCHHKxHfTIh1zfBsM3 5WdG2fChBv++huRJAkJfSMVL5pmBRC/eV0SfhiuOlhhaFIXS7MAt8QdIeBn4hqjG0iuX vO7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LatL6xXd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020aa7888b000000b00625951b2ed2si27558874pfe.49.2023.03.27.01.42.03; Mon, 27 Mar 2023 01:42:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LatL6xXd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233419AbjC0IlC (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233094AbjC0Ike (ORCPT ); Mon, 27 Mar 2023 04:40:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9328C97; Mon, 27 Mar 2023 01:36:58 -0700 (PDT) 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 9585D66030B4; Mon, 27 Mar 2023 09:36:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906217; bh=/m1OL7UsMbNu+kNMCfRtbpy2xlvb5EHGi2lUhT8JrpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LatL6xXd23iT/+dxp3yRnUFr1btzJX414Q9COH/8qxalSOFYNnD0YL7GSHZUgmJCI EgSoHyTgPdr2aoM6Lke3roF3riLHZxxztopPljTNYWggdPmzp1xzrnaC/eLpOqVCDH pvpmBUntRPgNxxyHWLVJXtoVdvp7MNZ9pmbE2qH4UZIe+ah4U4gkDRWkVgwCQtZNZs 2xMJ/Iyyo9IFWhyqmZmM77EKFAgE5tLorwp0wuGHZO30f92tmrONxnPAp15m1w+Ij1 hO0qX71X/x9BTXkqQj916ymZ5tPBypN6vASbQUiCGrEexs0LF3SvHu2MIkkXuhbKHU 24U8Qmuab1tAw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Krzysztof Kozlowski Subject: [PATCH v2 04/17] dt-bindings: i2c: i2c-mt65xx: Add compatible for MT6795 Helio X10 Date: Mon, 27 Mar 2023 10:36:34 +0200 Message-Id: <20230327083647.22017-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509676975801130?= X-GMAIL-MSGID: =?utf-8?q?1761509676975801130?= The MT6795 SoC uses the same I2C controller parameters as MT8173: add a new compatible string for it. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml index 72ae2e01cf22..685da4df688d 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -45,6 +45,10 @@ properties: - enum: - mediatek,mt8365-i2c - const: mediatek,mt8168-i2c + - items: + - enum: + - mediatek,mt6795-i2c + - const: mediatek,mt8173-i2c - items: - enum: - mediatek,mt8195-i2c From patchwork Mon Mar 27 08:36:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359186vqo; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) X-Google-Smtp-Source: AKy350aUNzzLHkmAVQo7EHQeDYglWdo7r28hipbIC1mGc135FGILC99cnW5yAluPlcfAjLkSL6n3 X-Received: by 2002:a17:906:d966:b0:7c0:e30a:d3e5 with SMTP id rp6-20020a170906d96600b007c0e30ad3e5mr11311124ejb.18.1679906567224; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906567; cv=none; d=google.com; s=arc-20160816; b=Z48M28eEtayry7Do02Zq3Q0FLSo2JrEgbnYEq7+HKHw3MC5Vs8ebLmzXUc011iSvZq Siy1nGgLlHTw8jQ5QGYyzADV516o+5OgbVEw0/2mEBoHK2E+cibEXfLU5PdEXIXEA/XW XMwRbJstliXVXkPrQZhwHhrlacyj/Ge318ik/hRMoDYoNwVdU4MC95unywVbaOiF4D2G aQovRnIUB2+cr18jIjNysHXZNF63qAhL+bnjx1NfYmL23tvclvGcVh9nrFGA+sHNJwu2 QpT7szfdwUmmqFK4xC0MtWqAjvmrGJzhf43Q++kwA851G9O+t8ZVeh/LCvq7cOELgK8e Lc+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Enp8+k53zZNO3mOQI9L8FtkcYSdTpwDeQcTM39YWFvY=; b=STd6y7LB72qLaqFx2lqwMNeUmW9Qm6WbhCsAxUm9ncWw+QbuMDSXIQLeHbj3pCAlSR Pr3dOGNUBW+aYdBJjp28rCqKFobUXJA9lFqfFt7de3RAIWhpiPCw4bBq+vyGslKh/jXS 5ARGDhOLZXt4/1Y/EF5o9Mk14AdjwWxDs0cGUuaNuXz/KPyivfr2DWct4cBJAzr6cT5m 2YsFVhNoXOkAPYnICDZiYaEsM/SpRIxco55HVSsx5r23+/gXFmVDoiMSz2lDxAeZz0q8 bv1L+PoDRlaz/xlLL8YjGRK7TgWNd6wokhIS/1WFbwnlFUzTE1fh89lWaO0Zk4HPU7qS pU+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=iCkzaO8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t21-20020a1709063e5500b0092bdf20dfefsi23838486eji.386.2023.03.27.01.42.23; Mon, 27 Mar 2023 01:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=iCkzaO8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233386AbjC0IlI (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233137AbjC0Ike (ORCPT ); Mon, 27 Mar 2023 04:40:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74FE865B4; Mon, 27 Mar 2023 01:36:59 -0700 (PDT) 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 8EE8E66030DD; Mon, 27 Mar 2023 09:36:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906218; bh=+C19HY45yz9Sl0OrylkeSlqeTXjPBT2+I9ZB7T/mxXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iCkzaO8nVU6WnBTUXzyCKVukOLkI82GT8Xd0xJOhAjor/YkqoLQhDcFJlsE7jmuUX hQsyXj+fJu+8CldDi59Z5/mnvbZHh+3H+T4U6E0YBCWN/G4lLiDg7FrCIb59NdLuuj EYcnjwwoKygQNg926uJ7dhLXWyLa4nZrhstKFoFIKsCgPS/z5eAKG04y7x12LARPlI HCDyIA3wDOxUvJSibEWGRBrefVyaABWfTunMawJWPMwqX+GMQVlagKB9vqWm7kXb1o 9v+Xb+MbaVJjITHZEQiS3pJpG46zwvkbb1pm/Hk0aWc6L9bth6hETt4AYSI9oGGENr LN2CVQKjzppww== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 05/17] arm64: dts: mediatek: mt6795: Add nodes for I2C controllers Date: Mon, 27 Mar 2023 10:36:35 +0200 Message-Id: <20230327083647.22017-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509708622499498?= X-GMAIL-MSGID: =?utf-8?q?1761509708622499498?= Add all four I2C controller nodes but keep them in disabled state as usage is board-dependant. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index 26d640e1bfb6..ceb6fc948d8a 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -445,6 +445,66 @@ uart3: serial@11005000 { status = "disabled"; }; + i2c0: i2c@11007000 { + compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c"; + reg = <0 0x11007000 0 0x70>, <0 0x11000100 0 0x80>; + interrupts = ; + clock-div = <16>; + clocks = <&pericfg CLK_PERI_I2C0>, <&pericfg CLK_PERI_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@11008000 { + compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c"; + reg = <0 0x11008000 0 0x70>, <0 0x11000180 0 0x80>; + interrupts = ; + clock-div = <16>; + clocks = <&pericfg CLK_PERI_I2C1>, <&pericfg CLK_PERI_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c@11009000 { + compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c"; + reg = <0 0x11009000 0 0x70>, <0 0x11000200 0 0x80>; + interrupts = ; + clock-div = <16>; + clocks = <&pericfg CLK_PERI_I2C2>, <&pericfg CLK_PERI_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c@11010000 { + compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c"; + reg = <0 0x11010000 0 0x70>, <0 0x11000280 0 0x80>; + interrupts = ; + clock-div = <16>; + clocks = <&pericfg CLK_PERI_I2C3>, <&pericfg CLK_PERI_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c4: i2c@11011000 { + compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c"; + reg = <0 0x11011000 0 0x70>, <0 0x11000300 0 0x80>; + interrupts = ; + clock-div = <16>; + clocks = <&pericfg CLK_PERI_I2C4>, <&pericfg CLK_PERI_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + mmc0: mmc@11230000 { compatible = "mediatek,mt6795-mmc"; reg = <0 0x11230000 0 0x1000>; From patchwork Mon Mar 27 08:36:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359163vqo; Mon, 27 Mar 2023 01:42:44 -0700 (PDT) X-Google-Smtp-Source: AKy350aQ6j6hebEuHb0v4xTVmCc6s60johDPP4w/rFWFA/GWysfxkF9dQHgQfHX5hNMr9qILDEO0 X-Received: by 2002:a17:902:e0cd:b0:1a1:ae8d:1379 with SMTP id e13-20020a170902e0cd00b001a1ae8d1379mr8455576pla.7.1679906564372; Mon, 27 Mar 2023 01:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906564; cv=none; d=google.com; s=arc-20160816; b=pWYcL3HQSSqebM9X/5cm3mjFQhXCIu3FLCjGYv3b4exb0Q7YjhBFAo5AfBo9BjUo1o MDF38ACtZGJArt9zESjJUTQYjk8RflfmnuiJhhm2JMWxDHALfomEzyS+U3poMgOpQey7 AObJyoN0WkzyJiAf7TxJnsJCS32OG6vC1v2OvD2Rpb3bBw5QoavZWZbc/ZebnMJrgYL2 VPzSQtEDqZ/jtnc5u4/ByqR9qyAKsAgna2ToLcASxoKalWy+bSQCwQtJcRs4uewGWX/C f1IFbfdgZKDhO55g86RtGLju2oZILgDfC/6RcEi5JsAxsX9Limk9+0NnhZ7JvmiyG2yc 07qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Op/IXC9mlvZ7+8SOEnumYZU/z47ozAV8GNa9iRWtI7w=; b=qsjEVGsRzQoh5sLTQ6eO2/Ibr9h4f6vBNzuEfik+mIyYpJUCuHEj+Y8gkOtV27UPEI kDsIW+q9Z5jAy91KHZb3Dh+vaA+f6t3zBgRq+NBc3afvv3Q+2RupTjEcmDrfMjWFvmil dtoD2ZrXLfRaEklWc/u0xJGXIMtH7ycQDR1K12opAe+4viTW/FVHMfWiYSdwRKVHpf+/ mcxWxhg3pTqp6P0eowwcTgFbGM1wZm3PtWJqNJHQaGjxpccdA/ozCJhvqPHnDeJgPzBb YRiQv5gyYVaJGnMfcIRTKm0eZdEhXB0LdJmmEAhVH4KQr3DAAdC4d+H/LW8h3xAGB5ox POLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HTDZGvhR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kh12-20020a170903064c00b0019d2142ffffsi20771239plb.295.2023.03.27.01.42.32; Mon, 27 Mar 2023 01:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HTDZGvhR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233100AbjC0Il6 (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233139AbjC0Ike (ORCPT ); Mon, 27 Mar 2023 04:40:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6824D49F8; Mon, 27 Mar 2023 01:37:00 -0700 (PDT) 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 805B766030F3; Mon, 27 Mar 2023 09:36:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906219; bh=JgYNzYY/JT/ZxbQnRLMlhIx1cKKvJaqNQPrMZEWb9yg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HTDZGvhRX6yiizNfAlXjaoL05KjxRwnllb5xPGJcrjrn8gDD9tcFozOSl+YVkdoiF rqLjr9Oc/Qdm42Sjg7jUojBDZAOOAnHE1PFO1kXx6lkcdEpMYO9kHAXK+4G+M+RxMU xfU/v4F9j3ap56YkppMBhCx5DbFocffZpxKUpn94Cbex6GpB1s4j5R8z5b1KuXxzIy HTtWx4izaKJ3vFLZ2Q4lgTEf/8D0vYcCDbFK0ZspFxHPhzkmRKe04MMe65G2uj/vHI kr+Gx3HfTOx9j1GOEQKm4R/8kqenDLuanAI0hEFsEiGcrqbtmdYG6TT0TeLHo0M93O UcXTWeFhsWxGw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 06/17] arm64: dts: mediatek: mt6795: Add SoC power domains Date: Mon, 27 Mar 2023 10:36:36 +0200 Message-Id: <20230327083647.22017-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509705695909516?= X-GMAIL-MSGID: =?utf-8?q?1761509705695909516?= Add power domain tree for various hardware blocks on MT6795. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index ceb6fc948d8a..d63efb32e6bb 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include #include / { @@ -264,6 +265,84 @@ pericfg: syscon@10003000 { #reset-cells = <1>; }; + scpsys: syscon@10006000 { + compatible = "syscon", "simple-mfd"; + reg = <0 0x10006000 0 0x1000>; + #power-domain-cells = <1>; + + /* System Power Manager */ + spm: power-controller { + compatible = "mediatek,mt6795-power-controller"; + #address-cells = <1>; + #size-cells = <0>; + #power-domain-cells = <1>; + + /* power domains of the SoC */ + power-domain@MT6795_POWER_DOMAIN_VDEC { + reg = ; + clocks = <&topckgen CLK_TOP_MM_SEL>; + clock-names = "mm"; + #power-domain-cells = <0>; + }; + power-domain@MT6795_POWER_DOMAIN_VENC { + reg = ; + clocks = <&topckgen CLK_TOP_MM_SEL>, + <&topckgen CLK_TOP_VENC_SEL>; + clock-names = "mm", "venc"; + #power-domain-cells = <0>; + }; + power-domain@MT6795_POWER_DOMAIN_ISP { + reg = ; + clocks = <&topckgen CLK_TOP_MM_SEL>; + clock-names = "mm"; + #power-domain-cells = <0>; + }; + + power-domain@MT6795_POWER_DOMAIN_MM { + reg = ; + clocks = <&topckgen CLK_TOP_MM_SEL>; + clock-names = "mm"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + + power-domain@MT6795_POWER_DOMAIN_MJC { + reg = ; + clocks = <&topckgen CLK_TOP_MM_SEL>, + <&topckgen CLK_TOP_MJC_SEL>; + clock-names = "mm", "mjc"; + #power-domain-cells = <0>; + }; + + power-domain@MT6795_POWER_DOMAIN_AUDIO { + reg = ; + #power-domain-cells = <0>; + }; + + mfg_async: power-domain@MT6795_POWER_DOMAIN_MFG_ASYNC { + reg = ; + clocks = <&clk26m>; + clock-names = "mfg"; + #address-cells = <1>; + #size-cells = <0>; + #power-domain-cells = <1>; + + power-domain@MT6795_POWER_DOMAIN_MFG_2D { + reg = ; + #address-cells = <1>; + #size-cells = <0>; + #power-domain-cells = <1>; + + power-domain@MT6795_POWER_DOMAIN_MFG { + reg = ; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + }; + }; + }; + }; + pio: pinctrl@10005000 { compatible = "mediatek,mt6795-pinctrl"; reg = <0 0x10005000 0 0x1000>, <0 0x1000b000 0 0x1000>; From patchwork Mon Mar 27 08:36:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75299 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359154vqo; Mon, 27 Mar 2023 01:42:43 -0700 (PDT) X-Google-Smtp-Source: AKy350YDKS5eAQrixl6jjIowINO5ifSf8nDFOJBQVsHmT7QG4F9MiBNPjXTT1kVNFOC13MCj+eB2 X-Received: by 2002:aa7:9ec1:0:b0:62d:9037:b883 with SMTP id r1-20020aa79ec1000000b0062d9037b883mr380268pfq.6.1679906562680; Mon, 27 Mar 2023 01:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906562; cv=none; d=google.com; s=arc-20160816; b=DHzZuwGxUILwFACeTlYugO+qb/Up1N35JYNz2LjoEv9Bx9LFL7DpDF4Uf14fAOQiwy c2HLRzx+GHlQNX3FHI+zkVB1N9eHsdSgN03q/nwjDQA8yz50CN4lFqxGe+n2xw33rrSC zWRDgYTd/G8Wo9n99AzXbD94CbkZdoLdnqmFzyTNGJBGLPyPf3taNBgQgxXCgGnWo+vJ mO/HurtrOWOxuqTFep4r0VGSmg55Y2NmwKFJx92ZfR8awxH6rd7LigUzVrUBs/XU5fa6 QKunAbdHA2iA2qsHoMHa3UhH3jl29X8WpkqosHHJZrvIyLt0jx4Pxl8YQAzGQjiKNcAB 7lYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HuHyzYHHK7jD5g0ufGKKYvyqdSRKQE7oReNQzoANmo4=; b=Njkr17aQpsN0yAJHWcYHJl20ibEOj2aJMSq+CuFwENzypeDFJfoPkOlBTybfiGCkJW vGMXf8kGs8SLgYokkoPyk0pPQYYYuKLZNVbzWkVPniUi5gZE1Z+6y12wtXIuYHitgqUg 47qMbyZYTaC9nyNy9a57G0FL7JH2SkXKRTzHNITTrVsJnAzTYU9VLfVM4h0DPzndM78J 1HBU6OrTMpu5113EdCEVoEPd+MaC55vWncW4sGXoZoXz+D7TupmwHNe7K88T3+nsml02 kLtGScMCg17iyFIKif8tqWIwKBtJgjxfGO6EiQD2YflEOodqYC/SxGTc+K81IGwtanX/ PRpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fIEHiXZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020a63f24b000000b0050c03dc7252si28220696pgk.337.2023.03.27.01.42.30; Mon, 27 Mar 2023 01:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fIEHiXZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233144AbjC0Ilz (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233075AbjC0Ikf (ORCPT ); Mon, 27 Mar 2023 04:40:35 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D6B959C7; Mon, 27 Mar 2023 01:37:01 -0700 (PDT) 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 769D46601F5E; Mon, 27 Mar 2023 09:36:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906220; bh=HaNITDkgqx6TyF7HRryedLPulB/UedLpTKDEmNpvIoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fIEHiXZDgOsmz64IdaEZDv4yNCvMb7bJ7270jKbr0siJzfZXyrtgYVkpOyMBDKZyN sLOtNhs9ZfPdLWyeLPOTOQ6GYycgLJZ6Hs8tuJjLDfX6f0IOexrwY3g0CKijtp7EOK 4s7932JzpdqqYCvsvGgKzYKchmLnW0AfAJ+0B1XE/hnCkP44y48iH09QjcayfjdNMV 7eAPI4l0Qvi42rAFjG0MVfzA930JJfFK3mC8xPmp5ijcFXH2v5XOh2pD0OkHlCMEHY RdnoNcqqe25q0el/gm1+H+WettLm+UCzcdULuNjTpoxcXxi6qvdav+xONeBta5rpMR ujonlf37wbWpw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Krzysztof Kozlowski Subject: [PATCH v2 07/17] dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795 Date: Mon, 27 Mar 2023 10:36:37 +0200 Message-Id: <20230327083647.22017-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509704102517316?= X-GMAIL-MSGID: =?utf-8?q?1761509704102517316?= Add a compatible string for the MT6795 Helio X10 SoC using MT8173 binding and add a header for the MT6795's GCE mailbox. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski --- P.S.: Krzysztof, should have I removed your Reviewed-by tag here, or was retaining it the right choice? .../mailbox/mediatek,gce-mailbox.yaml | 20 +-- include/dt-bindings/gce/mediatek,mt6795-gce.h | 123 ++++++++++++++++++ 2 files changed, 135 insertions(+), 8 deletions(-) create mode 100644 include/dt-bindings/gce/mediatek,mt6795-gce.h diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml index d383b2ab3ce8..cef9d7601398 100644 --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml @@ -16,14 +16,18 @@ description: properties: compatible: - enum: - - mediatek,mt6779-gce - - mediatek,mt8173-gce - - mediatek,mt8183-gce - - mediatek,mt8186-gce - - mediatek,mt8188-gce - - mediatek,mt8192-gce - - mediatek,mt8195-gce + oneOf: + - enum: + - mediatek,mt6779-gce + - mediatek,mt8173-gce + - mediatek,mt8183-gce + - mediatek,mt8186-gce + - mediatek,mt8188-gce + - mediatek,mt8192-gce + - mediatek,mt8195-gce + - items: + - const: mediatek,mt6795-gce + - const: mediatek,mt8173-gce "#mbox-cells": const: 2 diff --git a/include/dt-bindings/gce/mediatek,mt6795-gce.h b/include/dt-bindings/gce/mediatek,mt6795-gce.h new file mode 100644 index 000000000000..97d5ba2d2b44 --- /dev/null +++ b/include/dt-bindings/gce/mediatek,mt6795-gce.h @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2023 Collabora Ltd. + * Author: AngeloGioacchino Del Regno + */ +#ifndef _DT_BINDINGS_GCE_MT6795_H +#define _DT_BINDINGS_GCE_MT6795_H + +/* GCE HW thread priority */ +#define CMDQ_THR_PRIO_LOWEST 0 +#define CMDQ_THR_PRIO_NORMAL 1 +#define CMDQ_THR_PRIO_NORMAL_2 2 +#define CMDQ_THR_PRIO_MEDIUM 3 +#define CMDQ_THR_PRIO_MEDIUM_2 4 +#define CMDQ_THR_PRIO_HIGH 5 +#define CMDQ_THR_PRIO_HIGHER 6 +#define CMDQ_THR_PRIO_HIGHEST 7 + +/* GCE SUBSYS */ +#define SUBSYS_1300XXXX 0 +#define SUBSYS_1400XXXX 1 +#define SUBSYS_1401XXXX 2 +#define SUBSYS_1402XXXX 3 +#define SUBSYS_1500XXXX 4 +#define SUBSYS_1600XXXX 5 +#define SUBSYS_1700XXXX 6 +#define SUBSYS_1800XXXX 7 +#define SUBSYS_1000XXXX 8 +#define SUBSYS_1001XXXX 9 +#define SUBSYS_1002XXXX 10 +#define SUBSYS_1003XXXX 11 +#define SUBSYS_1004XXXX 12 +#define SUBSYS_1005XXXX 13 +#define SUBSYS_1020XXXX 14 +#define SUBSYS_1021XXXX 15 +#define SUBSYS_1120XXXX 16 +#define SUBSYS_1121XXXX 17 +#define SUBSYS_1122XXXX 18 +#define SUBSYS_1123XXXX 19 +#define SUBSYS_1124XXXX 20 +#define SUBSYS_1125XXXX 21 +#define SUBSYS_1126XXXX 22 + +/* GCE HW EVENT */ +#define CMDQ_EVENT_MDP_RDMA0_SOF 0 +#define CMDQ_EVENT_MDP_RDMA1_SOF 1 +#define CMDQ_EVENT_MDP_DSI0_TE_SOF 2 +#define CMDQ_EVENT_MDP_DSI1_TE_SOF 3 +#define CMDQ_EVENT_MDP_MVW_SOF 4 +#define CMDQ_EVENT_MDP_TDSHP0_SOF 5 +#define CMDQ_EVENT_MDP_TDSHP1_SOF 6 +#define CMDQ_EVENT_MDP_WDMA_SOF 7 +#define CMDQ_EVENT_MDP_WROT0_SOF 8 +#define CMDQ_EVENT_MDP_WROT1_SOF 9 +#define CMDQ_EVENT_MDP_CROP_SOF 10 +#define CMDQ_EVENT_DISP_OVL0_SOF 11 +#define CMDQ_EVENT_DISP_OVL1_SOF 12 +#define CMDQ_EVENT_DISP_RDMA0_SOF 13 +#define CMDQ_EVENT_DISP_RDMA1_SOF 14 +#define CMDQ_EVENT_DISP_RDMA2_SOF 15 +#define CMDQ_EVENT_DISP_WDMA0_SOF 16 +#define CMDQ_EVENT_DISP_WDMA1_SOF 17 +#define CMDQ_EVENT_DISP_COLOR0_SOF 18 +#define CMDQ_EVENT_DISP_COLOR1_SOF 19 +#define CMDQ_EVENT_DISP_AAL_SOF 20 +#define CMDQ_EVENT_DISP_GAMMA_SOF 21 +#define CMDQ_EVENT_DISP_UFOE_SOF 22 +#define CMDQ_EVENT_DISP_PWM0_SOF 23 +#define CMDQ_EVENT_DISP_PWM1_SOF 24 +#define CMDQ_EVENT_DISP_OD_SOF 25 +#define CMDQ_EVENT_MDP_RDMA0_EOF 26 +#define CMDQ_EVENT_MDP_RDMA1_EOF 27 +#define CMDQ_EVENT_MDP_RSZ0_EOF 28 +#define CMDQ_EVENT_MDP_RSZ1_EOF 29 +#define CMDQ_EVENT_MDP_RSZ2_EOF 30 +#define CMDQ_EVENT_MDP_TDSHP0_EOF 31 +#define CMDQ_EVENT_MDP_TDSHP1_EOF 32 +#define CMDQ_EVENT_MDP_WDMA_EOF 33 +#define CMDQ_EVENT_MDP_WROT0_WRITE_EOF 34 +#define CMDQ_EVENT_MDP_WROT0_READ_EOF 35 +#define CMDQ_EVENT_MDP_WROT1_WRITE_EOF 36 +#define CMDQ_EVENT_MDP_WROT1_READ_EOF 37 +#define CMDQ_EVENT_MDP_CROP_EOF 38 +#define CMDQ_EVENT_DISP_OVL0_EOF 39 +#define CMDQ_EVENT_DISP_OVL1_EOF 40 +#define CMDQ_EVENT_DISP_RDMA0_EOF 41 +#define CMDQ_EVENT_DISP_RDMA1_EOF 42 +#define CMDQ_EVENT_DISP_RDMA2_EOF 43 +#define CMDQ_EVENT_DISP_WDMA0_EOF 44 +#define CMDQ_EVENT_DISP_WDMA1_EOF 45 +#define CMDQ_EVENT_DISP_COLOR0_EOF 46 +#define CMDQ_EVENT_DISP_COLOR1_EOF 47 +#define CMDQ_EVENT_DISP_AAL_EOF 48 +#define CMDQ_EVENT_DISP_GAMMA_EOF 49 +#define CMDQ_EVENT_DISP_UFOE_EOF 50 +#define CMDQ_EVENT_DISP_DPI0_EOF 51 +#define CMDQ_EVENT_MUTEX0_STREAM_EOF 52 +#define CMDQ_EVENT_MUTEX1_STREAM_EOF 53 +#define CMDQ_EVENT_MUTEX2_STREAM_EOF 54 +#define CMDQ_EVENT_MUTEX3_STREAM_EOF 55 +#define CMDQ_EVENT_MUTEX4_STREAM_EOF 56 +#define CMDQ_EVENT_MUTEX5_STREAM_EOF 57 +#define CMDQ_EVENT_MUTEX6_STREAM_EOF 58 +#define CMDQ_EVENT_MUTEX7_STREAM_EOF 59 +#define CMDQ_EVENT_MUTEX8_STREAM_EOF 60 +#define CMDQ_EVENT_MUTEX9_STREAM_EOF 61 +#define CMDQ_EVENT_DISP_RDMA0_UNDERRUN 62 +#define CMDQ_EVENT_DISP_RDMA1_UNDERRUN 63 +#define CMDQ_EVENT_DISP_RDMA2_UNDERRUN 64 +#define CMDQ_EVENT_ISP_PASS2_2_EOF 129 +#define CMDQ_EVENT_ISP_PASS2_1_EOF 130 +#define CMDQ_EVENT_ISP_PASS2_0_EOF 131 +#define CMDQ_EVENT_ISP_PASS1_1_EOF 132 +#define CMDQ_EVENT_ISP_PASS1_0_EOF 133 +#define CMDQ_EVENT_CAMSV_2_PASS1_EOF 134 +#define CMDQ_EVENT_CAMSV_1_PASS1_EOF 135 +#define CMDQ_EVENT_SENINF_CAM1_2_3_FIFO_FULL 136 +#define CMDQ_EVENT_SENINF_CAM0_FIFO_FULL 137 +#define CMDQ_EVENT_JPGENC_PASS2_EOF 257 +#define CMDQ_EVENT_JPGENC_PASS1_EOF 258 +#define CMDQ_EVENT_JPGDEC_EOF 259 + +#endif From patchwork Mon Mar 27 08:36:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75298 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359123vqo; Mon, 27 Mar 2023 01:42:39 -0700 (PDT) X-Google-Smtp-Source: AK7set9YwUYdb8sJQLNl73/CbwbnOfAq6YFHi35ElQeZfE8EppWmsr1or3F5kUu1zUycklA1wMTn X-Received: by 2002:a05:6a20:30ca:b0:db:6d42:118b with SMTP id 10-20020a056a2030ca00b000db6d42118bmr11045051pzo.0.1679906558892; Mon, 27 Mar 2023 01:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906558; cv=none; d=google.com; s=arc-20160816; b=YyHU0EVO1rfhss6Wonw/2UwMydt42mmr8AkHsLL4p9Kj3wS+V5vYYICeNoyHf/XyeE xchlZAZQjfuhjxGxuZnN40v35RJaUEKT5mSVMK3lXD1WAGR+Ip5/LzSrHK6HqeUJQqcQ ANX6v8ACx72IfUT6Z7BvdTrZHLcuxV0RhgOK+de2IDYQ+EylARf2Oa2/TJrxRWEVeM1H OGxVxTJqsmmZHCL5NsSWZ9vNAMph9D8nCEdeRxUU292FhvFSW+rWlSZMJjvTYP76bgFn pNNPDU4QL0J1LYgJ3yn1l3DoAPgNxMoGecdokQAjAxjuHn8dcbcTwxnCX/MOcdlQwpc0 mmYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ko1tkIvljQ+hiNqM+fv8WaKuqu0yP4amrfOkT2qbZqU=; b=MA96+oiH3S6N3hRBHFDViCIuqBnRCN5GHvMiMICsfgw6ID6JqHQ0LZ5Sr5wBwJeKLc xnH0/ckFwuwsv5d3OEN/5aVb19kJ++6WO6jfj1vrvIAfAzuqbma4HbEmwwR+mSIcVtul 0wpMsYGRuNjfSr67Fw8bE95v0Y3GaTXJH3CyDRCqRzHll/mUDc2n9O1ROuRCqmKMtLrg e6XdfyYBLI9aXLH7/J9ig5ZhybpDEebC9gsLqay7Tiy7J7hzqIYaUBkWb3AORmdBOnaU DMKY2rMV2BzFvcirOHOjaPv/w/p8MWoWm421D7vHbFiBWNhryfp0DPnfPW6B0PH5SNW8 metQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LqqVfRXW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020a056a000b8400b0062877f63945si13238608pfj.1.2023.03.27.01.42.25; Mon, 27 Mar 2023 01:42:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LqqVfRXW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233300AbjC0Ilv (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233144AbjC0Ikf (ORCPT ); Mon, 27 Mar 2023 04:40:35 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C32D3C28; Mon, 27 Mar 2023 01:37:02 -0700 (PDT) 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 733E16603100; Mon, 27 Mar 2023 09:37:00 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906221; bh=zcA2d+WMjPM5RJNJ1o3VT548PHPHu4fUWaFnh1gs35U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LqqVfRXWiGbwWVy4dCj4KzTJgQmPL2YNkUedhvL6yqJM/vjCGym1kAdZFjxQwh2G8 ApWk7RN1V8sFjqlg8fnMyb1y/vmyiNSfY+bq4MavndbOPTr2IOl5afpajBCgB0tnm5 Z9AI/0qLaC92dywDh2SGdoukJlLEYZJhCI9NvAJweLXtlzBaF/sXp5e7KJ9zLmi7K0 Ls8lZp38/6R1Gozz2VwrEOGdvyDx2e59Oam1GV2pN0MqV4PzHSpT7+6ZGgn7+mZrU/ qQRuQnPw4MHAIQ0krN4lpt8brQO0dxLyhJ0d/Q/nSfq3FSGNNcyW2OVd9HCOG3ojSZ PaUVRt8nHEmkQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 08/17] arm64: dts: mediatek: mt6795: Add support for the CMDQ/GCE mailbox Date: Mon, 27 Mar 2023 10:36:38 +0200 Message-Id: <20230327083647.22017-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509699502196445?= X-GMAIL-MSGID: =?utf-8?q?1761509699502196445?= In preparation for adding multimedia blocks, add the CMDQ/GCE mailbox. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index d63efb32e6bb..0f903e8fe70f 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -401,6 +402,15 @@ fhctl: clock-controller@10209f00 { status = "disabled"; }; + gce: mailbox@10212000 { + compatible = "mediatek,mt6795-gce", "mediatek,mt8173-gce"; + reg = <0 0x10212000 0 0x1000>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_GCE>; + clock-names = "gce"; + #mbox-cells = <2>; + }; + gic: interrupt-controller@10221000 { compatible = "arm,gic-400"; #interrupt-cells = <3>; From patchwork Mon Mar 27 08:36:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359091vqo; Mon, 27 Mar 2023 01:42:35 -0700 (PDT) X-Google-Smtp-Source: AK7set/FzC64YliB3DNL0F1mhjeVNP/9erHaY8UYYG3e7J8PgWz4yQiJnGhF2V7mAfxOTwoIhob3 X-Received: by 2002:a05:6a20:4a03:b0:da:8ee4:5b9 with SMTP id fr3-20020a056a204a0300b000da8ee405b9mr10994252pzb.7.1679906555220; Mon, 27 Mar 2023 01:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906555; cv=none; d=google.com; s=arc-20160816; b=c6BpnoVJMmiUEAEr19+NvqYCn43kwxQ+WVTBl0viBghVbZETvxUwlyW2lblbJXL5aY QRoKKWMjXzPM4WiV18903SD0xTdEgfgbYOvdlCv74ICPAcSAEsqYeQj/ckICW6tgNd4b jlIHt3NeVwz+4WV6DhALuwzZzNpPJA4y7CPS7cmsAaVc/tzbqROYYpLgatBwoNz39S91 mSNI6XrxlTlp1sRtP+s3vv9gHrHIMNFDfZcQZ1cLldFalMfsu2df6MJiJALSD4avp2lT AsGQ9jvViTDAc3muxi3kS2BE0o8Ll1/XGWlVoVfhiCD0DzUcStNtNDuUGrP26dODLc44 qTuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gCQ+MygXunT7oGDuwwdnzm3V02skdS96iMOBpF606CE=; b=RPaRZ9/Swaf9n6o1d49mPVek+o5oIOShykLP1+eEcg0uLKkhGYfWB0EZtFLWSSq+U4 J5Gu2aXu81P6zPLBp9S9JzfN0bsVeSYUgcPA0uWpE7lo5NNbbGZpzJNr6WpHQ98cNj60 sx8Iu27UFAFm7oIWOk7Knbf0IdBQD5IO3c0C1nnti190276z+tfQtdRlekfIj/Ln+73N grI+i7Ki8qCFYL8k1uyR9k/jQmmoaCN3nS+54w1PYwku/Ao61/OaSti4P0fGqmxGmfBZ OwDXJfBaIu0dmw+6ibV8r7xmiUryY+w8vle8s8fXNvTh7pN8Cttbf7cPJ5FkGBTblZIc EV1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Vpeh3mTA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a056a00245100b00628030da823si18351333pfj.318.2023.03.27.01.42.22; Mon, 27 Mar 2023 01:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Vpeh3mTA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233020AbjC0Iln (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232307AbjC0Ikg (ORCPT ); Mon, 27 Mar 2023 04:40:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EAF34C0B; Mon, 27 Mar 2023 01:37:03 -0700 (PDT) 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 65F93660312B; Mon, 27 Mar 2023 09:37:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906222; bh=B7Q7CvpVnU7TsRYDdxFDdSefgx35z35TKL9n9ACkUg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vpeh3mTAKR3/91/MvTtBXsgMh3DpUAZnX4a9ErZJJZEWJ5RYbglwR/M6/RHj0MAKR J2gi5nWNqGdAZ7DKXhNK+opYgVdl3dgzkN7Vz0NZ7Se1RMuAW2jXISS3XDXq5bS4LS 4oqG59B/WrFiXxUEOlpfKfuuq/RzpJdEFUQvEI0cwtnabHnlFDnLa3iMygQKFuWLdw vnwBkmB1LaRnb1G+Ciri9qCfrJCnN7onhRih4dQzR7209Dd1MrZIs8DvnqBI4eDQfQ tQJnZTjm/9KoYJGFZ5X9O9LmsQApAgHjOI7s2tmJWepG2u3JlR+CBKm/PEFRs0gE0E lGUPQhIuuhYQg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 09/17] arm64: dts: mediatek: mt6795: Add MMSYS node for multimedia clocks Date: Mon, 27 Mar 2023 10:36:39 +0200 Message-Id: <20230327083647.22017-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509696021331708?= X-GMAIL-MSGID: =?utf-8?q?1761509696021331708?= Add the MultiMedia System node, providing clocks for the multimedia hardware blocks and their IOMMU/SMIs. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index 0f903e8fe70f..b721971d4e5e 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -634,5 +634,18 @@ mmc3: mmc@11260000 { clock-names = "source", "hclk"; status = "disabled"; }; + + mmsys: syscon@14000000 { + compatible = "mediatek,mt6795-mmsys", "syscon"; + reg = <0 0x14000000 0 0x1000>; + power-domains = <&spm MT6795_POWER_DOMAIN_MM>; + assigned-clocks = <&topckgen CLK_TOP_MM_SEL>; + assigned-clock-rates = <400000000>; + #clock-cells = <1>; + #reset-cells = <1>; + mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>, + <&gce 1 CMDQ_THR_PRIO_HIGHEST>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>; + }; }; }; From patchwork Mon Mar 27 08:36:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75311 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1367965vqo; Mon, 27 Mar 2023 02:03:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZEZt8g2guhNFDA6q31HGW6M9COkr+nCMDsF8WyIXW68H9Bgozkl/1Tec8lBFJJwg8PCwRA X-Received: by 2002:a17:906:3a43:b0:932:aa80:406 with SMTP id a3-20020a1709063a4300b00932aa800406mr13103113ejf.32.1679907826744; Mon, 27 Mar 2023 02:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679907826; cv=none; d=google.com; s=arc-20160816; b=g6yjwC89D7Zo/ihlhw7Pw2QehRcQpf0XKWfLwtW21AoBTUiIWmKPtURQgtRT9uv/ow vYu2Q2yPIivh8U28vCNzMP7m3/TWG5wrCXG2URC+740g/9uL1JFqroBCoCa6UvW/7dtU uw3cp6y+61SRK6uRChgihdd8wEtYEpWxrAje9zBH7VkSvg6cFNss5TQVjjuLkfOR1yG8 Y/GZLvQj4HXUKYfxiTRTpt766hQIlA6D/h63XIJ4EAddaPwtMdwvyS8YhX4oD792mkRG CF8/6WcssxHDQBRkHqUhneCwc0s7sr4HkJd6latLnqflZQOksLSYq4jy6cVOOZOpa0CG Pjfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=et9IXXnwuJj8gBw2w84nxQj+qW6lVRl9tm6flakAp/I=; b=zs86UokBfmG/IDse7Fql142lUYfp55KLQXbo3TarSx3r8D5hzXtnP+nAhT/Gww8W0Y mI6de5SJaSiyczYmcn+tGd7CaWaUqtSOctgc6L2oIpFLQl17ZU7vwBE4Ry+P1AcIEVem sD/9+qw7zF05fBqhIZrq6OePJbLiCBlkr6aWtaxEqel80BWJDStc5v+VF5X/HB+HMwgr SoUV0vYFzyK5YsvGAeDapKc3d5WLvArNfshymX65iW3Y56Pp8VHIBz2czGqv7miqU56O R9KC2hgmzB/TaEZolJFrPEOSJ3SlPmGJjmn8QESRAiDy+shbFQej2Pimly0BMprL/a7l hLAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="oT4am/2r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm27-20020a0564020b1b00b004fb37cc47bdsi28757547edb.118.2023.03.27.02.03.21; Mon, 27 Mar 2023 02:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="oT4am/2r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233109AbjC0Ilf (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232508AbjC0Ikg (ORCPT ); Mon, 27 Mar 2023 04:40:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4872688; Mon, 27 Mar 2023 01:37:04 -0700 (PDT) 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 5601D6602087; Mon, 27 Mar 2023 09:37:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906223; bh=klZ1wIb0qi8AUCKdFQaQFYLZ3ZlhvULeIjT368zNwRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oT4am/2rygp9oD0xzETCoBVYy3dYoaJvHb6Xp0G2YKpVtk28BAxPqwiPBXIKdBHCD ImqbXMpYnR8h973p2LoGosh8Z1hYNRIqTM/lZo75wOxVtD+DW78CjsRs4QlzWnaLPf zCAc8qkeumH3mCHnOZKhBSpMMqEtKnbOi1+Zc03RK8dgfOHzVzLDdkA1Wd/nECHfrJ 8xKcVuLKJrRxb9tBVkfAvaZklR/eLETcY2mi8WO1ghcxrEZYxdfYbVxOT8JB39Wv0F VES4JXfo7J5jJcAaW/LjeNpFieTvrHRipea7vVsbYqXP+BjFhxn3IkH0PopNptWil1 G0mJewBE28nQg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 10/17] arm64: dts: mediatek: mt6795: Add VDECSYS and VENCSYS clocks Date: Mon, 27 Mar 2023 10:36:40 +0200 Message-Id: <20230327083647.22017-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761511029672839927?= X-GMAIL-MSGID: =?utf-8?q?1761511029672839927?= In prepration for adding the IOMMUs and LARBs of this SoC, add the VDECSYS and VENCSYS clock controller nodes, providing clocks for the vcodec stateful decoder and stateful decoder hardware. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index b721971d4e5e..a8b2c4517e79 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -647,5 +647,17 @@ mmsys: syscon@14000000 { <&gce 1 CMDQ_THR_PRIO_HIGHEST>; mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>; }; + + vdecsys: clock-controller@16000000 { + compatible = "mediatek,mt6795-vdecsys"; + reg = <0 0x16000000 0 0x1000>; + #clock-cells = <1>; + }; + + vencsys: clock-controller@18000000 { + compatible = "mediatek,mt6795-vencsys"; + reg = <0 0x18000000 0 0x1000>; + #clock-cells = <1>; + }; }; }; From patchwork Mon Mar 27 08:36:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75313 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1369131vqo; Mon, 27 Mar 2023 02:06:05 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+VSwUnercwsUZYj0UycO29XNkIRckABlqybo9kZ4lWMpVyEbTCF/etMCImVd282kOWes3 X-Received: by 2002:a17:906:738a:b0:92f:bef6:7843 with SMTP id f10-20020a170906738a00b0092fbef67843mr10382878ejl.22.1679907964953; Mon, 27 Mar 2023 02:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679907964; cv=none; d=google.com; s=arc-20160816; b=i6S4jmMZDiUzpo9ccwK20uueaEwt6mfSXcwzQ0C1jdItk44vs9eWemTHsYf8O2reQy 3kP6oxwPSrdzmfJTe2x3bYWj8P2e7mhpz67Qmji5/3PxvG9YOEduOnVGiSsRnuym2qvN 6P4xKExEDioSmVq/g11eO37VjRwBI/qoa8rLwaDqL+oZi2pEPEOqHZh6TmIbRAhGroO3 kjoXHL28bLRDFek90pSzLJTfqqxrJvflrCRhBRf43L44MbCBfZ8BYymg8fZ/xo4Tb911 QRfZ/+xaG+y+aM3S97xi++NHuXMAPX1PHymkJQKWXuemYq3/dy+8UxvNpMBvJz3qAUOg hEZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NOqreX7XF8DKvjr7/VqipD5E1R/31uSR58zGdE5OIT0=; b=xU7BhRqJfSB+xdvDpGGmQXB4xOlwSoVCuV6aXzz69Azp5zE2pAkh5twJ9K/IC2/YXl vJg7HuJRD7wizG2Hw+hbB5lYUjt2sdlafkXSSWyHTiseoAofmoPBt85OGgwnNS6udk2s yR2huNvmxwQnaAwjOnQ7Nvl2CqEkN+lKKeKWdqsgFlUyMm2j4opHlhZZBEBMI3+DLocr 71wAOTF0gDQbOV6tYU+xOL/69iNaJa3gN66B4I8YoFqqbTStok5SAmBuao9morDFdeK/ BII/WIWhrkUhaJQY9uXiNhn10Hw4xZheHfXaLTb3jv9TQnNNiH2tAKk380RWrogi7p2O j4Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Wk0z7cSA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qm11-20020a170907674b00b00926628cc2f3si27275380ejc.853.2023.03.27.02.05.41; Mon, 27 Mar 2023 02:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Wk0z7cSA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233160AbjC0Ili (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233115AbjC0Ikg (ORCPT ); Mon, 27 Mar 2023 04:40:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EBDF59E0; Mon, 27 Mar 2023 01:37:05 -0700 (PDT) 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 4A808660308B; Mon, 27 Mar 2023 09:37:03 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906224; bh=torr26qWRhLp7GlQbJK2hxugth9DFBivC+4DPBvc1uc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wk0z7cSA+5QH6UO0SEtwj5YV+Q6ghHgeIvbWzRnlrSRVgFuCoA7Jb9SylJQdrTpnX ywbaUylFeF0dTGp5h6RGvzQsR0qj7eo/CHNDszdhZrhVC4Y2noSuOA6InfrTnGIX7h EsoP0ivO2rk42ZBBi0mIJc5ixiUnUxjafIGrxdmPTZ6QesDwJ3J8DB96+CGJo53jEA JksamVJlgMJDbQsnjJMk1njEbDqGsyyAfbYVoZS5PncSU+QZGOG8C7KEq+KKAomlMF fAh2w8keakcSz3ifevBsAs3zBsD17rOoTasMfxyeR/WAMsOBTbp0W00PWaAI62Gz7a UbASQolZxo8Vw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 11/17] arm64: dts: mediatek: mt6795: Add support for IOMMU and LARBs Date: Mon, 27 Mar 2023 10:36:41 +0200 Message-Id: <20230327083647.22017-12-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761511174579383254?= X-GMAIL-MSGID: =?utf-8?q?1761511174579383254?= Add nodes for the multimedia IOMMU and its LARBs: this includes all but the MJC LARB, which cannot currently be used and will be added later. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi index a8b2c4517e79..a580ddb51a0e 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -390,6 +390,17 @@ systimer: timer@10200670 { clock-names = "clk13m"; }; + iommu: iommu@10205000 { + compatible = "mediatek,mt6795-m4u"; + reg = <0 0x10205000 0 0x1000>; + clocks = <&infracfg CLK_INFRA_M4U>; + clock-names = "bclk"; + interrupts = ; + mediatek,larbs = <&larb0 &larb1 &larb2 &larb3>; + power-domains = <&spm MT6795_POWER_DOMAIN_MM>; + #iommu-cells = <1>; + }; + apmixedsys: syscon@10209000 { compatible = "mediatek,mt6795-apmixedsys", "syscon"; reg = <0 0x10209000 0 0x1000>; @@ -648,16 +659,64 @@ mmsys: syscon@14000000 { mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>; }; + larb0: larb@14021000 { + compatible = "mediatek,mt6795-smi-larb"; + reg = <0 0x14021000 0 0x1000>; + clocks = <&mmsys CLK_MM_SMI_COMMON>, <&mmsys CLK_MM_SMI_LARB0>; + clock-names = "apb", "smi"; + mediatek,smi = <&smi_common>; + mediatek,larb-id = <0>; + power-domains = <&spm MT6795_POWER_DOMAIN_MM>; + }; + + smi_common: smi@14022000 { + compatible = "mediatek,mt6795-smi-common"; + reg = <0 0x14022000 0 0x1000>; + power-domains = <&spm MT6795_POWER_DOMAIN_MM>; + clocks = <&infracfg CLK_INFRA_SMI>, <&mmsys CLK_MM_SMI_COMMON>; + clock-names = "apb", "smi"; + }; + + larb2: larb@15001000 { + compatible = "mediatek,mt6795-smi-larb"; + reg = <0 0x15001000 0 0x1000>; + clocks = <&mmsys CLK_MM_SMI_COMMON>, <&infracfg CLK_INFRA_SMI>; + clock-names = "apb", "smi"; + mediatek,smi = <&smi_common>; + mediatek,larb-id = <2>; + power-domains = <&spm MT6795_POWER_DOMAIN_ISP>; + }; + vdecsys: clock-controller@16000000 { compatible = "mediatek,mt6795-vdecsys"; reg = <0 0x16000000 0 0x1000>; #clock-cells = <1>; }; + larb1: larb@16010000 { + compatible = "mediatek,mt6795-smi-larb"; + reg = <0 0x16010000 0 0x1000>; + mediatek,smi = <&smi_common>; + mediatek,larb-id = <1>; + clocks = <&vdecsys CLK_VDEC_CKEN>, <&vdecsys CLK_VDEC_LARB_CKEN>; + clock-names = "apb", "smi"; + power-domains = <&spm MT6795_POWER_DOMAIN_VDEC>; + }; + vencsys: clock-controller@18000000 { compatible = "mediatek,mt6795-vencsys"; reg = <0 0x18000000 0 0x1000>; #clock-cells = <1>; }; + + larb3: larb@18001000 { + compatible = "mediatek,mt6795-smi-larb"; + reg = <0 0x18001000 0 0x1000>; + clocks = <&vencsys CLK_VENC_VENC>, <&vencsys CLK_VENC_LARB>; + clock-names = "apb", "smi"; + mediatek,smi = <&smi_common>; + mediatek,larb-id = <3>; + power-domains = <&spm MT6795_POWER_DOMAIN_VENC>; + }; }; }; From patchwork Mon Mar 27 08:36:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75308 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359504vqo; Mon, 27 Mar 2023 01:43:31 -0700 (PDT) X-Google-Smtp-Source: AKy350aKc8gULtgZIvjjzLizxeUVZW7tPuFVwmkzsoK7LW3+DSeGm54vMVjYAGtw2rFqLZMPIG9l X-Received: by 2002:aa7:9ece:0:b0:627:f9ac:8a31 with SMTP id r14-20020aa79ece000000b00627f9ac8a31mr10373692pfq.2.1679906611699; Mon, 27 Mar 2023 01:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906611; cv=none; d=google.com; s=arc-20160816; b=X0X98I17MQMUg/omcSROLsi10IowB1kKi8C8xG9r8CcXYDw30I+naH5/NyqbA5AgjE UeGI45cSE9bfjhtMVy+DrFKBgiJRQGJscZOpttns0zR04ry382UiCuyFNz1m4SM2rXa4 IuFOJB89xUzTbK5cTxX3KfEXmOA02RgaaXfDcNF2Hz43BzkQZET2HhRNG2KbjeNV9sV9 qqu6BYqiQf3pe0lJ4E+aQJ4NwaDr/k8/zBMWC1KKuOIlM8NLKZ9Nwqq7R03cGUlBFUpT Yff6KM+GhexBXk1266qC/vNexCFB3VvzcJN4YktplXECUJvoXI650n9PrjSX2x5nnPtg Y4ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VqwlyrcWthPgDj5Mlnz71SSD/KhEZCHWRkRhnh/1Jgg=; b=RXDfqAopIEc905pE9JVtRIhw/h7mljApB+nvLqu6TfpPAxlqj6Tb8zPO215ka6LwqD FFaC0jjXj30o8tojvUHeKwtpNIhmxaiuiGg0fHOPHJzP4mwmhvvadq2KgVfnSsGso+cE EypWpeZ+JvvxE2fAqs2wa7NE9YbzG5f/IYFEcWI5plr2bhr5HRck8lsVqGQiBhsgsJtC d2uxknffFv84gUlno1+l0yp6fqGGSiI5jz5OcG6gNANrXYxkGw+QwmElp7YDLoMSZGKq tN+TGpvLdBsMxgIjIOd/2FOeo02vEheeteEC6Z4xh1pjsOsdLH8Ki2SPNWINuFJmX1DJ khMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Z0UUfqMf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z24-20020a63e118000000b004fc21da0340si24848404pgh.129.2023.03.27.01.43.19; Mon, 27 Mar 2023 01:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Z0UUfqMf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233046AbjC0Ilc (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233149AbjC0Ikg (ORCPT ); Mon, 27 Mar 2023 04:40:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BE4A49F0; Mon, 27 Mar 2023 01:37:06 -0700 (PDT) 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 4126E66030B4; Mon, 27 Mar 2023 09:37:04 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906225; bh=cWKkAzJmflHlylToMK1QImQEca35moH/Qy5BEXPVfYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z0UUfqMfoH2RhoduOVgrRDM1Gjd3a65hdZZrGOBTM6XPqU034WH+nbMMNJl0PtODg qQO2ldujlqsVGsrQyk1BCZZp0nh5wjf7P4SS1IYZYp13EKhvLu6U4Jsd2xT7ZNGfnI LAkicKM0eIKxgz0VShN4SWv9DVPWJr0fF+UWQWrqj75z/Ore7+Uin3tPvPmiwmduNf gRSZWHeqwqXjxy7UcHxfLtYRBRGz6ZRMIx0UBB3x8KndOsfkDZwSaFxDkwB3I6hEw5 k3qp/sX+xpaoLHytlr6VdfDlOyoT/qP5cJtOiC3rPfXY2VLFuEXo/BRmfB+yNs2kz7 cC3redVmyKFOg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 12/17] arm64: dts: mediatek: mt6795-xperia-m5: Enable I2C 0-3 busses Date: Mon, 27 Mar 2023 10:36:42 +0200 Message-Id: <20230327083647.22017-13-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509755034205956?= X-GMAIL-MSGID: =?utf-8?q?1761509755034205956?= Properly configure and enable the three i2c controllers that have devices attached on the Sony Xperia M5 smartphone. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt6795-sony-xperia-m5.dts | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index 52ce3284a46f..6df1c848e2d5 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -55,7 +55,71 @@ &fhctl { status = "okay"; }; +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + status = "okay"; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + status = "okay"; +}; + &pio { + i2c0_pins: i2c0-pins { + pins-bus { + pinmux = , + ; + input-enable; + }; + }; + + i2c1_pins: i2c1-pins { + pins-bus { + pinmux = , + ; + bias-disable; + }; + }; + + i2c2_pins: i2c2-pins { + pins-bus { + pinmux = , + ; + bias-disable; + }; + }; + + i2c3_pins: i2c3-pins { + pins-bus { + pinmux = , + ; + bias-disable; + }; + }; + + i2c4_pins: i2c4-pins { + pins-bus { + pinmux = , + ; + bias-disable; + }; + }; + uart0_pins: uart0-pins { pins-rx { pinmux = ; From patchwork Mon Mar 27 08:36:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1360026vqo; Mon, 27 Mar 2023 01:44:55 -0700 (PDT) X-Google-Smtp-Source: AKy350b2ccdaf3Ni3jRd+MlM9S4HRtE/GkO8wH6rY76v+VqEOTuvPBP+IBfbbBO8bA189wogXVZ+ X-Received: by 2002:a05:6402:5178:b0:4fa:57bf:141a with SMTP id d24-20020a056402517800b004fa57bf141amr12934632ede.32.1679906695178; Mon, 27 Mar 2023 01:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906695; cv=none; d=google.com; s=arc-20160816; b=EnzbEUFwaCLrVhH6na6nUJgf7cOzJnOsKhcblIJt6tmt3Aa673OU/dEIHEKk9O7g7/ tB7AwHlUpIMYjNuyZ4O+Jo7LkjUyuNGgBQgLFq7Ka+11v07uhmmF+Og6oCSVyb9yASVS SJXuPR7tPZjWwlr5AVKhawqeC8Fl4teeHYtU/yJZz1y39cHDJe6v4x93Bhe6HMnJQcvU TdwScIxRpmQNqEzt9sTRuj6qazS1ECdacMsqQVfEazWofsGgBFqf8vMgoUpMUJhjSsPm 58W/4Qy2tXG+IPY0HNS354gkGOo+m33W+VX8ZO11kkFTvh2RoiLv1IwwIcBqiTk/t0Ft twdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SZWEWgV9KWorwzy5WyRu1cE1MVCUr2d2V/ImhIwrHg0=; b=Fhx4zF7jz6F8DyEomCcawAD3tBXT4oR2BGl3y04y3PYzIUcqV6+PrA7UwcEdS2FL9O Ryfcn9RmzWfd1kcxofKF7UipL7DbSAkFBvAXw0CSuYgI1GQZWrvCksPzHL/QOrOIzSh8 PMGi7CsNhoer9bkXQuyWcgh91xsbpUmMC2X9GjsihuPBqq+LwaGq3G5zvCbSt6KkbPwW anwcT6MMWTo5y+E/MnRJPOYeMCLjuR053KlIbSzF0S7uhJ2iB5o4MkBhzDvPD5F77dPA YFkR2QnwcWe059uDZgTXe/8rbdxJiaAX1zpbVj8OXwk0tdK/SVnmXdGPK2JKlDxdE6tl 1xKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=FAw0Fkcv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a50ee91000000b004c0b7e61b21si6106554edr.365.2023.03.27.01.44.31; Mon, 27 Mar 2023 01:44:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=FAw0Fkcv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbjC0Ila (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233157AbjC0Ikg (ORCPT ); Mon, 27 Mar 2023 04:40:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14088659F; Mon, 27 Mar 2023 01:37:07 -0700 (PDT) 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 2E5A366030DD; Mon, 27 Mar 2023 09:37:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906226; bh=Hpg+2kX8cSdZxnfmoRo906qfV2RYRZo5yI+72ONjdQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FAw0FkcvKRQq7SxMAUHNCsdj/Xi9VXqhIMNLXbL0I1aMoIQFFEu4oH8lXmvdGpTOq N3bIawz0SMfPVyzPYWB1kQBMhciex90bwii9r46fjeG1F2ZNhM0oRB6ZBYrWryEKY/ YA9yE3PcNqfKoA7kiNt47TLoxHieCsgUmQ02TIwbsKV5iE3PY9iyZNvF0AdzdLvnZm jyMyM8vUb2UYMaqMkvQatG7STuhbjGKn2R9cDTsP2pJhcdW6ebr+YZhA8tWZUXtYpR Hubnz2bE97PUqE+Wcsh4FZxZnPVJNDQJmjJtFuJ8RisAdlae/WV/3u/9KbDY8EuwWE CwAw97wTtXPzw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 13/17] arm64: dts: mediatek: mt6795-xperia-m5: Add Synaptics RMI4 Touchscreen Date: Mon, 27 Mar 2023 10:36:43 +0200 Message-Id: <20230327083647.22017-14-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509842655119029?= X-GMAIL-MSGID: =?utf-8?q?1761509842655119029?= Add the RMI4 Touchscreen on I2C2 and its pin definitions. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt6795-sony-xperia-m5.dts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index 6df1c848e2d5..edab90f06a24 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -71,6 +71,28 @@ &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins>; status = "okay"; + + touchscreen@20 { + compatible = "syna,rmi4-i2c"; + reg = <0x20>; + #address-cells = <1>; + #size-cells = <0>; + interrupts-extended = <&pio 6 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&ts_pins>; + syna,startup-delay-ms = <160>; + syna,reset-delay-ms = <90>; + + rmi4-f01@1 { + reg = <0x1>; + syna,nosleep-mode = <1>; + }; + + rmi4-f12@12 { + reg = <0x12>; + syna,sensor-type = <1>; + }; + }; }; &i2c3 { @@ -80,6 +102,19 @@ &i2c3 { }; &pio { + ts_pins: touchscreen-pins { + pins-irq { + pinmux = ; + bias-pull-up; + input-enable; + }; + + pins-rst { + pinmux = ; + output-high; + }; + }; + i2c0_pins: i2c0-pins { pins-bus { pinmux = , From patchwork Mon Mar 27 08:36:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1368840vqo; Mon, 27 Mar 2023 02:05:28 -0700 (PDT) X-Google-Smtp-Source: AK7set88RrEAYygpSINvQe9PlaPXugZLfVRLngqGWeLbpfc3aPv11uF2imI8VC7T5TEytZBcY5TR X-Received: by 2002:a17:906:24cb:b0:930:8590:95ef with SMTP id f11-20020a17090624cb00b00930859095efmr18229755ejb.18.1679907928007; Mon, 27 Mar 2023 02:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679907927; cv=none; d=google.com; s=arc-20160816; b=NdjbXRHCRZmJlXw+XKL3vILgEiuvjhvYU3wt/y54LJwnGyRL4XUiDQNfAKzXkamvOc jr0YIuXIYPXwRO6qVIt1F1WulXpOf+5NiekrGA0UtA1O/3mAxXZyPZS6Yd0Bc0YaTy6u p/A4u8+OlWfCbODD2Q9COl1LROtszqnqBHaRWFemxiNTo4HbCx4rSW7IJAC1BuJA7URx XUxuhkXv8Mxgc4fjrObjAmlyt+sQfRQweg4J0YEPnci6eZypQ1wKqpYwSqoloBbS+iMw bLyeDC8A6W4u3iGTZt3ahw/eZAOY2WD/BJhYH/+Q4tnaZzczt11qj1yFHKqNCM9ULJ2h 7XIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yHxr1lWW4/hZtKoDo+ymZ6Halxk36is2h5OEVuaDMrE=; b=y29upUJLDLwHuZ4E5otskJuLzpNdVdGkluExj6aGaOirggEqSif/mrpOYLTt4KxM6N BKN7vnOx8vImDsU7SQdingSIegtoLHOOt6o71lPMJ5i52/IMRS3zOxncgp2lrG+EnQ0V 10YQyFRM1zgbvwWcFPxHlHYBjlC0TCfWXk4k5XDwj2BmAmtn5Re85FPG54gqAXrd9sER YgDBCq6Cd3f0INnoDExEtdE7OZkblegMdZLeVo0rv+30lsoeD0mnTA8Rl+AYHFOzLyCU hUoj0qKhQZW6OEjYbhmDbKdMPl1w1+pul1tDhmq+8OdHKMOY/DCi9SUmMCt2XH+5O3hC HQaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Euip6vBA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mj25-20020a170906af9900b008b2712f79e8si23206744ejb.940.2023.03.27.02.05.03; Mon, 27 Mar 2023 02:05:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Euip6vBA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232563AbjC0Il0 (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbjC0Ikh (ORCPT ); Mon, 27 Mar 2023 04:40:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C03D6A49; Mon, 27 Mar 2023 01:37:08 -0700 (PDT) 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 232D866030E3; Mon, 27 Mar 2023 09:37:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906226; bh=M2x6XrfKatUDNCzi+SX1mFtgO/Okir8+l/Hd5u8MM30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Euip6vBAt7XX/ExWE42LBSSpfsCWwWShcG+34Ee+U7pCYfVKBkIrHcLALBlWY888J d/IIyUO8X4IpbPBW2NFW0SxI4K5TqgcEMOkM8o/PctPHE5BwJE/ugrtuLsChD6jcBx by6w10s/Z0xmWYS1MEtW4OF8GzWrEFegVxo2jSpeZS+Gqdi0RAhrtXmBT31ckaMuEr +PTRDKW2DDCGGt34A9X1+IWb+6sDTedWHfqGmYASK32O0ZS5/SIO3kVB5NzIw680WE zcDeB7z9BHEFycJez4hooVXCwWzIMD265Zul0F+j5tFkSfqgKaDPTP3lFhOr89wotd 3RbFm3zYGaYBg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 14/17] arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer Date: Mon, 27 Mar 2023 10:36:44 +0200 Message-Id: <20230327083647.22017-15-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761511135395348323?= X-GMAIL-MSGID: =?utf-8?q?1761511135395348323?= Add the BMA255 Accelerometer on I2C3 and its pin definitions. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index edab90f06a24..54a1f7f306f7 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -99,6 +99,13 @@ &i2c3 { pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins>; status = "okay"; + + accelerometer@0x10 { + compatible = "bosch,bma255"; + reg = <0x10>; + pinctrl-names = "default"; + pinctrl-0 = <&accel_pins>; + }; }; &pio { @@ -115,6 +122,14 @@ pins-rst { }; }; + accel_pins: accelerometer-pins { + pins-irq { + pinmux = ; + bias-pull-up; + input-enable; + }; + }; + i2c0_pins: i2c0-pins { pins-bus { pinmux = , From patchwork Mon Mar 27 08:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75316 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1369757vqo; Mon, 27 Mar 2023 02:07:18 -0700 (PDT) X-Google-Smtp-Source: AKy350YaNh7E/8QGrUhOJIwfZ29qcfe6+DxRJugcHUKQmXkPtsVmtGnBgsFRxR0w5FVvzbGZygs6 X-Received: by 2002:a17:906:7241:b0:935:1565:d661 with SMTP id n1-20020a170906724100b009351565d661mr10653981ejk.66.1679908038455; Mon, 27 Mar 2023 02:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679908038; cv=none; d=google.com; s=arc-20160816; b=J34ohI23zowtvtdrjh64ejVjfyNiVuRUfCwWHybhRxbCtKOPoQRTLBX/OSLEg9T7V+ nwYdR3/hQbfbJHgS5m95aFzJCA1S5TLpmRYtEyOElQe1v7SJP8NCuykvsmGrzsifXvqQ crniDOFgwXC3YOKrDPAEsWrRSvo9j5ocqBJHlZwBd+d3uXw8gIyOKdM2juLcl3BpFygY IQ9+TRrY1A/YDynu1jWGrTsOoK/2/JHKB74QFHWaDg5zRIKlp697MOx+lfInMBVMX5vv xqvJ5cuNIs/tg16oV000k2f2uwwGpRRV29+1xl5tVV91l86UFneds7fyj9OrbB70L4kS USYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yXvD5OwAYM9B6FG+dSZmPNM4+LQMwkEo9gfqrLfj5SI=; b=MevwlFYd2DjV6PL2IFS3HoJYx07+sF2CBDzzuNXMyC4iN8oLg0SRbJlsu5gEp+xgMt tAo25Fnv56OgrsgkhsAH70qL7jR5KJ21Fz1MxXoQRQ42edM1OWOU3qgEVedqpQxZj9GR wf5nIZ/xQoXiLLgtATPcDMUOksegwZkE8QPg6J91eaKOUY5YxcHFQTmCk5fYVW1GME8x 9gRurXu6G+K4/erlUzlnHMmv54zHNc0nf1Ho9uVJss8WSO3l+s1KtmPPh3r+IofKi21d pO/5ub362wiW4ZmURioD2jORdByQfQu8Nae6OBG3sYKCnFzvSO5KwXSPxbG4hp8QOlw0 sIFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZDsHIAK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n25-20020aa7c459000000b004fd2a5bbdd0si26733459edr.542.2023.03.27.02.06.55; Mon, 27 Mar 2023 02:07:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZDsHIAK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232830AbjC0IlU (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233160AbjC0Ikh (ORCPT ); Mon, 27 Mar 2023 04:40:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204C44221; Mon, 27 Mar 2023 01:37:09 -0700 (PDT) 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 17CD3660313C; Mon, 27 Mar 2023 09:37:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906227; bh=/T9WmBbua2oCTw4GMfNhun8IUtdf0uXbZIh9+7jUzSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZDsHIAK1e7zUj1Sf4asd/mmg6RVoWeec0+v9Duw3DII4USKasTToxblsMfg+5oAsF s3haNXogKx8uNAwV4TAicN+9AZ3NTColuBG9YKlXc6kxXf45HsKptA1E5Lfu17nfKA P3xfdbOGzx4f9uJKpHvuzuzKgELg786lelCwwPgIUz+5Mvnmaabfo2ouD1dFSSNOqG htk89i25gLx4NyBI9eAorikkPDalrZSUG2x8EioNFZWJdX6EgDUfBrFzr1cAoLHmck 0TSVpUqZYBZSYvYrXUvtNhhZpJsgtGtDzj0sfbI/61NJrkNOf+ElxdZCsoHM/6J3Em iz5UQ8yURUm8A== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 15/17] arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer Date: Mon, 27 Mar 2023 10:36:45 +0200 Message-Id: <20230327083647.22017-16-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761511251462240163?= X-GMAIL-MSGID: =?utf-8?q?1761511251462240163?= This smartphone features a Bosch BMM050 Magnetometer on I2C3: enable it with the BMM150 binding, as that driver supports BMM050 as well. For this sensor, there is no interrupt pin; readings were validated in sysfs. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index 54a1f7f306f7..bda14c74a8af 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -106,6 +106,11 @@ accelerometer@0x10 { pinctrl-names = "default"; pinctrl-0 = <&accel_pins>; }; + + magnetometer@0x12 { + compatible = "bosch,bmm150"; + reg = <0x12>; + }; }; &pio { From patchwork Mon Mar 27 08:36:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75307 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359487vqo; Mon, 27 Mar 2023 01:43:29 -0700 (PDT) X-Google-Smtp-Source: AKy350Zf6tBZ2SDWmqPUvUoJ9HqjW604hzAJjfzSblQtVfraRCXourtV1DsyZv2Ed/bmV05mOTNT X-Received: by 2002:a17:90b:1d01:b0:23f:dd27:169b with SMTP id on1-20020a17090b1d0100b0023fdd27169bmr12179870pjb.2.1679906609151; Mon, 27 Mar 2023 01:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906609; cv=none; d=google.com; s=arc-20160816; b=hi8l535jvkEEFjmVIDiDkZNVbg0M0We7gmm14GCFvm0sb0erICEcRfJK1hkQ+s1itq 1Ee3d/+585nU7STFbgIFlojjESiMhc5NuQYQPxVWQmGYfWQPF1sIj3pNabxDTjt4VWZT fZ0Mc4gvWxAzGlAfO4PLsma3XKuhKcMgWDxnaI9Ij9A1YVcpLiH4ifSePhBzzaQ0PGM4 R1qcaGZIV9bLGFf517fReXwiBXWadtSJUdwSxbpkm8O53FMeueeHa5OpM76O+Reql/ZS 2wCFnopV2aD9dAGqsxqW8bi/SJ9C9FgAxSL3QK8KUWLE9YlNHPXMSqBFFn41ogqJGGuQ moVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GV4iKXq9m6RWITAoD8Qah7JE1fYZPEC85DzSL6+CoPc=; b=lQXWfH+0MPUd0/bFIFr/u7E1Gba0ezY15kdArlZLJlTdfP/Vj9YiTnK4jXrW9zYA4c +Q/Fc7B8b59TfZJs5jxdscQbCvlTK9zdN7UZF5BJ1T7dwLT45e4JKnAsjf4Gt/RGVyuo Yifkq8++l0qkw+/HwaiyKdL3MYiLofCogzm06m7QsODy4wpvyPejtiu7shKLisOut0Uw sn1TGn25Dg3lx7MM+ICnPvmNq66aMD//0cPSIfr9Mt6b1FeHNhLOBVe8MMlewkPr0aLl jU27Y/I926IiLlRt+Gkw0A1p9JPJCuVU29witYODj6LKv1H5K+nWBXMRskdCO50XZKvy x+2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QsI8K4n5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a17090a088300b0023def94be71si5662721pjc.162.2023.03.27.01.43.16; Mon, 27 Mar 2023 01:43:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QsI8K4n5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232813AbjC0IlX (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233165AbjC0Ikh (ORCPT ); Mon, 27 Mar 2023 04:40:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3B914223; Mon, 27 Mar 2023 01:37:09 -0700 (PDT) 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 0E0BC660313F; Mon, 27 Mar 2023 09:37:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906228; bh=7QwlmzO687lgIQQgZpeWHJxJZ30x74RVdHCWiqIGrHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QsI8K4n5cpOLQks7dZVx4i6uJ9HjWsEQAlKW+DbF9bo4EIcCe46FRybKyB9NWRis0 TXpfQhUcUlWnwzYQmiEr1xdo7gPgzjvusfzYqBmVIqy9HLoIPhlcmMrHmZgySKkv/X SaNHe8bitzxIQ/J58yqQIVnmc0Xi20iNjpuhOPlfbvL6vb0Y3zjfAcPjFCAcU6Ifcw pBq4daGqPdQGfUxOrJbc67Nwh4jdg426wykSzQPIEsoeZVjKcT3J3277ydztpb15O6 /LJZZq2Z4E5oY7c3N0CjX8Qgct9pNPucvXfS72KCwyurFDu2yCWMggXb9jCnu2JGO5 KbPuPiAgq0XuQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 16/17] arm64: dts: mediatek: mt6795-xperia-m5: Add Sensortek STK3310 Proximity Date: Mon, 27 Mar 2023 10:36:46 +0200 Message-Id: <20230327083647.22017-17-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509752414385607?= X-GMAIL-MSGID: =?utf-8?q?1761509752414385607?= Add the STK3310 Proximity sensor and its pins. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index bda14c74a8af..bff0760cc1c8 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -111,6 +111,14 @@ magnetometer@0x12 { compatible = "bosch,bmm150"; reg = <0x12>; }; + + proximity@48 { + compatible = "sensortek,stk3310"; + reg = <0x48>; + interrupts-extended = <&pio 8 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&proximity_pins>; + }; }; &pio { @@ -127,6 +135,14 @@ pins-rst { }; }; + proximity_pins: proximity-pins { + pins-irq { + pinmux = ; + bias-pull-up; + input-enable; + }; + }; + accel_pins: accelerometer-pins { pins-irq { pinmux = ; From patchwork Mon Mar 27 08:36:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75306 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359483vqo; Mon, 27 Mar 2023 01:43:29 -0700 (PDT) X-Google-Smtp-Source: AKy350aIFYItirnHjysjy6DvZNv0Wu3OcpEYdmTKE4wQRBlUayKb7LNB9yeFIxikWNCft7QhAZpF X-Received: by 2002:a17:902:e810:b0:1a1:a531:460e with SMTP id u16-20020a170902e81000b001a1a531460emr13169959plg.63.1679906608777; Mon, 27 Mar 2023 01:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906608; cv=none; d=google.com; s=arc-20160816; b=v0NJQ19VX9OQ8nLVCVqERUI7/qdilv2NhUsMzwCBViXI+DlXEvsVWCyR0wJiIZGI5y Sg/kKkGVrCP02ABCXAWRETMSHzf702aaJv1hbWj2RUgRsKcwd1HPr3viwB02pl8V6Oyn Nru0BUxhThdAEF2d798fDDaejJ+JMdajLaCwZ4pvSN3zlg0Co3KSRfapXv+jy6IUCZ0l N8f+911G6HvvzsFxzG6HLP1y6j0AS4dLtGNTeP3kb5TtXUlEkOqx5iXaqJSsE+Rk0bX0 7elWFK4ZmrkFC5PTX+XqJGHyFeBX2+7Ph++i57LKolWiZ81+o3d9QLFFYrR4cRSRe+sb fKow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HvD2GjUyC+OJf+V+Q+0aeoi4zClYZchENPXtjkdARBA=; b=RWxEHZQF3Pd5u6N+b3jLLZ32WRS94k7LD2bXQXocu29Xtse5tbRa5T7lyaRazt71pn n72sYJaZG3V8bENFYqT6D1IHYqS5d5Fi2yolrHgwShoWp/ci7wqKUK892LrmaG66lqH+ v4STjeNjqQvXVDkIIFS2y1XNOEyghj5JNEiEojRVcMN2mROrDVaEaSowqneYZdesg0Lg eFN9TEOO04c4RKuKtZTF5l9zHOQNukdVoSag8RcwvthuZDRk59F76B50oqHdUZd2GCj0 KKYEq7j5uK5hz9JOHu//oBlru+gZ10/5anfGTic8OAqdVZ6JVqIVRQiSivQ5sE9eW77U aiMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dh3DyE+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a63d306000000b004d422660ffesi25818842pgg.393.2023.03.27.01.43.16; Mon, 27 Mar 2023 01:43:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dh3DyE+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232537AbjC0IlQ (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232520AbjC0Ikh (ORCPT ); Mon, 27 Mar 2023 04:40:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA6234C10; Mon, 27 Mar 2023 01:37:10 -0700 (PDT) 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 F17726603100; Mon, 27 Mar 2023 09:37:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906229; bh=ucKptTRH40q7Kj2bw2zloSjqxJ0pG6yGrjzKJ5KlYwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dh3DyE+D44Hnu3lYslkkV836PvJsUsswIKehfJ4XsNcNoMbBl7ZvgCDmo47pxkbCl 8B++vRrrhvIGdQTs1efvrFpxT32Zg1KImKqVuk+am61tMyfE1SIUfBcTIN01iROXXL iS2kG6A7avLyaeWV835WfssRgVn+PzSw0+XwhwiFJ+btHl4O/+ts40QsKBKvEjSFV2 X+1sXLOVLb5cICwYgG+9PD0eh4HVgStG9BLe5Tklejqql81HUDaR3OM4YPoLjDvue2 iVIlcDbbeYWLYr6EgoTbI9nsCAYChLOtYrW5eAB+ODl2Lpqzy9FMv7OL0a7hsvouT4 XGuZOCcz/w3vw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 17/17] arm64: dts: mediatek: mt6795-xperia-m5: Add NXP PN547 NFC on I2C3 Date: Mon, 27 Mar 2023 10:36:47 +0200 Message-Id: <20230327083647.22017-18-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509752508357863?= X-GMAIL-MSGID: =?utf-8?q?1761509752508357863?= Add support for the NXP PN547 NFC chip found on this smartphone and configure its pins. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt6795-sony-xperia-m5.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index bff0760cc1c8..8f00232e7348 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -5,6 +5,7 @@ */ /dts-v1/; +#include #include "mt6795.dtsi" / { @@ -112,6 +113,16 @@ magnetometer@0x12 { reg = <0x12>; }; + pn547: nfc@28 { + compatible = "nxp,pn544-i2c"; + reg = <0x28>; + interrupts-extended = <&pio 3 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&nfc_pins>; + enable-gpios = <&pio 149 GPIO_ACTIVE_HIGH>; + firmware-gpios = <&pio 94 GPIO_ACTIVE_HIGH>; + }; + proximity@48 { compatible = "sensortek,stk3310"; reg = <0x48>; @@ -122,6 +133,19 @@ proximity@48 { }; &pio { + nfc_pins: nfc-pins { + pins-irq { + pinmux = ; + bias-pull-down; + input-enable; + }; + + pins-fw-ven { + pinmux = , + ; + }; + }; + ts_pins: touchscreen-pins { pins-irq { pinmux = ;