aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-03-30 23:21:32 +0200
committerRafał Miłecki <rafal@milecki.pl>2022-03-30 23:22:46 +0200
commit9ac80a47ea03361993386c100deba2aa164991ad (patch)
tree96c82b237e4779a87326f34ecd1e9cd9dc72ed20 /target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch
parentc41da167d21612916376c9125e8c75ed6fe706fe (diff)
downloadupstream-9ac80a47ea03361993386c100deba2aa164991ad.tar.gz
upstream-9ac80a47ea03361993386c100deba2aa164991ad.tar.bz2
upstream-9ac80a47ea03361993386c100deba2aa164991ad.zip
bcm53xx: prepare kernel 5.15 support
Tested on Luxul XWR-3150 (boot, NAND, PCIe, switch, Ethernet). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch')
-rw-r--r--target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch104
1 files changed, 104 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch b/target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch
new file mode 100644
index 0000000000..6118e98cc5
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.15/031-v5.17-0004-ARM-BCM53016-MR32-convert-to-Broadcom-iProc-I2C-Driv.patch
@@ -0,0 +1,104 @@
+From de7880016665afe7fa7d40e1fafa859260d53ba1 Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@gmail.com>
+Date: Thu, 28 Oct 2021 09:03:44 +0200
+Subject: [PATCH] ARM: BCM53016: MR32: convert to Broadcom iProc I2C Driver
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+replaces the bit-banged i2c-gpio provided i2c functionality
+with the hardware in the SoC.
+
+During review of the MR32, Florian Fainelli pointed out that the
+SoC has a real I2C-controller. Furthermore, the connected pins
+(SDA and SCL) would line up perfectly for use. Back then I couldn't
+get it working though and I left it with i2c-gpio (which worked).
+
+Now we know the reason: the interrupt was incorrectly specified.
+(Hence, this patch depends on Florian Fainelli's
+"ARM: dts: BCM5301X: Fix I2C controller interrupt" patch).
+
+Cc: Florian Fainelli <f.fainelli@gmail.com>
+Cc: Rafał Miłecki <zajec5@gmail.com>
+Cc: Matthew Hagan <mnhagan88@gmail.com>
+Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 62 ++++++++++------------
+ 1 file changed, 28 insertions(+), 34 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+@@ -84,40 +84,6 @@
+ max-brightness = <255>;
+ };
+ };
+-
+- i2c {
+- /*
+- * The platform provided I2C does not budge.
+- * This is a replacement until I can figure
+- * out what are the missing bits...
+- */
+-
+- compatible = "i2c-gpio";
+- sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+- scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
+- i2c-gpio,delay-us = <10>; /* close to 100 kHz */
+- #address-cells = <1>;
+- #size-cells = <0>;
+-
+- current_sense: ina219@45 {
+- compatible = "ti,ina219";
+- reg = <0x45>;
+- shunt-resistor = <60000>; /* = 60 mOhms */
+- };
+-
+- eeprom: eeprom@50 {
+- compatible = "atmel,24c64";
+- reg = <0x50>;
+- pagesize = <32>;
+- read-only;
+- #address-cells = <1>;
+- #size-cells = <1>;
+-
+- mac_address: mac-address@66 {
+- reg = <0x66 0x6>;
+- };
+- };
+- };
+ };
+
+ &uart0 {
+@@ -250,3 +216,31 @@
+ };
+ };
+ };
++
++&i2c0 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinmux_i2c>;
++
++ clock-frequency = <100000>;
++
++ current_sense: ina219@45 {
++ compatible = "ti,ina219";
++ reg = <0x45>;
++ shunt-resistor = <60000>; /* = 60 mOhms */
++ };
++
++ eeprom: eeprom@50 {
++ compatible = "atmel,24c64";
++ reg = <0x50>;
++ pagesize = <32>;
++ read-only;
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ mac_address: mac-address@66 {
++ reg = <0x66 0x6>;
++ };
++ };
++};