Skip to content

Commit

Permalink
Merge branches 'for-opinicus/asoc', 'for-opinicus/gpio', 'for-opinicu…
Browse files Browse the repository at this point in the history
…s/input', 'for-opinicus/leds', 'for-opinicus/pwm', 'for-opinicus/rtc', 'for-opinicus/regulator', 'for-opinicus/serial', 'for-opinicus/fbdev' and 'for-opinicus/hdmi' into opinicus-4.14-0

* for-opinicus/asoc:
  ASoC: sun4i-is: also check for NULL on reset pin request

* for-opinicus/gpio:
  gpio: pca953x: add support for the NXP pca9570

* for-opinicus/input:
  input: edt-ft5x06: force touchscreen to remain active
  input: edt-ft5x06: add polldev as an option
  input: edt-ft5x06: take into account the number of fingers
  input: edt-ft5x06: fix multi-touch handling
  input: edt-ft5x06: sanity check on input
  input: edt-ft5x06: silence deferral error
  input: edt-ft5x06: use less magic and more defines
  input: edt-ft5x06: shorten defines
  input: edt-ft5x06: minor consistency cleanup/line length reduction
  input: edt-ft5x06: fix some whitespace/ident issues
  input: edt-ft5x06: only enable the irq when needed
  input: edt-ft5x06: cleanup headers
  input: edt-ft5x06: add support for the ft5426 controller
  input: edt-ft5x06: group r, w and rw functions
  input: of_touchscreen: add support for minimum sizes
  input: of_touchscreen: rename touchscreen-size-[xy]
  input: of_touchscreen: shorten variable names

* for-opinicus/leds:
  leds: pca963x: set DMBLNK as default during probe
  leds: pca963x: remove whitespace and checkpatch problems
  leds: pca963x: refactor initial led output a little
  leds: pca963x: save mode when setting power_state
  leds: pca963x: add defines and remove some magic values
  leds: pca963x: alphabetize headers
  leds: pca963x: abort probe if device is not connected

* for-opinicus/pwm:
  pwm: core: do not block apply->state on period

* for-opinicus/rtc:
  rtc: sun6i: add missing header

* for-opinicus/regulator:
  power: supply: axp288: use the BIT() macro
  power: supply: axp20x: add missing include bitops.h
  mfd: axp20x: use explicit bit defines
  mfd: axp20x: fixup includes
  regulator: dts: set proper lradc vref on OLinuXino Lime2
  regulator: dts: add full voltage range to LDO4 on the Lime2
  regulator: dts: enable soft-start and ramp delay for the OLinuXino Lime2
  regulator: axp20x: add software based soft_start for LDO3
  regulator: axp20x: add support for set_ramp_delay
  regulator: core: enable power when setting up constraints
  regulator: axp20x: name voltage ramping define properly
  regulator: axp20x: use defines for masks

* for-opinicus/serial:
  serial: 8250: expand debug ability of the irq handler
  serial: 8250: Only confirm handled interrupts on supported ones
  serial: 8250_dw: Make register access consistent
  serial: 8250_dw: Use serial port assessor wrapper
  serial: 8250: Do not treat the IIR register as a bitfield
  serial: 8250: Minor cleanups
  serial: 8250: Replace asm/irq with linux/irqreturn, linux/interrupt

* for-opinicus/fbdev: (21 commits)
  fbdev: ssd1307fb: Do not always clear the display on boot
  fbdev: ssd1307fb: Limit to support 0 - 180 rotation only
  fbdev: ssd1307fb: Add hardware accelerated rotation support
  fbdev: ssd1307fb: Ensure display is toggled properly
  fbdev: ssd1307fb: Ensure set_par can do bring-up
  fbdev: ssd1307fb: Remove unused forward declaration
  fbdev: ssd1307fb: Reduce magic values with defines
  fbdev: ssd1307fb: Use resolution instead of dimensions
  fbdev: ssd1307fb: cleanup: Group fb_info.fix
  fbdev: ssd1307fb: Use ratelimited error printing
  fbdev: ssd1307fb: Make output a little more consistent
  fbdev: ssd1307fb: Rename i2c device ids
  fbdev: ssd1307fb: Abort probe if we cannot talk to the display
  fbdev: sysfs: Add rotation in degrees support to validation
  fbdev: sysfs: Expand input validation to degree's
  fbdev: sysfs: Input validation
  fbdev: sysfs: Replace simple_strtoul with kstrtoul
  fbdev: sysfs: Sort headers
  fbdev: of: Add parameter to not clear screen on probe
  fbdev: of: Add of parsing helper
  ...

* for-opinicus/hdmi:
  arm/dts: Use hdmi_i2c node on the OLinuXino Lime2
  [WIP-do-not-merge] drm/sunxi: Split off hdmi-i2c as a separated driver
  drm: sun4i: check for i2c busy status
  drm/sun4i: make fifo_transfer more verbose in case of error
  drm/sun4i: i2c: consolidate ddc items
  drm/sun4i: make bool assignment explicit
  drm/sun4i: enable/disable the tmds clock on use
  drm/sun4i: Fix NULL pointer dereference at unbind
  drm/sun4i: improve header readability
  drm/sun4i: Fix Kconfig indenting
  drm/edid: Prevent NULL pointer deref when there is no I2C adapter
  • Loading branch information
oliv3r committed Apr 5, 2018
11 parents 489fbb3 + 07e7717 + 1cd397f + d619e9d + 3a31f9a + 5fc70f8 + a3d9801 + 47b3c8f + 4fdf765 + 83e7d98 + 6e4973b commit b1ca4f2
Show file tree
Hide file tree
Showing 48 changed files with 3,194 additions and 1,309 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/display/fbdev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
General framebuffer properties:

Optional properties for framebuffers:
- no-clear-on-probe : Do not clear the framebuffer during probe (bool)
- rotate : rotate a framebuffer over 0, 1, 2 and 3 (or 0, 90,
180 and 270) degree's (integer)
52 changes: 45 additions & 7 deletions Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ Required properties:
* pll-0: the first video PLL
* pll-1: the second video PLL
- clock-names: the clock names mentioned above
- clock-output-names: the name of the output clock by the HDMI/TMDS encoder
- dmas: phandles to the DMA channels used by the HDMI encoder
* ddc-tx: The channel for DDC transmission
* ddc-rx: The channel for DDC reception
* audio-tx: The channel used for audio transmission
- dma-names: the channel names mentioned above

Expand All @@ -61,6 +60,32 @@ Required properties:
first port should be the input endpoint. The second should be the
output, usually to an HDMI connector.

Optional properties:
- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing

HDMI-I2C bus driver
-------------------

The HDMI-I2C bus controller is implemented using a reasonably common I2C block
and can be used as a regular I2C device in a board layout. The only caveat
however is that the bus timing is dependent on the TMDS clock and thus the
exact I2C bus frequency may not be achieved.

Required properties:
- compatible: value must be one of:
* allwinner,sun4i-a10-hdmi-i2c
* allwinner,sun6i-a31-hdmi-i2c
- reg: base address and size of the memory-mapped region
- clocks: phandle to the clock feeding the HDMI-I2C bus controller
* hdmi: the HDMI/TMDS peripheral is the input clock, common on sun4i
* ddc: a dedicated DDC clock is the input clock, common on sun6i
- dmas: phandles to the DMA channels used by the HDMI-I2C bus controller
* ddc-tx: The channel for DDC transmission
* ddc-rx: The channel for DDC reception

Optional properties:
- clock-frequency: see the common i2c binding document

TV Encoder
----------

Expand Down Expand Up @@ -277,16 +302,16 @@ connector {

hdmi: hdmi@01c16000 {
compatible = "allwinner,sun5i-a10s-hdmi";
reg = <0x01c16000 0x1000>;
reg = <0x01c16000 0x500>;
interrupts = <58>;
clocks = <&ccu CLK_AHB_HDMI>, <&ccu CLK_HDMI>,
<&ccu CLK_PLL_VIDEO0_2X>,
<&ccu CLK_PLL_VIDEO1_2X>;
clock-names = "ahb", "mod", "pll-0", "pll-1";
dmas = <&dma SUN4I_DMA_NORMAL 16>,
<&dma SUN4I_DMA_NORMAL 16>,
<&dma SUN4I_DMA_DEDICATED 24>;
dma-names = "ddc-tx", "ddc-rx", "audio-tx";
clock-output-names = "hdmi-tmds";
ddc-i2c-bus = <&hdmi_i2c>;
dmas = <&dma SUN4I_DMA_DEDICATED 24>;
dma-names = "audio-tx";

ports {
#address-cells = <1>;
Expand Down Expand Up @@ -314,6 +339,19 @@ hdmi: hdmi@01c16000 {
};
};

hdmi_i2c: i2c@16500 {
compatible = "allwinner,sun7i-a20-hdmi-i2c",
"allwinner,sun4i-a10-hdmi-i2c";
reg = <0x01c16500 0x40>;
#address-cells = <1>;
#size-cells = <0>;
clocks = <&hdmi>;
dmas = <&dma SUN4I_DMA_NORMAL 16>,
<&dma SUN4I_DMA_NORMAL 16>,
dma-names = "ddc-tx", "ddc-rx";
status = "disabled";
};

tve0: tv-encoder@01c0a000 {
compatible = "allwinner,sun4i-a10-tv-encoder";
reg = <0x01c0a000 0x1000>;
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Required properties:
nxp,pca9555
nxp,pca9556
nxp,pca9557
nxp,pca9570
nxp,pca9574
nxp,pca9575
nxp,pca9698
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ Required properties:
- compatible: "edt,edt-ft5206"
or: "edt,edt-ft5306"
or: "edt,edt-ft5406"
or: "edt,edt-ft5426"
or: "edt,edt-ft5506"
or: "focaltech,ft6236"

- reg: I2C slave address of the chip (0x38)

Optional properties:
- interrupt-parent: a phandle pointing to the interrupt controller
serving the interrupt for this chip
- interrupts: interrupt specification for the touchdetect
interrupt

Optional properties:
- reset-gpios: GPIO specification for the RESET input
- wake-gpios: GPIO specification for the WAKE input

Expand All @@ -44,6 +45,7 @@ Optional properties:

- offset: allows setting the edge compensation in the range from
0 to 31.
- poll-interval: Poll interval time in milliseconds
- touchscreen-size-x : See touchscreen.txt
- touchscreen-size-y : See touchscreen.txt
- touchscreen-fuzz-x : See touchscreen.txt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
General Touchscreen Properties:

Optional properties for Touchscreens:
- touchscreen-size-x : horizontal resolution of touchscreen
(in pixels)
- touchscreen-size-y : vertical resolution of touchscreen
(in pixels)
- touchscreen-min-size-x : minimal reported horizontal resolution of
touchscreen (in pixels)
- touchscreen-min-size-y : minimal reported vertical resolution of
touchscreen (in pixels)
- touchscreen-max-size-x : maximal reported horizontal resolution of
touchscreen (in pixels)
- touchscreen-max-size-y : maximal reported vertical resolution of touchscreen
touchscreen (in pixels)
- touchscreen-max-pressure : maximum reported pressure (arbitrary range
dependent on the controller)
- touchscreen-fuzz-x : horizontal noise value of the absolute input
Expand All @@ -25,6 +29,8 @@ Optional properties for Touchscreens:
- touchscreen-y-mm : vertical length in mm of the touchscreen

Deprecated properties for Touchscreens:
- touchscreen-size-x : deprecated name for touchscreen-size-x
- touchscreen-size-y : deprecated name for touchscreen-size-y
- x-size : deprecated name for touchscreen-size-x
- y-size : deprecated name for touchscreen-size-y
- moving-threshold : deprecated name for a combination of
Expand Down
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/mfd/axp20x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ Required properties:
- interrupt-controller: The PMIC has its own internal IRQs
- #interrupt-cells: Should be set to 1

Supported common regulator properties, see regulator.txt for more information:
- regulator-ramp-delay: sets the ramp up delay in uV/us
AXP20x/DCDC2: 1600, 800
AXP20x/LDO3: 1600, 800
- regulator-soft-start: enable the output at the lowest possible voltage and
only then set the desired voltage
AXP20x/LDO3

Optional properties:
- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz
AXP152/20X: range: 750-1875, Default: 1.5 MHz
Expand Down
19 changes: 16 additions & 3 deletions arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@
};

&hdmi {
ddc-i2c-bus = <&hdmi_i2c>;
status = "okay";
};

&hdmi_i2c {
clock-frequency = <100000>;
status = "okay";
};

Expand Down Expand Up @@ -154,6 +160,10 @@
};
};

&lradc {
vref-supply = <&reg_vcc3v0>;
};

&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>;
Expand Down Expand Up @@ -246,12 +256,15 @@
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-name = "vddio-csi0";
regulator-soft-start;
regulator-ramp-delay = <1600>;
};

&reg_ldo4 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-name = "vddio-csi1";
regulator-always-on;
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vdd-io-pg";
};

&reg_usb0_vbus {
Expand Down
23 changes: 18 additions & 5 deletions arch/arm/boot/dts/sun7i-a20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,16 @@
hdmi: hdmi@1c16000 {
compatible = "allwinner,sun7i-a20-hdmi",
"allwinner,sun5i-a10s-hdmi";
reg = <0x01c16000 0x1000>;
reg = <0x01c16000 0x500>;
interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_AHB_HDMI0>, <&ccu CLK_HDMI>,
<&ccu CLK_PLL_VIDEO0_2X>,
<&ccu CLK_PLL_VIDEO1_2X>;
clock-names = "ahb", "mod", "pll-0", "pll-1";
dmas = <&dma SUN4I_DMA_NORMAL 16>,
<&dma SUN4I_DMA_NORMAL 16>,
<&dma SUN4I_DMA_DEDICATED 24>;
dma-names = "ddc-tx", "ddc-rx", "audio-tx";
#clock-cells = <0>;
clock-output-names = "hdmi-tmds";
dmas = <&dma SUN4I_DMA_DEDICATED 24>;
dma-names = "audio-tx";
status = "disabled";

ports {
Expand Down Expand Up @@ -615,6 +615,19 @@
};
};

hdmi_i2c: i2c@16500 {
compatible = "allwinner,sun7i-a20-hdmi-i2c",
"allwinner,sun4i-a10-hdmi-i2c";
reg = <0x01c16500 0x40>;
#address-cells = <1>;
#size-cells = <0>;
clocks = <&hdmi>;
dmas = <&dma SUN4I_DMA_NORMAL 16>,
<&dma SUN4I_DMA_NORMAL 16>;
dma-names = "ddc-tx", "ddc-rx";
status = "disabled";
};

spi2: spi@1c17000 {
compatible = "allwinner,sun4i-a10-spi";
reg = <0x01c17000 0x1000>;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpio/gpio-pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ static const struct i2c_device_id pca953x_id[] = {
{ "pca9555", 16 | PCA953X_TYPE | PCA_INT, },
{ "pca9556", 8 | PCA953X_TYPE, },
{ "pca9557", 8 | PCA953X_TYPE, },
{ "pca9570", 4 | PCA957X_TYPE, },
{ "pca9574", 8 | PCA957X_TYPE | PCA_INT, },
{ "pca9575", 16 | PCA957X_TYPE | PCA_INT, },
{ "pca9698", 40 | PCA953X_TYPE, },
Expand Down Expand Up @@ -931,6 +932,7 @@ static const struct of_device_id pca953x_dt_ids[] = {
{ .compatible = "nxp,pca9555", .data = OF_953X(16, PCA_INT), },
{ .compatible = "nxp,pca9556", .data = OF_953X( 8, 0), },
{ .compatible = "nxp,pca9557", .data = OF_953X( 8, 0), },
{ .compatible = "nxp,pca9570", .data = OF_957X( 4, 0), },
{ .compatible = "nxp,pca9574", .data = OF_957X( 8, PCA_INT), },
{ .compatible = "nxp,pca9575", .data = OF_957X(16, PCA_INT), },
{ .compatible = "nxp,pca9698", .data = OF_953X(40, 0), },
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,9 @@ drm_do_probe_ddc_edid(void *data, u8 *buf, unsigned int block, size_t len)
unsigned char xfers = segment ? 3 : 2;
int ret, retries = 5;

if (!adapter)
return -ENODEV;

/*
* The core I2C driver will automatically retry the transfer if the
* adapter reports EAGAIN. However, we find that bit-banging transfers
Expand Down
24 changes: 16 additions & 8 deletions drivers/gpu/drm/sun4i/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,26 @@ config DRM_SUN4I
if DRM_SUN4I

config DRM_SUN4I_HDMI
tristate "Allwinner A10 HDMI Controller Support"
default DRM_SUN4I
help
tristate "Allwinner A10 HDMI Controller Support"
default DRM_SUN4I
help
Choose this option if you have an Allwinner SoC with an HDMI
controller.

config I2C_SUN4I_HDMI
tristate "Allwinner A10 HDMI I2C Support"
depends on DRM_SUN4I_HDMI
select I2C
help
Choose this option if you have an Allwinner SoC with an I2C
enabled HDMI controller and want to enable the I2C channel.

config DRM_SUN4I_HDMI_CEC
bool "Allwinner A10 HDMI CEC Support"
depends on DRM_SUN4I_HDMI
select CEC_CORE
select CEC_PIN
help
bool "Allwinner A10 HDMI CEC Support"
depends on DRM_SUN4I_HDMI
select CEC_CORE
select CEC_PIN
help
Choose this option if you have an Allwinner SoC with an HDMI
controller and want to use CEC.

Expand Down
8 changes: 6 additions & 2 deletions drivers/gpu/drm/sun4i/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ sun4i-backend-y += sun4i_backend.o sun4i_layer.o
sun4i-drm-y += sun4i_drv.o
sun4i-drm-y += sun4i_framebuffer.o

sun4i-drm-hdmi-y += sun4i_hdmi_ddc_clk.o
sun4i-hdmi-i2c-y += sun4i_hdmi_i2c_drv.o sun4i_hdmi_ddc_clk.o
sun4i-hdmi-i2c-y += sun4i_hdmi_i2c.o

sun4i-drm-hdmi-y += sun4i_hdmi_i2c_drv.o sun4i_hdmi_ddc_clk.o
sun4i-drm-hdmi-y += sun4i_hdmi_enc.o
sun4i-drm-hdmi-y += sun4i_hdmi_i2c.o
sun4i-drm-hdmi-y += sun4i_hdmi_tmds_clk.o

sun8i-mixer-y += sun8i_mixer.o sun8i_layer.o
Expand All @@ -24,3 +26,5 @@ obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o
obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o
obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o
obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o

obj-$(CONFIG_I2C_SUN4I_HDMI) += sun4i-hdmi-i2c.o
2 changes: 2 additions & 0 deletions drivers/gpu/drm/sun4i/sun4i_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ static int sun4i_drv_bind(struct device *dev)
if (ret)
goto finish_poll;

dev_set_drvdata(dev, drm);

return 0;

finish_poll:
Expand Down
Loading

0 comments on commit b1ca4f2

Please sign in to comment.