-
Notifications
You must be signed in to change notification settings - Fork 5k
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
BCM2711 - Upstream Linux 5.5 backport #3385
BCM2711 - Upstream Linux 5.5 backport #3385
Conversation
|
@popcornmix Thanks for testing. I can drop this patch, but this needs to be investigated further. @vianpl Any ideas? |
f2cb698
to
f50d2c1
Compare
I dropped the CMA fix and updated the initial comment. |
Here's my guess. By configuring CMA in the device tree the kernel stops reacting to the command line options. I bet the Kodi install is updating the CMA size trough the kernel command line, which is not being taken into account. The only way to do it after this patch is by using overlays. |
With cma not in cmdline.txt and without the cma patch:
With cma=512M in cmdline.txt and without the cma patch:
with cma not in cmdline.txt and the cma patch:
With cma=512M in cmdline.txt and the cma patch:
All these have the vc4-fkms-v3d overlay which attempts to increase CMA to 256M (@pelwell can confirm but I think the overlay ends up modifying the cmdline kernel sees). So should cma=<> on cmdline still work? Is there a way to make it do so? |
This is the behavior I observed upstream. I double checked the code, command line is explicitly ignored.
I think the overlay could be easily updated to work with the new CMA setup. We'd just need to update the size property in the CMA node instead of altering the command line.
Well I guess this is something we should discuss with people upstream. I'd say the command line should take precedence to the DTB. At least for it's size. But I guess we'd have to investigate further. There are not so many users of DTB defined CMAs, so we might be the first with such needs. |
I'd be happy with a DTB-only solution - patching the command line from an overlay always seemed a bit ugly. |
@pelwell I'm still on holidays until the 7th, but if you can wait until then I'll be happy to have a got at it. |
As long as there's an easy way for users to adjust it. The HEVC V4L2 driver for example wants a lot of CMA to play 10bit 4K video (256M is not enough), and we have examples of high CMA settings causing kernel allocation failures, so we can't just unconditionally set it high. A config.txt setting that causes firmware to adjust cma value in DTB should be okay if cmdline.txt solution isn't possible. |
I'd make it a dtparam. |
75bb710
to
53c77f0
Compare
I've been working on the following small series to address the CMA issue. See the first two patches here: https://github.com/vianpl/linux/commits/bcm283x-cma-unification. With the DT patch it'll be trivial to update all overlays that change CMA sizes. And if the cmdline/DT precendence patch doesn't make it we can always create an extra overlay to edit CMA sizes trough a dtparam. Will this overall approach be acceptable to you? |
I've commented on one of the patches, but to summarise: I'm happy with it, but I'd like a label on the |
f50d2c1
to
c2ccf70
Compare
Since i dropped the CMA patch, this could be a separate pull request. This pull request is rebased now. |
The patches (excluding CMA one) seemed fine in my limited testing, so no objections. |
commit 4b2d246 upstream. The fixed clocks doesn't form some kind of bus. So let's remove it. This fixes the follow DT schema warnings: clocks: clock@3:reg:0: [3] is too short clocks: clock@4:reg:0: [4] is too short clocks: $nodename:0: 'clocks' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' clocks: #size-cells:0:0: 0 is not one of [1, 2] clocks: 'ranges' is a required property clock@3: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' clock@4: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
During Raspberry Pi 4 upstream discussion Tim Gover confirmed that the system timer also exists on BCM2711. So move it back to bcm283x.dtsi and overwrite the interrupt definition in bcm2838.dtsi. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
According to Eric Anholt the pixelvalves doesn't exists on BCM2711. So move it to bcm2835-common.dtsi. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
We need to declare the proper device type, otherwise U-Boot won't boot with this devicetree. While we are this let the bootloader set the actual memory size. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
The CYW43455 on the Raspberry Pi 4 doesn't use an external pin as lower power clock anymore. So drop the GPIO clock from pinctrl. While we are at this add the missing declaration of hardware flow control. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
According to devicetree specification the node name should describe the general class of device like ethernet or interrupt-controller. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
The intc label isn't defined in bcm283x.dtsi, so we cannot use it there. So move it to bcm2835-common.dtsi. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
After moving bcm2835-system-timer to bcm283x.dtsi there is no need for the always-on for armv7-timer anymore. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
…iendly" This reverts commit 0f66932.
This reverts commit a377688.
This adds the missing support for the PHY mode RGMII_RXID. It's necessary for the Raspberry Pi 4. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
This backport all genet differences (different compatible, right PHY mode, board specific stuff) from upstream. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Make the BCM2711 a different machine, but keep it in board_bcm2835. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
commit 0f95b09 upstream. BCM2711 features a RNG200 hardware random number generator block. So make the driver available. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Signed-off-by: Stephen Brennan <stephen@brennan.io> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This adds the ability to use the RNG with an upstream kernel. Keep the old one for backward compatibility. Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
c2ccf70
to
1bb3430
Compare
Pull request rebased |
@pelwell Are there any objections with this pull request? |
I'm just giving it a quick smoke test prior to merging. |
Note to self: If you ever experiment with different armstubs, be sure to delete them before regression testing. |
Thanks |
This pull requests tries to reduce the delta between downstream and current upstream development. Since Linux 5.4 LTS has been released i don't see any point to backport 5.5 changes into 4.19.
In short the PR contain the following 5.5 changes:
Unfortunately there is no complete backward compatibility of GENET, since the PHY mode was wrong before.
This PR doesn't contain all 5.5 DTS changes:
I tried to keep the changes as minimal as possible.
This PR has been tested with bcm2711_defconfig.