Integrate meta-seco-rk/linux-seco-rk/seco_5.10.110_c31
Integrate linux-seco-rk/seco_5.10.110_c31
--
[C31][DTS] fix ethernet delays
The current ethernet configuration sets delays in both MAC and PHY. This requires to alter the drivers to allow forcing both delays, which is unnecessary.
This commit sets mode to rgmii-id and sets internal delays to tx=2.75ns and rx=1.75ns. How these values were calculated: the RK3399 gmac is capable of a ~5ns delay. The rx_delay and tx_delay properties can have values 0-100, so one step is ~0.05ns.
The new values have been tested using iperf3 (0 retr in both rx and tx).
--
[C31][OVERLAYS] delete unused overlays
Delete video overlays that are now unused (they have been replaced by the *-vopB.dtbo and *-vopL.dtbo files)
--
[C31][HDMI] fix hdmi on vopl
The HDMI on the vopl is incorrectly assigned to vopb
--
[C31][DTS][OVERLAYS] add new overlays for every output-vop combination
Every video output (HDMI, LVDS, eDP, DP over USB TypeC) can be connected to each of the 2 videoport of RK3399, vopB (big) capabe of 4K resolution and vopL (little) only capable of 1080p. We enumerate those configurations in order to genrate every possible video output option.
--
[C31] add gpio overlay for cn52
Add overlay to use serial outputs on CN52 as GPIOs
--
[C31] enable uart0 and add rs-485 overlay
Enable uart0 as RS-232 (default) and also add an overlay that adds the RS-485 mode
--
improve rs485 management
improve rs485 management to overcame HW limitations
modified: drivers/tty/serial/8250/8250_dw.c
modified: drivers/tty/serial/8250/8250_port.c
--
add rs485 support
add rs485 support for ttyS0 serial port, testd in loopback with ttyUSB0:
stty -F /dev/ttyUSB0 115200 -echo stty -F /dev/ttyS0 115200 raw -echo
-
TX test: cat /dev/ttyUSB0 & for a in
seq 1 100
; do echo -e "pippo $a\n" > /dev/ttyS0 ; done -
RX test: cat /dev/ttyS0 & for a in
seq 1 100
; do echo -e "pippo $a\n" > /dev/ttyUSB0 ; donemodified: drivers/tty/serial/8250/8250.h modified: drivers/tty/serial/8250/8250_dw.c modified: drivers/tty/serial/8250/8250_port.c modified: include/linux/serial_8250.h
--
[C31] add regulator for usb hub reset
Add regulator that keeps usb hub reset signal low
--
[C31] add overlay for SPI eeprom
Add overlay that enables the SST26VF032B flash on spi1, present in some configuration of the C31.
--
[ALL][SPI FLASH] Add support for QSPI SST SST26VF032B
Based on commit 980615ac from linux-seco-imx: https://git.seco.com/edgehog/bsp/nxp/linux-seco-imx/-/commit/980615accab64a17b97faa28f889b4a7cf928c75
Add support for the SST26VF032B SPI EEPROM
--
[C31][DTS] add overlay for SPI rtc
The RTC on SPI2 is only present in some configurations, so create a dedicated overlay for that.
--
[C31][DTS] fix wifi and bluetooth
Add wifi@1 and bluetooth@2 to sdio0 replacing wifi_wake_host@1 (compatible "nxp,wifi-wake-host" not present in this kernel).
Also fix pin number and some IRQ levels
--
[DEFCONFIG] enable CONFIG_MWIFIEX_SDIO as module
This module allows using the SDIO interface of the AW-CM276NF (e.g. C31)
--
[C31] [DTS] Add configuration for DisplayPort over USB Type-C
Add dts overlay file to support DisplayPort over USB Type-C
--
[C31] [DTS] vbus_typec: Remove regulator-always-on property
Type-C port's regulator should not have always-on property to get possibility of being enabled/disabled depending on type of the attachment (device or host). In this case CC controller (fusb302) should be the only consumer of this regulator, otherwise it won't be disabled/enabled when necessary. So change the name of regulator from vbus to vbus_typec, otherwise it would be taken also by rockchip-usb2phy device, as it is looking for a vbus regulator as well. for the usb2phy device in otg mode, in case to control typec port it makes sence to get this regulator in some other way.
--
[C31] [DTS] Add watchdog device tree configuration for TPS3851
Add watchdog device node to bind with the gpio-wdt driver
--
[DEFCONFIG] Enable GPIO_WATCHDOG support
Enable GPIO_WATCHDOG_ARCH_INITCALL to raise initcall level to arch_initcall, necessary for SBC-C31.
SBC-C31 has TPS3851 voltage supervisor with integrated watchdog. GPIO_WATCHDOG is sufficient to have basic watchdog functionality and manage its pin (WDI), once watchdog is enabled in U-boot using pin (SET1).
--
[Kconfig] PCIE_DW_ROCKCHIP: Add dependency on RFKILL_RK
Being dependent on RFKILL_RK, the pcie-dw-rockchip driver should not be brought into the build without RFKILL_RK.
To avoid linker errors when building without RFKILL_RK enabled: pcie-dw-rockchip.c:2263: undefined reference to `rfkill_get_wifi_power_state'
--
[C31] [DTS] Add configuration for USB Type-C controller FUSB302
Standard Type-C connector supports following configurations:
- USB 3.0 port
- OTG port
- Display port Currently only USB 3.0 (data role - host, power role - source) is supported, due to lack of implementations (e.g. typec mux registration) and mismatches (phy-rockchip-typec driver still needs the deprecated extcon API, e.g. in function tcphy_get_mode). The connector and port nodes retain all the necessary default properties, some of which are currently unused, but kept, some refactoring should probably be done once the drivers have full support.
--
[C31] [DTS] Add alias for PCAL6416 GPIO expander node
When using kernel device tree in U-Boot to have appropriate sequence number for gpio bank added by pcal6416 GPIO expander, because aliases 0 to 4 are already assigned to other gpio banks. In case if gpio expander is probed first, it receives sequence number 0.
This will fix warning "seq 0 is in use by gpio@20".
--
[DRIVERS] mcp251xfd: Add Loopback CAN operation mode support
For self-test purposes add possibility to set Loopback operation mode.
Because the driver does not have CAN_CTRLMODE_LOOPBACK in can.ctrlmode_supported this following command will exit with an error: root@seco-rk3399-c31:~# ip link set can0 type can loopback on RTNETLINK answers: Operation not supported
--
[DEFCONFIG] Enable driver for MCP251XFD SPI FD-CAN controller
Enable driver for the Microchip MCP251XFD CAN controller over SPI
Optionally SBC-C31 can have MCP2518FDT-H/QBB SPI FD-CAN controller with TJA1051 CAN transceiver.
--
[C31] [DTS] Add CAN over SPI support configuration
Add device tree overlays for CAN devices to be used along the environment setup of the peripheral devices at boot time.
--
[DRIVERS] Add backlight driver for MPS MP3385
Add PWM based backlight driver for MPS MP3385 WLED Controller with I2C Interface.
Initialization values can be passed to the driver via module parameter "settings" from command line or via DTS parameter.
Example command line portion is "mp3385_bl.settings=0xF0,0x44,0x3B,0x03,0x7F,0xE7". The same setting in DTS can be obtained by passing the reg-val: "reg-val = <0xF0 0x44 0x3B 0x03 0x7F 0xE7>;"
Co-authored-by: Gianfranco Mariotti gianfranco.mariotti@seco.com
--
[C31] [DTS] Add WiFi and Bluetooth suport configuration
Add configuration needed to support wireless adapter based on Marvell 8997 chipset using SDIO interface. Note: Actual configuration supports NXP Wi-Fi driver for module 88w8997/8987 built as an external module sourced from https://github.com/nxp-imx/mwifiex
Add this module to build with Yocto, using this configuration example in machine config:
KERNEL_MODULE_AUTOLOAD += "mlan moal" KERNEL_MODULE_PROBECONF += "moal" module_conf_moal = "options moal fw_name=mrvl/sdsd8997_combo_v4.bin cal_data_cfg=mrvl/cal_data.conf drv_mode=1 cfg80211_wext=0xf sta_name=wlan wfd_name=p2p max_vir_bss=1 auto_ds=2 ps_mode=2"
--
[DEFCONFIG] Enable PWRSEQ_SD8787
Enable this power sequence driver which now supports Marvell chipset SD8997 WiFi+BT
--
[DRIVERS] pwrseq_sd8787: Add power sequence support for Marvell SD8997 chipset
Instead of the pwrseq_simple driver which has only reset gpio in the power sequence, the pwrseq_sd8787 driver also adds powerdown gpio to handle in the power sequence.
But the Marvell SD8997 chipset does not have a gpio reset line in the power sequence, only a powerdown one, and to apply the proper power sequence, in this driver added device data to match the appropriate device and therefore to get the correct resources to manage in power sequence.
--
[C31] [DTS] Add ALSA sound card with TI TLV320 I2S stereo audio codec
Add device tree configuration for ALSA sound card with TLV320AIC3204 audio codec
--
[C31] [DTS] Add configuration for HDMI up to 4K resolution
Add dts overlay file for HDMI connected to VOP big which supports up to 4K resolution.
--
[C31] [DTS] Add HDMI sound configuration
Add ALSA sound card with HDMI audio codec
--
[C31] [DTS] Add PCI-e configuration
Add PCI-e configuration for the second Ethernet connection using Intel (R) I210 family Gigabit Ethernet controller interfaced to Rockchip processor PCI-e.
--
[DEFCONFIG] Enable Intel(R) 1000 family adapter support
Optionally C31 SBC could have an Ethernet connection using Intel I210 Family Gigabit Ethernet controller interfaced to Rockchip processors PCI-e, so enable it in the defconfig
--
[C31] [DTS] Add LVDS LCD panel support configuration
Add DTS overlay file for LVDS 15.6 inch 1920x1080 LCD panel Tested with panel InnoLux model G156HCE-L01.
--
[C31] [DTS] Move HDMI configuration in dedicated overlay dts
Since HDMI is optional, it is best to add its configuration using the Seco Environment Manager with seco_config command.
--
[C31] [DTS] Add eDP LCD panel support configuration
Add DTS overlay file for eDP 15.6 inch 1920x1080 LCD panel Tested with panel model G156HAN02. Move the regulator for LCD power in the overlay file, Add regulator-min(max)-microvolt values to the vcc_sys regulator node used as vin-supply for backlight power supply regulator. Delete property pinctrl for HPD from edp node, as it is not in design and pin is used for HDMI CEC. Delete property does not work from overlay, so use it from base dts.
--
[DEFCONFIG] enable driver for RTC PCF2123
enable driver for RTC PCF2123
--
[C31][DTS] Enable RTC PCF2123 support
add device tree support configuration for PCF2123 RTC
--
[C31] [DTS] Add SPI flash node for SST26VF032B
Keep disabled until verified.
--
[DRIVERS] PCF2123: Try to reset RTC Oscillator Stop flag
from boot log: rtc-pcf2123 spi1.0: clock was stopped. Time is not valid
According to the PCF2123 data-sheet, the oscillator is considered to be stopped during the time between power-on and stable crystal resonance. The Oscillator stop flag will remain set until cleared by software. Before reporting the RTC error, try clearing the flag to check if the RTC oscillator is running.
--
[C31] [DTS] Fix RGA node configuration
Current driver bound by compatible property is not supported
from boot log: rockchip-rga: probe of ff680000.rga failed with error -12
Modify the rga node configuration to bind the RGA2 driver with the correct properties requested by the driver and deleting unnecessary properties.
from boot log after fixes: rga: rga2 hardware loaded successfully, hw_version:3.2.18218. rga: rga2 probe successfully
--
[DEFCONFIG] Enable GSM modem initialization driver
Enable GSM modem initialization driver
--
[C31][DTS] Add LTE modem support configuration
Add gsm_modem node with GPIOs controlling LTE_RESET_N, LTE_PWRKEY, LTE_USB_BOOT and VBAT_GSM_EN lines.
--
[DRIVERS] Porting: Add SECO GSM modem power management
Driver provides support for reset, power enable lines, that are controlled by GPIOs.
Driver added to the miscellaneous drivers source tree.
Thid driver is needed to initialize the LTE Cat 4 modem module QUECTEL EG25-G.
--
[C31] [DTS] Add power supply for (SAR) A/D Converter
Fix saradc probe failure.
from boot log: rockchip-saradc ff100000.saradc: supply vref not found, using dummy regulator rockchip-saradc ff100000.saradc: failed to get voltage rockchip-saradc: probe of ff100000.saradc failed with error -22
--
[C31] [DTS] GMAC: Add TI DP83867 PHY child node
Add eth_phy child node into mdio at address 9: mdio command output from u-boot shell: => mdio list ethernet@fe300000: 9 - TI DP83867 <--> ethernet@fe300000
=> mdio read ethernet@fe300000 9.0x0010 Reading from bus ethernet@fe300000 PHY at address 9: 9.16 - 0xc040
Set FIFO depth to DP83867_PHYCR_FIFO_DEPTH_8_B_NIB as PHY Control Register (PHYCR), at Address 0x0010, bit [15:14] set: 11 TX FIFO Depth: 8 bytes Set ti,tx-internal-delay and ti,rx-internal-delay to DP83867_RGMIIDCTL_1_NS as in stable kernel version 4.19.
--
[C31] [DTS] Assign parent clock to dclk_source
When RK3399_TWO_PLL_FOR_VOP defined that is needed for dual display support, where two PLLs are required, dclk_vop0 exclusively occupies the CPLL, and dclk_vop1 exclusively occupies the VPLL.
Add include rk3399-vop-clk-set.dtsi indirectly by creating seco-rk3399-vop-clk-set.dtsi, because we have to overwrite PLL_NPLL clock frequency to obtain 125MHz clock rate for GMAC.
--
[C31] [DTS] ramoops: Fix the issue of lack of reserved memory resource
Move ramoops node into reserved-memory node otherwise driver will not find this resource, even if it is already allocated. from boot log: 'ramoops: failed to locate DT /reserved-memory resource'
--
[C31] [DTS] dmc: Add supported DDR frequencies
from boot log: dmc: Get wrong frequency, Request 800000000, Current 856000000 dmc: could not find power_model node dmc: dev_pm_opp_set_rate: failed to find current OPP for freq 856000000 (-34) dmc: Get wrong frequency, Request 200000000, Current 856000000
from DDR training log: ddr_set_rate to 328MHZ ddr_set_rate to 666MHZ ddr_set_rate to 416MHZ, ctl_index 0 ddr_set_rate to 856MHZ, ctl_index 1 support 416 856 328 666 MHz, current 856MHz
In dmc_opp_table node disable operating point nodes with unsupported frequency and add opp nodes for supported 328 416 666 856 MHZ frequencies In dmc node change the frequencies for different system statuses (scenario). The values are taken from reference board with similar LPDDR4 memory. Set auto-freq-en to 0, so disable load frequency scaling function and enable scenario frequency scaling.
Scenario frequency scaling means: entered the specified scenario, DDR frequency will change to the corresponding frequency defined by SYS_STATUS_XXX. The vop-bw-dmc-freq values are valid when load frequency scaling enabled (auto-freq-en=1).
--
[C31] [DTS] Add device tree configuration for C31 RK3399 board
The device tree configuration is based on dts of Rockchip RK3399 reference boards and dts of C31 board from stable kernel (4.19)