From patchwork Mon Jul 31 21:55:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13335536 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 13424C001E0 for ; Mon, 31 Jul 2023 21:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sPLH9A6hA+u1GvVvLFMVFetv/NIt3v+7Htc/oc+w8NU=; b=dI2omii392LuUj 1P705dOJLnIF2g3hpp3FDkEYLDvB9p8W2fFLCQg6HIFFz5N4vEUmc62VDxrpu5VDr7x1xFF6H019u /wN3CFHOi2/kFkvNjCantTnAEEsguhO7BZp1qwZXoCRfRpayu3En/lqMtK/7NWZDUkwDuRU1iDgFz kuPk8fup/3A/fidNeUdMTUvm5OSb9DBF8WWt8GPUp3gOe570NwuuGKkVdgm290NdQz3Hne6+W+s+T SVdXnEBMq4bUrYBooUgh2FV88gtd285m1IHSoyXDWhYGzTuV6PrYjIxPhPFmJmGJEQdYr3bp0nkCA 1nr/9NoOXPfEHTGRSEgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQarM-00HRG6-0u; Mon, 31 Jul 2023 21:55:24 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQarH-00HR9V-0j; Mon, 31 Jul 2023 21:55:21 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3671D512; Mon, 31 Jul 2023 23:54:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1690840448; bh=lzYP0wYMkgaG6Vnq6Vlygl1CsAL7HINusD6vdXBhXnc=; h=From:To:Cc:Subject:Date:From; b=CJtkPQzpNqKfNRNjFlxQKMxBaCWUNQGImwvSbS/BHWiC3kNfE5OpWZs7HXOYcLL60 aZkCdGzK5X0lXJfMgE5oguKgTspv79qU0BvB4PZBjaHjSKQguKY3mgnt46QrCJ+fEJ unEMQZc88cQRy1phu42Zh7p1AAfDsI8QuaxfImng= From: Laurent Pinchart To: linux-arm-kernel@lists.infradead.org Cc: linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Florian Fainelli , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Cyril Brulebois , Maxime Ripard , Stefan Wahren , Dave Stevenson , Nicolas Saenz Julienne , Umang Jain Subject: [PATCH v4 0/2] ARM: dts: bcm2711-rpi-cm4-io: Add rtc on a pinctrl-muxed i2c bus Date: Tue, 1 Aug 2023 00:55:13 +0300 Message-ID: <20230731215515.20682-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_145519_404668_3E2C4848 X-CRM114-Status: GOOD ( 13.53 ) 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 Hello, This series is an attempt to revive support for pinmuxed I2C0 on the Raspberry Pi BCM2711-based board. On BCM2711-based boards, the I2C0 controller can be muxed between pins 0+1 or 44+45. The former is exposed through the 40-pins GPIO connector, and the latter is used for the RTC on the CM4 I/O board, but also routed to the display and camera connectors on the Raspberry Pi 4B board. The other BCM2711-based board, the Raspberry Pi 400, does not expose or connect anything to pins 44+45. A previous version was posted ([1]) a year and a half ago by Uwe. It bundled the pinmuxing and RTC in a single patch, with the mux added to the CM4 I/O board device tree. This version splits this in two, and moves the pinumxing to the bcm2711-rpi.dtsi to also support the Raspberry Pi 4B. The Raspberry Pi downstream kernel has a more complex DT architecture in order to support different I2C0 pinmuxing for other boards. Two files, bcm283x-rpi-i2c0mux_0_28.dtsi and bcm283x-rpi-i2c0mux_0_44.dtsi, define the two I2C0 pinxmuxing options (pins 0+1 and 28+29, or pins 0+1 and 44+45). Each board .dts then includes the appropriate file. I'm hoping to avoid this additional complexity for now, by addressing the I2C0 pinmuxing for BCM2711-based boards only. If/when support for I2C0 pinmuxing on boards will be needed, we can revisit this topic. Compared to the Raspberry Pi downstream kernel, the two muxed I2C buses are labelled i2c0_0 and i2c0_1 instead of i2c0 and i2c_csi_dsi. This change was made to keep the naming of the I2C controller labels consistent, avoiding renaming of the I2C0 controller's label from i2c0 to i2c0if. Dave, are you fine with the differences between this patch series and the downstream kernel, or do you expect them to cause issues ? [1] https://lore.kernel.org/linux-arm-kernel/20211231115109.94626-1-uwe@kleine-koenig.org/ Uwe Kleine-König (2): ARM: dts: bcm2711-rpi: Add pinctrl-based multiplexing for I2C0 ARM: dts: bcm2711-rpi-cm4-io: Add RTC on I2C0 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 16 ++++++++++++ arch/arm/boot/dts/bcm2711-rpi.dtsi | 31 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+)