All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Pelletier <plr.vincent@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Qiu Wenbo <qiuwenbo@kylinos.com.cn>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched
Date: Sun, 4 Jul 2021 12:13:02 +0000	[thread overview]
Message-ID: <20210704121302.3aa8eedf@gmail.com> (raw)
In-Reply-To: <87eece7838.fsf@linux-m68k.org>

On Sun, 04 Jul 2021 11:15:55 +0200, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Jul 04 2021, Qiu Wenbo wrote:
> 
> > The production version of HiFive Unmatched have 16GB memory.
> >
> > Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
> > ---
> >  arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> > index b1c3c596578f..2e4ea84f27e7 100644
> > --- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> > +++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> > @@ -24,7 +24,7 @@ cpus {
> >  
> >  	memory@80000000 {
> >  		device_type = "memory";
> > -		reg = <0x0 0x80000000 0x2 0x00000000>;
> > +		reg = <0x0 0x80000000 0x4 0x00000000>;
> >  	};
> >  
> >  	soc {  
> 
> https://github.com/sifive/meta-sifive/blob/2021.06/recipes-kernel/linux/files/0003-riscv-sifive-unmatched-update-for-16GB-rev3.patch
> contains more changes.

Here is what I learned on this topic while poking at the regulator part
of this devicetree:

While these extra changes match the board's schematics, they are
rejected by the da9063-regulator driver:
- some channels are merged on the board, but the devicetree does not
  show that: they have different names, with different maximum current.
  The updated values exceed the single-channel maximum, so the driver
  rejects them.
- 3 of the regulators are further configurable in overdrive mode on the
  board, allowing higher maximum current, but the driver does not
  handle this.
  Similarly to previous point, the updated values exceed the
  non-overdrive maximum, so the driver rejects them.
  I've submitted a tentative fix, but its logic is backwards: it
  detects the overdrive bits and increases the maximums, whereas it
  should see the higher maximums and as a reaction enable the overdrive
  bits
- also, some voltages fall in-between possible values, which causes the
  driver to reject as well (ex: vdd_bperi is at 1.05V, but the chip can
  either do 1.04 or 1.06)
- ...and likewise for some current values (ex: vdd_bpro is at 2.5A, but
  the chip can only detect 2.4 or 2.6)

So from a pure system behaviour perspective, these extra changes should
not matter either way (at least in my understanding). At least not with
the driver in its current state.

OTOH:
- the changes missing here are more correct than current master
- not including them will probably make meta-sifive maintainer's life a
  bit more difficult
-- 
Vincent Pelletier
GPG fingerprint 983A E8B7 3B91 1598 7A92 3845 CAC9 3691 4257 B0C1

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

  reply	other threads:[~2021-07-04 12:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04  8:34 [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched Qiu Wenbo
2021-07-04  9:15 ` Andreas Schwab
2021-07-04 12:13   ` Vincent Pelletier [this message]
2021-07-30 11:54     ` Heinrich Schuchardt
2021-08-04  4:17       ` Palmer Dabbelt
2021-07-04 10:27 ` Geert Uytterhoeven
2021-07-04 10:54   ` Qiu Wenbo

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=20210704121302.3aa8eedf@gmail.com \
    --to=plr.vincent@gmail.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=qiuwenbo@kylinos.com.cn \
    --cc=schwab@linux-m68k.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 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.