bcm53xx: add first 5.17 DTS changes
[openwrt/staging/thess.git] / target / linux / bcm53xx / patches-5.10 / 332-Meraki-MR32-use-hw-i2c.patch
1 From: Christian Lamparter <chunkeey@gmail.com>
2 Date: Sat, 12 Sep 2020 22:11:12 +0200
3 Subject: bcm53xx: Meraki MR32 use hw i2c
4
5 replace the i2c-gpio provided i2c functionality with the
6 hardware in the SoC. This can be activated once the
7 internal i2c works as well as the bit-banged i2c-gpio.
8
9 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
10
11 --- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
12 +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
13 @@ -85,40 +85,6 @@
14 max-brightness = <255>;
15 };
16 };
17 -
18 - i2c {
19 - /*
20 - * The platform provided I2C does not budge.
21 - * This is a replacement until I can figure
22 - * out what are the missing bits...
23 - */
24 -
25 - compatible = "i2c-gpio";
26 - sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
27 - scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
28 - i2c-gpio,delay-us = <10>; /* close to 100 kHz */
29 - #address-cells = <1>;
30 - #size-cells = <0>;
31 -
32 - current_sense: ina219@45 {
33 - compatible = "ti,ina219";
34 - reg = <0x45>;
35 - shunt-resistor = <60000>; /* = 60 mOhms */
36 - };
37 -
38 - eeprom: eeprom@50 {
39 - compatible = "atmel,24c64";
40 - reg = <0x50>;
41 - pagesize = <32>;
42 - read-only;
43 - #address-cells = <1>;
44 - #size-cells = <1>;
45 -
46 - mac_address: mac-address@66 {
47 - reg = <0x66 0x6>;
48 - };
49 - };
50 - };
51 };
52
53 &uart0 {
54 @@ -229,3 +195,31 @@
55 };
56 };
57 };
58 +
59 +&i2c0 {
60 + status = "okay";
61 +
62 + pinctrl-names = "default";
63 + pinctrl-0 = <&pinmux_i2c>;
64 +
65 + clock-frequency = <100000>;
66 +
67 + current_sense: ina219@45 {
68 + compatible = "ti,ina219";
69 + reg = <0x45>;
70 + shunt-resistor = <60000>; /* = 60 mOhms */
71 + };
72 +
73 + eeprom: eeprom@50 {
74 + compatible = "atmel,24c64";
75 + reg = <0x50>;
76 + pagesize = <32>;
77 + read-only;
78 + #address-cells = <1>;
79 + #size-cells = <1>;
80 +
81 + mac_address: mac-address@66 {
82 + reg = <0x66 0x6>;
83 + };
84 + };
85 +};