New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lantiq: xrx200: Add support for AVM Fritzbox 3390 #3656
Lantiq: xrx200: Add support for AVM Fritzbox 3390 #3656
Conversation
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts
Outdated
Show resolved
Hide resolved
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts
Outdated
Show resolved
Hide resolved
@@ -47,6 +47,9 @@ lantiq_setup_interfaces() | |||
avm,fritz7430) | |||
ucidef_add_switch "switch0" \ | |||
"2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" | |||
avm,fritz3390) | |||
ucidef_add_switch "switch0" \ | |||
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:lan:5" "6t@eth0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is port number 5 connected to WiFi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, from what I understood it seems to be the connection to the second SOC (also know as WASP-interface)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove LAN5 entirely for now, as it causes more confusion than it serves - see my other comments.
Maybe squash some commits |
Okay, I have integrated your suggestions. Yogi |
You have to do this using Git (not GitHub). First rebase using: Then in your text editor you can use squash/fixup. Then: You have to use In case you want to keep the original commit set around as a precaution, create another branch first and then switch back to this one before you squash & push. |
1dea752
to
06b9bd7
Compare
Done :-) Thx to @jschwartzenberg |
This should be tidied up:
Apart from that, be aware that the last PR was closed due to lack of interest, so it's probably that this one will meet the same fate and your work might be in vain (apart from individuals using the PR as is) |
06b9bd7
to
8be7b69
Compare
I know, but what does this mean here. I did not include anything regarding Kernel 4.19
Is done, I think
Rebasing the work somebody else has done. Basically this is one step. |
8be7b69
to
34747e7
Compare
Why are you basing your work on my avm_fritz3390_wifi branch instead of the avm_fritz3390 branch? The _wifi branch has all the infrastructure in place to bring up WiFi, whereas the other branch only includes the stuff you are actually trying to get included. The problem here is that your commits first add a lot of stuff that you remove afterwards. So basically, your PR should come up with two commits:
See #2662 for reference, where exactly this is done. |
gpios = <&gpio 34 GPIO_ACTIVE_HIGH>; | ||
}; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This export is only required if you bring up the secondary WiFi SoC. Personally, I would remove it for now - please wait for other reviewer's comments before doing so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, we should decide about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I woud prefer to remove this node.
speed = <1000>; | ||
full-duplex; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This node is only required for the WiFI SoC. On 4.19, this had no effect without a further patch because the xrx200 driver did not support fixed-link nodes. I don't know about 5.4 so please verify that.
@@ -47,6 +47,9 @@ lantiq_setup_interfaces() | |||
avm,fritz7430) | |||
ucidef_add_switch "switch0" \ | |||
"2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" | |||
avm,fritz3390) | |||
ucidef_add_switch "switch0" \ | |||
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:lan:5" "6t@eth0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove LAN5 entirely for now, as it causes more confusion than it serves - see my other comments.
Hi Andy, thx for your reply. Yogi |
No worries, it just would have saved you a lot of work.
No, just squash it properly - same effect. |
34747e7
to
591b54b
Compare
Okay, I squashed it more. Now it looks like the Wifi-Stuff was never in here. |
target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts ? |
As both andyboeh and me stated: This needs only two commits: one for the gpio-ranges, and one for device support. Keeping somebody elses work does not mean you cannot change it anymore, you just need to document what you changed in the commit message ... |
lantiq: VR9: fix gpio-hog by defining the GPIO ranges |
fe4a0fb
to
a9c6359
Compare
added more text ;-) |
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts
Outdated
Show resolved
Hide resolved
It would be good to explain in the commit description that this change is needed by gpio-hog on Fritzbox 3390. |
a9c6359
to
8ed293b
Compare
done |
The FRITZ!Box 3390 actually contains two SoCs, one Lantiq with a 5GHz WiFi and one AR9342 with a 2.4GHz WiFi. Only the Lantiq has access to the flash memory, the Atheros runs fully from RAM. Specifications -------------- - Lantiq 500 MHz - 128MiB RAM - 128MiB NAND - 256k Flash - AR9580 5GHz WiFi - AR9342 560 MHz - 64MiB RAM - AR9328 2.4GHz WiFi Remarks ------- This commit only adds support for the Lantiq side of things and prepares the drivers for communication with the Atheros SoC. Thus, only 5GHz WiFi works by default, the 2.4GHz WiFi will be added via another target. Some kernel patches will be required to add support for the Atheros SoC. Installation ------------ Use the eva_ramboot.py script to boot the initramfs image. Then, transfer the sysupgrade image to the device and run sysupgrade to flash it to the NAND. Signed-off-by: Andreas Böhler <dev@aboehler.at> ----------------------------------------------------------- Rebased support for AVM Fritzbox 3390 Tested as DSL-Router with 5 GHz Wifi. 2.4GHz Wifi is not functiional. 2.4Ghz is implemented in HW via 2nd SOC, which is booted via internal Ethernet, called WASP-Interface, which is not covered by this Commits Changed wpad-basic-wolfssl as default add "pinctrl-0" nand settings. Now it is similar to Fritzbox 3370 with Micron-NAND, which has similar architecture and Nand remove gpio-setting for WASP-reset removed unused nand-device changed ethernet mode to rgmii Corrected NAND Bank width according to specs Signed-off-by: Joachim Cerny <cocktail_yogi@web.de>
defined gpio-ranges according to Reference: https://github.com/torvalds/linux/blob/master/drivers/pinctrl/pinctrl-xway.c#L864 This change is needed by gpio-hog on Fritzbox 3390 thx to @abajk Signed-off-by: Joachim Cerny <cocktail_yogi@web.de>
8ed293b
to
1345a03
Compare
Acked-by: Aleksander Jan Bajkowski A.Bajkowski@stud.elka.pw.edu.pl |
Okay, whats next? I have done all requested changes. Now its time to finish things. |
At least one more code review is necessary, but to obtain the best quality it never hurts to have even more people look at the changes. Maybe you could ask in #openwrt on Freenode, ask through the mailing list or the forum? Hopefully a second reviewer can at least join in! |
@adschm Yogi |
Why cannot you do the codereview? |
I'm not an OpenWRT developer. I just hope to see this merged because Fritzboxes are also commonly used where I live. People that are part of the OpenWRT GitHub organization need to review & approve I think. |
Merry Christmas, you are a helpful guy and have good knowledge. they should promote you into developer status. In our area people are using plenty of AVM-devices. Lets hack them :-) |
Merry Christmas to you too and/or Merry Grav-Mass ;)
Haha not really. I know Git and while I am a software developer, C is not a language I know well and I know little about OpenWRT as well. Even if they would promote me so that I could approve a PR like this, I would never do it. We need to be patient here. OpenWRT and also the Linux kernel could only be where they are now because people took care to make sure changes going in were of high quality. Code reviews are an important part of software development. At work I am known for stating that while a feature might already implemented and in the code review phase, that could still mean it is far from done as during the code review it might turn out to be necessary to rewrite the entire implementation of it. Do not be discouraged! Having one approval for this is already a major milestone. It is not unlikely you will be asked to change some things before there will be a second approval. This can be a long process, but it is only so much for the better once your changes end up in OpenWRT. As all changes go through these processes, it ensures that once this router model is supported it will continue to work in the future as others bring in their changes. Having well-understood code also helps new developers to step in and contribute. With typical proprietary firmware, the vendors have access to all hardware to be supported so they can actually test each and every release they put out on all their models. OpenWRT does not have this, so code quality is much more important. So get this further going, I would recommend asking around in the OpenWRT community as I suggested. Being acquainted there will also create trust. Even when changes are merged in, it is possible some after-care is needed too. Showing interest and being involved with the OpenWRT community also creates the necessary trust that you will be around when such after-care is needed. It is not possible to expect OpenWRT project members to reach out to contributors when facing issues. They rely on being able to understand issues themselves, but having original contributors in reach is ideal. Can they expect you to monitor their bug tracker from time to time and reply to Fritzbox 3390 issues for example? A second thing I recommend doing is contacting your ISP and/or AVM. Explain them the benefits you see in them supplying resources. If AVM as a vendor would at least provide minimal resources to OpenWRT development, it would already be great. I hope this helps! Good luck!! |
Hi, I have tested it three weeks ago. On my Box Fritzbox 3390 it is needed.
Without GPIO-Ranges, GPIO-numbers are getting messed up.
Am Do., 7. Jan. 2021 um 21:36 Uhr schrieb Aleksander Bajkowski <
notifications@github.com>:
… @cocktailyogi <https://github.com/cocktailyogi>
It looks like gpio-ranges is no more needed since kernel 5.0.
[1] ***@***.***
<abajk/linux@9b4924d>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3656 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABX5OZWPCIOLMB5JGWJS6V3SYYLONANCNFSM4UPGOUZA>
.
|
Thank you for the pull request, I applied it to master. |
Great to see progress on the AVM boxes!! Thanks a lot everybody! |
Great to have an image for this, I tried to install the snapshot and get this error using eva_ramboot.py
|
Works fine for me. If it is not working for you, flash a 3370 image (https://openwrt.org/toh/avm/fritz.box.wlan.3370?s[]=3370 ), use the micron version. After make a sysupgrade to 3390. |
also try to set first the ip to 192.168.178.5 and make a ping on boot, ttl should be 250. if not, you're not in bootloader and restart the fritzbox. |
Got it to run, forgot a switch between the box and my pc. Network was to late up. |
All the work has been done some time ago by Andreas Böhler alias @andyboeh and was already documented in this closed Pull-Request: #2662
I have rebased that changes to Kernel 5.x, tested it and are now filing this pull request, because andyboeh did not want to continue this PR. I added some HW-details here:
https://openwrt.org/inbox/toh/avm/avm_fritzbox_3390
Status:
avm_fritz3390 is working with 5 GHz WIFI and tested for a couple of weeks as DSL-Router
2.4GHz not supported
(2.4 Ghz is implemented by a second SOC via "WASP-Interface". andyboeh did basic work on it, but to me it seemed to complicated and I am not interested in 2.4 Ghz WIFI of this box.) For details see https://www.aboehler.at/doku/doku.php/projects:fritz3390