Skip to content

Commit 3ceeda1

Browse files
committed
Merge remote-tracking branches 'asoc/topic/cs53l30', 'asoc/topic/cygnus', 'asoc/topic/da7219' and 'asoc/topic/davinci' into asoc-next
5 parents 5600eab + 1708796 + 1200a7d + a01b893 + 272ee03 commit 3ceeda1

File tree

19 files changed

+4391
-77
lines changed

19 files changed

+4391
-77
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
BROADCOM Cygnus Audio I2S/TDM/SPDIF controller
2+
3+
Required properties:
4+
- compatible : "brcm,cygnus-audio"
5+
- #address-cells: 32bit valued, 1 cell.
6+
- #size-cells: 32bit valued, 0 cell.
7+
- reg : Should contain audio registers location and length
8+
- reg-names: names of the registers listed in "reg" property
9+
Valid names are "aud" and "i2s_in". "aud" contains a
10+
set of DMA, I2S_OUT and SPDIF registers. "i2s_in" contains
11+
a set of I2S_IN registers.
12+
- clocks: PLL and leaf clocks used by audio ports
13+
- assigned-clocks: PLL and leaf clocks
14+
- assigned-clock-parents: parent clocks of the assigned clocks
15+
(usually the PLL)
16+
- assigned-clock-rates: List of clock frequencies of the
17+
assigned clocks
18+
- clock-names: names of 3 leaf clocks used by audio ports
19+
Valid names are "ch0_audio", "ch1_audio", "ch2_audio"
20+
- interrupts: audio DMA interrupt number
21+
22+
SSP Subnode properties:
23+
- reg: The index of ssp port interface to use
24+
Valid value are 0, 1, 2, or 3 (for spdif)
25+
26+
Example:
27+
cygnus_audio: audio@180ae000 {
28+
compatible = "brcm,cygnus-audio";
29+
#address-cells = <1>;
30+
#size-cells = <0>;
31+
reg = <0x180ae000 0xafd>, <0x180aec00 0x1f8>;
32+
reg-names = "aud", "i2s_in";
33+
clocks = <&audiopll BCM_CYGNUS_AUDIOPLL_CH0>,
34+
<&audiopll BCM_CYGNUS_AUDIOPLL_CH1>,
35+
<&audiopll BCM_CYGNUS_AUDIOPLL_CH2>;
36+
assigned-clocks = <&audiopll BCM_CYGNUS_AUDIOPLL>,
37+
<&audiopll BCM_CYGNUS_AUDIOPLL_CH0>,
38+
<&audiopll BCM_CYGNUS_AUDIOPLL_CH1>,
39+
<&audiopll BCM_CYGNUS_AUDIOPLL_CH2>;
40+
assigned-clock-parents = <&audiopll BCM_CYGNUS_AUDIOPLL>;
41+
assigned-clock-rates = <1769470191>,
42+
<0>,
43+
<0>,
44+
<0>;
45+
clock-names = "ch0_audio", "ch1_audio", "ch2_audio";
46+
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
47+
48+
ssp0: ssp_port@0 {
49+
reg = <0>;
50+
status = "okay";
51+
};
52+
53+
ssp1: ssp_port@1 {
54+
reg = <1>;
55+
status = "disabled";
56+
};
57+
58+
ssp2: ssp_port@2 {
59+
reg = <2>;
60+
status = "disabled";
61+
};
62+
63+
spdif: spdif_port@3 {
64+
reg = <3>;
65+
status = "disabled";
66+
};
67+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
CS53L30 audio CODEC
2+
3+
Required properties:
4+
5+
- compatible : "cirrus,cs53l30"
6+
7+
- reg : the I2C address of the device
8+
9+
- VA-supply, VP-supply : power supplies for the device,
10+
as covered in Documentation/devicetree/bindings/regulator/regulator.txt.
11+
12+
Optional properties:
13+
14+
- reset-gpios : a GPIO spec for the reset pin.
15+
16+
- mute-gpios : a GPIO spec for the MUTE pin. The active state can be either
17+
GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW, which would be handled
18+
by the driver automatically.
19+
20+
- cirrus,micbias-lvl : Set the output voltage level on the MICBIAS Pin.
21+
0 = Hi-Z
22+
1 = 1.80 V
23+
2 = 2.75 V
24+
25+
- cirrus,use-sdout2 : This is a boolean property. If present, it indicates
26+
the hardware design connects both SDOUT1 and SDOUT2
27+
pins to output data. Otherwise, it indicates that
28+
only SDOUT1 is connected for data output.
29+
* CS53l30 supports 4-channel data output in the same
30+
* frame using two different ways:
31+
* 1) Normal I2S mode on two data pins -- each SDOUT
32+
* carries 2-channel data in the same time.
33+
* 2) TDM mode on one signle data pin -- SDOUT1 carries
34+
* 4-channel data per frame.
35+
36+
Example:
37+
38+
codec: cs53l30@48 {
39+
compatible = "cirrus,cs53l30";
40+
reg = <0x48>;
41+
reset-gpios = <&gpio 54 0>;
42+
VA-supply = <&cs53l30_va>;
43+
VP-supply = <&cs53l30_vp>;
44+
};

drivers/base/property.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,34 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev,
887887
}
888888
EXPORT_SYMBOL_GPL(device_get_next_child_node);
889889

890+
/**
891+
* device_get_named_child_node - Return first matching named child node handle
892+
* @dev: Device to find the named child node for.
893+
* @childname: String to match child node name against.
894+
*/
895+
struct fwnode_handle *device_get_named_child_node(struct device *dev,
896+
const char *childname)
897+
{
898+
struct fwnode_handle *child;
899+
900+
/*
901+
* Find first matching named child node of this device.
902+
* For ACPI this will be a data only sub-node.
903+
*/
904+
device_for_each_child_node(dev, child) {
905+
if (is_of_node(child)) {
906+
if (!of_node_cmp(to_of_node(child)->name, childname))
907+
return child;
908+
} else if (is_acpi_data_node(child)) {
909+
if (acpi_data_node_match(child, childname))
910+
return child;
911+
}
912+
}
913+
914+
return NULL;
915+
}
916+
EXPORT_SYMBOL_GPL(device_get_named_child_node);
917+
890918
/**
891919
* fwnode_handle_put - Drop reference to a device node
892920
* @fwnode: Pointer to the device node to drop the reference to.

include/acpi/acpi_bus.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,13 @@ static inline struct acpi_data_node *to_acpi_data_node(struct fwnode_handle *fwn
420420
container_of(fwnode, struct acpi_data_node, fwnode) : NULL;
421421
}
422422

423+
static inline bool acpi_data_node_match(struct fwnode_handle *fwnode,
424+
const char *name)
425+
{
426+
return is_acpi_data_node(fwnode) ?
427+
(!strcmp(to_acpi_data_node(fwnode)->name, name)) : false;
428+
}
429+
423430
static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev)
424431
{
425432
return &adev->fwnode;

include/linux/acpi.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,12 @@ static inline struct acpi_data_node *to_acpi_data_node(struct fwnode_handle *fwn
568568
return NULL;
569569
}
570570

571+
static inline bool acpi_data_node_match(struct fwnode_handle *fwnode,
572+
const char *name)
573+
{
574+
return false;
575+
}
576+
571577
static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev)
572578
{
573579
return NULL;

include/linux/of.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
238238
#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
239239
#endif
240240

241-
/* Default string compare functions, Allow arch asm/prom.h to override */
242-
#if !defined(of_compat_cmp)
243-
#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
244-
#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
245-
#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
246-
#endif
247-
248241
#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
249242
#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
250243

@@ -726,6 +719,13 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
726719
#define of_match_node(_matches, _node) NULL
727720
#endif /* CONFIG_OF */
728721

722+
/* Default string compare functions, Allow arch asm/prom.h to override */
723+
#if !defined(of_compat_cmp)
724+
#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
725+
#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
726+
#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
727+
#endif
728+
729729
#if defined(CONFIG_OF) && defined(CONFIG_NUMA)
730730
extern int of_node_to_nid(struct device_node *np);
731731
#else

include/linux/property.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev,
7777
for (child = device_get_next_child_node(dev, NULL); child; \
7878
child = device_get_next_child_node(dev, child))
7979

80+
struct fwnode_handle *device_get_named_child_node(struct device *dev,
81+
const char *childname);
82+
8083
void fwnode_handle_put(struct fwnode_handle *fwnode);
8184

8285
unsigned int device_get_child_node_count(struct device *dev);

sound/soc/bcm/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ config SND_BCM2835_SOC_I2S
77
Say Y or M if you want to add support for codecs attached to
88
the BCM2835 I2S interface. You will also need
99
to select the audio interfaces to support below.
10+
11+
config SND_SOC_CYGNUS
12+
tristate "SoC platform audio for Broadcom Cygnus chips"
13+
depends on ARCH_BCM_CYGNUS || COMPILE_TEST
14+
help
15+
Say Y if you want to add support for ASoC audio on Broadcom
16+
Cygnus chips (bcm958300, bcm958305, bcm911360)
17+
18+
If you don't know what to do here, say N.

sound/soc/bcm/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o
33

44
obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o
55

6+
# CYGNUS Platform Support
7+
snd-soc-cygnus-objs := cygnus-pcm.o cygnus-ssp.o
8+
9+
obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o
10+

0 commit comments

Comments
 (0)