| // SPDX-License-Identifier: GPL-2.0-only |
| /* |
| * Google GS101 Raven/Oriole common audio device tree source |
| * |
| * Copyright (c) 2020 Google, LLC |
| * https://www.google.com |
| * |
| */ |
| #include <dt-bindings/pinctrl/samsung.h> |
| #include <dt-bindings/gpio/gpio.h> |
| #include <dt-bindings/sound/google-aoc.h> |
| |
| &dai_be_tdm0_rx { |
| codec { |
| sound-dai = <&cs35l41_l 0>, |
| <&cs35l41_r 0>; |
| }; |
| }; |
| |
| &dai_be_tdm0_tx { |
| codec { |
| sound-dai = <&cs35l41_l 0>, |
| <&cs35l41_r 0>; |
| }; |
| }; |
| |
| &aoc_snd_card { |
| clks { |
| sys { |
| sys@cs35l41_l { |
| comp = <&cs35l41_l>; |
| src = "BCLK"; |
| /* clk id */ |
| id = <0>; |
| /* clk source */ |
| srcid = <0>; |
| /* in clk multiple */ |
| in_mul = <1>; |
| /* out clk multiple */ |
| out_mul = <1>; |
| }; |
| |
| sys@cs35l41_r { |
| comp = <&cs35l41_r>; |
| src = "BCLK"; |
| /* clk id */ |
| id = <0>; |
| /* clk source */ |
| srcid = <0>; |
| /* in clk multiple */ |
| in_mul = <1>; |
| /* out clk multiple */ |
| out_mul = <1>; |
| }; |
| }; |
| }; |
| }; |
| |
| /* GPIO_ALIVE */ |
| &pinctrl_0 { |
| cs35l41_r_irq: cs35l41-r-irq { |
| samsung,pins = "gpa9-6"; /* XEINT_26 */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| }; |
| |
| /* GPIO_FAR_ALIVE */ |
| &pinctrl_1 { |
| cs35l41_l_irq: cs35l41-l-irq { |
| samsung,pins = "gpa6-3"; /* XEINT_3 */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| |
| hapt_amp_irq: hapt-amp-irq { |
| samsung,pins = "gpa6-5"; /* XEINT_5 */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| }; |
| |
| /* GPIO_PERIC0 */ |
| &pinctrl_4 { |
| cs35l41_l_rst: cs35l41-l-rst { |
| samsung,pins = "gpp16-3"; /* XAPC_USI8_CTSN_CSN */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; |
| samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| |
| cs35l41_cs2: cs35l41-cs2 { |
| samsung,pins = "gpp1-0"; /* XAPC_GPIO2 */ |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| }; |
| |
| /* GPIO_PERIC1 */ |
| &pinctrl_5 { |
| hapt_amp_rst: hapt-amp-rst { |
| samsung,pins = "gpp24-0"; /* XAPC_GPIO6 */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; |
| samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| |
| hapt_amp_trig: hapt-amp-trig { |
| samsung,pins = "gpp24-3"; /* XAPC_GPIO9 */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; |
| samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| |
| cs35l41_r_rst: cs35l41-r-rst { |
| samsung,pins = "gpp23-7"; /* XAPC_USI12_CTSN_CSN */ |
| samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; |
| samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; |
| samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; |
| samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; |
| }; |
| |
| cs35l41_miso: cs35l41-miso { |
| samsung,pins = "gpp25-2"; /* XAPC_USI13_RTSn_DI */ |
| samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; |
| }; |
| |
| cs35l41_mosi: cs35l41-mosi { |
| samsung,pins = "gpp25-1"; /* XAPC_USI13_TXD_DO_SDA */ |
| samsung,pin-drv = <GS101_PIN_DRV_5_MA>; |
| }; |
| |
| cs35l41_clk: cs35l41-clk { |
| samsung,pins = "gpp25-0"; /* XAPC_USI13_RXD_CLK_SCL */ |
| samsung,pin-drv = <GS101_PIN_DRV_5_MA>; |
| }; |
| }; |
| |
| &hsi2c_8 { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| status = "okay"; |
| |
| pinctrl-names = "default"; |
| pinctrl-0 = <&hsi2c8_bus>; |
| |
| clock-frequency = <400000>; |
| |
| cs40l25a_haptics: cs40l25a@43 { |
| compatible = "cirrus,cs40l25a"; |
| reg = <0x43>; |
| |
| pinctrl-names = "default"; |
| pinctrl-0 = <&hapt_amp_irq &hapt_amp_rst &hapt_amp_trig>; |
| |
| interrupt-parent = <&gpa6>; |
| interrupts = <5 0 0>; |
| |
| reset-gpios = <&gpp24 0 0>; |
| |
| async-suspend; |
| cirrus,fw-id-remap = <0x1400CB>; |
| cirrus,boost-ind-nanohenry = <1000>; |
| cirrus,boost-cap-microfarad = <4>; |
| cirrus,boost-ipk-milliamp = <4500>; |
| cirrus,boost-ctl-millivolt = <10000>; /* 10V */ |
| cirrus,boost-ovp-millivolt = <12000>; /* 12V */ |
| cirrus,f0-default = <2514000>; /* 153 Hz */ |
| cirrus,f0-min = <2293760>; /* 140 Hz */ |
| cirrus,f0-max = <2703360>; /* 165 Hz */ |
| cirrus,redc-comp-disable = <1>; /* disabling ReDC clk comp */ |
| cirrus,redc-default = <327728>; /* 14.6446 Ohm */ |
| cirrus,redc-min = <223786>; /* 10 Ohm */ |
| cirrus,redc-max = <335680>; /* 15 Ohm */ |
| cirrus,gpio1-rise-index = <2>; /* 100% HEAVY_CLICK */ |
| cirrus,gpio1-fall-index = <1>; /* 75% HEAVY_CLICK */ |
| cirrus,gpio1-fall-timeout = <47278>; /* 985 ms */ |
| cirrus,gpio1-mode = <2>; /* enabled only in suspend mode */ |
| cirrus,hiber-enable; /* enable hibernation mode in suspend mode */ |
| cirrus,refclk-gpio2 = <1>; /* set GPIO2 as REFCLK */ |
| cirrus,asp-bclk-freq-hz = <6144000>; |
| cirrus,asp-bclk-inv; |
| cirrus,asp-fmt = <0>; |
| cirrus,asp-slot-num = <2>; |
| cirrus,asp-slot-width = <32>; |
| cirrus,asp-samp-width = <24>; |
| cirrus,dcm-disable; /* disable DCM automatic low power mode */ |
| |
| status = "okay"; |
| }; |
| }; |
| |
| &spi_13 { |
| /* XAPC_USI13 */ |
| #address-cells = <1>; |
| #size-cells = <0>; |
| status = "okay"; |
| |
| pinctrl-names = "default"; |
| pinctrl-0 = <&spi13_bus &spi13_cs_func &cs35l41_cs2 |
| &cs35l41_miso &cs35l41_mosi &cs35l41_clk>; |
| cs-gpios = <&gpp25 3 GPIO_ACTIVE_HIGH>, <&gpp1 0 GPIO_ACTIVE_HIGH>; |
| |
| cs35l41_l: cs35l41@0 { |
| #sound-dai-cells = <1>; |
| compatible = "cirrus,cs35l41"; |
| spi-max-frequency = <25000000>; |
| reg = <0>; |
| |
| status = "okay"; |
| |
| pinctrl-names = "default"; |
| pinctrl-0 = <&cs35l41_l_irq &cs35l41_l_rst>; |
| |
| interrupt-parent = <&gpa6>; |
| interrupts = <3 0 0>; |
| |
| reset-gpios = <&gpp16 3 0>; |
| |
| VA-supply = <&s_bucka_reg>; |
| VP-supply = <&V_SYS_dummy>; |
| |
| cirrus,boost-peak-milliamp = <3500>; |
| cirrus,boost-ind-nanohenry = <1000>; |
| cirrus,boost-cap-microfarad = <30>; |
| |
| cirrus,asp-sdout-hiz = <3>; |
| cirrus,tuning-has-prefix; |
| cirrus,left-channel-amp; |
| cirrus,hw-noise-gate-select = <63>; |
| |
| cirrus,gpio-config2 { |
| cirrus,gpio-src-select = <0x5>; |
| cirrus,gpio-output-enable; |
| }; |
| |
| controller-data { |
| cs-gpio = <&gpp25 3 GPIO_ACTIVE_HIGH>; |
| samsung,spi-feedback-delay = <1>; |
| /* SET SPI CS CONTROL TO AUTOMATIC */ |
| samsung,spi-chip-select-mode = <1>; |
| }; |
| }; |
| |
| |
| cs35l41_r: cs35l41@1 { |
| #sound-dai-cells = <1>; |
| sound-name-prefix = "R"; |
| compatible = "cirrus,cs35l41"; |
| spi-max-frequency = <25000000>; |
| reg = <1>; |
| |
| status = "okay"; |
| |
| pinctrl-names = "default"; |
| pinctrl-0 = <&cs35l41_r_irq &cs35l41_r_rst>; |
| |
| interrupt-parent = <&gpa9>; |
| interrupts = <6 0 0>; |
| |
| reset-gpios = <&gpp23 7 0>; |
| |
| VA-supply = <&s_bucka_reg>; |
| VP-supply = <&V_SYS_dummy>; |
| |
| cirrus,boost-peak-milliamp = <3500>; |
| cirrus,boost-ind-nanohenry = <1000>; |
| cirrus,boost-cap-microfarad = <30>; |
| |
| cirrus,asp-sdout-hiz = <3>; |
| cirrus,tuning-has-prefix; |
| cirrus,left-channel-amp; |
| cirrus,hw-noise-gate-select = <63>; |
| |
| cirrus,gpio-config2 { |
| cirrus,gpio-src-select = <0x5>; |
| cirrus,gpio-output-enable; |
| }; |
| |
| controller-data { |
| cs-gpio =<&gpp1 0 GPIO_ACTIVE_HIGH>; |
| samsung,spi-feedback-delay = <1>; |
| /* SET SPI CS CONTROL TO AUTOMATIC */ |
| samsung,spi-chip-select-mode = <1>; |
| }; |
| }; |
| }; |
| |
| /* GSA controls MIC power on this platform */ |
| &m_ldo20_reg { |
| regulator-initial-mode = <1>; /* GPIO_CONTROL */ |
| }; |