* [PATCH 01/10] ARM: shmobile: r8a7790: Add JPU device node.
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 02/10] ARM: shmobile: r8a7791: " Simon Horman
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
This patch contains device tree node definition for JPEG codec peripheral
found in the Renesas R-Car r8a7790 SoC.
Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7790.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index f1cdccc0a8c8..5b2952d5c700 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -872,6 +872,13 @@
status = "disabled";
};
+ jpu: jpeg-codec at fe980000 {
+ compatible = "renesas,jpu-r8a7790";
+ reg = <0 0xfe980000 0 0x10300>;
+ interrupts = <0 272 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7790_CLK_JPU>;
+ };
+
clocks {
#address-cells = <2>;
#size-cells = <2>;
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 02/10] ARM: shmobile: r8a7791: Add JPU device node.
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
2015-08-07 2:11 ` [PATCH 01/10] ARM: shmobile: r8a7790: Add JPU device node Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 03/10] ARM: shmobile: r8a7794: add PFC DT support Simon Horman
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
This patch contains device tree node definition for JPEG codec peripheral
found in the Renesas R-Car r8a7791 SoC.
Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index d37339bd7cdb..1cb6c2d07933 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -898,6 +898,13 @@
status = "disabled";
};
+ jpu: jpeg-codec at fe980000 {
+ compatible = "renesas,jpu-r8a7791";
+ reg = <0 0xfe980000 0 0x10300>;
+ interrupts = <0 272 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7791_CLK_JPU>;
+ };
+
clocks {
#address-cells = <2>;
#size-cells = <2>;
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 03/10] ARM: shmobile: r8a7794: add PFC DT support
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
2015-08-07 2:11 ` [PATCH 01/10] ARM: shmobile: r8a7790: Add JPU device node Simon Horman
2015-08-07 2:11 ` [PATCH 02/10] ARM: shmobile: r8a7791: " Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 04/10] ARM: shmobile: silk: initial device tree Simon Horman
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Define the generic R8A7794 part of the PFC device node.
Based on original patch by Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7794.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 8824dbd5dbb4..51cc2b975c3f 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -108,6 +108,12 @@
clocks = <&mstp4_clks R8A7794_CLK_IRQC>;
};
+ pfc: pin-controller at e6060000 {
+ compatible = "renesas,pfc-r8a7794";
+ reg = <0 0xe6060000 0 0x11c>;
+ #gpio-range-cells = <3>;
+ };
+
dmac0: dma-controller at e6700000 {
compatible = "renesas,rcar-dmac";
reg = <0 0xe6700000 0 0x20000>;
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 04/10] ARM: shmobile: silk: initial device tree
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (2 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 03/10] ARM: shmobile: r8a7794: add PFC DT support Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 05/10] ARM: shmobile: silk: add Ether DT support Simon Horman
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Add the initial device tree for the R8A7794 SoC based SILK low cost board.
SCIF2 serial port support is included, so that the serial console can work.
Based on the original patch by Vladimir Barinov
<vladimir.barinov@cogentembedded.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/r8a7794-silk.dts | 51 ++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+)
create mode 100644 arch/arm/boot/dts/r8a7794-silk.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 679d7cc2f57c..c6e0befabada 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -518,6 +518,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
r8a7791-koelsch.dtb \
r8a7793-gose.dtb \
r8a7794-alt.dtb \
+ r8a7794-silk.dtb \
sh73a0-kzm9g.dtb
dtb-$(CONFIG_ARCH_SOCFPGA) += \
socfpga_arria5_socdk.dtb \
diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
new file mode 100644
index 000000000000..f3da95b1dedd
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -0,0 +1,51 @@
+/*
+ * Device Tree Source for the SILK board
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ * Copyright (C) 2014-2015 Renesas Solutions Corp.
+ * Copyright (C) 2014-2015 Cogent Embedded, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/dts-v1/;
+#include "r8a7794.dtsi"
+
+/ {
+ model = "SILK";
+ compatible = "renesas,silk", "renesas,r8a7794";
+
+ aliases {
+ serial0 = &scif2;
+ };
+
+ chosen {
+ bootargs = "ignore_loglevel";
+ stdout-path = &scif2;
+ };
+
+ memory at 40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x40000000>;
+ };
+};
+
+&extal_clk {
+ clock-frequency = <20000000>;
+};
+
+&pfc {
+ scif2_pins: serial2 {
+ renesas,groups = "scif2_data";
+ renesas,function = "scif2";
+ };
+};
+
+&scif2 {
+ pinctrl-0 = <&scif2_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 05/10] ARM: shmobile: silk: add Ether DT support
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (3 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 04/10] ARM: shmobile: silk: initial device tree Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 06/10] ARM: shmobile: r8a7794: add MMCIF " Simon Horman
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Define the SILK board dependent part of the Ether device node.
Enable DHCP and NFS root for the kernel booting.
Based on the original patch by Vladimir Barinov
<vladimir.barinov@cogentembedded.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7794-silk.dts | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
index f3da95b1dedd..79bc64b94456 100644
--- a/arch/arm/boot/dts/r8a7794-silk.dts
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -22,7 +22,7 @@
};
chosen {
- bootargs = "ignore_loglevel";
+ bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
stdout-path = &scif2;
};
@@ -41,6 +41,16 @@
renesas,groups = "scif2_data";
renesas,function = "scif2";
};
+
+ ether_pins: ether {
+ renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
+ renesas,function = "eth";
+ };
+
+ phy1_pins: phy1 {
+ renesas,groups = "intc_irq8";
+ renesas,function = "intc";
+ };
};
&scif2 {
@@ -49,3 +59,19 @@
status = "okay";
};
+
+ðer {
+ pinctrl-0 = <ðer_pins &phy1_pins>;
+ pinctrl-names = "default";
+
+ phy-handle = <&phy1>;
+ renesas,ether-link-active-low;
+ status = "okay";
+
+ phy1: ethernet-phy at 1 {
+ reg = <1>;
+ interrupt-parent = <&irqc0>;
+ interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+ micrel,led-mode = <1>;
+ };
+};
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 06/10] ARM: shmobile: r8a7794: add MMCIF DT support
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (4 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 05/10] ARM: shmobile: silk: add Ether DT support Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 07/10] ARM: shmobile: silk: add eMMC " Simon Horman
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Define the generic R8A7794 part of the MMCIF0 device node.
Based on the orginal patch by Shinobu Uehara <shinobu.uehara.xc@renesas.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7794.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 51cc2b975c3f..43acf185ecc4 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -383,6 +383,17 @@
status = "disabled";
};
+ mmcif0: mmc at ee200000 {
+ compatible = "renesas,mmcif-r8a7794", "renesas,sh-mmcif";
+ reg = <0 0xee200000 0 0x80>;
+ interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7794_CLK_MMCIF0>;
+ dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
+ dma-names = "tx", "rx";
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
sdhi0: sd at ee100000 {
compatible = "renesas,sdhi-r8a7794";
reg = <0 0xee100000 0 0x200>;
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3
@ 2015-08-07 2:11 Simon Horman
2015-08-07 2:11 ` [PATCH 01/10] ARM: shmobile: r8a7790: Add JPU device node Simon Horman
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Kevin, Hi Arnd,
Please consider these third round of Renesas ARM based SoC DT updates for v4.3.
This pull request is based on the previous round of
such requests, tagged as renesas-dt2-for-v4.3,
which I have already sent a pull-request for.
The following changes since commit 7fd6e11dca09b21efbe2b9db4eff08c8f4a16125:
ARM: shmobile: r8a7791: Add Audio MIX support on DTSI (2015-07-22 09:36:49 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt3-for-v4.3
for you to fetch changes up to 94bdc48d55ca10f90b4a625f0e443197e0013557:
ARM: shmobile: sh73a0 dtsi: Add missing "gpio-ranges" to gpio node (2015-08-05 06:39:28 +0900)
----------------------------------------------------------------
Third Round of Renesas ARM Based SoC DT Updates for v4.3
* Add JPU support: r8a7791 and r8a7790 SoCs
* Add MMCIF and PFC support: r8a7794 SoC
* Add initial support for r8a7794/silk
* Add missing "gpio-ranges" to gpio nodes: sh73a0, r8a7740 and r8a73a4 SoCs
----------------------------------------------------------------
Geert Uytterhoeven (3):
ARM: shmobile: r8a73a4 dtsi: Add missing "gpio-ranges" to gpio node
ARM: shmobile: r8a7740 dtsi: Add missing "gpio-ranges" to gpio node
ARM: shmobile: sh73a0 dtsi: Add missing "gpio-ranges" to gpio node
Mikhail Ulyanov (2):
ARM: shmobile: r8a7790: Add JPU device node.
ARM: shmobile: r8a7791: Add JPU device node.
Sergei Shtylyov (5):
ARM: shmobile: r8a7794: add PFC DT support
ARM: shmobile: silk: initial device tree
ARM: shmobile: silk: add Ether DT support
ARM: shmobile: r8a7794: add MMCIF DT support
ARM: shmobile: silk: add eMMC DT support
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/r8a73a4.dtsi | 7 +++
arch/arm/boot/dts/r8a7740.dtsi | 1 +
arch/arm/boot/dts/r8a7790.dtsi | 7 +++
arch/arm/boot/dts/r8a7791.dtsi | 7 +++
arch/arm/boot/dts/r8a7794-silk.dts | 102 +++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/r8a7794.dtsi | 17 +++++++
arch/arm/boot/dts/sh73a0.dtsi | 3 ++
8 files changed, 145 insertions(+)
create mode 100644 arch/arm/boot/dts/r8a7794-silk.dts
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 07/10] ARM: shmobile: silk: add eMMC DT support
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (5 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 06/10] ARM: shmobile: r8a7794: add MMCIF " Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 08/10] ARM: shmobile: r8a73a4 dtsi: Add missing "gpio-ranges" to gpio node Simon Horman
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Define the SILK board dependent part of the MMCIF device node (the board has
eMMC chip) along with the necessary voltage regulator (note that the Vcc/Vccq
regulator is dummy -- it's required by the MMCIF driver but doesn't actually
exist on the board).
Based on the original patch by Vladimir Barinov
<vladimir.barinov@cogentembedded.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7794-silk.dts | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
index 79bc64b94456..d4dd5a30ccdf 100644
--- a/arch/arm/boot/dts/r8a7794-silk.dts
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -30,6 +30,15 @@
device_type = "memory";
reg = <0 0x40000000 0 0x40000000>;
};
+
+ d3_3v: regulator at 0 {
+ compatible = "regulator-fixed";
+ regulator-name = "D3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
};
&extal_clk {
@@ -51,6 +60,11 @@
renesas,groups = "intc_irq8";
renesas,function = "intc";
};
+
+ mmcif0_pins: mmcif0 {
+ renesas,groups = "mmc_data8", "mmc_ctrl";
+ renesas,function = "mmc";
+ };
};
&scif2 {
@@ -75,3 +89,14 @@
micrel,led-mode = <1>;
};
};
+
+&mmcif0 {
+ pinctrl-0 = <&mmcif0_pins>;
+ pinctrl-names = "default";
+
+ vmmc-supply = <&d3_3v>;
+ vqmmc-supply = <&d3_3v>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 08/10] ARM: shmobile: r8a73a4 dtsi: Add missing "gpio-ranges" to gpio node
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (6 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 07/10] ARM: shmobile: silk: add eMMC " Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 09/10] ARM: shmobile: r8a7740 " Simon Horman
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
If a GPIO driver uses gpiochip_add_pin_range() (which is usually the
case for GPIO/PFC combos), the GPIO hogging mechanism configured from DT
doesn't work:
requesting hog GPIO led1-high (chip r8a73a4_pfc, offset 28) failed
The actual error code is -517 == -EPROBE_DEFER.
The problem is that PFC+GPIO registration is handled in multiple steps:
1. pinctrl_register(),
2. gpiochip_add(),
3. gpiochip_add_pin_range().
Configuration of the hogs is handled in gpiochip_add():
gpiochip_add
of_gpiochip_add
of_gpiochip_scan_hogs
gpiod_hog
gpiochip_request_own_desc
__gpiod_request
chip->request
pinctrl_request_gpio
pinctrl_get_device_gpio_range
However, at this point the GPIO controller hasn't been added to
pinctrldev_list yet, so the range can't be found, and the operation fails
with -EPROBE_DEFER.
To fix this, add a "gpio-ranges" property to the gpio device node, so
the ranges are added by of_gpiochip_add_pin_range(), which is called by
of_gpiochip_add() before the call to of_gpiochip_scan_hogs().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a73a4.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index 5090d1a8f652..cb4f7b2798fe 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -207,6 +207,13 @@
reg = <0 0xe6050000 0 0x9000>;
gpio-controller;
#gpio-cells = <2>;
+ gpio-ranges =
+ <&pfc 0 0 31>, <&pfc 32 32 9>,
+ <&pfc 64 64 22>, <&pfc 96 96 31>,
+ <&pfc 128 128 7>, <&pfc 160 160 19>,
+ <&pfc 192 192 31>, <&pfc 224 224 27>,
+ <&pfc 256 256 28>, <&pfc 288 288 21>,
+ <&pfc 320 320 10>;
interrupts-extended =
<&irqc0 0 0>, <&irqc0 1 0>, <&irqc0 2 0>, <&irqc0 3 0>,
<&irqc0 4 0>, <&irqc0 5 0>, <&irqc0 6 0>, <&irqc0 7 0>,
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 09/10] ARM: shmobile: r8a7740 dtsi: Add missing "gpio-ranges" to gpio node
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (7 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 08/10] ARM: shmobile: r8a73a4 dtsi: Add missing "gpio-ranges" to gpio node Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-07 2:11 ` [PATCH 10/10] ARM: shmobile: sh73a0 " Simon Horman
2015-08-11 13:32 ` [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Olof Johansson
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
If a GPIO driver uses gpiochip_add_pin_range() (which is usually the
case for GPIO/PFC combos), the GPIO hogging mechanism configured from DT
doesn't work:
requesting hog GPIO lcd0 (chip r8a7740_pfc, offset 176) failed
The actual error code is -517 == -EPROBE_DEFER.
The problem is that PFC+GPIO registration is handled in multiple steps:
1. pinctrl_register(),
2. gpiochip_add(),
3. gpiochip_add_pin_range().
Configuration of the hogs is handled in gpiochip_add():
gpiochip_add
of_gpiochip_add
of_gpiochip_scan_hogs
gpiod_hog
gpiochip_request_own_desc
__gpiod_request
chip->request
pinctrl_request_gpio
pinctrl_get_device_gpio_range
However, at this point the GPIO controller hasn't been added to
pinctrldev_list yet, so the range can't be found, and the operation fails
with -EPROBE_DEFER.
To fix this, add a "gpio-ranges" property to the gpio device node, so
the range is added by of_gpiochip_add_pin_range(), which is called by
of_gpiochip_add() before the call to of_gpiochip_scan_hogs().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7740.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index d84714468cce..e14cb1438216 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -291,6 +291,7 @@
<0xe605800c 0x20>;
gpio-controller;
#gpio-cells = <2>;
+ gpio-ranges = <&pfc 0 0 212>;
interrupts-extended =
<&irqpin0 0 0>, <&irqpin0 1 0>, <&irqpin0 2 0>, <&irqpin0 3 0>,
<&irqpin0 4 0>, <&irqpin0 5 0>, <&irqpin0 6 0>, <&irqpin0 7 0>,
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 10/10] ARM: shmobile: sh73a0 dtsi: Add missing "gpio-ranges" to gpio node
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (8 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 09/10] ARM: shmobile: r8a7740 " Simon Horman
@ 2015-08-07 2:11 ` Simon Horman
2015-08-11 13:32 ` [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Olof Johansson
10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-08-07 2:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
If a GPIO driver uses gpiochip_add_pin_range() (which is usually the
case for GPIO/PFC combos), the GPIO hogging mechanism configured from DT
doesn't work:
requesting hog GPIO led1-high (chip sh73a0_pfc, offset 20) failed
The actual error code is -517 == -EPROBE_DEFER.
The problem is that PFC+GPIO registration is handled in multiple steps:
1. pinctrl_register(),
2. gpiochip_add(),
3. gpiochip_add_pin_range().
Configuration of the hogs is handled in gpiochip_add():
gpiochip_add
of_gpiochip_add
of_gpiochip_scan_hogs
gpiod_hog
gpiochip_request_own_desc
__gpiod_request
chip->request
pinctrl_request_gpio
pinctrl_get_device_gpio_range
However, at this point the GPIO controller hasn't been added to
pinctrldev_list yet, so the range can't be found, and the operation fails
with -EPROBE_DEFER.
To fix this, add a "gpio-ranges" property to the gpio device node, so
the ranges are added by of_gpiochip_add_pin_range(), which is called by
of_gpiochip_add() before the call to of_gpiochip_scan_hogs().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/sh73a0.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 11e17c5f26e2..ff7c8f298f30 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -392,6 +392,9 @@
<0xe605801c 0x1c>;
gpio-controller;
#gpio-cells = <2>;
+ gpio-ranges =
+ <&pfc 0 0 119>, <&pfc 128 128 37>, <&pfc 192 192 91>,
+ <&pfc 288 288 22>;
interrupts-extended =
<&irqpin0 0 0>, <&irqpin0 1 0>, <&irqpin0 2 0>, <&irqpin0 3 0>,
<&irqpin0 4 0>, <&irqpin0 5 0>, <&irqpin0 6 0>, <&irqpin0 7 0>,
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
` (9 preceding siblings ...)
2015-08-07 2:11 ` [PATCH 10/10] ARM: shmobile: sh73a0 " Simon Horman
@ 2015-08-11 13:32 ` Olof Johansson
10 siblings, 0 replies; 12+ messages in thread
From: Olof Johansson @ 2015-08-11 13:32 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 07, 2015 at 11:11:31AM +0900, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
>
> Please consider these third round of Renesas ARM based SoC DT updates for v4.3.
>
> This pull request is based on the previous round of
> such requests, tagged as renesas-dt2-for-v4.3,
> which I have already sent a pull-request for.
>
>
> The following changes since commit 7fd6e11dca09b21efbe2b9db4eff08c8f4a16125:
>
> ARM: shmobile: r8a7791: Add Audio MIX support on DTSI (2015-07-22 09:36:49 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt3-for-v4.3
>
> for you to fetch changes up to 94bdc48d55ca10f90b4a625f0e443197e0013557:
>
> ARM: shmobile: sh73a0 dtsi: Add missing "gpio-ranges" to gpio node (2015-08-05 06:39:28 +0900)
Merged, thanks.
-Olof
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-08-11 13:32 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07 2:11 [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Simon Horman
2015-08-07 2:11 ` [PATCH 01/10] ARM: shmobile: r8a7790: Add JPU device node Simon Horman
2015-08-07 2:11 ` [PATCH 02/10] ARM: shmobile: r8a7791: " Simon Horman
2015-08-07 2:11 ` [PATCH 03/10] ARM: shmobile: r8a7794: add PFC DT support Simon Horman
2015-08-07 2:11 ` [PATCH 04/10] ARM: shmobile: silk: initial device tree Simon Horman
2015-08-07 2:11 ` [PATCH 05/10] ARM: shmobile: silk: add Ether DT support Simon Horman
2015-08-07 2:11 ` [PATCH 06/10] ARM: shmobile: r8a7794: add MMCIF " Simon Horman
2015-08-07 2:11 ` [PATCH 07/10] ARM: shmobile: silk: add eMMC " Simon Horman
2015-08-07 2:11 ` [PATCH 08/10] ARM: shmobile: r8a73a4 dtsi: Add missing "gpio-ranges" to gpio node Simon Horman
2015-08-07 2:11 ` [PATCH 09/10] ARM: shmobile: r8a7740 " Simon Horman
2015-08-07 2:11 ` [PATCH 10/10] ARM: shmobile: sh73a0 " Simon Horman
2015-08-11 13:32 ` [GIT PULL] Third Round of Renesas ARM Based SoC DT Updates for v4.3 Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).