-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Questions] Raspberry Pi 4 upstreaming #3101
Comments
@pelwell any ideas? |
@P33M wrote/copied the GIC dts. |
3a. Removing the always-on property has side-effects. On an idle system with the property removed, I get 500 IRQs per second in vmstat with equal numbers of arch timer interrupts across all 4 cores. With the property added, I get ~110 IRQs per second in vmstat with differing numbers of timer interrupts. It seems like CPUs aren't dropping into a tickless idle state - which would have power consumption implications. |
As a first pass, fixes for 1 and 2 could also be taken downstream: |
Thanks a lot |
More questions:
|
Sorry, for be annoying but there are only few days left before my holiday. I need the answers before i can send out the next version of my patch series. |
The system timer register at 0x7e003000 still exists and is used by the firmware, I think it's 0xfe003000 ARM side. Start.elf and the bootloader initialise it to run at 1MHz from the OSC at the start of day. |
Okay, this answers question 1 and makes the movement of timer@7e003000 into bcm2835-common.dtsi wrong. Regarding the armstub7.S i couldn't find something related to the timer setup, so i assume this only done in armstub8.S |
@timg236 Since we have a GIC now, it would be to necessary to define the 4 interrupts accordingly. Is it possible to publish those definitions? |
You should be able to work it out by inter/extrapolation from the others. |
Okay, i will take the following:
|
Yes - that looks correct. |
Thanks |
Regarding upstreaming there are more questions:
|
CM_GENET_125CTL = 0x7e101210 tcntmux has genet_250 as 45, genet_125 as 50.
? |
According to point 3: the problem is that i suggested register range in the DTS file comes from me and based on the assumption that the BCM2711 has a AVS TMON block. AFAIR the original register range was 4. According to the bit defines the BCM2711 seems to be not compatible to any existing bcm thermal driver. So would like to use the real register range based on the hardware. At least reading out the register indicate a bigger range than 4. |
The temperature reg being used is actually part of AVS_RO and not AVS_TMON. The block has a whole heap of registers to do with ring oscillators/core voltage monitoring but the only one to do with temperature is at 0x7d5d2200. It looks like there is a AVS_TMON block at 0x7d5d1500 with trips/interrupt registers in the right places - what happens if you point the brcmstb_thermal driver at that address? |
Thanks, i'll give it a try. |
Unfortunately this doesn't work. The brcmstb_thermal driver complains about invalid readouts. An attempt to read the registers via /dev/mem result at 0xfd5d1500 results in kernel faults. |
@P33M Is this correct ?
|
The documentation refers to 4 bit integer and 8 bit fractional divisor widths, so I'd say it is. |
Thanks |
Some more questions:
Edit: |
I sent out V3 of the initial RPi 4 support today and there is at least one request for comments.
|
@pelwell gentle ping |
Lots of things might be nice, but are they necessary? It's as well documented as all other chips:
etc. Try this:
|
@P33M gentle ping |
Wake on LAN won’t work on Pi4 model because the interrupt from the phy is not connected. The MAC address comes from OTP and is passed via command line and:or device tree. Others might have to comment on the EEE or 125 MHz clock. |
Would be nice to get a confirmation about the right PHY mode. |
I'm not very familiar with the Linux bcm genet driver but checked the firmware (*) and it doesn't do any configuration of GENET or the PHY. The 0x0100 for CLK_CTL lines up with the default value in the datasheet.
|
I have a question regarding the ring oscilator block which came up during thermal upstreaming: What is the register offset and size in hex of the ring oscillator (AVS RO) block? |
AVS_RO_REGISTERS_0: 0x7d5d2200-0x7d5d22e3 |
This looks strange too me due all the other blocks are aligned to 0x1000. What is at 0x7d5d2000? |
There is a top level block that contains a number of sub-blocks (AVS_RO_REGISTERS_0 is one). |
Since pcie support will land soon, now the focus is on USB support. The commit b9b1e6f doesn't have any explanation. Why is this quirk the right way to gain LPM support? |
Do you know of a better way?
The documentation we have from VIA, and observation of the bus showing it entering the LP states. |
I'm not against the funtional change, but we need a good explantion in the commit log. The fact that we need to use a quirk let me think there is some kind of issue with the VL805. I don't know anything about PCIe but it looks like the LPM advertisement of this chip isn't properly implemented. |
@P33M Was this quirk required because the PCIe capabilities had 0us for the RestoreTime and PowerOnTime? If so, is this quirk no longer required if running the current 0137ab firmware? |
I think it was because U1/U2 exit latencies were 0us. With 0137ab I see that they are set to 4 and 231us respectively. Reverting to test... |
Yes - |
Ah. With the commit reverted the root hub descriptor doesn't have the exit latencies populated. It requires setting the quirk for xhci_create_usb3_bos_desc() to populate the fields from the HC params, so LPM is disabled by default on all host controllers that don't match the big table in xhci-pci.c:xhci-pci-quirks(). |
Okay, based on the last answer i consider the commit b9b1e6f as upstreaming candidate. |
New questions regarding GPIO:
|
gentle ping @pelwell |
|
Thanks. Oops, i wasn't aware that the BCM2711 supports more GPIOs. So there are more questions (hoping you are allowed to answer):
|
The same - they fill in some of the unused bits in the BCM2835 registers, with the obvious offsets.
|
Hold on. GPIO48–GPIO53 was previously used to access the on-board microSD card reader (using AltFn 0 for SD0_xxx). If these GPIOs are now used fo RGMII, where is EMMC now? |
The Raspberry Pi 4 has 3 SD card interfaces (sdhost, sdhci and emmc2). The new emmc2 which is currently used for SD cards is hardwired and not accessible via GPIO. |
Ah, right, that's configured by the new undocumented GPIO register at 0x7e2000d0… But I never thought that there are also dedicated pins for the SD card now. Anyway, I believe it's also possible to map the sdhci interface to those pins using the above-mentioned register. Let me try out a few things with that register. Edit: Yes, it seems the register at 0x7e2000d0 (can I provisionally call it GP_SDCARD until we learn the official name?) controls how those dedicated SD card pins are routed:
|
Okay, but that doesn't actually mean the EMMC2 is connected to GPIO48-53. |
No, surely not. FTR the firmware prints out |
I've got a question about the use of I²C for the on-board PMIC (XR77004). The firmare on a RPi4 prints out The built-in pin configuration says the following for RPi 3B+:
On the RPi 4B, both SMPS_SDA and SMPS_SCL are defined as |
Never mind. By tracing hardware register accesses on the VPU, it appears that there is one more (undocumented) I²C block at 0x7e205e00, and the firmware communicates to a device with address 0x1d. This address is used by the XR77004. Since the I²C traffic does not appear on any other accessible pin, I think it's safe to assume the PMIC is on its own dedicated pins. |
I have some questions regarding Maxime's KMS patch series (don't want to bother the review of this very long series, so here):
|
108 is from PLLD PER which is unfortunate because PLLD PER is actually 750 MHz so not an integer divider. It's a CPRMAN clock CTL 0x7e101200 DIV 0x7e101204 I have a feeling that it's required for PCIe and should be treated as an always-on clock |
During upstream review of the Raspberry Pi 4 devicetree some questions has been raised by Marc Zyngier [1].
[1] - https://marc.info/?l=linux-arm-kernel&m=156390562528398
The text was updated successfully, but these errors were encountered: