Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp704206iog; Thu, 30 Jun 2022 08:37:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sun7bnafLPff/tDWmy4ajDNdnJjwiVEtjgGqqE4UXcPiV9O8fUCrqFFCK+01tn0CGsmrPu X-Received: by 2002:a05:6402:34d4:b0:437:7b19:13af with SMTP id w20-20020a05640234d400b004377b1913afmr12184983edc.372.1656603423089; Thu, 30 Jun 2022 08:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656603423; cv=none; d=google.com; s=arc-20160816; b=QVCvFDbyW2IAVbmfaK9G9Yo0gIAt04Jc8dG5x8eb9QcAfIaMKqQEFFbcqSHcBHi3P9 928dZoywFJ05ZGWebm8GOFchBlg/9sCRvWtlubCUPFg7rD+snazKJywBJw9Y5VOsRmcS n9AJLl3+/EQ97mkLPjk9ZR6uJ15GMzp21nTLzVnE2E46cEYmR8nT/G+9atwgwX5JnHfs 0qUwTxnJd0dy3sUsXtvc2wKDiKWB9b0Q+4Wbs12lnkUSH1fZyi7BwHWMDsAmakIaW69P QXR9Lew60ZxjLPlhoi6k5xiKX8wH4THped7eJz5L6bwpJYY1rfW3kuzHsIGWdqfFTALm 5ErQ== 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=jeEtVGru+oCixivJQ3DUF1ie0h/2qhrDPIpsYCRFUzw=; b=tTwn/z/Eznxex5wB5LKfAY3Eu3jGZiinDvO8FcNhEIf0aBBH/KMFqii2GhV/cWFfwL t9idBBEJDBLxnReEz05yHnJX5mv4aaTSkyDXY4wj4mDAVL3szbbnPRwNzaZrGBLRMiUP LTa2d7J6dCLd/pqmWlMxpaYxv1HfFLmDqkEDeYDH9Q7WIy4KcciCR0KJ7VkLDngG4MT4 jEEX7nNe7fNoSURyC64/9MtzsEgIXpK2uNJ7pOHAT9w3UBp6LGcgQu0vQtORl+Ggf3Hu rFGYspNlsoTpbw2LhKHZI3UsSqZOW1G4NN1njqoSn9ts4UrZukH63vUIvbQxs5oCEmEa vSWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U3Wu68IT; 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 qb1-20020a1709077e8100b006f8ee02afbbsi4631315ejc.513.2022.06.30.08.36.37; Thu, 30 Jun 2022 08:37:03 -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=U3Wu68IT; 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 S235902AbiF3PeC (ORCPT + 99 others); Thu, 30 Jun 2022 11:34:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236010AbiF3Pdd (ORCPT ); Thu, 30 Jun 2022 11:33:33 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5CA3E5FE; Thu, 30 Jun 2022 08:33:31 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id B81E16601973; Thu, 30 Jun 2022 16:33:29 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656603210; bh=Yu1ylTS6SF8MH4BwKjAHfrYNfUvsmb2vIoFkPyc5v00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U3Wu68ITixchJo0cENfYR9UeUrhxotEz0FR5oaFMPze40emxZOFfYB1OTVNXfNqEo 7mp54uiTKLrRVWcLPbNM77ZKn4wpkUusSMZc46cZLPpHm8krJgl7pLXMg99kdd2sC0 yhk/aaqDlsz/8D/t4hIwc7yhw4/zZItLMF26RYz3QzDH4f1lxd8JR9DkHJQp5drxaL 7ZD3rfIV42KWj/XsAcewUOs76yMPH+IZpk3t3RZFbexmdd+Lk9zR5QnIGTUpFJlADJ bw4yizKFg3vLrVOOZbiWmmZyojwfiMeEFCYn+G9VXKH06QKckpT9TlongdQy4Wbl+k eyPU7RpymvwEw== From: AngeloGioacchino Del Regno To: robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, hsinyi@chromium.org, nfraprado@collabora.com, allen-kh.cheng@mediatek.com, gtk3@inbox.ru, luca@z3ntu.xyz, sam.shih@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wenst@chromium.org Subject: [PATCH 07/11] arm64: dts: mediatek: cherry: Enable I2C and SPI controllers Date: Thu, 30 Jun 2022 17:33:12 +0200 Message-Id: <20220630153316.308767-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220630153316.308767-1-angelogioacchino.delregno@collabora.com> References: <20220630153316.308767-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 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 This platform uses eight I2C controllers and one SPI controller: in preparation for enabling devices attached to these controllers, add basic configuration to enable the busses. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 2f70341bba91..23a86d07274c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -9,6 +9,13 @@ / { aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; + i2c5 = &i2c5; + i2c7 = &i2c7; mmc0 = &mmc0; serial0 = &uart0; }; @@ -88,6 +95,65 @@ ppvar_sys: regulator-ppvar-sys { }; }; +&i2c0 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pin>; +}; + +&i2c1 { + status = "okay"; + + clock-frequency = <400000>; + i2c-scl-internal-delay-ns = <12500>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pin>; +}; + +&i2c2 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pin>; +}; + +&i2c3 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pin>; +}; + +&i2c4 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_pin>; +}; + +&i2c5 { + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c5_pin>; +}; + +&i2c7 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c7_pin>; +}; + &mmc0 { status = "okay"; @@ -300,6 +366,68 @@ &pio { "AP_SPI_FLASH_MOSI", "AP_SPI_FLASH_MISO"; + i2c0_pin: i2c0-default-pins { + pins-bus { + pinmux = , + ; + bias-disable; + drive-strength-microamp = <1000>; + }; + }; + + i2c1_pin: i2c1-default-pins { + pins-bus { + pinmux = , + ; + bias-pull-up = <1000>; + drive-strength-microamp = <1000>; + }; + }; + + i2c2_pin: i2c2-default-pins { + pins-bus { + pinmux = , + ; + bias-disable; + drive-strength-microamp = <1000>; + }; + }; + + i2c3_pin: i2c3-default-pins { + pins-bus { + pinmux = , + ; + bias-pull-up = <1000>; + drive-strength-microamp = <1000>; + }; + }; + + i2c4_pin: i2c4-default-pins { + pins-bus { + pinmux = , + ; + bias-pull-up = <1000>; + drive-strength = ; + }; + }; + + i2c5_pin: i2c5-default-pins { + pins-bus { + pinmux = , + ; + bias-disable; + drive-strength-microamp = <1000>; + }; + }; + + i2c7_pin: i2c7-default-pins { + pins-bus { + pinmux = , + ; + bias-disable; + }; + }; + mmc0_pins_default: mmc0-default-pins { pins-cmd-dat { pinmux = , @@ -407,12 +535,34 @@ pins-low-power-pupd { bias-pull-down = ; }; }; + + spi0_pins: spi0-default-pins { + pins-cs-mosi-clk { + pinmux = , + , + ; + bias-disable; + }; + + pins-miso { + pinmux = ; + bias-pull-down; + }; + }; }; &pmic { interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; }; +&spi0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins>; + mediatek,pad-select = <0>; +}; + &uart0 { status = "okay"; }; -- 2.35.1