[1/4] ARM: multi_v7_defconfig: Enable common Rockchip devices/busses
diff mbox

Message ID 1441570566-14001-2-git-send-email-sjoerd.simons@collabora.co.uk
State New
Headers show

Commit Message

Sjoerd Simons Sept. 6, 2015, 8:16 p.m. UTC
Enable Rockchip I2C, SPI, PWM, thermal drivers.

Builtin are:
 * I2C as it often controls the pmic.
 * Thermal, prevent thermal damage.

SPI and PWM configured as modules

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---

 arch/arm/configs/multi_v7_defconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Javier Martinez Canillas Sept. 7, 2015, 9:26 a.m. UTC | #1
Hello Sjoerd,

On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
> Enable Rockchip I2C, SPI, PWM, thermal drivers.
> 
> Builtin are:
>  * I2C as it often controls the pmic.

Having I2C as a module will cause more probe deferrals due missing
regulators and slow down the boot but it should not cause issues.
Or am I missing something?

In fact, I think even the PMIC could be built as a module.

But I don't have a strong opinion on this so patch looks good:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
Sjoerd Simons Sept. 7, 2015, 10:24 a.m. UTC | #2
On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
> Hello Sjoerd,
> 
> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
> > Enable Rockchip I2C, SPI, PWM, thermal drivers.
> > 
> > Builtin are:
> >  * I2C as it often controls the pmic.
> 
> Having I2C as a module will cause more probe deferrals due missing
> regulators and slow down the boot but it should not cause issues.
> Or am I missing something?
> 
> In fact, I think even the PMIC could be built as a module.

It could in principle. However as a lot of other drivers do need the
regulators provided by the pmic, they'll be deferred until that driver
is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
boot to an NFS rootfs without using an initramfs. 

> But I don't have a strong opinion on this so patch looks good:
> 
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> Best regards,
Javier Martinez Canillas Sept. 7, 2015, 10:38 a.m. UTC | #3
Hello Sjoerd,

On 09/07/2015 12:24 PM, Sjoerd Simons wrote:
> On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
>> Hello Sjoerd,
>>
>> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
>>> Enable Rockchip I2C, SPI, PWM, thermal drivers.
>>>
>>> Builtin are:
>>>  * I2C as it often controls the pmic.
>>
>> Having I2C as a module will cause more probe deferrals due missing
>> regulators and slow down the boot but it should not cause issues.
>> Or am I missing something?
>>
>> In fact, I think even the PMIC could be built as a module.
> 
> It could in principle. However as a lot of other drivers do need the
> regulators provided by the pmic, they'll be deferred until that driver
> is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
> boot to an NFS rootfs without using an initramfs. 
>

Right, not needing an initramfs is certainly a good reason. If you could
add something like that in the commit message of patches 1/4 and 2/4 that
would be great.

Best regards,
Andy Yan Sept. 7, 2015, 10:55 a.m. UTC | #4
Hi
     There are also many other devices like display and mmc and even
the cpu(if the cpu want run a high frequency when boot up)need to
get power supply from PMIC, so it is better to load PMIC as early as
possible.Built-in is a better choice.

On 2015?09?07? 18:24, Sjoerd Simons wrote:
> On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
>> Hello Sjoerd,
>>
>> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
>>> Enable Rockchip I2C, SPI, PWM, thermal drivers.
>>>
>>> Builtin are:
>>>   * I2C as it often controls the pmic.
>> Having I2C as a module will cause more probe deferrals due missing
>> regulators and slow down the boot but it should not cause issues.
>> Or am I missing something?
>>
>> In fact, I think even the PMIC could be built as a module.
> It could in principle. However as a lot of other drivers do need the
> regulators provided by the pmic, they'll be deferred until that driver
> is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
> boot to an NFS rootfs without using an initramfs.
>
>> But I don't have a strong opinion on this so patch looks good:
>>
>> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> Best regards,
Javier Martinez Canillas Sept. 7, 2015, 11:06 a.m. UTC | #5
Hello Andy,

On 09/07/2015 12:55 PM, Andy Yan wrote:
> Hi
>     There are also many other devices like display and mmc and even
> the cpu(if the cpu want run a high frequency when boot up)need to
> get power supply from PMIC, so it is better to load PMIC as early as
> possible.Built-in is a better choice.
>

Please don't top post, it makes following the conversation much harder.

Yes, I know that many devices needs the regulators provided by the PMIC
but that it's also true for all the regulators in all the PMICs for all
the boards supported by multi_v7_defconfig.

So to keep the kernel binary on a reasonable size, the current multi_v7
policy is to enable as much as possible as a module so just saying that
many other devices are using regulators from this PMIC is not enough.

Saying that it will allow mounting a NFS rootfs without an initramfs as
Sjoerd said is a much better justification IMHO.

Best regards,
Thierry Reding Sept. 7, 2015, 11:27 a.m. UTC | #6
On Mon, Sep 07, 2015 at 12:38:08PM +0200, Javier Martinez Canillas wrote:
> Hello Sjoerd,
> 
> On 09/07/2015 12:24 PM, Sjoerd Simons wrote:
> > On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
> >> Hello Sjoerd,
> >>
> >> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
> >>> Enable Rockchip I2C, SPI, PWM, thermal drivers.
> >>>
> >>> Builtin are:
> >>>  * I2C as it often controls the pmic.
> >>
> >> Having I2C as a module will cause more probe deferrals due missing
> >> regulators and slow down the boot but it should not cause issues.
> >> Or am I missing something?
> >>
> >> In fact, I think even the PMIC could be built as a module.
> > 
> > It could in principle. However as a lot of other drivers do need the
> > regulators provided by the pmic, they'll be deferred until that driver
> > is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
> > boot to an NFS rootfs without using an initramfs. 
> >
> 
> Right, not needing an initramfs is certainly a good reason. If you could
> add something like that in the commit message of patches 1/4 and 2/4 that
> would be great.

I don't know. multi_v7_defconfig is primarily useful as a means to
quickly get a configuration that has most drivers enabled that most ARM
SoCs need. As such it's more of a convenience for build testing rather
than using it for booting a device.

I don't think the focus should be on optimizing for boot speed. Rather
if you do want to optimize for a device going through the trouble of
setting up an initial ramdisk isn't all that complicated. Even more so
because if you build drivers into the kernel and those drivers happen
to require firmware then people will be required to setup initial
ramdisks anyway.

Building too many drivers into the kernel has in the past often lead to
problems where all of a sudden the kernel became too big to fit into any
reasonably sized region of memory and cause all sorts of weird failures
in boot farms. Building everything as modules has the advantage that the
size of the zImage itself doesn't vary much, hence has less of a chance
to break boot farms.

There are quite a few drivers in multi_v7_defconfig that I suspect could
be built as loadable modules to decrease the size of the images that are
currently generated.

I understand that not everybody likes the additional ramdisk but, in my
opinion, that's what SoC-specific default configurations are good for.
We can use those to provide a base for developers where the focus is
ease of testability.

Thierry

Patch
diff mbox

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 36aa6e3..25a1d574 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -302,6 +302,7 @@  CONFIG_I2C_GPIO=m
 CONFIG_I2C_EXYNOS5=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_I2C_RIIC=y
+CONFIG_I2C_RK3X=y
 CONFIG_I2C_S3C2410=y
 CONFIG_I2C_SH_MOBILE=y
 CONFIG_I2C_SIRF=y
@@ -318,6 +319,7 @@  CONFIG_SPI_DAVINCI=y
 CONFIG_SPI_OMAP24XX=y
 CONFIG_SPI_ORION=y
 CONFIG_SPI_PL022=y
+CONFIG_SPI_ROCKCHIP=m
 CONFIG_SPI_RSPI=y
 CONFIG_SPI_S3C64XX=m
 CONFIG_SPI_SH_MSIOF=m
@@ -365,6 +367,7 @@  CONFIG_SENSORS_LM95245=y
 CONFIG_SENSORS_NTC_THERMISTOR=m
 CONFIG_THERMAL=y
 CONFIG_CPU_THERMAL=y
+CONFIG_ROCKCHIP_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
 CONFIG_DAVINCI_WATCHDOG=m
@@ -642,6 +645,7 @@  CONFIG_PWM=y
 CONFIG_PWM_ATMEL=m
 CONFIG_PWM_ATMEL_TCB=m
 CONFIG_PWM_RENESAS_TPU=y
+CONFIG_PWM_ROCKCHIP=m
 CONFIG_PWM_SAMSUNG=m
 CONFIG_PWM_SUN4I=y
 CONFIG_PWM_TEGRA=y