In D43746#998246, @andrew wrote:In D43746#997823, @pldrouin_gmail.com wrote:Note: lx2160a_i2c_fdt should not be loaded along with vf_i2c, as they share the same FDT ID. What is the best way to handle this?
Can you merge the two drivers?
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Feb 9 2024
Feb 9 2024
Feb 7 2024
Feb 7 2024
The main issue I have for the FDT driver, is the following couple of lines in vf_i2c.c:
So I looked at the VFXXX controller reference manual (https://www.nxp.com/docs/en/reference-manual/VFXXXRM.pdf), and the specs for the I2C controller look almost identical to the ones for the LX2160A I2C controller, except mostly for the clock divider table. Based on this information, I do not see why the new implementation could not work for the VFXXX controller. I would have to reintroduce the code by @dgr_semihalf.com to do the clock divider calculations for the devices that differ from the LX2160A though.
Feb 6 2024
Feb 6 2024
In D43746#998246, @andrew wrote:In D43746#997823, @pldrouin_gmail.com wrote:Note: lx2160a_i2c_fdt should not be loaded along with vf_i2c, as they share the same FDT ID. What is the best way to handle this?
Can you merge the two drivers?
Fixing /sys/arm64/conf/std.nxp and sys/conf/files.arm64
In D43746#997823, @pldrouin_gmail.com wrote:Note: lx2160a_i2c_fdt should not be loaded along with vf_i2c, as they share the same FDT ID. What is the best way to handle this?
Last diff is broken. Will investigate...
Adding devices to sys/arm64/conf/std.nxp . The driver should work for LX2160A, LX2120A, LX2080A, LS1046A and LS1026A based on their respective reference manuals. The ACPI driver could be included in GENERIC. However as previously mentioned, I think including the FDT version along with vf_i2c could be problematic due to them sharing the same ID, so I commented out the lx2160a_i2c_fdt device.
In D43746#998187, @pldrouin_gmail.com wrote:Revised version with all requested changes
Fixing a few typos in debug print statements. Adding also one debug print statement.
Revised version with all requested changes
Just basic style(9) review.
Also you should add the devices in sys/arm64/conf/std.nxp
I think this is now ready for review.
Feb 5 2024
Feb 5 2024
modules/Makefile: Moving _lx2160a_i2c_fdt inside the nested condition on OPT_FDT
modules/Makefile: The modules are now only enabled for arm64/aarch64
Removing the verification of IBSR_IBB in i2c_stop. It was most likely potentially problematic and should have not been used.
Adding blank line to copyright notice
The templates shown at https://www.freebsd.org/internal/software-license/ have a (nearly) blank line after the Copyright . . . line:
* Copyright (c) [year] [your name] * * Redistribution and use in source and binary forms, with or without
In general it is a good place to look at for comparisons.
Updating the copyright notice as recommended.
Avoid use of "All rights reserved." in copyright notices? https://www.freebsd.org/internal/software-license/ reports:
With the ratification of the Berne Convention in 2000, it became obsolete. As such, the FreeBSD project recommends that new code omit the phrase and encourages existing copyright holders to remove it. In 2018, the project updated its templates to remove it.
-The logic in wait_for_icf was not quite right. It is now fixed.
Removing unnecessary small delay in i2c_stop. It had been introduced earlier as an attempt to fix the issue which was resolved by using wait_for_nibb in i2c_start.
Removing an unused define in lx2160a_i2c.h
pldrouin_gmail.com updated the test plan for D43746: Adding Support for QorIQ LX2160A I2C Controller.
pldrouin_gmail.com updated the test plan for D43746: Adding Support for QorIQ LX2160A I2C Controller.
-Moved the source files to sys/dev/iicbus/controller/qoriq
-Removed lx2160a_common.h
-Renamed the driver modules to separate names
-Now using wait_for_nibb in i2c_start so it works reliably after a reset
-Added the drivers to files.arm64
-Updated the copyright notice, and added credits.
Thanks, I will make these changes. I also have to tweak some delay that should apply when a start follows a reset.
We have a new-ish directory sys/dev/iicbus/controller/ for i2c controllers, it should go there.
Ok I have found a few things to change. It looks like some extra delays might be required when the module is not run in DEBUG mode.
I currently have it configured as a pair of modules. One weird thing I noticed is that I could kldload and kldunload them just fine when I was building the modules manually and before I included them in sys/modules/Makefile and I rebuilt the kernel. After adding them to sys/modules/Makefile, rebuilding and installing the kernel, I can only load them through /boot/loader.conf, otherwise it complains the modules are already loaded in the kernel, although kldstat -v and grep -R lx2160a_i2c /boot/kernel say otherwise. How can this be fixed? Thanks
pldrouin_gmail.com updated the test plan for D43746: Adding Support for QorIQ LX2160A I2C Controller.
pldrouin_gmail.com updated the test plan for D43746: Adding Support for QorIQ LX2160A I2C Controller.
Feb 4 2024
Feb 4 2024
pldrouin_gmail.com added a comment to D24917: Add ACPI attachment for the Vybrid VF610 I2C controller.
I wrote a FDT/ACPI split driver for the LX2160A I2C controller based on the work started by Val, and the LX2160A I2C controller documentation. It deviates significantly from the Vybrid driver as the way the original driver was handling the controller's registers was not quite compatible with the LX2160A I2C controller. Should I start a new diff with my driver and link to it from here? It seems to work well so far based on the (limited) tests I made. I can scan the bus and get the correct output. I am able to query the MUX's register and the fan controller's ID.
Jan 20 2024
Jan 20 2024
fred_thegalacticzoo.com added a comment to D43399: VCHIQ HDMI AUDIO 64 bits BCM2835, BCM2711 Raspberry Pi 4B; correct minor compile errors. bcm2835_audio.c.
In D43399#991801, @bses30074_gmail.com wrote:
Happy to have your testing and participation in getting Marcos VCHIQ HDMI audio sound patch reviewed. I post many URL links below to share ideas for further reading and learning.. YES, this is first a FreeBSD code review and not related to other BSD and URL links. So the point is to specifically comment about using FreeBSD source code. Sorry for the overload, but I wanted a good post to answer your question and share links for the background information.
Jan 18 2024
Jan 18 2024
bses30074_gmail.com added a comment to D43399: VCHIQ HDMI AUDIO 64 bits BCM2835, BCM2711 Raspberry Pi 4B; correct minor compile errors. bcm2835_audio.c.
Is this patch based on the three preceding patches? Were there compilation warnings (or errors) encountered when applying those three patches, leading to the creation of this patch to address those issues?
markmi_dsl-only.net added a comment to D24917: Add ACPI attachment for the Vybrid VF610 I2C controller.
In D24917#550057, @val_packett.cool wrote:Looks like this needs to wait until there's some way to get the clock without devicetree (I guess Linux runs with fdt+acpi both to make it work..)
Jan 17 2024
Jan 17 2024
Herald added a reviewer for D24917: Add ACPI attachment for the Vybrid VF610 I2C controller: andrew.
Jan 13 2024
Jan 13 2024
fred_thegalacticzoo.com updated the diff for D43399: VCHIQ HDMI AUDIO 64 bits BCM2835, BCM2711 Raspberry Pi 4B; correct minor compile errors. bcm2835_audio.c.
Concatenated 7 git diff -u patch files into one_large_vchiq_freebsd_patch_file.patch and updated this diff. I see that the FreeBSD (src) does not yet contain Marcos Devesas Campos VCHIQ revision D378378 https://reviews.freebsd.org/D37878. So make a decision to use or not use that code before incorporating this D43399 revision.
Jan 11 2024
Jan 11 2024
fred_thegalacticzoo.com added a comment to D43399: VCHIQ HDMI AUDIO 64 bits BCM2835, BCM2711 Raspberry Pi 4B; correct minor compile errors. bcm2835_audio.c.
I do not know how to add the 5 other patch files to be included in this diff comparision. Seems like 132598, got over written with this "update diff" instead of being added. Time for me to read and study hand book. okay
fred_thegalacticzoo.com updated the diff for D43399: VCHIQ HDMI AUDIO 64 bits BCM2835, BCM2711 Raspberry Pi 4B; correct minor compile errors. bcm2835_audio.c.
add file vchiq_2835_arm_.c.patch to diff section
Oct 31 2023
Oct 31 2023
Jul 19 2023
Jul 19 2023
Jul 16 2023
Jul 16 2023
Address comments, fix stuff that was also fixed in riscv.
Jul 14 2023
Jul 14 2023
Jul 13 2023
Jul 13 2023
Address Mark's comments. Depends on D40962.
Jul 12 2023
Jul 12 2023
Disable adr/adrp emulation.
Jul 10 2023
Jul 10 2023
Use per-probe trampolines. Depends on D40962
Jul 7 2023
Jul 7 2023
Updated description, still some unsolved bugs, but mostly done.
Jul 4 2023
Jul 4 2023
Jul 2 2023
Jul 2 2023
Jun 26 2023
Jun 26 2023
Jun 20 2023
Jun 20 2023
Jun 17 2023
Jun 17 2023
In D40277#924038, @imp wrote:I thought the kernel zeroed these... but I have no objections since my aarch64 fu is weak
I thought the kernel zeroed these... but I have no objections since my aarch64 fu is weak
I plan to commit this soon, any objections?
May 31 2023
May 31 2023
Address comments.
May 30 2023
May 30 2023
May 29 2023
May 29 2023
May 28 2023
May 28 2023
Rebase to D40312
In D40309#917796, @kib wrote:There are no XMM regs on aarch64.
There are no XMM regs on aarch64.
For now test succeed on Linux, fails on native and in the Linuxulator
May 26 2023
May 26 2023
Mar 3 2023
Mar 3 2023
Feb 12 2023
Feb 12 2023
Jan 12 2023
Jan 12 2023
Oct 14 2022
Oct 14 2022
Thanks @andrew ; I came across some of that the other day when I tried to make LINT-FDT compile but I postponed "fixing proper" to after the import. That okay with you?
Oct 13 2022
Oct 13 2022
- dpaa2_mc.c patched to fix LINT-FDT build (discovered and fixed by @bz, thanks!);
- copyrights of dpaa2_ni_dpkg.h and dpaa2_swc.c updated to include copyright notices from the original files together with the updated SPDX license identifiers.
Oct 11 2022
Oct 11 2022
Whitespace changes in sys/arm64/conf/std.nxp removed
Oct 10 2022
Oct 10 2022
- DPAA2 files were placed between dev/cpufreq and dev/dwc in sys/conf/files.arm64;
- Copyrights were added to sys/dev/dpaa2/dpaa2_ni_dpkg.h (drivers/net/ethernet/freescale/dpaa2/dpkg.h) and sys/dev/dpaa2/dpaa2_swp.c (drivers/soc/fsl/dpio/qbman-portal.c) as their significant parts were copy-pasted from the Linux drivers.
Oct 9 2022
Oct 9 2022
Oct 6 2022
Oct 6 2022
SOC_NXP_LS to lower case
Oct 5 2022
Oct 5 2022
Obtain DEVICE_PROP_HANDLE properties using new API (as @bz suggested in https://reviews.freebsd.org/D36793#837246)
Sep 30 2022
Sep 30 2022