Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: eyeq: Add Mobileye EyeQ6Lplus OLB

Declare the PLLs and fixed factors found in the EyeQ6Lplus OLB as part
of the match data for the "mobileye,eyeq6lplus-olb" compatible.

The PLL and fixed factor of the CPU are registered in early init as they
are required during the boot by the GIC timer.

Also select clk-eyeq for all EYEQ SoCs instead of listing each one
individually, as it is needed by all Mobileye EyeQ SoC.

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Benoît Monin and committed by
Thomas Bogendoerfer
4eb9ed39 fe9545bb

+72 -2
+2 -2
drivers/clk/Kconfig
··· 236 236 237 237 config COMMON_CLK_EYEQ 238 238 bool "Clock driver for the Mobileye EyeQ platform" 239 - depends on MACH_EYEQ5 || MACH_EYEQ6H || COMPILE_TEST 239 + depends on EYEQ || COMPILE_TEST 240 240 select AUXILIARY_BUS 241 - default MACH_EYEQ5 || MACH_EYEQ6H 241 + default EYEQ 242 242 help 243 243 This driver provides clocks found on Mobileye EyeQ5, EyeQ6L and Eye6H 244 244 SoCs. Controllers live in shared register regions called OLB. Driver
+70
drivers/clk/clk-eyeq.c
··· 45 45 #include <linux/types.h> 46 46 47 47 #include <dt-bindings/clock/mobileye,eyeq5-clk.h> 48 + #include <dt-bindings/clock/mobileye,eyeq6lplus-clk.h> 48 49 49 50 /* In frac mode, it enables fractional noise canceling DAC. Else, no function. */ 50 51 #define PCSR0_DAC_EN BIT(0) ··· 572 571 .reset_auxdev_name = "reset", 573 572 }; 574 573 574 + static const struct eqc_pll eqc_eyeq6lplus_early_plls[] = { 575 + { .index = EQ6LPC_PLL_CPU, .name = "pll-cpu", .reg64 = 0x058 }, 576 + }; 577 + 578 + static const struct eqc_pll eqc_eyeq6lplus_plls[] = { 579 + { .index = EQ6LPC_PLL_DDR, .name = "pll-ddr", .reg64 = 0x02C }, 580 + { .index = EQ6LPC_PLL_ACC, .name = "pll-acc", .reg64 = 0x034 }, 581 + { .index = EQ6LPC_PLL_PER, .name = "pll-per", .reg64 = 0x03C }, 582 + { .index = EQ6LPC_PLL_VDI, .name = "pll-vdi", .reg64 = 0x044 }, 583 + }; 584 + 585 + static const struct eqc_fixed_factor eqc_eyeq6lplus_early_fixed_factors[] = { 586 + { EQ6LPC_CPU_OCC, "occ-cpu", 1, 1, EQ6LPC_PLL_CPU }, 587 + }; 588 + 589 + static const struct eqc_fixed_factor eqc_eyeq6lplus_fixed_factors[] = { 590 + { EQ6LPC_DDR_OCC, "occ-ddr", 1, 1, EQ6LPC_PLL_DDR }, 591 + 592 + { EQ6LPC_ACC_VDI, "vdi-div", 1, 10, EQ6LPC_PLL_ACC }, 593 + { EQ6LPC_ACC_OCC, "occ-acc", 1, 1, EQ6LPC_PLL_ACC }, 594 + { EQ6LPC_ACC_FCMU, "fcmu-a-clk", 1, 10, EQ6LPC_ACC_OCC }, 595 + 596 + { EQ6LPC_PER_OCC, "occ-per", 1, 1, EQ6LPC_PLL_PER }, 597 + { EQ6LPC_PER_I2C_SER, "i2c-ser-clk", 1, 10, EQ6LPC_PER_OCC }, 598 + { EQ6LPC_PER_PCLK, "pclk", 1, 4, EQ6LPC_PER_OCC }, 599 + { EQ6LPC_PER_TSU, "tsu-clk", 1, 8, EQ6LPC_PER_OCC }, 600 + { EQ6LPC_PER_OSPI, "ospi-ref-clk", 1, 10, EQ6LPC_PER_OCC }, 601 + { EQ6LPC_PER_GPIO, "gpio-clk", 1, 4, EQ6LPC_PER_OCC }, 602 + { EQ6LPC_PER_TIMER, "timer-clk", 1, 4, EQ6LPC_PER_OCC }, 603 + { EQ6LPC_PER_I2C, "i2c-clk", 1, 4, EQ6LPC_PER_OCC }, 604 + { EQ6LPC_PER_UART, "uart-clk", 1, 4, EQ6LPC_PER_OCC }, 605 + { EQ6LPC_PER_SPI, "spi-clk", 1, 4, EQ6LPC_PER_OCC }, 606 + { EQ6LPC_PER_PERIPH, "periph-clk", 1, 1, EQ6LPC_PER_OCC }, 607 + 608 + { EQ6LPC_VDI_OCC, "occ-vdi", 1, 1, EQ6LPC_PLL_VDI }, 609 + }; 610 + 611 + static const struct eqc_early_match_data eqc_eyeq6lplus_early_match_data __initconst = { 612 + .early_pll_count = ARRAY_SIZE(eqc_eyeq6lplus_early_plls), 613 + .early_plls = eqc_eyeq6lplus_early_plls, 614 + 615 + .early_fixed_factor_count = ARRAY_SIZE(eqc_eyeq6lplus_early_fixed_factors), 616 + .early_fixed_factors = eqc_eyeq6lplus_early_fixed_factors, 617 + 618 + .late_clk_count = ARRAY_SIZE(eqc_eyeq6lplus_plls) + 619 + ARRAY_SIZE(eqc_eyeq6lplus_fixed_factors), 620 + }; 621 + 622 + static const struct eqc_match_data eqc_eyeq6lplus_match_data = { 623 + .pll_count = ARRAY_SIZE(eqc_eyeq6lplus_plls), 624 + .plls = eqc_eyeq6lplus_plls, 625 + 626 + .fixed_factor_count = ARRAY_SIZE(eqc_eyeq6lplus_fixed_factors), 627 + .fixed_factors = eqc_eyeq6lplus_fixed_factors, 628 + 629 + .reset_auxdev_name = "reset", 630 + .pinctrl_auxdev_name = "pinctrl", 631 + 632 + .early_clk_count = ARRAY_SIZE(eqc_eyeq6lplus_early_plls) + 633 + ARRAY_SIZE(eqc_eyeq6lplus_early_fixed_factors), 634 + }; 635 + 575 636 static const struct eqc_match_data eqc_eyeq6h_west_match_data = { 576 637 .reset_auxdev_name = "reset_west", 577 638 }; ··· 735 672 static const struct of_device_id eqc_match_table[] = { 736 673 { .compatible = "mobileye,eyeq5-olb", .data = &eqc_eyeq5_match_data }, 737 674 { .compatible = "mobileye,eyeq6l-olb", .data = &eqc_eyeq6l_match_data }, 675 + { .compatible = "mobileye,eyeq6lplus-olb", .data = &eqc_eyeq6lplus_match_data }, 738 676 { .compatible = "mobileye,eyeq6h-west-olb", .data = &eqc_eyeq6h_west_match_data }, 739 677 { .compatible = "mobileye,eyeq6h-east-olb", .data = &eqc_eyeq6h_east_match_data }, 740 678 { .compatible = "mobileye,eyeq6h-south-olb", .data = &eqc_eyeq6h_south_match_data }, ··· 919 855 } 920 856 CLK_OF_DECLARE_DRIVER(eqc_eyeq6h_west, "mobileye,eyeq6h-west-olb", 921 857 eqc_eyeq6h_west_early_init); 858 + 859 + static void __init eqc_eyeq6lplus_early_init(struct device_node *np) 860 + { 861 + eqc_early_init(np, &eqc_eyeq6lplus_early_match_data); 862 + } 863 + CLK_OF_DECLARE_DRIVER(eqc_eyeq6lplus, "mobileye,eyeq6lplus-olb", eqc_eyeq6lplus_early_init);