Age | Commit message (Collapse) | Author |
|
The pll1443x PLL so far only supports rates from a rate table passed
during initialization. Calculating PLL settings dynamically helps audio
applications to get their desired rates, so support for this is added
in this patch.
The strategy to get to the PLL setting for a rate is:
- First try to only adjust kdiv which specifies the fractional part of the PLL.
This setting can be changed without glitches on the output and is therefore
preferred
- When that isn't possible then the rate table is searched for suitable rates,
so for standard rates the same settings are used as without this patch
- As a last resort the best settings are calculated dynamically
The code in this patch is based on patches from Adrian Alonso <adrian.alonso@nxp.com>
and Mads Bligaard Nielsen <bli@bang-olufsen.dk>
Upstream-Status: Backport [b09c68dc57c9d44071d83bb935b733f53ea2b2b4]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-9-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
Print all messages from within the pll14xx driver with a common
prefix using pr_fmt. No need to print function names anymore, so
drop them from the messages.
Upstream-Status: Backport [80cbc80612a01461a257f2c2eb9976cbadfb7be2]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-8-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
clk_pll14xx_round_rate() returns the lowest rate by indexing into
the rate table with the variable i. i is actually pll->rate_count
as this is the value we come out of the loop with. Use pll->rate_count
explicitly to make it a bit more clear what is being done. While at
it fix a typo in the comment. No functional change.
Upstream-Status: Backport [5ff50031cb8852bfcf587d003ba6bad3c2336852]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-7-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
In clk_pll1443x_set_rate() 'tmp' is used for the content of different
registers which makes it a bit hard to follow. Use different variables
named after the registers to make it clearer. No functional change
intended.
Upstream-Status: Backport [052d03a043afebb8e26ec17de52e8cdc8b217ef9]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-6-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
The PLL driver has support for two different PLLs: The pll1416x and
the pll1443x. The latter has support for an additional kdiv value.
recalc_rate can be the same calculation when kdiv is assumed to be zero
for the PLL which doesn't support that value.
Upstream-Status: Backport [53990cf9d5b489fc0ec08e5c4df7139fc311a824]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-5-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
[Rafael: fixed conflicts in the clk_pll1443x_recalc_rate function caused
by some additions on the downstream branch in commit 9425151a59a4. The
changes in the downstream branch implement the same functionality of
this commit but without the other improvements in the patch series.
Additionally, the change in the downstream branch adds a function to
change the "k" value of the PLL which gets exposed through sysfs. This
function was also fixed to be compatible with the changes in the patch
series.]
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
Linux has these marvelous FIELD_GET/FIELD_PREP macros for easy access
to bitfields in registers. Use them and remove the now unused *_SHIFT
defines.
Upstream-Status: Backport [58f4980ccbecf633df1fcb113e2a9f04842eccc6]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-4-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
The code tries to mask the bits in SDIV_MASK from 'tmp'. SDIV_MASK
already contains the shifted value, so shifting it again is wrong.
No functional change though as SDIV_SHIFT is zero.
Upstream-Status: Backport [d77461a616b659bd88dc153e3a86dba5bf78aa8a]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-3-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
The driver has defines for the registers, but they are mostly unused.
Use the defines consistently throughout the driver. While at it rename
DIV_CTL to DIV_CTL0 because that's the name in the reference manual.
Upstream-Status: Backport [485b4ff57c2777c15bfe2e6e6a204200b040e131]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220304125256.2125023-2-s.hauer@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
|
|
Add PMIC thermal zone as is was present on both Colibri-iMX8x/BSP5 and
in MEK board.
Without this the thermal sensor driver fails to probe on colibri-imx8x
with i.MX8X DX SOC, this is happening because imx8dx-colibri.dtsi
creates an incomplete thermal zone node for the PMIC.
Upstream-Status: Pending
This should be send upstream, however the first batch of DTS files is
under review, therefore it seems better to just postpone it.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
|
|
Add USB3803 HUB, this is required for Bluetooth and USB
functionalities.
Upstream-Status: Pending
This should be send upstream, however currently the FXL6408 and USB3803
drivers are not merged yet, and the first batch of DTS files is under
review, therefore we have to postpone it.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
|
|
Add support for USB3803 and bypass mode, with this change
is also possible to move the component out of bypass mode.
In bypass mode the downstream port 3 is connected to the
upstream port with low switch resistance R_on.
Controlling mode of operations:
| RESET_N | BYPASS_N | Mode |
--------------------------------
| 0 | 0 | standby |
| 1 | 0 | bypass |
| 1 | 1 | hub |
Upstream-Status: Submitted [https://lore.kernel.org/all/20230313165039.255579-1-francesco@dolcini.it/]
Datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/00001691D.pdf
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20230313165039.255579-4-francesco@dolcini.it
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[fdolcini: backport: fixed error path on IS_ERR(hub->bypass)]
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
|
|
Refactor code to simplify adding support for USB3803 and bypass mode.
Remove static usb3503_reset() and move it to usb3503_switch_mode(),
with the addition of the bypass mode we need to drive the various
control signals to the expected configuration, not just to
assert/release the reset.
In addition to that the usb3503_connect() needs to be called only
for HUB mode.
No functional changes expected nor intended because of this change.
Upstream-Status: Submitted [https://lore.kernel.org/all/20230313165039.255579-1-francesco@dolcini.it/]
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20230313165039.255579-3-francesco@dolcini.it
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Add fxl6408 gpio expander, this is required for Wi-Fi, Bluetooth and USB
functionalities.
Upstream-Status: Pending
This should be send upstream, however currently the FXL6408
driver is not merged yet, and the first batch of DTS files is under
review, therefore we have to postpone it.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
|
|
Add GPIO_FXL6408 driver to kernel config, used on colibri-imx8x.
Upstream-Status: Inappropriate [Configuration]
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
|
|
Add minimal driver for Fairchild FXL6408 8-bit I2C-controlled GPIO expander
using the generic regmap based GPIO driver (GPIO_REGMAP).
The driver implements setting the GPIO direction, reading inputs
and writing outputs.
In addition to that the FXL6408 has the following functionalities:
- allows to monitor input ports for data transitions with an interrupt pin
- all inputs can be configured with pull-up or pull-down resistors
Upstream-Status: Submitted [https://lore.kernel.org/all/20230313170950.256964-1-francesco@dolcini.it/]
Datasheet: https://www.onsemi.com/download/data-sheet/pdf/fxl6408-d.pdf
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Co-developed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[Bartosz: order includes alphabetically]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
|
|
Add Fairchild FXL6408 8-bit I2C-controlled GPIO expander.
Upstream-Status: Submitted [https://lore.kernel.org/all/20230313170950.256964-1-francesco@dolcini.it/]
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
|
|
Change ent0_lpcg accordingly so we get the clock we need for 100mbps
ethernet. This was copied from toradex_5.4-2.3.x-imx and checked that
it's still valid on 5.15 downstream
Upstream-Status: Pending
This may get upstreamed since on mainline there is a simliar define
(IMX_SC_C_DISABLE_50).
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Remove the todo for flexcan. Native CAN is not a standard functionality
on Colibri standard. Pinmuxing is already prepared so if someone wants
to enable this on his carrier-board this should be done there.
Upstream-Status: Pending
- Todo comment needs to be removed upstream.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add the label for ad7879_ts that is needed for overlays.
Upstream-Status: Pending
This should be sent upstream, it was just forgot on v2 series
https://lore.kernel.org/all/20230314102410.424773-4-dev@pschenker.ch/T/#u
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add devicetrees for Colibri iMX8X variant with the i.MX 8DX SoC placed.
Upstream-Status: Pending
- No devicetrees are existing yet for i.MX 8DX upstream
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add GPIO3_10 as a wakeup source. Copy this nodes from
toradex_5.4-2.3.x-imx.
Upstream-Status: Pending
pad-wakeup is only present in the mxc-gpio driver on downstream. This
was needed to make the gpio able to wakeup the system.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add Atmel MaxTouch controller to i2c1. This was copied from
toradex_5.4-2.3.x-imx.
Upstream-Status: Pending
Needs to be upstreamed
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add display support. Copy nodes from toradex_5.4-2.3.x-imx. This commit
adds the baseline support that can be enabled with devicetree overlays.
Upstream-Status: Pending
- No display support yet
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add backlight to colibri-imx8x. Do copy the node from
toradex_5.4-2.3.x-imx.
Upstream-Status: Pending
- No pwm support on adma subsystem as of now.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add USB Host and USB OTG (Client/Host switching) to the carrier-boards.
Upstream-Status: Pending
- No support as of now in upstream linux.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add all nodes necessary for audio. Do copy the nodes frrom
toradex_5.4-2.3.x-imx.
Upstream-Status: Pending
- No audio functionality yet in upstream.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
This commit adds mipi csi functionality. Copy the nodes from
toradex_5.4-2.3.x-imx. Cross check changes in imx8x-mek.dtsi.
Upstream-Status: Pending
- No support yet
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add mipi dsi including the lt8912 dsi to hdmi bridge. This commit just
copies the node from toradex_5.4-2.3.x-imx
Upstream-Status: Pending
- No support in upstream linux
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Enable the GPU.
Upstream-Status: Pending
- There is currently no GPU support in mainline
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Use the reserved-memory nodes from MEK with two adjustments:
- Out of the history from 5.4-2.3.x-imx delete CMA node
- Delete DSP nodes, since we only use SoCs without DSP
Upstream-Status: Pending
- There is currently no need for this in upstream linux
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
This commit does forward-port the ADC functionality from
toradex_5.4-2.3.x-imx.
Upstream-Status: Pending
ADC support seems to be available in mainline, "nxp,imx8qxp-adc"
compatible and node defined in "imx8-ss-dma.dtsi". However it was not
possible to have it working on mainline so we postponed this for the
moment.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add the Toradex Iris V2 Carrier Board for Colibri iMX8X, small form-factor
production ready board.
Additional details available at:
https://www.toradex.com/products/carrier-boards/iris-carrier-board
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-24-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add the Toradex Iris Carrier Board for Colibri iMX8X, small form-factor
production ready board.
Additional details available at:
https://www.toradex.com/products/carrier-boards/iris-carrier-board
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-23-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add the Toradex Aster Carrier Board for Colibri iMX8X, small form-factor
with header compatible with Arduino Uno and Raspberry Pi (RPi) maker
boards.
Additional details available at:
https://www.toradex.com/products/carrier-boards/aster-carrier-board
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-22-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Highlight what is still missing.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-20-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
SODIMM_45 that is connected to "&lsio_gpio3 10" is defined in the
Colibri standard to be a wakeup pin.
Move this to the SoM level device-tree and keep it disabled by default
but do enable it again on the carrier-board.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-19-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Set critical/alert thermal thresholds for all relevant SOC
temperature trips to the IT value (max T_junction 105 degree
Celsius) in accordance with the IT grade of the SOM.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-18-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Many Colibri carrier boards are using 3.3V pull-up resistors on the
SD-Card connector. Letting it switch to 1.8V is an invalid state.
Do prevent this from happening by keeping the signaling voltage at 3.3V.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-17-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add mcp2515 spi-to-can to &lpspi2.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-16-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add Colibri PWM_B, PWM_C, PWM_D to the module-level device-tree and set
the status to ok on the eval-board.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-15-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
jpeg encoder and decoder are available. Do enable them in the module
level device-tree since those are self-contained.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-14-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Do not enable the touchscreen. By default it is not used but should be
kept to enable it from a file that includes imx8x-colibri.dtsi.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-13-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
This commit adds gpio-line-names in line with other SoM from Toradex.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-12-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add Colibri SPI to the board. lpspi2 is being exposed on the SoM edge.
Add settings to the module-level but finally enable it on the eval-board
dtsi.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-11-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
The colibri imx8x contains a dedicated gpio meant for HDMI
hot-plug-detect. Add a pinctrl group to make this usable.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-10-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add a separate pinctrl group for chip-select 2 for Colibri SPI. That way
one is able to use it separately.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-9-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
The pads USDHC1_RESET_B and MCLK_IN1 need a pull-down instead of
pull-disabled. Correct this.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-8-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Split pinctrl_hog1 into a second group so CSI_MCLK can be muxed to a
gpio on its own.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-7-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add missing pinctrl groups that can be used to enable the correct
muxing if csi_mclk is needed on SODIMM 75.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-6-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add pinctrl groups for enabling atmel touchscreen support.
Remove the pads out of pinctrl_hog0 as they now can be enabled more
specific using pinctrl_atmel_conn label.
Upstream-Status: Submitted [https://lore.kernel.org/linux-devicetree/20230314102410.424773-5-dev@pschenker.ch/T/#u]
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|