From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Heiko Stuebner <heiko@sntech.de>, Conor Dooley <conor@kernel.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Sandy Huang <hjc@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Mark Yao <markyao0591@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
kernel@collabora.com, Alexandre ARNOUD <aarnoud@me.com>,
Luis de Arquer <ldearquer@gmail.com>
Subject: Re: [PATCH v4 3/4] dt-bindings: display: rockchip: Add schema for RK3588 HDMI TX Controller
Date: Thu, 22 Aug 2024 02:22:16 +0300 [thread overview]
Message-ID: <2085e998-a453-4893-9e80-3be68b0fb13d@collabora.com> (raw)
In-Reply-To: <7E8109D4-A353-4FE3-9152-3C3C6CB7D634@sntech.de>
On 8/22/24 12:38 AM, Heiko Stuebner wrote:
>
>
> Am 21. August 2024 23:28:55 MESZ schrieb Conor Dooley <conor@kernel.org>:
>> Cristian, Heiko,
>>
>> On Wed, Aug 21, 2024 at 11:38:01PM +0300, Cristian Ciocaltea wrote:
>>> On 8/21/24 6:07 PM, Conor Dooley wrote:
>>>> On Tue, Aug 20, 2024 at 11:12:45PM +0300, Cristian Ciocaltea wrote:
>>>>> On 8/20/24 7:14 PM, Conor Dooley wrote:
>>>>>> On Tue, Aug 20, 2024 at 03:37:44PM +0300, Cristian Ciocaltea wrote:
>>>>>>> On 8/19/24 7:53 PM, Conor Dooley wrote:
>>>>>>>> On Mon, Aug 19, 2024 at 01:29:30AM +0300, Cristian Ciocaltea wrote:
>>>>>>>>> + rockchip,grf:
>>>>>>>>> + $ref: /schemas/types.yaml#/definitions/phandle
>>>>>>>>> + description:
>>>>>>>>> + Most HDMI QP related data is accessed through SYS GRF regs.
>>>>>>>>> +
>>>>>>>>> + rockchip,vo1-grf:
>>>>>>>>> + $ref: /schemas/types.yaml#/definitions/phandle
>>>>>>>>> + description:
>>>>>>>>> + Additional HDMI QP related data is accessed through VO1 GRF regs.
>>>>>>>>
>>>>>>>> Why are these required? What prevents you looking up the syscons by
>>>>>>>> compatible?
>>>>>>>
>>>>>>> That is for getting the proper instance:
>>>>>>
>>>>>> Ah, that makes sense. I am, however, curious why these have the same
>>>>>> compatible when they have different sized regions allocated to them.
>>>>>
>>>>> Good question, didn't notice. I've just checked the TRM and, in both
>>>>> cases, the maximum register offset is within the 0x100 range. Presumably
>>>>> this is nothing but an inconsistency, as the syscons have been added in
>>>>> separate commits.
>>>>
>>>> Is that TRM publicly available? I do find it curious that devices sound
>>>> like they have different contents have the same compatible. In my view,
>>>> that is incorrect and they should have unique compatibles if the
>>>> contents (and therefore the programming model) differs.
>>>
>>> Don't know if there's an official location to get it from, but a quick
>>> search on internet shows a few repos providing them, e.g. [1].
>>>
>>> Comparing "6.14 VO0_GRF Register Description" at pg. 777 with "6.15 VO1_GRF
>>> Register Description" at pg. 786 (from Part1) reveals the layout is mostly
>>> similar, with a few variations though.
>>
>> Page references and everything, thank you very much. I don't think those
>> two GRFs should have the same compatibles, they're, as you say, similar
>> but not identical. Seems like a bug to me!
>>
>> Heiko, what do you think?
>
> Yes, while the register names sound similar, looking at the bit
> definitions this evening revealed that they handle vastly different
> settings.
>
> So I guess we should fix the compatibles. They are all about graphics
> stuff and HDMI actually is the first output, so right now WE can at least
> still claim the no-users joker ;-)
I couldn't find any driver doing a lookup for them by compatible, so I
think it's fine to fix them - should we go for "rockchip,rk3588-vo0-grf" and
"rockchip,rk3588-vo1-grf", respectively?
vo0_grf seems to be used by the usbdp phy nodes:
usbdp_phy0: phy@fed80000 {
compatible = "rockchip,rk3588-usbdp-phy";
[...]
rockchip,vo-grf = <&vo0_grf>;
[...]
Same for "usbdp_phy1: phy@fed90000".
While vo1_grf is present in:
vop: vop@fdd90000 {
compatible = "rockchip,rk3588-vop";
[...]
rockchip,vo1-grf = <&vo1_grf>;
[...]
I guess it's too late to drop them while updating the related drivers
accordingly, hence I wonder if we should keep using the phandles for this
HDMI thing as well, for consistency reasons.
Thanks,
Cristian
> Heiko
>
>>
>>> [1] https://github.com/FanX-Tek/rk3588-TRM-and-Datasheet
>>>
>>>>>
>>>>>>> vo0_grf: syscon@fd5a6000 {
>>>>>>> compatible = "rockchip,rk3588-vo-grf", "syscon";
>>>>>>> reg = <0x0 0xfd5a6000 0x0 0x2000>;
>>>>>>> clocks = <&cru PCLK_VO0GRF>;
>>>>>>> };
>>>>>>>
>>>>>>> vo1_grf: syscon@fd5a8000 {
>>>>>>> compatible = "rockchip,rk3588-vo-grf", "syscon";
>>>>>>> reg = <0x0 0xfd5a8000 0x0 0x100>;
>>>>>>> clocks = <&cru PCLK_VO1GRF>;
>>>>>>> };
>>>>
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2024-08-21 23:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-18 22:29 [PATCH v4 0/4] Add initial support for the Rockchip RK3588 HDMI TX Controller Cristian Ciocaltea
2024-08-18 22:29 ` [PATCH v4 1/4] dt-bindings: display: bridge: Add schema for Synopsys DW HDMI QP TX IP Cristian Ciocaltea
2024-08-18 22:29 ` [PATCH v4 2/4] drm/bridge: synopsys: Add DW HDMI QP TX Controller support library Cristian Ciocaltea
2024-08-27 8:58 ` Maxime Ripard
2024-08-30 22:21 ` Cristian Ciocaltea
2024-09-02 7:36 ` Maxime Ripard
2024-09-02 21:12 ` Cristian Ciocaltea
2024-09-03 8:09 ` Maxime Ripard
2024-09-06 1:25 ` Cristian Ciocaltea
2024-08-18 22:29 ` [PATCH v4 3/4] dt-bindings: display: rockchip: Add schema for RK3588 HDMI TX Controller Cristian Ciocaltea
2024-08-19 16:53 ` Conor Dooley
2024-08-20 12:37 ` Cristian Ciocaltea
2024-08-20 16:14 ` Conor Dooley
2024-08-20 20:12 ` Cristian Ciocaltea
2024-08-21 15:07 ` Conor Dooley
2024-08-21 20:38 ` Cristian Ciocaltea
2024-08-21 21:28 ` Conor Dooley
2024-08-21 21:38 ` Heiko Stuebner
2024-08-21 23:22 ` Cristian Ciocaltea [this message]
2024-08-22 7:01 ` Heiko Stübner
2024-08-22 8:41 ` Conor Dooley
2024-08-22 11:59 ` Cristian Ciocaltea
2024-08-23 1:01 ` Andy Yan
2024-08-23 16:02 ` Conor Dooley
2024-08-23 10:47 ` Heiko Stübner
2024-08-23 15:59 ` Conor Dooley
2024-08-18 22:29 ` [PATCH v4 4/4] drm/rockchip: Add basic RK3588 HDMI output support Cristian Ciocaltea
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=2085e998-a453-4893-9e80-3be68b0fb13d@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aarnoud@me.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=ldearquer@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=markyao0591@gmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tzimmermann@suse.de \
/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