Probably because of some issue we see on early version hardware, 200mhz
pinctrl state for SDIO was disabled. Although the following access
failure is seen with DDR50 mode, both SDR50 and SDR104 mode works pretty
good on recent rM2 device.
[ 122.957669] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1@0x08000, err: -84
[ 122.965816] brcmfmac: brcmf_chip_recognition: chip backplane type 15 is not supported
[ 122.973674] brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed!
[ 122.980381] brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed
[ 122.987089] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19...
Add back 200mhz pinctrl state, so that AP5256 can work at SDR104 mode
and provide a much better WIFI throughput.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
The zero-sugar-wifi-cal_defconfig is maintained only for choosing BCMDHD
driver over BRCMFMAC. Kconfig fragment is good enough for this purpose.
Rename zero-sugar-wifi-cal_defconfig to zero-sugar-wifi-cal.config and
hold the minmal required changes in there. With this update, use the
following command to generate .config for build BCMDHD driver support.
$ make ARCH=arm zero-sugar_defconfig zero-sugar-wifi-cal.config
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
BCMDHD is able to figure out file name from chip_name_map[], see
drivers/net/wireless/bcmdhd/dhd_config.c. Drop file name from FW_PATH
and NVRAM_PATH, so that the options are not bundled with AP5256 but good
for other chipsets support like AP5203.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Let the kernel trigger an emergency power off when
a thermal driver reports critical temperature.
Set the timeout to 10 seconds, so that user space
can try to shutdown cleanly.
Add new default_current_limit param in DT.
Formerly used input_current_limit_chgin and input_current_limit_wcin params
given in DT is now used as an absolute max input current limit, in the new
dynamic max current adjustment scheme.
In order to reduce the overhead as much as possible in the wait loop, the
PGOOD GPIO is used if given in devicetree. If not, the wait loop reads the
FAULT FLAG register to obtain the PGOOD status.
Differentiate SNVS button click time for LPSR sleep
and power on:
Power off -> On - 500ms
LPSR Sleep -> Wake-up - 50ms
Turn off GPIO wake-up hack when not in LPSR sleep
It adds a separate dts/dtb for wifi calibration, which works with BCMDHD
wifi driver instead of BRCMFMAC. Comparing to mainstream zero-sugar.dts,
it adds 'wifi-host' property for SDIO slot and deletes bcrmf child node
from there, as the node is only required by BRCMFMAC driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
To make the change history clear, let's copy zero-sugar_defconfig as
zero-sugar-wifi-cal_defconfig with zero change first, and make necessary
changes on top of it later.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
As the first step of syncing up with mainstream dts and defconfig, let's
remove the outdated versions and add updated ones back later.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tune JEITA configuration (mainly) and other settings, FGCC mode seems to work
as expected.
Disable regulator definition for SAFEOUT signals, thus leave the SAFEOUT
config as default, following CHGIN charger presence.
Add required pinctrl config for GPIO based connection status read from charger
device when this is offline from the I2C bus (100K PU).
Fix devicetree bug (params not being written as expected)
- New JEITA config parameters were configured with incorrect DT property name,
and were thus reset to default or written as 0 depending on driver version.
Add support for required extra parameters in devicetree:
TAlrtTh
TAlrtTh2
JEITA_Curr
JEITA_Volt
ChargeState0..7
Set decent default parameters required for smart charge:
Enable FGCC (CONFIG register)
Set T1=disabled (TAlrtTh2 register)
Set T2=10 deg (TAlrtTh register)
Set T3=40 deg (TAlrtTh register)
Set T4=50 deg (TAlrtTh2 register)
Set JEITA_Curr = 50%/100%/81.25%
Set JEITA_Volt = 4.15V/4.2V/4.15V
Add ChargeState0..7 to be adjusted later if required (use default values)
It enables WoWLAN support by adding WIFI_HOST_WAKE interrupt pin and
'wakeup-source' property for SDIO interface.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
For WoWLAN testing purpose, let's add keep-power-in-suspend for wifi
SDIO interface, so that WLAN power will be retained during 'standby'
sleep.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
To support system suspend during idle, we define 'standy' as sleep
without LPSR, while 'mem' as LPSR sleep. In this case, DT property
"fsl,enable-lpsr" is not needed any more, as lpsr_enabled should always
be true to support 'mem' sleep.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
It enables option TOUCHSCREEN_CYPRESS_CYTTSP5_MANUAL_TTCONFIG_UPGRADE
to support CYTTSP5 firmware upgrade via sysfs. The command sequence
is like below.
$ echo 1 >| /sys/bus/i2c/devices/2-0024/manual_upgrade
$ echo 1 >| /sys/class/firmware/cyttsp5_fw_manual_upgrade/loading
$ cat xxx.bin >| /sys/class/firmware/cyttsp5_fw_manual_upgrade/data
$ echo 0 >| /sys/class/firmware/cyttsp5_fw_manual_upgrade/loading
The last command will take quite a few seconds to finish.
Note: The SY7636A and MEMTEST options are moved around as a result
of savedefconfig. They do not bring any effective changes.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
The following peripherals are not used on reMarkable device.
- Messaging Unit (MU)
- APBH-Bridge-DMA
- Cryptographic Acceleration and Assurance Module (CAAM)
Let's disable them, so that Linux kernel driver will not probe these
devices and turn on their clocks.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
The memory size should be 1G rather than 2G. It explodes after we have
DDRC configuration fixed in plugin, in case that we launch kernel image
with fastboot where the memory size in device tree gets passed to
kernel.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Aen bit of CONFIG register needs to be set for enabling alert on
fuel-gauge outputs like low SOC interrupt. This is a missing piece from
the original low battery alert commit.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Suspend code will check this 'fsl,enable-lpsr' to determine if it needs
to go into LPSR mode for sleep.
Because WiFi driver doesn't support suspend with power shutdown, we need
to remove WiFi module in sleep and reinstall it when system wakes up.
In this case, property 'keep-power-in-suspend' needs to be dropped to
get MMC stack be aware of power losing in LPSR sleep. The command
sequence looks like:
$ rmmod brcmfmac
$ echo mem >| /sys/power/state
system suspends, and wakes up
$ insmod brcmfmac.ko
$ dhcpcd wlan0
WiFi should be back to work then.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>