summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/protonic-imx6
Commit message (Collapse)AuthorAgeFilesLines
* eth: replace ethaddr_to_string() with %pMSascha Hauer2024-02-051-4/+1
| | | | | | | | Now that we can print MAC addresses using the %pM format specifier we can get rid of ethaddr_to_string(). Do this treewide. Link: https://lore.barebox.org/20240202151147.226876-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: switch regmap.h include to linux/regmap.hAhmad Fatoum2023-10-261-1/+1
| | | | | | | | | | | | | | | Now that there are no longer any users of regmap.h in headers, let's switch all users in the source files to linux/regmap.h. That way, the only users of regmap.h whether directly or indirectly will be out-of-tree code, which will fail with an error if they are dependent on the old semantics of regmap_bulk_read and regmap_bulk_write. After a transitory period, we can then drop regmap.h. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231020071853.2826528-12-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: drop trailing spaceAhmad Fatoum2023-05-0210-10/+10
| | | | | | | | | | | | | | Found by manual inspection of the output of: rg '\s+$' | rg -v dts/ Patch can be verified by observing that no diff results from: git show --ignore-space-at-eol Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230424121805.150434-4-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2023-04-191-1/+1
|\
| * usb: move include files to place where Linux has themSascha Hauer2023-03-201-1/+1
| | | | | | | | | | | | | | | | | | For easier patch merging and comparison with Linux move the usb gadget files to where Linux has them. For now do a plain git mv include/usb include/linux/usb, eventhough there might be some files which are purely barebox specific. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: boards: protonic-imx6: fix bbu_handler device pathsMarco Felsch2023-04-041-2/+2
|/ | | | | | | | | The update handler path must be a full-path starting at '/'. Fix this by adding the '/dev/' path prefix. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230403122509.258800-1-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: fix board probe for LANMCUOleksij Rempel2023-03-171-1/+1
| | | | | | | | | Present barebox version does not execute board probe code on LANMCU. Modify vendor prefix for proper functionality. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20230316134131.4068293-1-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Move mach header files to include/mach/imxSascha Hauer2023-03-062-5/+5
| | | | | | | | | | | Currently arch specific headers can be included with #include <mach/xxx.h>. With upcoming multi-arch support this is no longer possible as there won't be a single mach anymore. Move all i.MX specific header files to include/mach/imx/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct driver_d to driverSascha Hauer2023-01-101-1/+1
| | | | | | | | | | | The '_d' suffix was originally meant to distinguish barebox struct names from Linux struct names. struct driver doesn't exist in Linux, so we can rename it and remove the meaningless suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-101-10/+10
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Register serial_number parameter with ocotpRobin van der Gracht2022-06-171-3/+36
| | | | | | Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-10-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Read serial and mac from fuses if availableRobin van der Gracht2022-06-171-7/+37
| | | | | | | | | Read board serial number from GP1 fuses if available and fall-back to the i2c RFID eeprom (current method) otherwise. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-9-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Remove usb_delay from the priv structRobin van der Gracht2022-06-171-4/+4
| | | | | | | | It's only used in one function right now. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-8-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Register prt-usb boot entryRobin van der Gracht2022-06-171-29/+79
| | | | | | | | | | | | | | | The worker that polls for a bootable usb device and the first boot.default target are executed at the same time (after usb_delay seconds). Since inspecting the usb drive's contents takes some time it loses the race breaking usb boot. If we make the usb boot routine a boot entry and prepend it to boot.default it will always run first when the autoboot timeout expires. If the usb boot entry fails boot will just fallback to the next entry (i.e. bootchooser). Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-7-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Remove unsused argument from prt_imx6_usb_mountRobin van der Gracht2022-06-171-9/+3
| | | | | | | | | Removing this unused pointer pointer relieves the caller from freeing the memory afterwards. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-6-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Always free allocated alias stringRobin van der Gracht2022-06-171-8/+4
| | | | | | | | | The memory required to store the string needs to be freed on success as well since it's no longer used. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-5-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Free allocated autoboot_timeout stringRobin van der Gracht2022-06-171-0/+1
| | | | | | Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616131114.214628-4-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: add HW revision specific machine compatibleOleksij Rempel2022-05-051-4/+18
| | | | | | | | | | Currently we use generic/pinned machine compatible for different HW revisions. With this patch we extend this compatible string with HW revision specific. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220503091220.3871612-6-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: make use of barebox_set_serial_number()Oleksij Rempel2022-05-051-19/+1
| | | | | | | | | Replace board specific serial-number fixup with common barebox_set_serial_number(). Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220503091220.3871612-3-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: fix file system access warningOleksij Rempel2022-04-011-11/+10
| | | | | | | | | | We should not access a file system from the poller. So, do it from the worker. This patch will fix warning on FS access for Protonic board code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220328120956.2402132-1-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: properly configure RGMII direction for the FEC MACOleksij Rempel2022-03-281-0/+13
| | | | | | | | | To make SJA1105 switch work properly with bareobx, we need to configure RGMII ref_clk. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220321092103.1357659-2-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: add board specific BBU SD handlersOleksij Rempel2022-03-281-0/+34
| | | | | | | | Add barebox update handler for the SD ports. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220321092103.1357659-1-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: rename of_find_node_by_name() to of_find_node_by_name_address()Sascha Hauer2022-03-081-1/+1
| | | | | | | | | | | | | of_find_node_by_name() has the same name as the corresponding kernel function but a different semantics. A node name is comprised of the nodes name and a unit address, separated with '@'. Linux of_find_node_by_name() matches only the name before the '@' whereas the barebox function compares the full name. As several callers depend on the barebox semantics we can't just change the semantics, so rename the barebox function to of_find_node_by_name_address(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: add SPDX-License-Identifier for DCDAhmad Fatoum2022-01-0521-0/+39
| | | | | | | | | | | In absence of a license statement, the default is GPL-2.0-only. Add that to the DCD files. All of // /* */ # are acceptable comment characters in the DSL. If there are nearby comments in the file, the same character is used, otherwise #. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: add SPDX-License-Identifier for Kbuild/KconfigAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | | | | | | | To verify only Kconfig/Makefile is touched: git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile' will print only arch/powerpc/Kbuild. To verify nothing unexpected is added: git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Add support for jozacp boardRobin van der Gracht2021-10-043-0/+124
| | | | | | | | | | | | | | | The jozacp is an industrial imx6ull based board with ethernet, wifi and zigbee. Note: this patch includes WIP version of the devicetree: arch/arm/dts/imx6ull-jozacp.dtsi. This devicetree will be reworked, mainlined to the kernel and at the end replaced with the kernel mainline version. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210825125430.26901-5-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Skip usb check on prtvt7 by defaultRobin van der Gracht2021-10-041-18/+43
| | | | | | | | | | | This product has physical buttons. When a certain combination is pressed, the usb check should be performed otherwise it can be skipped to allow faster booting. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210825125430.26901-4-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: use decode error values instead error numbers.Oleksij Rempel2021-10-041-7/+7
| | | | | | | | | Current barebox version provides "%pe" support with error to string conversion. So, let's use it. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210825125430.26901-3-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: enable deep-probe supportOleksij Rempel2021-10-041-0/+11
| | | | | | | | Enable deep-probe support and fix gpio dependency for the early probe. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210825125430.26901-2-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Enable bootchooser on prti6g boardRobin van der Gracht2021-08-231-1/+1
| | | | | | | | | | Bootchooser is now ported to the prti6g board. So, let barebox know about it. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210818121945.26089-7-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Add emmc_usdhc machine data variableRobin van der Gracht2021-08-231-1/+29
| | | | | | | | | | The i.MX6 ultralite only has 2 usdhc ports which will be indexed as '0' and '1'. The bbu setup code assumes it is attached as '/dev/mmc2'. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210818121945.26089-6-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Don't register SD with bbuRobin van der Gracht2021-08-231-4/+0
| | | | | | | | | | | SD boot is only used during development. Since the usdhc interface index differs from board to board removing it is easier than adding another board variable/flag. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210818121945.26089-5-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Don't fixup MAC address for disabled deviceRobin van der Gracht2021-08-231-0/+3
| | | | | | | | | | | The prtvt7 board variant has no enabled ethernet interface. For these boards the MAC address in the RFID flash is unset or invalid and should not be copied to the device-tree. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210818121945.26089-3-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: protonic-imx6: Run usb boot entry instead of bare deviceRobin van der Gracht2021-08-231-1/+1
| | | | | | | | | | There is a usb boot script in the enviromnent. Bare device boots work well with bootspec but we decided to not use that anymore. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210818121945.26089-2-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: protonic-imx6: do not expose RFID to the kernel dtsOleksij Rempel2021-07-181-6/+0
| | | | | | | | | RFID node is not used and should not be used by kernel, so remove the kernel devicetree fixup. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210715123747.29020-1-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: protonic: vicut1: disable on-die termination to fix PHY bootstrappingOleksij Rempel2021-05-251-1/+0
| | | | | | | | | | | | | | | | | | | If on-die termination is enabled, the RXC pin of iMX6 will be pulled high. Since we already have an 10K pull-down on board, the RXC level on PHY reset will be ~800mV, which is mostly interpreted as 1. On some reboots we get 0 instead and kernel can't detect the PHY properly. Since the default 0x020e07ac value is 0, it is sufficient to remove this entry from the affected imxcfg files. Since we get stable 0 on pin PHYADDR[2], the PHY address is changed from 4 to 0. Reported-by: Robin van der Gracht <robin@protonic.nl> Fixes: 00adc1e33ef8 ("ARM: add imx6 based Protonic boads") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20210518083707.15428-1-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX6Q: fix network configuration for Protonic PRTI6G boardOleksij Rempel2020-12-071-0/+25
| | | | | | | | | By default the iMX6UL is configured to output clock on the ENET1_TX_CLK pin. Since on the Protonic PRTI6G board the PHY is actual refclock provider, we should change the clock source to the external clock. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: protonic: disable on-die termination to fix PHY bootstrappingOleksij Rempel2020-10-093-3/+0
| | | | | | | | | | | | | | | | | If on-die termination is enabled, the RXC pin of iMX6 will be pulled high. Since we already have an 10K pull-down on board, the RXC level on PHY reset will be ~800mV, which is mostly interpreted as 1. On some reboots we get 0 instead and kernel can't detect the PHY properly. Since the default 0x020e07ac value is 0, it is sufficient to remove this entry from the affected imxcfg files. Since we get stable 0 on pin PHYADDR[2], the PHY address is changed from 4 to 0. Fixes: 00adc1e33ef8 ("ARM: add imx6 based Protonic boads") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: protonic-imx6: port Protonic specific board codeOleksij Rempel2020-08-242-0/+1035
| | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-image: rename dcdofs to ivtofsSascha Hauer2020-07-1415-15/+15
| | | | | | | | | This renames the dcdofs config option in the imx-image tool to ivtofs. dcdofs is a misnomer. The DCD (Device Configuration Data) is only one part of the data linked into the IVT (Image Vector Table), but the meaning of the option is really the latter, not the former. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add imx6 based Protonic boadsOleksij Rempel2020-06-1822-0/+3212
Add initial support for 15 i.MX6 based Protonic boards. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>