From patchwork Fri May 18 18:34:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Branden X-Patchwork-Id: 10411827 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 3D2CB602CB for ; Fri, 18 May 2018 18:34:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29DA428707 for ; Fri, 18 May 2018 18:34:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CEB828A85; Fri, 18 May 2018 18:34:42 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 82C9028707 for ; Fri, 18 May 2018 18:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=W8vQsuWgxaAviwZ4jT/hI/8kZa+0karYn8Bv4HzRQC4=; b=gCc PiEdGq5K9NakHsSBhrMpWMU6TNqUd+FcKb9/Kedz5YbIE5aZszVk/LWmnWZsof1WKWuxhkAOhbnGd oUQ8zRf307m6DpgnfDQq9rQPMYz8chENBUKHVXBPynHiqgG7LE+Y+akE4W1xFw+VKU7nwDXw81QSg ue87LYu8IcU8EZH3adyzrLMnyArGpHN7IWRtTnE2po66pCgio4+5OkNIANMjc4TXpS+9aUtDZ2RbV 9Goa/xmJUn4ZB0FL7i+uWHyMBIelIX9/bx2xyzLTyVe6sQ9XZT8gfLl+9ktkzCbQkjn3JWL7bKExm Pcd1yKrCgseHsUq2SYmNXGbTOlxdiww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJkD4-0006K6-5D; Fri, 18 May 2018 18:34:34 +0000 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJkD0-0006IN-4W for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 18:34:31 +0000 Received: by mail-qt0-x241.google.com with SMTP id g13-v6so11499568qth.8 for ; Fri, 18 May 2018 11:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=AUD2UPjFW/+1He/9rFSHKqvPj56fsyx7SITwYzI0Ts4=; b=AglTtPwe5jMbXBLbHSjDbgYE3jQk7UEmRh6CIPlAW0EOugRWmzC3oOh9hhbCQ/36S9 eSh4McalYD4gCQ4CcOOtP2D22HaUb4pTl5uWwrN2MsXQ348FRTPHWUAGYXMmc5NqkUuZ oJmv6mTbuDgeESK9s5JfIc0w+9BHTilZJeqRU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AUD2UPjFW/+1He/9rFSHKqvPj56fsyx7SITwYzI0Ts4=; b=dZlmVskYA/64brx+44qZzzycaRSozwUJpFh3mTGoEizLmB2erMKfoE1sRr53EkgW+f qP3YqYpwgnyfEuIi+gglKow8RrploLEc3ffuOCXYXKYVEVisFU6Ob1c3Xx+ubd0NbTQc EysoP6ZLf/07AVyunPRjgI+8TfHToh0a7txI/6p2tgiFQvgeu2IAMcgbPFsuOhqHDtIa 0Oh5BfHY+DUi3Nz0yb8ra0/ucapmLDiJSDGzA51j9LcM72YA/DNRTbhnAUynsko8Yvdi sTrSqz4nuRCgMNtgNI9cEGZcULYr0SY8dxw4xXbvHEEXgLdg5tztRFMDBP6JpI5W95cV K8yw== X-Gm-Message-State: ALKqPwdgjvaAxnXKHN+MzQa88BnMHt0zdCU1Vml9exaen+dC0xJOEu4/ LpixwdL3x6chSRa2INaCgRa8xw== X-Google-Smtp-Source: AB8JxZpZGrUBlyI424gCvoP9UpmA9+8XS531+yBXSgzmQWBl267gaEAPqmhCrxa15iOre18A4ssdbw== X-Received: by 2002:a0c:c242:: with SMTP id w2-v6mr9607945qvh.91.1526668458719; Fri, 18 May 2018 11:34:18 -0700 (PDT) Received: from lbrmn-lnxub113.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id q10-v6sm6257555qtk.7.2018.05.18.11.34.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 May 2018 11:34:17 -0700 (PDT) From: Scott Branden To: Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Ray Jui Subject: [PATCH] arm64: dts: stingray: use NUM_SATA to configure number of sata ports Date: Fri, 18 May 2018 11:34:06 -0700 Message-Id: <1526668446-20048-1-git-send-email-scott.branden@broadcom.com> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180518_113430_178706_D5853A66 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, BCM Kernel Feedback , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Scott Branden 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 Move remaining sata configuration to stingray-sata.dtsi and enable ports based on NUM_SATA defined. Now, all that needs to be done is define NUM_SATA per board. Signed-off-by: Scott Branden --- .../boot/dts/broadcom/stingray/bcm958742-base.dtsi | 64 -------------------- .../boot/dts/broadcom/stingray/bcm958742k.dts | 2 + .../boot/dts/broadcom/stingray/bcm958742t.dts | 2 + .../boot/dts/broadcom/stingray/stingray-sata.dtsi | 68 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 64 deletions(-) diff --git a/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi b/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi index 8862ec9..cacc25e 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi +++ b/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi @@ -72,70 +72,6 @@ <0x00000008 0x80000000 0x1 0x80000000>; /* 6G @ 34G */ }; -&sata0 { - status = "okay"; -}; - -&sata_phy0{ - status = "okay"; -}; - -&sata1 { - status = "okay"; -}; - -&sata_phy1{ - status = "okay"; -}; - -&sata2 { - status = "okay"; -}; - -&sata_phy2{ - status = "okay"; -}; - -&sata3 { - status = "okay"; -}; - -&sata_phy3{ - status = "okay"; -}; - -&sata4 { - status = "okay"; -}; - -&sata_phy4{ - status = "okay"; -}; - -&sata5 { - status = "okay"; -}; - -&sata_phy5{ - status = "okay"; -}; - -&sata6 { - status = "okay"; -}; - -&sata_phy6{ - status = "okay"; -}; - -&sata7 { - status = "okay"; -}; - -&sata_phy7{ - status = "okay"; -}; - &mdio_mux_iproc { mdio@10 { gphy0: eth-phy@10 { diff --git a/arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dts b/arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dts index 77efa28..a515346 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dts +++ b/arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dts @@ -32,6 +32,8 @@ /dts-v1/; +#define NUM_SATA 8 + #include "bcm958742-base.dtsi" / { diff --git a/arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dts b/arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dts index 5084b03..6a4d19e 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dts +++ b/arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dts @@ -32,6 +32,8 @@ /dts-v1/; +#define NUM_SATA 8 + #include "bcm958742-base.dtsi" / { diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi index 8c68e0c..7f6d176 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi +++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi @@ -43,7 +43,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 0) + status = "okay"; +#else status = "disabled"; +#endif sata0_port0: sata-port@0 { reg = <0>; @@ -58,7 +62,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 0) + status = "okay"; +#else status = "disabled"; +#endif sata0_phy0: sata-phy@0 { reg = <0>; @@ -73,7 +81,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 1) + status = "okay"; +#else status = "disabled"; +#endif sata1_port0: sata-port@0 { reg = <0>; @@ -88,7 +100,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 1) + status = "okay"; +#else status = "disabled"; +#endif sata1_phy0: sata-phy@0 { reg = <0>; @@ -103,7 +119,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 2) + status = "okay"; +#else status = "disabled"; +#endif sata2_port0: sata-port@0 { reg = <0>; @@ -118,7 +138,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 2) + status = "okay"; +#else status = "disabled"; +#endif sata2_phy0: sata-phy@0 { reg = <0>; @@ -133,7 +157,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 3) + status = "okay"; +#else status = "disabled"; +#endif sata3_port0: sata-port@0 { reg = <0>; @@ -148,7 +176,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 3) + status = "okay"; +#else status = "disabled"; +#endif sata3_phy0: sata-phy@0 { reg = <0>; @@ -163,7 +195,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 4) + status = "okay"; +#else status = "disabled"; +#endif sata4_port0: sata-port@0 { reg = <0>; @@ -178,7 +214,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 4) + status = "okay"; +#else status = "disabled"; +#endif sata4_phy0: sata-phy@0 { reg = <0>; @@ -193,7 +233,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 5) + status = "okay"; +#else status = "disabled"; +#endif sata5_port0: sata-port@0 { reg = <0>; @@ -208,7 +252,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 5) + status = "okay"; +#else status = "disabled"; +#endif sata5_phy0: sata-phy@0 { reg = <0>; @@ -223,7 +271,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 6) + status = "okay"; +#else status = "disabled"; +#endif sata6_port0: sata-port@0 { reg = <0>; @@ -238,7 +290,11 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 6) + status = "okay"; +#else status = "disabled"; +#endif sata6_phy0: sata-phy@0 { reg = <0>; @@ -253,7 +309,11 @@ interrupts = ; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 7) + status = "okay"; +#else status = "disabled"; +#endif sata7_port0: sata-port@0 { reg = <0>; @@ -268,11 +328,19 @@ reg-names = "phy"; #address-cells = <1>; #size-cells = <0>; +#if (NUM_SATA > 7) + status = "okay"; +#else status = "disabled"; +#endif sata7_phy0: sata-phy@0 { reg = <0>; #phy-cells = <0>; }; }; + +#if (NUM_SATA > 8) +#error "NUM_SATA > 8" +#endif };