A compound of formula or a pharmaceutically acceptable salt thereof, wherein: R 1 is, at each occurrence, independently selected from halogen, cyano, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, halo-C 1 -C 6 -alkyl, and halo-C 1 -C 6 -alkoxy; R 2, R 3, R 4, R 5 and R 6 are each independently selected from hydrogen, halogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, cyano, halo-C 1 -C 6 -alkyl, cyano-C 1 -C 6 -alkyl, (C 1 -C 6 -alkyl) 2 N-, halo-C 1 -C 6 -alkoxy, cyano-C 1 -C 6 -alkoxy, C 1 -C 6 -alkoxy-C 1 -C 6 -alkoxy-, (C 1 -C 6 -alkyl)zN-C -, and carbamoyl-C 1 -C 6 -alkoxy; R 7 is selected from hydrogen, C 1 -C 6 -alkyl, and halo-C 1 -C 6 -alkyl; R 8 is selected from C 1 -C 6 -alkyl, amino-C 1 -C 6 -alkyl, amino-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, amino-C 1 -C 6 -alkyl-C -NH-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-C -NH-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-C -NH-C 1 -C 6 -alkyl-, and a group R 9 is selected from hydrogen and C 1 -C 6 -alkyl; R 10 is selected from halogen, cyano, amino, hydroxy, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, halo-C 1 -C 6 -alkyl, halo-C 1 -C 6 -alkoxy, amino-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkyl-C -, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-C -, amino-C 1 -C 6 -alkyl-NH-C -, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, hydroxy-C 1 -C 6 -alkyl, and a group R 11 is selected from halogen, cyano, amino, hydroxy, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, halo-C 1 -C 6 -alkyl, halo-C 1 -C 6 -alkoxy, amino-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkyl-C -, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-C -, amino-C 1 -C 6 -alkyl-NH-C -, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, and hydroxy-C 1 -C 6 -alkyl; A and B are each independently selected from 3- to 14-membered heterocyclyl, C 3 -C 10 -cycloalkyl, 5- to 14-membered heteroaryl, and C 6 -C 10 -aryl; L 1 is selected from a covalent bond, carbonyl, -NH-C -, C 1 -C 6 -alkyl, -C -NH-C 1 -C 6 -alkyl-, -C 1 -C 6 -alkyl-NH-C -, and -NH-C -NH-C 1 -C 6 -alkyl-; L 2 is selected from a covalent bond, carbonyl, -NH-C -, -C -NH-, C 1 -C 6 -alkyl, -C -NH-C 1 -C 6 -alkyl-, -C 1 -C 6 -alkyl-NH-C -, and -NH-C -NH-C 1 -C 6 -alkyl-; p is selected from 0, 1, 2, 3, or 4; and q and r are independently selected from 0, 1, 2, and 3. R 1 is, at each occurrence, independently selected from halogen, cyano, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, halo-C 1 -C 6 -alkyl, and halo-C 1 -C 6 -alkoxy; R 2, R 3, R 4, R 5 and R 6 are each independently selected from hydrogen, halogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, cyano, halo-C 1 -C 6 -alkyl, cyano-C 1 -C 6 -alkyl, (C 1 -C 6 -alkyl) 2 N-, halo-C 1 -C 6 -alkoxy, cyano-C 1 -C 6 -alkoxy, C 1 -C 6 -alkoxy-C 1 -C 6 -alkoxy-, (C 1 -C 6 -alkyl)zN-C -, and carbamoyl-C 1 -C 6 -alkoxy; R 7 is selected from hydrogen, C 1 -C 6 -alkyl, and halo-C 1 -C 6 -alkyl; R 8 is selected from C 1 -C 6 -alkyl, amino-C 1 -C 6 -alkyl, amino-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, amino-C 1 -C 6 -alkyl-C -NH-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-C -NH-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-C -NH-C 1 -C 6 -alkyl-, and a group R 9 is selected from hydrogen and C 1 -C 6 -alkyl; R 10 is selected from halogen, cyano, amino, hydroxy, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, halo-C 1 -C 6 -alkyl, halo-C 1 -C 6 -alkoxy, amino-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkyl-C -, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-C -, amino-C 1 -C 6 -alkyl-NH-C -, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, hydroxy-C 1 -C 6 -alkyl, and a group R 11 is selected from halogen, cyano, amino, hydroxy, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy, halo-C 1 -C 6 -alkyl, halo-C 1 -C 6 -alkoxy, amino-C 1 -C 6 -alkyl-, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-, amino-C 1 -C 6 -alkyl-C -, C 1 -C 6 -alkyl-NH-C 1 -C 6 -alkyl-C -, (C 1 -C 6 -alkyl) 2 N-C 1 -C 6 -alkyl-C -, amino-C 1 -C 6 -alkyl-NH-C -, amino-C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl-C -, and hydroxy-C 1 -C 6 -alkyl; A and B are each independently selected from 3- to 14-membered heterocyclyl, C 3 -C 10 -cycloalkyl, 5- to 14-membered heteroaryl, and C 6 -C 10 -aryl; L 1 is selected from a covalent bond, carbonyl, -NH-C -, C 1 -C 6 -alkyl, -C -NH-C 1 -C 6 -alkyl-, -C 1 -C 6 -alkyl-NH-C -, and -NH-C -NH-C 1 -C 6 -alkyl-; L 2 is selected from a covalent bond, carbonyl, -NH-C -, -C -NH-, C 1 -C 6 -alkyl, -C -NH-C 1 -C 6 -alkyl-, -C 1 -C 6 -alkyl-NH-C -, and -NH-C -NH-C 1 -C 6 -alkyl-; p is selected from 0, 1, 2, 3, or 4; and q and r are independently selected from 0, 1, 2, and 3.