From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Subject: Re: [PATCH v2 8/8] rockchip: Enable PCIe/M.2 on rock960 board Date: Sat, 9 May 2020 22:16:53 +0530 Message-ID: References: <20200430070412.12499-1-jagan@amarulasolutions.com> <20200430070412.12499-9-jagan@amarulasolutions.com> <20200503133944.GA28003@Mani-XPS-13-9360> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200503133944.GA28003@Mani-XPS-13-9360> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane-mx.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Manivannan Sadhasivam Cc: Patrick Wildt , "open list:ARM/Rockchip SoC..." , Tom Cubie , Simon Glass , Kever Yang , U-Boot-Denx , Peter Robinson , Suniel Mahesh , Philipp Tomsich , linux-amarula List-Id: linux-rockchip.vger.kernel.org On Sun, May 3, 2020 at 7:09 PM Manivannan Sadhasivam wrote: > > On Thu, Apr 30, 2020 at 12:34:12PM +0530, Jagan Teki wrote: > > Due to some on board limitation rock960 PCIe > > works only with 1.8V IO domain. > > > > So, this patch enables grf io_sel explicitly > > to make PCIe/M.2 to work. > > > > Cc: Tom Cubie > > Cc: Manivannan Sadhasivam > > Signed-off-by: Jagan Teki > > --- > > Changes for v2: > > - none > > > > board/vamrs/rock960_rk3399/rock960-rk3399.c | 20 ++++++++++++++++++++ > > configs/rock960-rk3399_defconfig | 5 +++++ > > 2 files changed, 25 insertions(+) > > > > diff --git a/board/vamrs/rock960_rk3399/rock960-rk3399.c b/board/vamrs/rock960_rk3399/rock960-rk3399.c > > index 68a127b9ac..98d62e89ca 100644 > > --- a/board/vamrs/rock960_rk3399/rock960-rk3399.c > > +++ b/board/vamrs/rock960_rk3399/rock960-rk3399.c > > @@ -2,3 +2,23 @@ > > /* > > * Copyright (C) 2018 Manivannan Sadhasivam > > */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#ifdef CONFIG_MISC_INIT_R > > +int misc_init_r(void) > > +{ > > + struct rk3399_grf_regs *grf = > > + syscon_get_first_range(ROCKCHIP_SYSCON_GRF); > > + > > + /* BT565 is in 1.8v domain */ > > From where this BT565 comes in? If my understanding was correct, some SSD's to work on this board do require this explicit domain voltage change. Usually it requires GPIO enablement followed by grf voltage domain update [1] but in my case it worked w/o gpio. Maybe I will update this details in the commit message and also in the code. [1] https://github.com/radxa/u-boot/blob/stable-4.4-rockpi4/board/rockchip/evb_rk3399/evb-rk3399.c#L194 Jagan. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Sat, 9 May 2020 22:16:53 +0530 Subject: [PATCH v2 8/8] rockchip: Enable PCIe/M.2 on rock960 board In-Reply-To: <20200503133944.GA28003@Mani-XPS-13-9360> References: <20200430070412.12499-1-jagan@amarulasolutions.com> <20200430070412.12499-9-jagan@amarulasolutions.com> <20200503133944.GA28003@Mani-XPS-13-9360> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, May 3, 2020 at 7:09 PM Manivannan Sadhasivam wrote: > > On Thu, Apr 30, 2020 at 12:34:12PM +0530, Jagan Teki wrote: > > Due to some on board limitation rock960 PCIe > > works only with 1.8V IO domain. > > > > So, this patch enables grf io_sel explicitly > > to make PCIe/M.2 to work. > > > > Cc: Tom Cubie > > Cc: Manivannan Sadhasivam > > Signed-off-by: Jagan Teki > > --- > > Changes for v2: > > - none > > > > board/vamrs/rock960_rk3399/rock960-rk3399.c | 20 ++++++++++++++++++++ > > configs/rock960-rk3399_defconfig | 5 +++++ > > 2 files changed, 25 insertions(+) > > > > diff --git a/board/vamrs/rock960_rk3399/rock960-rk3399.c b/board/vamrs/rock960_rk3399/rock960-rk3399.c > > index 68a127b9ac..98d62e89ca 100644 > > --- a/board/vamrs/rock960_rk3399/rock960-rk3399.c > > +++ b/board/vamrs/rock960_rk3399/rock960-rk3399.c > > @@ -2,3 +2,23 @@ > > /* > > * Copyright (C) 2018 Manivannan Sadhasivam > > */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#ifdef CONFIG_MISC_INIT_R > > +int misc_init_r(void) > > +{ > > + struct rk3399_grf_regs *grf = > > + syscon_get_first_range(ROCKCHIP_SYSCON_GRF); > > + > > + /* BT565 is in 1.8v domain */ > > From where this BT565 comes in? If my understanding was correct, some SSD's to work on this board do require this explicit domain voltage change. Usually it requires GPIO enablement followed by grf voltage domain update [1] but in my case it worked w/o gpio. Maybe I will update this details in the commit message and also in the code. [1] https://github.com/radxa/u-boot/blob/stable-4.4-rockpi4/board/rockchip/evb_rk3399/evb-rk3399.c#L194 Jagan.