1
0
Fork 0
Commit Graph

142970 Commits (redonkable)

Author SHA1 Message Date
jebba 2682167b2d reMarkable2 patch to view console on serial port from remarkablewiki.com/tech/rm2_otg_pogo 2021-06-26 16:56:05 -06:00
Michal Koziel 79af119c32 zero-sugar.dts: fb blanking configurable in devtree 2021-05-05 09:51:21 +02:00
Michal Koziel 064195ab66 zero-sugar.dts: ported from cyttsp5 to pt (Parade touch driver) 2021-05-05 09:51:21 +02:00
Michal Koziel c7f44f49c6 zero-sugar_defconfig: disabled cyttsp5 touch driver, enabled pt (Parade touch driver) 2021-05-05 09:51:21 +02:00
Shawn Guo 5d996d429f ARM: dts: zero-sugar: add back 200mhz pinctrl state for SDIO
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>
2021-04-20 14:48:59 +08:00
Shawn Guo f9b2c8d8f3 ARM: use Kconfig fragment for wifi-cal defconfig
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>
2021-04-20 14:48:30 +08:00
Shawn Guo aa0750c7f0 ARM: zero-sugar-wifi-cal_defconfig: drop AP5256 specific firmware name
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>
2021-04-20 14:48:30 +08:00
Lars Ivar Miljeteig a4169efc99 zero-sugar dts: EPD PMIC regulator not on from boot
Our u-boot does no longer leave the EPD PMIC turned
on after showing the splash screen. This updates
the device tree to reflect that.
2021-03-12 11:14:00 +01:00
Michal Koziel e25110a44f dts/zero-sugar: added input_events_per_packet to digitizer: wacom-i2c. This tells wacom_i2c size of input buffer to setup 2021-03-08 17:42:39 +01:00
Preben Thorød e4fc8bec66 zero-sugar config: Enable cyttsp5 device access module 2021-03-04 10:09:33 +01:00
Lars Ivar Miljeteig 75d058a5a9 zero-sugar config: Remove SDMA
Remove SDMA driver, as firmware lookup seems to slow
down entering suspend mode.
2021-02-08 13:29:39 +01:00
Lars Ivar Miljeteig 744284e31e zero-sugar dts: Add licensing info 2020-10-08 20:41:29 +02:00
Lars Ivar Miljeteig b4cce203e0 zero-sugar config: Add thermal gov user space support 2020-10-08 20:41:28 +02:00
Steinar Bakkemo 78e41b3c97 zero-sugar dtb: remove pogo one-wire internal PU 2020-10-08 20:41:27 +02:00
Lars Ivar Miljeteig 9f4bdf62aa zero-sugar dts: Set up thermal driver for epd pmic
- Non-critical alert at 49 degrees Celcius
- Critical alert and shutdown at 50 degrees Celsius
- Kernel polling every 30 seconds
2020-10-08 20:41:27 +02:00
Lars Ivar Miljeteig 89c9055094 zero-sugar config: Enable sy7636a thermal driver 2020-10-08 20:41:27 +02:00
Lars Ivar Miljeteig d7cca55383 zero-sugar config: Kernel shutdown at high temperature
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.
2020-10-08 20:41:27 +02:00
Lars Ivar Miljeteig 0601597e3c zero-sugar config: Remove more unused stuff 2020-10-08 20:41:27 +02:00
Steinar Bakkemo 08c7c3b2eb zero-sugar dts: (max77818) add default current limit (safe value)
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.
2020-10-08 20:41:26 +02:00
Steinar Bakkemo 3d7c5dec03 zero-sugar dts: (max77818) add usb_safe_max_current FG param 2020-10-08 20:41:26 +02:00
Steinar Bakkemo 46b4ee5f6b zero-sugar dts: (max77818) enable usb charger detection and add usb-phy refs to max77818 drv 2020-10-08 20:41:25 +02:00
Lars Ivar Miljeteig 21f6699e77 zero-sugar dts: Control SDOE and GDOE as gpios
- Set up fixed regulators for SDOE and GDOE
- MUX LCD1_DATA16 and LCD1_DATA22 as gpios
- Set up SDOE as lcd2-supply in LCDIF
- Set GDOE as always on
2020-10-08 20:41:25 +02:00
Lars Ivar Miljeteig 44d3feb048 zero-sugar dts: Setup pictrl for EPD PMIC 2020-10-08 20:41:24 +02:00
Lars Ivar Miljeteig 29e61876d2 sy7636-regulator: PGOOD gpio wait loop in regulator_enable
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.
2020-10-08 20:41:24 +02:00
Steinar Bakkemo 5a7b2a5d2c zero-sugar dts: Fix misleading comments
WCIN and CHGIN swapped + typo
2020-10-08 20:41:24 +02:00
Eirik Schultz b287997c17 zero-sugar: dts: Remove prototype from model name 2020-10-08 20:41:24 +02:00
Lars Ivar Miljeteig c938cca235 zero-sugar config: Add Resleep lock 2020-10-08 20:41:24 +02:00
Lars Ivar Miljeteig b888700e21 pm-imx7: LPSR: Button ON_TIME & GPIO wakeup tweaks
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
2020-10-08 20:41:23 +02:00
Lars Ivar Miljeteig 6ec71e28f8 zero-sugar config: Remove BRCM_TRACING
This tracing is not useful at the moment,
and clutters our logs.
2020-10-08 20:41:22 +02:00
Shawn Guo f28a1381b4 Add a dts for wifi calibration
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>
2020-10-08 20:41:22 +02:00
Shawn Guo 32f0dd7a25 Switch wifi driver to BCMDHD for wifi-calibration defconfig
It switches wifi driver from BRCMFMAC to BCMDHD for wifi-calibration
defconfig.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:41:22 +02:00
Shawn Guo 152f66d4a0 Copy zero-sugar_defconfig as zero-sugar-wifi-cal_defconfig
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>
2020-10-08 20:41:22 +02:00
Shawn Guo be845f8d23 Remove wifi callibration dts and defconfig
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>
2020-10-08 20:41:22 +02:00
Patrick Hisni Brataas f1dfb46cc0 Revert "dts/zero-sugar: enable Wifi wake-up support"
This reverts commit ef2623787555bc6f076f90b17b4fc4ed78b3f80f.

Revert this until we receive WiFi firmware that supports WoWLAN
2020-10-08 20:41:21 +02:00
Steinar Bakkemo 6cd088d951 otgcontrol: change vbus-supply from charger to FG driver
Due to FGCC mode requiring charger control through FG driver,
otgcontrol now references the FG driver as vbus-supply.
2020-10-08 20:41:21 +02:00
Steinar Bakkemo 98c52ea4e0 zero-sugar dts: (max77818) FG param cleanup
Remove confusing comments in FG params (DT)
2020-10-08 20:41:21 +02:00
Steinar Bakkemo e0e5797ba1 zero-sugar dts: (max77818) en. FGCC/dis. SAFEOUT reg./en. GPIO based chg status
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).
2020-10-08 20:41:20 +02:00
Steinar Bakkemo bff78ec9e3 zero-sugar dts: (max77818) fix DT property name errors
Remove double maxim prefix.
2020-10-08 20:41:20 +02:00
Steinar Bakkemo f5c02a191a zero-sugar dts: (max77818) fix JEITA config issue/disable FGCC by default
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.
2020-10-08 20:41:20 +02:00
Steinar Bakkemo 411f4a9e96 zero-sugar dts: (max77818) enable support for smart charging controlled by FG
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)
2020-10-08 20:41:20 +02:00
Shawn Guo 37632186cb dts/zero-sugar: enable Wifi wake-up support
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>
2020-10-08 20:41:19 +02:00
Shawn Guo a0ac46313f dts/zero-sugar: add keep-power-in-suspend for wifi SDIO interface
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>
2020-10-08 20:41:19 +02:00
Shawn Guo f1f8e8d290 suspend: get 'standby' as suspend without LPSR
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>
2020-10-08 20:41:19 +02:00
Shawn Guo f3ac0f71b5 zero-sugar_defconfig: enable CYTTSP5 firmware upgrade via sysfs
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>
2020-10-08 20:41:18 +02:00
Shawn Guo 7ba84f2463 dts/zero-sugar: disable unused peripherals
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>
2020-10-08 20:41:18 +02:00
Shawn Guo aca7ebc3a9 dts/zero-sugar: fix memory size
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>
2020-10-08 20:41:18 +02:00
Steinar Bakkemo 2051f54210 zero-sugar dts: (max77818) battery temp. measurement parms accord. to HW design
Add tGain, tOFF and tCurve FG params configured according to ref. config
found for similar thermistor with same beta-value as in our design.
2020-10-08 20:41:18 +02:00
Shawn Guo b27cab889d dts/zero-sugar: set Aen bit in FG CONFIG register
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>
2020-10-08 20:41:18 +02:00
Shawn Guo 0004d5660a dts/zero-sugar: enable LPSR sleep mode
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>
2020-10-08 20:41:18 +02:00
Steinar Bakkemo 78a2099765 zero-sugar dts: (max77818) adapt CHARGER_INTB config according to HW change
Change pin mux from GPIO6.22 => GPIO1.7
Change internal PU => 100K, disable hysteresis, drivestrength and slewrate config
Change interrupt config accordingly for max77818 driver
2020-10-08 20:07:15 +02:00