{"id":817964,"url":"http://patchwork.ozlabs.org/api/covers/817964/?format=json","web_url":"http://patchwork.ozlabs.org/project/devicetree-bindings/cover/20170924190528.21841-1-martin.blumenstingl@googlemail.com/","project":{"id":37,"url":"http://patchwork.ozlabs.org/api/projects/37/?format=json","name":"Devicetree Bindings","link_name":"devicetree-bindings","list_id":"devicetree.vger.kernel.org","list_email":"devicetree@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170924190528.21841-1-martin.blumenstingl@googlemail.com>","list_archive_url":null,"date":"2017-09-24T19:05:26","name":"[RFC,v2,0/2] Add support for Meson MX \"SDIO\" MMC controller","submitter":{"id":66366,"url":"http://patchwork.ozlabs.org/api/people/66366/?format=json","name":"Martin Blumenstingl","email":"martin.blumenstingl@googlemail.com"},"mbox":"http://patchwork.ozlabs.org/project/devicetree-bindings/cover/20170924190528.21841-1-martin.blumenstingl@googlemail.com/mbox/","series":[{"id":4837,"url":"http://patchwork.ozlabs.org/api/series/4837/?format=json","web_url":"http://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=4837","date":"2017-09-24T19:05:26","name":"Add support for Meson MX \"SDIO\" MMC controller","version":2,"mbox":"http://patchwork.ozlabs.org/series/4837/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/817964/comments/","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=googlemail.com header.i=@googlemail.com\n\theader.b=\"Nmx6Gx3c\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0cBp0SKGz9t1G\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 05:05:43 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752744AbdIXTFm (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSun, 24 Sep 2017 15:05:42 -0400","from mail-wr0-f196.google.com ([209.85.128.196]:35310 \"EHLO\n\tmail-wr0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752728AbdIXTFk (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sun, 24 Sep 2017 15:05:40 -0400","by mail-wr0-f196.google.com with SMTP id n64so242875wrb.2;\n\tSun, 24 Sep 2017 12:05:40 -0700 (PDT)","from blackbox.darklights.net\n\t(p200300DCD3F64404C87FF7F0485B6A54.dip0.t-ipconnect.de.\n\t[2003:dc:d3f6:4404:c87f:f7f0:485b:6a54])\n\tby smtp.googlemail.com with ESMTPSA id\n\tv78sm2402039wmv.48.2017.09.24.12.05.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 24 Sep 2017 12:05:38 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlemail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=ZAzcvh84/7jAuMaQ6JmcPpdRuN1KFFqr6EGQiUttIpo=;\n\tb=Nmx6Gx3c/xYstlBCi2HrGavJEiIpbgmgh3VktOaB4+jvchaJVu4v00c08EBk2XL1Yv\n\toZOvQJe3mlzJOTCNZ3o3MzJYaTC7Y5VCWCBaxOlsyhTVvg5HpUwuJkY9PvsnMH4mTvrr\n\t/4Vs5/TPucpEvFkFIgCiqQ1pjPAVzldJ3CCHiOjz8QsIOd+29MRYX1TDOyHuWXLoyTrP\n\tIaz81Fqy5RW3penaVzsILd52de7Lmpc/+5uL4ZC6vyvHzPT9287dQaSoBDWvOMcAK3K5\n\tcNpt6LXstT2Noxt1jQAuJvyohO5gbr9BRuxDdkUsvs6gxg/ya+nYl7xTUxrqf3VJyfLp\n\t7xoQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=ZAzcvh84/7jAuMaQ6JmcPpdRuN1KFFqr6EGQiUttIpo=;\n\tb=LNj5Kq+T9/A5r7WhwOZXl3o6Zaks9tIaTZhQp2N7w8W0F+kP+CqGJ731HvdT2yjjKD\n\tmbIMb3hKQmK4Jvq/KPWQPXsfygqqWyXBTExZfMLZZJpvQ+0Fx2inFdC1BwT2i7WtrWT/\n\tkUB2uigdIEnvSGZBNjbGt6WQu0XR4u82Ihr9GoGdB93QX05NPVewxaBZJjg5oenZAv/k\n\tP3LrQfp35AGKJzdLnb+8WTL5+xu1TKQCDT7ELGlgzU+Gevd8V9IppL8hVJgvpor9l3ZR\n\tkuznYQeLGHmpkfKSX1c1C+AiADGUIMM5uiRhiLCk3N9nF2PfxIIPMppJuXqJ7BDnyHqV\n\tx1JA==","X-Gm-Message-State":"AHPjjUhbubBFTnesLBNwUZgFpkToSkFgCoCTVh8+g34LspziEmhYvdCi\n\tS/spBpZ/Bv5TJN6cYZkIyG0=","X-Google-Smtp-Source":"AOwi7QBgCCySeQaRlHxOAHDHW8GXdOWt6AjPiyPLVB4Tf2wYhInUe4gbfvfx+S34cychkLKWg07gFg==","X-Received":"by 10.223.142.73 with SMTP id n67mr3841696wrb.278.1506279939317; \n\tSun, 24 Sep 2017 12:05:39 -0700 (PDT)","From":"Martin Blumenstingl <martin.blumenstingl@googlemail.com>","To":"ulf.hansson@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com,\n\tcarlo@caione.org, khilman@baylibre.com, linux-mmc@vger.kernel.org,\n\tdevicetree@vger.kernel.org","Cc":"linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, \n\tMartin Blumenstingl <martin.blumenstingl@googlemail.com>","Subject":"[RFC v2 0/2] Add support for Meson MX \"SDIO\" MMC controller","Date":"Sun, 24 Sep 2017 21:05:26 +0200","Message-Id":"<20170924190528.21841-1-martin.blumenstingl@googlemail.com>","X-Mailer":"git-send-email 2.14.1","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"},"content":"This is the successor to Carlo Caione's \"Add support for Amlogic Meson\nMMC driver\" series (v5) from [0].\nThis new driver is for the \"SDIO\" controller found in Amlogic Meson6,\nMeson8 and Meson8b SoCs and supports an internal mux to allow connecting\nthree cards to it.\n\n\nchanges since RFC v1 at [1]:\n- added COMMON_CLK dependency as reported by the kbuild test robot\n- use of_platform_device_{create,destroy} instead of open-coding it's\n  logic\n- moved struct device (which was an array) from meson_mx_mmc_host to\n  the corresponding meson_mx_mmc_slot\n- use struct mmc_command's busy_timeout instead of hard-coding the\n  timeout values in meson_mx_mmc_start_cmd()\n- don't use arrays with only one element for the clock parents in\n  meson_mx_mmc_register_clks()\n- removed the wrapper functions meson_mx_mmc_readl() meson_mx_mmc_writel()\n- allow setting the MMC clock to 0 for UHS speed mode (the actual\n  hardware clock cannot be gated as far as I know, so instead the\n  lowest supported rate is chosen)\n- remove unused #include <linux/init.h>\n- add MMC_CAP_ERASE\n- removed multiple slot support after discussing this with Ulf\n  (this is a feature that needs to be part of the MMC core before drivers\n  can use it)\n- removed SDIO interrupt support (as I currently don't have a way to\n  test it)\n- merge meson_mx_mmc_apply_ios into meson_mx_mmc_set_ios (as that's\n  the only place where it's needed after removing multiple slot support)\n- updated the commit message of the driver patch to indicate the\n  difference between the meson-mx-sdio.c and meson-gx.c (and the \"still\n  missing SDHC\") driver\n- NOTE: I did not add Rob's ACK on the dt-bindings patch because I\n  introduced the \"mmc-slot\" compatible for the child nodes as suggested\n  by Ulf (and I want confirmation from the DT maintainers that I did this\n  correctly)\n\n\n(notable) changes since Carlo's latest from [0] version are:\n- renamed the driver to meson-mx-sdio (Amlogic's reference kernel calls\n  the driver \"aml_sdio\" as there is a second MMC controller in these SoCs\n  which they call the \"SDHC controller\"). do the same with our driver to\n  avoid confusion once we add support for the second controller (which uses\n  a completely different register layout)\n- add support for the internal \"mux\" in this MMC controller (which allows\n  connecting up to three devices to the the controller - at the cost of\n  performance though since the controller can only process one request at\n  a time). The driver registers a new device for each sub-node, which is\n  then fed into the MMC framework to allow per-slot configuration using\n  devicetree (see the example in the documentation)\n- use the common clock framework internally for managing the MMC clock\n  (there is a fixed-factor clock in the controller which takes clk81 as\n   input and divides it's clock by two and a divider clock which takes\n   the result from the fixed-factor clock as input)\n- support the regulators provided by the MMC framework\n- support for GPIO-based card-detection and read-only-detection through\n  the MMC framework\n- use of the <linux/bitfield.h> FIELD_PREP and FIELD_GET macros where it\n  make sense (and thus the code easier to read)\n- re-worked locking (based on the locking in dw_mmc as that also provides\n  multiple \"MMC slots\")\n\n\ntests done so far (use-cases which involve two cards were done only with\nRFC v1):\n- reading an OLD 256MiB SD card (which uses only a 1-bit bus) works fine\n  (sha1sum of the whole device matches with what I get on my PC's\n  card-reader)\n- reading a somewhat more modern class 10 SD card and putting Arch Linux\n  ARM on it (and using that as root file system)\n- it successfully detects the RTL8723BS SDIO wifi chip in my device (even\n  if the SD card is also enabled)\n- reading a 128MiB file from the SD card while scanning wifi networks on\n  the RTL8723BS card does not seem to result in any corruption (sha1sum\n  of the read file seems to match)\n- read speed of my class 10 SD card: ~15MiB/s\n- (unfortunately I could NOT test downloading a file over wifi to the SD\n  card because the RTL8723BS driver refuses to see any wifi networks, but\n  that might be a problem on the RTL8723BS driver side since I don't get\n  any error and the driver has just landed a few weeks ago in staging)\n\n\n[0] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/412136.html\n[1] http://lists.infradead.org/pipermail/linux-amlogic/2017-May/003466.html\n\n\nCarlo Caione (2):\n  dt-bindings: mmc: Document the Amlogic Meson8 and Meson8b SDIO\n    bindings\n  mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b\n    SoCs\n\n .../bindings/mmc/amlogic,meson-mx-sdio.txt         |  52 ++\n drivers/mmc/host/Kconfig                           |  13 +\n drivers/mmc/host/Makefile                          |   1 +\n drivers/mmc/host/meson-mx-sdio.c                   | 795 +++++++++++++++++++++\n 4 files changed, 861 insertions(+)\n create mode 100644 Documentation/devicetree/bindings/mmc/amlogic,meson-mx-sdio.txt\n create mode 100644 drivers/mmc/host/meson-mx-sdio.c"}