diff mbox series

[2/2] arm64: dts: ti: k3-am65: Add pinctrl regions

Message ID 20181108112647.7205-3-vigneshr@ti.com
State New
Headers show
Series [1/2] dt-bindings: pinctrl: k3-am6: Introduce pinmux definitions | expand

Commit Message

Vignesh Raghavendra Nov. 8, 2018, 11:26 a.m. UTC
From: Tero Kristo <t-kristo@ti.com>


Add pinctrl regions for the main and wkup mmr.

The range for main pinctrl region contains a gap
at offset 0x2e4, and because of this, the pinctrl
range is split into two sections.

Signed-off-by: Tero Kristo <t-kristo@ti.com>

Signed-off-by: Vignesh R <vigneshr@ti.com>

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi   | 16 ++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi |  8 ++++++++
 arch/arm64/boot/dts/ti/k3-am65.dtsi        |  1 +
 3 files changed, 25 insertions(+)

-- 
2.19.1

Comments

Nishanth Menon Nov. 8, 2018, 1:47 p.m. UTC | #1
On 16:56-20181108, Vignesh R wrote:
> diff --git a/arch/arm64/boot/dts/ti/k3-am65.dtsi b/arch/arm64/boot/dts/ti/k3-am65.dtsi

> index 3d4bf369d030..873dca1d0813 100644

> --- a/arch/arm64/boot/dts/ti/k3-am65.dtsi

> +++ b/arch/arm64/boot/dts/ti/k3-am65.dtsi

> @@ -8,6 +8,7 @@

>  #include <dt-bindings/gpio/gpio.h>

>  #include <dt-bindings/interrupt-controller/irq.h>

>  #include <dt-bindings/interrupt-controller/arm-gic.h>

> +#include <dt-bindings/pinctrl/k3-am65.h>

>  

>  / {

>  	model = "Texas Instruments K3 AM654 SoC";

> -- 

> 2.19.1

> 


Where is this used? Could we mux the uart console that we are using?
will be good to see an example of usage.

-- 
Regards,
Nishanth Menon
Tony Lindgren Nov. 8, 2018, 3:13 p.m. UTC | #2
* Nishanth Menon <nm@ti.com> [181108 13:48]:
> On 16:56-20181108, Vignesh R wrote:

> > diff --git a/arch/arm64/boot/dts/ti/k3-am65.dtsi b/arch/arm64/boot/dts/ti/k3-am65.dtsi

> > index 3d4bf369d030..873dca1d0813 100644

> > --- a/arch/arm64/boot/dts/ti/k3-am65.dtsi

> > +++ b/arch/arm64/boot/dts/ti/k3-am65.dtsi

> > @@ -8,6 +8,7 @@

> >  #include <dt-bindings/gpio/gpio.h>

> >  #include <dt-bindings/interrupt-controller/irq.h>

> >  #include <dt-bindings/interrupt-controller/arm-gic.h>

> > +#include <dt-bindings/pinctrl/k3-am65.h>

> >  

> >  / {

> >  	model = "Texas Instruments K3 AM654 SoC";

> > -- 

> > 2.19.1

> > 

> 

> Where is this used? Could we mux the uart console that we are using?

> will be good to see an example of usage.


Yes please.

And please add the SoC specific macro for the pins in a format
that makes the pinconf and pinmux options separate parameters
for the macro where the usage becomes something like:

AM65X_IOPAD(0x1234, PIN_INPUT_PULLUP, 0)

The above  0 is just the mux mode number in the example.
So no more need to use MUX_MODE0 define to redefine a number
when set up that way :)

This will allow us to eventually take advantage of the
#pinctrl-cells = <2>  and not have to change all the dts files
and just change the macro.

I also added Linus Walleij to Cc as this might interest him
also.

Regards,

Tony
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index adcd6341e40c..f7c2a60d5c80 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -69,4 +69,20 @@ 
 		clock-frequency = <48000000>;
 		current-speed = <115200>;
 	};
+
+	main_pmx0: pinmux@11c000 {
+		compatible = "pinctrl-single";
+		reg = <0x0 0x11c000 0x0 0x2e4>;
+		#pinctrl-cells = <1>;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0xffffffff>;
+	};
+
+	main_pmx1: pinmux@11c2e8 {
+		compatible = "pinctrl-single";
+		reg = <0x0 0x11c2e8 0x0 0x24>;
+		#pinctrl-cells = <1>;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0xffffffff>;
+	};
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi
index 8d7b47f9dfbf..19b46f40789b 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi
@@ -34,6 +34,14 @@ 
 		};
 	};
 
+	wkup_pmx0: pinmux@4301c000 {
+		compatible = "pinctrl-single";
+		reg = <0x4301c000 0x118>;
+		#pinctrl-cells = <1>;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0xffffffff>;
+	};
+
 	wkup_uart0: serial@42300000 {
 		compatible = "ti,am654-uart";
 		reg = <0x42300000 0x100>;
diff --git a/arch/arm64/boot/dts/ti/k3-am65.dtsi b/arch/arm64/boot/dts/ti/k3-am65.dtsi
index 3d4bf369d030..873dca1d0813 100644
--- a/arch/arm64/boot/dts/ti/k3-am65.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65.dtsi
@@ -8,6 +8,7 @@ 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/k3-am65.h>
 
 / {
 	model = "Texas Instruments K3 AM654 SoC";