Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2185434pxb; Wed, 9 Feb 2022 12:42:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxS2n/I8+pxStWHUTmzHhRY2yjyxVIBEV3MM231Aq7DZI/wtAiISGV0/Q6zd5ygZY95B7II X-Received: by 2002:a17:902:f644:: with SMTP id m4mr4210292plg.37.1644439379684; Wed, 09 Feb 2022 12:42:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644439379; cv=none; d=google.com; s=arc-20160816; b=demWWccq44fiS5fGCMtKHvd5g5tPSJNZIXur/ZL8I8UAXRswSBnMqpwfLa/J7t762i H1oW7reUNOZe88lyf2Dw1YIgTdMSw3eZVxoCzyb08oGO8KTN+MqfTcnHQa9TY7iEbMml zoB0+hk7uOXjZHRao5BfuSLPhBgrF70iCcbdSOadNamucLPWkcsIP6GQoDpVm7V7brrI opuBRUgXtD7B/LMHe/ccpeRKmQ5t1ToNNwpvGUUqpyJFQOp5Cto6inxTEy6lXad/Vu7x d4nb+VJWAVZf+JmQw5GvTc/B9VKgv5UbmsgLC2AZIid0oSF/Gm4bucQ/DAZugisjfUVv wajg== 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=3qhTG0Zr+z4CkhzwBhN8Pu04VR2JdNGZMx+n0nk0HdU=; b=lsJfHsdaAn6vmpRuQpeX0x0rr+1cN4/2gD9UtulleNJ8THtmEPnrBpPE20PluKNkZi 3BTlXLp4e29kIs24Evj70t2AnbH4G7FfuEW4N92gUfb+R5ooCe0E9gaLRWNFx9lKH9T4 4n1m9aO5uY/5EDseuiqf14j8fxOmErxOmtdE3HjkhGpUhs08Cabstw5damBHb/qkd7uk nYc+dYtQIy3FKMumrPaH89KN0sCknb7Armza0WplSJ5z/N2LcxK+KEA4a2xL/5tALtA0 4AB1hQp8KydcbaednmyYQhPBeedkAFP98TFalBxxwlNd/PG8NNS3DEN3cHD+eI9T8gOe 2brw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MV0BmwPz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q4si19733707plh.423.2022.02.09.12.42.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 12:42:59 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MV0BmwPz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12291E08FBEE; Wed, 9 Feb 2022 12:11:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234200AbiBITZi (ORCPT + 99 others); Wed, 9 Feb 2022 14:25:38 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:43894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233865AbiBITZW (ORCPT ); Wed, 9 Feb 2022 14:25:22 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 952F9E01526C; Wed, 9 Feb 2022 11:25:19 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: detlev) with ESMTPSA id B8A881F45830 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644434718; bh=7+kNVuhRDRn8ZWd50WG2gPmkpwkCawcOM90JKeUKmKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MV0BmwPzZNSBUeCHXgm842NsKPpUaxWQIj0kCG8a0hLp3xOW3k9kykpnwJnsQ+2PT c0Su8GZH9uR8fzUnohebLBH5zeUPbglzcuRFuNDzaWA2iepkfUQZek/TzO7wb4ypK8 tPKOJjTj0VLKQOZU7/rvgZBrShffbP67x5MsyelHPP6mPMpC7ULshIFE8Jqb3wULt8 BLoZ7ix1bLLF7yXKCp3cWOqEg5FDQWHZLLAUUdOfQTd5QnagV0EbPmZdRL1Y3XSX01 ok0ZfmkncihMlW3BRjnTC+BpGPXDTcfCXVYmsCgLPs1dxc4pXjDgOzLl2FSFlSMYl9 JQgnnk5aZZ1Nw== From: Detlev Casanova To: linux-kernel@vger.kernel.org, Stefan Wahren Cc: Arnd Bergmann , Olof Johansson , "maintainer:ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)" , Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , "moderated list:ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Subject: Re: [PATCH 1/2] ARM: dts: bcm2*: Demux i2c0 with a pinctrl Date: Wed, 09 Feb 2022 14:25:12 -0500 Message-ID: <11962907.O9o76ZdvQC@falcon9> In-Reply-To: <1335ae03-705a-7a4a-a9ce-c6c55a2dcf34@i2se.com> References: <20220209162515.706729-1-detlev.casanova@collabora.com> <20220209162515.706729-2-detlev.casanova@collabora.com> <1335ae03-705a-7a4a-a9ce-c6c55a2dcf34@i2se.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 On Wednesday, February 9, 2022 12:26:15 P.M. EST Stefan Wahren wrote: > Hi Detlev, > > Am 09.02.22 um 17:25 schrieb Detlev Casanova: > > The i2c0 device has 2 different busses controlled by a pinctrl. > > > > This commit separates the device node into 2 i2c devices: > > * pin 0: Base i2c bus > > * pin 44: DSI i2c bus > > > > i2c0 is renamed to i2c0if so that device-trees referencing i2c0 don't > > break and use the i2c0 node defined in i2c0mux node. > > > > i2c_csi_dsi can be used to control devices via the DSI i2c bus, used for > > DSI displays. > > > > Signed-off-by: Detlev Casanova > > just a note: Uwe sends a similiar approach for the RTC on CM4 [1] which > hasn't applied yet. > > [1] - https://www.spinics.net/lists/arm-kernel/msg944330.html Oh, I missed that, I'll just hav to wait for it to be merged and base the next commit on that (Mainly name change) > > --- > > > > arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 1 + > > arch/arm/boot/dts/bcm2711.dtsi | 2 +- > > arch/arm/boot/dts/bcm2835-rpi.dtsi | 9 ++++--- > > .../boot/dts/bcm283x-rpi-i2c0mux_0_44.dtsi | 4 +++ > > arch/arm/boot/dts/bcm283x.dtsi | 26 ++++++++++++++++++- > > 5 files changed, 37 insertions(+), 5 deletions(-) > > create mode 100644 arch/arm/boot/dts/bcm283x-rpi-i2c0mux_0_44.dtsi > > > > diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts > > b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index 4432412044de..5dcce58817e6 > > 100644 > > --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts > > +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts > > @@ -4,6 +4,7 @@ > > > > #include "bcm2711-rpi.dtsi" > > #include "bcm283x-rpi-usb-peripheral.dtsi" > > #include "bcm283x-rpi-wifi-bt.dtsi" > > > > +#include "bcm283x-rpi-i2c0mux_0_44.dtsi" > > > > / { > > > > compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; > > > > diff --git a/arch/arm/boot/dts/bcm2711.dtsi > > b/arch/arm/boot/dts/bcm2711.dtsi index 3b60297af7f6..bf6e8251c2c7 100644 > > --- a/arch/arm/boot/dts/bcm2711.dtsi > > +++ b/arch/arm/boot/dts/bcm2711.dtsi > > @@ -1037,7 +1037,7 @@ &cma { > > > > alloc-ranges = <0x0 0x00000000 0x40000000>; > > > > }; > > > > -&i2c0 { > > +&i2c0if { > > > > compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; > > interrupts = ; > > > > }; > > > > diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi > > b/arch/arm/boot/dts/bcm2835-rpi.dtsi index 87ddcad76083..1e38f9f0e80e > > 100644 > > --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi > > +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi > > @@ -49,13 +49,16 @@ alt0: alt0 { > > > > }; > > > > }; > > > > -&i2c0 { > > - pinctrl-names = "default"; > > - pinctrl-0 = <&i2c0_gpio0>; > > +&i2c0if { > > > > status = "okay"; > > clock-frequency = <100000>; > > > > }; > > > > +&i2c0mux { > > + pinctrl-0 = <&i2c0_gpio0>; > > + status = "okay"; > > +}; > > + > > > > &i2c1 { > > > > pinctrl-names = "default"; > > pinctrl-0 = <&i2c1_gpio2>; > > > > diff --git a/arch/arm/boot/dts/bcm283x-rpi-i2c0mux_0_44.dtsi > > b/arch/arm/boot/dts/bcm283x-rpi-i2c0mux_0_44.dtsi new file mode 100644 > > index 000000000000..119946d878db > > --- /dev/null > > +++ b/arch/arm/boot/dts/bcm283x-rpi-i2c0mux_0_44.dtsi > > @@ -0,0 +1,4 @@ > > +&i2c0mux { > > + pinctrl-0 = <&i2c0_gpio0>; > > + pinctrl-1 = <&i2c0_gpio44>; > > +}; > > diff --git a/arch/arm/boot/dts/bcm283x.dtsi > > b/arch/arm/boot/dts/bcm283x.dtsi index a3e06b680947..06d04cde52b9 100644 > > --- a/arch/arm/boot/dts/bcm283x.dtsi > > +++ b/arch/arm/boot/dts/bcm283x.dtsi > > @@ -334,7 +334,7 @@ spi: spi@7e204000 { > > > > status = "disabled"; > > > > }; > > > > - i2c0: i2c@7e205000 { > > + i2c0if: i2c@7e205000 { > > > > compatible = "brcm,bcm2835-i2c"; > > reg = <0x7e205000 0x200>; > > interrupts = <2 21>; > > > > @@ -344,6 +344,30 @@ i2c0: i2c@7e205000 { > > > > status = "disabled"; > > > > }; > > > > + i2c0mux: i2c0mux { > > + compatible = "i2c-mux-pinctrl"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + i2c-parent = <&i2c0if>; > > + > > + pinctrl-names = "i2c0", "i2c_csi_dsi"; > > + > > + status = "disabled"; > > + > > + i2c0: i2c@0 { > > + reg = <0>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > + > > + i2c_csi_dsi: i2c@1 { > > + reg = <1>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > + }; > > + > > > > dpi: dpi@7e208000 { > > > > compatible = "brcm,bcm2835-dpi"; > > reg = <0x7e208000 0x8c>;