2020-10-14 00:23:03

by Zhen Lei

[permalink] [raw]
Subject: [PATCH 0/6] fix all errors except one reported by dt_binding_check

When people add multiple or common YAML files, they usually perform a full
dt_binding_check. Unfortunately, some YAML files cannot pass the self-check.
The errors or warning are listed below. It is necessary to eliminate them,
so that people's time and energy are not wasted every time when execute
comprehensive dt_binding_check.

This error is fixed by Patch 1:
/root/leizhen/linux-next/Documentation/devicetree/bindings/leds/leds-lp55xx.example.dt.yaml: led-controller@33: multi-led@2:color:0:0: 9 is greater than the maximum of 8
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml

These errors are fixed by Patch 2:
/root/leizhen/linux-next/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.example.dt.yaml: ec@0: 'typec' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.example.dt.yaml: cros-ec@0: 'extcon0', 'extcon1' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.example.dt.yaml: cros-ec@0: 'ec-pwm' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.example.dt.yaml: ec@0: '#address-cells', '#size-cells', 'regulator@0' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
/root/leizhen/linux-next/Documentation/devicetree/bindings/sound/google,cros-ec-codec.example.dt.yaml: cros-ec@0: '#address-cells', '#size-cells', 'ec-codec@10500000' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml

These errors are fixed by Patch 3 and 4:
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.example.dts:21.13-30.11: Warning (spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.example.dts:21.13-30.11: Warning (spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'

Patch 5 and 6 fix the dtbs_check errors detected by Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #address-cells for SPI bus
also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3
arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #size-cells for SPI bus
also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3
arch/arm/boot/dts/mmp2-olpc-xo-1-75.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #address-cells for SPI bus
also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3
arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #size-cells for SPI bus
also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3
arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
/root/leizhen/linux-next/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: slave: 'cmd-gpios' is a required property
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
/root/leizhen/linux-next/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: slave: 'cmd-gpio' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml

I have no good idea for this one, so leave it.
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.example.dts:43.62-47.30: Warning (pci_device_reg): /example-0/versal/pcie@fca10000/interrupt-controller: missing PCI reg property


Zhen Lei (6):
dt-bindings: leds: choose correct color value of multi-led
dt-bindings: mfd: google,cros-ec: explicitly allow additional
properties
spi: dt-bindings: spi-controller: explicitly require
#address-cells=<0> for slave mode
dt-bindings: misc: explicitly add #address-cells for slave mode
ARM: dts: mmp2-olpc-xo-1-75: explicitly add #address-cells=<0> for
slave mode
dt-bindings: misc: correct the property name cmd-gpios to cmd-gpio

.../devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
.../devicetree/bindings/mfd/google,cros-ec.yaml | 2 +-
.../devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 8 +++++---
.../devicetree/bindings/spi/spi-controller.yaml | 20 ++++++++++++++------
arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
5 files changed, 22 insertions(+), 12 deletions(-)

--
1.8.3



2020-10-14 00:23:48

by Zhen Lei

[permalink] [raw]
Subject: [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led

The color value of multi-led is fixed to "const: 8 #LED_COLOR_ID_MULTI",
which is required by leds-class-multicolor.yaml.

Signed-off-by: Zhen Lei <[email protected]>
---
Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
index 58e974793a7976b..cd877e817ad1a1c 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
@@ -197,7 +197,7 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
reg = <0x2>;
- color = <LED_COLOR_ID_RGB>;
+ color = <LED_COLOR_ID_MULTI>;
function = LED_FUNCTION_STANDBY;
linux,default-trigger = "heartbeat";

--
1.8.3


2020-10-14 02:11:20

by Zhen Lei

[permalink] [raw]
Subject: [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells for slave mode

Explicitly add "#address-cells = <0>" and "#size-cells = <0>" to
eliminate below warnings.

(spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus
(spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus
(spi_bus_reg): Failed prerequisite 'spi_bus_bridge'

Signed-off-by: Zhen Lei <[email protected]>
---
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
index ade733cd60f7925..b3c45c046ba5e37 100644
--- a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
+++ b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml
@@ -42,6 +42,8 @@ examples:

spi {
spi-slave;
+ #address-cells = <0>;
+ #size-cells = <0>;
ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;

slave {
--
1.8.3


2020-10-14 02:11:49

by Dan Murphy

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led

Zhen

On 10/13/20 11:08 AM, Zhen Lei wrote:
> The color value of multi-led is fixed to "const: 8 #LED_COLOR_ID_MULTI",
> which is required by leds-class-multicolor.yaml.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> index 58e974793a7976b..cd877e817ad1a1c 100644
> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
> @@ -197,7 +197,7 @@ examples:
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <0x2>;
> - color = <LED_COLOR_ID_RGB>;
> + color = <LED_COLOR_ID_MULTI>;
> function = LED_FUNCTION_STANDBY;
> linux,default-trigger = "heartbeat";
>

This is not correct.  ID_RGB is the correct variable here.

https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=3d93edc77515c6f51fa9bbbe2185e2ec32bad024

Correct fix is to update the leds-class-multicolor.yaml

Dan

2020-10-14 08:17:57

by Zhen Lei

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: leds: choose correct color value of multi-led



On 2020/10/14 0:17, Dan Murphy wrote:
> Zhen
>
> On 10/13/20 11:08 AM, Zhen Lei wrote:
>> The color value of multi-led is fixed to "const: 8 #LED_COLOR_ID_MULTI",
>> which is required by leds-class-multicolor.yaml.
>>
>> Signed-off-by: Zhen Lei <[email protected]>
>> ---
>>   Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
>> index 58e974793a7976b..cd877e817ad1a1c 100644
>> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
>> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
>> @@ -197,7 +197,7 @@ examples:
>>                  #address-cells = <1>;
>>                  #size-cells = <0>;
>>                  reg = <0x2>;
>> -               color = <LED_COLOR_ID_RGB>;
>> +               color = <LED_COLOR_ID_MULTI>;
>>                  function = LED_FUNCTION_STANDBY;
>>                  linux,default-trigger = "heartbeat";
>>  
>
> This is not correct.  ID_RGB is the correct variable here.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=3d93edc77515c6f51fa9bbbe2185e2ec32bad024
>
> Correct fix is to update the leds-class-multicolor.yaml

OK

>
> Dan
>
>
> .
>

2020-10-14 21:46:18

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 4/6] dt-bindings: misc: explicitly add #address-cells for slave mode

On Wed, 14 Oct 2020 00:08:43 +0800, Zhen Lei wrote:
> Explicitly add "#address-cells = <0>" and "#size-cells = <0>" to
> eliminate below warnings.
>
> (spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus
> (spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus
> (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>

Applied, thanks!