diff mbox

[v2,14/18] arm64: dts: ulcb-kf: enable PCA9539 on I2C2

Message ID 1505398760-4774-1-git-send-email-vladimir.barinov@cogentembedded.com (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Vladimir Barinov Sept. 14, 2017, 2:19 p.m. UTC
This supports PCA9539 gpio expanders on I2C2 bus on ULCB Kingfisher board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
Changes in version 2:
- use generic node name "gpio"

 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Geert Uytterhoeven Sept. 20, 2017, 1:44 p.m. UTC | #1
Hi Vladimir,

On Thu, Sep 14, 2017 at 4:19 PM, Vladimir Barinov
<vladimir.barinov@cogentembedded.com> wrote:
> This supports PCA9539 gpio expanders on I2C2 bus on ULCB Kingfisher board
>
> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
> +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
> @@ -48,6 +48,28 @@
>         status = "okay";
>  };
>
> +&i2c2 {
> +       gpio_exp_74: gpio@74 {
> +               compatible = "nxp,pca9539";

According to the schematics, this is the TI TCA9539, an enhanced version
of the NXP PCA9539. So I'd expect "ti,tca9539".

However, using the latter may not work (I didn't try), as pca953x_id[]
lists both parts, while pca953x_dt_ids[] lists only the NXP part number.

> +               reg = <0x74>;
> +               gpio-controller;
> +               #gpio-cells = <2>;
> +               interrupt-controller;
> +               interrupt-parent = <&gpio6>;
> +               interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
> +       };
> +
> +       gpio_exp_75: gpio@75 {
> +               compatible = "nxp,pca9539";

Likewise.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Vladimir Barinov Oct. 6, 2017, 2:40 a.m. UTC | #2
Hi Geert,

On 20.09.2017 16:44, Geert Uytterhoeven wrote:
> Hi Vladimir,
>
> On Thu, Sep 14, 2017 at 4:19 PM, Vladimir Barinov
> <vladimir.barinov@cogentembedded.com> wrote:
>> This supports PCA9539 gpio expanders on I2C2 bus on ULCB Kingfisher board
>>
>> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>> --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
>> +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
>> @@ -48,6 +48,28 @@
>>          status = "okay";
>>   };
>>
>> +&i2c2 {
>> +       gpio_exp_74: gpio@74 {
>> +               compatible = "nxp,pca9539";
> According to the schematics, this is the TI TCA9539, an enhanced version
> of the NXP PCA9539. So I'd expect "ti,tca9539".
>
> However, using the latter may not work (I didn't try), as pca953x_id[]
> lists both parts, while pca953x_dt_ids[] lists only the NXP part number.
It works with "ti,tca9539"
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
index 71dee77..40885e7 100644
--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
@@ -48,6 +48,28 @@ 
 	status = "okay";
 };
 
+&i2c2 {
+	gpio_exp_74: gpio@74 {
+		compatible = "nxp,pca9539";
+		reg = <0x74>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-controller;
+		interrupt-parent = <&gpio6>;
+		interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
+	};
+
+	gpio_exp_75: gpio@75 {
+		compatible = "nxp,pca9539";
+		reg = <0x75>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-controller;
+		interrupt-parent = <&gpio6>;
+		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+	};
+};
+
 &ohci0 {
 	status = "okay";
 };