On Mon, Mar 23, 2020 at 10:53:56PM +0300, Sergey.Semin@xxxxxxxxxxxxxxxxxxxx wrote: > From: Serge Semin <Sergey.Semin@xxxxxxxxxxxxxxxxxxxx> > > Modern device tree bindings are supposed to be created as YAML-files > in accordance with DT schema. This commit replaces Synopsys DW GPIO > legacy bare text binding with YAML file. As before the binding file > states that the corresponding dts node is supposed to be compatible > with generic DW I2C controller indicated by the "snps,dw-apb-gpio" > compatible string and to provide a mandatory registers memory range. > It may also have an optional clock and reset phandle references. > > There must be specified at least one subnode with > "snps,dw-apb-gpio-port" compatible string indicating the GPIO port, > which would actually export the GPIO controller functionality. Such > nodes should have traditional GPIO controller properties together > with optional interrupt-controller attributes if the corresponding > controller was synthesized to detect and report the input values > change to the parental IRQ controller. > > Signed-off-by: Serge Semin <Sergey.Semin@xxxxxxxxxxxxxxxxxxxx> > Cc: Alexey Malahov <Alexey.Malahov@xxxxxxxxxxxxxxxxxxxx> > Cc: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx> > Cc: Paul Burton <paulburton@xxxxxxxxxx> > Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> > Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > > --- > > Changelog v2: > - Use lowercase hex numbers in the main node name and in the sub-node names. > - Use "allOf:" statement to apply uint32 and "minimum/maximum" limitations > on the "snps,nr-gpios" property. > - Discard "interrupts-extended" property. > - Make sure the sub-nodes have names with either 'gpio-port' or > 'gpio-controller' prefixes. > > The DT scheme provided by this patch will pass the dt_binding_check > command after the next patches are merged to the dt-schema repo: Merged now. > --- > .../bindings/gpio/snps,dw-apb-gpio.yaml | 129 ++++++++++++++++++ > .../bindings/gpio/snps-dwapb-gpio.txt | 65 --------- > 2 files changed, 129 insertions(+), 65 deletions(-) > create mode 100644 Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml > delete mode 100644 Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt Reviewed-by: Rob Herring <robh@xxxxxxxxxx>