Devicetree
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	haitao.suo@bitmain.com, darren.tsao@bitmain.com,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 4/5] pinctrl: Add pinctrl support for BM1880 SoC
Date: Thu, 25 Apr 2019 12:58:25 +0530	[thread overview]
Message-ID: <20190425072825.GA31116@Mani-XPS-13-9360> (raw)
In-Reply-To: <CACRpkdZJweCPs096r6LJJTUSmPYViPDV_rBJ8NWbHzx96xEfsw@mail.gmail.com>

Hi Linus,

On Thu, Apr 25, 2019 at 09:09:28AM +0200, Linus Walleij wrote:
> On Wed, Apr 24, 2019 at 2:03 PM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> 
> > Add pinctrl support for Bitmain BM1880 SoC. The driver only handles
> > pinmuxing as the SoC is not capable of handling pinconf.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> Patch applied, because there is no reason to hold back this clean
> and important infrastructure for the platform. Minor nits can be
> considered for follow-up patches.
> 

Thanks a lot! I will follow up with the cleanup patches.

> > +config PINCTRL_BM1880
> > +       bool "Bitmain BM1880 Pinctrl driver"
> > +       depends on ARCH_BITMAIN
> 
> Could we do:
> 
> depends on ARCH_BITMAIN || COMPILE_TEST
> 
> to get some compiler coverage?
> 

Sure, will do.

> > +       select PINMUX
> > +       help
> > +         Pinctrl driver for Bitmain BM1880 SoC.
> 
> I think the platform always want this driver enabled, so I would either
> select it from arch/arm/mach-foo/Kconfig or add a row like this:
> 
> default ARCH_BITMAIN
> 
> Either defaulting it to 'y'.
> 

Makes sense! Will add ARCH_BITMAIN default to this Kconfig.

> > +       F_nand, F_spi, F_emmc, F_sdio, F_eth0, F_pwm0, F_pwm1, F_pwm2,
> > +       F_pwm3, F_pwm4, F_pwm5, F_pwm6, F_pwm7, F_pwm8, F_pwm9, F_pwm10,
> > +       F_pwm11, F_pwm12, F_pwm13, F_pwm14, F_pwm15, F_pwm16, F_pwm17,
> > +       F_pwm18, F_pwm19, F_pwm20, F_pwm21, F_pwm22, F_pwm23, F_pwm24,
> > +       F_pwm25, F_pwm26, F_pwm27, F_pwm28, F_pwm29, F_pwm30, F_pwm31,
> > +       F_pwm32, F_pwm33, F_pwm34, F_pwm35, F_pwm36, F_pwm37, F_i2c0, F_i2c1,
> 
> 
> Wow 38 individual PWMs. This platform must really have good use for PWM.
> I wonder why they hardcoded so many of them into the hardware...
> 

I don't know the reasoning behind it. This SoC is targeted at AI/ML
usecase, and there are 4 PWM modules in it. Maybe they tried to integrate
motor control usecase with these PWM modules? There is also a RISC-V core
in this SoC, which can perform some real time offloading.

> > +static int __init bm1880_pinctrl_init(void)
> > +{
> > +       return platform_driver_register(&bm1880_pinctrl_driver);
> > +}
> > +arch_initcall(bm1880_pinctrl_init);
> 
> driver_initcall() also known as module_builtin_driver() doesn't work?
> 

It will work, but I want this driver to be probed very soon.

> Do you plan to add GPIO (and interrupts) and pin config to this driver as well?
> 

GPIO support is handled by Designware IP. I have already added DTS
support for it. And you acked those 2 patches ;-)

For pinconfig, sadly there is nothing I can see in the vendor kernel so
assumed that the SoC doesn't support it (yes it is wierd). I will ask
Bitmain folks to be sure.

Thanks,
Mani

> Yours,
> Linus Walleij

  reply	other threads:[~2019-04-25  7:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 12:02 [PATCH 0/5] Add pinctrl support for BM1880 SoC Manivannan Sadhasivam
2019-04-24 12:02 ` [PATCH 1/5] dt-bindings: pinctrl: Add BM1880 pinctrl binding Manivannan Sadhasivam
2019-04-25  7:00   ` Linus Walleij
2019-04-24 12:02 ` [PATCH 2/5] arm64: dts: bitmain: Add pinctrl support for BM1880 SoC Manivannan Sadhasivam
2019-04-25  8:48   ` Linus Walleij
2019-04-24 12:02 ` [PATCH 3/5] arm64: dts: bitmain: Add UART pinctrl support for Sophon Edge Manivannan Sadhasivam
2019-04-25  8:48   ` Linus Walleij
2019-04-24 12:02 ` [PATCH 4/5] pinctrl: Add pinctrl support for BM1880 SoC Manivannan Sadhasivam
2019-04-25  7:09   ` Linus Walleij
2019-04-25  7:28     ` Manivannan Sadhasivam [this message]
2019-04-24 12:02 ` [PATCH 5/5] MAINTAINERS: Add entry for BM1880 pinctrl Manivannan Sadhasivam
2019-04-25  7:10   ` Linus Walleij

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=20190425072825.GA31116@Mani-XPS-13-9360 \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=darren.tsao@bitmain.com \
    --cc=devicetree@vger.kernel.org \
    --cc=haitao.suo@bitmain.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.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