Skip to contentSkip to conversation

pinctrl: sirf: add DT binding pinmux mapping support

PATCH Superseded Barry Song 3 participants 9 messages Aug 23, 2012 – Sep 3, 2012

Subsystems (4)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

cover pinctrl: sirf: add DT binding pinmux mapping support

This series makes us possible to define pinmux mapping support in board specific .dts files directly.

As we want to add more SoCs(Marco, Polo) in mach-prima2, we want the dir have no trivial PIN_MAP_MUX_GROUP_DEFAULT and pinctrl_register_mappings codes.

we will have a clean mach-prima2/common.c file then.

Barry Song (3):
ARM: PRIMA2: add missing interrupts property for pinctrl node
ARM: PRIMA2: rename prima2-cb.dts to prima2.dtsi as it only has SoC
features
pinctrl: sirf: add DT-binding pinmux mapping support

 arch/arm/boot/dts/prima2-cb.dts    |  424 ------------------------
 arch/arm/boot/dts/prima2-evb.dts   |   37 ++
 arch/arm/boot/dts/prima2.dtsi      |  640 ++++++++++++++++++++++++++++++++++++
 arch/arm/mach-prima2/Makefile.boot |    2 +
 drivers/pinctrl/pinctrl-sirf.c     |   58 ++++-
 5 files changed, 736 insertions(+), 425 deletions(-)
 delete mode 100644 arch/arm/boot/dts/prima2-cb.dts
 create mode 100644 arch/arm/boot/dts/prima2-evb.dts
 create mode 100644 arch/arm/boot/dts/prima2.dtsi

Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

author
#1 lore raw

PATCH 1/3 ARM: PRIMA2: add missing interrupts property for pinctrl node

From: Barry Song <[email protected]>

commit 5130216265f6f924a4 missed the interrupts property

---
 arch/arm/boot/dts/prima2-cb.dts |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/boot/dts/prima2-cb.dts +1 -0
index 34ae3a6..4245306 100644
@@ -284,6 +284,7 @@
 				#interrupt-cells = <2>;
 				compatible = "sirf,prima2-gpio-pinmux";
 				reg = <0xb0120000 0x10000>;
+				interrupts = <43 44 45 46 47>;
 				gpio-controller;
 				interrupt-controller;
 			};
Signature · 6 lines
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
author
#4 lore raw

PATCH 2/3 ARM: PRIMA2: rename prima2-cb.dts to prima2.dtsi as it only has SoC features

In reply to Barry Song

From: Barry Song <[email protected]>

The current prima2-cb.dts only includes prima2 SoC feature without board- specific descriptions. This patches rename it to dtsi and clean some useless content.

---
 arch/arm/boot/dts/{prima2-cb.dts => prima2.dtsi} |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)
 rename arch/arm/boot/dts/{prima2-cb.dts => prima2.dtsi} (96%)
arch/arm/boot/dts/prima2.dtsi renamed from arch/arm/boot/dts/prima2-cb.dts +10 -12
similarity index 96%
rename from arch/arm/boot/dts/prima2-cb.dts
rename to arch/arm/boot/dts/prima2.dtsi
index 4245306..1b716aa 100644
@@ -1,20 +1,18 @@
-/dts-v1/;
+/*
+ * DTS file for CSR SiRFprimaII SoC
+ *
+ * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
 / {
-	model = "SiRF Prima2 eVB";
-	compatible = "sirf,prima2-cb", "sirf,prima2";
+	compatible = "sirf,prima2";
 	#address-cells = <1>;
 	#size-cells = <1>;
 	interrupt-parent = <&intc>;
 
-	memory {
-		reg = <0x00000000 0x20000000>;
-	};
-
-	chosen {
-		bootargs = "mem=512M real_root=/dev/mmcblk0p2 console=ttyS0 panel=1 bootsplash=true bpp=16 androidboot.console=ttyS1";
-		linux,stdout-path = &uart1;
-	};
-
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
Signature · 6 lines
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
author
#6 lore raw

PATCH 3/3 pinctrl: sirf: add DT-binding pinmux mapping support

In reply to Barry Song

From: Barry Song <[email protected]>

This makes us possible to define pinmux mapping in board-specific DTS. prima2.dtsi provides all possible (groups,functions) configuration, and device in .dts select configurations from dtsi files.

---
 arch/arm/boot/dts/prima2-evb.dts   |   37 ++++++
 arch/arm/boot/dts/prima2.dtsi      |  221 +++++++++++++++++++++++++++++++++++-
 arch/arm/mach-prima2/Makefile.boot |    2 +
 drivers/pinctrl/pinctrl-sirf.c     |   58 +++++++++-
 4 files changed, 315 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/prima2-evb.dts
arch/arm/boot/dts/prima2-evb.dts new file +37 -0
new file mode 100644
index 0000000..57286b4
@@ -0,0 +1,37 @@
+/*
+ * DTS file for CSR SiRFprimaII Evaluation Board
+ *
+ * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/dts-v1/;
+
+/include/ "prima2.dtsi"
+
+/ {
+	model = "CSR SiRFprimaII Evaluation Board";
+	compatible = "sirf,prima2", "sirf,prima2-cb";
+
+	memory {
+		reg = <0x00000000 0x20000000>;
+	};
+
+	axi {
+		peri-iobg {
+			uart at b0060000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&uart1_pins_a>;
+			};
+			spi at b00d0000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&spi0_pins_a>;
+			};
+			spi at b0170000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&spi1_pins_a>;
+			};
+		};
+	};
+};
arch/arm/boot/dts/prima2.dtsi +219 -2

233 lines not on this page · raw message

arch/arm/mach-prima2/Makefile.boot +2 -0
index c77a488..98167da 100644
@@ -1,3 +1,5 @@
 zreladdr-y		+= 0x00008000
 params_phys-y		:= 0x00000100
 initrd_phys-y		:= 0x00800000
+
+dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
drivers/pinctrl/pinctrl-sirf.c +57 -1

81 lines not on this page · raw message

Signature · 6 lines
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
#7 lore raw

PATCH 3/3 pinctrl: sirf: add DT-binding pinmux mapping support

Quoted 6 lines

From: Barry Song <[email protected]>

This makes us possible to define pinmux mapping in board-specific DTS. prima2.dtsi provides all possible (groups,functions) configuration, and device in .dts select configurations from dtsi files.

Quoted 8 lines
---
 arch/arm/boot/dts/prima2-evb.dts   |   37 ++++++
 arch/arm/boot/dts/prima2.dtsi      |  221 +++++++++++++++++++++++++++++++++++-
 arch/arm/mach-prima2/Makefile.boot |    2 +
 drivers/pinctrl/pinctrl-sirf.c     |   58 +++++++++-
 4 files changed, 315 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/prima2-evb.dts

Sorry for missing dt binding document, pls ignore this and take

[PATCH RESEND 3/3] pinctrl: sirf: add DT-binding pinmux mapping support

-barry

#5 lore raw

PATCH 2/3 ARM: PRIMA2: rename prima2-cb.dts to prima2.dtsi as it only has SoC features

In reply to Barry Song
Quoted 7 lines · Barry Song

From: Barry Song <[email protected]>

The current prima2-cb.dts only includes prima2 SoC feature without board- specific descriptions. This patches rename it to dtsi and clean some useless content.

(Again expect that you take this through ARM SoC.)

Yours,
Linus Walleij

#8 lore raw

PATCH 3/3 pinctrl: sirf: add DT-binding pinmux mapping support

In reply to Barry Song
Quoted 7 lines · Barry Song

From: Barry Song <[email protected]>

This makes us possible to define pinmux mapping in board-specific DTS. prima2.dtsi provides all possible (groups,functions) configuration, and device in .dts select configurations from dtsi files.

(Again, assume that you take this through ARM SoC.)

Yours,
Linus Walleij

#3 lore raw

PATCH 1/3 ARM: PRIMA2: add missing interrupts property for pinctrl node

In reply to Linus Walleij

2012/9/3 Linus Walleij <[email protected]>:

Quoted 6 lines · Barry Song
Quoted 5 lines

From: Barry Song <[email protected]>

commit 5130216265f6f924a4 missed the interrupts property

Quoted 7 lines
Quoted 1 line

I expect that you take this patch through the ARM SoC tree?

If you want me to carry it in the pinctrl tree, tell me.

thanks a lot, linus! taking these through ARM SoC tree is the best way to avoid possible conflict.
i have not done that in prima2 common clk driver, then i have a strange pull request:
http://www.spinics.net/lists/arm-kernel/msg191412.html

Quoted 4 lines

Yours,
Linus Walleij

-barry