diff mbox

[v3,2/2] documentation: Fix pinctrl documentation for Meson8 / Meson8b

Message ID 1458724440-32228-3-git-send-email-carlo@caione.org (mailing list archive)
State New, archived
Headers show

Commit Message

Carlo Caione March 23, 2016, 9:14 a.m. UTC
From: Carlo Caione <carlo@endlessm.com>

Fix pin controller documentation introducing the new compatibles for
the pinctrl drivers specific for aobus / cbus.

This is needed because we have changed the pin controller driver: we
have now a single specialized pinctrl driver / compatible for each bus
the controller is attached to, instead of one single driver dealing with
all the controllers we have on different buses.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
---
 .../devicetree/bindings/pinctrl/meson,pinctrl.txt  | 38 ++++------------------
 1 file changed, 7 insertions(+), 31 deletions(-)

Comments

Andreas Färber March 23, 2016, 10:34 a.m. UTC | #1
Am 23.03.2016 um 10:14 schrieb Carlo Caione:
> From: Carlo Caione <carlo@endlessm.com>
> 
> Fix pin controller documentation introducing the new compatibles for
> the pinctrl drivers specific for aobus / cbus.
> 
> This is needed because we have changed the pin controller driver: we
> have now a single specialized pinctrl driver / compatible for each bus
> the controller is attached to, instead of one single driver dealing with
> all the controllers we have on different buses.
> 
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> ---
>  .../devicetree/bindings/pinctrl/meson,pinctrl.txt  | 38 ++++------------------
>  1 file changed, 7 insertions(+), 31 deletions(-)

Reviewed-by: Andreas Färber <afaerber@suse.de>

Thanks,
Andreas
Rob Herring March 23, 2016, 3:20 p.m. UTC | #2
On Wed, Mar 23, 2016 at 10:14:00AM +0100, Carlo Caione wrote:
> From: Carlo Caione <carlo@endlessm.com>
> 
> Fix pin controller documentation introducing the new compatibles for
> the pinctrl drivers specific for aobus / cbus.
> 
> This is needed because we have changed the pin controller driver: we
> have now a single specialized pinctrl driver / compatible for each bus
> the controller is attached to, instead of one single driver dealing with
> all the controllers we have on different buses.

Aren't you breaking compatibility with old DTs here? If so, you need to 
be clear that you are and why you think that is okay.
 
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> ---
>  .../devicetree/bindings/pinctrl/meson,pinctrl.txt  | 38 ++++------------------
>  1 file changed, 7 insertions(+), 31 deletions(-)
Carlo Caione March 23, 2016, 4:04 p.m. UTC | #3
On Wed, Mar 23, 2016 at 4:20 PM, Rob Herring <robh@kernel.org> wrote:
> On Wed, Mar 23, 2016 at 10:14:00AM +0100, Carlo Caione wrote:
>> From: Carlo Caione <carlo@endlessm.com>
>>
>> Fix pin controller documentation introducing the new compatibles for
>> the pinctrl drivers specific for aobus / cbus.
>>
>> This is needed because we have changed the pin controller driver: we
>> have now a single specialized pinctrl driver / compatible for each bus
>> the controller is attached to, instead of one single driver dealing with
>> all the controllers we have on different buses.
>
> Aren't you breaking compatibility with old DTs here? If so, you need to
> be clear that you are and why you think that is okay.

Rob,
It's a bit too late to worry about breaking compatibility since the
driver changes are already landed in mainline and currently Meson8 and
Meson8b platforms are broken because of this.
You can read the whole discussion here [1] and here [2]. Driver and DT
changes were supposed to go in together but a bit of general
misunderstanding caused this issue.

We decided to break compatibility with the old DTs since the the
platform support is still in the really early stage so I really don't
think this is going to cause any problem and we have a lot of good
reasons to split the pinctrl driver. First of all it makes sense from
the hardware prospective, since we actually have two different pin
controllers on two different buses. Splitting the driver allows us to
introduce in the DTS both CBUS and AOBUS as simple buses. We need a
clear description of the two buses in the DTS since several devices
have a different register mapping depending on which bus they are
attached to. Also as you can read here [3] we want to map the whole
CBUS as a syscon device to be able to access several registers
scattered inside CBUS.

As Andreas pointed out gxbb arch already models CBUS and AOBUS as
simple-buses so we could reuse this driver also for that architecture.

Thanks,

[1] http://www.spinics.net/lists/arm-kernel/msg489730.html
[2] http://www.spinics.net/lists/devicetree/msg116771.html
[3] http://www.spinics.net/lists/devicetree/msg115019.html
Rob Herring March 25, 2016, 1:40 p.m. UTC | #4
On Wed, Mar 23, 2016 at 05:04:19PM +0100, Carlo Caione wrote:
> On Wed, Mar 23, 2016 at 4:20 PM, Rob Herring <robh@kernel.org> wrote:
> > On Wed, Mar 23, 2016 at 10:14:00AM +0100, Carlo Caione wrote:
> >> From: Carlo Caione <carlo@endlessm.com>
> >>
> >> Fix pin controller documentation introducing the new compatibles for
> >> the pinctrl drivers specific for aobus / cbus.
> >>
> >> This is needed because we have changed the pin controller driver: we
> >> have now a single specialized pinctrl driver / compatible for each bus
> >> the controller is attached to, instead of one single driver dealing with
> >> all the controllers we have on different buses.
> >
> > Aren't you breaking compatibility with old DTs here? If so, you need to
> > be clear that you are and why you think that is okay.
> 
> Rob,
> It's a bit too late to worry about breaking compatibility since the
> driver changes are already landed in mainline and currently Meson8 and
> Meson8b platforms are broken because of this.
> You can read the whole discussion here [1] and here [2]. Driver and DT
> changes were supposed to go in together but a bit of general
> misunderstanding caused this issue.

My comment was the commit message needs to be clear that you are 
breaking compatibility. That was true before part of this went in. 
 
> We decided to break compatibility with the old DTs since the the
> platform support is still in the really early stage so I really don't
> think this is going to cause any problem and we have a lot of good
> reasons to split the pinctrl driver. First of all it makes sense from
> the hardware prospective, since we actually have two different pin
> controllers on two different buses. Splitting the driver allows us to
> introduce in the DTS both CBUS and AOBUS as simple buses. We need a
> clear description of the two buses in the DTS since several devices
> have a different register mapping depending on which bus they are
> attached to. Also as you can read here [3] we want to map the whole
> CBUS as a syscon device to be able to access several registers
> scattered inside CBUS.

From a quick glance, you mainly needed to keep the old compatible string 
in the driver and just ignore ao-bank. Then only what depended on 
ao-bank would break. Maybe that's less broken than completely breaking 
the pinctrl driver...

Anyway, merge the fix:

Acked-by: Rob Herring <robh@kernel.org>

Rob
Linus Walleij March 31, 2016, 9:38 a.m. UTC | #5
On Wed, Mar 23, 2016 at 10:14 AM, Carlo Caione <carlo@caione.org> wrote:

> From: Carlo Caione <carlo@endlessm.com>
>
> Fix pin controller documentation introducing the new compatibles for
> the pinctrl drivers specific for aobus / cbus.
>
> This is needed because we have changed the pin controller driver: we
> have now a single specialized pinctrl driver / compatible for each bus
> the controller is attached to, instead of one single driver dealing with
> all the controllers we have on different buses.
>
> Signed-off-by: Carlo Caione <carlo@endlessm.com>

This patch applied to the pinctrl tree with the tags.

It is just documentation so it's obviously not an urgent
fix.

Please merge patch 1/2 through the ARM SoC tree.

Yours,
Linus Walleij
Carlo Caione March 31, 2016, 9:41 a.m. UTC | #6
On Thu, Mar 31, 2016 at 11:38 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Wed, Mar 23, 2016 at 10:14 AM, Carlo Caione <carlo@caione.org> wrote:
>
>> From: Carlo Caione <carlo@endlessm.com>
>>
>> Fix pin controller documentation introducing the new compatibles for
>> the pinctrl drivers specific for aobus / cbus.
>>
>> This is needed because we have changed the pin controller driver: we
>> have now a single specialized pinctrl driver / compatible for each bus
>> the controller is attached to, instead of one single driver dealing with
>> all the controllers we have on different buses.
>>
>> Signed-off-by: Carlo Caione <carlo@endlessm.com>
>
> This patch applied to the pinctrl tree with the tags.
>
> It is just documentation so it's obviously not an urgent
> fix.
>
> Please merge patch 1/2 through the ARM SoC tree.

Hey Linus,
I already submitted DT fix and Documentation in the PR to arm-soc here
http://www.spinics.net/lists/arm-kernel/msg493680.html

Cheers,
Linus Walleij March 31, 2016, 9:42 a.m. UTC | #7
On Thu, Mar 31, 2016 at 11:41 AM, Carlo Caione <carlo@caione.org> wrote:
> On Thu, Mar 31, 2016 at 11:38 AM, Linus Walleij

> Hey Linus,
> I already submitted DT fix and Documentation in the PR to arm-soc here
> http://www.spinics.net/lists/arm-kernel/msg493680.html

Aha OK I will take the doc fix out of my tree then and expect
this to be fixed through ARM SoC.

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
index 3f6a524..32f4a2d 100644
--- a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
@@ -1,13 +1,16 @@ 
 == Amlogic Meson pinmux controller ==
 
 Required properties for the root node:
- - compatible: "amlogic,meson8-pinctrl" or "amlogic,meson8b-pinctrl"
+ - compatible: one of "amlogic,meson8-cbus-pinctrl"
+		      "amlogic,meson8b-cbus-pinctrl"
+		      "amlogic,meson8-aobus-pinctrl"
+		      "amlogic,meson8b-aobus-pinctrl"
  - reg: address and size of registers controlling irq functionality
 
 === GPIO sub-nodes ===
 
-The 2 power domains of the controller (regular and always-on) are
-represented as sub-nodes and each of them acts as a GPIO controller.
+The GPIO bank for the controller is represented as a sub-node and it acts as a
+GPIO controller.
 
 Required properties for sub-nodes are:
  - reg: should contain address and size for mux, pull-enable, pull and
@@ -18,10 +21,6 @@  Required properties for sub-nodes are:
  - gpio-controller: identifies the node as a gpio controller
  - #gpio-cells: must be 2
 
-Valid sub-node names are:
- - "banks" for the regular domain
- - "ao-bank" for the always-on domain
-
 === Other sub-nodes ===
 
 Child nodes without the "gpio-controller" represent some desired
@@ -45,7 +44,7 @@  pinctrl-bindings.txt
 === Example ===
 
 	pinctrl: pinctrl@c1109880 {
-		compatible = "amlogic,meson8-pinctrl";
+		compatible = "amlogic,meson8-cbus-pinctrl";
 		reg = <0xc1109880 0x10>;
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -61,15 +60,6 @@  pinctrl-bindings.txt
 			#gpio-cells = <2>;
                };
 
-		gpio_ao: ao-bank@c1108030 {
-			reg = <0xc8100014 0x4>,
-			      <0xc810002c 0x4>,
-			      <0xc8100024 0x8>;
-			reg-names = "mux", "pull", "gpio";
-			gpio-controller;
-			#gpio-cells = <2>;
-		};
-
 		nand {
 			mux {
 				groups = "nand_io", "nand_io_ce0", "nand_io_ce1",
@@ -79,18 +69,4 @@  pinctrl-bindings.txt
 				function = "nand";
 			};
 		};
-
-		uart_ao_a {
-			mux {
-				groups = "uart_tx_ao_a", "uart_rx_ao_a",
-					 "uart_cts_ao_a", "uart_rts_ao_a";
-				function = "uart_ao";
-			};
-
-			conf {
-				pins = "GPIOAO_0", "GPIOAO_1",
-				       "GPIOAO_2", "GPIOAO_3";
-				bias-disable;
-			};
-		};
 	};