<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/fdt, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-10-31T17:09:25Z</updated>
<entry>
<title>MFC r366156:</title>
<updated>2020-10-31T17:09:25Z</updated>
<author>
<name>Michal Meloun</name>
<email>mmel@FreeBSD.org</email>
</author>
<published>2020-10-31T17:09:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c9f8ff4b206f68997acb4a0eb02d06587f89b0d1'/>
<id>urn:sha1:c9f8ff4b206f68997acb4a0eb02d06587f89b0d1</id>
<content type='text'>
  Correctly handle nodes compatible with "syscon", "simple-bus".  Syscon can
  also have child nodes that share a registration file with it.  To do this
  correctly, follow these steps: - subclass syscon from simplebus and expose it
  if the node is also
    "simple-bus" compatible.
  - block simplebus probe for this compatible string, so it's priority
   (bus pass) doesn't colide with syscon driver.
</content>
</entry>
<entry>
<title>MFC r342008,r363799,r366146:</title>
<updated>2020-10-31T17:07:43Z</updated>
<author>
<name>Michal Meloun</name>
<email>mmel@FreeBSD.org</email>
</author>
<published>2020-10-31T17:07:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=94f8c4a47b569a2ea38ed88efdcf62f3a4fdc299'/>
<id>urn:sha1:94f8c4a47b569a2ea38ed88efdcf62f3a4fdc299</id>
<content type='text'>
  r342008:
    fdt: Add support for simple-mfd bus
  r363799:
    Allow child classes of simplebus to call attach directly
  r366146:
    Make simplebus friendlier for subclassing.
</content>
</entry>
<entry>
<title>MFC r348885, r351543, r356806-r356807</title>
<updated>2020-03-04T21:53:54Z</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2020-03-04T21:53:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ebf4f6d9023b3cb22172f643248ad03b6abdcbe6'/>
<id>urn:sha1:ebf4f6d9023b3cb22172f643248ad03b6abdcbe6</id>
<content type='text'>
r348885 by bz:
A bit of code hygiene (no functional changes).

Hide unused code under #ifdef notyet (in one case the only caller is under
that same ifdef), or if it is arm (not arm64) specific code under the
__arm__ ifdef to not yield -Wunused-function warnings during the arm64
kernel compile.

r351543 by mmel:
Add support for RK3288 into existing RockChip drivers.
This patch ensures only minimal level of compatibility necessary to boot
on RK3288 based boards. GPIO and pinctrl interaction, missing in current
implementation, will be improved by own patch in the near future.

MFC with:	r351452

r356806:
fdt_pinctrl: Add new methods for gpios

Most of the gpio controller cannot configure or get the configuration
of the pin muxing as it's usually handled in the pinctrl driver.
But they can know what is the pinmuxing driver either because they are
child of it or via the gpio-range property.
Add some new methods to fdt_pinctrl that a pin controller can implement.
Some methods are :
fdt_pinctrl_is_gpio: Use to know if the pin in the gpio mode
fdt_pinctrl_set_flags: Set the flags of the pin (pullup/pulldown etc ...)
fdt_pinctrl_get_flags: Get the flags of the pin (pullup/pulldown etc ...)

The defaults method returns EOPNOTSUPP.

Reviewed by:	ian, bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D23093

r356807:
arm64: rockchip: Add new interface for rk_pinctrl

The gpio controller in rockchips SoC in a child of the pinctrl driver
and cannot control pullups and pulldowns.
Use the new fdt_pinctrl interface for accessing pin capabilities and
setting them.
We can now report that every pins is capable of being IN or OUT function
and PULLUP PULLDOWN.
If the pin isn't in gpio mode no changes will be allowed.

Reviewed by:	ganbold (previous version)
Differential Revision:	https://reviews.freebsd.org/D22849
</content>
</entry>
<entry>
<title>MFC r352863: fdt_slicer: bump to SI_ORDER_THIRD following r347183</title>
<updated>2019-10-03T12:47:05Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-10-03T12:47:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a62e571653ee683bb50eadae49a504dfea4fe653'/>
<id>urn:sha1:a62e571653ee683bb50eadae49a504dfea4fe653</id>
<content type='text'>
r347183 bumped GEOM classes to SI_ORDER_SECOND to resolve a race between
them and the initialization of devsoftc.mtx in devinit, but missed this
dependency on g_flashmap that may now lose the race against GEOM
classes/g_init.

There's a great comment that describes the situation that has also been
updated with the new ordering of GEOM classes.
</content>
</entry>
<entry>
<title>MFC r351184, r351189, r351217</title>
<updated>2019-09-13T21:20:24Z</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2019-09-13T21:20:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=add41077aeb4da52abeba9bc33b1292a78c848e9'/>
<id>urn:sha1:add41077aeb4da52abeba9bc33b1292a78c848e9</id>
<content type='text'>
r351184:
Add method for getting of syscon handle from parent device.

If simple multifuction device also provides syscon interface, its
childern should be able to consume it. Due to this:
- declare coresponding method in syscon interface
- implement it in simple multifunction device driver

r351189:
Fix bug introduced by r351184.
We should check the returned handle, not the pointer to it.

Noticed by:	ian
X-MFC with:	r351184

r351217:
arm64: a37x0_gpio: Use syscon instead of MMIO region

The fdt node for this driver is a simple-mfd and syscon compatible one
meaning that simplemfd will be the driver attached for it. The gpio driver
is attached to the 'gpio' subnode so use syscon_get_handle_default to
obtain the handle of the syscon from the parent device and use this
to read/write to the memory region.
</content>
</entry>
<entry>
<title>MFC r349596 by ganbold:</title>
<updated>2019-08-16T20:56:35Z</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2019-08-16T20:56:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d198a655120d97de4fd6baacdf5e36da124076b4'/>
<id>urn:sha1:d198a655120d97de4fd6baacdf5e36da124076b4</id>
<content type='text'>
Extend simple_mfd driver to expose a syscon interface if
that node is also compatible with syscon. For instance,
Rockchip RK3399's GRF (General Register Files) is compatible
with simple-mfd as well as syscon and has devices like
usb2-phy, emmc-phy and pcie-phy etc. under it.

Reviewed by:	manu
</content>
</entry>
<entry>
<title>MFC r342008, r342010-r342020</title>
<updated>2019-08-05T17:43:44Z</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2019-08-05T17:43:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bb96de707c2e882044864a4f0a79d1f98e872f2d'/>
<id>urn:sha1:bb96de707c2e882044864a4f0a79d1f98e872f2d</id>
<content type='text'>
r342008:
fdt: Add support for simple-mfd bus

Quoting the binding Documentation :

"These devices comprise a nexus for heterogeneous hardware blocks containing
more than one non-unique yet varying hardware functionality."

Reviewed by:	loos
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D17751

r342010:
arm64: Add new SoC type MARVELL_8K

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342011:
arm64: mvebu_pinctrl: Add driver for Marvell Pinmux Controller

Add a driver compatible with Marvell mvebu-pinctrl and add ap806-pinctrl
support.

Sponsored by:	Rubicon Communications, LCC ("Netgate")

r342012:
arm64: marvell: Add driver for Marvell Ap806 System Controller

The first two clocks are for the clusters and their frequencies can be
found reading a register. Then a fixed 1200Mhz clock is present and two
fixed clocks, 'mss' which is 1200 / 6 and 'sdio' which is 1200 / 3.

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342013:
arm64: mv_gpio: Add Marvell 8K support

While here put the interrupts setup in it's own function

Sponsored by:	Rubicon Communications, LCC ("Netgate")

r342014:
arm64: marvell: Add cp110 clock controller support

The cp110 clock controller controls the clocks and gate of the CP110
hardware block.

Every clock/gate are implemented except the NAND clock.

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342015:
twsi: Clean up marvell part and add support for Marvell 7k/8k

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342016:
arm64: Add mv_cp110_icu and mv_cp110_gicp

icu is a interrupt concentrator in the CP110 block and gicp
is a gic extension to allow interrupts in the CP block to be turned
into GIC SPI interrupts

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342017:
sdhci_xenon: Add Marvell 8k compatible string

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342018:
mv_gpio: Since it's also an interrupt controller, attach sooner

Sponsored by:	Rubicon Communications, LLC ("Netgate")

r342019:
arm64: mv_cp110_icu: Fix build

r342020:
mv_thermal: Add thermal driver for AP806 and CP110 thermal sensor

Sponsored by:	Rubicon Communications, LLC ("Netgate")
</content>
</entry>
<entry>
<title>MFC r344505-r344507, r344523, r344525-r344526, r344529, r344606-r344612,</title>
<updated>2019-04-22T00:38:25Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2019-04-22T00:38:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b90d8d4fb588a84158a9d49426b3e0093ca3457a'/>
<id>urn:sha1:b90d8d4fb588a84158a9d49426b3e0093ca3457a</id>
<content type='text'>
r344614-r344616, r344681, r344684-r344686, r344728, r344733-r344734, r344981

A large set of changes that collectively modernize the at45d and mx25l
(DataFlash and SpiFlash) drivers, add FDT support, and add geom_flashmap and
geom_label support to them.

r344505:
Add a functional detach() implementation to make module unloading possible.

r344506:
Add support for probing/attaching on FDT-based systems.

r344507:
Switch to using config_intrhook_oneshot().  That allows the error handling
in the delayed attach to use early returns, which allows reducing the level
of indentation.  So all in all, what looks like a lot of changes is really
no change in behavior, mostly just moving whitespace around.

r344523:
Include the jedec "extended device information string" in the criteria used
to match a chip to our table of metadata describing the chips. At least one
new DataFlash chip has a 3-byte jedec ID identical to its predecessors and
differs only in the extended info, and it has different metadata requiring a
unique entry in the table.  This paves the way for supporting such chips.

The metadata table now includes two new fields, extmask and extid.  The two
bytes of extended info obtained from the chip are ANDed with extmask then
compared to extid, so it's possible to use only a subset of the extended
info in the matching.

We now always read 6 bytes of jedec ID info. Most chips don't return any
extended info, and the values read back for those two bytes may be
indeterminate, but such chips have extmask and extid values of 0x0000 in the
table, so the extid effectively doesn't participate in the matching on those
chips and it doesn't matter what they return in the extended info bytes.

r344525:
Add a metadata entry for the AT45DB641E chip.  This chip has the same 3-byte
jedec ID as its older cousin the AT45DB642D, but uses a different page size.
The only way to distinguish between the two chips is that the 2D chip has
0 bytes of extended ID info and the new 1E has 1 byte of extended ID.  The
actual value of the extended ID byte is all zeroes.  In other words, it's
the presence of the extended info that identifies this chip. (Presumably
a future upgrade might define non-zero values for the extended ID byte.)

r344526:
Resolve a name conflict when both SpiFlash and DataFlash devices are present.

Both SpiFlash (mx25l) and DataFlash (at45d) drivers create a disk device
with a name of /dev/flash/spiN where N is the driver's unit number.  If
both types of devices are present in the same system, this creates a fatal
conflict that prevents attachment of whichever device attaches second
(because mx25l0 and at45d0 both try to create a spi0).

This gives each type of device a unique name (mx25lN or at45dN respectively)
and also adds an alias of spiN for compatibility.  When both device types
appear in the same system, only the first to attach gets the spiN alias.
When the second device attaches there is a non-fatal warning that the alias
can't be created, but both devices are still accessible via their primary
names (and there is no need for the spiN name to work for backwards
compatibility on such a system, because it has never been possible to use
the spiN names when both devices exist).

r344529:
Fix a paste-o that broke the build on all arches.

r344606:
Add support for geom_flashmap by providing a getattr() for "SPI:device".

r344607:
Compile fdt_slicer and geom_flashmap when the at45d device is included.

r344608:
Update a comment to reflect reality; no functional changes.

r344609:
Make it possible to load fdt_slicer as a module (unloading works too fwiw).

r344610:
Add manpages for at45d(4) and mx25l(4).

r344611:
Add a module dependency on fdt_slicer.

r344612:
Add a module dependency on fdt_slicer.  Also, move the PNP_INFO to its more
usual location, down near the DRIVER_MODULE() stuff.

r344614:
Rename some functions and variables to have shorter names, which allows
unwrapping multiple lines of code.  Also, convert some short multiline
comments into single-line comments.  Change old-school FALSE to false.

All in all, no functional changes, it's just more compact and readable.

r344615:
Child nodes with a compatible property are not slices, according to the
devicetree/bindings/mtd/partitions.txt document, so just ignore them.

r344616:
Add support to fdt_slicer for the new style partition data documented in
devicetree/bindings/mtd/partition.txt.

In the old style, all the children of the device node which did not have a
compatible property were the partitions.  In the new style, there is a child
node of the device which has a compatible string of "fixed-partitions", and
its children are the individual partitions.

Also, support the read-only property by setting the corresponding slice flag.

r344681:
Build fdt support modules on systems that use fdt data.

kern.opts.mk sets make var OPT_FDT to a non-empty value if platform.h
contains OPT_FDT.

r344684:
Undo accidental part of r344681.

I think I must have accidentally mouse-click pasted while scrolling and
didn't notice it.

Reported by:	jhibbits@

r344685:
Add required header file to SRCS.

r344686:
Add another required header file.

For some reason this seems to be required on aarch64, but I can build armv7
from clean without needing this in the list.  (The file does get included,
so the mystery is why armv7 works.)

r344728:
Bugfix: use a dummy buffer for the inactive side of a transfer.

This is especially important for writes.  SPI is inherently a bidirectional
bus; you receive data (even if it's garbage) while writing.  We should not
receive that data into the same buffer we're writing to the device.

When reading it doesn't matter what we send to the device, but using the
dummy buffer for that as well is pleasingly symmetrical.

r344733:
Add some comments.  Give #define'd names to some scattered numbers.  Change
some #define'd names to be more descriptive.  When reporting a post-write
compare failure, report the page number, not the byte address of the page.
The latter is the only functional change, it makes the number match the
words of the error message.

r344734:
Allow the sector size of the disk device to be configured using hints or
FDT data.  The sector size must be a multiple of the device's page size.
If not configured, use the historical default of the device page size.

Setting the disk sector size to 512 or 4096 allows a variety of standard
filesystems to be used on the device.  Of course you wouldn't want to be
writing frequently to a SPI flash chip like it was a disk drive, but for
data that gets written once (or rarely) and read often, using a standard
filesystem is a nice convenient thing.

r344981:
Give the mx25l device sole ownership of the name /dev/flash/spi* instead of
trying to use disk_add_alias() to make spi* an alias for mx25l*.  It turns
out disk_add_alias() works for partitions, but not slices, and that's hard
to fix.

This change is, in effect, a partial revert of r344526.

The mips world relies on the existence of flashmap names formatted as
/dev/flash/spi0s.name, whereas pretty much nothing relies on at45d devices
using the /dev/spi* names (because until recently the at45d driver didn't
even work reliably). So this change makes mx25l devices the sole owner of
the /dev/flash/spi* namespace, which actually makes some sense because it is
a SpiFlash(tm) device, so flash/spi isn't a horrible name.
</content>
</entry>
<entry>
<title>MFC r345855: cpsw: use `phy-handle` in FDT to find PHY address</title>
<updated>2019-04-17T17:19:19Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-04-17T17:19:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d3aca40d70cd589cf6e66b385ea689a7db4908e0'/>
<id>urn:sha1:d3aca40d70cd589cf6e66b385ea689a7db4908e0</id>
<content type='text'>
In r337703 DTS files were updated to Linux 4.18, including Linux commit
4d8b032d3c03f4e9788a18bbb51b10e6c9e8a56b which removed the `phy_id`
property from am335x-bone-common (as the property was deprecated).

Use `phy-handle` via fdt_get_phyaddr, keeping the existing code as a
fallback for old DTBs.

PR:		236624
Submitted by:	manu, Gerald Aryeetey &lt;aryeeteygerald_rogers.com&gt;
Reported by:	Gerald Aryeetey
Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>fdt_pinctrl: Add some TSLOG annotations</title>
<updated>2018-07-19T11:41:53Z</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2018-07-19T11:41:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=413d07ea3e71296c89bc89bfc910df4cdd325adf'/>
<id>urn:sha1:413d07ea3e71296c89bc89bfc910df4cdd325adf</id>
<content type='text'>
While we see the time spent in the pin controller attach via the hooks in
DEVICE_ATTACH, it is useful to see the time spent configuring the pins.
</content>
</entry>
</feed>
