On Mon, Mar 28, 2022 at 02:32:06PM -0500, Rob Herring wrote: > On Wed, Mar 23, 2022 at 7:16 PM Serge Semin > <Sergey.Semin@xxxxxxxxxxxxxxxxxxxx> wrote: > > > > Currently the DT bindings of Generic AHCI Controllers are described by > > means of the legacy text file. Since such format is deprecated in favor of > > the DT schema. Let's convert the Generic AHCI Controllers bindings file > > then to the corresponding yaml files. There will be two of them: a DT > > schema with a set of properties applied to all AHCI-compatible devices, > > and a DT schema validating an AHCI-controller on a generic platform. So if > > a controller conforms to the Serial ATA AHCI interface specification with > > just peculiar platform environment settings like clock sources, PHYs, > > power regulators or resets, then the generic AHCI bindings should work for > > it. Otherwise a dedicated DT-schema needs to be created. > > > > So a common AHCI SATA controller DT-node is supposed to be equipped with > > at least compatible, reg and interrupts properties. It can optionally > > contain clocks, resets, {ahci,target,phy}-supply and phys phandles. In > > addition the property "ports-implemented" can be specified in order to > > define the number of implemented SATA ports. An AHCI SATA controller > > DT-node can also have a set of sub-nodes representing its ports, for each > > of which an individual power source and PHY phandle can be specified. > > > > Note we have omitted the next compatible strings > > "marvell,armada-380-ahci", "marvell,armada-3700-ahci", "snps,dwc-ahci", > > "snps,spear-ahci" since the corresponding controllers are handled by the > > dedicated drivers now, thus are supposed to have their own DT-schema > > defined. dma-coherent has also been discarded since it's a generic > > property and is evaluated by the dt-schema parser. > > > > Also note that if there is the "reg-names" property specified for a AHCI > > DT-node then it is supposed to at least have the "ahci" sub-string as an > > indicator of the AHCI-compatible registers space. > > > > Signed-off-by: Serge Semin <Sergey.Semin@xxxxxxxxxxxxxxxxxxxx> > > --- > > .../devicetree/bindings/ata/ahci-common.yaml | 110 ++++++++++++++++++ > > .../devicetree/bindings/ata/ahci-platform.txt | 79 ------------- > > .../devicetree/bindings/ata/generic-ahci.yaml | 89 ++++++++++++++ > > 3 files changed, 199 insertions(+), 79 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/ata/ahci-common.yaml > > delete mode 100644 Documentation/devicetree/bindings/ata/ahci-platform.txt > > create mode 100644 Documentation/devicetree/bindings/ata/generic-ahci.yaml > > This has already been converted and is in Linus' tree now for v5.18. Too bad.( I'll have to rebase this patch on top of that schema now seeing it hasn't been split up into the common and platform-specific parts. -Sergey > > Rob