1 From aa985e8be1c2fe4600b68831808c0b70241a37a6 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 24 Apr 2023 16:30:07 +0100
4 Subject: [PATCH] dtoverlays: Add overrides for alternate i2c buses to
7 The i2c-pwm-pca9685a overlay was fixed to i2c-1. Add overrides to allow
8 it to be assigned to alternate buses.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 arch/arm/boot/dts/overlays/README | 10 +++++
13 .../dts/overlays/i2c-pwm-pca9685a-overlay.dts | 37 ++++++++++++++++++-
14 2 files changed, 46 insertions(+), 1 deletion(-)
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -1857,6 +1857,16 @@ Name: i2c-pwm-pca9685a
19 Info: Adds support for an NXP PCA9685A I2C PWM controller on i2c_arm
20 Load: dtoverlay=i2c-pwm-pca9685a,<param>=<val>
21 Params: addr I2C address of PCA9685A (default 0x40)
22 + i2c0 Choose the I2C0 bus on GPIOs 0&1
23 + i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45
24 + i2c3 Choose the I2C3 bus (configure with the i2c3
25 + overlay - BCM2711 only)
26 + i2c4 Choose the I2C3 bus (configure with the i2c3
27 + overlay - BCM2711 only)
28 + i2c5 Choose the I2C5 bus (configure with the i2c4
29 + overlay - BCM2711 only)
30 + i2c6 Choose the I2C6 bus (configure with the i2c6
31 + overlay - BCM2711 only)
35 --- a/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts
36 +++ b/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts
38 compatible = "brcm,bcm2835";
41 - target = <&i2c_arm>;
52 + frag100: fragment@100 {
53 + target = <&i2c_arm>;
54 + i2cbus: __overlay__ {
67 + target = <&i2c0mux>;
74 addr = <&pca>,"reg:0";
75 + i2c0 = <&frag100>, "target:0=",<&i2c0>,
77 + i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
79 + i2c3 = <&frag100>, "target?=0",
80 + <&frag100>, "target-path=i2c3";
81 + i2c4 = <&frag100>, "target?=0",
82 + <&frag100>, "target-path=i2c4";
83 + i2c5 = <&frag100>, "target?=0",
84 + <&frag100>, "target-path=i2c5";
85 + i2c6 = <&frag100>, "target?=0",
86 + <&frag100>, "target-path=i2c6";