From patchwork Thu Apr 10 09:02:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Primoz Fiser X-Patchwork-Id: 14046356 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 A02D4C369A6 for ; Thu, 10 Apr 2025 11:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=auMZjdpxCvKTX4lfbE8M58UMBkU5s6BuRcALq6wShSQ=; b=vthlxla7zeGTTkGsn7nGGlPCCU La3FBspkd/zsOngVnjZ9lC9Jv9roc7dfIxjuLfb5e37kNyUxOZS4ipqcWY/Ztrdy/Vnv487xrW12U ptd35LfrYLG6jtPTSJ1b9eTfFZw/PAFHFMOfsLh91/LoPHKdTEB2VyQW09G0o7Xr6a0Rd33+ekCuY vI2p2Dnqk0sU/NGYn0G49D81YcmCeLA8e0Rdx3NmQssTaZJ/N7gIcElgies6Jhi2icugq6VjmXJHB aUEkT8GRVFcPnwuYe9ySFbqfk+8zmUKfK8GslaLJc7LnaUJ3Z8o2RgFwg0F8VIN4k8Kcep0Dxlulc znycRArA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2psx-0000000ABDT-0bSb; Thu, 10 Apr 2025 11:15:55 +0000 Received: from cpanel.siel.si ([46.19.9.99]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2noQ-00000009rJl-1m9t for linux-arm-kernel@lists.infradead.org; Thu, 10 Apr 2025 09:03:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=auMZjdpxCvKTX4lfbE8M58UMBkU5s6BuRcALq6wShSQ=; b=apt/Z0kmof7VIyQ53HOV9KOhtu 4fdr3Dc5ZeX+Ccwbf2UoFV8odqT65BbMzcg3JKzdvqvukUQxasGmdgMlnDJBSxU34DkKkK9/XOgSc QoqSX8Oq0DuWyiUDFIQm614p+DWQV4ZUZOpg8SmTHVewu4v0Xp8ogUXPhjJlFmUNH8pJ6TK1+gXRo RJV+UuUZmzYVgkFLKoYDQbw/2uGaT+noVdq8ubRDI9pb/N0ofAMfLzarbk5JeD9iEtjhQgyJ+HsI0 XVZAcWtOiLGVwfMVD1Yc27V2BAqe2aNGWNQ/tdRR+o5Z0tHfpoMuwO5tmrCU5AYPK/CoyVryh+JFP jYcFHVvw==; Received: from [89.212.21.243] (port=41926 helo=localhost.localdomain) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1u2noP-000Djj-39; Thu, 10 Apr 2025 11:03:05 +0200 From: Primoz Fiser To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, upstream@lists.phytec.de Subject: [PATCH 09/13] arm64: dts: freescale: imx93-phyboard-segin: Add RTC support Date: Thu, 10 Apr 2025 11:02:47 +0200 Message-Id: <20250410090251.1103979-10-primoz.fiser@norik.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250410090251.1103979-1-primoz.fiser@norik.com> References: <20250410090251.1103979-1-primoz.fiser@norik.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: primoz.fiser@norik.com X-Authenticated-Sender: cpanel.siel.si: primoz.fiser@norik.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_020306_621477_A01552C4 X-CRM114-Status: UNSURE ( 7.47 ) 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 Add support for RTC clock connected via I2C on phyBOARD-Segin-i.MX93. Make I2C RTC the default clock by configuring the aliases. Signed-off-by: Primoz Fiser --- .../dts/freescale/imx93-phyboard-segin.dts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts b/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts index 525f52789f8b..38b89398e646 100644 --- a/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts @@ -17,6 +17,11 @@ /{ compatible = "phytec,imx93-phyboard-segin", "phytec,imx93-phycore-som", "fsl,imx93"; + aliases { + rtc0 = &i2c_rtc; + rtc1 = &bbnsm_rtc; + }; + chosen { stdout-path = &lpuart1; }; @@ -33,6 +38,24 @@ reg_usdhc2_vmmc: regulator-usdhc2 { }; }; +/* I2C2 */ +&lpi2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpi2c2>; + status = "okay"; + + /* RTC */ + i2c_rtc: rtc@68 { + compatible = "microcrystal,rv4162"; + reg = <0x68>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rtc>; + interrupt-parent = <&gpio4>; + interrupts = <26 IRQ_TYPE_LEVEL_LOW>; + }; +}; + /* Console */ &lpuart1 { pinctrl-names = "default"; @@ -56,6 +79,13 @@ &usdhc2 { }; &iomuxc { + pinctrl_lpi2c2: lpi2c2grp { + fsl,pins = < + MX93_PAD_I2C2_SCL__LPI2C2_SCL 0x40000b9e + MX93_PAD_I2C2_SDA__LPI2C2_SDA 0x40000b9e + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX93_PAD_UART1_RXD__LPUART1_RX 0x31e @@ -69,6 +99,12 @@ MX93_PAD_SD2_RESET_B__GPIO3_IO07 0x31e >; }; + pinctrl_rtc: rtcgrp { + fsl,pins = < + MX93_PAD_ENET2_RD2__GPIO4_IO26 0x31e + >; + }; + pinctrl_usdhc2_cd: usdhc2cdgrp { fsl,pins = < MX93_PAD_SD2_CD_B__GPIO3_IO00 0x31e