From patchwork Thu May 11 16:29:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C34AC77B7C for ; Thu, 11 May 2023 16:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238840AbjEKQaE (ORCPT ); Thu, 11 May 2023 12:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238622AbjEKQaD (ORCPT ); Thu, 11 May 2023 12:30:03 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3165E1B8 for ; Thu, 11 May 2023 09:30:01 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-965a68abfd4so1669886766b.2 for ; Thu, 11 May 2023 09:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822599; x=1686414599; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=EYOWcd2IcetwoVsS4nntw9yoShUHzHzbCdiQYPACYvQ=; b=ZF9H/wJcUTYOsPZAliicRUc2hsbwwvgP5Qr5cEGUu1insHuerQcBU8SH0FTChxAO2w IhHO4VCitosRKoY8VL4KvNnwE7aCJFd21v0mBLNC9/GVuhHEZraqYLC4RAT/zqbXBPSZ DUouMrdouZ9uKyXEiMjY062MI4XWaY4oaKERBLgRVAxlOMX2rA7pKljmNEOd2Chv5oWu eoH14uw1YfmbfuQdKNjuS7wXpnFQjpaXrL5eRZytVm+PdUbxfkf42yNbxEZq5W9dkz5M /OnLW59L8abxiJsDrpkBJHrJfyh7mJQKsU/gCC6vPUPQuVCKzCM8ggLmIx3Zbi4Hwuua nFnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822599; x=1686414599; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EYOWcd2IcetwoVsS4nntw9yoShUHzHzbCdiQYPACYvQ=; b=DTP6jytaPd3Ekchjf5NI2pTCbcUPlFphNoBcEwQkw8lHaSNFAbAXgwrFTcBZ2AmSmg 09lH4xEi/4lVToZ96Mew5M/AmUunxROI2CXxgFqgOPTI3qoADWs1FBkjo5Ch9NEBI6X0 xhNAdWD2uEL02NPInhkTb98MGKVQAs5EY38waRC9cvMc3JVHFOGDVgUZyf8v0LdAD7Cm aUAtwfmNxjMjzbQ/ChcMeNmddQ49BGbuV9jaImGXEtheekz0VxSUhSyFFGxyYmqdyI79 r6N9949UvVBCNrnnL7ONnLi/z4QULmsBXhxRUjerBfeO2nkWNUPgqEZPKaEDPhj+QcDX IcbA== X-Gm-Message-State: AC+VfDwscWiEm0hlQjploAmC1qTjDfTBrhBLD/oDX/ukRe4ilALvhlnI m8AaXwIJOxCKe8xIA3lGJRUFNw== X-Google-Smtp-Source: ACHHUZ79EAj3WuEGlCvYgbOla4gcw7B6Z/enxW/Cr/EEA8IMPElYOLh8UszbcXKyN6DTr8kBvg/H4Q== X-Received: by 2002:a17:906:5d09:b0:968:c3b5:8b92 with SMTP id g9-20020a1709065d0900b00968c3b58b92mr11798509ejt.57.1683822599655; Thu, 11 May 2023 09:29:59 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:29:59 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:21 +0200 Subject: [PATCH v7 01/11] arm64: defconfig: enable MT6357 regulator MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-1-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=793; i=amergnat@baylibre.com; h=from:subject:message-id; bh=WTUqVHBR4HvQxOd4r/5AfIRd2ez+/KjC4aOa4tZxgIk=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgE5cCRtuzrGfFZ/Qr8kg9BPfvi6jZ8Gy8XTJn5 pRDvFXmJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURTJID/ 0di662itmNlbKs6Yl//j80WfpsNpJ8cPea0z/HfM6Djf8G199KCC73u7VOs0VJMTHrt1svIoHaiOBp iB5yXTNt9UY3RBsnKJxtR1N/0QKVWGKzzLy2p6LO7PyJqapU9FejGrfOGEz/l++hGKQVUqiFrtjozP Jt/CnDQHQJwfoR5ga9qQMJ1ax64mulMS8ubrByPdbhGCZJVOVlCvTf6Y/48kZmlPfxUkIytfE6Yo8o KjQLsXtuwHtn89zGNyR4QAZLMH7g23K/m8Em2KJD7LOqfG7hJeWF2PmTdNSPg0AMMCqN1HISfAFqn6 zJB13cI+XYVlMCoyfu3MRNeBjkPx75Bl3E7K97uhbiigq1Y+Y3HDOMWTDOvOZQxPf65nBZXuZ2/Tqc i0jyjXqAOJPiQpr8unFGIhl8rtBgPfENQ5PV2E3AyIR9LlVzoaNZVfXwagW8fS8mXDqOg+jn7mm003 /gDJQkvj+V6nVXz1pymWbwn4p2xEads55yhXiSmvfVR9Zbd+svylywPiemJvxjh7jnXf4+ZUMqsIYs BTLBJTjN9ooSsUmEJ2eDHQLn7l7kuVKfirGm2FtXG5firM4+8KVboLVpqBZD3aTrdz6HuKbehi8wlL F3cqXy6lYJtjaobTsCTqgYF/iIEncaTfxmXAHqmp/txHgS4W4xPKSypTdoRQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable the power regulator support of MediaTek MT6357 PMIC. This driver supports the control of different power rails of device through regulator interface. Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index a24609e14d50..ed3fca298314 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -708,6 +708,7 @@ CONFIG_REGULATOR_MAX77620=y CONFIG_REGULATOR_MAX8973=y CONFIG_REGULATOR_MP8859=y CONFIG_REGULATOR_MT6315=m +CONFIG_REGULATOR_MT6357=y CONFIG_REGULATOR_MT6358=y CONFIG_REGULATOR_MT6359=y CONFIG_REGULATOR_MT6360=y From patchwork Thu May 11 16:29:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2480C7EE2D for ; Thu, 11 May 2023 16:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238856AbjEKQaI (ORCPT ); Thu, 11 May 2023 12:30:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237852AbjEKQaF (ORCPT ); Thu, 11 May 2023 12:30:05 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 428485255 for ; Thu, 11 May 2023 09:30:02 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-50be0d835aaso15703528a12.3 for ; Thu, 11 May 2023 09:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822600; x=1686414600; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ipOv2lztUzpLia8FmCYNvL1mLniDnk8nXmCSG+X0J6w=; b=xt1Jv0vMM3GWMt/w/W4P/jCAMzVqz5EqcBowbMxBB9cBqXG2B+K6xhz7SZQeSwCc5X UMHpbsoxmqOMD0raFtsg6fgVAzGX/mZ1oV0BaURSO9VUpe0NescAmsH7sv9Yc0tU79L0 n/OSvxy8OZlA0Y2Bn6JGPjncWRe9XdT2AwrW3tZ36xv7RTnxtZTGFb2PxK9Bfn6yVIe/ I/R/YCdwXovv5+J7ss7P5W4+QyFeCRUb3eQ7ZJL7s1ovSYRjJ0eIQQEjkIOjBHoCrdKL MY7+49yxdvGuZPXETSukKamrl5kl83R53x7+V8Gif5sAW94F3UCUzAaBCowdygV9xr+D TcFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822600; x=1686414600; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ipOv2lztUzpLia8FmCYNvL1mLniDnk8nXmCSG+X0J6w=; b=XgUQ5ewrI5SRB8VsKcsUZHSnf5LnHMe4f/TE0/MGYqvn823k/LSVrlMRulanwxdxrm 0L8DrCEGquXz1qz7XkGaWuc4+Sh9R9oR9Hxudn8NaXTIhbIsw6lfSkzAry+Okm32vbIZ jCQAruBRt0YwqEX4sI2cy6FEXa5Wi/47OYg8K+lRFbcaSnRAZa8kWnzY55lnZYWKzp2p hlcY79NTjOY8aZrQl6WmLo6qiJfTi+0gAHcu1Q6lx0TU0Ym5LV7iFsWX5vhxiwA+DZYX Uzl+ioomlCHe+6OtyikVavWoEWESQSV6wsxS3R45bmf4np9fCZADbVo7V+v7YTa+1StQ 2lmA== X-Gm-Message-State: AC+VfDx6htjnhbh6ALld27vbdVKCL7ETFIDo0jup2NYU5LBIvnbHMEkZ 23Ho8/Ktvd5gRQVjzteknPHAOQ== X-Google-Smtp-Source: ACHHUZ71vCZhPm0J+A82RBrrcLRhb73jCbw1vM4RDGGiQs0XT+d7oMG4cRq7D0dAHglYWdk0gMnkNA== X-Received: by 2002:a17:907:97c8:b0:961:b0:3dfd with SMTP id js8-20020a17090797c800b0096100b03dfdmr21636902ejc.7.1683822600785; Thu, 11 May 2023 09:30:00 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:00 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:22 +0200 Subject: [PATCH v7 02/11] arm64: defconfig: enable Mediatek PMIC key MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-2-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=794; i=amergnat@baylibre.com; h=from:subject:message-id; bh=XRrfEG0c7tdATqVetaOHCMByxAwwh3eKuEexDzWoT4w=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEyGh8t+VYV3zOirZOn0tC3DjrKpnJLxYko1YW Bq6EnwGJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURT0pEA CLX38j2rbyHDohHodWsCHwexPBGtcNM7UgcjV+YqDjeR0JggLVNNi3rwWwaAFxwEVuaoUaqabO928E ABCx+0HNpjYuyPy159sF2+wPt5l5BmJ5U7NjOqgMb86wpsWC2a9eT1i/zcI0J/Ht7yXLUIQBfzwRao NK1qnfn2cQnj9Agql/EloZzYTpmIno5IqZv60w7rMYHoaeXOrA7v/NVed5ttpDi1iFvi6wGxmTZLls fhDhDthJ3lNLV7+wKMW90z/wCUS0CS/iexiDJKPI5EjuIxNgYEIYY5TwfFQmau3YiVofUiXRvf3ojP jQWPCKY4oyvwLv9na/6uB5VG8PUxJUzWBbdHSnEjws61Mp1rXfI0qm8NiUowKdPZBRTsuDgWM7LXXG W7dJBmA6XdRAPiGC1/F511rPbED7UAen+YFNBRaHN14Ev95kqDrl8XI2FdIa4qXHNoOFkr1BV+R41I UJDbCHqLjWkA0lYjlwabmrSrJdrbd5e0OnwYnHhI//oPALeh8ZvoNPoR7NCt/nZ5HwDQzHRjhRift6 xwS1Ly9Oc36JkeKSWJhV7BzELCmw9tFA8OkHFgu0ABCXrSItDzMS73Lb43UxAgI2i0bxEaEBHa4nCv /AQQhO8fb9J/c+wxpUB6nu7vVg5rJBHo5LMyFA4qGyL8OB0vPZbZq9tHbF2Q== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some Mediatek PMIC devices can manage Power and Home keys (buttons). This patch enable the driver which handle the 2 keys managed by the Mediatek PMIC. Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index ed3fca298314..0db8293f477d 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -413,6 +413,7 @@ CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_SNVS_PWRKEY=m CONFIG_KEYBOARD_IMX_SC_KEY=m CONFIG_KEYBOARD_CROS_EC=y +CONFIG_KEYBOARD_MTK_PMIC=m CONFIG_MOUSE_ELAN_I2C=m CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_ATMEL_MXT=m From patchwork Thu May 11 16:29:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0900FC7EE2A for ; Thu, 11 May 2023 16:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238853AbjEKQaG (ORCPT ); Thu, 11 May 2023 12:30:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238837AbjEKQaE (ORCPT ); Thu, 11 May 2023 12:30:04 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD98FB for ; Thu, 11 May 2023 09:30:03 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-50bdd7b229cso16037567a12.0 for ; Thu, 11 May 2023 09:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822602; x=1686414602; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tDMAZYC6PlfAvsYSrf+M4iyNDJFAF/AM883C7PrISNc=; b=GKut44jv/m2gz2NLfdfriKWeIeoGw61GlsuhGlK5kr0xoxOlCWKuZHLjW2eAGOU7Ym 3y/EhK6PlkXPPo/ZwiWU3f/MFQOF2oQ0pf8xLwhhF0n0DXMSYWklP66L8PDmvetZNP82 sWrRlsjDWFf7KTmMwv+EnORflUX5jcL3Y4Q8+PaBd4IY42m8yiC7QeDqQFRf/lpHHHxn 9rph6JUzwAZKZ9UE8dY1vpHXASpQPchFrNmPa9/QGMy9oi2jAkr8reo7rLG9EvyjFPzE QZwWuM962U4F/Uv8CrH1auj8xmzcrnvT82EpCBjVkLsFb+Zln7klHqlYCUdxbWY9HPnU SzVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822602; x=1686414602; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tDMAZYC6PlfAvsYSrf+M4iyNDJFAF/AM883C7PrISNc=; b=ZAMLBWCzHsMt3jFBJAqvnXqWmtNc6/MO8G+N5mXM1SFcb3sQRgpO9FzoOljLGTrJfj IA+eszsOVEMIUOwWRtYSommWAHbti+hXtWOAjX6TtrWIa1mWbc5lMtqmLaq8N76Il0T8 0gGkimD75uHbbhaAf7YmuAqKGfA969uyTXnQEVtCn4nR9FnOzJrJ7Dx8NHLzQFVsUnG1 lJlHx51XJ/VdB5ruQ79nvY2PctRPWOB7WMvQfUobA5rCD9YJgL8JavXqJ37fOEtDe8aB viFvMjx8zRQgijuAF+qJyAjDalXPG2i3a5dIbjikhYKEuUCu8Vma/2GTU9hfqSU1L2zN lbNA== X-Gm-Message-State: AC+VfDyzBIA1NT6xZPj30cvkZmAPBFaVolFiyRSxevLp/lgxrw026tIo llsC1cf3PW7Iu0rmr1yB6rexMQ== X-Google-Smtp-Source: ACHHUZ5dS5b97ca1fLNMTMneaSjiV+OrWXMVhFnzL+ZkRjzgf/aaSno8BMVOseLzddzE6Hjo8oxMwA== X-Received: by 2002:a17:907:3f28:b0:889:5686:486a with SMTP id hq40-20020a1709073f2800b008895686486amr21552826ejc.30.1683822601894; Thu, 11 May 2023 09:30:01 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:01 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:23 +0200 Subject: [PATCH v7 03/11] arm64: dts: mediatek: add watchdog support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-3-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=940; i=amergnat@baylibre.com; h=from:subject:message-id; bh=9yZG6Lt2sYetnfjl+HHfU8vcDGstMCEZ7QfVbikE4Lw=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEtFRKjs1rbvTwHl1SQzZKB0oJiYLU0/UNRIr/ 1PbYnX6JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURYpLD/ 9fNLpb1Gb3TFT5St5ZutWnqiYhlYMmFqgTcyEEYrKwbZdbcZAAgeF+PHn3SJSgisGWxd3W/EdzNHS/ Vp5uUQ7CY4mni6u7Rk8Fexb6k0c//sTuk/yBsZK8N28jB2RZiLZQ3ia3monpsSoIVBsxGZC/lUDDij CtkPdSwrcBgBUZFLrDEyNVvRmdGKg+sAtKSzHYFOUCxIIqYc6cYXZxehc8vRbbz7uQO7nIH4tPoDLC 4ShZ09O9mRqqXV23ZgoVQc/UQy/Z9wDKkZ3wItaU8A3h0jqgro2KsXTiz8LZMCLsrIAr9wV+sa1yFv c/e2b5EZ8/3NgoLO+j8N4UktB4t2Mgjef84tOtXRvjN5sGQnSxV3l26yK5HwFJ8MMGdeAV+Auzl3qX BXjcBPuUb0MQY2vHiLSjhm2meNF5dbT06ZGSkf5rQDgYXIJ3NDGl7X00iN5ie4Zx9VeR6u6bc8Om2+ 0j8lGUzpVZGtzuI13KfCMbe21ObjbNppaAu2KhtcvlkLNEIaLIRvOG59lDUA7qUwtRMyCt5zggW7jn n3mDtEE0Yi1HT1JnDUF43i5VTSgtNqK0SUsuUr3WwHgr7BUG0qgzzEW21quckQm3MDPiRiVhcvYuOR WEWxcieDJ18u1xFk0Q5z4w98SaLCB56XVX6zAP6y4hzwcyfEU7W8X4g3AxIw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add watchdog support. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 1f6b48359115..bb45aab2e6a9 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -162,6 +162,12 @@ syscfg_pctl: syscfg-pctl@10005000 { reg = <0 0x10005000 0 0x1000>; }; + watchdog: watchdog@10007000 { + compatible = "mediatek,mt8365-wdt", "mediatek,mt6589-wdt"; + reg = <0 0x10007000 0 0x100>; + #reset-cells = <1>; + }; + pio: pinctrl@1000b000 { compatible = "mediatek,mt8365-pinctrl"; reg = <0 0x1000b000 0 0x1000>; From patchwork Thu May 11 16:29:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BD90C7EE22 for ; Thu, 11 May 2023 16:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237852AbjEKQaI (ORCPT ); Thu, 11 May 2023 12:30:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238654AbjEKQaH (ORCPT ); Thu, 11 May 2023 12:30:07 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E812F6195 for ; Thu, 11 May 2023 09:30:04 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-50bc3a2d333so13427412a12.0 for ; Thu, 11 May 2023 09:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822603; x=1686414603; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=i3sm0sOG8kJdGXppUS7SqrEsY1zLRiuVvK2VuTgB8S8=; b=a0HRhJc447kPe4mamxtl0XDD5nMuRRJX+UQT2K2d+mhnat2X9/391H8+5JPRWwi1bs BRywDGNMmRgLazLuO6nCKu2/BG8QIFD61EOUECL4xo2a3JG9ENPwnlwEo+nWKypITgGq 8Scr6kgnZqIx1/jffKO0C3PJ4ND1aVLUHMYzA98CPUuGpbYCA06x5A+WqY0TbyuBtEkh KAmjvyXeBKszncRnSWJFNT14SOWXkhuBJ4ab1r/jNTXmdZfdoVZTsXfwJLQz6DGqyMIF p5Hd+qD8AjLuDQHbQfhvr76i71Bm39V79+RdSQomiw0Qmd3OYydQfPPwd6eelk8zzR3M L3eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822603; x=1686414603; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i3sm0sOG8kJdGXppUS7SqrEsY1zLRiuVvK2VuTgB8S8=; b=A3A39BKnARrysv+BAs4BhI9gBUdxTv/3gwXz3ixDfx8AexbixyvpVsY2YX65ZVyqxi cE7rhUOO0I/3dhNrELptehY3ksp9BXJ/iPqODJ4EiSh8w8k6eRTz2OddfRHHB2CPVz81 ThWcQ8t7nROzxtVAVkfD82dhZzGGQgK5E0vCGAzJP4QCuet5OwpqXSXhIdbaxk4n5p/Z JrRPncENryBIsEKUS9hn0LBxpMVb5yAn8AHdLxmfB8CszjM3FdhKXIeQxG3mwkMgjpmQ y2bcthXWVl8i9kgsxEa8726RUyK39RqsfxKPd8BQ2qWExrIfQeVkijhYsHXe1HneWLHL vejQ== X-Gm-Message-State: AC+VfDw0tqrdfJuKwQbvrgvpiB8T/0517C2p95+pZP+mysmUooxvqEM2 P/BGZH8TwICLlEj2sSyJIXu1jg== X-Google-Smtp-Source: ACHHUZ7dcjAqGp+Nphgec+LpwJsKU50aAP2CHGPq6Yfh5foCKjVbFWh/ZrIWc8QPj7Qy877cL2Asxw== X-Received: by 2002:a17:907:3ea8:b0:94a:6f0d:38a4 with SMTP id hs40-20020a1709073ea800b0094a6f0d38a4mr20763978ejc.7.1683822602997; Thu, 11 May 2023 09:30:02 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:02 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:24 +0200 Subject: [PATCH v7 04/11] arm64: dts: mediatek: add mt6357 PMIC support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-4-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1093; i=amergnat@baylibre.com; h=from:subject:message-id; bh=QwAiDhJXueyKUnGYKSko4cktLia5bmqONipL6za+jZs=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEaGB957lUUUCMm7XYXzcG3/aVnUd1Kk0tS/Jk n2XNLt2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURfwPD/ 4tT9AZke84r9nHkctafa3Fs1Xn7zsrt+2IlnnC4FlYC8bDF0k3tzXr+U9ZIDyTBS26N6aGtB/sM+78 V+Je8In9nU6331apw4IyZVZtCnibSTtw288DtcpgIZHFZbqQOzJjbX9qEqfEINyU0yRyXBGbi1imU5 rAmXDt+wdV1ScSXG0NOl7DxqTSzkTcgbIxOYfuJfkWaHyq6AtvJfHdjgMzwcpjhYkRz9E3mWky4yTp RxkIQhHNrlzqPhlMs66KPx500H6zv+iU2pkd7zAbdCPlRaTCiLKx8a4opxFuPSb5ZBLo5B4wYBvmTN hA7mSzWTuv6lgMNklOnKqVMGdWokjxh6SDyg9MV7aUi/nlkVVS72q6gCF448TEuWHVy0+qLEHYzzxN SouambJpEcnlV5vldVHr6ufNjDwDQ94PlZEb1GidhIEW4yhB67okMZXrRG1ZONpO5+Xaf1HowCuVwV 6V9ZSiw//Ns3m9LYy3dAY127mT2ZwUpvt+BQ0LnF6s8aBRfDDLHJVvGmhSVROsmxfxRpDHtF6gVSPG s4iD6nVMB918dzcn/JV/0HeVlU9Kh7oPUT3w8BmKjavIn6kHcDWlntmwXPsoYhjRKPqBJgyOjiVD7O 06oomNEtw7CX3dFz8wz/tT/MphLIt5rHsnEjW9GtTncowtS+UmpTrpUsRYYQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This power management system chip integration helps to manage regulators and keys. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index ceb48eb1a6e6..6074aa9c1c3e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -12,6 +12,7 @@ #include #include #include "mt8365.dtsi" +#include "mt6357.dtsi" / { model = "MediaTek MT8365 Open Platform EVK"; @@ -94,6 +95,12 @@ &i2c0 { status = "okay"; }; +&mt6357_pmic { + interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; +}; + &pio { gpio_keys: gpio-keys-pins { pins { From patchwork Thu May 11 16:29:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 680999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68525C7EE26 for ; Thu, 11 May 2023 16:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238867AbjEKQaJ (ORCPT ); Thu, 11 May 2023 12:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238825AbjEKQaI (ORCPT ); Thu, 11 May 2023 12:30:08 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C997665B0 for ; Thu, 11 May 2023 09:30:05 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-965ab8ed1c0so1457454566b.2 for ; Thu, 11 May 2023 09:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822604; x=1686414604; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SLhdu44KB7JCNcriYN3C59veyYS4YEcrtDZyawBPTZ8=; b=eGG0vt6GsZ4vtjI6n5O6zVPpz2GhaCeMURTTuToDRCnmgDnEkDwc6DJqthMllL32CK HAXHAbFi02N7c7Y0yhmdUKpf0x0t5KXdaEFcyO+r8w0jyLYNxz4Gppyd8CAMWUldlbTE /PZkGNC4BqRjcVWyXyNUxe6mU5I1S2B89KfIZBt22QkqmHfDpzWT56VfDYdmdmLluHv3 RiQPtHioAasxuAufCTg5HZejysm7enNE8oEx6hTs6zQ9hHMLL8+IsJFgGk5ntgVcpNEX Xw5PFcEU9O9B20puA2BOgKUmxUHwgPntf1veH6oycOBcsGTuffWl2rg2FnavoNGgXaxF yBMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822604; x=1686414604; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SLhdu44KB7JCNcriYN3C59veyYS4YEcrtDZyawBPTZ8=; b=I7dNBzaJ4CQYUXiCPPA35T9Q/aDxa/qUNFqTNjYFpUAU3l5dGMThUQrQFT7vfLdGa+ CqXVZBRwx9fLg/0gtGrA0oR0w8WOm+vVXNeJOCWBunOGYpLjrSgh+e8NOpt8BfELibMk ZKfyP7etOYiiLJZmzd3SYneM0K5fYjAFs88ypYFSRg6mVWA1A0F0xImtm0WD24H/Bq0l vmrk9LRBSvdmepYbOGtjFHsvM4Yp9faHwyaJFg2RC4CcmNA1KagxUjq5kncj/4s0W9Wt C5FHYcVzwuLUpcHLW9HpgmS2OcfbHeSpBbABxGayyVb4vtf3kbfc7RNpxIhyKPZj/aWi 1nNg== X-Gm-Message-State: AC+VfDxyy1AIobftmtH7TJ7bIioXc7X3FfDT3SjhLTvp6Yx306rIgFyv A8gVCGX1FmelKuEWwYW8ORy+Hw== X-Google-Smtp-Source: ACHHUZ43VJv/2VIPBaH+DCXDPd2a0utbJAtPDFo9fdmxqjSBaNOOL/GS0jVWlXvhO5vuPEsHmR3/8Q== X-Received: by 2002:a17:907:60c9:b0:967:2abb:2cec with SMTP id hv9-20020a17090760c900b009672abb2cecmr14076991ejc.64.1683822604080; Thu, 11 May 2023 09:30:04 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:03 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:25 +0200 Subject: [PATCH v7 05/11] arm64: dts: mediatek: add mmc support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-5-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5035; i=amergnat@baylibre.com; h=from:subject:message-id; bh=m1/hU6NtitNkihlVEYyJFtqHag17DqDCQsAPTBN98k4=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEkwrMJq+DnU/LcbgxMhUZOc4MYm6nfjC7auPJ /T6bj7qJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURaDKEA CIsLUO65/3xLjoayoYcHQ4VqQxANrN+3DBihOP7CA/6RLp112D1z1P89bKt7A1jav1rAuiSJsRzNL3 PZUiOafqUbangiJxXh1PqFU2XEY14yigYekQEy6pi8eMGV9rfa1yeu7PjeMs552Ms7OWC1hKyCiK9x cmy3NtIG1d6tpCMpdZZ8Wh70JTAU4Ezv68Zl743kKss5zNbELCbfq1VqPNkDLYgqGFw8P7rciZWdlt K4h3G9zFwQIwRf85ns94cdJjwbGo08lkGPlTcgXfqfIuOmOA5ib7VlW6BN9nPiHlGTyQ4QJ2ybJbgs NTuqdYfBmC1FuIlBK7MkKfzUuIDIdlpIQPLjptCcPhfLOnJZADyrVHCSiWdoL8WsP6MsmuVaLowbR0 raNHdqYbn20TI5U+dMIKsjnPUyLfp+fSlOrCBqZ6+5j/xwyl80YvECkfBS+LBUn0lKfdpY4OPM6afd sXOH/tjCd0Q4+rVe5ksneJbr18VywsoJdoChTjp7lIXSNTVV+4mti5xy+BL3fxeVXeYLjMvmLj/cFC FXBWKJjQOJ/KHhvT5EafFCCGqyu/0XbfjhtnjvC5q7jfqpi8/+tu28+Tyx6WPPn5BntHr0f1c9LWjy DbFsGoeHymoFxrsoNG3BQoTvWe36p3+NdIcniTl6gR78wnRipm8miLeZCZlw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org - Add EMMC support on mmc0 (internal memory) - Add SD-UHS support on mmc1 (external memory) Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 138 ++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 6074aa9c1c3e..752007d0598e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -95,6 +95,42 @@ &i2c0 { status = "okay"; }; +&mmc0 { + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; + bus-width = <8>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + hs400-ds-delay = <0x12012>; + max-frequency = <200000000>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sd; + no-sdio; + non-removable; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + vmmc-supply = <&mt6357_vemc_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + +&mmc1 { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>; + max-frequency = <200000000>; + pinctrl-0 = <&mmc1_default_pins>; + pinctrl-1 = <&mmc1_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + sd-uhs-sdr104; + sd-uhs-sdr50; + vmmc-supply = <&mt6357_vmch_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + &mt6357_pmic { interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; @@ -118,6 +154,108 @@ pins { }; }; + mmc0_default_pins: mmc0-default-pins { + clk-pins { + pinmux = ; + bias-pull-down; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + bias-pull-up; + }; + + rst-pins { + pinmux = ; + bias-pull-up; + }; + }; + + mmc0_uhs_pins: mmc0-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + ds-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + rst-pins { + pinmux = ; + drive-strength = ; + bias-pull-up; + }; + }; + + mmc1_default_pins: mmc1-default-pins { + cd-pins { + pinmux = ; + bias-pull-up; + }; + + clk-pins { + pinmux = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + bias-pull-up = ; + }; + }; + + mmc1_uhs_pins: mmc1-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + }; + uart0_pins: uart0-pins { pins { pinmux = , From patchwork Thu May 11 16:29:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85E6DC7EE2F for ; Thu, 11 May 2023 16:30:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238877AbjEKQaL (ORCPT ); Thu, 11 May 2023 12:30:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238866AbjEKQaJ (ORCPT ); Thu, 11 May 2023 12:30:09 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEDFD1B8 for ; Thu, 11 May 2023 09:30:06 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-50db7f0a1b4so5742129a12.3 for ; Thu, 11 May 2023 09:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822605; x=1686414605; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rp1+YNqwHNM+RyCFbekDJNKtYIO0hDnKPiZFvATcjlg=; b=15PRW0yUiatX08i12bpIGK6YN/oc9Gpd78Dd+Pgy1W0XoyRAE61kH+qsTIxjO4hm4r jKkXjSVJFqm2oTPpOJVgLdACqrvfwJFYJnnFcVzSnq0TxlqRs2sSCxXcCMgJHUb8t1Uy fUpNvZJT4AsXd5OT1zVxFwANFxh0Oq/rA8CoGDZxYBAusYu5p4ReYYnJIkNAgXAdNi7p GTBl0926/h/RbyaQ9FJzoZhME9exF0y4dVhFnu+Xf5Tp/AuMBBEBvfzfZA99jI0hMq3N quSRdSYKyIyY7EVJ9z/Yac/0NigO2SYANsT/1LYzsXbstqPrL35k7WE0nfEXa4tg/jnQ cjGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822605; x=1686414605; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rp1+YNqwHNM+RyCFbekDJNKtYIO0hDnKPiZFvATcjlg=; b=f+Ob9dQU164x1qoUA9IpTjTXEugP7vyA7VytajzLy1nfg9K8GECFXyjmaOR1TjeQZl lTCGmvwyWpRpgWC/0v4jYJBqqoNakdyIASlZG5hF19pzb5WfGNKvabxtPQAp0qQwIZc3 X4Y2nycwzJK8LNGrBbKHXGOo3AGyxUHxRzbTxZK1ihGO7xeSpb4UKn7MWIuLLygcd4d+ Aed2inimeoqcgEEuppSOVvztp3Dp7C/HNuUtogTMoCKuyLFJA8eA093GEvqQMrRbJWxC 6toLGAlDlcsKYS8UFnlIk/qii2FXnMKZysOmiRedSIzfLD3VK1KCkeO+4cnVPb1YDbB7 oynw== X-Gm-Message-State: AC+VfDwzhcd7ATlBPf88BR8JGllIY24FwRMCAWAekp8cdexdCNH2mDN4 0Nze6e7+cMNmoJH7nTrg9VcmOg== X-Google-Smtp-Source: ACHHUZ74Mg83gHGhdecC6kdyn/4GZxQb79hJ6u4Q8eJUkKz/Lr8NOxZ6nrWVqBv4U3b7ejy+QUAtAA== X-Received: by 2002:a17:907:6e9e:b0:931:ad32:79ed with SMTP id sh30-20020a1709076e9e00b00931ad3279edmr24167339ejc.12.1683822605186; Thu, 11 May 2023 09:30:05 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:04 -0700 (PDT) From: amergnat@baylibre.com Date: Thu, 11 May 2023 18:29:26 +0200 Subject: [PATCH v7 06/11] arm64: dts: mediatek: set vmc regulator as always on MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-6-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Fabien Parent , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=905; i=amergnat@baylibre.com; h=from:subject:message-id; bh=cUc4DzZIiD+nDf33lWao3J8L/XHyfRxCzPKkh1j5Cr0=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEKlLyJAJVOnWxuOHYSHXwHxiJ3AQcPZcHsQ5r oMa68dSJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURR/WEA CmCC3nenF0nsD7hbh9tpUTtmwZ7/GFhcqCUV9wFwj1yxZKLLQliINuuKh5n5gKSXPxH7xzGCQLggOV bpmlzXTBSSDCi27xYwp5FuMrs4MsEA1GhUkWRgPDI8vpiRkyQYw//QHLHY3mWb12AbXwhbdxBdNRHA bOxn6E1DmhVPdmAt1wYX/QU3HInZ0pk2LF+eGY4FjzawTJ62IoY+9FjRm6pjJT4VhYy9OhDWFSnLA5 KnwYLchxEL48rZHnzTNXhNWlSF9eto/W/U/9nWXvl3du/b91kphS1hJ3TUc2oR1Jauwy/8U1+oJEW2 udhn7Fave84NhMw3qHRQJXcuD/6/EORK8xm618yF+q554tBnKyTbA/UWpPjmdwO6FmGaRHy+owwheh RI6qmdQ4ZaIZcXkAYfP5FH12qcQRePbRck74zI09tGzmiu4kxDj6mDLqG96cMrm7KsHAArSd3EAzJ7 cXYNJbhT9rxpaHSveRK9lM4ry66rYe8WLHby9XeZhwRbRfwg3Br6Pm69PWjlsAVMoSwJKxJNXotOm8 HYY5UwPlRJq5gyCjFT7pLdAG9bkRBmniYfpCUg6lsZJZ0eR3NOZv8T7w619nMTY9Xx9GCK1ijlSD/X BOYZZHRL7Ag3F3IEb8yVxltEboADLZhMEfnEK9UYuZRxOovyc1IsLw+i13dg== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Fabien Parent On downstream, we observe that the MSDC IP (used by the emmc, the micro SD card and the WiFi) isn't working properly if the VMC regulator is shutdown. Make sure it is always on. Signed-off-by: Fabien Parent Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 752007d0598e..5d69b39c8746 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -137,6 +137,11 @@ &mt6357_pmic { #interrupt-cells = <2>; }; +/* Needed by MSDC IP */ +&mt6357_vmc_reg { + regulator-always-on; +}; + &pio { gpio_keys: gpio-keys-pins { pins { From patchwork Thu May 11 16:29:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 680998 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0CFCC7EE2E for ; Thu, 11 May 2023 16:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238968AbjEKQah (ORCPT ); Thu, 11 May 2023 12:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238870AbjEKQaL (ORCPT ); Thu, 11 May 2023 12:30:11 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B02776BF for ; Thu, 11 May 2023 09:30:07 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-96598a7c5e0so1421158766b.3 for ; Thu, 11 May 2023 09:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822606; x=1686414606; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=px/CxXTCmKMmC2DtIG43QR1JFGJikIefzXWxaCFHoxA=; b=3KicUe34xmlEeHQcSF65ph3MOrdKA29zYQqKZ3pSZY1EAkIjwvTVoXHfjODz7UmsIr nK4tyA73ncLYyVwUNFy9kR1rj5pWHiNh7fSEEpgHlDwMiyhBfgW3sZ/7LxfDk7c+6Qpz 3dDxfZL+xg71x4KysZwPz7154KsqFyBJLj9VjDSNKywfNt/X4B2huSRsU+sNlzjKbWbX mPbWFTSej8Rica4Bm7F7nplf0Ymd8hr5PWNsEFw2koCOvaQrnvDioAAjG17bfdwcwyeX L3UK/IbsE8TlDKzRBAZyOl716akXFE6T+dyo4gNYkg2innsi/TNEwcfs9jV4ReYWGw43 171w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822606; x=1686414606; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=px/CxXTCmKMmC2DtIG43QR1JFGJikIefzXWxaCFHoxA=; b=UbfzEWXRoMSAYNAG2upfJFDaibW1u0P6uGEAIO2AzxndkMV0dTdAkI9z+HxCony9Eb qTAKPvEc/jdFOvGAkeNCiZY2uH9EXpVNHlkszd9SZ2GDBSR4/8zsk3NrsYuaEFy0llpo lljCJvX5NhwO1WRITzyMmI6Xc2giD5M+pTQ0Kr08gS6DreEHI45BCfcsZC2sru3qjBh2 qsXj8ygdF4fhyuH5K6BJGI8vRBzpspRIFSKYmOnzoHAjEO9uZcc99j937Et3AWk7zbeQ pKmvQA12neFv4RcT0kzr661nB1BtOhnLQXZ8igLG+j3miRhF5s1ln5PaNa9RLpcqEVeD +vtw== X-Gm-Message-State: AC+VfDxtNGRV/4waBtwniWSW9BtwlVYdJ/270+g4cKjGicwXc0L0Bm2M Hi4m/BIWQop+5ofKBVZHV9DNFA== X-Google-Smtp-Source: ACHHUZ79BGYI/b+wGlY7M4CXS1R2qYAwJZgwhUs0WwwXbYFkHcQhHwrSfvijlKlf5GiuBtWTlkRFww== X-Received: by 2002:a17:906:5d16:b0:960:f1a6:69df with SMTP id g22-20020a1709065d1600b00960f1a669dfmr24047805ejt.36.1683822606489; Thu, 11 May 2023 09:30:06 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:05 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:27 +0200 Subject: [PATCH v7 07/11] arm64: dts: mediatek: add usb controller support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-7-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1321; i=amergnat@baylibre.com; h=from:subject:message-id; bh=oZbGnh0AF7O5vKAvETFcbZmSMeU6k+oaLr1YtFhDeGw=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEJVLUMNrCtvulo4P32pcT3Od+6Jn7RABhZ1oP XOd3Dw2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHURf8vD/ 9c8d0pFkg+B/LMM7Um+nQUi/dPdBdYrWqou9Enbj+Ca6nAgBRs7hPgRacy1xHIWCotGVzkz7FEYiFb AYyJ24CZUhHpkfVSl3Nb4Zfd8LMEGgF9t+/eocu+YdkHNSVAPp/jZKZ5CRfiOzke4l2elvOit/y2MM l3bs3mFK1mFLU64/A2S0tCmtkFdgu9yCC2xLDV/eMjXc2+nbC6AqDk5Pf/IeAxlipzaasbRlBdrWAr sJQtlpWdlF75hpx9M+JI6pKSdyd9lfncJ13aTQl6xdUbJTQbZZltCoNM4dx4yTb7rfnWzd2MEgU5lH R20uRGV4Gs5dwenEDUwHqW+Q6mMgHzaBK7xvHer1Ae5tGVdHDpc6XFBBDfgMmBnyuBHzug3DoWRz7x OXuey043E1uQenboG/IqJnOyhRaITrzZgIJdxj9W2BPA7rL6dDlGdDf84RqMgYhsFjmITPdhPb/g9J CaaPCzTebSa1jKHBJfgSjT3FWVYWUp5aiWajckfCECyok936hA0O+nvP2P3C2FDGdnH3LWybCszVNn 7gXkwTXeo93jjo7sDzMaI6vw40C/hQgoQWCqnaNO2xdR5XzJbA1D5HVSgCSzdV/f95hX6fkN/09HV5 aniOe7wPCo+pjHTD5OPIF9dwy45DSpwZKuG6EmuU0m5RBwXqh3+PnVayVFQg== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch add support for SuperSpeed USB, in OTG mode, on micro connector. It also add support for the Extensible Host Controller Interface USB. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 5d69b39c8746..3a472f620ac0 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -314,6 +314,28 @@ &pwm { status = "okay"; }; +&ssusb { + dr_mode = "otg"; + maximum-speed = "high-speed"; + pinctrl-0 = <&usb_pins>; + pinctrl-names = "default"; + usb-role-switch; + vusb33-supply = <&mt6357_vusb33_reg>; + status = "okay"; + + connector { + compatible = "gpio-usb-b-connector", "usb-b-connector"; + id-gpios = <&pio 17 GPIO_ACTIVE_HIGH>; + type = "micro"; + vbus-supply = <&usb_otg_vbus>; + }; +}; + +&usb_host { + vusb33-supply = <&mt6357_vusb33_reg>; + status = "okay"; +}; + &uart0 { pinctrl-0 = <&uart0_pins>; pinctrl-names = "default"; From patchwork Thu May 11 16:29:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ACF9C7EE31 for ; Thu, 11 May 2023 16:30:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237939AbjEKQai (ORCPT ); Thu, 11 May 2023 12:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238888AbjEKQaN (ORCPT ); Thu, 11 May 2023 12:30:13 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF547ED1 for ; Thu, 11 May 2023 09:30:09 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-94f4b911570so1395851866b.0 for ; Thu, 11 May 2023 09:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822607; x=1686414607; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=C7/CYIBH/pHsTfzDssN9nwq/nPPFsyiz7BrFyXp1Ut8=; b=GhJKDtTHvxfZLhn8dTuoKKjYYnoggNINpc4vG7TVWfidbQ67nB8eWT99wBAxKkwcfz VS2OvoFRypOCuKQz1x9o4+t2p1BxZV9RqL0we5aVvSzjkdtCiQmfO/NwiP5vyKUAY9rV 67dzyTNT6eBAqB0+LAaK7uVmuLTDSdYpZPUWmZ3g/SPwuhWDNxir6dLtiQzAxxmDJnDC d/AGLwdOhJejRpgtTvevv0yQ4HdVefB5jcen7RNlgUPtnLIcOPJ0IiJt8pKHtFoj1EVI Y06TBx46Dv7zwLBnJbSBYvZiwTRiYTgbIEOuOKhU9KgFfa7+amT6uqHshOnOADsUUzAZ uw9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822607; x=1686414607; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C7/CYIBH/pHsTfzDssN9nwq/nPPFsyiz7BrFyXp1Ut8=; b=kEdPTexx/JTEsCBwNw+95aPmkoNWYnmhb+a9MU1t1HsiMNpYeIS+Diz89Cu4Gg3HW/ AP5E7kMoUVs+cRRDMw0VUfn4MZHk7GfwhBaIOQ/bgoxCYuXyZctIszYEvk+fFj+ukzGl 9BsEKvrWf83bgnZJ7G8slw+xCuNsKlnW1nGxxRtG5AAnMMZEjn+ZV1PXd9BbMAm3R6Q9 KRVWjzDDe4eiq6JzUHGm1CRwX3g+lwLcw4si5+N0Ts97WE7Tf5ipZiqM1QAxooGuZlXT KhzgfN6LRav3UZgbhZiyNNJKwrla9h5AWhnIE7TiVQBL2doue6Y87UwW2LNIioY0U/zC qmAQ== X-Gm-Message-State: AC+VfDxF3TJJvjS1Vx+0m/+wCABVpwWGhKPPhxLd5FOSatejlquRznSF vk+/0+tBIKcvqH0Hw8gZJehw/A== X-Google-Smtp-Source: ACHHUZ48kDKdegEZk8cV/FApfJ0AGakPGUCGESAhYk6jGxd451PT3jIuODPVv9AXlPcva/FrRKXs/Q== X-Received: by 2002:a17:906:da88:b0:93a:353d:e38b with SMTP id xh8-20020a170906da8800b0093a353de38bmr20433926ejb.37.1683822607591; Thu, 11 May 2023 09:30:07 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:07 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:28 +0200 Subject: [PATCH v7 08/11] arm64: dts: mediatek: add ethernet support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-8-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2481; i=amergnat@baylibre.com; h=from:subject:message-id; bh=DjSelAdOZMPlRnOCXsPOw3j7Znol7iZuqfSQhuv0e3s=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgEuL8tv3XPLNCTsvVZGVz70gDf4DdWTusQ0f+3 BOJz1S2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBAAKCRArRkmdfjHUReCTEA CVmdX4q5lT6YXJzs7Qovo3u+IuaMF0ggKWFjpMDAFkBMXStBzEHV/8fBa3nnqVa7pgBHUiBC/3QbVi VV293B6g1r7bwPzN8mWb8R1YoBGz07J/rqY11LN4ERJ3UOBixaluzeMm7m6Y16uQowwl6/zCo3Uwrj kXomWO6tBUhZf20vFizrvtCfyhwZV26FANwI4P24Euk7AVFMHnjEosrwuOonrnZbbwx7O2oeKJJ+w1 XGH9HMvNXZRbIdhGQvNHuCDTlvd3pmS/uteI+dSKLki7K4wO5Gj2oOCHKN0vSRn4TCNzMQEckuHaZE jknzCGG2D98waFluNfPRw2EY+yMFLgFXmp7UCWKzjOdrVOWAcqEm0XM8SZqBgQZ7RI0T8PHwTjf+iu 8LTrJlLYmN+SShm70bGm21ElMzRete1jFfu33/JGE3S9yWzO8MedI5GMdB0bfVilPoQ40sk8NwlILs Q41DeTb2YIm0ocLdj3+eiIj2RJRFJlfuS9kOdn8jBbT7UQQYF5nSZwqWFbc6XVZz5Y1l3WsxEI3ycm zsbiABuo/3Fc2v+nuSiDJNYV+E886U9tvBLYdGHFXWisVkLPKSZMzmXrNHhbZd7bblD/AkXNwPPtFH 9D3/i8xpOWb5GLcaqs53ryDDye4bIwk2Hf9/uNANKshVaNDy5O5jjTdpvM9Q== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org - Enable "vibr" and "vsim2" regulators to power the ethernet chip. Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 3a472f620ac0..cf81dace466a 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -88,6 +88,28 @@ optee_reserved: optee@43200000 { }; }; +ðernet { + pinctrl-0 = <ðernet_pins>; + pinctrl-names = "default"; + phy-handle = <ð_phy>; + phy-mode = "rmii"; + /* + * Ethernet and HDMI (DSI0) are sharing pins. + * Only one can be enabled at a time and require the physical switch + * SW2101 to be set on LAN position + */ + status = "disabled"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + eth_phy: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + &i2c0 { clock-frequency = <100000>; pinctrl-0 = <&i2c0_pins>; @@ -137,12 +159,47 @@ &mt6357_pmic { #interrupt-cells = <2>; }; +/* Needed by analog switch (multiplexer), HDMI and ethernet */ +&mt6357_vibr_reg { + regulator-always-on; +}; + /* Needed by MSDC IP */ &mt6357_vmc_reg { regulator-always-on; }; +/* Needed by ethernet */ +&mt6357_vsim2_reg { + regulator-always-on; +}; + &pio { + ethernet_pins: ethernet-pins { + phy_reset_pins { + pinmux = ; + }; + + rmii_pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + }; + gpio_keys: gpio-keys-pins { pins { pinmux = ; From patchwork Thu May 11 16:29:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 680997 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FF39C7EE32 for ; Thu, 11 May 2023 16:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238805AbjEKQak (ORCPT ); Thu, 11 May 2023 12:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238820AbjEKQaO (ORCPT ); Thu, 11 May 2023 12:30:14 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F3067EE6 for ; Thu, 11 May 2023 09:30:09 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-966287b0f72so1175474166b.0 for ; Thu, 11 May 2023 09:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822608; x=1686414608; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=P8BG56Q0+m7b3FaG//0Q095XeVZlwC5hERE//1oBbUU=; b=ISfdWkZv/Iw828dOTZK6gvk3bjb4HRSYjlRZ3CAWigxamJ/UCk7oSNLJybZciZvuY3 PO7TRIPQoshED11yv/YYl4KkwzF9J+lyvWWoOyUB9PvGhnUa1ZrehCRtCQh9RRMpMv5J BNgrAOnOOILu2OX5oDxZiAC//sftWAJKYFjHCwcQokl/5BeAa4S/cY/Z4UjmQJvRVKLK bc4hxEA5w2DkCCntW5DUPxg1C/gbuaz3tS+jZ5Il1W7Vj+WVsZJDTbWLZisr+KA2qIML cNnJCsm5+RIx+M5OjcpgHdonwB/AyeZw9pC+dN+HPsNN7QwgIoSJI478Ol4Q2W+r1i90 w/gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822608; x=1686414608; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P8BG56Q0+m7b3FaG//0Q095XeVZlwC5hERE//1oBbUU=; b=W+ZgXQ+QAT3roE6zYWIVggSoBO6nb59CJAN7t6Ezp9C9UQfuMNwvR/JEAZlVKks6Xp 9GRpN23YGwrBgBO4/K2a607gOVGOMCMoNWWLsQlExOpns1F/itu9SkmObzpvPyQ/Ch0O WAMSlGoSMPzyWNu09trIq87SUDtsYrN6Se1OLYDFnepifDrZlLH89i54vx6ZDcGCLFcM fNBqtU+PXDsiHrQNtsSN1pjeZ+fVNSF7IOXaMMz7OCQfMUz0b8maipIUMxGdf8J6brQO mXC0ymrnxGT+u182X/RN40HXIXIxc2O+KikB/ZomJLK7RMtG4PykhVmSJASqyH4c+YOR YlBw== X-Gm-Message-State: AC+VfDz2GOBQayu1eke8oxNc/QBqTC9/ZMNpAbQdEOByi802vtx3ryTW HqcZXr7VdcZpPNNal8frS0JfcQ== X-Google-Smtp-Source: ACHHUZ4ADpoih4waHZ7BImsHI0anNX2jehque6QTdkuMQNOQAc6sInCgTKwjzQsCq1zw/UIa12FXuA== X-Received: by 2002:a17:907:868d:b0:953:64f4:e42e with SMTP id qa13-20020a170907868d00b0095364f4e42emr21611278ejc.5.1683822608649; Thu, 11 May 2023 09:30:08 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:08 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:29 +0200 Subject: [PATCH v7 09/11] arm64: dts: mediatek: add OPP support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-9-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3792; i=amergnat@baylibre.com; h=from:subject:message-id; bh=iQCxmnK+eQfy1aBNVxZAL4gcwl2Oh2buOTNBmT3l0E0=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgF3FMPqLuv2A066VWzfol3RhbYBg/ASlsCdms3 U9/U0C+JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBQAKCRArRkmdfjHURcrOD/ 97UlJm0hj5NYARhPphvJ4JCMZyZvOUydKzjJ6KZFD7jlzvNA8hI1z8e1dzS3VmQGXGrm0+JXfmXXfd 8eTwAmrLy6c+NGIpfjSYRzVm8nD6YFaLX8/aT1mYzXKBTPwmxN9BH4KG7Yb6Ryy0Groop1lVuEzBQI HByh3yGfh1xsz963oM0kEOpBe0SUG1qv5FuBWA37my4CFCrjrjRJ52lDhHNRMqTL5ElKOdyFupnvte J5sy7Gd4lm4Z3pYtVpVF2NY/b94fFeZP5ZeSv/94GnLH8zYqjRxT0My/qGDPBmc5XGzWyfcD66VPMu aKHYtphEjxMzisdBgPuo+0K03oLot7lqs+E2gxNLqH7xvMHH50VF/tkJj5eSnFAW9r/BN9YMEXyPGX kExKNLyZfOa5FS8aC/znt+cQHTwlLGxvYjsj5cTRZ3HeHMT2j9p1ZcgdN/eZDX8Zw6DLK2K2Eye9zO e3h9KlQ5L0OJkM2kDbiho5BcZaY7uV9taVXt1Bw4Z5eFJmk0E7KrUPl0YkBFrIIVE9oBUVq+VdWUPl nqzC1XCg2c+Pq9/FFGtECpj+tOy1A3qlqAJXsRtHkR1KpnmuIHQIHMUJf8/ZvBiSeCxrzSxXAucc3T PBnFgdEGL1rHAQJVmMVC+wIYyPu5H+K4TRrRKOUEMDXRiZiAIvOxblm9iYng== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In order to have cpufreq support, this patch adds generic Operating Performance Points support. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 101 +++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index bb45aab2e6a9..cfe0c67ad61f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -20,6 +20,91 @@ cpus { #address-cells = <1>; #size-cells = <0>; + cluster0_opp: opp-table-0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-850000000 { + opp-hz = /bits/ 64 <850000000>; + opp-microvolt = <650000>; + }; + + opp-918000000 { + opp-hz = /bits/ 64 <918000000>; + opp-microvolt = <668750>; + }; + + opp-987000000 { + opp-hz = /bits/ 64 <987000000>; + opp-microvolt = <687500>; + }; + + opp-1056000000 { + opp-hz = /bits/ 64 <1056000000>; + opp-microvolt = <706250>; + }; + + opp-1125000000 { + opp-hz = /bits/ 64 <1125000000>; + opp-microvolt = <725000>; + }; + + opp-1216000000 { + opp-hz = /bits/ 64 <1216000000>; + opp-microvolt = <750000>; + }; + + opp-1308000000 { + opp-hz = /bits/ 64 <1308000000>; + opp-microvolt = <775000>; + }; + + opp-1400000000 { + opp-hz = /bits/ 64 <1400000000>; + opp-microvolt = <800000>; + }; + + opp-1466000000 { + opp-hz = /bits/ 64 <1466000000>; + opp-microvolt = <825000>; + }; + + opp-1533000000 { + opp-hz = /bits/ 64 <1533000000>; + opp-microvolt = <850000>; + }; + + opp-1633000000 { + opp-hz = /bits/ 64 <1633000000>; + opp-microvolt = <887500>; + }; + + opp-1700000000 { + opp-hz = /bits/ 64 <1700000000>; + opp-microvolt = <912500>; + }; + + opp-1767000000 { + opp-hz = /bits/ 64 <1767000000>; + opp-microvolt = <937500>; + }; + + opp-1834000000 { + opp-hz = /bits/ 64 <1834000000>; + opp-microvolt = <962500>; + }; + + opp-1917000000 { + opp-hz = /bits/ 64 <1917000000>; + opp-microvolt = <993750>; + }; + + opp-2001000000 { + opp-hz = /bits/ 64 <2001000000>; + opp-microvolt = <1025000>; + }; + }; + cpu-map { cluster0 { core0 { @@ -50,6 +135,10 @@ cpu0: cpu@0 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; }; cpu1: cpu@1 { @@ -65,6 +154,10 @@ cpu1: cpu@1 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate", "armpll"; + operating-points-v2 = <&cluster0_opp>; }; cpu2: cpu@2 { @@ -80,6 +173,10 @@ cpu2: cpu@2 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate", "armpll"; + operating-points-v2 = <&cluster0_opp>; }; cpu3: cpu@3 { @@ -95,6 +192,10 @@ cpu3: cpu@3 { d-cache-line-size = <64>; d-cache-sets = <256>; next-level-cache = <&l2>; + clocks = <&mcucfg CLK_MCU_BUS_SEL>, + <&apmixedsys CLK_APMIXED_MAINPLL>; + clock-names = "cpu", "intermediate", "armpll"; + operating-points-v2 = <&cluster0_opp>; }; l2: l2-cache { From patchwork Thu May 11 16:29:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 681413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59690C7EE22 for ; Thu, 11 May 2023 16:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238496AbjEKQal (ORCPT ); Thu, 11 May 2023 12:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238893AbjEKQaU (ORCPT ); Thu, 11 May 2023 12:30:20 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6715B7684 for ; Thu, 11 May 2023 09:30:11 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-965c3f9af2aso1336072066b.0 for ; Thu, 11 May 2023 09:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822609; x=1686414609; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xmbKzKvCEVL3/Z+maa2frRisiuuXCYpfX7aC8pkvAmU=; b=q/dV1Kyz1sXGgpQBSBLe1o1ZHQPsO4KY0ZINVL7sF0dY5PWi8vtO4cTDNAXLPfoYqT 9TWMsb30K2KbCfPm9vbXw8PxwLzrni+5W8MkG6TPmYQyj3dQxHiz3rq+u7Htp34zZjTO 81APfL/5wjNQfqdsPXAFuh/lgTpuYKvt4vmFNYPPZNe2Eh9Qqd43X69hrrJaaI4rlczC V6Wmcmt+izh+xnOwPYeLQFjbX+D+RV64MzrntDtyBhQ5wF5EjCNdjy5DVmXZIw7Pn8pg EClDjEEEJxVAJptJLWkbq8w2gs7sIXQocpD/V1MXCO1OxSylOdkycHK1CuNanCgUxDAO HjRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822609; x=1686414609; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xmbKzKvCEVL3/Z+maa2frRisiuuXCYpfX7aC8pkvAmU=; b=FN1caXe/BjKcMnsngCiwGYpuzWH1SGpQSuLaiUieiy71FpzRefw/uWSll5Niwjua9R tOXMKX+TAoVPb1V/T2OQS2jDDbRP/G9M07vtETCS+g4fw7pLkne8zgBCZ2QzwGWg7pSq +rnfAOYIfn2mtMAC9jpXD9ZrSjyTPlCNtK3nQdA5qO3EnvbbCPW8XI+bMBGs3pUCLd8p M/LNMgwUjSikHH5GOebgofpMOOnHMVnhYeU8jrZbIt+RmkVf3hDYe1pB/FWkQCMfASuO XaGtsAaaI7rzjAEblBy4DK4GehnpZCKtf31HqtvGsOh72bgNDNkhEizsXHgFsdCx6MAq LQ4g== X-Gm-Message-State: AC+VfDw/erN+bgmidIchehM15f0BL5EMSGQuxLw5rAK4u82ydkkn8s4Q eb1E7kHGkApmm6IKctKladCRww== X-Google-Smtp-Source: ACHHUZ5uOZDaYJVg9Iy1QBY5C2GOopzZ8IjxRnoeyVNFQMDXFhaxHGCDIKTLpigjJCW/vtgDc5u0yw== X-Received: by 2002:a17:906:dc89:b0:957:862a:9e6e with SMTP id cs9-20020a170906dc8900b00957862a9e6emr25298127ejc.73.1683822609676; Thu, 11 May 2023 09:30:09 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:09 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 11 May 2023 18:29:30 +0200 Subject: [PATCH v7 10/11] arm64: dts: mediatek: add cpufreq support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-10-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1201; i=amergnat@baylibre.com; h=from:subject:message-id; bh=Rq9Zwic5qmJaMrB9niIQqjmYy4HHPOH7tnCD4z3ywik=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgFgHKPxikwHNlF53Z9K1ZVag508Iiu4ktC/Erl oNn1iLSJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBQAKCRArRkmdfjHURSf9D/ 9e8z/M0tLfGh8LKPOPWHUhEpwvDmDGhQ8Sv3EJVcvEbZlehDxc0bKZ5QPW486w7RiMvScyTOrwUwZ4 /4zH+gUCHFtEo4RbchFHkmCyoVmqBCClMQdJrA+75i4oFwtCCVyCibd6fZ53AUKjXIUJduasVXLzyQ x+4Vu2+iEH7jdwPzRI/UOnCOHdBlRtt5G5BiFHX+VkDkbzvheEJltDe9kqIaGeaxWGoxuqKjaSwr26 2ItedjGs3qapqQB4dv05/9CJZE3873C/K5QBOw9HOPjiKtGJJSD2PS9FLiDJcpMKAoRw7+FaEMseU9 OMijDOrupSFfBLHv0VEtBGa4FsjuTYcVM3uBV73z1eyr6YoakLjtjYJye/mHE8N8ek9oxg0mH5DJxQ iLTZFAmtZBebXV6us4SmHFT2mzpC9JGhz6rcUM+5Cul8znxNVYut+FPVVHfyDCo02z++xMHGCkXx4d tI51+YoFVcXeo6tBEPc3Q1s/xXXudIHndZ1UwRlYs2MSM4fk+aeWOkGkzmUhUTXytJiuoU9YoKD5YP yhZ3yu8mKKnXOYV9nR3C9tlHNK2zsmXgNEHMbVcKXqQ6hrPhgosIAXYnWqaRndO3fRcGgD6GqDfiU4 Mt2ma43fUmMRe8EQ+eqvpgq9TqQMSApPb7QUmqchapJpOMCevP9fvaYtC7tw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In order to have cpufreq support, this patch adds proc-supply and sram-supply for each CPU. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index cf81dace466a..b39b2bdfb82f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -88,6 +88,26 @@ optee_reserved: optee@43200000 { }; }; +&cpu0 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&cpu1 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&cpu2 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + +&cpu3 { + proc-supply = <&mt6357_vproc_reg>; + sram-supply = <&mt6357_vsram_proc_reg>; +}; + ðernet { pinctrl-0 = <ðernet_pins>; pinctrl-names = "default"; From patchwork Thu May 11 16:29:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 680996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 910B1C7EE2E for ; Thu, 11 May 2023 16:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238848AbjEKQal (ORCPT ); Thu, 11 May 2023 12:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238905AbjEKQaU (ORCPT ); Thu, 11 May 2023 12:30:20 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 337727D88 for ; Thu, 11 May 2023 09:30:13 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-50bd37ca954so81207161a12.0 for ; Thu, 11 May 2023 09:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1683822611; x=1686414611; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RRBwEvfGQIrh+pVMdhdSvf8KI6OxPqchD4EYbezjkwM=; b=afA0togys2/WCVNqYbtSl6wBcgtlb1iX4/Hi+Z+48VT//dtNljgbBaAl3lNwT5NQ1U V64qYSZXIaeW+Kl5rrQkRWmingsK4LrPv5mNpaP3CS9ZzWyvrGKPiTZnjyVc8s/d1Qrs 31pReZiVdfSaEWIFkvgnBg9wQHnQjJlWf/SQaAkT9LYXp6BP+Ztlzn+LLzRg8ge5T0w+ u70Xlp9ummOnpFr5duw8/CAf0Cfoj1yEdFs0347fo6Q9sJmB9eX6rZwKtuYeA+ffETcb 08VUXfcMKqB2kK5L0frsQh3/17eXGpX6IS7olGMAnPwbmVYF7bmp6okotCx3cLpYgZIW 4T7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683822611; x=1686414611; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RRBwEvfGQIrh+pVMdhdSvf8KI6OxPqchD4EYbezjkwM=; b=Dnry/srLczJfVL/VyyVhNptaMq5R4OqOkLMsjqBVmyBizHAFOIanel+zzF1OXg3sI3 Thg3JLTI3IOjaD9BuXgI2bcG84zTpMDdC4i9OM4U9Dky0fEMCkc79KIWngxEHKE3PbEq Q5kWEa3dHasGj6EUYfYRdVV2PmU/aYQdB1sp5jahmkcHx7U33YpersHcLUv1nT+rBvm4 zhiGX2PIkMUcKnA+phe/TTK0PhZ0J1sX1BIrUr8pifYi7TyvXs2RJrKfHl+0tf6jsBKZ xeTQdJTZA+66SC/73BYhK//oXMcJPaRR6H2ygnWsBUd2JtJw//PkNcVoA95s9B4Xqslz f+/Q== X-Gm-Message-State: AC+VfDyb4DT41wHHrD3W8/ljLpJYbCMA4zCsO2YefU22MIpyfqvtFpl+ FYCfqT/UjihHlLHAiGiBQ1Iuuw== X-Google-Smtp-Source: ACHHUZ5ztEmDWE2m42ORaSyVflfkAcBjj30Wzi1DlMGthfU1V9Lk1C1qZzJjaFoWDCd9w5A5cD2cOw== X-Received: by 2002:a17:906:5d13:b0:960:6263:138f with SMTP id g19-20020a1709065d1300b009606263138fmr20793864ejt.27.1683822611029; Thu, 11 May 2023 09:30:11 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id v9-20020a170906338900b0094ee99eeb01sm4209935eja.150.2023.05.11.09.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 09:30:10 -0700 (PDT) From: amergnat@baylibre.com Date: Thu, 11 May 2023 18:29:31 +0200 Subject: [PATCH v7 11/11] arm64: dts: mediatek: Add CPU Idle support MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v7-11-98cbdfac656e@baylibre.com> References: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> In-Reply-To: <20230203-evk-board-support-v7-0-98cbdfac656e@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Amjad Ouled-Ameur , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2737; i=amergnat@baylibre.com; h=from:subject:message-id; bh=vYzOQ2oc5j6ZLGT/M6bLKTIS/chNEplrOLaJKWbM7ds=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkXRgFAzS6LbWTWUcMEoCaR8sqFR9Xigsp8S0Hmy95 Jlm3L0uJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZF0YBQAKCRArRkmdfjHURTndEA Cex5rMbwQvMMzR73kflR/rwX5EN4mV+fpZkrlrvBamLuBzAKKj7uOGQqdw/Wks6I4YS/KYMM69x+lR z5GrCRQyHIJ+aL2Rfa/E1sQUxMqwY3HirlK7d2tM2A07/AiDc9pAebsAjOa9p5UeZAw+LLpV2zVfcy Gb+C8m2jwPbiU1GeGiLxWZJe5qarmv7uZU3r8a7KlEeOVN8teeOPcVml7+Uk8xXxU4NA72S6ahPKOw mjw79F0O/LlNWEuUJsFpqMzLnP8xRjFLPeiG5VxwMjJumTr1DKJObvcDnScO4jXR+hSu5d0KK9nSil Y7r1IGj1mhLZQfHaPsaDTJjDvdAPI26eJnPkTVrta3Lom/XYPchJ+lBchE/Ae+nbFLz/zn/0iX7ynV RTlb/swIKGAr8/BtpfWwZHhJM5u+9VjefT9TYVZ3Lm4D390TPM42taib/qj0AZ8PiFqUk6Xee5kcpx dT9pB3+fb0KwteX1w1iSeOvdU23qePJ8W5DceKAfkR+V+4s5sJ8xcLoUfwygcRkCN3IJx4B9ocXv1D pyWwvGkIIOXdaM7BMfbt/T/LPF5tSqOJSTJNcjak7LEI7dzuSVf9twuuw6cUoWgW9B24DyfUwMxjt0 gWJXIYWo8XUAkhZMxIPQOR8opD3H5B/jF2M/igVlb7rZplIGufiJvdDVGWow== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Amjad Ouled-Ameur MT8365 has 3 CPU Idle states: - MCDI_CPU. (Multi-Core-Deep-Idle) - MCDI_CLUSTER. - DPIDLE. (Deep-Idle) Signed-off-by: Amjad Ouled-Ameur Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index cfe0c67ad61f..413496c92069 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -128,6 +128,7 @@ cpu0: cpu@0 { reg = <0x0>; #cooling-cells = <2>; enable-method = "psci"; + cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>; i-cache-size = <0x8000>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -147,6 +148,7 @@ cpu1: cpu@1 { reg = <0x1>; #cooling-cells = <2>; enable-method = "psci"; + cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>; i-cache-size = <0x8000>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -166,6 +168,7 @@ cpu2: cpu@2 { reg = <0x2>; #cooling-cells = <2>; enable-method = "psci"; + cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>; i-cache-size = <0x8000>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -185,6 +188,7 @@ cpu3: cpu@3 { reg = <0x3>; #cooling-cells = <2>; enable-method = "psci"; + cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>; i-cache-size = <0x8000>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -198,6 +202,37 @@ cpu3: cpu@3 { operating-points-v2 = <&cluster0_opp>; }; + idle-states { + entry-method = "psci"; + + CPU_MCDI: cpu-mcdi { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x00010001>; + entry-latency-us = <300>; + exit-latency-us = <200>; + min-residency-us = <1000>; + }; + + CLUSTER_MCDI: cluster-mcdi { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x01010001>; + entry-latency-us = <350>; + exit-latency-us = <250>; + min-residency-us = <1200>; + }; + + CLUSTER_DPIDLE: cluster-dpidle { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x01010004>; + entry-latency-us = <300>; + exit-latency-us = <800>; + min-residency-us = <3300>; + }; + }; + l2: l2-cache { compatible = "cache"; cache-level = <2>;