Compare commits

...

13 Commits

Author SHA1 Message Date
Tim Gover
f2f7e4b23d dts: bcm2711: Disable DVP by default
The HDMI DVP should be disabled by default as is the case for other
display related drivers. This changes resolves an issue when using
the legacy firmware display driver where the DVP caused the 108 MHz
clock in HDMI TX to be gated off when Linux started. This effectively
stopped the firmware from being able to change the HDMI analog PHY
registers.

Add a fragment to re-enable this in vc4-kms-v3d-pi4-overlay
2020-08-07 21:28:49 +01:00
Annaliese McDermond
8ae5f3e1ec dtoverlays: Add the iio_hwmon driver to correct ADC issues
The Linux kernel maintainers removed the hwmon driver for the
ads1015 used on this board.  They deprecated it in favor of using
the IIO version of the driver with the iio_hwmon bridge.  This
patch updates the DRAWS dtoverlay to support that usage.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
2020-08-03 09:30:27 +01:00
Annaliese McDermond
237e899fed configs: add CONFIG_SENSORS_IIO_HWMON=m
The hwmon module for the ads1015 was removed from the kernel
in favor of the IIO version.  This patch adds the bridge driver
so that userland consumers of the hwmon data can continue to
do so via that interface.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
2020-08-03 09:30:27 +01:00
Dougie Lawson
33115317f0 overlays: Add maxtherm overlay for MAX6675/31855
Add an overlay - maxtherm - to support the MAX6675 and MAX31855 family
of thermocouples.

Developed from an original set of overlays by Dougie Lawson.

See: https://github.com/raspberrypi/linux/pull/3763

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-30 20:51:50 +01:00
Bartosz Golaszewski
42a52f1a2a backlight: gpio: Explicitly set the direction of the GPIO
commit 706dc68102 upstream.

The GPIO backlight driver currently requests the line 'as is', without
acively setting its direction. This can lead to problems: if the line
is in input mode by default, we won't be able to drive it later when
updating the status and also reading its initial value doesn't make
sense for backlight setting.

Request the line 'as is' initially, so that we can read its value
without affecting it but then change the direction to output explicitly
when setting the initial brightness.

Also: check the current direction and only read the value if it's output.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-07-30 19:03:03 +01:00
Phil Elwell
5790594366 overlays: Delete spi0-hw-cs
The spi0-hw-cs overlay is unnecessary (and actually harmful) with the
current kernels. Delete it, leaving a note in the README and a
deprecation message from the firmware:

    dterror: overlay 'spi0-hw-cs' is deprecated: no longer necessary

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-30 18:10:42 +01:00
Phil Elwell
5e1be66754 overlays: Fix sc16is75x overlays w.r.t. serdev
Enabling serdev support in rpi-5.4.y had the unintended consequence of
making any UART device node with a subnode look like a "serdev" node,
which prevents it from having the usual /dev/ttyXXX character device.
Solve the problem by moving the subnode (a static clock declaration)
into the root node.

At the same time, regularise (and sometimes correct) the overlays.

See: https://github.com/raspberrypi/linux/issues/3765

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-30 15:30:42 +01:00
Phil Elwell
068c6b23e9 ARM: proc-v7: Force misalignment of early stmia
In an attempt to prevent the problem of CPUn not starting, explicitly
misalign the scratch space used to save registers acros the cache
invalidation.

Notes:
At this stage in the boot process the core is running with its cache
disabled. Before enabling the cache its contents must be explicitly
invalidated, a process that requires quite a few registers that the
caller must preserve. Evidence suggests that something is writing a
block of zeroes over that space at a time when all other cores should
be idle, possibly some kind of write-combiner, and the misalignment is
designed to disrupt any write-coalescing.

In truth, I don't understand why this patch works, and when the failure
is so random it is hard to be certain that this isn't just rolling the
dice again. One interesting test would be to change the "addeq r12, #4"s
to "addeq r12, #0"s determine see if the offset itself is significant or
just the additional code.

See: https://github.com/Hexxeh/rpi-firmware/issues/232

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-30 08:56:11 +01:00
Dave Stevenson
1baaf03127 drm/vc4: Remove UIF from the list of modifiers returned by format_mod_supported
FKMS was listing UIF in the supported modifiers from format_mod_supported
when actually the pipeline doesn't support it. X was then choosing to
use it, and that then failed to render.

Remove references to UIF.

https://github.com/raspberrypi/linux/issues/3665

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2020-07-28 13:28:18 +01:00
Phil Elwell
7bbf6b4eee ARM: dts: Add UART skip-init properties for U-boot
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: https://github.com/raspberrypi/linux/pull/3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-28 13:21:40 +01:00
Phil Elwell
472be8a851 configs: Restore missing cgroups to BCM2835-7
See: https://github.com/raspberrypi/linux/issues/3644

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-27 15:34:19 +01:00
Phil Elwell
8db1715b59 configs: Adding remaining crypto API modules
Now that CONFIG_CRYPTO_USER_API_HASH=m is enabled, adding
CONFIG_CRYPTO_USER_API_RNG=m and CONFIG_CRYPTO_USER_API_AEAD=m should
allow various applications such as Bluetooth mesh support.

See: https://github.com/raspberrypi/linux/issues/3628

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2020-07-27 14:56:16 +01:00
iamdavidcz
aac47fd9e0 add CONFIG_CRYPTO_USER_API_HASH=m 2020-07-23 22:27:49 +01:00
21 changed files with 322 additions and 69 deletions

View File

@@ -102,6 +102,14 @@
};
};
&uart0 {
skip-init;
};
&uart1 {
skip-init;
};
&txp {
status = "disabled";
};

View File

@@ -46,6 +46,7 @@
clocks = <&clk_108MHz>;
#clock-cells = <1>;
#reset-cells = <1>;
status = "disabled";
};
hdmi0: hdmi@7ef00700 {

View File

@@ -98,6 +98,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
justboom-digi.dtbo \
ltc294x.dtbo \
max98357a.dtbo \
maxtherm.dtbo \
mbed-dac.dtbo \
mcp23017.dtbo \
mcp23s17.dtbo \
@@ -159,7 +160,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
spi-gpio40-45.dtbo \
spi-rtc.dtbo \
spi0-cs.dtbo \
spi0-hw-cs.dtbo \
spi1-1cs.dtbo \
spi1-2cs.dtbo \
spi1-3cs.dtbo \

View File

@@ -1622,6 +1622,36 @@ Params: no-sdmode Driver does not manage the state of the DAC's
of the DAC (default GPIO4 if parameter omitted).
Name: maxtherm
Info: Configure a MAX6675 or MAX31855 thermocouple as an IIO device.
For devices on spi1 or spi2, the interfaces should be enabled
with one of the spi1-1/2/3cs and/or spi2-1/2/3cs overlays.
The overlay expects to disable the relevant spidev node, so also using
e.g. cs0_spidev=off is unnecessary.
Note: with the 5.7 kernel (and later) there will also be
overlays for MAX31855E, MAX31855J, MAX31855K,
MAX31885N, MAX31855R, MAX31855S and MAX31855T.
Example:
MAX31855 on /dev/spidev0.0
dtoverlay=maxtherm,spi0-0,max31855
Load: dtoverlay=maxtherm,<param>=<val>
Params: spi<n>-<m> Configure device at spi<n>, cs<m>
(boolean, required)
max6675 Enable support for the MAX6675 (default)
max31855 Enable support for the MAX31855
max31855e Enable support for the MAX31855E
max31855j Enable support for the MAX31855J
max31855k Enable support for the MAX31855K
max31855n Enable support for the MAX31855N
max31855r Enable support for the MAX31855R
max31855s Enable support for the MAX31855S
max31855t Enable support for the MAX31855T
Name: mbed-dac
Info: Configures the mbed AudioCODEC (TLV320AIC23B)
Load: dtoverlay=mbed-dac
@@ -2346,9 +2376,9 @@ Params: cs0_pin GPIO pin for CS0 (default 8)
Name: spi0-hw-cs
Info: Re-enables hardware CS/CE (chip selects) for SPI0
Load: dtoverlay=spi0-hw-cs
Params: <None>
Info: This overlay has been deprecated and removed because it is no longer
necessary and has been seen to prevent spi0 from working.
Load: <Deprecated>
Name: spi1-1cs

View File

@@ -45,6 +45,13 @@
gpios = <&gpio 7 0>;
status = "okay";
};
iio-hwmon {
compatible = "iio-hwmon";
status = "okay";
io-channels = <&tla2024 4>, <&tla2024 5>, <&tla2024 6>,
<&tla2024 7>;
};
};
};
@@ -91,6 +98,7 @@
reg = <0x48>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
adc_ch4: channel@4 {
reg = <4>;

View File

@@ -0,0 +1,166 @@
/*
* Universal device tree overlay for SPI devices
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__dormant__ {
status = "disabled";
};
};
fragment@1 {
target = <&spidev1>;
__dormant__ {
status = "disabled";
};
};
fragment@2 {
target-path = "spi1/spidev@0";
__dormant__ {
status = "disabled";
};
};
fragment@3 {
target-path = "spi1/spidev@1";
__dormant__ {
status = "disabled";
};
};
fragment@4 {
target-path = "spi1/spidev@2";
__dormant__ {
status = "disabled";
};
};
fragment@5 {
target-path = "spi2/spidev@0";
__dormant__ {
status = "disabled";
};
};
fragment@6 {
target-path = "spi2/spidev@1";
__dormant__ {
status = "disabled";
};
};
fragment@7 {
target-path = "spi2/spidev@2";
__dormant__ {
status = "disabled";
};
};
maxfrag: fragment@8 {
target = <&spi0>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
max: maxtherm@0 {
compatible = "maxim,max6675";
reg = <0>;
spi-max-frequency = <500000>;
};
};
};
fragment@9 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855e", "maxim,max31855";
};
};
fragment@10 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855j", "maxim,max31855";
};
};
fragment@11 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855k", "maxim,max31855";
};
};
fragment@12 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855n", "maxim,max31855";
};
};
fragment@13 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855r", "maxim,max31855";
};
};
fragment@14 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855s", "maxim,max31855";
};
};
fragment@15 {
target = <&max>;
__dormant__ {
compatible = "maxim,max31855t", "maxim,max31855";
};
};
__overrides__ {
spi0-0 = <0>, "+0",
<&maxfrag>,"target:0=",<&spi0>,
<&max>,"reg:0=0";
spi0-1 = <0>, "+1",
<&maxfrag>,"target:0=",<&spi0>,
<&max>,"reg:0=1";
spi1-0 = <0>, "+2",
<&maxfrag>,"target:0=",<&spi1>,
<&max>,"reg:0=0";
spi1-1 = <0>, "+3",
<&maxfrag>,"target:0=",<&spi1>,
<&max>,"reg:0=1";
spi1-2 = <0>, "+4",
<&maxfrag>,"target:0=",<&spi1>,
<&max>,"reg:0=2";
spi2-0 = <0>, "+5",
<&maxfrag>,"target:0=",<&spi2>,
<&max>,"reg:0=0";
spi2-1 = <0>, "+6",
<&maxfrag>,"target:0=",<&spi2>,
<&max>,"reg:0=1";
spi2-2 = <0>, "+7",
<&maxfrag>,"target:0=",<&spi2>,
<&max>,"reg:0=2";
max6675 = <&max>,"compatible=maxim,max6675";
max31855 = <&max>,"compatible=maxim,max31855";
max31855e = <0>,"+9";
max31855j = <0>,"+10";
max31855k = <0>,"+11";
max31855n = <0>,"+12";
max31855r = <0>,"+13";
max31855s = <0>,"+14";
max31855t = <0>,"+15";
};
};

View File

@@ -61,6 +61,10 @@
deprecated = "use sdio,bus_width=1,gpios_22_25";
};
spi0-hw-cs {
deprecated = "no longer necessary";
};
spi3-1cs {
bcm2711;
};

View File

@@ -13,26 +13,31 @@
sc16is750: sc16is750@48 {
compatible = "nxp,sc16is750";
reg = <0x48>; /* address */
reg = <0x48>; /* i2c address */
clocks = <&sc16is750_clk>;
interrupt-parent = <&gpio>;
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
gpio-controller;
#gpio-cells = <2>;
sc16is750_clk: sc16is750_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
i2c-max-frequency = <400000>;
};
};
};
fragment@1 {
target-path = "/";
__overlay__ {
sc16is750_clk: sc16is750_i2c_clk@48 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
};
};
__overrides__ {
int_pin = <&sc16is750>,"interrupts:0";
addr = <&sc16is750>,"reg:0",<&sc16is750_clk>,"name";
addr = <&sc16is750>,"reg:0", <&sc16is750_clk>,"name";
xtal = <&sc16is750_clk>,"clock-frequency:0";
};
};

View File

@@ -5,29 +5,32 @@
compatible = "brcm,bcm2835";
fragment@0 {
target = <&i2c1>;
frag1: __overlay__ {
target = <&i2c_arm>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
sc16is752: sc16is752@48 {
compatible = "nxp,sc16is752";
reg = <0x48>; // i2c address
reg = <0x48>; /* i2c address */
clocks = <&sc16is752_clk>;
interrupt-parent = <&gpio>;
interrupts = <24 0x2>; /* IRQ_TYPE_EDGE_FALLING */
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
gpio-controller;
#gpio-cells = <0>;
#gpio-cells = <2>;
i2c-max-frequency = <400000>;
status = "okay";
};
};
};
sc16is752_clk: sc16is752_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
fragment@1 {
target-path = "/";
__overlay__ {
sc16is752_clk: sc16is752_i2c_clk@48 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
};
};

View File

@@ -17,15 +17,9 @@
clocks = <&sc16is752_clk>;
interrupt-parent = <&gpio>;
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
#gpio-controller;
gpio-controller;
#gpio-cells = <2>;
spi-max-frequency = <4000000>;
sc16is752_clk: sc16is752_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
};
};
};
@@ -37,8 +31,19 @@
};
};
fragment@2 {
target-path = "/";
__overlay__ {
sc16is752_clk: sc16is752_spi0_0_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
};
};
__overrides__ {
int_pin = <&sc16is752>,"interrupts:0";
xtal = <&sc16is752_clk>, "clock-frequency:0";
xtal = <&sc16is752_clk>,"clock-frequency:0";
};
};

View File

@@ -21,7 +21,7 @@
fragment@1 {
target = <&spi1>;
frag1: __overlay__ {
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
@@ -35,7 +35,7 @@
clocks = <&sc16is752_clk>;
interrupt-parent = <&gpio>;
interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
#gpio-controller;
gpio-controller;
#gpio-cells = <2>;
spi-max-frequency = <4000000>;
};
@@ -52,7 +52,7 @@
fragment@3 {
target-path = "/";
__overlay__ {
sc16is752_clk: sc16is752_spi1_clk {
sc16is752_clk: sc16is752_spi1_0_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;

View File

@@ -1,26 +0,0 @@
/*
* Device tree overlay to re-enable hardware CS for SPI0
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spi0>;
__overlay__ {
cs-gpios = <0>, <0>;
status = "okay";
};
};
fragment@1 {
target = <&spi0_cs_pins>;
__overlay__ {
brcm,pins = <8 7>;
brcm,function = <4>; /* alt0 */
};
};
};

View File

@@ -145,6 +145,13 @@
};
};
fragment@20 {
target = <&dvp>;
__overlay__ {
status = "okay";
};
};
__overrides__ {
audio = <0>,"!17";
audio1 = <0>,"!18";

View File

@@ -14,6 +14,8 @@ CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=m
CONFIG_IKCONFIG_PROC=y
CONFIG_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CPUSETS=y
@@ -710,6 +712,7 @@ CONFIG_BATTERY_MAX17040=m
CONFIG_BATTERY_GAUGE_LTC2941=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_GPIO_FAN=m
CONFIG_SENSORS_IIO_HWMON=m
CONFIG_SENSORS_JC42=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_RASPBERRYPI_HWMON=m
@@ -1443,7 +1446,10 @@ CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_USER_API_HASH=m
CONFIG_CRYPTO_USER_API_SKCIPHER=m
CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y

View File

@@ -722,6 +722,7 @@ CONFIG_BATTERY_MAX17040=m
CONFIG_BATTERY_GAUGE_LTC2941=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_GPIO_FAN=m
CONFIG_SENSORS_IIO_HWMON=m
CONFIG_SENSORS_JC42=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_RASPBERRYPI_HWMON=m
@@ -1482,7 +1483,10 @@ CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_USER_API_HASH=m
CONFIG_CRYPTO_USER_API_SKCIPHER=m
CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y

View File

@@ -13,6 +13,8 @@ CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=m
CONFIG_IKCONFIG_PROC=y
CONFIG_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
@@ -699,6 +701,7 @@ CONFIG_BATTERY_MAX17040=m
CONFIG_BATTERY_GAUGE_LTC2941=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_GPIO_FAN=m
CONFIG_SENSORS_IIO_HWMON=m
CONFIG_SENSORS_JC42=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_RASPBERRYPI_HWMON=m
@@ -1452,7 +1455,10 @@ CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_USER_API_HASH=m
CONFIG_CRYPTO_USER_API_SKCIPHER=m
CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y

View File

@@ -287,6 +287,8 @@ __v7_ca17mp_setup:
mov r10, #0
1: adr r0, __v7_setup_stack_ptr
ldr r12, [r0]
tst r12, #0x1f
addeq r12, r12, #4
add r12, r12, r0 @ the local stack
stmia r12, {r1-r6, lr} @ v7_invalidate_l1 touches r0-r6
bl v7_invalidate_l1
@@ -474,6 +476,8 @@ __v7_setup:
adr r0, __v7_setup_stack_ptr
ldr r12, [r0]
add r12, r12, r0 @ the local stack
tst r12, #0x1f
addeq r12, r12, #4
stmia r12, {r1-r6, lr} @ v7_invalidate_l1 touches r0-r6
bl v7_invalidate_l1
ldmia r12, {r1-r6, lr}
@@ -557,7 +561,7 @@ ENDPROC(__v7_setup)
.bss
.align 2
__v7_setup_stack:
.space 4 * 7 @ 7 registers
.space 4 * 8 @ 7 registers + 1 spare
__INITDATA

View File

@@ -716,6 +716,7 @@ CONFIG_BATTERY_MAX17040=m
CONFIG_BATTERY_GAUGE_LTC2941=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_GPIO_FAN=m
CONFIG_SENSORS_IIO_HWMON=m
CONFIG_SENSORS_JC42=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_RASPBERRYPI_HWMON=m
@@ -1474,7 +1475,10 @@ CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_USER_API_HASH=m
CONFIG_CRYPTO_USER_API_SKCIPHER=m
CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y

View File

@@ -13,6 +13,8 @@ CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=m
CONFIG_IKCONFIG_PROC=y
CONFIG_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CPUSETS=y
CONFIG_CGROUP_DEVICE=y
@@ -679,6 +681,7 @@ CONFIG_W1_SLAVE_DS28E17=m
CONFIG_POWER_RESET_GPIO=y
CONFIG_BATTERY_DS2760=m
CONFIG_BATTERY_MAX17040=m
CONFIG_SENSORS_IIO_HWMON=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_SHT21=m
CONFIG_SENSORS_SHTC1=m
@@ -1317,7 +1320,10 @@ CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_USER_API_HASH=m
CONFIG_CRYPTO_USER_API_SKCIPHER=m
CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m
CONFIG_CRC_ITU_T=y
CONFIG_LIBCRC32C=y
CONFIG_DMA_CMA=y

View File

@@ -718,7 +718,6 @@ static bool vc4_fkms_format_mod_supported(struct drm_plane *plane,
switch (modifier) {
case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
case DRM_FORMAT_MOD_LINEAR:
case DRM_FORMAT_MOD_BROADCOM_UIF:
return true;
default:
return false;

View File

@@ -26,9 +26,8 @@ struct gpio_backlight {
int def_value;
};
static int gpio_backlight_update_status(struct backlight_device *bl)
static int gpio_backlight_get_next_brightness(struct backlight_device *bl)
{
struct gpio_backlight *gbl = bl_get_data(bl);
int brightness = bl->props.brightness;
if (bl->props.power != FB_BLANK_UNBLANK ||
@@ -36,6 +35,14 @@ static int gpio_backlight_update_status(struct backlight_device *bl)
bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
brightness = 0;
return brightness;
}
static int gpio_backlight_update_status(struct backlight_device *bl)
{
struct gpio_backlight *gbl = bl_get_data(bl);
int brightness = gpio_backlight_get_next_brightness(bl);
gpiod_set_value_cansleep(gbl->gpiod, brightness);
return 0;
@@ -86,7 +93,8 @@ static int gpio_backlight_initial_power_state(struct gpio_backlight *gbl)
return gbl->def_value ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
/* if the enable GPIO is disabled, do not enable the backlight */
if (gpiod_get_value_cansleep(gbl->gpiod) == 0)
if (gpiod_get_direction(gbl->gpiod) == 0 &&
gpiod_get_value_cansleep(gbl->gpiod) == 0)
return FB_BLANK_POWERDOWN;
return FB_BLANK_UNBLANK;
@@ -100,7 +108,7 @@ static int gpio_backlight_probe(struct platform_device *pdev)
struct backlight_properties props;
struct backlight_device *bl;
struct gpio_backlight *gbl;
int ret;
int ret, init_brightness;
gbl = devm_kzalloc(&pdev->dev, sizeof(*gbl), GFP_KERNEL);
if (gbl == NULL)
@@ -153,7 +161,12 @@ static int gpio_backlight_probe(struct platform_device *pdev)
bl->props.power = gpio_backlight_initial_power_state(gbl);
bl->props.brightness = 1;
backlight_update_status(bl);
init_brightness = gpio_backlight_get_next_brightness(bl);
ret = gpiod_direction_output(gbl->gpiod, init_brightness);
if (ret) {
dev_err(&pdev->dev, "failed to set initial brightness\n");
return ret;
}
platform_set_drvdata(pdev, bl);
return 0;