Message ID | 20190807003629.2974-2-andrew@aj.id.au (mailing list archive) |
---|---|
State | Mainlined |
Commit | 7a7e55f416b63ebd85b69974bb3a6f4a10158982 |
Headers | show |
Series | mmc: Add support for the ASPEED SD controller | expand |
On Tue, Aug 6, 2019 at 6:38 PM Andrew Jeffery <andrew@aj.id.au> wrote: > > The ASPEED SD/SDIO/MMC controller exposes two slots implementing the > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > data bus if only a single slot is enabled. > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> > > --- > v4: > * Make use of mmc-controller.yaml > * Document sdhci,auto-cmd12 > > v2: > * Fix compatible enums > * Add AST2600 compatibles > * Describe #address-cells / #size-cells > --- > .../devicetree/bindings/mmc/aspeed,sdhci.yaml | 105 ++++++++++++++++++ > 1 file changed, 105 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml Reviewed-by: Rob Herring <robh@kernel.org>
On Wed, 7 Aug 2019 at 00:38, Andrew Jeffery <andrew@aj.id.au> wrote: > > The ASPEED SD/SDIO/MMC controller exposes two slots implementing the > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > data bus if only a single slot is enabled. > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Two minor comments below. > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > @@ -0,0 +1,105 @@ > +# SPDX-License-Identifier: GPL-2.0-or-later No "Copyright IBM" ? > +%YAML 1.2 > +--- > + > +examples: > + - | > + #include <dt-bindings/clock/aspeed-clock.h> > + sdc@1e740000 { > + compatible = "aspeed,ast2500-sd-controller"; > + reg = <0x1e740000 0x100>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x1e740000 0x10000>; According to the datasheet this could be 0x20000. It does not matter though, as there's nothing in it past 0x300. Cheers, Joel
On Thu, 15 Aug 2019, at 15:06, Joel Stanley wrote: > On Wed, 7 Aug 2019 at 00:38, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > The ASPEED SD/SDIO/MMC controller exposes two slots implementing the > > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > > data bus if only a single slot is enabled. > > > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > Two minor comments below. > > > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > @@ -0,0 +1,105 @@ > > +# SPDX-License-Identifier: GPL-2.0-or-later > > No "Copyright IBM" ? I'm going rogue. That reminds me I should chase up where we got to with the binding licensing. > > > +%YAML 1.2 > > +--- > > > + > > +examples: > > + - | > > + #include <dt-bindings/clock/aspeed-clock.h> > > + sdc@1e740000 { > > + compatible = "aspeed,ast2500-sd-controller"; > > + reg = <0x1e740000 0x100>; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges = <0 0x1e740000 0x10000>; > > According to the datasheet this could be 0x20000. It does not matter > though, as there's nothing in it past 0x300. Good catch. Andrew
On Thu, 15 Aug 2019 at 07:37, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > On Thu, 15 Aug 2019, at 15:06, Joel Stanley wrote: > > On Wed, 7 Aug 2019 at 00:38, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > > > The ASPEED SD/SDIO/MMC controller exposes two slots implementing the > > > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > > > data bus if only a single slot is enabled. > > > > > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> > > > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > > > Two minor comments below. > > > > > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > > @@ -0,0 +1,105 @@ > > > +# SPDX-License-Identifier: GPL-2.0-or-later > > > > No "Copyright IBM" ? > > I'm going rogue. > > That reminds me I should chase up where we got to with the binding > licensing. > > > > > > +%YAML 1.2 > > > +--- > > > > > + > > > +examples: > > > + - | > > > + #include <dt-bindings/clock/aspeed-clock.h> > > > + sdc@1e740000 { > > > + compatible = "aspeed,ast2500-sd-controller"; > > > + reg = <0x1e740000 0x100>; > > > + #address-cells = <1>; > > > + #size-cells = <1>; > > > + ranges = <0 0x1e740000 0x10000>; > > > > According to the datasheet this could be 0x20000. It does not matter > > though, as there's nothing in it past 0x300. > > Good catch. > Are you planning on sending a v6 or you want me to apply this and you can post a patch on top? Kind regards Uffe
On Thu, 22 Aug 2019, at 21:15, Ulf Hansson wrote: > On Thu, 15 Aug 2019 at 07:37, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > > > > > On Thu, 15 Aug 2019, at 15:06, Joel Stanley wrote: > > > On Wed, 7 Aug 2019 at 00:38, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > > > > > The ASPEED SD/SDIO/MMC controller exposes two slots implementing the > > > > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > > > > data bus if only a single slot is enabled. > > > > > > > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> > > > > > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > > > > > Two minor comments below. > > > > > > > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > > > @@ -0,0 +1,105 @@ > > > > +# SPDX-License-Identifier: GPL-2.0-or-later > > > > > > No "Copyright IBM" ? > > > > I'm going rogue. > > > > That reminds me I should chase up where we got to with the binding > > licensing. > > > > > > > > > +%YAML 1.2 > > > > +--- > > > > > > > + > > > > +examples: > > > > + - | > > > > + #include <dt-bindings/clock/aspeed-clock.h> > > > > + sdc@1e740000 { > > > > + compatible = "aspeed,ast2500-sd-controller"; > > > > + reg = <0x1e740000 0x100>; > > > > + #address-cells = <1>; > > > > + #size-cells = <1>; > > > > + ranges = <0 0x1e740000 0x10000>; > > > > > > According to the datasheet this could be 0x20000. It does not matter > > > though, as there's nothing in it past 0x300. > > > > Good catch. > > > > Are you planning on sending a v6 or you want me to apply this and you > can post a patch on top? Yeah, sorry, I wasn't very clear there. I was hoping just to do a follow-up patch with the cleanups if you're okay with that? Andrew
On Thu, 22 Aug 2019 at 13:55, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > On Thu, 22 Aug 2019, at 21:15, Ulf Hansson wrote: > > On Thu, 15 Aug 2019 at 07:37, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > > > > > > > > > On Thu, 15 Aug 2019, at 15:06, Joel Stanley wrote: > > > > On Wed, 7 Aug 2019 at 00:38, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > > > > > > > The ASPEED SD/SDIO/MMC controller exposes two slots implementing the > > > > > SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit > > > > > data bus if only a single slot is enabled. > > > > > > > > > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> > > > > > > > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > > > > > > > Two minor comments below. > > > > > > > > > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > > > > > @@ -0,0 +1,105 @@ > > > > > +# SPDX-License-Identifier: GPL-2.0-or-later > > > > > > > > No "Copyright IBM" ? > > > > > > I'm going rogue. > > > > > > That reminds me I should chase up where we got to with the binding > > > licensing. > > > > > > > > > > > > +%YAML 1.2 > > > > > +--- > > > > > > > > > + > > > > > +examples: > > > > > + - | > > > > > + #include <dt-bindings/clock/aspeed-clock.h> > > > > > + sdc@1e740000 { > > > > > + compatible = "aspeed,ast2500-sd-controller"; > > > > > + reg = <0x1e740000 0x100>; > > > > > + #address-cells = <1>; > > > > > + #size-cells = <1>; > > > > > + ranges = <0 0x1e740000 0x10000>; > > > > > > > > According to the datasheet this could be 0x20000. It does not matter > > > > though, as there's nothing in it past 0x300. > > > > > > Good catch. > > > > > > > Are you planning on sending a v6 or you want me to apply this and you > > can post a patch on top? > > Yeah, sorry, I wasn't very clear there. I was hoping just to do a follow-up > patch with the cleanups if you're okay with that? That's fine. V5 applied for next, thanks! Kind regards Uffe
diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml new file mode 100644 index 000000000000..570f8c72662b --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/aspeed,sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED SD/SDIO/MMC Controller + +maintainers: + - Andrew Jeffery <andrew@aj.id.au> + - Ryan Chen <ryanchen.aspeed@gmail.com> + +description: |+ + The ASPEED SD/SDIO/eMMC controller exposes two slots implementing the SDIO + Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit data bus if + only a single slot is enabled. + + The two slots are supported by a common configuration area. As the SDHCIs for + the slots are dependent on the common configuration area, they are described + as child nodes. + +properties: + compatible: + enum: + - aspeed,ast2400-sd-controller + - aspeed,ast2500-sd-controller + - aspeed,ast2600-sd-controller + reg: + maxItems: 1 + description: Common configuration registers + "#address-cells": + const: 1 + "#size-cells": + const: 1 + ranges: true + clocks: + maxItems: 1 + description: The SD/SDIO controller clock gate + +patternProperties: + "^sdhci@[0-9a-f]+$": + type: object + allOf: + - $ref: mmc-controller.yaml + properties: + compatible: + enum: + - aspeed,ast2400-sdhci + - aspeed,ast2500-sdhci + - aspeed,ast2600-sdhci + reg: + maxItems: 1 + description: The SDHCI registers + clocks: + maxItems: 1 + description: The SD bus clock + interrupts: + maxItems: 1 + description: The SD interrupt shared between both slots + sdhci,auto-cmd12: + type: boolean + description: Specifies that controller should use auto CMD12 + required: + - compatible + - reg + - clocks + - interrupts + +additionalProperties: false + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - ranges + - clocks + +examples: + - | + #include <dt-bindings/clock/aspeed-clock.h> + sdc@1e740000 { + compatible = "aspeed,ast2500-sd-controller"; + reg = <0x1e740000 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x1e740000 0x10000>; + clocks = <&syscon ASPEED_CLK_GATE_SDCLK>; + + sdhci0: sdhci@100 { + compatible = "aspeed,ast2500-sdhci"; + reg = <0x100 0x100>; + interrupts = <26>; + sdhci,auto-cmd12; + clocks = <&syscon ASPEED_CLK_SDIO>; + }; + + sdhci1: sdhci@200 { + compatible = "aspeed,ast2500-sdhci"; + reg = <0x200 0x100>; + interrupts = <26>; + sdhci,auto-cmd12; + clocks = <&syscon ASPEED_CLK_SDIO>; + }; + };
The ASPEED SD/SDIO/MMC controller exposes two slots implementing the SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit data bus if only a single slot is enabled. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> --- v4: * Make use of mmc-controller.yaml * Document sdhci,auto-cmd12 v2: * Fix compatible enums * Add AST2600 compatibles * Describe #address-cells / #size-cells --- .../devicetree/bindings/mmc/aspeed,sdhci.yaml | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml