rk3288-veyron-analog-audio.dtsi 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Google Veyron (and derivatives) fragment for the max98090 audio
  4. * codec and analog headphone jack.
  5. *
  6. * Copyright 2016 Google, Inc
  7. */
  8. / {
  9. sound {
  10. compatible = "rockchip,rockchip-audio-max98090";
  11. pinctrl-names = "default";
  12. pinctrl-0 = <&mic_det>, <&hp_det>;
  13. rockchip,model = "VEYRON-I2S";
  14. rockchip,i2s-controller = <&i2s>;
  15. rockchip,audio-codec = <&max98090>;
  16. rockchip,hp-det-gpios = <&gpio6 RK_PA5 GPIO_ACTIVE_HIGH>;
  17. rockchip,mic-det-gpios = <&gpio6 RK_PB3 GPIO_ACTIVE_LOW>;
  18. rockchip,headset-codec = <&headsetcodec>;
  19. rockchip,hdmi-codec = <&hdmi>;
  20. };
  21. };
  22. &i2c2 {
  23. max98090: max98090@10 {
  24. compatible = "maxim,max98090";
  25. reg = <0x10>;
  26. interrupt-parent = <&gpio6>;
  27. interrupts = <RK_PA7 IRQ_TYPE_EDGE_FALLING>;
  28. clock-names = "mclk";
  29. clocks = <&cru SCLK_I2S0_OUT>;
  30. pinctrl-names = "default";
  31. pinctrl-0 = <&int_codec>;
  32. };
  33. };
  34. &i2c4 {
  35. headsetcodec: ts3a227e@3b {
  36. compatible = "ti,ts3a227e";
  37. reg = <0x3b>;
  38. interrupt-parent = <&gpio0>;
  39. interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&ts3a227e_int_l>;
  42. ti,micbias = <7>; /* MICBIAS = 2.8V */
  43. };
  44. };
  45. &i2s {
  46. status = "okay";
  47. };
  48. &io_domains {
  49. audio-supply = <&vcc18_codec>;
  50. };
  51. &rk808 {
  52. vcc10-supply = <&vcc33_sys>;
  53. regulators {
  54. vcc18_codec: LDO_REG6 {
  55. regulator-name = "vcc18_codec";
  56. regulator-always-on;
  57. regulator-boot-on;
  58. regulator-min-microvolt = <1800000>;
  59. regulator-max-microvolt = <1800000>;
  60. regulator-state-mem {
  61. regulator-off-in-suspend;
  62. };
  63. };
  64. };
  65. };
  66. &pinctrl {
  67. codec {
  68. hp_det: hp-det {
  69. rockchip,pins = <6 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  70. };
  71. /*
  72. * HACK: We're going to _pull down_ this _active low_ interrupt
  73. * so that it never fires. We don't need this interrupt because
  74. * we've got a ts3a227e chip but the driver requires it.
  75. */
  76. int_codec: int-codec {
  77. rockchip,pins = <6 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
  78. };
  79. mic_det: mic-det {
  80. rockchip,pins = <6 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
  81. };
  82. };
  83. headset {
  84. ts3a227e_int_l: ts3a227e-int-l {
  85. rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  86. };
  87. };
  88. };