Skip to content

Commit 0fcc507

Browse files
pelwellrajeshkumarwr
authored andcommitted
overlays: Force IRQ pins to inputs
commit 4ff654e437ab356b86fc0df4665997886b94e6ec from https://github.com/raspberrypi/linux.git rpi-6.6.y Requesting a GPIO as an interrupt source does not automatically make it an input (or even a GPIO pin). Add the necessary pinctrl nodes to the overlays that don't already do this. See: raspberrypi/linux#6106 Signed-off-by: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
1 parent f0b3f2e commit 0fcc507

5 files changed

+79
-9
lines changed

arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi

+23-4
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@
307307
maxim,ir-led-current-microamp = <7000>;
308308
interrupt-parent = <&gpio>;
309309
interrupts = <4 2>;
310+
pinctrl-0 = <&int_pins>;
311+
pinctrl-names = "default";
310312
};
311313
};
312314
};
@@ -436,6 +438,8 @@
436438
reg = <0x68>;
437439
interrupt-parent = <&gpio>;
438440
interrupts = <4 2>;
441+
pinctrl-0 = <&int_pins>;
442+
pinctrl-names = "default";
439443
};
440444
};
441445
};
@@ -453,6 +457,8 @@
453457
reg = <0x68>;
454458
interrupt-parent = <&gpio>;
455459
interrupts = <4 2>;
460+
pinctrl-0 = <&int_pins>;
461+
pinctrl-names = "default";
456462
};
457463
};
458464
};
@@ -523,6 +529,17 @@
523529
};
524530
};
525531

532+
fragment@99 {
533+
target = <&gpio>;
534+
__dormant__ {
535+
int_pins: int_pins@4 {
536+
brcm,pins = <4>;
537+
brcm,function = <0>; /* in */
538+
brcm,pull = <0>; /* none */
539+
};
540+
};
541+
};
542+
526543
__overrides__ {
527544
bme280 = <0>,"+0";
528545
bmp085 = <0>,"+1";
@@ -545,7 +562,7 @@
545562
sgp30 = <0>,"+16";
546563
ccs811 = <0>, "+17";
547564
bh1750 = <0>, "+18";
548-
max30102 = <0>,"+19";
565+
max30102 = <0>,"+19+99";
549566
aht10 = <0>,"+20";
550567
mcp980x = <0>,"+21";
551568
jc42 = <0>,"+22";
@@ -554,8 +571,8 @@
554571
ms5805 = <0>,"+25";
555572
ms5837 = <0>,"+26";
556573
ms8607 = <0>,"+27";
557-
mpu6050 = <0>,"+28";
558-
mpu9250 = <0>,"+29";
574+
mpu6050 = <0>,"+28+99";
575+
mpu9250 = <0>,"+29+99";
559576
bno055 = <0>,"+31";
560577
sht4x = <0>,"+32";
561578
adt7410 = <0>,"+34";
@@ -569,7 +586,9 @@
569586
<&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
570587
<&bno055>,"reg:0", <&sht4x>,"reg:0",
571588
<&bmp380>,"reg:0", <&adt7410>,"reg:0";
572-
int_pin = <&max30102>, "interrupts:0",
589+
int_pin = <&int_pins>, "brcm,pins:0",
590+
<&int_pins>, "reg:0",
591+
<&max30102>, "interrupts:0",
573592
<&mpu6050>, "interrupts:0",
574593
<&mpu9250>, "interrupts:0";
575594
no_timeout = <&jc42>, "smbus-timeout-disable?";

arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts

+15-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
clocks = <&sc16is750_clk>;
1818
interrupt-parent = <&gpio>;
1919
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
20+
pinctrl-0 = <&int_pins>;
21+
pinctrl-names = "default";
2022
gpio-controller;
2123
#gpio-cells = <2>;
2224
i2c-max-frequency = <400000>;
@@ -35,8 +37,20 @@
3537
};
3638
};
3739

40+
fragment@2 {
41+
target = <&gpio>;
42+
__overlay__ {
43+
int_pins: int_pins@18 {
44+
brcm,pins = <24>;
45+
brcm,function = <0>; /* in */
46+
brcm,pull = <0>; /* none */
47+
};
48+
};
49+
};
50+
3851
__overrides__ {
39-
int_pin = <&sc16is750>,"interrupts:0";
52+
int_pin = <&sc16is750>,"interrupts:0", <&int_pins>,"brcm,pins:0",
53+
<&int_pins>,"reg:0";
4054
addr = <&sc16is750>,"reg:0", <&sc16is750_clk>,"name";
4155
xtal = <&sc16is750_clk>,"clock-frequency:0";
4256
};

arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts

+15-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
clocks = <&sc16is752_clk>;
1818
interrupt-parent = <&gpio>;
1919
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
20+
pinctrl-0 = <&int_pins>;
21+
pinctrl-names = "default";
2022
gpio-controller;
2123
#gpio-cells = <2>;
2224
i2c-max-frequency = <400000>;
@@ -35,8 +37,20 @@
3537
};
3638
};
3739

40+
fragment@2 {
41+
target = <&gpio>;
42+
__overlay__ {
43+
int_pins: int_pins@18 {
44+
brcm,pins = <24>;
45+
brcm,function = <0>; /* in */
46+
brcm,pull = <0>; /* none */
47+
};
48+
};
49+
};
50+
3851
__overrides__ {
39-
int_pin = <&sc16is752>,"interrupts:0";
52+
int_pin = <&sc16is752>,"interrupts:0", <&int_pins>,"brcm,pins:0",
53+
<&int_pins>,"reg:0";
4054
addr = <&sc16is752>,"reg:0",<&sc16is752_clk>,"name";
4155
xtal = <&sc16is752_clk>,"clock-frequency:0";
4256
};

arch/arm/boot/dts/overlays/sc16is752-spi0-overlay.dts

+15-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
clocks = <&sc16is752_clk>;
1818
interrupt-parent = <&gpio>;
1919
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
20+
pinctrl-0 = <&int_pins>;
21+
pinctrl-names = "default";
2022
gpio-controller;
2123
#gpio-cells = <2>;
2224
spi-max-frequency = <4000000>;
@@ -42,8 +44,20 @@
4244
};
4345
};
4446

47+
fragment@3 {
48+
target = <&gpio>;
49+
__overlay__ {
50+
int_pins: int_pins@18 {
51+
brcm,pins = <24>;
52+
brcm,function = <0>; /* in */
53+
brcm,pull = <0>; /* none */
54+
};
55+
};
56+
};
57+
4558
__overrides__ {
46-
int_pin = <&sc16is752>,"interrupts:0";
59+
int_pin = <&sc16is752>,"interrupts:0", <&int_pins>,"brcm,pins:0",
60+
<&int_pins>,"reg:0";
4761
xtal = <&sc16is752_clk>,"clock-frequency:0";
4862
};
4963
};

arch/arm/boot/dts/overlays/sc16is752-spi1-overlay.dts

+11-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
brcm,pins = <18>;
1717
brcm,function = <1>; /* output */
1818
};
19+
20+
int_pins: int_pins@18 {
21+
brcm,pins = <24>;
22+
brcm,function = <0>; /* in */
23+
brcm,pull = <0>; /* none */
24+
};
1925
};
2026
};
2127

@@ -25,7 +31,7 @@
2531
#address-cells = <1>;
2632
#size-cells = <0>;
2733
pinctrl-names = "default";
28-
pinctrl-0 = <&spi1_pins &spi1_cs_pins>;
34+
pinctrl-0 = <&spi1_pins &spi1_cs_pins &int_pins>;
2935
cs-gpios = <&gpio 18 1>;
3036
status = "okay";
3137

@@ -35,6 +41,8 @@
3541
clocks = <&sc16is752_clk>;
3642
interrupt-parent = <&gpio>;
3743
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
44+
pinctrl-0 = <&int_pins>;
45+
pinctrl-names = "default";
3846
gpio-controller;
3947
#gpio-cells = <2>;
4048
spi-max-frequency = <4000000>;
@@ -61,7 +69,8 @@
6169
};
6270

6371
__overrides__ {
64-
int_pin = <&sc16is752>,"interrupts:0";
72+
int_pin = <&sc16is752>,"interrupts:0", <&int_pins>,"brcm,pins:0",
73+
<&int_pins>,"reg:0";
6574
xtal = <&sc16is752_clk>,"clock-frequency:0";
6675
};
6776
};

0 commit comments

Comments
 (0)