Hi Morimoto-san, On Thu, 17 Apr 2025 at 01:52, Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> wrote: > > > > + # "MSIOF-SPI" specific > > > > + - if: > > > > + properties: > > > > + $nodename: > > > > + pattern: '^spi@' > > > > > > This condition does not match what you wrote in the cover letter: > > > the controller is used in I2S mode when a port(s) subnode is present, > > > and in SPI mode when no port(s) subnode is present. > > > > > > > + then: > > > > + allOf: > > > > + - $ref: spi-controller.yaml# > > > > > > Documentation/devicetree/bindings/spi/spi-controller.yaml indeed > > > requires that the node-name matches "^spi(@.*|-([0-9]|[1-9][0-9]+))?$". > > > The controller's node is located in the SoC-specific .dtsi, where its > > > intended use case is not yet known, and its node name cannot easily be > > > overridden in the board .dts that specifies the use case. Hence the > > > node name must always be "spi" (and cannot be e.g. "serial-engine"). > > > Let's hope there is no other use case for MSIOF that requires using > > > a different node name... > > Hmm... > > Now, MSIOF node has "spi@xxxx". > SoC file indicates MSIOF-SPI as default, so it has below lines > > --- SoC file ---- > msiof1: spi@xxxx { > ... > #address-cells = <1>; > #size-cells = <0>; > ... > }; > > These are not needed for MSIOF-I2S, so removes these > > --- Board file ---- > &msiof1 { > ... > /delete-property/#address-cells; > /delete-property/#size-cells; > ... > }; > > Now, my dt-bindings doesn't load spi-controller.yaml (as sample), but I got > > [SoC file]: Warning (spi_bus_bridge): /soc/spi@xxxx: incorrect #address-cells for SPI bus > also defined at [Board file] > [SoC file]: Warning (spi_bus_bridge): /soc/spi@xxxx: incorrect #size-cells for SPI bus > also defined at [Board file] > > MSIOF dt-bindings doesn't load spi-controller.yaml, but why I got "spi_bus_bridge" > warning ?? I wonder dt compiler (?) automatically check "spi" node ? > I have tryed some code, my expectation seems correct (In case of node name was "spi@xxx", > I got many SPI related warnings even though I didn't load spi-controller). These come from dtc, which makes its own assumptions: $ git grep spi_bus_bridge scripts/dtc/checks.c:static void check_spi_bus_bridge(struct check *c, struct dt_info *dti, struct node *node) scripts/dtc/checks.c:WARNING(spi_bus_bridge, check_spi_bus_bridge, NULL, &addr_size_cells); scripts/dtc/checks.c:WARNING(spi_bus_reg, check_spi_bus_reg, NULL, ®_format, &spi_bus_bridge); scripts/dtc/checks.c: &spi_bus_bridge, Perhaps we do need to extend the use of role-specifying properties like "interrupt-controller" (in Device Tree Specification v0.4 and in dt-schema) and the few others in Documentation/devicetree/bindings: gpio-controller mctp-controller msi-controller system-power-controller Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds