X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=board%2Fkaro%2Fcommon%2Ffdt.c;h=7f6ac56298894ec6fe59c92296fbd2e85bbdf4ff;hp=65b6a86a281e2f8d17891e4c0460963b45fdb097;hb=b374544de64889bb56091ee1e7c9c71e34c4f348;hpb=3282f92901200a6499ae7b4991887a62cbae3698 diff --git a/board/karo/common/fdt.c b/board/karo/common/fdt.c index 65b6a86a28..7f6ac56298 100644 --- a/board/karo/common/fdt.c +++ b/board/karo/common/fdt.c @@ -385,11 +385,15 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present) if (karo_fdt_flexcan_enabled(blob)) { if (!is_lvds()) { debug("Changing LCD to use 23bits only\n"); + karo_fdt_set_lcd_pins(blob, "lcdif-23bit-pins-a"); + /* handle legacy alias name */ karo_fdt_set_lcd_pins(blob, "lcdif_23bit_pins_a"); xcvr_status = NULL; } } else if (!is_lvds()) { debug("Changing LCD to use 24bits\n"); + karo_fdt_set_lcd_pins(blob, "lcdif-24bit-pins-a"); + /* handle legacy alias name */ karo_fdt_set_lcd_pins(blob, "lcdif_24bit_pins_a"); } } else { @@ -400,8 +404,11 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present) off = fdt_path_offset(blob, "can1"); if (off >= 0) fdt_delprop(blob, off, "xceiver-supply"); - if (!is_lvds()) + if (!is_lvds()) { + karo_fdt_set_lcd_pins(blob, "lcdif-24bit-pins-a"); + /* handle legacy alias name */ karo_fdt_set_lcd_pins(blob, "lcdif_24bit_pins_a"); + } } if (otg_mode && strcasecmp(otg_mode, "host") == 0) @@ -409,9 +416,12 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present) if (xcvr_status) { debug("Disabling CAN XCVR\n"); - ret = fdt_find_and_setprop(blob, "reg_can_xcvr", "status", + ret = fdt_find_and_setprop(blob, "reg-can-xcvr", "status", xcvr_status, strlen(xcvr_status) + 1, 1); - if (ret) + if (ret == -FDT_ERR_NOTFOUND) + ret = fdt_find_and_setprop(blob, "reg_can_xcvr", "status", + xcvr_status, strlen(xcvr_status) + 1, 1); + if (ret != -FDT_ERR_NOTFOUND) printf("Failed to disable CAN transceiver switch: %s\n", fdt_strerror(ret)); }