You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "Quite a lot of activity in SPI this cycle, almost all of it in drivers with a few minor improvements and tweaks in the core. - Updates to pxa2xx to support Intel Broxton and multiple chip selects. - Support for big endian in the bcm63xx driver. - Multiple slave support for the mt8173 - New driver for the auxiliary SPI controller in bcm2835 SoCs. - Support for Layerscale SoCs in the Freescale DSPI driver" * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits) spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI spi: pxa2xx: Add support for Intel Broxton spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals spi: pxa2xx: Add output control for multiple Intel LPSS chip selects spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific spi: Add DSPI support for layerscape family spi: ti-qspi: improve ->remove() callback spi/spi-xilinx: Fix race condition on last word read spi: Drop owner assignment from spi_drivers spi: Add THIS_MODULE to spi_driver in SPI core spi: Setup the master controller driver before setting the chipselect spi: dw: replace magic constant by DW_SPI_DR spi: mediatek: mt8173 spi multiple devices support spi: mediatek: handle controller_data in mtk_spi_setup spi: mediatek: remove mtk_spi_config spi: mediatek: Update document devicetree bindings to support multiple devices spi: fix kernel-doc warnings about missing return desc in spi.c spi: fix kernel-doc warnings about missing return desc in spi.h spi: pxa2xx: Align a few defines spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select ...
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
Broadcom BCM2835 auxiliar SPI1/2 controller
|
||||
|
||||
The BCM2835 contains two forms of SPI master controller, one known simply as
|
||||
SPI0, and the other known as the "Universal SPI Master"; part of the
|
||||
auxiliary block. This binding applies to the SPI1/2 controller.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "brcm,bcm2835-aux-spi".
|
||||
- reg: Should contain register location and length for the spi block
|
||||
- interrupts: Should contain shared interrupt of the aux block
|
||||
- clocks: The clock feeding the SPI controller - needs to
|
||||
point to the auxiliar clock driver of the bcm2835,
|
||||
as this clock will enable the output gate for the specific
|
||||
clock.
|
||||
- cs-gpios: the cs-gpios (native cs is NOT supported)
|
||||
see also spi-bus.txt
|
||||
|
||||
Example:
|
||||
|
||||
spi1@7e215080 {
|
||||
compatible = "brcm,bcm2835-aux-spi";
|
||||
reg = <0x7e215080 0x40>;
|
||||
interrupts = <1 29>;
|
||||
clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
cs-gpios = <&gpio 18>, <&gpio 17>, <&gpio 16>;
|
||||
};
|
||||
|
||||
spi2@7e2150c0 {
|
||||
compatible = "brcm,bcm2835-aux-spi";
|
||||
reg = <0x7e2150c0 0x40>;
|
||||
interrupts = <1 29>;
|
||||
clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
cs-gpios = <&gpio 43>, <&gpio 44>, <&gpio 45>;
|
||||
};
|
||||
@@ -29,8 +29,11 @@ Required properties:
|
||||
muxes clock, and "spi-clk" for the clock gate.
|
||||
|
||||
Optional properties:
|
||||
-cs-gpios: see spi-bus.txt, only required for MT8173.
|
||||
|
||||
- mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi
|
||||
controller used, this value should be 0~3, only required for MT8173.
|
||||
controller used. This is a array, the element value should be 0~3,
|
||||
only required for MT8173.
|
||||
0: specify GPIO69,70,71,72 for spi pins.
|
||||
1: specify GPIO102,103,104,105 for spi pins.
|
||||
2: specify GPIO128,129,130,131 for spi pins.
|
||||
@@ -49,7 +52,7 @@ spi: spi@1100a000 {
|
||||
<&topckgen CLK_TOP_SPI_SEL>,
|
||||
<&pericfg CLK_PERI_SPI0>;
|
||||
clock-names = "parent-clk", "sel-clk", "spi-clk";
|
||||
|
||||
mediatek,pad-select = <0>;
|
||||
cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>;
|
||||
mediatek,pad-select = <1>, <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -264,7 +264,6 @@ static const struct of_device_id pl022_dummy_dt_match[] = {
|
||||
static struct spi_driver pl022_dummy_driver = {
|
||||
.driver = {
|
||||
.name = "spi-dummy",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = pl022_dummy_dt_match,
|
||||
},
|
||||
.probe = pl022_dummy_probe,
|
||||
|
||||
@@ -18,29 +18,6 @@
|
||||
#include <bcm63xx_dev_spi.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
|
||||
/*
|
||||
* register offsets
|
||||
*/
|
||||
static const unsigned long bcm6348_regs_spi[] = {
|
||||
__GEN_SPI_REGS_TABLE(6348)
|
||||
};
|
||||
|
||||
static const unsigned long bcm6358_regs_spi[] = {
|
||||
__GEN_SPI_REGS_TABLE(6358)
|
||||
};
|
||||
|
||||
const unsigned long *bcm63xx_regs_spi;
|
||||
EXPORT_SYMBOL(bcm63xx_regs_spi);
|
||||
|
||||
static __init void bcm63xx_spi_regs_init(void)
|
||||
{
|
||||
if (BCMCPU_IS_6338() || BCMCPU_IS_6348())
|
||||
bcm63xx_regs_spi = bcm6348_regs_spi;
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358() ||
|
||||
BCMCPU_IS_6362() || BCMCPU_IS_6368())
|
||||
bcm63xx_regs_spi = bcm6358_regs_spi;
|
||||
}
|
||||
|
||||
static struct resource spi_resources[] = {
|
||||
{
|
||||
.start = -1, /* filled at runtime */
|
||||
@@ -53,19 +30,10 @@ static struct resource spi_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct bcm63xx_spi_pdata spi_pdata = {
|
||||
.bus_num = 0,
|
||||
.num_chipselect = 8,
|
||||
};
|
||||
|
||||
static struct platform_device bcm63xx_spi_device = {
|
||||
.name = "bcm63xx-spi",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(spi_resources),
|
||||
.resource = spi_resources,
|
||||
.dev = {
|
||||
.platform_data = &spi_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
int __init bcm63xx_spi_register(void)
|
||||
@@ -78,21 +46,15 @@ int __init bcm63xx_spi_register(void)
|
||||
spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI);
|
||||
|
||||
if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
|
||||
bcm63xx_spi_device.name = "bcm6348-spi",
|
||||
spi_resources[0].end += BCM_6348_RSET_SPI_SIZE - 1;
|
||||
spi_pdata.fifo_size = SPI_6348_MSG_DATA_SIZE;
|
||||
spi_pdata.msg_type_shift = SPI_6348_MSG_TYPE_SHIFT;
|
||||
spi_pdata.msg_ctl_width = SPI_6348_MSG_CTL_WIDTH;
|
||||
}
|
||||
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6362() ||
|
||||
BCMCPU_IS_6368()) {
|
||||
bcm63xx_spi_device.name = "bcm6358-spi",
|
||||
spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1;
|
||||
spi_pdata.fifo_size = SPI_6358_MSG_DATA_SIZE;
|
||||
spi_pdata.msg_type_shift = SPI_6358_MSG_TYPE_SHIFT;
|
||||
spi_pdata.msg_ctl_width = SPI_6358_MSG_CTL_WIDTH;
|
||||
}
|
||||
|
||||
bcm63xx_spi_regs_init();
|
||||
|
||||
return platform_device_register(&bcm63xx_spi_device);
|
||||
}
|
||||
|
||||
@@ -7,48 +7,4 @@
|
||||
|
||||
int __init bcm63xx_spi_register(void);
|
||||
|
||||
struct bcm63xx_spi_pdata {
|
||||
unsigned int fifo_size;
|
||||
unsigned int msg_type_shift;
|
||||
unsigned int msg_ctl_width;
|
||||
int bus_num;
|
||||
int num_chipselect;
|
||||
};
|
||||
|
||||
enum bcm63xx_regs_spi {
|
||||
SPI_CMD,
|
||||
SPI_INT_STATUS,
|
||||
SPI_INT_MASK_ST,
|
||||
SPI_INT_MASK,
|
||||
SPI_ST,
|
||||
SPI_CLK_CFG,
|
||||
SPI_FILL_BYTE,
|
||||
SPI_MSG_TAIL,
|
||||
SPI_RX_TAIL,
|
||||
SPI_MSG_CTL,
|
||||
SPI_MSG_DATA,
|
||||
SPI_RX_DATA,
|
||||
};
|
||||
|
||||
#define __GEN_SPI_REGS_TABLE(__cpu) \
|
||||
[SPI_CMD] = SPI_## __cpu ##_CMD, \
|
||||
[SPI_INT_STATUS] = SPI_## __cpu ##_INT_STATUS, \
|
||||
[SPI_INT_MASK_ST] = SPI_## __cpu ##_INT_MASK_ST, \
|
||||
[SPI_INT_MASK] = SPI_## __cpu ##_INT_MASK, \
|
||||
[SPI_ST] = SPI_## __cpu ##_ST, \
|
||||
[SPI_CLK_CFG] = SPI_## __cpu ##_CLK_CFG, \
|
||||
[SPI_FILL_BYTE] = SPI_## __cpu ##_FILL_BYTE, \
|
||||
[SPI_MSG_TAIL] = SPI_## __cpu ##_MSG_TAIL, \
|
||||
[SPI_RX_TAIL] = SPI_## __cpu ##_RX_TAIL, \
|
||||
[SPI_MSG_CTL] = SPI_## __cpu ##_MSG_CTL, \
|
||||
[SPI_MSG_DATA] = SPI_## __cpu ##_MSG_DATA, \
|
||||
[SPI_RX_DATA] = SPI_## __cpu ##_RX_DATA,
|
||||
|
||||
static inline unsigned long bcm63xx_spireg(enum bcm63xx_regs_spi reg)
|
||||
{
|
||||
extern const unsigned long *bcm63xx_regs_spi;
|
||||
|
||||
return bcm63xx_regs_spi[reg];
|
||||
}
|
||||
|
||||
#endif /* BCM63XX_DEV_SPI_H */
|
||||
|
||||
@@ -80,7 +80,6 @@ static int __init early_seeprom_probe(struct spi_device *spi)
|
||||
static struct spi_driver early_seeprom_driver __initdata = {
|
||||
.driver = {
|
||||
.name = "at25",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = early_seeprom_probe,
|
||||
};
|
||||
|
||||
@@ -381,7 +381,6 @@ static SIMPLE_DEV_PM_OPS(st33zp24_spi_ops, st33zp24_pm_suspend,
|
||||
|
||||
static struct spi_driver tpm_st33_spi_driver = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = TPM_ST33_SPI,
|
||||
.pm = &st33zp24_spi_ops,
|
||||
.of_match_table = of_match_ptr(of_st33zp24_spi_match),
|
||||
|
||||
@@ -183,7 +183,6 @@ MODULE_DEVICE_TABLE(of, gen_74x164_dt_ids);
|
||||
static struct spi_driver gen_74x164_driver = {
|
||||
.driver = {
|
||||
.name = "74x164",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = gen_74x164_dt_ids,
|
||||
},
|
||||
.probe = gen_74x164_probe,
|
||||
|
||||
@@ -87,7 +87,6 @@ MODULE_DEVICE_TABLE(spi, max7301_id);
|
||||
static struct spi_driver max7301_driver = {
|
||||
.driver = {
|
||||
.name = "max7301",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = max7301_probe,
|
||||
.remove = max7301_remove,
|
||||
|
||||
@@ -163,7 +163,6 @@ static int mc33880_remove(struct spi_device *spi)
|
||||
static struct spi_driver mc33880_driver = {
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = mc33880_probe,
|
||||
.remove = mc33880_remove,
|
||||
|
||||
@@ -848,7 +848,6 @@ MODULE_DEVICE_TABLE(i2c, mcp230xx_id);
|
||||
static struct i2c_driver mcp230xx_driver = {
|
||||
.driver = {
|
||||
.name = "mcp230xx",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(mcp23s08_i2c_of_match),
|
||||
},
|
||||
.probe = mcp230xx_probe,
|
||||
@@ -1021,7 +1020,6 @@ static struct spi_driver mcp23s08_driver = {
|
||||
.id_table = mcp23s08_ids,
|
||||
.driver = {
|
||||
.name = "mcp23s08",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(mcp23s08_spi_of_match),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -287,7 +287,6 @@ static struct spi_driver lg4573_driver = {
|
||||
.remove = lg4573_remove,
|
||||
.driver = {
|
||||
.name = "lg4573",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = lg4573_of_match,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -378,7 +378,6 @@ static struct spi_driver ld9040_driver = {
|
||||
.remove = ld9040_remove,
|
||||
.driver = {
|
||||
.name = "panel-samsung-ld9040",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = ld9040_of_match,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -157,7 +157,6 @@ MODULE_DEVICE_TABLE(spi, ad7314_id);
|
||||
static struct spi_driver ad7314_driver = {
|
||||
.driver = {
|
||||
.name = "ad7314",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = ad7314_probe,
|
||||
.remove = ad7314_remove,
|
||||
|
||||
@@ -234,7 +234,6 @@ MODULE_DEVICE_TABLE(spi, adcxx_ids);
|
||||
static struct spi_driver adcxx_driver = {
|
||||
.driver = {
|
||||
.name = "adcxx",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.id_table = adcxx_ids,
|
||||
.probe = adcxx_probe,
|
||||
|
||||
@@ -237,7 +237,6 @@ static int ads7871_remove(struct spi_device *spi)
|
||||
static struct spi_driver ads7871_driver = {
|
||||
.driver = {
|
||||
.name = DEVICE_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
|
||||
.probe = ads7871_probe,
|
||||
|
||||
@@ -104,7 +104,6 @@ MODULE_DEVICE_TABLE(spi, adt7310_id);
|
||||
static struct spi_driver adt7310_driver = {
|
||||
.driver = {
|
||||
.name = "adt7310",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = ADT7X10_DEV_PM_OPS,
|
||||
},
|
||||
.probe = adt7310_spi_probe,
|
||||
|
||||
@@ -199,7 +199,6 @@ MODULE_DEVICE_TABLE(spi, lm70_ids);
|
||||
static struct spi_driver lm70_driver = {
|
||||
.driver = {
|
||||
.name = "lm70",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(lm70_of_ids),
|
||||
},
|
||||
.id_table = lm70_ids,
|
||||
|
||||
@@ -277,7 +277,6 @@ MODULE_DEVICE_TABLE(spi, max1111_ids);
|
||||
static struct spi_driver max1111_driver = {
|
||||
.driver = {
|
||||
.name = "max1111",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.id_table = max1111_ids,
|
||||
.probe = max1111_probe,
|
||||
|
||||
@@ -263,7 +263,6 @@ MODULE_DEVICE_TABLE(spi, kxsd9_id);
|
||||
static struct spi_driver kxsd9_driver = {
|
||||
.driver = {
|
||||
.name = "kxsd9",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = kxsd9_probe,
|
||||
.remove = kxsd9_remove,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user