Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-22 Thread Peter Robinson
On Tue, Nov 21, 2023 at 2:50 PM Neil Armstrong
 wrote:
>
> On 21/11/2023 15:09, Tom Rini wrote:
> > On Tue, Nov 21, 2023 at 02:46:29PM +0100, Neil Armstrong wrote:
> >> On 21/11/2023 14:15, Tom Rini wrote:
> >>> On Tue, Nov 21, 2023 at 10:18:04AM +0100, Neil Armstrong wrote:
>  Hi Tom,
> 
>  On 20/11/2023 21:16, Tom Rini wrote:
> > Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
> > eventually display this information
> >
> > Signed-off-by: Tom Rini 
> > ---
> > Posting this as this was the easiest platform for me to test some SMBIOS
> > related patches on and I needed to populate the nodes so I could check
> > things in dmidecode once Linux was up.
> 
>  Sorry to be late a the party, but can't this be dynamically found from 
>  DT's compatible & model ?
>  Since I'll probably need to add this to all boards, it seems like a 
>  duplicate of what's already in the DT.
> >>>
> >>> Part of the "fun" as to why we have the binding here is that while we
> >>> could use the top-level model property, there's not a corresponding one
> >>> for manufacturer. I'm fine ignoring the patch I posted here and having a
> >>> longer discussion about populating SMBIOS more usefully, globally, as I
> >>> think has been suggested a time or two.
> >>>
> >>
> >> I'm ok landing it with the same data as from the vendor.
> >> but couldn't we use the first top-level compatible as default smbios data ?
> >>
> >> compatible = "vendor1,board-name", "vendor1,soc-name";
> >>
> >> and translate to:
> >>
> >>
> >> smbios {
> >>  system {
> >>  manufacturer = "vendor1";
> >>  product = "board-name";
> >>  };
> >>
> >>  baseboard {
> >>  manufacturer = "vendor1";
> >>  product = "board-name";
> >>  };
> >>
> >>  chassis {
> >>  manufacturer = "vendor1";
> >>  product = "board-name";
> >>  };
> >> };
> >>
> >> since the vendor name should be already documented in the linux
> >> bindings, same for the board name.
> >> And we would be free to add some custom data in the DT if needed.
> >>
> >> Anyway, not sure it's the right place to discuss about that !
> >
> > That's essentially
> > https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-2-ilias.apalodi...@linaro.org/
> > which had a bunch of comments on 1/2:
> > https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-1-ilias.apalodi...@linaro.org/
> >
> > But I think that since then some thoughts on the subject have changed
> > and that approach might be more welcome now than it was then.
> >
>
> Thanks for the pointer, seems I had the exact same idea.
> Hope this will be re-spinned, I don't want to add this to the 45 amlogic
> boards when we have the necessary info already available and documented...

Fedora has carried this patch for some time for the same reason, a lot
of the tools in distros around support use dmidecode for HW
information and reporting "Unknown" meant there was lots of reports
against tools all over the place. I'd been asking Ilias to upstream it
for a while so I'm in full agreement here and he did mention he would
resend it soon :)

Peter


Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-21 Thread Ilias Apalodimas
Hi Neil,

On Tue, 21 Nov 2023 at 16:43, Neil Armstrong  wrote:
>
> On 21/11/2023 15:09, Tom Rini wrote:
> > On Tue, Nov 21, 2023 at 02:46:29PM +0100, Neil Armstrong wrote:
> >> On 21/11/2023 14:15, Tom Rini wrote:
> >>> On Tue, Nov 21, 2023 at 10:18:04AM +0100, Neil Armstrong wrote:
>  Hi Tom,
> 
>  On 20/11/2023 21:16, Tom Rini wrote:
> > Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
> > eventually display this information
> >
> > Signed-off-by: Tom Rini 
> > ---
> > Posting this as this was the easiest platform for me to test some SMBIOS
> > related patches on and I needed to populate the nodes so I could check
> > things in dmidecode once Linux was up.
> 
>  Sorry to be late a the party, but can't this be dynamically found from 
>  DT's compatible & model ?
>  Since I'll probably need to add this to all boards, it seems like a 
>  duplicate of what's already in the DT.
> >>>
> >>> Part of the "fun" as to why we have the binding here is that while we
> >>> could use the top-level model property, there's not a corresponding one
> >>> for manufacturer. I'm fine ignoring the patch I posted here and having a
> >>> longer discussion about populating SMBIOS more usefully, globally, as I
> >>> think has been suggested a time or two.
> >>>
> >>
> >> I'm ok landing it with the same data as from the vendor.
> >> but couldn't we use the first top-level compatible as default smbios data ?
> >>
> >> compatible = "vendor1,board-name", "vendor1,soc-name";
> >>
> >> and translate to:
> >>
> >>
> >> smbios {
> >>  system {
> >>  manufacturer = "vendor1";
> >>  product = "board-name";
> >>  };
> >>
> >>  baseboard {
> >>  manufacturer = "vendor1";
> >>  product = "board-name";
> >>  };
> >>
> >>  chassis {
> >>  manufacturer = "vendor1";
> >>  product = "board-name";
> >>  };
> >> };
> >>
> >> since the vendor name should be already documented in the linux
> >> bindings, same for the board name.
> >> And we would be free to add some custom data in the DT if needed.
> >>
> >> Anyway, not sure it's the right place to discuss about that !
> >
> > That's essentially
> > https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-2-ilias.apalodi...@linaro.org/
> > which had a bunch of comments on 1/2:
> > https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-1-ilias.apalodi...@linaro.org/
> >
> > But I think that since then some thoughts on the subject have changed
> > and that approach might be more welcome now than it was then.
> >
>
> Thanks for the pointer, seems I had the exact same idea.
> Hope this will be re-spinned, I don't want to add this to the 45 amlogic
> boards when we have the necessary info already available and documented...

I'll respin the patches Tom mentioned once I find some time to address
the comments in v1. Hope to do it by the end of the week

Cheers
/Ilias
>
> Neil
>


Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-21 Thread Neil Armstrong

On 21/11/2023 15:09, Tom Rini wrote:

On Tue, Nov 21, 2023 at 02:46:29PM +0100, Neil Armstrong wrote:

On 21/11/2023 14:15, Tom Rini wrote:

On Tue, Nov 21, 2023 at 10:18:04AM +0100, Neil Armstrong wrote:

Hi Tom,

On 20/11/2023 21:16, Tom Rini wrote:

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
eventually display this information

Signed-off-by: Tom Rini 
---
Posting this as this was the easiest platform for me to test some SMBIOS
related patches on and I needed to populate the nodes so I could check
things in dmidecode once Linux was up.


Sorry to be late a the party, but can't this be dynamically found from DT's 
compatible & model ?
Since I'll probably need to add this to all boards, it seems like a duplicate 
of what's already in the DT.


Part of the "fun" as to why we have the binding here is that while we
could use the top-level model property, there's not a corresponding one
for manufacturer. I'm fine ignoring the patch I posted here and having a
longer discussion about populating SMBIOS more usefully, globally, as I
think has been suggested a time or two.



I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:


smbios {
system {
manufacturer = "vendor1";
product = "board-name";
};

baseboard {
manufacturer = "vendor1";
product = "board-name";
};

chassis {
manufacturer = "vendor1";
product = "board-name";
};
};

since the vendor name should be already documented in the linux
bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !


That's essentially
https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-2-ilias.apalodi...@linaro.org/
which had a bunch of comments on 1/2:
https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-1-ilias.apalodi...@linaro.org/

But I think that since then some thoughts on the subject have changed
and that approach might be more welcome now than it was then.



Thanks for the pointer, seems I had the exact same idea.
Hope this will be re-spinned, I don't want to add this to the 45 amlogic
boards when we have the necessary info already available and documented...

Neil



Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-21 Thread Tom Rini
On Tue, Nov 21, 2023 at 02:46:29PM +0100, Neil Armstrong wrote:
> On 21/11/2023 14:15, Tom Rini wrote:
> > On Tue, Nov 21, 2023 at 10:18:04AM +0100, Neil Armstrong wrote:
> > > Hi Tom,
> > > 
> > > On 20/11/2023 21:16, Tom Rini wrote:
> > > > Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
> > > > eventually display this information
> > > > 
> > > > Signed-off-by: Tom Rini 
> > > > ---
> > > > Posting this as this was the easiest platform for me to test some SMBIOS
> > > > related patches on and I needed to populate the nodes so I could check
> > > > things in dmidecode once Linux was up.
> > > 
> > > Sorry to be late a the party, but can't this be dynamically found from 
> > > DT's compatible & model ?
> > > Since I'll probably need to add this to all boards, it seems like a 
> > > duplicate of what's already in the DT.
> > 
> > Part of the "fun" as to why we have the binding here is that while we
> > could use the top-level model property, there's not a corresponding one
> > for manufacturer. I'm fine ignoring the patch I posted here and having a
> > longer discussion about populating SMBIOS more usefully, globally, as I
> > think has been suggested a time or two.
> > 
> 
> I'm ok landing it with the same data as from the vendor.
> but couldn't we use the first top-level compatible as default smbios data ?
> 
> compatible = "vendor1,board-name", "vendor1,soc-name";
> 
> and translate to:
> 
> 
> smbios {
>   system {
>   manufacturer = "vendor1";
>   product = "board-name";
>   };
> 
>   baseboard {
>   manufacturer = "vendor1";
>   product = "board-name";
>   };
> 
>   chassis {
>   manufacturer = "vendor1";
>   product = "board-name";
>   };
> };
> 
> since the vendor name should be already documented in the linux
> bindings, same for the board name.
> And we would be free to add some custom data in the DT if needed.
> 
> Anyway, not sure it's the right place to discuss about that !

That's essentially
https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-2-ilias.apalodi...@linaro.org/
which had a bunch of comments on 1/2:
https://patchwork.ozlabs.org/project/uboot/patch/20220906134426.53748-1-ilias.apalodi...@linaro.org/

But I think that since then some thoughts on the subject have changed
and that approach might be more welcome now than it was then.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-21 Thread Neil Armstrong

On 21/11/2023 14:15, Tom Rini wrote:

On Tue, Nov 21, 2023 at 10:18:04AM +0100, Neil Armstrong wrote:

Hi Tom,

On 20/11/2023 21:16, Tom Rini wrote:

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
eventually display this information

Signed-off-by: Tom Rini 
---
Posting this as this was the easiest platform for me to test some SMBIOS
related patches on and I needed to populate the nodes so I could check
things in dmidecode once Linux was up.


Sorry to be late a the party, but can't this be dynamically found from DT's 
compatible & model ?
Since I'll probably need to add this to all boards, it seems like a duplicate 
of what's already in the DT.


Part of the "fun" as to why we have the binding here is that while we
could use the top-level model property, there's not a corresponding one
for manufacturer. I'm fine ignoring the patch I posted here and having a
longer discussion about populating SMBIOS more usefully, globally, as I
think has been suggested a time or two.



I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:


smbios {
system {
manufacturer = "vendor1";
product = "board-name";
};

baseboard {
manufacturer = "vendor1";
product = "board-name";
};

chassis {
manufacturer = "vendor1";
product = "board-name";
};
};

since the vendor name should be already documented in the linux
bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !

Neil


Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-21 Thread Tom Rini
On Tue, Nov 21, 2023 at 10:18:04AM +0100, Neil Armstrong wrote:
> Hi Tom,
> 
> On 20/11/2023 21:16, Tom Rini wrote:
> > Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
> > eventually display this information
> > 
> > Signed-off-by: Tom Rini 
> > ---
> > Posting this as this was the easiest platform for me to test some SMBIOS
> > related patches on and I needed to populate the nodes so I could check
> > things in dmidecode once Linux was up.
> 
> Sorry to be late a the party, but can't this be dynamically found from DT's 
> compatible & model ?
> Since I'll probably need to add this to all boards, it seems like a duplicate 
> of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we
could use the top-level model property, there's not a corresponding one
for manufacturer. I'm fine ignoring the patch I posted here and having a
longer discussion about populating SMBIOS more usefully, globally, as I
think has been suggested a time or two.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-21 Thread Neil Armstrong

Hi Tom,

On 20/11/2023 21:16, Tom Rini wrote:

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
eventually display this information

Signed-off-by: Tom Rini 
---
Posting this as this was the easiest platform for me to test some SMBIOS
related patches on and I needed to populate the nodes so I could check
things in dmidecode once Linux was up.


Sorry to be late a the party, but can't this be dynamically found from DT's 
compatible & model ?
Since I'll probably need to add this to all boards, it seems like a duplicate 
of what's already in the DT.



Cc: Neil Armstrong 
Cc: u-boot-amlo...@groups.io
---
  .../meson-gxl-s905x-libretech-cc-u-boot.dtsi  | 23 +++
  configs/libretech-cc_defconfig|  2 ++
  2 files changed, 25 insertions(+)

diff --git a/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi 
b/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi
index 39270ea71c8b..e56cd67a9d91 100644
--- a/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi
+++ b/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi
@@ -5,3 +5,26 @@
   */
  
  #include "meson-gxl-u-boot.dtsi"

+
+/ {
+   smbios {
+   compatible = "u-boot,sysinfo-smbios";
+
+   smbios {
+   system {
+   manufacturer = "libre.computer";
+   product = "Le Potato";


I'll use the real product identifier here instead: AML-S905X-CC

Here's the downstream vendor change:
https://github.com/libre-computer-project/libretech-u-boot/commit/cb68b838f1b80ad201ec02f04d2841ee535b9818


+   };
+
+   baseboard {
+   manufacturer = "libre.computer";
+   product = "Le Potato";
+   };
+
+   chassis {
+   manufacturer = "libre.computer";
+   product = "Le Potato";
+   };
+   };
+   };
+};
diff --git a/configs/libretech-cc_defconfig b/configs/libretech-cc_defconfig
index baa9b1b3dbc5..24a46f50d0d9 100644
--- a/configs/libretech-cc_defconfig
+++ b/configs/libretech-cc_defconfig
@@ -55,6 +55,8 @@ CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_DEBUG_UART_SKIP_INIT=y
  CONFIG_MESON_SERIAL=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
  CONFIG_USB=y
  CONFIG_DM_USB_GADGET=y
  CONFIG_USB_XHCI_HCD=y


Thanks,
Neil



Re: [PATCH] libretech-cc: Populate SMBIOS information

2023-11-20 Thread Simon Glass
On Mon, 20 Nov 2023 at 13:16, Tom Rini  wrote:
>
> Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
> eventually display this information
>
> Signed-off-by: Tom Rini 
> ---
> Posting this as this was the easiest platform for me to test some SMBIOS
> related patches on and I needed to populate the nodes so I could check
> things in dmidecode once Linux was up.
>
> Cc: Neil Armstrong 
> Cc: u-boot-amlo...@groups.io
> ---
>  .../meson-gxl-s905x-libretech-cc-u-boot.dtsi  | 23 +++
>  configs/libretech-cc_defconfig|  2 ++
>  2 files changed, 25 insertions(+)
>

Reviewed-by: Simon Glass 


[PATCH] libretech-cc: Populate SMBIOS information

2023-11-20 Thread Tom Rini
Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can
eventually display this information

Signed-off-by: Tom Rini 
---
Posting this as this was the easiest platform for me to test some SMBIOS
related patches on and I needed to populate the nodes so I could check
things in dmidecode once Linux was up.

Cc: Neil Armstrong 
Cc: u-boot-amlo...@groups.io
---
 .../meson-gxl-s905x-libretech-cc-u-boot.dtsi  | 23 +++
 configs/libretech-cc_defconfig|  2 ++
 2 files changed, 25 insertions(+)

diff --git a/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi 
b/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi
index 39270ea71c8b..e56cd67a9d91 100644
--- a/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi
+++ b/arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi
@@ -5,3 +5,26 @@
  */
 
 #include "meson-gxl-u-boot.dtsi"
+
+/ {
+   smbios {
+   compatible = "u-boot,sysinfo-smbios";
+
+   smbios {
+   system {
+   manufacturer = "libre.computer";
+   product = "Le Potato";
+   };
+
+   baseboard {
+   manufacturer = "libre.computer";
+   product = "Le Potato";
+   };
+
+   chassis {
+   manufacturer = "libre.computer";
+   product = "Le Potato";
+   };
+   };
+   };
+};
diff --git a/configs/libretech-cc_defconfig b/configs/libretech-cc_defconfig
index baa9b1b3dbc5..24a46f50d0d9 100644
--- a/configs/libretech-cc_defconfig
+++ b/configs/libretech-cc_defconfig
@@ -55,6 +55,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB_GADGET=y
 CONFIG_USB_XHCI_HCD=y
-- 
2.34.1