From patchwork Sat Nov 12 13:07:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9424095 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 9B84360484 for ; Sat, 12 Nov 2016 13:08:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85FDF296CA for ; Sat, 12 Nov 2016 13:08:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ABFE296E2; Sat, 12 Nov 2016 13:08:17 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham 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 02C73296CA for ; Sat, 12 Nov 2016 13:08:15 +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 1c5Y2K-0006qZ-GC; Sat, 12 Nov 2016 13:08:00 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c5Y2G-0006p2-MV; Sat, 12 Nov 2016 13:07:58 +0000 Received: by mail-wm0-x243.google.com with SMTP id m203so3185227wma.3; Sat, 12 Nov 2016 05:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=a36PCdQ/z4AO/5CMA+B6kQrWqQFmFVYYNHdMkQZqMDo=; b=gRMx/0rbLaQRF1s7he8709k0JPBMkSwvVPNwDftIFqvmlznULlz9tQsA2LuwOsWsz1 vrzdDT1JOApnyZ3PbfWV1O9DfZBX6iXT2SrFcE4FBZ6OvCcAOZ1OCvxUAv/GISeDzL3u OA4C2Sw3Nc+aRFZ4wsNi8z8bRnhvdhzxmZslHYL/oOBbGWkGQxmEe9An9QqFUZ6Y7Deq pi95hj9fwUK1quK5wMBGQc+yqsllpWs1uf9Sk6UEaBufwOpM33Ijtz0qdZmO2JKRii5Y szUV5q21h6RCzze60cmW1fCGfIrgblZfE8juGWc93RbhYw2WsMG1Wg9NFzQzck+QRv05 dTVA== 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; bh=a36PCdQ/z4AO/5CMA+B6kQrWqQFmFVYYNHdMkQZqMDo=; b=VmOj9vxyzafworo+MTMYuEwDBYwJKoan4j6bjlxdnNTn0R9r5Fie+pftPAo4qIXJit WIMM8lSqyoMpaGoNaYK0xNDRHst49CU80vCZxa3c7tMmJugLHdNdWVPZolApkuJx7jfv Mut4RcSmflLcLMOsPkDNPF5LSAI3z1M9mTswPI9uqVv+rwWGwsYFawcBocHMvFtjoHIk /TYfUTE7rsHfDJ/eLeQaaCfB3Qoqe7Q8NeDdXDQUKF611JoL9uevpNFe9e5SUhv0IgUw cUTqZnAWRknKI3fy5QdhkIKEA/Lo1j4Y/LPEa0M4w+Ox7TNrNRz4zL8ClnbAOx+80OkO hAmQ== X-Gm-Message-State: ABUngvcfAw+GQYi/ZkgQc3m26kc1+GXKwj1EoF+oc6vS8oHo5gas0QzVKIXTAVZchhXR0g== X-Received: by 10.28.66.7 with SMTP id p7mr2674160wma.64.1478956053968; Sat, 12 Nov 2016 05:07:33 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD3D3DE04CD53CC2510F85EC9.dip0.t-ipconnect.de. [2003:dc:d3d3:de04:cd53:cc25:10f8:5ec9]) by smtp.googlemail.com with ESMTPSA id a13sm14000331wma.18.2016.11.12.05.07.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Nov 2016 05:07:33 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org, afaerber@suse.de Subject: [PATCH] ARM64: dts: meson-gxbb-vega-s95: Add SD/SDIO/MMC and PWM nodes Date: Sat, 12 Nov 2016 14:07:19 +0100 Message-Id: <20161112130719.24995-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.10.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161112_050757_007471_433E2FF9 X-CRM114-Status: GOOD ( 10.12 ) 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: mark.rutland@arm.com, devicetree@vger.kernel.org, Martin Blumenstingl , catalin.marinas@arm.com, will.deacon@arm.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org 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 All boards from the Tronsmart Vega S95 series are sharing similar MMC based hardware. sd_emmc_a is used to connect a Broadcom based SDIO wifi card (supported by the brcmfmac driver). The 32.768KHz LPO clock for the wifi chip is generated by PWM_E. sd_emmc_b is routed to the SD-card. Unlike p20x there is no GPIO regulator, meaning it only supports 3.3V (which seems to be hard-wired). The eMMC chip is connected to sd_emmc_c and is implemented similar to the meson-gxbb-p20x boards (meaning that hard-wired fixed regulators are used). Signed-off-by: Martin Blumenstingl --- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi index e93221a..e59ad30 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi @@ -65,6 +65,39 @@ enable-active-high; }; + vcc_3v3: regulator-vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcc_1v8: regulator-vcc_1v8 { + compatible = "regulator-fixed"; + regulator-name = "VCC_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + 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>, + <&gpio GPIOX_20 GPIO_ACTIVE_LOW>; + clocks = <&wifi32k>; + clock-names = "ext_clock"; + }; }; &uart_AO { @@ -102,3 +135,74 @@ &usb1 { status = "okay"; }; + +/* Wireless SDIO Module */ +&sd_emmc_a { + status = "okay"; + pinctrl-0 = <&sdio_pins &sdio_irq_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 = <&vcc_3v3>; + vqmmc-supply = <&vcc_1v8>; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +/* 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 = <&vcc_3v3>; +}; + +/* 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>; + vmmcq-sumpply = <&vcc_1v8>; +}; + +&pwm_ef { + status = "okay"; + pinctrl-0 = <&pwm_e_pins>; + pinctrl-names = "default"; + clocks = <&clkc CLKID_FCLK_DIV4>; + clock-names = "clkin0"; +};