Skip to contentSkip to conversation

configs: OrangePi PC2: Update defaults

PATCH In review Jernej Skrabec 2 participants 4 messages Jun 7, 2021 – Jun 13, 2021 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

PATCH 1/1 configs: OrangePi PC2: Update defaults

OrangePi PC2 board has DRAM with ODT, so enable it. ZQ value is also slightly different in vendor images, so update it as well. H5 SoC is also connected to voltage regulator. It's default value is pretty low, so in order to avoid instability, enable driver for it and set it to appropriate voltage.

---
 configs/orangepi_pc2_defconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
configs/orangepi_pc2_defconfig +4 -2
index f72ffe27b26c..5e4cca793f53 100644
@@ -3,13 +3,15 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
-CONFIG_DRAM_ZQ=3881977
-# CONFIG_DRAM_ODT_EN is not set
+CONFIG_DRAM_ZQ=4145117
 CONFIG_MACPWR="PD6"
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SUN8I_EMAC=y
+CONFIG_SY8106A_POWER=y
+CONFIG_SY8106A_VOUT1_VOLT=1100
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

Dne ponedeljek, 07. junij 2021 ob 19:42:45 CEST je Jernej Skrabec napisal(a):

Quoted 20 lines

OrangePi PC2 board has DRAM with ODT, so enable it. ZQ value is also slightly different in vendor images, so update it as well. H5 SoC is also connected to voltage regulator. It's default value is pretty low, so in order to avoid instability, enable driver for it and set it to appropriate voltage.

---
 configs/orangepi_pc2_defconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
configs/orangepi_pc2_defconfig +0 -1
index f72ffe27b26c..5e4cca793f53 100644
@@ -3,13 +3,15 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
-CONFIG_DRAM_ZQ=3881977

configs/orangepi_pc2_defconfig CONFIG_ARCH_SUNXI=y · line 14

Quoted 10 lines
configs/orangepi_pc2_defconfig +4 -1
-# CONFIG_DRAM_ODT_EN is not set
+CONFIG_DRAM_ZQ=4145117
 CONFIG_MACPWR="PD6"
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SUN8I_EMAC=y
+CONFIG_SY8106A_POWER=y
+CONFIG_SY8106A_VOUT1_VOLT=1100

I'm not sure if voltage regulator adjustment needs to be enabled. By default, it's set to 1.1 V using resistor divider. However, it can be still needed if board is rebooted and OS set it to lower value before reboot.

Best regards,
Jernej

Quoted 7 lines
configs/orangepi_pc2_defconfig +0 -0
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
Signature · 1 line
2.31.1
author maintainer
#2 lore raw

Dne sobota, 12. junij 2021 ob 07:50:27 CEST je Jernej Škrabec napisal(a):

Quoted 1 line

Dne ponedeljek, 07. junij 2021 ob 19:42:45 CEST je Jernej Skrabec

napisal(a):

Quoted 11 lines
Quoted 11 lines

OrangePi PC2 board has DRAM with ODT, so enable it. ZQ value is also slightly different in vendor images, so update it as well. H5 SoC is also connected to voltage regulator. It's default value is pretty low, so in order to avoid instability, enable driver for it and set it to appropriate voltage.

---
 configs/orangepi_pc2_defconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 11 lines

configs/orangepi_pc2_defconfig CONFIG_ARCH_SUNXI=y · line 6

Quoted 11 lines
configs/orangepi_pc2_defconfig +1 -2
index f72ffe27b26c..5e4cca793f53 100644
@@ -3,13 +3,15 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
-CONFIG_DRAM_ZQ=3881977
-# CONFIG_DRAM_ODT_EN is not set
+CONFIG_DRAM_ZQ=4145117

I re-checked BSP DT and original ZQ value is correct. So this patch should only enable ODT, which is really enabled in BSP and DRAM ICs support it.

Best regards,
Jernej

Quoted 10 lines

configs/orangepi_pc2_defconfig CONFIG_ARCH_SUNXI=y · line 14

Quoted 8 lines
configs/orangepi_pc2_defconfig +3 -0
 CONFIG_MACPWR="PD6"
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SUN8I_EMAC=y
+CONFIG_SY8106A_POWER=y
+CONFIG_SY8106A_VOUT1_VOLT=1100

I'm not sure if voltage regulator adjustment needs to be enabled. By

default,

Quoted 16 lines

it's set to 1.1 V using resistor divider. However, it can be still needed if board is rebooted and OS set it to lower value before reboot.

Best regards,
Jernej

Quoted 7 lines
configs/orangepi_pc2_defconfig +0 -0
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
Signature · 1 line
2.31.1
#3 lore raw
In reply to Jernej Škrabec

On Sat, 12 Jun 2021 07:50:27 +0200
Jernej Škrabec <[email protected]> wrote:

Hi,

Quoted 27 lines

Dne ponedeljek, 07. junij 2021 ob 19:42:45 CEST je Jernej Skrabec napisal(a):

Quoted 26 lines

OrangePi PC2 board has DRAM with ODT, so enable it. ZQ value is also slightly different in vendor images, so update it as well. H5 SoC is also connected to voltage regulator. It's default value is pretty low, so in order to avoid instability, enable driver for it and set it to appropriate voltage.

---
 configs/orangepi_pc2_defconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
configs/orangepi_pc2_defconfig +2 -2
index f72ffe27b26c..5e4cca793f53 100644
@@ -3,13 +3,15 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL=y
 CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
-CONFIG_DRAM_ZQ=3881977
-# CONFIG_DRAM_ODT_EN is not set
+CONFIG_DRAM_ZQ=4145117
 CONFIG_MACPWR="PD6"
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
Quoted 8 lines

configs/orangepi_pc2_defconfig CONFIG_ARCH_SUNXI=y · line 14

Quoted 4 lines
configs/orangepi_pc2_defconfig +2 -0
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SUN8I_EMAC=y
+CONFIG_SY8106A_POWER=y
+CONFIG_SY8106A_VOUT1_VOLT=1100  

I'm not sure if voltage regulator adjustment needs to be enabled. By default, it's set to 1.1 V using resistor divider. However, it can be still needed if board is rebooted and OS set it to lower value before reboot.

Yeah, I had a similar train of thoughts: originally I though we don't need it, because of the resistor divider providing a good default voltage. But indeed if we reset from a lower p-state (either by chance or because of say the powersave governor being active), I really see the lowest voltage (1.0V) being still set in when back in U-Boot, which could lead to instabilities if the CPU runs at the 816 MHz we set the PLL to.
So enabling the regulator sounds indicated, as we set the CPU frequency as well. This is especially critical when the OS doesn't use DVFS.

Because of this I am inclined to take the regulator part now.

For the ODT change, I will queue this for the next release.

Thanks,
Andre.

Quoted 14 lines

Best regards,
Jernej

Quoted 7 lines
configs/orangepi_pc2_defconfig +0 -0
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
Signature · 1 line
2.31.1