1 From de7880016665afe7fa7d40e1fafa859260d53ba1 Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@gmail.com>
3 Date: Thu, 28 Oct 2021 09:03:44 +0200
4 Subject: [PATCH] ARM: BCM53016: MR32: convert to Broadcom iProc I2C Driver
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 replaces the bit-banged i2c-gpio provided i2c functionality
10 with the hardware in the SoC.
12 During review of the MR32, Florian Fainelli pointed out that the
13 SoC has a real I2C-controller. Furthermore, the connected pins
14 (SDA and SCL) would line up perfectly for use. Back then I couldn't
15 get it working though and I left it with i2c-gpio (which worked).
17 Now we know the reason: the interrupt was incorrectly specified.
18 (Hence, this patch depends on Florian Fainelli's
19 "ARM: dts: BCM5301X: Fix I2C controller interrupt" patch).
21 Cc: Florian Fainelli <f.fainelli@gmail.com>
22 Cc: Rafał Miłecki <zajec5@gmail.com>
23 Cc: Matthew Hagan <mnhagan88@gmail.com>
24 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
25 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
27 arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 62 ++++++++++------------
28 1 file changed, 28 insertions(+), 34 deletions(-)
30 --- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
31 +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
33 max-brightness = <255>;
39 - * The platform provided I2C does not budge.
40 - * This is a replacement until I can figure
41 - * out what are the missing bits...
44 - compatible = "i2c-gpio";
45 - sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
46 - scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
47 - i2c-gpio,delay-us = <10>; /* close to 100 kHz */
48 - #address-cells = <1>;
51 - current_sense: ina219@45 {
52 - compatible = "ti,ina219";
54 - shunt-resistor = <60000>; /* = 60 mOhms */
58 - compatible = "atmel,24c64";
62 - #address-cells = <1>;
65 - mac_address: mac-address@66 {
81 + pinctrl-names = "default";
82 + pinctrl-0 = <&pinmux_i2c>;
84 + clock-frequency = <100000>;
86 + current_sense: ina219@45 {
87 + compatible = "ti,ina219";
89 + shunt-resistor = <60000>; /* = 60 mOhms */
93 + compatible = "atmel,24c64";
97 + #address-cells = <1>;
100 + mac_address: mac-address@66 {