From nobody Thu Nov 14 10:21:20 2024 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 34E54C433F5 for ; Wed, 16 Mar 2022 15:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357155AbiCPPPk (ORCPT ); Wed, 16 Mar 2022 11:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357199AbiCPPPK (ORCPT ); Wed, 16 Mar 2022 11:15:10 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0400E51E7D; Wed, 16 Mar 2022 08:13:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 94BFB1F4467B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647443618; bh=enIv65xIz/LQWh/DPBxtnq0kzu+DCLgUdEOM/boND/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UaGSSGHTUXuSIBvDX1tYy0LMYkYn1J6J2aMsJpf3WeNfdNaELQZ/ni0qsdps+6FAI 7SlYw9+46MqGlHWG4NZF5Ym3Aw4HL4npAlnDwkzeVlwbZJprasBs4OnLAEs7GlvyRv jpcdB5iCcAGcO6GJQn0c0d2O79uywW15olDNAywL3kU3bOJs+0XHtQVRE/GQR0OFUG JRq8O8HiJnbtIDUXdeLhghnAuzGaG4zWDgx2taSgSKlynk1m4GZl2zmnPUdFJXzPUY YEctQcKVNUWHZILp8FYbLPQ12o5E0miMJNR4G0NIA3qWzUl4Xtymh1iAIuIQ9s/u60 t2AgUoUQM0jfg== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v1 05/10] arm64: dts: mediatek: asurada: Add ChromeOS EC Date: Wed, 16 Mar 2022 11:13:22 -0400 Message-Id: <20220316151327.564214-6-nfraprado@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220316151327.564214-1-nfraprado@collabora.com> References: <20220316151327.564214-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the ChromeOS Embedded Controller present on the Asurada platform. It is connected through the SPI1 bus and offers several functionalities: base detection, PWM controller, I2C tunneling, regulators, Type-C connector management, keyboard and Smart Battery Metrics (SBS). Signed-off-by: N=C3=ADcolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8192-asurada.dtsi | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/= boot/dts/mediatek/mt8192-asurada.dtsi index 3c5b1e475cf6..bd2730ab6266 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -353,6 +353,14 @@ &pio { "AUD_DAT_MISO0", "AUD_DAT_MISO1"; =20 + cros_ec_int: cros-ec-irq-default-pins { + pins-ec-ap-int-odl { + pinmux =3D ; + input-enable; + bias-pull-up; + }; + }; + i2c0_pins: i2c0-default-pins { pins-bus { pinmux =3D , @@ -432,6 +440,74 @@ &spi1 { mediatek,pad-select =3D <0>; pinctrl-names =3D "default"; pinctrl-0 =3D <&spi1_pins>; + + cros_ec: ec@0 { + compatible =3D "google,cros-ec-spi"; + reg =3D <0>; + interrupts-extended =3D <&pio 5 IRQ_TYPE_LEVEL_LOW>; + spi-max-frequency =3D <3000000>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&cros_ec_int>; + + #address-cells =3D <1>; + #size-cells =3D <0>; + + base_detection: cbas { + compatible =3D "google,cros-cbas"; + }; + + cros_ec_pwm: ec-pwm { + compatible =3D "google,cros-ec-pwm"; + #pwm-cells =3D <1>; + + status =3D "disabled"; + }; + + i2c_tunnel: i2c-tunnel { + compatible =3D "google,cros-ec-i2c-tunnel"; + google,remote-bus =3D <0>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + mt6360_ldo3_reg: regulator@0 { + compatible =3D "google,cros-ec-regulator"; + reg =3D <0>; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <3300000>; + }; + + mt6360_ldo5_reg: regulator@1 { + compatible =3D "google,cros-ec-regulator"; + reg =3D <1>; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + }; + + typec { + compatible =3D "google,cros-ec-typec"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + usb_c0: connector@0 { + compatible =3D "usb-c-connector"; + reg =3D <0>; + label =3D "left"; + power-role =3D "dual"; + data-role =3D "host"; + try-power-role =3D "source"; + }; + + usb_c1: connector@1 { + compatible =3D "usb-c-connector"; + reg =3D <1>; + label =3D "right"; + power-role =3D "dual"; + data-role =3D "host"; + try-power-role =3D "source"; + }; + }; + }; }; =20 &spi5 { @@ -446,3 +522,6 @@ &spi5 { &uart0 { status =3D "okay"; }; + +#include +#include --=20 2.35.1