Age | Commit message (Collapse) | Author |
|
init
The init sequence specifies the 0x11 and 0x29 dsi commands, which are
the exit-sleep and display-on commands.
In the actual prepare step the driver already uses the appropriate
function calls for those, so drop the duplicates.
Fixes: e5f9d543419c ("drm/panel: ltk050h3146w: add support for Leadtek LTK050H3148W-CTA6 variant")
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240320131232.327196-2-heiko@sntech.de
(cherry picked from commit 55679cc22e60e8ec23b2340248389022798416cd)
[adapt for new generic mipi_dsi_dsc_write vs old dsi_dcs_write]
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
|
Similar to other variants, the LTK050H3148W wants to run in video mode
when displaying data. So far only the Synopsis DSI driver was using this
panel and it is always switching to video mode, independent of this flag
being set.
Other DSI drivers might handle this differently, so add the flag.
Fixes: e5f9d543419c ("drm/panel: ltk050h3146w: add support for Leadtek LTK050H3148W-CTA6 variant")
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Acked-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240320131232.327196-1-heiko@sntech.de
(cherry picked from commit 80cc8c0d09e6bab3bd016ddaccd0570cadbe1891)
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
|
This is only a cosmetic change.
This replaces a hand-crafted EPROBE_DEFER handling for deciding to print
an error message with dev_err_probe.
A side-effect is that dev_err_probe also adds a debug message when it's
not EPROBE_DEFER, but this is seen as an improvement.
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240104-ltk-dev_err_probe-v1-2-8ef3c0b585d8@theobroma-systems.com
(cherry picked from commit 056a9965e58e47928e8afd4dc017221f9221b3d3)
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
|
not EPROBE_DEFER
devm_gpiod_get_optional may return EPROBE_DEFER in case the GPIO
controller isn't yet probed when the panel driver is being probed.
In that case, a spurious and confusing error message about not being
able to get the reset GPIO is printed even though later on the device
actually manages to get probed.
Use dev_err_probe instead so that the message is only printed when it
truly matters.
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240104-ltk-dev_err_probe-v1-1-8ef3c0b585d8@theobroma-systems.com
(cherry picked from commit 65afd91e8d70e10c7f99126d61bf0045ef52d271)
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
|
The ltk050h3148w variant expects the horizontal component lane byte clock
cycle(lbcc) to be calculated using lane_mbps (burst mode) instead of the
pixel clock.
Using the pixel clock rate by default for this calculation was introduced
in commit ac87d23694f4 ("drm/bridge: synopsys: dw-mipi-dsi: Use pixel clock
rate to calculate lbcc") and starting from commit 93e82bb4de01
("drm/bridge: synopsys: dw-mipi-dsi: Fix hcomponent lbcc for burst mode")
only panels that support burst mode can keep using the lane_mbps. So add
MIPI_DSI_MODE_VIDEO_BURST as part of the mode_flags for the dsi host.
Fixes: 93e82bb4de01 ("drm/bridge: synopsys: dw-mipi-dsi: Fix hcomponent lbcc for burst mode")
Signed-off-by: Farouk Bouabid <farouk.bouabid@theobroma-systems.com>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231213145045.41020-1-farouk.bouabid@theobroma-systems.com
(cherry picked from commit 6c9dbee84cd005bed5f9d07b3a2797ae6414b435)
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
|
The PCIe PHY requires two regulators and are present on the SoM
directly, while the PCIe connector also exposes 3V3 and 12V power rails
which are available on the baseboard.
Considering that 3/4 regulators are always-on on HW level and that the
last one depends on a regulator from the PMIC that is specified as
always on, this commit should be purely cosmetic and no change in
behavior is expected.
Let's add all regulators for PCIe on RK3399 Puma Haikou.
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240308-puma-diode-pu-v2-3-309f83da110a@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit d7ed698abc28b2886c9fc71d17ca6b023fcf47f3)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
RK3399 Puma
The PCIE_WAKE# has a diode used as a level-shifter, and is used as an
input pin. While the SoC default is to enable the pull-up, the core
rk3399 pinconf for this pin opted for pull-none. So as to not disturb
the behaviour of other boards which may rely on pull-none instead of
pull-up, set the needed pull-up only for RK3399 Puma.
Fixes: 60fd9f72ce8a ("arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240308-puma-diode-pu-v2-2-309f83da110a@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 945a7c8570916650a415757d15d83e0fa856a686)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
RK3399 Puma
The Q7_USB_ID has a diode used as a level-shifter, and is used as an
input pin. The SoC default for this pin is a pull-up, which is correct
but the pinconf in the introducing commit missed that, so let's fix this
oversight.
Fixes: ed2c66a95c0c ("arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240308-puma-diode-pu-v2-1-309f83da110a@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit e6b1168f37e3f86d9966276c5a3fff9eb0df3e5f)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Q7_SMB_ALERT
Each of the above mentioned pins is connected to a diode
on the module which is used as a level shifter, and they
are configured internally pulled-down by default.
We need to configure these pins to internally pulled-up,
otherwise whenever one of the pins is configured as INPUT
and we try to control it externally the value will always
remain zero.
[TSD] Only applies to Haikou Tester as those pins aren't
necessarily used as input so we don't need to always have
a pull-up for it (e.g. if driving them as output).
[TSD] No upstream Haikou Tester support for now
Relates-to: PUMA-90, PUMA-91
Signed-off-by: Iskander Amara <iskander.amara@theobroma-systems.com>
|
|
Nodes overridden by their reference should be ordered alphabetically to
make it easier to read the DTS. pinctrl node is defined in the wrong
location so let's reorder it.
Signed-off-by: Iskander Amara <iskander.amara@theobroma-systems.com>
Link: https://lore.kernel.org/all/20240308085243.69903-2-iskander.amara@theobroma-systems.com/
Signed-off-by: Iskander Amara <iskander.amara@theobroma-systems.com>
|
|
RK3399 Puma
Q7_THRM# pin is connected to a diode on the module which is used
as a level shifter, and the pin have a pull-down enabled by
default. We need to configure it to internal pull-up, other-
wise whenever the pin is configured as INPUT and we try to
control it externally the value will always remain zero.
Signed-off-by: Iskander Amara <iskander.amara@theobroma-systems.com>
Link: https://lore.kernel.org/all/20240308085243.69903-1-iskander.amara@theobroma-systems.com/
Signed-off-by: Iskander Amara <iskander.amara@theobroma-systems.com>
|
|
A hardware switch can set the rs485 transceiver into half or full duplex
mode.
Switching to the half-duplex mode requires the user to enable em485 on
uart5 using ioctl, DE/RE are both connected to GPIO2_C3 which is the
RTS signal for uart0. Implement GPIO2_C3 as rts-gpios with RTS_ON_SEND
option enabled (default) so that driver mode gets enabled while sending
(RTS high) and receiver mode gets enabled while not sending (RTS low).
In full-duplex mode (em485 is disabled), DE is connected to GPIO2_C3 and
RE is grounded (enabled). Since GPIO2_C3 is implemented as rts-gpios, the
driver mode gets enabled whenever we want to send something and RE is not
affected (always enabled) in this case by the state of RTS.
Signed-off-by: Farouk Bouabid <farouk.bouabid@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240208-dev-rx-enable-v6-1-39e68e17a339@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 54448f711aa32f176534bbd7b1903cc6d1c8a50d)
(Some baudrates are instable while testing on Puma v2.3. Refer to
https://cherrydh.atlassian.net/browse/PUMA-98)
Signed-off-by: Farouk Bouabid <farouk.bouabid@theobroma-systems.com>
|
|
When a UART port is newly registered, uart_configure_port() seeks to
deassert RS485 Transmit Enable by setting the RTS bit in port->mctrl.
However a number of UART drivers interpret a set RTS bit as *assertion*
instead of deassertion: Affected drivers include those using
serial8250_em485_config() (except 8250_bcm2835aux.c) and some using
mctrl_gpio (e.g. imx.c).
Since the interpretation of the RTS bit is driver-specific, it is not
suitable as a means to centrally deassert Transmit Enable in the serial
core. Instead, the serial core must call on drivers to deassert it in
their driver-specific way. One way to achieve that is to call
->rs485_config(). It implicitly deasserts Transmit Enable.
So amend uart_configure_port() and uart_resume_port() to invoke
uart_rs485_config(). That allows removing calls to uart_rs485_config()
from drivers' ->probe() hooks and declaring the function static.
Skip any invocation of ->set_mctrl() if RS485 is enabled. RS485 has no
hardware flow control, so the modem control lines are irrelevant and
need not be touched. When leaving RS485 mode, reset the modem control
lines to the state stored in port->mctrl. That way, UARTs which are
muxed between RS485 and RS232 transceivers drive the lines correctly
when switched to RS232. (serial8250_do_startup() historically raises
the OUT1 modem signal because otherwise interrupts are not signaled on
ancient PC UARTs, but I believe that no longer applies to modern,
RS485-capable UARTs and is thus safe to be skipped.)
imx.c modifies port->mctrl whenever Transmit Enable is asserted and
deasserted. Stop it from doing that so port->mctrl reflects the RS232
line state.
8250_omap.c deasserts Transmit Enable on ->runtime_resume() by calling
->set_mctrl(). Because that is now a no-op in RS485 mode, amend the
function to call serial8250_em485_stop_tx().
fsl_lpuart.c retrieves and applies the RS485 device tree properties
after registering the UART port. Because applying now happens on
registration in uart_configure_port(), move retrieval of the properties
ahead of uart_add_one_port().
Link: https://lore.kernel.org/all/20220329085050.311408-1-matthias.schiffer@ew.tq-group.com/
Link: https://lore.kernel.org/all/8f538a8903795f22f9acc94a9a31b03c9c4ccacb.camel@ginzinger.com/
Fixes: d3b3404df318 ("serial: Fix incorrect rs485 polarity on uart open")
Cc: stable@vger.kernel.org # v4.14+
Reported-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reported-by: Roosen Henri <Henri.Roosen@ginzinger.com>
Tested-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/2de36eba3fbe11278d5002e4e501afe0ceaca039.1663863805.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 7c7f9bc986e698873b489c371a08f206979d06b7)
Signed-off-by: Farouk Bouabid <farouk.bouabid@theobroma-systems.com>
|
|
Disable a sysfs userspace fallback mechanism for firmware load requests.
When enabled and device firmware was not found, this option will cause
a 60s delay, before initializing the device. For this reason, keep it
disabled by default.
Relates-to: PIXR-311
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
|
|
tester daughterboard
This enables the SPI-NOR flash found on Puma Haikou with the tester
daughterboard attached.
We use this SPI-NOR flash to test that SPI bus exposed on the Haikou
works correctly.
[TSD] The tester daughterboard is removable and is rarely used, so not
much sense to upstream it. Just add it for end-of-line testing.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
There are 6 SPI controllers on RK3399 and they are all numbered in the
TRM, so let's add the appropriate aliases to the main DTSI so that any
RK3399-based board doesn't need to define the aliases themselves to
benefit from stable SPI indices in userspace.
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240109-rk3399-spi-aliases-v1-1-2009e44e734a@theobroma-systems.com
Relates-to: PUMA-88
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Haikou is an evaluation and development platform for System on
Modules (SOMs).
Haikou devkit exposes multiple buttons so let's register them as
such so that the input subsystem can generate events when pressed or
switched.
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
Link: https://lore.kernel.org/r/20231214122801.3144180-3-vahe.grigoryan@theobroma-systems.com
Relates-to: ENAB-35
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
|
|
The Puma SoM allows to select in hardware directly which storage
medium to try for loading the bootloader, either SPI-NOR followed
by eMMC followed by SD card, or SD card only.
This signal is exposed on the Q7 connector and allows carrierboards
to control it however they want.
This feedback pin allows to know in which state the SoM currently
is and provided the current state isn't modified until next reboot,
know from which storage medium the bootloader could be loaded from
next time.
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
Link: https://lore.kernel.org/r/20231214122801.3144180-2-vahe.grigoryan@theobroma-systems.com
Relates-to: ENAB-35
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
|
|
Haikou is an evaluation and development platform for System on
Modules (SOMs).
The GPIO0_B1 is routed to the Wake button instead of BIOS_DISABLE,
update the comment to reflect that.
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
Link: https://lore.kernel.org/r/20231214122801.3144180-1-vahe.grigoryan@theobroma-systems.com
Relates-to: ENAB-35
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
|
|
Enable PL2303 device driver, because we want to test it
with the SoM.
Relates-to: ENAB-35
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
|
|
Enable FTDI device driver, because we want to test it
with the SoM.
Relates-to: ENAB-35
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
|
|
Enable CP210x device driver, because we need it to
configure CP210x from the SoM.
Relates-to: ENAB-35
Signed-off-by: Vahe Grigoryan <vahe.grigoryan@theobroma-systems.com>
|
|
From https://www.kernel.org/doc/Documentation/networking/netconsole.txt :
> This module logs kernel printk messages over UDP allowing debugging of
> problem where disk logging fails and serial consoles are impractical.
That's exactly why we need it.
We also need CONFIG_NETCONSOLE_DYNAMIC because for many usecases, we
get an IP address over DHCP, and netconsole can only be enabled when
you have an IP address.
Relates-to: RNG-180
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
|
|
We don't use memory hotplug, but having it enabled means we have
/sys/devices/system/memory and that means lsmem now works.
lsmem is the only way I know of to find out the physical memory size.
Even /proc/iomem misses 18 MiB for some reason (it reports 4078 MiB
instead of 4096 MiB).
The Image gets about 64kiB larger, which seems worth having lsmem.
Relates-to: JAG-90
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
[imported from Tiger/Jaguar repo]
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
For consistency with the newer PX30-uQ7 module and also
because it seems to serve no purpose other than making the
"aplay -L" device list longer (a lot longer) and making
selecting the right device more difficult.
root@puma-debos:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
hw:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct hardware device without any conversions
hw:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct hardware device without any conversions
plughw:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Hardware device with all software conversions
plughw:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Hardware device with all software conversions
default:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
sysdefault:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
front:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Front output / input
surround21:CARD=Loopback,DEV=0
Loopback, Loopback PCM
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.0 Surround output to Front and Rear speakers
surround41:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Loopback,DEV=0
Loopback, Loopback PCM
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct sample mixing device
dmix:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct sample mixing device
hw:CARD=HaikouI2Scodec,DEV=0
Haikou,I2S-codec, ff880000.i2s-sgtl5000 sgtl5000-0
Direct hardware device without any conversions
plughw:CARD=HaikouI2Scodec,DEV=0
Haikou,I2S-codec, ff880000.i2s-sgtl5000 sgtl5000-0
Hardware device with all software conversions
default:CARD=HaikouI2Scodec
Haikou,I2S-codec, ff880000.i2s-sgtl5000 sgtl5000-0
Default Audio Device
sysdefault:CARD=HaikouI2Scodec
Haikou,I2S-codec, ff880000.i2s-sgtl5000 sgtl5000-0
Default Audio Device
dmix:CARD=HaikouI2Scodec,DEV=0
Haikou,I2S-codec, ff880000.i2s-sgtl5000 sgtl5000-0
Direct sample mixing device
|
|
This is a leftover from the defconfig that was created by deriving it
from one coming from Yocto Project where yocto is added to LOCALVERSION.
Since it is not provided this kernel will be used in a Yocto image,
let's remove the localversion entirely to not confuse users.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
commit 028822b714bd3a159d65416c53f1549345b53d9e upstream.
WRITE_ZEROES requests use TRIM, so mark them as needing to be issued
synchronously even when a CQE is being used. Without this,
mmc_blk_mq_issue_rq() triggers a WARN_ON_ONCE() and fails the request
since we don't have any handling for issuing this asynchronously.
Fixes: f7b6fc327327 ("mmc: core: Support zeroout using TRIM for eMMC")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221020130123.4033218-1-vincent.whitchurch@axis.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Relates-to: EHSW-1688
(cherry picked from commit 649fee1acc626e170134c9986802402702e00479)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Tested and working with the following things connected to the
Q7-Camera-Demo v1.0 adapter PCBA:
* Top-to-Bottom flex cable connected to P2
* One SF2V5675AY10 camera connected to P3
The Q7-Camera-Demo supports three cameras in total and hdmi input,
but the Puma SoM only supports one camera.
This commit only adds support for the subset supported by the Puma SoM.
[TSD] rockchip,io-domains DT property is not upstreamed yet (and disputed),
see https://lore.kernel.org/lkml/20220802095252.2486591-1-foss+kernel@0leil.net/
Relates-to: EHSW-1509
Relates-to: EHHW-730
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
|
|
Implement VIDIOC_ENUM_FRAMESIZES for the rkisp1 capture devices.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Link: https://lore.kernel.org/all/20221117084217.3892680-4-paul.elder@ideasonboard.com
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
|
|
Add support for NV16M and NV61M as output formats. As NV16, NV61, NV12M
and NV21M are already supported, the infrastructure is already in place
to support NV16M and NV61M, so it is sufficient to simply add relevant
entries to the list of output formats.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Link: https://lore.kernel.org/all/20221117084217.3892680-2-paul.elder@ideasonboard.com
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
|
|
Don't populate the const arrays on the stack, instead make them
static. Also makes the object code smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
(cherry picked from commit 4ee8191c7c9f2dc62bd007dd4ac79b7799785c36)
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
|
|
Set camera orientation to "front", because it is placed in the front of
the device.
[TSD] This change will be part of the original patch series once sent
upstream.
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
|
|
Configure the camera sensor rotation on the Haikou Video Demo adapter.
Haikou Video Demo board reference system was defined basing on the
following assumptions:
- side with mounted adapter is the front of the device (display side),
- default display position is vertical.
Y-axis
^
! FRONT VIEW
!
!
! +-------------------------------------------------+
! |o Haikou |
! || |
! |+------------------------+ |
! || __ | |
! || / \ <-Camera | |
! || \__/ | |
! || +--------------------+ | |
! || | | | |
! || | | | |
! || | | | |
! || | | | |
! || | | | |
! || | | | |
! || | Video Demo | | |
! || | Adapter | | |
! || | | | |
! || | | | |
! || | | | |
! || | | | |
! || | | | |
! || | | | |
! || +--------------------+ | |
! |o------------------------+----------------o |
! +-------------------------------------------------+
!
0 +-------------------------------------------------------------->
0 X-axis
Set camera rotation to 180 degrees, because camera sensor is mounted
upside down in reference to the board reference system.
[TSD] This change will be part of the original patch series once sent
upstream.
Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
|
|
The Video Demo adapter can be connected to Haikou devkit via the Video
Connector connector which exposes video-related signals (CSI/DSI).
The Video Demo adapter is compatible with an OV5675 camera sensor fitted
with a DW9714 focus lens driver and a Leadtek LTK050H3148W panel fitted
with a Goodix GT911 touchscreen.
Some pins are controlled over a PCA9670 GPIO expander.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
This adds a defconfig for Puma RK3399 on Haikou with support for
components found on the Haikou Video Demo adapter.
TSD: board defconfigs not allowed upstream
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Puma RK3399 SoM
This adds support for the Video Demo adapter for Haikou devkit with Puma
RK3399 SoM.
The Video Demo adapter is an adapter connected to the fake PCIe slot
labeled "Video Connector" on the Haikou devkit. It has an Omnivision
OV5675 camera sensor fitted with a DW9714 focus lens driver, as well as
a Leadtek LTK050H3148W display fitted with a Goodix GT911 touchscreen.
It also has a SW controllable blue LED and most of the lanes are routed
through a GPIO expander connected over I2C.
The display is using MIPI-DSI while the camera is using MIPI-CSI for
their video streams.
[TSD] more work needs to be done on the driver side to allow non-19.2MHz
CSI MCLK before upstreaming this.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
The clock is almost 19.2MHz but not exactly, so the camera sensor driver
complains about it and refuses to probe. However, the HW seems to be
working just fine without this check, so let's remove it.
[TSD] The clock is at 19.16MHz but still works somehow. There's no way
to get exactly 19.2MHz on this SoC since only an integer divider is
available and the clocks are either running at 800/596/1000MHz.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
On some Rockchip SoCs, some SoC pins are split in what are called IO
domains.
An IO domain is supplied power externally, by regulators from a PMIC for
example. This external power supply is then used by the IO domain as
"supply" for the IO pins if they are outputs.
Each IO domain can configure which voltage the IO pins will be operating
on (1.8V or 3.3V).
There already exists an IO domain driver for Rockchip SoCs[1]. This
driver allows to explicit the relationship between the external power
supplies and IO domains[2]. This makes sure the regulators are enabled
by the Linux kernel so the IO domains are supplied with power and
correctly configured as per the supplied voltage.
This driver is a regulator consumer and does not offer any other
interface for device dependency.
However, IO pins belonging to an IO domain need to have this IO domain
correctly configured before they are being used otherwise they do not
operate correctly (in our case, a pin configured as output clock was
oscillating between 0 and 150mV instead of the expected 1V8).
In order to make this dependency transparent to the consumer of those
pins and not add Rockchip-specific code to third party drivers (a camera
driver in our case), it is hooked into the pinctrl driver which is
Rockchip-specific obviously.
[1] drivers/soc/rockchip/io-domain.c
[2] Documentation/devicetree/bindings/power/rockchip-io-domain.yaml
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220802095252.2486591-2-foss+kernel@0leil.net
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
reparent
clk_cifout is derived from clk_cifout_src through an integer divider
limited to 32. clk_cifout_src is a child of either cpll, gpll or npll
without any possibility of a divider of any sort. The default clock
parent is cpll.
Let's allow clk_cifout to ask its parent clk_cifout_src to reparent in
order to find the real closest possible rate for clk_cifout and not one
derived from cpll only.
Cc: stable@vger.kernel.org # 4.10+
Fixes: fd8bc829336a ("clk: rockchip: fix the rk3399 cifout clock")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20221117-rk3399-cifout-set-rate-parent-v1-0-432548d04081@theobroma-systems.com
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
variant
The LTK050H3148W-CTA6 is a 5.0" 720x1280 DSI display, whose driving
controller is a Himax HX8394-F, slightly different from LTK050H3146W by
its init sequence, mode details and mode flags.
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220131164723.714836-3-quentin.schulz@theobroma-systems.com
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
variant
The LTK050H3148W-CTA6 is a 5.0" 720x1280 DSI display, whose driving
controller is a Himax HX8394-F, slightly different from LTK050H3146W by
its init sequence, mode details and mode flags.
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Link: https://lore.kernel.org/r/20220131164723.714836-2-quentin.schulz@theobroma-systems.com
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
of_match_data
To prepare for a new display to be supported by this driver which has a
slightly different set of DSI mode related flags, let's move the
currently hardcoded mode flags to the .data field of of_device_id
structure.
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Link: https://lore.kernel.org/r/20220131164723.714836-1-quentin.schulz@theobroma-systems.com
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
The sensor has 2592*1944 active pixels, surrounded by 16 active dummy
pixels and there are an additional 24 black rows "at the bottom".
[2624]
+-----+------------------+-----+
| | 16 dummy | |
+-----+------------------+-----+
| | | |
| | [2592] | |
| | | |
|16 | valid | 16 |[2000]
|dummy| |dummy|
| | [1944]| |
| | | |
+-----+------------------+-----+
| | 16 dummy | |
+-----+------------------+-----+
| | 24 black lines | |
+-----+------------------+-----+
The top-left coordinate is gotten from the registers specified in the
modes which are identical for both currently supported modes.
There are currently two modes supported by this driver: 2592*1944 and
1296*972. The second mode is obtained thanks to subsampling while
keeping the same field of view (FoV). No cropping involved, hence the
harcoded values.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Link: https://lore.kernel.org/r/20220608134420.1750530-4-foss+kernel@0leil.net
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Parse V4L2 device tree properties and register controls for them.
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220608134420.1750530-3-foss+kernel@0leil.net
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Until now, this driver only supported ACPI. This adds support for
Device Tree too while enabling clock and regulators in runtime PM.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220608134420.1750530-2-foss+kernel@0leil.net
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
This patch adds documentation of device tree in YAML schema for the
OV5675 CMOS image sensor from Omnivision.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220608134420.1750530-1-foss+kernel@0leil.net
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
frequency
CRC errors (code -84 EILSEQ) have been observed for some SanDisk
Ultra A1 cards when running at 50MHz.
Waveform analysis suggest that the level shifters that are used on the
RK3399-Q7 module for voltage translation between 3.0 and 3.3V don't
handle clock rates at or above 48MHz properly. Back off to 40MHz for
some safety margin.
Cc: stable@vger.kernel.org
Fixes: 60fd9f72ce8a ("arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM")
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20221019-upstream-puma-sd-40mhz-v1-0-754a76421518@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 91e8b74fe6381e083f8aa55217bb0562785ab398)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
When expanding a file system using online resize, various fields in
the superblock (e.g., s_blocks_count, s_inodes_count, etc.) change.
To update the backup superblocks, the online resize uses the function
update_backups() in fs/ext4/resize.c. This function was not updating
the checksum field in the backup superblocks. This wasn't a big deal
previously, because e2fsck didn't care about the checksum field in the
backup superblock. (And indeed, update_backups() goes all the way
back to the ext3 days, well before we had support for metadata
checksums.)
However, there is an alternate, more general way of updating
superblock fields, ext4_update_primary_sb() in fs/ext4/ioctl.c. This
function does check the checksum of the backup superblock, and if it
doesn't match will mark the file system as corrupted. That was
clearly not the intent, so avoid to aborting the resize when a bad
superblock is found.
In addition, teach update_backups() to properly update the checksum in
the backup superblocks. We will eventually want to unify
updapte_backups() with the infrasture in ext4_update_primary_sb(), but
that's for another day.
Note: The problem has been around for a while; it just didn't really
matter until ext4_update_primary_sb() was added by commit bbc605cdb1e1
("ext4: implement support for get/set fs label"). And it became
trivially easy to reproduce after commit 827891a38acc ("ext4: update
the s_overhead_clusters in the backup sb's when resizing") in v6.0.
Cc: stable@kernel.org # 5.17+
Fixes: bbc605cdb1e1 ("ext4: implement support for get/set fs label")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 9a8c5b0d061554fedd7dbe894e63aa34d0bac7c4)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
The otg sync state patch reuses the ret variable, but fails to set it to
zero after use. This leads to a situation when the otg port is in
peripheral mode where the otg phy aborts halfway through setup. It also
fails to account for a failure to register the extcon notifier. Fix this
by using our own variable and skipping otg sync in case of failure.
Fixes: 8dc60f8da22f ("phy: rockchip-inno-usb2: Sync initial otg state")
Reported-by: Markus Reichl <m.reichl@fivetechno.de>
Reported-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220902184543.1234835-1-pgwipeout@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
(cherry picked from commit f340ed8664a55a467850ec1689996e63d9ee971a)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Before the split of gpio and pinctrl sections in their own driver,
rockchip_set_mux was called in pinmux_ops.gpio_set_direction for
configuring a pin in its GPIO function.
This is essential for cases where pinctrl is "bypassed" by gpio
consumers otherwise the GPIO function is not configured for the pin and
it does not work. Such was the case for the sysfs/libgpiod userspace
GPIO handling.
Let's call pinctrl_gpio_direction_input/output when setting the
direction of a GPIO so that the pinctrl core requests from the rockchip
pinctrl driver to put the pin in its GPIO function.
Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes")
Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio")
Cc: stable@vger.kernel.org
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220930132033.4003377-3-foss+kernel@0leil.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 8ea8af6c8469156ac2042d83d73f6b74eb4b4b45)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|