From patchwork Fri Sep 2 08:11:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8CC2C54EE9 for ; Fri, 2 Sep 2022 08:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LPkD74By2RLnX7G9JNILzwAwAittr+SOHgkcpJA4KAc=; b=BnFsutNe6N0OE4 WO6L9qC2XDdkF+iNXw9bX+Cpc3BPZxLnuTpjK9Mz2ghtfJdI7NIK17LKmFm5tU309gXCMEBzYFA6K Yvn0r+QWUuc9PQDwwJpDLzz9nEHz+DdwHcODAeKhmtKfFTbmTsvLPDba7h097SA91IxxkERbWjRHb ni6KkA/J/0utxvFJdE7uEnxUVDG45IY7gKFQExZgTZ6V8RjNVYwhU5fU3i0R8krF1e51600V7Mxpd OkkOergiS3+Uzj7jRtL7Cz9PCDNlzV/SOMzWsUkqXZAPZ5a8JTtAniHAQkmwN8peGcFhtS//hmQxN K+nNRgCNX2u61OPz4V1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1ml-001g0K-Gz; Fri, 02 Sep 2022 08:12:19 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mh-001fv3-DZ; Fri, 02 Sep 2022 08:12:17 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id AC1876601F03; Fri, 2 Sep 2022 09:12:09 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106330; bh=3OWhZI1FxYYC6TsKTsim+28cYr7jRgmawjyY6vyOJfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bdpSDozB4BZBPyQyHm9CehdN4InFb5e8qwmWXUsh1dFcCzN9HMuK+xsPA+NR7x+tI WHWdWygG3Nt4zp/ib2pFc1b5SR0LaS+mEuKa85XPfIcVtpa9DXzWDf89AZQSETU5SN 5BbBFXnPqqQAE28rOiBDSAsVuSD/F4gSgtfac6hediAYoeyPpPLpiIdw1t2uUiVMK6 mpTGgYdNASG0RikibSckWDk5ZVhBmvQIBRQKnfVpKBM7dtQ0U0HV/iMYHYMrb04Gxc 3UWWVnAb70ReLDPmkAXiiSGf8cxb8qa4mvAJYppZyW2MDHxLxHPjOUPZPKOX55mgIL nH4gCXoucENlQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 1/7] arm64: dts: mediatek: cherry: Enable the System Companion Processor Date: Fri, 2 Sep 2022 10:11:50 +0200 Message-Id: <20220902081156.38526-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011215_722264_6DC04859 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org MT8195 features a SCP like some other older SoCs, and Cherry uses it for various tasks. Add the required pin configuration and DMA pool and enable the node. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index fcc600674339..e83d58d99757 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -104,6 +104,18 @@ usb_vbus: regulator-5v0-usb-vbus { enable-active-high; regulator-always-on; }; + + reserved_memory: reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + scp_mem: memory@50000000 { + compatible = "shared-dma-pool"; + reg = <0 0x50000000 0 0x2900000>; + no-map; + }; + }; }; &i2c0 { @@ -600,6 +612,14 @@ pins-low-power-pupd { }; }; + scp_pins: scp-default-pins { + pins-vreq { + pinmux = ; + bias-disable; + input-enable; + }; + }; + spi0_pins: spi0-default-pins { pins-cs-mosi-clk { pinmux = , @@ -643,6 +663,15 @@ &pmic { interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; }; +&scp { + status = "okay"; + + firmware-name = "mediatek/mt8195/scp.img"; + memory-region = <&scp_mem>; + pinctrl-names = "default"; + pinctrl-0 = <&scp_pins>; +}; + &spi0 { status = "okay"; From patchwork Fri Sep 2 08:11:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2CFDDC54EE9 for ; Fri, 2 Sep 2022 08:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rf6V5OhUR+my1YTpuoJZB3lGwN3vtv0hctLYi8iweS8=; b=IHc8MTUbYZGviq P1hN2G5LSifUEt9soAadRK8PHC82yy52J/m1J9QVGQKz+QfS0nJFKVVto4LYoGehwLl70cRnFSHby HSuKzTNsBEBUySlH4Mtp+BbSF9WrjEf9BwBKeDp5da6CQ/FWCVMTKjH+RMEoNInfnP1dwPo/HMoBj sEwPEyZgtWkHvnIRDrdlMiCrqYitfsySfOKC2r36siwh63bI9SXGXX6keNVAjgnPqGwcl4eOko8LA e7HZ4NFs3w/+Y7GkyBLLCOmmKZxgUndDwq58KKOoFN1JfbdJtfYrX6U9lLyprkB1RE/9VZjSgB3/R WiJCwCYjJz+mgVa7pWpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1nE-001gGG-Lo; Fri, 02 Sep 2022 08:12:48 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mh-001fv6-KJ; Fri, 02 Sep 2022 08:12:17 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 633DC6601F04; Fri, 2 Sep 2022 09:12:10 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106330; bh=BkTFjpWjreFqLLPuKAzGds7DfL2VWnDjKww2UUpwn54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KrYXImlpaSZAzED2tjaZ0MVPtKPXX40wO4wbGid3lXN571KxIpHLE/G2kpMRKuYKd CUlPoAgjwE5NhSsg9PVPSgPTIpysSuHW4IyZMFla7BBRwsArDd8Fr52E2dUAo7VNJI 2Z2CJg/ssxczHjvxAaCIXLCrVlQ9MNN640+pGAvytUoYMyk+WmsEeyXlkamtZ4DmCx SSdc1VB2cw2N+5G6nn1jlavjA3uQZz1JJYW18GpoxCTUmuXPujpptZWoKf8g5H6vwB 0pvMgdCyFWX85jgXgAVE3rrVSwc7pWerDgRjFn22yXzAzkObGA7kbYa5zg9m2ps+AM VOYeyp6N2y/SA== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 2/7] arm64: dts: mediatek: cherry: Wire up the ChromeOS Embedded Controller Date: Fri, 2 Sep 2022 10:11:51 +0200 Message-Id: <20220902081156.38526-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011215_880706_9099D7E0 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Wire up the ChromeOS Embedded Controller on SPI0 and its communication channel via SCP RPMSG along with all of the offered functionality, including Keyboard, Smart Battery Metrics (SBS), keyboard backlight, I2C tunnel, regulators and Type-C connector management. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index e83d58d99757..73f531f84fa2 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -426,6 +426,14 @@ &pio { "AP_SPI_FLASH_MOSI", "AP_SPI_FLASH_MISO"; + cros_ec_int: cros-ec-irq-default-pins { + pins-ec-ap-int-odl { + pinmux = ; + bias-pull-up = ; + input-enable; + }; + }; + i2c0_pins: i2c0-default-pins { pins-bus { pinmux = , @@ -670,6 +678,11 @@ &scp { memory-region = <&scp_mem>; pinctrl-names = "default"; pinctrl-0 = <&scp_pins>; + + cros-ec-rpmsg { + compatible = "google,cros-ec-rpmsg"; + mediatek,rpmsg-name = "cros-ec-rpmsg"; + }; }; &spi0 { @@ -678,6 +691,67 @@ &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; mediatek,pad-select = <0>; + + cros_ec: ec@0 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "google,cros-ec-spi"; + reg = <0>; + interrupts-extended = <&pio 4 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&cros_ec_int>; + spi-max-frequency = <3000000>; + + keyboard-backlight { + compatible = "google,cros-kbd-led-backlight"; + }; + + i2c_tunnel: i2c-tunnel { + compatible = "google,cros-ec-i2c-tunnel"; + google,remote-bus = <0>; + #address-cells = <1>; + #size-cells = <0>; + }; + + mt_pmic_vmc_ldo_reg: regulator@0 { + compatible = "google,cros-ec-regulator"; + reg = <0>; + regulator-name = "mt_pmic_vmc_ldo"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + }; + + mt_pmic_vmch_ldo_reg: regulator@1 { + compatible = "google,cros-ec-regulator"; + reg = <1>; + regulator-name = "mt_pmic_vmch_ldo"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3600000>; + }; + + typec { + compatible = "google,cros-ec-typec"; + #address-cells = <1>; + #size-cells = <0>; + + usb_c0: connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "host"; + try-power-role = "source"; + }; + + usb_c1: connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + power-role = "dual"; + data-role = "host"; + try-power-role = "source"; + }; + }; + }; }; &u3phy0 { @@ -729,3 +803,6 @@ &xhci3 { vusb33-supply = <&mt6359_vusb_ldo_reg>; vbus-supply = <&usb_vbus>; }; + +#include +#include From patchwork Fri Sep 2 08:11:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 051A5C54EE9 for ; Fri, 2 Sep 2022 08:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zBjxws6Y+PWyhvYk3EiNvIyXfwx50GdghSoNEyr5Ln8=; b=V2jRUa1x++2GA+ YsscncccgMOzizNJClToER1smV/icP19Ztgi0nPmy1x2hbUWGSQF4UO4DDxNmr2yA27w6EgXkPtvH T8BOeeAq+d8ThfjyIJ3rnPzjbEZLAbQKSXk5s9gH4UX9KMN0PPiRC2OX19cIGGU0qZs5ncjfxvxXT 7HazH3pMRy40l0qMCHVYWvscQEIAlw8eYvYP5S0lB1tZjz/o1wOh9SBJYBnG0OoPXKgty80Z8mx9q CacN5IqWpT1GNRr1rSYQZmOBOHaEoOgVAW+MrQ4K/TfX1ZLEWGvIZO7XLGuRLJfrL3Bg1SYXMAh1G VF45Q/YSpPFOvFa8uCCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mv-001g63-S6; Fri, 02 Sep 2022 08:12:29 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mh-001fvc-Ii; Fri, 02 Sep 2022 08:12:17 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1B64B6601F05; Fri, 2 Sep 2022 09:12:11 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106331; bh=wp3o4Y17CxutbsfUPDmxWZ120aLT+CWRC1GPj2X5+Bc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GLIpDl9BPR0MRTsh3do9lPthy0DgAYgsCPH4GemGyTGzHz9lWaDwkqHO0WxKBem4v Wcy8gU2uNsfRc2oKp/FmLEI3+4ylOnw4SQXOtcbDdxGVNhyws+OCmKfKX86rbaUT7+ x1VNrmMFBstODhPVoSDkqRYK+twVdc5JBaVdn8fckjAO3XqPbaf2bzLTRJjzW556Eq Ca9i4ePUHoyvTgt/nnY851ls2jCotbrJ5Bmx7NsIjCui7eyuNR09SFnk+BCj5LW2+5 ZMIIc4LHKHDydTIvw0SulkR130ir1D/adwcXpMH9RyfyZqMOEDleBN9CEnPl6n5Rkh EQCrsxgfaDtFg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 3/7] arm64: dts: mediatek: cherry: Add Google Security Chip (GSC) TPM Date: Fri, 2 Sep 2022 10:11:52 +0200 Message-Id: <20220902081156.38526-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011215_852365_419B27C3 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for the Cr50 Google Security Chip (GSC) found on this platform on I2C3 to support TPM and to also use it as an entropy source for the kernel. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 73f531f84fa2..a07e7fe66315 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -149,6 +149,14 @@ &i2c3 { clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins>; + + tpm@50 { + compatible = "google,cr50"; + reg = <0x50>; + interrupts-extended = <&pio 88 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&cr50_int>; + }; }; &i2c4 { @@ -426,6 +434,13 @@ &pio { "AP_SPI_FLASH_MOSI", "AP_SPI_FLASH_MISO"; + cr50_int: cr50-irq-default-pins { + pins-gsc-ap-int-odl { + pinmux = ; + input-enable; + }; + }; + cros_ec_int: cros-ec-irq-default-pins { pins-ec-ap-int-odl { pinmux = ; From patchwork Fri Sep 2 08:11:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963794 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4455FECAAA1 for ; Fri, 2 Sep 2022 08:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mBBPiNraY91CAZL6JKwwDet+ehnWYeXpAkBkIqQ/DSY=; b=K25/VnqY9KomzH TxyCACpbH82DWyFo2ZG16pJtYNyIZuybs2uUzzvLZn+Y16juIi3GZ5Ffv2kCeJqbdMDmtegLoma2Q FkhIMVGfnPo8IDgpon8e5cAn8x6OyLRH9W2Hgao8g/8/D9hNtyRxMZGPVQm6cuzkHQntPJqlaEVOb 4qpBnSiiadyJr2l8dEfhnGjnTKLjThm34bn7i86ZsEa8h9dh9LQABxuC0Zkd2ycI17nhO6wd+1CWh tvbn9acuxj9ElL8598ip51MnSNg2xOUnyWGOT7bnvSr55eIcjg6731hvqFCVEhR3bNEC79txKoE9f kJBcnBkUQAMhfvV1Mhyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1nS-001gOW-9p; Fri, 02 Sep 2022 08:13:02 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mh-001fw3-Il; Fri, 02 Sep 2022 08:12:19 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 13FEA6601F07; Fri, 2 Sep 2022 09:12:12 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106332; bh=998n5hMYVCUv2bH+6FpSZP5lPQ/OUg9EIEPIyAx2NbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eu0AcOGskTUT8S/+xhZ3n/Vd9VKnnDOS9BVh2oIZKTakgeTtbx1Zrf5t99wBOZVPP b/UQBCR+HwH2/Y2TmKgzkRym0lnclAYGlpL+nyA3I9PK5peBHWxpNbzNxxVy1VCAsi YEYIziloJVAUTZ8Gr71280wCE29dxCJIXIQXKwQKsKfPshDSacnw9lty/hlaM6umIE 7GLdQSQmwo7LJcDZSltwsyRNwdltGGyIcGEMCjkYFwkLzShVTZKuCiEb5AitnALKaY yEOFI352yeFq1pyVWXn77GM7e9dx59BD5z/+afQ6S56R6uNplOgXxCZeI74YI444tw eKllllaR5m7OQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 4/7] arm64: dts: mediatek: cherry: Add keyboard mapping for the top row Date: Fri, 2 Sep 2022 10:11:53 +0200 Message-Id: <20220902081156.38526-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011215_891477_DB078AD1 X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Chromebooks' embedded keyboards differ from standard layouts for the top row, as this one doesn't have the standard function keys but shortcuts instead: map these keys to achieve the functionality that is pictured on the printouts. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index a07e7fe66315..1174ab344e47 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -821,3 +821,33 @@ &xhci3 { #include #include + +&keyboard_controller { + function-row-physmap = < + MATRIX_KEY(0x00, 0x02, 0) /* T1 */ + MATRIX_KEY(0x03, 0x02, 0) /* T2 */ + MATRIX_KEY(0x02, 0x02, 0) /* T3 */ + MATRIX_KEY(0x01, 0x02, 0) /* T4 */ + MATRIX_KEY(0x03, 0x04, 0) /* T5 */ + MATRIX_KEY(0x02, 0x04, 0) /* T6 */ + MATRIX_KEY(0x01, 0x04, 0) /* T7 */ + MATRIX_KEY(0x02, 0x09, 0) /* T8 */ + MATRIX_KEY(0x01, 0x09, 0) /* T9 */ + MATRIX_KEY(0x00, 0x04, 0) /* T10 */ + >; + + linux,keymap = < + MATRIX_KEY(0x00, 0x02, KEY_BACK) + MATRIX_KEY(0x03, 0x02, KEY_REFRESH) + MATRIX_KEY(0x02, 0x02, KEY_ZOOM) + MATRIX_KEY(0x01, 0x02, KEY_SCALE) + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ) + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN) + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP) + MATRIX_KEY(0x02, 0x09, KEY_MUTE) + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN) + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) + + CROS_STD_MAIN_KEYMAP + >; +}; From patchwork Fri Sep 2 08:11:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963796 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0996C6FA83 for ; Fri, 2 Sep 2022 08:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P7j94FOyEOdyCbByplcX9fnRIrY4H0BrTgBk+Zg6vKU=; b=Zruh2W/Us7/S1l LAvTDE38TEVDkRU6CzwkNWuVkWIrCp6f4Ljyvs0FsCFUJgjZle8w+epJlWN6jAnmWEl9aOrahLoY7 3k+DDfWQPUhq6q0DhE6fXWqdkYsXQFJy6EmWdtXC4E9cJAXisuJqfwI6xzVeja8DNsRiQBwUENo39 /X51XaucOh3nuariLAWktpEa9tpTUGjjSBgdjyqHbSxV7YYoepncdc29IaXMszD0EBAjHhcDNm4Z0 9R16dHaVtOLiDIcW1AuU54mBbt1izeUv1+29XXPHuRLy7GzgYxwinwPTX/iTbLzjbQSUNpvagyeyA Y3cTZrPB0yo8v+eq4SSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1oJ-001h4l-Iu; Fri, 02 Sep 2022 08:13:55 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mk-001fzg-Qr; Fri, 02 Sep 2022 08:12:20 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id BE57D6601F08; Fri, 2 Sep 2022 09:12:12 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106333; bh=kikhFjYsB8fpNC7NnVXcUriNohFHIleRV+n+9fHCOGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cyomPQIahsfs6RWYlKvHFzgV7+WcWnlb2ttOMedzpX6fL+Bhyd6aO0+xd1bvOkzbq o5a8x7V6ZYvV7Z60kzytKLjFvPTyfNZ/+6CwF0ifrD6oWWRIa0tRSKTZFPMECQR8v2 OB7zJHJEPV2BHzpQ/RljDGK6m56b/aSdcjLdxqYqI1eDcQF2qze/JxRsiaPr6jtLF1 Btdu6n6BP36aQJ4lAyFsWU+Rqbcqb+xEHLPln/wW8XOoCq845chB+x9S/uND7U2beF T5FHB1TjcMS6wYzD5tRnbzX1MueEmHWRmlxNHfU/yUlWZTEeEgFMPc64cv/SwpZTLv O4AgdpuGi4SQA== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 5/7] arm64: dts: mediatek: cherry: Enable secondary SD/MMC controller Date: Fri, 2 Sep 2022 10:11:54 +0200 Message-Id: <20220902081156.38526-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011219_037840_49F93DE2 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As of now, all of the boards based on the cherry platform have a usable secondary SD/MMC controller, usually for SD cards: enable it to allow both booting from it and generally accessing external storage. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 1174ab344e47..0654a28e6782 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -17,6 +17,7 @@ aliases { i2c5 = &i2c5; i2c7 = &i2c7; mmc0 = &mmc0; + mmc1 = &mmc1; serial0 = &uart0; }; @@ -227,6 +228,24 @@ &mmc0 { vqmmc-supply = <&mt6359_vufs_ldo_reg>; }; +&mmc1 { + status = "okay"; + + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&pio 54 GPIO_ACTIVE_LOW>; + max-frequency = <200000000>; + no-mmc; + no-sdio; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_pins_default>, <&mmc1_pins_detect>; + pinctrl-1 = <&mmc1_pins_default>; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&mt_pmic_vmch_ldo_reg>; + vqmmc-supply = <&mt_pmic_vmc_ldo_reg>; +}; + /* for CPU-L */ &mt6359_vcore_buck_reg { regulator-always-on; @@ -575,6 +594,32 @@ pins-rst { }; }; + mmc1_pins_detect: mmc1-detect-pins { + pins-insert { + pinmux = ; + bias-pull-up; + }; + }; + + mmc1_pins_default: mmc1-default-pins { + pins-cmd-dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = <8>; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + drive-strength = <8>; + bias-pull-down = ; + }; + }; + nor_pins_default: nor-default-pins { pins-ck-io { pinmux = , From patchwork Fri Sep 2 08:11:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3BABDECAAA1 for ; Fri, 2 Sep 2022 08:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zPzMKVfCjlWqG99o1yP6yym7jk6XjMrBIFuFFxav/ls=; b=xe5QPqtMzIcFqZ kMaLxoqFjA0kS/IKLx7PGPf9ZeGNMAGlo331u8Ju5Op5ldsPONw9RIDL3Tkp+lWIyJHBhfARiWYHK scURRqAypJuGjzxfQSBaH+m6m8DJrfA7E3FMKTvKnpYVcKZimwQ8orwuyFGWN9WcV5DqULbcItxKy zqc4/w+rci8K08piQaNHC4yfq/6hU33gOIPymxVF3hvJFy6L71iJOQVxkS6D7vY9sCH5xW4A67GTN C4alubUlyjahsGsAU3s3nFgx4kktT0sP+eupPXw3kDV611IW8T/RsZDHTCxbF9SyBT0kX9bNttQ/b hbBBPf1Ozztt5WtnzSCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1ny-001gmV-JF; Fri, 02 Sep 2022 08:13:34 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1mk-001fzf-Qb; Fri, 02 Sep 2022 08:12:20 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7575F6601F09; Fri, 2 Sep 2022 09:12:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106334; bh=4LxPwcVeTnZVaB30DwcaoVYhEeK36Lo9JgoJohkej1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E+PfIFB+Tp4aImPoC1HbSDaSIOeVts+B3905EULsfoDYB3tzFSLz6jrtBr2kFxgiH Q6BSWoGfmNnWzb4q5UbAqYO+tZFv8/MFhC8r78gERpYGMP4pdKK0jvRtWDy1Wi9mjc 1Lf3kjef9Q7Pz1OsXyFT2LU1VMMtPwcuDdxA3vCGuwyIBB+uF5bDoJIb1z28tS+50P CfpbyaLz6s118POTTIZAzxvoH2u2Ld1eJ3w692oTMLNiZSUHfuGfv8yKtzpAaIKtep 6IHLvErbgETuEwIX10CWewHodnxwXtBaVOpP3oJu6QcMZq45KUY4BLTFuVYz3mentS mAeAvhk5GG+7Q== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 6/7] arm64: dts: mediatek: cherry: Enable Elantech eKTH3000 i2c trackpad Date: Fri, 2 Sep 2022 10:11:55 +0200 Message-Id: <20220902081156.38526-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011219_029690_E1B5B2A9 X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Cherry platform uses an Elantech touchpad/trackpad: enable probing it at address 0x15 on I2C1. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 0654a28e6782..ee59619068d9 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -134,6 +134,16 @@ &i2c1 { i2c-scl-internal-delay-ns = <12500>; pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; + + trackpad@15 { + compatible = "elan,ekth3000"; + reg = <0x15>; + interrupts-extended = <&pio 6 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&trackpad_pins>; + vcc-supply = <&pp3300_s3>; + wakeup-source; + }; }; &i2c2 { @@ -710,6 +720,14 @@ subpmic_pin_irq: pins-subpmic-int-n { }; }; + trackpad_pins: trackpad-default-pins { + pins-int-n { + pinmux = ; + input-enable; + bias-pull-up; + }; + }; + touchscreen_pins: touchscreen-default-pins { pins-int-n { pinmux = ; From patchwork Fri Sep 2 08:11:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12963797 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D03A6C6FA81 for ; Fri, 2 Sep 2022 08:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vvfUnq4ZZLmxN+60B8gQuhY1FGNoiZrJX5c4W1x4h4c=; b=kFd5urrB8Mf3Fk +XTTwXWKcg665s4q8Mp8zGIUMeewWQTUkc+Zdl6+E+tVF8hBftq5AGNqXvtGAcWr8W/BnxyFS0kBW Q1NkIdwKcYNCfwdeTesWsUKx3sG0jot2+lz23Shz36lViVkBwer+oEH7hE4sVLo+L2nifbkPTOfLd f6sdRjA7S+lbBU6WIgZXRY6z5xbIN0i8O3ImaS9HCQCe1Mcf507NCJ33Iyo+ySBjAeXr8i+++dlYs ec5Tx09onmnWINfXRZejDCaelXWFNhQVOU9o+n8bdJVBhHurR7UG+qFr5Bwsrl+FJEjdJtC6ET/rH afmbGqtv9skaWbZVwTtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1oe-001hOm-Kd; Fri, 02 Sep 2022 08:14:16 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1ml-001fzn-06; Fri, 02 Sep 2022 08:12:20 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2D5A06601F0A; Fri, 2 Sep 2022 09:12:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662106334; bh=YhFaf65iorIyRZ0aTehbgCAzAziop4kjadNUEtvfcus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=julMrODEKQxikvddmC/0mTNajCESQm6RvSk2nr8evTeNfra+wxaG94rPRSubrGMMo 8nUHqlTpwGTlsSAseu2gyhQ2WoTuhdygm7oPj6ExV8K2R9TjqQHgtgZxJe7UT7M6cx WAi4TOOh4FiS9ktjvENpMTj9o27+027p3BMS9ISe6yEEGe1Ne39HXzyw7oVGOzvnrR qRm0JtA2Dfcb8MZjyoqGEytxOGvQXSzUr8UrfsuTHE/DoYtChnOweeKkWim+zL9Jtf o4G1sn0sHtLKxvuWzKr3A77yYqUsbKURi8N9ca9YWlTmoOlrjFY8GMPo0ZxiFgomQw vivLt3PE+Xggw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v3 7/7] arm64: dts: mediatek: cherry: Enable MT6315 regulators on SPMI bus Date: Fri, 2 Sep 2022 10:11:56 +0200 Message-Id: <20220902081156.38526-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> References: <20220902081156.38526-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_011219_214144_D36B1588 X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All machines in the Cherry platform use MT6315 over SPMI: add the two instances, providing Vbcpu and Vgpu regulators. Signed-off-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index ee59619068d9..9b62e161db26 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -4,6 +4,7 @@ */ #include +#include #include "mt8195.dtsi" #include "mt6359.dtsi" @@ -832,6 +833,47 @@ usb_c1: connector@1 { }; }; +&spmi { + #address-cells = <2>; + #size-cells = <0>; + + mt6315@6 { + compatible = "mediatek,mt6315-regulator"; + reg = <0x6 SPMI_USID>; + + regulators { + mt6315_6_vbuck1: vbuck1 { + regulator-compatible = "vbuck1"; + regulator-name = "Vbcpu"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1193750>; + regulator-enable-ramp-delay = <256>; + regulator-ramp-delay = <6250>; + regulator-allowed-modes = <0 1 2>; + regulator-always-on; + }; + }; + }; + + mt6315@7 { + compatible = "mediatek,mt6315-regulator"; + reg = <0x7 SPMI_USID>; + + regulators { + mt6315_7_vbuck1: vbuck1 { + regulator-compatible = "vbuck1"; + regulator-name = "Vgpu"; + regulator-min-microvolt = <625000>; + regulator-max-microvolt = <1193750>; + regulator-enable-ramp-delay = <256>; + regulator-ramp-delay = <6250>; + regulator-allowed-modes = <0 1 2>; + regulator-always-on; + }; + }; + }; +}; + &u3phy0 { status = "okay"; };