<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rt-thread.git/components/drivers/core/platform_ofw.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/rt-thread.git/atom/components/drivers/core/platform_ofw.c?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/rt-thread.git/atom/components/drivers/core/platform_ofw.c?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/'/>
<updated>2026-10-17T01:44:26Z</updated>
<entry>
<title>[ARCH/RISC-V] Next RISC-V (#10320)</title>
<updated>2026-10-17T01:44:26Z</updated>
<author>
<name>GUI</name>
<email>39894654+GuEe-GUI@users.noreply.github.com</email>
</author>
<published>2026-10-17T01:44:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=8d8dc96b67eee53af2841a8819364d52fbec39cb'/>
<id>urn:sha1:8d8dc96b67eee53af2841a8819364d52fbec39cb</id>
<content type='text'>
* [libcpu][risc-v] Refactor the RISC-V architecture port

Introduce an opt-in unified RISC-V common layer for RV32 and RV64 while keeping existing BSPs on the legacy implementation during migration.

- use ARCH_RISCV and ARCH_CPU_64BIT for architecture and XLEN selection
- unify context, trap, MMU, cache, timer, SBI, SMP and ISA handling
- add PLIC, CLIC, ACLINT, APLIC and IMSIC support
- map physical hart IDs to contiguous logical CPU IDs
- add T-Head vendor overrides while preserving legacy ports
- migrate qemu-virt64-riscv with RV32 and RV64 support
- update clock_time, MM, LWP, OFW, PCI and Rust integration

Existing BSPs continue using legacy_common or common64 unless they select RT_USING_RISCV_NEW_COMMON.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;

* [libcpu][risc-v] skip disabled CPU nodes in early FDT walk

Rbb666 noted that rt_hw_fdt_install_early() walked every /cpus child
without checking status, so disabled cores still joined hart registration
and MMU capability probing. Skip nodes that are not okay/ok via
rt_fdt_device_is_available() before reading reg or mmu-type.

Signed-off-by: seteiro &lt;chenmoushun@163.com&gt;

* [libcpu][risc-v] Fix per-CPU page table mapping

- reuse existing non-leaf page table entries when mapping per-CPU areas
- reject leaf entry conflicts instead of overwriting mappings

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;

---------

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
Signed-off-by: seteiro &lt;chenmoushun@163.com&gt;
Co-authored-by: seteiro &lt;chenmoushun@163.com&gt;</content>
</entry>
<entry>
<title>[dm][core] Add rt_bus_probe_device API</title>
<updated>2026-08-03T01:36:21Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2026-08-01T14:12:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=fe751c152101fc88ad887b06d91e2d96aafc2883'/>
<id>urn:sha1:fe751c152101fc88ad887b06d91e2d96aafc2883</id>
<content type='text'>
Add rt_bus_probe_device() to retry driver matching for a registered
but unbound device. Use it when an OFW-created platform device
is requested again, while preserving native-bus ownership
for I2C, SPI, and other non-platform devices.
Also instantiate eligible child platform devices after a parent node is registered.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>[drivers] Fix OFW bus conflict and prevent duplicate device creation</title>
<updated>2026-01-20T14:05:28Z</updated>
<author>
<name>lhxj</name>
<email>2743257167@qq.com</email>
</author>
<published>2025-12-25T09:56:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=7641ef68855601bc73252546bf41a96d6078444e'/>
<id>urn:sha1:7641ef68855601bc73252546bf41a96d6078444e</id>
<content type='text'>
Problem:
When enumerating device tree nodes, platform bus and native buses (I2C/SPI)
may create duplicate devices for the same OFW node, causing cross-bus conflicts.
This triggers assertion failure '(dev-&gt;bus != new_bus)' in
rt_bus_reload_driver_device() during boot on minimal DM-enabled systems.

Root Cause:
1. Platform bus tries to reload devices that already belong to other buses
   by calling rt_bus_reload_driver_device(dev-&gt;bus, dev), which violates
   the API contract (requires dev-&gt;bus != new_bus).
2. Native buses (I2C/SPI) do not mark OFW nodes as occupied, so platform
   bus creates duplicate platform devices for I2C/SPI client nodes.

Solution:
1. components/drivers/core/platform_ofw.c: Return RT_EOK when np-&gt;dev exists,
   letting the native bus handle device lifecycle instead of cross-bus reload.
2. components/drivers/i2c/dev_i2c_bus.c: Mark i2c_client_np-&gt;dev during scan
   to prevent platform bus from duplicating I2C client devices.
3. components/drivers/spi/dev_spi_bus.c: Mark spi_dev_np-&gt;dev during scan
   to prevent platform bus from duplicating SPI devices.

Tested on Spacemit K1 RISC-V platform with minimal DM configuration.

Signed-off-by: lhxj &lt;2743257167@qq.com&gt;
</content>
</entry>
<entry>
<title>[dm][core] Update the OFW CLk init flow</title>
<updated>2025-12-13T08:35:32Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2025-12-12T17:24:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=cbf3f8c3b4fbdd3391bf3c8d1300c7854729a1ca'/>
<id>urn:sha1:cbf3f8c3b4fbdd3391bf3c8d1300c7854729a1ca</id>
<content type='text'>
The clock should init before common platform devices.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>[DM/Platform] Fixup the node will probe more than once</title>
<updated>2025-03-19T01:46:48Z</updated>
<author>
<name>GUI</name>
<email>39894654+GuEe-GUI@users.noreply.github.com</email>
</author>
<published>2025-03-18T04:28:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=fc86cb94272b82e4160036b523bb9fd48103a0fa'/>
<id>urn:sha1:fc86cb94272b82e4160036b523bb9fd48103a0fa</id>
<content type='text'>
If a node request a new node or it's parent node. the  request's node will probe a double time.
So we check the device object of node in ofw probe entry and ofw probe child exit.</content>
</entry>
<entry>
<title>[DM/FEATURE] Support clock subprobe in OFW</title>
<updated>2024-11-18T07:03:23Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2024-10-24T04:00:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=6185250c86af49ca12ca923c8fd3e70b37143310'/>
<id>urn:sha1:6185250c86af49ca12ca923c8fd3e70b37143310</id>
<content type='text'>
Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>[DM/FEATURE] Support driver depends fix auto</title>
<updated>2024-11-18T07:03:23Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2024-10-24T03:56:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=cefe6d63805b89fb96aea69eb8e14fa12260192a'/>
<id>urn:sha1:cefe6d63805b89fb96aea69eb8e14fa12260192a</id>
<content type='text'>
We need a API to fix the driver load auto when
a second driver get it in probe process that
we can not be careful of the driver-to-driver's
depends in different SoC.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>Fixup platform not free device in OFW</title>
<updated>2024-09-03T23:49:47Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2024-07-09T09:17:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=175a2ff954a8ad6ce9a1739c8338b665b6abef80'/>
<id>urn:sha1:175a2ff954a8ad6ce9a1739c8338b665b6abef80</id>
<content type='text'>
Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>fix rt_atomic_dec_and_test</title>
<updated>2024-08-09T04:54:10Z</updated>
<author>
<name>zhao maosheng</name>
<email>zmshahaha@gmail.com</email>
</author>
<published>2024-08-01T03:20:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=f543160ead455096d0f5756ffd8876914dd4abdb'/>
<id>urn:sha1:f543160ead455096d0f5756ffd8876914dd4abdb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Feature] Support simple power domain API (#9005)</title>
<updated>2024-05-30T07:30:40Z</updated>
<author>
<name>GUI</name>
<email>39894654+GuEe-GUI@users.noreply.github.com</email>
</author>
<published>2024-05-30T07:30:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=e7cddf3a5275937b38f95afa7540fcc3fc7e5354'/>
<id>urn:sha1:e7cddf3a5275937b38f95afa7540fcc3fc7e5354</id>
<content type='text'>
* [Feature] Power domain for device

1.Support device power on/off.
2.Support attach/detach device.
3.Support power domain driver api.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;

* [DM/platform] Enhanced platform bus

1.Add power domain for device.
2.Support `remove` and `shutdown` bus interface.

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;

---------

Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;</content>
</entry>
</feed>
