2015-11-13 10:50:57

by Eddie Huang (黃智傑)

[permalink] [raw]
Subject: [PATCH] soc: Mediatek: Enable SCPSYS power domain driver by default

If enable Mediatek 8173 SoC, it should also enable power domain
driver. Otherwise access clk subsystem register will fail.

Signed-off-by: Eddie Huang <[email protected]>

---
MT8173 clk driver is enabled by default, but power domain driver
is not. If MM subsystem power on, mm_sel topckgen mux is off,
then access any MM subsystem register will cause system hang. Enable
SCPSYS driver to make sure both MM subsystem power and mm_sel to
on/off together to avoid system hang.

This patch fix current linux-next mt8173-evb boot to shell fail
problem.
---
drivers/soc/mediatek/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index 9d50682..0a4ea80 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -23,6 +23,7 @@ config MTK_PMIC_WRAP
config MTK_SCPSYS
bool "MediaTek SCPSYS Support"
depends on ARCH_MEDIATEK || COMPILE_TEST
+ default ARM64 && ARCH_MEDIATEK
select REGMAP
select MTK_INFRACFG
select PM_GENERIC_DOMAINS if PM
--
1.9.1


2015-11-13 15:59:08

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH] soc: Mediatek: Enable SCPSYS power domain driver by default

Eddie Huang <[email protected]> writes:

> If enable Mediatek 8173 SoC, it should also enable power domain
> driver. Otherwise access clk subsystem register will fail.
>
> Signed-off-by: Eddie Huang <[email protected]>

Tested-by: Kevin Hilman <[email protected]>

This gets the mt8173-evb booting again with arm-soc/for-next and
mainline for me.

I'll let Matthias queue this up and send it with any other fixes for
v4.4-rc1.

Thanks for the fix,

Kevin

P.S. it's curious that nobody caught this basic boot failure before. Is
nobody else testing mainline on this board? or maybe not using the
upstream defconfig?

2015-11-19 20:05:44

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH] soc: Mediatek: Enable SCPSYS power domain driver by default

On Fri, Nov 13, 2015 at 7:59 AM, Kevin Hilman <[email protected]> wrote:
> Eddie Huang <[email protected]> writes:
>
>> If enable Mediatek 8173 SoC, it should also enable power domain
>> driver. Otherwise access clk subsystem register will fail.
>>
>> Signed-off-by: Eddie Huang <[email protected]>
>
> Tested-by: Kevin Hilman <[email protected]>
>
> This gets the mt8173-evb booting again with arm-soc/for-next and
> mainline for me.
>
> I'll let Matthias queue this up and send it with any other fixes for
> v4.4-rc1.

Matthias, this is still broken in arm-soc. Curious if your planning
on sending a fix? If you prefer, with your ack, we can apply directly
to arm-soc/fixes.

Kevin

2015-11-23 18:34:13

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH] soc: Mediatek: Enable SCPSYS power domain driver by default



On 19/11/15 21:05, Kevin Hilman wrote:
> On Fri, Nov 13, 2015 at 7:59 AM, Kevin Hilman <[email protected]> wrote:
>> Eddie Huang <[email protected]> writes:
>>
>>> If enable Mediatek 8173 SoC, it should also enable power domain
>>> driver. Otherwise access clk subsystem register will fail.
>>>
>>> Signed-off-by: Eddie Huang <[email protected]>
>>
>> Tested-by: Kevin Hilman <[email protected]>
>>
>> This gets the mt8173-evb booting again with arm-soc/for-next and
>> mainline for me.
>>
>> I'll let Matthias queue this up and send it with any other fixes for
>> v4.4-rc1.
>
> Matthias, this is still broken in arm-soc. Curious if your planning
> on sending a fix? If you prefer, with your ack, we can apply directly
> to arm-soc/fixes.
>

Sorry for the delay. Please apply it directly.

Acked-by: Matthias Brugger <[email protected]>

Thanks a lot,
Matthias

2015-11-24 18:21:04

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH] soc: Mediatek: Enable SCPSYS power domain driver by default

Matthias Brugger <[email protected]> writes:

> On 19/11/15 21:05, Kevin Hilman wrote:
>> On Fri, Nov 13, 2015 at 7:59 AM, Kevin Hilman <[email protected]> wrote:
>>> Eddie Huang <[email protected]> writes:
>>>
>>>> If enable Mediatek 8173 SoC, it should also enable power domain
>>>> driver. Otherwise access clk subsystem register will fail.
>>>>
>>>> Signed-off-by: Eddie Huang <[email protected]>
>>>
>>> Tested-by: Kevin Hilman <[email protected]>
>>>
>>> This gets the mt8173-evb booting again with arm-soc/for-next and
>>> mainline for me.
>>>
>>> I'll let Matthias queue this up and send it with any other fixes for
>>> v4.4-rc1.
>>
>> Matthias, this is still broken in arm-soc. Curious if your planning
>> on sending a fix? If you prefer, with your ack, we can apply directly
>> to arm-soc/fixes.
>>
>
> Sorry for the delay. Please apply it directly.
>
> Acked-by: Matthias Brugger <[email protected]>
>

Thanks, applied to arm-soc/fixes.

Kevin