1
0
Fork 0
Commit Graph

888152 Commits (zero-colors)

Author SHA1 Message Date
Shawn Guo dbd623fb1d 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:41:32 +02:00
Double Lo 4a4bfbce1e brcmfmac: avoid network disconnection during suspend with linux-3.8 and above kernel
From linux-3.8 kernel, wowlan packet filter is mandated to avoid
the disconnection of connected network before suspend in commit
8125696991 ("cfg80211/mac80211: disconnect on suspend").
So as a dummy wowlan filter is configured for kernels linux-3.8
and above. Later all private command implementation of packet
filters can be moved to wowlan based filters.

Signed-off-by: Double Lo <dblo@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-06-17 15:02:22 +02:00
Grzegorz Jaszczyk a79497e0e6 ARM: zero-gravitas_defconfig: enable vfat file system support
The vfat fs is required for mounting u-boot env partition which is
actually used by reMarkable post install script.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-16 12:54:07 +02:00
Morten Schade Flå f364a5cb1e
ARM: dts: zero-sugar: disable mu mailbox node. (#160)
5b29f6e removed disabling of the mu node. Although the imx-mailbox
driver is not enabled in the zero-sugar_defconfig we want to keep
the mu node disabled for correctness.

Signed-off-by: Morten Schade Flå <morten.schade.fla@remarkable.no>
2021-06-16 11:09:47 +02:00
Michal Koziel c19aef0854 dts/zero-sugar: max77818: disable VAlrt
This will prevent voltage out of range alarms from interrupting charging
if the values are initially set incorrectly.
2021-06-16 10:02:48 +02:00
Michal Koziel c51af4fe58 max77818: set VAlrtTh on boot
Allow setting the alarm thresholds to known values at boot.
2021-06-16 10:02:48 +02:00
Grzegorz Jaszczyk 517a4ccef4 watchdog: imx2_wdg: notify wdog subsystem about wdog suspend/resume
Suspend routine disables wdog clk. Nevertheless, the watchdog subsystem
is not aware of that and can still try to ping wdog through
watchdog_ping_work. In order to prevent such condition and therefore
prevent from system hang (caused by the wdog register access issued
while the wdog clock is disabled) take advantage of
watchdog_dev_suspend/resume routines which will take care of watchdog
ping worker cancel and restore.

Additionally remove hw ping from suspend/resume since it will be
issued by watchdog_dev_suspend/resume routines.

Signed-off-by: Michal Koziel <michal.koziel@emlogic.no>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-16 09:41:46 +02:00
Grzegorz Jaszczyk 8b9e62cf99 watchdog: introduce watchdog_dev_suspend/resume
The watchdog drivers often disable wdog clock during suspend and then
enable it again during resume. Nevertheless the ping worker is still
running and can issue low-level ping while the wdog clock is disabled
causing the system hang. To prevent such condition introduce
watchdog_dev_suspend/resume which can be used by any wdog driver and
actually cancel ping worker during suspend and restore it back, if
needed, during resume.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-16 09:41:46 +02:00
Michal Koziel 7b1bbbed90 watchdog: imx2_wdt: restart HW watchdog after resuming from sleep
The watchdog IP block is reset to its POR state after resuming
from deep sleep or LPSR sleep. Make sure that the watchdog is
restarted after resuming.

Signed-off-by: Michal Koziel <michal.koziel@emlogic.no>
2021-06-15 15:41:19 +02:00
Morten Schade Flå 5b29f6e63d
ARM: dts: zero-sugar: Correctly disable the mu_lp node. (#158)
Commit 4e028df4e3 enabled rpmsg on imx legacy platform.
In order to disable the Mailbox MU driver we must disable the mu_lp node.

Signed-off-by: Morten Schade Flå <morten.schade.fla@remarkable.no>
2021-06-15 12:47:50 +02:00
Shawn Guo 95b91308ff ARM: dts: zero-sugar: fix touch pinctrl settings
i.MX7 has a completely different bit field layout for IOMUXC_SW_PAD_CTL
register comparing to i.MX6.  The current setting for GPIO1_IO14 and
GPIO1_IO13 look like the values for i.MX6, while i.MX7 has only the
following bit fields.

  [6:5] PS (Pull Select)
  [4]   PE (Pull Enable)
  [3]   HYS (Hyst. Enable)
  [2]   SRE (Slew Rate Enable)
  [1:0] DSE (Drive Strength Enable)

Use 47k pull-up for TOUCH_INT input, disable pull for TOUCH_RESET
output, and keep other bits as the default.

While at it, update the comment for these two pins to use the name from
board schematics.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-06-11 21:20:30 +08:00
Michal Koziel 7ff7c310d3 sy7636a: correct bit shifting for VCOM setting
The VCOM value is 9 bits and is composed from VCOM Adjustment Control 1
(Address 0x01h) and VCOM Adjustment Control 2 (address 0x02h). The msb
(9) is bit 7 in VCOM Adjustment Control 2.
2021-06-08 12:33:37 +02:00
Grzegorz Jaszczyk 53e9eae7cc usb: phy: introduce usb_phy device type with its own uevent handler
The USB charger type and status was already propagated to userspace
through kobject_uevent_env during charger notify work. Nevertheless the
uevent could be lost e.g. because it could be fired at an early kernel
boot stage, way before udev daemon or any other user-space app was able
to catch it. Registering uevent hook for introduced usb_phy_dev_type
will allow to query sysfs 'uevent' file to restore that information at
any time.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:27:11 +02:00
Grzegorz Jaszczyk 5a589c873e ARM: zero-gravitas_defconfig: disable SCSI support
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 82fe0c15a9 ARM: zero-gravitas_defconfig: disable initrd and RAM block dev support
This commit disables:
- Initial RAM filesystem and RAM disk (initramfs/initrd) support
- RAM block device support

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 5585d1b5b6 ARM: zero-gravitas_defconfig: enable CONFIG_JUMP_LABEL
Enable optimization for very unlikely/likely branches.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 61cc16ab04 ARM: zero-gravitas_defconfig: disable virtio drivers
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 9efd0be36d ARM: zero-gravitas_defconfig: disable not used file systems support
This commit disables:
- MISC filesystems
- F2FS filesystem
- EXT2 and EXT3 filesystems

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 190826370c ARM: zero-gravitas_defconfig: disable Broadcom AMBA and SSB bus
Disable support for Broadcom specific AMBA and Sonics Silicon Backplane bus.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 017985c4a3 ARM: zero-gravitas_defconfig: disable MTD, SPI, EEPROM, LEDS and MOUSE
This commit disables some not used by rM1 features and drivers:
- Memory Technology Device (MTD) support
- SPI support
- EEPROM support
- MOUSE support
- LED support

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk e751cbc5d3 ARM: zero-gravitas_defconfig: disable some not used IMX features
This commit disables:
- Freescale EIM (External Interface Module) driver
- IMX IPUv3 (Image Processing Unit)

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk ab8c4fd464 ARM: zero-gravitas_defconfig: disable power management debugging support
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 3192eb7049 ARM: zero-gravitas_defconfig: disable some debug and test options
This commit disables:
- SLUB debugging support
- Miscellaneous debug code
- MMC host test driver (used during developing or testing host driver).

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk af7daf7543 ARM: zero-gravitas_defconfig: trim unused exported kernel symbols
Quoting CONFIG_TRIM_UNUSED_KSYMS Kconfig description:
"This option allows for unused exported symbols to be dropped from the
build. In turn, this provides the compiler more opportunities
(especially when using LTO) for optimizing the code and reducing binary
size.  This might have some security advantages as well."

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk afcaa79871 ARM: zero-gravitas_defconfig: disable HIGHMEM
Since the available RAM for rM1 is only 512M the HIGHMEM can be disabled
which should result in a slightly faster kernel.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 5d7cf415d4 ARM: zero-gravitas_defconfig: convert CYTTSP5 touch driver to LKM
Converting CYTTSP5 to loadable kernel module will allow to take
advantage of potential rootfs fw (/lib/firmware/cyttsp5_fw_pid00.bin).
Nevertheless it is worth noting that the cyttsp5_loader.ko is not
automatically probed but firmware upgrade was only used during
production stage once and is not performed at daily basis.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Grzegorz Jaszczyk 84973d208c ARM: zero-gravitas_defconfig: disable IMX SDMA
Currently imx6sl uses IMX SDMA together with: UART, SPI, SSI and SPDIF
peripherals which are not used in rM1.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-06-02 09:25:44 +02:00
Michal Koziel 77db2c9a72 zero-gravitas_defconfig: enable i2c-* device files
Enabling i2c-* device files, found in the /dev directory.
They make it possible to have user-space programs use the I2C bus.
2021-05-27 11:57:41 +02:00
Grzegorz Jaszczyk ccd532c99c ARM: use Kconfig fragment for zero-gravitas development config
The zero-gravitas-dev.config converts CFG80211 and MAC80211 to builtin while
disabling loadable module support. Additionally MEMTEST is enabled and
access to .config through /proc/config.gz is provided.

This Kconfig fragment was built by selecting differences between
zero-gravitas_defconfig and zero-gravitas-dev_defconfig found in
https://github.com/reMarkable/linux/commits/lars/zero-gravitas_4.9
cid: 1774e2a6a0

To take advantage of additional zero-gravitas-dev.config and generate
desirable development .config use following command:
 $ make zero-gravitas_defconfig zero-gravitas-dev.config

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 0b13c92157 ARM: dts: zero-gravitas: remove reference to not existing busfreq node
Disabling busfreq through busfreq phandle is a leftover from a v4.9
custom approach of disabling busfreq for zero-gravitas-factory.dts. This
was done by exposing busfreq through phandle from
arch/arm/boot/dts/imx6sl.dtsi. This is not needed since the busfreq is
already disabled through kernel config.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk f53c83b67a ARM: dts: imx6sl: Add missing CMA description
The CMA description was present in Linux v4.9 but seems to get somehow
lost. Restore it since the cma area is needed e.g. by E-Ink Panel
Framebuffer used in reMarkable1.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 3fff561086 ARM: dts: zero-gravitas: use expected I2C bus unit address format
This patch fixes below warnings:
arch/arm/boot/dts/zero-gravitas-factory.dts:164.20-262.4: Warning (i2c_bus_reg):
	/soc/aips-bus@2100000/i2c@21a0000/pfuze100@08: I2C bus unit address
	 format error, expected "8"
arch/arm/boot/dts/zero-gravitas-factory.dts:345.26-351.4: Warning (i2c_bus_reg):
	/soc/aips-bus@2100000/i2c@21a4000/wacom-i2c@09: I2C bus unit address
	 format error, expected "9"

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 6317bc362b ARM: dts: zero-gravitas: improve formatting of DT description
No functional changes, only white space changes.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 2c4103c0c8 ARM: dts: add zero-gravitas.dts describing reMarkable1 device
This patch adds DT description for reMarkable 1.0 device.
DT taken as is from reMarkable v4.9 kernel [1]

[1] 1774e2a6a0

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk c0f14f6d84 video: mxc epdc: fix compilation warnings
This commit quiets two type of warnings:
- warning: ISO C90 forbids mixed declarations and code
  [-Wdeclaration-after-statement]
- warning: passing argument 1 of ‘PTR_ERR’ makes pointer from integer
  without a cast [-Wint-conversion]
introduced by "video: mxc epdc: Add QOS handling in driver" commit.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Lars Ivar Miljeteig f3b0a03b27 video: mxc epdc: Add QOS handling in driver
Enables QOS support in EPDC hardware
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 6532a0f260 bq27441: align to new bq27xxx I2C write and write_bulk API
Since with v5.4 the bq27xxx I2C write and bulk write helpers were
already implemented in different way, rework bq27441_battery.c
appropriately.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Lars Ivar Miljeteig 66a84c60a7 bq27441: New kernel, stricter rules for memory 2021-05-13 14:33:04 +02:00
Lars Ivar Miljeteig 26b9acd8db bq27441: Driver in kernel
Used to be an out-of-tree module

[Grzegorz: cherry-picked from
 63a0829def
 - solve multiple conflicts:
 	drivers/power/supply/Kconfig
 	drivers/power/supply/Makefile
 	drivers/power/supply/bq27xxx_battery.c
 	drivers/power/supply/bq27xxx_battery_i2c.c
 	include/linux/power/bq27xxx_battery.h
 - move: bq27441_exit to bq27xxx_battery_i2c_remove due to driver
   differences between v4.9 and v5.4. Additionally include proper header
   for bq27xxx_battery_i2c.c
 - the di->bus.write was already assigned by bq27xxx_battery_i2c_write
   so drop custom implementation which comes with original patch.
 - drop defconfig changes since they are provided in separate patch.]

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Martin T. H. Sandsmark b67c6d3bcc pfuze100: sysfs file to disable SWBST regulator
Add ugly hack because the factory needs to be able to disable the SWBST
regulator to reset the charging circuit during tests.

[Grzegorz: Cherry-picked from lars/zero-gravitas_4.9 branch and
	   cid: 368f855f3c, align to v5.4 baseline and introduce minor
	   formatting improvements]
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Martin T. H. Sandsmark cfa13dc034 pm-imx6: fix suspend of imx6sl with ddr3 2021-05-13 14:33:04 +02:00
Martin T. H. Sandsmark c66e349133 epdc: epdc configuration for zero-gravitas
epdc: Turn on regulators unconditionally
  Add hack to EPDC driver to unconditionally turn on the regulators
  during initialization for Kaifa testing

epdc: Set pir display configuration
  First attempt at setting our display configuration, based on info sheet from E-Ink

epdc: Add waveform for our display
epdc: Move waveform to correct folder
epdc: Update EPDC driver to use correct pixels per SDCLK and data bus width
epdc: Update panel timing information based on NXP EPD calculator values
epdc: Update waveform after attempting to fix NXP's waveform converter
epdc: Bring up our panel by default
epdc: Update panel timing values based on independent calculations
epdc: Add 4bit waveform for ES103CS1
epdc: Add support for ES103CS1 display with 4bit waveforms
epdc: Add patch from NXP to use the correct mutex when panning display
epdc: Remove all traces of the 5bit waveforms
epdc: Remove EPDC powerup hack
epdc: update parameters for 85hz
epdc: undo some custom unnecessary changes
epdc: don't do a normal grayscale update just for init
epdc: fix some printing of errors
epdc: use synchronous firmware loading so users know that the EPDC is inited and can do stuff
mxc_epdc_fb: restore powerdown delay after suspend
mxc_epdc_fb: fix inverted conditional leading to endless collisions
mxc_epdc_fb: epdc driver wants pixclock in hz, not ps
mxc_epdc_fb: add support for automatically getting updated temperature from pmic

[Grzegorz: cherry-picked from
 416a27e421
 Additionally the firmware/Makeflie change and
 firmware/imx/epdc/epdc_ES103CS1.fw.ihex were dropped since the Linux
 kernel v5.4 firmware infrastructure has changed. To correctly load
 firmware with v5.4 the epdc_ES103CS1.fw should be placed in
 /lib/firmware/imx/epdc/ rootfs]
2021-05-13 14:33:04 +02:00
Martin T. H. Sandsmark 0fa2894bc5 max17135: Tweaks
max17135: Add some extra output for Kaifa
max17135: Make the MAX17135 driver check the PWRGOOD pin
max17135: Set the default pass number for MAX17135 to 2
max17135: specify chip version in devicetree
max17135: print ret when failing to write to device
max17135: use sysfs for programming vcom
max17135: add thermistor regulator to read temperature
max17135: get_voltage parameter
2021-05-13 14:33:04 +02:00
Martin T. H. Sandsmark 7cfea819c8 max17135: Ensure that the MAX17135 MFD selects MFD_CORE
The MAX17135 relies on MFD_CORE, without this patch kenel didn't link
properly:

arm-remarkable-linux-gnueabi-ld: drivers/mfd/max17135-core.o: in function `max17135_remove':
drivers/mfd/max17135-core.c:187: undefined reference to `mfd_remove_devices'
arm-remarkable-linux-gnueabi-ld: drivers/mfd/max17135-core.o: in function `max17135_probe':
drivers/mfd/max17135-core.c:155: undefined reference to `mfd_add_devices'
arm-remarkable-linux-gnueabi-ld: drivers/mfd/max17135-core.c:173:
undefined reference to `mfd_remove_devices'

[Grzegorz: commit msg update]
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 0c5309c9bd ARM: imx: built and use IMX busfreq only if CONFIG_HAVE_IMX_BUSFREQ is enabled
This commit fixes multiple redefinitions which prevents kernel from
compiling when CONFIG_HAVE_IMX_BUSFREQ is not enabled. This is observed
since include/linux/busfreq-imx.h provides empty stubs when
CONFIG_HAVE_IMX_BUSFREQ is not enabled, which redefined ones defined in
busfreq-imx.c.

Before this patch built failed with below:

arch/arm/mach-imx/busfreq-imx.c:183:5: error: redefinition of ‘register_busfreq_notifier’
  183 | int register_busfreq_notifier(struct notifier_block *nb)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/mach-imx/busfreq-imx.c:23:
./include/linux/busfreq-imx.h:64:19: note: previous definition of ‘register_busfreq_notifier’ was here
   64 | static inline int register_busfreq_notifier(struct notifier_block *nb)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-imx/busfreq-imx.c:189:5: error: redefinition of ‘unregister_busfreq_notifier’
  189 | int unregister_busfreq_notifier(struct notifier_block *nb)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/mach-imx/busfreq-imx.c:23:
./include/linux/busfreq-imx.h:68:19: note: previous definition of ‘unregister_busfreq_notifier’ was here
   68 | static inline int unregister_busfreq_notifier(struct notifier_block *nb)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-imx/busfreq-imx.c:821:6: error: redefinition of ‘request_bus_freq’
  821 | void request_bus_freq(enum bus_freq_mode mode)
      |      ^~~~~~~~~~~~~~~~
In file included from arch/arm/mach-imx/busfreq-imx.c:23:
./include/linux/busfreq-imx.h:58:20: note: previous definition of ‘request_bus_freq’ was here
   58 | static inline void request_bus_freq(enum bus_freq_mode mode)
      |                    ^~~~~~~~~~~~~~~~
arch/arm/mach-imx/busfreq-imx.c:870:6: error: redefinition of ‘release_bus_freq’
  870 | void release_bus_freq(enum bus_freq_mode mode)
      |      ^~~~~~~~~~~~~~~~
In file included from arch/arm/mach-imx/busfreq-imx.c:23:
./include/linux/busfreq-imx.h:61:20: note: previous definition of ‘release_bus_freq’ was here
   61 | static inline void release_bus_freq(enum bus_freq_mode mode)
      |                    ^~~~~~~~~~~~~~~~
arch/arm/mach-imx/busfreq-imx.c:946:5: error: redefinition of ‘get_bus_freq_mode’
  946 | int get_bus_freq_mode(void)
      |     ^~~~~~~~~~~~~~~~~
In file included from arch/arm/mach-imx/busfreq-imx.c:23:
./include/linux/busfreq-imx.h:72:19: note: previous definition of ‘get_bus_freq_mode’ was here
   72 | static inline int get_bus_freq_mode(void)

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 9e19d93196 ARM: defconfig: zero-gravitas: align to current v5.4 baseline
This change was generated with 'make zero-gravitas_defconfig',
'savedefconfig' and finally arch/arm/configs/zero-gravitas_defconfig was
overwritten by just generated defconfig.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Grzegorz Jaszczyk 91e1dcc430 ARM: configs: add reMarkable zero-gravitas defconfig
This patch adds default defconfig for reMarkable 1.0 device. Defconfig
taken as is from reMarkable v4.9 kernel [1].

[1] 1774e2a6a0

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
2021-05-13 14:33:04 +02:00
Shawn Guo 9557ec0860 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:04:51 +08:00
Shawn Guo 227997e789 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:04:51 +08:00
Shawn Guo f023f7f5ce 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:04:51 +08:00