platform/kernel/linux-rpi.git
4 years agoscripts: mkbootimg_rpi3.sh: Install each rpi firmware and config.txt
Seung-Woo Kim [Mon, 26 Mar 2018 01:43:15 +0000 (10:43 +0900)]
scripts: mkbootimg_rpi3.sh: Install each rpi firmware and config.txt

After renaming config.txt for 64bit, mkbootimg_rpi3.sh is broken.
Fix to install each rpi firmware and config.txt considering changed
file name.

Change-Id: I907c1b6a8dc499da1e2f0364f9404a82a244e194
Fixes: 0979ebb94710 ("rpi3: config: rename config.txt to identify 64bit")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: mkbootimg_rpi3.sh: Change image size fitted to partition
Seung-Woo Kim [Mon, 26 Mar 2018 01:37:39 +0000 (10:37 +0900)]
scripts: mkbootimg_rpi3.sh: Change image size fitted to partition

From partitioning script of rpi3, boot partition is 64MiB. Change
image size fitted to the partition.

The partitioning script is on below link:
https://review.tizen.org/git/?p=platform/kernel/u-boot.git;a=blob_plain;f=scripts/tizen/sd_fusing_rpi3.sh;hb=refs/heads/tizen

Change-Id: Ia95c392235fe712bc1345078c64d07f6567fcbcb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: Add arm 32bit build
Seung-Woo Kim [Tue, 20 Mar 2018 02:11:31 +0000 (11:11 +0900)]
packaging: Add arm 32bit build

Add arm 32bit build.

Note: packaging is done with config.txt for 32bit.

Change-Id: Icf7e76523db3bb83fbd3d0bb6153157a64e62d93
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoarm: tizen_bcm2709_defconfig: enable sync file validation framework
Inki Dae [Wed, 21 Mar 2018 23:01:47 +0000 (08:01 +0900)]
arm: tizen_bcm2709_defconfig: enable sync file validation framework

Vulcan DDK will use this interface to create a fence and
increase timeline value of the fence.

Change-Id: I13c3f2442d26841e715dd01583d23f02b670679e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoarm64: tizen_bcmrpi3_defconfig: enable sync file validation framework
Inki Dae [Mon, 19 Mar 2018 06:54:24 +0000 (15:54 +0900)]
arm64: tizen_bcmrpi3_defconfig: enable sync file validation framework

Vulcan DDK will use this interface to create a fence and
increase timeline value of the fence.

Change-Id: Ib72ae7f591d4795eb9b0bdd51f742ae45ac954c2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agorpi3: config: add config.txt for 32bit
Seung-Woo Kim [Mon, 19 Mar 2018 02:20:12 +0000 (11:20 +0900)]
rpi3: config: add config.txt for 32bit

Add config.txt for 32bit.

Note: It is for rpi3 32bit and rpi2, and in 32bit, there is no
atf implementation, so booting is done with u-boot.bin instead of
u-boot-spl.bin.

Change-Id: I556bb729f8be4a892f824d650b7935cd18efed20
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi3: config: rename config.txt to identify 64bit
Seung-Woo Kim [Mon, 19 Mar 2018 01:45:41 +0000 (10:45 +0900)]
rpi3: config: rename config.txt to identify 64bit

Rename config.txt to config_64bit.txt to identify 64bit.

Note: The rpm packaging should be done as config.txt because the
name is used from bootcode.bin.

Change-Id: I41ca9c90673d2ee747b326627bced12e2284f1b8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: add tizen_bcm2709_defconfig
Seung-Woo Kim [Wed, 21 Feb 2018 06:27:31 +0000 (15:27 +0900)]
ARM: configs: add tizen_bcm2709_defconfig

Add tizen_bcm2709_defconfig to support rpi2 and rpi3 32bit for
tizen.

Note: the defconfig is based on bcm2709_defconfig with tizen
features and less module options to fit 20MB modules size.

Change-Id: I19cd4961dbc2ce6fd60961aeac0cd56ed20b1527
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: dts: bcm2809-rpi-2-b: enable display, touch, audio, spi and i2c
Seung-Woo Kim [Wed, 17 Jan 2018 09:35:52 +0000 (18:35 +0900)]
ARM: dts: bcm2809-rpi-2-b: enable display, touch, audio, spi and i2c

On RPI dt, several devices are enabled with overlay dt. Enable dsi,
hdmi, touchscreen, audio, spi and i2c devices without overlay from
rpi2 dt for Tizen kernel like rpi3.

Change-Id: I3e6f5dcd000a6c01d9a0c740a87ef28a41f3eb22
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable MMC_BCM2835_MMC config
Jaehoon Chung [Wed, 21 Feb 2018 06:00:33 +0000 (15:00 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable MMC_BCM2835_MMC config

Enable older bcm2835 driver instead of latest bcm2835 driver.
Before enable MMC_BCM2835_MMC config, Wifi doesn't work.
(Because SDIO interface didn't initialized.)

Change-Id: I53b5f276e4f57612a0e8af03544d2ae82c75b1ef
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agousb: dwc_otg: remove wrong memory accesses found by kasan
Seung-Woo Kim [Wed, 17 Jan 2018 01:29:01 +0000 (10:29 +0900)]
usb: dwc_otg: remove wrong memory accesses found by kasan

dwc_otg_hcd_is_bandwidth_allocated() requres ep_hcpriv pointer,
but passed parameter is double pointer and it cuases bad memory
access. Remove the wrong memory accesses.

Change-Id: I8292613f16fbf91ed9736b2a97e4afdb3bbbccec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Sync with .config with v4.14.y
Jaehoon Chung [Fri, 5 Jan 2018 02:01:43 +0000 (11:01 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Sync with .config with v4.14.y

After updating to v4.14.y rebase, sync with .config.

Change-Id: I107539bb11b9e717e68023973a2bb2613aafc007
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable bcm2835-v4l2
Hackseung Lee [Wed, 6 Dec 2017 08:28:08 +0000 (17:28 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable bcm2835-v4l2

Enable bcm2835-v4l2 driver as dynamic kernel module.

Change-Id: I0a4cd562311fe6c41935b5376ce7fc94fab7b4b1
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
[sw0312.kim: apply config with bcm2835-v4l2 mmal message struct backported version]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable crypt-related configs
Junghoon Kim [Mon, 20 Nov 2017 05:56:07 +0000 (14:56 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable crypt-related configs

Enable crypt-related configs in order to support file system encryption.

Change-Id: Ib5d887db29d8431996f8acaa563ae67f159e0e4b
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoARM64: dts: bcm2710-rpi-3-b : add memory reserve
egukim [Tue, 4 Jul 2017 04:53:36 +0000 (13:53 +0900)]
ARM64: dts: bcm2710-rpi-3-b : add memory reserve

add memory reserve for rpi3(64bit) secure OS

Change-Id: I346a2d7c1afc0441ab4655592f3d81836a106f94
Signed-off-by: eunggu kim <egukim@dignsys.com>
4 years agoARM64: dts: bcm2710: add psci device node
egukim [Mon, 3 Jul 2017 05:06:47 +0000 (14:06 +0900)]
ARM64: dts: bcm2710: add psci device node

This patch changes the enable-method from 'spin-table' to
'PSCI (Power State Coordination Interface)' in order to control
the cpu state such as cpu up/down.

Change-Id: I92eaa95cbccbd86f6067bc9977acc45813703cad
Signed-off-by: eunggu kim <egukim@dignsys.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable TEE Driver
egukim [Mon, 3 Jul 2017 05:00:28 +0000 (14:00 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable TEE Driver

Set config CONFIG_TEE, CONFIG_OPTEE for enable optee kernel driver

Change-Id: Ib35167d8337126886b2bef03acf3aef6163d61ae
Signed-off-by: Eunggu kim <egukim@dignsys.com>
4 years agoARM64: dts: rpi3: Add optee node
egukim [Mon, 3 Jul 2017 04:55:37 +0000 (13:55 +0900)]
ARM64: dts: rpi3: Add optee node

Add device node for optee kernel driver. This based on
https://github.com/linaro-swg/linux/commit/a3d16523b5c3bd3c21e2009f2af0901b0d6d09dd

Change-Id: I9cc6d97354897b4656b02744076efd91889d7630
Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
[egukim: modified commit from linaro-swg/linux of github]
Signed-off-by: Eunggu kim <egukim@dignsys.com>
4 years agomisc: tizen-inform-reboot: resolve sync failure about reboot parameter
Junghoon Kim [Tue, 17 Oct 2017 05:43:04 +0000 (14:43 +0900)]
misc: tizen-inform-reboot: resolve sync failure about reboot parameter

Currently, writing reboot paramter into INFORM partition fails
infrequently.

Resolve this issue by calling sync_filesystem function so that it writes
out and waits upon all dirty data associated with this superblock.

Change-Id: Ic62df0c3c4e565ca7211eb85661ead6979f0ad8d
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agomisc: make sure Tizen notifier is executed before reset
Łukasz Stelmach [Fri, 29 Sep 2017 13:24:05 +0000 (15:24 +0200)]
misc: make sure Tizen notifier is executed before reset

In case of RaspberryPi the CPU is reset by watchdog triggered from
the bcm2835_restart_notifier_call function. Tizen notifier needs higher
priority to be called before the watchdog.

Change-Id: Ia7f6d895f6f40d1a9b4e57ad41b5bdb55c94f4f2
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: add i2c-stub to module
kibak.yoon [Fri, 13 Oct 2017 05:20:48 +0000 (14:20 +0900)]
ARM64: tizen_bcmrpi3_defconfig: add i2c-stub to module

We need a test method for the i2c driver and framework on RPI3.
And using a fake device is more convenient than a physical hardware device.
Therefore it would be good to enable i2c-stub for testing i2c feature on RPI3.
This will be used for testing purposes only.

Change-Id: I279bccabf709631130eae7b257bec6275b6acba0
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: support Western european languages
Inki Dae [Wed, 27 Sep 2017 08:41:16 +0000 (17:41 +0900)]
ARM64: tizen_bcmrpi3_defconfig: support Western european languages

Add Western european language support.

This language support is required for mounting vfat filesystem with default
language set on USB storage.

Change-Id: Ibf479d540a0df8502cae5af0dc242b1cdce3d6c8
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable TIZEN_INFORM_REBOOT with inform path
Junghoon Kim [Tue, 22 Aug 2017 04:46:05 +0000 (13:46 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable TIZEN_INFORM_REBOOT with inform path

Reboot parameter passing is required for determining booting mode for
rpi3.

Activate Tizen reboot parameter passing feature with inform file path.

Change-Id: I67a7c24548dda8e8dd860fa25b2f558dadb83cf5
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agomisc: add Tizen reboot notifier for passing reboot parameter
Junghoon Kim [Mon, 21 Aug 2017 02:04:32 +0000 (11:04 +0900)]
misc: add Tizen reboot notifier for passing reboot parameter

To determine booting mode (e.g, fota or recovery) in u-boot side, reboot
parameter should be passed through inform partition.

Add Tizen reboot notifier for passing reboot parameter.

Change-Id: I5830dcf58ec6905b0bc382599aa9ff1251f817d8
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable uprobes
Karol Lewandowski [Fri, 8 Sep 2017 10:13:15 +0000 (12:13 +0200)]
ARM64: tizen_bcmrpi3_defconfig: enable uprobes

This functionality is needed for D-Bus Observability Tools
(developed in platform/tools/bcc).

uprobes allows monitoring userspace processes with eBPF
without code modification.

Change-Id: Ic163b72a8315602b89059f36615b88da892aeb0d

4 years agoInput: rpi_ft5406 - add enable sysfs attribute
KwangCheol Lee [Mon, 11 Sep 2017 05:09:08 +0000 (14:09 +0900)]
Input: rpi_ft5406 - add enable sysfs attribute

Add enable sysfs attribute for disable/enable the touchscreen input.
This feature is required to turn the touch screen display on or off.

Change-Id: I4d5250c32cc2118f0f19a8a3cfb76ea8574f6937
Signed-off-by: KwangCheol Lee <kclee@dignsys.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable BPF and KPROBES
Maciej Slodczyk [Fri, 8 Sep 2017 12:56:42 +0000 (14:56 +0200)]
ARM64: tizen_bcmrpi3_defconfig: enable BPF and KPROBES

Enable BPF and KPROBES config options.

This functionality is needed for D-Bus Observability Tools,
eBPF (http://www.brendangregg.com/ebpf.html).

Change-Id: I2415ca28695e212ee1d02dd1480613cad8a5455c
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: synchronize the defconfig with pwm
Seung-Woo Kim [Mon, 11 Sep 2017 05:58:06 +0000 (14:58 +0900)]
ARM64: tizen_bcmrpi3_defconfig: synchronize the defconfig with pwm

It synchronizes the defconfig with pwm backlight to fix the commit
d1b5d090a9f8 ("ARM64: tizen_bcmrpi3_defconfig: enable the RPI touchscreen LCD")
because PWM config option added more config options to backlight.

Change-Id: Ie831a2601807a1f9ba729cf64fb98449147ed018
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agodrm/vc4: Workaround for crtc scanout device problem
Hoegeun Kwon [Thu, 7 Sep 2017 07:24:56 +0000 (16:24 +0900)]
drm/vc4: Workaround for crtc scanout device problem

Currently, the crtc device does not start a scanout, the time of
vblank is always calculated as future value. As a workaround, always
change vpos to a positive number.

Change-Id: I02527a0cfbd03d7713fa992d8ee039ffc8e0c5de
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
4 years agoARM64: dts: bcm2710-rpi-3-b: add DT support for DRM relevant devices
KwangCheol Lee [Mon, 7 Aug 2017 07:33:36 +0000 (16:33 +0900)]
ARM64: dts: bcm2710-rpi-3-b: add DT support for DRM relevant devices

Add DTs to support the official RPI touchscreen LCD.

Change-Id: Ibf3b17bfe5d1f0bbe55f941018a489899e8ea9ef
Signed-off-by: KwangCheol Lee <kclee@dignsys.com>
4 years agoBCM270X: Enable the DSI panel node in the VC4 overlay.
Eric Anholt [Thu, 2 Jun 2016 22:09:35 +0000 (15:09 -0700)]
BCM270X: Enable the DSI panel node in the VC4 overlay.

Change-Id: I46fdcdb53b79bd4f0db5022a415f6d1b9faf28e9
Signed-off-by: Eric Anholt <eric@anholt.net>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable the RPI touchscreen LCD
KwangCheol Lee [Mon, 7 Aug 2017 07:31:00 +0000 (16:31 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable the RPI touchscreen LCD

Enable following configurations for the official RPI touchscreen LCD.
+ TOUCHSCREEN_RPI_FT5406
+ I2C_GPIO
+ DRM_PANEL_RASPBERRYPI_TOUCHSCREEN
+ BACKLIGHT_RPI

Change-Id: I4c11ef34ea87ddeb120a5bc685905dffb5a8654c
Signed-off-by: KwangCheol Lee <kclee@dignsys.com>
4 years agoARM: dts: bcm2710-rpi-3-b: enable spi0 device node
Inki Dae [Tue, 5 Sep 2017 03:09:36 +0000 (12:09 +0900)]
ARM: dts: bcm2710-rpi-3-b: enable spi0 device node

Enable spi0 device node.

This patch is required to create spidev node which is used
by user space to control spi.

Change-Id: I8dec8288f6b35f628b178e0056d664b96f18ac4b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable SQUASHFS
Seung-Woo Kim [Wed, 30 Aug 2017 02:59:40 +0000 (11:59 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable SQUASHFS

To support compressed readonly image from Tizen, squashfs will be
used. Enable SQUASHFS and realted configuration. For better
performance, also SQUASHFS_DECOMP_MULTI_PERCPU and
SQUASHFS_4K_DEVBLK_SIZE options are set.

Change-Id: I8d7fb37f8b2bbe102fedc6c9d7d9c4c242d6ec32
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable SMACK_NETFILTER
Seung-Woo Kim [Tue, 29 Aug 2017 05:56:16 +0000 (14:56 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable SMACK_NETFILTER

On Tizen, nether service is failed because security smack netfilter
related configs are not enabled. So, enable related configs
including CONFIG_NETWORK_SECMARK, and CONFIG_SECURITY_SMACK_NETFILTER
and others.

Change-Id: Ia886ba9d5dd9bc559633acf3066818e57551f8f4
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: dts: bcm2710-rpi-3-b : Change audio node status as "okay"
Lee Hackseung [Thu, 10 Aug 2017 06:48:39 +0000 (15:48 +0900)]
ARM: dts: bcm2710-rpi-3-b : Change audio node status as "okay"

Start.elf uses dt overlay concept, so each node status can be
overlayed with dtparam=audio=on in config.txt but u-boot does not.
So, change status of on-board audio dt node as "okay" because dt
overlay concept on u-boot requires too huge effort.

Fixing dts file from arm will also change arm64 because arm64 dts
includes arm dts.

Change-Id: I73b3c807968c031ba046f44e937c6828ee7f0119
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
[jcsing.lee@samsung.com: modify commit message more clearly]
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agoarm64: bcmrpi3_defconfig: Enable features related to bcm sound
Lee Hackseung [Thu, 10 Aug 2017 05:50:09 +0000 (14:50 +0900)]
arm64: bcmrpi3_defconfig: Enable features related to bcm sound

Enable SND_BCM2835 that has essential functionalities to
play and capture sounds and enable configurations related to PWM
because earjack works through PWM devices.

Change-Id: I04f7ea23b9bdd447a7f8084d8ce5c6f73ebd9992
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
[jcsing.lee@samsung.com: modify commit message more clearly]
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable android logger
Karol Lewandowski [Wed, 12 Jul 2017 09:54:23 +0000 (11:54 +0200)]
ARM64: tizen_bcmrpi3_defconfig: enable android logger

To support logger driver backend from Tizen dlog framework, enable
android logger.

Change-Id: I24960463efc40637858c0873ac7400fa0e806650
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
4 years agostaging: logger: fix build error due to removed ki_nbytes
Inki Dae [Mon, 4 Jul 2016 08:28:46 +0000 (17:28 +0900)]
staging: logger: fix build error due to removed ki_nbytes

This patch fixes build error. Logger driver was removed
from mainline kernel and after that there was some changes and
one of them is that ki_nbytes member was removed from kiocb structure.
66ee59a fs: remove ki_nbytes

This patch makes count member of iov_iter structure to be used instead.

Change-Id: I11e9ebdac7dd86c02fd692a67562a23e5c685f69
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
4 years agostaging: android: logger: fix the compiler error
Jaehoon Chung [Fri, 5 Jan 2018 00:40:02 +0000 (09:40 +0900)]
staging: android: logger: fix the compiler error

Moved signal wakeup & sigpending methods from <linux/sched.h> into
<linux/sched/signal.h>.

Refer to commit 174cd4b1e5fb (sched/headers: Prepare to move signal
wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>

Fix the compiler error about android logger.

Change-Id: Iab1583fe54fef1c76a34673d1d718f73930baa11
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoRevert "staging: Remove logger and alarm-dev from android Makefile"
Karol Lewandowski [Mon, 3 Jul 2017 12:01:57 +0000 (14:01 +0200)]
Revert "staging: Remove logger and alarm-dev from android Makefile"

This reverts commit 71e365ed0ca893cae8d72cbd4b476a9589003098.

Change-Id: I190dabd2626ca7cb51d00d9fe186d15da21ae405
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
4 years agoRevert "staging: Remove the Android logger driver"
Karol Lewandowski [Mon, 3 Jul 2017 12:00:55 +0000 (14:00 +0200)]
Revert "staging: Remove the Android logger driver"

This reverts commit a0a23bbce7818c90c3d3370af966fefce07a8c9b.

rpi3 is going to be used for various profiles - among these
there will be IoT and Headless, which still depend on legacy
android logger driver for application logging.

This commit reverts removal of the driver.

Change-Id: I61ab9e87c5bcbf318aa35ec2f92a470b54a98be1
Requested-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: update the defconfig for synchronization
Jaehoon Chung [Tue, 22 Aug 2017 03:00:20 +0000 (12:00 +0900)]
ARM64: tizen_bcmrpi3_defconfig: update the defconfig for synchronization

It updates the defconfig for synchronization.

Change-Id: I2f1b2aa7cdcc82c0df0407cde155569884181471
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable BLUETOOTH
Lee Hackseung [Mon, 10 Jul 2017 10:36:22 +0000 (19:36 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable BLUETOOTH

Activate Bluetooth related settings.

Change-Id: I6c9496341698aadc66934ab93a3b54d2f82894ad
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable UVC
Lee Hackseung [Fri, 11 Aug 2017 06:17:38 +0000 (15:17 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable UVC

Activate all settings related to UVC(USB Video Class)

Change-Id: I6d5d3d388d06fc4b5ae9510db63f4398f8fe84fe
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable USB audio driver
Jaechul Lee [Fri, 28 Jul 2017 07:48:32 +0000 (16:48 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable USB audio driver

Activate ALSA USB related settings.

Change-Id: I03d6c9cd9eb6e55667f7bd92717b6beeb304aa1b
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
[jcsing.lee: adjust commit message]
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable GPIO_BCM_EXP
Joonyoung Shim [Wed, 26 Jul 2017 05:27:19 +0000 (14:27 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable GPIO_BCM_EXP

VC4 DRM hdmi uses HPD gpio controlled by Broadcom expander GPIO driver,
so enable GPIO_BCM_EXP config.

Change-Id: I1457a0d2d9d071363eb2f43225a308eeeaaa3353
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable INPUT_EVDEV
Andi Shyti [Tue, 25 Jul 2017 01:55:38 +0000 (10:55 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable INPUT_EVDEV

Tizen needs the dev/input/eventX to interface for with the mouse,
INPUT_EVDEV enables it.

Change-Id: I3a9566a10b8764fe5af21fc6b1361cf9e8040a23
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable SPI_BCM2835
Hyeongsik Min [Tue, 11 Jul 2017 11:24:27 +0000 (20:24 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable SPI_BCM2835

Enables support of BCM2835 SPI driver needed by peripheral-io.

Change-Id: Ibf2aaca64462e4046ba155d11783f19f912ef8c3
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: increase the ramdisk size to 12MB
Jaehoon Chung [Mon, 27 Mar 2017 07:54:15 +0000 (16:54 +0900)]
ARM64: tizen_bcmrpi3_defconfig: increase the ramdisk size to 12MB

Increase the ramdisk size from 4MB to 12MB. Tizen normal ramdisk
size should be under 8MB and the size of ramdisk-recovery should
be 12MB.

Change-Id: I474a32f8fb1233d36b837806dde54e376a0cafdd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[sw0312.kim: squash change size for 8MB and 12MB]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defcofig: enable audit subsystem
Karol Lewandowski [Thu, 1 Jun 2017 12:17:37 +0000 (14:17 +0200)]
ARM64: tizen_bcmrpi3_defcofig: enable audit subsystem

Syscall auditing is going to be used by fault detection service - faultd.

Change-Id: Ifc6853e12fcc90497bd8a222eecb44fdd09f57ba
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defcofig: enable the configs relevant to bridge
Jaehoon Chung [Mon, 22 May 2017 23:53:49 +0000 (08:53 +0900)]
ARM64: tizen_bcmrpi3_defcofig: enable the configs relevant to bridge

Enable the configs relevant to BRIDGE and STP.

Change-Id: Iabb67ec49d176ff5fe6083dfc4a48ed40d683d1a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable the MAC80211 and RT2X00 configs
Jaehoon Chung [Fri, 19 May 2017 03:37:59 +0000 (12:37 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable the MAC80211 and RT2X00 configs

To use Ralink driver, enable the configurations relevant to it.

Change-Id: I5122405b297caf1f6f1e56d02a524d504671d910
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable USB_SERIAL configurations
Jaehoon Chung [Wed, 17 May 2017 05:41:08 +0000 (14:41 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable USB_SERIAL configurations

Enable USB_SERIAL configurations.
(CONFIG_SERIAL, CONFIG_SERIAL_GENERIC, CONFIG_SERIAL_CP210X)

Change-Id: Icead3fc34b2e37889a1dd407c24aff1444a5ab20
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agodrm/vc4: add gem_info node via debugfs
Joonyoung Shim [Thu, 23 Mar 2017 06:11:01 +0000 (15:11 +0900)]
drm/vc4: add gem_info node via debugfs

The memps requires gem_info with gem_names to analyze graphics
shared memory, so this patch adds gem_info node via debugfs
interface.

Let's save pid/tgid in private file data only once when gem object is
created or prime_fd is imported and use them on gem_info. This is to
solve the wrong pid problem of gem_info created as different processes
share fd of drm device node.

Change-Id: Iaac2ccd63e124dd11a894f0e88ddbb533750f3d4
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[sw0312.kim: fix wrong printing format in gem_info debugfs for 32bit arm build with %zx]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: enable I2C_CHARDEV
Andi Shyti [Fri, 31 Mar 2017 06:23:47 +0000 (15:23 +0900)]
ARM64: tizen_bcmrpi3_defconfig: enable I2C_CHARDEV

The I2C_CHARDEV flag enables the compilation of the i2c-dev
driver which generates a character device of the type /dev/i2c-X
where userspace programs can access to the i2c devices without
the support of any device drivers.

Change-Id: I661d8590bc219c6500bb5fca89df0436aa0efdca
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
4 years agoARM64: dts: bcm2710-rpi-3-b: enable i2c1
Andi Shyti [Fri, 31 Mar 2017 06:20:27 +0000 (15:20 +0900)]
ARM64: dts: bcm2710-rpi-3-b: enable i2c1

i2c bus number 1 is mapped in the Raspberry Pi gpio array for
connecting through i2c external devices.

Change-Id: Ia8f72952f4aed1d737ab75c239ead25bb97d2e3c
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
4 years agoARM64: rpi3: config: enable configurations relevant to WiFi
Jaehoon Chung [Tue, 7 Feb 2017 07:50:54 +0000 (16:50 +0900)]
ARM64: rpi3: config: enable configurations relevant to WiFi

Enable configurations relevant to WiFi.
These configurations are basic configs for using Network.
If needs to enable more configuration, it should be enabled in future.

To use WiFi, enable the brcmfmac driver as modules.
(Needs to install modules in target.)

Change-Id: Ia9961018f6736e3bc709c0d760f0d2d02994c7c8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Disable FB_BCM2708
Joonyoung Shim [Tue, 7 Feb 2017 05:01:04 +0000 (14:01 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Disable FB_BCM2708

Disable FB driver because of using DRM driver.

Change-Id: I3bfb899c1e0c71a235952934ecaf749a1d90dd85
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: increase CMA size to 256MiB
Joonyoung Shim [Mon, 6 Feb 2017 06:55:03 +0000 (15:55 +0900)]
ARM64: tizen_bcmrpi3_defconfig: increase CMA size to 256MiB

CMA size 5MiB or 64MiB are insufficient in tizen platform.

Change-Id: I83fa78d12af93361a87f0819b7b7abcd5b23fb2e
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable I2C_BCM2835
Joonyoung Shim [Tue, 7 Feb 2017 04:58:35 +0000 (13:58 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable I2C_BCM2835

It needs to enable I2C_BCM2835 to bind HDMI from drm driver.

Change-Id: Ifcfbcb7bd3ac5a76c2cbbb1acdec45a48bee0201
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable DRM_VC4
Joonyoung Shim [Tue, 7 Feb 2017 04:57:30 +0000 (13:57 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable DRM_VC4

Enable DRM_VC4 driver for tizen platform.

v2: DRM_VC4 need also to enable SND and SND_SOC configs.

Change-Id: I85568d78710d81ffa4cb1ec6373647e31962d1fe
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agoarm: dts: Add support for drm vc4 on RPI3
Hoegeun Kwon [Thu, 19 Jan 2017 04:49:54 +0000 (13:49 +0900)]
arm: dts: Add support for drm vc4 on RPI3

Fixed the DT status to operate drm vc4.

Change-Id: I06aa84303e1a7c10647ace3799ec09d08ca045eb
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
4 years agoscripts: mkbootimg_rpi3.sh: Add u-boot and optee binaries to boot.img
Seung-Woo Kim [Tue, 12 Sep 2017 05:55:31 +0000 (14:55 +0900)]
scripts: mkbootimg_rpi3.sh: Add u-boot and optee binaries to boot.img

In boot.img for tizen rpi3 image, u-boot and optee atf binaries
are required, so the files should be also installed in boot.img.
Add u-boot.img with optee os for atf and u-boot received from
download.tizen.org to boot.img.

Change-Id: I9778ea5c72697c3e7d0a534627fc65841bb792a1
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: mkbootimg_rpi3.sh: Add ARM64 kernel/dtb binary to boot.img
Joonyoung Shim [Thu, 9 Feb 2017 06:40:12 +0000 (15:40 +0900)]
scripts: mkbootimg_rpi3.sh: Add ARM64 kernel/dtb binary to boot.img

Add script to create boot.img having boot related files with fat
file system.

Change-Id: I7a03c11ef155dd3ad5fc935511ae764ef699c145
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[sw0312.kim: remove not required kernel.img and add sync command before umount]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: Add mkbootimg_rpi3.sh
Joonyoung Shim [Tue, 31 Jan 2017 07:16:38 +0000 (16:16 +0900)]
scripts: Add mkbootimg_rpi3.sh

This script is to make boot.img that is fused at boot partition.

Change-Id: I383fc8dee8460176c825e4ea360d37d62072e6d6
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agotools: Add build script for ARM64 kernel of rpi3
Joonyoung Shim [Wed, 25 Jan 2017 04:50:37 +0000 (13:50 +0900)]
tools: Add build script for ARM64 kernel of rpi3

This patch adds build script to build the ARM64 kernel for rpi3 board.

v2: Remove codes for creating fit style image from its

Change-Id: Ie7fa6dbf0b6838832b6a05326fa0ca27e3a7a812
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agopackaging: Added '.gbs.conf' for partial build
Jaechul Lee [Mon, 30 Jan 2017 23:58:22 +0000 (08:58 +0900)]
packaging: Added '.gbs.conf' for partial build

Added gbs configuration file for enhanced building.
it makes gbs build faster than before.

https://source.tizen.org/documentation/reference/git-build-system/maintenance-models-supported-gbs

Change-Id: I79d57aa5eb49d0fbfa9a3744ec2acb032a274e5e
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agopackaging: Disable UBSan build
Denis Khalikov [Fri, 25 Aug 2017 13:11:14 +0000 (16:11 +0300)]
packaging: Disable UBSan build

UBSan build on kernel will cause build error because kernel has its own
sanitizer build options. So, dislable UBSan build from packaging spec.

Change-Id: Ife910a1e666c6fcafb7ef7bfcc072d88d8549d77
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: Turn off building with ASan
Gonzha Dmitriy Evgenevich [Wed, 24 May 2017 10:51:05 +0000 (13:51 +0300)]
packaging: Turn off building with ASan

Turn off ASan for ASan sanitized firmware build

Change-Id: If786306821ff22e994efaba2b00dcabcc5eb8426
Signed-off-by: Gonzha Dmitriy Evgenevich <d.gonzha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: Add kernel devel package
Alexander Aksenov [Thu, 27 Jul 2017 12:53:34 +0000 (15:53 +0300)]
packaging: Add kernel devel package

Kernel devel is used now to build out-of-tree kernel modules

Change-Id: I753edba92042561b50dc6c645f23659a65568976
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
4 years agopackaging: Add spec file for rpi
Joonyoung Shim [Tue, 24 Jan 2017 04:19:59 +0000 (13:19 +0900)]
packaging: Add spec file for rpi

This adds linux-rpi3.spec file for ARM64/armv7l rpm packaging.

Change-Id: I428fd32b69d082d935159476ace30c59c14b570d
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[jh80.chung, sw0312.kim: Update kernel version to v4.14.y in spec file]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[sw0312.kim: Rename spec file without arch name]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable SMACK
Joonyoung Shim [Tue, 7 Feb 2017 04:26:20 +0000 (13:26 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable SMACK

It needs to enable configs related with SMACK for booting tizen
platform.

Change-Id: If58917b798c1bee0c16cd5e430a065e40852b97b
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Sync with .config
Joonyoung Shim [Tue, 7 Feb 2017 04:25:14 +0000 (13:25 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Sync with .config

Change-Id: I4e11df92a40b5f4c48891a6e772d898ff58de6e8
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agorpi3: config: Enable camera
Hackseung Lee [Wed, 6 Dec 2017 08:33:44 +0000 (17:33 +0900)]
rpi3: config: Enable camera

Add configration to enable the Raspberry Pi Camera Module in config.txt file.

Change-Id: I092851a559ebab462babf8c176a190339285ef9d
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
4 years agorpi3: enable jtag gpio option
Seung-Woo Kim [Thu, 26 Oct 2017 03:55:05 +0000 (12:55 +0900)]
rpi3: enable jtag gpio option

Enable jtag gpio option at 1st bootloader level. The option
enables jtag gpio as alt4 mode as like following:
 GPIO22 - PIN13 - TRST
 GPIO23 - PIN16 - RTCK
 GPIO24 - PIN18 - TDO
 GPIO25 - PIN22 - TCK
 GPIO26 - PIN37 - TDI
 GPIO27 - PIN07 - TMS

This is requested for debugging secure world with jtag.

Change-Id: I0e25dd9ecf95fa003e56eb73eae5a668a1f6e3ba
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi3: Enable ARM atf boot for rpi3
r.tyminski [Fri, 6 Oct 2017 15:39:37 +0000 (17:39 +0200)]
rpi3: Enable ARM atf boot for rpi3

Boot rpi3 with u-boot-spl.bin which enables ARM atf.
Other booting options are set as like:
https://github.com/OP-TEE/build/blob/master/rpi3/firmware/config.txt

Change-Id: I0c0559c3f72f252c2cd2716b746b3c49b04fd63e
Signed-off-by: Rafal Tyminski <r.tyminski@partner.samsung.com>
[sw0312.kim: add more options and adjust commit-msg]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi3: enable uart in bootcode.bin
Łukasz Stelmach [Fri, 29 Sep 2017 13:51:08 +0000 (15:51 +0200)]
rpi3: enable uart in bootcode.bin

The uart_2ndstage option directs bootcode.bin to print some diagnostics,
that indicate the code is running.

Change-Id: I34a68ae3b5c2467ee58fd81adf687ce367e1ed1c
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
4 years agorpi3: config: change the 'kernel' parameter from Image to u-boot.bin
Jaehoon Chung [Wed, 12 Jul 2017 04:22:47 +0000 (13:22 +0900)]
rpi3: config: change the 'kernel' parameter from Image to u-boot.bin

It needs to use the u-boot for supporting ramdisk booting.
Current release image is including the u-boot.bin that modified the ramdisk
booting sequence.

Change the kernel parameter from "Image" to "u-boot.bin" in config.txt.

Change-Id: Icc4ddce7e9f9befba59240d02ddd9af111c92a40
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi3: config: Enable SPI interface
Hyeongsik Min [Tue, 11 Jul 2017 11:55:13 +0000 (20:55 +0900)]
rpi3: config: Enable SPI interface

Uncomment spi=on in config.txt file to enable SPI interface.

Change-Id: I595628838fe9d769b243948e7118d36f4647e490
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
4 years agorpi3: config: Add loading of arm64 kernel binary & dtb
Joonyoung Shim [Tue, 31 Jan 2017 01:57:34 +0000 (10:57 +0900)]
rpi3: config: Add loading of arm64 kernel binary & dtb

Change-Id: Ib553d02595e357751d0080d6aa713efe1ce9515d
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agorpi3: config: Add boot mode to select ARM or ARM64
Joonyoung Shim [Wed, 25 Jan 2017 07:57:30 +0000 (16:57 +0900)]
rpi3: config: Add boot mode to select ARM or ARM64

Add configration to select boot mode in config.txt file, then we can
determine booting in 32-bit mode or 64-bit mode.

Change-Id: I2a5a1b11c4c83f514a7e8cc4c2f077b0b1d02cdc
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agorpi3: config: Enable serial
Joonyoung Shim [Wed, 25 Jan 2017 06:58:47 +0000 (15:58 +0900)]
rpi3: config: Enable serial

Add configration to enable serial in config.txt file, then we can serial
log from kernel or u-boot during booting.

Change-Id: Iebe3345b52cb2886daa0d8bdf1e15747dde2af39
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agorpi3: Add config.txt extracted from raspbian lite binary
Joonyoung Shim [Wed, 25 Jan 2017 09:41:38 +0000 (18:41 +0900)]
rpi3: Add config.txt extracted from raspbian lite binary

We can get raspbian lite binary from
https://downloads.raspberrypi.org/raspbian_lite_latest

This file that is necessary for booting was extracted from first
partition of 2017-07-05-raspbian-jessie-lite.img.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
4 years agorpi3: Add boot files from github
Joonyoung Shim [Wed, 26 Jul 2017 00:07:51 +0000 (09:07 +0900)]
rpi3: Add boot files from github

We can get boot binaries that are necessary for booting from master
branch of https://github.com/raspberrypi/firmware.

The git base is the commit 83977fe3b6ef ("kernel: Bump to 4.14.98").

LICENCE.broadcom
bootcode.bin
fixup*.dat
start*.elf

TYPES of each firmware:
start.elf       / fixup.dat     - normal
start_x.elf     / fixup_x.dat   - with extra feature including camera (start_x=1 in config.txt)
start_cd.elf    / fixup_cd.dat  - cut-down to minimum gpu set 16M
start_db.elf    / fixup_db.dat  - debug (start_debug=1 in config.txt)

NOTE:
start_x=1 in config.txt should be specified when using the camera
module and it implies start_file=start_x.elf/fixup_file=fixup_x.dat.

Change-Id: I827b4cb94b3f8baa805938cd9f44947be7865f0e
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[lhs: Add firmware files for camera]
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
[sw0312.kim: update firmware files including extra, cutdown and debug features]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agooverlays: Add missing rpi-poe parameters
Phil Elwell [Fri, 27 Mar 2020 13:49:25 +0000 (13:49 +0000)]
overlays: Add missing rpi-poe parameters

The rpi-poe fan overlay has gained two more fan speeds and adjusted
the thresholds and hystereses.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoMerge remote-tracking branch 'stable/linux-4.19.y' into rpi-4.19.y
popcornmix [Thu, 26 Mar 2020 16:40:35 +0000 (16:40 +0000)]
Merge remote-tracking branch 'stable/linux-4.19.y' into rpi-4.19.y

4 years agoReduce noise from rpi poe hat fan
Nick B [Mon, 9 Mar 2020 13:05:39 +0000 (09:05 -0400)]
Reduce noise from rpi poe hat fan

This adds 2 extra states, at 40c and 45c, with PWM of 31 and 63 (out
of 255) for the rpi poe hat fan.  This significantly improves user
experience by providing a smoother ramp up of the fan, from a pwm 0
to 31 to 63 then finally to 150, and additionally makes it very easy
for users to further tweak the values as needed for their specific
application.

The possible concerns I have are that a hysteresis of 2000 (2c) could
be too narrow, and that running the fan more at a reduced temperature
(40000 - 40c) could cause problems.

Signed-off-by: Nick B <nick@pelagiris.org>
4 years agoLinux 4.19.113 old/upstream-4.19.y v4.19.113
Greg Kroah-Hartman [Wed, 25 Mar 2020 07:06:15 +0000 (08:06 +0100)]
Linux 4.19.113

4 years agostaging: greybus: loopback_test: fix potential path truncations
Johan Hovold [Thu, 12 Mar 2020 11:01:51 +0000 (12:01 +0100)]
staging: greybus: loopback_test: fix potential path truncations

commit ae62cf5eb2792d9a818c2d93728ed92119357017 upstream.

Newer GCC warns about possible truncations of two generated path names as
we're concatenating the configurable sysfs and debugfs path prefixes
with a filename and placing the results in buffers of the same size as
the maximum length of the prefixes.

snprintf(d->name, MAX_STR_LEN, "gb_loopback%u", dev_id);

snprintf(d->sysfs_entry, MAX_SYSFS_PATH, "%s%s/",
 t->sysfs_prefix, d->name);

snprintf(d->debugfs_entry, MAX_SYSFS_PATH, "%sraw_latency_%s",
 t->debugfs_prefix, d->name);

Fix this by separating the maximum path length from the maximum prefix
length and reducing the latter enough to fit the generated strings.

Note that we also need to reduce the device-name buffer size as GCC
isn't smart enough to figure out that we ever only used MAX_STR_LEN
bytes of it.

Fixes: 6b0658f68786 ("greybus: tools: Add tools directory to greybus repo and add loopback")
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20200312110151.22028-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: loopback_test: fix potential path truncation
Johan Hovold [Thu, 12 Mar 2020 11:01:50 +0000 (12:01 +0100)]
staging: greybus: loopback_test: fix potential path truncation

commit f16023834863932f95dfad13fac3fc47f77d2f29 upstream.

Newer GCC warns about a possible truncation of a generated sysfs path
name as we're concatenating a directory path with a file name and
placing the result in a buffer that is half the size of the maximum
length of the directory path (which is user controlled).

loopback_test.c: In function 'open_poll_files':
loopback_test.c:651:31: warning: '%s' directive output may be truncated writing up to 511 bytes into a region of size 255 [-Wformat-truncation=]
  651 |   snprintf(buf, sizeof(buf), "%s%s", dev->sysfs_entry, "iteration_count");
      |                               ^~
loopback_test.c:651:3: note: 'snprintf' output between 16 and 527 bytes into a destination of size 255
  651 |   snprintf(buf, sizeof(buf), "%s%s", dev->sysfs_entry, "iteration_count");
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by making sure the buffer is large enough the concatenated
strings.

Fixes: 6b0658f68786 ("greybus: tools: Add tools directory to greybus repo and add loopback")
Fixes: 9250c0ee2626 ("greybus: Loopback_test: use poll instead of inotify")
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20200312110151.22028-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agodrm/bridge: dw-hdmi: fix AVI frame colorimetry
Jernej Skrabec [Wed, 4 Mar 2020 23:25:09 +0000 (00:25 +0100)]
drm/bridge: dw-hdmi: fix AVI frame colorimetry

commit e8dca30f7118461d47e1c3510d0e31b277439151 upstream.

CTA-861-F explicitly states that for RGB colorspace colorimetry should
be set to "none". Fix that.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200304232512.51616-2-jernej.skrabec@siol.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoarm64: smp: fix crash_smp_send_stop() behaviour
Cristian Marussi [Wed, 11 Mar 2020 17:12:45 +0000 (17:12 +0000)]
arm64: smp: fix crash_smp_send_stop() behaviour

commit f50b7dacccbab2b9e3ef18f52a6dcc18ed2050b9 upstream.

On a system configured to trigger a crash_kexec() reboot, when only one CPU
is online and another CPU panics while starting-up, crash_smp_send_stop()
will fail to send any STOP message to the other already online core,
resulting in fail to freeze and registers not properly saved.

Moreover even if the proper messages are sent (case CPUs > 2)
it will similarly fail to account for the booting CPU when executing
the final stop wait-loop, so potentially resulting in some CPU not
been waited for shutdown before rebooting.

A tangible effect of this behaviour can be observed when, after a panic
with kexec enabled and loaded, on the following reboot triggered by kexec,
the cpu that could not be successfully stopped fails to come back online:

[  362.291022] ------------[ cut here ]------------
[  362.291525] kernel BUG at arch/arm64/kernel/cpufeature.c:886!
[  362.292023] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[  362.292400] Modules linked in:
[  362.292970] CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Not tainted 5.6.0-rc4-00003-gc780b890948a #105
[  362.293136] Hardware name: Foundation-v8A (DT)
[  362.293382] pstate: 200001c5 (nzCv dAIF -PAN -UAO)
[  362.294063] pc : has_cpuid_feature+0xf0/0x348
[  362.294177] lr : verify_local_elf_hwcaps+0x84/0xe8
[  362.294280] sp : ffff800011b1bf60
[  362.294362] x29: ffff800011b1bf60 x28: 0000000000000000
[  362.294534] x27: 0000000000000000 x26: 0000000000000000
[  362.294631] x25: 0000000000000000 x24: ffff80001189a25c
[  362.294718] x23: 0000000000000000 x22: 0000000000000000
[  362.294803] x21: ffff8000114aa018 x20: ffff800011156a00
[  362.294897] x19: ffff800010c944a0 x18: 0000000000000004
[  362.294987] x17: 0000000000000000 x16: 0000000000000000
[  362.295073] x15: 00004e53b831ae3c x14: 00004e53b831ae3c
[  362.295165] x13: 0000000000000384 x12: 0000000000000000
[  362.295251] x11: 0000000000000000 x10: 00400032b5503510
[  362.295334] x9 : 0000000000000000 x8 : ffff800010c7e204
[  362.295426] x7 : 00000000410fd0f0 x6 : 0000000000000001
[  362.295508] x5 : 00000000410fd0f0 x4 : 0000000000000000
[  362.295592] x3 : 0000000000000000 x2 : ffff8000100939d8
[  362.295683] x1 : 0000000000180420 x0 : 0000000000180480
[  362.296011] Call trace:
[  362.296257]  has_cpuid_feature+0xf0/0x348
[  362.296350]  verify_local_elf_hwcaps+0x84/0xe8
[  362.296424]  check_local_cpu_capabilities+0x44/0x128
[  362.296497]  secondary_start_kernel+0xf4/0x188
[  362.296998] Code: 52805001 72a00301 6b01001f 54000ec0 (d4210000)
[  362.298652] SMP: stopping secondary CPUs
[  362.300615] Starting crashdump kernel...
[  362.301168] Bye!
[    0.000000] Booting Linux on physical CPU 0x0000000003 [0x410fd0f0]
[    0.000000] Linux version 5.6.0-rc4-00003-gc780b890948a (crimar01@e120937-lin) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #105 SMP PREEMPT Fri Mar 6 17:00:42 GMT 2020
[    0.000000] Machine model: Foundation-v8A
[    0.000000] earlycon: pl11 at MMIO 0x000000001c090000 (options '')
[    0.000000] printk: bootconsole [pl11] enabled
.....
[    0.138024] rcu: Hierarchical SRCU implementation.
[    0.153472] its@2f020000: unable to locate ITS domain
[    0.154078] its@2f020000: Unable to locate ITS domain
[    0.157541] EFI services will not be available.
[    0.175395] smp: Bringing up secondary CPUs ...
[    0.209182] psci: failed to boot CPU1 (-22)
[    0.209377] CPU1: failed to boot: -22
[    0.274598] Detected PIPT I-cache on CPU2
[    0.278707] GICv3: CPU2: found redistributor 1 region 0:0x000000002f120000
[    0.285212] CPU2: Booted secondary processor 0x0000000001 [0x410fd0f0]
[    0.369053] Detected PIPT I-cache on CPU3
[    0.372947] GICv3: CPU3: found redistributor 2 region 0:0x000000002f140000
[    0.378664] CPU3: Booted secondary processor 0x0000000002 [0x410fd0f0]
[    0.401707] smp: Brought up 1 node, 3 CPUs
[    0.404057] SMP: Total of 3 processors activated.

Make crash_smp_send_stop() account also for the online status of the
calling CPU while evaluating how many CPUs are effectively online: this way
the right number of STOPs is sent and all other stopped-cores's registers
are properly saved.

Fixes: 78fd584cdec05 ("arm64: kdump: implement machine_crash_shutdown()")
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoarm64: smp: fix smp_send_stop() behaviour
Cristian Marussi [Wed, 11 Mar 2020 17:12:44 +0000 (17:12 +0000)]
arm64: smp: fix smp_send_stop() behaviour

commit d0bab0c39e32d39a8c5cddca72e5b4a3059fe050 upstream.

On a system with only one CPU online, when another one CPU panics while
starting-up, smp_send_stop() will fail to send any STOP message to the
other already online core, resulting in a system still responsive and
alive at the end of the panic procedure.

[  186.700083] CPU3: shutdown
[  187.075462] CPU2: shutdown
[  187.162869] CPU1: shutdown
[  188.689998] ------------[ cut here ]------------
[  188.691645] kernel BUG at arch/arm64/kernel/cpufeature.c:886!
[  188.692079] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[  188.692444] Modules linked in:
[  188.693031] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.6.0-rc4-00001-g338d25c35a98 #104
[  188.693175] Hardware name: Foundation-v8A (DT)
[  188.693492] pstate: 200001c5 (nzCv dAIF -PAN -UAO)
[  188.694183] pc : has_cpuid_feature+0xf0/0x348
[  188.694311] lr : verify_local_elf_hwcaps+0x84/0xe8
[  188.694410] sp : ffff800011b1bf60
[  188.694536] x29: ffff800011b1bf60 x28: 0000000000000000
[  188.694707] x27: 0000000000000000 x26: 0000000000000000
[  188.694801] x25: 0000000000000000 x24: ffff80001189a25c
[  188.694905] x23: 0000000000000000 x22: 0000000000000000
[  188.694996] x21: ffff8000114aa018 x20: ffff800011156a38
[  188.695089] x19: ffff800010c944a0 x18: 0000000000000004
[  188.695187] x17: 0000000000000000 x16: 0000000000000000
[  188.695280] x15: 0000249dbde5431e x14: 0262cbe497efa1fa
[  188.695371] x13: 0000000000000002 x12: 0000000000002592
[  188.695472] x11: 0000000000000080 x10: 00400032b5503510
[  188.695572] x9 : 0000000000000000 x8 : ffff800010c80204
[  188.695659] x7 : 00000000410fd0f0 x6 : 0000000000000001
[  188.695750] x5 : 00000000410fd0f0 x4 : 0000000000000000
[  188.695836] x3 : 0000000000000000 x2 : ffff8000100939d8
[  188.695919] x1 : 0000000000180420 x0 : 0000000000180480
[  188.696253] Call trace:
[  188.696410]  has_cpuid_feature+0xf0/0x348
[  188.696504]  verify_local_elf_hwcaps+0x84/0xe8
[  188.696591]  check_local_cpu_capabilities+0x44/0x128
[  188.696666]  secondary_start_kernel+0xf4/0x188
[  188.697150] Code: 52805001 72a00301 6b01001f 54000ec0 (d4210000)
[  188.698639] ---[ end trace 3f12ca47652f7b72 ]---
[  188.699160] Kernel panic - not syncing: Attempted to kill the idle task!
[  188.699546] Kernel Offset: disabled
[  188.699828] CPU features: 0x00004,20c02008
[  188.700012] Memory Limit: none
[  188.700538] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---

[root@arch ~]# echo Helo
Helo
[root@arch ~]# cat /proc/cpuinfo | grep proce
processor : 0

Make smp_send_stop() account also for the online status of the calling CPU
while evaluating how many CPUs are effectively online: this way, the right
number of STOPs is sent, so enforcing a proper freeze of the system at the
end of panic even under the above conditions.

Fixes: 08e875c16a16c ("arm64: SMP support")
Reported-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoALSA: hda/realtek: Fix pop noise on ALC225
Kai-Heng Feng [Wed, 11 Mar 2020 06:13:28 +0000 (14:13 +0800)]
ALSA: hda/realtek: Fix pop noise on ALC225

commit 3b36b13d5e69d6f51ff1c55d1b404a74646c9757 upstream.

Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to
0") makes the ALC225 have pop noise on S3 resume and cold boot.

So partially revert this commit for ALC225 to fix the regression.

Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0")
BugLink: https://bugs.launchpad.net/bugs/1866357
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200311061328.17614-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoRevert "ipv6: Fix handling of LLA with VRF and sockets bound to VRF"
Sasha Levin [Mon, 23 Mar 2020 20:20:43 +0000 (16:20 -0400)]
Revert "ipv6: Fix handling of LLA with VRF and sockets bound to VRF"

This reverts commit 2b3541ffdd05198b329d21920a0f606009a1058b.

This patch shouldn't have been backported to 4.19.

Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agoRevert "vrf: mark skb for multicast or link-local as enslaved to VRF"
Sasha Levin [Mon, 23 Mar 2020 20:19:51 +0000 (16:19 -0400)]
Revert "vrf: mark skb for multicast or link-local as enslaved to VRF"

This reverts commit 91c5f99d131ed3b231aaef7d4ed6799085b095a3.

This patch shouldn't have been backported to 4.19.

Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agofutex: Unbreak futex hashing
Thomas Gleixner [Sun, 8 Mar 2020 18:07:17 +0000 (19:07 +0100)]
futex: Unbreak futex hashing

commit 8d67743653dce5a0e7aa500fcccb237cde7ad88e upstream.

The recent futex inode life time fix changed the ordering of the futex key
union struct members, but forgot to adjust the hash function accordingly,

As a result the hashing omits the leading 64bit and even hashes beyond the
futex key causing a bad hash distribution which led to a ~100% performance
regression.

Hand in the futex key pointer instead of a random struct member and make
the size calculation based of the struct offset.

Fixes: 8019ad13ef7f ("futex: Fix inode life-time issue")
Reported-by: Rong Chen <rong.a.chen@intel.com>
Decoded-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Rong Chen <rong.a.chen@intel.com>
Link: https://lkml.kernel.org/r/87h7yy90ve.fsf@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agofutex: Fix inode life-time issue
Peter Zijlstra [Wed, 4 Mar 2020 10:28:31 +0000 (11:28 +0100)]
futex: Fix inode life-time issue

commit 8019ad13ef7f64be44d4f892af9c840179009254 upstream.

As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.

This sequence number is global, but shared (file backed) futexes are
rare enough that this should not become a performance issue.

Reported-by: Jann Horn <jannh@google.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agokbuild: Disable -Wpointer-to-enum-cast
Nathan Chancellor [Wed, 11 Mar 2020 19:41:21 +0000 (12:41 -0700)]
kbuild: Disable -Wpointer-to-enum-cast

commit 82f2bc2fcc0160d6f82dd1ac64518ae0a4dd183f upstream.

Clang's -Wpointer-to-int-cast deviates from GCC in that it warns when
casting to enums. The kernel does this in certain places, such as device
tree matches to set the version of the device being used, which allows
the kernel to avoid using a gigantic union.

https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L428
https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L402
https://elixir.bootlin.com/linux/v5.5.8/source/include/linux/mod_devicetable.h#L264

To avoid a ton of false positive warnings, disable this particular part
of the warning, which has been split off into a separate diagnostic so
that the entire warning does not need to be turned off for clang. It
will be visible under W=1 in case people want to go about fixing these
easily and enabling the warning treewide.

Cc: stable@vger.kernel.org
Link: https://github.com/ClangBuiltLinux/linux/issues/887
Link: https://github.com/llvm/llvm-project/commit/2a41b31fcdfcb67ab7038fc2ffb606fd50b83a84
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>