* [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched @ 2021-07-04 8:34 Qiu Wenbo 2021-07-04 9:15 ` Andreas Schwab 2021-07-04 10:27 ` Geert Uytterhoeven 0 siblings, 2 replies; 7+ messages in thread From: Qiu Wenbo @ 2021-07-04 8:34 UTC (permalink / raw) To: Palmer Dabbelt; +Cc: linux-riscv 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 { -- 2.32.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched 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 2021-07-04 10:27 ` Geert Uytterhoeven 1 sibling, 1 reply; 7+ messages in thread From: Andreas Schwab @ 2021-07-04 9:15 UTC (permalink / raw) To: Qiu Wenbo; +Cc: Palmer Dabbelt, linux-riscv 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. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched 2021-07-04 9:15 ` Andreas Schwab @ 2021-07-04 12:13 ` Vincent Pelletier 2021-07-30 11:54 ` Heinrich Schuchardt 0 siblings, 1 reply; 7+ messages in thread From: Vincent Pelletier @ 2021-07-04 12:13 UTC (permalink / raw) To: Andreas Schwab; +Cc: Qiu Wenbo, Palmer Dabbelt, linux-riscv 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched 2021-07-04 12:13 ` Vincent Pelletier @ 2021-07-30 11:54 ` Heinrich Schuchardt 2021-08-04 4:17 ` Palmer Dabbelt 0 siblings, 1 reply; 7+ messages in thread From: Heinrich Schuchardt @ 2021-07-30 11:54 UTC (permalink / raw) To: Vincent Pelletier, Andreas Schwab; +Cc: Qiu Wenbo, Palmer Dabbelt, linux-riscv On 04.07.21 14:13, Vincent Pelletier wrote: > 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 > We should not mix changes that are unrelated in a single patch. Even if regulator changes are advised they should be submitted in a separate patch. The HiFive Unmatched shows the full available memory with this patch alone. Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched 2021-07-30 11:54 ` Heinrich Schuchardt @ 2021-08-04 4:17 ` Palmer Dabbelt 0 siblings, 0 replies; 7+ messages in thread From: Palmer Dabbelt @ 2021-08-04 4:17 UTC (permalink / raw) To: heinrich.schuchardt; +Cc: plr.vincent, schwab, qiuwenbo, linux-riscv On Fri, 30 Jul 2021 04:54:28 PDT (-0700), heinrich.schuchardt@canonical.com wrote: > On 04.07.21 14:13, Vincent Pelletier wrote: >> 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 >> > > We should not mix changes that are unrelated in a single patch. Even if > regulator changes are advised they should be submitted in a separate patch. > > The HiFive Unmatched shows the full available memory with this patch alone. > > Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> > Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Agreed. This is on fixes, if there are more DTS fixes I'm happy to take those as well. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched 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 10:27 ` Geert Uytterhoeven 2021-07-04 10:54 ` Qiu Wenbo 1 sibling, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2021-07-04 10:27 UTC (permalink / raw) To: Qiu Wenbo; +Cc: Palmer Dabbelt, linux-riscv Hi Qiu, On Sun, Jul 4, 2021 at 10:37 AM Qiu Wenbo <qiuwenbo@kylinos.com.cn> wrote: > The production version of HiFive Unmatched have 16GB memory. > > Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn> Thanks for your patch! > --- 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 { The /memory node is updated by U-Boot before passing it to the kernel anyway, right? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] riscv: dts: fix memory size for the SiFive HiFive Unmatched 2021-07-04 10:27 ` Geert Uytterhoeven @ 2021-07-04 10:54 ` Qiu Wenbo 0 siblings, 0 replies; 7+ messages in thread From: Qiu Wenbo @ 2021-07-04 10:54 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Palmer Dabbelt, linux-riscv Hi Geert, It isn't. The official SD card image from SiFive passes DTB through extlinux.conf. And the DTB can be an external DTB installed under the /boot partition. I got 8GB memory available without this patch applied. Thanks, Qiu On 7/4/21 6:27 PM, Geert Uytterhoeven wrote: > Hi Qiu, > > On Sun, Jul 4, 2021 at 10:37 AM Qiu Wenbo <qiuwenbo@kylinos.com.cn> wrote: >> The production version of HiFive Unmatched have 16GB memory. >> >> Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn> > Thanks for your patch! > >> --- 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 { > The /memory node is updated by U-Boot before passing it to the kernel > anyway, right? > > Gr{oetje,eeting}s, > > Geert > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-08-04 4:18 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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.