Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp729126iog; Wed, 29 Jun 2022 09:03:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1voBg2DPL41WBYCuHS5gxXdTdUTTGrAwYlnTZIY+3KvjaRExjK9BHKBTKqXc0KNhxWl+FGs X-Received: by 2002:a17:90b:390e:b0:1ed:1133:8711 with SMTP id ob14-20020a17090b390e00b001ed11338711mr4506138pjb.90.1656518585857; Wed, 29 Jun 2022 09:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656518585; cv=none; d=google.com; s=arc-20160816; b=OtI784M+r/h+CyWhP6y/+n/H7+AW0V0aFU1Sk0dsHSJ1vffjUHtok9R/7udxJOHhHV c+xEe2MLLCR4BDojd4B5hBH4P/QVQFjCEiwFGfQbJYX7yZVGVmfYXZAnadb7psdmbW/7 Ho74TW5emqihRjpZc98cIO3+mPuXg6OGQqt3XgYzLMxZQW7AxurXsUgVGxE6uRLRZ0z3 gxF49Lnr+7bk3peZZqh59MxDUrVUIKbxvftfmDsde4yX3VnxXZv5+2evzdmPL7uzoWFP Jj5Nmh6CQsuqHQ3uEPK3Rk5vSF3ZjTgcZOLvZEvPbjTfgS0op9naHCV1KJGlGNwgkrtX 2BcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ws6Nlmsrs7fmJ5igck8uPciOqALX8t+9ov9cQUKHHKQ=; b=As4KxwTn54OoYHy2QfCR22i0unv4ZRpEUM1pSBI1yT/JR4G44jYGvuvpOHVwe56N0X fA8hAVgdy2FLiaO4HiD6YbZnD8zsBvzcL2JgW2xC8jdrOBXS6NPlwqsIhUKF+60rKbgB ALxQ9WDk1U1cgkDCJbTqxp/DbOYaZDtCTrsK/oR9ZFqQ4/cIXwOQReaWzMc/8lDF3Chs 2ExBunweRWFKTM71Xr+HH5vreFoQeuI5IJSjXLIvTMsljzAVz8Uq6mFEPiAMSw1hd69e 04SLwAGE+sUtN4ut2iWsoFdkfjlWqCczUVoFsj77wlAliX38ZyIZQBF9Xij8eUL3G5o7 qJ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Bs0N+97W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a056a00150800b0050605f7112bsi26242028pfu.130.2022.06.29.09.02.40; Wed, 29 Jun 2022 09:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Bs0N+97W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234104AbiF2QAd (ORCPT + 99 others); Wed, 29 Jun 2022 12:00:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234238AbiF2QAP (ORCPT ); Wed, 29 Jun 2022 12:00:15 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77CF21D33B; Wed, 29 Jun 2022 09:00:13 -0700 (PDT) Received: from notapiano.myfiosgateway.com (pool-98-113-53-228.nycmny.fios.verizon.net [98.113.53.228]) (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: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2D6E96601967; Wed, 29 Jun 2022 17:00:11 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656518412; bh=RMpC7msGnNKAM7uk86ht5QA2izSfq/gh610fxQejVhw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bs0N+97WYD/VZ1ms59+wyryFPnLK72LcqPhyBx3T/gSa9LC8svbQftcYEo37GGW80 efuaw1RDu1bPwZeGTN1E2a4i8Y3KicXyXa5gltDGQDp/yETI6e2KnQ1pI0wJHPoFFh dXxslJw+XPlPRFE392+X1Nq6UtQdk7o/47mjZFWBUdxul0gz5Wv1bGKbpP4M+vjrtK n/6l1tJPg+fT+SdyvVlb/2vbGPCtAHdYvUu6cTDHR88WC2KX26XoHdKP5+jpz1Iw/l indPvI3L4Ala69UDD8hCi7LX/xKRRBpjQqg1t3CYRfj6DIKQpfUB2+pnjsciYx4lOb RGi8d9TplkEdw== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger Cc: AngeloGioacchino Del Regno , kernel@collabora.com, Chen-Yu Tsai , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v4 06/19] arm64: dts: mediatek: asurada: Enable and configure I2C and SPI busses Date: Wed, 29 Jun 2022 11:59:43 -0400 Message-Id: <20220629155956.1138955-7-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220629155956.1138955-1-nfraprado@collabora.com> References: <20220629155956.1138955-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Asurada platform has five I2C controllers and two SPI controllers that are used. In preparation for enabling the devices connected to these controllers, enable and configure their busses. Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai --- Changes in v4: - Switched mediatek,drive-strength-adv for drive-strength-microamp - Switched mediatek,pull-up-adv for bias-pull-up .../boot/dts/mediatek/mt8192-asurada.dtsi | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi index ca55dd095e80..72dc974fe6fc 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -85,6 +85,47 @@ ppvar_sys: regulator-var-sys { }; }; +&i2c0 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; +}; + +&i2c1 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; +}; + +&i2c2 { + status = "okay"; + + clock-frequency = <400000>; + clock-stretch-ns = <12600>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; +}; + +&i2c3 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; +}; + +&i2c7 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c7_pins>; +}; + &pio { /* 220 lines */ gpio-line-names = "I2S_DP_LRCK", @@ -311,6 +352,91 @@ &pio { "AUD_DAT_MOSI1", "AUD_DAT_MISO0", "AUD_DAT_MISO1"; + + i2c0_pins: i2c0-default-pins { + pins-bus { + pinmux = , + ; + bias-pull-up = ; + drive-strength-microamp = <1000>; + }; + }; + + i2c1_pins: i2c1-default-pins { + pins-bus { + pinmux = , + ; + bias-pull-up = ; + drive-strength-microamp = <1000>; + }; + }; + + i2c2_pins: i2c2-default-pins { + pins-bus { + pinmux = , + ; + bias-pull-up = ; + }; + }; + + i2c3_pins: i2c3-default-pins { + pins-bus { + pinmux = , + ; + bias-disable; + drive-strength-microamp = <1000>; + }; + }; + + i2c7_pins: i2c7-default-pins { + pins-bus { + pinmux = , + ; + bias-disable; + drive-strength-microamp = <1000>; + }; + }; + + spi1_pins: spi1-default-pins { + pins-cs-mosi-clk { + pinmux = , + , + ; + bias-disable; + }; + + pins-miso { + pinmux = ; + bias-pull-down; + }; + }; + + spi5_pins: spi5-default-pins { + pins-bus { + pinmux = , + , + , + ; + bias-disable; + }; + }; +}; + +&spi1 { + status = "okay"; + + mediatek,pad-select = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins>; +}; + +&spi5 { + status = "okay"; + + cs-gpios = <&pio 37 GPIO_ACTIVE_LOW>; + mediatek,pad-select = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi5_pins>; }; &uart0 { -- 2.36.1