<div dir="ltr"><div>Hi Andrew,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 26, 2024 at 9:30 AM Andrew Jeffery <<a href="mailto:andrew@codeconstruct.com.au">andrew@codeconstruct.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 2024-06-25 at 20:18 +0800, Yang Chen wrote:<br>
> From: Yang Chen <<a href="mailto:yang.chen@quantatw.com" target="_blank">yang.chen@quantatw.com</a>><br>
> <br>
> Add spi-gpio for TPM device.<br>
> <br>
> Signed-off-by: Yang Chen <<a href="mailto:yang.chen@quantatw.com" target="_blank">yang.chen@quantatw.com</a>><br>
> ---<br>
>  .../aspeed/aspeed-bmc-facebook-minerva.dts    | 21 +++++++++++++++++++<br>
>  1 file changed, 21 insertions(+)<br>
> <br>
> diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dts<br>
> index e20e31917d6c..7d96a3638448 100644<br>
> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dts<br>
> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dts<br>
> @@ -22,6 +22,8 @@ aliases {<br>
>               i2c19 = &imux19;<br>
>               i2c20 = &imux20;<br>
>               i2c21 = &imux21;<br>
> +<br>
> +             spi1 = &spi_gpio;<br>
>       };<br>
>  <br>
>       chosen {<br>
> @@ -49,6 +51,25 @@ led-fan-fault {<br>
>                       default-state = "off";<br>
>               };<br>
>       };<br>
> +<br>
> +     spi_gpio: spi-gpio {<br>
> +             status = "okay";<br>
> +             compatible = "spi-gpio";<br>
> +             #address-cells = <1>;<br>
> +             #size-cells = <0>;<br>
> +<br>
> +             gpio-sck = <&gpio0 ASPEED_GPIO(Z, 3) GPIO_ACTIVE_HIGH>;<br>
> +             gpio-mosi = <&gpio0 ASPEED_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;<br>
> +             gpio-miso = <&gpio0 ASPEED_GPIO(Z, 5) GPIO_ACTIVE_HIGH>;<br>
> +             num-chipselects = <1>;<br>
> +             cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;<br>
> +<br>
> +             tpmdev@0 {<br>
> +                     compatible = "infineon,slb9670", "tcg,tpm_tis-spi";<br>
> +                     spi-max-frequency = <33000000>;<br>
> +                     reg = <0>;<br>
> +             };<br>
> +     };<br>
<br>
I poked at your series with the following script:<br>
<br>
```<br>
$ cat dtb-check<br>
#!/usr/bin/bash<br>
<br>
set -euo pipefail<br>
<br>
DTB="$1"<br>
<br>
rm -f arch/arm/boot/dts/"$DTB"<br>
make CHECK_DTBS=y "$DTB" 2>&1 |<br>
    sed "/should not be valid under {'type': 'object'}/d" > curr.log<br>
diff -u ref.log curr.log<br>
```<br>
<br>
I ran this after creating a reference output prior to your series using<br>
the same `make CHECK_DTBS=y` command.<br>
<br>
This patch gave the following output (which I expect Rob's bot will<br>
follow up with at some point as well):<br>
<br>
```<br>
--- ref.log     2024-06-26 10:48:23.767078834 +0930<br>
+++ curr.log    2024-06-26 10:55:56.857034132 +0930<br>
@@ -1,4 +1,6 @@<br>
   DTC_CHK arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb<br>
+/home/andrew/src/<a href="http://kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: /: spi-gpio: {'status': ['okay'], 'compatible': ['spi-gpio'], '#address-cells': [[1]], '#size-cells': [[0]], 'gpio-sck': [[62, 203, 0]], 'gpio-mosi': [[62, 204, 0]], 'gpio-miso': [[62, 205, 0]], 'num-chipselects': [[1]], 'cs-gpios': [[62, 200, 1]], 'tpmdev@0': {'compatible': ['infineon,slb9670', 'tcg,tpm_tis-spi'], 'spi-max-frequency': [[33000000]], 'reg': [[0]]}} is not of type 'array'<br>
+       from schema $id: <a href="http://devicetree.org/schemas/gpio/gpio-consumer.yaml#" rel="noreferrer" target="_blank">http://devicetree.org/schemas/gpio/gpio-consumer.yaml#</a><br>
 /home/andrew/src/<a href="http://kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: timer: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+'<br>
        from schema $id: <a href="http://devicetree.org/schemas/timer/arm,arch_timer.yaml#" rel="noreferrer" target="_blank">http://devicetree.org/schemas/timer/arm,arch_timer.yaml#</a><br>
 /home/andrew/src/<a href="http://kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: sdram@1e6e0000: compatible: ['aspeed,ast2600-sdram-edac', 'syscon'] is too long<br>
@@ -38,3 +40,17 @@<br>
        from schema $id: <a href="http://devicetree.org/schemas/fsi/aspeed,ast2600-fsi-master.yaml#" rel="noreferrer" target="_blank">http://devicetree.org/schemas/fsi/aspeed,ast2600-fsi-master.yaml#</a><br>
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb: /ahb/apb/fsi@1e79b100: failed to match any schema with compatible: ['aspeed,ast2600-fsi-master', 'fsi-master']<br>
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb: /ahb/apb/dma-controller@1e79e000: failed to match any schema with compatible: ['aspeed,ast2600-udma']<br>
+/home/andrew/src/<a href="http://kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: spi-gpio: $nodename:0: 'spi-gpio' does not match '^spi(@.*|-([0-9]|[1-9][0-9]+))?$'<br>
+       from schema $id: <a href="http://devicetree.org/schemas/spi/spi-gpio.yaml#+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">http://devicetree.org/schemas/spi/spi-gpio.yaml#<br>
+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: spi-gpio: gpio-sck: False schema does not allow [[62, 203, 0]]<br>
+       from schema $id: <a href="http://devicetree.org/schemas/spi/spi-gpio.yaml#+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">http://devicetree.org/schemas/spi/spi-gpio.yaml#<br>
+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: spi-gpio: gpio-miso: False schema does not allow [[62, 205, 0]]<br>
+       from schema $id: <a href="http://devicetree.org/schemas/spi/spi-gpio.yaml#+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">http://devicetree.org/schemas/spi/spi-gpio.yaml#<br>
+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: spi-gpio: gpio-mosi: False schema does not allow [[62, 204, 0]]<br>
+       from schema $id: <a href="http://devicetree.org/schemas/spi/spi-gpio.yaml#+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">http://devicetree.org/schemas/spi/spi-gpio.yaml#<br>
+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: spi-gpio: 'sck-gpios' is a required property<br>
+       from schema $id: <a href="http://devicetree.org/schemas/spi/spi-gpio.yaml#+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">http://devicetree.org/schemas/spi/spi-gpio.yaml#<br>
+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: spi-gpio: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'gpio-miso', 'gpio-mosi', 'gpio-sck', 'tpmdev@0' were unexpected)<br>
+       from schema $id: <a href="http://devicetree.org/schemas/spi/spi-gpio.yaml#+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb" rel="noreferrer" target="_blank">http://devicetree.org/schemas/spi/spi-gpio.yaml#<br>
+/home/andrew/src/kernel.org/linux/origin/build.aspeed_g5/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dtb</a>: tpmdev@0: $nodename:0: 'tpmdev@0' does not match '^tpm(@[0-9a-f]+)?$'<br>
+       from schema $id: <a href="http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml#" rel="noreferrer" target="_blank">http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml#</a><br>
```<br>
<br>
Can you please address these and go over the rest of the patches to<br>
shore them up against the current bindings?<br>
<br>
Thanks,<br>
<br>
Andrew<br></blockquote><div><br></div><div><br class="gmail-Apple-interchange-newline">Thanks for your suggestion, I sent a v1 version and the link is below:</div><div><a href="https://lore.kernel.org/all/20240626130332.929534-1-yangchen.openbmc@gmail.com/" target="_blank">https://lore.kernel.org/all/20240626130332.929534-1-yangchen.openbmc@gmail.com/</a><br></div><div><br></div><div>Please help to review again, thank you!</div><div><br></div><div>Thanks,</div><div>Yang Chen </div><div> </div></div></div>