allwinner,sun4i-a10-tcon.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/display/allwinner,sun4i-a10-tcon.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Allwinner A10 Timings Controller (TCON)
  7. maintainers:
  8. - Chen-Yu Tsai <wens@csie.org>
  9. - Maxime Ripard <mripard@kernel.org>
  10. description: |
  11. The TCON acts as a timing controller for RGB, LVDS and TV
  12. interfaces.
  13. properties:
  14. "#clock-cells":
  15. const: 0
  16. compatible:
  17. oneOf:
  18. - const: allwinner,sun4i-a10-tcon
  19. - const: allwinner,sun5i-a13-tcon
  20. - const: allwinner,sun6i-a31-tcon
  21. - const: allwinner,sun6i-a31s-tcon
  22. - const: allwinner,sun7i-a20-tcon
  23. - const: allwinner,sun8i-a23-tcon
  24. - const: allwinner,sun8i-a33-tcon
  25. - const: allwinner,sun8i-a83t-tcon-lcd
  26. - const: allwinner,sun8i-a83t-tcon-tv
  27. - const: allwinner,sun8i-r40-tcon-tv
  28. - const: allwinner,sun8i-v3s-tcon
  29. - const: allwinner,sun9i-a80-tcon-lcd
  30. - const: allwinner,sun9i-a80-tcon-tv
  31. - const: allwinner,sun20i-d1-tcon-lcd
  32. - const: allwinner,sun20i-d1-tcon-tv
  33. - items:
  34. - enum:
  35. - allwinner,sun7i-a20-tcon0
  36. - allwinner,sun7i-a20-tcon1
  37. - const: allwinner,sun7i-a20-tcon
  38. - items:
  39. - enum:
  40. - allwinner,sun50i-a64-tcon-lcd
  41. - const: allwinner,sun8i-a83t-tcon-lcd
  42. - items:
  43. - enum:
  44. - allwinner,sun8i-h3-tcon-tv
  45. - allwinner,sun50i-a64-tcon-tv
  46. - const: allwinner,sun8i-a83t-tcon-tv
  47. - items:
  48. - enum:
  49. - allwinner,sun50i-h6-tcon-tv
  50. - const: allwinner,sun8i-r40-tcon-tv
  51. reg:
  52. maxItems: 1
  53. interrupts:
  54. maxItems: 1
  55. clocks:
  56. minItems: 1
  57. maxItems: 4
  58. clock-names:
  59. minItems: 1
  60. maxItems: 4
  61. clock-output-names:
  62. description:
  63. Name of the LCD pixel clock created.
  64. maxItems: 1
  65. dmas:
  66. maxItems: 1
  67. resets:
  68. anyOf:
  69. - items:
  70. - description: TCON Reset Line
  71. - items:
  72. - description: TCON Reset Line
  73. - description: TCON LVDS Reset Line
  74. - items:
  75. - description: TCON Reset Line
  76. - description: TCON eDP Reset Line
  77. - items:
  78. - description: TCON Reset Line
  79. - description: TCON eDP Reset Line
  80. - description: TCON LVDS Reset Line
  81. reset-names:
  82. oneOf:
  83. - const: lcd
  84. - items:
  85. - const: lcd
  86. - const: lvds
  87. - items:
  88. - const: lcd
  89. - const: edp
  90. - items:
  91. - const: lcd
  92. - const: edp
  93. - const: lvds
  94. ports:
  95. $ref: /schemas/graph.yaml#/properties/ports
  96. properties:
  97. port@0:
  98. $ref: /schemas/graph.yaml#/properties/port
  99. description: |
  100. Input endpoints of the controller.
  101. port@1:
  102. $ref: /schemas/graph.yaml#/$defs/port-base
  103. unevaluatedProperties: false
  104. description: |
  105. Output endpoints of the controller.
  106. patternProperties:
  107. "^endpoint(@[0-9])$":
  108. $ref: /schemas/graph.yaml#/$defs/endpoint-base
  109. unevaluatedProperties: false
  110. properties:
  111. allwinner,tcon-channel:
  112. $ref: /schemas/types.yaml#/definitions/uint32
  113. description: |
  114. TCON can have 1 or 2 channels, usually with the
  115. first channel being used for the panels interfaces
  116. (RGB, LVDS, etc.), and the second being used for the
  117. outputs that require another controller (TV Encoder,
  118. HDMI, etc.).
  119. If that property is present, specifies the TCON
  120. channel the endpoint is associated to. If that
  121. property is not present, the endpoint number will be
  122. used as the channel number.
  123. required:
  124. - port@0
  125. - port@1
  126. required:
  127. - compatible
  128. - reg
  129. - interrupts
  130. - clocks
  131. - clock-names
  132. - resets
  133. - ports
  134. additionalProperties: false
  135. allOf:
  136. - if:
  137. properties:
  138. compatible:
  139. contains:
  140. enum:
  141. - allwinner,sun4i-a10-tcon
  142. - allwinner,sun5i-a13-tcon
  143. - allwinner,sun7i-a20-tcon
  144. then:
  145. properties:
  146. clocks:
  147. minItems: 3
  148. clock-names:
  149. items:
  150. - const: ahb
  151. - const: tcon-ch0
  152. - const: tcon-ch1
  153. - if:
  154. properties:
  155. compatible:
  156. contains:
  157. enum:
  158. - allwinner,sun6i-a31-tcon
  159. - allwinner,sun6i-a31s-tcon
  160. then:
  161. properties:
  162. clocks:
  163. minItems: 4
  164. clock-names:
  165. items:
  166. - const: ahb
  167. - const: tcon-ch0
  168. - const: tcon-ch1
  169. - const: lvds-alt
  170. - if:
  171. properties:
  172. compatible:
  173. contains:
  174. enum:
  175. - allwinner,sun8i-a23-tcon
  176. - allwinner,sun8i-a33-tcon
  177. then:
  178. properties:
  179. clocks:
  180. minItems: 3
  181. clock-names:
  182. items:
  183. - const: ahb
  184. - const: tcon-ch0
  185. - const: lvds-alt
  186. - if:
  187. properties:
  188. compatible:
  189. contains:
  190. enum:
  191. - allwinner,sun8i-a83t-tcon-lcd
  192. - allwinner,sun8i-v3s-tcon
  193. - allwinner,sun9i-a80-tcon-lcd
  194. - allwinner,sun20i-d1-tcon-lcd
  195. then:
  196. properties:
  197. clocks:
  198. minItems: 2
  199. clock-names:
  200. items:
  201. - const: ahb
  202. - const: tcon-ch0
  203. - if:
  204. properties:
  205. compatible:
  206. contains:
  207. enum:
  208. - allwinner,sun8i-a83t-tcon-tv
  209. - allwinner,sun8i-r40-tcon-tv
  210. - allwinner,sun9i-a80-tcon-tv
  211. - allwinner,sun20i-d1-tcon-tv
  212. then:
  213. properties:
  214. clocks:
  215. minItems: 2
  216. clock-names:
  217. items:
  218. - const: ahb
  219. - const: tcon-ch1
  220. - if:
  221. properties:
  222. compatible:
  223. contains:
  224. enum:
  225. - allwinner,sun5i-a13-tcon
  226. - allwinner,sun6i-a31-tcon
  227. - allwinner,sun6i-a31s-tcon
  228. - allwinner,sun7i-a20-tcon
  229. - allwinner,sun8i-a23-tcon
  230. - allwinner,sun8i-a33-tcon
  231. - allwinner,sun8i-v3s-tcon
  232. - allwinner,sun9i-a80-tcon-lcd
  233. - allwinner,sun4i-a10-tcon
  234. - allwinner,sun8i-a83t-tcon-lcd
  235. - allwinner,sun20i-d1-tcon-lcd
  236. then:
  237. required:
  238. - "#clock-cells"
  239. - clock-output-names
  240. - if:
  241. properties:
  242. compatible:
  243. contains:
  244. enum:
  245. - allwinner,sun6i-a31-tcon
  246. - allwinner,sun6i-a31s-tcon
  247. - allwinner,sun8i-a23-tcon
  248. - allwinner,sun8i-a33-tcon
  249. - allwinner,sun8i-a83t-tcon-lcd
  250. - allwinner,sun20i-d1-tcon-lcd
  251. then:
  252. properties:
  253. resets:
  254. minItems: 2
  255. reset-names:
  256. items:
  257. - const: lcd
  258. - const: lvds
  259. - if:
  260. properties:
  261. compatible:
  262. contains:
  263. enum:
  264. - allwinner,sun9i-a80-tcon-lcd
  265. then:
  266. properties:
  267. resets:
  268. minItems: 3
  269. reset-names:
  270. items:
  271. - const: lcd
  272. - const: edp
  273. - const: lvds
  274. - if:
  275. properties:
  276. compatible:
  277. contains:
  278. enum:
  279. - allwinner,sun9i-a80-tcon-tv
  280. then:
  281. properties:
  282. resets:
  283. minItems: 2
  284. reset-names:
  285. items:
  286. - const: lcd
  287. - const: edp
  288. - if:
  289. properties:
  290. compatible:
  291. contains:
  292. enum:
  293. - allwinner,sun4i-a10-tcon
  294. - allwinner,sun5i-a13-tcon
  295. - allwinner,sun6i-a31-tcon
  296. - allwinner,sun6i-a31s-tcon
  297. - allwinner,sun7i-a20-tcon
  298. - allwinner,sun8i-a23-tcon
  299. - allwinner,sun8i-a33-tcon
  300. then:
  301. required:
  302. - dmas
  303. examples:
  304. - |
  305. #include <dt-bindings/dma/sun4i-a10.h>
  306. /*
  307. * This comes from the clock/sun4i-a10-ccu.h and
  308. * reset/sun4i-a10-ccu.h headers, but we can't include them since
  309. * it would trigger a bunch of warnings for redefinitions of
  310. * symbols with the other example.
  311. */
  312. #define CLK_AHB_LCD0 56
  313. #define CLK_TCON0_CH0 149
  314. #define CLK_TCON0_CH1 155
  315. #define RST_TCON0 11
  316. lcd-controller@1c0c000 {
  317. compatible = "allwinner,sun4i-a10-tcon";
  318. reg = <0x01c0c000 0x1000>;
  319. interrupts = <44>;
  320. resets = <&ccu RST_TCON0>;
  321. reset-names = "lcd";
  322. clocks = <&ccu CLK_AHB_LCD0>,
  323. <&ccu CLK_TCON0_CH0>,
  324. <&ccu CLK_TCON0_CH1>;
  325. clock-names = "ahb",
  326. "tcon-ch0",
  327. "tcon-ch1";
  328. clock-output-names = "tcon0-pixel-clock";
  329. #clock-cells = <0>;
  330. dmas = <&dma SUN4I_DMA_DEDICATED 14>;
  331. ports {
  332. #address-cells = <1>;
  333. #size-cells = <0>;
  334. port@0 {
  335. #address-cells = <1>;
  336. #size-cells = <0>;
  337. reg = <0>;
  338. endpoint@0 {
  339. reg = <0>;
  340. remote-endpoint = <&be0_out_tcon0>;
  341. };
  342. endpoint@1 {
  343. reg = <1>;
  344. remote-endpoint = <&be1_out_tcon0>;
  345. };
  346. };
  347. port@1 {
  348. #address-cells = <1>;
  349. #size-cells = <0>;
  350. reg = <1>;
  351. endpoint@1 {
  352. reg = <1>;
  353. remote-endpoint = <&hdmi_in_tcon0>;
  354. allwinner,tcon-channel = <1>;
  355. };
  356. };
  357. };
  358. };
  359. #undef CLK_AHB_LCD0
  360. #undef CLK_TCON0_CH0
  361. #undef CLK_TCON0_CH1
  362. #undef RST_TCON0
  363. - |
  364. #include <dt-bindings/interrupt-controller/arm-gic.h>
  365. /*
  366. * This comes from the clock/sun6i-a31-ccu.h and
  367. * reset/sun6i-a31-ccu.h headers, but we can't include them since
  368. * it would trigger a bunch of warnings for redefinitions of
  369. * symbols with the other example.
  370. */
  371. #define CLK_PLL_MIPI 15
  372. #define CLK_AHB1_LCD0 47
  373. #define CLK_LCD0_CH0 127
  374. #define CLK_LCD0_CH1 129
  375. #define RST_AHB1_LCD0 27
  376. #define RST_AHB1_LVDS 41
  377. lcd-controller@1c0c000 {
  378. compatible = "allwinner,sun6i-a31-tcon";
  379. reg = <0x01c0c000 0x1000>;
  380. interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
  381. dmas = <&dma 11>;
  382. resets = <&ccu RST_AHB1_LCD0>, <&ccu RST_AHB1_LVDS>;
  383. reset-names = "lcd", "lvds";
  384. clocks = <&ccu CLK_AHB1_LCD0>,
  385. <&ccu CLK_LCD0_CH0>,
  386. <&ccu CLK_LCD0_CH1>,
  387. <&ccu CLK_PLL_MIPI>;
  388. clock-names = "ahb",
  389. "tcon-ch0",
  390. "tcon-ch1",
  391. "lvds-alt";
  392. clock-output-names = "tcon0-pixel-clock";
  393. #clock-cells = <0>;
  394. ports {
  395. #address-cells = <1>;
  396. #size-cells = <0>;
  397. port@0 {
  398. #address-cells = <1>;
  399. #size-cells = <0>;
  400. reg = <0>;
  401. endpoint@0 {
  402. reg = <0>;
  403. remote-endpoint = <&drc0_out_tcon0>;
  404. };
  405. endpoint@1 {
  406. reg = <1>;
  407. remote-endpoint = <&drc1_out_tcon0>;
  408. };
  409. };
  410. port@1 {
  411. #address-cells = <1>;
  412. #size-cells = <0>;
  413. reg = <1>;
  414. endpoint@1 {
  415. reg = <1>;
  416. remote-endpoint = <&hdmi_in_tcon0>;
  417. allwinner,tcon-channel = <1>;
  418. };
  419. };
  420. };
  421. };
  422. #undef CLK_PLL_MIPI
  423. #undef CLK_AHB1_LCD0
  424. #undef CLK_LCD0_CH0
  425. #undef CLK_LCD0_CH1
  426. #undef RST_AHB1_LCD0
  427. #undef RST_AHB1_LVDS
  428. - |
  429. #include <dt-bindings/interrupt-controller/arm-gic.h>
  430. /*
  431. * This comes from the clock/sun9i-a80-ccu.h and
  432. * reset/sun9i-a80-ccu.h headers, but we can't include them since
  433. * it would trigger a bunch of warnings for redefinitions of
  434. * symbols with the other example.
  435. */
  436. #define CLK_BUS_LCD0 102
  437. #define CLK_LCD0 58
  438. #define RST_BUS_LCD0 22
  439. #define RST_BUS_EDP 24
  440. #define RST_BUS_LVDS 25
  441. lcd-controller@3c00000 {
  442. compatible = "allwinner,sun9i-a80-tcon-lcd";
  443. reg = <0x03c00000 0x10000>;
  444. interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
  445. clocks = <&ccu CLK_BUS_LCD0>, <&ccu CLK_LCD0>;
  446. clock-names = "ahb", "tcon-ch0";
  447. resets = <&ccu RST_BUS_LCD0>, <&ccu RST_BUS_EDP>, <&ccu RST_BUS_LVDS>;
  448. reset-names = "lcd", "edp", "lvds";
  449. clock-output-names = "tcon0-pixel-clock";
  450. #clock-cells = <0>;
  451. ports {
  452. #address-cells = <1>;
  453. #size-cells = <0>;
  454. port@0 {
  455. reg = <0>;
  456. endpoint {
  457. remote-endpoint = <&drc0_out_tcon0>;
  458. };
  459. };
  460. port@1 {
  461. reg = <1>;
  462. };
  463. };
  464. };
  465. #undef CLK_BUS_TCON0
  466. #undef CLK_TCON0
  467. #undef RST_BUS_TCON0
  468. #undef RST_BUS_EDP
  469. #undef RST_BUS_LVDS
  470. - |
  471. #include <dt-bindings/interrupt-controller/arm-gic.h>
  472. /*
  473. * This comes from the clock/sun8i-a83t-ccu.h and
  474. * reset/sun8i-a83t-ccu.h headers, but we can't include them since
  475. * it would trigger a bunch of warnings for redefinitions of
  476. * symbols with the other example.
  477. */
  478. #define CLK_BUS_TCON0 36
  479. #define CLK_TCON0 85
  480. #define RST_BUS_TCON0 22
  481. #define RST_BUS_LVDS 31
  482. lcd-controller@1c0c000 {
  483. compatible = "allwinner,sun8i-a83t-tcon-lcd";
  484. reg = <0x01c0c000 0x1000>;
  485. interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
  486. clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
  487. clock-names = "ahb", "tcon-ch0";
  488. clock-output-names = "tcon-pixel-clock";
  489. #clock-cells = <0>;
  490. resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
  491. reset-names = "lcd", "lvds";
  492. ports {
  493. #address-cells = <1>;
  494. #size-cells = <0>;
  495. port@0 {
  496. #address-cells = <1>;
  497. #size-cells = <0>;
  498. reg = <0>;
  499. endpoint@0 {
  500. reg = <0>;
  501. remote-endpoint = <&mixer0_out_tcon0>;
  502. };
  503. endpoint@1 {
  504. reg = <1>;
  505. remote-endpoint = <&mixer1_out_tcon0>;
  506. };
  507. };
  508. port@1 {
  509. reg = <1>;
  510. };
  511. };
  512. };
  513. #undef CLK_BUS_TCON0
  514. #undef CLK_TCON0
  515. #undef RST_BUS_TCON0
  516. #undef RST_BUS_LVDS
  517. - |
  518. #include <dt-bindings/interrupt-controller/arm-gic.h>
  519. /*
  520. * This comes from the clock/sun8i-r40-ccu.h and
  521. * reset/sun8i-r40-ccu.h headers, but we can't include them since
  522. * it would trigger a bunch of warnings for redefinitions of
  523. * symbols with the other example.
  524. */
  525. #define CLK_BUS_TCON_TV0 73
  526. #define RST_BUS_TCON_TV0 49
  527. tcon_tv0: lcd-controller@1c73000 {
  528. compatible = "allwinner,sun8i-r40-tcon-tv";
  529. reg = <0x01c73000 0x1000>;
  530. interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
  531. clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>;
  532. clock-names = "ahb", "tcon-ch1";
  533. resets = <&ccu RST_BUS_TCON_TV0>;
  534. reset-names = "lcd";
  535. ports {
  536. #address-cells = <1>;
  537. #size-cells = <0>;
  538. port@0 {
  539. #address-cells = <1>;
  540. #size-cells = <0>;
  541. reg = <0>;
  542. endpoint@0 {
  543. reg = <0>;
  544. remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>;
  545. };
  546. endpoint@1 {
  547. reg = <1>;
  548. remote-endpoint = <&tcon_top_mixer1_out_tcon_tv0>;
  549. };
  550. };
  551. tcon_tv0_out: port@1 {
  552. #address-cells = <1>;
  553. #size-cells = <0>;
  554. reg = <1>;
  555. endpoint@1 {
  556. reg = <1>;
  557. remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>;
  558. };
  559. };
  560. };
  561. };
  562. #undef CLK_BUS_TCON_TV0
  563. #undef RST_BUS_TCON_TV0
  564. ...