All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] arm: socfpga: gen5: add readonly clk driver
Date: Thu, 15 Aug 2019 19:07:09 +0200	[thread overview]
Message-ID: <7a8ec431-da80-29ae-4cbb-49de092efd8f@denx.de> (raw)
In-Reply-To: <66ec55b4-ff32-93eb-855a-922102d14425@gmail.com>

On 8/15/19 6:57 PM, Simon Goldschmidt wrote:
> Am 15.08.2019 um 18:34 schrieb Marek Vasut:
>> On 8/15/19 6:22 PM, Simon Goldschmidt wrote:
>>> Hi Marek,
>>>
>>> Am 24.07.2019 um 09:45 schrieb Simon Goldschmidt:
>>>> On Wed, Jul 24, 2019 at 9:31 AM Marek Vasut <marex@denx.de> wrote:
>>>>>
>>>>> On 7/23/19 10:27 PM, Simon Goldschmidt wrote:
>>>>>> This adds clk-gen5 as a readonly DM_CLK driver that can return
>>>>>> clocks for
>>>>>> the peripherals.
>>>>>>
>>>>>> Further changes are:
>>>>>> - select DM_CLK for gen5 U-Boot and SPL
>>>>>> - add SPL tags to clock nodes in socfpga-common-u-boot.dtsi
>>>>>> - adjust socfpga.dtsi to provide missing src selection registers
>>>>>> - start 'handoff.dtsi' file for socrates (conatains clock speeds for
>>>>>> now)
>>>>>
>>>>> These should likely be separate patches then ?
>>>>
>>>> Well, in the end, yes. Especially the handoff.dtsi is required for
>>>> *all*
>>>> socfpga_gen5 boards, so I'll need to adapt the 'qts-filter.sh'
>>>> script to
>>>> generate it.
>>>>
>>>> I'll change that script and separate these patches in v2.
>>>
>>> I'm in the process of moving all of the 'qts' header files to devicetree
>>> handoff.dtsi files. CLK and DDR are already working (pinmux/iocsr not
>>> yet) - but I need to work a bit on DM memory consumption.
>>>
>>> So now I'm faced with a question: in which driver do I implement the
>>> pinmux control? From a DM point of view, it could be a UCLASS_PINCTRL
>>> driver in 'drivers/pinctrl', but since it's more or less read-only
>>> unless we'd get more details about the hardware, I'm a bit hesistant to
>>> do it that way.
>>>
>>> Also, the registers are in 'sysmgr', which is handled by the standard
>>> "syscon" driver right now, so it could well get a UCLASS_SYSCON driver?
>>
>> What do we need read-only pinmux driver for ? I would expect pinmux to
>> be more write-only, from the hardware perspective that is.
> 
> Well, I don't know. I just need a driver that can parse its dts subtree
> for the config instead of loading from the qts wrapper file. Then this
> driver needs to be probed at the appropriate place in SPL so that the
> pins are initialized.

Sounds more like misc driver or something along those lines.

> My future plan is then that such a driver could be re-probed after
> loading some kind of dts overlay matching an FPGA image to be programmed
> (as that FPGA image can contain different pin settings, e.g. when using
> loan IO).

But then it becomes a PINMUX driver.

> I'm just not familiar enough with pinctrl drivers or syscon drivers and
> could need some input on which direction to take this...
> 
> Does a syscon driver for that purpose sound better?

Isn't syscon driver for system controllers, which provide e.g. regmaps
to subdevices ? I think the altera pinmux shouldn't be syscon.

  reply	other threads:[~2019-08-15 17:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 20:27 [U-Boot] [PATCH 0/6] arm: socfpga: gen5: DM improvements Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 1/6] ddr: socfpga: gen5: constify altera_gen5_sdram_ops Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 2/6] arm: socfpga: gen5: increase SPL_SYS_MALLOC_F_LEN Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 3/6] timer: dw-apb: add reset handling Simon Goldschmidt
2019-07-24  7:21   ` Marek Vasut
2019-07-24  7:43     ` Simon Goldschmidt
2019-07-24  7:48       ` Marek Vasut
2019-07-24 18:09         ` Simon Goldschmidt
2019-07-25  7:34           ` Marek Vasut
2019-07-25 11:21             ` Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 4/6] arm: socfpga: gen5: move initial reset handling to reset driver Simon Goldschmidt
2019-07-24  7:21   ` Marek Vasut
2019-07-24  7:41     ` Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 5/6] arm: socfpga: gen5: add readonly clk driver Simon Goldschmidt
2019-07-24  7:23   ` Marek Vasut
2019-07-24  7:45     ` Simon Goldschmidt
2019-07-24  7:51       ` Marek Vasut
2019-07-24  8:24         ` Simon Goldschmidt
2019-07-24  8:29           ` Marek Vasut
2019-08-15 16:22       ` Simon Goldschmidt
2019-08-15 16:34         ` Marek Vasut
2019-08-15 16:57           ` Simon Goldschmidt
2019-08-15 17:07             ` Marek Vasut [this message]
2019-08-15 17:42               ` Simon Goldschmidt
2019-08-16  8:37                 ` Marek Vasut
2019-08-16 12:12                   ` Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 6/6] arm: socfpga: gen5: use DM_TIMER for systick Simon Goldschmidt
2019-07-23 20:33 ` [U-Boot] [PATCH 0/6] arm: socfpga: gen5: DM improvements Simon Goldschmidt

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=7a8ec431-da80-29ae-4cbb-49de092efd8f@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.