Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.9 DSI panel #1744

Closed
wants to merge 131 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
534e4c8
smsx95xx: fix crimes against truesize
Feb 19, 2015
4fbbe03
smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default
samnazarko Apr 1, 2016
99c24a9
Allow mac address to be set in smsc95xx
popcornmix Mar 26, 2013
5042fc1
Protect __release_resource against resources without parents
Mar 13, 2015
887bd54
mm: Remove the PFN busy warning
anholt Dec 19, 2014
a278d77
BCM2835_DT: Fix I2S register map
rtiemann Jul 20, 2015
3e1ade2
irq-bcm2836: Prevent spurious interrupts, and trap them early
Dec 4, 2015
8be90c6
irqchip: bcm2835: Add FIQ support
notro Jun 12, 2015
dfb3441
irqchip: irq-bcm2835: Add 2836 FIQ support
notro Oct 23, 2015
3bf5137
spidev: Add "spidev" compatible string to silence warning
Jul 14, 2015
4e48d80
serial: 8250: Don't crash when nr_uarts is 0
Jun 30, 2015
204b329
pinctrl-bcm2835: Set base to 0 give expected gpio numbering
notro Jul 10, 2014
8f07a75
pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53
Feb 24, 2015
e8df506
pinctrl-bcm2835: Only request the interrupts listed in the DTB
Feb 26, 2015
7d8abaa
pinctrl-bcm2835: Return pins to inputs when freed
May 6, 2016
2e0020d
spi-bcm2835: Support pin groups other than 7-11
Jun 24, 2015
7bf8cfa
spi-bcm2835: Disable forced software CS
Jul 1, 2016
5a1b531
ARM: bcm2835: Set Serial number and Revision
notro Jun 3, 2015
4f1a32f
dmaengine: bcm2835: Load driver early and support legacy API
notro Oct 3, 2015
1fce342
firmware: Updated mailbox header
popcornmix Jan 25, 2016
fd855c0
clk: bcm2835: Mark GPIO clocks enabled at boot as critical.
anholt May 10, 2016
11ace36
rtc: Add SPI alias for pcf2123 driver
Jun 15, 2016
d242be5
watchdog: bcm2835: Support setting reboot partition
notro Oct 7, 2016
cc2a96c
reboot: Use power off rather than busy spinning when halt is requested
popcornmix Apr 5, 2016
d7b260e
bcm: Make RASPBERRYPI_POWER depend on PM
popcornmix Nov 9, 2016
95a9b75
Register the clocks early during the boot process,
msperl Sep 2, 2016
8cc31dc
Main bcm2708/bcm2709 linux port
popcornmix May 12, 2013
3909807
Add dwc_otg driver
popcornmix May 1, 2013
4e7048d
bcm2708 framebuffer driver
popcornmix Jun 17, 2015
e78120b
dmaengine: Add support for BCM2708
koalo Nov 22, 2013
9c3061f
MMC: added alternative MMC driver
weiszg Aug 15, 2014
774d70a
Adding bcm2835-sdhost driver, and an overlay to enable it
Mar 25, 2015
0d6507b
mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards
May 11, 2016
d431dae
cma: Add vc_cma driver to enable use of CMA
popcornmix Jul 2, 2013
8a4b39c
bcm2708: alsa sound driver
popcornmix Mar 26, 2012
f424811
vc_mem: Add vc_mem driver for querying firmware memory addresses
popcornmix Oct 28, 2016
9047859
vcsm: VideoCore shared memory service for BCM2835
Jul 22, 2014
40da294
Add /dev/gpiomem device for rootless user GPIO access
Wren6991 Aug 21, 2015
b3765b2
Add SMI driver
Wren6991 Sep 5, 2015
746f166
MISC: bcm2835: smi: use clock manager and fix reload issues
msperl Apr 26, 2016
4ed3efb
Add SMI NAND driver
Wren6991 Sep 5, 2015
51a06db
lirc: added support for RaspberryPi GPIO
Jun 16, 2012
e3ce9bc
Add cpufreq driver
popcornmix Jul 2, 2013
36cdeea
Added hwmon/thermal driver for reporting core temperature. Thanks Dorian
popcornmix Mar 26, 2013
a8b554d
Add Chris Boot's i2c driver
popcornmix Jun 17, 2015
760f33f
char: broadcom: Add vcio module
notro Jun 26, 2015
bc2273d
firmware: bcm2835: Support ARCH_BCM270x
notro Jun 26, 2015
2d7e20a
bcm2835: add v4l2 camera device
Jan 30, 2013
f8f3f9f
scripts: Add mkknlimg and knlinfo scripts from tools repo
May 11, 2015
1544836
scripts/dtc: Update to upstream version 1.4.1
Aug 10, 2015
ffcb361
BCM2708: Add core Device Tree support
notro Jul 9, 2014
a090d39
kbuild: Ignore dtco targets when filtering symbols
Aug 24, 2016
36b9cbd
BCM270X_DT: Add a .dtbo target, use for overlays
Mar 13, 2015
1bdfe18
BCM270X_DT: Don't generate "linux,phandle" props
Apr 8, 2016
6bae8d6
BCM270x_DT: Add pwr_led, and the required "input" trigger
Feb 6, 2015
3eb4778
fbdev: add FBIOCOPYAREA ioctl
ssvb Jun 17, 2013
5d9b22f
Speed up console framebuffer imageblit function
hglm Jun 20, 2013
e72cf34
enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (a…
popcornmix May 8, 2013
5469d88
Added Device IDs for August DVB-T 205
popcornmix Jul 2, 2013
21d4245
config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cos…
popcornmix Dec 18, 2013
d825add
hid: Reduce default mouse polling interval to 60Hz
popcornmix Jul 14, 2014
5115d78
rpi-ft5406: Add touchscreen driver for pi LCD display
ghollingworth May 12, 2015
affd1aa
Improve __copy_to_user and __copy_from_user performance
popcornmix Nov 28, 2016
e8796bf
gpio-poweroff: Allow it to work on Raspberry Pi
Jun 25, 2015
3996b35
mfd: Add Raspberry Pi Sense HAT core driver
pelwell Jul 14, 2015
f11052c
ASoC: Add support for HifiBerry DAC
koalo Nov 22, 2013
3485a8a
ASoC: Add support for Rpi-DAC
koalo Jan 25, 2016
5b249ac
ASoC: wm8804: Implement MCLK configuration options, add 32bit support…
Jan 15, 2014
71ef554
ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patc…
Jan 15, 2014
638749b
Add IQaudIO Sound Card support for Raspberry Pi
Mar 8, 2014
6797ffe
iqaudio-dac: Compile fix - untested
popcornmix Jul 25, 2016
ea6ee4a
Added support for HiFiBerry DAC+
Aug 4, 2014
d369b65
Added driver for HiFiBerry Amp amplifier add-on board
Aug 4, 2014
cd6006b
Revert "Added driver for HiFiBerry Amp amplifier add-on board"
popcornmix Nov 28, 2016
e5f63c7
Added HiFiBerry Digi+ Pro driver
Jul 26, 2016
9b5911d
Update ds1307 driver for device-tree support
ryco-dev Feb 1, 2015
d3ee71a
Add driver for rpi-proto
Mar 25, 2015
a708317
RaspiDAC3 support
Aug 24, 2015
30969ef
Add Support for JustBoom Audio boards
shawaj Apr 7, 2016
655a4c8
ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver.
andrey2805 May 4, 2016
82af695
New AudioInjector.net Pi soundcard with low jitter audio in and out.
flatmax May 16, 2016
a94de94
Add IQAudIO Digi WM8804 board support
DigitalDreamtime Jun 30, 2016
b3474a7
New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804
escalator2015 May 24, 2016
9b6d463
Add support for Dion Audio LOCO DAC-AMP HAT
DigitalDreamtime Jul 2, 2016
5353128
Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645)
clivem Sep 19, 2016
e7a4a87
Support for Blokas Labs pisound board
gtrainavicius Oct 23, 2016
727d97c
rpi_display: add backlight driver and overlay
Oct 21, 2015
462231e
bcm2835-virtgpio: Virtual GPIO driver
popcornmix Feb 23, 2016
844fe00
amba_pl011: Don't use DT aliases for numbering
Feb 23, 2016
1254f31
net: Add non-mainline source for rtl8192cu wlan
popcornmix Sep 3, 2012
30984a8
net: Fix rtl8192cu build errors on other platforms
Mar 23, 2016
bf81199
OF: DT-Overlay configfs interface
pantoniou Dec 3, 2014
c947fbb
brcm: adds support for BCM43341 wifi
Cheong2K Feb 26, 2016
68870b3
hci_h5: Don't send conf_req when ACTIVE
Dec 17, 2015
5c8d2fe
config: Add default configs
popcornmix Apr 13, 2015
4b23053
Add arm64 configuration and device tree differences.
Electron752 Aug 24, 2016
74c1f42
build: support for .dtbo files for dtb overlays
hjourdain May 20, 2016
1b6358f
vchiq_arm: Tweak the logging output
Mar 7, 2016
e4f737f
vchiq_arm: Access the dequeue_pending flag locked
Mar 23, 2016
fd6bba6
vchiq_arm: Service callbacks must not fail
Mar 23, 2016
65b976e
vchiq_arm: Add completion records under the mutex
Apr 21, 2016
790f716
vchiq_arm: Avoid use of mutex in add_completion
Jun 20, 2016
c1aca75
staging/vchi: Convert to current get_user_pages() arguments.
anholt Oct 3, 2016
186304a
staging/vchi: Update for rename of page_cache_release() to put_page().
anholt Oct 3, 2016
71ab212
drivers/vchi: Remove dependency on CONFIG_BROKEN.
anholt Oct 3, 2016
f925444
raspberrypi-firmware: Export the general transaction function.
anholt Sep 14, 2016
508b516
raspberrypi-firmware: Define the MBOX channel in the header.
anholt Sep 14, 2016
b5c1f97
drm/vc4: Add a mode for using the closed firmware for display.
anholt Sep 14, 2016
b4793d9
spi-bcm2835: Remove unused code
Nov 8, 2016
dc8a6dc
i2c: bcm2835: Fix hang for writing messages larger than 16 bytes
notro Sep 17, 2016
781661b
i2c: bcm2835: Protect against unexpected TXW/RXR interrupts
notro Sep 23, 2016
683abdf
i2c: bcm2835: Use dev_dbg logging on transfer errors
notro Sep 19, 2016
ef0225c
i2c: bcm2835: Can't support I2C_M_IGNORE_NAK
notro Sep 22, 2016
de33061
i2c: bcm2835: Add support for Repeated Start Condition
notro Sep 23, 2016
24d612f
i2c: bcm2835: Support i2c-dev ioctl I2C_TIMEOUT
notro Sep 23, 2016
02ed259
i2c: bcm2835: Add support for dynamic clock
notro Sep 26, 2016
10da0c9
i2c: bcm2835: Add debug support
notro Nov 1, 2016
2b77cb6
BCM2835-v4l2: Fix a conformance test failure
6by9 Nov 30, 2016
9a254b3
hifiberry: Make driver names unique in first 15 characters
popcornmix Dec 1, 2016
05b0d33
bcmrpi3_defconfig: Update config to be compatible with latest Kconfig…
Electron752 Nov 4, 2016
fbb2af9
BCM2835 DT: Add DTC_FLAGS to support overlays
Dec 1, 2016
a0a04fd
Add overlays symlink and dtbo target for ARM64 (#1739)
Gerharddc Dec 2, 2016
40fda4d
drm/vc4: Fix flipped HVS channels for DSI0/1.
anholt Feb 11, 2016
dda7abc
drm/vc4: Add support for feeding DSI encoders from the pixel valve.
anholt Feb 11, 2016
8aaeb11
drm/vc4: Start switching to using debugfs_reg32 helpers for debugfs.
anholt May 20, 2016
06d4588
drm/vc4: Add DSI1 driver
anholt Feb 10, 2016
98877ae
Add DRM_PANEL_RASPBERRYPI_TOUCHSCREEN to bcmrpi3_defconfig
Gerharddc Dec 3, 2016
2327b74
drm/panel: Add support for the Raspberry Pi 7" Touchscreen.
anholt Apr 26, 2016
804db84
clk: bcm2835: Do appropriate name lookups for DSI1's parents as well.
anholt Apr 14, 2016
9deeeb3
clk: bcm2835: Add an enum for the DSI1 pixel clock.
anholt Apr 15, 2016
34d976f
Add nodes for DSI and DSI panel
Gerharddc Dec 3, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
i2c: bcm2835: Add support for dynamic clock
Support a dynamic clock by reading the frequency and setting the
divisor in the transfer function instead of during probe.

Signed-off-by: Noralf Trønnes <[email protected]>
Reviewed-by: Martin Sperl <[email protected]>
  • Loading branch information
notro authored and popcornmix committed Nov 28, 2016
commit 02ed259fb9bba0ef8e6c3b3a32190987483e68dd
51 changes: 32 additions & 19 deletions drivers/i2c/busses/i2c-bcm2835.c
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ struct bcm2835_i2c_dev {
void __iomem *regs;
struct clk *clk;
int irq;
u32 bus_clk_rate;
struct i2c_adapter adapter;
struct completion completion;
struct i2c_msg *curr_msg;
@@ -78,6 +79,30 @@ static inline u32 bcm2835_i2c_readl(struct bcm2835_i2c_dev *i2c_dev, u32 reg)
return readl(i2c_dev->regs + reg);
}

static int bcm2835_i2c_set_divider(struct bcm2835_i2c_dev *i2c_dev)
{
u32 divider;

divider = DIV_ROUND_UP(clk_get_rate(i2c_dev->clk),
i2c_dev->bus_clk_rate);
/*
* Per the datasheet, the register is always interpreted as an even
* number, by rounding down. In other words, the LSB is ignored. So,
* if the LSB is set, increment the divider to avoid any issue.
*/
if (divider & 1)
divider++;
if ((divider < BCM2835_I2C_CDIV_MIN) ||
(divider > BCM2835_I2C_CDIV_MAX)) {
dev_err_ratelimited(i2c_dev->dev, "Invalid clock-frequency\n");
return -EINVAL;
}

bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DIV, divider);

return 0;
}

static void bcm2835_fill_txfifo(struct bcm2835_i2c_dev *i2c_dev)
{
u32 val;
@@ -224,7 +249,7 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
{
struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap);
unsigned long time_left;
int i;
int i, ret;

for (i = 0; i < (num - 1); i++)
if (msgs[i].flags & I2C_M_RD) {
@@ -233,6 +258,10 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
return -EOPNOTSUPP;
}

ret = bcm2835_i2c_set_divider(i2c_dev);
if (ret)
return ret;

i2c_dev->curr_msg = msgs;
i2c_dev->num_msgs = num;
reinit_completion(&i2c_dev->completion);
@@ -282,7 +311,6 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
{
struct bcm2835_i2c_dev *i2c_dev;
struct resource *mem, *irq;
u32 bus_clk_rate, divider;
int ret;
struct i2c_adapter *adap;

@@ -306,27 +334,12 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
}

ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency",
&bus_clk_rate);
&i2c_dev->bus_clk_rate);
if (ret < 0) {
dev_warn(&pdev->dev,
"Could not read clock-frequency property\n");
bus_clk_rate = 100000;
}

divider = DIV_ROUND_UP(clk_get_rate(i2c_dev->clk), bus_clk_rate);
/*
* Per the datasheet, the register is always interpreted as an even
* number, by rounding down. In other words, the LSB is ignored. So,
* if the LSB is set, increment the divider to avoid any issue.
*/
if (divider & 1)
divider++;
if ((divider < BCM2835_I2C_CDIV_MIN) ||
(divider > BCM2835_I2C_CDIV_MAX)) {
dev_err(&pdev->dev, "Invalid clock-frequency\n");
return -ENODEV;
i2c_dev->bus_clk_rate = 100000;
}
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DIV, divider);

irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!irq) {