Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1250345 > unrolled thread
| Started by | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| First post | 2015-10-19 07:50 +0200 |
| Last post | 2015-10-27 10:50 +0100 |
| Articles | 19 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 00/11] Generalized broadcom cygnus gpio driver Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
[PATCH 03/11] dts: pinctrl: Add GPIO to Pinctrl pin mapping in DT Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
Re: [PATCH 03/11] dts: pinctrl: Add GPIO to Pinctrl pin mapping in DT Linus Walleij <linus.walleij@linaro.org> - 2015-10-27 10:50 +0100
[PATCH 06/11] dts: define ngpios property in gpio controller's node Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
[PATCH 07/11] pinctrl: use ngpios propety from DT Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
Re: [PATCH 07/11] pinctrl: use ngpios propety from DT Linus Walleij <linus.walleij@linaro.org> - 2015-10-27 11:00 +0100
RE: [PATCH 07/11] pinctrl: use ngpios propety from DT Pramod Kumar <pramodku@broadcom.com> - 2015-10-28 13:00 +0100
Re: [PATCH 07/11] pinctrl: use ngpios propety from DT Ray Jui <rjui@broadcom.com> - 2015-10-28 16:50 +0100
Re: [PATCH 07/11] pinctrl: use ngpios propety from DT Linus Walleij <linus.walleij@linaro.org> - 2015-10-29 15:40 +0100
Re: [PATCH 07/11] pinctrl: use ngpios propety from DT Jonas Gorski <jogo@openwrt.org> - 2015-10-29 15:50 +0100
Re: [PATCH 07/11] pinctrl: use ngpios propety from DT Linus Walleij <linus.walleij@linaro.org> - 2015-10-30 12:10 +0100
[PATCH 08/11] pinctrl: Add new compatible string to GPIO controller driver Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
Re: [PATCH 08/11] pinctrl: Add new compatible string to GPIO controller driver Linus Walleij <linus.walleij@linaro.org> - 2015-10-27 11:00 +0100
[PATCH 02/11] pinctrl: Remove GPIO to Pinctrl pin mapping from driver Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
Re: [PATCH 02/11] pinctrl: Remove GPIO to Pinctrl pin mapping from driver Linus Walleij <linus.walleij@linaro.org> - 2015-10-27 10:50 +0100
[PATCH 11/11] pinctrl: Rename gpio driver from cygnus to iproc Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
[PATCH 04/11] dt-binding: Add new compatible string for gpio controller driver Pramod Kumar <pramodku@broadcom.com> - 2015-10-19 07:50 +0200
Re: [PATCH 04/11] dt-binding: Add new compatible string for gpio controller driver Rob Herring <robh+dt@kernel.org> - 2015-10-22 20:50 +0200
Re: [PATCH 04/11] dt-binding: Add new compatible string for gpio controller driver Linus Walleij <linus.walleij@linaro.org> - 2015-10-27 10:50 +0100
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 00/11] Generalized broadcom cygnus gpio driver |
| Message-ID | <qlbux-3xU-3@gated-at.bofh.it> |
Generalized pinctrl-cygnus-gpio driver so that it could be used for all
iProc architecture based future SoCs having same gpio pin controller.
Generalization process made the below changes in driver-
1. Removed pin mapping from driver and addressed this via DT through
"gpio-ranges" property.
2. Addressed number of pins from DT through "ngpios" property and removed
from driver.
3. Since all iProc based SoCs would use this driver hence renamed all
variables/macros/functions and even file name on iproc.
This patchset applies on v4.3-rc4 and is tested on cygnus SVK and could be
find at-
https://github.com/Broadcom/arm64-linux/tree/iproc-gpio-v1
Pramod Kumar (11):
dt-bindings: pinctrl: Optional DT property to support pin mappings
pinctrl: Remove GPIO to Pinctrl pin mapping from driver
dts: pinctrl: Add GPIO to Pinctrl pin mapping in DT
dt-binding: Add new compatible string for gpio controller driver
dt-binding: Add ngpios property to GPIO controller node
dts: define ngpios property in gpio controller's node
pinctrl: use ngpios propety from DT
pinctrl: Add new compatible string to GPIO controller driver
gpio: Rename func/macro/var to IP-block,iproc
Documentation: Rename gpio controller name from cygnus to iproc
pinctrl: Rename gpio driver from cygnus to iproc
.../{brcm,cygnus-gpio.txt => brcm,iproc-gpio.txt} | 25 +-
arch/arm/boot/dts/bcm-cygnus.dtsi | 56 +-
drivers/pinctrl/bcm/Kconfig | 30 +-
drivers/pinctrl/bcm/Makefile | 2 +-
drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 909 ---------------------
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 759 +++++++++++++++++
6 files changed, 854 insertions(+), 927 deletions(-)
rename Documentation/devicetree/bindings/pinctrl/{brcm,cygnus-gpio.txt => brcm,iproc-gpio.txt} (75%)
delete mode 100644 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 03/11] dts: pinctrl: Add GPIO to Pinctrl pin mapping in DT |
| Message-ID | <qlbuy-3xU-17@gated-at.bofh.it> |
| In reply to | #1250345 |
ASIU gpio controller's pins are muxed with pin-cntroller.
Add this mapping through property "gpio-ranges".
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
arch/arm/boot/dts/bcm-cygnus.dtsi | 53 +++++++++++++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index e1ac07a..6621f13 100644
--- a/arch/arm/boot/dts/bcm-cygnus.dtsi
+++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
@@ -84,10 +84,59 @@
#gpio-cells = <2>;
gpio-controller;
- pinmux = <&pinctrl>;
-
interrupt-controller;
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 42 1>,
+ <&pinctrl 1 44 3>,
+ <&pinctrl 4 48 1>,
+ <&pinctrl 5 50 3>,
+ <&pinctrl 8 126 1>,
+ <&pinctrl 9 155 1>,
+ <&pinctrl 10 152 1>,
+ <&pinctrl 11 154 1>,
+ <&pinctrl 12 153 1>,
+ <&pinctrl 13 127 3>,
+ <&pinctrl 16 140 1>,
+ <&pinctrl 17 145 7>,
+ <&pinctrl 24 130 10>,
+ <&pinctrl 34 141 4>,
+ <&pinctrl 38 54 1>,
+ <&pinctrl 39 56 3>,
+ <&pinctrl 42 60 3>,
+ <&pinctrl 45 64 3>,
+ <&pinctrl 48 68 2>,
+ <&pinctrl 50 84 6>,
+ <&pinctrl 56 94 6>,
+ <&pinctrl 62 72 1>,
+ <&pinctrl 63 70 1>,
+ <&pinctrl 64 80 1>,
+ <&pinctrl 65 74 3>,
+ <&pinctrl 68 78 1>,
+ <&pinctrl 69 82 1>,
+ <&pinctrl 70 156 17>,
+ <&pinctrl 87 104 12>,
+ <&pinctrl 99 102 2>,
+ <&pinctrl 101 90 4>,
+ <&pinctrl 105 116 6>,
+ <&pinctrl 111 100 2>,
+ <&pinctrl 113 122 4>,
+ <&pinctrl 123 11 1>,
+ <&pinctrl 124 38 4>,
+ <&pinctrl 128 43 1>,
+ <&pinctrl 129 47 1>,
+ <&pinctrl 130 49 1>,
+ <&pinctrl 131 53 1>,
+ <&pinctrl 132 55 1>,
+ <&pinctrl 133 59 1>,
+ <&pinctrl 134 63 1>,
+ <&pinctrl 135 67 1>,
+ <&pinctrl 136 71 1>,
+ <&pinctrl 137 73 1>,
+ <&pinctrl 138 77 1>,
+ <&pinctrl 139 79 1>,
+ <&pinctrl 140 81 1>,
+ <&pinctrl 141 83 1>,
+ <&pinctrl 142 10 1>;
};
amba {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-27 10:50 +0100 |
| Subject | Re: [PATCH 03/11] dts: pinctrl: Add GPIO to Pinctrl pin mapping in DT |
| Message-ID | <qo93c-3zz-5@gated-at.bofh.it> |
| In reply to | #1250346 |
On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@broadcom.com> wrote: > ASIU gpio controller's pins are muxed with pin-cntroller. > Add this mapping through property "gpio-ranges". > > Signed-off-by: Pramod Kumar <pramodku@broadcom.com> > Reviewed-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Please funnel this through the Broadcom Cygnus/ARM SoC tree. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 06/11] dts: define ngpios property in gpio controller's node |
| Message-ID | <qlbuy-3xU-19@gated-at.bofh.it> |
| In reply to | #1250345 |
Add ngpios property in cygnus ASIU, CCM and CRMU gpio controller's
node.
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
arch/arm/boot/dts/bcm-cygnus.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index 6621f13..d0fd050 100644
--- a/arch/arm/boot/dts/bcm-cygnus.dtsi
+++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
@@ -64,6 +64,7 @@
compatible = "brcm,cygnus-crmu-gpio";
reg = <0x03024800 0x50>,
<0x03024008 0x18>;
+ ngpios = <6>;
#gpio-cells = <2>;
gpio-controller;
};
@@ -72,6 +73,7 @@
compatible = "brcm,cygnus-ccm-gpio";
reg = <0x1800a000 0x50>,
<0x0301d164 0x20>;
+ ngpios = <24>;
#gpio-cells = <2>;
gpio-controller;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
@@ -81,6 +83,7 @@
gpio_asiu: gpio@180a5000 {
compatible = "brcm,cygnus-asiu-gpio";
reg = <0x180a5000 0x668>;
+ ngpios = <146>;
#gpio-cells = <2>;
gpio-controller;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qlbuy-3xU-21@gated-at.bofh.it> |
| In reply to | #1250345 |
Since identical hardware is used in several instances and all pins
are not routed to pinctrl hence getting total number of gpios from
DT make more sense hence stop using total number of gpios pins from
drivers and extract it from DT.
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 45 +++++++------------------------
1 file changed, 9 insertions(+), 36 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
index 12a48f4..498a58a 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
@@ -642,35 +642,11 @@ static void cygnus_gpio_unregister_pinconf(struct cygnus_gpio *chip)
pinctrl_unregister(chip->pctl);
}
-struct cygnus_gpio_data {
- unsigned num_gpios;
-};
-
-static const struct cygnus_gpio_data cygnus_cmm_gpio_data = {
- .num_gpios = 24,
-};
-
-static const struct cygnus_gpio_data cygnus_asiu_gpio_data = {
- .num_gpios = 146,
-};
-
-static const struct cygnus_gpio_data cygnus_crmu_gpio_data = {
- .num_gpios = 6,
-};
-
static const struct of_device_id cygnus_gpio_of_match[] = {
- {
- .compatible = "brcm,cygnus-ccm-gpio",
- .data = &cygnus_cmm_gpio_data,
- },
- {
- .compatible = "brcm,cygnus-asiu-gpio",
- .data = &cygnus_asiu_gpio_data,
- },
- {
- .compatible = "brcm,cygnus-crmu-gpio",
- .data = &cygnus_crmu_gpio_data,
- }
+ { .compatible = "brcm,cygnus-ccm-gpio" },
+ { .compatible = "brcm,cygnus-asiu-gpio" },
+ { .compatible = "brcm,cygnus-crmu-gpio" },
+ { }
};
static int cygnus_gpio_probe(struct platform_device *pdev)
@@ -681,14 +657,6 @@ static int cygnus_gpio_probe(struct platform_device *pdev)
struct gpio_chip *gc;
u32 ngpios;
int irq, ret;
- const struct of_device_id *match;
- const struct cygnus_gpio_data *gpio_data;
-
- match = of_match_device(cygnus_gpio_of_match, dev);
- if (!match)
- return -ENODEV;
- gpio_data = match->data;
- ngpios = gpio_data->num_gpios;
chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
@@ -713,6 +681,11 @@ static int cygnus_gpio_probe(struct platform_device *pdev)
}
}
+ if (of_property_read_u32(dev->of_node, "ngpios", &ngpios)) {
+ dev_err(&pdev->dev, "missing ngpios DT property\n");
+ return -ENODEV;
+ }
+
spin_lock_init(&chip->lock);
gc = &chip->gc;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-27 11:00 +0100 |
| Subject | Re: [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qo9cT-3CL-19@gated-at.bofh.it> |
| In reply to | #1250349 |
On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@broadcom.com> wrote: > Since identical hardware is used in several instances and all pins > are not routed to pinctrl hence getting total number of gpios from > DT make more sense hence stop using total number of gpios pins from > drivers and extract it from DT. > > Signed-off-by: Pramod Kumar <pramodku@broadcom.com> > Reviewed-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> This patch is wrong. Keep this per-compatible code, and only overrid the ngpios if and only if: - The ngpios is set in the DT node - The ngpios in the DT node is *smaller* than the hardware defined number of GPIOs. ngpios is for restricting the number of available lines due to routing etc, not to define what the hardware has, because the hardware most certainly have all the lines, it's just that you're not using all of them. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-28 13:00 +0100 |
| Subject | RE: [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qoxyx-28r-9@gated-at.bofh.it> |
| In reply to | #1256641 |
SGkgTGludXMsDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogTGludXMg V2FsbGVpaiBbbWFpbHRvOmxpbnVzLndhbGxlaWpAbGluYXJvLm9yZ10NCj4gU2VudDogMjcgT2N0 b2JlciAyMDE1IDE1OjIyDQo+IFRvOiBQcmFtb2QgS3VtYXINCj4gQ2M6IFJvYiBIZXJyaW5nOyBQ YXdlbCBNb2xsOyBNYXJrIFJ1dGxhbmQ7IElhbiBDYW1wYmVsbDsgS3VtYXIgR2FsYTsgUmF5IEp1 aTsNCj4gU2NvdHQgQnJhbmRlbjsgUnVzc2VsbCBLaW5nOyBsaW51eC1ncGlvQHZnZXIua2VybmVs Lm9yZzsgYmNtLWtlcm5lbC1mZWVkYmFjay0NCj4gbGlzdDsgSmFzb24gVXk7IE1hc2FoaXJvIFlh bWFkYTsgVGhvbWFzIEdsZWl4bmVyOyBMYXVyZW50IFBpbmNoYXJ0Ow0KPiBkZXZpY2V0cmVlQHZn ZXIua2VybmVsLm9yZzsgbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3JnOyBsaW51 eC0NCj4ga2VybmVsQHZnZXIua2VybmVsLm9yZzsgSm9uYXMgR29yc2tpDQo+IFN1YmplY3Q6IFJl OiBbUEFUQ0ggMDcvMTFdIHBpbmN0cmw6IHVzZSBuZ3Bpb3MgcHJvcGV0eSBmcm9tIERUDQo+IA0K PiBPbiBNb24sIE9jdCAxOSwgMjAxNSBhdCA3OjQzIEFNLCBQcmFtb2QgS3VtYXIgPHByYW1vZGt1 QGJyb2FkY29tLmNvbT4NCj4gd3JvdGU6DQo+IA0KPiA+IFNpbmNlIGlkZW50aWNhbCBoYXJkd2Fy ZSBpcyB1c2VkIGluIHNldmVyYWwgaW5zdGFuY2VzIGFuZCBhbGwgcGlucyBhcmUNCj4gPiBub3Qg cm91dGVkIHRvIHBpbmN0cmwgaGVuY2UgZ2V0dGluZyB0b3RhbCBudW1iZXIgb2YgZ3Bpb3MgZnJv bSBEVCBtYWtlDQo+ID4gbW9yZSBzZW5zZSBoZW5jZSBzdG9wIHVzaW5nIHRvdGFsIG51bWJlciBv ZiBncGlvcyBwaW5zIGZyb20gZHJpdmVycw0KPiA+IGFuZCBleHRyYWN0IGl0IGZyb20gRFQuDQo+ ID4NCj4gPiBTaWduZWQtb2ZmLWJ5OiBQcmFtb2QgS3VtYXIgPHByYW1vZGt1QGJyb2FkY29tLmNv bT4NCj4gPiBSZXZpZXdlZC1ieTogUmF5IEp1aSA8cmp1aUBicm9hZGNvbS5jb20+DQo+ID4gUmV2 aWV3ZWQtYnk6IFNjb3R0IEJyYW5kZW4gPHNicmFuZGVuQGJyb2FkY29tLmNvbT4NCj4gDQo+IFRo aXMgcGF0Y2ggaXMgd3JvbmcuDQo+IA0KPiBLZWVwIHRoaXMgcGVyLWNvbXBhdGlibGUgY29kZSwg YW5kIG9ubHkgb3ZlcnJpZCB0aGUgbmdwaW9zIGlmIGFuZCBvbmx5IGlmOg0KPiANCj4gLSBUaGUg bmdwaW9zIGlzIHNldCBpbiB0aGUgRFQgbm9kZQ0KPiAtIFRoZSBuZ3Bpb3MgaW4gdGhlIERUIG5v ZGUgaXMgKnNtYWxsZXIqIHRoYW4gdGhlIGhhcmR3YXJlDQo+ICAgZGVmaW5lZCBudW1iZXIgb2Yg R1BJT3MuDQo+IA0KPiBuZ3Bpb3MgaXMgZm9yIHJlc3RyaWN0aW5nIHRoZSBudW1iZXIgb2YgYXZh aWxhYmxlIGxpbmVzIGR1ZSB0byByb3V0aW5nIGV0Yywgbm90IHRvDQo+IGRlZmluZSB3aGF0IHRo ZSBoYXJkd2FyZSBoYXMsIGJlY2F1c2UgdGhlIGhhcmR3YXJlIG1vc3QgY2VydGFpbmx5IGhhdmUg YWxsIHRoZQ0KPiBsaW5lcywgaXQncyBqdXN0IHRoYXQgeW91J3JlIG5vdCB1c2luZyBhbGwgb2Yg dGhlbS4NCj4gDQo+IFlvdXJzLA0KPiBMaW51cyBXYWxsZWlqDQoNCkkgZGlzY3Vzc2VkIHdpdGgg QVNJQyB0ZWFtIHJlZ2FyZGluZyB0aGlzIGlQcm9jIEdQSU8gYmxvY2suIFRoZXkgdXNlIGEgbGli cmFyeSB0byBjcmVhdGUgdGhlIEdQSU9zIGJsb2NrIHdoZXJlICJ0b3RhbCBudW1iZXIgb2YgR1BJ TyBwaW5zKCBsZXQgc2F5IE4pIGluIEdQSU8gYmxvY2siIGlzIHVzZWQgYXMgYW4gcGFyYW1ldGVy LiANCkxpYnJhcnkgdXNlcyBhIGNvbnN0cnVjdCBmb3IgKmEqIEdQSU8gcGluLiBUaGlzIGdldHMg aW5zdGFudGlhdGVkIE4gdGltZXMgdG8gY3JlYXRlIGEgY29tcGxldGUgR1BJTyBibG9jayB3aXRo IE4gcGlucy4NCg0KQWxsIGlQcm9jIGJhc2VkIFNvQ3MgdXNlcyB0aGlzIGxpYnJhcnkuIFNvIEkn bSBub3Qgc3VyZSB3aGV0aGVyIGF0dGFjaGluZyAidG90YWwgbnVtYmVyIG9mIEdQSU9zIHBpbnMi IHRvIGNvbXBhdGlibGUtc3RyaW5nIG1ha2Ugc2Vuc2UgaW4gdGhpcyBjYXNlLiANCkkgcGVyc29u YWxseSBmZWVsIHRoYXQgcGFzc2luZyB0aGlzIG51bWJlciBmcm9tIHRoZSBEVCBtYWtlcyBtb3Jl IHNlbnNlIGhlcmUuIEFueSBpUHJvYyBiYXNlZCBmdXR1cmUgYXMgd2VsbCBhcyBjdXJyZW50IFNv Q3Mgd291bGQgYmUgYWJsZSB0byB1c2UgdGhpcyBkcml2ZXIgd2l0aG91dCBhbnkgY2hhbmdlLg0K DQpQbGVhc2UgYWR2aXNlIHVzIGluIHRoaXMgY2FzZS4NCg0KUmVnYXJkcywNClByYW1vZA0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ray Jui <rjui@broadcom.com> |
|---|---|
| Date | 2015-10-28 16:50 +0100 |
| Subject | Re: [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qoB98-4v0-17@gated-at.bofh.it> |
| In reply to | #1257940 |
On 10/28/2015 4:52 AM, Pramod Kumar wrote: > Hi Linus, > >> -----Original Message----- >> From: Linus Walleij [mailto:linus.walleij@linaro.org] >> Sent: 27 October 2015 15:22 >> To: Pramod Kumar >> Cc: Rob Herring; Pawel Moll; Mark Rutland; Ian Campbell; Kumar Gala; Ray Jui; >> Scott Branden; Russell King; linux-gpio@vger.kernel.org; bcm-kernel-feedback- >> list; Jason Uy; Masahiro Yamada; Thomas Gleixner; Laurent Pinchart; >> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux- >> kernel@vger.kernel.org; Jonas Gorski >> Subject: Re: [PATCH 07/11] pinctrl: use ngpios propety from DT >> >> On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@broadcom.com> >> wrote: >> >>> Since identical hardware is used in several instances and all pins are >>> not routed to pinctrl hence getting total number of gpios from DT make >>> more sense hence stop using total number of gpios pins from drivers >>> and extract it from DT. >>> >>> Signed-off-by: Pramod Kumar <pramodku@broadcom.com> >>> Reviewed-by: Ray Jui <rjui@broadcom.com> >>> Reviewed-by: Scott Branden <sbranden@broadcom.com> >> >> This patch is wrong. >> >> Keep this per-compatible code, and only overrid the ngpios if and only if: >> >> - The ngpios is set in the DT node >> - The ngpios in the DT node is *smaller* than the hardware >> defined number of GPIOs. >> >> ngpios is for restricting the number of available lines due to routing etc, not to >> define what the hardware has, because the hardware most certainly have all the >> lines, it's just that you're not using all of them. >> >> Yours, >> Linus Walleij > > I discussed with ASIC team regarding this iProc GPIO block. They use a library to create the GPIOs block where "total number of GPIO pins( let say N) in GPIO block" is used as an parameter. > Library uses a construct for *a* GPIO pin. This gets instantiated N times to create a complete GPIO block with N pins. Just to confirm, N can be *any number*, and when it exceeds 32, additional registers will be created by the library, correct? I think that's what I saw with Cygnus, where 3 instances of this GPIO controller was used, with two of them less supporting less than 32 GPIOs and one of them (ASIU) supporting 146 GPIOs, in which case, 5 register banks are used with 0x200 segment each. > > All iProc based SoCs uses this library. So I'm not sure whether attaching "total number of GPIOs pins" to compatible-string make sense in this case. The closest I can think of is to tie a very large number of N to the "brcm,iproc-gpio" compatible string for all new iProc SoCs, but even that, one can argue how large is *large* > I personally feel that passing this number from the DT makes more sense here. Any iProc based future as well as current SoCs would be able to use this driver without any change. > > Please advise us in this case. > > Regards, > Pramod > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-29 15:40 +0100 |
| Subject | Re: [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qoWwV-1lC-19@gated-at.bofh.it> |
| In reply to | #1257940 |
On Wed, Oct 28, 2015 at 12:52 PM, Pramod Kumar <pramodku@broadcom.com> wrote: > I discussed with ASIC team regarding this iProc GPIO block. They use a library to create the GPIOs block where "total number of GPIO pins( let say N) in GPIO block" is used as an parameter. > Library uses a construct for *a* GPIO pin. This gets instantiated N times to create a complete GPIO block with N pins. > > All iProc based SoCs uses this library. So I'm not sure whether attaching "total number of GPIOs pins" to compatible-string make sense in this case. > I personally feel that passing this number from the DT makes more sense here. Any iProc based future as well as current SoCs would be able to use this driver without any change. > > Please advise us in this case. Hm! You make a good case. But this contradicts the traditional use of ngpios. But on the other hand: git grep ngpio Documentation/devicetree/bindings/gpio/ Gives at hand that the use of ngpio[s] is a complete mess. :( I will think about patching the standard bindings to fix this mess and include your case. Give me some time. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jonas Gorski <jogo@openwrt.org> |
|---|---|
| Date | 2015-10-29 15:50 +0100 |
| Subject | Re: [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qoWGC-1rT-23@gated-at.bofh.it> |
| In reply to | #1258833 |
On 29.10.2015 15:36, Linus Walleij wrote: > On Wed, Oct 28, 2015 at 12:52 PM, Pramod Kumar <pramodku@broadcom.com> wrote: > >> I discussed with ASIC team regarding this iProc GPIO block. They use a library to create the GPIOs block where "total number of GPIO pins( let say N) in GPIO block" is used as an parameter. >> Library uses a construct for *a* GPIO pin. This gets instantiated N times to create a complete GPIO block with N pins. >> >> All iProc based SoCs uses this library. So I'm not sure whether attaching "total number of GPIOs pins" to compatible-string make sense in this case. >> I personally feel that passing this number from the DT makes more sense here. Any iProc based future as well as current SoCs would be able to use this driver without any change. >> >> Please advise us in this case. > > Hm! You make a good case. > > But this contradicts the traditional use of ngpios. > > But on the other hand: > git grep ngpio Documentation/devicetree/bindings/gpio/ > > Gives at hand that the use of ngpio[s] is a complete mess. > > :( > > I will think about patching the standard bindings to fix this mess > and include your case. Give me some time. Using ngpios to restrict the amount of actually available GPIOs from the possible amount of GPIOs seems a rather limited use, as rerouted gpios are seldom at the end of the GPIO space. So maybe it makes more sense to use ngpio as the number of possible gpios and then have an additional "reserved-gpios" bitmask / list of unavailable gpios? Ideally those would be just consumed by a pinctrl instance, but I guess that these are sometimes controlled through pinstrapping, so there might be no driver to attach to them. Regards Jonas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-30 12:10 +0100 |
| Subject | Re: [PATCH 07/11] pinctrl: use ngpios propety from DT |
| Message-ID | <qpfJf-55G-9@gated-at.bofh.it> |
| In reply to | #1258845 |
On Thu, Oct 29, 2015 at 3:47 PM, Jonas Gorski <jogo@openwrt.org> wrote: > Using ngpios to restrict the amount of actually available GPIOs from > the possible amount of GPIOs seems a rather limited use, as rerouted > gpios are seldom at the end of the GPIO space. I need an example. > So maybe it makes more sense to use ngpio as the number of > possible gpios and then have an additional "reserved-gpios" > bitmask / list of unavailable gpios? This idea is good, but let's not make upfront design until we have a piece of hardware that requires exactly this. I sent a patch to the gpio.txt binding including a diplomatic statement on this... > Ideally those would be just consumed by a pinctrl instance, but I > guess that these are sometimes controlled through pinstrapping, > so there might be no driver to attach to them. Uhmm.... Not quite following but all right... With gpio ranges the GPIO to pins are mapped, and they can switch functions at runtime. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 08/11] pinctrl: Add new compatible string to GPIO controller driver |
| Message-ID | <qlbuy-3xU-23@gated-at.bofh.it> |
| In reply to | #1250345 |
This compatible string should be used for all new iproc based future
SoCs having the same GPIO controller hardware.
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
index 498a58a..d0d788f 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
@@ -646,6 +646,7 @@ static const struct of_device_id cygnus_gpio_of_match[] = {
{ .compatible = "brcm,cygnus-ccm-gpio" },
{ .compatible = "brcm,cygnus-asiu-gpio" },
{ .compatible = "brcm,cygnus-crmu-gpio" },
+ { .compatible = "brcm,iproc-gpio" },
{ }
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-27 11:00 +0100 |
| Subject | Re: [PATCH 08/11] pinctrl: Add new compatible string to GPIO controller driver |
| Message-ID | <qo9cS-3CL-11@gated-at.bofh.it> |
| In reply to | #1250350 |
On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@broadcom.com> wrote: > This compatible string should be used for all new iproc based future > SoCs having the same GPIO controller hardware. > > Signed-off-by: Pramod Kumar <pramodku@broadcom.com> > Reviewed-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> Stopped applying patches, this looks OK but you will have to rebase the series on my "devel" branch, addressing the review comments. Yours, Linus Wallewij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 02/11] pinctrl: Remove GPIO to Pinctrl pin mapping from driver |
| Message-ID | <qlbuy-3xU-25@gated-at.bofh.it> |
| In reply to | #1250345 |
Remove gpio to pinctrl pin mapping code from driver and
address this through standard property "gpio-ranges".
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 131 +-----------------------------
1 file changed, 3 insertions(+), 128 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
index 1ca7830..12a48f4 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
@@ -29,7 +29,6 @@
#include <linux/of_device.h>
#include <linux/of_irq.h>
#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
@@ -597,127 +596,6 @@ static const struct pinconf_ops cygnus_pconf_ops = {
};
/*
- * Map a GPIO in the local gpio_chip pin space to a pin in the Cygnus IOMUX
- * pinctrl pin space
- */
-struct cygnus_gpio_pin_range {
- unsigned offset;
- unsigned pin_base;
- unsigned num_pins;
-};
-
-#define CYGNUS_PINRANGE(o, p, n) { .offset = o, .pin_base = p, .num_pins = n }
-
-/*
- * Pin mapping table for mapping local GPIO pins to Cygnus IOMUX pinctrl pins
- */
-static const struct cygnus_gpio_pin_range cygnus_gpio_pintable[] = {
- CYGNUS_PINRANGE(0, 42, 1),
- CYGNUS_PINRANGE(1, 44, 3),
- CYGNUS_PINRANGE(4, 48, 1),
- CYGNUS_PINRANGE(5, 50, 3),
- CYGNUS_PINRANGE(8, 126, 1),
- CYGNUS_PINRANGE(9, 155, 1),
- CYGNUS_PINRANGE(10, 152, 1),
- CYGNUS_PINRANGE(11, 154, 1),
- CYGNUS_PINRANGE(12, 153, 1),
- CYGNUS_PINRANGE(13, 127, 3),
- CYGNUS_PINRANGE(16, 140, 1),
- CYGNUS_PINRANGE(17, 145, 7),
- CYGNUS_PINRANGE(24, 130, 10),
- CYGNUS_PINRANGE(34, 141, 4),
- CYGNUS_PINRANGE(38, 54, 1),
- CYGNUS_PINRANGE(39, 56, 3),
- CYGNUS_PINRANGE(42, 60, 3),
- CYGNUS_PINRANGE(45, 64, 3),
- CYGNUS_PINRANGE(48, 68, 2),
- CYGNUS_PINRANGE(50, 84, 6),
- CYGNUS_PINRANGE(56, 94, 6),
- CYGNUS_PINRANGE(62, 72, 1),
- CYGNUS_PINRANGE(63, 70, 1),
- CYGNUS_PINRANGE(64, 80, 1),
- CYGNUS_PINRANGE(65, 74, 3),
- CYGNUS_PINRANGE(68, 78, 1),
- CYGNUS_PINRANGE(69, 82, 1),
- CYGNUS_PINRANGE(70, 156, 17),
- CYGNUS_PINRANGE(87, 104, 12),
- CYGNUS_PINRANGE(99, 102, 2),
- CYGNUS_PINRANGE(101, 90, 4),
- CYGNUS_PINRANGE(105, 116, 6),
- CYGNUS_PINRANGE(111, 100, 2),
- CYGNUS_PINRANGE(113, 122, 4),
- CYGNUS_PINRANGE(123, 11, 1),
- CYGNUS_PINRANGE(124, 38, 4),
- CYGNUS_PINRANGE(128, 43, 1),
- CYGNUS_PINRANGE(129, 47, 1),
- CYGNUS_PINRANGE(130, 49, 1),
- CYGNUS_PINRANGE(131, 53, 1),
- CYGNUS_PINRANGE(132, 55, 1),
- CYGNUS_PINRANGE(133, 59, 1),
- CYGNUS_PINRANGE(134, 63, 1),
- CYGNUS_PINRANGE(135, 67, 1),
- CYGNUS_PINRANGE(136, 71, 1),
- CYGNUS_PINRANGE(137, 73, 1),
- CYGNUS_PINRANGE(138, 77, 1),
- CYGNUS_PINRANGE(139, 79, 1),
- CYGNUS_PINRANGE(140, 81, 1),
- CYGNUS_PINRANGE(141, 83, 1),
- CYGNUS_PINRANGE(142, 10, 1)
-};
-
-/*
- * The Cygnus IOMUX controller mainly supports group based mux configuration,
- * but certain pins can be muxed to GPIO individually. Only the ASIU GPIO
- * controller can support this, so it's an optional configuration
- *
- * Return -ENODEV means no support and that's fine
- */
-static int cygnus_gpio_pinmux_add_range(struct cygnus_gpio *chip)
-{
- struct device_node *node = chip->dev->of_node;
- struct device_node *pinmux_node;
- struct platform_device *pinmux_pdev;
- struct gpio_chip *gc = &chip->gc;
- int i, ret = 0;
-
- /* parse DT to find the phandle to the pinmux controller */
- pinmux_node = of_parse_phandle(node, "pinmux", 0);
- if (!pinmux_node)
- return -ENODEV;
-
- pinmux_pdev = of_find_device_by_node(pinmux_node);
- /* no longer need the pinmux node */
- of_node_put(pinmux_node);
- if (!pinmux_pdev) {
- dev_err(chip->dev, "failed to get pinmux device\n");
- return -EINVAL;
- }
-
- /* now need to create the mapping between local GPIO and PINMUX pins */
- for (i = 0; i < ARRAY_SIZE(cygnus_gpio_pintable); i++) {
- ret = gpiochip_add_pin_range(gc, dev_name(&pinmux_pdev->dev),
- cygnus_gpio_pintable[i].offset,
- cygnus_gpio_pintable[i].pin_base,
- cygnus_gpio_pintable[i].num_pins);
- if (ret) {
- dev_err(chip->dev, "unable to add GPIO pin range\n");
- goto err_put_device;
- }
- }
-
- chip->pinmux_is_supported = true;
-
- /* no need for pinmux_pdev device reference anymore */
- put_device(&pinmux_pdev->dev);
- return 0;
-
-err_put_device:
- put_device(&pinmux_pdev->dev);
- gpiochip_remove_pin_ranges(gc);
- return ret;
-}
-
-/*
* Cygnus GPIO controller supports some PINCONF related configurations such as
* pull up, pull down, and drive strength, when the pin is configured to GPIO
*
@@ -851,18 +729,15 @@ static int cygnus_gpio_probe(struct platform_device *pdev)
gc->set = cygnus_gpio_set;
gc->get = cygnus_gpio_get;
+ chip->pinmux_is_supported = of_property_read_bool(dev->of_node,
+ "gpio-ranges");
+
ret = gpiochip_add(gc);
if (ret < 0) {
dev_err(dev, "unable to add GPIO chip\n");
return ret;
}
- ret = cygnus_gpio_pinmux_add_range(chip);
- if (ret && ret != -ENODEV) {
- dev_err(dev, "unable to add GPIO pin range\n");
- goto err_rm_gpiochip;
- }
-
ret = cygnus_gpio_register_pinconf(chip);
if (ret) {
dev_err(dev, "unable to register pinconf\n");
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-27 10:50 +0100 |
| Subject | Re: [PATCH 02/11] pinctrl: Remove GPIO to Pinctrl pin mapping from driver |
| Message-ID | <qo93c-3zz-19@gated-at.bofh.it> |
| In reply to | #1250351 |
On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@broadcom.com> wrote: > Remove gpio to pinctrl pin mapping code from driver and > address this through standard property "gpio-ranges". > > Signed-off-by: Pramod Kumar <pramodku@broadcom.com> > Reviewed-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> Patch applied with a small subject tweak. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 11/11] pinctrl: Rename gpio driver from cygnus to iproc |
| Message-ID | <qlbuz-3xU-27@gated-at.bofh.it> |
| In reply to | #1250345 |
Rename gpio driver file name from pinctrl-cygnus-gpio.c to
pinctrl-iproc-gpio.c to make it more generic so that all
iproc based future SoCs using the same gpio block could
use this driver.
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
drivers/pinctrl/bcm/Kconfig | 30 ++++++++++++++++------
drivers/pinctrl/bcm/Makefile | 2 +-
...{pinctrl-cygnus-gpio.c => pinctrl-iproc-gpio.c} | 3 +--
3 files changed, 24 insertions(+), 11 deletions(-)
rename drivers/pinctrl/bcm/{pinctrl-cygnus-gpio.c => pinctrl-iproc-gpio.c} (99%)
diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig
index cd11d4d..5949547 100644
--- a/drivers/pinctrl/bcm/Kconfig
+++ b/drivers/pinctrl/bcm/Kconfig
@@ -20,27 +20,41 @@ config PINCTRL_BCM2835
select PINMUX
select PINCONF
-config PINCTRL_CYGNUS_GPIO
- bool "Broadcom Cygnus GPIO (with PINCONF) driver"
- depends on OF_GPIO && ARCH_BCM_CYGNUS
+config PINCTRL_IPROC_GPIO
+ bool "Broadcom iProc GPIO (with PINCONF) driver"
+ depends on OF_GPIO && (ARCH_BCM_IPROC || COMPILE_TEST)
select GPIOLIB_IRQCHIP
select PINCONF
select GENERIC_PINCONF
- default ARCH_BCM_CYGNUS
+ default ARCH_BCM_IPROC
help
- Say yes here to enable the Broadcom Cygnus GPIO driver.
+ Say yes here to enable the Broadcom iProc GPIO driver.
+
+ The Broadcom iProc based SoCs- Cygnus, NS2, NSP and Stingray, use
+ same GPIO Controller IP hence this driver could be used for all.
The Broadcom Cygnus SoC has 3 GPIO controllers including the ASIU
GPIO controller (ASIU), the chipCommonG GPIO controller (CCM), and
the always-ON GPIO controller (CRMU/AON). All 3 GPIO controllers are
supported by this driver.
- All 3 Cygnus GPIO controllers support basic PINCONF functions such
+ The Broadcom NSP has two GPIO controllers including the ChipcommonA
+ GPIO, the ChipcommonB GPIO. Later controller is supported by this
+ driver.
+
+ The Broadcom NS2 has two GPIO controller including the CRMU GPIO,
+ the ChipcommonG GPIO. Both controllers are supported by this driver.
+
+ The Broadcom Stingray GPIO controllers are supported by this driver.
+
+ All above SoCs GPIO controllers support basic PINCONF functions such
as bias pull up, pull down, and drive strength configurations, when
these pins are muxed to GPIO.
- Pins from the ASIU GPIO can be individually muxed to GPIO function,
- through interaction with the Cygnus IOMUX controller.
+ It provides the framework where pins from the individual GPIO can be
+ individually muxed to GPIO function, through interaction with the
+ SoCs IOMUX controller. This features could be used only on SoCs which
+ support individual pin muxing.
config PINCTRL_CYGNUS_MUX
bool "Broadcom Cygnus IOMUX driver"
diff --git a/drivers/pinctrl/bcm/Makefile b/drivers/pinctrl/bcm/Makefile
index 2b2f70e..9ac6370 100644
--- a/drivers/pinctrl/bcm/Makefile
+++ b/drivers/pinctrl/bcm/Makefile
@@ -2,5 +2,5 @@
obj-$(CONFIG_PINCTRL_BCM281XX) += pinctrl-bcm281xx.o
obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o
-obj-$(CONFIG_PINCTRL_CYGNUS_GPIO) += pinctrl-cygnus-gpio.o
+obj-$(CONFIG_PINCTRL_IPROC_GPIO) += pinctrl-iproc-gpio.o
obj-$(CONFIG_PINCTRL_CYGNUS_MUX) += pinctrl-cygnus-mux.o
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
similarity index 99%
rename from drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
rename to drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index ed21ab2..de09859 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -531,8 +531,7 @@ static int iproc_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin,
ret = iproc_gpio_get_strength(chip, gpio, &arg);
if (ret)
return ret;
- else
- *config = pinconf_to_config_packed(param, arg);
+ *config = pinconf_to_config_packed(param, arg);
return 0;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pramod Kumar <pramodku@broadcom.com> |
|---|---|
| Date | 2015-10-19 07:50 +0200 |
| Subject | [PATCH 04/11] dt-binding: Add new compatible string for gpio controller driver |
| Message-ID | <qlbuz-3xU-29@gated-at.bofh.it> |
| In reply to | #1250345 |
This new compatible string, "brcm,iproc-gpio", should be used for
all new iproc-based future SoCs.
Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
index 25a5002..f92b833 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
@@ -3,8 +3,8 @@ Broadcom Cygnus GPIO/PINCONF Controller
Required properties:
- compatible:
- Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or
- "brcm,cygnus-crmu-gpio"
+ Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio",
+"brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio"
- reg:
Define the base and range of the I/O address space that contains the Cygnus
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh+dt@kernel.org> |
|---|---|
| Date | 2015-10-22 20:50 +0200 |
| Subject | Re: [PATCH 04/11] dt-binding: Add new compatible string for gpio controller driver |
| Message-ID | <qmt61-2wa-7@gated-at.bofh.it> |
| In reply to | #1250353 |
On Mon, Oct 19, 2015 at 12:43 AM, Pramod Kumar <pramodku@broadcom.com> wrote: > This new compatible string, "brcm,iproc-gpio", should be used for > all new iproc-based future SoCs. Can't predict the future and crazy whims of hardware designers. This is fine for matching, but you should also have a SOC specific string. > Signed-off-by: Pramod Kumar <pramodku@broadcom.com> > Reviewed-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> > --- > Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt > index 25a5002..f92b833 100644 > --- a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt > +++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt > @@ -3,8 +3,8 @@ Broadcom Cygnus GPIO/PINCONF Controller > Required properties: > > - compatible: > - Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or > - "brcm,cygnus-crmu-gpio" > + Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", > +"brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio" > > - reg: > Define the base and range of the I/O address space that contains the Cygnus > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-27 10:50 +0100 |
| Subject | Re: [PATCH 04/11] dt-binding: Add new compatible string for gpio controller driver |
| Message-ID | <qo93c-3zz-15@gated-at.bofh.it> |
| In reply to | #1250353 |
On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@broadcom.com> wrote: > This new compatible string, "brcm,iproc-gpio", should be used for > all new iproc-based future SoCs. > > Signed-off-by: Pramod Kumar <pramodku@broadcom.com> > Reviewed-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> Patch applied with subject tweak. Think about Rob's comment to add an overarching SoC compatible string, please. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web