Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2122770rwd; Mon, 15 May 2023 07:33:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76t7+fevT3yBzGJ2uCqyG9T2qCYL3ArX+R7N4uHNNL0X+BGmP87kxbrRCWmI2iQ+OPBWx0 X-Received: by 2002:a17:902:d486:b0:1ac:a28e:4b1d with SMTP id c6-20020a170902d48600b001aca28e4b1dmr27214893plg.34.1684161220197; Mon, 15 May 2023 07:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684161220; cv=none; d=google.com; s=arc-20160816; b=c68yz9JcGq5B5WU2Bl6QcghC9iEynfhcv6VbgKPMXcsJeywj+KEHGj47DH9BxgiYJK 7ehc0O40AQiv1KuUIr1vR6aQsotgpR+YBNFSZhp9mltLvQKVZmzsjo6OFOhRov6E/BIq R8BlCg11pkhSpVGSQ21lI3212lNCZn2e9mjRaQJ78FHYDZ4jijUsMWQg1C+c9ArvD9ij 2bxDKApIO+naRa+DHd9ybMbYeEAb6RlQwfvEVUSVkMikRKfL2e96rLAz8glORZkydU2k SvTpoRZ1iWSoPK/P3UkWAZJ3AV3pC1dKY2TXUQUAY48l0pLYZHQub09fv4/1/z2aD8Es o7aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n75gxWwijMMTI9GiXx1bdZzw1eSKDQ/JY3MbdqyyfJ8=; b=kfGqlrmQOH1dXkAmqgH0doGkeKUZF29WUYxrnJGxp7/XNrrYKw3xq0Q5w2Ati8Wc9E 5EZPvtGyunyDQujNoBG9Ia7Agl/kU9gdBBSouJXHUJMYcEJ9MCbOhghEaQMkbXZD6EIc JnactN8HfMMywPPkAdG7fwJPWQFevUJJLwgkQV0/sZm6KExt8TFcLpG3d353Nfjx38ue xcd34pjDmUY/t8jZcCyVlwJWCRg5vNSZMPQsCTscjpFmDCs6DTt5Sqe84hAj3vdnUYI+ C6tvogbcbXeCwpTY3FUaAQpTNh3WWD8RZFQOmyoNxaYF2rnzqxzqFFP4Qn9XbYC4lZl0 8j2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=MybEwHb7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij25-20020a170902ab5900b001a1d76e7214si15560612plb.111.2023.05.15.07.33.24; Mon, 15 May 2023 07:33:40 -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=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=MybEwHb7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239757AbjEOOHQ (ORCPT + 99 others); Mon, 15 May 2023 10:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239353AbjEOOHP (ORCPT ); Mon, 15 May 2023 10:07:15 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A49C3172B for ; Mon, 15 May 2023 07:07:10 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3075e802738so11768121f8f.1 for ; Mon, 15 May 2023 07:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1684159629; x=1686751629; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=n75gxWwijMMTI9GiXx1bdZzw1eSKDQ/JY3MbdqyyfJ8=; b=MybEwHb7tKFR+czM65dq6Won8HWSGsgYs9IN4ez2NUgHvZhPq/Fjq3SQvBRDwj2apk TQlRnqRGsmPdmCCiuAQcNV5mzBWUfS345LKMeMaqnYmHN1XGmlqe+rc1IsW5hQGIN2hY Sk7HLb6fGLLzfm46sD0+z8iN/0C24ndOXGjNqF6egg+usyu0Bf3KHWzTofwatANRJWl4 NM6U67P7oQUYPeY4ghnVyPngLeXR/uhODxoz4qrOAMKkje2MBG2F+8kinM7BX0ZLPHGd S/9F6uqsD+yaKQT/H6KccQdorGqjBBxvsrr+IBeIoiXO2e2PeafrSkbg/OX5wBedzpfb rR2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684159629; x=1686751629; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=n75gxWwijMMTI9GiXx1bdZzw1eSKDQ/JY3MbdqyyfJ8=; b=I4hwtEYtD4jhy9owpids4F1CeZ0uXRp97JczhGIJExObOFosVzZ4l0ojpisZDKZrjz THJ4zQsp462ZVWO6aY3zYAuRj7TFrg/46KpjQKXWj7s4ZiWgtX/nH+7/9BLpCgpKvYDE yA/fnvxJU+SdWplZmYezP20+fETAax7KlHtlfKyq7VSbI7zAJrYjMVRjAOYLUgALWKyu tOkI+V+A6OqMENk2KkTSQ08oclqUiLtYq6xvHkih0ozJmLSpFVHT+VBkzUxe7iTDJmrI Lr4V6E9o2jerrCAvq7OwatAuDQ03me1w1t17jonFDGa0+lCSPbkLwwndw3Thw1XB4daS //TA== X-Gm-Message-State: AC+VfDwB7O3BuUSoCntHm4xeSsamU5T1FUz5bSKa8M30J+4NzYrcyygM P1Eeavu9PS7xKTsP00E9HKzKvA== X-Received: by 2002:adf:e492:0:b0:306:2dd6:95d3 with SMTP id i18-20020adfe492000000b003062dd695d3mr30832770wrm.22.1684159629085; Mon, 15 May 2023 07:07:09 -0700 (PDT) Received: from localhost ([2a01:e0a:55f:21e0:fd3b:9fed:e621:cc8f]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b003f4253ddb7dsm23548392wmm.43.2023.05.15.07.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 07:07:08 -0700 (PDT) Date: Mon, 15 May 2023 16:07:07 +0200 From: Julien Stephan To: AngeloGioacchino Del Regno Cc: krzysztof.kozlowski@linaro.org, robh@kernel.org, chunkuang.hu@kernel.org, linux-mediatek@lists.infradead.org, Phi-bang Nguyen , Louis Kuo , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Andy Hsieh , Philipp Zabel , Matthias Brugger , open list , "moderated list:ARM/Mediatek USB3 PHY DRIVER" , "open list:GENERIC PHY FRAMEWORK" , "open list:DRM DRIVERS FOR MEDIATEK" Subject: Re: [PATCH v2 2/2] phy: mtk-mipi-csi: add driver for CSI phy Message-ID: References: <20230515090551.1251389-1-jstephan@baylibre.com> <20230515090551.1251389-3-jstephan@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 On Mon, May 15, 2023 at 02:22:52PM +0200, AngeloGioacchino Del Regno wrote: > > +#define CSIxB_OFFSET 0x1000 > > What if we grab two (or three?) iospaces from devicetree? > > - base (global) > - csi_a > - csi_b > > That would make it possible to maybe eventually extend this driver to more > versions (older or newer) of the CSI PHY IP without putting fixes offsets > inside of platform data structures and such. > Hi Angelo, The register bank of the CSI port is divided into 2: * from base address to base + 0x1000 (port A) * from base + 0x1000 to base +0x2000 (port B) Some CSI port can be configured in 4D1C mode (4 data + 1 clock) using the whole register bank from base to base + 0x2000 or in 2D1C mode (2 data + 1 clock) and use either port A or port B. For example mt8365 has CSI0 that can be used either in 4D1C mode or in 2 * 2D1C and CSI1 which can use only 4D1C mode 2D1C mode can not be tested and is not implemented in the driver so I guess adding csi_a and csi_b reg value may be confusing? What do you think? Regards, Julien