Message ID | 20240823120158.19294-1-tarang.raval@siliconsignals.io (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] arm64: dts: imx8mm-emtop-baseboard: Add Peripherals Support | expand |
On 23.08.2024 17:31:57, Tarang Raval wrote: > Add following peripherals support for the Emtop i.MX8M Mini Baseboard > > * Wi-Fi > * Audio > * SD card > * RTC > * CAN bus > * USB OTG > > Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io> > --- > > Changes in v2: > > 1. Updated the node name and pinctrl name. > 2. Removed the 'regulators' container. > 3. Removed a stray blank line. > 4. Removed non-existent properties. > 5. Removed unused node and pinctrl: > -modem-reset > -pinctrl_uart1 > 6. Defined the CAN transceiver reset GPIO separately. > > Change in v3: > > 1. Removed 'can-connector'. > 2. Use USB connector instead of extcon_usb. > 3. Changed id-gpio to id-gpios. > 4. Use Level trigger IRQ in the CAN node. > 5. Corrected the compatible property of RTC. > 6. Added blank lines to separate the pinctrl groups. > --- > .../dts/freescale/imx8mm-emtop-baseboard.dts | 326 ++++++++++++++++++ > 1 file changed, 326 insertions(+) [...] > +/* CAN BUS */ > +&ecspi2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ecspi2>; > + status = "okay"; > + > + can: can@0 { > + compatible = "microchip,mcp2515"; > + reg = <0>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_canbus>; > + clocks = <&osc_can>; > + interrupt-parent = <&gpio1>; > + interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; Have you actually tested this? Previously there was: "interrupts = <14 IRQ_TYPE_EDGE_FALLING>;", meaning the IRQ triggers on the edge "1 -> 0". It doesn't look correct, if you say now there is an IRQ at level "1". > + spi-max-frequency = <10000000>; > + }; > }; regards, Marc
Hi Marc, Yes, I have tested it, and you can see the logs below. After running ifconfig can0 up, the bus is operational. [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 6.10.0-dirty (falcon@falcon) (aarch64-poky-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #8 SMP PRE4 [ 0.000000] KASLR disabled due to lack of seed [ 0.000000] Machine model: Emtop Embedded Solutions i.MX8M Mini Baseboard V1 [ 0.000000] efi: UEFI not found. [ 0.000000] OF: reserved mem: 0x00000000be000000..0x00000000bfbfffff (28672 KiB) nomap non-reusable optee_core@0xbe000000 [ 0.000000] OF: reserved mem: 0x00000000bfc00000..0x00000000bfffffff (4096 KiB) nomap non-reusable optee_shm@0xbfc00000 [ 0.000000] NUMA: No NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bdffffff] [ 0.000000] NUMA: NODE_DATA [mem 0xbdbe39c0-0xbdbe5fff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000040000000-0x00000000bdffffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x00000000bdffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bdffffff] [ 0.000000] On node 0, zone DMA: 8192 pages in unavailable ranges [ 0.000000] cma: Reserved 32 MiB at 0x00000000b9a00000 on node -1 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.1 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: Trusted OS migration not required [ 0.000000] psci: SMC Calling Convention v1.1 [ 0.000000] percpu: Embedded 24 pages/cpu s59880 r8192 d30232 u98304 [ 0.000000] pcpu-alloc: s59880 r8192 d30232 u98304 alloc=24*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: GIC system register CPU interface [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Kernel command line: console=ttymxc1,115200 root=/dev/mmcblk2p2 rootwait rw audit=0 [ 0.000000] audit: disabled (until reboot) [ 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] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096 [ 0.000000] Policy zone: DMA [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 1MB [ 0.000000] software IO TLB: area num 4. [ 0.000000] software IO TLB: mapped [mem 0x00000000b9500000-0x00000000b9700000] (2MB) [ 0.000000] Memory: 1941312K/2064384K available (18432K kernel code, 4936K rwdata, 12096K rodata, 10368K init, 761K bss, 90304K reserved, 3276) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4. [ 0.000000] Trampoline 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=4 [ 0.000000] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1. [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode [ 0.000000] GICv3: 128 SPIs implemented [ 0.000000] GICv3: 0 Extended SPIs implemented [ 0.000000] Root IRQ handler: gic_handle_irq [ 0.000000] GICv3: GICv3 features: 16 PPIs [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000038880000 [ 0.000000] ITS: No ITS available, not enabling LPIs [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 8.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns [ 0.000000] sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns [ 0.001259] Console: colour dummy device 80x25 [ 0.001329] Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=32000) [ 0.001340] pid_max: default: 32768 minimum: 301 [ 0.001407] LSM: initializing lsm=capability [ 0.001487] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.001500] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.003270] rcu: Hierarchical SRCU implementation. [ 0.003280] rcu: Max phase no-delay instances is 1000. [ 0.005746] EFI services will not be available. [ 0.005943] smp: Bringing up secondary CPUs ... [ 0.006381] Detected VIPT I-cache on CPU1 [ 0.006448] GICv3: CPU1: found redistributor 1 region 0:0x00000000388a0000 [ 0.006485] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.007018] Detected VIPT I-cache on CPU2 [ 0.007068] GICv3: CPU2: found redistributor 2 region 0:0x00000000388c0000 [ 0.007093] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.007565] Detected VIPT I-cache on CPU3 [ 0.007612] GICv3: CPU3: found redistributor 3 region 0:0x00000000388e0000 [ 0.007636] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.007731] smp: Brought up 1 node, 4 CPUs [ 0.007738] SMP: Total of 4 processors activated. [ 0.007742] CPU: All CPU(s) started at EL2 [ 0.007761] CPU features: detected: 32-bit EL0 Support [ 0.007764] CPU features: detected: 32-bit EL1 Support [ 0.007769] CPU features: detected: CRC32 instructions [ 0.007806] alternatives: applying system-wide alternatives [ 0.009753] devtmpfs: initialized [ 0.016564] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.016589] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.017481] 21072 pages in range for non-PLT usage [ 0.017495] 512592 pages in range for PLT usage [ 0.017704] pinctrl core: initialized pinctrl subsystem [ 0.019984] DMI not present or invalid. [ 0.022491] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.023668] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations [ 0.024340] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.025196] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.026938] thermal_sys: Registered thermal governor 'step_wise' [ 0.026944] thermal_sys: Registered thermal governor 'power_allocator' [ 0.027031] cpuidle: using governor menu [ 0.027259] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.027348] ASID allocator initialised with 65536 entries [ 0.029691] Serial: AMBA PL011 UART driver [ 0.035145] platform soc@0: Fixed dependency cycle(s) with /soc@0/bus@30000000/efuse@30350000/unique-id@4 [ 0.040657] imx8mm-pinctrl 30330000.pinctrl: initialized IMX pinctrl driver [ 0.041461] platform 30350000.efuse: Fixed dependency cycle(s) with /soc@0/bus@30000000/clock-controller@30380000 [ 0.043104] platform 30350000.efuse: Fixed dependency cycle(s) with /soc@0/bus@30000000/clock-controller@30380000 [ 0.043794] platform 30380000.clock-controller: Fixed dependency cycle(s) with /soc@0/interrupt-controller@38800000 [ 0.057376] platform 32e40000.usb: Fixed dependency cycle(s) with /connector [ 0.057451] platform connector: Fixed dependency cycle(s) with /soc@0/bus@32c00000/usb@32e40000 [ 0.059749] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages [ 0.059761] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page [ 0.059767] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages [ 0.059772] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page [ 0.059776] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages [ 0.059780] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page [ 0.059786] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages [ 0.059790] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page [ 0.060200] Demotion targets for Node 0: null [ 0.061621] ACPI: Interpreter disabled. [ 0.064491] iommu: Default domain type: Translated [ 0.064500] iommu: DMA domain TLB invalidation policy: strict mode [ 0.064825] SCSI subsystem initialized [ 0.064934] libata version 3.00 loaded. [ 0.065157] usbcore: registered new interface driver usbfs [ 0.065187] usbcore: registered new interface driver hub [ 0.065213] usbcore: registered new device driver usb [ 0.066511] pps_core: LinuxPPS API ver. 1 registered [ 0.066517] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.066529] PTP clock support registered [ 0.066676] EDAC MC: Ver: 3.0.0 [ 0.067122] scmi_core: SCMI protocol bus registered [ 0.068216] FPGA manager framework [ 0.068314] Advanced Linux Sound Architecture Driver Initialized. [ 0.069541] vgaarb: loaded [ 0.069930] clocksource: Switched to clocksource arch_sys_counter [ 0.070138] VFS: Disk quotas dquot_6.6.0 [ 0.070156] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.070379] pnp: PnP ACPI: disabled [ 0.076745] NET: Registered PF_INET protocol family [ 0.076885] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.078410] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear) [ 0.078436] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.078449] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.078597] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear) [ 0.078997] TCP: Hash tables configured (established 16384 bind 16384) [ 0.079088] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.079133] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.079283] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.079646] RPC: Registered named UNIX socket transport module. [ 0.079651] RPC: Registered udp transport module. [ 0.079654] RPC: Registered tcp transport module. [ 0.079657] RPC: Registered tcp-with-tls transport module. [ 0.079660] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.080810] PCI: CLS 0 bytes, default 64 [ 0.084150] kvm [1]: nv: 477 coarse grained trap handlers [ 0.084469] kvm [1]: IPA Size Limit: 40 bits [ 0.087081] kvm [1]: GICv3: no GICV resource entry [ 0.087086] kvm [1]: disabling GICv2 emulation [ 0.087101] kvm [1]: GIC system register CPU interface enabled [ 0.087128] kvm [1]: vgic interrupt IRQ9 [ 0.087148] kvm [1]: Hyp nVHE mode initialized successfully [ 0.088405] Initialise system trusted keyrings [ 0.088572] workingset: timestamp_bits=42 max_order=19 bucket_order=0 [ 0.088839] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.089052] NFS: Registering the id_resolver key type [ 0.089071] Key type id_resolver registered [ 0.089075] Key type id_legacy registered [ 0.089093] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.089098] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 0.089212] 9p: Installing v9fs 9p2000 file system support [ 0.141859] Key type asymmetric registered [ 0.141867] Asymmetric key parser 'x509' registered [ 0.141916] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.141931] io scheduler mq-deadline registered [ 0.141936] io scheduler kyber registered [ 0.141964] io scheduler bfq registered [ 0.188177] imx-sdma 302c0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2 [ 0.188199] imx-sdma 302c0000.dma-controller: external firmware not found, using ROM firmware [ 0.191398] imx-sdma 302b0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2 [ 0.191423] imx-sdma 302b0000.dma-controller: external firmware not found, using ROM firmware [ 0.194024] imx-sdma 30bd0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2 [ 0.194043] imx-sdma 30bd0000.dma-controller: external firmware not found, using ROM firmware [ 0.195842] SoC: i.MX8MM revision 1.0 [ 0.229395] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.233994] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 18, base_baud = 1500000) is a IMX [ 0.234041] printk: legacy console [ttymxc1] enabled [ 1.373900] msm_serial: driver initialized [ 1.378539] SuperH (H)SCI(F) driver initialized [ 1.383371] STM32 USART driver initialized [ 1.395897] loop: module loaded [ 1.400551] megasas: 07.727.03.00-rc1 [ 1.413135] tun: Universal TUN/TAP device driver, 1.6 [ 1.419603] thunder_xcv, ver 1.0 [ 1.422883] thunder_bgx, ver 1.0 [ 1.426140] nicpf, ver 1.0 [ 1.430708] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version [ 1.437948] hns3: Copyright (c) 2017 Huawei Corporation. [ 1.443319] hclge is initializing [ 1.446680] e1000: Intel(R) PRO/1000 Network Driver [ 1.451565] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 1.457339] e1000e: Intel(R) PRO/1000 Network Driver [ 1.462310] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 1.468260] igb: Intel(R) Gigabit Ethernet Network Driver [ 1.473666] igb: Copyright (c) 2007-2014 Intel Corporation. [ 1.479270] igbvf: Intel(R) Gigabit Virtual Function Network Driver [ 1.485545] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 1.491929] sky2: driver version 1.30 [ 1.497599] VFIO - User Level meta-driver version: 0.3 [ 1.507024] usbcore: registered new interface driver usb-storage [ 1.517572] i2c_dev: i2c /dev entries driver [ 1.533792] sdhci: Secure Digital Host Controller Interface driver [ 1.540017] sdhci: Copyright(c) Pierre Ossman [ 1.545624] Synopsys Designware Multimedia Card Interface Driver [ 1.553116] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.563449] ledtrig-cpu: registered to indicate activity on CPUs [ 1.571934] usbcore: registered new interface driver usbhid [ 1.577534] usbhid: USB HID core driver [ 1.587453] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available [ 1.594252] mmc2: SDHCI controller on 30b60000.mmc [30b60000.mmc] using ADMA [ 1.598025] platform soc@0: Fixed dependency cycle(s) with /soc@0/bus@30000000/efuse@30350000 [ 1.613810] optee: probing for conduit method. [ 1.618301] optee: revision 3.10 (b3914e54) [ 1.618595] optee: dynamic shared memory is enabled [ 1.628000] optee: initialized driver [ 1.645008] fsl-spdif-dai 30090000.spdif: failed to get RX Sample Rate kcontrol [ 1.655213] mmc2: new HS400 Enhanced strobe MMC card at address 0001 [ 1.656692] NET: Registered PF_LLC protocol family [ 1.663035] mmcblk2: mmc2:0001 TB2916 14.6 GiB [ 1.666596] NET: Registered PF_INET6 protocol family [ 1.672502] mmcblk2: p1 p2 [ 1.676934] Segment Routing with IPv6 [ 1.680361] mmcblk2boot0: mmc2:0001 TB2916 4.00 MiB [ 1.682364] In-situ OAM (IOAM) with IPv6 [ 1.688961] mmcblk2boot1: mmc2:0001 TB2916 4.00 MiB [ 1.691214] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.698289] mmcblk2rpmb: mmc2:0001 TB2916 4.00 MiB, chardev (234:0) [ 1.702407] NET: Registered PF_PACKET protocol family [ 1.713351] 9pnet: Installing 9P2000 support [ 1.717679] Key type dns_resolver registered [ 1.732850] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level [ 1.741727] registered taskstats version 1 [ 1.746063] Loading compiled-in X.509 certificates [ 1.759882] Demotion targets for Node 0: null [ 1.776979] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 1.787670] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 1.798264] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 1.809157] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 1.820089] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 1.833312] usb_phy_generic usbphynop1: dummy supplies not allowed for exclusive requests (id=vbus) [ 1.842919] usb_phy_generic usbphynop2: dummy supplies not allowed for exclusive requests (id=vbus) [ 1.853760] i2c i2c-0: IMX I2C adapter registered [ 1.854275] nxp-pca9450 0-0025: Read device id error [ 1.863722] rtc-ds1307 2-0032: power-on detected [ 1.869510] rtc-ds1307 2-0032: voltage drop detected [ 1.880478] rtc-ds1307 2-0032: registered as rtc0 [ 1.891345] rtc-ds1307 2-0032: setting system clock to 2024-08-27T10:45:39 UTC (1724755539) [ 1.905522] wm8904 2-001a: revision A [ 1.941639] i2c i2c-2: IMX I2C adapter registered [ 1.948543] i2c i2c-3: IMX I2C adapter registered [ 1.958070] pps pps0: new PPS source ptp0 [ 1.965416] fec 30be0000.ethernet: Invalid MAC address: 00:00:00:00:00:00 [ 1.972260] fec 30be0000.ethernet: Using random MAC address: 8a:e8:90:b7:d4:2f [ 1.980747] mdio_bus 30be0000.ethernet-1: MDIO device at address 4 is missing. [ 1.988642] fec 30be0000.ethernet eth0: registered PHC device 0 [ 1.996998] imx_usb 32e40000.usb: No over current polarity defined [ 2.010485] imx_usb 32e50000.usb: No over current polarity defined [ 2.020233] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 2.025145] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1 [ 2.045936] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 2.052273] hub 1-0:1.0: USB hub found [ 2.056057] hub 1-0:1.0: 1 port detected [ 2.069501] sdhci-esdhc-imx 30b50000.mmc: Got CD GPIO [ 2.069855] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.083606] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.090069] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600' [ 2.097377] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.097945] mmc0: SDHCI controller on 30b40000.mmc [30b40000.mmc] using ADMA [ 2.098010] clk: Disabling unused clocks [ 2.101709] PM: genpd: Disabling unused power domains [ 2.101778] ALSA device list: [ 2.101782] #0: imx-spdif [ 2.106025] cfg80211: failed to load regulatory.db [ 2.106448] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA [ 2.266355] EXT4-fs (mmcblk2p2): warning: mounting fs with errors, running e2fsck is recommended [ 2.277093] EXT4-fs (mmcblk2p2): recovery complete [ 2.283024] EXT4-fs (mmcblk2p2): mounted filesystem 20364220-6e5e-45c8-bf64-7551b37d8c8d r/w with ordered data mode. Quota mode: none. [ 2.287078] mmc0: new ultra high speed SDR104 SDIO card at address 0001 [ 2.295187] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 2.308798] devtmpfs: mounted [ 2.309735] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 2.314563] Freeing unused kernel memory: 10368K [ 2.320440] usb 1-1: new high-speed USB device number 2 using ci_hdrc [ 2.325119] Run /sbin/init as init process [ 2.335547] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.ees,imx8mm-emtop-baseboard.bin failed with error -2 [ 2.335575] with arguments: [ 2.347655] /sbin/init [ 2.347659] with environment: [ 2.347662] HOME=/ [ 2.347665] TERM=linux [ 2.467553] systemd[1]: systemd 243.2+ running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCR) [ 2.487372] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) [ 2.489677] systemd[1]: Detected architecture arm64. [ 2.497370] hub 1-1:1.0: USB hub found [ 2.505499] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 3 2019 19:47:25 version 7.45.184 (r712131 CY) FWID 01-b363c0a0 [ 2.517873] hub 1-1:1.0: 4 ports detected [ 2.578353] systemd[1]: Set hostname to <imx8mmddr4evk>. [ 2.720063] EXT4-fs error (device mmcblk2p2): ext4_validate_block_bitmap:423: comm ext4lazyinit: bg 34: bad block bitmap checksum [ 2.787503] systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run. [ 2.815727] systemd[1]: /lib/systemd/system/syslogd.service:8: PIDFile= references a path below legacy directory /var/run/, updating /var/run/. [ 2.845890] systemd[1]: /lib/systemd/system/rpcbind.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/. [ 2.869152] systemd[1]: /lib/systemd/system/klogd.service:8: PIDFile= references a path below legacy directory /var/run/, updating /var/run/kl. [ 5.989945] random: crng init done [ 5.995822] systemd[1]: Created slice system-getty.slice. [ 6.019025] systemd[1]: Created slice system-serial\x2dgetty.slice. [ 6.042942] systemd[1]: Created slice User and Session Slice. [ 6.514702] EXT4-fs (mmcblk2p2): re-mounted 20364220-6e5e-45c8-bf64-7551b37d8c8d r/w. Quota mode: none. [ 6.762206] systemd-journald[118]: Received client request to flush runtime journal. [ 7.441591] imx-cpufreq-dt imx-cpufreq-dt: cpu speed grade 2 mkt segment 2 supported-hw 0x4 0x4 [ 7.533512] Error: Driver 'imx-sdma' is already registered, aborting... [ 7.638002] snvs_rtc 30370000.snvs:snvs-rtc-lp: registered as rtc1 [ 7.652039] Error: Driver 'imx-sdma' is already registered, aborting... [ 7.731186] imx8m-ddrc-devfreq 3d400000.memory-controller: failed to get OPP table [ 7.744440] mc: Linux media interface: v0.10 [ 7.778371] debugfs: File 'Headphone Jack' in directory 'dapm' already present! [ 7.843477] videodev: Linux video capture interface: v2.00 [ 7.968037] etnaviv etnaviv: bound 38000000.gpu (ops gpu_ops [etnaviv]) [ 7.991117] hantro-vpu 38300000.video-codec: registered nxp,imx8mm-vpu-g1-dec as /dev/video0 [ 7.994918] etnaviv etnaviv: bound 38008000.gpu (ops gpu_ops [etnaviv]) [ 8.006631] etnaviv-gpu 38000000.gpu: model: GC600, revision: 4653 [ 8.022053] etnaviv-gpu 38000000.gpu: Need to move linear window on MC1.0, disabling TS [ 8.024688] bluetooth: Unknown symbol crypto_ecdh_key_len (err -2) [ 8.032308] hantro-vpu 38310000.video-codec: registered nxp,imx8mq-vpu-g2-dec as /dev/video1 [ 8.036846] bluetooth: Unknown symbol crypto_ecdh_encode_key (err -2) [ 8.036917] etnaviv-gpu 38008000.gpu: model: GC520, revision: 5341 [ 8.046269] [drm] Initialized etnaviv 1.4.0 20151214 for etnaviv on minor 0 [ 8.244785] usbcore: registered new device driver onboard-usb-dev [ 8.445671] hub 1-1:1.0: USB hub found [ 8.462368] CAN device driver interface [ 8.473204] hub 1-1:1.0: 4 ports detected [ 8.527105] hub 1-1:1.0: USB hub found [ 8.542004] hub 1-1:1.0: 4 ports detected [ 8.562833] mcp251x spi1.0 can0: MCP2515 successfully initialized. [ 8.639860] fec 30be0000.ethernet eth0: Unable to connect to phy [ 8.708452] fec 30be0000.ethernet eth0: Unable to connect to phy Regards, Tarang
On 27.08.2024 11:16:02, Tarang Raval wrote: > Yes, I have tested it, and you can see the logs below. > After running ifconfig can0 up, the bus is operational. Thanks for testing. regards, Marc
Hi Tarang, On Tue, Aug 27, 2024 at 8:16 AM Tarang Raval <tarang.raval@siliconsignals.io> wrote: > [ 8.639860] fec 30be0000.ethernet eth0: Unable to connect to phy > [ 8.708452] fec 30be0000.ethernet eth0: Unable to connect to phy What about this network issue?
Hi Fabio, Currently, the Ethernet cable is not connected, which is why it's showing that message. If I connect the Ethernet cable, it will give a log like this: [ 12.670384] fec 30be0000.ethernet eth0: Link is Down [ 14.719222] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx Regards, Tarang
On Fri, Aug 23, 2024 at 05:31:57PM +0530, Tarang Raval wrote: > Add following peripherals support for the Emtop i.MX8M Mini Baseboard > > * Wi-Fi > * Audio > * SD card > * RTC > * CAN bus > * USB OTG > > Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io> > --- > > Changes in v2: > > 1. Updated the node name and pinctrl name. > 2. Removed the 'regulators' container. > 3. Removed a stray blank line. > 4. Removed non-existent properties. > 5. Removed unused node and pinctrl: > -modem-reset > -pinctrl_uart1 > 6. Defined the CAN transceiver reset GPIO separately. > > Change in v3: > > 1. Removed 'can-connector'. > 2. Use USB connector instead of extcon_usb. > 3. Changed id-gpio to id-gpios. > 4. Use Level trigger IRQ in the CAN node. > 5. Corrected the compatible property of RTC. > 6. Added blank lines to separate the pinctrl groups. > --- > .../dts/freescale/imx8mm-emtop-baseboard.dts | 326 ++++++++++++++++++ > 1 file changed, 326 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts b/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts > index 7d2cb74c64ee..0a7c8acd8f5d 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts > @@ -11,6 +11,113 @@ / { > model = "Emtop Embedded Solutions i.MX8M Mini Baseboard V1"; > compatible = "ees,imx8mm-emtop-baseboard", "ees,imx8mm-emtop-som", > "fsl,imx8mm"; > + > + connector { > + compatible = "usb-c-connector"; > + label = "USB-C"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_usb_otg>; > + id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; > + > + port { > + high_speed_ep: endpoint { > + remote-endpoint = <&usb_hs_ep>; > + }; > + }; > + }; > + > + leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_gpio_led>; > + > + led-1 { > + label = "buzzer"; > + gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; > + default-state = "off"; > + }; > + }; > + > + osc_can: clock-osc-can { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <16000000>; > + clock-output-names = "osc-can"; > + }; > + > + reg_audio: regulator-audio { > + compatible = "regulator-fixed"; > + regulator-name = "wm8904_supply"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + }; > + > + reg_wifi_vmmc: regulator-wifi-vmmc { > + compatible = "regulator-fixed"; > + regulator-name = "vmmc"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + startup-delay-us = <100>; > + off-on-delay-us = <20000>; > + }; > + > + sound-wm8904 { > + compatible = "simple-audio-card"; > + simple-audio-card,bitclock-master = <&dailink_master>; > + simple-audio-card,format = "i2s"; > + simple-audio-card,frame-master = <&dailink_master>; > + simple-audio-card,name = "wm8904-audio"; > + simple-audio-card,mclk-fs = <256>; > + simple-audio-card,routing = > + "Headphone Jack", "HPOUTL", > + "Headphone Jack", "HPOUTR", > + "IN2L", "Line In Jack", > + "IN2R", "Line In Jack", > + "Headphone Jack", "MICBIAS", > + "IN1L", "Headphone Jack"; > + > + simple-audio-card,widgets = > + "Microphone","Headphone Jack", > + "Headphone", "Headphone Jack", > + "Line", "Line In Jack"; > + > + dailink_master: simple-audio-card,codec { > + sound-dai = <&wm8904>; > + }; > + > + simple-audio-card,cpu { > + sound-dai = <&sai3>; > + }; > + }; > + > + sound-spdif { > + compatible = "fsl,imx-audio-spdif"; > + model = "imx-spdif"; > + spdif-controller = <&spdif1>; > + spdif-out; > + spdif-in; > + }; > +}; > + > +/* CAN BUS */ > +&ecspi2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ecspi2>; > + status = "okay"; > + > + can: can@0 { > + compatible = "microchip,mcp2515"; > + reg = <0>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_canbus>; > + clocks = <&osc_can>; > + interrupt-parent = <&gpio1>; > + interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; > + spi-max-frequency = <10000000>; > + }; > }; > > &fec1 { > @@ -40,7 +147,129 @@ vddio: vddio-regulator { > }; > }; > > +&i2c3 { > + clock-frequency = <100000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2c3>; > + status = "okay"; > + > + rtc@32 { > + compatible = "epson,rx8025"; > + reg = <0x32>; > + }; > + > + wm8904: audio-codec@1a { Could you sort I2C device nodes in slave/unit address? > + compatible = "wlf,wm8904"; > + reg = <0x1a>; > + #sound-dai-cells = <0>; > + clocks = <&clk IMX8MM_CLK_SAI3_ROOT>; > + clock-names = "mclk"; > + DCVDD-supply = <®_audio>; > + DBVDD-supply = <®_audio>; > + AVDD-supply = <®_audio>; > + CPVDD-supply = <®_audio>; > + MICVDD-supply = <®_audio>; > + }; > +}; > + > +/* AUDIO */ > +&sai3 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_sai3>; > + assigned-clocks = <&clk IMX8MM_CLK_SAI3>; > + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; > + assigned-clock-rates = <24576000>; > + status = "okay"; > +}; > + > +&spdif1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_spdif1>; > + assigned-clocks = <&clk IMX8MM_CLK_SPDIF1>; > + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; > + assigned-clock-rates = <24576000>; > + clocks = <&clk IMX8MM_CLK_AUDIO_AHB>, <&clk IMX8MM_CLK_24M>, > + <&clk IMX8MM_CLK_SPDIF1>, <&clk IMX8MM_CLK_DUMMY>, > + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>, > + <&clk IMX8MM_CLK_AUDIO_AHB>, <&clk IMX8MM_CLK_DUMMY>, > + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>, > + <&clk IMX8MM_AUDIO_PLL1_OUT>, <&clk IMX8MM_AUDIO_PLL2_OUT>; > + clock-names = "core", "rxtx0", "rxtx1", "rxtx2", "rxtx3", > + "rxtx4", "rxtx5", "rxtx6", "rxtx7", "spba", "pll8k", "pll11k"; > + status = "okay"; > +}; > + > +/* USBOTG */ > +&usbotg1 { > + dr_mode = "otg"; > + usb-role-switch; > + status = "okay"; > + > + port { > + usb_hs_ep: endpoint { > + remote-endpoint = <&high_speed_ep>; > + }; > + }; > +}; > + > +&usbotg2 { > + dr_mode = "host"; > + status = "okay"; > +}; > + > +/* Wifi */ > +&usdhc1 { > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > + pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_usdhc1_gpio>; > + pinctrl-1 = <&pinctrl_usdhc1_100mhz>, <&pinctrl_usdhc1_gpio>; > + pinctrl-2 = <&pinctrl_usdhc1_200mhz>, <&pinctrl_usdhc1_gpio>; > + bus-width = <4>; > + vmmc-supply = <®_wifi_vmmc>; > + cap-power-off-card; > + keep-power-in-suspend; > + non-removable; > + status = "okay"; > + > + #address-cells = <1>; > + #size-cells = <0>; Could you move these two into the property list above which ends with 'status'? Shawn > + wifi: wifi@1 { > + compatible = "brcm,bcm4329-fmac"; > + reg = <1>; > + interrupt-parent = <&gpio2>; > + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; > + interrupt-names = "host-wake"; > + }; > +}; > + > +/* SD-card */ > +&usdhc2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_usdhc2>; > + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; > + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; > + cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; > + bus-width = <4>; > + status = "okay"; > +}; > + > &iomuxc { > + > + pinctrl_ecspi2: ecspi2grp { > + fsl,pins = < > + MX8MM_IOMUXC_ECSPI2_SS0_ECSPI2_SS0 0x82 > + MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82 > + MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82 > + MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82 > + >; > + }; > + > + pinctrl_usb_otg: usbotggrp { > + fsl,pins = < > + MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x140 /* otg_id */ > + MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x19 /* otg_vbus */ > + >; > + }; > + > pinctrl_fec1: fec1grp { > fsl,pins = < > MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3 > @@ -60,4 +289,101 @@ MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f > MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x19 > >; > }; > + > + pinctrl_i2c3: i2c3grp { > + fsl,pins = < > + MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 > + MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 > + >; > + }; > + > + pinctrl_sai3: sai3grp { > + fsl,pins = < > + MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6 > + MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6 > + MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6 > + MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6 > + MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6 > + >; > + }; > + > + pinctrl_spdif1: spdif1grp { > + fsl,pins = < > + MX8MM_IOMUXC_SPDIF_TX_SPDIF1_OUT 0xd6 > + >; > + }; > + > + pinctrl_usdhc1: usdhc1grp { > + fsl,pins = < > + MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190 > + MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0 > + MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0 > + MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0 > + MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0 > + MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0 > + >; > + }; > + > + pinctrl_usdhc1_100mhz: usdhc1-100mhzgrp{ > + fsl,pins = < > + MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x194 > + MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d4 > + MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d4 > + MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d4 > + MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d4 > + MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d4 > + >; > + }; > + > + pinctrl_usdhc1_200mhz: usdhc1-200mhzgrp { > + fsl,pins = < > + MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x196 > + MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d6 > + MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d6 > + MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d6 > + MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d6 > + MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d6 > + >; > + }; > + > + pinctrl_usdhc1_gpio: usdhc1-gpiogrp { > + fsl,pins = < > + MX8MM_IOMUXC_SD1_RESET_B_GPIO2_IO10 0x41 /* wl_reg_on */ > + MX8MM_IOMUXC_SD1_DATA7_GPIO2_IO9 0x41 /* wl_host_wake */ > + MX8MM_IOMUXC_GPIO1_IO00_ANAMIX_REF_CLK_32K 0x141 /* LP0: 32KHz */ > + >; > + }; > + > + pinctrl_usdhc2: usdhc2grp { > + fsl,pins = < > + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190 > + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0 > + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0 > + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 > + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 > + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 > + >; > + }; > + > + pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp { > + fsl,pins = < > + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 > + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 > + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 > + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 > + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 > + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 > + >; > + }; > + > + pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp { > + fsl,pins = < > + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 > + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 > + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 > + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 > + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 > + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 > + >; > + }; > }; > -- > 2.34.1 >
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts b/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts index 7d2cb74c64ee..0a7c8acd8f5d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-emtop-baseboard.dts @@ -11,6 +11,113 @@ / { model = "Emtop Embedded Solutions i.MX8M Mini Baseboard V1"; compatible = "ees,imx8mm-emtop-baseboard", "ees,imx8mm-emtop-som", "fsl,imx8mm"; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb_otg>; + id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + + port { + high_speed_ep: endpoint { + remote-endpoint = <&usb_hs_ep>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_led>; + + led-1 { + label = "buzzer"; + gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; + + osc_can: clock-osc-can { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <16000000>; + clock-output-names = "osc-can"; + }; + + reg_audio: regulator-audio { + compatible = "regulator-fixed"; + regulator-name = "wm8904_supply"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + reg_wifi_vmmc: regulator-wifi-vmmc { + compatible = "regulator-fixed"; + regulator-name = "vmmc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <100>; + off-on-delay-us = <20000>; + }; + + sound-wm8904 { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&dailink_master>; + simple-audio-card,name = "wm8904-audio"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,routing = + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR", + "IN2L", "Line In Jack", + "IN2R", "Line In Jack", + "Headphone Jack", "MICBIAS", + "IN1L", "Headphone Jack"; + + simple-audio-card,widgets = + "Microphone","Headphone Jack", + "Headphone", "Headphone Jack", + "Line", "Line In Jack"; + + dailink_master: simple-audio-card,codec { + sound-dai = <&wm8904>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai3>; + }; + }; + + sound-spdif { + compatible = "fsl,imx-audio-spdif"; + model = "imx-spdif"; + spdif-controller = <&spdif1>; + spdif-out; + spdif-in; + }; +}; + +/* CAN BUS */ +&ecspi2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi2>; + status = "okay"; + + can: can@0 { + compatible = "microchip,mcp2515"; + reg = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_canbus>; + clocks = <&osc_can>; + interrupt-parent = <&gpio1>; + interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; + spi-max-frequency = <10000000>; + }; }; &fec1 { @@ -40,7 +147,129 @@ vddio: vddio-regulator { }; }; +&i2c3 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; + + rtc@32 { + compatible = "epson,rx8025"; + reg = <0x32>; + }; + + wm8904: audio-codec@1a { + compatible = "wlf,wm8904"; + reg = <0x1a>; + #sound-dai-cells = <0>; + clocks = <&clk IMX8MM_CLK_SAI3_ROOT>; + clock-names = "mclk"; + DCVDD-supply = <®_audio>; + DBVDD-supply = <®_audio>; + AVDD-supply = <®_audio>; + CPVDD-supply = <®_audio>; + MICVDD-supply = <®_audio>; + }; +}; + +/* AUDIO */ +&sai3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai3>; + assigned-clocks = <&clk IMX8MM_CLK_SAI3>; + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + status = "okay"; +}; + +&spdif1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spdif1>; + assigned-clocks = <&clk IMX8MM_CLK_SPDIF1>; + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + clocks = <&clk IMX8MM_CLK_AUDIO_AHB>, <&clk IMX8MM_CLK_24M>, + <&clk IMX8MM_CLK_SPDIF1>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_CLK_AUDIO_AHB>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_AUDIO_PLL1_OUT>, <&clk IMX8MM_AUDIO_PLL2_OUT>; + clock-names = "core", "rxtx0", "rxtx1", "rxtx2", "rxtx3", + "rxtx4", "rxtx5", "rxtx6", "rxtx7", "spba", "pll8k", "pll11k"; + status = "okay"; +}; + +/* USBOTG */ +&usbotg1 { + dr_mode = "otg"; + usb-role-switch; + status = "okay"; + + port { + usb_hs_ep: endpoint { + remote-endpoint = <&high_speed_ep>; + }; + }; +}; + +&usbotg2 { + dr_mode = "host"; + status = "okay"; +}; + +/* Wifi */ +&usdhc1 { + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_usdhc1_gpio>; + pinctrl-1 = <&pinctrl_usdhc1_100mhz>, <&pinctrl_usdhc1_gpio>; + pinctrl-2 = <&pinctrl_usdhc1_200mhz>, <&pinctrl_usdhc1_gpio>; + bus-width = <4>; + vmmc-supply = <®_wifi_vmmc>; + cap-power-off-card; + keep-power-in-suspend; + non-removable; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + wifi: wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + interrupt-parent = <&gpio2>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; +}; + +/* SD-card */ +&usdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; + cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; + bus-width = <4>; + status = "okay"; +}; + &iomuxc { + + pinctrl_ecspi2: ecspi2grp { + fsl,pins = < + MX8MM_IOMUXC_ECSPI2_SS0_ECSPI2_SS0 0x82 + MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82 + MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82 + MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82 + >; + }; + + pinctrl_usb_otg: usbotggrp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x140 /* otg_id */ + MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x19 /* otg_vbus */ + >; + }; + pinctrl_fec1: fec1grp { fsl,pins = < MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3 @@ -60,4 +289,101 @@ MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x19 >; }; + + pinctrl_i2c3: i2c3grp { + fsl,pins = < + MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 + MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 + >; + }; + + pinctrl_sai3: sai3grp { + fsl,pins = < + MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6 + MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6 + MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6 + MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6 + MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6 + >; + }; + + pinctrl_spdif1: spdif1grp { + fsl,pins = < + MX8MM_IOMUXC_SPDIF_TX_SPDIF1_OUT 0xd6 + >; + }; + + pinctrl_usdhc1: usdhc1grp { + fsl,pins = < + MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190 + MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0 + MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0 + MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0 + MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0 + MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0 + >; + }; + + pinctrl_usdhc1_100mhz: usdhc1-100mhzgrp{ + fsl,pins = < + MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x194 + MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d4 + MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d4 + MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d4 + MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d4 + MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d4 + >; + }; + + pinctrl_usdhc1_200mhz: usdhc1-200mhzgrp { + fsl,pins = < + MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x196 + MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d6 + MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d6 + MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d6 + MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d6 + MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d6 + >; + }; + + pinctrl_usdhc1_gpio: usdhc1-gpiogrp { + fsl,pins = < + MX8MM_IOMUXC_SD1_RESET_B_GPIO2_IO10 0x41 /* wl_reg_on */ + MX8MM_IOMUXC_SD1_DATA7_GPIO2_IO9 0x41 /* wl_host_wake */ + MX8MM_IOMUXC_GPIO1_IO00_ANAMIX_REF_CLK_32K 0x141 /* LP0: 32KHz */ + >; + }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 + >; + }; + + pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 + >; + }; + + pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 + >; + }; };
Add following peripherals support for the Emtop i.MX8M Mini Baseboard * Wi-Fi * Audio * SD card * RTC * CAN bus * USB OTG Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io> --- Changes in v2: 1. Updated the node name and pinctrl name. 2. Removed the 'regulators' container. 3. Removed a stray blank line. 4. Removed non-existent properties. 5. Removed unused node and pinctrl: -modem-reset -pinctrl_uart1 6. Defined the CAN transceiver reset GPIO separately. Change in v3: 1. Removed 'can-connector'. 2. Use USB connector instead of extcon_usb. 3. Changed id-gpio to id-gpios. 4. Use Level trigger IRQ in the CAN node. 5. Corrected the compatible property of RTC. 6. Added blank lines to separate the pinctrl groups. --- .../dts/freescale/imx8mm-emtop-baseboard.dts | 326 ++++++++++++++++++ 1 file changed, 326 insertions(+)