Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3798287imm; Mon, 4 Jun 2018 09:23:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIKznirFpzlE2sFCuVTnyR4VsYgDfWWYLg3rqFesnTFBrabjwhSBYz/5GkWZQvSu5Gju0nM X-Received: by 2002:a62:32c6:: with SMTP id y189-v6mr21964872pfy.241.1528129428739; Mon, 04 Jun 2018 09:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528129428; cv=none; d=google.com; s=arc-20160816; b=Azf8IMuTq0D6BLdyVm1FHLqhcR1+VS0EWVBhcApYbY12VQN0atYq4WhAgzyCHzc2b1 6yaDjw9L2itqyu2JA2vuJ8O2/OQuaPgYCZBVZb8XNTV9+s/ntA7gCI6qRXNR83URTt+r rLlrxQQHXy0pNasDqc8wHA58U235cCZgamzVEpLw4AJyZ0Ug2qUXQ74+jrpiAk4X1KOk 3zXLdsjCcp3K/mTK7PCa+xwt8VlCgHTH6DwMA/90tO4TaIC85Efu6kIBw6gD/ry1lhbN MxbQkM4V32brNHbnJ/Eaq6MsgHVpqa5EP5MDZsdbHZ5Pd9r/xIaeXeiN/5eSSxpMj/pE u86Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=03Sh8eJHp0kkg5lZufhca4xR3OaL6uwG0rab5Owo91o=; b=wS5Nls0Q4+QX8z+uXoHMycMpvSrGDgUihuoIhmz6XNCDbiZAzKKzXAEfvZzGLT7bp0 fAcwQ27tCYemPgYa+y0ekF5zKA7YmOQVokAslGyXcFbrTWz6AT79jZDUh15wXcVWkjpd 8YbeT1D/vLW8jVdwrhkbRmuBigLc0FxR2S0wd/BPJLfd4HZB4os0YKFXOFEPGftJx0e5 3KL/h71zSIOXD0cjqerTdASGYxH+Qw5sSgD+4sAVUKK2J0W0lflKHp43LD/5HgixlwFs GEIbeEZt8yYcTy4lHIIrOj4SUz01JSsiXxQENKFaN5e3zI0cc9Fx6LCEnQdcPhLD9R8o nV0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UZIkYy3t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8-v6si47198278plc.444.2018.06.04.09.23.34; Mon, 04 Jun 2018 09:23:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UZIkYy3t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbeFDQWj (ORCPT + 99 others); Mon, 4 Jun 2018 12:22:39 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:38364 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbeFDQWh (ORCPT ); Mon, 4 Jun 2018 12:22:37 -0400 Received: by mail-qt0-f193.google.com with SMTP id x34-v6so27819746qtk.5; Mon, 04 Jun 2018 09:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=03Sh8eJHp0kkg5lZufhca4xR3OaL6uwG0rab5Owo91o=; b=UZIkYy3tF8kaWxC/XM0WEm+w9szxa4y8YyPRXC6xAx8Jzkp6D7KJNwnNaZ4Y4YMz1t 3Uyj1hDAVY1VvyTA/xOP08/1JsCZ4KU+hWIB8mXPWmHb4jqb4qLYh1SQF4Gx6ob7/b8L IIzQ/lZkpumnJ17gEGDenPdSt8tl1iwyCjgMU+uzDaIzoYfSPUlD6XiIIZJK8jUkkbKN eyWf9HkfxZvoRTRYgveY4X+p38hmUXix01jX2PFrnDZzevTlp/v7MG4MAdWTNFDHdIJ5 z+naBIHD7wVuV0Z4PW0Fcz41V5px0+1Kk54MZUpYqiBRUQJ2f24TQPf6/9cIKFFPfxeN /yjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=03Sh8eJHp0kkg5lZufhca4xR3OaL6uwG0rab5Owo91o=; b=a1tnt+8vK4Lpn/hYendOkH4NSSBdIfdCUGZ9phVfLn7wn42LkfhSOHABhJaubmsGQ6 BMWfPaSTAozq7i9ZtXW/yBseMROvb2FF/udqQEA/QB1bQgJan1PvJk2Yc8/j4HgU1z8Y 7F6R/eQdqLVc4+A1krC53Q/1XzaCdqzLrJM8Jo5xJXye//p8fUj7udAzYiC+iWT9mnzZ ZMveBy3zwONyjWvaAqYp1BOw2T5wfpi4OcbmwB5TjjZWmrc5tlPVJsqW2QCcuoC9xH1m iCJfkCiYgUjWvfg9t/wNT7QaHMdNb20Yd+4QVcFPJc/MAFdYjdH0V3IQe5EsIJ6PhWn4 cdgQ== X-Gm-Message-State: APt69E1PtosooTx7i8F42O+ebYqrr4ko77pu4+QrfDpRHvySVyR1yRF2 AYoWs7zg8boO7nNj8v2QUpDaRDUF X-Received: by 2002:ac8:38a7:: with SMTP id f36-v6mr20207332qtc.244.1528129355779; Mon, 04 Jun 2018 09:22:35 -0700 (PDT) Received: from [10.69.41.93] ([192.19.223.250]) by smtp.googlemail.com with ESMTPSA id k44-v6sm17494688qtf.74.2018.06.04.09.22.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 09:22:34 -0700 (PDT) Subject: Re: [PATCH] arm64: dts: stingray: use NUM_SATA to configure number of sata ports To: Scott Branden , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Ray Jui Cc: BCM Kernel Feedback , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1526668446-20048-1-git-send-email-scott.branden@broadcom.com> From: Florian Fainelli Openpgp: preference=signencrypt Autocrypt: addr=f.fainelli@gmail.com; prefer-encrypt=mutual; keydata= xsDiBEjPuBIRBACW9MxSJU9fvEOCTnRNqG/13rAGsj+vJqontvoDSNxRgmafP8d3nesnqPyR xGlkaOSDuu09rxuW+69Y2f1TzjFuGpBk4ysWOR85O2Nx8AJ6fYGCoeTbovrNlGT1M9obSFGQ X3IzRnWoqlfudjTO5TKoqkbOgpYqIo5n1QbEjCCwCwCg3DOH/4ug2AUUlcIT9/l3pGvoRJ0E AICDzi3l7pmC5IWn2n1mvP5247urtHFs/uusE827DDj3K8Upn2vYiOFMBhGsxAk6YKV6IP0d ZdWX6fqkJJlu9cSDvWtO1hXeHIfQIE/xcqvlRH783KrihLcsmnBqOiS6rJDO2x1eAgC8meAX SAgsrBhcgGl2Rl5gh/jkeA5ykwbxA/9u1eEuL70Qzt5APJmqVXR+kWvrqdBVPoUNy/tQ8mYc nzJJ63ng3tHhnwHXZOu8hL4nqwlYHRa9eeglXYhBqja4ZvIvCEqSmEukfivk+DlIgVoOAJbh qIWgvr3SIEuR6ayY3f5j0f2ejUMYlYYnKdiHXFlF9uXm1ELrb0YX4GMHz80nRmxvcmlhbiBG YWluZWxsaSA8Zi5mYW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Qb33FjGO4P WU11Nr9i/qoV8QCo12MQEo244RRA6VMud06y/E449rWZFSTwGqb0FS0seTcYNvxt8PB2izX+ HZA8SL54j479ubxhfuoTu5nXdtFYFj5Lj5x34LKPx7MpgAmj0H7SDhpFWF2FzcC1bjiW9mjW HaKaX23Awt97AqQZXegbfkJwX2Y53ufq8Np3e1542lh3/mpiGSilCsaTahEGrHK+lIusl6mz Joil+u3k01ofvJMK0ZdzGUZ/aPMZ16LofjFA+MNxWrZFrkYmiGdv+LG45zSlZyIvzSiG2lKy kuVag+IijCIom78P9jRtB1q1Q5lwZp2TLAJlz92DmFwBg1hyFzwDADjZ2nrDxKUiybXIgZp9 aU2d++ptEGCVJOfEW4qpWCCLPbOT7XBr+g/4H3qWbs3j/cDDq7LuVYIe+wchy/iXEJaQVeTC y5arMQorqTFWlEOgRA8OP47L9knl9i4xuR0euV6DChDrguup2aJVU8JPBBgRAgAPAhsMBQJU X9LxBQkeXB3fAAoJEGFXmRW1Y3YOj4UAn3nrFLPZekMeqX5aD/aq/dsbXSfyAKC45Go0YyxV HGuUuzv+GKZ6nsysJw== Message-ID: Date: Mon, 4 Jun 2018 09:22:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1526668446-20048-1-git-send-email-scott.branden@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/2018 11:34 AM, Scott Branden wrote: > 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. Rob could you review this and let us know if this approach is okay or not? Thank you! > > 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 > }; > -- Florian