Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1608548 > unrolled thread
| Started by | Jacopo Mondi <jacopo+renesas@jmondi.org> |
|---|---|
| First post | 2017-03-24 16:30 +0100 |
| Last post | 2017-03-24 16:30 +0100 |
| Articles | 4 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v3 0/8] Renesas RZ/A1 pin and gpio controller Jacopo Mondi <jacopo+renesas@jmondi.org> - 2017-03-24 16:30 +0100
[PATCH v3 7/7] arm: dts: genmai: Add user led device nodes Jacopo Mondi <jacopo+renesas@jmondi.org> - 2017-03-24 16:30 +0100
[PATCH v3 5/7] arm: dts: genmai: Add SCIF2 pin group Jacopo Mondi <jacopo+renesas@jmondi.org> - 2017-03-24 16:30 +0100
[PATCH v3 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Jacopo Mondi <jacopo+renesas@jmondi.org> - 2017-03-24 16:30 +0100
| From | Jacopo Mondi <jacopo+renesas@jmondi.org> |
|---|---|
| Date | 2017-03-24 16:30 +0100 |
| Subject | [PATCH v3 0/8] Renesas RZ/A1 pin and gpio controller |
| Message-ID | <tozk5-3uM-17@gated-at.bofh.it> |
Hello! Third round for Renesas RZ/A1 PFC gpio and pin controller. V3 fixes review comments on grammar and spelling by Geert. Some other fixes from Geert's review as update of function argument names to reflect the function purpose (s/offset/[pin|bit]), use irqsave/irqrestore version of spinlocks locking/unlocking methods and other style fixes. Still an open question on the use of "pins" or "renesas,pins" property in device tree bindings: https://www.spinics.net/lists/linux-renesas-soc/msg12765.html Tested on Genmai and RSK boards with SCIF, I2c and GPIO (genmai) and SCIF, I2c, SDHI and ethernet on RSK (thanks Chris). Thanks j v1 -> v2: - change pin configuration flags as suggested by Chris - gpio set direction function fixed as suggested by Chris - add some more example on pin configuration flag usage to dt-binding doc - fix gpio-controller names to remove unit address as suggested by Geert - some comments chopped here and there to make the driver less verbose v2 -> v3: - fix grammar and syntax in comment and documentation - fix code style (reverse xmas tree ordering in variable declaration) - use irqsave/irqrestore in spinlock lock/unlock - use devm_ version of kasprintf (memory returned was not properly free) - use bitops.h operation ffs and fls to make sure a single bit is set in pmx mask - Add Geert's reviewed-by to DTS patches Jacopo Mondi (8): pinctrl: Renesas RZ/A1 pin and gpio controller dt-bindings: pinctrl: Add RZ/A1 bindings doc arm: dts: dt-bindings: Add Renesas RZ pinctrl header arm: dts: r7s72100: Add pin controller node arm: dts: genmai: Add SCIF2 pin group arm: dts: genmai: Add RIIC2 pin group arm: dts: genmai: Add user led device nodes arm: dts: genmai: Add ethernet pin group .../bindings/pinctrl/renesas,rza1-pinctrl.txt | 143 +++ arch/arm/boot/dts/r7s72100-genmai.dts | 68 ++ arch/arm/boot/dts/r7s72100.dtsi | 80 ++ drivers/pinctrl/Kconfig | 10 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-rza1.c | 961 +++++++++++++++++++++ include/dt-bindings/pinctrl/r7s72100-pinctrl.h | 36 + 7 files changed, 1299 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt create mode 100644 drivers/pinctrl/pinctrl-rza1.c create mode 100644 include/dt-bindings/pinctrl/r7s72100-pinctrl.h -- 2.7.4
[toc] | [next] | [standalone]
| From | Jacopo Mondi <jacopo+renesas@jmondi.org> |
|---|---|
| Date | 2017-03-24 16:30 +0100 |
| Subject | [PATCH v3 7/7] arm: dts: genmai: Add user led device nodes |
| Message-ID | <tozk7-3uM-67@gated-at.bofh.it> |
| In reply to | #1608548 |
Add device nodes for user leds on Genmai board.
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r7s72100-genmai.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
index 30992b1..94b9ab7 100644
--- a/arch/arm/boot/dts/r7s72100-genmai.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
@@ -11,6 +11,7 @@
/dts-v1/;
#include "r7s72100.dtsi"
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/r7s72100-pinctrl.h>
/ {
@@ -35,6 +36,19 @@
#address-cells = <1>;
#size-cells = <1>;
};
+
+ leds {
+ status = "okay";
+ compatible = "gpio-leds";
+
+ led1 {
+ gpios = <&port4 10 GPIO_ACTIVE_LOW>;
+ };
+
+ led2 {
+ gpios = <&port4 11 GPIO_ACTIVE_LOW>;
+ };
+ };
};
&pinctrl {
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Jacopo Mondi <jacopo+renesas@jmondi.org> |
|---|---|
| Date | 2017-03-24 16:30 +0100 |
| Subject | [PATCH v3 5/7] arm: dts: genmai: Add SCIF2 pin group |
| Message-ID | <tozk7-3uM-71@gated-at.bofh.it> |
| In reply to | #1608548 |
Add pin configuration subnode for SCIF2 serial debug interface.
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r7s72100-genmai.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
index 118a8e2..569c86a 100644
--- a/arch/arm/boot/dts/r7s72100-genmai.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
@@ -11,6 +11,7 @@
/dts-v1/;
#include "r7s72100.dtsi"
+#include <dt-bindings/pinctrl/r7s72100-pinctrl.h>
/ {
model = "Genmai";
@@ -36,6 +37,15 @@
};
};
+&pinctrl {
+
+ scif2_pins: serial2 {
+ /* P3_0 as TxD2; P3_2 as RxD2 */
+ renesas,pins = <PIN(3, 0) 6>,
+ <PIN(3, 2) 4>;
+ };
+};
+
&extal_clk {
clock-frequency = <13330000>;
};
@@ -60,6 +70,9 @@
};
&scif2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&scif2_pins>;
+
status = "okay";
};
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Jacopo Mondi <jacopo+renesas@jmondi.org> |
|---|---|
| Date | 2017-03-24 16:30 +0100 |
| Subject | [PATCH v3 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header |
| Message-ID | <tozk7-3uM-75@gated-at.bofh.it> |
| In reply to | #1608548 |
Add dt-bindings for Renesas r7s72100 pin controller header file. Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> --- include/dt-bindings/pinctrl/r7s72100-pinctrl.h | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/dt-bindings/pinctrl/r7s72100-pinctrl.h diff --git a/include/dt-bindings/pinctrl/r7s72100-pinctrl.h b/include/dt-bindings/pinctrl/r7s72100-pinctrl.h new file mode 100644 index 0000000..170338b --- /dev/null +++ b/include/dt-bindings/pinctrl/r7s72100-pinctrl.h @@ -0,0 +1,36 @@ +/* + * Defines macros and constants for Renesas RZ/A1 pin controller pin + * muxing functions. + */ +#ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H +#define __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H + +#define RZA1_PINS_PER_PORT 16 + +/* Create the pin index from its bank and position numbers */ +#define PIN(b, p) ((b) * RZA1_PINS_PER_PORT + (p)) + +/* + * Flags to apply to alternate function configuration + * All of the following are mutually exclusive. + */ + +/* + * Pin is bi-directional. + * An alternate function that needs both input/output functionalities shall + * be configured as bidirectional. + * Eg. SDA/SCL pins of an I2c interface. + */ +#define BI_DIR (1 << 3) + +/* + * Flags used to ask software to drive the pin I/O direction overriding the + * alternate function configuration. + * Some alternate functions require software to force I/O direction of a pin, + * overriding the designated one. + * Refer to the HW manual to know when this flag shall be used. + */ +#define SWIO_IN (1 << 4) +#define SWIO_OUT (1 << 5) + +#endif -- 2.7.4
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web