public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Saber Rezvani <irsaber-ytc+IHgoah0@public.gmane.org>
Cc: "Mr. Matthias Brugger"
	<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	amirhosseinkh-gKUI0J7JwL7FRk3jFJgznQ@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: porting 6797 to upstream kernel
Date: Sun, 19 Aug 2018 04:21:31 +0800	[thread overview]
Message-ID: <1534623691.31978.86.camel@mtkswgap22> (raw)
In-Reply-To: <726c100d-945e-3081-1090-f23364b29f5c-ytc+IHgoah0@public.gmane.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
> 
> 
> 

      parent reply	other threads:[~2018-08-18 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17 15:42 porting 6797 to upstream kernel Saber Rezvani
     [not found] ` <726c100d-945e-3081-1090-f23364b29f5c-ytc+IHgoah0@public.gmane.org>
2018-08-18 20:21   ` Sean Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1534623691.31978.86.camel@mtkswgap22 \
    --to=sean.wang-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=amirhosseinkh-gKUI0J7JwL7FRk3jFJgznQ@public.gmane.org \
    --cc=irsaber-ytc+IHgoah0@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox