All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Yixun Lan <yixun.lan@amlogic.com>, khilman@baylibre.com
Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: dts: meson: Switch simple-mfd and syscon order
Date: Thu, 26 Jul 2018 16:50:46 +0200	[thread overview]
Message-ID: <c1d08bc7-b868-7781-e69a-0e6bacde5b40@baylibre.com> (raw)
In-Reply-To: <494ff778-1888-7743-3a91-62364431d82e@amlogic.com>

Hi,

On 26/07/2018 16:41, Yixun Lan wrote:
> HI Neil
> 
> On 07/26/2018 10:13 PM, Neil Armstrong wrote:
>> The order between "syscon" and "simple-mfd" is important because in these
>> particular cases, the node needs to be first a "simple-mfd" to expose
>> it's sub-nodes, and later on a "syscon" to permit other nodes to access
>> this register space through the "syscon" mechanism.
>>
> 
> could you explain a bit which specific case that it need compatible
> "simple-mfd" come first? is this a problem in kernel side? because I see
> you have a comment below about problem in U-Boot..

It's not a problem for Linux, but Linux is just an implementation, the device tree
should work on multiple OSs like U-Boot or BSD kernels. We should base ourselves on
the bindings documentation and the Device tree specification to specify the HW.

In this case, we need to switch the order to specify it correctly.

> 
> 
> also while Rob review the mmc-clkc patch, he raise a suggestion to  drop
> "syscon" in drivers/mfd/syscon.c, see [1], will that solve or affect
> your problem?

Rob wants us to drop the "syscon" because he wants us to move all nodes
depending of HHI as subnode, which is impossible for HDMI and the VPU power controller,
they are only "syscon" clients, their own registers are not in HHI.

Neil

> 
> [1]
> https://lkml.kernel.org/r/CAL_Jsq+r+7BaJAPBn3L26sdxATVyDiuC=V3xE+yz0-27q0RJhA@mail.gmail.com
> 
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>> This also has a consequence for U-Boot since the U-Boot DM is much simpler
>> and can only associate a single device to a node, thus here we want these
>> nodes to be an mfd bus to be able to probe the sub-nodes.
>>
>>  arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++--
>>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi  | 4 ++--
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> index 6adc8d3..3f0de9d 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> @@ -342,7 +342,7 @@
>>  			ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
>>  
>>  			sysctrl: system-controller@0 {
>> -				compatible = "amlogic,meson-axg-hhi-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-axg-hhi-sysctrl", "simple-mfd", "syscon";
>>  				reg = <0 0 0 0x400>;
>>  
>>  				clkc: clock-controller {
>> @@ -1180,7 +1180,7 @@
>>  			ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
>>  
>>  			sysctrl_AO: sys-ctrl@0 {
>> -				compatible = "amlogic,meson-axg-ao-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-axg-ao-sysctrl", "simple-mfd", "syscon";
>>  				reg =  <0x0 0x0 0x0 0x100>;
>>  
>>  				clkc_AO: clock-controller {
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> index b8dc4db..d88699f 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> @@ -344,7 +344,7 @@
>>  			ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
>>  
>>  			sysctrl_AO: sys-ctrl@0 {
>> -				compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
>>  				reg =  <0x0 0x0 0x0 0x100>;
>>  
>>  				pwrc_vpu: power-controller-vpu {
>> @@ -431,7 +431,7 @@
>>  			ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
>>  
>>  			sysctrl: system-controller@0 {
>> -				compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
>>  				reg = <0 0 0 0x400>;
>>  			};
>>  
>>
> 


WARNING: multiple messages have this Message-ID (diff)
From: narmstrong@baylibre.com (Neil Armstrong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: dts: meson: Switch simple-mfd and syscon order
Date: Thu, 26 Jul 2018 16:50:46 +0200	[thread overview]
Message-ID: <c1d08bc7-b868-7781-e69a-0e6bacde5b40@baylibre.com> (raw)
In-Reply-To: <494ff778-1888-7743-3a91-62364431d82e@amlogic.com>

Hi,

On 26/07/2018 16:41, Yixun Lan wrote:
> HI Neil
> 
> On 07/26/2018 10:13 PM, Neil Armstrong wrote:
>> The order between "syscon" and "simple-mfd" is important because in these
>> particular cases, the node needs to be first a "simple-mfd" to expose
>> it's sub-nodes, and later on a "syscon" to permit other nodes to access
>> this register space through the "syscon" mechanism.
>>
> 
> could you explain a bit which specific case that it need compatible
> "simple-mfd" come first? is this a problem in kernel side? because I see
> you have a comment below about problem in U-Boot..

It's not a problem for Linux, but Linux is just an implementation, the device tree
should work on multiple OSs like U-Boot or BSD kernels. We should base ourselves on
the bindings documentation and the Device tree specification to specify the HW.

In this case, we need to switch the order to specify it correctly.

> 
> 
> also while Rob review the mmc-clkc patch, he raise a suggestion to  drop
> "syscon" in drivers/mfd/syscon.c, see [1], will that solve or affect
> your problem?

Rob wants us to drop the "syscon" because he wants us to move all nodes
depending of HHI as subnode, which is impossible for HDMI and the VPU power controller,
they are only "syscon" clients, their own registers are not in HHI.

Neil

> 
> [1]
> https://lkml.kernel.org/r/CAL_Jsq+r+7BaJAPBn3L26sdxATVyDiuC=V3xE+yz0-27q0RJhA at mail.gmail.com
> 
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>> This also has a consequence for U-Boot since the U-Boot DM is much simpler
>> and can only associate a single device to a node, thus here we want these
>> nodes to be an mfd bus to be able to probe the sub-nodes.
>>
>>  arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++--
>>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi  | 4 ++--
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> index 6adc8d3..3f0de9d 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> @@ -342,7 +342,7 @@
>>  			ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
>>  
>>  			sysctrl: system-controller at 0 {
>> -				compatible = "amlogic,meson-axg-hhi-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-axg-hhi-sysctrl", "simple-mfd", "syscon";
>>  				reg = <0 0 0 0x400>;
>>  
>>  				clkc: clock-controller {
>> @@ -1180,7 +1180,7 @@
>>  			ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
>>  
>>  			sysctrl_AO: sys-ctrl at 0 {
>> -				compatible = "amlogic,meson-axg-ao-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-axg-ao-sysctrl", "simple-mfd", "syscon";
>>  				reg =  <0x0 0x0 0x0 0x100>;
>>  
>>  				clkc_AO: clock-controller {
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> index b8dc4db..d88699f 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> @@ -344,7 +344,7 @@
>>  			ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
>>  
>>  			sysctrl_AO: sys-ctrl at 0 {
>> -				compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
>>  				reg =  <0x0 0x0 0x0 0x100>;
>>  
>>  				pwrc_vpu: power-controller-vpu {
>> @@ -431,7 +431,7 @@
>>  			ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
>>  
>>  			sysctrl: system-controller at 0 {
>> -				compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
>>  				reg = <0 0 0 0x400>;
>>  			};
>>  
>>
> 

WARNING: multiple messages have this Message-ID (diff)
From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH] arm64: dts: meson: Switch simple-mfd and syscon order
Date: Thu, 26 Jul 2018 16:50:46 +0200	[thread overview]
Message-ID: <c1d08bc7-b868-7781-e69a-0e6bacde5b40@baylibre.com> (raw)
In-Reply-To: <494ff778-1888-7743-3a91-62364431d82e@amlogic.com>

Hi,

On 26/07/2018 16:41, Yixun Lan wrote:
> HI Neil
> 
> On 07/26/2018 10:13 PM, Neil Armstrong wrote:
>> The order between "syscon" and "simple-mfd" is important because in these
>> particular cases, the node needs to be first a "simple-mfd" to expose
>> it's sub-nodes, and later on a "syscon" to permit other nodes to access
>> this register space through the "syscon" mechanism.
>>
> 
> could you explain a bit which specific case that it need compatible
> "simple-mfd" come first? is this a problem in kernel side? because I see
> you have a comment below about problem in U-Boot..

It's not a problem for Linux, but Linux is just an implementation, the device tree
should work on multiple OSs like U-Boot or BSD kernels. We should base ourselves on
the bindings documentation and the Device tree specification to specify the HW.

In this case, we need to switch the order to specify it correctly.

> 
> 
> also while Rob review the mmc-clkc patch, he raise a suggestion to  drop
> "syscon" in drivers/mfd/syscon.c, see [1], will that solve or affect
> your problem?

Rob wants us to drop the "syscon" because he wants us to move all nodes
depending of HHI as subnode, which is impossible for HDMI and the VPU power controller,
they are only "syscon" clients, their own registers are not in HHI.

Neil

> 
> [1]
> https://lkml.kernel.org/r/CAL_Jsq+r+7BaJAPBn3L26sdxATVyDiuC=V3xE+yz0-27q0RJhA at mail.gmail.com
> 
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>> This also has a consequence for U-Boot since the U-Boot DM is much simpler
>> and can only associate a single device to a node, thus here we want these
>> nodes to be an mfd bus to be able to probe the sub-nodes.
>>
>>  arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++--
>>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi  | 4 ++--
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> index 6adc8d3..3f0de9d 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
>> @@ -342,7 +342,7 @@
>>  			ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
>>  
>>  			sysctrl: system-controller at 0 {
>> -				compatible = "amlogic,meson-axg-hhi-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-axg-hhi-sysctrl", "simple-mfd", "syscon";
>>  				reg = <0 0 0 0x400>;
>>  
>>  				clkc: clock-controller {
>> @@ -1180,7 +1180,7 @@
>>  			ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
>>  
>>  			sysctrl_AO: sys-ctrl at 0 {
>> -				compatible = "amlogic,meson-axg-ao-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-axg-ao-sysctrl", "simple-mfd", "syscon";
>>  				reg =  <0x0 0x0 0x0 0x100>;
>>  
>>  				clkc_AO: clock-controller {
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> index b8dc4db..d88699f 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> @@ -344,7 +344,7 @@
>>  			ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
>>  
>>  			sysctrl_AO: sys-ctrl at 0 {
>> -				compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
>>  				reg =  <0x0 0x0 0x0 0x100>;
>>  
>>  				pwrc_vpu: power-controller-vpu {
>> @@ -431,7 +431,7 @@
>>  			ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
>>  
>>  			sysctrl: system-controller at 0 {
>> -				compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
>> +				compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
>>  				reg = <0 0 0 0x400>;
>>  			};
>>  
>>
> 

  reply	other threads:[~2018-07-26 14:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 14:13 [PATCH] arm64: dts: meson: Switch simple-mfd and syscon order Neil Armstrong
2018-07-26 14:13 ` Neil Armstrong
2018-07-26 14:13 ` Neil Armstrong
2018-07-26 14:41 ` Yixun Lan
2018-07-26 14:41   ` Yixun Lan
2018-07-26 14:41   ` Yixun Lan
2018-07-26 14:50   ` Neil Armstrong [this message]
2018-07-26 14:50     ` Neil Armstrong
2018-07-26 14:50     ` Neil Armstrong
2018-09-13  4:07     ` Chen-Yu Tsai
2018-09-13  4:07       ` Chen-Yu Tsai
2018-09-13  4:07       ` Chen-Yu Tsai
2018-07-27  6:03 ` Lee Jones
2018-07-27  6:03   ` Lee Jones
2018-07-27  6:03   ` Lee Jones
2018-09-13  3:59 ` Kevin Hilman
2018-09-13  3:59   ` Kevin Hilman
2018-09-13  3:59   ` Kevin Hilman
2018-09-13  4:20   ` Kevin Hilman
2018-09-13  4:20     ` Kevin Hilman
2018-09-13  4:20     ` Kevin Hilman
2018-09-13  7:04     ` Neil Armstrong
2018-09-13  7:04       ` Neil Armstrong
2018-09-13  7:04       ` Neil Armstrong

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=c1d08bc7-b868-7781-e69a-0e6bacde5b40@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yixun.lan@amlogic.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.