[OpenWrt-Devel] ath79: DSA with qca8k

Lucian Cristian luci at powerneth.ro
Wed Jun 20 10:31:18 EDT 2018


On 20.06.2018 12:02, John Crispin wrote:
>
>
> On 20/06/18 10:39, Lucian Cristian wrote:
>> On 20.06.2018 11:26, Robert Marko wrote:
>>> You are missing CONFIG_NET_DSA_TAG_QCA
>>
>> Thanks but it doesn't help !
>>
>>
>> Regards
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/listinfo/openwrt-devel
>
> which HW are you using for this ?
>
>     John

wr1043nd-v3 (8327N) or wr1043nd-v4 (8337N)

for 8327N I patched like this:


--- a/drivers/net/dsa/qca8k.c   2018-05-10 22:19:15.885054832 +0300
+++ b/drivers/net/dsa/qca8k.c   2018-05-10 22:19:41.911438171 +0300
@@ -868,8 +868,9 @@
         id = qca8k_read(priv, QCA8K_REG_MASK_CTRL);
         id >>= QCA8K_MASK_CTRL_ID_S;
         id &= QCA8K_MASK_CTRL_ID_M;
-       if (id != QCA8K_ID_QCA8337)
-               return -ENODEV;
+       pr_info ("qca8k detect: \n");
+       if (id != QCA8K_ID_QCA8337 || id != QCA8K_ID_QCA8327N)
+               return -ENODEV;

         priv->ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS);
         if (!priv->ds)
--- a/drivers/net/dsa/qca8k.h   2018-06-02 17:08:44.783407224 +0300
+++ b/drivers/net/dsa/qca8k.h   2018-06-02 17:11:33.339463372 +0300
@@ -23,6 +23,8 @@

  #define PHY_ID_QCA8337                                 0x004dd036
  #define QCA8K_ID_QCA8337                               0x13
+#define PHY_ID_QCA8327N 0x004dd034
+#define QCA8K_ID_QCA8327N                              0x12

  #define QCA8K_NUM_FDB_RECORDS                          2048


Regards


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


More information about the openwrt-devel mailing list