devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles
@ 2022-02-03  1:51 Samuel Holland
  2022-02-03  1:51 ` [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant Samuel Holland
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Samuel Holland @ 2022-02-03  1:51 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, linux-sunxi,
	linux-mmc, linux-kernel, Rob Herring, devicetree,
	linux-arm-kernel, Samuel Holland

D1 contains variants of the usual sunxi MMC controller. The eMMC
controller has the same parameters as the A100 eMMC controller. The
other controllers have a DMA address shift like on A100, but they have
a smaller 13-bit size field, making them a new incompatible variant.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 .../devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
index 4f62ad6ce50c..94e2c6c4e4b7 100644
--- a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
+++ b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
@@ -24,6 +24,7 @@ properties:
       - const: allwinner,sun7i-a20-mmc
       - const: allwinner,sun8i-a83t-emmc
       - const: allwinner,sun9i-a80-mmc
+      - const: allwinner,sun20i-d1-mmc
       - const: allwinner,sun50i-a64-emmc
       - const: allwinner,sun50i-a64-mmc
       - const: allwinner,sun50i-a100-emmc
@@ -49,6 +50,9 @@ properties:
       - items:
           - const: allwinner,sun50i-h6-mmc
           - const: allwinner,sun50i-a64-mmc
+      - items:
+          - const: allwinner,sun20i-d1-emmc
+          - const: allwinner,sun50i-a100-emmc
       - items:
           - const: allwinner,sun50i-h616-emmc
           - const: allwinner,sun50i-a100-emmc
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant
  2022-02-03  1:51 [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Samuel Holland
@ 2022-02-03  1:51 ` Samuel Holland
  2022-02-08 15:12   ` Ulf Hansson
  2022-02-03  8:15 ` [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Maxime Ripard
  2022-02-08 15:12 ` Ulf Hansson
  2 siblings, 1 reply; 5+ messages in thread
From: Samuel Holland @ 2022-02-03  1:51 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, linux-sunxi,
	linux-mmc, linux-kernel, Rob Herring, devicetree,
	linux-arm-kernel, Samuel Holland

D1's MMC controllers are unique in that they have the DMA address shift
(like A100) with a 13-bit descriptor size field (like sun4i). Add the
compatible and parameters for this new variant.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 drivers/mmc/host/sunxi-mmc.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 2702736a1c57..c62afd212692 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1167,6 +1167,14 @@ static const struct sunxi_mmc_cfg sun9i_a80_cfg = {
 	.can_calibrate = false,
 };
 
+static const struct sunxi_mmc_cfg sun20i_d1_cfg = {
+	.idma_des_size_bits = 13,
+	.idma_des_shift = 2,
+	.can_calibrate = true,
+	.mask_data0 = true,
+	.needs_new_timings = true,
+};
+
 static const struct sunxi_mmc_cfg sun50i_a64_cfg = {
 	.idma_des_size_bits = 16,
 	.clk_delays = NULL,
@@ -1205,6 +1213,7 @@ static const struct of_device_id sunxi_mmc_of_match[] = {
 	{ .compatible = "allwinner,sun7i-a20-mmc", .data = &sun7i_a20_cfg },
 	{ .compatible = "allwinner,sun8i-a83t-emmc", .data = &sun8i_a83t_emmc_cfg },
 	{ .compatible = "allwinner,sun9i-a80-mmc", .data = &sun9i_a80_cfg },
+	{ .compatible = "allwinner,sun20i-d1-mmc", .data = &sun20i_d1_cfg },
 	{ .compatible = "allwinner,sun50i-a64-mmc", .data = &sun50i_a64_cfg },
 	{ .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg },
 	{ .compatible = "allwinner,sun50i-a100-mmc", .data = &sun50i_a100_cfg },
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles
  2022-02-03  1:51 [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Samuel Holland
  2022-02-03  1:51 ` [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant Samuel Holland
@ 2022-02-03  8:15 ` Maxime Ripard
  2022-02-08 15:12 ` Ulf Hansson
  2 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2022-02-03  8:15 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Ulf Hansson, Chen-Yu Tsai, Jernej Skrabec, linux-sunxi, linux-mmc,
	linux-kernel, Rob Herring, devicetree, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

On Wed, Feb 02, 2022 at 07:51:10PM -0600, Samuel Holland wrote:
> D1 contains variants of the usual sunxi MMC controller. The eMMC
> controller has the same parameters as the A100 eMMC controller. The
> other controllers have a DMA address shift like on A100, but they have
> a smaller 13-bit size field, making them a new incompatible variant.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

For both patches:
Acked-by: Maxime Ripard <maxime@cerno.tech>

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles
  2022-02-03  1:51 [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Samuel Holland
  2022-02-03  1:51 ` [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant Samuel Holland
  2022-02-03  8:15 ` [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Maxime Ripard
@ 2022-02-08 15:12 ` Ulf Hansson
  2 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2022-02-08 15:12 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, linux-sunxi,
	linux-mmc, linux-kernel, Rob Herring, devicetree,
	linux-arm-kernel

On Thu, 3 Feb 2022 at 02:51, Samuel Holland <samuel@sholland.org> wrote:
>
> D1 contains variants of the usual sunxi MMC controller. The eMMC
> controller has the same parameters as the A100 eMMC controller. The
> other controllers have a DMA address shift like on A100, but they have
> a smaller 13-bit size field, making them a new incompatible variant.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>
>  .../devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml      | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
> index 4f62ad6ce50c..94e2c6c4e4b7 100644
> --- a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
> @@ -24,6 +24,7 @@ properties:
>        - const: allwinner,sun7i-a20-mmc
>        - const: allwinner,sun8i-a83t-emmc
>        - const: allwinner,sun9i-a80-mmc
> +      - const: allwinner,sun20i-d1-mmc
>        - const: allwinner,sun50i-a64-emmc
>        - const: allwinner,sun50i-a64-mmc
>        - const: allwinner,sun50i-a100-emmc
> @@ -49,6 +50,9 @@ properties:
>        - items:
>            - const: allwinner,sun50i-h6-mmc
>            - const: allwinner,sun50i-a64-mmc
> +      - items:
> +          - const: allwinner,sun20i-d1-emmc
> +          - const: allwinner,sun50i-a100-emmc
>        - items:
>            - const: allwinner,sun50i-h616-emmc
>            - const: allwinner,sun50i-a100-emmc
> --
> 2.33.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant
  2022-02-03  1:51 ` [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant Samuel Holland
@ 2022-02-08 15:12   ` Ulf Hansson
  0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2022-02-08 15:12 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, linux-sunxi,
	linux-mmc, linux-kernel, Rob Herring, devicetree,
	linux-arm-kernel

On Thu, 3 Feb 2022 at 02:51, Samuel Holland <samuel@sholland.org> wrote:
>
> D1's MMC controllers are unique in that they have the DMA address shift
> (like A100) with a 13-bit descriptor size field (like sun4i). Add the
> compatible and parameters for this new variant.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>
>  drivers/mmc/host/sunxi-mmc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 2702736a1c57..c62afd212692 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1167,6 +1167,14 @@ static const struct sunxi_mmc_cfg sun9i_a80_cfg = {
>         .can_calibrate = false,
>  };
>
> +static const struct sunxi_mmc_cfg sun20i_d1_cfg = {
> +       .idma_des_size_bits = 13,
> +       .idma_des_shift = 2,
> +       .can_calibrate = true,
> +       .mask_data0 = true,
> +       .needs_new_timings = true,
> +};
> +
>  static const struct sunxi_mmc_cfg sun50i_a64_cfg = {
>         .idma_des_size_bits = 16,
>         .clk_delays = NULL,
> @@ -1205,6 +1213,7 @@ static const struct of_device_id sunxi_mmc_of_match[] = {
>         { .compatible = "allwinner,sun7i-a20-mmc", .data = &sun7i_a20_cfg },
>         { .compatible = "allwinner,sun8i-a83t-emmc", .data = &sun8i_a83t_emmc_cfg },
>         { .compatible = "allwinner,sun9i-a80-mmc", .data = &sun9i_a80_cfg },
> +       { .compatible = "allwinner,sun20i-d1-mmc", .data = &sun20i_d1_cfg },
>         { .compatible = "allwinner,sun50i-a64-mmc", .data = &sun50i_a64_cfg },
>         { .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg },
>         { .compatible = "allwinner,sun50i-a100-mmc", .data = &sun50i_a100_cfg },
> --
> 2.33.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-08 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03  1:51 [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Samuel Holland
2022-02-03  1:51 ` [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant Samuel Holland
2022-02-08 15:12   ` Ulf Hansson
2022-02-03  8:15 ` [PATCH 1/2] dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatibles Maxime Ripard
2022-02-08 15:12 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).