From: Hangxiang Ma <hangxiang.ma@oss.qualcomm.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: Bryan O'Donoghue <bod@kernel.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver
Date: Fri, 27 Mar 2026 10:23:54 +0800 [thread overview]
Message-ID: <bc6abd24-d56a-4fc0-89e9-8986e8d8b3b7@oss.qualcomm.com> (raw)
In-Reply-To: <20260326-x1e-csi2-phy-v5-2-0c0fc7f5c01b@linaro.org>
On 3/26/2026 9:04 AM, Bryan O'Donoghue wrote:
> +#include <linux/delay.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/time64.h>
> +
> +#include "phy-qcom-mipi-csi2.h"
> +
> +#define CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(offset, n) ((offset) + 0x4 * (n))
> +#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL0_PHY_SW_RESET BIT(0)
> +#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL5_CLK_ENABLE BIT(7)
> +#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_COMMON_PWRDN_B BIT(0)
> +#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID BIT(1)
> +#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL10_IRQ_CLEAR_CMD BIT(0)
> +#define CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(offset, n) ((offset) + 0xb0 + 0x4 * (n))
>
Hi Bryan, one minor observation on the following macro:
CSIPHY_3PH_CMN_CSI_COMMON_STATUSn
The 0xb0 offset implicitly assumes a fixed distance between the
common_ctrl and common_status register blocks. This holds for the PHYs
covered by this series, but on some other platforms (e.g. Kaanapali,
Pakala) the offset differs.
That said, I think keeping this fixed value is reasonable for the scope
of the current PHY series, and it does help keep the macro set simple.
It might just be worth documenting this assumption (e.g. via a comment
or in the commit message).
Alternatively, if future PHY variants need to support different layouts,
this could be made more extensible by moving the status base offset into
the per-PHY data (similar to other register layout parameters). But I
don’t think that needs to block the current series.
Related patch before:
<https://lore.kernel.org/all/20260112-camss-extended-csiphy-macro-v2-1-ee7342f2aaf5@oss.qualcomm.com/>
Best Regards,
Hangxiang
next prev parent reply other threads:[~2026-03-27 2:24 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 1:04 [PATCH v5 0/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-03-26 1:04 ` [PATCH v5 1/2] dt-bindings: phy: qcom: Add CSI2 C-PHY/DPHY schema Bryan O'Donoghue
2026-03-26 1:46 ` Vladimir Zapolskiy
2026-03-26 2:03 ` Bryan O'Donoghue
2026-03-26 10:28 ` Vladimir Zapolskiy
2026-03-26 14:42 ` Bryan O'Donoghue
2026-03-26 14:49 ` Vladimir Zapolskiy
2026-03-27 1:03 ` Bryan O'Donoghue
2026-03-27 7:54 ` Vladimir Zapolskiy
2026-03-27 20:51 ` Dmitry Baryshkov
2026-03-27 22:29 ` Bryan O'Donoghue
2026-03-27 23:12 ` Vladimir Zapolskiy
2026-03-27 23:23 ` Dmitry Baryshkov
2026-03-27 23:40 ` Bryan O'Donoghue
2026-03-29 10:54 ` Dmitry Baryshkov
2026-03-30 9:46 ` Konrad Dybcio
2026-03-28 0:41 ` Vladimir Zapolskiy
2026-03-26 2:31 ` Rob Herring (Arm)
2026-03-27 10:07 ` Konrad Dybcio
2026-03-27 10:10 ` Konrad Dybcio
2026-03-27 14:38 ` Bryan O'Donoghue
2026-03-27 15:28 ` Neil Armstrong
2026-03-27 17:42 ` Bryan O'Donoghue
2026-03-30 7:49 ` Neil Armstrong
2026-03-30 9:02 ` Bryan O'Donoghue
2026-03-30 9:17 ` Neil Armstrong
2026-03-30 9:25 ` Bryan O'Donoghue
2026-03-30 11:34 ` Konrad Dybcio
2026-03-30 11:41 ` Bryan O'Donoghue
2026-04-15 9:41 ` Konrad Dybcio
2026-03-30 11:49 ` Dmitry Baryshkov
2026-03-30 12:03 ` Bryan O'Donoghue
2026-03-30 10:39 ` Vladimir Zapolskiy
2026-03-26 1:04 ` [PATCH v5 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-03-27 2:23 ` Hangxiang Ma [this message]
2026-03-27 10:07 ` Konrad Dybcio
2026-03-27 20:57 ` Dmitry Baryshkov
2026-03-27 20:54 ` Dmitry Baryshkov
2026-03-27 22:11 ` Bryan O'Donoghue
2026-03-27 22:30 ` Dmitry Baryshkov
2026-04-02 2:22 ` Vijay Kumar Tumati
2026-04-06 14:28 ` Abel Vesa
2026-04-06 15:37 ` Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc6abd24-d56a-4fc0-89e9-8986e8d8b3b7@oss.qualcomm.com \
--to=hangxiang.ma@oss.qualcomm.com \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
--cc=vladimir.zapolskiy@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox