From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933446AbcATAzX (ORCPT ); Tue, 19 Jan 2016 19:55:23 -0500 Received: from lucky1.263xmail.com ([211.157.147.132]:37709 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933011AbcATAzO (ORCPT ); Tue, 19 Jan 2016 19:55:14 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <6ffc1a5528308bc8a8ccb6c203a1124b> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] mmc: dw_mmc-rockchip: add pinctrl support To: Caesar Wang , Heiko Stuebner References: <1453197165-20194-1-git-send-email-shawn.lin@rock-chips.com> <7857448.fZE0EdmvdR@phil> <569E18E4.7050509@rock-chips.com> <569E21C3.2080606@gmail.com> Cc: shawn.lin@rock-chips.com, Jaehoon Chung , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org From: Shawn Lin Message-ID: <569EDADC.4020302@rock-chips.com> Date: Wed, 20 Jan 2016 08:54:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <569E21C3.2080606@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/19 19:45, Caesar Wang wrote: > > 在 2016年01月19日 19:07, Shawn Lin 写道: >> On 2016/1/19 18:07, Heiko Stuebner wrote: >>> Hi Shawn, >>> >>> Am Dienstag, 19. Januar 2016, 17:52:45 schrieb Shawn Lin: >>>> We find rk3368 fail to enumerate sd card since >>>> the default state is gpio function. Meahwhile, lots of >>>> rockchip platform dts file assign pinctrl to dw_mmc but actually >>>> dw_mmc never use it. Fortunately, those platforms' default io >>>> state is sdmmc function, but no always right for all. >>>> >>>> Cc: Heiko Stuebner >>>> Signed-off-by: Shawn Lin >>> >>> I do believe any issue you see, must come from somewhere else, >>> because the >>> driver-core does in drivers/base/dd.c really_probe(): >>> pinctrl_bind_pins() >> >> yes, pinctrl_bind_pins does turn pinctrl state. But I try debug a little >> more and seems somewhere else switch the state before dw_mmc probe. >> Now I *guess* that may relate to our ATF or MCU firmware since >> rk3368's sdmmc io can also be used as mcu_jtag for system debug. I >> need to double check that point, thanks. >> > > Yep, maybe that's related to the firmware setting. > I guess you can repro this issue on RK3368 platform. > At least until now, the RK3036, RK3288....that's work well. > Hi Caesar, Then I check this issue with MCU firmware guys and it does force pin setting into mcu_jtag function。 Now I can see only 3368 apply MCU firmware, right? Another thing, seems old version firmware didn't break the sdmmc function. I think it's better to slove this problem in firmware side, not Linux. So, abandon this patch! > >> Hi Caesar, >> does your patch able to consider adding SDMMC/CPU_JTAG/MCU_JTAG >> managment for rk3368 as well? >> > > That's no related, I will add the sdmmc node and check it on tomorrow > if the time can be availabled. > > >>> which in turn already does the needed pinctrl state handling. >>> >>> So that default-state should be set up even before the dwmmc probe >>> function >>> is called. >>> >>> The sharing between sdmmc and uart2 pins is the same on the rk3036 >>> and so >>> far Caesar seems to have been able to switch the pin-state to sdmmc >>> without >>> touching the dw_mmc driver itself. >>> > > Yep, that's working on rk3036 kylin board. > > > --- > Thanks, > Caesar > > > -- Best Regards Shawn Lin