1
0
Fork 0
Commit Graph

15887 Commits (2682167b2d0073bc4a0a83569263c941591fddaa)

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
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
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
Lars Ivar Miljeteig 744284e31e zero-sugar dts: Add licensing info 2020-10-08 20:41:29 +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
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
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 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 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
Shawn Guo e1f06de912 dts/zero-sugar: decrease delay of digitizer power control to 100 ms
As confirmed by Bent, 100 ms delay should be good enough for digitizer
power control.  So let's decrease it to 100 ms to avoid unnecessary
longer delay.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:15 +02:00
Shawn Guo 0d48c715fe dts/zero-sugar: add regulator for digitizer and touch
Rather than relying on U-Boot to turn on power to digitizer and touch,
let's add regulator for the devices to control power via GPIOs.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:15 +02:00
Lars Ivar Miljeteig 2bafa4cefa zero-sugar dts: Disable touchscreen blanking 2020-10-08 20:07:15 +02:00
Shawn Guo 13e4384e40 dts/zero-sugar: add POWEROFF_ON_SLEEP flag for cyttsp5 core
With LPSR sleep support coming, cyttsp5 will lose power completely
during system sleeps.  To get cyttsp5 driver support the power state
better, we should add CY_CORE_FLAG_POWEROFF_ON_SLEEP flag for cyttsp5
core device.  See enum cyttsp5_core_platform_flags in
include/linux/platform_data/cyttsp5.h for full list of flags.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:15 +02:00
Shawn Guo e042fa35d7 dts/zero-sugar: add sleep pinctrl state for LPSR support
During LPSR sleep, all IOMUXC settings will be lost because of power
down of the block.  To restore the IOMUXC settings in LPSR wake-up,
drivers will select 'sleep' state pinctrl in suspend, and later select
'default' state pinctrl when system resumes.  To cope with that, we need
to have both pinctrl states in device tree.  A simple approach would be
have both states point to the 'default' pinctrl, since IOMUXC block will
be completely powered down in LPSR mode anyway.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:15 +02:00
Shawn Guo f0d9025c03 dts/zero-sugar: add pinctrl for bd71815 device
BD71815 device uses GPIO6_IO16 as the PMIC_INT_B interrupt line.  Even
though we are currently not using the interrupt from the device, there
should be a pinctrl for PMIC_INT_B to make the hardware description more
complete and correct.

While at it, rename the device node to bd71815 for an explicit naming.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:14 +02:00
Lars Ivar Miljeteig f09c2baffc zero-sugar dts: Fix vcom regulator of node
This makes the regulator searchable for
other device drivers
2020-10-08 20:07:14 +02:00
Shawn Guo b0bc971bf3 dts/zero-sugar: add 150 us delay for WIFI_PWR_EN
There is a 2 cycles (32K clock) delay required between WIFI_PWR_EN and
WL_REG_ON assertion. Let's use 'startup-delay-us' of WIFI_PWR_EN
regulator to add that delay.  We increase the delay from required 61 us
to 150 us for some margin.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:13 +02:00
Shawn Guo 85ac0018dc dts/zero-sugar: drop unused pinctrl_usbotg2_pwr
The pinctrl_usbotg2_pwr_1 is unused/unneeded.  Remove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:13 +02:00
Shawn Guo 8ccf9125f6 dts/zero-sugar: use fixed regulator to manage WIFI_PWR_EN
Besides WIFI_REG_ON handled by wifi_pwrseq, we need to deal with
WIFI_PWR_EN as well to get BCM43455 WiFi chip powered properly.  This
WIFI_PWR_EN is currently handled in U-Boot.  As we have fixed-regulator
infrastructure in kernel which can handle this nicely, let's use it, so
that we can drop the code from U-Boot.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:13 +02:00
Shawn Guo c2ab64fc4e dts/zero-sugar: move pinctrl_wifi into wifi_pwrseq node
The pinctrl_wifi is all about configuring pins used by wifi_pwrseq,
including the 32K clock and WIFI_PWR_EN.  So let's move the pinctrl
into wifi_pwrseq device.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:13 +02:00
Shawn Guo 0af630e869 dts/zero-sugar: drop wifi host-wake GPIO
We do not use wifi host-wake interrupt, so let's drop uneeded GPIO
pinctrl for it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:13 +02:00
Shawn Guo 4e9843f880 dts/zero-sugar: use standard 'ext_clock' to handle 32K clock
The standard pwrseq bindings (bindings/mmc/mmc-pwrseq-simple.txt) has
an 'ext_clock' which can be used to handle BCM43455 32K clock. Let's
use it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2020-10-08 20:07:13 +02:00
Lars Ivar Miljeteig 749160388e zero-sugar dts: Enable sy7636a driver 2020-10-08 20:07:13 +02:00
Lars Ivar Miljeteig f732531df4 zero-sugar dts: Correct pinmux for i2c4 2020-10-08 20:07:13 +02:00