1
0
Fork 0
Commit Graph

721756 Commits (redonkable)

Author SHA1 Message Date
jebba faf50ef0de dev diff 2021-06-26 18:22:45 -06:00
jebba 005271b7f4 see also 2021-06-26 18:01:18 -06:00
jebba d60ec84d9c ip 2021-06-26 17:25:06 -06:00
jebba f239140a03 build, install notes 2021-06-26 17:19:27 -06:00
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
jebba 709f38bd49 readme stub 2021-06-26 16:17:05 -06:00
Shawn Guo 2be45d43a0 brcmfmac: support read chipname via sysfs
It adds support of reading chipname via sysfs, so that user space can
distinguish WiFi module among AP5256, AP5256V and 1MW.

- AP5256
reMarkable: ~/ cat /sys/class/ieee80211/phy*/chipname
BCM4345/9

- AP5256V
reMarkable: ~/ cat /sys/class/ieee80211/phy*/chipname
BCM43012/2

- 1MW
reMarkable: ~/ cat /sys/class/ieee80211/phy*/chipname
BCM4345/6

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-06-17 15:49:55 +02:00
Arend Van Spriel a5cf79c3c3 brcmfmac: use brcmf_chip_name() to store name in revinfo
The chip id can either be four or five digits. For the chip name either
the hexadecimal value needs to be taken (four digits) or the decimal
value (five digits). The function brcmf_chip_name() does this conversion
so use it to store the name in driver revision info.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit 756a2b3908 upstream)
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-06-17 15:49:55 +02:00
Shawn Guo 11960024a6 brcmfmac: Correct detection of brcm43456
This is a backport of commit e3062e05e1 ("brcmfmac: Loading the
correct firmware for brcm43456") from upstream.

AP5256 is SDIO based brcm43456 and currently misdetected as brcm43455.
Correct the detection so that the firmware files can be loaded for both
1MW and AP5256 in names as below.

  1MW:    brcmfmac43455-sdio
  AP5256: brcmfmac43456-sdio

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-06-01 11:11:50 +02:00
Shawn Guo 07b703037c brcmfmac: hard code ccode map table for BCM4345/9
Although upstream accepts the solution of coding country code map in DT,
it will require different DTB between AP5256 (BCM4345/9) and AP5256V
(BCM43012/2).  To support both chipsets with single kernel image and
DTB, let's hard code country code map table of AP5256 in driver, and use
it over the one from DT if any.

The map table of AP5256 comes from bcmdhd driver, ccode_43456c5[] in
drivers/net/wireless/bcmdhd/dhd_ccode.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-05-10 21:05:12 +08:00
Shawn Guo fa2634c419 brcmfmac: support parse country code map from DT
With any regulatory domain requests coming from either user space or
802.11 IE (Information Element), the country is coded in ISO3166
standard.  It needs to be translated to firmware country code and
revision with the mapping info in settings->country_codes table.
Support populate country_codes table by parsing the mapping from DT.

The BRCMF_BUSTYPE_SDIO bus_type check gets separated from general DT
validation, so that country code can be handled as general part rather
than SDIO bus specific one.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
2021-05-10 21:05:12 +08:00
Shawn Guo bd03a04d25 brcmfmac: use ISO3166 country code and 0 rev as fallback
Instead of aborting country code setup in firmware, use ISO3166 country
code and 0 rev as fallback, when country_codes mapping table is not
configured.  This fallback saves the country_codes table setup for recent
brcmfmac chipsets/firmwares, which just use ISO3166 code and require no
revision number.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-05-10 21:05:12 +08:00
Michal Koziel 74da8008e5 touch: pt: skipping polling for boot mode exit if already out of boot
Function _pt_poll_for_fw_exit_boot_mode() is not needed to be called if
the controller is already out of boot mode. This function was delaying
resume from wakeup unnecessarly for modes other that boot.
2021-05-05 16:35:10 +02:00
Michal Koziel 683461ccfa touch: pt: skipping polling for boot mode exit for PIP <1.11
PIP <1.11 has no support for polling wait. A hard coded delay was used
instead, but it only delayed wakeup from sleep. The cyttsp5 driver that
was used before introduction of this pt driver did not have any delay.
2021-05-05 16:35:10 +02:00
Michal Koziel d348a9ce8f touch: pt: outputs touch controller HW version known from probing
To obtain the HW version from user space:
cat /sys/devices/soc0/soc/30800000.aips-bus/30a40000.i2c/i2c-2/2-0024/hw_version

HW version obtained from the pt driver through sysfs was each time read
directly from the controller. The version was sometimes reported as
FFFF.FFFF.FF.
The HW version read during probing is now reported.
2021-05-05 12:17:01 +02:00
Michal Koziel 79b264bc2a touch: pt: silencing error messages on boot
A number of error messages where printed to the console on boot. These
are either not errors at all, are not handled as errors or are not severe
enough to be treated as errors. The same messages where printed on every
boot. To avoid cluttering the console and potentially overshadowing
other errors these messages where reduced from errors to warnings.
2021-05-05 09:51:21 +02:00
Michal Koziel 745322b72f touch: pt: resolved 'ISO C90 forbids variable length array data' warnings 2021-05-05 09:51:21 +02:00
Michal Koziel 003f35d627 touch: pt: reduce debug level for PIP < 1.11 not supporting polling wait
Devices implementing PIP < 1.11 do not support polling wait. This is expected, hence the debug warning level has been reduced from DL_ERROR to DL_WARN.
2021-05-05 09:51:21 +02:00
Michal Koziel af49deb502 touch: pt: Error message printed out when supposed to. 2021-05-05 09:51:21 +02:00
Michal Koziel f9a9de0748 touch: pt: support wake-up from 'standby' sleep
To support system wake-up from 'standby' sleep via single tapping with
sensed touch data, we need to distinguish suspend type between 'mem' and
'standby', and only puts touch device into sleep for 'mem' sleep.  It's
basically a rewriting of suspend/resume hooks, including:

 - Drop easy-wake gesture handling, as we do not support it.
 - Deal with pinctrl state, touch sleep and IRQ disabling only in case
   of 'mem' sleep.
 - Enable touch as a system wake-up source in case of 'standby' sleep.
2021-05-05 09:51:21 +02:00
Michal Koziel 6079b29129 touch: pt: select pinctrl state during suspend/resume
To support suspend/resume from LPSR mode, we need to select default
pinctrl state in resume, so that IOMUXC settings can be restored from
power losing.
2021-05-05 09:51:21 +02:00
Michal Koziel 66b869714f touch: pt: Write debug when trk_id is bad
The parade touch controller support people want a
debug dump when the bad trk_id error occurs.
2021-05-05 09:51:21 +02:00
Michal Koziel 79af119c32 zero-sugar.dts: fb blanking configurable in devtree 2021-05-05 09:51:21 +02:00
Michal Koziel c799511f3f pt: fb blanking configurable in devtree
Add an optional  device tree parameter
  parade,fb_blanking_disabled

This parameter controls the blanking notifier.
If the parameter is set in the device tree,
the parade device will NOT change its state
according to the state of the framebuffer
device.
2021-05-05 09:51:21 +02:00
Michal Koziel 8749e3f90c touch: pt: Fix getting of GPIO in pt from device tree 2021-05-05 09:51:21 +02:00
Michal Koziel 4fd0a33aa7 touch: pt: use regulator to control power
VDD_3V3_TOUCH power to cyttsp5 touch is controlled by GPIO TOUCH_PWR_EN.
Rather than relying on U-Boot to initialize the power, let's use
regulator to control it.
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
Michal Koziel 2ac5ccb2db touch: imported pt (Parade TrueTouch Gen5 Touchscreen Driver) 2021-05-05 09:51:21 +02:00
Dan Haab 521acadc4d brcmfmac: support STA info struct v7
The newest firmwares provide STA info using v7 of the struct. As v7
isn't backward compatible, a union is needed.

Even though brcmfmac does not use any of the new info it's important to
provide the proper struct buffer. Without this change new firmwares will
fallback to the very limited v3 instead of something in between such as
v4.

Signed-off-by: Dan Haab <dan.haab@luxul.com>
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit 4282ff17e5 upstream)
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-04-24 09:36:46 +08:00
Rafał Miłecki a5a1f114d7 brcmfmac: update STA info struct to the v5
That struct is used when querying firmware for the STA. It seem is has
been changing during the time. Luckily its format seems to be backward
compatible starting with v2 (the only breakage was v1 -> v2).

The version that was supported by brcmfmac so far was v4. It was what
43602a1 and 4366b1 firmwares (7.35.177.56 and 10.10.69.3309 accordingly)
were using. It also seems to be used by early 4366c0 firmwares
(10.10.69.6908 and 10.10.69.69017).

The problem appears when switching to the 10.10.122.20 firmware. It uses
v5 and instead of falling back to v4 when submitted buffer isn't big
enough it fallbacks to the v3.

To receive all v4 specific info with the newest firmware we have to
submit a struct (buffer) that matches v5.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit 07b1ae4687 upstream)
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-04-24 09:36:46 +08:00
Rafał Miłecki 987da99136 brcmfmac: define more bits for the flags of struct brcmf_sta_info_le
That struct is passed by a firmware when querying for STA info. Flags
are used to indicate what info could be obtained.

These new defines may allow passing more info to the cfg80211 in the
future. They had been obtained from Broadcom's SDK file wlioctl_defs.h
used by DD-WRT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit 4b4a8d808c upstream)
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-04-24 09:36:46 +08: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 c622f398c0 mmc: sdhci-esdhc-imx: separate 100/200 MHz pinctrl states check
As indicated by function esdhc_change_pinstate(), SDR50 and DDR50
require pins_100mhz, while SDR104 and HS400 require pins_200mhz.  Some
system design may support SDR50 and DDR50 with 100mhz pin state only
(without 200mhz one).  Currently the combined 100/200 MHz pinctrl state
check prevents such system from running SDR50 and DDR50.  Separate the
check to support such system design.

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 c3c91540de regulator: sy7636a: Remove unused mutex
The reglock mutex is now only used in the regulator code,
and the built-in mutexes in the regulator framework does
the same thing.
2021-03-12 11:14:00 +01: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
Lars Ivar Miljeteig cf22985f20 thermal: sy7636a: Use "vcom" regulator for power on
Use its own regulator "vcom" for turning on the epd pmic
when checking temperature. This avoids duplicate code,
and prevents a pile of bugs.
2021-03-12 11:14:00 +01:00
Michal Koziel f6bb4d231b wacom_i2c: added setup of input events per packet explicitly for this driver 2021-03-08 17:42:39 +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
Michal Koziel 8f0ceaabd1 wacom_i2c:not disabling i2c interrupt when suspending 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
Eirik Schultz d4e7e07a39 brcmfmac: Use request_firmware_direct for the clm_blob
from patchwork.kernel.org:

The linux-firmware brcmfmac firmware files contain an embedded table with
per country allowed channels and strength info.

These versions of the firmware are specially build for linux-firmware,
the firmware files directly available from Broadcom / Cypress rely on
a separate clm_blob file for this info.

For some unknown reason Broadcom / Cypress refuse to provide the standard
firmware files + clm_blob files it uses elsewhere for inclusion into
linux-firmware, instead relying on these special builds with the clm_blob
info embedded. This means that the linux-firmware firmware versions often
lag behind, but I digress.

The brcmfmac driver does support the separate clm_blob file and always
tries to load this. Currently we use request_firmware for this. This means
that on any standard install, using the standard combo of linux-kernel +
linux-firmware, we will get a warning:
"Direct firmware load for ... failed with error -2"

On top of this, brcmfmac itself prints: "no clm_blob available (err=-2),
device may have limited channels available" and we will get a slow
fallback to the userspace firmware loading mechanism.

This commit fixes both almost any brcmfmac device logging the warning
(leaving the brcmfmac info message in pace), as well as the slow and
unnecesary fallback by switching to request_firmware_direct for
the clm_blob.
2020-11-06 09:19:41 +01:00
Lars Ivar Miljeteig 26d7f2f9df max77818: Add licensing info 2020-10-08 20:41:29 +02:00
Lars Ivar Miljeteig e69448bf61 rm-otgcontrol: Add licensing info 2020-10-08 20:41:29 +02:00
Lars Ivar Miljeteig 744284e31e zero-sugar dts: Add licensing info 2020-10-08 20:41:29 +02:00
Lars Ivar Miljeteig 79ca032001 sy7636a: Clean up license info 2020-10-08 20:41:29 +02:00
Lars Ivar Miljeteig b56e7a9c8b net: bcmdhd: Remove debug info 2020-10-08 20:41:29 +02:00