The NetBSD Project

CVS log for src/sys/arch/arm/nxp/imx6_usb.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / arm / nxp

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.6.6.1 / (download) - annotate - [select for diffs], Sun May 28 10:14:35 2023 UTC (8 months, 3 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.6: +32 -9 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #182):

	sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
	sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
	sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
	sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
	distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
	sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
	sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
	sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
	sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
	sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
	sys/arch/arm/nxp/imx6_spi.c: revision 1.8
	sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
	sys/arch/arm/imx/imxusb.c: revision 1.19
	sys/arch/arm/nxp/imx6_usb.c: revision 1.7
	sys/arch/arm/nxp/imx6_usb.c: revision 1.8
	sys/arch/arm/nxp/files.imx: revision 1.3
	sys/arch/arm/nxp/imx6_clk.c: revision 1.5
	sys/arch/arm/nxp/imx6_clk.c: revision 1.6
	sys/arch/arm/nxp/imx6_reg.h: revision 1.2
	sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
	sys/arch/arm/imx/imx23_usb.c: revision 1.6
	sys/dtb/arm/Makefile: revision 1.6
	sys/arch/arm/imx/imxusbvar.h: revision 1.7
	sys/arch/evbarm/conf/GENERIC: revision 1.119
	sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
	sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
	sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
	sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.

Revision 1.8 / (download) - annotate - [select for diffs], Thu May 4 17:09:45 2023 UTC (9 months, 2 weeks ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.7: +32 -10 lines
Diff to previous 1.7 (colored)

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.
Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.
In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 4 13:29:33 2023 UTC (9 months, 2 weeks ago) by bouyer
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

Add i.mx6sx compatible entries to drivers that should work as is.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 7 16:18:45 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Merge thorpej-cfargs2.

Revision 1.5.8.1 / (download) - annotate - [select for diffs], Wed Aug 4 16:51:28 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

Adapt to CFARGS().

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:28 2021 UTC (2 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-cfargs2
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:17 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.1.2.2: +10 -10 lines
Diff to previous 1.1.2.2 (colored) next main 1.2 (colored)

Sync with HEAD.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Mon Mar 22 16:23:40 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.4.2.1: +2 -3 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Mon Mar 22 02:00:55 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.4: +5 -3 lines
Diff to previous 1.4 (colored)

Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jan 30 09:48:59 2021 UTC (3 years ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Don't print undefined interrupt value

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 27 03:10:20 2021 UTC (3 years ago) by thorpej
Branch: MAIN
Changes since 1.2: +7 -7 lines
Diff to previous 1.2 (colored)

Rename of_match_compat_data() to of_compatible_match().  Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 15 23:58:18 2021 UTC (3 years, 1 month ago) by jmcneill
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

use fdtbus_intr_establish_xname

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Sun Jan 3 16:34:52 2021 UTC (3 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.1.2.1: +279 -0 lines
Diff to previous 1.1.2.1 (colored)

Sync w/ HEAD.

Revision 1.1.2.1, Wed Dec 23 14:42:38 2020 UTC (3 years, 2 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.1: +0 -279 lines
FILE REMOVED

file imx6_usb.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Wed Dec 23 14:42:38 2020 UTC (3 years, 2 months ago) by skrll
Branch: MAIN
Branch point for: thorpej-futex

Tidyup the i.MX SoC support by

- Moving the  FDTised code to sys/arch/arm/nxp to match the
  sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
	- Secure Non-Volatile Storage
	- watchdog driver
	- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
  boards

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>