diff mbox series

[v7,21/22] doc: sifive: fu540: Add description for OpenSBI generic platform

Message ID 20200502100628.24809-22-pragnesh.patel@sifive.com
State New
Headers show
Series RISC-V SiFive FU540 support SPL | expand

Commit Message

Pragnesh Patel May 2, 2020, 10:06 a.m. UTC
OpenSBI generic platform support provides platform specific
functionality based on the FDT passed by previous booting stage.

depends on OpenSBI commit:
platform: Add generic FDT based platform support
(sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)

Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
---
 doc/board/sifive/fu540.rst | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

Comments

Bin Meng May 2, 2020, 12:55 p.m. UTC | #1
Hi Pragnesh,

On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel <pragnesh.patel at sifive.com> wrote:
>
> OpenSBI generic platform support provides platform specific
> functionality based on the FDT passed by previous booting stage.
>
> depends on OpenSBI commit:
> platform: Add generic FDT based platform support
> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
>
> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
> ---
>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst
> index 610ba87074..1c3d4740f3 100644
> --- a/doc/board/sifive/fu540.rst
> +++ b/doc/board/sifive/fu540.rst
> @@ -22,14 +22,21 @@ The support for following drivers are already enabled:
>
>  TODO:
>
> -1. U-Boot expects the serial console device entry to be present under /chosen
> -   DT node. Without a serial console U-Boot will panic. Example:
> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
> +   DT node and the "/chosen" DT node should have "stdout-path" DT
> +   property.
>
>  .. code-block:: none
>
> -   chosen {
> -        stdout-path = "/soc/serial at 10010000:115200";
> -   };
> +       chosen {
> +               stdout-path = "/soc/serial at 10010000:115200";
> +       };
> +
> +       clint at 2000000 {
> +               compatible = "riscv,clint0";
> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 &cpu1_intc 3 &cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7 &cpu4_intc 3 &cpu4_intc 7>;
> +               reg = <0x0 0x2000000 0x0 0xc0000>;
> +       };

Can we update the U-Boot dtsi to include the changes?

>
>  Building
>  --------
> @@ -58,7 +65,7 @@ firmware. We need to compile OpenSBI with below command:
>
>  .. code-block:: none
>
> -make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
> +       make PLATFORM=generic FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
>
>  More detailed description of steps required to build FW_PAYLOAD firmware
>  is beyond the scope of this document. Please refer OpenSBI documenation.

Regards,
Bin
Pragnesh Patel May 2, 2020, 2:30 p.m. UTC | #2
Hi Bin,

>-----Original Message-----
>From: Bin Meng <bmeng.cn at gmail.com>
>Sent: 02 May 2020 18:26
>To: Pragnesh Patel <pragnesh.patel at sifive.com>
>Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul
>Walmsley <paul.walmsley at sifive.com>; Jagan Teki
><jagan at amarulasolutions.com>; Troy Benjegerdes
><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
>Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
>Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI
>generic platform
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Hi Pragnesh,
>
>On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel <pragnesh.patel at sifive.com>
>wrote:
>>
>> OpenSBI generic platform support provides platform specific
>> functionality based on the FDT passed by previous booting stage.
>>
>> depends on OpenSBI commit:
>> platform: Add generic FDT based platform support
>> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
>>
>> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
>> ---
>>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
>>  1 file changed, 13 insertions(+), 6 deletions(-)
>>
>> diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst
>> index 610ba87074..1c3d4740f3 100644
>> --- a/doc/board/sifive/fu540.rst
>> +++ b/doc/board/sifive/fu540.rst
>> @@ -22,14 +22,21 @@ The support for following drivers are already
>enabled:
>>
>>  TODO:
>>
>> -1. U-Boot expects the serial console device entry to be present under
>/chosen
>> -   DT node. Without a serial console U-Boot will panic. Example:
>> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
>> +   DT node and the "/chosen" DT node should have "stdout-path" DT
>> +   property.
>>
>>  .. code-block:: none
>>
>> -   chosen {
>> -        stdout-path = "/soc/serial at 10010000:115200";
>> -   };
>> +       chosen {
>> +               stdout-path = "/soc/serial at 10010000:115200";
>> +       };
>> +
>> +       clint at 2000000 {
>> +               compatible = "riscv,clint0";
>> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 &cpu1_intc 3
>&cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7
>&cpu4_intc 3 &cpu4_intc 7>;
>> +               reg = <0x0 0x2000000 0x0 0xc0000>;
>> +       };
>
>Can we update the U-Boot dtsi to include the changes?

Can you please clarify which dtsi fu540-c000-u-boot.dtsi or fu540-c000.dtsi ?

I have already added clint DT node in "arch/riscv/dts/fu540-c000-u-boot.dtsi"

>
>>
>>  Building
>>  --------
>> @@ -58,7 +65,7 @@ firmware. We need to compile OpenSBI with below
>command:
>>
>>  .. code-block:: none
>>
>> -make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot-
>dtb.bin>
>> +       make PLATFORM=generic FW_PAYLOAD_PATH=<path to u-boot-
>dtb.bin>
>>
>>  More detailed description of steps required to build FW_PAYLOAD
>> firmware  is beyond the scope of this document. Please refer OpenSBI
>documenation.
>
>Regards,
>Bin
Bin Meng May 2, 2020, 3:16 p.m. UTC | #3
Hi Pragnesh,

On Sat, May 2, 2020 at 10:30 PM Pragnesh Patel
<pragnesh.patel at sifive.com> wrote:
>
> Hi Bin,
>
> >-----Original Message-----
> >From: Bin Meng <bmeng.cn at gmail.com>
> >Sent: 02 May 2020 18:26
> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
> ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul
> >Walmsley <paul.walmsley at sifive.com>; Jagan Teki
> ><jagan at amarulasolutions.com>; Troy Benjegerdes
> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
> >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI
> >generic platform
> >
> >[External Email] Do not click links or attachments unless you recognize the
> >sender and know the content is safe
> >
> >Hi Pragnesh,
> >
> >On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel <pragnesh.patel at sifive.com>
> >wrote:
> >>
> >> OpenSBI generic platform support provides platform specific
> >> functionality based on the FDT passed by previous booting stage.
> >>
> >> depends on OpenSBI commit:
> >> platform: Add generic FDT based platform support
> >> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
> >>
> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
> >> ---
> >>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
> >>  1 file changed, 13 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst
> >> index 610ba87074..1c3d4740f3 100644
> >> --- a/doc/board/sifive/fu540.rst
> >> +++ b/doc/board/sifive/fu540.rst
> >> @@ -22,14 +22,21 @@ The support for following drivers are already
> >enabled:
> >>
> >>  TODO:
> >>
> >> -1. U-Boot expects the serial console device entry to be present under
> >/chosen
> >> -   DT node. Without a serial console U-Boot will panic. Example:
> >> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
> >> +   DT node and the "/chosen" DT node should have "stdout-path" DT
> >> +   property.
> >>
> >>  .. code-block:: none
> >>
> >> -   chosen {
> >> -        stdout-path = "/soc/serial at 10010000:115200";
> >> -   };
> >> +       chosen {
> >> +               stdout-path = "/soc/serial at 10010000:115200";
> >> +       };
> >> +
> >> +       clint at 2000000 {
> >> +               compatible = "riscv,clint0";
> >> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 &cpu1_intc 3
> >&cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7
> >&cpu4_intc 3 &cpu4_intc 7>;
> >> +               reg = <0x0 0x2000000 0x0 0xc0000>;
> >> +       };
> >
> >Can we update the U-Boot dtsi to include the changes?
>
> Can you please clarify which dtsi fu540-c000-u-boot.dtsi or fu540-c000.dtsi ?
>
> I have already added clint DT node in "arch/riscv/dts/fu540-c000-u-boot.dtsi"

I thought we did not add this. So maybe we can remove this information
completely from the doc?

Regards,
Bin
Pragnesh Patel May 2, 2020, 3:22 p.m. UTC | #4
Hi Bin,

>-----Original Message-----
>From: Bin Meng <bmeng.cn at gmail.com>
>Sent: 02 May 2020 20:47
>To: Pragnesh Patel <pragnesh.patel at sifive.com>
>Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul
>Walmsley <paul.walmsley at sifive.com>; Jagan Teki
><jagan at amarulasolutions.com>; Troy Benjegerdes
><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
>Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
>Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI
>generic platform
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Hi Pragnesh,
>
>On Sat, May 2, 2020 at 10:30 PM Pragnesh Patel <pragnesh.patel at sifive.com>
>wrote:
>>
>> Hi Bin,
>>
>> >-----Original Message-----
>> >From: Bin Meng <bmeng.cn at gmail.com>
>> >Sent: 02 May 2020 18:26
>> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
>> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
>> ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>;
>> >Paul Walmsley <paul.walmsley at sifive.com>; Jagan Teki
>> ><jagan at amarulasolutions.com>; Troy Benjegerdes
>> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
>> >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
>> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for
>> >OpenSBI generic platform
>> >
>> >[External Email] Do not click links or attachments unless you
>> >recognize the sender and know the content is safe
>> >
>> >Hi Pragnesh,
>> >
>> >On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel
>> ><pragnesh.patel at sifive.com>
>> >wrote:
>> >>
>> >> OpenSBI generic platform support provides platform specific
>> >> functionality based on the FDT passed by previous booting stage.
>> >>
>> >> depends on OpenSBI commit:
>> >> platform: Add generic FDT based platform support
>> >> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
>> >>
>> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
>> >> ---
>> >>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
>> >>  1 file changed, 13 insertions(+), 6 deletions(-)
>> >>
>> >> diff --git a/doc/board/sifive/fu540.rst
>> >> b/doc/board/sifive/fu540.rst index 610ba87074..1c3d4740f3 100644
>> >> --- a/doc/board/sifive/fu540.rst
>> >> +++ b/doc/board/sifive/fu540.rst
>> >> @@ -22,14 +22,21 @@ The support for following drivers are already
>> >enabled:
>> >>
>> >>  TODO:
>> >>
>> >> -1. U-Boot expects the serial console device entry to be present
>> >> under
>> >/chosen
>> >> -   DT node. Without a serial console U-Boot will panic. Example:
>> >> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
>> >> +   DT node and the "/chosen" DT node should have "stdout-path" DT
>> >> +   property.
>> >>
>> >>  .. code-block:: none
>> >>
>> >> -   chosen {
>> >> -        stdout-path = "/soc/serial at 10010000:115200";
>> >> -   };
>> >> +       chosen {
>> >> +               stdout-path = "/soc/serial at 10010000:115200";
>> >> +       };
>> >> +
>> >> +       clint at 2000000 {
>> >> +               compatible = "riscv,clint0";
>> >> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
>> >> + &cpu1_intc 3
>> >&cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7
>> >&cpu4_intc 3 &cpu4_intc 7>;
>> >> +               reg = <0x0 0x2000000 0x0 0xc0000>;
>> >> +       };
>> >
>> >Can we update the U-Boot dtsi to include the changes?
>>
>> Can you please clarify which dtsi fu540-c000-u-boot.dtsi or fu540-c000.dtsi ?
>>
>> I have already added clint DT node in "arch/riscv/dts/fu540-c000-u-
>boot.dtsi"
>
>I thought we did not add this. So maybe we can remove this information
>completely from the doc?

OpenSBI expect a "chosen DT node and clint DT node" from prior stage bootloader DTB, So i think
it's fine to add clint as a reference here.

Any suggestions are welcome.

>
>Regards,
>Bin
Bin Meng May 2, 2020, 3:27 p.m. UTC | #5
Hi Pragnesh,

On Sat, May 2, 2020 at 11:22 PM Pragnesh Patel
<pragnesh.patel at sifive.com> wrote:
>
>
> Hi Bin,
>
> >-----Original Message-----
> >From: Bin Meng <bmeng.cn at gmail.com>
> >Sent: 02 May 2020 20:47
> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
> ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul
> >Walmsley <paul.walmsley at sifive.com>; Jagan Teki
> ><jagan at amarulasolutions.com>; Troy Benjegerdes
> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
> >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI
> >generic platform
> >
> >[External Email] Do not click links or attachments unless you recognize the
> >sender and know the content is safe
> >
> >Hi Pragnesh,
> >
> >On Sat, May 2, 2020 at 10:30 PM Pragnesh Patel <pragnesh.patel at sifive.com>
> >wrote:
> >>
> >> Hi Bin,
> >>
> >> >-----Original Message-----
> >> >From: Bin Meng <bmeng.cn at gmail.com>
> >> >Sent: 02 May 2020 18:26
> >> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
> >> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
> >> ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>;
> >> >Paul Walmsley <paul.walmsley at sifive.com>; Jagan Teki
> >> ><jagan at amarulasolutions.com>; Troy Benjegerdes
> >> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
> >> >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
> >> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for
> >> >OpenSBI generic platform
> >> >
> >> >[External Email] Do not click links or attachments unless you
> >> >recognize the sender and know the content is safe
> >> >
> >> >Hi Pragnesh,
> >> >
> >> >On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel
> >> ><pragnesh.patel at sifive.com>
> >> >wrote:
> >> >>
> >> >> OpenSBI generic platform support provides platform specific
> >> >> functionality based on the FDT passed by previous booting stage.
> >> >>
> >> >> depends on OpenSBI commit:
> >> >> platform: Add generic FDT based platform support
> >> >> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
> >> >>
> >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
> >> >> ---
> >> >>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
> >> >>  1 file changed, 13 insertions(+), 6 deletions(-)
> >> >>
> >> >> diff --git a/doc/board/sifive/fu540.rst
> >> >> b/doc/board/sifive/fu540.rst index 610ba87074..1c3d4740f3 100644
> >> >> --- a/doc/board/sifive/fu540.rst
> >> >> +++ b/doc/board/sifive/fu540.rst
> >> >> @@ -22,14 +22,21 @@ The support for following drivers are already
> >> >enabled:
> >> >>
> >> >>  TODO:
> >> >>
> >> >> -1. U-Boot expects the serial console device entry to be present
> >> >> under
> >> >/chosen
> >> >> -   DT node. Without a serial console U-Boot will panic. Example:
> >> >> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
> >> >> +   DT node and the "/chosen" DT node should have "stdout-path" DT
> >> >> +   property.
> >> >>
> >> >>  .. code-block:: none
> >> >>
> >> >> -   chosen {
> >> >> -        stdout-path = "/soc/serial at 10010000:115200";
> >> >> -   };
> >> >> +       chosen {
> >> >> +               stdout-path = "/soc/serial at 10010000:115200";
> >> >> +       };
> >> >> +
> >> >> +       clint at 2000000 {
> >> >> +               compatible = "riscv,clint0";
> >> >> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
> >> >> + &cpu1_intc 3
> >> >&cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7
> >> >&cpu4_intc 3 &cpu4_intc 7>;
> >> >> +               reg = <0x0 0x2000000 0x0 0xc0000>;
> >> >> +       };
> >> >
> >> >Can we update the U-Boot dtsi to include the changes?
> >>
> >> Can you please clarify which dtsi fu540-c000-u-boot.dtsi or fu540-c000.dtsi ?
> >>
> >> I have already added clint DT node in "arch/riscv/dts/fu540-c000-u-
> >boot.dtsi"
> >
> >I thought we did not add this. So maybe we can remove this information
> >completely from the doc?
>
> OpenSBI expect a "chosen DT node and clint DT node" from prior stage bootloader DTB, So i think
> it's fine to add clint as a reference here.
>
> Any suggestions are welcome.
>

Maybe such information should be put in the OpenSBI generic platform
doc, but not U-Boot doc ??

Regards,
Bin
Pragnesh Patel May 2, 2020, 3:29 p.m. UTC | #6
Hi Bin,

>-----Original Message-----
>From: Bin Meng <bmeng.cn at gmail.com>
>Sent: 02 May 2020 20:58
>To: Pragnesh Patel <pragnesh.patel at sifive.com>
>Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul
>Walmsley <paul.walmsley at sifive.com>; Jagan Teki
><jagan at amarulasolutions.com>; Troy Benjegerdes
><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
>Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
>Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI
>generic platform
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Hi Pragnesh,
>
>On Sat, May 2, 2020 at 11:22 PM Pragnesh Patel <pragnesh.patel at sifive.com>
>wrote:
>>
>>
>> Hi Bin,
>>
>> >-----Original Message-----
>> >From: Bin Meng <bmeng.cn at gmail.com>
>> >Sent: 02 May 2020 20:47
>> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
>> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
>> ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>;
>> >Paul Walmsley <paul.walmsley at sifive.com>; Jagan Teki
>> ><jagan at amarulasolutions.com>; Troy Benjegerdes
>> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
>> >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
>> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for
>> >OpenSBI generic platform
>> >
>> >[External Email] Do not click links or attachments unless you
>> >recognize the sender and know the content is safe
>> >
>> >Hi Pragnesh,
>> >
>> >On Sat, May 2, 2020 at 10:30 PM Pragnesh Patel
>> ><pragnesh.patel at sifive.com>
>> >wrote:
>> >>
>> >> Hi Bin,
>> >>
>> >> >-----Original Message-----
>> >> >From: Bin Meng <bmeng.cn at gmail.com>
>> >> >Sent: 02 May 2020 18:26
>> >> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
>> >> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
>> >> ><atish.patra at wdc.com>; Palmer Dabbelt
><palmerdabbelt at google.com>;
>> >> >Paul Walmsley <paul.walmsley at sifive.com>; Jagan Teki
>> >> ><jagan at amarulasolutions.com>; Troy Benjegerdes
>> >> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>;
>> >> >Sagar Kadam <sagar.kadam at sifive.com>; Rick Chen
>> >> ><rick at andestech.com>
>> >> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description
>> >> >for OpenSBI generic platform
>> >> >
>> >> >[External Email] Do not click links or attachments unless you
>> >> >recognize the sender and know the content is safe
>> >> >
>> >> >Hi Pragnesh,
>> >> >
>> >> >On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel
>> >> ><pragnesh.patel at sifive.com>
>> >> >wrote:
>> >> >>
>> >> >> OpenSBI generic platform support provides platform specific
>> >> >> functionality based on the FDT passed by previous booting stage.
>> >> >>
>> >> >> depends on OpenSBI commit:
>> >> >> platform: Add generic FDT based platform support
>> >> >> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
>> >> >>
>> >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
>> >> >> ---
>> >> >>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
>> >> >>  1 file changed, 13 insertions(+), 6 deletions(-)
>> >> >>
>> >> >> diff --git a/doc/board/sifive/fu540.rst
>> >> >> b/doc/board/sifive/fu540.rst index 610ba87074..1c3d4740f3 100644
>> >> >> --- a/doc/board/sifive/fu540.rst
>> >> >> +++ b/doc/board/sifive/fu540.rst
>> >> >> @@ -22,14 +22,21 @@ The support for following drivers are
>> >> >> already
>> >> >enabled:
>> >> >>
>> >> >>  TODO:
>> >> >>
>> >> >> -1. U-Boot expects the serial console device entry to be present
>> >> >> under
>> >> >/chosen
>> >> >> -   DT node. Without a serial console U-Boot will panic. Example:
>> >> >> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have
>CLINT
>> >> >> +   DT node and the "/chosen" DT node should have "stdout-path" DT
>> >> >> +   property.
>> >> >>
>> >> >>  .. code-block:: none
>> >> >>
>> >> >> -   chosen {
>> >> >> -        stdout-path = "/soc/serial at 10010000:115200";
>> >> >> -   };
>> >> >> +       chosen {
>> >> >> +               stdout-path = "/soc/serial at 10010000:115200";
>> >> >> +       };
>> >> >> +
>> >> >> +       clint at 2000000 {
>> >> >> +               compatible = "riscv,clint0";
>> >> >> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
>> >> >> + &cpu1_intc 3
>> >> >&cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7
>> >> >&cpu4_intc 3 &cpu4_intc 7>;
>> >> >> +               reg = <0x0 0x2000000 0x0 0xc0000>;
>> >> >> +       };
>> >> >
>> >> >Can we update the U-Boot dtsi to include the changes?
>> >>
>> >> Can you please clarify which dtsi fu540-c000-u-boot.dtsi or fu540-
>c000.dtsi ?
>> >>
>> >> I have already added clint DT node in "arch/riscv/dts/fu540-c000-u-
>> >boot.dtsi"
>> >
>> >I thought we did not add this. So maybe we can remove this
>> >information completely from the doc?
>>
>> OpenSBI expect a "chosen DT node and clint DT node" from prior stage
>> bootloader DTB, So i think it's fine to add clint as a reference here.
>>
>> Any suggestions are welcome.
>>
>
>Maybe such information should be put in the OpenSBI generic platform doc,
>but not U-Boot doc ??

I am okay with your suggestion, will remove clint in v8.

>
>Regards,
>Bin
Anup Patel May 3, 2020, 4:36 a.m. UTC | #7
On Sat, May 2, 2020 at 8:57 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Pragnesh,
>
> On Sat, May 2, 2020 at 11:22 PM Pragnesh Patel
> <pragnesh.patel at sifive.com> wrote:
> >
> >
> > Hi Bin,
> >
> > >-----Original Message-----
> > >From: Bin Meng <bmeng.cn at gmail.com>
> > >Sent: 02 May 2020 20:47
> > >To: Pragnesh Patel <pragnesh.patel at sifive.com>
> > >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
> > ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul
> > >Walmsley <paul.walmsley at sifive.com>; Jagan Teki
> > ><jagan at amarulasolutions.com>; Troy Benjegerdes
> > ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
> > >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
> > >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI
> > >generic platform
> > >
> > >[External Email] Do not click links or attachments unless you recognize the
> > >sender and know the content is safe
> > >
> > >Hi Pragnesh,
> > >
> > >On Sat, May 2, 2020 at 10:30 PM Pragnesh Patel <pragnesh.patel at sifive.com>
> > >wrote:
> > >>
> > >> Hi Bin,
> > >>
> > >> >-----Original Message-----
> > >> >From: Bin Meng <bmeng.cn at gmail.com>
> > >> >Sent: 02 May 2020 18:26
> > >> >To: Pragnesh Patel <pragnesh.patel at sifive.com>
> > >> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra
> > >> ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>;
> > >> >Paul Walmsley <paul.walmsley at sifive.com>; Jagan Teki
> > >> ><jagan at amarulasolutions.com>; Troy Benjegerdes
> > >> ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar
> > >> >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>
> > >> >Subject: Re: [PATCH v7 21/22] doc: sifive: fu540: Add description for
> > >> >OpenSBI generic platform
> > >> >
> > >> >[External Email] Do not click links or attachments unless you
> > >> >recognize the sender and know the content is safe
> > >> >
> > >> >Hi Pragnesh,
> > >> >
> > >> >On Sat, May 2, 2020 at 6:09 PM Pragnesh Patel
> > >> ><pragnesh.patel at sifive.com>
> > >> >wrote:
> > >> >>
> > >> >> OpenSBI generic platform support provides platform specific
> > >> >> functionality based on the FDT passed by previous booting stage.
> > >> >>
> > >> >> depends on OpenSBI commit:
> > >> >> platform: Add generic FDT based platform support
> > >> >> (sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)
> > >> >>
> > >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
> > >> >> ---
> > >> >>  doc/board/sifive/fu540.rst | 19 +++++++++++++------
> > >> >>  1 file changed, 13 insertions(+), 6 deletions(-)
> > >> >>
> > >> >> diff --git a/doc/board/sifive/fu540.rst
> > >> >> b/doc/board/sifive/fu540.rst index 610ba87074..1c3d4740f3 100644
> > >> >> --- a/doc/board/sifive/fu540.rst
> > >> >> +++ b/doc/board/sifive/fu540.rst
> > >> >> @@ -22,14 +22,21 @@ The support for following drivers are already
> > >> >enabled:
> > >> >>
> > >> >>  TODO:
> > >> >>
> > >> >> -1. U-Boot expects the serial console device entry to be present
> > >> >> under
> > >> >/chosen
> > >> >> -   DT node. Without a serial console U-Boot will panic. Example:
> > >> >> +1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
> > >> >> +   DT node and the "/chosen" DT node should have "stdout-path" DT
> > >> >> +   property.
> > >> >>
> > >> >>  .. code-block:: none
> > >> >>
> > >> >> -   chosen {
> > >> >> -        stdout-path = "/soc/serial at 10010000:115200";
> > >> >> -   };
> > >> >> +       chosen {
> > >> >> +               stdout-path = "/soc/serial at 10010000:115200";
> > >> >> +       };
> > >> >> +
> > >> >> +       clint at 2000000 {
> > >> >> +               compatible = "riscv,clint0";
> > >> >> +               interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
> > >> >> + &cpu1_intc 3
> > >> >&cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7
> > >> >&cpu4_intc 3 &cpu4_intc 7>;
> > >> >> +               reg = <0x0 0x2000000 0x0 0xc0000>;
> > >> >> +       };
> > >> >
> > >> >Can we update the U-Boot dtsi to include the changes?
> > >>
> > >> Can you please clarify which dtsi fu540-c000-u-boot.dtsi or fu540-c000.dtsi ?
> > >>
> > >> I have already added clint DT node in "arch/riscv/dts/fu540-c000-u-
> > >boot.dtsi"
> > >
> > >I thought we did not add this. So maybe we can remove this information
> > >completely from the doc?
> >
> > OpenSBI expect a "chosen DT node and clint DT node" from prior stage bootloader DTB, So i think
> > it's fine to add clint as a reference here.
> >
> > Any suggestions are welcome.
> >
>
> Maybe such information should be put in the OpenSBI generic platform
> doc, but not U-Boot doc ??

Sure, I will add more details to OpenSBI generic platform documentation.

Regards,
Anup
diff mbox series

Patch

diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst
index 610ba87074..1c3d4740f3 100644
--- a/doc/board/sifive/fu540.rst
+++ b/doc/board/sifive/fu540.rst
@@ -22,14 +22,21 @@  The support for following drivers are already enabled:
 
 TODO:
 
-1. U-Boot expects the serial console device entry to be present under /chosen
-   DT node. Without a serial console U-Boot will panic. Example:
+1. The DTB passed by U-Boot SPL or FSBL to OpenSBI should have CLINT
+   DT node and the "/chosen" DT node should have "stdout-path" DT
+   property.
 
 .. code-block:: none
 
-   chosen {
-        stdout-path = "/soc/serial at 10010000:115200";
-   };
+	chosen {
+		stdout-path = "/soc/serial at 10010000:115200";
+	};
+
+	clint at 2000000 {
+		compatible = "riscv,clint0";
+		interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 &cpu1_intc 3 &cpu1_intc 7 &cpu2_intc 3 &cpu2_intc 7 &cpu3_intc 3 &cpu3_intc 7 &cpu4_intc 3 &cpu4_intc 7>;
+		reg = <0x0 0x2000000 0x0 0xc0000>;
+	};
 
 Building
 --------
@@ -58,7 +65,7 @@  firmware. We need to compile OpenSBI with below command:
 
 .. code-block:: none
 
-make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
+	make PLATFORM=generic FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
 
 More detailed description of steps required to build FW_PAYLOAD firmware
 is beyond the scope of this document. Please refer OpenSBI documenation.