Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
0 answers
9 views
BUG: Bad page state in process swapper pfn:801bd while booting linux (5.15.68, arm64)
I'm tyring to boot linux on an SoC (arm64 based) and seeing trap in early stage. Here is the boot message. Booting Linux on physical CPU 0x0000000002 [0x411fd401] Linux version 5.15.68 (etri@AB21-T07) (aarch64-none-elf-gcc (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.1 2022...
I'm tyring to boot linux on an SoC (arm64 based) and seeing trap in early stage. Here is the boot message. Booting Linux on physical CPU 0x0000000002 [0x411fd401] Linux version 5.15.68 (etri@AB21-T07) (aarch64-none-elf-gcc (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.1 20220111, GNU ld (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 2.37.20220122) #106 SMP PREEMPT Sun Jun 29 20:47:09 KST 2025 Machine model: ETRI ab21m earlycon: ns16550a0 at MMIO 0x0000000010220020 (options '115200n8') printk: bootconsole [ns16550a0] enabled Reserved memory: created CMA memory pool at 0x00000000f0000000, size 256 MiB OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool Reserved memory: created DMA memory pool at 0x00000000e0000000, size 128 MiB OF: reserved mem: initialized node axpursvd@e0000000, compatible id shared-dma-pool Zone ranges: DMA [mem 0x0000000080000000-0x00000000ffffffff] DMA32 empty Normal empty Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000080000000-0x00000000dfffffff] node 0: [mem 0x00000000e0000000-0x00000000e7ffffff] node 0: [mem 0x00000000e8000000-0x00000000ffffffff] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff] percpu: Embedded 23 pages/cpu s57312 r8192 d28704 u94208 Detected PIPT I-cache on CPU0 CPU features: detected: GIC system register CPU interface CPU features: detected: Virtualization Host Extensions CPU features: detected: Hardware dirty bit management CPU features: detected: Spectre-v4 CPU features: detected: Spectre-BHB alternatives: patching kernel code Built 1 zonelists, mobility grouping on. Total pages: 517120 Kernel command line: earlycon root=/dev/ram init=/init nokaslr, cpuidle.off=1 Unknown kernel command line parameters "nokaslr,", will be passed to user space. Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) entering mm_init.. mem auto-init: stack:off, heap alloc:off, heap free:off BUG: Bad page state in process swapper pfn:801bd ------------[ cut here ]------------ kernel BUG at arch/arm64/kernel/traps.c:498! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.68 #106 Hardware name: ETRI ab21m (DT) pstate: 000000c9 (nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : do_undefinstr+0x180/0x1a4 lr : do_undefinstr+0x194/0x1a4 sp : ffffffc008693ad0 x29: ffffffc008693ad0 x28: ffffffc00869a100 x27: 000000000030f231 x26: fffffffe00007000 x25: 0000000080000000 x24: 0000000000000008 x23: 00000000800000c9 x22: ffffffc00813c810 x21: ffffffc008693c90 x20: 00000000ffffffff x19: ffffffc008693b40 x18: ffffffffffffffff x17: 2c73657479622036 x16: 373538343031202c x15: ffffffc008701fcd x14: 0000000000000000 x13: ffffffc0086a78f8 x12: 0000000000000072 x11: 0000000000000026 x10: ffffffc0086a78f8 x9 : ffffffc0086a78f8 x8 : 00000000ffffff7f x7 : ffffffc0086aa4f8 x6 : ffffffc0086aa4f8 x5 : ffffffc00869bca8 x4 : fffffffffefffffe x3 : 0000000000000000 x2 : 0000000000000002 x1 : ffffffc00869a100 x0 : 00000000800000c9 Call trace: do_undefinstr+0x180/0x1a4 el1_undef+0x28/0x44 el1h_64_sync_handler+0x80/0xc0 el1h_64_sync+0x74/0x78 __dump_page+0x0/0x410 bad_page+0xe8/0x120 __free_pages_ok+0x418/0x460 __free_pages_core+0xa8/0xc0 memblock_free_pages+0x10/0x18 memblock_free_all+0x1ac/0x258 mem_init+0x70/0x88 mm_init+0x2c/0x78 start_kernel+0x260/0x64c __primary_switched+0xa0/0xac Code: b94037f4 a9025bf5 17ffffca a9025bf5 (d4210000) ------------[ cut here ]------------ kernel BUG at arch/arm64/kernel/traps.c:498! I think my device tree have something wrong. This is the line related to memory, and I don't know what is wrong. Can any one notice anything suspicous? memory@80000000 { device_type = "memory"; /*reg = , trusted ram */ /*, non-trusted ram */ reg = ; }; reserved-memory { #address-cells = ; #size-cells = ; ranges; axpu_reserved_mem: axpursvd@e0000000 { compatible = "shared-dma-pool"; no-map; reg = ; }; linux,cma { compatible = "shared-dma-pool"; reusable; size = ; alloc-ranges = ; linux,cma-default; }; };
Chan Kim (459 rep)
Jun 30, 2025, 03:13 AM
2 votes
1 answers
2105 views
RS485 hardware RTS on SC16IS752 not working when it is enabled in device tree overlay
I'm trying to make SC16IS752 (SPI to UART converter) work in RS485 mode by using device tree overlay (without running C application at boot). I took original overlay source for SC16IS752 from official sources at github: [sc16is752-spi1-overlay.dts][1] Without adding `linux,rs485-enabled-at-boot-time...
I'm trying to make SC16IS752 (SPI to UART converter) work in RS485 mode by using device tree overlay (without running C application at boot). I took original overlay source for SC16IS752 from official sources at github: sc16is752-spi1-overlay.dts Without adding linux,rs485-enabled-at-boot-time; line it works like this: (RTS is always HIGH) no device tree flag I changed fragment@1 part like this and added RS485 (I also changed clock freq because I'm using 1.843200MHz crystal in my hardware, not 14.xxxxMHz): fragment@1 { target = ; frag1: __overlay__ { #address-cells = ; #size-cells = ; pinctrl-names = "default"; pinctrl-0 = ; cs-gpios = ; status = "okay"; /* RS485 SUPPORT */ linux,rs485-enabled-at-boot-time; rs485-rts-delay = ; /* RS485 SUPPORT END */ sc16is752: sc16is752@0 { compatible = "nxp,sc16is752"; reg = ; /* CE0 */ clocks = ; interrupt-parent = ; interrupts = ; /* IRQ_TYPE_EDGE_FALLING */ gpio-controller; gpio-cells = ; spi-max-frequency = ; /* I also tried to put it here */ /* but RTS is always HIGH */ /* RS485 SUPPORT */ /* linux,rs485-enabled-at-boot-time; */ /* rs485-rts-delay = ; */ /* RS485 SUPPORT END */ sc16is752_clk: sc16is752_clk { compatible = "fixed-clock"; #clock-cells = ; clock-frequency = ; }; }; }; }; I compiled dts file, I put it to /boot/overlays and I have added proper line in /boot/config.txt to use that overlay. RTS line now is always LOW (without flag it was HIGH - see image above): device tree flag set So this flag has been read by kernel/driver, but it RTS does nothing when I'm sending data. It should work like this: enter image description here Last screenshot with working RS485 mode was taken after I turned RS485 mode in C program like this: #include #include #include /* Include definition for RS485 ioctls: TIOCGRS485 and TIOCSRS485 */ #include int main(int argc, char *artv[]){ /* Open your specific device (e.g., /dev/mydevice): */ int fd = open ("/dev/ttySC0", O_RDWR); if (fd < 0) { /* Error handling. See errno. */ return -1; } struct serial_rs485 rs485conf; /* Enable RS485 mode: */ rs485conf.flags |= SER_RS485_ENABLED; /* Set logical level for RTS pin equal to 1 when sending: */ rs485conf.flags |= SER_RS485_RTS_ON_SEND; /* Set logical level for RTS pin equal to 0 after sending: */ rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND); rs485conf.delay_rts_before_send = 0; rs485conf.delay_rts_after_send = 0; // zero! nie obsługiwane przez SC16IS752 if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) { /* Error handling. See errno. */ return -2; } /* Use read() and write() syscalls here... */ /* Close the device when finished: */ if (close (fd) < 0) { /* Error handling. See errno. */ return -3; } return 0; } So, the question is **how to do it without C program**? **Why setting rs485 mode in device tree is not enough?** I'm suspecting that the driver has no default configuration, and it has zeroes in both SER_RS485_RTS_ON_SEND and SER_RS485_RTS_AFTER_SEND flags. If this is true - (extra question) should I report issue with this driver in this situation? Useful resources: - SC16IS7xx driver I'm using: github link - Device tree binding documentation for RS485: github link - Original overlay without RS485: github link --- Edit/added later: I also noticed, that when my overlay was applied at boot and I run this code (it is supposed to read flags from port, I'm not sure if it is correct). /* Reading rs485conf struct from port */ if (ioctl (fd, TIOCGRS485, &rs485conf) < 0) { /* Error handling. See errno. */ return -2; } printf("Before: "); binprintf(rs485conf.flags); // function that prints int as binary printf("\n"); all flags are empty. So... overlay changed RTS state after boot, but flags on port are zeroes? I don't understand.
Kamil (799 rep)
Sep 12, 2019, 08:44 PM • Last activity: Jun 19, 2025, 02:02 PM
3 votes
1 answers
109 views
Why can the Linux device tree compiler not resolve this label for an alias?
# Problem I am trying to add a Linux device tree alias for a network adapter, so U-Boot can assign a static MAC address to it. However, when compiling the kernel, it fails at the adjusted device tree with this error message: ``` ERROR (path_references): /aliases: Reference to non-existent node or la...
# Problem I am trying to add a Linux device tree alias for a network adapter, so U-Boot can assign a static MAC address to it. However, when compiling the kernel, it fails at the adjusted device tree with this error message:
ERROR (path_references): /aliases: Reference to non-existent node or label "r8125_u40"
It is about a device tree for the FriendlyELEC NanoPi R6S, based on mainline Linux 6.12: - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts?h=linux-6.12.y - Relevant include: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi?h=linux-6.12.y What I am adding to/merging into rk3588s-nanopi-r6s.dts is the following:
aliases {
	ethernet1 = &r8125_u25;
	ethernet2 = &r8125_u40;
};

&pcie2x1l1 {
	pcie@0,0 {
		reg = ;
		#address-cells = ;
		#size-cells = ;

		r8125_u25: pcie@30,0 {
			reg = ;
			local-mac-address = [ 00 00 00 00 00 00 ];
		};
	};
};

&pcie2x1l2 {
	pcie@0,0 {
		reg = ;
		#address-cells = ;
		#size-cells = ;

		r8125_u40: pcie@40,0 {
			reg = ;
			local-mac-address = [ 00 00 00 00 00 00 ];
		};
	};
};
Those are two PCIe network adapters. U-Boot assigns static MAC addresses to ethernet* aliases, so I add the needed PCIe sub devices, give them labels r8125_u25 and r8125_u40 and add the aliases with those labels. This works pretty well for all other SBCs I applied a similar change for PCIe Ethernet adapters, and it works well for r8125_u25 and ethernet1. However, for the very similar second adapter, the compiler refuses to find the node. ## What does work It works perfectly fine to do the same change with a device tree overlay, the alias then is valid, and the Ethernet adapter (all three) get its static MAC address. But I would like to achieve this without overlay. In Linux 6.13, most of the device tree for this SBC has been moved into another include: - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts?h=linux-6.15.y - New include: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi?h=linux-6.15.y There, (tested with Linux 6.15) patching above aliases and child nodes into rk3588s-nanopi-r6s.dts works fine. However, I would like to achieve this work current LTS as well. # Solution attempts To get some quick ideas, I queried an LLM, and tried the following without success: - Move PCIe device nodes to the top of the device tree source: same error - Assign the full device path to the alias, instead of the label:
ethernet2 = ${/pcie@fe190000/pcie@0,0/pcie@40,0};
The compiler then complains that this path does not exist. - Assign a label = "r8125_u40"; to the node: same error - Assign a phandle = ; to the node: I did not find a way to assign a phandle to an alias so that it refers to the actual node, instead of just being resolved as number. - Set status = "okay"; explicitly for the node, same error Apart of this, I could not find any structural difference or invalid dependency or anything that could be a relevant difference and reason why r8125_u40 fails to be resolved, while r8125_u25 works perfectly fine. I did not try to define the child nodes in a parent/include device tree source. The same kernel will be used for a lot of different SBCs, and I do not want to cause problems by defining a possibly conflicting, at least obsolete node for an SBC which does not have a network adapter attached to the same PCIe bus. # Questions 1. Why is the compiler chocking on &r8125_u40? What are the general rules or limitations in how the device tree compiler is able to resolve symbol labels, or even see nodes defined in the same source file at all? From what I found, it is supposed to parse everything first, and resolve symbols/labels last. Obviously a false assumption in this case. 2. Is there any workaround to force the parsing/recognition of the child node or its label, before the alias is tried to be assigned, which does not involve a device tree overlay?
MichaIng (151 rep)
Jun 8, 2025, 12:37 PM • Last activity: Jun 8, 2025, 03:41 PM
12 votes
2 answers
5925 views
Meaning of an ampersand prefix in a device tree
I am looking at a DTS file which tries to specify different nodes, but interestingly I find a few nodes having different style of nomenclature. / { model = "TI AM335x BeagleBone Black"; compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; }; &ldo3_reg { regulator-min-microvolt = ; reg...
I am looking at a DTS file which tries to specify different nodes, but interestingly I find a few nodes having different style of nomenclature. / { model = "TI AM335x BeagleBone Black"; compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; }; &ldo3_reg { regulator-min-microvolt = ; regulator-max-microvolt = ; regulator-always-on; }; &mmc1 { vmmc-supply = ; }; &mmc2 { vmmc-supply = ; pinctrl-names = "default"; pinctrl-0 = ; bus-width = ; status = "okay"; }; / { hdmi { compatible = "ti,tilcdc,slave"; i2c = ; pinctrl-names = "default", "off"; pinctrl-0 = ; pinctrl-1 = ; status = "okay"; }; }; What does it convey if a node has & as its prefix? What is the necessity of separating them from root node, while they can be present in the root node itself? Interestingly, the above example also has two root nodes, how is that possible?
kakeh (483 rep)
Jan 14, 2015, 12:43 PM • Last activity: May 28, 2025, 01:05 PM
1 votes
1 answers
1921 views
Cannot compile device tree blob due to missing node/label
I'm trying to create a petalinux image using the petalinux SDK. After I start a build I get an error when the process tries to build the system.dtb The error is "(phandle references): Reference to non-existent node or label "ps7_scugic_0" - which is relayed twice. I believe this is some sort of inte...
I'm trying to create a petalinux image using the petalinux SDK. After I start a build I get an error when the process tries to build the system.dtb The error is "(phandle references): Reference to non-existent node or label "ps7_scugic_0" - which is relayed twice. I believe this is some sort of interrupt device used in the ZYNQ SoC and is visible and mapped in the xml file used to generate parts of this build. How can I create this node? Do I have to edit the dts and dtsi files?
Mark Corrigan (11 rep)
Jun 29, 2015, 01:42 PM • Last activity: May 3, 2025, 10:02 AM
1 votes
1 answers
2200 views
Jetson TX2 device tree, i2c nodes and camera driver loading
I am a bit confused with behavior of Jetson TX2 when loading drivers for camera. Here is definition of IMX274 in device tree: i2c@3180000 { reg = ; dmas = ; interrupts = ; compatible = "nvidia,tegra186-i2c"; clock-names = "div-clk", "parent", "slow-clk"; reset-names = "i2c"; clock-frequency = ; scl-...
I am a bit confused with behavior of Jetson TX2 when loading drivers for camera. Here is definition of IMX274 in device tree: i2c@3180000 { reg = ; dmas = ; interrupts = ; compatible = "nvidia,tegra186-i2c"; clock-names = "div-clk", "parent", "slow-clk"; reset-names = "i2c"; clock-frequency = ; scl-gpio = ; sda-gpio = ; clocks = ; resets = ; status = "okay"; #address-cells = ; phandle = ; #stream-id-cells = ; #size-cells = ; dma-names = "rx", "tx"; linux,phandle = ; imx274_a@1a { reg = ; mclk = "extperiph1"; devnode = "video0"; avdd-reg = "vana"; compatible = "nvidia,imx274"; clock-names = "extperiph1", "pllp_grtba"; reset-gpios = ; physical_h = "2.738"; physical_w = "3.674"; clocks = ; vana-supply = ; sensor_model = "imx274"; iovdd-reg = "vif"; delayed_gain = "true"; vif-supply = ; dvdd-reg = "vdig"; vdig-supply = ; mode0 { ... } ports { #address-cells = ; #size-cells = ; port@0 { reg = ; endpoint { bus-width = ; remote-endpoint = ; phandle = ; csi-port = ; linux,phandle = ; }; }; }; }; i2c2 is an alias for i2c@3180000 therefore I expect to see the device on bus 2. An sure I can see it on a bus with address 0x57. nvidia@tegra-ubuntu:~/kernel/kernel$ sudo i2cdetect -r -y 2 [sudo] password for nvidia: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- 20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- Here comes the first question. **How does kernel identifies type of i2c device on a bus?** I thought that field reg is used, but 0x1a in device tree is clearly different from 0x57 on a bus. Secondly, as I can see module is compatible with the following drivers: compatible = "nvidia,imx274"; However device driver is different: nvidia@tegra-ubuntu:~/kernel/kernel$ sudo v4l2-ctl -D -d /dev/video0 Driver Info (not using libv4l2): Driver name : tegra-video Card type : vi-output, imx274 2-001a Bus info : platform:15700000.vi:0 Driver version: 4.4.38 Capabilities : 0x84200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x04200001 Video Capture Streaming Extended Pix Format **Therefore it seems for me that wrong driver is loaded for some reasons, it it true or I am just missing something?** However it is still possible to capture image with argus.
Юрий Камнев (11 rep)
Jul 30, 2019, 10:20 AM • Last activity: Apr 27, 2025, 10:02 AM
2 votes
1 answers
3051 views
Override mtdparts configured in kernel device tree
I've installed Debian Buster on a "ReadyNAS 102" via u-boot / serial console. I was following [this tutorial][1]. But, replaced used different links to download current the Debian installer and Device Tree Blob: * http://ftp.debian.org/debian/dists/buster/main/installer-armhf/current/images/device-t...
I've installed Debian Buster on a "ReadyNAS 102" via u-boot / serial console. I was following this tutorial . But, replaced used different links to download current the Debian installer and Device Tree Blob: * http://ftp.debian.org/debian/dists/buster/main/installer-armhf/current/images/device-tree/armada-370-netgear-rn102.dtb * http://ftp.debian.org/debian/dists/buster/main/installer-armhf/current/images/netboot/initrd.gz * http://ftp.debian.org/debian/dists/buster/main/installer-armhf/current/images/netboot/vmlinuz Installation worked fine, except for the installation of grub (which is known to fail according to the tutorial). Instead you've to manually install/configure the flash-kernel package. I also had to manually call "mtdpart" to create the uImage and minirootfs partitions to finally be able to successfully run "update-initramfs": # mtdpart add /dev/mtd0 uImage 0x200000 0x600000 # mtdpart add /dev/mtd0 minirootfs 0x800000 0x1000000 # update-initramfs -u So far so good. I got the kernel booting, but after booting I've some preconfigured "mtd partitions", which seem to originate from the kernel device tree: ~# cat /proc/mtd dev: size erasesize name mtd0: 00180000 00020000 "u-boot" mtd1: 00020000 00020000 "u-boot-env" mtd2: 00600000 00020000 "uImage" mtd3: 00400000 00020000 "minirootfs" mtd4: 07400000 00020000 "ubifs" The problem with this is: "minirootfs" is too small (only 4 MB) for the generated initramfs: # update-initramfs -u -k 4.19.0-6-armmp update-initramfs: Generating /boot/initrd.img-4.19.0-6-armmp Using DTB: armada-370-netgear-rn102.dtb Installing /usr/lib/linux-image-4.19.0-6-armmp/armada-370-netgear-rn102.dtb into /boot/dtbs/4.19.0-6-armmp/./armada-370-netgear-rn102.dtb Taking backup of armada-370-netgear-rn102.dtb. Installing new armada-370-netgear-rn102.dtb. Installing /usr/lib/linux-image-4.19.0-6-armmp/armada-370-netgear-rn102.dtb into /boot/dtbs/4.19.0-6-armmp/./armada-370-netgear-rn102.dtb Taking backup of armada-370-netgear-rn102.dtb. Installing new armada-370-netgear-rn102.dtb. flash-kernel: installing version 4.19.0-6-armmp The initial ramdisk is too large. This is often due to the unnecessary inclusion of all kernel modules in the image. To fix this set MODULES=dep in one or both /etc/initramfs-tools/conf.d/driver-policy (if it exists) and /etc/initramfs-tools/initramfs.conf and then run 'update-initramfs -u -k 4.19.0-6-armmp' Not enough space for initrd in MTD 'minirootfs' (need 4971360 but is actually 4194304). run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1 The new /dev/mtd0 to /dev/mtd4 devices can not be removed, edited or recreated by mtdpart. I also tried to set the mtdparts kernel parameter (which needs to be 'cmdlinepart.mtdparts' due to a bug in buster; I've tried 'mtdparts=' too): # cat /proc/cmdline console=ttyS0,115200 cmdlinepart.mtdparts=armada-nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),(uImage),0x1000000@0x800000(minirootfs),-(ubi) The mtd partitions seem to be defined in the *.dtb file that comes with the kernel: The following message appears in "dmesg" speaking about "5 fixed-partions". [ 18.310935] 5 fixed-partitions partitions found on MTD device pxa3xx_nand-0 [ 18.318030] Creating 5 MTD partitions on "pxa3xx_nand-0": root@ReadyNAS102:~# dmesg | grep 'MTD' -A 3 [ 18.310935] 5 fixed-partitions partitions found on MTD device pxa3xx_nand-0 [ 18.318030] Creating 5 MTD partitions on "pxa3xx_nand-0": (...some other lines...) [ 18.443214] 0x000000000000-0x000000180000 : "u-boot" [ 18.497255] 0x000000180000-0x0000001a0000 : "u-boot-env" [ 18.543756] 0x000000200000-0x000000800000 : "uImage" [ 18.601234] 0x000000800000-0x000000c00000 : "minirootfs" [ 18.661169] 0x000000c00000-0x000008000000 : "ubifs" I tried to edit the *.dtb file that comes with the kernel (/boot/dtbs/4.19.0-6-armmp/armada-370-netgear-rn102.dts) by using the dtc tool: # dtc -I dtb -O dts armada-370-netgear-rn102.dtb > armada-370-netgear-rn102.dts # editing the *.dts file # dtc -I dts -O dtb armada-370-netgear-rn102.dts > armada-370-netgear-rn102.dtb I changed the *.dts file as following: nand-controller@d0000 { compatible = "marvell,armada370-nand-controller"; reg = ; #address-cells = ; #size-cells = ; interrupts = ; clocks = ; status = "okay"; nand@0 { reg = ; label = "pxa3xx_nand-0"; nand-rb = ; marvell,nand-keep-config; nand-on-flash-bbt; nand-ecc-strength = ; nand-ecc-step-size = ; partitions { compatible = "fixed-partitions"; #address-cells = ; #size-cells = ; partition@0 { label = "u-boot"; reg = ; read-only; }; partition@180000 { label = "u-boot-env"; reg = ; read-only; }; partition@200000 { label = "uImage"; reg = ; }; partition@800000 { label = "minirootfs"; reg = ; }; partition@c00000 { label = "ubifs"; reg = ; }; }; }; }; Especially, I changed "reg = ;" to "reg = ;" for partition@800000: partition@800000 { label = "minirootfs"; reg = ; }; There's enough space before the "ubifs" partition and I don't use it anyways. But, after a reboot the kernel still tells me about the old settings. How can I fix that? I could probably manually install "vmlinuz + *.dtb" to the NAND via uboot. But, that would be gone as soon as the next kernel update is installed. I would prefer the kernel to interpret the "mtdparts" command line parameter. Any ideas? EDIT #1: --- I now (ab)use the partition "ubifs" instead of "minirootfs" for the initramfs. This works, but I would like to know if there is a more clean solution. Of course, I also had to change my "bootcmd" at u-boot to load/use data from this partition instead: setenv bootcmd 'nand read 0x2000000 0x200000 0x600000; nand read 0x3000000 0xc00000 0x800000; bootm 0x2000000 0x3000000' saveenv reset
SDwarfs (159 rep)
Dec 30, 2019, 08:30 PM • Last activity: Apr 15, 2025, 02:02 PM
0 votes
0 answers
83 views
Kernel panic - not syncing: Unable to initialise architected timer : unable to boot Android 14 with qemu-system-aarch64 on Ubuntu 24.04 X64 bit
I want to emulate Android 14 by KonstaKang using `qemu-system-aarch64` with the `virt` model on Ubuntu 24.04 x64-bit, installed on my PC (Intel i9 + RTX 2080 Ti). I’ve chosen the boot parameters according to the files provided by that version of Android, which you can find here: https://konstakang.c...
I want to emulate Android 14 by KonstaKang using qemu-system-aarch64 with the virt model on Ubuntu 24.04 x64-bit, installed on my PC (Intel i9 + RTX 2080 Ti). I’ve chosen the boot parameters according to the files provided by that version of Android, which you can find here: https://konstakang.com/devices/rpi4/AOSP14/ This is the command issued with the parameters embedded : qemu-system-aarch64 \ -m 2048 \ -cpu cortex-a72 \ -M virt,gic-version=2 \ -drive if=pflash,format=raw,file=/usr/local/share/qemu/edk2-aarch64-code.fd \ -drive if=pflash,format=raw,file=/usr/local/share/qemu/edk2-arm-vars.fd \ -kernel /mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/boot/Image \ -append 'console=ttyAMA0,38400 keep_bootcon earlycon=pl011,0x9000000 androidboot.hardware=ranchu root=/dev/vdd1' \ -drive file=/mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv.img,format=raw,index=0,media=disk \ -device virtio-gpu-pci \ -device qemu-xhci \ -device usb-kbd \ -device usb-mouse \ -netdev user,id=mynet \ -device virtio-net-pci,netdev=mynet \ -serial stdio \ -no-reboot \ -d guest_errors \ -smp cores=4 \ -device qemu-xhci,id=xhci,addr=0x5 \ -device usb-mouse,bus=xhci.0 \ -device usb-kbd,bus=xhci.0 Where I found the kernel "Image" ? here : https://dlupload.com/filedetail/377203177 This is the boot log : EFI stub: Booting Linux Kernel... EFI stub: EFI_RNG_PROTOCOL unavailable EFI stub: Generating empty DTB EFI stub: Exiting boot services... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] [ 0.000000] Linux version 6.6.36-g01aac93821d2-v8 (kleaf@build-host) (Android (11368308, +pgo, +bolt, +lto, +mlgo, based on r510928) clang version 18.0.0 (https://android.googlesource.com/toolchain/llvm-project 477610d4d0d988e69dbc3fae4fe86bff3f07f2b5), LLD 18.0.0) #1 SMP PREEMPT Tue Jul 2 09:02:32 UTC 2024 [ 0.000000] KASLR disabled due to lack of seed [ 0.000000] printk: debug: skip boot console de-registration. [ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '') [ 0.000000] printk: bootconsole [pl11] enabled [ 0.000000] efi: EFI v2.7 by EDK II [ 0.000000] efi: SMBIOS 3.0=0xbfed0000 MEMATTR=0xbd0a0018 ACPI 2.0=0xbc6f0018 MEMRESERVE=0xbcb43f18 [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000040000000-0x00000000bfffffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] NoSplit zone start for each node [ 0.000000] NoMerge zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x00000000bc76ffff] [ 0.000000] node 0: [mem 0x00000000bc770000-0x00000000bcb3ffff] [ 0.000000] node 0: [mem 0x00000000bcb40000-0x00000000bfe1ffff] [ 0.000000] node 0: [mem 0x00000000bfe20000-0x00000000bfeaffff] [ 0.000000] node 0: [mem 0x00000000bfeb0000-0x00000000bfebffff] [ 0.000000] node 0: [mem 0x00000000bfec0000-0x00000000bffdffff] [ 0.000000] node 0: [mem 0x00000000bffe0000-0x00000000bfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff] [ 0.000000] cma: Reserved 8 MiB at 0x00000000bbc00000 on node -1 [ 0.000000] Failed to find device node for boot cpu [ 0.000000] missing boot CPU MPIDR, not enabling secondaries [ 0.000000] percpu: Embedded 31 pages/cpu s87016 r8192 d31768 u126976 [ 0.000000] Detected PIPT I-cache on CPU0 [ 0.000000] CPU features: detected: Spectre-v2 [ 0.000000] CPU features: detected: Spectre-v3a [ 0.000000] CPU features: detected: Spectre-v4 [ 0.000000] CPU features: detected: Spectre-BHB [ 0.000000] CPU features: detected: ARM erratum 1742098 [ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Kernel command line: console=ttyAMA0,38400 keep_bootcon earlycon=pl011,0x9000000 androidboot.hardware=ranchu root=/dev/vdd1 androidboot.serialno=10000000abcd1234 androidboot.btmacaddr=11:22:33:44:55:66 [ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) [ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 2008408K/2097152K available (19328K kernel code, 2374K rwdata, 7612K rodata, 1792K init, 1192K bss, 80552K reserved, 8192K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] ftrace: allocating 56269 entries in 220 pages [ 0.000000] ftrace: allocated 220 pages with 5 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] timer_probe: no matching timers found [ 0.000000] Kernel panic - not syncing: Unable to initialise architected timer. [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.6.36-g01aac93821d2-v8 #1 [ 0.000000] Call trace: [ 0.000000] dump_backtrace+0x104/0x124 [ 0.000000] show_stack+0x28/0x38 [ 0.000000] dump_stack_lvl+0x58/0x78 [ 0.000000] dump_stack+0x20/0x30 [ 0.000000] panic+0x148/0x35c [ 0.000000] time_init+0x68/0x6c [ 0.000000] start_kernel+0x1b8/0x3d0 [ 0.000000] __primary_switched+0xc4/0xd0 [ 0.000000] Rebooting in 5 seconds.. [ 0.000000] Reboot failed -- System halted Any idea about how to fix it ?
mister_smith (1 rep)
Aug 24, 2024, 02:38 PM • Last activity: Apr 7, 2025, 11:40 AM
1 votes
1 answers
1166 views
UIO instance of a device-tree subnode
I have the following device-tree node which is auto generated by Xilinx PetaLinux in a proper dtsi file (which cannot be modified): axi_dma_0: dma@a0000000 { #dma-cells = ; clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk"; clocks = , , ; compatible = "xlnx,axi-dma-7.1", "xlnx,axi-...
I have the following device-tree node which is auto generated by Xilinx PetaLinux in a proper dtsi file (which cannot be modified): axi_dma_0: dma@a0000000 { #dma-cells = ; clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk"; clocks = , , ; compatible = "xlnx,axi-dma-7.1", "xlnx,axi-dma-1.00.a"; interrupt-names = "s2mm_introut"; interrupt-parent = ; interrupts = ; reg = ; xlnx,addrwidth = ; xlnx,include-sg ; xlnx,sg-length-width = ; dma-channel@a0000030 { compatible = "xlnx,axi-dma-s2mm-channel"; dma-channels = ; interrupts = ; xlnx,datawidth = ; xlnx,device-id = ; }; } To give access to the whole AXI DMA hardware from UIO, the following code can be used from another custom file that PetaLinux accounts for: &axi_dma_0 { compatible = "generic-uio"; linux,uio-name = "axi_dma"; }; What I would like to do is to give UIO access only to the dma-channel sub-node instead of the whole AXI DMA. To do this I tried something as this: &axi_dma_0 { dma-channel@a0000030 { compatible = "generic-uio"; linux,uio-name = "axi_dma_s2mm"; }; }; Or adding reg space declaration to dma-channel subnode: &axi_dma_0 { dma-channel@a0000030 { reg = ; compatible = "generic-uio"; linux,uio-name = "axi_dma_s2mm"; }; }; Among others... I cannot make it to create the /dev/uioX file.. What is wrong or what am I missing to make it work, or understand why it is not possible (if so) ?
xyx (797 rep)
Feb 9, 2022, 05:59 PM • Last activity: Apr 2, 2025, 06:38 PM
0 votes
0 answers
29 views
DTS parameters for USB3 in Xilinx ZynqMP
When setting USB3 in device tree, I've seen in dts of reference boards (for example DTS for zcu102-RevA) different parameters for setting PHY. there are two parameters in dts for USB: ```cpp phys = ; phy-names = "usb3-phy"; ``` Seems to me, that "xlnx,zynqmp-dwc3" and "snps,dwc3" redirect settings o...
When setting USB3 in device tree, I've seen in dts of reference boards (for example DTS for zcu102-RevA) different parameters for setting PHY. there are two parameters in dts for USB:
phys = ;
phy-names = "usb3-phy";
Seems to me, that "xlnx,zynqmp-dwc3" and "snps,dwc3" redirect settings of phys to "xilinx,psgtr" In yml of this driver, there is description of each parameter:
properties:
  "#phy-cells":
    const: 4
    description: |

      The cells contain the following arguments.

      - description: The GTR lane
        minimum: 0
        maximum: 3
      - description: The PHY type
        enum:
          - PHY_TYPE_DP
          - PHY_TYPE_PCIE
          - PHY_TYPE_SATA
          - PHY_TYPE_SGMII
          - PHY_TYPE_USB3
      - description: The PHY instance
        minimum: 0
        maximum: 1 # for DP, SATA or USB
        maximum: 3 # for PCIE or SGMII
      - description: The reference clock number
        minimum: 0
        maximum: 3
What does "The PHY instance" option mean? Why on some boards (zcu102 f.e.) it is set to 0, while others(zc1751 f.e.) have it equal to 1?
lazba (1 rep)
Mar 24, 2025, 03:50 PM
1 votes
0 answers
21 views
Adding MCP23017 to device-tree and accessing ICs connected to expander
I try access multiple ICs via I2C over the MCP23017 I/O Expander for a custom embedded board. I know ICs I2C adresses. *How should I add the MCP23017 to the device-tree?* I think I need to add the ICs as **child nodes** under MCP2301 in device-tree, but I don't know how to do it. There are a device-...
I try access multiple ICs via I2C over the MCP23017 I/O Expander for a custom embedded board. I know ICs I2C adresses. *How should I add the MCP23017 to the device-tree?* I think I need to add the ICs as **child nodes** under MCP2301 in device-tree, but I don't know how to do it. There are a device-tree example below. Will Linux detect the ICs when implemented this way? What is the easiest way to access ICs? &i2c1 { clock-frequency = ; pinctrl-names = "default"; pinctrl-0 = ; status = "okay"; /* mcp23017 I2C IO Expander */ gpio_ex3: gpio_mcp@20 { compatible = "microchip,mcp23017"; gpio-controller; #gpio-cells = ; reg = ; status = "okay"; };
alpd4 (35 rep)
Feb 6, 2025, 02:03 PM • Last activity: Feb 6, 2025, 02:22 PM
0 votes
0 answers
13 views
Failed to use pinctrl/pinmux in port multiplexing
I am working on an embedded Linux system (kernel-5.10.24), and now I want to setup a UART port (with RXD/TXD/RTS/CTS) from 2 GPIO groups. The DTS is setting as follows, ``` &pinctrl { uart0_pin: uart0-pin { uart0_test_porta: uart0-test-porta { rvsoc,pinmux = ; rvsoc,pinmux-funcsel = ; }; uart0_test_...
I am working on an embedded Linux system (kernel-5.10.24), and now I want to setup a UART port (with RXD/TXD/RTS/CTS) from 2 GPIO groups. The DTS is setting as follows,
&pinctrl {
    uart0_pin: uart0-pin {
        uart0_test_porta: uart0-test-porta {
            rvsoc,pinmux = ;
            rvsoc,pinmux-funcsel = ;
        };
        uart0_test_portc: uart0-test-portc {
            rvsoc,pinmux = ;
            rvsoc,pinmux-funcsel = ;
        };
    };
};

&uart0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = ;
    pinctrl-1 = ;
};
With above settings, I found only the PORTA is configured to work in UART mode, but PORTC is NOT being configured accordingly. Is there anyting wrong in my DTS, and how can I make the combined PORTA and PORTC to work together as one 4-wire UART?
wangt13 (631 rep)
Dec 31, 2024, 07:03 AM
1 votes
0 answers
216 views
How to define GPIO pin as PPS source device
I'm using Linux in an embedded environment. I want to use a particular GPIO pin as a PPS source to be used with `gpsd`. I think the pin is configured correctly because I can see high/low transitions using ```lang-sh cat /sys/class/gpio/gpio372/value ``` I have also defined the GPIO pin as a PPS sour...
I'm using Linux in an embedded environment. I want to use a particular GPIO pin as a PPS source to be used with gpsd. I think the pin is configured correctly because I can see high/low transitions using
-sh
cat /sys/class/gpio/gpio372/value
I have also defined the GPIO pin as a PPS source in the device tree.
/ {
chosen {
    bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4";
};

pps-gpio {
    compatible = "pps-gpio";
    gpios = ;
    echo-gpios = ;
	echo-active-ms = ;
};};
Usually you would tell gpsd to use /dev/pps0, but I am not sure how to assign the GPIO to a device under /dev or how else to configure it.
R Mason (11 rep)
Dec 4, 2024, 06:05 PM • Last activity: Dec 5, 2024, 11:19 AM
0 votes
1 answers
88 views
Are onboard hubs detected as USB root hubs or external devices?
I have connected an onboard hub to my microprocessor. The onboard hub is [USB2514B][1] and the microprocessor is a STM32MP1. I can specify the the connection to the onboard hub by using OHCI (Open Host Controller Interface), but then I will get the error messages. usb 1-1.4: device descriptor read/6...
I have connected an onboard hub to my microprocessor. The onboard hub is USB2514B and the microprocessor is a STM32MP1. I can specify the the connection to the onboard hub by using OHCI (Open Host Controller Interface), but then I will get the error messages. usb 1-1.4: device descriptor read/64, error -62 usb 1-1-port4: unable to enumerate USB device This means that OHCI (USB 1.1) cannot communicate with USB2514B, which requires USB 2.0 specification. But if I connect my onboard hub by using EHCI (Enhanced Host Controller Interface), which is USB 2.0. Then in Linux I will not get any errors about any device description. My lsusb looks like this: >> lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub **Question:** Does this mean that this 1d6b:0002 is the USB2514B hub, or does it mean that it's the internal USB of the processor? I'm looking for a way to confirm if I have connection to my USB2514B or if lsusb only shows my internal USB connection from the processor. NOTE: This onboard USB hub does not require any external communication interfaces such as SMDbus, I2C or other. Only plain USB connection + linux device tree configuration. &usbh_ehci{ status = "okay"; /* USER CODE BEGIN usbh_ehci */ phys = ; #address-cells = ; #size-cells = ; /* onboard HUB */ hub@1 { compatible = "usb424,2514"; reg = ; vdd-supply = ; }; /* USER CODE END usbh_ehci */ }; &usbh_ohci{ status = "disabled"; }; Useful sources: * https://wiki.st.com/stm32mpu/wiki/USB_overview * https://wiki.st.com/stm32mpu/wiki/USBH_device_tree_configuration
euraad (219 rep)
Nov 16, 2024, 12:46 AM • Last activity: Nov 16, 2024, 10:33 AM
0 votes
0 answers
13 views
device-tree entry for an i2c to spi multiplexer that shares logic with a GPIO multiplexer
I have the following setup (from external; this cannot be changed): ``` +------+ I2C | I2C |--------------------- Device 0 --------| to |------------ Device 1 | MISO0 | SPI |--- Device 2 | MISO1 | +------+ | MISO2 | | | | | | | MISO +-------------------------+ | | GPIO | +-------| MUX | | | +-------...
I have the following setup (from external; this cannot be changed):
+------+
  I2C   | I2C  |--------------------- Device 0
--------|  to  |------------ Device 1    | MISO0
        | SPI  |--- Device 2    | MISO1  |
        +------+       | MISO2  |        |
           |           |        |        |
           | MISO  +-------------------------+
           |       |           GPIO          |
           +-------|           MUX           |
                   |                         |
                   +-------------------------+
  GPIO[0:1]                     |
--------------------------------+
In words: There is an I2C-to SPI bridge that is used to communicate with three devices. All SPI signals (MOSI, CS, SCLK) are directly connected to this bridge, except for MISO. For some reason, the MISO pins to the bridge are multiplexed using a separate GPIO multiplexer. If it were only for the bridge, the device-tree setup would be fairly straightforward:
i2c_to_spi_brigde: some_device {
    compatible = "...";

    device-0 {
        // ...
    };

    device-1 {
        // ...
    };

    device-2 {
        // ...
    };
};
However, I'm not sure how to incorporate the GPIO multiplexer in this scheme. From all that I have read about gpio-mux and pinctrl, the multiplexed device (in this example, devices 0-2) must also be a child of the mux (in this example, the GPIO MUX). However, the devices 0-2 are already children of the I2C to SPI node. Is it therefore possible to map the setup I have shown into a device-tree, or is there some form of custom driver necessary?
Lukas (1 rep)
Nov 12, 2024, 09:40 AM
1 votes
1 answers
44 views
I2S clock provider mode not supported - How to enable?
**Introduktion:** I having a HDMI PHY SII9022A. I want to enable audio on that PHY. **Requriments:** I need to create a proper device tree for the SII9022A. https://www.kernel.org/doc/Documentation/devicetree/bindings/display/bridge/sil%2Csii9022.yaml According to this file, I need to activate `audi...
**Introduktion:** I having a HDMI PHY SII9022A. I want to enable audio on that PHY. **Requriments:** I need to create a proper device tree for the SII9022A. https://www.kernel.org/doc/Documentation/devicetree/bindings/display/bridge/sil%2Csii9022.yaml According to this file, I need to activate audio-graph-card bindings and of course i2s. I have created my device tree. Notice that I have not using MCLK (Master Clock) because PLL can be used instead of MCLK. enter image description here enter image description here My linux kernel configuration looks like this. enter image description here My device tree looks like this: hdmi-transmitter@39{ compatible = "sil,sii9022"; reg = ; iovcc-supply = ; cvcc12-supply = ; reset-gpios = ; interrupts = ; interrupt-parent = ; #sound-dai-cells = ; sil,i2s-data-lanes = ; /*clocks = ; clock-names = "mclk";*/ status = "okay"; ports{ #address-cells = ; #size-cells = ; port@0{ reg = ; sii9022_in:endpoint{ remote-endpoint = ; }; }; port@1{ reg = ; sii9022_out:endpoint{ remote-endpoint = ; }; }; port@3{ reg = ; sii9022_tx_endpoint:endpoint{ remote-endpoint = ; }; }; }; }; &i2s2{ pinctrl-names = "default", "sleep"; pinctrl-0 = ; pinctrl-1 = ; status = "okay"; /* USER CODE BEGIN i2s2 */ clocks = , , , ; clock-names = "pclk", "i2sclk", "x8k", "x11k"; i2s2_port:port{ i2s2_endpoint:endpoint{ remote-endpoint = ; dai-format = "i2s"; mclk-fs = ; }; }; /* USER CODE END i2s2 */ }; **Question:** As you can see, I'm using the dai-format = "i2s", but still, I'm getting this debug messages. drivers/gpu/drm/bridge/sii902x.c:577 [sii902x]sii902x_audio_hw_params =p "%s: Unsupported i2s format %u\n" drivers/gpu/drm/bridge/sii902x.c:560 [sii902x]sii902x_audio_hw_params =p "%s: I2S clock provider mode not supported\n" From this .c code: https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/bridge/sii902x.c static int sii902x_audio_hw_params(struct device *dev, void *data, struct hdmi_codec_daifmt *daifmt, struct hdmi_codec_params *params) { struct sii902x *sii902x = dev_get_drvdata(dev); u8 i2s_config_reg = SII902X_TPI_I2S_SD_DIRECTION_MSB_FIRST; u8 config_byte2_reg = (SII902X_TPI_AUDIO_INTERFACE_I2S | SII902X_TPI_AUDIO_MUTE_ENABLE | SII902X_TPI_AUDIO_CODING_PCM); u8 config_byte3_reg = 0; u8 infoframe_buf[HDMI_INFOFRAME_SIZE(AUDIO)]; unsigned long mclk_rate; int i, ret; if (daifmt->bit_clk_provider || daifmt->frame_clk_provider) { dev_dbg(dev, "%s: I2S clock provider mode not supported\n", __func__); fmt) { case HDMI_I2S: i2s_config_reg |= SII902X_TPI_I2S_FIRST_BIT_SHIFT_YES | SII902X_TPI_I2S_SD_JUSTIFY_LEFT; break; case HDMI_RIGHT_J: i2s_config_reg |= SII902X_TPI_I2S_SD_JUSTIFY_RIGHT; break; case HDMI_LEFT_J: i2s_config_reg |= SII902X_TPI_I2S_SD_JUSTIFY_LEFT; break; default: dev_dbg(dev, "%s: Unsupported i2s format %u\n", __func__, daifmt->fmt); <-------------------------------- return -EINVAL; } So how can I get the I2S clock prover mode a proper setup?
euraad (219 rep)
Oct 27, 2024, 11:18 AM • Last activity: Oct 29, 2024, 08:39 PM
0 votes
0 answers
46 views
Chaining I2S with alsa
For one of the projects that I’m following for my job I’m supposed to define the device tree of a custom embedded board. The problem is that the audio stream for the board is structured as follows: - cpu to codec via I2S - Codec to ampli via I2S So we have a chain of I2S stream for the audio reprodu...
For one of the projects that I’m following for my job I’m supposed to define the device tree of a custom embedded board. The problem is that the audio stream for the board is structured as follows: - cpu to codec via I2S - Codec to ampli via I2S So we have a chain of I2S stream for the audio reproduction. My aim is to have this i2s stream works when I execute a simple speaker test on the sound card, which is composed by those two elements. How can I configure the sound node for the device tree? I’ve looked around the web to found some solution, but I didn’t found anything. Can you guys give me some advice?
MCT (1 rep)
Oct 16, 2024, 12:04 PM • Last activity: Oct 17, 2024, 07:13 AM
0 votes
0 answers
46 views
How can pass to rmii from mii in ethernet chip?
I use ksz8081mnx mii ethernet chip.I made my ethernet configuration and it is succesful. I changed my ethernet chip with ksz8081rnb rmii.I organised dts file but my ethernet not working. sama5d2.dtsi macb0: ethernet@f8008000{ compatible = "micrel,sama5d2-gem"; reg= ; clocks = , ; clock-names = "hclk...
I use ksz8081mnx mii ethernet chip.I made my ethernet configuration and it is succesful. I changed my ethernet chip with ksz8081rnb rmii.I organised dts file but my ethernet not working. sama5d2.dtsi macb0: ethernet@f8008000{ compatible = "micrel,sama5d2-gem"; reg=; clocks = , ; clock-names = "hclk","pclk"; } sama5d27_myboard.dtsi #include sama5d2.dtsi macb0: ethernet@f8008000 { pinctrl-names = "default"; pinctrl-0 = ; phy-mode = "rmii"; status = "okay"; ethernet-phy@0 { reg = ; interrupt-parent = ; interrupts = ; pinctrl-names = "default"; pinctrl-0 = ; }; }; pinctrl_macb0_default: macb0_default { pinmux = , , , , , , , , , , , , , , ; bias-pull-up; }; pinctrl_macb0_phy_irq: macb0_phy_irq{ pinmux = ; bias-pull-up; }; pinctrl_macb0_rst: macb0_rst{ pinmux = ; bias-pull-up; }; i can see my device and my ip but i can not ping from other device . i set phy-mode= rmii but i see that my phy-mode mii dmesg | grep -i phy booting linux on pyhsical cpu 0x0 libphy fixed mdio bus:probed libphy:macb_mii_bus:probed kszphy_probe kszphy_config_init micrel ksz8081 f8008000.ethernet-ffffffffff:00: attached phy driver micrel ksz8081 mii_bus:phy_addr=f8008000.ethernet-ffffffff:00, irq=82 what can i do other ?
Ertugrul Sahin (1 rep)
Oct 16, 2024, 08:22 AM • Last activity: Oct 16, 2024, 01:31 PM
8 votes
3 answers
11269 views
Device Trees: Difference between labels and aliases?
In the file [imx6qdl.dtsi][1] is the following definition of [gpio nodes][2] (somewhat shortened): gpio1: gpio@0209c000 { [...] }; gpio2: gpio@020a0000 { [...] }; [...] gpio7: gpio@020b4000 { [...] }; But also in this file, the [aliases node][3] has the following properties (again shortened): aliase...
In the file imx6qdl.dtsi is the following definition of gpio nodes (somewhat shortened): gpio1: gpio@0209c000 { [...] }; gpio2: gpio@020a0000 { [...] }; [...] gpio7: gpio@020b4000 { [...] }; But also in this file, the aliases node has the following properties (again shortened): aliases { [...] gpio0 = &gpio1; gpio1 = &gpio2; gpio2 = &gpio3; gpio3 = &gpio4; gpio4 = &gpio5; gpio5 = &gpio6; gpio6 = &gpio7; [...] }; What exactly is the reason for doing so? Do the labels get overwritten?
happyMOOyear (181 rep)
Dec 3, 2015, 03:00 PM • Last activity: Aug 20, 2024, 03:13 AM
0 votes
0 answers
298 views
Dummy sound codec devicetree node for Linux
I have an rk3588-based SBC. I need to output audio via I2S (specifically its I2S1 output). However, there is no "codec" device which Linux knows about; the system which receives the I2S sound is completely separate. It is my understanding that for ALSA to let me play audio, I need a codec devicetree...
I have an rk3588-based SBC. I need to output audio via I2S (specifically its I2S1 output). However, there is no "codec" device which Linux knows about; the system which receives the I2S sound is completely separate. It is my understanding that for ALSA to let me play audio, I need a codec devicetree node. However, since there is no actual codec hardware that Linux should care about, I guess I need some kind of dummy node. How can I do this? Enabling the i2s1 node is simple enough with a devicetree overlay:
&i2s1_8ch {
    status = "okay";
};
However, I can't get the codec to show up. This is what I've tried so far (but I really have no idea what I'm doing):
&{/} {
	dummy_sound: sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "Dummy Audio Card";
		simple-audio-card,format = "i2s";

		simple-audio-card,cpu {
			sound-dai = ;
		};

		simple-audio-card,codec {
			sound-dai = ;
		};

		dummy_codec: codec {
			compatible = "linux,snd-soc-dummy";
		};
	};
};
mort (356 rep)
Aug 13, 2024, 08:23 PM
Showing page 1 of 20 total questions