[PATCH v2 6/6] ARM: BCM5301X: Add DT for Meraki MR32

Florian Fainelli f.fainelli at gmail.com
Fri Sep 11 13:30:09 EDT 2020



On 9/11/2020 10:27 AM, Christian Lamparter wrote:
> Hello,
> 
> On 2020-09-10 22:38, Florian Fainelli wrote:
>>
>>
>> On 8/22/2020 9:19 AM, Christian Lamparter wrote:
>>> add support for the Cisco Meraki MR32.
>>> This is a dual-band enterprise class 802.11ac access point.
>>> The unit was donated by Chris Blake. Thank you!
>>>
> [...]
> 
>>> +
>>> +    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 at 45 {
>>> +            compatible = "ti,ina219";
>>> +            reg = <0x45>;
>>> +            shunt-resistor = <60000>; /* = 60 mOhms */
>>> +        };
>>> +
>>> +        eeprom: eeprom at 50 {
>>> +            compatible = "atmel,24c64";
>>> +            reg = <0x50>;
>>> +            pagesize = <32>;
>>> +            read-only;
>>> +        };
>>> +    };
>>> +};
>>> +
>>> +&i2c0 {
>>> +    /* status = "okay"; - can be enabled once it works. */
>>> +
>>> +    pinctrl-names = "default";
>>> +    pinctrl-0 = <&pinmux_i2c>;
>>> +
>>> +    clock-frequency = <100000>;
>>> +
>>> +    current_sense: ina219 at 45 {
>>> +        compatible = "ti,ina219";
>>> +        reg = <0x45>;
>>> +        shunt-resistor = <60000>; /* = 60 mOhms */
>>> +    };
>>> +
>>> +    eeprom: eeprom at 50 {
>>> +        compatible = "atmel,24c64";
>>> +        reg = <0x50>;
>>> +        pagesize = <32>;
>>> +        read-only;
>>> +    };
>>
>> These would create duplicate labels which are hard errors per DTC,
>> so I took out the entire &i2c0 override here into what I merged into 
>> devicetree/next.
>>
>> This cannot have built for you unless you run dtc with the force flag, 
>> is that how OpenWrt does it?
> 
> I'm sorry for my mistake. Yes, I looked at this now again and my tree 
> had this uncommited change :(.
> 
> ---
> $ git diff
> diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts 
> b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
> index 7306df7ff704..35e733b0db62 100644
> --- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
> +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
> @@ -122,13 +122,13 @@ &i2c0 {
> 
>          clock-frequency = <100000>;
> 
> -       current_sense: ina219 at 45 {
> +       /* current_sense: */ ina219 at 45 {
>                  compatible = "ti,ina219";
>                  reg = <0x45>;
>                  shunt-resistor = <60000>; /* = 60 mOhms */
>          };
> 
> -       eeprom: eeprom at 50 {
> +       /* eeprom: */ eeprom at 50 {
>                  compatible = "atmel,24c64";
>                  reg = <0x50>;
>                  pagesize = <32>;
> ---
> 
> Didn't show up when running make.
> 
> In the OpenWrt version (As OpenWrt is currently using a patched 5.4)
> the labels on the non-functioning i2c node are commented-out.
> 
> <https://patchwork.ozlabs.org/project/openwrt/patch/c647ad56b4adb449cd448a2bc56d58058fd06e6f.1599346205.git.chunkeey@gmail.com/> 
> 
> 
> |++&i2c0 {
> |[...] (Cut)
> |++
> |++    /* current_sense: */ ina219 at 45 {
> |++        compatible = "ti,ina219";
> |++        reg = <0x45>;
> |++        shunt-resistor = <60000>; /* = 60 mOhms */
> |++    };
> |++
> |++    /* eeprom: */ eeprom at 50 {
> |++        compatible = "atmel,24c64";
> |++        reg = <0x50>;
> |++        pagesize = <32>;
> |++        read-only;
> |++    };
> |++};
> 
> Ok, I'll drop the &i2c node as well in my MR32 OpenWrt series.
> But I'll keep a patch with the i2c node in my openwrt staging tree.
> 
> (I can't find devicetree/next on https://git.kernel.org/ .
> Can you please tell me the link to it?)

https://github.com/Broadcom/stblinux/commits/devicetree/next
-- 
Florian



More information about the linux-arm-kernel mailing list