Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
To: Icenowy Zheng <uwu@icenowy.me>,
	Maud Spierings <maud_spierings@murena.io>,
	Dominique Belhachemi <domibel@debian.org>
Cc: m.wilczynski@samsung.com, Laurent.pinchart@ideasonboard.com,
	airlied@gmail.com, alex@ghiti.fr, andrzej.hajda@intel.com,
	andy.yan@rock-chips.com, andyshrk@163.com, aou@eecs.berkeley.edu,
	bmasney@redhat.com, conor+dt@kernel.org, conor@kernel.org,
	devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	hal.feng@starfivetech.com, heiko@sntech.de, hello@big-grey.co.uk,
	jernej.skrabec@gmail.com, jonas@kwiboo.se, kernel@esmil.dk,
	krzk+dt@kernel.org, lee@kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-riscv@lists.infradead.org,
	linux-rockchip@lists.infradead.org, luca.ceresoli@bootlin.com,
	m.szyprowski@samsung.com, maarten.lankhorst@linux.intel.com,
	maudspierings@gocontroll.com, mfd@lists.linux.dev,
	mripard@kernel.org, mturquette@baylibre.com,
	neil.armstrong@linaro.org, p.zabel@pengutronix.de,
	palmer@dabbelt.com, pjw@kernel.org, rfoss@kernel.org,
	robh@kernel.org, sboyd@kernel.org, simona@ffwll.ch,
	tzimmermann@suse.de, vkoul@kernel.org
Subject: Re: [PATCH v2 13/15] phy: starfive: Add jh7110-inno-hdmi-phy driver
Date: Mon, 7 Sep 2026 16:10:28 +0800	[thread overview]
Message-ID: <745c232e-d2ff-4d32-b997-55d4d37a39fa@rock-chips.com> (raw)
In-Reply-To: <72f82ae67eca7b5a594d86852c8b0dafb7d02c4c.camel@icenowy.me>

Hello Icenowy, Maud, Dominique,

On 9/7/2026 2:55 PM, Icenowy Zheng wrote:
> 在 2026-09-07一的 08:02 +0200,Maud Spierings写道:
>> Hi Dominique and Icenowy,
>>
>> On 9/7/26 06:01, Icenowy Zheng wrote:
>>> 在 2026-09-06日的 17:16 -0400,Dominique Belhachemi写道:
>>>> On Sun, Sep 6, 2026 at 11:19 AM Icenowy Zheng <uwu@icenowy.me>
>>>> wrote:
>>>>>
>>>>> 在 2026-09-06日的 16:59 +0200,Maud Spierings写道:
>>>>>> On 9/6/26 07:39, Dominique Belhachemi wrote:
>>>>>>> On Sun, Aug 30, 2026 at 10:17 AM Maud Spierings
>>>>>>> <
>>>>>>> maud_spierings@murena.io <mailto:maud_spierings@murena.io>>
>>>>>>> wrote:
>>>>>>>
>>>>>>>      I was still having some glitching happening on the
>>>>>>> display,
>>>>>>> but
>>>>>>> I've
>>>>>>>      found the way to fix that, the question is what is
>>>>>>> actually
>>>>>>>      happening here.
>>>>>>>
>>>>>>>          0x29590020 <- 0x00000005
>>>>>>>      This one I have no idea, it is 0x00000009 with this
>>>>>>> patch
>>>>>>> series but
>>>>>>>      with the vendor kernel I get the value above. When I
>>>>>>> hook
>>>>>>> up my
>>>>>>>      external
>>>>>>>      display (regular 1440p) this becomes 0x0000000D on the
>>>>>>> vendor
>>>>>>> kernel.
>>>>>>>
>>>>>>>      But I can't find this register being written to
>>>>>>> anywhere
>>>>>>> there?
>>>>>>>
>>>>>>>
>>>>>>> Maybe this needs to be swapped?
>>>>>>>
>>>>>>> drivers/gpu/drm/bridge/inno-hdmi.c
>>>>>>>     -#define v_HSYNC_POLARITY(n)          ((n) << 3)
>>>>>>>     -#define v_VSYNC_POLARITY(n)          ((n) << 2)
>>>>>>>     +#define v_HSYNC_POLARITY(n)          ((n) << 2)
>>>>>>>     +#define v_VSYNC_POLARITY(n)          ((n) << 3)
>>>>>
>>>>> Very weirdly, the original definition here matches current
>>>>> mainline
>>>>> inno-hdmi.c, but the changed definition matches JH7110 vendor
>>>>> inno_hdmi.h [1].
>>>>>
>>>>
>>>> The vendor code is correct and matches the RK3128 TRM.
>>>
>>> Thanks for the tips on documentation, and I verified this.
>>>
>>> It seems that Rockchip people made this always wrong, even with
>>> their
>>> pre-DRM display driver... [1]
>>>
>>> BTW I checked the Innosilicon dGPU driver code, and its
>>> g3_ne_hdmi.h
>>> source file also contains the definition of BIT(3) as VSYNC. (It's
>>> quite weird that most logic of that driver is in some .o_shipped
>>> blob,
>>> but fortunately the g3 logic might be too new to be closed down)
>>>
>>> Thanks,
>>> Icenowy
>>>
>>> [1]
>>> https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/video/rockchip/hdmi/rockchip-hdmiv1/rockchip_hdmiv1_hw.h#L161
>>>
>>>>
>>>> HDMI_reg08
>>>>      Bit  Attr  Reset  Description
>>>>      3    RW    0x0    vs_polarity   VSYNC polarity   1'b0:
>>>> Negative
>>>> 1'b1: Positive
>>>>      2    RW    0x0    hs_polarity   HSYNC polarity   1'b0:
>>>> Negative
>>>> 1'b1: Positive
>>>>
>>>> Nobody noticed this so far because in 720p/1080p both polarities
>>>> are
>>>> positive, but Maud's 3:2 panel has differing H/V polarity.
>>>>
>>>> Best
>>>> -Dominique
>>
>> This also solves the devmem behaviour I saw, or well, doesn't realy 
>> explain it but does show what is actually happening. As Icenowy noted
>> (maybe that was on telegram only?) the inno-hdmi regs are 8bit
>> instead 
>> of 32 bit.
>>
>> What is actually happening is:
>>
>> devmem 0x29590000 b reads 0x29590000 as expected
>> but
>> devmem 0x29590004 b reads 0x29590001
>> devmem 0x29590008 b reads 0x29590002
>> ....
>> devmem 0x29590020 b reads 0x29590008
>>
>> For some reason the addressing is weird?
>>
>> With this change, the assigned clock change and removing the 
>> v_REG_CLK_INV | v_REG_CLK_SOURCE_SYS write to HDMI_SYS_CTRL, the
>> display 
>> comes up from the start as it should!
> 
> Well I checked the RK3128 TRM for these two bits, and their field
> descriptions are -- "reserved".
> 
> What can I react...
> 

You can take a look at the TRM of the RK61X[0]. 
I think it contains the register descriptions you're looking for :)

[0]: https://dl.radxa.com/rock/docs/hw/ds/Rockchip%20RK61X%20TRM%20V1.3.1.pdf

-- 
Best, 
Chaoyi


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-09-07  8:10 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260828134813eucas1p1bd003a66706ed251017185fc14f13cc9@eucas1p1.samsung.com>
2026-08-28 13:47 ` [PATCH v2 00/15] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
2026-08-28 13:47   ` [PATCH v2 01/15] dt-bindings: phy: Add starfive,jh7110-inno-hdmi-phy Michal Wilczynski
2026-08-28 13:54     ` sashiko-bot
2026-08-28 16:43     ` Conor Dooley
2026-08-28 13:47   ` [PATCH v2 02/15] dt-bindings: display: bridge: Add starfive,jh7110-inno-hdmi-controller Michal Wilczynski
2026-08-28 13:54     ` sashiko-bot
2026-08-28 14:04     ` Icenowy Zheng
2026-08-28 16:47     ` Conor Dooley
2026-09-03 12:49       ` Michal Wilczynski
2026-08-28 13:47   ` [PATCH v2 03/15] dt-bindings: mfd: Add starfive,jh7110-hdmi-subsystem Michal Wilczynski
2026-08-28 13:54     ` sashiko-bot
2026-08-28 16:50     ` Conor Dooley
2026-08-28 13:47   ` [PATCH v2 04/15] drm/bridge: inno-hdmi: Split probe out of bind Michal Wilczynski
2026-08-28 14:01     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 05/15] drm/bridge: inno-hdmi: Allow the register map to come from a parent Michal Wilczynski
2026-08-28 13:54     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 06/15] drm/bridge: inno-hdmi: Add .disable platform operation Michal Wilczynski
2026-08-28 13:57     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 07/15] drm/bridge: inno-hdmi: Add .mode_valid " Michal Wilczynski
2026-08-28 13:52     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 08/15] soc: starfive: Add jh7110-hdmi-subsystem driver Michal Wilczynski
2026-08-28 13:59     ` sashiko-bot
2026-09-03  7:50     ` Philipp Zabel
2026-08-28 13:47   ` [PATCH v2 09/15] clk: starfive: jh7110-vout: Allow pixel clock rate propagation Michal Wilczynski
2026-08-28 14:01     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 10/15] drm/bridge: starfive: Add JH7110 HDMI controller driver Michal Wilczynski
2026-08-28 13:59     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 11/15] phy: Add common Innosilicon HDMI PHY helpers Michal Wilczynski
2026-08-28 14:00     ` sashiko-bot
2026-08-28 13:47   ` [PATCH v2 12/15] phy: rockchip: inno-hdmi: Use the common Innosilicon " Michal Wilczynski
2026-08-28 14:12     ` sashiko-bot
2026-09-01 18:14     ` Jonas Karlman
2026-09-03  8:54       ` Michal Wilczynski
2026-08-28 13:47   ` [PATCH v2 13/15] phy: starfive: Add jh7110-inno-hdmi-phy driver Michal Wilczynski
2026-08-28 14:04     ` sashiko-bot
2026-08-29 18:54     ` Maud Spierings
2026-08-30 14:17       ` Maud Spierings
2026-09-03 13:44         ` Michal Wilczynski
     [not found]         ` <CAAvaLCwvVUddS14MPx0FHdnp+QeZ99+ox17pXt2hSWPTCFcHtw@mail.gmail.com>
2026-09-06 14:59           ` Maud Spierings
2026-09-06 15:18             ` Icenowy Zheng
2026-09-06 21:16               ` Dominique Belhachemi
2026-09-07  4:01                 ` Icenowy Zheng
2026-09-07  6:02                   ` Maud Spierings
2026-09-07  6:55                     ` Icenowy Zheng
2026-09-07  8:10                       ` Chaoyi Chen [this message]
2026-08-28 13:47   ` [PATCH v2 14/15] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
2026-08-28 14:06     ` sashiko-bot
2026-08-28 14:06     ` Icenowy Zheng
2026-09-01 14:15       ` Michal Wilczynski
2026-08-29 18:46     ` Maud Spierings
2026-08-28 13:47   ` [PATCH v2 15/15] MAINTAINERS: Add StarFive JH7110 display subsystem entry Michal Wilczynski
2026-08-28 14:01     ` Icenowy Zheng
2026-08-31  9:14       ` Michal Wilczynski

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=745c232e-d2ff-4d32-b997-55d4d37a39fa@rock-chips.com \
    --to=chaoyi.chen@rock-chips.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=andrzej.hajda@intel.com \
    --cc=andy.yan@rock-chips.com \
    --cc=andyshrk@163.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=domibel@debian.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hal.feng@starfivetech.com \
    --cc=heiko@sntech.de \
    --cc=hello@big-grey.co.uk \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@esmil.dk \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=m.szyprowski@samsung.com \
    --cc=m.wilczynski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maud_spierings@murena.io \
    --cc=maudspierings@gocontroll.com \
    --cc=mfd@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=uwu@icenowy.me \
    --cc=vkoul@kernel.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