From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Wang Subject: Re: porting 6797 to upstream kernel Date: Sun, 19 Aug 2018 04:21:31 +0800 Message-ID: <1534623691.31978.86.camel@mtkswgap22> References: <726c100d-945e-3081-1090-f23364b29f5c@zoho.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <726c100d-945e-3081-1090-f23364b29f5c-ytc+IHgoah0@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Saber Rezvani Cc: "Mr. Matthias Brugger" , amirhosseinkh-gKUI0J7JwL7FRk3jFJgznQ@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-mediatek@lists.infradead.org Hi, Saber On Fri, 2018-08-17 at 20:12 +0430, Saber Rezvani wrote: > Hi, > > > My friend and I have decided to port Mediatek 6797 board pinctrl to > upstream kernel (regarding to our talked to Matthias). As our discussion > with Matthias, we are poring the driver based on 7622 pinctrl style in > upstream kernel. > It's really nice to see more people have interests on mediatek soc. It is actually feasible that mt6797 ported to mt7622 pinctrl style driver. In fact, mt7622 driver should be generic enough to allow any mediatek soc to be ported to with the driver style even though a certain soc owns the irregular register layout. > Right now we have totally understood the 6797 and 7622 pinctrl drivers, > but we do not know where we can find the data of the following data > structures: > > > *) struct mtk_pin_field_calc if you have hardware datasheet, it'd be easy to do this part. otherwise, being interpreted from vendor driver is a little annoy but doable, I think. the structure needs to be filled by the information register field per pin has about where the register offset it is located at, and information required to identify the same field for the neighbor pin. > *) pinctrl_pin_desc > > I used to fill the structure with pin number and the name of ballout, > As our search on BSP repository, branch name: helio-x20 we figured out > there are some file as following: > > drivers/misc/mediatek/gpio/mt6797/gpio_cfg.h > I am not actually sure what content it has, but I guess it the result generated by a vendor tool. > arch/arm64/boot/dts/include/dt-bindings/pinctrl/mt6797-pinfunc.h it provides pin and its mode the pin can support and can be switched to. it would be useful and good to develop pinctrl_pin_desc and and the mode mt6797_xxx_funcs would imply as [1] have that will be registered into the generic core lay. [1] for example with mt7622 pinctrl https://elixir.bootlin.com/linux/v4.18-rc8/source/drivers/pinctrl/mediatek/pinctrl-mt7622.c#L437 > > But we have not yet known whether these data is useful or not, and if > Yes, how we can transport them in 7622 styles. > > > > Best regards, > > Saber > > >