From patchwork Thu Sep 3 13:35:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Povlsen X-Patchwork-Id: 11753605 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6771B1744 for ; Thu, 3 Sep 2020 13:36:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F30720716 for ; Thu, 3 Sep 2020 13:36:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="b3rGp46s"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="aU0Su47Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F30720716 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SOte7wFP9Mm7Nk4nERo2NZ+0vmUSprLSj5dq+9wOvJM=; b=b3rGp46ssCqASpaY0DCoTO/DD 9GZIOv8/rxNOAlmtqyoKuyK9f2/c0d3XRe4U4cFJaUSosxc8wtFmWAhq0sxbZpHjGPgLxWAeoX8fb SZ7cd04+z2PmGEObgU94rqPw++2EwmuoJVnq9uWL9ARRiHUmvTiQfwAzCPAd0usEQWYh4jznzii86 6gNfwYwJh8pWa89Pkma2V8qS74kd0FGYobm9Lz7ZimRoTOGYU6CG2j18+QFyi0p4f6TIhiHIN6VBb 1D4MkxGt/tOFqvGjsRMDfjqdvuFRwVN212FVxIcEI9ESrZpe+bI+bEbcjacsJw+tRktUYpAFljWAh iF7sMQYFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDpPG-0007tk-7x; Thu, 03 Sep 2020 13:36:02 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDpP9-0007sC-W9 for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 13:36:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1599140155; x=1630676155; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tufrlju2N8kPk+K67Lk/SfPvZ6txZC58fe+RJ5RoN/0=; b=aU0Su47YjLLoGPbSSu18yH5NdT3ZL6h0wZqXRvDR+sJf024IorMtx/Mn UHbyb8V1rhiAxcmcUUDrrzoFBKYWhaIjpcSH3DjKB/P4dl2VDv/LP2ZFd 1TqOdzZPz+nEk590vvPQVwNKOR5VZQVHpVLn0IhhESFENN/jWkBIKsiXZ p7FGj4tknIvSpP2D84TSiydKPDZReTXB7taMx76OmclM5IfAeAqjpfJCw QUWozK6Bns6/pw1YFCMWbci3K8pw8vQAaa8Wsvj5QutMeB/jqufy8SVGX mtKVv34efSG4tctwbODP0QfW3KB1zfjIZB+zyDy9DQ1Juw0aqSs4V6Asx g==; IronPort-SDR: sig/PtixE42DZ+VMd8xVLG7fD07MXzJwlWexLPbtcG9WP/StKOn7JXJH8MLdNfxHMlYeg8OhsY BEfi9qmi5RaAtqA6dC6h/59MXezeWlnrpN8t1pgONvkrXfb/WVc/VzvL/0JDN3Jsn5JXtWapre HcAzdVN0emyUVlVpA82KDK8Q+asXjRxEP5U2oFtRQ/9EpHnWPfbXx7DKpJEREAsb+ttFeKuAeJ hmLDQij9aPchAq/v0VFU+2h0GzRLWhn548SBVybXRKEJw+Z1FIM4wti6uOL3oLH/+d5ljyfeqx DUY= X-IronPort-AV: E=Sophos;i="5.76,386,1592895600"; d="scan'208";a="94283355" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 Sep 2020 06:35:54 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 3 Sep 2020 06:35:12 -0700 Received: from soft-dev15.microsemi.net (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 3 Sep 2020 06:35:10 -0700 From: Lars Povlsen To: Linus Walleij Subject: [PATCH v2 3/3] arm64: dts: sparx5: Add SGPIO devices Date: Thu, 3 Sep 2020 15:35:28 +0200 Message-ID: <20200903133528.8595-4-lars.povlsen@microchip.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200903133528.8595-1-lars.povlsen@microchip.com> References: <20200903133528.8595-1-lars.povlsen@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200903_093556_164023_33EFE4AD X-CRM114-Status: GOOD ( 11.41 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.147.91 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [68.232.147.91 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Belloni , linux-kernel@vger.kernel.org, Microchip Linux Driver Support , linux-gpio@vger.kernel.org, Lars Povlsen , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This adds SGPIO devices for the Sparx5 SoC and configures it for the applicable reference boards. Signed-off-by: Lars Povlsen --- arch/arm64/boot/dts/microchip/sparx5.dtsi | 52 +++++++++++++++++++ .../boot/dts/microchip/sparx5_pcb125.dts | 5 ++ .../dts/microchip/sparx5_pcb134_board.dtsi | 5 ++ .../dts/microchip/sparx5_pcb135_board.dtsi | 5 ++ 4 files changed, 67 insertions(+) diff --git a/arch/arm64/boot/dts/microchip/sparx5.dtsi b/arch/arm64/boot/dts/microchip/sparx5.dtsi index 5408486b4d3b..3cbf8824a545 100644 --- a/arch/arm64/boot/dts/microchip/sparx5.dtsi +++ b/arch/arm64/boot/dts/microchip/sparx5.dtsi @@ -232,6 +232,22 @@ si2_pins: si2-pins { function = "si2"; }; + sgpio0_pins: sgpio-pins { + pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3"; + function = "sg0"; + }; + + sgpio1_pins: sgpio1-pins { + pins = "GPIO_4", "GPIO_5", "GPIO_12", "GPIO_13"; + function = "sg1"; + }; + + sgpio2_pins: sgpio2-pins { + pins = "GPIO_30", "GPIO_31", "GPIO_32", + "GPIO_33"; + function = "sg2"; + }; + uart_pins: uart-pins { pins = "GPIO_10", "GPIO_11"; function = "uart"; @@ -262,6 +278,42 @@ emmc_pins: emmc-pins { }; }; + sgpio0: gpio@61101036c { + compatible = "microchip,sparx5-sgpio"; + status = "disabled"; + clocks = <&sys_clk>; + pinctrl-0 = <&sgpio0_pins>; + pinctrl-names = "default"; + reg = <0x6 0x1101036c 0x100>; + gpio-controller; + gpio-ranges = <&sgpio0 0 0 192>; + #gpio-cells = <4>; + }; + + sgpio1: gpio@611010484 { + compatible = "microchip,sparx5-sgpio"; + status = "disabled"; + clocks = <&sys_clk>; + pinctrl-0 = <&sgpio1_pins>; + pinctrl-names = "default"; + reg = <0x6 0x11010484 0x100>; + gpio-controller; + gpio-ranges = <&sgpio1 0 0 192>; + #gpio-cells = <4>; + }; + + sgpio2: gpio@61101059c { + compatible = "microchip,sparx5-sgpio"; + status = "disabled"; + clocks = <&sys_clk>; + pinctrl-0 = <&sgpio2_pins>; + pinctrl-names = "default"; + reg = <0x6 0x1101059c 0x100>; + gpio-controller; + gpio-ranges = <&sgpio2 0 0 192>; + #gpio-cells = <4>; + }; + i2c0: i2c@600101000 { compatible = "snps,designware-i2c"; status = "disabled"; diff --git a/arch/arm64/boot/dts/microchip/sparx5_pcb125.dts b/arch/arm64/boot/dts/microchip/sparx5_pcb125.dts index 6b2da7c7520c..9baa085d7861 100644 --- a/arch/arm64/boot/dts/microchip/sparx5_pcb125.dts +++ b/arch/arm64/boot/dts/microchip/sparx5_pcb125.dts @@ -69,6 +69,11 @@ spi-flash@9 { }; }; +&sgpio0 { + status = "okay"; + microchip,sgpio-port-ranges = <0 23>; +}; + &i2c1 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi b/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi index 35984785d611..65336be31fd9 100644 --- a/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi +++ b/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi @@ -54,6 +54,11 @@ spi-flash@9 { }; }; +&sgpio2 { + status = "okay"; + microchip,sgpio-port-ranges = <0 0 11 31>; +}; + &gpio { i2cmux_pins_i: i2cmux-pins-i { pins = "GPIO_16", "GPIO_17", "GPIO_18", "GPIO_19", diff --git a/arch/arm64/boot/dts/microchip/sparx5_pcb135_board.dtsi b/arch/arm64/boot/dts/microchip/sparx5_pcb135_board.dtsi index 7de66806b14b..5ea2d0910c2b 100644 --- a/arch/arm64/boot/dts/microchip/sparx5_pcb135_board.dtsi +++ b/arch/arm64/boot/dts/microchip/sparx5_pcb135_board.dtsi @@ -67,6 +67,11 @@ spi-flash@9 { }; }; +&sgpio2 { + status = "okay"; + microchip,sgpio-port-ranges = <0 0 16 18 28 31>; +}; + &axi { i2c0_imux: i2c0-imux@0 { compatible = "i2c-mux-pinctrl";