coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chip.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <acpi/acpi_device.h>
4 
5 #define CS35L53_MAX_GPIOS 2
6 
10 };
11 
17 };
18 
24 };
25 
31 };
32 
40 };
41 
42 /*
43  * Cirrus Logic CS35L53 Audio Codec devicetree bindings
44  * linux/Documentation/devicetree/bindings/sound/cirrus,cs35l53.yaml
45  */
47  const char *name; /* ACPI Device Name */
48 
49  const char *sub; /* SUB ID to uniquely identify system */
50 
51  /* Interrupt configuration */
52  struct acpi_irq irq;
53 
54  /* Use GPIO based interrupt instead of PIRQ */
55  struct acpi_gpio irq_gpio;
56 
57  /* Use GPIO based reset gpio */
58  struct acpi_gpio reset_gpio;
59 
60  /* I2C Bus Frequency in Hertz (default 400kHz) */
61  unsigned int bus_speed;
62 
63  /* Define cs35l53 parameters */
64  /*
65  * cirrus,boost-type : Configures the type of Boost being used.
66  * Internal boost requires boost-peak-milliamp, boost-ind-nanohenry and
67  * boost-cap-microfarad.
68  * External Boost must have GPIO1 as GPIO output. GPIO1 will be set high to
69  * enable boost voltage.
70  */
72 
73  /*
74  * cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
75  * Configures the peak current by monitoring the current through the boost FET.
76  * Range starts at 1600 mA and goes to a maximum of 4500 mA with increments
77  * of 50 mA. See section 4.3.6 of the datasheet for details.
78  */
79  unsigned int boost_peak_milliamp;
80 
81  /*
82  * cirrus,boost-ind-nanohenry : Boost inductor value, expressed in nH. Valid
83  * values include 1000, 1200, 1500 and 2200.
84  */
86 
87  /*
88  * cirrus,boost-cap-microfarad : Total equivalent boost capacitance on the VBST
89  * and VAMP pins, derated at 11 volts DC. The value must be rounded to the
90  * nearest integer and expressed in uF.
91  */
92  unsigned int boost_cap_microfarad;
93 
94  /*
95  * cirrus,asp-sdout-hiz : Audio serial port SDOUT Hi-Z control. Sets the Hi-Z
96  * configuration for SDOUT pin of amplifier.
97  * 0 = Logic 0 during unused slots, and while all transmit channels disabled
98  * 1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled
99  * 2 = Logic 0 during unused slots, but Hi-Z while all transmit channels disabled
100  * 3 = Hi-Z during unused slots and while all transmit channels disabled
101  */
103 
104  /*
105  * cirrus,gpio1-polarity-invert : Boolean which specifies whether the GPIO1
106  * level is inverted.
107  */
109 
110  /*
111  * cirrus,gpio2-polarity-invert : Boolean which specifies whether the GPIO2
112  * level is inverted.
113  */
115 
116  /*
117  * cirrus,gpio1-output-enable : Boolean which specifies whether the GPIO1 pin
118  * is configured as an output.
119  */
121 
122  /*
123  * cirrus,gpio2-output-enable : Boolean which specifies whether the GPIO2 pin
124  * is configured as an output.
125  */
127 
128  /*
129  * cirrus,gpio1-src-select : Configures the function of the GPIO1 pin.
130  * GPIO1:
131  * 0 = High Impedance (Default)
132  * 1 = GPIO
133  * 2 = Sync
134  * 3 = MCLK input
135  */
137 
138  /*
139  * cirrus,gpio2-src-select : Configures the function of the GPIO2 pin.
140  * GPIO2:
141  * 0 = High Impedance (Default)
142  * 1 = GPIO
143  * 2 = Open Drain INTB
144  * 3 = MCLK input
145  * 4 = Push-pull INTB (active low)
146  * 5 = Push-pull INT (active high)
147  */
149 };
cs35l53_boost_ind_nanohenrys
Definition: chip.h:12
@ BOOST_IND_2200_NH
Definition: chip.h:16
@ BOOST_IND_1000_NH
Definition: chip.h:13
@ BOOST_IND_1200_NH
Definition: chip.h:14
@ BOOST_IND_1500_NH
Definition: chip.h:15
cs35l53_gpio2_src
Definition: chip.h:33
@ GPIO2_SRC_GPIO
Definition: chip.h:35
@ GPIO2_SRC_PUSH_PULL_INTB
Definition: chip.h:38
@ GPIO2_SRC_HIGH_IMPEDANCE
Definition: chip.h:34
@ GPIO2_SRC_OPEN_DRAIN
Definition: chip.h:36
@ GPIO2_SRC_MCLK_INPUT
Definition: chip.h:37
@ GPIO2_SRC_PUSH_PULL_INT
Definition: chip.h:39
cs35l53_gpio1_src
Definition: chip.h:26
@ GPIO1_SRC_HIGH_IMPEDANCE
Definition: chip.h:27
@ GPIO1_SRC_MCLK_INPUT
Definition: chip.h:30
@ GPIO1_SRC_GPIO
Definition: chip.h:28
@ GPIO1_SRC_SYNC
Definition: chip.h:29
cs35l53_asp_sdout_hiz
Definition: chip.h:19
@ ASP_SDOUT_LOGIC0_UNUSED_HIZ_DISABLED
Definition: chip.h:22
@ ASP_SDOUT_HIZ_UNUSED_LOGIC0_DISABLED
Definition: chip.h:21
@ ASP_SDOUT_HIZ_UNUSED_HIZ_DISABLED
Definition: chip.h:23
@ ASP_SDOUT_LOGIC0_UNUSED_LOGIC0_DISABLED
Definition: chip.h:20
cs35l53_boost_type
Definition: chip.h:7
@ EXTERNAL_BOOST
Definition: chip.h:9
@ INTERNAL_BOOST
Definition: chip.h:8
enum cs35l53_gpio2_src gpio2_src_select
Definition: chip.h:148
struct acpi_irq irq
Definition: chip.h:52
enum cs35l53_gpio1_src gpio1_src_select
Definition: chip.h:136
enum cs35l53_asp_sdout_hiz asp_sdout_hiz
Definition: chip.h:102
unsigned int boost_cap_microfarad
Definition: chip.h:92
enum cs35l53_boost_type boost_type
Definition: chip.h:71
unsigned int bus_speed
Definition: chip.h:61
const char * sub
Definition: chip.h:49
const char * name
Definition: chip.h:47
struct acpi_gpio irq_gpio
Definition: chip.h:55
struct acpi_gpio reset_gpio
Definition: chip.h:58
enum cs35l53_boost_ind_nanohenrys boost_ind_nanohenry
Definition: chip.h:85
unsigned int boost_peak_milliamp
Definition: chip.h:79