-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
realtek: add rtd129x, rtd1319 and rtd1619b sub-targets #12538
base: main
Are you sure you want to change the base?
Conversation
RTL83xx/RTL93xx SoCs in realtek target are MIPS, but RTD129x/RTD13xx/RTD161x SoCs are ARM (aarch64). So IMO, they shoud be added with new target. |
Hi @musashino205 , Per discussed with @oliv3r in my previous pull request, #12520, he suggested using makefile to control different architecture. That is why I abandon the previous request and submit this new one. |
I think @oliv3r was just searching for answers. @phinexhung: are there any device driver patches in common between the existing MIPS-based realtek target and your new hardware? I'm guessing not -- that would be the most sensible reason to reuse the existing realtek target. I'd feel better about a single target if Realtek were reusing the stuff under target/linux/realtek/patches-5.15. You'll note that Mediatek owns all of the products under the ramips/ and mediatek/ targets -- it's accepted to have multiple major targets per vendor, esp. if they are different arches, even in the cases where the SoCs perform the same role. My understanding is that the community wants to see you begin to upstream the patches you have to mainline Linux, as OpenWrters have been doing with the realtek target as-is. |
How so? If tthe build system can handle it (which it looks like it can) there's no reason to have realtek-mips and realtek-arm. those are just cpu choices. What if realtek releases an RTL94xx which is an ARM based switch? |
I was, but oth, I think it does make sense to have it all under one umbrella. Even if the makefile magic gets a bit odd.
Hopefully, we'll have no drivers in openwrt and everything upstreamed. If we take that as our starting point, then having it all under realtek still makes sense imo.
Well the chip-info stuff hopefully can be shared. The switches themselves have very few IP peripherials generally speaking. a reall y big one for the switching stuff of course. I wonder what ethernet driver the RTD stuff is using. Is it a realtek ethernet, or some designware/off-the-shelf ethernet component?
I saw that too, and was a bit confused :p buyout/legacy being part of it? Who's the actual maintainer of that stuff?
Some openwrt-ers have; and that's of course the ideal situation, especially when a vendor is involved, as they have the capacity to most defiantly do so. For the switching stuff, I'd be a bit more hesitant, as it is reverse engineered, undocumented stuff that's being upstreamed, often with unintended consequences. Personally, I'm even as to see if we can drop the rtl9xxx stuff from mainline, until it matures a bit more and re-submitting it once confidence is a bit higher.... but that's just me thinking out-loud :) |
Agree with this point of view, if everything is upstreamed, that make sense to put these in the same umbrella. This is also our target as well although it really takes time.
Ethernet share the same IP with rtl8168. The only difference is that the former is based on PCIe, while in RTD1xxx, it is based on SoC Bus.
For RTD1xxx target, we can said that it would be officially supported. During these days, we normally use openwrt as our standard SDK for NAS customers. We are glad to see if we can get these upstreamed in the near future. |
Sadly, RTL is not doing this themselves, so we are doing it with a lot of reverse engineering. If you have access to people or documents, that could be super valueable :) anyway, I've created #12541 to reduce scope even more of this MR.
Ok, that's good to know. If you could find out what IP the rtl83xx uses, it's only curious for naming and sharing a driver. Right now, we have no idea :(
That's very exciting. Maybe you can even convince the RTL guys at some point to do the same, so that it'll be a RTK default practise :) but baby steps :p |
At least we do, we have been working with kernel maintainer to get part of our source upstreamed.
BTW, there are two different IPs internally. One is 816x, which has been upstreamed and that is what we have been using in RTD1xxx SoC. You can find it under drivers/net/ethernet/realtek/ folder. The other is multi-port switch which might be the current rtl83xx, rtl93xx sub targets in openwrt. I don't think we can use the same driver for these two different ethernet ports since they belonged to different department within realtek.
Convincing others to go upstream is really a big challenge. Normally business will driver this and make this easier. |
Hi @oliv3r I will force push for the changes based on the result of your new MR #12541. Checking the build log, I found there are some kernel configs from rtl93xx and should be set to n in our rtd1xxx subtarget. But I cannot duplicate this kind of error locally by issuing "make target/compile" or "make V=s" with subtarget set to rtd129x. How could I reproduce the error reported by CI ? BTW, if these kernel configs are only for switch SoCs, should we bind these kernel configs to specific SoC types using dependency rule in Kconfig ?
|
We have individual kconfig's for each target atm, so you should be able to disable them. That RTL9300 driver will go away hopefully soon (I have a replacement) and we'll need some kconfig magic to make all of this work out nicely. (e.g. I think the CI is failing because it's (for some reason) enabling the rt9300 driver. |
That's sound great and can solve this issue.
Does this mean that I can just ignore the error currently? |
cortex-a55 is a successor to cortex-a53 but with different optimization. Enable compiler specific flag to enable a55 optimization.
Move architecture related options into target.mk within subtarget folder. These subtargets have been used in several NAS products, either using SPI or eMMC as booting media. Signed-off-by: Phinex Hung <phinex@realtek.com>
Support rtd129x, rtd1319 and rtd1619b irq mux driver Signed-off-by: James Tai <james.tai@realtek.com> Signed-off-by: Phinex Hung <phinex@realtek.com>
Update rtd129x.dtsi, rtd1295.dtsi and rtd1296.dtsi as well. The upstream ones are out of date, update these to enable SMP. Add dts files for the following two boards: 1.rtd1295 giraffe eMMC 2GB board 2.rtd1296 saola eMMC 2GB board Signed-off-by: Phinex Hung <phinex@realtek.com>
Also add rtd1319 SoC common dtsi file, which is rtd13xx.dtsi. Signed-off-by: Phinex Hung <phinex@realtek.com>
Add rtd1619b SoC common dtsi file, which contains basic settings. Signed-off-by: Phinex Hung <phinex@realtek.com>
support rtd129x, rtd1319 and rtd1619b with console boot Signed-off-by: Phinex Hung <phinex@realtek.com>
FEATURES:=ramdisk squashfs | ||
SUBTARGETS:=rtl838x rtl839x rtl930x rtl931x | ||
SUBTARGETS:=rtl838x rtl839x rtl930x rtl931x rtd129x rtd1319 rtd1619b |
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.
lets keep them sorted; lets put the rtd entries first
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.
Sure. That is good and I will modify this later once your MR is merged.
|
||
KERNEL_PATCHVER:=5.15 | ||
|
||
define Target/Description | ||
Build firmware images for Realtek RTL83xx based boards. | ||
Build firmware images for Realtek Router/NAS boards. |
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.
👍
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.
Maybe your name is more generic, since we might cover router, switch and NAS ?
@@ -0,0 +1,34 @@ | |||
/* | |||
* Copyright (c) 2017-2019 Andreas Färber |
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.
Isn't this dts already upstream? I don't think you need to explicitly re-add it here, but I'm not that deep into the openwrt buildsystem.
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.
No, this is for our standard evaluation board. Andrea only commit some COST boards manufactured by our customers, such as: rtd1295-mele-v9.dts, rtd1295-probox2-ava.dts and rtd1295-zidoo-x9s.dts. These files has been upstreamed since kernel 5.8. I just copy the template from these files, so that I keep the author name in this file. The similar condition exists for rtd1296 as well.
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.
Yeah, not sure if copyright works that way, if you wrote it from scratch, its your copyright. If you copied it from andreas, I think you still need your copyright, and then add something like 'based on XXX'. But this is all legalese :p
You should be able to disable the driver via Kconfig magic, which will remove the error yeah. If you enable it to test/try out things, yeah you can ignore those errors. |
Add Realtek DHC SoC sub-targets which are rtd129x, rtd1319 and rtd1619b.
These three sub-targets have been used in some NAS products.
Add basic IRQ mux driver so that we can rely on upstream DesignWare serial driver for console output.