Skip to content

Commit

Permalink
ARM: BCM53016: MR32: convert to Broadcom iProc I2C Driver
Browse files Browse the repository at this point in the history
replaces the bit-banged i2c-gpio provided i2c functionality
with the hardware in the SoC.

During review of the MR32, Florian Fainelli pointed out that the
SoC has a real I2C-controller. Furthermore, the connected pins
(SDA and SCL) would line up perfectly for use. Back then I couldn't
get it working though and I left it with i2c-gpio (which worked).

Now we know the reason: the interrupt was incorrectly specified.
(Hence, this patch depends on Florian Fainelli's
"ARM: dts: BCM5301X: Fix I2C controller interrupt" patch).

Cc: Florian Fainelli <[email protected]>
Cc: Rafał Miłecki <[email protected]>
Cc: Matthew Hagan <[email protected]>
Signed-off-by: Christian Lamparter <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
  • Loading branch information
chunkeey authored and ffainelli committed Nov 15, 2021
1 parent 3d2d52a commit de78800
Showing 1 changed file with 28 additions and 34 deletions.
62 changes: 28 additions & 34 deletions arch/arm/boot/dts/bcm53016-meraki-mr32.dts
Original file line number Diff line number Diff line change
Expand Up @@ -84,40 +84,6 @@
max-brightness = <255>;
};
};

i2c {
/*
* The platform provided I2C does not budge.
* This is a replacement until I can figure
* out what are the missing bits...
*/

compatible = "i2c-gpio";
sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
i2c-gpio,delay-us = <10>; /* close to 100 kHz */
#address-cells = <1>;
#size-cells = <0>;

current_sense: ina219@45 {
compatible = "ti,ina219";
reg = <0x45>;
shunt-resistor = <60000>; /* = 60 mOhms */
};

eeprom: eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
pagesize = <32>;
read-only;
#address-cells = <1>;
#size-cells = <1>;

mac_address: mac-address@66 {
reg = <0x66 0x6>;
};
};
};
};

&uart0 {
Expand Down Expand Up @@ -228,3 +194,31 @@
};
};
};

&i2c0 {
status = "okay";

pinctrl-names = "default";
pinctrl-0 = <&pinmux_i2c>;

clock-frequency = <100000>;

current_sense: ina219@45 {
compatible = "ti,ina219";
reg = <0x45>;
shunt-resistor = <60000>; /* = 60 mOhms */
};

eeprom: eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
pagesize = <32>;
read-only;
#address-cells = <1>;
#size-cells = <1>;

mac_address: mac-address@66 {
reg = <0x66 0x6>;
};
};
};

0 comments on commit de78800

Please sign in to comment.