Commit Graph

1027 Commits

Author SHA1 Message Date
Martin Blumenstingl
807b858cd6 dt-bindings: reset: meson8b: fix duplicate reset IDs
commit 4881873f4c upstream.

According to the public S805 datasheet the RESET2 register uses the
following bits for the PIC_DC, PSC and NAND reset lines:
- PIC_DC is at bit 3 (meaning: RESET_VD_RMEM + 3)
- PSC is at bit 4 (meaning: RESET_VD_RMEM + 4)
- NAND is at bit 5 (meaning: RESET_VD_RMEM + 4)

Update the reset IDs of these three reset lines so they don't conflict
with PIC_DC and map to the actual hardware reset lines.

Fixes: 79795e20a1 ("dt-bindings: reset: Add bindings for the Meson SoC Reset Controller")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-15 16:34:48 +09:00
zhiqiang liang
7b1af7284f power: add the power domain control API [1/1]
PD#SWPL-17563

Problem:
add power domain control API for TM2 and SM1

Solution:
add power domain control API for TM2 and SM1

Verify:
T962E2

Change-Id: I2587b2b554281ee7c81d77e8978a2640e5f73be5
Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
2020-12-17 17:23:20 +09:00
Luan Yuan
695cede0cc Amlogic: sync the code from mainline. [1/1]
PD#SWPL-17246

Problem:
sync the code from mainline.

Solution:
sync the code from mainline.

7c03859983c2 OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-12232) Risk:[] [1/1]
ba89a3d9c791 OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2019-8912) Risk:[] [1/1]
c434d0530610 Android Security Bulletin - November 2019-11 - Kernel components binder driver - CVE-2019-2214 [1/1]
ff8d9012fbd4 Android Security Bulletin - November 2019-11 - Kernel components ext4 filesystem - CVE-2019-11833 [1/1]
3c52e964495e cec: store msg after bootup from st [1/2]
94198a56ee10 lcd: support tcon vac and demura data [2/2]
1add1a008a03 vout: spi: porting lcd driver and SPI to Linux [1/1]
3e8d7b0e5f97 hdmirx: add hpd recovery logic when input clk is unstable [1/1]
f92e7ba21c62 ppmgr: Add 10bit, dolby and HDR video rotation. [1/1]
dab2cc37cd95 dvb: fix dmx2 interrupt bug [1/1]
9d31efae4a55 dv: add dv target output mode [1/1]
e86eb9d1b5c5 hdmirx: add rx phy tdr enable control [1/1]
8ea66f645bf6 dts: enable spi for gva [1/1]
baf6e74528ef drm: add drm support for tm2 [1/1]

Verify:
verify by newton

Change-Id: I9415060a4b39895b5d624117271a72fc6a1fd187
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2020-02-04 13:48:58 +09:00
Shuai Li
a00af0b6ad audio: mclk pad0 doesn't output clk [1/1]
PD#OTT-5603

Problem:
Configurate GPIO_AO 9 as mclk_0,it doesn't work.

Solution:
From SM1, the mclk pad register is changed.
Using standard clk tree to make it compitable.

Verify:
TM2, SM1.

Change-Id: I8d53296297536c90768495232570f33fc89db131
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2020-02-04 12:17:42 +09:00
Shuai Li
49fe388415 audio: update audio driver to the latest. [1/1]
0504a9a audio: add clk tuning_enable/start_enable control in dts [1/1]
32dd894 audio: add lock for resampler [1/1]
2ad1050 audio: set hdmi format-check threshold by input samplerate [2/2]
953435d audio: fix TDMOUT channel map error [1/1]
9eace31 audio: auge: add lower power mode for PDM & vad [1/1]
90b9c44 audio: auge: add loopback driver [1/1]
0d736dd audio: add 10ms sleep before pdn enable [1/1]
51d1794 audio: add 10ms delay before pdn enable [1/1]
998f60b audio: disable tl1 acodec dac dapm to depop [1/1]
7b0ef35 audio: enable hw resmaple pause thd [1/1]
fcb2613 audio: TM2 bringup: enable ADC for linein [1/1]
4f4dc5a audio: TM2: bringup AMP ti5805 on ab301 [1/1]
758b24b audio: fixed kernel panic when resample is disabled [1/1]
19e844f audio: TM2 audio basic function bringup [1/1]
27c68d0 audio: add codec trigger mute for depop [1/1]
d415bb5 audio: fixed the issue of PDM 16 channel capture. [1/1]
d6e5cf5 audio: always on DDR arb [1/1]
0663274 audio: add HW resample for HDMIRX [1/1]
22f4718 audio: add param check for resample [1/1]
audio: add HW resample for HDMIRX [1/1]

PD#SWPL-6118

Problem:
No resample will cause mismatch between
input and output if they are not at same
samplerate.

Solution:
Add resample for hdmirx case

Verify:
Local tested.

Change-Id: I298e401578bf49484d6b75fd736d2a74c38508e4
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: always on DDR arb [1/1]

PD#TV-3452

Problem:
Toddr stuck after a long time playback.

Solution:
For debug usage.

Verify:
No need.

Change-Id: Ibf4446148f5e028040d7d6527c7695f23f964f7c
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>

audio: fixed the issue of PDM 16 channel capture. [1/1]

PD#SWPL-5551

Problem:
cannot capture 8PDM + 8LOOPBACK.

Solution:
PDM cannot support 8PDM + 8LOOPBACK.

Verify:
s420/s400, verify pass

Change-Id: Iaf38bdcb218ebfc024666312162569cab93a76a9
Signed-off-by: Renjun Xu <renjun.xu@amlogic.com>

audio: add codec trigger mute for depop [1/1]

PD#SWPL-6944

Problem:
TV-3381
Speaker sometimes has clicking noise when playing DTV program.

Solution:
add codec trigger mute for depop

Verify:
Local verified.

Change-Id: Ib15a6b90bd3a6cdda2255afaf86daeab68ba07e2
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

audio: TM2 audio basic function bringup [1/1]

PD#SWPL-6721

Problem:
TM2 bringup

Solution:
audio basic function bringup

Verify:
Verified on T962e2_ab311

Change-Id: Ic48ded3964ea87e40c4d683d71a50bbdc1975f91
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: fixed kernel panic when resample is disabled [1/1]

PD#SWPL-7039

Problem:
Kernel Panic when resample A is disabled

Solution:
When resample is disabled,don't init resample

Verify:
Verified on T962e2_ab311

Change-Id: Id9552ffc6be40f133b828dbded4ad3f15d177ab0
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>

audio: TM2: bringup AMP ti5805 on ab301 [1/1]

PD#SWPL-7074

Problem:
speaker doesn't work

Solution:
bringup AMP ti5805 on ab301

Verify:
Verified on T962x3_ab301

Change-Id: Icb27691b4fd5a1e54070c4a6d3d3c68cdf3a60b7
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: TM2 bringup: enable ADC for linein [1/1]

PD#SWPL-7027

Problem:
audio path AVin is on audio

Solution:
enable ADC for linein

Verify:
Verify on AB311

Change-Id: Iea1d694e0b605d62596635d85416d33f56dbbcb2
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: enable hw resmaple pause thd [1/1]

PD#TV-4638

Problem:
Speaker output high frequency howling
after change from pattern 615 to pattern 1 on chroma22294.
The hw resampler keeps sending noise if it has no input.

Solution:
Enable the hw resample pause thd by default.

Verify:
TL1 X301.

Change-Id: Ib6f0924025e155eaa8ba0e3681b307f7ff56b449
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

audio: disable tl1 acodec dac dapm to depop [1/1]

PD#TV-3933

Problem:
Tl1 acodec has pop sound when first sound appear.

Solution:
Disable the DAPM which disable/enable every time
start/stop the audio stream.

Verify:
Tl1 X301.

Change-Id: Iaaf7da125de513bd8297f6c6e41af0a42c9d25bd
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

audio: add 10ms delay before pdn enable [1/1]

PD#SWPL-7680

Problem:
the pwn signal is self excitable

Solution:
1)add 10ms delay before pdn enable
2)set default clk for extern codec

Verify:
HW verify

Change-Id: I031b20851ee1eeb65215075fc8abe783ceddf42b
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>

audio: add 10ms sleep before pdn enable [1/1]

PD#SWPL-7680

Problem:
mdelay will pend the system

Solution:
change mdelay to usleep_range

Verify:
HW verify

Change-Id: I8452dc7b1056378dbc6b743fc43316eccbf525a5
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>

audio: auge: add loopback driver [1/1]

PD#SWPL-7240

Problem:
limit of current loopback
add loopback b for tl1
add tdmin_lb

Solution:
optimize loopback driver

Verify:
s400, u200, x301, ac200, ab301

Change-Id: I9dd4c7ad041231bb2c49513e354cfb4fb92131c4
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: auge: add lower power mode for PDM & vad [1/1]

PD#SWPL-3825

Problem:
VAD & PDM works in 24m clks for lowpower mode when in deep suspend

Solution:
support VAD & PDM in 24m sysclk, 768k dclk

Verify:
x301

Change-Id: Ic363337ee9b0eba0f890ae62b9e0cb6bb54dcd6a
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: fix TDMOUT channel map error [1/1]

PD#SWPL-6427

Problem:
ALSA tdmout buffer frequently underrun.
This will cause the tdmout channel map error.
And the other channels data go into the spk.

Solution:
1)Adjust the sequence of starting and stopping.
2)reserved frddrA for EQ/DRC module

Verify:
Test more that 1 hour and pass.
Need more stress test.

Change-Id: Ib9b6897f0b6c32652c611a8c2c367aa76b9f1e3f
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: set hdmi format-check threshold by input samplerate [2/2]

PD#SWPL-6340

Problem:
ddp audio input from hdmiin is not smooth

Solution:
set hdmiin format-check threshold by input sr

Verify:
Verified by x301.

Change-Id: Idb8ffa616c3880b1c34d61ca4e8c2917343a9ffc
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>

audio: add lock for resampler [1/1]

PD#SWPL-8134

Problem:
kernel NULL pointer for aml_resample_enable

Solution:
add lock for resampler

Verify:
Need stress test for x301

Change-Id: I1bbf5d7aeab681399c93f0cba9cc59195d3be0d6
Signed-off-by: Shuai Li <shuai.li@amlogic.com>

audio: add clk tuning_enable/start_enable control in dts [1/1]

PD#SWPL-8306

Problem:
speaker without audio on S400. sideeffect of SWPL-7680

Solution:
add control interface in dts to enable clk tuning
and start clk before codec init

Verify:
verify on S400

Change-Id: Ic9f4e7b13b7d4ced18852346cdc7cf5f48e510dc
Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>

audio: add param check for resample [1/1]

PD#SWPL-7798

Problem:
Crashed when audio resample setting params
are invalid.

Solution:
Add check method if the params is invalid.

Verify:
Tl1.

Change-Id: I1e0396be8d401c0a49ff0de9fd7f160f0c8133ca
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
2019-05-15 19:30:57 +08:00
Guosong Zhou
99527e6e97 camera: add mipi csi driver for sm1 [1/1]
PD#SWPL-5388

Problem:
sm1 board camera need add mipi csi module

Solution:
add mipi csi module

Verify:
verified on SM1 AC200

Change-Id: I819f2f74aa8da7d725cb59e5636e790185964f79
Signed-off-by: Guosong Zhou <guosong.zhou@amlogic.com>
2019-04-25 20:25:27 +08:00
Xing Wang
9ac6f2565a dts: sm1: add sound card config [1/2]
PD#SWPL-6151

Problem:
sound card for sm1

Solution:
add sound card for sm1

Verify:
ac200

Change-Id: I1de0cfe1748d401ab0e21b0a244def37b277b1ff
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2019-04-05 15:27:08 +08:00
Shunzhou Jiang
74dcf06299 clk: sm1: add sm1 special clk [1/1]
PD#SWPL-5407

Problem:
not include sm1 special defined clk

Solution:
add this clk

Verify:
sm1_skt

Change-Id: Iaf20aebe377d077d95eb053f7eea99473e3ac45d
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2019-04-03 15:27:23 +08:00
Shunzhou Jiang
7308fec275 clk: sm1: add clk driver [1/1]
PD#SWPL-5407

Problem:
sm1 not have clk driver

Solution:
add clk driver

Verify:
PxP

Change-Id: Id48257d88ef200fd4adb309bf2e4ada1be407753
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2019-04-03 15:27:05 +08:00
Jiamin Ma
c9a4cec1e8 license: add missing license header [1/1]
PD#SWPL-4728

Problem:
Missing license header

Solution:
Add correct license header

Verify:
Compling passed

Change-Id: I291a41172f9ecf2cde7f7705e99ecb20567c9c8f
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2019-03-13 20:22:35 +08:00
Jian Hu
e5a9201a41 clk: g12a: add bt656 clock [1/1]
PD#SWPL-3359

Problem:
the bt656 clocks were missing

Solution:
1.add bt656 clocks
2.fix several errors for media clocks

Verify:
test passed on u200

Change-Id: Iff69e790c78335930d6b2ea54f7544aca464e1fb
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2019-03-13 20:22:08 +08:00
Xing Wang
94e1b61e5b audio: auge: fix drivers for tl1 [1/1]
PD#172587

Problem:
resample, eqdrc, dolby efuse, audio input (from atv, hdmirx)

Solution:
add drivers for them

Verify:
x301

Change-Id: I5187f9824d904283794f6e4be3dd9ce8463908e1
Signed-off-by: Xing Wang <xing.wang@amlogic.com>

Conflicts:
	arch/arm/boot/dts/amlogic/mesontl1.dtsi
	arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts
	arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts
2018-12-17 18:16:09 +08:00
Jian Hu
6cf0c67c72 clk: g12a: add gen clock [1/1]
PD#OTT-1025

Problem:
not support gen clock

Solution:
add gen clock

Verify:
test passed on g12a u200

Change-Id: I5199289d3cd1483fffbbd41f8d104369214ba302
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-12-17 14:52:19 +08:00
Xing Wang
9c7a42844f audio: auge: add sound card support for tl1 [1/1]
PD#172587

Problem:
Bringup tl1 sound card.

Solution:
Add tl1 sound card.
Add external interface for audio input/output.

Verify:
Tested by PTM
Sound card is setup.
TDM and SPDIF internel loopback is ok

Change-Id: I60830ca44a62ee2a8e16343e91e7311152cab161
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2018-10-29 04:19:49 -07:00
Bo Yang
ae2e8e908a arm: dts: tl1: add initial device tree for tl1
PD#172587: arm: dts: tl1: add initial device tree for tl1

Change-Id: I17734ee00d88a84ff19bf17f8edf519e3ed2f0e4
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-09-28 02:51:18 -07:00
Xingyu Chen
821c9713cb pinctrl: txl: add pinctrl & gpio support for txl
PD#168480: pinctrl: txl: add pinctrl & gpio support for txl

Change-Id: I2496cdebfc283e90825f5dd7d20b0e16f57158d2
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:43:51 -07:00
Jian Hu
a53f89545d clk: txl: initial add clock driver
PD#168480: clk: txl: initial add clock driver

remove CLK_SET_RATE_PARENT flag for spicc.
If add CLK_SET_RATE_PARENT, it will change clk81 rate when set
spicc clock rate.

Change-Id: I80fec2c6d10611994ff40b06307e39b51ddb5a1a
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
2018-07-18 02:32:38 -07:00
Shunzhou Jiang
5d4de95a06 clk: clock: add efuse clock for g12a
PD#168568: clock: add efuse clock

Change-Id: I4ef07515db93fd8bf7108bfbe622d0ce261ed2d6
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2018-07-10 18:39:11 -07:00
Jian Hu
ca3c135e30 clk: add gpio 12m and 24m for g12a/b
PD#165090: clk: add gpio 12m and 24m for g12a/b

Change-Id: I2a3e8ed2f318eb13375415939d6216b0f30103a3
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-06-29 00:36:30 -07:00
Qiufang Dai
70908b93bd clk: add media clk and fine-tune clkmsr table for g12b
PD#165090: add clock isp, mipi, vipnanoq, gate etc.
Fine-tune clkmsr table

Change-Id: I4b15996eccac439ce91ac51365411fca7c38f320
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-06-29 00:04:03 -07:00
Qiufang Dai
6c937ab673 clk: add sys1_pll/sys_pll for g12b
PD#165090: Add sys1_pll/sys_pll for g12b

These patch is compatible with g12a.

clk structur:

G12A: sys_pll(0xbd) ----> cpu_mux(0x67) ---> A53
G12B: sys1_pll(0xe0) ----> cpu_mux(0x67) ---> A53
      sys_pll(0xbd) ----> cpu_mux1(0x82) ---> A73

Change-Id: I67b508f216db6124885154ea09ccb4868834e772
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-06-28 23:54:17 -07:00
Qiufang Dai
f6739bf8ea clk: add g12b.c for g12b new clocks
PD#165090: add g12b.c for new clocks, include sys1_pll

Change-Id: If9234037eab5439cf1abfbcecc70c9f4eab6c954
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
2018-06-28 23:44:40 -07:00
Qiufang Dai
0bc5df5436 clk: add sys1_pll for g12b
PD#165090: add sys1_pll for g12b

Change-Id: Icc1be3df1ca9ba2863ce49e0acf0be872e2dd411
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-06-28 23:34:39 -07:00
Victor Wan
324524de04 Merge branch 'android-4.9' into amlogic-4.9-dev 2018-05-22 10:48:42 +08:00
Victor Wan
810c6dd972 Merge branch 'android-4.9' into amlogic-4.9-dev
Signed-off-by: Victor Wan <victor.wan@amlogic.com>

Conflicts:
	arch/arm/configs/bcm2835_defconfig
	arch/arm/configs/sunxi_defconfig
	include/linux/cpufreq.h
	init/main.c
2018-04-24 17:43:19 +08:00
Sean Wang
e58d3bccad dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4
commit 55a5fcafe3 upstream.

Just add binding for a fixed-factor clock axisel_d4, which would be
referenced by PWM devices on MT7623 or MT2701 SoC.

Cc: stable@vger.kernel.org
Fixes: 1de9b21633 ("clk: mediatek: Add dt-bindings for MT2701 clocks")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:34:14 +02:00
Xingyu Chen
3fcf2b78e4 pinctrl: keep the same GPIO ID after adding GPIOV_0 for G12A
PD#163124: pinctrl: keep the same GPIO ID after adding GPIOV_0 for G12A

Change-Id: I45b99df3a15e2bf0f7ad34ae8705dc4a509c70a1
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-03-27 04:22:54 -08:00
Xingyu Chen
0731af6113 pinctrl: add virtual GPIO "GPIOV_0" for g12a
PD#162992: pinctrl: add virtual GPIO "GPIOV_0" for g12a

The gpio is used to set the bit PERIPHS_PIN_MUX_2 BIT[17]. Please refer
the following method to use it.

1). set the PERIPHS_PIN_MUX_2 BIT[17] to <1>
mux_en {
	groups = "sdio_dummy";
	function = "sdio";
}

2). set the PERIPHS_PIN_MUX_2 BIT[17] to <0>
mux_dis {
	groups = "GPIOV_0";
	function = "gpio_periphs";
}

Change-Id: Ied0e6c71ed1ff8ab9a26cb76ec1508d83a4453d7
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-03-26 01:41:10 -08:00
Geert Uytterhoeven
dab825106b ARM: dts: r8a7794: Add DU1 clock to device tree
commit 1764f8081f upstream.

Add the missing module clock for the second channel of the display unit.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22 09:17:44 +01:00
Laxman Dewangan
f29628b716 gpio: core: Decouple open drain/source flag with active low/high
PD#161621: gpio: core: Decouple open drain/source flag with active low/high

Currently, the GPIO interface is said to Open Drain if it is Single
Ended and active LOW. Similarly, it is said as Open Source if it is
Single Ended and active HIGH.

The active HIGH/LOW is used in the interface for setting the pin
state to HIGH or LOW when enabling/disabling the interface.

In Open Drain interface, pin is set to HIGH by putting pin in
high impedance and LOW by driving to the LOW.

In Open Source interface, pin is set to HIGH by driving pin to
HIGH and set to LOW by putting pin in high impedance.

With above, the Open Drain/Source is unrelated to the active LOW/HIGH
in interface. There is interface where the enable/disable of interface
is ether active LOW or HIGH but it is Open Drain type.

Hence decouple the Open Drain with Single Ended + Active LOW and
Open Source with Single Ended + Active HIGH.

Adding different flag for the Open Drain/Open Source which is valid
only when Single ended flag is enabled.

Note: the patch from v4.14-rc6 with original commit ID 4c0facddb

Change-Id: I2f652614d3783caee3f510dc70e5e185379f49a7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-03-06 23:15:29 -08:00
pengcheng chen
b9144dde67 osd: add viu2 support for g12a
PD#156734: osd: add viu2 support for g12a

Change-Id: If225bdd08a0357960ca307ca7614131211b9aed1
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
2018-03-05 19:34:14 -08:00
Jian Hu
6aaff51d03 arm64: dts: add i2c alias aliases node
PD#158433: arm64: dts: add i2c alias in aliases node

add alias for i2c controller to fasten i2c dev id

Change-Id: I87c1999766c69e9df63f551f0559b8028844d660
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-03-05 19:33:55 -08:00
Qiufang Dai
3642f1368b clock: G12A: add hevcf, spicc clock
PD#156734: add hevcf, spicc clock

Change-Id: Ibe63b44e61058255b3b72ef9efaded765e262b0a
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-03-05 15:34:27 +08:00
Qiufang Dai
8bbcb53bd6 clock: g12a: add emmc portA and aoclkc
PD#156734: add emmc portA and aoclkc

Change-Id: Ib54a6eb113bdce21eacc7a2d460df23ee9129e92
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-03-02 15:07:55 +08:00
Xing Wang
bee5db11b7 audio: auge: add sound driver for g12a
PD#156734: audio: auge: add sound driver for g12a

Change-Id: Ic2e9bf734ea33fbbf2911d0d9168934974f37b07
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2018-03-02 15:07:51 +08:00
Qiufang Dai
ecedcccc28 clock: G12A: new add decode, t_sensor clock & vclk2 clk tree
PD#156734: clock: G12A: new add decode, t_sensor clock & vclk2 clk tree

Change-Id: I1a76bb870ecb5793ae7b560472fd2c2aa3f3651f
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-03-02 15:07:50 +08:00
Jian Hu
4d21978ef5 i2c: meson-g12a: add i2c support [1/2]
PD#156734: i2c: meson-g12a: add i2c support

Change-Id: I10ac105b99f7a426e23fef501741a62d3b887985
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2018-03-02 14:52:28 +08:00
Xingyu Chen
294a05a220 pinctrl: add pinctrl&gpio support for g12a
PD#156734: pinctrl: add pinctrl&gpio support for g12a

the new pin feature (drive-strength) is first introduced in Meson
Series SoC [G12A]. we can refer the following example to use:
mux {
	groups = "uart_ao_tx_a", "uart_ao_rx_a";
	function = "uart_ao_a";

	drive-strength = <1>;
}

the value of drive-strength can be set to 0/1/2/3, the larger
the value, the faster the slew rate.

Change-Id: I22c6967aa1d5de1b3f6acb84cb18a79b05c0403b
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-03-02 14:52:26 +08:00
Qiufang Dai
8b5ae71fdf clock: clock tree for G12A
PD#156734: base clock tree for G12A,
include clk81, ee gate, sdemmc clock, fix/hifi/syspll/pcie plls, mpll, clkmsr

Change-Id: I9fe7c1d64d9db5d384070f5dcefdc69f5f60dbd2
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-03-02 14:52:26 +08:00
Qiufang Dai
ad6c0e42a2 G12A: initial clk headfile for pxp
PD#156734: G12A: initial clk headfile for pxp

Change-Id: I82b549cea704d9d1b94b36dfb27eaf5547bcf172
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
2018-03-02 14:52:25 +08:00
Victor Wan
2c95ea743b Merge branch 'android-4.9' into amlogic-4.9-dev
Conflicts:
	arch/arm/configs/omap2plus_defconfig
	drivers/Makefile
	drivers/android/binder.c
2018-01-08 18:44:19 +08:00
Xingyu Chen
d7a862c50f pinctrl: define the pinmux with the same format [4/4]
PD#157965: pinctrl: define the pinmux with the same format.

there are two different pin controllers in Meson Soc Series, one of
them uses continuous 4-bit register to select function for each pin
(Eg: AXG and next), the other use indefinite bits that maybe from
different registers (Eg: Before AXG and GXLX)

previously, the driver use two different format to define the pinmux,
as follows:
[1] Before AXG and GXLX:
mux {
	groups = "uart_ao_tx_a", "uart_ao_rx_a";
	function = "uart_ao_a";
}

[2] AXG and next
mux {
	pins = "GPIOAO_0", "GPIOAO_1";
	function = "uart_ao_a";
}

which is a little confusing,and in this patch define the pinmux with
one format[1].

Change-Id: I04fb256294e1b664224c50a1baa622eb3a50b1c1
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2018-01-07 23:19:50 -07:00
Jian Hu
70aee99c74 clk: meson-txlx: add clock tree driver
PD#154260: clk: meson-txlx: add clock tree driver

Change clkc driver init order

The loading order of vpu driver is postcore_initcall,
but clock order is device_initcall.clock order should
be higher,change macro CLK_OF_DECLARE instead

Optimizing mux/div/gate descriptions.

Change-Id: I20cd8111ac6bd60f350cdddc224bad48c13fcfb1
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
2017-12-20 20:22:06 +08:00
Xingyu Chen
de48f69ab6 pinctrl: meson-txlx: add pinctrl & gpio driver
PD#154260: pinctrl: meson-txlx: add pinctrl & gpio driver

Change-Id: I279691096150ac3ed74660f1bcf602ae86b6b1e4
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
2017-12-20 19:49:21 +08:00
wenbiao zhang
c9814937de clk: update clk total number [1/1]
PD#152261: clk: update clk total number
add bt656 clk, but total number not update

Change-Id: I24f2f17e4e773a883bab3f564144a49768fc16d5
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
2017-12-14 03:28:27 -07:00
Tony Lindgren
c26fa1306c ARM: dts: Fix omap3 off mode pull defines
[ Upstream commit d97556c801 ]

We need to also have OFFPULLUDENABLE bit set to use the off mode pull values.
Otherwise the line is pulled down internally if no external pull exists.

This is has some documentation at:

http://processors.wiki.ti.com/index.php/Optimizing_OMAP35x_and_AM/DM37x_OFF_mode_PAD_configuration

Note that the value is still glitchy during off mode transitions as documented
in spz319f.pdf "Advisory 1.45". It's best to use external pulls instead of
relying on the internal ones for off mode and even then anything pulled up
will get driven down momentarily on off mode restore for GPIO banks other
than bank1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21 09:23:22 +01:00
Marek Szyprowski
872c075b6c clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks
[ Upstream commit 5ccb58968b ]

Add missing identifiers for phyclk_mipidphy0_bitclkdiv8_phy and
phyclk_mipidphy0_rxclkesc0_phy clocks. Access to those clocks is needed
to setup initial clock configuration for display subsystem in device tree
in order to avoid dependency on the configuration left by the bootloader.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 15:53:12 +01:00
Evoke Zhang
3bc6cab0f9 tvin: add bt656in and hdmirx_ext support
PD#149610: tvin: add bt656in & hdmirx_ext support

Change-Id: Ic4bde4b8d9c5a945f59023dd6cb961b736c83eb2
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
2017-09-06 22:09:48 -07:00
Yun Cai
3261541e35 clk: add mipi enable and bandgap gate
PD#146437: axg: add mipi enable and bandgap gate and
	update clkmsr for cts_encl_clk

Change-Id: If14ede7ab0a0b649879153cb1089bec04c7412b2
Signed-off-by: Yun Cai <yun.cai@amlogic.com>
2017-07-31 10:24:30 +08:00
Yue Wang
baf42f6dbb pcie: fix pcie power on timing.
PD#147564: pcie: fix pxie power on timing.

Change-Id: I28d39f0ed030f8886adecc9b575540c0ffc13716
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
2017-07-25 02:38:01 -07:00