Re: [PATCH v2 0/4] Base support for Inteno XG6846

2024-05-01 Thread Álvaro Fernández Rojas
Hi Linus,

El jue, 25 abr 2024 a las 22:12, Linus Walleij
() escribió:
>
> These patches have been cooking for some time, let's
> get them moving.
>
> The idea is to merge this base so we have base support
> for the target and then try to work out remaining issues
> such as the LED handling.

Looks good to me.
AFAIK you have write access to the repo
(https://openwrt.org/voting/2024-02-new-member-linusw), so feel free
to merge these patches yourself.
If you don't just tell me and I happily merge them for you :)

>
> To:
>
> Signed-off-by: Linus Walleij 
> ---
> Changes in v2:
> - Include U-Boot for BMIPS patch (2024.04)
> - Separate patch to activate U-Boot with the target.
> - Use a kmod for the Marvell switch to hold down the footprint
>   of the generic BCM6328 support.
> - Link to v1: 
> http://lists.openwrt.org/pipermail/openwrt-devel/2023-August/041387.html
>
> ---
> Linus Walleij (4):
>   bmips: bcm6328: Compile in uImage splitter
>   bmips: Add Inteno XG6846 target
>   uboot-bmips: Add U-Boot for the BMIPS target
>   bmips: Build U-Boot into the XG6846 target
>
>  .github/labeler.yml|   1 +
>  package/boot/uboot-bmips/Makefile  |  32 +++
>  .../bcm6328/base-files/etc/board.d/02_network  |   3 +
>  target/linux/bmips/bcm6328/config-6.1  |   1 +
>  target/linux/bmips/dts/bcm6328-inteno-xg6846.dts   | 313 
> +
>  target/linux/bmips/image/Makefile  |  31 ++
>  target/linux/bmips/image/bcm6328.mk|  14 +
>  target/linux/bmips/image/null-initrd   |   1 +
>  target/linux/bmips/image/u-boot.bin| Bin 0 -> 289149 bytes
>  9 files changed, 396 insertions(+)
> ---
> base-commit: 84a48ce400b2c7b0779f51e83c68de5f8ec58ffd
> change-id: 20240425-xg6846-base-9853a92b11f7
>
> Best regards,
> --
> Linus Walleij 
>

Best regards,
Álvaro.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [VOTE] New member proposal: Robimarko (Robert Marko)

2024-02-05 Thread Álvaro Fernández Rojas
El mar, 30 ene 2024 a las 19:16, Christian Marangi (Ansuel)
() escribió:
>
> Robert is active in OpenWrt since 2017 and with some recent stats, he
> has more than 310 commits merged in OpenWrt.
> He also have uncounted Reviewed-by tag on various PR and merged commits
> and generally helps in everything related to IPQ (ipq806x, ipq40xx and
> ipq807x) and some mvebu targets.
>
> He did the conversion of ipq40xx target to DSA and made possible the
> introduction of the ipq807x target by sorting all the QSDK downstream
> patch and pushing them upstream.
>
> With his help, also the ipq60xx is very close on getting merged and
> actually used permitting support of even more device for OpenWrt.
>
> Also he is almost always reachable on IRC openwrt-devel and never had
> a problem in coordinating and collaborating with him.
>
> I think Robert is a good addition to our team and would massively help
> me (Ansuel) in maintaining each IPQ target and review all the related
> PR on github and patchwork.
> I would like to add Robert to the OpenWrt committers team.

+1

>
> The vote shall be concluded within 14 days. (13/02/2024)

Thanks,
Álvaro.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v7] bmips: bcm6368-enetsw: Bump max MTU

2024-01-24 Thread Álvaro Fernández Rojas
tes and not 1542
>   which is the actual max frame size.
> - bcae c56b a83b = source ethernet address
> - 8874 0300 0004 = Broadcom enetsw DSA tag
> - 8100  = VLAN 802.1Q header
> - dada  c020 0fff = EDSA tag for the Marvell (outer) switch,
> - 0800 is the ethertype (part of the EDSA tag technically)
> - Next follows the contents of the ping packet as it appears if
>   we dump it on the DSA interface such as tcpdump -i lan1
>   etc, there we get the stripped out packet, 1506 bytes.
> - At the end 4 bytes of FCS.
>
> This clearly illustrates that the DSA tag is included in the MTU
> which we set up in Linux, but the VLAN tag and ethernet headers and
> checksum is not.
>
> Cc: Álvaro Fernández Rojas 
> Cc: Jonas Gorski 
> Tested-by: Paul Donald 
> Signed-off-by: Linus Walleij 
> ---
> ChangeLog v6->v7:
> - Rebase on master.
> - Perhaps we can merge this now?
> ChangeLog v5->v6:
> - Rewrite thoroughly after discussing with Jonas that the safe
>   MTU is probably 1532 without DSA tag and extra VLAN header.
> - Reword commit message and redo tests so it is crystal clear what
>   is going on, as illustrated by tcpdump.
> ChangeLog v4->v5:
> - Drop the confusing ENETSW_MTU_OVERHEAD altogether after discussing
>   with Jonas.
> ChangeLog v3->v4:
> - Adjust the RX buffer size and we can use the max "jumbo"
>   frame size 2048.
> ChangeLog v2->v3:
> - Make a more believable case for the max MTU with tcpdump
>   example.
> ChangeLog v1->v2:
> - Do some better research after help on IRC, did some ping tests.
> ---
>  .../drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 23 
> +++---
>  1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git 
> a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c 
> b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c
> index 321e95dbbb3d..b72a788378fa 100644
> --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c
> +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c
> @@ -22,10 +22,19 @@
>  #include 
>  #include 
>
> -/* MTU */
> -#define ENETSW_TAG_SIZE(6 + VLAN_HLEN)
> -#define ENETSW_MTU_OVERHEAD(VLAN_ETH_HLEN + VLAN_HLEN + \
> -ENETSW_TAG_SIZE)
> +/* TODO: Bigger frames may work but we do not trust that they are safe on all
> + * platforms so more research is needed, a max frame size of 2048 has been
> + * tested. We use the safe frame size 1542 which is 1532 plus DSA and VLAN
> + * overhead.
> + */
> +#define ENETSW_MAX_FRAME   1542
> +#define ENETSW_DSA_TAG_SIZE6
> +/* The MTU in Linux does not include ethernet or VLAN headers, but it DOES
> + * include the DSA overhead (the framework will increase the MTU to fit
> + * any DSA header).
> + */
> +#define ENETSW_MAX_MTU (ENETSW_MAX_FRAME - VLAN_ETH_HLEN - \
> +VLAN_HLEN)
>  #define ENETSW_FRAG_SIZE(x)(SKB_DATA_ALIGN(NET_SKB_PAD + x + \
>  SKB_DATA_ALIGN(sizeof(struct 
> skb_shared_info
>
> @@ -1006,7 +1015,7 @@ static int bcm6368_enetsw_probe(struct platform_device 
> *pdev)
> dev_info(dev, "random mac\n");
> }
>
> -   priv->rx_buf_size = ALIGN(ndev->mtu + ENETSW_MTU_OVERHEAD,
> +   priv->rx_buf_size = ALIGN(ENETSW_MAX_FRAME,
>   ENETSW_DMA_MAXBURST * 4);
>
> priv->rx_frag_size = ENETSW_FRAG_SIZE(priv->rx_buf_size);
> @@ -1066,8 +1075,8 @@ static int bcm6368_enetsw_probe(struct platform_device 
> *pdev)
> /* register netdevice */
> ndev->netdev_ops = _enetsw_ops;
> ndev->min_mtu = ETH_ZLEN;
> -   ndev->mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE;
> -   ndev->max_mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE;
> +   ndev->mtu = ETH_DATA_LEN;
> +   ndev->max_mtu = ENETSW_MAX_MTU;
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
> netif_napi_add(ndev, >napi, bcm6368_enetsw_poll);
>  #else
>
> ---
> base-commit: 1b7e62b20b1735fcdc498a35e005afcd775abcf4
> change-id: 20240124-bcm6368-mtu-d3b27dca1ca8
>
> Best regards,
> --
> Linus Walleij 
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: bcm63xx kernel 5.10

2022-02-04 Thread Álvaro Fernández Rojas
So the problem is that SET_FEATURES and GET_FEATURES isn’t supported by 
versions 2.1, 2.2 and 4.0 of the nand controller, which are the ones present on 
bcm63xx, right?

> El 4 feb 2022, a las 13:55, Daniel González Cabanelas  
> escribió:
> 
> Hi Florian,
>> El vie, 4 feb 2022 a las 19:24, Florian Fainelli
>> () escribió:
>> 
>> 
>> 
>>> On 2/4/2022 9:28 AM, Daniel González Cabanelas wrote:
>>> Hi Hauke:
>>> 
>>> El vie, 4 feb 2022 a las 0:48, Hauke Mehrtens () escribió:
 
 Hi,
 
 We would like to switch the bcm63xx target to kernel 5.10. Paul created
 a pull request for that:
 https://github.com/openwrt/openwrt/pull/4616
 
 There is still a problem with Macronix NAND flash chips, see the
 comments from the pull request.
 
 Could someone please have a look into this problem.
 
 Does this change in the upstream kernel help?
 https://github.com/torvalds/linux/commit/22ca05b82d3e3abc2b116a11ee41b6b692b95530
 
>>> The patch together with:
>>> https://github.com/torvalds/linux/commit/a071912636cc3420f54e2a6312c1625ac763cf03
>>> 
>>> They both apply cleanly without changes in current Openwrt, kernel
>>> testing 5.10, But the kernel still fails to load, caused by
>>> macronix_nand_block_protection_support .
>> 
>> Is there a log available somewhere that shows the boot failure with
>> 5.10? Have you been able to run a bisection somehow?
> 
> this commit is the culprit:
> https://github.com/torvalds/linux/commit/03a539c7a118427a6609a26461358c56ac8f3a06
> 
> You can check a boot failure here:
> https://github.com/openwrt/openwrt/pull/4616#issuecomment-999442065
> 
> Regards.
>> 
>> None of those patches should be relevant as the DSL SoCs do not use EDU,
>> they use PIO. Now about this one:
>> 
>> lists.infradead.org/pipermail/linux-mtd/2022-January/091107.html
>> --
>> Florian

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: bcm63xx kernel 5.10

2022-02-04 Thread Álvaro Fernández Rojas
Hi,

First of all, excuse me for not taking care of this before.
I’ve been a bit busy lately because I bought a house and I had to do a lot of 
stuff to get it into a proper condition.
I also got COVID and had to pospone a trip to Mexico (which I’m enjoying right 
now).
As soon as I get back from Mexico I’ll try to test this or at least add a new 
patch with the changes suggested by Daniel.

Best regards,
Álvaro.

> El 3 feb 2022, a las 18:48, Hauke Mehrtens  escribió:
> 
> Hi,
> 
> We would like to switch the bcm63xx target to kernel 5.10. Paul created a 
> pull request for that:
> https://github.com/openwrt/openwrt/pull/4616
> 
> There is still a problem with Macronix NAND flash chips, see the comments 
> from the pull request.
> 
> Could someone please have a look into this problem.
> 
> Does this change in the upstream kernel help?
> https://github.com/torvalds/linux/commit/22ca05b82d3e3abc2b116a11ee41b6b692b95530
> 
> Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Removing 5.4 support for bcm27xx and bcm53xx

2021-10-03 Thread Álvaro Fernández Rojas
Hi Adrian,

No objections from me for bcm27xx.

Best regards,
Álvaro.

> El 2 oct 2021, a las 18:43, Adrian Schmutzler  
> escribió:
> 
> Hi,
> 
> both bcm27xx and bcm53xx have kernel 5.10 by default for more than one
> month.
> 
> I'd like to remove 5.4 patches etc. there, so we don't have to bother with
> 5.4 for new patches (like stintel had to when adding config symbols
> recently).
> 
> Any objections?
> 
> Best
> 
> Adrian
> 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] bcm27xx: remove no-op patch pair

2020-08-19 Thread Álvaro Fernández Rojas
Hi Adrian,

Nice catch :D.
I didn’t see this pair when I removed the applied and reverted patches.

P.D: I didn’t see the v2 >.<

Acked-by: Álvaro Fernández Rojas 

> El 19 ago 2020, a las 13:49, Adrian Schmutzler  
> escribió:
> 
> Patch 1 introduces a change, and patch 2 reverts it again. Remove
> both patches and achieve the same outcome.
> 
> Refreshed patches for the target as well.
> 
> Cc: Álvaro Fernández Rojas 
> Signed-off-by: Adrian Schmutzler 
> ---
> ...m-Fix-platform-device-unregistration.patch | 27 -
> ...m-Register-vcsm-cma-as-a-platform-dr.patch |  6 ++--
> ...m-Register-bcm2835-codec-as-a-platfo.patch |  6 ++--
> ...m-Unify-the-unload-handling-of-platf.patch | 29 ---
> 4 files changed, 6 insertions(+), 62 deletions(-)
> delete mode 100644 
> target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
> delete mode 100644 
> target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch
> 
> diff --git 
> a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
>  
> b/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
> deleted file mode 100644
> index a5300ca309..00
> --- 
> a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -From 7ba7db27d18d141973ad7eaf1f339218d81a31a4 Mon Sep 17 00:00:00 2001
> -From: Stefan Wahren 
> -Date: Sat, 13 Oct 2018 20:51:23 +0200
> -Subject: [PATCH] staging: vchiq_arm: Fix platform device
> - unregistration
> -
> -In error case platform_device_register_data would return an ERR_PTR
> -instead of NULL. So we better check this before unregistration.
> -
> -Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for 
> the camera driver.")
> -Signed-off-by: Stefan Wahren 
> 
> - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
> - 1 file changed, 2 insertions(+), 1 deletion(-)
> -
>  a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> -@@ -3258,7 +3258,8 @@ failed_platform_init:
> - 
> - static int vchiq_remove(struct platform_device *pdev)
> - {
> --platform_device_unregister(bcm2835_camera);
> -+if (!IS_ERR(bcm2835_camera))
> -+platform_device_unregister(bcm2835_camera);
> - vchiq_debugfs_deinit();
> - device_destroy(vchiq_class, vchiq_devid);
> - cdev_del(_cdev);
> diff --git 
> a/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
>  
> b/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
> index 28641fd327..7521434038 100644
> --- 
> a/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
> +++ 
> b/target/linux/bcm27xx/patches-5.4/950-0335-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
> @@ -30,10 +30,10 @@ Signed-off-by: Dave Stevenson 
> 
>   bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
>   bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
> 
> -@@ -3266,6 +3268,7 @@ static int vchiq_remove(struct platform_
> +@@ -3265,6 +3267,7 @@ failed_platform_init:
> + static int vchiq_remove(struct platform_device *pdev)
>  {
> - if (!IS_ERR(bcm2835_camera))
> - platform_device_unregister(bcm2835_camera);
> + platform_device_unregister(bcm2835_camera);
> + platform_device_unregister(vcsm_cma);
>   vchiq_debugfs_deinit();
>   device_destroy(vchiq_class, vchiq_devid);
> diff --git 
> a/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
>  
> b/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
> index 016e6c0aa5..499efe2b65 100644
> --- 
> a/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
> +++ 
> b/target/linux/bcm27xx/patches-5.4/950-0336-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
> @@ -30,10 +30,10 @@ Signed-off-by: Dave Stevenson 
> 
>   bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
>   bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
> 
> -@@ -3268,6 +3270,7 @@ static int vchiq_remove(struct platform_
> +@@ -3267,6 +3269,7 @@ failed_platform_init:
> + static int vchiq_remove(struct platform_device *pdev)
>  {
> - if

Re: [PATCH] bcm27xx: remove no-op patch pair

2020-08-19 Thread Álvaro Fernández Rojas
Hi Adrian,

Nice catch :D.
I didn’t see this pair when I removed the applied and reverted patches.

Acked-by: Álvaro Fernández Rojas 

> El 19 ago 2020, a las 13:33, Adrian Schmutzler  
> escribió:
> 
> Patch 1 introduces a change, and patch 2 reverts it again. Remove
> both patches and achieve the same outcome.
> 
> Cc: Álvaro Fernández Rojas 
> Signed-off-by: Adrian Schmutzler 
> ---
> ...m-Fix-platform-device-unregistration.patch | 27 -
> ...m-Unify-the-unload-handling-of-platf.patch | 29 ---
> 2 files changed, 56 deletions(-)
> delete mode 100644 
> target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
> delete mode 100644 
> target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch
> 
> diff --git 
> a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
>  
> b/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
> deleted file mode 100644
> index a5300ca309..00
> --- 
> a/target/linux/bcm27xx/patches-5.4/950-0163-staging-vchiq_arm-Fix-platform-device-unregistration.patch
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -From 7ba7db27d18d141973ad7eaf1f339218d81a31a4 Mon Sep 17 00:00:00 2001
> -From: Stefan Wahren 
> -Date: Sat, 13 Oct 2018 20:51:23 +0200
> -Subject: [PATCH] staging: vchiq_arm: Fix platform device
> - unregistration
> -
> -In error case platform_device_register_data would return an ERR_PTR
> -instead of NULL. So we better check this before unregistration.
> -
> -Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for 
> the camera driver.")
> -Signed-off-by: Stefan Wahren 
> 
> - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
> - 1 file changed, 2 insertions(+), 1 deletion(-)
> -
>  a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> -@@ -3258,7 +3258,8 @@ failed_platform_init:
> - 
> - static int vchiq_remove(struct platform_device *pdev)
> - {
> --platform_device_unregister(bcm2835_camera);
> -+if (!IS_ERR(bcm2835_camera))
> -+platform_device_unregister(bcm2835_camera);
> - vchiq_debugfs_deinit();
> - device_destroy(vchiq_class, vchiq_devid);
> - cdev_del(_cdev);
> diff --git 
> a/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch
>  
> b/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch
> deleted file mode 100644
> index 9bcd967b8a..00
> --- 
> a/target/linux/bcm27xx/patches-5.4/950-0338-staging-vchiq_arm-Unify-the-unload-handling-of-platf.patch
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -From 91da858c9327352c17a1f20ec10e78113ed45c82 Mon Sep 17 00:00:00 2001
> -From: Dave Stevenson 
> -Date: Wed, 6 Nov 2019 13:58:18 +
> -Subject: [PATCH] staging: vchiq_arm: Unify the unload handling of
> - platform devs
> -
> -A helper function vchiq_register_child was added to deal with
> -adding the platform devices. This returns NULL on failure, and
> -that is assigned to the struct platform_device. There is
> -therefore no way for remove to encounter an error pointer, so
> -checking for IS_ERR() is redundant.
> -
> -Signed-off-by: Dave Stevenson 
> 
> - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +--
> - 1 file changed, 1 insertion(+), 2 deletions(-)
> -
>  a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> -@@ -3268,8 +3268,7 @@ failed_platform_init:
> - 
> - static int vchiq_remove(struct platform_device *pdev)
> - {
> --if (!IS_ERR(bcm2835_camera))
> --platform_device_unregister(bcm2835_camera);
> -+platform_device_unregister(bcm2835_camera);
> - platform_device_unregister(bcm2835_codec);
> - platform_device_unregister(vcsm_cma);
> - vchiq_debugfs_deinit();
> -- 
> 2.20.1
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] bcm63xx: add support for the Sercomm H500-s

2020-06-04 Thread Álvaro Fernández Rojas
Hi Adrian,

> El 4 jun 2020, a las 10:16, Adrian Schmutzler  
> escribió:
> 
> Hi,
> 
>> -Original Message-
>> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
>> On Behalf Of Daniel González Cabanelas
>> Sent: Donnerstag, 4. Juni 2020 00:48
>> To: openwrt-devel@lists.openwrt.org
>> Cc: nolt...@gmail.com
>> Subject: [OpenWrt-Devel] [PATCH 4/4] bcm63xx: add support for the
>> Sercomm H500-s
>> 
>> Sercomm H500-s is an xDSL dual band wireless router based on Broadcom
>> BCM63167 SoC
>> 
>> Hardware:
>>   SoC:  Broadcom BCM63167
>>   CPU:  BMIPS4350 V8.0, 400 MHz, 2 cores
>>   Flash:NAND 128 MiB
>>   RAM:  DDR3 128 MiB
>>   Ethernet: 4x 10/100/1000 Mbps
>>   Switch:   BCM53134S
>>   Wireless: 802.11b/g/n: BCM435f (integrated)
>> 802.11ac:Quantenna QT3740BC (onboard SoC)
>>   USB:  1x 2.0
>>   LEDs/Buttons: 11x / 2x
>> 
>> Flash instruction, web UI:
>>  1. Reset to defaults using the reset button if the admin password is
>> unknown
>>  2. Login into the web UI as admin.
>> Address:  http://192.168.0.1
>> User: admin
>> Password: VF-ESad1018
>>  3. Go to Settings -> Firmware Update, and select the Openwrt factory
>> firmware
>>  4. Update the firmware.
>>  5. Wait until it finish, the device will reboot with Openwrt installed
>> on the alternative image partitions keeping the stock firmware in
>> the former.
>> 
>> Notes:
>>  - The patch also adds support for the lowi version. Only the factory
>>firmware is different.
>>  - The integrated Wifi in the Broadcom Soc isn't still supported.
>>  - The Quantenna 802.11ac wifi works ok, but needs to be configured with
>>the Quantenna client application. It can't be configured with Luci
>>nor any iw command since it's a separated subsystem linked via
>>ethernet.
>> 
>> Signed-off-by: Daniel González Cabanelas 
>> ---
>> .../bcm63xx/base-files/etc/board.d/01_leds|   3 +
>> .../bcm63xx/base-files/etc/board.d/02_network |   3 +
>> .../base-files/lib/upgrade/platform.sh|   3 +-
>> .../bcm63xx/dts/bcm63167-sercomm-h500s.dts| 201
>> ++
>> target/linux/bcm63xx/image/bcm63xx_nand.mk|  53 +
>> .../bcm63xx/patches-5.4/568-board-H500s.patch |  72 +++
>> 6 files changed, 334 insertions(+), 1 deletion(-)  create mode 100644
>> target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
>> create mode 100644 target/linux/bcm63xx/patches-5.4/568-board-
>> H500s.patch
>> 
>> diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
>> b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
>> index 91d67f0c0b..5894108457 100755
>> --- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
>> +++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
>> @@ -100,6 +100,9 @@ sercomm,ad1018)
>> sercomm,ad1018-nor)
>>  ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi"
>> "wlan0"
>>  ;;
>> +sercomm,h500s)
>> +ucidef_set_led_netdev "wan" "WAN" "$model:green:internet"
>> "eth0.2"
>> +;;
>> telsey,cpva502plus)
>>  ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
>>  ;;
>> diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network
>> b/target/linux/bcm63xx/base-files/etc/board.d/02_network
>> index 784af29cb4..30649b3abe 100755
>> --- a/target/linux/bcm63xx/base-files/etc/board.d/02_network
>> +++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network
>> @@ -142,6 +142,9 @@ sercomm,ad1018-nor)
>>  ucidef_add_switch "switch0" \
>>  "1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0"
>>  ;;
>> +sercomm,h500s)
>> +ucidef_add_switch "switch0" "4:lan" "3:wan" "8t@eth0"
>> +;;
>> sfr,neufbox-6-sercomm-r0)
>>  ucidef_add_switch "switch0" \
>>  "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
>> diff --git a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
>> b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
>> index 7d416297dd..cea66f63ef 100644
>> --- a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
>> @@ -69,7 +69,8 @@ platform_do_upgrade() {
>>  comtrend,vr-3032u|\
>>  huawei,hg253s-v2|\
>>  netgear,dgnd3700-v2|\
>> -sercomm,ad1018)
>> +sercomm,ad1018|\
>> +sercomm,h500s)
>>  REQUIRE_IMAGE_METADATA=1
>>  cfe_jffs2_upgrade_tar "$1"
>>  ;;
>> diff --git a/target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
>> b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
>> new file mode 100644
>> index 00..5a999ef24e
>> --- /dev/null
>> +++ b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
>> @@ -0,0 +1,201 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Device Tree file for Sercomm H500-s
>> + *
>> + * Copyright (C) 2020 Daniel González Cabanelas   */
>> +
>> +/dts-v1/;
>> +
>> 

Re: [OpenWrt-Devel] [PATCH 2/4] bcm63xx: image: don't add the CFE to the sercomm factory

2020-06-04 Thread Álvaro Fernández Rojas
Ok, I assume it’s safe to drop this, since the bootloader is on a separate 
partition and all Sercomm devices seem to have both bootloaders available from 
factory.

> El 4 jun 2020, a las 0:48, Daniel González Cabanelas  
> escribió:
> 
> There is no need to include the CFE bootloader in the Sercomm factory
> images.
> 
> There might be a case when this could be useful:
>  - We are running the stock firmware on the first Sercomm image
>  - The second partition storing the botloader was erased (unlikely)
> Even in this case flashing an image without a bootlader is harmless.
> 
> Don't include the bootloader in the factory image creation and rid of the
> risk of flashing factory images with an untested bootloader partition.
> 
> Signed-off-by: Daniel González Cabanelas 
> ---
> target/linux/bcm63xx/image/Makefile | 12 
> 1 file changed, 12 deletions(-)
> 
> diff --git a/target/linux/bcm63xx/image/Makefile 
> b/target/linux/bcm63xx/image/Makefile
> index eb4b78b06a..e57b99391f 100644
> --- a/target/linux/bcm63xx/image/Makefile
> +++ b/target/linux/bcm63xx/image/Makefile
> @@ -242,20 +242,8 @@ define Build/cfe-sercomm-part
>   --part-name rootfs_lib \
>   --part-version $(SERCOMM_VERSION)
> 
> - rm -rf $@-bootloader
> - mkdir -p $@-bootloader
> - cp $(KDIR)/bcm63xx-cfe/$(CFE_RAM_FILE) 
> $@-bootloader/$(CFE_RAM_JFFS2_NAME)
> - $(call Build/cfe-jffs2,$@-bootloader)
> - $(call Build/pad-to,$(BLOCKSIZE))
> - $(TOPDIR)/scripts/sercomm-partition-tag.py \
> - --input-file $@ \
> - --output-file $@.bootloader \
> - --part-name bootloader \
> - --part-version $(SERCOMM_VERSION)
> -
>   mv $@.kernel_rootfs $@
>   dd if=$@.rootfs_lib >> $@
> - dd if=$@.bootloader >> $@
> endef
> 
> define Build/cfe-sercomm-load
> -- 
> 2.27.0
> 
> 
> 
> 


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] bcm63xx: add support for the Sercomm H500-s

2020-06-04 Thread Álvaro Fernández Rojas
Hi Daniel,

Please, find my comments below:

> El 4 jun 2020, a las 0:48, Daniel González Cabanelas  
> escribió:
> 
> Sercomm H500-s is an xDSL dual band wireless router based on Broadcom
> BCM63167 SoC
> 
> Hardware:
>   SoC:  Broadcom BCM63167
>   CPU:  BMIPS4350 V8.0, 400 MHz, 2 cores
>   Flash:NAND 128 MiB
>   RAM:  DDR3 128 MiB
>   Ethernet: 4x 10/100/1000 Mbps
>   Switch:   BCM53134S
>   Wireless: 802.11b/g/n: BCM435f (integrated)
> 802.11ac:Quantenna QT3740BC (onboard SoC)
>   USB:  1x 2.0
>   LEDs/Buttons: 11x / 2x
> 
> Flash instruction, web UI:
>  1. Reset to defaults using the reset button if the admin password is 
> unknown
>  2. Login into the web UI as admin.
> Address:  http://192.168.0.1
> User: admin
> Password: VF-ESad1018

VF-ESad1018? :P

>  3. Go to Settings -> Firmware Update, and select the Openwrt factory
> firmware
>  4. Update the firmware.
>  5. Wait until it finish, the device will reboot with Openwrt installed
> on the alternative image partitions keeping the stock firmware in 
> the former.
> 
> Notes:
>  - The patch also adds support for the lowi version. Only the factory
>firmware is different.
>  - The integrated Wifi in the Broadcom Soc isn't still supported. 
>  - The Quantenna 802.11ac wifi works ok, but needs to be configured with
>the Quantenna client application. It can't be configured with Luci
>nor any iw command since it's a separated subsystem linked via
>ethernet.
> 
> Signed-off-by: Daniel González Cabanelas 
> ---
> .../bcm63xx/base-files/etc/board.d/01_leds|   3 +
> .../bcm63xx/base-files/etc/board.d/02_network |   3 +
> .../base-files/lib/upgrade/platform.sh|   3 +-
> .../bcm63xx/dts/bcm63167-sercomm-h500s.dts| 201 ++
> target/linux/bcm63xx/image/bcm63xx_nand.mk|  53 +
> .../bcm63xx/patches-5.4/568-board-H500s.patch |  72 +++
> 6 files changed, 334 insertions(+), 1 deletion(-)
> create mode 100644 target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
> create mode 100644 target/linux/bcm63xx/patches-5.4/568-board-H500s.patch
> 
> diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds 
> b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
> index 91d67f0c0b..5894108457 100755
> --- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
> @@ -100,6 +100,9 @@ sercomm,ad1018)
> sercomm,ad1018-nor)
>   ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
>   ;;
> +sercomm,h500s)
> + ucidef_set_led_netdev "wan" "WAN" "$model:green:internet" "eth0.2"
> + ;;
> telsey,cpva502plus)
>   ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
>   ;;
> diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network 
> b/target/linux/bcm63xx/base-files/etc/board.d/02_network
> index 784af29cb4..30649b3abe 100755
> --- a/target/linux/bcm63xx/base-files/etc/board.d/02_network
> +++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network
> @@ -142,6 +142,9 @@ sercomm,ad1018-nor)
>   ucidef_add_switch "switch0" \
>   "1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0"
>   ;;
> +sercomm,h500s)
> + ucidef_add_switch "switch0" "4:lan" "3:wan" "8t@eth0"
> + ;;

Here we’re only exposing the internal switch, can we add the external one to 
the DTS even if it’s commented out?

> sfr,neufbox-6-sercomm-r0)
>   ucidef_add_switch "switch0" \
>   "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
> diff --git a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh 
> b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
> index 7d416297dd..cea66f63ef 100644
> --- a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
> @@ -69,7 +69,8 @@ platform_do_upgrade() {
>   comtrend,vr-3032u|\
>   huawei,hg253s-v2|\
>   netgear,dgnd3700-v2|\
> - sercomm,ad1018)
> + sercomm,ad1018|\
> + sercomm,h500s)
>   REQUIRE_IMAGE_METADATA=1
>   cfe_jffs2_upgrade_tar "$1"
>   ;;
> diff --git a/target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts 
> b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
> new file mode 100644
> index 00..5a999ef24e
> --- /dev/null
> +++ b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500s.dts
> @@ -0,0 +1,201 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Device Tree file for Sercomm H500-s
> + *
> + * Copyright (C) 2020 Daniel González Cabanelas 
> + */
> +
> +/dts-v1/;
> +
> +#include "bcm63268.dtsi"
> +
> +#include 
> +
> +/ {
> + model = "Sercomm H500-s";
> + compatible = "sercomm,h500s", "brcm,bcm63268";
> +
> + aliases {
> + led-boot = _power_green;
> + led-failsafe = _power_red;
> + 

Re: [OpenWrt-Devel] New ath10k-ct firmware available.

2020-04-26 Thread Álvaro Fernández Rojas

Hi Ben,

I've renamed the old full-htt-mgt firmwares and added the new ones as 
htt-mgt. This way the user can choose between both of them:

https://github.com/openwrt/openwrt/pull/2963

Best regards,
Álvaro.

El 24/04/2020 a las 20:48, Ben Greear escribió:
For the wave-2, there is now a new variant:  htt-mgt-community (vs the 
old full-htt-mgt-community)
the non-full one (hence forth 'diet') compiles out a lot of firmware 
features that ath10k does not use (and/or which I
consider unimportant).  This saves a lot of resources and lets one 
configure more stations/vdevs/etc

using fwcfg.

I also tuned the 9886/8 and 4019 firmware to make better use of memory.  
With proper fwcfg,
the 9888 supports 200 stations and the 4019 supports 162.  I have not 
yet fully tested this
of course, but will be doing so over the coming days.  I did previously 
test 228 total stations

on a Linksys MR8300 (aka EA8300) and it did fine in a torture test.

My suggestion is to use the diet compile in place of the 'full-htt-mgt' 
one, but another option is
to give the user another option to pick they file they want in the 
openwrt makefile.


I am hoping someone will be able to do the openwrt patch, here is the 
raw info below.



988x
8b4c99253aa309d35f2e060c190091b8db1b84dbda06a6a15c83ac0f9a938126  
firmware-2-ct-full-community-22.bin.lede.018
a7168916d6aa5e4d7858f8b620c0c980c76d03f390929db6f4077685ce2051e7  
firmware-2-ct-full-htt-mgt-community-22.bin.lede.018

/home/greearb/candela_html/downloads
9887
459692deb186a63ab8eeddb7ad5d54779266e68ca686e7c46062554db6dca12b  
firmware-2-ct-full-community-22.bin.lede.018
fd126a457d0927d0c8ea10d66ef5b67d5e1e0741f8692bb3016bb602d0af3098  
firmware-2-ct-full-htt-mgt-community-22.bin.lede.018

/home/greearb/candela_html/downloads
9980
cf26eb37524de54af51fe9b2efffc85e0e70ab849e8607ef63ce5a8ecffeaa42  
firmware-5-ct-full-community-12.bin-lede.018
e9737538d7379e13ad4e4c8c519a63659b5e34a35455ed9ac4399ae8097caabc  
firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
4d4f74afca487d452f244cd48304cf9710d8941eb97a6346a949ed6b6877d657  
firmware-5-ct-htt-mgt-community-12.bin-lede.018

/home/greearb/candela_html/downloads
9984
a6b3d66efe640a430a837f238e91eddcd423eed6b887d3ae19716d87a71fd0b1  
firmware-5-ct-full-community-12.bin-lede.018
96060227e372b3b210badccbe6b0bd75d9a35335a7a0f2966964e9e89f66b00f  
firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
ee593fb5724d75c372de02ac7894e1630ee9f909fcb2e2bbf17aadef67cb9d43  
firmware-5-ct-htt-mgt-community-12.bin-lede.018

/home/greearb/candela_html/downloads
4019
46d8f8f1e780813299dc8780eedcfceda103c6b4d8908589ad1adbef921714c0  
firmware-5-ct-full-community-12.bin-lede.018
d884624fc34f4b5de7a3ec0534627c46cea25fca45657f3a2f6bb85f6c5893d7  
firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
51fe06f66365771647d16039cca8b541de3d642c45271977a4cfd433c2c5d45b  
firmware-5-ct-htt-mgt-community-12.bin-lede.018

/home/greearb/candela_html/downloads
9888
d01f1429aaf0bfac07eee3547e5821d19136840b2f983e75e76979a5ac19b6f0  
firmware-5-ct-full-community-12.bin-lede.018
68c42f8e0dcf77f18d4813ac93174bf06ff5cf5aa4f69befe7f35f9fae1de1e3  
firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
6c692141155f5bb74c0117553d5d48ff2aaba73bd4d5e90a5044a5e2ec0faab0  
firmware-5-ct-htt-mgt-community-12.bin-lede.018

/home/greearb/candela_html/downloads

Example fwcfg files for 9888 and 4019 using the diet htt mgt builds:

root@OpenWrt:/lib/firmware/ath10k# cat fwcfg-pci-\:01\:00.0.txt
# For 9888
vdevs = 8
peers = 202
active_peers = 202
stations = 202
rate_ctrl_objs = 7
regdom = 840
#fwname = firmware-5-htt-mgt-b.bin
fwver = 5
nohwcrypt = 0
ct_sta_mode = 0
tx_desc = 2200
#max_nss = 3
tids = 450
skid_limit = 360
max_amsdus = 3

root@OpenWrt:/lib/firmware/ath10k# cat fwcfg-ahb-a00.wifi.txt
vdevs = 8
peers = 164
active_peers = 164
stations = 164
rate_ctrl_objs = 7
regdom = 840
#fwname = firmware-5-htt-mgt-b.bin
fwver = 5
nohwcrypt = 0
ct_sta_mode = 0
tx_desc = 2000
#max_nss = 3
tids = 260
skid_limit = 360
max_amsdus = 3

Thanks,
Ben



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath10k-ct firmware update

2020-03-26 Thread Álvaro Fernández Rojas
Hello Ben,

I’ve just created a PR with this:
https://github.com/openwrt/openwrt/pull/2863 


Best regards,
Álvaro.

> El 25 mar 2020, a las 22:06, Ben Greear  escribió:
> 
> Wave-1:
> 
>  *  March 19, 2020:  Fix problem where power-save was not enabled when going 
> off-channel to scan.
>  The problem was a boolean logic inversion in the chmgr 
> code, a regression I introduced
>  a long time ago.
> 
>  *  March 19, 2020:  When scanning only on current working channel, do not 
> bother with disable/enable
>  powersave.  This should make an on-channel scan less 
> obtrusive than it was previously.
> 
>  *  March 23, 2020:  Fix channel-mgr use-after-free problem that caused 
> crashes in some cases.  The crash
>  was exacerbated by recent power-save changes.
> 
>  *  March 23, 2020:  Fix station-mode power-save related crash:  backported 
> the fix from 10.2 QCA firmware.
> 
>  *  March 23, 2020:  Attempt to better clean up power-save objects and state, 
> especially in station mode.
> 
> 
> Wave-2:  No changes since last time I posted.
> 
> If someone can get these patched into OpenWrt I'd appreciate it.
> 
> 988x
> 2f0bf766e400a4c5726e77b128eb8c141ebaa778526fe2c7c5083f3b17659dbf  
> firmware-2-ct-full-community-22.bin.lede.017
> 5e4285d5c6eee159a25ca14c6ce26022c32380bd7bafaedfc0c5de1510119007  
> firmware-2-ct-full-htt-mgt-community-22.bin.lede.017
> /home/greearb/candela_html/downloads
> 9887
> 4fa30e0e1972ca3b06225a731df0f93a1b73ac67fea5bf54bb55dea3bbc0da6a  
> firmware-2-ct-full-community-22.bin.lede.017
> dc681b6b1e45956e7c2e418ab05eee5c943d13e775209196d9bd931ff6493935  
> firmware-2-ct-full-htt-mgt-community-22.bin.lede.017
> /home/greearb/candela_html/downloads
> 9980
> 289ea845d4bbae6f36b3af2a13a5eaa07097f52d10f7b7306cfc9e2dd394f889  
> firmware-5-ct-full-community-12.bin-lede.017
> adedcd3d379a910bc3a5257d75f8970e11319f4cd9c1b34440d35821602a8b9c  
> firmware-5-ct-full-htt-mgt-community-12.bin-lede.017
> /home/greearb/candela_html/downloads
> 9984
> 8175be5b3946bddc042be018ff7713e67b41b59374ef4cdd183185b59274c91a  
> firmware-5-ct-full-community-12.bin-lede.017
> eb8b894cfe0d1aaa87f130bb7fd1815ef07b951c14df8a2ceaeb780df8f640e0  
> firmware-5-ct-full-htt-mgt-community-12.bin-lede.017
> /home/greearb/candela_html/downloads
> 4019
> 29e9f662c4cd287213877abfbb90fbabb5e32dd3710d3ade82aa94a0921972ae  
> firmware-5-ct-full-community-12.bin-lede.017
> 559c911f23856b1d3d864ce714d1bef7262bf6638e93e057ecf8d5dba48ca1e6  
> firmware-5-ct-full-htt-mgt-community-12.bin-lede.017
> /home/greearb/candela_html/downloads
> 9888
> b295880a8b08ec2680d85daaf5f20232a0e73d9cc579bf3efd7ffae24ea340d7  
> firmware-5-ct-full-community-12.bin-lede.017
> 26fe7c00df10e93373a0f9f105e85d02bb8b1cdd629183ce22a5147138336aec  
> firmware-5-ct-full-htt-mgt-community-12.bin-lede.017
> 
> Thanks,
> Ben
> 
> -- 
> Ben Greear 
> Candela Technologies Inc  http://www.candelatech.com
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] RPi Zero W: broken serial since 4.19 switch

2019-09-02 Thread Álvaro Fernández Rojas
Hi,

Thanks, I will check it.

Did you try adding “enable_uart=1” to config.txt?
I removed it from config.txt because according to 
https://www.raspberrypi.org/documentation/configuration/uart.md it affects the 
core frequency slowing down some models.

~Álvaro.

De: Rafał Miłecki 
Enviado: lunes, septiembre 2, 2019 4:08 p. m.
Para: Álvaro Fernández Rojas; OpenWrt Development List
Asunto: RPi Zero W: broken serial since 4.19 switch

Starting with the commit 42954857190b ("brcm2708: add linux 4.19
support") I don't get any output over my Raspberry Pi Zero W serial
console. OpenWrt still boots fine (I can see full bootlog on a screen).

I tried debugging that but it doesn't seem to be anything obvious.
Comparing kernel configs (4.14 vs. 4.19) and decompiled .dtb files
doesn't ring any bell for me.

Any idea what may be a reason for that? How to debug that?

I'm attaching 4 files.
good-*: files from 4.14 kernel from 42954857190b~1
bad-*: files from 4.19 kernel from 42954857190b

--
Rafał
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Response to LEDE proposal/queries/mail?

2016-06-08 Thread Álvaro Fernández Rojas


El 7/6/16 a las 14:42, Zoltan HERPAI escribió:
> Daniel Dickinson wrote:
>> Hi,
>>
>> I had a few emails on this topic I thought better of sending, but I'm
>> sure I'm not the only one wondering why the remaining OpenWrt devs have
>> not responded to the various LEDE overtures on this mailing list.  Is it
>> lack of time, an unwillingness to attempt to have an honest and
>> reasonable dialogue in public, or something else?  I admit that for all
>> the furor over the fork, and complaints about LEDE lack of transparency
>> in the fork, I'm seeing a lot more communication from LEDE than from the
>> remaining devs, and am left to guess the reasons why (although with my
>> mechanism to help me avoid bad emails, I don't give voice to my tendency
>> to the less than generous suspicions, now).
>>   
> 
> Hi Daniel,
> 
> May I ask you to point to which e-mail are you referring to? We are yet to 
> see an official line from LEDE on what they want to see to happen in OpenWrt 
> (setting aside the FUD some LEDE members have shown on the list). The IRC 
> discussion did not happen due to being unable to work out the timezone 
> differences, the conversation on the mailing list did not move forward - this 
> is obviously an issue on our side as well.
> 
> The official line - which I should have sent out a few days ago - from the 
> OpenWrt team is:
> 
> 
> Felix's initial comment was LEDE to become a "development environment" for 
> new ideas, and to keep OpenWrt as the standard distro. We have stayed away 
> from committing to OpenWrt trunk to keep a clean sheet according to this, to 
> let LEDE members cleanly and easily merge their changes. (Apologies to all 
> contributors for not pushing their patches so far). Luka - as no objections 
> but only praises were received - plans to do the proposed github move later 
> this week, which will help with the workflow for contributors.
I think you're distorting Felix's words here (Felix correct us if we're 
mistaken), and making up an excuse for the fact that none of you wants to take 
over with the work that the so called former OpenWrt members did.

> 
> What we would like is to:
> - Ask the LEDE members currently maintaining targets to update their targets,
This is a sensitive task, especially for those of us who lack commit access to 
OpenWrt. Moreover I'm not going to ask blogic, jow or anyone else to spend 
their precious time backporting my LEDE contributions to OpenWrt.

> - Ask the LEDE members to tell us about terms and wishes for reunite. 
> Currently there is no official word from LEDE on this, which is quite 
> confusing.
Do you really want to reunite? I haven't seen any official word from OpenWrt 
either on this matter... (dead end?)

> 
> We will start merging the pending patches in patchwork this week to get trunk 
> back into a healthy state while discussions are underway. LEDE patches will 
> also be brought in where appropriate.
Glad to know this. Who's going to this time consuming work?

> 
> Regards,
> The OpenWrt team
Please specify who the "OpenWrt team" is.
I think it no longer reflects the people stated here: 
https://dev.openwrt.org/wiki/people

> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] Failed to execute /usr/libexec/login.sh

2016-05-12 Thread Álvaro Fernández Rojas
Hello Daniel,

It looks like Luka has already fixed this:
https://dev.openwrt.org/changeset/49376


El 12 may 2016 8:26 +0200, Daniel Dickinson, 
escribió:
> On 16-05-11 06:08 PM, Alexey Brodkin wrote:
> > Hi Daniel,
> >  
> >  
> > breaks something for my boards (in particular arc770-based boards).
> > I'm unable to activate console now. That's what I'm getting
> > every time I press ENTER:
> > ->8-
> > Failed to execute /usr/libexec/login.sh
> > Please press Enter to activate this console.
> > Failed to execute /usr/libexec/login.sh
> > Please press Enter to activate this console.
>  
> In your build tree build_dir/target-/root-  
> can you verify
>  
> bin/login
> bin/ash
> bin/sh
>  
> all exist (they should be symlinks to busybox in bin/busybox which
> should also exist).
>  
> also can you verify /usr/libexed/login.sh is exectuable?
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Introducing the LEDE project

2016-05-04 Thread Álvaro Fernández Rojas

El 04/05/2016 a las 23:40, Daniel Dickinson escribió:

On 16-05-04 12:25 PM, Kathy Giori wrote:

Also wearing my hat within the prpl Foundation, which is funded by
industry sponsorships that in turn provides financial support for
OpenWrt, no one I have spoken to in prpl understands the reason for
this spin-off either. It'll cause more confusion and inefficiency in
industry. prpl will stick with OpenWrt, and I expect most companies
who follow and/or contribute to OpenWrt will stick with it too.

Silly question, but can you outline some specific examples of
contributions that an outsider like me has somehow missed as being as
concrete examples of companies contributing back to openwrt, rather than
just benefiting from it?

Regards,

Daniel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

+1 to Daniel's question.

Regards,
Álvaro.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] brcmfmac43430-firmware: switch to @GITHUB download alias

2016-04-01 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/firmware/brcmfmac43430-firmware/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/firmware/brcmfmac43430-firmware/Makefile 
b/package/firmware/brcmfmac43430-firmware/Makefile
index 6e78e9d..e4a1152 100644
--- a/package/firmware/brcmfmac43430-firmware/Makefile
+++ b/package/firmware/brcmfmac43430-firmware/Makefile
@@ -11,7 +11,7 @@ PKG_RELEASE:=1
 include $(INCLUDE_DIR)/package.mk
 
 BRCMFMAC43430_SDIO_REV:=54bab3d6a6d43239c71d26464e6e10e5067ffea7
-BRCMFMAC43430_SDIO_URL:=https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/$(BRCMFMAC43430_SDIO_REV)/brcm80211/brcm/
+BRCMFMAC43430_SDIO_URL:=@GITHUB/RPi-Distro/firmware-nonfree/$(BRCMFMAC43430_SDIO_REV)/brcm80211/brcm/
 BRCMFMAC43430_SDIO_FILE:=brcmfmac43430-sdio-$(BRCMFMAC43430_SDIO_REV)
 
 define Download/brcmfmac43430_sdio_bin
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] download: add @GITHUB download facility

2016-04-01 Thread Álvaro Fernández Rojas
Define a new alias (@GITHUB) for downloading raw github repository files

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 include/download.mk | 2 +-
 scripts/download.pl | 5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/download.mk b/include/download.mk
index 63af908..a359514 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -13,7 +13,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
 define dl_method
 $(strip \
   $(if $(2),$(2), \
-$(if $(filter @APACHE/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% 
ftp://% http://% https://% file://%,$(1)),default, \
+$(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% 
@SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
   $(if $(filter git://%,$(1)),git, \
 $(if $(filter svn://%,$(1)),svn, \
   $(if $(filter cvs://%,$(1)),cvs, \
diff --git a/scripts/download.pl b/scripts/download.pl
index 20f38f1..a1bd013 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -182,6 +182,11 @@ foreach my $mirror (@ARGV) {
push @mirrors, "http://mirrors.ocf.berkeley.edu/apache/$1;;
push @mirrors, 
"http://mirror.cc.columbia.edu/pub/software/apache/$1;;
push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1;;
+   } elsif ($mirror =~ /^\@GITHUB\/(.+)$/) {
+   # give github a few more tries (different mirrors)
+   for (1 .. 5) {
+   push @mirrors, "https://raw.githubusercontent.com/$1;;
+   }
} elsif ($mirror =~ /^\@GNU\/(.+)$/) {
push @mirrors, "http://ftpmirror.gnu.org/$1;;
push @mirrors, "http://ftp.gnu.org/pub/gnu/$1;;
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Chaos Calmer 15.05.1 brcm63xx/generic missing packages

2016-03-31 Thread Álvaro Fernández Rojas
Apparently it's not the only subtarget missing packages, as bcm2708 and bcm2709 
are also missing management, packages, routing and telephony.
Regards,Álvaro.
_
From: Álvaro Fernández Rojas <nolt...@gmail.com>
Sent: miércoles, marzo 30, 2016 10:50
Subject: Chaos Calmer 15.05.1 brcm63xx/generic missing packages
To: OpenWrt Development List <openwrt-devel@lists.openwrt.org>
Cc: John Crispin <blo...@openwrt.org>


Hello John,
I’ve just realized that luci, management, routing and telephony packages are 
missing for brcm63xx/generic when I was trying to build a firmware with image 
builder.https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/luci/https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/management/https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/routing/https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/telephony/
Any chance of fixing this for 15.05.1? :_(
Regards,Álvaro.


  ___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Chaos Calmer 15.05.1 brcm63xx/generic missing packages

2016-03-30 Thread Álvaro Fernández Rojas
Hello John,

I’ve just realized that luci, management, routing and telephony packages are 
missing for brcm63xx/generic when I was trying to build a firmware with image 
builder.
https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/luci/
 

https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/management/
 

https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/routing/
 

https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm63xx/generic/packages/telephony/
 


Any chance of fixing this for 15.05.1? :_(

Regards,
Álvaro.___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] brcm2708: add brcmfmac43430-firmware-sdio for Rasberry Pi 3

2016-03-30 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk 
b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
index a20e225..c39cf52 100644
--- a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
+++ b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
@@ -7,7 +7,7 @@
 
 define Profile/RaspberryPi_3
   NAME:=Raspberry Pi 3 Model B
-  PACKAGES:=kmod-brcmfmac wpad-mini
+  PACKAGES:=brcmfmac43430-firmware-sdio kmod-brcmfmac wpad-mini
 endef
 define Profile/RaspberryPi_3/Description
   Raspberry Pi 3 Model B
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] brcmfmac43430-firmware: add new package

2016-03-30 Thread Álvaro Fernández Rojas
This adds the firmware needed for the BCM43438 included in Raspberry Pi 3.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/firmware/brcmfmac43430-firmware/Makefile | 61 
 1 file changed, 61 insertions(+)
 create mode 100644 package/firmware/brcmfmac43430-firmware/Makefile

diff --git a/package/firmware/brcmfmac43430-firmware/Makefile 
b/package/firmware/brcmfmac43430-firmware/Makefile
new file mode 100644
index 000..6e78e9d
--- /dev/null
+++ b/package/firmware/brcmfmac43430-firmware/Makefile
@@ -0,0 +1,61 @@
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=brcmfmac43430-firmware-sdio
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+BRCMFMAC43430_SDIO_REV:=54bab3d6a6d43239c71d26464e6e10e5067ffea7
+BRCMFMAC43430_SDIO_URL:=https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/$(BRCMFMAC43430_SDIO_REV)/brcm80211/brcm/
+BRCMFMAC43430_SDIO_FILE:=brcmfmac43430-sdio-$(BRCMFMAC43430_SDIO_REV)
+
+define Download/brcmfmac43430_sdio_bin
+  FILE:=$(BRCMFMAC43430_SDIO_FILE).bin
+  URL:=$(BRCMFMAC43430_SDIO_URL)
+  URL_FILE:=brcmfmac43430-sdio.bin
+  MD5SUM:=4a410ab9a1eefe82e158d36df02b3589
+endef
+$(eval $(call Download,brcmfmac43430_sdio_bin))
+
+define Download/brcmfmac43430_sdio_txt
+  FILE:=$(BRCMFMAC43430_SDIO_FILE).txt
+  URL:=$(BRCMFMAC43430_SDIO_URL)
+  URL_FILE:=brcmfmac43430-sdio.txt
+  MD5SUM:=8c3cb6d8f0609b43f09d083b4006ec5a
+endef
+$(eval $(call Download,brcmfmac43430_sdio_txt))
+
+define Package/brcmfmac43430-firmware-sdio
+  SECTION:=firmware
+  CATEGORY:=Firmware
+  TITLE:=Broadcom BCM43430 fullmac SDIO firmware
+  URL:=http://www.broadcom.com/
+endef
+
+define Package/brcmfmac43430-firmware-sdio/description
+   Broadcom BCM43430 fullmac SDIO firmware
+endef
+
+define Build/Prepare
+   rm -rf $(PKG_BUILD_DIR)
+   mkdir -p $(PKG_BUILD_DIR)
+   cp $(DL_DIR)/$(BRCMFMAC43430_SDIO_FILE).bin 
$(PKG_BUILD_DIR)/brcmfmac43430-sdio.bin
+   cp $(DL_DIR)/$(BRCMFMAC43430_SDIO_FILE).txt 
$(PKG_BUILD_DIR)/brcmfmac43430-sdio.txt
+endef
+
+define Build/Compile
+   true
+endef
+
+define Package/brcmfmac43430-firmware-sdio/install
+   $(INSTALL_DIR) $(1)/lib/firmware/brcm/
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/brcmfmac43430-sdio.bin 
$(1)/lib/firmware/brcm/
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/brcmfmac43430-sdio.txt 
$(1)/lib/firmware/brcm/
+endef
+
+$(eval $(call BuildPackage,brcmfmac43430-firmware-sdio))
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] brcmfmac: Add Raspberry Pi 3 support

2016-03-11 Thread Álvaro Fernández Rojas
- Enable SDIO support on brcmfmac.
- Disable power managment for brcm2708 target.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v3: fix ifdef mistake
 v2: use a proper patch prefix

 package/kernel/mac80211/Makefile   |  1 +
 .../863-brcmfmac-Disable-power-management.patch| 27 ++
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  1 +
 3 files changed, 29 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index e65cf2a..13a07ae 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -673,6 +673,7 @@ define KernelPackage/brcmfmac/config
 
config BRCMFMAC_SDIO
bool "Enable SDIO bus interface support"
+   default y if TARGET_brcm2708
default n
help
  Enable support for cards attached to an SDIO bus.
diff --git 
a/package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch 
b/package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch
new file mode 100644
index 000..1615202
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch
@@ -0,0 +1,27 @@
+From 66ae1b1750720a33e29792a177b1e696f4f005fb Mon Sep 17 00:00:00 2001
+From: Phil Elwell <p...@raspberrypi.org>
+Date: Wed, 9 Mar 2016 17:25:59 +
+Subject: [PATCH] brcmfmac: Disable power management
+
+Disable wireless power saving in the brcmfmac WLAN driver. This is a
+temporary measure until the connectivity loss resulting from power
+saving is resolved.
+
+Signed-off-by: Phil Elwell <p...@raspberrypi.org>
+---
+ drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
 b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+@@ -2651,6 +2651,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+* preference in cfg struct to apply this to
+* FW later while initializing the dongle
+*/
++#if defined(CONFIG_BCM2708) || defined(CONFIG_BCM2709)
++  pr_info("power management disabled\n");
++  enabled = false;
++#endif
+   cfg->pwr_save = enabled;
+   if (!check_vif_up(ifp->vif)) {
+ 
diff --git a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk 
b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
index 251a8b5..a20e225 100644
--- a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
+++ b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
@@ -7,6 +7,7 @@
 
 define Profile/RaspberryPi_3
   NAME:=Raspberry Pi 3 Model B
+  PACKAGES:=kmod-brcmfmac wpad-mini
 endef
 define Profile/RaspberryPi_3/Description
   Raspberry Pi 3 Model B
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] brcmfmac: Add Raspberry Pi 3 support

2016-03-10 Thread Álvaro Fernández Rojas
Indeed, it's a mistake.

> El 11 mar 2016, a las 8:15, Rafał Miłecki <zaj...@gmail.com> escribió:
> 
>> On 10 March 2016 at 20:52, Álvaro Fernández Rojas <nolt...@gmail.com> wrote:
>> +@@ -2651,6 +2651,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
>> +* preference in cfg struct to apply this to
>> +* FW later while initializing the dongle
>> +*/
>> ++#ifdef defined(CONFIG_BCM2708) || defined(CONFIG_BCM2709)
>> ++  pr_info("power management disabled\n");
>> ++  enabled = false;
>> ++#endif
> 
> I'm not sure what's the result of above, but I used to use
> #ifdef CONFIG_FOO
> or
> #if defined(CONFIG_FOO)
> 
> I don't think kernel ever uses combination of both (ifdef + defined
> macro). Guess it's a mistake there?
> 
> -- 
> Rafał
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] brcmfmac: Add Raspberry Pi 3 support

2016-03-10 Thread Álvaro Fernández Rojas
- Enable SDIO support on brcmfmac.
- Disable power managment for brcm2708 target.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/mac80211/Makefile   |  1 +
 .../863-brcmfmac-Disable-power-management.patch| 27 ++
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  1 +
 3 files changed, 29 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index e65cf2a..13a07ae 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -673,6 +673,7 @@ define KernelPackage/brcmfmac/config
 
config BRCMFMAC_SDIO
bool "Enable SDIO bus interface support"
+   default y if TARGET_brcm2708
default n
help
  Enable support for cards attached to an SDIO bus.
diff --git 
a/package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch 
b/package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch
new file mode 100644
index 000..72f88e4
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/863-brcmfmac-Disable-power-management.patch
@@ -0,0 +1,27 @@
+From 66ae1b1750720a33e29792a177b1e696f4f005fb Mon Sep 17 00:00:00 2001
+From: Phil Elwell <p...@raspberrypi.org>
+Date: Wed, 9 Mar 2016 17:25:59 +
+Subject: [PATCH] brcmfmac: Disable power management
+
+Disable wireless power saving in the brcmfmac WLAN driver. This is a
+temporary measure until the connectivity loss resulting from power
+saving is resolved.
+
+Signed-off-by: Phil Elwell <p...@raspberrypi.org>
+---
+ drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
 b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+@@ -2651,6 +2651,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+* preference in cfg struct to apply this to
+* FW later while initializing the dongle
+*/
++#ifdef defined(CONFIG_BCM2708) || defined(CONFIG_BCM2709)
++  pr_info("power management disabled\n");
++  enabled = false;
++#endif
+   cfg->pwr_save = enabled;
+   if (!check_vif_up(ifp->vif)) {
+ 
diff --git a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk 
b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
index 251a8b5..a20e225 100644
--- a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
+++ b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
@@ -7,6 +7,7 @@
 
 define Profile/RaspberryPi_3
   NAME:=Raspberry Pi 3 Model B
+  PACKAGES:=kmod-brcmfmac wpad-mini
 endef
 define Profile/RaspberryPi_3/Description
   Raspberry Pi 3 Model B
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] brcmfmac: Add Raspberry Pi 3 support

2016-03-09 Thread Álvaro Fernández Rojas

It's a temporary hack until power management issues are solved:
https://github.com/raspberrypi/linux/commit/66ae1b1750720a33e29792a177b1e696f4f005fb
I don't think it was submitted upstream.

El 09/03/2016 a las 21:07, Rafał Miłecki escribió:

On 9 March 2016 at 20:32, Álvaro Fernández Rojas <nolt...@gmail.com> wrote:

diff --git 
a/package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch 
b/package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch
new file mode 100644
index 000..091f175
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch
@@ -0,0 +1,27 @@
+From 66ae1b1750720a33e29792a177b1e696f4f005fb Mon Sep 17 00:00:00 2001
+From: Phil Elwell <p...@raspberrypi.org>
+Date: Wed, 9 Mar 2016 17:25:59 +
+Subject: [PATCH] brcmfmac: Disable power management
+
+Disable wireless power saving in the brcmfmac WLAN driver. This is a
+temporary measure until the connectivity loss resulting from power
+saving is resolved.
+
+Signed-off-by: Phil Elwell <p...@raspberrypi.org>

I can't find this patch sent for upstream inclusion. Can you point me to it?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] brcmfmac: Add Raspberry Pi 3 support

2016-03-09 Thread Álvaro Fernández Rojas
- Enable SDIO support on brcmfmac.
- Disable power managment for brcm2708 target.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/mac80211/Makefile   |  1 +
 .../345-brcmfmac-Disable-power-management.patch| 27 ++
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  1 +
 3 files changed, 29 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index e65cf2a..13a07ae 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -673,6 +673,7 @@ define KernelPackage/brcmfmac/config
 
config BRCMFMAC_SDIO
bool "Enable SDIO bus interface support"
+   default y if TARGET_brcm2708
default n
help
  Enable support for cards attached to an SDIO bus.
diff --git 
a/package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch 
b/package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch
new file mode 100644
index 000..091f175
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch
@@ -0,0 +1,27 @@
+From 66ae1b1750720a33e29792a177b1e696f4f005fb Mon Sep 17 00:00:00 2001
+From: Phil Elwell <p...@raspberrypi.org>
+Date: Wed, 9 Mar 2016 17:25:59 +
+Subject: [PATCH] brcmfmac: Disable power management
+
+Disable wireless power saving in the brcmfmac WLAN driver. This is a
+temporary measure until the connectivity loss resulting from power
+saving is resolved.
+
+Signed-off-by: Phil Elwell <p...@raspberrypi.org>
+---
+ drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
 b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+@@ -2623,6 +2623,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+* preference in cfg struct to apply this to
+* FW later while initializing the dongle
+*/
++#ifdef defined(CONFIG_BCM2708) || defined(CONFIG_BCM2709)
++  pr_info("power management disabled\n");
++  enabled = false;
++#endif
+   cfg->pwr_save = enabled;
+   if (!check_vif_up(ifp->vif)) {
+ 
diff --git a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk 
b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
index 251a8b5..a20e225 100644
--- a/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
+++ b/target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
@@ -7,6 +7,7 @@
 
 define Profile/RaspberryPi_3
   NAME:=Raspberry Pi 3 Model B
+  PACKAGES:=kmod-brcmfmac wpad-mini
 endef
 define Profile/RaspberryPi_3/Description
   Raspberry Pi 3 Model B
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] brcm2708: update patches to latest version

2016-03-09 Thread Álvaro Fernández Rojas
As usual these patches were extracted from the raspberry repo:
https://github.com/raspberrypi/linux/commits/rpi-4.4.y

- Disable unused MFD RPISENSE driver.
- Disable ethernet HW checksums in order to avoid kernel exceptions.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/modules.mk   |   7 +-
 ...port-for-the-CONFIG_CMDLINE_EXTEND-option.patch |   0
 ...171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch |  96 
 ...BCM270X_DT-Add-pi3-miniuart-bt-DT-overlay.patch | 117 ++
 ...-Pi3-DT-Add-dtparams-for-the-SD-interface.patch |  25 +++
 .../0174-vchiq_arm-Tweak-the-logging-output.patch  |  75 +
 ...bcm2835-sdhost-Only-claim-one-DMA-channel.patch | 160 +++
 ...76-bcm2835-mmc-Only-claim-one-DMA-channel.patch | 170 +
 .../0177-config-rebuild-with-savedefconfig.patch   |  28 
 .../0178-config-Add-module-for-mcp3422-ADC.patch   |  30 
 ...-Pi3-DT-Add-pull-ups-on-the-UART-RX-lines.patch |  40 +
 .../patches-4.4/1000-mfd-rpisense-disable.patch|  10 ++
 .../1001-smsc95xx-disable-hw-csum.patch|  11 ++
 13 files changed, 763 insertions(+), 6 deletions(-)
 mode change 100755 => 100644 
target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0172-BCM270X_DT-Add-pi3-miniuart-bt-DT-overlay.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0173-Pi3-DT-Add-dtparams-for-the-SD-interface.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0174-vchiq_arm-Tweak-the-logging-output.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0175-bcm2835-sdhost-Only-claim-one-DMA-channel.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0176-bcm2835-mmc-Only-claim-one-DMA-channel.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0177-config-rebuild-with-savedefconfig.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0178-config-Add-module-for-mcp3422-ADC.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0179-Pi3-DT-Add-pull-ups-on-the-UART-RX-lines.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/1000-mfd-rpisense-disable.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/1001-smsc95xx-disable-hw-csum.patch

diff --git a/target/linux/brcm2708/modules.mk b/target/linux/brcm2708/modules.mk
index 2802c1d..04e6aa9 100644
--- a/target/linux/brcm2708/modules.mk
+++ b/target/linux/brcm2708/modules.mk
@@ -274,7 +274,6 @@ define KernelPackage/spi-bcm2835
   SUBMENU:=$(SPI_MENU)
   TITLE:=BCM2835 SPI controller driver
   KCONFIG:=\
-CONFIG_BCM2708_SPIDEV=n \
 CONFIG_SPI=y \
 CONFIG_SPI_BCM2835 \
 CONFIG_SPI_MASTER=y
@@ -293,7 +292,6 @@ define KernelPackage/spi-bcm2835-aux
   SUBMENU:=$(SPI_MENU)
   TITLE:=BCM2835 Aux SPI controller driver
   KCONFIG:=\
-CONFIG_BCM2708_SPIDEV=n \
 CONFIG_SPI=y \
 CONFIG_SPI_BCM2835AUX \
 CONFIG_SPI_MASTER=y
@@ -331,8 +329,7 @@ define KernelPackage/i2c-bcm2708
   $(call i2c_defaults,$(I2C_BCM2708_MODULES),59)
   TITLE:=Broadcom BCM2708 I2C master controller driver
   KCONFIG+= \
-   CONFIG_I2C_BCM2708_BAUDRATE=10 \
-   CONFIG_MFD_RPISENSE_CORE=n
+   CONFIG_I2C_BCM2708_BAUDRATE=10
   DEPENDS:=@TARGET_brcm2708 +kmod-i2c-core
 endef
 
@@ -348,8 +345,6 @@ I2C_BCM2835_MODULES:=\
 define KernelPackage/i2c-bcm2835
   $(call i2c_defaults,$(I2C_BCM2835_MODULES),59)
   TITLE:=Broadcom BCM2835 I2C master controller driver
-  KCONFIG+= \
-   CONFIG_MFD_RPISENSE_CORE=n
   DEPENDS:=@TARGET_brcm2708 +kmod-i2c-core
 endef
 
diff --git 
a/target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch
 
b/target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch
old mode 100755
new mode 100644
diff --git 
a/target/linux/brcm2708/patches-4.4/0171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch
 
b/target/linux/brcm2708/patches-4.4/0171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch
new file mode 100644
index 000..d00439e
--- /dev/null
+++ 
b/target/linux/brcm2708/patches-4.4/0171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch
@@ -0,0 +1,96 @@
+From 42a9bb566fe376a1add4b3780c1b830f64500faa Mon Sep 17 00:00:00 2001
+From: Phil Elwell <p...@raspberrypi.org>
+Date: Wed, 2 Mar 2016 10:59:05 +
+Subject: [PATCH 171/180] BCM270X_DT: Add pi3-disable-bt overlay
+
+Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable
+the systemd service that initialises the modem so it doesn't use the UART:
+
+   sudo systemctl disable hciuart
+
+Signed-off-by: Phil Elwell <p...@raspberrypi.org>
+---
+ arch/arm/boot/dts/overlays/Makefile|  1 +
+ arch/arm/boot/dts/overlays/README  |  8 
+ .../boot/dts/overlays/p

[OpenWrt-Devel] [PATCH 0/2] brcm2708: Add WiFi support for Raspberry Pi 3

2016-03-09 Thread Álvaro Fernández Rojas
These patches add support for WiFi on the Raspberry Pi 3.

Log: 
https://gist.github.com/Noltari/92f51259c9d18506192b#file-brcm2710_rpi3_wifi-log

Considerations:
1) No firmware files provided until licenses are clarified:
https://github.com/raspberrypi/linux/issues/1325
For now the user has to manually download brcmfmac43430-sdio.bin and
brcmfmac43430-sdio.txt files to /lib/firmware/brcm.
2) Power managment isn't properly working, so it needs to be disabled.

Álvaro Fernández Rojas (2):
  brcm2708: update patches to latest version
  brcmfmac: Add Raspberry Pi 3 support

 package/kernel/mac80211/Makefile   |   1 +
 .../345-brcmfmac-Disable-power-management.patch|  27 
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |   1 +
 target/linux/brcm2708/modules.mk   |   7 +-
 ...port-for-the-CONFIG_CMDLINE_EXTEND-option.patch |   0
 ...171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch |  96 
 ...BCM270X_DT-Add-pi3-miniuart-bt-DT-overlay.patch | 117 ++
 ...-Pi3-DT-Add-dtparams-for-the-SD-interface.patch |  25 +++
 .../0174-vchiq_arm-Tweak-the-logging-output.patch  |  75 +
 ...bcm2835-sdhost-Only-claim-one-DMA-channel.patch | 160 +++
 ...76-bcm2835-mmc-Only-claim-one-DMA-channel.patch | 170 +
 .../0177-config-rebuild-with-savedefconfig.patch   |  28 
 .../0178-config-Add-module-for-mcp3422-ADC.patch   |  30 
 ...-Pi3-DT-Add-pull-ups-on-the-UART-RX-lines.patch |  40 +
 .../patches-4.4/1000-mfd-rpisense-disable.patch|  10 ++
 .../1001-smsc95xx-disable-hw-csum.patch|  11 ++
 16 files changed, 792 insertions(+), 6 deletions(-)
 create mode 100644 
package/kernel/mac80211/patches/345-brcmfmac-Disable-power-management.patch
 mode change 100755 => 100644 
target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0172-BCM270X_DT-Add-pi3-miniuart-bt-DT-overlay.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0173-Pi3-DT-Add-dtparams-for-the-SD-interface.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0174-vchiq_arm-Tweak-the-logging-output.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0175-bcm2835-sdhost-Only-claim-one-DMA-channel.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0176-bcm2835-mmc-Only-claim-one-DMA-channel.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0177-config-rebuild-with-savedefconfig.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0178-config-Add-module-for-mcp3422-ADC.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/0179-Pi3-DT-Add-pull-ups-on-the-UART-RX-lines.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/1000-mfd-rpisense-disable.patch
 create mode 100644 
target/linux/brcm2708/patches-4.4/1001-smsc95xx-disable-hw-csum.patch

-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/4] Add Raspberry Pi 3 support

2016-03-08 Thread Álvaro Fernández Rojas

I've got WiFi and Bluetooth working:
https://github.com/openwrt-es/openwrt/commits/brcm2708-rpi3-wifi
https://github.com/openwrt-es/openwrt/commits/brcm2708-rpi3-bt

WiFi is working after latest brcmfmac patches backported by Rafał, with 
some issues like the following:
brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, 
flags 0x44


BT is working but only for baud rates <= 115200. I'm still investigating 
why.

In order to setup the bluetooth, the following bluez patches are needed:
https://github.com/openwrt/packages/pull/2464

By the way, I won't be submitting any WiFi/BT patches until anyone from 
either the Raspberry foundation or Broadcom clarifies the license of the 
firmware files.

https://github.com/raspberrypi/linux/issues/1325

Regards,
Álvaro.

El 04/03/2016 a las 21:06, Álvaro Fernández Rojas escribió:

These patches add basic Raspberry Pi 3 support.

Bootlog: 
https://gist.github.com/Noltari/92f51259c9d18506192b#file-bcm2710_rpi3-log

Known issues:
1) No ARMv8 64 bit support.
  More info:
  https://github.com/raspberrypi/firmware/issues/550
2) UART0 is connected to BCM43430 (Bluetooth), which means that console relies 
on UART1.
  UART1 clock depends on pll_freq, which changes depending on the core 
frequency.
  In order to get a proper console through GPIOs 14 & 15, you should force a 
fixed frequency instead of the default dynamic one.
  You can do that by either setting core_freq=250 on config.txt or 
force_turbo=1 (this last option will run your rpi at maximum frequency so be 
careful).
  The framebuffer console (HDMI) isn't affected so you can use that one with an 
external keyboard and USB HID package.
  More info:
  https://github.com/raspberrypi/firmware/issues/553
  https://github.com/RPi-Distro/repo/issues/22
3) No WiFi support.
  brcmfmac43430-sdio.bin / brcmfmac43430-sdio.txt firmware files aren't 
available on linux-firmware for now.
  Downloading those files from https://github.com/RPi-Distro/firmware-nonfree 
and trying to enable BCM43430 SDIO WiFi causes the following kernel exception:
  
https://gist.github.com/Noltari/92f51259c9d18506192b#file-bcm2710_rpi3_brcmfmac-log
4) No Bluetooth support.

Álvaro Fernández Rojas (4):
   include: add Cortex-A53 CPU_TYPE
   brcm2708-gpu-fw: update to latest version
   brcm2708: update linux 4.4 patches to latest version
   brcm2708: add Raspberry Pi 3 support

  include/target.mk  |   1 +
  package/kernel/brcm2708-gpu-fw/Makefile|   8 +-
  target/linux/brcm2708/Makefile |   8 +-
  .../brcm2708/base-files/etc/board.d/02_network |   5 +-
  target/linux/brcm2708/base-files/etc/diag.sh   |   7 +-
  target/linux/brcm2708/base-files/etc/inittab   |   2 +-
  target/linux/brcm2708/base-files/lib/brcm2708.sh   |   5 +-
  .../lib/preinit/05_set_preinit_iface_brcm2708  |   7 +-
  target/linux/brcm2708/bcm2708/config-4.4   |   7 +-
  target/linux/brcm2708/bcm2709/config-4.4   |   7 +-
  target/linux/brcm2708/bcm2710/config-4.4   | 389 
  .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  14 +
  target/linux/brcm2708/bcm2710/target.mk|  12 +
  target/linux/brcm2708/image/Makefile   |  12 +-
  target/linux/brcm2708/image/cmdline.txt|   2 +-
  target/linux/brcm2708/modules.mk   |  19 +
  ...0001-smsx95xx-fix-crimes-against-truesize.patch |   4 +-
  ...02-smsc95xx-Disable-turbo-mode-by-default.patch |   4 +-
  ...around-for-issue-where-dirty-page-count-g.patch |   4 +-
  .../0004-BCM2835_DT-Fix-I2S-register-map.patch |   4 +-
  ...-Prevent-spurious-interrupts-and-trap-the.patch |   4 +-
  .../0006-irqchip-bcm2835-Add-FIQ-support.patch |   4 +-
  ...-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch |   4 +-
  ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch |   4 +-
  ...2835-Set-base-to-0-give-expected-gpio-num.patch |   4 +-
  ...2835-Fix-interrupt-handling-for-GPIOs-28-.patch |   4 +-
  ...2835-Only-request-the-interrupts-listed-i.patch |   4 +-
  ...cm2835-Support-pin-groups-other-than-7-11.patch |   4 +-
  ...RM-bcm2835-Set-Serial-number-and-Revision.patch |   4 +-
  ...-get-base-address-for-DMA-from-devicetree.patch |   4 +-
  ...-add-24bit-support-update-bclk_ratio-to-m.patch |   4 +-
  ...s-setup-clock-only-if-CPU-is-clock-master.patch |   4 +-
  ...835-i2s-Eliminate-debugfs-directory-error.patch |   4 +-
  .../0018-bcm2835-i2s-Register-PCM-device.patch |   4 +-
  ...i2s-Enable-MMAP-support-via-a-DT-property.patch |   4 +-
  ...0-dmaengine-bcm2835-Add-slave-dma-support.patch |   4 +-
  ...ine-bcm2835-set-residue_granularity-field.patch |   4 +-
  ...cm2835-Load-driver-early-and-support-lega.patch |   4 +-
  ...-dma-Fix-dreq-not-set-for-slave-transfers.patch |   4 +-
  ...-Limit-cyclic-transfers-on-lite-channels-.patch |   4 +-
  .../0025-bcm2835-Add-support-for-uart1.patch   |   4 +-
  ...irmware-bcm2835-Add-missing-property-tags.patc

Re: [OpenWrt-Devel] Read-only mirror https://github.com/openwrt/openwrt is stuck since 12 days ago

2016-03-07 Thread Álvaro Fernández Rojas
I just want to add that openwrt-commits list is also affected, since last 
commit published there matches the last one in the read-only mirror.

Regards,
Álvaro.

> El 6 mar 2016, a las 19:33, Hannu Nyman  escribió:
> 
> The read-only mirror for the main Openwrt sources at Github has been stuck 
> since 12 days ago.
> 
> https://github.com/openwrt/openwrt
> 
> Both trunk and Chaos Calmer have got new commits since then...
> 
> Apparently the mirror has not returned to automatic updates after the 
> network/hardware troubles.
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] brcm2708: add Raspberry Pi 3 support

2016-03-04 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/Makefile |   8 +-
 .../brcm2708/base-files/etc/board.d/02_network |   5 +-
 target/linux/brcm2708/base-files/etc/diag.sh   |   7 +-
 target/linux/brcm2708/base-files/etc/inittab   |   2 +-
 target/linux/brcm2708/base-files/lib/brcm2708.sh   |   5 +-
 .../lib/preinit/05_set_preinit_iface_brcm2708  |   7 +-
 target/linux/brcm2708/bcm2710/config-4.4   | 389 +
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  14 +
 target/linux/brcm2708/bcm2710/target.mk|  12 +
 target/linux/brcm2708/image/Makefile   |  12 +-
 target/linux/brcm2708/image/cmdline.txt|   2 +-
 11 files changed, 443 insertions(+), 20 deletions(-)
 create mode 100644 target/linux/brcm2708/bcm2710/config-4.4
 create mode 100644 target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
 create mode 100644 target/linux/brcm2708/bcm2710/target.mk

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index f26da4f..112a5b6 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,10 +9,10 @@ include $(INCLUDE_DIR)/host.mk
 
 ARCH:=arm
 BOARD:=brcm2708
-BOARDNAME:=Broadcom BCM2708/BCM2709
+BOARDNAME:=Broadcom BCM27xx
 FEATURES:=ext4 audio usb usbgadget display gpio fpu
 MAINTAINER:=Florian Fainelli <flor...@openwrt.org>
-SUBTARGETS:=bcm2708 bcm2709
+SUBTARGETS:=bcm2708 bcm2709 bcm2710
 
 KERNEL_PATCHVER:=4.4
 
@@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core 
kmod-sound-arm-bcm2835 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
 
 define Target/Description
-   Build firmware image for Broadcom BCM2708/BCM2709 SoC devices.
+   Build firmware image for Broadcom BCM27xx SoC devices.
Currently produces SD Card image for Raspberry Pi.
 endef
 
diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network 
b/target/linux/brcm2708/base-files/etc/board.d/02_network
index c47e8f0..7642c06 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2014-2015 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
 
 . /lib/functions/uci-defaults.sh
 . /lib/brcm2708.sh
@@ -13,7 +13,8 @@ board=$(brcm2708_board_name)
 case "$board" in
 rpi-b |\
 rpi-b-plus |\
-rpi-2-b)
+rpi-2-b |\
+rpi-3-b)
ucidef_set_interface_lan "eth0"
;;
 esac
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 3a8dc86..de21bcd 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -1,7 +1,5 @@
 #!/bin/sh
-#
-# Copyright (C) 2015 OpenWrt.org
-#
+# Copyright (C) 2015-2016 OpenWrt.org
 
 . /lib/functions/leds.sh
 . /lib/brcm2708.sh
@@ -13,7 +11,8 @@ set_state() {
status_led="led0"
;;
rpi-b-plus |\
-   rpi-2-b)
+   rpi-2-b |\
+   rpi-3-b)
status_led="led1"
;;
esac
diff --git a/target/linux/brcm2708/base-files/etc/inittab 
b/target/linux/brcm2708/base-files/etc/inittab
index c05c555..a6c0bc8 100644
--- a/target/linux/brcm2708/base-files/etc/inittab
+++ b/target/linux/brcm2708/base-files/etc/inittab
@@ -1,4 +1,4 @@
 ::sysinit:/etc/init.d/rcS S boot
 ::shutdown:/etc/init.d/rcS K shutdown
-ttyAMA0::askfirst:/bin/ash --login
+::askconsole:/bin/ash --login
 tty1::askfirst:/bin/ash --login
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
index cb4089d..5a59a28 100644
--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 
 ifname=""
 
@@ -21,6 +21,9 @@ brcm2708_detect() {
"Raspberry Pi 2 Model B Rev"*)
board_name="rpi-2-b"
;;
+   "Raspberry Pi 3 Model B Rev"*)
+   board_name="rpi-3-b"
+   ;;
*)
board_name="unknown"
;;
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 
b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
index 154b01c..578172e 100644
--- a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
+++ b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
@@ -1,7 +1,5 @@
 #!/bin/sh
-#

[OpenWrt-Devel] [PATCH 2/4] brcm2708-gpu-fw: update to latest version

2016-03-04 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/brcm2708-gpu-fw/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 48c9929..eb4e746 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=98e801605b31a5d7a4c36de5cb1d0e33ce95e8ab
-PKG_VERSION:=20151214
+PKG_REV:=30fe8178d61c1ff9bc168edaafdbcb101aa6245e
+PKG_VERSION:=20160304
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=66bbad77fdd9e5391d4130fa11d94646
+PKG_MD5SUM:=5707f4d9ffd8d10018c68ecb8b363308
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] include: add Cortex-A53 CPU_TYPE

2016-03-04 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 include/target.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/target.mk b/include/target.mk
index dbb6327..76fbd99 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -237,6 +237,7 @@ ifeq ($(DUMP),1)
 CPU_CFLAGS_cortex-a8 = -march=armv7-a -mtune=cortex-a8
 CPU_CFLAGS_cortex-a9 = -march=armv7-a -mtune=cortex-a9
 CPU_CFLAGS_cortex-a15 = -march=armv7-a -mtune=cortex-a15
+CPU_CFLAGS_cortex-a53 = -march=armv8-a -mtune=cortex-a53
 CPU_CFLAGS_fa526 = -march=armv4 -mtune=fa526
 CPU_CFLAGS_mpcore = -march=armv6k -mtune=mpcore
 CPU_CFLAGS_xscale = -march=armv5te -mtune=xscale
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/4] Add Raspberry Pi 3 support

2016-03-04 Thread Álvaro Fernández Rojas
These patches add basic Raspberry Pi 3 support.

Bootlog: 
https://gist.github.com/Noltari/92f51259c9d18506192b#file-bcm2710_rpi3-log

Known issues:
1) No ARMv8 64 bit support.
 More info:
 https://github.com/raspberrypi/firmware/issues/550
2) UART0 is connected to BCM43430 (Bluetooth), which means that console relies 
on UART1.
 UART1 clock depends on pll_freq, which changes depending on the core frequency.
 In order to get a proper console through GPIOs 14 & 15, you should force a 
fixed frequency instead of the default dynamic one.
 You can do that by either setting core_freq=250 on config.txt or force_turbo=1 
(this last option will run your rpi at maximum frequency so be careful).
 The framebuffer console (HDMI) isn't affected so you can use that one with an 
external keyboard and USB HID package.
 More info:
 https://github.com/raspberrypi/firmware/issues/553
 https://github.com/RPi-Distro/repo/issues/22
3) No WiFi support.
 brcmfmac43430-sdio.bin / brcmfmac43430-sdio.txt firmware files aren't 
available on linux-firmware for now.
 Downloading those files from https://github.com/RPi-Distro/firmware-nonfree 
and trying to enable BCM43430 SDIO WiFi causes the following kernel exception:
 
https://gist.github.com/Noltari/92f51259c9d18506192b#file-bcm2710_rpi3_brcmfmac-log
4) No Bluetooth support.

Álvaro Fernández Rojas (4):
  include: add Cortex-A53 CPU_TYPE
  brcm2708-gpu-fw: update to latest version
  brcm2708: update linux 4.4 patches to latest version
  brcm2708: add Raspberry Pi 3 support

 include/target.mk  |   1 +
 package/kernel/brcm2708-gpu-fw/Makefile|   8 +-
 target/linux/brcm2708/Makefile |   8 +-
 .../brcm2708/base-files/etc/board.d/02_network |   5 +-
 target/linux/brcm2708/base-files/etc/diag.sh   |   7 +-
 target/linux/brcm2708/base-files/etc/inittab   |   2 +-
 target/linux/brcm2708/base-files/lib/brcm2708.sh   |   5 +-
 .../lib/preinit/05_set_preinit_iface_brcm2708  |   7 +-
 target/linux/brcm2708/bcm2708/config-4.4   |   7 +-
 target/linux/brcm2708/bcm2709/config-4.4   |   7 +-
 target/linux/brcm2708/bcm2710/config-4.4   | 389 
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  14 +
 target/linux/brcm2708/bcm2710/target.mk|  12 +
 target/linux/brcm2708/image/Makefile   |  12 +-
 target/linux/brcm2708/image/cmdline.txt|   2 +-
 target/linux/brcm2708/modules.mk   |  19 +
 ...0001-smsx95xx-fix-crimes-against-truesize.patch |   4 +-
 ...02-smsc95xx-Disable-turbo-mode-by-default.patch |   4 +-
 ...around-for-issue-where-dirty-page-count-g.patch |   4 +-
 .../0004-BCM2835_DT-Fix-I2S-register-map.patch |   4 +-
 ...-Prevent-spurious-interrupts-and-trap-the.patch |   4 +-
 .../0006-irqchip-bcm2835-Add-FIQ-support.patch |   4 +-
 ...-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch |   4 +-
 ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch |   4 +-
 ...2835-Set-base-to-0-give-expected-gpio-num.patch |   4 +-
 ...2835-Fix-interrupt-handling-for-GPIOs-28-.patch |   4 +-
 ...2835-Only-request-the-interrupts-listed-i.patch |   4 +-
 ...cm2835-Support-pin-groups-other-than-7-11.patch |   4 +-
 ...RM-bcm2835-Set-Serial-number-and-Revision.patch |   4 +-
 ...-get-base-address-for-DMA-from-devicetree.patch |   4 +-
 ...-add-24bit-support-update-bclk_ratio-to-m.patch |   4 +-
 ...s-setup-clock-only-if-CPU-is-clock-master.patch |   4 +-
 ...835-i2s-Eliminate-debugfs-directory-error.patch |   4 +-
 .../0018-bcm2835-i2s-Register-PCM-device.patch |   4 +-
 ...i2s-Enable-MMAP-support-via-a-DT-property.patch |   4 +-
 ...0-dmaengine-bcm2835-Add-slave-dma-support.patch |   4 +-
 ...ine-bcm2835-set-residue_granularity-field.patch |   4 +-
 ...cm2835-Load-driver-early-and-support-lega.patch |   4 +-
 ...-dma-Fix-dreq-not-set-for-slave-transfers.patch |   4 +-
 ...-Limit-cyclic-transfers-on-lite-channels-.patch |   4 +-
 .../0025-bcm2835-Add-support-for-uart1.patch   |   4 +-
 ...irmware-bcm2835-Add-missing-property-tags.patch |   4 +-
 .../0027-Main-bcm2708-bcm2709-linux-port.patch |   4 +-
 ...-squash-include-ARCH_BCM2708-ARCH_BCM2709.patch |   4 +-
 .../patches-4.4/0029-Add-dwc_otg-driver.patch  |   4 +-
 .../0030-bcm2708-framebuffer-driver.patch  |   4 +-
 .../0031-dmaengine-Add-support-for-BCM2708.patch   |   4 +-
 ...-parameter-to-mmc-multi_io_quirk-callback.patch |   4 +-
 .../0033-MMC-added-alternative-MMC-driver.patch|   4 +-
 ...835-sdhost-driver-and-an-overlay-to-enabl.patch |   4 +-
 ...ma-Add-vc_cma-driver-to-enable-use-of-CMA.patch |   4 +-
 .../0036-bcm2708-alsa-sound-driver.patch   |   4 +-
 .../patches-4.4/0037-bcm2708-vchiq-driver.patch|   4 +-
 .../0038-vc_mem-Add-vc_mem-driver.patch|   4 +-
 ...deoCore-shared-memory-service-for-BCM2835.patch |   4 +-
 ...omem-device-for-rootless-user-GPIO-access.patch |   4 +-
 .../brcm2708/patches-4.4/0041-Add-SMI-driver.p

[OpenWrt-Devel] [RFC 4/4] brcm2708: add Raspberry Pi 3 support

2016-02-29 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/Makefile |   8 +-
 target/linux/brcm2708/bcm2710/config-4.4   | 390 +
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  14 +
 target/linux/brcm2708/bcm2710/target.mk|  12 +
 target/linux/brcm2708/image/Makefile   |  12 +-
 5 files changed, 429 insertions(+), 7 deletions(-)
 create mode 100644 target/linux/brcm2708/bcm2710/config-4.4
 create mode 100644 target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk
 create mode 100644 target/linux/brcm2708/bcm2710/target.mk

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index f26da4f..112a5b6 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,10 +9,10 @@ include $(INCLUDE_DIR)/host.mk
 
 ARCH:=arm
 BOARD:=brcm2708
-BOARDNAME:=Broadcom BCM2708/BCM2709
+BOARDNAME:=Broadcom BCM27xx
 FEATURES:=ext4 audio usb usbgadget display gpio fpu
 MAINTAINER:=Florian Fainelli <flor...@openwrt.org>
-SUBTARGETS:=bcm2708 bcm2709
+SUBTARGETS:=bcm2708 bcm2709 bcm2710
 
 KERNEL_PATCHVER:=4.4
 
@@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core 
kmod-sound-arm-bcm2835 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
 
 define Target/Description
-   Build firmware image for Broadcom BCM2708/BCM2709 SoC devices.
+   Build firmware image for Broadcom BCM27xx SoC devices.
Currently produces SD Card image for Raspberry Pi.
 endef
 
diff --git a/target/linux/brcm2708/bcm2710/config-4.4 
b/target/linux/brcm2708/bcm2710/config-4.4
new file mode 100644
index 000..4f81d26
--- /dev/null
+++ b/target/linux/brcm2708/bcm2710/config-4.4
@@ -0,0 +1,390 @@
+# CONFIG_AIO is not set
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_AMBA_PL08X is not set
+# CONFIG_APM_EMULATION is not set
+# CONFIG_ARCH_BCM2708 is not set
+CONFIG_ARCH_BCM2709=y
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+# CONFIG_ARCH_HAS_SG_CHAIN is not set
+CONFIG_ARCH_HAS_TICK_BROADCAST=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
+CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+# CONFIG_ARM_LPAE is not set
+# CONFIG_ARM_SP805_WATCHDOG is not set
+CONFIG_ARM_THUMB=y
+# CONFIG_ARM_THUMBEE is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BCM2708_NOL2CACHE=y
+CONFIG_BCM2708_VCHIQ=y
+CONFIG_BCM2708_VCMEM=y
+# CONFIG_BCM2835_DEVGPIOMEM is not set
+CONFIG_BCM2835_MBOX=y
+# CONFIG_BCM2835_SMI is not set
+CONFIG_BCM2835_WDT=y
+CONFIG_BCM_VCIO=y
+CONFIG_BCM_VC_CMA=y
+CONFIG_BCM_VC_SM=y
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_SD=y
+CONFIG_BRCM_CHAR_DRIVERS=y
+CONFIG_BUILD_BIN2C=y
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_OF=y
+CONFIG_CLKSRC_PROBE=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 
kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
+CONFIG_COMMON_CLK=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_HAS_ASID=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFI

[OpenWrt-Devel] [RFC 0/4] Add support for Raspberry Pi 3

2016-02-29 Thread Álvaro Fernández Rojas
This adds untested support for Raspberry Pi 3.
I will be able to test it when I get my RPi 3 ;D.

In the meantime if anyone already has a RPi 3 and wants to test it here's the 
image:
http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img
http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz

Álvaro Fernández Rojas (4):
  include: add Cortex-A53 CPU_TYPE
  brcm2708-gpu-fw: update to latest version
  brcm2708: update linux 4.4 patches to latest version
  brcm2708: add Raspberry Pi 3 support

 include/target.mk  |   1 +
 package/kernel/brcm2708-gpu-fw/Makefile|   8 +-
 target/linux/brcm2708/Makefile |   8 +-
 target/linux/brcm2708/bcm2708/config-4.4   |   4 +-
 target/linux/brcm2708/bcm2709/config-4.4   |   4 +-
 target/linux/brcm2708/bcm2710/config-4.4   | 390 
 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk  |  14 +
 target/linux/brcm2708/bcm2710/target.mk|  12 +
 target/linux/brcm2708/image/Makefile   |  12 +-
 target/linux/brcm2708/modules.mk   |  19 +
 ...0001-smsx95xx-fix-crimes-against-truesize.patch |   4 +-
 ...02-smsc95xx-Disable-turbo-mode-by-default.patch |   4 +-
 ...around-for-issue-where-dirty-page-count-g.patch |   4 +-
 .../0004-BCM2835_DT-Fix-I2S-register-map.patch |   4 +-
 ...-Prevent-spurious-interrupts-and-trap-the.patch |   4 +-
 .../0006-irqchip-bcm2835-Add-FIQ-support.patch |   4 +-
 ...-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch |   4 +-
 ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch |   4 +-
 ...2835-Set-base-to-0-give-expected-gpio-num.patch |   4 +-
 ...2835-Fix-interrupt-handling-for-GPIOs-28-.patch |   4 +-
 ...2835-Only-request-the-interrupts-listed-i.patch |   4 +-
 ...cm2835-Support-pin-groups-other-than-7-11.patch |   4 +-
 ...RM-bcm2835-Set-Serial-number-and-Revision.patch |   4 +-
 ...-get-base-address-for-DMA-from-devicetree.patch |   4 +-
 ...-add-24bit-support-update-bclk_ratio-to-m.patch |   4 +-
 ...s-setup-clock-only-if-CPU-is-clock-master.patch |   4 +-
 ...835-i2s-Eliminate-debugfs-directory-error.patch |   4 +-
 .../0018-bcm2835-i2s-Register-PCM-device.patch |   4 +-
 ...i2s-Enable-MMAP-support-via-a-DT-property.patch |   4 +-
 ...0-dmaengine-bcm2835-Add-slave-dma-support.patch |   4 +-
 ...ine-bcm2835-set-residue_granularity-field.patch |   4 +-
 ...cm2835-Load-driver-early-and-support-lega.patch |   4 +-
 ...-dma-Fix-dreq-not-set-for-slave-transfers.patch |   4 +-
 ...-Limit-cyclic-transfers-on-lite-channels-.patch |   4 +-
 .../0025-bcm2835-Add-support-for-uart1.patch   |   4 +-
 ...irmware-bcm2835-Add-missing-property-tags.patch |   4 +-
 .../0027-Main-bcm2708-bcm2709-linux-port.patch |   4 +-
 ...-squash-include-ARCH_BCM2708-ARCH_BCM2709.patch |   4 +-
 .../patches-4.4/0029-Add-dwc_otg-driver.patch  |   4 +-
 .../0030-bcm2708-framebuffer-driver.patch  |   4 +-
 .../0031-dmaengine-Add-support-for-BCM2708.patch   |   4 +-
 ...-parameter-to-mmc-multi_io_quirk-callback.patch |   4 +-
 .../0033-MMC-added-alternative-MMC-driver.patch|   4 +-
 ...835-sdhost-driver-and-an-overlay-to-enabl.patch |   4 +-
 ...ma-Add-vc_cma-driver-to-enable-use-of-CMA.patch |   4 +-
 .../0036-bcm2708-alsa-sound-driver.patch   |   4 +-
 .../patches-4.4/0037-bcm2708-vchiq-driver.patch|   4 +-
 .../0038-vc_mem-Add-vc_mem-driver.patch|   4 +-
 ...deoCore-shared-memory-service-for-BCM2835.patch |   4 +-
 ...omem-device-for-rootless-user-GPIO-access.patch |   4 +-
 .../brcm2708/patches-4.4/0041-Add-SMI-driver.patch |   4 +-
 .../patches-4.4/0042-Add-SMI-NAND-driver.patch |   4 +-
 ...3-lirc-added-support-for-RaspberryPi-GPIO.patch |   4 +-
 .../patches-4.4/0044-Add-cpufreq-driver.patch  |   4 +-
 ...-thermal-driver-for-reporting-core-temper.patch |   4 +-
 .../0046-Add-Chris-Boot-s-i2c-driver.patch |   4 +-
 .../0047-char-broadcom-Add-vcio-module.patch   |   4 +-
 ...048-firmware-bcm2835-Support-ARCH_BCM270x.patch |   4 +-
 .../0049-bcm2835-add-v4l2-camera-device.patch  |   4 +-
 ...-mkknlimg-and-knlinfo-scripts-from-tools-.patch |   4 +-
 ...port-for-the-CONFIG_CMDLINE_EXTEND-option.patch |   4 +-
 ...0052-BCM2708-Add-core-Device-Tree-support.patch |   4 +-
 ...3-bcm2835-Match-with-BCM2708-Device-Trees.patch |   4 +-
 .../0054-fbdev-add-FBIOCOPYAREA-ioctl.patch|   4 +-
 ...up-console-framebuffer-imageblit-function.patch |   4 +-
 ...9-Allow-mac-address-to-be-set-in-smsc95xx.patch |   4 +-
 ...e-realtime-clock-1-wire-chip-DS1307-and-1.patch |   4 +-
 ...061-Added-Device-IDs-for-August-DVB-T-205.patch |   4 +-
 ...le-CONFIG_MEMCG-but-leave-it-disabled-due.patch |   4 +-
 .../0063-ASoC-Add-support-for-PCM5102A-codec.patch |   4 +-
 .../0064-ASoC-Add-support-for-HifiBerry-DAC.patch  |   4 +-
 .../0065-ASoC-Add-support-for-Rpi-DAC.patch|   4 +-
 ...-Implement-MCLK-configuration-options

[OpenWrt-Devel] [RFC 2/4] brcm2708-gpu-fw: update to latest version

2016-02-29 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/brcm2708-gpu-fw/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 48c9929..857fac7 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=98e801605b31a5d7a4c36de5cb1d0e33ce95e8ab
-PKG_VERSION:=20151214
+PKG_REV:=e0fcda1592f142689ba5ae735863581eb9226dac
+PKG_VERSION:=20160229
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=66bbad77fdd9e5391d4130fa11d94646
+PKG_MD5SUM:=a8ec6c3e61ca1ad1b90c6282c85630e8
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC 1/4] include: add Cortex-A53 CPU_TYPE

2016-02-29 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 include/target.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/target.mk b/include/target.mk
index dbb6327..76fbd99 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -237,6 +237,7 @@ ifeq ($(DUMP),1)
 CPU_CFLAGS_cortex-a8 = -march=armv7-a -mtune=cortex-a8
 CPU_CFLAGS_cortex-a9 = -march=armv7-a -mtune=cortex-a9
 CPU_CFLAGS_cortex-a15 = -march=armv7-a -mtune=cortex-a15
+CPU_CFLAGS_cortex-a53 = -march=armv8-a -mtune=cortex-a53
 CPU_CFLAGS_fa526 = -march=armv4 -mtune=fa526
 CPU_CFLAGS_mpcore = -march=armv6k -mtune=mpcore
 CPU_CFLAGS_xscale = -march=armv5te -mtune=xscale
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] brcm63xx: fix BCM3368 interrupt controller addresses

2016-02-27 Thread Álvaro Fernández Rojas
Looks like the addresses for BCM3368 were wrongly defined when DT
support was introduced.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/dts/bcm3368.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/brcm63xx/dts/bcm3368.dtsi 
b/target/linux/brcm63xx/dts/bcm3368.dtsi
index 5be5c6a..6828b34 100644
--- a/target/linux/brcm63xx/dts/bcm3368.dtsi
+++ b/target/linux/brcm63xx/dts/bcm3368.dtsi
@@ -54,7 +54,7 @@
 
periph_intc: interrupt-controller@fff8c00c {
compatible = "brcm,bcm6345-periph-intc";
-   reg = <0xfffe000c 0x8>;
+   reg = <0xfff8c00c 0x8>;
 
interrupt-controller;
#interrupt-cells = <1>;
@@ -65,7 +65,7 @@
 
ext_intc0: interrupt-controller@fff8c014 {
compatible = "brcm,bcm6345-ext-intc";
-   reg = <0xfffe0014 0x4>;
+   reg = <0xfff8c014 0x4>;
 
interrupt-controller;
#interrupt-cells = <2>;
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] brcm63xx/lzma-loader: fix O32 ABI conformance

2016-02-27 Thread Álvaro Fernández Rojas
According to the calling convention of the o32 ABI the caller
function must reserve stack space for $a0-$a3 registers in case
the callee needs to save its arguments.

The assembly code of the loader does not reserve stack space for
these registers thus when the 'loader_main' function needs to save
its arguments, those will be stored in the 'workspace' area instead
of the stack.

Because the workspace area is also used by other part of the code, the
saved register values gets overwritten and this often leads to failed
kernel boots.

Fix the code to reserve stack space for the registers to avoid this
error.

Signed-off-by: Gabor Juhos <juh...@openwrt.org>
[noltari: apply the fix for brcm63xx too]
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/image/lzma-loader/src/head.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/brcm63xx/image/lzma-loader/src/head.S 
b/target/linux/brcm63xx/image/lzma-loader/src/head.S
index 543996a..47a7c9b 100644
--- a/target/linux/brcm63xx/image/lzma-loader/src/head.S
+++ b/target/linux/brcm63xx/image/lzma-loader/src/head.S
@@ -109,6 +109,9 @@ __bss_check:
/* Setup new "C" stack */
la  sp, _stack
 
+   /* reserve stack space for a0-a3 registers */
+   subusp, 16
+
/* jump to the decompressor routine */
la  t0, loader_main
jr  t0
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] CC: brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild bugs after cleaning the kernel tree

2016-02-27 Thread Álvaro Fernández Rojas
Backport of r48732

Signed-off-by: Felix Fietkau <n...@openwrt.org>
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/brcm2708-gpu-fw/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index eee85e0..286984b 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
 PKG_MD5SUM:=f5683c1dcb255714942f7c9fd61b3a0a
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
 include $(INCLUDE_DIR)/package.mk
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] CC: brcm2708: Fix sysupgrade support for Raspberry Pi

2016-02-21 Thread Álvaro Fernández Rojas
Backport patch for implementing sysupgrade support on brcm2708 target was
incomplete, since it was missing the default packages (r47604).
Add those packages in order to fully support sysupgrade.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index 30f6e1d..015aa9c 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -19,7 +19,7 @@ SUBTARGETS:=bcm2708 bcm2709
 KERNEL_PATCHVER:=3.18
 
 include $(INCLUDE_DIR)/target.mk
-DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core 
kmod-sound-arm-bcm2835
+DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core 
kmod-sound-arm-bcm2835 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
 
 define Target/Description
Build firmware image for Broadcom BCM2708/BCM2709 SoC devices.
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] brcm2708-gpu-fw: update to latest version

2016-02-21 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/brcm2708-gpu-fw/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 48c9929..f7bb011 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=98e801605b31a5d7a4c36de5cb1d0e33ce95e8ab
-PKG_VERSION:=20151214
+PKG_REV:=68febe187617906637e0ac71b0c8b8f581f10078
+PKG_VERSION:=20160219
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=66bbad77fdd9e5391d4130fa11d94646
+PKG_MD5SUM:=9ac06f0ba5c7f32143b8e58b23f83828
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 3/3] brcm2708-gpu-fw: update to latest version

2016-02-21 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v2: no changes

 package/kernel/brcm2708-gpu-fw/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 48c9929..f7bb011 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=98e801605b31a5d7a4c36de5cb1d0e33ce95e8ab
-PKG_VERSION:=20151214
+PKG_REV:=68febe187617906637e0ac71b0c8b8f581f10078
+PKG_VERSION:=20160219
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=66bbad77fdd9e5391d4130fa11d94646
+PKG_MD5SUM:=9ac06f0ba5c7f32143b8e58b23f83828
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] brcm2708: fix RPi model B plus support

2016-01-17 Thread Álvaro Fernández Rojas
I think it's the firmware the one replacing the model name, since it 
also adds the revision to it...

I don't really know why the firmware does that...

El 17/01/2016 a las 12:15, Felix Fietkau escribió:

On 2016-01-10 00:13, Roman Yeryomin wrote:

Not sure if B+ is used or not (mine has B Plus) so leave both

Signed-off-by: Roman Yeryomin 
---
  target/linux/brcm2708/base-files/lib/brcm2708.sh | 1 +
  1 file changed, 1 insertion(+)

diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
index 13c1aa9..cb4089d 100644
--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -11,6 +11,7 @@ brcm2708_detect() {
"Raspberry Pi Model B Rev"*)
board_name="rpi-b"
;;
+   "Raspberry Pi Model B Plus Rev"* |\
"Raspberry Pi Model B+ Rev"*)

Why would it have "B Plus" instead of "B+"? I only see "B+" in the
kernel .dts file.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] ar8327: add IGMP Snooping support

2016-01-11 Thread Álvaro Fernández Rojas
This add support for IGMP Snooping on atheros switches (disabled by default),
which avoids flooding the network with multicast data.

Tested on TL-WDR4300: disabling IGMP Snooping results in multicast flooding
on each specific port, enabling it back again prevents each port from
receiving all multicast packets.

Partially based on: http://patchwork.ozlabs.org/patch/418122/

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v3: introduce changes suggested by Felix Fietkau
 - expose less knobs
 - merge igmp_mld, fast_join and fast_leave (according to the datasheet,
 igmp_mld enables both IGMP and MLD)
 - simplify code structure
 v2: introduce changes suggested by Linus Lüssing
 - switch to disabled by default
 - add MLD snooping support
 - allow enabling/disabling IGMP v3, join and leave
 - add functions for controlling settings on all ports
 At least igmp_snooping, igmp_fast_join and igmp_fast_leave must be enabled
 in order to get IGMP working. MLD Snooping and IGMP v3 are optional.

 .../linux/generic/files/drivers/net/phy/ar8327.c   | 167 +
 .../linux/generic/files/drivers/net/phy/ar8327.h   |  65 
 2 files changed, 232 insertions(+)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c 
b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 90ee411..02fd2e7 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -783,6 +783,45 @@ ar8327_atu_flush_port(struct ar8xxx_priv *priv, int port)
return ret;
 }
 
+static int
+ar8327_get_port_igmp(struct ar8xxx_priv *priv, int port)
+{
+   u32 fwd_ctrl, frame_ack;
+
+   fwd_ctrl = (BIT(port) << AR8327_FWD_CTRL1_IGMP_S);
+   frame_ack = ((AR8327_FRAME_ACK_CTRL_IGMP_MLD |
+ AR8327_FRAME_ACK_CTRL_IGMP_JOIN |
+ AR8327_FRAME_ACK_CTRL_IGMP_LEAVE) <<
+AR8327_FRAME_ACK_CTRL_S(port));
+
+   return (ar8xxx_read(priv, AR8327_REG_FWD_CTRL1) &
+   fwd_ctrl) == fwd_ctrl &&
+   (ar8xxx_read(priv, AR8327_REG_FRAME_ACK_CTRL(port)) &
+   frame_ack) == frame_ack;
+}
+
+static void
+ar8327_set_port_igmp(struct ar8xxx_priv *priv, int port, int enable)
+{
+   int reg_frame_ack = AR8327_REG_FRAME_ACK_CTRL(port);
+   u32 val_frame_ack = (AR8327_FRAME_ACK_CTRL_IGMP_MLD |
+ AR8327_FRAME_ACK_CTRL_IGMP_JOIN |
+ AR8327_FRAME_ACK_CTRL_IGMP_LEAVE) <<
+AR8327_FRAME_ACK_CTRL_S(port);
+
+   if (enable) {
+   ar8xxx_rmw(priv, AR8327_REG_FWD_CTRL1,
+  BIT(port) << AR8327_FWD_CTRL1_MC_FLOOD_S,
+  BIT(port) << AR8327_FWD_CTRL1_IGMP_S);
+   ar8xxx_reg_set(priv, reg_frame_ack, val_frame_ack);
+   } else {
+   ar8xxx_rmw(priv, AR8327_REG_FWD_CTRL1,
+  BIT(port) << AR8327_FWD_CTRL1_IGMP_S,
+  BIT(port) << AR8327_FWD_CTRL1_MC_FLOOD_S);
+   ar8xxx_reg_clear(priv, reg_frame_ack, val_frame_ack);
+   }
+}
+
 static void
 ar8327_vtu_op(struct ar8xxx_priv *priv, u32 op, u32 val)
 {
@@ -1084,6 +1123,110 @@ ar8327_sw_hw_apply(struct switch_dev *dev)
return 0;
 }
 
+int
+ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev,
+const struct switch_attr *attr,
+struct switch_val *val)
+{
+   struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+   int port = val->port_vlan;
+
+   if (port >= dev->ports)
+   return -EINVAL;
+
+   mutex_lock(>reg_mutex);
+   val->value.i = ar8327_get_port_igmp(priv, port);
+   mutex_unlock(>reg_mutex);
+
+   return 0;
+}
+
+int
+ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev,
+const struct switch_attr *attr,
+struct switch_val *val)
+{
+   struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+   int port = val->port_vlan;
+
+   if (port >= dev->ports)
+   return -EINVAL;
+
+   mutex_lock(>reg_mutex);
+   ar8327_set_port_igmp(priv, port, val->value.i);
+   mutex_unlock(>reg_mutex);
+
+   return 0;
+}
+
+int
+ar8327_sw_get_igmp_snooping(struct switch_dev *dev,
+   const struct switch_attr *attr,
+   struct switch_val *val)
+{
+   int port;
+
+   for (port = 0; port < dev->ports; port++) {
+   val->port_vlan = port;
+   if (ar8327_sw_get_port_igmp_snooping(dev, attr, val) ||
+   !val->value.i)
+   break;
+   }
+
+   return 0;
+}
+
+int
+ar8327_sw_set_igmp_snooping(struct switch_dev *dev,
+   const struct switch_attr *attr,
+  

[OpenWrt-Devel] [PATCH v2] ar8327: add IGMP Snooping support

2016-01-10 Thread Álvaro Fernández Rojas
This add support for IGMP Snooping on atheros switches (disabled by default),
which avoids flooding the network with multicast data.

Tested on TL-WDR4300: disabling IGMP Snooping results in multicast flooding
on each specific port, enabling it back again prevents each port from
receiving all multicast packets.

Partially based on: http://patchwork.ozlabs.org/patch/418122/

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v2: introduce changes suggested by Linus Lüssing
 - switch to disabled by default
 - add MLD snooping support
 - allow enabling/disabling IGMP v3, join and leave
 - add functions for controlling settings on all ports
 At least igmp_snooping, igmp_fast_join and igmp_fast_leave must be enabled
 in order to get IGMP working. MLD Snooping and IGMP v3 are optional.

 .../linux/generic/files/drivers/net/phy/ar8216.h   |   7 +
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 557 +
 .../linux/generic/files/drivers/net/phy/ar8327.h   |  76 +++
 3 files changed, 640 insertions(+)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h 
b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 14fe928..6ebfcc7 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -407,6 +407,13 @@ struct ar8xxx_chip {
  u32 *status, enum arl_op op);
int (*sw_hw_apply)(struct switch_dev *dev);
 
+   int (*get_igmp_v3)(struct ar8xxx_priv *priv);
+   void (*set_igmp_v3)(struct ar8xxx_priv *priv, int enable);
+   int (*get_port_igmp)(struct ar8xxx_priv *priv, int port);
+   void (*set_port_igmp)(struct ar8xxx_priv *priv, int port, int enable);
+   int (*get_port_cfg)(struct ar8xxx_priv *priv, int port, u32 cfg);
+   void (*set_port_cfg)(struct ar8xxx_priv *priv, int port, u32 cfg, int 
enable);
+
const struct ar8xxx_mib_desc *mib_decs;
unsigned num_mibs;
unsigned mib_func;
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c 
b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 90ee411..c885761 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -33,6 +33,86 @@
 extern const struct ar8xxx_mib_desc ar8236_mibs[39];
 extern const struct switch_attr ar8xxx_sw_attr_vlan[1];
 
+const struct ar8327_port_data ar8327_ports_cfg[AR8327_NUM_PORTS] = {
+   {
+   /* Port 0 */
+   .reg = AR8327_REG_FRAM_ACK_CTRL0,
+   .igmp_mld = AR8327_IGMP_MLD_EN0,
+   .igmp_join = AR8327_IGMP_JOIN_EN0,
+   .igmp_leave = AR8327_IGMP_LEAVE_EN0,
+   .eapol = AR8327_EAPOL_EN0,
+   .dhcp = AR8327_DHCP_EN0,
+   .arp_ack = AR8327_ARP_ACK_EN0,
+   .arp_req = AR8327_ARP_REQ_EN0
+   },
+   {
+   /* Port 1 */
+   .reg = AR8327_REG_FRAM_ACK_CTRL0,
+   .igmp_mld = AR8327_IGMP_MLD_EN1,
+   .igmp_join = AR8327_IGMP_JOIN_EN1,
+   .igmp_leave = AR8327_IGMP_LEAVE_EN1,
+   .eapol = AR8327_EAPOL_EN1,
+   .dhcp = AR8327_DHCP_EN1,
+   .arp_ack = AR8327_ARP_ACK_EN1,
+   .arp_req = AR8327_ARP_REQ_EN1
+   },
+   {
+   /* Port 2 */
+   .reg = AR8327_REG_FRAM_ACK_CTRL0,
+   .igmp_mld = AR8327_IGMP_MLD_EN2,
+   .igmp_join = AR8327_IGMP_JOIN_EN2,
+   .igmp_leave = AR8327_IGMP_LEAVE_EN2,
+   .eapol = AR8327_EAPOL_EN2,
+   .dhcp = AR8327_DHCP_EN2,
+   .arp_ack = AR8327_ARP_ACK_EN2,
+   .arp_req = AR8327_ARP_REQ_EN2
+   },
+   {
+   /* Port 3 */
+   .reg = AR8327_REG_FRAM_ACK_CTRL0,
+   .igmp_mld = AR8327_IGMP_MLD_EN3,
+   .igmp_join = AR8327_IGMP_JOIN_EN3,
+   .igmp_leave = AR8327_IGMP_LEAVE_EN3,
+   .eapol = AR8327_EAPOL_EN3,
+   .dhcp = AR8327_DHCP_EN3,
+   .arp_ack = AR8327_ARP_ACK_EN3,
+   .arp_req = AR8327_ARP_REQ_EN3
+   },
+   {
+   /* Port 4 */
+   .reg = AR8327_REG_FRAM_ACK_CTRL1,
+   .igmp_mld = AR8327_IGMP_MLD_EN4,
+   .igmp_join = AR8327_IGMP_JOIN_EN4,
+   .igmp_leave = AR8327_IGMP_LEAVE_EN4,
+   .eapol = AR8327_EAPOL_EN4,
+   .dhcp = AR8327_DHCP_EN4,
+   .arp_ack = AR8327_ARP_ACK_EN4,
+   .arp_req = AR8327_ARP_REQ_EN4
+   },
+   {
+   /* Port 5 */
+   .reg = AR8327_REG_FRAM_ACK_CTRL1,
+   .igmp_mld = AR8327_IGMP_MLD_EN5,
+   .igmp_join = AR8327_IGMP_JOIN_EN5,
+   .igmp_leave = AR8327_IGMP_LEAVE_EN5,
+   .eapol = AR8327_EAPOL_EN5,
+   .dhcp = AR8327_DHCP_EN5,
+   .arp_ack = AR8327_ARP_A

Re: [OpenWrt-Devel] [PATCH] ar8327: add IGMP Snooping support

2016-01-10 Thread Álvaro Fernández Rojas

Hello Linus,

You may find some documentation on what IGMP Snooping does in this 
Datasheet:

https://lafibre.info/images/doc/201106_spec_AR8327.pdf

However, I couldn't find any information regarding if it takes MRD into 
account.

IGMPv3 support can be enabled or disabled independently.
It does support MLD Snooping but I didn't implement it on v1 since I'm 
testing it with my IGMPv2 based IPTV service.


By the way, in this second patch I didn't enable IGMP Snooping by 
default as you (and Felix) suggested.


Regards,
Álvaro.

El 09/01/2016 a las 0:14, Linus Lüssing escribió:

On Tue, Jan 05, 2016 at 08:40:37PM +0100, Álvaro Fernández Rojas wrote:

This add support for IGMP Snooping on atheros switches (enabled by default),
which avoids flooding the network with multicast data.

Tested on TL-WDR4300: disabling IGMP Snooping results in multicast flooding
on each specific port, enabling it back again prevents each port from
receiving all multicast packets.

Partially based on: http://patchwork.ozlabs.org/patch/418122/

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>

Hi,

Do you know whether there is some documentation on what the IGMP
Snooping of these chips does?

For instance I'd be interested in knowing whether it takes
Multicast Router Discovery (MRD) into account. Does it
perform IGMP querying, too? Is there a maximum number of group
entries? Does it know both IGMPv2 and IGMPv3? No MLD support,
right?

IGMP and IGMP snooping isn't that trivial. The IGMP snooping in
the Linux bridge took quite a while until it actually got usable,
too. So like Felix suggested in that ticket as well, I'd favor
disabling it by default. Especially if it is a blackbox without
documentation.

Cheers, Linus

PS: Thanks for looking into improving the multicast experience
with OpenWRT :).

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar8327: add IGMP Snooping support

2016-01-05 Thread Álvaro Fernández Rojas
This add support for IGMP Snooping on atheros switches (enabled by default),
which avoids flooding the network with multicast data.

Tested on TL-WDR4300: disabling IGMP Snooping results in multicast flooding
on each specific port, enabling it back again prevents each port from
receiving all multicast packets.

Partially based on: http://patchwork.ozlabs.org/patch/418122/

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.h   |   2 +
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 139 -
 .../linux/generic/files/drivers/net/phy/ar8327.h   |  55 
 3 files changed, 194 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h 
b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 14fe928..616c54f 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -406,6 +406,8 @@ struct ar8xxx_chip {
void (*get_arl_entry)(struct ar8xxx_priv *priv, struct arl_entry *a,
  u32 *status, enum arl_op op);
int (*sw_hw_apply)(struct switch_dev *dev);
+   int (*igmp_port_get)(struct ar8xxx_priv *priv, int port);
+   void (*igmp_port_set)(struct ar8xxx_priv *priv, int port, int enable);
 
const struct ar8xxx_mib_desc *mib_decs;
unsigned num_mibs;
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c 
b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 90ee411..5f6950a 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -662,8 +662,8 @@ ar8327_init_globals(struct ar8xxx_priv *priv)
 
/* forward multicast and broadcast frames to CPU */
t = (AR8327_PORTS_ALL << AR8327_FWD_CTRL1_UC_FLOOD_S) |
-   (AR8327_PORTS_ALL << AR8327_FWD_CTRL1_MC_FLOOD_S) |
-   (AR8327_PORTS_ALL << AR8327_FWD_CTRL1_BC_FLOOD_S);
+   (AR8327_PORTS_ALL << AR8327_FWD_CTRL1_BC_FLOOD_S) |
+   (AR8327_PORTS_ALL << AR8327_FWD_CTRL1_IGMP_S);
ar8xxx_write(priv, AR8327_REG_FWD_CTRL1, t);
 
/* enable jumbo frames */
@@ -677,6 +677,19 @@ ar8327_init_globals(struct ar8xxx_priv *priv)
/* Disable EEE on all phy's due to stability issues */
for (i = 0; i < AR8XXX_NUM_PHYS; i++)
data->eee[i] = false;
+
+   /* Enable IGMP Join/Leave */
+   t = AR8327_IGMP_JOIN_EN0 | AR8327_IGMP_LEAVE_EN0 |
+   AR8327_IGMP_JOIN_EN1 | AR8327_IGMP_LEAVE_EN1 |
+   AR8327_IGMP_JOIN_EN2 | AR8327_IGMP_LEAVE_EN2 |
+   AR8327_IGMP_JOIN_EN3 | AR8327_IGMP_LEAVE_EN3;
+   ar8xxx_rmw(priv, AR8327_REG_FRAM_ACK_CTRL0, 0, t);
+
+   t = AR8327_IGMP_JOIN_EN4 | AR8327_IGMP_LEAVE_EN4 |
+   AR8327_IGMP_JOIN_EN5 | AR8327_IGMP_LEAVE_EN5 |
+   AR8327_IGMP_JOIN_EN6 | AR8327_IGMP_LEAVE_EN6 |
+   AR8327_IGMP_V3_EN;
+   ar8xxx_rmw(priv, AR8327_REG_FRAM_ACK_CTRL1, 0, t);
 }
 
 static void
@@ -783,6 +796,78 @@ ar8327_atu_flush_port(struct ar8xxx_priv *priv, int port)
return ret;
 }
 
+static int
+ar8327_igmp_port_reg(int port)
+{
+   if (port > 3)
+   return AR8327_REG_FRAM_ACK_CTRL1;
+   else
+   return AR8327_REG_FRAM_ACK_CTRL0;
+}
+
+static int
+ar8327_igmp_port_fast_join_leave(int port)
+{
+   int ret;
+
+   switch (port) {
+   case 0:
+   ret = AR8327_IGMP_JOIN_EN0 | AR8327_IGMP_LEAVE_EN0;
+   break;
+   case 1:
+   ret = AR8327_IGMP_JOIN_EN1 | AR8327_IGMP_LEAVE_EN1;
+   break;
+   case 2:
+   ret = AR8327_IGMP_JOIN_EN2 | AR8327_IGMP_LEAVE_EN2;
+   break;
+   case 3:
+   ret = AR8327_IGMP_JOIN_EN3 | AR8327_IGMP_LEAVE_EN3;
+   break;
+   case 4:
+   ret = AR8327_IGMP_JOIN_EN4 | AR8327_IGMP_LEAVE_EN4;
+   break;
+   case 5:
+   ret = AR8327_IGMP_JOIN_EN5 | AR8327_IGMP_LEAVE_EN5;
+   break;
+   case 6:
+   ret = AR8327_IGMP_JOIN_EN6 | AR8327_IGMP_LEAVE_EN6;
+   break;
+   }
+
+   return ret;
+}
+
+static int
+ar8327_igmp_port_get(struct ar8xxx_priv *priv, int port)
+{
+   u32 val = ar8xxx_read(priv, AR8327_REG_FWD_CTRL1) >>
+ AR8327_FWD_CTRL1_IGMP_S;
+   if ((val & BIT(port)) != 0)
+   return 1;
+   else
+   return 0;
+}
+
+static void
+ar8327_igmp_port_set(struct ar8xxx_priv *priv, int port, int enable)
+{
+   if (enable) {
+   ar8xxx_rmw(priv, AR8327_REG_FWD_CTRL1,
+  BIT(port) << AR8327_FWD_CTRL1_MC_FLOOD_S,
+  BIT(port) << AR8327_FWD_CTRL1_IGMP_S);
+
+   ar8xxx_rmw(priv, ar8327_igmp_port_reg(port), 0,
+  ar8327_igmp_port_

[OpenWrt-Devel] [PATCH] brcm63xx: add support for Huawei HG622

2015-12-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 .../linux/brcm63xx/base-files/etc/board.d/01_leds  |  3 +
 .../brcm63xx/base-files/etc/board.d/02_network |  1 +
 .../etc/hotplug.d/firmware/10-rt2x00-eeprom|  1 +
 .../base-files/etc/uci-defaults/09_fix_crc |  1 +
 target/linux/brcm63xx/base-files/lib/brcm63xx.sh   |  3 +
 .../lib/preinit/05_init_interfaces_brcm63xx|  1 +
 target/linux/brcm63xx/dts/hg622.dts| 74 ++
 target/linux/brcm63xx/image/Makefile   |  2 +
 .../brcm63xx/patches-4.1/574-board_HG622.patch | 72 +
 .../brcm63xx/patches-4.4/574-board_HG622.patch | 72 +
 target/linux/brcm63xx/profiles/huawei.mk   | 10 +++
 11 files changed, 240 insertions(+)
 create mode 100644 target/linux/brcm63xx/dts/hg622.dts
 create mode 100644 target/linux/brcm63xx/patches-4.1/574-board_HG622.patch
 create mode 100644 target/linux/brcm63xx/patches-4.4/574-board_HG622.patch

diff --git a/target/linux/brcm63xx/base-files/etc/board.d/01_leds 
b/target/linux/brcm63xx/base-files/etc/board.d/01_leds
index 2697a56..8339254 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/brcm63xx/base-files/etc/board.d/01_leds
@@ -39,6 +39,9 @@ hg556a_*)
ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
;;
+hg622)
+   ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
+   ;;
 hg655b)
ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
;;
diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network 
b/target/linux/brcm63xx/base-files/etc/board.d/02_network
index c01aba8..f96da08 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network
@@ -86,6 +86,7 @@ dsl-274xb-f |\
 dsl-275xb-d |\
 fast2504n |\
 fast2704v2 |\
+hg622 |\
 hg655b |\
 p870hw-51a_v2 |\
 r5010un_v2 |\
diff --git 
a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 4347485..21c510f 100644
--- a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -34,6 +34,7 @@ case "$FIRMWARE" in
hg556a_c)
rt2x00_eeprom_extract "cal_data" 130560 512
;;
+   hg622 |\
hg655b)
rt2x00_eeprom_extract "cal_data" 0 512
;;
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc 
b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
index bc9ae21..70dbe2a 100644
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
@@ -21,6 +21,7 @@ case "$(brcm63xx_board_name)" in
cpva642 |\
ct-6373 |\
dsl-274xb-f |\
+   hg622 |\
magic |\
p870hw-51a_v2 |\
r5010un_v2 |\
diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh 
b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
index 7dc57fd..a2d6519 100755
--- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
+++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
@@ -159,6 +159,9 @@ brcm63xx_dt_detect() {
"Huawei EchoLife HG556a (version C)")
board_name="hg556a_c"
;;
+   "Huawei HG622")
+   board_name="hg622"
+   ;;
"Huawei HG655b")
board_name="hg655b"
;;
diff --git 
a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx 
b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
index abf5b89..7e4dfcb 100644
--- a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
+++ b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
@@ -23,6 +23,7 @@ set_preinit_iface() {
hg553 |\
hg556a_* |\
hg520 |\
+   hg622 |\
neufbox6 |\
p870hw-51a_v2 |\
rta770bw |\
diff --git a/target/linux/brcm63xx/dts/hg622.dts 
b/target/linux/brcm63xx/dts/hg622.dts
new file mode 100644
index 000..6cfc067
--- /dev/null
+++ b/target/linux/brcm63xx/dts/hg622.dts
@@ -0,0 +1,74 @@
+/dts-v1/;
+
+#include "bcm6368.dtsi"
+
+#include 
+
+/ {
+   model = "Huawei HG622";
+   compatible = "huawei,hg622", "brcm,bcm6368";
+
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells =

[OpenWrt-Devel] [PATCH] lantiq: fix ARV7519RW22 buttons

2015-12-15 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/lantiq/dts/ARV7519RW22.dts | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts 
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 471f347..d33e9d8 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -177,21 +177,21 @@
#size-cells = <0>;
poll-interval = <100>;
 
-   wps {
-   label = "wps";
-   gpios = < 20 1>;
-   linux,code = <0x211>;
-   };
reset {
label = "reset";
-   gpios = < 22 1>;
+   gpios = < 6 1>;
linux,code = <0x198>;
};
rfkill {
label = "rfkill";
-   gpios = < 45 1>;
+   gpios = < 33 1>;
linux,code = <0xf7>;
};
+   wps {
+   label = "wps";
+   gpios = < 37 1>;
+   linux,code = <0x211>;
+   };
};
 
gpio-leds {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] brcm2708-gpu-fw: update to latest version

2015-12-14 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/brcm2708-gpu-fw/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 2686cf0..9737a19 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=9d268f00de7c13afa315fe2d303265d535c4bdf0
-PKG_VERSION:=20151025
+PKG_REV:=98e801605b31a5d7a4c36de5cb1d0e33ce95e8ab
+PKG_VERSION:=20151214
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=21ac2ba64ef045655b4d4677b3fdf6cd
+PKG_MD5SUM:=66bbad77fdd9e5391d4130fa11d94646
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 8/8] ramips: update dtsi files to support second spi device

2015-11-27 Thread Álvaro Fernández Rojas

Dear Mingyu,

It works perfectly after adding the second spi clock:
https://gist.github.com/Noltari/9231b6c73c3b36e681ef

I'm sorry but I couldn't test this before.

Regards,
Álvaro.

El 23/11/2015 a las 2:41, Mingyu Li escribió:

Dear Sir.

you need to modify kernel file at "arch/mips/ralink/rt305x.c"
add the code below.

ralink_clk_add("1b00.spi", sys_rate);
+ralink_clk_add("1b40.spi", sys_rate);
ralink_clk_add("1100.timer", wdt_rate);

please let me know if the second spi works. if works
i will commit a patch about the second spi clock include
all other targets.
thanks.

Best Regards.

2015-11-23 3:08 GMT+08:00 John Crispin <blo...@openwrt.org 
<mailto:blo...@openwrt.org>>:




On 22/11/2015 16:15, Álvaro Fernández Rojas wrote:
> Hello guys,
>
> I've just tested this patch on my VoCore after it was applied on
r47580.
> I had to make the following changes:
>

https://github.com/openwrt-es/openwrt/commit/e040cf00441e973978a6c168b346b13e33f37853
>
>
> However, I'm getting the following error: "spi-rt2880 1b40.spi:
> unable to get SYS clock"
> https://gist.github.com/Noltari/7629d3384fe421517336
>
> Did anyone actually test this with both spi nodes enabled?
>
> Regards,
> Álvaro.

i only compile tested it.

John

>
> El 08/10/2015 a las 16:16, Michael Lee escribió:
>> Signed-off-by: Michael Lee <igv...@gmail.com
<mailto:igv...@gmail.com>>
>> ---
>>   target/linux/ramips/dts/mt7620a.dtsi  |  32 +-
>>   target/linux/ramips/dts/mt7620n.dtsi  |  32 +-
>>   target/linux/ramips/dts/rt3050.dtsi   |   6 +-
>>   target/linux/ramips/dts/rt3352.dtsi   |  31 +-
>>   target/linux/ramips/dts/rt3883.dtsi   |  25 +-
>>   target/linux/ramips/dts/rt5350.dtsi   |  29 +-
>>   .../0051-rt5350-spi-second-device.patch   | 368
>> -
>>   7 files changed, 143 insertions(+), 380 deletions(-)
>>   delete mode 100644
>>
target/linux/ramips/patches-3.18/0051-rt5350-spi-second-device.patch
>>
>> diff --git a/target/linux/ramips/dts/mt7620a.dtsi
>> b/target/linux/ramips/dts/mt7620a.dtsi
>> index 026e745..448df75 100644
>> --- a/target/linux/ramips/dts/mt7620a.dtsi
>> +++ b/target/linux/ramips/dts/mt7620a.dtsi
>> @@ -20,6 +20,11 @@
>>   compatible = "mti,cpu-interrupt-controller";
>>   };
>>   +aliases {
>> +spi0 = 
>> +spi1 = 
>> +};
>> +
>>   palmbus@1000 {
>>   compatible = "palmbus";
>>   reg = <0x1000 0x20>;
>> @@ -202,9 +207,9 @@
>>   status = "disabled";
>>   };
>>   -spi@b00 {
>> +spi0: spi@b00 {
>>   compatible = "ralink,mt7620a-spi",
"ralink,rt2880-spi";
>> -reg = <0xb00 0x100>;
>> +reg = <0xb00 0x40>;
>> resets = < 18>;
>>   reset-names = "spi";
>> @@ -218,6 +223,22 @@
>>   pinctrl-0 = <_pins>;
>>   };
>>   +spi1: spi@b40 {
>> +compatible = "ralink,rt2880-spi";
>> +reg = <0xb40 0x60>;
>> +
>> +resets = < 18>;
>> +reset-names = "spi";
>> +
>> +#address-cells = <1>;
>> +#size-cells = <1>;
>> +
>> +status = "disabled";
>> +
>> +pinctrl-names = "default";
>> +pinctrl-0 = <_cs1>;
>> +};
>> +
>>   uartlite@c00 {
>>   compatible = "ralink,mt7620a-uart",
>> "ralink,rt2880-uart", "ns16550a";
>>   reg = <0xc00 0x100>;
>> @@ -305,6 +326,13 @@
>>   };
>>   };
>>   +spi_cs1: spi1 {
>> +spi1 {
>> +ralink,group = "spi_cs1";
>> +ralink,function = "spi_cs1";
>> +};
>> +};
>> +
>>   i2c_pins: i2c {
>>   i2c {
>> 

[OpenWrt-Devel] [PATCH 1/2] ramips: add second SPI clocks

2015-11-27 Thread Álvaro Fernández Rojas
These clocks were missing in the changes introduced in r47573-47580

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 ...0051-SPI-ralink-add-Ralink-SoC-spi-clocks.patch | 30 ++
 1 file changed, 30 insertions(+)
 create mode 100644 
target/linux/ramips/patches-3.18/0051-SPI-ralink-add-Ralink-SoC-spi-clocks.patch

diff --git 
a/target/linux/ramips/patches-3.18/0051-SPI-ralink-add-Ralink-SoC-spi-clocks.patch
 
b/target/linux/ramips/patches-3.18/0051-SPI-ralink-add-Ralink-SoC-spi-clocks.patch
new file mode 100644
index 000..bca872f
--- /dev/null
+++ 
b/target/linux/ramips/patches-3.18/0051-SPI-ralink-add-Ralink-SoC-spi-clocks.patch
@@ -0,0 +1,30 @@
+--- a/arch/mips/ralink/mt7620.c
 b/arch/mips/ralink/mt7620.c
+@@ -415,6 +415,7 @@ void __init ralink_clk_init(void)
+   ralink_clk_add("1100.timer", periph_rate);
+   ralink_clk_add("1120.watchdog", periph_rate);
+   ralink_clk_add("1b00.spi", sys_rate);
++  ralink_clk_add("1b40.spi", sys_rate);
+   ralink_clk_add("1c00.uartlite", periph_rate);
+   ralink_clk_add("1d00.uart1", periph_rate);
+   ralink_clk_add("1e00.uart2", periph_rate);
+--- a/arch/mips/ralink/rt305x.c
 b/arch/mips/ralink/rt305x.c
+@@ -201,6 +201,7 @@ void __init ralink_clk_init(void)
+   ralink_clk_add("cpu", cpu_rate);
+   ralink_clk_add("sys", sys_rate);
+   ralink_clk_add("1b00.spi", sys_rate);
++  ralink_clk_add("1b40.spi", sys_rate);
+   ralink_clk_add("1100.timer", wdt_rate);
+   ralink_clk_add("1120.watchdog", wdt_rate);
+   ralink_clk_add("1500.uart", uart_rate);
+--- a/arch/mips/ralink/rt3883.c
 b/arch/mips/ralink/rt3883.c
+@@ -109,6 +109,7 @@ void __init ralink_clk_init(void)
+   ralink_clk_add("1120.watchdog", sys_rate);
+   ralink_clk_add("1500.uart", 4000);
+   ralink_clk_add("1b00.spi", sys_rate);
++  ralink_clk_add("1b40.spi", sys_rate);
+   ralink_clk_add("1c00.uartlite", 4000);
+   ralink_clk_add("1010.ethernet", sys_rate);
+   ralink_clk_add("1018.wmac", 4000);
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] ramips: adapt VoCore to new second spi device code

2015-11-27 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/ramips/dts/VOCORE-16M.dts | 58 --
 target/linux/ramips/dts/VOCORE-8M.dts  | 58 --
 target/linux/ramips/dts/VOCORE.dtsi| 20 ++--
 3 files changed, 66 insertions(+), 70 deletions(-)

diff --git a/target/linux/ramips/dts/VOCORE-16M.dts 
b/target/linux/ramips/dts/VOCORE-16M.dts
index 464c137..a1e854e 100644
--- a/target/linux/ramips/dts/VOCORE-16M.dts
+++ b/target/linux/ramips/dts/VOCORE-16M.dts
@@ -2,40 +2,38 @@
 
 /include/ "VOCORE.dtsi"
 
-/ {
-   palmbus@1000 {
-   spi@b00 {
-   m25p80@0 {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   compatible = "w25q128";
-   reg = <0>;
-   linux,modalias = "m25p80", "w25q128";
-   spi-max-frequency = <1000>;
+ {
+   status = "okay";
 
-   partition@0 {
-   label = "uboot";
-   reg = <0x0 0x3>;
-   read-only;
-   };
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
 
-   partition@3 {
-   label = "uboot-env";
-   reg = <0x3 0x1>;
-   read-only;
-   };
+   partition@0 {
+   label = "uboot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "uboot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
 
-   factory: partition@4 {
-   label = "factory";
-   reg = <0x4 0x1>;
-   read-only;
-   };
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
 
-   partition@5 {
-   label = "firmware";
-   reg = <0x5 0xfb>;
-   };
-   };
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xfb>;
};
};
 };
diff --git a/target/linux/ramips/dts/VOCORE-8M.dts 
b/target/linux/ramips/dts/VOCORE-8M.dts
index 8a081ed..ba6d32e 100644
--- a/target/linux/ramips/dts/VOCORE-8M.dts
+++ b/target/linux/ramips/dts/VOCORE-8M.dts
@@ -2,40 +2,38 @@
 
 /include/ "VOCORE.dtsi"
 
-/ {
-   palmbus@1000 {
-   spi@b00 {
-   m25p80@0 {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   compatible = "s25fl064k";
-   reg = <0>;
-   linux,modalias = "m25p80", "s25fl064k";
-   spi-max-frequency = <1000>;
+ {
+   status = "okay";
 
-   partition@0 {
-   label = "uboot";
-   reg = <0x0 0x3>;
-   read-only;
-   };
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "s25fl064k";
+   reg = <0>;
+   linux,modalias = "m25p80", "s25fl064k";
+   spi-max-frequency = <1000>;
 
-   partition@3 {
-   label = "uboot-env";
-   reg = <0x3 0x1>;
-   read-only;
-

[OpenWrt-Devel] [PATCH] uboot-imx6: fix build with gcc-5

2015-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 .../uboot-imx6/patches/001-gcc-5-compiler.patch| 87 ++
 .../uboot-imx6/patches/002-use-static-inline.patch | 72 ++
 .../uboot-imx6/patches/003-use-weak-in-board.patch | 80 
 .../uboot-imx6/patches/004-use-weak-in-main.patch  | 27 +++
 4 files changed, 266 insertions(+)
 create mode 100644 package/boot/uboot-imx6/patches/001-gcc-5-compiler.patch
 create mode 100644 package/boot/uboot-imx6/patches/002-use-static-inline.patch
 create mode 100644 package/boot/uboot-imx6/patches/003-use-weak-in-board.patch
 create mode 100644 package/boot/uboot-imx6/patches/004-use-weak-in-main.patch

diff --git a/package/boot/uboot-imx6/patches/001-gcc-5-compiler.patch 
b/package/boot/uboot-imx6/patches/001-gcc-5-compiler.patch
new file mode 100644
index 000..8724927
--- /dev/null
+++ b/package/boot/uboot-imx6/patches/001-gcc-5-compiler.patch
@@ -0,0 +1,87 @@
+From: Hans de Goede <hdego...@redhat.com>
+Date: Sat, 7 Feb 2015 21:52:40 + (+0100)
+Subject: Add linux/compiler-gcc5.h to fix builds with gcc5
+X-Git-Tag: v2015.04-rc2~31
+X-Git-Url: 
http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=478b02f1a7043b673565075ea5016376f3293b23
+
+Add linux/compiler-gcc5.h to fix builds with gcc5
+
+Add linux/compiler-gcc5/h from the kernel sources at:
+
+commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b
+Author: Steven Noonan <ste...@uplinklabs.net>
+Date:   Sat Oct 25 15:09:42 2014 -0700
+
+compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
+
+Signed-off-by: Hans de Goede <hdego...@redhat.com>
+---
+
+--- /dev/null
 b/include/linux/compiler-gcc5.h
+@@ -0,0 +1,65 @@
++#ifndef __LINUX_COMPILER_H
++#error "Please don't include  directly, include 
 instead."
++#endif
++
++#define __used__attribute__((__used__))
++#define __must_check  __attribute__((warn_unused_result))
++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
++
++/* Mark functions as cold. gcc will assume any path leading to a call
++   to them will be unlikely.  This means a lot of manual unlikely()s
++   are unnecessary now for any paths leading to the usual suspects
++   like BUG(), printk(), panic() etc. [but let's keep them for now for
++   older compilers]
++
++   Early snapshots of gcc 4.3 don't support this and we can't detect this
++   in the preprocessor, but we can live with this because they're unreleased.
++   Maketime probing would be overkill here.
++
++   gcc also has a __attribute__((__hot__)) to move hot functions into
++   a special section, but I don't see any sense in this right now in
++   the kernel context */
++#define __cold__attribute__((__cold__))
++
++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), 
__COUNTER__)
++
++#ifndef __CHECKER__
++# define __compiletime_warning(message) __attribute__((warning(message)))
++# define __compiletime_error(message) __attribute__((error(message)))
++#endif /* __CHECKER__ */
++
++/*
++ * Mark a position in code as unreachable.  This can be used to
++ * suppress control flow warnings after asm blocks that transfer
++ * control elsewhere.
++ *
++ * Early snapshots of gcc 4.5 don't support this and we can't detect
++ * this in the preprocessor, but we can live with this because they're
++ * unreleased.  Really, we need to have autoconf for the kernel.
++ */
++#define unreachable() __builtin_unreachable()
++
++/* Mark a function definition as prohibited from being cloned. */
++#define __noclone __attribute__((__noclone__))
++
++/*
++ * Tell the optimizer that something else uses this function or variable.
++ */
++#define __visible __attribute__((externally_visible))
++
++/*
++ * GCC 'asm goto' miscompiles certain code sequences:
++ *
++ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
++ *
++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
++ *
++ * (asm goto is automatically volatile - the naming reflects this.)
++ */
++#define asm_volatile_goto(x...)   do { asm goto(x); asm (""); } while (0)
++
++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
++#define __HAVE_BUILTIN_BSWAP32__
++#define __HAVE_BUILTIN_BSWAP64__
++#define __HAVE_BUILTIN_BSWAP16__
++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
diff --git a/package/boot/uboot-imx6/patches/002-use-static-inline.patch 
b/package/boot/uboot-imx6/patches/002-use-static-inline.patch
new file mode 100644
index 000..ca77482
--- /dev/null
+++ b/package/boot/uboot-imx6/patches/002-use-static-inline.patch
@@ -0,0 +1,72 @@
+From: Jeroen Hofstee <jer...@myspectrum.nl>
+Date: Sun, 22 Jun 2014 21:10:39 + (+0200)
+Subject: ARM:asm:io.h use static inline
+X-Git-Tag: v2014.10-rc2~47
+X-Git-Url: 
http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=8863aa5c984460ce1112d8db895cbf8b13a6ac9d
+
+ARM:asm:io.h use static inline
+
+When compilin

Re: [OpenWrt-Devel] [PATCH 8/8] ramips: update dtsi files to support second spi device

2015-11-22 Thread Álvaro Fernández Rojas

Hello guys,

I've just tested this patch on my VoCore after it was applied on r47580.
I had to make the following changes:
https://github.com/openwrt-es/openwrt/commit/e040cf00441e973978a6c168b346b13e33f37853

However, I'm getting the following error: "spi-rt2880 1b40.spi: 
unable to get SYS clock"

https://gist.github.com/Noltari/7629d3384fe421517336

Did anyone actually test this with both spi nodes enabled?

Regards,
Álvaro.

El 08/10/2015 a las 16:16, Michael Lee escribió:

Signed-off-by: Michael Lee 
---
  target/linux/ramips/dts/mt7620a.dtsi   |  32 +-
  target/linux/ramips/dts/mt7620n.dtsi   |  32 +-
  target/linux/ramips/dts/rt3050.dtsi|   6 +-
  target/linux/ramips/dts/rt3352.dtsi|  31 +-
  target/linux/ramips/dts/rt3883.dtsi|  25 +-
  target/linux/ramips/dts/rt5350.dtsi|  29 +-
  .../0051-rt5350-spi-second-device.patch| 368 -
  7 files changed, 143 insertions(+), 380 deletions(-)
  delete mode 100644 
target/linux/ramips/patches-3.18/0051-rt5350-spi-second-device.patch

diff --git a/target/linux/ramips/dts/mt7620a.dtsi 
b/target/linux/ramips/dts/mt7620a.dtsi
index 026e745..448df75 100644
--- a/target/linux/ramips/dts/mt7620a.dtsi
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -20,6 +20,11 @@
compatible = "mti,cpu-interrupt-controller";
};
  
+	aliases {

+   spi0 = 
+   spi1 = 
+   };
+
palmbus@1000 {
compatible = "palmbus";
reg = <0x1000 0x20>;
@@ -202,9 +207,9 @@
status = "disabled";
};
  
-		spi@b00 {

+   spi0: spi@b00 {
compatible = "ralink,mt7620a-spi", "ralink,rt2880-spi";
-   reg = <0xb00 0x100>;
+   reg = <0xb00 0x40>;
  
  			resets = < 18>;

reset-names = "spi";
@@ -218,6 +223,22 @@
pinctrl-0 = <_pins>;
};
  
+		spi1: spi@b40 {

+   compatible = "ralink,rt2880-spi";
+   reg = <0xb40 0x60>;
+
+   resets = < 18>;
+   reset-names = "spi";
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   status = "disabled";
+
+   pinctrl-names = "default";
+   pinctrl-0 = <_cs1>;
+   };
+
uartlite@c00 {
compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", 
"ns16550a";
reg = <0xc00 0x100>;
@@ -305,6 +326,13 @@
};
};
  
+		spi_cs1: spi1 {

+   spi1 {
+   ralink,group = "spi_cs1";
+   ralink,function = "spi_cs1";
+   };
+   };
+
i2c_pins: i2c {
i2c {
ralink,group = "i2c";
diff --git a/target/linux/ramips/dts/mt7620n.dtsi 
b/target/linux/ramips/dts/mt7620n.dtsi
index b1586ec..a3132b8 100644
--- a/target/linux/ramips/dts/mt7620n.dtsi
+++ b/target/linux/ramips/dts/mt7620n.dtsi
@@ -20,6 +20,11 @@
compatible = "mti,cpu-interrupt-controller";
};
  
+	aliases {

+   spi0 = 
+   spi1 = 
+   };
+
palmbus@1000 {
compatible = "palmbus";
reg = <0x1000 0x20>;
@@ -154,9 +159,9 @@
status = "disabled";
};
  
-		spi@b00 {

+   spi0: spi@b00 {
compatible = "ralink,mt7620a-spi", "ralink,rt2880-spi";
-   reg = <0xb00 0x100>;
+   reg = <0xb00 0x40>;
  
  			resets = < 18>;

reset-names = "spi";
@@ -170,6 +175,22 @@
pinctrl-0 = <_pins>;
};
  
+		spi1: spi@b40 {

+   compatible = "ralink,rt2880-spi";
+   reg = <0xb40 0x60>;
+
+   resets = < 18>;
+   reset-names = "spi";
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   status = "disabled";
+
+   pinctrl-names = "default";
+   pinctrl-0 = <_cs1>;
+   };
+
uartlite@c00 {
compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", 
"ns16550a";
reg = <0xc00 0x100>;
@@ -213,6 +234,13 @@
};
};
  
+		spi_cs1: spi1 {

+   spi1 {
+   ralink,group = "spi_cs1";
+   ralink,function = "spi_cs1";
+   };
+   };
+
 

[OpenWrt-Devel] [PATCH] brcm2708: fix multi-device image generation

2015-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 53e5f54..f96dccb 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -30,7 +30,7 @@ define Build/boot-img
mcopy -i $@.boot cmdline.txt ::
mcopy -i $@.boot config.txt ::
mcopy -i $@.boot $(word 1,$^) ::kernel.img
-   $(foreach dts,$(shell echo $(DEVICE_DTS)),mcopy -i $@.boot 
$(DTS_DIR)/$(dts).dtb ::)
+   $(foreach dts,$(shell echo $(DEVICE_DTS)),mcopy -i $@.boot 
$(DTS_DIR)/$(dts).dtb ::;)
mmd -i $@.boot ::/overlays
mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtb ::/overlays/
mcopy -i $@.boot $(DTS_DIR)/overlays/README ::/overlays/
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 5/6] brcm2708: add device detection and use it for network, leds and preinit

2015-11-21 Thread Álvaro Fernández Rojas

Sure, I will rework this as soon as I can.

Regards,
Álvaro.

El 21/11/2015 a las 9:45, John Crispin escribió:

Hi,

do you have time to rework this code to make use of the new board
detection layer ? i am currently starting to convert all targets to it.
would be a shame if we add this ode just to replace it again in a few weeks.

John

On 19/11/2015 19:18, Álvaro Fernández Rojas wrote:

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
v2: device tree model needs Rev to avoid detecting a B+ as a B model

  target/linux/brcm2708/base-files.mk|  3 ++
  target/linux/brcm2708/base-files/etc/diag.sh   | 12 ++-
  .../base-files/etc/uci-defaults/02_network | 12 +--
  target/linux/brcm2708/base-files/lib/brcm2708.sh   | 41 ++
  .../lib/preinit/03_preinit_do_brcm2708.sh  | 10 ++
  .../lib/preinit/05_set_preinit_iface_brcm2708  | 18 ++
  target/linux/brcm2708/bcm2708/config-4.1   |  2 +-
  target/linux/brcm2708/bcm2709/config-4.1   |  2 +-
  8 files changed, 95 insertions(+), 5 deletions(-)
  create mode 100644 target/linux/brcm2708/base-files.mk
  create mode 100644 target/linux/brcm2708/base-files/lib/brcm2708.sh
  create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
  create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708

diff --git a/target/linux/brcm2708/base-files.mk 
b/target/linux/brcm2708/base-files.mk
new file mode 100644
index 000..fdd2c71
--- /dev/null
+++ b/target/linux/brcm2708/base-files.mk
@@ -0,0 +1,3 @@
+define Package/base-files/install-target
+   rm -f $(1)/etc/config/network
+endef
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 55e68b1..3a8dc86 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -4,9 +4,19 @@
  #
  
  . /lib/functions/leds.sh

+. /lib/brcm2708.sh
  
  set_state() {

-   status_led="led0"
+   case "$(brcm2708_board_name)" in
+   rpi-b |\
+   rpi-cm)
+   status_led="led0"
+   ;;
+   rpi-b-plus |\
+   rpi-2-b)
+   status_led="led1"
+   ;;
+   esac
  
  	case "$1" in

preinit)
diff --git a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network 
b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
index e7e35c5..1bb05b6 100644
--- a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
+++ b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
@@ -1,14 +1,22 @@
  #!/bin/sh
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
  
  [ -e /etc/config/network ] && exit 0
  
  touch /etc/config/network
  
  . /lib/functions/uci-defaults.sh

+. /lib/brcm2708.sh
  
  ucidef_set_interface_loopback

-ucidef_set_interface_lan "eth0"
+
+case "$(brcm2708_board_name)" in
+rpi-b |\
+rpi-b-plus |\
+rpi-2-b)
+   ucidef_set_interface_lan "eth0"
+   ;;
+esac
  
  uci commit network
  
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh b/target/linux/brcm2708/base-files/lib/brcm2708.sh

new file mode 100644
index 000..7d6e458
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+ifname=""
+
+brcm2708_detect() {
+   local board_name model
+
+   model=$(cat /proc/device-tree/model)
+   case "$model" in
+   "Raspberry Pi Model B Rev"*)
+   board_name="rpi-b"
+   ;;
+   "Raspberry Pi Model B+ Rev"*)
+   board_name="rpi-b-plus"
+   ;;
+   "Raspberry Pi Compute Module Rev"*)
+   board_name="rpi-cm"
+   ;;
+   "Raspberry Pi 2 Model B Rev"*)
+   board_name="rpi-2-b"
+   ;;
+   *)
+   board_name="unknown"
+   ;;
+   esac
+
+   [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
+
+   echo "$board_name" > /tmp/sysinfo/board_name
+   echo "$model" > /tmp/sysinfo/model
+}
+
+brcm2708_board_name() {
+   local name
+
+   [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
+   [ -n "$name" ] || name="unknown"
+
+   echo $name
+}
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
new file mode 100644
index 000..2943648
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+do_brcm2708

[OpenWrt-Devel] [PATCH v3 5/6] brcm2708: add device detection and use it for network, leds and preinit

2015-11-21 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
v3: use new board detection layer
v2: device tree model needs Rev to avoid detecting a B+ as a B model

 target/linux/brcm2708/base-files.mk|  3 ++
 .../brcm2708/base-files/etc/board.d/02_network | 25 +
 target/linux/brcm2708/base-files/etc/diag.sh   | 12 ++-
 .../base-files/etc/uci-defaults/02_network | 15 
 target/linux/brcm2708/base-files/lib/brcm2708.sh   | 41 ++
 .../lib/preinit/03_preinit_do_brcm2708.sh  | 10 ++
 .../lib/preinit/05_set_preinit_iface_brcm2708  | 18 ++
 target/linux/brcm2708/bcm2708/config-4.1   |  2 +-
 target/linux/brcm2708/bcm2709/config-4.1   |  2 +-
 9 files changed, 110 insertions(+), 18 deletions(-)
 create mode 100644 target/linux/brcm2708/base-files.mk
 create mode 100755 target/linux/brcm2708/base-files/etc/board.d/02_network
 delete mode 100644 target/linux/brcm2708/base-files/etc/uci-defaults/02_network
 create mode 100644 target/linux/brcm2708/base-files/lib/brcm2708.sh
 create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
 create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708

diff --git a/target/linux/brcm2708/base-files.mk 
b/target/linux/brcm2708/base-files.mk
new file mode 100644
index 000..fdd2c71
--- /dev/null
+++ b/target/linux/brcm2708/base-files.mk
@@ -0,0 +1,3 @@
+define Package/base-files/install-target
+   rm -f $(1)/etc/config/network
+endef
diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network 
b/target/linux/brcm2708/base-files/etc/board.d/02_network
new file mode 100755
index 000..e85eb11
--- /dev/null
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Copyright (C) 2014-2015 OpenWrt.org
+
+. /lib/functions/uci-defaults-new.sh
+. /lib/brcm2708.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board_config_update
+
+ucidef_set_interface_loopback
+
+board=$(brcm2708_board_name)
+
+case "$board" in
+rpi-b |\
+rpi-b-plus |\
+rpi-2-b)
+   ucidef_set_interface_lan "eth0"
+   ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 55e68b1..3a8dc86 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -4,9 +4,19 @@
 #
 
 . /lib/functions/leds.sh
+. /lib/brcm2708.sh
 
 set_state() {
-   status_led="led0"
+   case "$(brcm2708_board_name)" in
+   rpi-b |\
+   rpi-cm)
+   status_led="led0"
+   ;;
+   rpi-b-plus |\
+   rpi-2-b)
+   status_led="led1"
+   ;;
+   esac
 
case "$1" in
preinit)
diff --git a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network 
b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
deleted file mode 100644
index e7e35c5..000
--- a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2014 OpenWrt.org
-
-[ -e /etc/config/network ] && exit 0
-
-touch /etc/config/network
-
-. /lib/functions/uci-defaults.sh
-
-ucidef_set_interface_loopback
-ucidef_set_interface_lan "eth0"
-
-uci commit network
-
-exit 0
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
new file mode 100644
index 000..13c1aa9
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+ifname=""
+
+brcm2708_detect() {
+   local board_name model
+
+   model=$(cat /proc/device-tree/model)
+   case "$model" in
+   "Raspberry Pi Model B Rev"*)
+   board_name="rpi-b"
+   ;;
+   "Raspberry Pi Model B+ Rev"*)
+   board_name="rpi-b-plus"
+   ;;
+   "Raspberry Pi Compute Module Rev"*)
+   board_name="rpi-cm"
+   ;;
+   "Raspberry Pi 2 Model B Rev"*)
+   board_name="rpi-2-b"
+   ;;
+   *)
+   board_name="unknown"
+   ;;
+   esac
+
+   [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
+
+   echo "$board_name" > /tmp/sysinfo/board_name
+   echo "$model" > /tmp/sysinfo/model
+}
+
+brcm2708_board_name() {
+   local name
+
+   [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
+   [ -n "$name" ] || name="unknown"
+
+   echo $name
+}
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh 
b/targ

[OpenWrt-Devel] [PATCH v2 5/6] brcm2708: add device detection and use it for network, leds and preinit

2015-11-19 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
v2: device tree model needs Rev to avoid detecting a B+ as a B model

 target/linux/brcm2708/base-files.mk|  3 ++
 target/linux/brcm2708/base-files/etc/diag.sh   | 12 ++-
 .../base-files/etc/uci-defaults/02_network | 12 +--
 target/linux/brcm2708/base-files/lib/brcm2708.sh   | 41 ++
 .../lib/preinit/03_preinit_do_brcm2708.sh  | 10 ++
 .../lib/preinit/05_set_preinit_iface_brcm2708  | 18 ++
 target/linux/brcm2708/bcm2708/config-4.1   |  2 +-
 target/linux/brcm2708/bcm2709/config-4.1   |  2 +-
 8 files changed, 95 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/brcm2708/base-files.mk
 create mode 100644 target/linux/brcm2708/base-files/lib/brcm2708.sh
 create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
 create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708

diff --git a/target/linux/brcm2708/base-files.mk 
b/target/linux/brcm2708/base-files.mk
new file mode 100644
index 000..fdd2c71
--- /dev/null
+++ b/target/linux/brcm2708/base-files.mk
@@ -0,0 +1,3 @@
+define Package/base-files/install-target
+   rm -f $(1)/etc/config/network
+endef
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 55e68b1..3a8dc86 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -4,9 +4,19 @@
 #
 
 . /lib/functions/leds.sh
+. /lib/brcm2708.sh
 
 set_state() {
-   status_led="led0"
+   case "$(brcm2708_board_name)" in
+   rpi-b |\
+   rpi-cm)
+   status_led="led0"
+   ;;
+   rpi-b-plus |\
+   rpi-2-b)
+   status_led="led1"
+   ;;
+   esac
 
case "$1" in
preinit)
diff --git a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network 
b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
index e7e35c5..1bb05b6 100644
--- a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
+++ b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
@@ -1,14 +1,22 @@
 #!/bin/sh
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
 
 [ -e /etc/config/network ] && exit 0
 
 touch /etc/config/network
 
 . /lib/functions/uci-defaults.sh
+. /lib/brcm2708.sh
 
 ucidef_set_interface_loopback
-ucidef_set_interface_lan "eth0"
+
+case "$(brcm2708_board_name)" in
+rpi-b |\
+rpi-b-plus |\
+rpi-2-b)
+   ucidef_set_interface_lan "eth0"
+   ;;
+esac
 
 uci commit network
 
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
new file mode 100644
index 000..7d6e458
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+ifname=""
+
+brcm2708_detect() {
+   local board_name model
+
+   model=$(cat /proc/device-tree/model)
+   case "$model" in
+   "Raspberry Pi Model B Rev"*)
+   board_name="rpi-b"
+   ;;
+   "Raspberry Pi Model B+ Rev"*)
+   board_name="rpi-b-plus"
+   ;;
+   "Raspberry Pi Compute Module Rev"*)
+   board_name="rpi-cm"
+   ;;
+   "Raspberry Pi 2 Model B Rev"*)
+   board_name="rpi-2-b"
+   ;;
+   *)
+   board_name="unknown"
+   ;;
+   esac
+
+   [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
+
+   echo "$board_name" > /tmp/sysinfo/board_name
+   echo "$model" > /tmp/sysinfo/model
+}
+
+brcm2708_board_name() {
+   local name
+
+   [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
+   [ -n "$name" ] || name="unknown"
+
+   echo $name
+}
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
new file mode 100644
index 000..2943648
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+do_brcm2708() {
+   . /lib/brcm2708.sh
+
+   brcm2708_detect
+}
+
+boot_hook_add preinit_main do_brcm2708
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 
b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
new file mode 100644
index 000..154b01c
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
@@ -0,0 +1,18

[OpenWrt-Devel] [PATCH 2/6] brcm2708: revert sd image extension to .img

2015-11-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index ecf6f71..bfcb522 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -47,8 +47,8 @@ define Device/Default
   FILESYSTEMS := ext4
   PROFILES = Default $$(DEVICE_PROFILE)
   KERNEL := kernel-bin
-  IMAGES := sdcard.bin
-  IMAGE/sdcard.bin := gen-cfg | boot-img | sdcard-img
+  IMAGES := sdcard.img
+  IMAGE/sdcard.img := gen-cfg | boot-img | sdcard-img
   DEVICE_PROFILE :=
   DEVICE_DTS :=
 endef
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 6/6] brcm2708: enable hard float ABI

2015-11-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/Makefile  | 4 +---
 target/linux/brcm2708/bcm2708/target.mk | 2 ++
 target/linux/brcm2708/bcm2709/target.mk | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index f8c9347..0c3cee5 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -10,10 +10,8 @@ include $(INCLUDE_DIR)/host.mk
 ARCH:=arm
 BOARD:=brcm2708
 BOARDNAME:=Broadcom BCM2708/BCM2709
-FEATURES:=ext4 audio usb usbgadget display gpio
+FEATURES:=ext4 audio usb usbgadget display gpio fpu
 MAINTAINER:=Florian Fainelli <flor...@openwrt.org>
-CPU_TYPE:=arm1176jzf-s
-CPU_SUBTYPE:=vfp
 SUBTARGETS:=bcm2708 bcm2709
 
 KERNEL_PATCHVER:=4.1
diff --git a/target/linux/brcm2708/bcm2708/target.mk 
b/target/linux/brcm2708/bcm2708/target.mk
index 10fae2f..a35ec66 100644
--- a/target/linux/brcm2708/bcm2708/target.mk
+++ b/target/linux/brcm2708/bcm2708/target.mk
@@ -4,6 +4,8 @@
 
 SUBTARGET:=bcm2708
 BOARDNAME:=BCM2708 based boards
+CPU_TYPE:=arm1176jzf-s
+CPU_SUBTYPE:=vfp
 
 define Target/Description
Build firmware image for Broadcom BCM2708 SoC devices.
diff --git a/target/linux/brcm2708/bcm2709/target.mk 
b/target/linux/brcm2708/bcm2709/target.mk
index 565c12a..c0679c7 100644
--- a/target/linux/brcm2708/bcm2709/target.mk
+++ b/target/linux/brcm2708/bcm2709/target.mk
@@ -5,7 +5,7 @@
 SUBTARGET:=bcm2709
 BOARDNAME:=BCM2709 based boards
 CPU_TYPE:=cortex-a7
-CPU_SUBTYPE:=vfp
+CPU_SUBTYPE:=neon-vfpv4
 
 define Target/Description
Build firmware image for Broadcom BCM2709 SoC devices.
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/6] brcm2708: add support for multi-device images

2015-11-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 .../linux/brcm2708/bcm2708/profiles/RaspberryPi.mk | 34 --
 target/linux/brcm2708/image/Makefile   | 24 +++
 target/linux/brcm2708/image/config.txt |  2 +-
 3 files changed, 16 insertions(+), 44 deletions(-)

diff --git a/target/linux/brcm2708/bcm2708/profiles/RaspberryPi.mk 
b/target/linux/brcm2708/bcm2708/profiles/RaspberryPi.mk
index dcf6e05..9f698a7 100644
--- a/target/linux/brcm2708/bcm2708/profiles/RaspberryPi.mk
+++ b/target/linux/brcm2708/bcm2708/profiles/RaspberryPi.mk
@@ -5,34 +5,10 @@
 # See /LICENSE for more information.
 #
 
-define Profile/Default
-  NAME:=Raspberry Pi
+define Profile/RaspberryPi
+  NAME:=Raspberry Pi Models B/B+/CM
 endef
-define Profile/Default/Description
-  Raspberry Pi
+define Profile/RaspberryPi/Description
+  Raspberry Pi Models B/B+/CM
 endef
-$(eval $(call Profile,Default))
-
-define Profile/RaspberryPi_B
-  NAME:=Raspberry Pi Model B
-endef
-define Profile/RaspberryPi_B/Description
-  Raspberry Pi Model B
-endef
-$(eval $(call Profile,RaspberryPi_B))
-
-define Profile/RaspberryPi_BPlus
-  NAME:=Raspberry Pi Model B+
-endef
-define Profile/RaspberryPi_BPlus/Description
-  Raspberry Pi Model B+
-endef
-$(eval $(call Profile,RaspberryPi_BPlus))
-
-define Profile/RaspberryPi_CM
-  NAME:=Raspberry Pi Compute Module
-endef
-define Profile/RaspberryPi_CM/Description
-  Raspberry Pi Model Compute Module
-endef
-$(eval $(call Profile,RaspberryPi_CM))
+$(eval $(call Profile,RaspberryPi))
diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 22c1218..53e5f54 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -12,9 +12,9 @@ FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo 
$$(($(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE
 
 ### Image scripts ###
-define Build/gen-cfg
-   cat config.txt > $@.config
-   echo -e "\ndevice_tree=$(DEVICE_DTS).dtb" >> $@.config
+define Build/kernel-img
+   perl $(LINUX_DIR)/scripts/mkknlimg $@ $@.tmp
+   mv $@.tmp $@
 endef
 
 define Build/boot-img
@@ -28,9 +28,9 @@ define Build/boot-img
mcopy -i $@.boot $(KDIR)/fixup.dat ::
mcopy -i $@.boot $(KDIR)/fixup_cd.dat ::
mcopy -i $@.boot cmdline.txt ::
-   mcopy -i $@.boot $@.config ::config.txt
+   mcopy -i $@.boot config.txt ::
mcopy -i $@.boot $(word 1,$^) ::kernel.img
-   mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::$(DEVICE_DTS).dtb
+   $(foreach dts,$(shell echo $(DEVICE_DTS)),mcopy -i $@.boot 
$(DTS_DIR)/$(dts).dtb ::)
mmd -i $@.boot ::/overlays
mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtb ::/overlays/
mcopy -i $@.boot $(DTS_DIR)/overlays/README ::/overlays/
@@ -46,9 +46,9 @@ endef
 define Device/Default
   FILESYSTEMS := ext4
   PROFILES = Default $$(DEVICE_PROFILE)
-  KERNEL := kernel-bin
+  KERNEL := kernel-bin | kernel-img
   IMAGES := sdcard.img
-  IMAGE/sdcard.img := gen-cfg | boot-img | sdcard-img
+  IMAGE/sdcard.img := boot-img | sdcard-img
   DEVICE_PROFILE :=
   DEVICE_DTS :=
 endef
@@ -67,18 +67,14 @@ endef
 
 ### BCM2708/BCM2835 ###
 ifeq ($(SUBTARGET),bcm2708)
-  # Raspberry Pi Model B
-  $(eval $(call bcm270x,RaspberryPi_B,rpi-b,bcm2708-rpi-b))
-  # Raspberry Pi Model B+
-  $(eval $(call bcm270x,RaspberryPi_BPlus,rpi-b-plus,bcm2708-rpi-b-plus))
-  # Raspberry Pi Compute Module
-  $(eval $(call bcm270x,RaspberryPi_CM,rpi-cm,bcm2708-rpi-cm))
+  # Raspberry Pi Models B/B+/CM
+  $(eval $(call bcm270x,RaspberryPi,rpi,bcm2708-rpi-b bcm2708-rpi-b-plus 
bcm2708-rpi-cm))
 endif
 
 ### BCM2709/BCM2836 ###
 ifeq ($(SUBTARGET),bcm2709)
   # Raspberry Pi 2 Model B
-  $(eval $(call bcm270x,RaspberryPi_2,rpi-2-b,bcm2709-rpi-2-b))
+  $(eval $(call bcm270x,RaspberryPi_2,rpi-2,bcm2709-rpi-2-b))
 endif
 
 $(eval $(call BuildImage))
diff --git a/target/linux/brcm2708/image/config.txt 
b/target/linux/brcm2708/image/config.txt
index 1fb880f..75b1cab 100644
--- a/target/linux/brcm2708/image/config.txt
+++ b/target/linux/brcm2708/image/config.txt
@@ -476,7 +476,7 @@
 ## Stop start.elf from filling in ATAGS (memory from 0x100) before
 ## launching kernel
 ##
-disable_commandline_tags=1
+disable_commandline_tags=2
 
 ## cmdline (string)
 ## Command line parameters. Can be used instead of cmdline.txt file
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/6] brcm2708: rename image device definition

2015-11-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index bfcb522..22c1218 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -57,7 +57,7 @@ DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
 # $(1) = profile
 # $(2) = image name
 # $(3) = dts
-define add_bcm2708
+define bcm270x
   define Device/$(2)
 DEVICE_PROFILE := $(1)
 DEVICE_DTS := $(3)
@@ -68,17 +68,17 @@ endef
 ### BCM2708/BCM2835 ###
 ifeq ($(SUBTARGET),bcm2708)
   # Raspberry Pi Model B
-  $(eval $(call add_bcm2708,RaspberryPi_B,rpi-b,bcm2708-rpi-b))
+  $(eval $(call bcm270x,RaspberryPi_B,rpi-b,bcm2708-rpi-b))
   # Raspberry Pi Model B+
-  $(eval $(call add_bcm2708,RaspberryPi_BPlus,rpi-b-plus,bcm2708-rpi-b-plus))
+  $(eval $(call bcm270x,RaspberryPi_BPlus,rpi-b-plus,bcm2708-rpi-b-plus))
   # Raspberry Pi Compute Module
-  $(eval $(call add_bcm2708,RaspberryPi_CM,rpi-cm,bcm2708-rpi-cm))
+  $(eval $(call bcm270x,RaspberryPi_CM,rpi-cm,bcm2708-rpi-cm))
 endif
 
 ### BCM2709/BCM2836 ###
 ifeq ($(SUBTARGET),bcm2709)
   # Raspberry Pi 2 Model B
-  $(eval $(call add_bcm2708,RaspberryPi_2,rpi-2-b,bcm2709-rpi-2-b))
+  $(eval $(call bcm270x,RaspberryPi_2,rpi-2-b,bcm2709-rpi-2-b))
 endif
 
 $(eval $(call BuildImage))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/6] brcm2708: simplify gzip image generation

2015-11-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 12 +---
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index cf263bd..ecf6f71 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -11,16 +11,6 @@ include $(INCLUDE_DIR)/host.mk
 FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo 
$$(($(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE
 
-ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
-  define Image/gzip
-gzip -9n -c $(1) > $(1).gz
-mv $(1).gz $(BIN_DIR)
-  endef
-else
-  define Image/gzip
-  endef
-endif
-
 ### Image scripts ###
 define Build/gen-cfg
cat config.txt > $@.config
@@ -49,7 +39,7 @@ endef
 define Build/sdcard-img
./gen_rpi_sdcard_img.sh $@ $@.boot $(word 2,$^) \
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) 
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
-   $(call Image/gzip,$@)
+   $(if $(CONFIG_TARGET_IMAGES_GZIP),gzip -9n -c $@ > $(BIN_DIR)/$(notdir 
$@).gz)
 endef
 
 ### Device macros ###
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/6] brcm2708: add device detection and use it for network, leds and preinit

2015-11-16 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/base-files.mk|  3 ++
 target/linux/brcm2708/base-files/etc/diag.sh   | 12 ++-
 .../base-files/etc/uci-defaults/02_network | 12 +--
 target/linux/brcm2708/base-files/lib/brcm2708.sh   | 41 ++
 .../lib/preinit/03_preinit_do_brcm2708.sh  | 10 ++
 .../lib/preinit/05_set_preinit_iface_brcm2708  | 18 ++
 target/linux/brcm2708/bcm2708/config-4.1   |  2 +-
 target/linux/brcm2708/bcm2709/config-4.1   |  2 +-
 8 files changed, 95 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/brcm2708/base-files.mk
 create mode 100644 target/linux/brcm2708/base-files/lib/brcm2708.sh
 create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
 create mode 100644 
target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708

diff --git a/target/linux/brcm2708/base-files.mk 
b/target/linux/brcm2708/base-files.mk
new file mode 100644
index 000..fdd2c71
--- /dev/null
+++ b/target/linux/brcm2708/base-files.mk
@@ -0,0 +1,3 @@
+define Package/base-files/install-target
+   rm -f $(1)/etc/config/network
+endef
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 55e68b1..3a8dc86 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -4,9 +4,19 @@
 #
 
 . /lib/functions/leds.sh
+. /lib/brcm2708.sh
 
 set_state() {
-   status_led="led0"
+   case "$(brcm2708_board_name)" in
+   rpi-b |\
+   rpi-cm)
+   status_led="led0"
+   ;;
+   rpi-b-plus |\
+   rpi-2-b)
+   status_led="led1"
+   ;;
+   esac
 
case "$1" in
preinit)
diff --git a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network 
b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
index e7e35c5..1bb05b6 100644
--- a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
+++ b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
@@ -1,14 +1,22 @@
 #!/bin/sh
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
 
 [ -e /etc/config/network ] && exit 0
 
 touch /etc/config/network
 
 . /lib/functions/uci-defaults.sh
+. /lib/brcm2708.sh
 
 ucidef_set_interface_loopback
-ucidef_set_interface_lan "eth0"
+
+case "$(brcm2708_board_name)" in
+rpi-b |\
+rpi-b-plus |\
+rpi-2-b)
+   ucidef_set_interface_lan "eth0"
+   ;;
+esac
 
 uci commit network
 
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
new file mode 100644
index 000..7d6e458
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+ifname=""
+
+brcm2708_detect() {
+   local board_name model
+
+   model=$(cat /proc/device-tree/model)
+   case "$model" in
+   "Raspberry Pi Model B"*)
+   board_name="rpi-b"
+   ;;
+   "Raspberry Pi Model B+"*)
+   board_name="rpi-b-plus"
+   ;;
+   "Raspberry Pi Compute Module"*)
+   board_name="rpi-cm"
+   ;;
+   "Raspberry Pi 2 Model B"*)
+   board_name="rpi-2-b"
+   ;;
+   *)
+   board_name="unknown"
+   ;;
+   esac
+
+   [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
+
+   echo "$board_name" > /tmp/sysinfo/board_name
+   echo "$model" > /tmp/sysinfo/model
+}
+
+brcm2708_board_name() {
+   local name
+
+   [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
+   [ -n "$name" ] || name="unknown"
+
+   echo $name
+}
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
new file mode 100644
index 000..2943648
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/preinit/03_preinit_do_brcm2708.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright (C) 2015 OpenWrt.org
+
+do_brcm2708() {
+   . /lib/brcm2708.sh
+
+   brcm2708_detect
+}
+
+boot_hook_add preinit_main do_brcm2708
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 
b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
new file mode 100644
index 000..154b01c
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+. /lib/brcm2708.sh
+
+set_preinit_ifa

[OpenWrt-Devel] [PATCH 1/4] brcm2708-gpu-fw: update to latest version

2015-10-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 package/kernel/brcm2708-gpu-fw/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index dd53bce..2686cf0 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=f9d0138ee8e2805299724addf85d03e851569291
-PKG_VERSION:=20150904
+PKG_REV:=9d268f00de7c13afa315fe2d303265d535c4bdf0
+PKG_VERSION:=20151025
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=7e645dc54bf4175ca358aeb4b3406d7c
+PKG_MD5SUM:=21ac2ba64ef045655b4d4677b3fdf6cd
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] brcm2708: update modules

2015-10-25 Thread Álvaro Fernández Rojas
- Add support for DAC+ Pro.
- Add kmod-smi-bcm2835 and kmod-smi-bcm2835-dev modules.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/modules.mk | 41 +---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/target/linux/brcm2708/modules.mk b/target/linux/brcm2708/modules.mk
index 36d26c6..3bc592c 100644
--- a/target/linux/brcm2708/modules.mk
+++ b/target/linux/brcm2708/modules.mk
@@ -66,20 +66,21 @@ endef
 $(eval $(call KernelPackage,sound-soc-hifiberry-dac))
 
 define KernelPackage/sound-soc-hifiberry-dacplus
-  TITLE:=Support for HifiBerry DAC+
+  TITLE:=Support for HifiBerry DAC+ / DAC+ Pro
   KCONFIG:= \
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS \
CONFIG_SND_SOC_PCM512x
   FILES:= \
+   $(LINUX_DIR)/drivers/clk/clk-hifiberry-dacpro.ko \
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-dacplus.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko
-  AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm512x snd-soc-hifiberry-dacplus)
+  AUTOLOAD:=$(call AutoLoad,68,clk-hifiberry-dacpro snd-soc-pcm512x 
snd-soc-hifiberry-dacplus)
   DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
 define KernelPackage/sound-soc-hifiberry-dacplus/description
-  This package contains support for HifiBerry DAC+
+  This package contains support for HifiBerry DAC+ / DAC+ Pro
 endef
 
 $(eval $(call KernelPackage,sound-soc-hifiberry-dacplus))
@@ -236,6 +237,40 @@ endef
 $(eval $(call KernelPackage,random-bcm2835))
 
 
+define KernelPackage/smi-bcm2835
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=BCM2835 SMI driver
+  KCONFIG:=CONFIG_BCM2835_SMI
+  FILES:=$(LINUX_DIR)/drivers/misc/bcm2835_smi.ko
+  AUTOLOAD:=$(call AutoLoad,20,bcm2835_smi)
+  DEPENDS:=@TARGET_brcm2708
+endef
+
+define KernelPackage/smi-bcm2835/description
+  This package contains the Character device driver for Broadcom Secondary
+  Memory Interface
+endef
+
+$(eval $(call KernelPackage,smi-bcm2835))
+
+define KernelPackage/smi-bcm2835-dev
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=BCM2835 SMI device driver
+  KCONFIG:=CONFIG_BCM2835_SMI_DEV
+  FILES:=$(LINUX_DIR)/drivers/char/broadcom/bcm2835_smi_dev.ko
+  AUTOLOAD:=$(call AutoLoad,21,bcm2835_smi_dev)
+  DEPENDS:=@TARGET_brcm2708 +kmod-smi-bcm2835
+endef
+
+define KernelPackage/smi-bcm2835-dev/description
+  This driver provides a character device interface (ioctl + read/write) to
+  Broadcom's Secondary Memory interface. The low-level functionality is 
provided
+  by the SMI driver itself.
+endef
+
+$(eval $(call KernelPackage,smi-bcm2835-dev))
+
+
 define KernelPackage/spi-bcm2708
   SUBMENU:=$(SPI_MENU)
   TITLE:=BCM2708 SPI controller driver
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] brcm2708: copy overlays README to boot partition

2015-10-25 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index cc0bfb0..cf263bd 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -43,6 +43,7 @@ define Build/boot-img
mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::$(DEVICE_DTS).dtb
mmd -i $@.boot ::/overlays
mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtb ::/overlays/
+   mcopy -i $@.boot $(DTS_DIR)/overlays/README ::/overlays/
 endef
 
 define Build/sdcard-img
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] brcm2708: use mmd for overlays subdirectory

2015-10-10 Thread Álvaro Fernández Rojas
Fixes https://dev.openwrt.org/ticket/20704

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 3744cac..cc0bfb0 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -21,12 +21,6 @@ else
   endef
 endif
 
-define Image/Prepare
-   rm -rf $(KDIR)/overlays
-   mkdir -p $(KDIR)/overlays
-   $(CP) $(DTS_DIR)/overlays/*.dtb $(KDIR)/overlays/
-endef
-
 ### Image scripts ###
 define Build/gen-cfg
cat config.txt > $@.config
@@ -47,7 +41,8 @@ define Build/boot-img
mcopy -i $@.boot $@.config ::config.txt
mcopy -i $@.boot $(word 1,$^) ::kernel.img
mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::$(DEVICE_DTS).dtb
-   mcopy -s -i $@.boot $(KDIR)/overlays ::
+   mmd -i $@.boot ::/overlays
+   mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtb ::/overlays/
 endef
 
 define Build/sdcard-img
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] mtools: build and install mmd

2015-10-10 Thread Álvaro Fernández Rojas
useful for making MS-DOS subdirectories

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 tools/mtools/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/mtools/Makefile b/tools/mtools/Makefile
index 674c8dd..13de447 100644
--- a/tools/mtools/Makefile
+++ b/tools/mtools/Makefile
@@ -22,15 +22,17 @@ HOST_CONFIGURE_VARS += \
ac_cv_header_iconv_h=no
 
 define Host/Compile
-   $(MAKE) -C $(HOST_BUILD_DIR) mcopy
+   $(MAKE) -C $(HOST_BUILD_DIR) mcopy mmd
 endef
 
 define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/mcopy $(STAGING_DIR_HOST)/bin/
+   $(INSTALL_BIN) $(HOST_BUILD_DIR)/mmd $(STAGING_DIR_HOST)/bin/
 endef
 
 define Host/Clean
rm -f $(STAGING_DIR_HOST)/bin/mcopy
+   rm -f $(STAGING_DIR_HOST)/bin/mmd
 endef
 
 $(eval $(call HostBuild))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] brcm63xx: fix brcm, bcm6345-ext-intc interrupt controller

2015-10-09 Thread Álvaro Fernández Rojas
brcm,field-width is read but unused

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 .../321-irqchip-add-support-for-bcm6345-style-external-inter.patch | 7 ---
 .../321-irqchip-add-support-for-bcm6345-style-external-inter.patch | 7 ---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/target/linux/brcm63xx/patches-3.18/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
 
b/target/linux/brcm63xx/patches-3.18/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
index 547b2f1..fa2b2f3 100644
--- 
a/target/linux/brcm63xx/patches-3.18/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
+++ 
b/target/linux/brcm63xx/patches-3.18/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
 +
 +Required properties:
 +
-+- compatible: Should be "brcm,bcm6345-l2-intc".
++- compatible: Should be "brcm,bcm6345-ext-intc".
 +- reg: Specifies the base physical addresses and size of the registers.
 +- interrupt-controller: identifies the node as an interrupt controller.
 +- #interrupt-cells: Specifies the number of cells needed to encode an 
interrupt
@@ -41,7 +41,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
 +Example:
 +
 +ext_intc: interrupt-controller@1018 {
-+  compatible = "brcm,bcm6345-l2-intc";
++  compatible = "brcm,bcm6345-ext-intc";
 +  interrupt-parent = <_intc>;
 +  #interrupt-cells = <2>;
 +  reg = <0x1018 0x4>;
@@ -73,7 +73,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
  obj-$(CONFIG_METAG)   += irq-metag-ext.o
 --- /dev/null
 +++ b/drivers/irqchip/irq-bcm6345-ext.c
-@@ -0,0 +1,287 @@
+@@ -0,0 +1,288 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
@@ -283,6 +283,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
 +  }
 +
 +  data->reg = reg;
++  data->shift = shift;
 +
 +  data->chip.name = "bcm6345-ext-intc";
 +  data->chip.irq_ack = bcm6345_ext_intc_irq_ack;
diff --git 
a/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
 
b/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
index 7eca81b..5ee5ee2 100644
--- 
a/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
+++ 
b/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
 +
 +Required properties:
 +
-+- compatible: Should be "brcm,bcm6345-l2-intc".
++- compatible: Should be "brcm,bcm6345-ext-intc".
 +- reg: Specifies the base physical addresses and size of the registers.
 +- interrupt-controller: identifies the node as an interrupt controller.
 +- #interrupt-cells: Specifies the number of cells needed to encode an 
interrupt
@@ -41,7 +41,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
 +Example:
 +
 +ext_intc: interrupt-controller@1018 {
-+  compatible = "brcm,bcm6345-l2-intc";
++  compatible = "brcm,bcm6345-ext-intc";
 +  interrupt-parent = <_intc>;
 +  #interrupt-cells = <2>;
 +  reg = <0x1018 0x4>;
@@ -73,7 +73,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
  obj-$(CONFIG_METAG)   += irq-metag-ext.o
 --- /dev/null
 +++ b/drivers/irqchip/irq-bcm6345-ext.c
-@@ -0,0 +1,287 @@
+@@ -0,0 +1,288 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
@@ -283,6 +283,7 @@ Signed-off-by: Jonas Gorski <j...@openwrt.org>
 +  }
 +
 +  data->reg = reg;
++  data->shift = shift;
 +
 +  data->chip.name = "bcm6345-ext-intc";
 +  data->chip.irq_ack = bcm6345_ext_intc_irq_ack;
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] bmips: add new target

2015-10-09 Thread Álvaro Fernández Rojas
I'm sorry, I didn't want to send it, I used the wrong wildcard when 
selecting all patches :D


El 09/10/2015 a las 22:36, Florian Fainelli escribió:

On 09/10/15 13:29, Álvaro Fernández Rojas wrote:

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>

Nice, a commit message telling what this is about would have been
welcome, especially with the diffstat below which is pretty gigantic.

Could you make sure that all patches that are not upstream yet get
submitted to their respective maintainers?

Finally, which devices has this been tested with?

We can talk about that patchset off list.
--
Florian

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] brcm63xx: fix Netgear CVG834G HCS magic bytes

2015-10-09 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 => 100644 target/linux/brcm63xx/image/Makefile

diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
old mode 100755
new mode 100644
index 9d3ec9f..9581116
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -581,7 +581,7 @@ $(eval $(call 
bcm63xxCfeRamdisk,VG50,vg50,vg50,VW6339GU,63268))
 # Inventel Livebox 1
 $(eval $(call bcm63xxRedBoot,Livebox,livebox,livebox-blue-5g))
 # Netgear CVG834G
-$(eval $(call bcm33xxHcsRamdisk,CVG834G,cvg834g,cvg834g,a020,0001,0022))
+$(eval $(call bcm33xxHcsRamdisk,CVG834G,cvg834g,cvg834g,0xa020,0001,0022))
 # Netgear DG834GT/PN
 $(eval $(call bcm63xxCfe,DG834GTPN,DG834GT_PN,dg834gtpn,96348GW-10,6348))
 # Netgear DG834G v4
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] brcm63xx: lzma-loader: add BCM3380 support

2015-10-09 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/image/lzma-loader/src/board.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/brcm63xx/image/lzma-loader/src/board.c 
b/target/linux/brcm63xx/image/lzma-loader/src/board.c
index 46af525..28b9c53 100644
--- a/target/linux/brcm63xx/image/lzma-loader/src/board.c
+++ b/target/linux/brcm63xx/image/lzma-loader/src/board.c
@@ -70,6 +70,8 @@ void board_init(void)
case PRID_IMP_BMIPS43XX:
if ((prid & 0xff) == 0x04)
chipid_reg = 0xfff8c000;
+   else if ((prid & 0xff) == 0x70)
+   chipid_reg = 0xb4e0;
else if ((prid & 0xff) >= 0x30)
chipid_reg = 0xb000;
else
@@ -95,6 +97,9 @@ void board_init(void)
case 0x6326:
uart_base = chipid_reg + 0x180;
break;
+   case 0x3380:
+   uart_base = chipid_reg + 0x200;
+   break;
case 0x6338:
case 0x6345:
case 0x6348:
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/5] brcm63xx: lzma-loader: add BCM3380 support

2015-10-09 Thread Álvaro Fernández Rojas
Not yet, also my patches for the kernel are based on yours, so maybe you 
should submit them, since you were the first one to implement the support.

BTW, I boot tested bmips on BCM3380 with the following changes:
https://github.com/openwrt-es/openwrt/commit/3c72e4dc2b2bf21f3b1a7ef412fdb60753febae1
https://github.com/openwrt-es/openwrt/commits/bmips-4.1
But I have to say it's painfully slow, because it takes like 150s to 
fully boot on 1 CPU and 400+ on 2CPU :/.


And about bmips target, Jonas wants to add it as a brcm63xx subtarget in 
the future.


Regards,
Álvaro.

El 09/10/2015 a las 22:38, Florian Fainelli escribió:

On 09/10/15 13:29, Álvaro Fernández Rojas wrote:

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>

That is a first step, but there are additional kernel changes required
to boot on 3380, are you also going to submit these?


---
  target/linux/brcm63xx/image/lzma-loader/src/board.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/target/linux/brcm63xx/image/lzma-loader/src/board.c 
b/target/linux/brcm63xx/image/lzma-loader/src/board.c
index 46af525..28b9c53 100644
--- a/target/linux/brcm63xx/image/lzma-loader/src/board.c
+++ b/target/linux/brcm63xx/image/lzma-loader/src/board.c
@@ -70,6 +70,8 @@ void board_init(void)
case PRID_IMP_BMIPS43XX:
if ((prid & 0xff) == 0x04)
chipid_reg = 0xfff8c000;
+   else if ((prid & 0xff) == 0x70)
+   chipid_reg = 0xb4e0;
else if ((prid & 0xff) >= 0x30)
chipid_reg = 0xb000;
else
@@ -95,6 +97,9 @@ void board_init(void)
case 0x6326:
uart_base = chipid_reg + 0x180;
break;
+   case 0x3380:
+   uart_base = chipid_reg + 0x200;
+   break;
case 0x6338:
case 0x6345:
case 0x6348:


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] brcm63xx: lzma-loader: add BCM3368 support

2015-10-09 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/image/lzma-loader/src/board.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/brcm63xx/image/lzma-loader/src/board.c 
b/target/linux/brcm63xx/image/lzma-loader/src/board.c
index 1c715e3..46af525 100644
--- a/target/linux/brcm63xx/image/lzma-loader/src/board.c
+++ b/target/linux/brcm63xx/image/lzma-loader/src/board.c
@@ -68,7 +68,9 @@ void board_init(void)
chipid_reg = 0xfffe;
break;
case PRID_IMP_BMIPS43XX:
-   if ((prid & 0xff) >= 0x30)
+   if ((prid & 0xff) == 0x04)
+   chipid_reg = 0xfff8c000;
+   else if ((prid & 0xff) >= 0x30)
chipid_reg = 0xb000;
else
chipid_reg = 0xfffe;
@@ -80,6 +82,7 @@ void board_init(void)
chipid = READREG(chipid_reg);
 
switch (chipid >> 16) {
+   case 0x3368:
case 0x6318:
case 0x6328:
case 0x6358:
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] brcm63xx: fix BCM3368 external interrupts

2015-10-09 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/dts/bcm3368.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm63xx/dts/bcm3368.dtsi 
b/target/linux/brcm63xx/dts/bcm3368.dtsi
index f3b0b02..5be5c6a 100644
--- a/target/linux/brcm63xx/dts/bcm3368.dtsi
+++ b/target/linux/brcm63xx/dts/bcm3368.dtsi
@@ -71,7 +71,7 @@
#interrupt-cells = <2>;
 
interrupt-parent = <_intc>;
-   interrupts = <24>, <25>, <26>, <27>;
+   interrupts = <25>, <26>, <27>, <28>;
};
 
gpio1: gpio-controller@fff8c080 {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] brcm2708: all sound overlays require i2c to work

2015-10-05 Thread Álvaro Fernández Rojas
Tested on RPi B+ with HiFiBerry Amp+

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/modules.mk | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/target/linux/brcm2708/modules.mk b/target/linux/brcm2708/modules.mk
index 9c201d0..36d26c6 100644
--- a/target/linux/brcm2708/modules.mk
+++ b/target/linux/brcm2708/modules.mk
@@ -55,7 +55,7 @@ define KernelPackage/sound-soc-hifiberry-dac
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-dac.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm5102a.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm5102a snd-soc-hifiberry-dac)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -74,7 +74,7 @@ define KernelPackage/sound-soc-hifiberry-dacplus
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-dacplus.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm512x snd-soc-hifiberry-dacplus)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -93,7 +93,7 @@ define KernelPackage/sound-soc-hifiberry-digi
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-digi.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8804.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-wm8804 snd-soc-hifiberry-digi)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -112,7 +112,7 @@ define KernelPackage/sound-soc-hifiberry-amp
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-amp.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-tas5713.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-tas5713 snd-soc-hifiberry-amp)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -131,7 +131,7 @@ define KernelPackage/sound-soc-rpi-dac
$(LINUX_DIR)/sound/soc/bcm/snd-soc-rpi-dac.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm1794a.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm1794a snd-soc-rpi-dac)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -150,7 +150,7 @@ define KernelPackage/sound-soc-rpi-proto
$(LINUX_DIR)/sound/soc/bcm/snd-soc-rpi-proto.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8731.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-wm8731 snd-soc-rpi-proto)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -171,7 +171,7 @@ define KernelPackage/sound-soc-iqaudio-dac
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x-i2c.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm512x snd-soc-pcm512x-i2c 
snd-soc-iqaudio-dac)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
@@ -194,7 +194,7 @@ define KernelPackage/sound-soc-raspidac3
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x-i2c.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-tpa6130a2.ko
   AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm512x snd-soc-pcm512x-i2c 
snd-soc-tpa6130a2 snd-soc-raspidac3)
-  DEPENDS:=kmod-sound-soc-bcm2708-i2s
+  DEPENDS:=kmod-sound-soc-bcm2708-i2s +kmod-i2c-bcm2708
   $(call AddDepends/sound)
 endef
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] brcm2708: add support for device tree overlays

2015-10-01 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/image/Makefile   | 7 +++
 target/linux/brcm2708/image/config.txt | 9 +
 2 files changed, 16 insertions(+)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 7a68c50..3744cac 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -21,6 +21,12 @@ else
   endef
 endif
 
+define Image/Prepare
+   rm -rf $(KDIR)/overlays
+   mkdir -p $(KDIR)/overlays
+   $(CP) $(DTS_DIR)/overlays/*.dtb $(KDIR)/overlays/
+endef
+
 ### Image scripts ###
 define Build/gen-cfg
cat config.txt > $@.config
@@ -41,6 +47,7 @@ define Build/boot-img
mcopy -i $@.boot $@.config ::config.txt
mcopy -i $@.boot $(word 1,$^) ::kernel.img
mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::$(DEVICE_DTS).dtb
+   mcopy -s -i $@.boot $(KDIR)/overlays ::
 endef
 
 define Build/sdcard-img
diff --git a/target/linux/brcm2708/image/config.txt 
b/target/linux/brcm2708/image/config.txt
index f66f6bc..1fb880f 100644
--- a/target/linux/brcm2708/image/config.txt
+++ b/target/linux/brcm2708/image/config.txt
@@ -927,3 +927,12 @@ init_uart_clock=300
 

 
 dtparam=random=on,watchdog=on,audio=on,i2c0=on,i2c1=on,spi=on
+
+#dtoverlay=hifiberry-amp-overlay
+#dtoverlay=hifiberry-dac-overlay
+#dtoverlay=hifiberry-dacplus-overlay
+#dtoverlay=hifiberry-digi-overlay
+#dtoverlay=iqaudio-dac-overlay
+#dtoverlay=iqaudio-dacplus-overlay
+#dtoverlay=raspidac3-overlay
+#dtoverlay=rpi-proto-overlay
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] brcm2708: keep boot partition mounted to allow users to change config.txt

2015-10-01 Thread Álvaro Fernández Rojas
This way it's easier to configure device tree overlays, customize other
parameters...

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/base-files/lib/preinit/79_move_config | 6 +++---
 target/linux/brcm2708/base-files/lib/upgrade/platform.sh| 7 ---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/target/linux/brcm2708/base-files/lib/preinit/79_move_config 
b/target/linux/brcm2708/base-files/lib/preinit/79_move_config
index 7bcea7b..b0ee62a 100644
--- a/target/linux/brcm2708/base-files/lib/preinit/79_move_config
+++ b/target/linux/brcm2708/base-files/lib/preinit/79_move_config
@@ -9,9 +9,9 @@ move_config() {
insmod nls_iso8859-1
insmod fat
insmod vfat
-   mount -t vfat -o rw,noatime $BOOTPART /mnt
-   [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
-   umount /mnt
+   mkdir -p /boot
+   mount -t vfat -o rw,noatime $BOOTPART /boot
+   [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
fi
 }
 
diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh 
b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
index 3e1ee00..1d4b694 100644
--- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
@@ -10,8 +10,9 @@ platform_do_upgrade() {
 }
 
 platform_copy_config() {
-   mount -t vfat -o rw,noatime /dev/mmcblk0p1 /mnt
-   cp -af "$CONF_TAR" /mnt/
+   mkdir -p /boot
+   [ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 
/boot
+   cp -af "$CONF_TAR" /boot/
sync
-   umount /mnt
+   umount /boot
 }
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] brcm2708: fix kmod-sound-soc-bcm2708-i2s config

2015-10-01 Thread Álvaro Fernández Rojas
Right now, selecting kmod-sound-soc-bcm2708-i2s causes build errors due to
missing configs.
kmod-regmap enables I2C and SPI, causing build errors due to depending
variables not defined.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/modules.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/brcm2708/modules.mk b/target/linux/brcm2708/modules.mk
index 68a7d38..9c201d0 100644
--- a/target/linux/brcm2708/modules.mk
+++ b/target/linux/brcm2708/modules.mk
@@ -28,6 +28,8 @@ $(eval $(call KernelPackage,sound-arm-bcm2835))
 define KernelPackage/sound-soc-bcm2708-i2s
   TITLE:=SoC Audio support for the Broadcom 2708 I2S module
   KCONFIG:= \
+   CONFIG_BCM2708_SPIDEV=n \
+   CONFIG_MFD_RPISENSE_CORE=n \
CONFIG_SND_BCM2708_SOC_I2S \
CONFIG_SND_SOC_DMAENGINE_PCM=y \
CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] brcm2708: switch device tree compilation to linux

2015-10-01 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm2708/Makefile   | 2 +-
 target/linux/brcm2708/image/Makefile | 8 ++--
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index 6d8aba0..f8c9347 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -26,6 +26,6 @@ define Target/Description
Currently produces SD Card image for Raspberry Pi.
 endef
 
-KERNELNAME:=Image
+KERNELNAME:=Image dtbs
 
 $(eval $(call BuildTarget))
diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index de222f0..7a68c50 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -22,10 +22,6 @@ else
 endif
 
 ### Image scripts ###
-define Build/build-dtb
-   $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,$@.dtb)
-endef
-
 define Build/gen-cfg
cat config.txt > $@.config
echo -e "\ndevice_tree=$(DEVICE_DTS).dtb" >> $@.config
@@ -44,7 +40,7 @@ define Build/boot-img
mcopy -i $@.boot cmdline.txt ::
mcopy -i $@.boot $@.config ::config.txt
mcopy -i $@.boot $(word 1,$^) ::kernel.img
-   mcopy -i $@.boot $@.dtb ::$(DEVICE_DTS).dtb
+   mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::$(DEVICE_DTS).dtb
 endef
 
 define Build/sdcard-img
@@ -59,7 +55,7 @@ define Device/Default
   PROFILES = Default $$(DEVICE_PROFILE)
   KERNEL := kernel-bin
   IMAGES := sdcard.bin
-  IMAGE/sdcard.bin := build-dtb | gen-cfg | boot-img | sdcard-img
+  IMAGE/sdcard.bin := gen-cfg | boot-img | sdcard-img
   DEVICE_PROFILE :=
   DEVICE_DTS :=
 endef
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] bcm53xx: allow building single device images

2015-09-27 Thread Álvaro Fernández Rojas
While keeping the default build profile, this allows users to generate only
their device image instead of every bcm53xx supported device image
This way we can also define the proper packages for each device (USB, WiFi...)

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v2: add profile for Linksys EA6300 v1

 target/linux/bcm53xx/Makefile|  4 +--
 target/linux/bcm53xx/image/Makefile  |  3 +-
 target/linux/bcm53xx/profiles/100-Generic.mk |  5 ++--
 target/linux/bcm53xx/profiles/ASUS.mk| 43 ++
 target/linux/bcm53xx/profiles/Buffalo.mk | 45 
 target/linux/bcm53xx/profiles/NETGEAR.mk | 45 
 target/linux/bcm53xx/profiles/SmartRG.mk | 16 ++
 7 files changed, 155 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/bcm53xx/profiles/ASUS.mk
 create mode 100644 target/linux/bcm53xx/profiles/Buffalo.mk
 create mode 100644 target/linux/bcm53xx/profiles/NETGEAR.mk
 create mode 100644 target/linux/bcm53xx/profiles/SmartRG.mk

diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
index 68cfa63..6b916ce 100644
--- a/target/linux/bcm53xx/Makefile
+++ b/target/linux/bcm53xx/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -23,7 +23,7 @@ endef
 
 KERNELNAME:=zImage dtbs
 
-DEFAULT_PACKAGES += swconfig wpad-mini nvram otrx \
+DEFAULT_PACKAGES += swconfig nvram otrx \
kmod-gpio-button-hotplug \
kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-timer
 
diff --git a/target/linux/bcm53xx/image/Makefile 
b/target/linux/bcm53xx/image/Makefile
index c9987dd..1d8ade5 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -66,6 +66,7 @@ define Device/Default
   # .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included 
in device/image names
   # extract the full dtb name based on the device info
   DT := $(patsubst %.dtb,%,$(notdir $(wildcard $(if 
$(IB),$(KDIR),$(DTS_DIR))/*-$(1).dtb)))
+  PROFILES = Generic $$(DEVICE_NAME)
   KERNEL := kernel-bin | append-dtb | lzma-d16
   FILESYSTEMS := squashfs
   KERNEL_NAME := zImage
diff --git a/target/linux/bcm53xx/profiles/100-Generic.mk 
b/target/linux/bcm53xx/profiles/100-Generic.mk
index d7e9005..fb6527f 100644
--- a/target/linux/bcm53xx/profiles/100-Generic.mk
+++ b/target/linux/bcm53xx/profiles/100-Generic.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,7 +7,7 @@
 
 define Profile/Generic
   NAME:=Broadcom SoC, BCM43xx WiFi (b43, brcmfmac, default)
-  PACKAGES:=kmod-b43 kmod-brcmfmac
+  PACKAGES:=kmod-b43 kmod-brcmfmac wpad-mini
 endef
 
 define Profile/Generic/Description
@@ -16,4 +16,3 @@ define Profile/Generic/Description
 endef
 
 $(eval $(call Profile,Generic))
-
diff --git a/target/linux/bcm53xx/profiles/ASUS.mk 
b/target/linux/bcm53xx/profiles/ASUS.mk
new file mode 100644
index 000..51aa412
--- /dev/null
+++ b/target/linux/bcm53xx/profiles/ASUS.mk
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/asus-rt-ac56u
+  NAME:=ASUS RT-AC56U
+  PACKAGES:=kmod-b43 wpad-mini \
+   kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-ac56u/Description
+  Package set optimized for ASUS RT-AC56U.
+endef
+$(eval $(call Profile,asus-rt-ac56u))
+
+define Profile/asus-rt-ac68u
+  NAME:=ASUS RT-AC68U
+  PACKAGES:=kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-ac68u/Description
+  Package set optimized for ASUS RT-AC68U.
+endef
+$(eval $(call Profile,asus-rt-ac68u))
+
+define Profile/asus-rt-ac87u
+  NAME:=ASUS RT-AC87U
+  PACKAGES:=kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-ac87u/Description
+  Package set optimized for ASUS RT-AC87U.
+endef
+$(eval $(call Profile,asus-rt-ac87u))
+
+define Profile/asus-rt-n18u
+  NAME:=ASUS RT-N18U
+  PACKAGES:=kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-n18u/Description
+  Package set optimized for ASUS RT-N18U.
+endef
+$(eval $(call Profile,asus-rt-n18u))
diff --git a/target/linux/bcm53xx/profiles/Buffalo.mk 
b/target/linux/bcm53xx/profiles/Buffalo.mk
new file mode 100644
index 000..704eefd
--- /dev/null
+++ b/target/linux/bcm53xx/profiles/Buffalo.mk
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.

[OpenWrt-Devel] [PATCH v2] bcm53xx: allow building single device images

2015-09-27 Thread Álvaro Fernández Rojas
While keeping the default build profile, this allows users to generate only
their device image instead of every bcm53xx supported device image
This way we can also define the proper packages for each device (USB, WiFi...)

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v2: add profile for Linksys EA6300 v1
 
 target/linux/bcm53xx/Makefile|  4 +--
 target/linux/bcm53xx/image/Makefile  |  3 +-
 target/linux/bcm53xx/profiles/100-Generic.mk |  5 ++--
 target/linux/bcm53xx/profiles/ASUS.mk| 43 ++
 target/linux/bcm53xx/profiles/Buffalo.mk | 45 
 target/linux/bcm53xx/profiles/Linksys.mk | 16 ++
 target/linux/bcm53xx/profiles/NETGEAR.mk | 45 
 target/linux/bcm53xx/profiles/SmartRG.mk | 16 ++
 8 files changed, 171 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/bcm53xx/profiles/ASUS.mk
 create mode 100644 target/linux/bcm53xx/profiles/Buffalo.mk
 create mode 100644 target/linux/bcm53xx/profiles/Linksys.mk
 create mode 100644 target/linux/bcm53xx/profiles/NETGEAR.mk
 create mode 100644 target/linux/bcm53xx/profiles/SmartRG.mk

diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
index 68cfa63..6b916ce 100644
--- a/target/linux/bcm53xx/Makefile
+++ b/target/linux/bcm53xx/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -23,7 +23,7 @@ endef
 
 KERNELNAME:=zImage dtbs
 
-DEFAULT_PACKAGES += swconfig wpad-mini nvram otrx \
+DEFAULT_PACKAGES += swconfig nvram otrx \
kmod-gpio-button-hotplug \
kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-timer
 
diff --git a/target/linux/bcm53xx/image/Makefile 
b/target/linux/bcm53xx/image/Makefile
index c9987dd..1d8ade5 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -66,6 +66,7 @@ define Device/Default
   # .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included 
in device/image names
   # extract the full dtb name based on the device info
   DT := $(patsubst %.dtb,%,$(notdir $(wildcard $(if 
$(IB),$(KDIR),$(DTS_DIR))/*-$(1).dtb)))
+  PROFILES = Generic $$(DEVICE_NAME)
   KERNEL := kernel-bin | append-dtb | lzma-d16
   FILESYSTEMS := squashfs
   KERNEL_NAME := zImage
diff --git a/target/linux/bcm53xx/profiles/100-Generic.mk 
b/target/linux/bcm53xx/profiles/100-Generic.mk
index d7e9005..fb6527f 100644
--- a/target/linux/bcm53xx/profiles/100-Generic.mk
+++ b/target/linux/bcm53xx/profiles/100-Generic.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,7 +7,7 @@
 
 define Profile/Generic
   NAME:=Broadcom SoC, BCM43xx WiFi (b43, brcmfmac, default)
-  PACKAGES:=kmod-b43 kmod-brcmfmac
+  PACKAGES:=kmod-b43 kmod-brcmfmac wpad-mini
 endef
 
 define Profile/Generic/Description
@@ -16,4 +16,3 @@ define Profile/Generic/Description
 endef
 
 $(eval $(call Profile,Generic))
-
diff --git a/target/linux/bcm53xx/profiles/ASUS.mk 
b/target/linux/bcm53xx/profiles/ASUS.mk
new file mode 100644
index 000..51aa412
--- /dev/null
+++ b/target/linux/bcm53xx/profiles/ASUS.mk
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/asus-rt-ac56u
+  NAME:=ASUS RT-AC56U
+  PACKAGES:=kmod-b43 wpad-mini \
+   kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-ac56u/Description
+  Package set optimized for ASUS RT-AC56U.
+endef
+$(eval $(call Profile,asus-rt-ac56u))
+
+define Profile/asus-rt-ac68u
+  NAME:=ASUS RT-AC68U
+  PACKAGES:=kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-ac68u/Description
+  Package set optimized for ASUS RT-AC68U.
+endef
+$(eval $(call Profile,asus-rt-ac68u))
+
+define Profile/asus-rt-ac87u
+  NAME:=ASUS RT-AC87U
+  PACKAGES:=kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-ac87u/Description
+  Package set optimized for ASUS RT-AC87U.
+endef
+$(eval $(call Profile,asus-rt-ac87u))
+
+define Profile/asus-rt-n18u
+  NAME:=ASUS RT-N18U
+  PACKAGES:=kmod-usb-ohci kmod-usb2
+endef
+define Profile/asus-rt-n18u/Description
+  Package set optimized for ASUS RT-N18U.
+endef
+$(eval $(call Profile,asus-rt-n18u))
diff --git a/target/linux/bcm53xx/profiles/Buffalo.mk 
b/target/linux/bcm53xx/profiles/Buffalo.mk
new file mode 100644
index 000..704eefd
--- /dev/null
+++ b/target/linux/bcm53xx/profiles/Buffalo.mk
@@ -0,0

Re: [OpenWrt-Devel] [PATCH v2] bcm53xx: allow building single device images

2015-09-27 Thread Álvaro Fernández Rojas

I suppose you are talking about usb packages.
Well, we can do that, but what if we add another device in the future 
which doesn't have any USB ports?


Regards,
Álvaro.

El 27/09/2015 a las 11:32, Felix Fietkau escribió:

On 2015-09-27 10:52, Álvaro Fernández Rojas wrote:

While keeping the default build profile, this allows users to generate only
their device image instead of every bcm53xx supported device image
This way we can also define the proper packages for each device (USB, WiFi...)

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
  v2: add profile for Linksys EA6300 v1

I don't like having the same package selection duplicated for every
single profile. How about moving those to DEFAULT_PACKAGES for the target?

- Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] bcm53xx: allow building single device images

2015-09-27 Thread Álvaro Fernández Rojas
While keeping the default build profile, this allows users to generate only
their device image instead of every bcm53xx supported device image
This way we can also define the proper packages for each device (USB, WiFi...)

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 v3: add kmod-usb3 for all devices except for Buffalo WZR-600DHP2
 v2: add profile for Linksys EA6300 v1
 
 target/linux/bcm53xx/Makefile|  4 +--
 target/linux/bcm53xx/image/Makefile  |  3 +-
 target/linux/bcm53xx/profiles/100-Generic.mk |  5 ++--
 target/linux/bcm53xx/profiles/ASUS.mk| 43 ++
 target/linux/bcm53xx/profiles/Buffalo.mk | 45 
 target/linux/bcm53xx/profiles/Linksys.mk | 16 ++
 target/linux/bcm53xx/profiles/NETGEAR.mk | 45 
 target/linux/bcm53xx/profiles/SmartRG.mk | 16 ++
 8 files changed, 171 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/bcm53xx/profiles/ASUS.mk
 create mode 100644 target/linux/bcm53xx/profiles/Buffalo.mk
 create mode 100644 target/linux/bcm53xx/profiles/Linksys.mk
 create mode 100644 target/linux/bcm53xx/profiles/NETGEAR.mk
 create mode 100644 target/linux/bcm53xx/profiles/SmartRG.mk

diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
index 68cfa63..6b916ce 100644
--- a/target/linux/bcm53xx/Makefile
+++ b/target/linux/bcm53xx/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -23,7 +23,7 @@ endef
 
 KERNELNAME:=zImage dtbs
 
-DEFAULT_PACKAGES += swconfig wpad-mini nvram otrx \
+DEFAULT_PACKAGES += swconfig nvram otrx \
kmod-gpio-button-hotplug \
kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-timer
 
diff --git a/target/linux/bcm53xx/image/Makefile 
b/target/linux/bcm53xx/image/Makefile
index c9987dd..1d8ade5 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -66,6 +66,7 @@ define Device/Default
   # .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included 
in device/image names
   # extract the full dtb name based on the device info
   DT := $(patsubst %.dtb,%,$(notdir $(wildcard $(if 
$(IB),$(KDIR),$(DTS_DIR))/*-$(1).dtb)))
+  PROFILES = Generic $$(DEVICE_NAME)
   KERNEL := kernel-bin | append-dtb | lzma-d16
   FILESYSTEMS := squashfs
   KERNEL_NAME := zImage
diff --git a/target/linux/bcm53xx/profiles/100-Generic.mk 
b/target/linux/bcm53xx/profiles/100-Generic.mk
index d7e9005..fb6527f 100644
--- a/target/linux/bcm53xx/profiles/100-Generic.mk
+++ b/target/linux/bcm53xx/profiles/100-Generic.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,7 +7,7 @@
 
 define Profile/Generic
   NAME:=Broadcom SoC, BCM43xx WiFi (b43, brcmfmac, default)
-  PACKAGES:=kmod-b43 kmod-brcmfmac
+  PACKAGES:=kmod-b43 kmod-brcmfmac wpad-mini
 endef
 
 define Profile/Generic/Description
@@ -16,4 +16,3 @@ define Profile/Generic/Description
 endef
 
 $(eval $(call Profile,Generic))
-
diff --git a/target/linux/bcm53xx/profiles/ASUS.mk 
b/target/linux/bcm53xx/profiles/ASUS.mk
new file mode 100644
index 000..c513d0a
--- /dev/null
+++ b/target/linux/bcm53xx/profiles/ASUS.mk
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/asus-rt-ac56u
+  NAME:=ASUS RT-AC56U
+  PACKAGES:=kmod-b43 wpad-mini \
+   kmod-usb-ohci kmod-usb2 kmod-usb3
+endef
+define Profile/asus-rt-ac56u/Description
+  Package set optimized for ASUS RT-AC56U.
+endef
+$(eval $(call Profile,asus-rt-ac56u))
+
+define Profile/asus-rt-ac68u
+  NAME:=ASUS RT-AC68U
+  PACKAGES:=kmod-usb-ohci kmod-usb2 kmod-usb3
+endef
+define Profile/asus-rt-ac68u/Description
+  Package set optimized for ASUS RT-AC68U.
+endef
+$(eval $(call Profile,asus-rt-ac68u))
+
+define Profile/asus-rt-ac87u
+  NAME:=ASUS RT-AC87U
+  PACKAGES:=kmod-usb-ohci kmod-usb2 kmod-usb3
+endef
+define Profile/asus-rt-ac87u/Description
+  Package set optimized for ASUS RT-AC87U.
+endef
+$(eval $(call Profile,asus-rt-ac87u))
+
+define Profile/asus-rt-n18u
+  NAME:=ASUS RT-N18U
+  PACKAGES:=kmod-usb-ohci kmod-usb2 kmod-usb3
+endef
+define Profile/asus-rt-n18u/Description
+  Package set optimized for ASUS RT-N18U.
+endef
+$(eval $(call Profile,asus-rt-n18u))
diff --git a/target/linux/bcm53xx/profiles/Buffalo.mk 
b/target/linux/bcm53xx/profiles/Buffalo.mk
new fil

[OpenWrt-Devel] [PATCH 2/2] ramips: add support for 16MB VoCore

2015-09-23 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/ramips/dts/VOCORE-16M.dts |  41 ++
 target/linux/ramips/dts/VOCORE-8M.dts  |  41 ++
 target/linux/ramips/dts/VOCORE.dts | 231 -
 target/linux/ramips/dts/VOCORE.dtsi| 197 
 target/linux/ramips/image/Makefile |  12 +-
 5 files changed, 290 insertions(+), 232 deletions(-)
 create mode 100644 target/linux/ramips/dts/VOCORE-16M.dts
 create mode 100644 target/linux/ramips/dts/VOCORE-8M.dts
 delete mode 100644 target/linux/ramips/dts/VOCORE.dts
 create mode 100644 target/linux/ramips/dts/VOCORE.dtsi

diff --git a/target/linux/ramips/dts/VOCORE-16M.dts 
b/target/linux/ramips/dts/VOCORE-16M.dts
new file mode 100644
index 000..464c137
--- /dev/null
+++ b/target/linux/ramips/dts/VOCORE-16M.dts
@@ -0,0 +1,41 @@
+/dts-v1/;
+
+/include/ "VOCORE.dtsi"
+
+/ {
+   palmbus@1000 {
+   spi@b00 {
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "uboot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "uboot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xfb>;
+   };
+   };
+   };
+   };
+};
diff --git a/target/linux/ramips/dts/VOCORE-8M.dts 
b/target/linux/ramips/dts/VOCORE-8M.dts
new file mode 100644
index 000..8a081ed
--- /dev/null
+++ b/target/linux/ramips/dts/VOCORE-8M.dts
@@ -0,0 +1,41 @@
+/dts-v1/;
+
+/include/ "VOCORE.dtsi"
+
+/ {
+   palmbus@1000 {
+   spi@b00 {
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "s25fl064k";
+   reg = <0>;
+   linux,modalias = "m25p80", "s25fl064k";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "uboot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "uboot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0x7b>;
+   };
+   };
+   };
+   };
+};
diff --git a/target/linux/ramips/dts/VOCORE.dts 
b/target/linux/ramips/dts/VOCORE.dts
deleted file mode 100644
index 5e386e4..000
--- a/target/linux/ramips/dts/VOCORE.dts
+++ /dev/null
@@ -1,231 +0,0 @@
-/dts-v1/;
-
-/include/ "rt5350.dtsi"
-
-/ {
-   compatible = "VoCore", "ralink,rt5350-soc";
-   model = "VoCore";
-
-   palmbus@1000 {
-   gpio1: gpio@660 {
-   status = "okay";
-   };
-
-   i2c@900 {
-   status = "okay";
- 

[OpenWrt-Devel] [PATCH 1/2] ramips: fix size-cells for spi nodes

2015-09-23 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/ramips/dts/mt7620a.dtsi  | 2 +-
 target/linux/ramips/dts/mt7620n.dtsi  | 2 +-
 target/linux/ramips/dts/mt7621.dtsi   | 2 +-
 target/linux/ramips/dts/mt7628an.dtsi | 2 +-
 target/linux/ramips/dts/rt3352.dtsi   | 2 +-
 target/linux/ramips/dts/rt5350.dtsi   | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a.dtsi 
b/target/linux/ramips/dts/mt7620a.dtsi
index 80e8977..026e745 100644
--- a/target/linux/ramips/dts/mt7620a.dtsi
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -210,7 +210,7 @@
reset-names = "spi";
 
#address-cells = <1>;
-   #size-cells = <1>;
+   #size-cells = <0>;
 
status = "disabled";
 
diff --git a/target/linux/ramips/dts/mt7620n.dtsi 
b/target/linux/ramips/dts/mt7620n.dtsi
index e886c6f..b1586ec 100644
--- a/target/linux/ramips/dts/mt7620n.dtsi
+++ b/target/linux/ramips/dts/mt7620n.dtsi
@@ -162,7 +162,7 @@
reset-names = "spi";
 
#address-cells = <1>;
-   #size-cells = <1>;
+   #size-cells = <0>;
 
status = "disabled";
 
diff --git a/target/linux/ramips/dts/mt7621.dtsi 
b/target/linux/ramips/dts/mt7621.dtsi
index bc79d39..fd2e100 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -94,7 +94,7 @@
reset-names = "spi";
 
#address-cells = <1>;
-   #size-cells = <1>;
+   #size-cells = <0>;
 
pinctrl-names = "default";
pinctrl-0 = <_pins>;
diff --git a/target/linux/ramips/dts/mt7628an.dtsi 
b/target/linux/ramips/dts/mt7628an.dtsi
index 02f9df3..2eb96e7 100644
--- a/target/linux/ramips/dts/mt7628an.dtsi
+++ b/target/linux/ramips/dts/mt7628an.dtsi
@@ -110,7 +110,7 @@
reset-names = "spi";
 
#address-cells = <1>;
-   #size-cells = <1>;
+   #size-cells = <0>;
 
pinctrl-names = "default";
pinctrl-0 = <_pins>;
diff --git a/target/linux/ramips/dts/rt3352.dtsi 
b/target/linux/ramips/dts/rt3352.dtsi
index 009277f..b04845c 100644
--- a/target/linux/ramips/dts/rt3352.dtsi
+++ b/target/linux/ramips/dts/rt3352.dtsi
@@ -144,7 +144,7 @@
compatible = "ralink,rt3352-spi", "ralink,rt2880-spi";
reg = <0xb00 0x100>;
#address-cells = <1>;
-   #size-cells = <1>;
+   #size-cells = <0>;
 
resets = < 18>;
reset-names = "spi";
diff --git a/target/linux/ramips/dts/rt5350.dtsi 
b/target/linux/ramips/dts/rt5350.dtsi
index 5282e5b..8dd06c8 100644
--- a/target/linux/ramips/dts/rt5350.dtsi
+++ b/target/linux/ramips/dts/rt5350.dtsi
@@ -158,7 +158,7 @@
reset-names = "spi";
 
#address-cells = <1>;
-   #size-cells = <1>;
+   #size-cells = <0>;
 
pinctrl-names = "default";
pinctrl-0 = <_pins _cs1>;
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] CC: lantiq: several ARV7519RW22 fixes

2015-09-20 Thread Álvaro Fernández Rojas
Fixes ARV7519RW22 flash register (only 1 flash).
Power LED is green, not red.
Rename message LEDs to internet.
Add LEDs configuration (lan, wan, power).
Enable switch VLANs.
Fix secondary USB.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
Signed-off-by: José Vázquez Fernández <ppvazquez...@gmail.com>
---
 v3: also fix secondary USB
 v2: also fix LEDs and VLANs

 .../lantiq/base-files/etc/uci-defaults/01_leds |  5 +
 .../lantiq/base-files/etc/uci-defaults/02_network  |  3 +++
 target/linux/lantiq/dts/ARV7519RW22.dts| 22 +-
 3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds 
b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 7ef88ea..b9e5420 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -51,6 +51,11 @@ P2812HNUF*)
ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
;;
+ARV7519RW22)
+   ucidef_set_led_default "power" "power" "power" "1"
+   ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
+   ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
+   ;;
 *)
;;
 esac
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index ff21e02..f2cc37d 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -162,6 +162,9 @@ TDW8970)
 ARV7519RW22)
lan_mac=$(mtd_get_mac_binary boardconfig 22)
wan_mac=$(macaddr_add "$lan_mac" 1)
+   ucidef_set_interface_lan "eth0.1"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 2 3 4 5 6t"
;;
 
 BTHOMEHUBV2B|BTHOMEHUBV3A)
diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts 
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 6823753..d925f86 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -18,7 +18,7 @@
nor-boot@0 {
compatible = "lantiq,nor";
bank-width = <2>;
-   reg = <0 0x0 0x200>, <1 0x200 
0x200>;
+   reg = <0 0x0 0x200>;
#address-cells = <1>;
#size-cells = <1>;
 
@@ -151,7 +151,11 @@
ifxhcd@E101000 {
status = "okay";
gpios = < 32 0>;
-   lantiq,portmask = <0x3>;
+   };
+
+   ifxhcd@E106000 {
+   status = "okay";
+   gpios = < 32 0>;
};
 
pcie@d90 {
@@ -202,11 +206,11 @@
label = "lan";
gpios = < 2 1>;
};
-   message_red {
-   label = "message_red";
+   internet_red {
+   label = "internet_red";
gpios = < 10 1>;
};
-   power_red {
+   power_green {
label = "power";
gpios = < 14 1>;
default-state = "on";
@@ -215,12 +219,12 @@
label = "alarm";
gpios = < 15 1>;
};
-   message_orange {
-   label = "message_orange";
+   internet_orange {
+   label = "internet_orange";
gpios = < 19 1>;
};
-   message_green {
-   label = "message_green";
+   internet_green {
+   label = "internet_green";
gpios = < 28 1>;
};
voice_green {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] lantiq: several ARV7519RW22 fixes

2015-09-20 Thread Álvaro Fernández Rojas
Fixes ARV7519RW22 flash register (only 1 flash).
Power LED is green, not red.
Rename message LEDs to internet.
Add LEDs configuration (lan, wan, power).
Enable switch VLANs.
Fix secondary USB.

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
Signed-off-by: José Vázquez Fernández <ppvazquez...@gmail.com>
---
 v3: also fix secondary USB
 v2: also fix LEDs and VLANs

 .../lantiq/base-files/etc/uci-defaults/01_leds |  5 +
 .../lantiq/base-files/etc/uci-defaults/02_network  |  3 +++
 target/linux/lantiq/dts/ARV7519RW22.dts| 22 +-
 3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds 
b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 7ef88ea..b9e5420 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -51,6 +51,11 @@ P2812HNUF*)
ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
;;
+ARV7519RW22)
+   ucidef_set_led_default "power" "power" "power" "1"
+   ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
+   ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
+   ;;
 ARV8539PW22)
 ucidef_set_led_default "power" "power" "soc:green:power" "1"
 ucidef_set_led_default "power2" "power2" "soc:red:power" "0"
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index ff21e02..f2cc37d 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -162,6 +162,9 @@ TDW8970)
 ARV7519RW22)
lan_mac=$(mtd_get_mac_binary boardconfig 22)
wan_mac=$(macaddr_add "$lan_mac" 1)
+   ucidef_set_interface_lan "eth0.1"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 2 3 4 5 6t"
;;
 
 BTHOMEHUBV2B|BTHOMEHUBV3A)
diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts 
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 6823753..d925f86 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -18,7 +18,7 @@
nor-boot@0 {
compatible = "lantiq,nor";
bank-width = <2>;
-   reg = <0 0x0 0x200>, <1 0x200 
0x200>;
+   reg = <0 0x0 0x200>;
#address-cells = <1>;
#size-cells = <1>;
 
@@ -151,7 +151,11 @@
ifxhcd@E101000 {
status = "okay";
gpios = < 32 0>;
-   lantiq,portmask = <0x3>;
+   };
+
+   ifxhcd@E106000 {
+   status = "okay";
+   gpios = < 32 0>;
};
 
pcie@d90 {
@@ -202,11 +206,11 @@
label = "lan";
gpios = < 2 1>;
};
-   message_red {
-   label = "message_red";
+   internet_red {
+   label = "internet_red";
gpios = < 10 1>;
};
-   power_red {
+   power_green {
label = "power";
gpios = < 14 1>;
default-state = "on";
@@ -215,12 +219,12 @@
label = "alarm";
gpios = < 15 1>;
};
-   message_orange {
-   label = "message_orange";
+   internet_orange {
+   label = "internet_orange";
gpios = < 19 1>;
};
-   message_green {
-   label = "message_green";
+   internet_green {
+   label = "internet_green";
gpios = < 28 1>;
};
voice_green {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] lantiq: ARV7519RW22 fixes - fix flash register (only 1 flash) - power led is green - rename message leds to internet - add leds configuration - enable switch vlans

2015-09-19 Thread Álvaro Fernández Rojas
Yeah, sorry but somehow the commit subject and content got merged in the 
subject.

Should I resend it fixed?

El 19/09/2015 a las 12:26, Rafał Miłecki escribió:

On 18 September 2015 at 21:21, Álvaro Fernández Rojas <nolt...@gmail.com> wrote:

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
Signed-off-by: José Vázquez Fernández <ppvazquez...@gmail.com>

Please work on some saner commit messages ;) If a commit needs more
explanation, put it  above Signed-off-by lines.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] lantiq: ARV7519RW22 fixes - fix flash register (only 1 flash) - power led is green - rename message leds to internet - add leds configuration - enable switch vlans

2015-09-18 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
Signed-off-by: José Vázquez Fernández <ppvazquez...@gmail.com>
---
 target/linux/lantiq/base-files/etc/uci-defaults/01_leds  |  5 +
 .../linux/lantiq/base-files/etc/uci-defaults/02_network  |  3 +++
 target/linux/lantiq/dts/ARV7519RW22.dts  | 16 
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds 
b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 8041ac9..6956d61 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -51,6 +51,11 @@ P2812HNUF*)
ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
;;
+ARV7519RW22)
+   ucidef_set_led_default "power" "power" "power" "1"
+   ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
+   ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
+   ;;
 *)
;;
 esac
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index afb8714..721098e 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -162,6 +162,9 @@ TDW8970)
 ARV7519RW22)
lan_mac=$(mtd_get_mac_binary boardconfig 22)
wan_mac=$(macaddr_add "$lan_mac" 1)
+   ucidef_set_interface_lan "eth0.1"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 2 3 4 5 6t"
;;
 
 BTHOMEHUBV2B|BTHOMEHUBV3A)
diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts 
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 6823753..73d5487 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -18,7 +18,7 @@
nor-boot@0 {
compatible = "lantiq,nor";
bank-width = <2>;
-   reg = <0 0x0 0x200>, <1 0x200 
0x200>;
+   reg = <0 0x0 0x200>;
#address-cells = <1>;
#size-cells = <1>;
 
@@ -202,11 +202,11 @@
label = "lan";
gpios = < 2 1>;
};
-   message_red {
-   label = "message_red";
+   internet_red {
+   label = "internet_red";
gpios = < 10 1>;
};
-   power_red {
+   power_green {
label = "power";
gpios = < 14 1>;
default-state = "on";
@@ -215,12 +215,12 @@
label = "alarm";
gpios = < 15 1>;
};
-   message_orange {
-   label = "message_orange";
+   internet_orange {
+   label = "internet_orange";
gpios = < 19 1>;
};
-   message_green {
-   label = "message_green";
+   internet_green {
+   label = "internet_green";
gpios = < 28 1>;
};
voice_green {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] lantiq: ARV7519RW22 fixes - fix flash register (only 1 flash) - power led is green - rename message leds to internet - add leds configuration - enable switch vlans

2015-09-18 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
Signed-off-by: José Vázquez Fernández <ppvazquez...@gmail.com>
---
 target/linux/lantiq/base-files/etc/uci-defaults/01_leds  |  5 +
 .../linux/lantiq/base-files/etc/uci-defaults/02_network  |  3 +++
 target/linux/lantiq/dts/ARV7519RW22.dts  | 16 
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds 
b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 7ef88ea..b9e5420 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -51,6 +51,11 @@ P2812HNUF*)
ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
;;
+ARV7519RW22)
+   ucidef_set_led_default "power" "power" "power" "1"
+   ucidef_set_led_netdev "internet_green" "internet_green" 
"internet_green" "pppoe-wan"
+   ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
+   ;;
 ARV8539PW22)
 ucidef_set_led_default "power" "power" "soc:green:power" "1"
 ucidef_set_led_default "power2" "power2" "soc:red:power" "0"
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index ff21e02..f2cc37d 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -162,6 +162,9 @@ TDW8970)
 ARV7519RW22)
lan_mac=$(mtd_get_mac_binary boardconfig 22)
wan_mac=$(macaddr_add "$lan_mac" 1)
+   ucidef_set_interface_lan "eth0.1"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 2 3 4 5 6t"
;;
 
 BTHOMEHUBV2B|BTHOMEHUBV3A)
diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts 
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 6823753..73d5487 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -18,7 +18,7 @@
nor-boot@0 {
compatible = "lantiq,nor";
bank-width = <2>;
-   reg = <0 0x0 0x200>, <1 0x200 
0x200>;
+   reg = <0 0x0 0x200>;
#address-cells = <1>;
#size-cells = <1>;
 
@@ -202,11 +202,11 @@
label = "lan";
gpios = < 2 1>;
};
-   message_red {
-   label = "message_red";
+   internet_red {
+   label = "internet_red";
gpios = < 10 1>;
};
-   power_red {
+   power_green {
label = "power";
gpios = < 14 1>;
default-state = "on";
@@ -215,12 +215,12 @@
label = "alarm";
gpios = < 15 1>;
};
-   message_orange {
-   label = "message_orange";
+   internet_orange {
+   label = "internet_orange";
gpios = < 19 1>;
};
-   message_green {
-   label = "message_green";
+   internet_green {
+   label = "internet_green";
gpios = < 28 1>;
};
voice_green {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWRT 15.05:bcm2708 device tree

2015-09-17 Thread Álvaro Fernández Rojas

Hi Jernej,

Device tree is not supported on CC-15.05 release, but it is supported in 
trunk.


Regards,
Álvaro.

El 17/09/2015 a las 11:40, Jernej Izak escribió:


Hi,

I’m trying to activate device tree on OpenWRT 15.05 released version 
with bcm2708 platform (raspberry pi).


I activated it in kernel_menuconfig, but after building there is no 
dtb file on boot partition of sd card.


Is there any patch to fix the issue, or device tree is really not jet 
supported?


Best Regards

Jernej Izak



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] brcm63xx: use bcm6328 and bcm6358 LED drivers

2015-09-05 Thread Álvaro Fernández Rojas
Use hardware controller instead of spi-gpio to control de 74hc serial LEDs

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/dts/bcm6318.dtsi   |  10 ++
 target/linux/brcm63xx/dts/bcm63268.dtsi  |  10 ++
 target/linux/brcm63xx/dts/bcm6328.dtsi   |  10 ++
 target/linux/brcm63xx/dts/bcm6358.dtsi   |  10 ++
 target/linux/brcm63xx/dts/bcm6362.dtsi   |  10 ++
 target/linux/brcm63xx/dts/bcm6368.dtsi   |  10 ++
 target/linux/brcm63xx/dts/ct-6373.dts|  61 +---
 target/linux/brcm63xx/dts/homehub2a.dts  | 162 +++
 target/linux/brcm63xx/dts/nb4-fxc-r1.dts |  61 +---
 target/linux/brcm63xx/dts/nb4-ser-r0.dts |  61 +---
 10 files changed, 213 insertions(+), 192 deletions(-)

diff --git a/target/linux/brcm63xx/dts/bcm6318.dtsi 
b/target/linux/brcm63xx/dts/bcm6318.dtsi
index f851a9c..4b70d53 100644
--- a/target/linux/brcm63xx/dts/bcm6318.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6318.dtsi
@@ -6,6 +6,7 @@
aliases {
gpio0 = 
gpio1 = 
+   leds0 = 
};
 
cpus {
@@ -74,5 +75,14 @@
gpio-controller;
#gpio-cells = <2>;
};
+
+   leds0: led-controller@1200 {
+   compatible = "brcm,bcm6328-leds";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x1200 0x24>;
+
+   status = "disabled";
+   };
};
 };
diff --git a/target/linux/brcm63xx/dts/bcm63268.dtsi 
b/target/linux/brcm63xx/dts/bcm63268.dtsi
index 0a1f8b1..a0e3472 100644
--- a/target/linux/brcm63xx/dts/bcm63268.dtsi
+++ b/target/linux/brcm63xx/dts/bcm63268.dtsi
@@ -6,6 +6,7 @@
aliases {
gpio0 = 
gpio1 = 
+   leds0 = 
};
 
cpus {
@@ -81,5 +82,14 @@
gpio-controller;
#gpio-cells = <2>;
};
+
+   leds0: led-controller@10001900 {
+   compatible = "brcm,bcm6328-leds";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x10001900 0x24>;
+
+   status = "disabled";
+   };
};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6328.dtsi 
b/target/linux/brcm63xx/dts/bcm6328.dtsi
index a0b1316..d570e06 100644
--- a/target/linux/brcm63xx/dts/bcm6328.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6328.dtsi
@@ -5,6 +5,7 @@
 
aliases {
gpio0 = 
+   leds0 = 
};
 
cpus {
@@ -63,5 +64,14 @@
gpio-controller;
#gpio-cells = <2>;
};
+
+   leds0: led-controller@1800 {
+   compatible = "brcm,bcm6328-leds";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x1800 0x24>;
+
+   status = "disabled";
+   };
};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6358.dtsi 
b/target/linux/brcm63xx/dts/bcm6358.dtsi
index bc3784a..fee3285 100644
--- a/target/linux/brcm63xx/dts/bcm6358.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6358.dtsi
@@ -7,6 +7,7 @@
pflash = 
gpio0 = 
gpio1 = 
+   leds0 = 
};
 
cpus {
@@ -103,5 +104,14 @@
gpio-controller;
#gpio-cells = <2>;
};
+
+   leds0: led-controller@fffe00d0 {
+   compatible = "brcm,bcm6358-leds";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0xfffe00d0 0x8>;
+
+   status = "disabled";
+   };
};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6362.dtsi 
b/target/linux/brcm63xx/dts/bcm6362.dtsi
index 6604f5c..d58ae58 100644
--- a/target/linux/brcm63xx/dts/bcm6362.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6362.dtsi
@@ -6,6 +6,7 @@
aliases {
gpio0 = 
gpio1 = 
+   leds0 = 
};
 
cpus {
@@ -81,5 +82,14 @@
gpio-controller;
#gpio-cells = <2>;
};
+
+   leds0: led-controller@10001904 {
+   compatible = "brcm,bcm6328-leds";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x10001900 0x24>;
+
+   status = "disabled";
+   };
};
 };

[OpenWrt-Devel] [PATCH 1/3] brcm63xx: add upstream LED drivers

2015-09-05 Thread Álvaro Fernández Rojas
This backports upstream LED drivers (BCM6328 and BCM6358).

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 target/linux/brcm63xx/config-3.18  |   2 +
 target/linux/brcm63xx/config-4.1   |   2 +
 .../040-leds-add-BCM6328-LED-driver.patch  | 464 +
 .../041-leds-add-BCM6358-LED-driver.patch  | 293 +
 ...8-add-more-configuration-options-and-fix-.patch | 106 +
 .../020-leds-add-BCM6328-LED-driver.patch  | 464 +
 .../021-leds-add-BCM6358-LED-driver.patch  | 293 +
 ...8-add-more-configuration-options-and-fix-.patch | 106 +
 8 files changed, 1730 insertions(+)
 create mode 100644 
target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
 create mode 100644 
target/linux/brcm63xx/patches-3.18/041-leds-add-BCM6358-LED-driver.patch
 create mode 100644 
target/linux/brcm63xx/patches-3.18/042-leds-bcm6328-add-more-configuration-options-and-fix-.patch
 create mode 100644 
target/linux/brcm63xx/patches-4.1/020-leds-add-BCM6328-LED-driver.patch
 create mode 100644 
target/linux/brcm63xx/patches-4.1/021-leds-add-BCM6358-LED-driver.patch
 create mode 100644 
target/linux/brcm63xx/patches-4.1/022-leds-bcm6328-add-more-configuration-options-and-fix-.patch

diff --git a/target/linux/brcm63xx/config-3.18 
b/target/linux/brcm63xx/config-3.18
index b72080b..5a9029e 100644
--- a/target/linux/brcm63xx/config-3.18
+++ b/target/linux/brcm63xx/config-3.18
@@ -132,6 +132,8 @@ CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_KEXEC=y
+CONFIG_LEDS_BCM6328=y
+CONFIG_LEDS_BCM6358=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LIBFDT=y
 CONFIG_MDIO_BOARDINFO=y
diff --git a/target/linux/brcm63xx/config-4.1 b/target/linux/brcm63xx/config-4.1
index d61b6e6..8da087c 100644
--- a/target/linux/brcm63xx/config-4.1
+++ b/target/linux/brcm63xx/config-4.1
@@ -137,6 +137,8 @@ CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_KEXEC=y
+CONFIG_LEDS_BCM6328=y
+CONFIG_LEDS_BCM6358=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LIBFDT=y
 # CONFIG_LZ4_COMPRESS is not set
diff --git 
a/target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch 
b/target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
new file mode 100644
index 000..fc3d03a
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
@@ -0,0 +1,464 @@
+From fd7b025a238d0a5440bfa26c585eb78097bf48dc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <nolt...@gmail.com>
+Date: Tue, 28 Apr 2015 09:50:50 -0700
+Subject: [PATCH] leds: add BCM6328 LED driver
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This adds support for the LED controller on Broadcom's BCM6328.
+
+Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
+Signed-off-by: Jonas Gorski <j...@openwrt.org>
+Acked-by: Jacek Anaszewski <j.anaszew...@samsung.com>
+Signed-off-by: Bryan Wu <coolo...@gmail.com>
+---
+ drivers/leds/Kconfig|   8 +
+ drivers/leds/Makefile   |   1 +
+ drivers/leds/leds-bcm6328.c | 413 
+ 3 files changed, 422 insertions(+)
+ create mode 100644 drivers/leds/leds-bcm6328.c
+
+--- a/drivers/leds/Kconfig
 b/drivers/leds/Kconfig
+@@ -42,6 +42,14 @@ config LEDS_88PM860X
+ This option enables support for on-chip LED drivers found on Marvell
+ Semiconductor 88PM8606 PMIC.
+ 
++config LEDS_BCM6328
++  tristate "LED Support for Broadcom BCM6328"
++  depends on LEDS_CLASS
++  depends on OF
++  help
++This option enables support for LEDs connected to the BCM6328
++LED HW controller accessed via MMIO registers.
++
+ config LEDS_LM3530
+   tristate "LCD Backlight driver for LM3530"
+   depends on LEDS_CLASS
+--- a/drivers/leds/Makefile
 b/drivers/leds/Makefile
+@@ -7,6 +7,7 @@ obj-$(CONFIG_LEDS_TRIGGERS)+= led-trig
+ 
+ # LED Platform Drivers
+ obj-$(CONFIG_LEDS_88PM860X)   += leds-88pm860x.o
++obj-$(CONFIG_LEDS_BCM6328)+= leds-bcm6328.o
+ obj-$(CONFIG_LEDS_BD2802) += leds-bd2802.o
+ obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
+ obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o
+--- /dev/null
 b/drivers/leds/leds-bcm6328.c
+@@ -0,0 +1,413 @@
++/*
++ * Driver for BCM6328 memory-mapped LEDs, based on leds-syscon.c
++ *
++ * Copyright 2015 Álvaro Fernández Rojas <nolt...@gmail.com>
++ * Copyright 2015 Jonas Gorski <j...@openwrt.org>
++ *
++ * This program is free software; you can redistribute  it and/or modify it
++ * under  the terms of  the GNU General  Public License as published by the
++ * Free Software Foundation;  either version 2 of the  License, or (at your
++ * option) any later version.
++ */
++#include 
++#include 
++#includ

  1   2   3   4   5   >