From patchwork Thu Oct 20 11:42:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9386639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B86D8608A7 for ; Thu, 20 Oct 2016 11:43:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A573329ABE for ; Thu, 20 Oct 2016 11:43:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A04B29AFC; Thu, 20 Oct 2016 11:43:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F55629ACC for ; Thu, 20 Oct 2016 11:43:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxBlE-0003vt-Ah; Thu, 20 Oct 2016 11:43:48 +0000 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxBkw-0003iR-JL for linux-amlogic@lists.infradead.org; Thu, 20 Oct 2016 11:43:32 +0000 Received: by mail-qt0-x234.google.com with SMTP id q7so49985855qtq.1 for ; Thu, 20 Oct 2016 04:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G0NX36GOT2lwycc6d36LJwozjUCpivR9OyUTTKGfDWw=; b=D7i3qNCuA/uP+hX5/+wf3NoIXGWEhzPlMfzCQvxvkQv6fGijtFEBAOLAMSNR1C8j/h lWqjU7YrkZQLknceFA33ECRcajjPK4meg+rKM9IkJ0EsK5BIUQDeoB0O1cZvc1nbcriv kGxvBZnOG6QaLQp0AYIkUMpT4POBjg/iu+t2yq+28QkCyjvZvRKnALhOqEiuBlQQioXR psPT5U8wYu3EnlrCsJL1hghDlaiQowKvokNz2d3YzUjfevKZoxATCWYizYyLrXV0Khda uZMIEdsWdHGIr2e6mS+xLUqSsEtTQ7fsQjv6/DVi22Y6ab5VohxtAzzay3OrgluO8HGk yHcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G0NX36GOT2lwycc6d36LJwozjUCpivR9OyUTTKGfDWw=; b=EWv2HqwUvfN/XYFqQwuoRM2PssQn3bU3qgeDqOH3fTvWcoyn0SSPYAxoB4QIwJsuu1 sEQtn3Vxqk9CKKFPz9MUbbN4V0OiSMjqVXO5MdGmqbK6HxpMMGUwWg+Q6SjpU1AIBKWn wgXvqr0Ug9uEIo1tViP3oxiWsPCINMyhsckCSMBWy5jM//ZciV+WaAvmv33v+pykmn+o 9dMkL2HK2GIL3VQyikYHrsmZKUVmnyFEVYEY/oM00zHHi65qohmFD3ClQ3DURCjFUDxU +bi5AF1ipPPL1qJB+ZW5J/a72lNIxDESD14UxE0TuelzVJ2fAuYCy45Ytb3i/u31ckt5 QFng== X-Gm-Message-State: AA6/9RkDDyqiwviyOkvZ8QYJv8Y2svpjrS6lE2/ee4euP5Etn5ZPMBxU5bobZBjvhfU0+WZS X-Received: by 10.194.55.41 with SMTP id o9mr150127wjp.228.1476963791812; Thu, 20 Oct 2016 04:43:11 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id wh3sm78121585wjb.49.2016.10.20.04.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Oct 2016 04:43:11 -0700 (PDT) From: Neil Armstrong To: carlo@caione.org, khilman@baylibre.com Subject: [PATCH 4/4] ARM64: dts: meson-gxbb: Add MMC nodes to Nexbox A95x Date: Thu, 20 Oct 2016 13:42:57 +0200 Message-Id: <1476963777-1804-5-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476963777-1804-1-git-send-email-narmstrong@baylibre.com> References: <1476963777-1804-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161020_044330_775263_B55FC8C1 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for eMMC/SD/SDIO on the Nexbox A95x. Signed-off-by: Neil Armstrong --- .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts index 399d85f..9696820 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts @@ -87,6 +87,61 @@ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; }; }; + + vddio_card: gpio-regulator { + compatible = "regulator-gpio"; + + regulator-name = "VDDIO_CARD"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + + /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */ + states = <1800000 0 + 3300000 1>; + }; + + vddio_boot: regulator-vddio_boot { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_BOOT"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vddao_3v3: regulator-vddao_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcc_3v3: regulator-vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; + }; + + wifi32k: wifi32k { + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + clocks = <&wifi32k>; + clock-names = "ext_clock"; + }; }; &uart_AO { @@ -107,3 +162,70 @@ pinctrl-0 = <&remote_input_ao_pins>; pinctrl-names = "default"; }; + +/* Wireless SDIO Module */ +&sd_emmc_a { + status = "okay"; + pinctrl-0 = <&sdio_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <100000000>; + + non-removable; + disable-wp; + + mmc-pwrseq = <&sdio_pwrseq>; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +/* SD card */ +&sd_emmc_b { + status = "okay"; + pinctrl-0 = <&sdcard_pins>; + pinctrl-names = "default"; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <100000000>; + disable-wp; + + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; + cd-inverted; + + vmmc-supply = <&vddao_3v3>; + vqmmc-supply = <&vddio_card>; +}; + +/* eMMC */ +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_pins>; + pinctrl-names = "default"; + + bus-width = <8>; + cap-sd-highspeed; + cap-mmc-highspeed; + max-frequency = <200000000>; + non-removable; + disable-wp; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + + mmc-pwrseq = <&emmc_pwrseq>; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&vddio_boot>; +}; + +&pwm_ef { + status = "okay"; + pinctrl-0 = <&pwm_e_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_FCLK_DIV4>; + clock-names = "clkin0"; +};