All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  0:59 ` Oskar Senft
  0 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  0:59 UTC (permalink / raw)
  To: linux-arm-kernel, linux-aspeed, linux-kernel
  Cc: Rob Herring, Joel Stanley, Andrew Jeffery, Oskar Senft

This change updates the configuration for the nct7802 hardware
monitor to correctly configure its temperature sensors.

Signed-off-by: Oskar Senft <osk@google.com>
---
Changes from PATCH v1:
- Removed superfluous "status" from channels.
---
 arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
index 68f332ee1886..66734e4e2ea1 100644
--- a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
@@ -213,6 +213,25 @@ &i2c0 {
 	nct7802@28 {
 		compatible = "nuvoton,nct7802";
 		reg = <0x28>;
+		channel@0 { /* LTD */
+			reg = <0>;
+		};
+		channel@1 { /* RTD1 */
+			reg = <1>;
+			sensor-type = "temperature";
+			temperature-mode = "thermistor";
+		};
+
+		channel@2 { /* RTD2 */
+			reg = <2>;
+			sensor-type = "temperature";
+			temperature-mode = "thermistor";
+		};
+
+		channel@3 { /* RTD3 */
+			reg = <3>;
+			sensor-type = "temperature";
+		};
 	};
 
 	/* Also connected to:
-- 
2.34.0.rc0.344.g81b53c2807-goog


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  0:59 ` Oskar Senft
  0 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  0:59 UTC (permalink / raw)
  To: linux-arm-kernel, linux-aspeed, linux-kernel
  Cc: Rob Herring, Joel Stanley, Andrew Jeffery, Oskar Senft

This change updates the configuration for the nct7802 hardware
monitor to correctly configure its temperature sensors.

Signed-off-by: Oskar Senft <osk@google.com>
---
Changes from PATCH v1:
- Removed superfluous "status" from channels.
---
 arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
index 68f332ee1886..66734e4e2ea1 100644
--- a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
@@ -213,6 +213,25 @@ &i2c0 {
 	nct7802@28 {
 		compatible = "nuvoton,nct7802";
 		reg = <0x28>;
+		channel@0 { /* LTD */
+			reg = <0>;
+		};
+		channel@1 { /* RTD1 */
+			reg = <1>;
+			sensor-type = "temperature";
+			temperature-mode = "thermistor";
+		};
+
+		channel@2 { /* RTD2 */
+			reg = <2>;
+			sensor-type = "temperature";
+			temperature-mode = "thermistor";
+		};
+
+		channel@3 { /* RTD3 */
+			reg = <3>;
+			sensor-type = "temperature";
+		};
 	};
 
 	/* Also connected to:
-- 
2.34.0.rc0.344.g81b53c2807-goog


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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
  2021-11-05  0:59 ` Oskar Senft
@ 2021-11-05  1:40   ` Joel Stanley
  -1 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2021-11-05  1:40 UTC (permalink / raw)
  To: Oskar Senft
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

On Fri, 5 Nov 2021 at 01:00, Oskar Senft <osk@google.com> wrote:
>
> This change updates the configuration for the nct7802 hardware
> monitor to correctly configure its temperature sensors.
>
> Signed-off-by: Oskar Senft <osk@google.com>

I applied this and tried comple testing, and got this warning:

  DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:220.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@1:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:226.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@2:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:232.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@3:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning (pci_device_reg):
Failed prerequisite 'reg_format'
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning
(pci_device_bus_num): Failed prerequisite 'reg_format'
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning (i2c_bus_reg):
Failed prerequisite 'reg_format'
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning (spi_bus_reg):
Failed prerequisite 'reg_format'
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:216.13-218.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:216.13-218.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0: Relying on
default #size-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:219.13-223.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@1: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:219.13-223.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@1: Relying on
default #size-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:225.13-229.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@2: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:225.13-229.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@2: Relying on
default #size-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:231.13-234.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@3: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:231.13-234.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@3: Relying on
default #size-cells value

You need to add this to the nct node:

#address-cells = <1>;
#size-cells = <0>;

Did you see this with your testing? I'm building on top of v5.15 and
my distro's dtc is 1.6.0.

> ---
> Changes from PATCH v1:
> - Removed superfluous "status" from channels.
> ---
>  arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
> index 68f332ee1886..66734e4e2ea1 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
> @@ -213,6 +213,25 @@ &i2c0 {
>         nct7802@28 {
>                 compatible = "nuvoton,nct7802";
>                 reg = <0x28>;
> +               channel@0 { /* LTD */
> +                       reg = <0>;
> +               };
> +               channel@1 { /* RTD1 */
> +                       reg = <1>;
> +                       sensor-type = "temperature";
> +                       temperature-mode = "thermistor";
> +               };
> +
> +               channel@2 { /* RTD2 */
> +                       reg = <2>;
> +                       sensor-type = "temperature";
> +                       temperature-mode = "thermistor";
> +               };
> +
> +               channel@3 { /* RTD3 */
> +                       reg = <3>;
> +                       sensor-type = "temperature";
> +               };
>         };
>
>         /* Also connected to:
> --
> 2.34.0.rc0.344.g81b53c2807-goog
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  1:40   ` Joel Stanley
  0 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2021-11-05  1:40 UTC (permalink / raw)
  To: Oskar Senft
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

On Fri, 5 Nov 2021 at 01:00, Oskar Senft <osk@google.com> wrote:
>
> This change updates the configuration for the nct7802 hardware
> monitor to correctly configure its temperature sensors.
>
> Signed-off-by: Oskar Senft <osk@google.com>

I applied this and tried comple testing, and got this warning:

  DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:220.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@1:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:226.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@2:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:232.4-14: Warning
(reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@3:reg:
property has invalid length (4 bytes) (#address-cells == 2,
#size-cells == 1)
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning (pci_device_reg):
Failed prerequisite 'reg_format'
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning
(pci_device_bus_num): Failed prerequisite 'reg_format'
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning (i2c_bus_reg):
Failed prerequisite 'reg_format'
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb: Warning (spi_bus_reg):
Failed prerequisite 'reg_format'
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:216.13-218.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:216.13-218.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0: Relying on
default #size-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:219.13-223.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@1: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:219.13-223.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@1: Relying on
default #size-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:225.13-229.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@2: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:225.13-229.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@2: Relying on
default #size-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:231.13-234.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@3: Relying on
default #address-cells value
../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:231.13-234.5: Warning
(avoid_default_addr_size):
/ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@3: Relying on
default #size-cells value

You need to add this to the nct node:

#address-cells = <1>;
#size-cells = <0>;

Did you see this with your testing? I'm building on top of v5.15 and
my distro's dtc is 1.6.0.

> ---
> Changes from PATCH v1:
> - Removed superfluous "status" from channels.
> ---
>  arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
> index 68f332ee1886..66734e4e2ea1 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts
> @@ -213,6 +213,25 @@ &i2c0 {
>         nct7802@28 {
>                 compatible = "nuvoton,nct7802";
>                 reg = <0x28>;
> +               channel@0 { /* LTD */
> +                       reg = <0>;
> +               };
> +               channel@1 { /* RTD1 */
> +                       reg = <1>;
> +                       sensor-type = "temperature";
> +                       temperature-mode = "thermistor";
> +               };
> +
> +               channel@2 { /* RTD2 */
> +                       reg = <2>;
> +                       sensor-type = "temperature";
> +                       temperature-mode = "thermistor";
> +               };
> +
> +               channel@3 { /* RTD3 */
> +                       reg = <3>;
> +                       sensor-type = "temperature";
> +               };
>         };
>
>         /* Also connected to:
> --
> 2.34.0.rc0.344.g81b53c2807-goog
>

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
  2021-11-05  1:40   ` Joel Stanley
@ 2021-11-05  1:46     ` Oskar Senft
  -1 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  1:46 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

Hi Joel

Oh man, this is embarrassing!

> I applied this and tried comple testing, and got this warning:
>
>   DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
> ../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
> (reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
> property has invalid length (4 bytes) (#address-cells == 2,
> #size-cells == 1)
> [...]
> You need to add this to the nct node:
>
> #address-cells = <1>;
> #size-cells = <0>;
Oh yeah, of course. It's even in the example in the binding that I wrote.

> Did you see this with your testing? I'm building on top of v5.15 and
> my distro's dtc is 1.6.0.
I built (as part of OpenBMC) and ran (on actual HW), but these
warnings don't make it out to the console. In my "defense", I did run
checkpatch.pl, though.

Is there an easy way for me to see these types of warnings? Or should
they really come out as errors?

I'll fix and send a PATCH v3.

I'm really sorry, this shouldn't be so much work for you!

Oskar.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  1:46     ` Oskar Senft
  0 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  1:46 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

Hi Joel

Oh man, this is embarrassing!

> I applied this and tried comple testing, and got this warning:
>
>   DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
> ../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
> (reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
> property has invalid length (4 bytes) (#address-cells == 2,
> #size-cells == 1)
> [...]
> You need to add this to the nct node:
>
> #address-cells = <1>;
> #size-cells = <0>;
Oh yeah, of course. It's even in the example in the binding that I wrote.

> Did you see this with your testing? I'm building on top of v5.15 and
> my distro's dtc is 1.6.0.
I built (as part of OpenBMC) and ran (on actual HW), but these
warnings don't make it out to the console. In my "defense", I did run
checkpatch.pl, though.

Is there an easy way for me to see these types of warnings? Or should
they really come out as errors?

I'll fix and send a PATCH v3.

I'm really sorry, this shouldn't be so much work for you!

Oskar.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
  2021-11-05  1:46     ` Oskar Senft
@ 2021-11-05  1:55       ` Oskar Senft
  -1 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  1:55 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

To answer my own question and as a reminder for myself ...

> > I applied this and tried comple testing, and got this warning:
> >
> >   DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
> > ../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
> > (reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
> > property has invalid length (4 bytes) (#address-cells == 2,
> > #size-cells == 1)
> Is there an easy way for me to see these types of warnings? Or should
> they really come out as errors?

Yes, there is:

1) Copy the .config from the OpenBMC build directory:
cp ~/src/openbmc/build/s7106/tmp/work/s7106-openbmc-linux-gnueabi/linux-aspeed/5.15+gitAUTOINC+da6376d789-r0/linux-s7106-standard-build/.config
.

2) Run
ARCH="arm" make aspeed-bmc-tyan-s7106.dtb


Oskar.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  1:55       ` Oskar Senft
  0 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  1:55 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

To answer my own question and as a reminder for myself ...

> > I applied this and tried comple testing, and got this warning:
> >
> >   DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
> > ../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
> > (reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
> > property has invalid length (4 bytes) (#address-cells == 2,
> > #size-cells == 1)
> Is there an easy way for me to see these types of warnings? Or should
> they really come out as errors?

Yes, there is:

1) Copy the .config from the OpenBMC build directory:
cp ~/src/openbmc/build/s7106/tmp/work/s7106-openbmc-linux-gnueabi/linux-aspeed/5.15+gitAUTOINC+da6376d789-r0/linux-s7106-standard-build/.config
.

2) Run
ARCH="arm" make aspeed-bmc-tyan-s7106.dtb


Oskar.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
  2021-11-05  1:46     ` Oskar Senft
@ 2021-11-05  1:58       ` Joel Stanley
  -1 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2021-11-05  1:58 UTC (permalink / raw)
  To: Oskar Senft
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

On Fri, 5 Nov 2021 at 01:47, Oskar Senft <osk@google.com> wrote:
>
> Hi Joel
>
> Oh man, this is embarrassing!

Don't worry about it. I'm a bit confused as to why I didn't see it
this morning; I thought I did a build test then.

>
> > I applied this and tried comple testing, and got this warning:
> >
> >   DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
> > ../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
> > (reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
> > property has invalid length (4 bytes) (#address-cells == 2,
> > #size-cells == 1)
> > [...]
> > You need to add this to the nct node:
> >
> > #address-cells = <1>;
> > #size-cells = <0>;
> Oh yeah, of course. It's even in the example in the binding that I wrote.
>
> > Did you see this with your testing? I'm building on top of v5.15 and
> > my distro's dtc is 1.6.0.
> I built (as part of OpenBMC) and ran (on actual HW), but these
> warnings don't make it out to the console. In my "defense", I did run
> checkpatch.pl, though.
>
> Is there an easy way for me to see these types of warnings? Or should
> they really come out as errors?

Good question. v5.15 adds -Werror to the top level makefile, but as
these warnings come from the device tree compiler they won't cause the
build to fail. We should probably fix that, as I consider any dtc
warning cause to rework the patch.

I test the kernels independently of yocto; I recommend doing that with
a cross compiler when submitting patches upstream. My flow looks like
this:

CROSS_COMPILE="ccache arm-linux-gnueabi-" ARCH=arm make
O=aspeed-g5-dev aspeed_g5_defconfig
CROSS_COMPILE="ccache arm-linux-gnueabi-" ARCH=arm make -j8 O=aspeed-g5-dev -s
qemu-system-arm -M rainier-bmc -nographic -net nic -kernel
aspeed-g5-dev/arch/arm/boot/zImage -dtb
aspeed-g5-dev/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dtb -initrd
/home/joel/dev/kernels/misc/broomstick.cpio.xz -append
'console=ttyS4,115200n8 quiet' -no-reboot

A few notes:
 - I use the cross compiler from my distro. Debian unstable has GCC
11.2.0, which is the same as openbmc. You can use the compiler from
your openbmc build tree if you aren't able to install a modern
compiler

 - Using ccache is optional

 - building with -s means warnings stand out

 - if you're working on device trees and want to ensure your binary is
being built each time, omit the -s and build the 'dtbs' target

 - booting in qemu is a quick smoke test. You don't need to your board
supported in qemu to test it (although it does help to avoid warnings
from eg. i2c devices that won't probe if the hardware isn't present)

 - adding 'quiet' to the qemu command line again makes it easier to
pick out warnings

That's a bit about how I work. You don't have to follow my work flow,
but feel free to cherry pick bits that are useful.

>
> I'll fix and send a PATCH v3.
>
> I'm really sorry, this shouldn't be so much work for you!

No problem at all. Good work on iterating quickly.

Cheers,

Joel

>
> Oskar.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  1:58       ` Joel Stanley
  0 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2021-11-05  1:58 UTC (permalink / raw)
  To: Oskar Senft
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

On Fri, 5 Nov 2021 at 01:47, Oskar Senft <osk@google.com> wrote:
>
> Hi Joel
>
> Oh man, this is embarrassing!

Don't worry about it. I'm a bit confused as to why I didn't see it
this morning; I thought I did a build test then.

>
> > I applied this and tried comple testing, and got this warning:
> >
> >   DTC     arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dtb
> > ../arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts:217.4-14: Warning
> > (reg_format): /ahb/apb/bus@1e78a000/i2c-bus@40/nct7802@28/channel@0:reg:
> > property has invalid length (4 bytes) (#address-cells == 2,
> > #size-cells == 1)
> > [...]
> > You need to add this to the nct node:
> >
> > #address-cells = <1>;
> > #size-cells = <0>;
> Oh yeah, of course. It's even in the example in the binding that I wrote.
>
> > Did you see this with your testing? I'm building on top of v5.15 and
> > my distro's dtc is 1.6.0.
> I built (as part of OpenBMC) and ran (on actual HW), but these
> warnings don't make it out to the console. In my "defense", I did run
> checkpatch.pl, though.
>
> Is there an easy way for me to see these types of warnings? Or should
> they really come out as errors?

Good question. v5.15 adds -Werror to the top level makefile, but as
these warnings come from the device tree compiler they won't cause the
build to fail. We should probably fix that, as I consider any dtc
warning cause to rework the patch.

I test the kernels independently of yocto; I recommend doing that with
a cross compiler when submitting patches upstream. My flow looks like
this:

CROSS_COMPILE="ccache arm-linux-gnueabi-" ARCH=arm make
O=aspeed-g5-dev aspeed_g5_defconfig
CROSS_COMPILE="ccache arm-linux-gnueabi-" ARCH=arm make -j8 O=aspeed-g5-dev -s
qemu-system-arm -M rainier-bmc -nographic -net nic -kernel
aspeed-g5-dev/arch/arm/boot/zImage -dtb
aspeed-g5-dev/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dtb -initrd
/home/joel/dev/kernels/misc/broomstick.cpio.xz -append
'console=ttyS4,115200n8 quiet' -no-reboot

A few notes:
 - I use the cross compiler from my distro. Debian unstable has GCC
11.2.0, which is the same as openbmc. You can use the compiler from
your openbmc build tree if you aren't able to install a modern
compiler

 - Using ccache is optional

 - building with -s means warnings stand out

 - if you're working on device trees and want to ensure your binary is
being built each time, omit the -s and build the 'dtbs' target

 - booting in qemu is a quick smoke test. You don't need to your board
supported in qemu to test it (although it does help to avoid warnings
from eg. i2c devices that won't probe if the hardware isn't present)

 - adding 'quiet' to the qemu command line again makes it easier to
pick out warnings

That's a bit about how I work. You don't have to follow my work flow,
but feel free to cherry pick bits that are useful.

>
> I'll fix and send a PATCH v3.
>
> I'm really sorry, this shouldn't be so much work for you!

No problem at all. Good work on iterating quickly.

Cheers,

Joel

>
> Oskar.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
  2021-11-05  1:58       ` Joel Stanley
@ 2021-11-05  3:28         ` Oskar Senft
  -1 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  3:28 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

Hi Joel

> I test the kernels independently of yocto; I recommend doing that with
> a cross compiler when submitting patches upstream. My flow looks like
> this:
> [...]
> A few notes:
>  - I use the cross compiler from my distro. Debian unstable has GCC
> 11.2.0, which is the same as openbmc. You can use the compiler from
> your openbmc build tree if you aren't able to install a modern
> compiler
I couldn't figure out how to use the compiler from the OpenBMC tree.
The biggest issue is that it has "openbmc" in its name and Linux build
was getting confused by it. I gave up on that approach and found how
to install the right cross compiler in our environment. That worked
well. Thanks for the hints!

>  - building with -s means warnings stand out
Excellent idea, thank you!

>  - if you're working on device trees and want to ensure your binary is
> being built each time, omit the -s and build the 'dtbs' target
Ack.

I'll send a PATCH v3 now.

Oskar.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  3:28         ` Oskar Senft
  0 siblings, 0 replies; 14+ messages in thread
From: Oskar Senft @ 2021-11-05  3:28 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

Hi Joel

> I test the kernels independently of yocto; I recommend doing that with
> a cross compiler when submitting patches upstream. My flow looks like
> this:
> [...]
> A few notes:
>  - I use the cross compiler from my distro. Debian unstable has GCC
> 11.2.0, which is the same as openbmc. You can use the compiler from
> your openbmc build tree if you aren't able to install a modern
> compiler
I couldn't figure out how to use the compiler from the OpenBMC tree.
The biggest issue is that it has "openbmc" in its name and Linux build
was getting confused by it. I gave up on that approach and found how
to install the right cross compiler in our environment. That worked
well. Thanks for the hints!

>  - building with -s means warnings stand out
Excellent idea, thank you!

>  - if you're working on device trees and want to ensure your binary is
> being built each time, omit the -s and build the 'dtbs' target
Ack.

I'll send a PATCH v3 now.

Oskar.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
  2021-11-05  3:28         ` Oskar Senft
@ 2021-11-05  4:03           ` Joel Stanley
  -1 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2021-11-05  4:03 UTC (permalink / raw)
  To: Oskar Senft
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

On Fri, 5 Nov 2021 at 03:29, Oskar Senft <osk@google.com> wrote:
>
> Hi Joel
>
> > I test the kernels independently of yocto; I recommend doing that with
> > a cross compiler when submitting patches upstream. My flow looks like
> > this:
> > [...]
> > A few notes:
> >  - I use the cross compiler from my distro. Debian unstable has GCC
> > 11.2.0, which is the same as openbmc. You can use the compiler from
> > your openbmc build tree if you aren't able to install a modern
> > compiler
> I couldn't figure out how to use the compiler from the OpenBMC tree.
> The biggest issue is that it has "openbmc" in its name and Linux build
> was getting confused by it. I gave up on that approach and found how
> to install the right cross compiler in our environment. That worked
> well. Thanks for the hints!

Cool. For reference, you should be able to do this:

CROSS_COMPILE="openbmc/build/p10bmc/tmp/sysroots-components/x86_64/gcc-cross-arm/usr/bin/arm-openbmc-linux-gnueabi/arm-openbmc-linux-gnueabi-"

>
> >  - building with -s means warnings stand out
> Excellent idea, thank you!
>
> >  - if you're working on device trees and want to ensure your binary is
> > being built each time, omit the -s and build the 'dtbs' target
> Ack.
>
> I'll send a PATCH v3 now.
>
> Oskar.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config
@ 2021-11-05  4:03           ` Joel Stanley
  0 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2021-11-05  4:03 UTC (permalink / raw)
  To: Oskar Senft
  Cc: Linux ARM, linux-aspeed, Linux Kernel Mailing List, Rob Herring,
	Andrew Jeffery

On Fri, 5 Nov 2021 at 03:29, Oskar Senft <osk@google.com> wrote:
>
> Hi Joel
>
> > I test the kernels independently of yocto; I recommend doing that with
> > a cross compiler when submitting patches upstream. My flow looks like
> > this:
> > [...]
> > A few notes:
> >  - I use the cross compiler from my distro. Debian unstable has GCC
> > 11.2.0, which is the same as openbmc. You can use the compiler from
> > your openbmc build tree if you aren't able to install a modern
> > compiler
> I couldn't figure out how to use the compiler from the OpenBMC tree.
> The biggest issue is that it has "openbmc" in its name and Linux build
> was getting confused by it. I gave up on that approach and found how
> to install the right cross compiler in our environment. That worked
> well. Thanks for the hints!

Cool. For reference, you should be able to do this:

CROSS_COMPILE="openbmc/build/p10bmc/tmp/sysroots-components/x86_64/gcc-cross-arm/usr/bin/arm-openbmc-linux-gnueabi/arm-openbmc-linux-gnueabi-"

>
> >  - building with -s means warnings stand out
> Excellent idea, thank you!
>
> >  - if you're working on device trees and want to ensure your binary is
> > being built each time, omit the -s and build the 'dtbs' target
> Ack.
>
> I'll send a PATCH v3 now.
>
> Oskar.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-05  4:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05  0:59 [PATCH v2] ARM: dts: aspeed: tyan-s7106: Update nct7802 config Oskar Senft
2021-11-05  0:59 ` Oskar Senft
2021-11-05  1:40 ` Joel Stanley
2021-11-05  1:40   ` Joel Stanley
2021-11-05  1:46   ` Oskar Senft
2021-11-05  1:46     ` Oskar Senft
2021-11-05  1:55     ` Oskar Senft
2021-11-05  1:55       ` Oskar Senft
2021-11-05  1:58     ` Joel Stanley
2021-11-05  1:58       ` Joel Stanley
2021-11-05  3:28       ` Oskar Senft
2021-11-05  3:28         ` Oskar Senft
2021-11-05  4:03         ` Joel Stanley
2021-11-05  4:03           ` Joel Stanley

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.