Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Mylene Josserand <mylene.josserand@collabora.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"Collabora Kernel ML" <kernel@collabora.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] ARM: Rockchip: Handle rk3288/rk3288w revision
Date: Fri, 27 Mar 2020 07:20:03 +0100
Message-ID: <5efe50ad-a88e-bc8c-de08-3be355ad9e53@collabora.com> (raw)
In-Reply-To: <CAMuHMdVKFT7eNK0RUi3miJ08O9FMAVs5Qz=YmbHH5-9UUzLNPw@mail.gmail.com>

Hi Geert,

On 3/26/20 4:31 PM, Geert Uytterhoeven wrote:
> Hi Mylene,
> 
> On Thu, Mar 26, 2020 at 2:50 PM Mylene Josserand
> <mylene.josserand@collabora.com> wrote:
>> On 3/6/20 11:45 AM, Geert Uytterhoeven wrote:
>>> On Wed, Mar 4, 2020 at 12:00 PM Heiko Stübner <heiko@sntech.de> wrote:
>>>> Am Montag, 2. März 2020, 16:57:02 CET schrieb Mylène Josserand:
>>>>> Determine which revision of rk3288 by checking the HDMI version.
>>>>> According to the Rockchip BSP kernel, on rk3288w, the HDMI
>>>>> revision equals 0x1A which is not the case for the rk3288 [1].
>>>>>
>>>>> As these SOC have some differences, the new function
>>>>> 'soc_is_rk3288w' will help us to know on which revision
>>>>> we are.
>>>>
>>>> what happened to just having a different compatible in the dts?
>>>> Aka doing a
>>>>
>>>> rk3288w.dtsi with
>>>>
>>>> #include "rk3288.dtsi"
>>>>
>>>> &cru {
>>>>           compatible = "rockchip,rk3288w-cru";
>>>> }
>>>>
>>>> I somehow don't expect boards to just switch between soc variants
>>>> on the fly.
>>>>
>>>> Also, doing things in mach-rockchip is not very future-proof:
>>>>
>>>> (1) having random soc-specific APIs spanning the kernel feels wrong,
>>>>       especially as at some point it might not be contained to our own special
>>>>       drivers like the cru. I cannot really see people being enthusiastic if
>>>>       something like this would be needed in say the core Analogix-DP bridge ;-)
>>>
>>> Indeed.  You're better of registering an soc_device_attribute using
>>> soc_device_register(), after which any driver can use soc_device_match()
>>> to differentiate based on the SoC revision.
>>
>> Thank you for this suggestion. The issue is that clocks are registered
>> at an early stage of the boot so using initcalls is too late for the
>> clock differentiation :(
> 
> IC, rk388 is still using CLK_OF_DECLARE().
> What about converting it to a platform driver, registered from e.g.
> subsys_initcall()?
> If you need some clocks early (e.g. for timers), you can do split
> registration, with the early part still using CLK_OF_DECLARE().
> That should work, assumed the timer clocks don't need differentiation.
> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 

oh, nice, thanks for the help!
I will try that and send a new version if it is working fine.

Best regards,
Mylène

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 15:57 [PATCH 0/2] ARM: Add Rockchip rk3288w support Mylène Josserand
2020-03-02 15:57 ` [PATCH 1/2] ARM: Rockchip: Handle rk3288/rk3288w revision Mylène Josserand
2020-03-04 10:59   ` Heiko Stübner
2020-03-05  0:03     ` Ezequiel Garcia
2020-03-05  0:51       ` Heiko Stübner
2020-03-05 11:32         ` Ezequiel Garcia
2020-03-05 11:35           ` Ezequiel Garcia
2020-03-06  2:44             ` Kever Yang
2020-03-06 10:30               ` Ezequiel Garcia
2020-03-06 10:45     ` Geert Uytterhoeven
2020-03-26 13:50       ` Mylene Josserand
2020-03-26 15:31         ` Geert Uytterhoeven
2020-03-27  6:20           ` Mylene Josserand [this message]
2020-03-02 15:57 ` [PATCH 2/2] clk: rockchip: rk3288: Handle clock tree for rk3288w Mylène Josserand
2020-03-04  5:34   ` kbuild test robot

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=5efe50ad-a88e-bc8c-de08-3be355ad9e53@collabora.com \
    --to=mylene.josserand@collabora.com \
    --cc=geert@linux-m68k.org \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git