We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
Custom board
CPU: OSD3358
(4) UARTS: UART0 (debug/console), UART1, 2 and 4 connected to MAX232 transceivers
(1) EEPROM
(1) eMMC
(1) SD card
(1) USB (host)
(1) USB (peripheral)
(2) ethernet PHY LAN8710 on i2c bus RMII
(16) GPIO
No onboard LEDs
No HDMI
No sound
No display
I have followed https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black (June 05 2020) instructions. I am able to boot to linux and login.
I am using dtb-rebuilder. I copied/renamed am335x-boneblack.dts, am33xx.dtsi, am335x-bone-common.dtsi and am335x-boneblack-common.dtsi. I have changed/added uart1,2 and 4, commented out the leds/user_leds, added pinmux for the second RMII and other changes to the am335x-zzz-common.dtsi. I have commented out the tda19988 and sound section of amm335x-boneblack-common.dtsi. After doing all that, I found a post on this forum that mentioned to start with am335x-bonegreen.dts because it is same as boneblack except it doesn’t have HDMI. Thenk got me thinking if there is a existing device tree that I should start with instead of the boneblack.
Which device tree is closest match to my custom board?
Also, my custom board hardware is not going to change. I don’t think I need helper or cape manager. However I don’t understand the purpose the helper or cape manager. Ultimately I don’t think I need .dtsi (include) or overlay files. I would like to end up with a single .dts file that matches my board.
Comments about pros/cons of putting device tree in one .dts file are welcome.
Hi @jakthree, if I was doing this design, i’d start with something based on the PocketBeagle dts instead. Completely un-tested and not built, but start with something like:
Robert,
Thank you for suggesting the PocketBeagle DT to start with. I will check it out. I downloaded/extracted the BeagleBoard-DeviceTrees-4.19.x-ti.zip file. I now have several directories of DTS files located in linuxonarm/bb-kernel kernel source, dtb-rebuilder, BB-DeviceTrees, linuxonarm/uboot and other dirs. I am confused about which DTS directory I should be putting my dts files in. I don’t understand if I need to put my custom dts files in the kernel directory and in the BB-DT/src/arm directory. I will put my dts files in BB-DT/src/arm, use BB-DT make and copy the .dtb to my target.
Does copying the .dtb created by BB-DT to my target board satisfy the kernel?
Does the kernel need to know about the custom DT when then kernel is built/rebuilt?
The kernel I am using now is 4.19. I plan to use is 5.4. The BB-DT branch is v4.19.
Does the BB-DT branch need to match the kernel version?
I am changing AM33XX_IOPAD() to AM33XX_PADCONF(). Most are easy. However I don’t know how to handle the ‘SLEWCTRL_FAST’.
What is correct syntax to convert
AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
into
AM33XX_PADCONG(AM335X_PIN_MDIO, PIN_INPUT_PULLUP, SLEWCTRL_FAST | MUX_MODE0)
I’m not sure how to describe this proble correctly but i will give it a try.
Here is a snippet during kernel boot of a good .dtb.
Starting kernel …
[ 0.000424] timer_probe: no matching timers found
[ 0.232477] omap_hwmod: emif: no dt node
[ 0.475595] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 0.696767] CPUidle arm: CPU 0 failed to init idle CPU ops
[ 0.768612] omap_voltage_late_init: Voltage driver support not added
[ 9.110439] libphy: PHY 4a101000.mdio:00 not found
[ 9.151276] net eth0: phy “4a101000.mdio:00” not found on slave 0, err -19
[ 9.325908] libphy: PHY 4a101000.mdio:01 not found
[ 9.348300] net eth1: phy “4a101000.mdio:01” not found on slave 1, err -19
… (continues and starts Debian)
Here is snippet from .dtb I am building,
Starting kernel …
[ 0.000395] timer_probe: no matching timers found
[ 0.253453] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.480284] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 0.702537] CPUidle arm: CPU 0 failed to init idle CPU ops
[ 0.747520] omap_voltage_late_init: Voltage driver support not added
… (at this point I think it should report something about MDIO but hangs)
I think it has something to do with a ‘clock’ but that is only a guess.
How to proceed to debug what is causing the hang up?
I am booting from SD card on the same board. The only difference between the good and bad bootlog is in the uEnv.txt. Good ‘dtb=am335x-zcpu.dtb’, Bad ‘dtb=zcpu.dtb’. GOOD_bootlog.txt (58.3 KB)
I think my problems start after log entry
[ 1.676077] omap_hsmmc 48060000.mmc: Got CD GPIO
This entry may be the key problem.
[ 1.764900] mmc0: error -22 whilst initialising SD card
What does the following mean and where are the setting that control this in the DT?
[ 1.839925] omap_hsmmc 48060000.mmc: Linked as a consumer to regulator.1
[ 1.873490] omap_hsmmc 481d8000.mmc: Linked as a consumer to regulator.1
I am making progress. I can now boot and login. I added this and other to the DT. Now the SD card and eMMC are available.
// copied from am335x-boneblack-common
&mmc1 {
vmmc-supply = <&vmmcsd_fixed>;
pinctrl-names = “default”;
pinctrl-0 = <&mmc1_pins>;
bus-width = <8>;
status = “okay”;
};