From patchwork Tue Dec 13 18:13:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 9472969 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 C71DD607EE for ; Tue, 13 Dec 2016 18:18:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5AF8285FD for ; Tue, 13 Dec 2016 18:18:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA6582864C; Tue, 13 Dec 2016 18:18:11 +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 41C20285FD for ; Tue, 13 Dec 2016 18:18:11 +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 1cGrd5-0003Lh-H3; Tue, 13 Dec 2016 18:16:43 +0000 Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cGrb1-0000ma-TU for linux-arm-kernel@lists.infradead.org; Tue, 13 Dec 2016 18:14:37 +0000 Received: by mail-pg0-x234.google.com with SMTP id x23so50182931pgx.1 for ; Tue, 13 Dec 2016 10:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a43qbeWjur38W7yJsy5vFu3dnMwrqhmkXout9VW7Hdc=; b=bK0sns2T1t/2w6BDyFTmksM173KDTpUepyiPD2RJITF6cAaeaDy7MDhS3f4vVxYgHZ NgX/GPCgBafW3ZJJo8B4RwP85+Eu3kL7Q5Ic72CFje9NEJ8pyNScd9b7WKuV9fc8kvrG 48aAkGdU6AhLjihL2ZPLtB1pDFoJm2PXqRYvY= 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=a43qbeWjur38W7yJsy5vFu3dnMwrqhmkXout9VW7Hdc=; b=ktv9IiypJo3rvuHKtigjpI6e7jRr6BtsN2Mr4UcxK2N4VTvAMSa96fZMtE1+wWpJmY jRfcWKCj9JwDosZAQ5fkZJD/13kIO4F67qH4y7zX5Pw6Ba/8lTwLdtNfajwGkJS32mS0 9KuPTSu+yWMdk+1vTnmMnzdxkXCRk1j+AegeP6I0pDPJtVlbRltG7CntDhWvDea8EzqC H4qwJ1nsokaCTUU3MT+PScuM4QEyvMYDkTEKumEqrC1vFwikFYwVaMKRFM1OdP1kpAZu XTovgQ0GCVM8Xh/cQ0pzdY6xKIsN66jj0WBD+SJFE1SED3yoh+hvdLr2Otyp7jqEWisF 63tg== X-Gm-Message-State: AKaTC0178P5EQVK0vyY7+BvIzD8cU5Va7YdNrUx6C0RZvZZr9mqany5XX8XluSMw6YUtnjcP X-Received: by 10.84.129.35 with SMTP id 32mr162801594plb.179.1481652854632; Tue, 13 Dec 2016 10:14:14 -0800 (PST) Received: from venom.rtp.broadcom.com ([216.31.219.19]) by smtp.gmail.com with ESMTPSA id y189sm81552101pfy.32.2016.12.13.10.14.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Dec 2016 10:14:14 -0800 (PST) From: Jon Mason To: Rob Herring , Mark Rutland , Florian Fainelli Subject: [PATCH 7/7] ARM: dts: NSP: Add SD/MMC support Date: Tue, 13 Dec 2016 13:13:51 -0500 Message-Id: <1481652831-2744-8-git-send-email-jon.mason@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481652831-2744-1-git-send-email-jon.mason@broadcom.com> References: <1481652831-2744-1-git-send-email-jon.mason@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161213_101436_054433_9103F447 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add SD/MMC support to the Broadcom NSP SVK and XMC. Signed-off-by: Jon Mason --- arch/arm/boot/dts/bcm-nsp.dtsi | 9 +++ arch/arm/boot/dts/bcm958525xmc.dts | 6 +- arch/arm/boot/dts/bcm958625k.dts | 118 ++++++++++++++++++++++++------------- 3 files changed, 90 insertions(+), 43 deletions(-) diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi index ecffc16..6c58c78 100644 --- a/arch/arm/boot/dts/bcm-nsp.dtsi +++ b/arch/arm/boot/dts/bcm-nsp.dtsi @@ -209,6 +209,15 @@ #dma-cells = <1>; }; + sdio: sdhci@21000 { + compatible = "brcm,sdhci-iproc-cygnus"; + reg = <0x21000 0x100>; + interrupts = ; + sdhci,auto-cmd12; + clocks = <&lcpll0 BCM_NSP_LCPLL0_SDIO_CLK>; + status = "disabled"; + }; + amac0: ethernet@22000 { compatible = "brcm,nsp-amac"; reg = <0x022000 0x1000>, diff --git a/arch/arm/boot/dts/bcm958525xmc.dts b/arch/arm/boot/dts/bcm958525xmc.dts index 3912269..41e7fd3 100644 --- a/arch/arm/boot/dts/bcm958525xmc.dts +++ b/arch/arm/boot/dts/bcm958525xmc.dts @@ -59,7 +59,7 @@ }; }; -/* XHCI and SD/MMC support needed to be complete */ +/* XHCI support needed to be complete */ &amac0 { status = "okay"; @@ -184,6 +184,10 @@ status = "okay"; }; +&sdio { + status = "ok"; +}; + &uart0 { status = "okay"; }; diff --git a/arch/arm/boot/dts/bcm958625k.dts b/arch/arm/boot/dts/bcm958625k.dts index 6e994f2..f8d47e5 100644 --- a/arch/arm/boot/dts/bcm958625k.dts +++ b/arch/arm/boot/dts/bcm958625k.dts @@ -117,58 +117,34 @@ &pinctrl { pinctrl-names = "default"; - pinctrl-0 = <&nand_sel>; + pinctrl-0 = <&nand_sel>, <&gpiobs>, <&pwmc>; + nand_sel: nand_sel { function = "nand"; groups = "nand_grp"; }; -}; - -&srab { - compatible = "brcm,bcm58625-srab", "brcm,nsp-srab"; - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - label = "port0"; - reg = <0>; - }; - - port@1 { - label = "port1"; - reg = <1>; - }; - - port@2 { - label = "port2"; - reg = <2>; - }; - port@3 { - label = "port3"; - reg = <3>; - }; + gpiobs: gpiobs { + function = "gpio_b"; + groups = "gpio_b_0_grp", "gpio_b_1_grp", "gpio_b_2_grp", + "gpio_b_3_grp"; + }; - port@4 { - label = "port4"; - reg = <4>; - }; + pwmc: pwmc { + function = "pwm"; + groups = "pwm0_grp", "pwm1_grp", "pwm2_grp", "pwm3_grp"; + }; - port@5 { - ethernet = <&amac0>; - label = "cpu"; - reg = <5>; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; + emmc_sel: emmc_sel { + function = "emmc"; + groups = "emmc_grp"; }; }; +&pwm { + status = "okay"; +}; + &qspi { bspi-sel = <0>; flash: m25p80@0 { @@ -215,6 +191,64 @@ status = "okay"; }; +/* + * By default the sd slot is functional. For emmc to work add "<&emmc_sel>" + * and delete "<&nand_sel>" in "pinctrl-0" property of pinctrl node. Remove the + * bus-width property here and disable the nand node with status = "disabled";. + * + * Ex: pinctrl-0 = <&emmc_sel>, <&gpiobs>, <&pwmc>; + */ +&sdio { + bus-width = <4>; + no-1-8-v; + status = "ok"; +}; + +&srab { + compatible = "brcm,bcm58625-srab", "brcm,nsp-srab"; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + label = "port0"; + reg = <0>; + }; + + port@1 { + label = "port1"; + reg = <1>; + }; + + port@2 { + label = "port2"; + reg = <2>; + }; + + port@3 { + label = "port3"; + reg = <3>; + }; + + port@4 { + label = "port4"; + reg = <4>; + }; + + port@5 { + ethernet = <&amac0>; + label = "cpu"; + reg = <5>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + &uart0 { status = "okay"; };